Move the upgrade to the end of setup.

Upgrading will update the kernel, which will require reboot. In particular, cifs mounting won't work until the reboot.
This commit is contained in:
cimryan
2018-11-03 19:43:02 -07:00
parent 7b31410802
commit 2f504c8637

View File

@@ -191,10 +191,12 @@ function make_root_fs_readonly () {
/tmp/make-root-fs-readonly.sh
}
function upgrade_packages () {
function update_package_index () {
setup_progress "Updating package index files..."
apt-get update
}
function upgrade_packages () {
setup_progress "Upgrading installed packages..."
apt-get --assume-yes upgrade
}
@@ -202,7 +204,7 @@ function upgrade_packages () {
export -f setup_progress
export HEADLESS_SETUP
upgrade_packages
update_package_index
headless_setup_populate_variables
@@ -248,6 +250,8 @@ fi
make_root_fs_readonly
upgrade_packages
# If USE_LED_FOR_SETUP_PROGRESS = true.
setup_led_on