diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-02-02 11:25:01 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-02-02 11:25:01 +0000 |
commit | cbc58c126113bda792170eb9a33a9e606619f745 (patch) | |
tree | 896385a19413c92356e0fa91a205b7243dcdab3e /rescue/make_rescue_img | |
parent | b66921f290705eca2e99aa349b5c37c7b8ef0a47 (diff) | |
download | drakx-cbc58c126113bda792170eb9a33a9e606619f745.tar drakx-cbc58c126113bda792170eb9a33a9e606619f745.tar.gz drakx-cbc58c126113bda792170eb9a33a9e606619f745.tar.bz2 drakx-cbc58c126113bda792170eb9a33a9e606619f745.tar.xz drakx-cbc58c126113bda792170eb9a33a9e606619f745.zip |
add a basic partimage save_all/rest_all feature
Diffstat (limited to 'rescue/make_rescue_img')
-rwxr-xr-x | rescue/make_rescue_img | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/rescue/make_rescue_img b/rescue/make_rescue_img index 12cd9287c..0bf9ba05f 100755 --- a/rescue/make_rescue_img +++ b/rescue/make_rescue_img @@ -112,6 +112,22 @@ installown("../mdk-stage1/dhcp-client", "/usr/sbin"); #- note that on biarch systems, we may need to have both /lib and /lib64 __ "strip $tmp/{lib,$lib,bin,sbin}/* $tmp/usr/{bin,sbin}/* 2>/dev/null"; +if ($ENV{PARTIMAGE_DIR}) { + _ "rpm2cpio $ENV{PARTIMAGE_RPM} | (cd $tmp ; cpio -idu ./usr/sbin/partimage)"; + my $server = 'partimaged'; + $server = 'leia'; + substInFile { + $_ = <<EOF if /^\s*rescue-gui/; + if grep -q save_all /proc/cmdline; then + drvinst ; dhcp-client ; partimage -s $server -b save_all $ENV{PARTIMAGE_DIR}; reboot + fi + if grep -q rest_all /proc/cmdline; then + drvinst ; dhcp-client ; partimage -s $server -b rest_all $ENV{PARTIMAGE_DIR}; reboot + fi +EOF + } "$tmp/etc/rc.sysinit"; +} + exit 0 if $ARGV[0]; _ "mkisofs -quiet -D -R $tmp | create_compressed_fs - 65536 $rescue 200 2>/dev/null"; |