summaryrefslogtreecommitdiffstats
path: root/rescue/make_partimage_save_rest_all
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 /rescue/make_partimage_save_rest_all
parent4889288e5d2654e6127a9606de81f81da4b282f1 (diff)
downloaddrakx-backup-do-not-use-32f10b4a2a80a58f3ef812e3cedcb12f124abf4f.tar
drakx-backup-do-not-use-32f10b4a2a80a58f3ef812e3cedcb12f124abf4f.tar.gz
drakx-backup-do-not-use-32f10b4a2a80a58f3ef812e3cedcb12f124abf4f.tar.bz2
drakx-backup-do-not-use-32f10b4a2a80a58f3ef812e3cedcb12f124abf4f.tar.xz
drakx-backup-do-not-use-32f10b4a2a80a58f3ef812e3cedcb12f124abf4f.zip
- in rest_all, try to restore from the cdrom
- remove the debugging setting of leia as the partimage server
Diffstat (limited to 'rescue/make_partimage_save_rest_all')
-rwxr-xr-xrescue/make_partimage_save_rest_all24
1 files changed, 20 insertions, 4 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