summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-02-28 11:43:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-02-28 11:43:32 +0000
commit32f10b4a2a80a58f3ef812e3cedcb12f124abf4f (patch)
tree7175603fbd8ec3be80fc5e9a2e13f09d48f0b07d
parent4889288e5d2654e6127a9606de81f81da4b282f1 (diff)
downloaddrakx-32f10b4a2a80a58f3ef812e3cedcb12f124abf4f.tar
drakx-32f10b4a2a80a58f3ef812e3cedcb12f124abf4f.tar.gz
drakx-32f10b4a2a80a58f3ef812e3cedcb12f124abf4f.tar.bz2
drakx-32f10b4a2a80a58f3ef812e3cedcb12f124abf4f.tar.xz
drakx-32f10b4a2a80a58f3ef812e3cedcb12f124abf4f.zip
- in rest_all, try to restore from the cdrom
- remove the debugging setting of leia as the partimage server
-rwxr-xr-xrescue/make_partimage_save_rest_all24
-rwxr-xr-xrescue/make_rescue_img8
2 files changed, 26 insertions, 6 deletions
diff --git a/rescue/make_partimage_save_rest_all b/rescue/make_partimage_save_rest_all
index cf4c79d2c..93c4e463f 100755
--- a/rescue/make_partimage_save_rest_all
+++ b/rescue/make_partimage_save_rest_all
@@ -1,13 +1,21 @@
#!/bin/sh
-[ $# != 1 ] && {
- echo "usage: make_partimage_save_rest_all <partimage special rpm>" ;
+[ $# != 1 -a $# != 2 ] && {
+ echo "usage: make_partimage_save_rest_all <partimage special rpm> [<partimage dir>]" ;
exit 1
}
rpm=$1
+partimage_dir=$2
where=/data/box
+if [ -n "$partimage_dir" ]; then
+ [ -d "$partimage_dir$where" ] || {
+ echo "can't find $partimage_dir$where"
+ exit 1
+ }
+fi
+
rm -rf .tmp
mkdir -p .tmp/isolinux
cp -f /usr/lib/syslinux/isolinux.bin ../isolinux/alt0/* .tmp/isolinux
@@ -28,10 +36,18 @@ label save_all
append initrd=all.rdz rescue save_all automatic=method:cdrom
label rest_all
kernel vmlinuz
- append initrd=all.rdz rescue rest_all automatic=method:cdrom
+ append initrd=all.rdz rescue keepmounted rest_all automatic=method:cdrom
+label rescue
+ kernel vmlinuz
+ append initrd=all.rdz rescue automatic=method:cdrom
EOF
- mkisofs -o part_$action.iso -r -J -hide-rr-moved -nobak -cache-inodes -publisher Mandrakesoft -V 'mdk part save/rest' -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table .tmp
+ if [ $action = rest_all ]; then
+ mkdir -p .tmp$where
+ ln -s $partimage_dir$where/* .tmp$where
+ fi
+
+ mkisofs -f -o part_$action.iso -r -J -hide-rr-moved -nobak -cache-inodes -publisher Mandrakesoft -V 'mdk part save/rest' -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table .tmp
done
rm -rf .tmp
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";