From d6847deaf0a50bdff3fa8bc442a2b705ae6343c1 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Tue, 1 Nov 2016 18:09:40 +0000 Subject: [PATCH] integrate-distro.sh: Integrate-distro.sh informative-only commands are not run before ssh Signed-off-by: Jan Lindemann --- scripts/integrate-distro.sh | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/scripts/integrate-distro.sh b/scripts/integrate-distro.sh index a430b244..c2530f1d 100644 --- a/scripts/integrate-distro.sh +++ b/scripts/integrate-distro.sh @@ -411,7 +411,7 @@ usage() echo " usage: $myname -h - $myname [options] [install|mount|unmount|mkinitrd|fs|parted-script] + $myname [options] [install|mount|unmount|mkinitrd|fs|parted-script|root-dir] options: -f @@ -910,7 +910,7 @@ make_boot_menu() |default 0 |timeout 8 |##YaST - generic_mbr - |gfxmenu ($disk,$grub_slash_boot_partition_num)/message + |# gfxmenu ($disk,$grub_slash_boot_partition_num)/message | |title Default | root ($disk,$grub_slash_boot_partition_num) @@ -919,7 +919,7 @@ make_boot_menu() | |title Failsafe | root ($disk,$grub_slash_boot_partition_num) - | kernel /vmlinuz root=$run_dev_root showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe + | kernel /vmlinuz root=$run_dev_root showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe rdinitdebug rdshell | initrd /initrd-local | |title Default $kernel_version @@ -1301,6 +1301,24 @@ x86_64|"") die "invalid architecture $arch specified";; esac +if [ "$o_root" ]; then + root=$o_root/ro +else + root=/srv/nfs/boot/distros/$o_name-$arch/ro +fi + +case $cmd in +parted-script) + parted_script + ;; +root-dir) + echo $root + exit $? + ;; +*) + ;; +esac + if [ `whoami` != root -o "$l32" ]; then [ ! "$scm_user" ] && scm_user=`whoami` exe=$0 @@ -1322,12 +1340,6 @@ fi [ ! "$scm_user" ] && scm_user=`whoami` -if [ "$o_root" ]; then - root=$o_root/ro -else - root=/srv/nfs/boot/distros/$o_name-$arch/ro -fi - # -- set up variables denoting devices if [ "$install_dev" ]; then @@ -1402,9 +1414,6 @@ mkinitrd) setup_boot_loader_net exit $? ;; -parted-script) - parted_script - ;; *) log "unknown command \"$cmd\"" usage 1