diff options
author | Dirk von Suchodoletz | 2006-04-12 00:19:48 +0200 |
---|---|---|
committer | Dirk von Suchodoletz | 2006-04-12 00:19:48 +0200 |
commit | 2ad560f708aef40729ec58cdc0d751f43594a98e (patch) | |
tree | f375e65c2039875ad118cc6b4815116481300002 /initrd/initrd-stuff/etc/functions | |
parent | Bugfix: Swapped Vertical and Horizontal Frequency Ranges for displays that do... (diff) | |
download | core-2ad560f708aef40729ec58cdc0d751f43594a98e.tar.gz core-2ad560f708aef40729ec58cdc0d751f43594a98e.tar.xz core-2ad560f708aef40729ec58cdc0d751f43594a98e.zip |
simplifications for union mounts in init (but problems still exist),
message output for nfs mounts changed ...
git-svn-id: http://svn.openslx.org/svn/openslx/ld4@181 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd/initrd-stuff/etc/functions')
-rw-r--r-- | initrd/initrd-stuff/etc/functions | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions index 2f2e3c0c..b7e7ecce 100644 --- a/initrd/initrd-stuff/etc/functions +++ b/initrd/initrd-stuff/etc/functions @@ -7,7 +7,7 @@ # # Copyright: (c) 2006 - RZ Universitaet Freiburg # -# Version: 0.4.2c +# Version: 0.4.2d ####################################################################### # generate events with the sysfs trigger @@ -56,9 +56,13 @@ if [ -n "$2" ] ; then else echo -e "${error_msg}${e_msg}${error_shell}" /bin/sh - echo "Rebooting now ..." - usleep 5 - echo "b" > /proc/sysrq_trigger + echo -n "Reboot now? [y]" + read input +# [ -z "$input" -o "$input" = "y" -o "$input" = "Y" ] && { +# usleep 100 +# [ -f /proc/sysrq-trigger ] || mount -t proc none /proc +# echo "b" > /proc/sysrq-trigger +# } fi } msg () { @@ -152,12 +156,8 @@ nfsmnt () { local nfsroot=$1 local dest=$2 -if [ -z "$dest" ] ; then - dest="/mnt" - e_nfs="$error_rnfs" -else - e_nfs="$error_gnfs" -fi +local ret=0 +[ -z "$dest" ] && dest="/mnt" for mnt in nfsmount mount none; do test -x /bin/$mnt && break; done @@ -165,17 +165,18 @@ done loadmod /lib/modules/@@@KERNVER@@@/kernel/fs/nfs/nfs.ko "$error_modnfs" case $mnt in nfsmount) - nfsmount -o ro $nfsroot $dest || error "$e_nfs" + nfsmount -o ro $nfsroot $dest || ret=1 ;; mount) - portmap || error "$error_portm" - mount -n -t nfs -o ro,nolock $nfsroot $dest || error "$e_nfs" + portmap || { echo "$error_portm"; ret=1; } + mount -n -t nfs -o ro,nolock $nfsroot $dest || ret=1 killall -9 portmap ;; none) error "$error_mntt" ;; esac +return $ret } ####################################################################### # create configuration file for dhclient |