diff options
Diffstat (limited to 'rescue/Flash/scripts')
-rwxr-xr-x | rescue/Flash/scripts/upgrade | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/rescue/Flash/scripts/upgrade b/rescue/Flash/scripts/upgrade index f6d60bd34..28c0cae9e 100755 --- a/rescue/Flash/scripts/upgrade +++ b/rescue/Flash/scripts/upgrade @@ -6,6 +6,9 @@ source rescue_common tmpdir="/tmp/flash-rescue-root" rootdir="$tmpdir/pen" +media_dir="/tmp/media" +upgrade_dir="$media_dir/upgrade" + config_files_network_scripts="etc/sysconfig/network-scripts/ifcfg-* \ etc/sysconfig/network-scripts/cellular.d \ @@ -122,6 +125,16 @@ function remove_non_user_nor_config_files() { } function copy_new_version() { + rm -rf $rootdir$boot_rel + rm -f $rootdir$loopbacks_rel/.*sqf + rm -f $rootdir$loopbacks_rel/.*sqfs + [ -d "$modules_dir" ] && rm -rf $modules_dir + + cp -a $upgrade_dir/* $upgrade_dir/.??* $rootdir + + new_label=$(read_version_variables "2.0"; echo $label) + MTOOLS_SKIP_CHECK=1 mlabel -i $usbroot_device ::$new_label + return 0 } @@ -178,6 +191,8 @@ fi sys_loop="$rootdir$loopbacks_rel/system.loop" sfs_loop="$rootdir$loopbacks_rel/distrib.sqfs" +modules_dir="$rootdir$loopbacks_rel/modules" + if ! prepare; then cleanup exit 1 |