mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-03-14 21:10:11 +01:00
iopu: configuration migration is handled via iopu_chroot. Like the bootloader upgrade.
This commit is contained in:
parent
6f5e41bb76
commit
c5c4a6dcbe
2 changed files with 12 additions and 1 deletions
|
|
@ -271,6 +271,7 @@ log "Transfering configuration to new system."
|
|||
|
||||
# Force upgrade of boot loader
|
||||
[ $upd_forceboot -eq 1 ] && chroot_cmdline="$chroot_cmdline -b"
|
||||
[ $upd_keepconfig -eq 1 ] && chroot_cmdline="$chroot_cmdline -c"
|
||||
|
||||
mount_newroot
|
||||
chroot /tmp/newroot_overlay /sbin/iopu_chroot $chroot_cmdline
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
# by functions declared in this script
|
||||
upd_forceboot=0
|
||||
log_stdout=1 # set to 0 to prevent the log to also print to stdout
|
||||
upd_keepconfig=0 # set this to keep the current configuration.
|
||||
|
||||
###############################################################################
|
||||
# import external functions
|
||||
|
|
@ -37,12 +38,15 @@ function log {
|
|||
}
|
||||
|
||||
|
||||
while getopts "hb" opt; do
|
||||
while getopts "hbc" opt; do
|
||||
case $opt in
|
||||
h)
|
||||
upd_usage
|
||||
exit 1
|
||||
;;
|
||||
c)
|
||||
upd_keepconfig=1
|
||||
;;
|
||||
b)
|
||||
upd_forceboot=1
|
||||
;;
|
||||
|
|
@ -59,3 +63,9 @@ cp /tmp/oldroot/tmp/upd_log /root/upd_log
|
|||
# Upgrade boot loader if needed.
|
||||
function_call upd_program_boot
|
||||
|
||||
# Let the new upgrade do whatever it needs,
|
||||
# such as configuration migration etc.
|
||||
if [ $upd_keepconfig -eq 1 -a -x /lib/upgrade/post-rootfs-fixup ]; then
|
||||
(/lib/upgrade/post-rootfs-fixup) || exit
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue