summaryrefslogtreecommitdiffstats
path: root/rescue/make_rescue_img
diff options
context:
space:
mode:
Diffstat (limited to 'rescue/make_rescue_img')
-rwxr-xr-xrescue/make_rescue_img8
1 files changed, 6 insertions, 2 deletions
diff --git a/rescue/make_rescue_img b/rescue/make_rescue_img
index 0bf9ba05f..6b79edcf4 100755
--- a/rescue/make_rescue_img
+++ b/rescue/make_rescue_img
@@ -115,14 +115,18 @@ __ "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
+ local=/tmp/image$ENV{PARTIMAGE_DIR}
+ if [ -d \$local ]; then
+ partimage -b rest_all \$local; reboot
+ else
+ drvinst ; dhcp-client ; partimage -s $server -b rest_all $ENV{PARTIMAGE_DIR}; reboot
+ fi
fi
EOF
} "$tmp/etc/rc.sysinit";