summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-12-11 15:03:44 +0545
committerPhil Davis <phil.davis@inf.org>2015-12-11 15:03:44 +0545
commitf5ed821f270627848646f9921b407724ad72ac0b (patch)
treec3197502e63e8eb5df64269bce07881423a16b79
parent53f1728bab048bb1a4fab9c2cc09e9aee85d4069 (diff)
downloadpfsense-f5ed821f270627848646f9921b407724ad72ac0b.zip
pfsense-f5ed821f270627848646f9921b407724ad72ac0b.tar.gz
Only ask Proceed with upgrade question once
On nanoBSD there is a "Proceed with upgrade?" question warning about the duplicate slice. After answering "y" to that, the system does the duplicate slice, which takes some minutes. Then it asks again "Proceed with upgrade?" after displaying all the packages it will install. That is a bit annoying at the console - I answer "y" and go off to make a cup of tea, only to come back and find that it is waiting asking again. On nanoBSD a reboot is known to be required anyway, because even if it is some little package that gets upgraded, and not the core OS, the partition is always switched. So we can say that in the first warning and then skip asking "Proceed with upgrade?" a second time. What do you think? Should it ask a 2nd time after displaying the packages to be installed? Or is it OK to skip that confirmation prompt? Also, I moved the call to setup_nanobsd_env inside the "if nanobsd" - it worked like it was because setup_nanobsd_env returns without doing anything if the system is not nanobsd, but it just looked odd and there seems no point calling it when not nanobsd.
-rwxr-xr-xsrc/usr/local/sbin/pfSense-upgrade6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/usr/local/sbin/pfSense-upgrade b/src/usr/local/sbin/pfSense-upgrade
index e747b0e..297476d 100755
--- a/src/usr/local/sbin/pfSense-upgrade
+++ b/src/usr/local/sbin/pfSense-upgrade
@@ -319,6 +319,8 @@ pkg_upgrade() {
_echo "Before starting the upgrade process, the currently mounted nanobsd partition"
_echo "needs to be cloned to the secondary partition, where the update will happen"
_echo ""
+ _echo "After installation a reboot will be required to switch partition."
+ _echo ""
if [ -z "${yes}" ]; then
_echo -n "Proceed with upgrade? (y/N) "
read answer
@@ -326,9 +328,11 @@ pkg_upgrade() {
_echo "Aborting..."
_exit 0
fi
+ # Do not make the user have to answer again.
+ yes=1
fi
+ setup_nanobsd_env
fi
- setup_nanobsd_env
need_reboot=1
fi
OpenPOWER on IntegriCloud