diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2006-02-28 16:49:53 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2006-02-28 16:49:53 +0000 |
commit | 95affa82b7417da217c4a15958cdd4fab0fdb50f (patch) | |
tree | a8b095f54c89ff2498c090c37ef7b4e81cbfec14 | |
parent | 34099be3cf773eac19aa31657cf3d80f8bec7fb9 (diff) | |
download | drakx-backup-do-not-use-95affa82b7417da217c4a15958cdd4fab0fdb50f.tar drakx-backup-do-not-use-95affa82b7417da217c4a15958cdd4fab0fdb50f.tar.gz drakx-backup-do-not-use-95affa82b7417da217c4a15958cdd4fab0fdb50f.tar.bz2 drakx-backup-do-not-use-95affa82b7417da217c4a15958cdd4fab0fdb50f.tar.xz drakx-backup-do-not-use-95affa82b7417da217c4a15958cdd4fab0fdb50f.zip |
handle BOX=... on cmdline
-rwxr-xr-x | rescue/make_rescue_img | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/rescue/make_rescue_img b/rescue/make_rescue_img index 952ad942d..6cd4ecab7 100755 --- a/rescue/make_rescue_img +++ b/rescue/make_rescue_img @@ -90,10 +90,13 @@ if ($ENV{PARTIMAGE_RPM}) { $server = 'leia'; my $default_dir = '/data/box'; - my $partimage_dir = $ENV{PARTIMAGE_DIR} || $default_dir; substInFile { - $_ = <<EOF if /^\s*rescue-gui/; + $_ = " server=$server\n" . " default_dir=$default_dir\n" . <<'EOF' if /^\s*rescue-gui/; + + partimage_dir=`perl -lne 'print $1 if /BOX=(\S+)/' /proc/cmdline` + [ -z "$partimage_dir" ] && partimage_dir=$default_dir + if grep -q save_all /proc/cmdline; then partimage_whole_disk -s $server save_all $default_dir fi |