summaryrefslogtreecommitdiffstats
path: root/rescue
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-07-05 15:04:48 +0000
committerOlivier Blin <oblin@mandriva.com>2007-07-05 15:04:48 +0000
commit43f391bd5e872fb3c363e0c9a647ecf75277f48c (patch)
treed0b143a66f1a9be35b9f53341df003bc62307ce7 /rescue
parentd0b92b6eb207b2fd8282e60eb49c91a652c27e27 (diff)
downloaddrakx-backup-do-not-use-43f391bd5e872fb3c363e0c9a647ecf75277f48c.tar
drakx-backup-do-not-use-43f391bd5e872fb3c363e0c9a647ecf75277f48c.tar.gz
drakx-backup-do-not-use-43f391bd5e872fb3c363e0c9a647ecf75277f48c.tar.bz2
drakx-backup-do-not-use-43f391bd5e872fb3c363e0c9a647ecf75277f48c.tar.xz
drakx-backup-do-not-use-43f391bd5e872fb3c363e0c9a647ecf75277f48c.zip
copy files from new version and set new label
Diffstat (limited to 'rescue')
-rwxr-xr-xrescue/Flash/scripts/upgrade15
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