From 385b63be3fa69d662759e5751a7817cca6b7e44d Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 13 Jun 2008 13:15:31 +0000 Subject: merge partimage hooks in real rc.sysinit (and drop hardcoded leia) --- rescue/tree/etc/rc.sysinit | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'rescue/tree/etc') diff --git a/rescue/tree/etc/rc.sysinit b/rescue/tree/etc/rc.sysinit index cbb42aed3..9828ba324 100755 --- a/rescue/tree/etc/rc.sysinit +++ b/rescue/tree/etc/rc.sysinit @@ -53,7 +53,20 @@ stty sane grep -q noauto /proc/cmdline || drvinst SERIAL_USB -if grep kamethod /proc/cmdline; then +partimage_default_dir=/data/box +partimage_dir=`perl -lne 'print $1 if /BOX=(\S+)/' /proc/cmdline` +[ -z "$partimage_dir" ] && partimage_dir=$partimage_default_dir +partimage_server=`perl -lne 'print $1 if /\bpserver=(\S+)/' /proc/cmdline` + +if grep -q save_all /proc/cmdline; then + partimage_whole_disk -s $partimage_server save_all $partimage_default_dir +elif grep -q rest_all /proc/cmdline; then + if [ -d /tmp/image$partimage_dir ]; then + partimage_whole_disk rest_all /tmp/image$partimage_dir + else + partimage_whole_disk -s $partimage_server rest_all $partimage_dir + fi +elif grep kamethod /proc/cmdline; then echo "Welcome to Ka" drvinst ln -sf /tmp/stage2/ka $KADIR @@ -62,8 +75,6 @@ if grep kamethod /proc/cmdline; then echo "-------- Starting LOG server -------------" perl send_status.pl > /tmp/kacmd & exec ./ka_replication.sh > /tmp/ka_log-$HOSTNAME-$DATE 2>&1 -fi - -if ! grep -q expert /proc/cmdline; then +elif ! grep -q expert /proc/cmdline; then rescue-gui fi -- cgit v1.2.1