diff options
-rw-r--r-- | initrd/initrd-stuff/etc/functions | 11 | ||||
-rwxr-xr-x | initrd/initrd-stuff/init | 18 |
2 files changed, 19 insertions, 10 deletions
diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions index 50c6211c..2f2e3c0c 100644 --- a/initrd/initrd-stuff/etc/functions +++ b/initrd/initrd-stuff/etc/functions @@ -2,7 +2,7 @@ # linux diskless clients (included by init, hwautocfg, # servconfig, ... within initial ramdisk) # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 08-04-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 11-04-2006 # Felix Endres, 21-03-2006 # # Copyright: (c) 2006 - RZ Universitaet Freiburg @@ -56,6 +56,9 @@ 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 fi } msg () { @@ -70,6 +73,12 @@ while [ $count -gt 0 ] ; do count=`expr $count \- 1` ; done return 0 } ####################################################################### +# (re)generate dynamic linked libraries cache from /etc/ld.so.conf +ldcfg () { +[ -z "${NOLDSC}" ] && echo "$init_ldcfg" && ldconfig /tmp/ld.so.cache & +} + +####################################################################### # load a certain module - name of module with path in argument one, the # error message in second argument loadmod () { diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init index ef67c9b4..90347ffb 100755 --- a/initrd/initrd-stuff/init +++ b/initrd/initrd-stuff/init @@ -280,7 +280,7 @@ if [ -n "${NBD}" ] ; then RWRO="rw" RDEV=/dev/cow/0 # run ldconfig if not switched off via kernel command line - [ -z "${NOLDSC}" ] && echo $init_ldcfg && ldconfig /etc/ld.so.cache & + ldcfg fi # finally mount the block device mount -n -t $RFST -o $RWRO $RDEV /mnt @@ -315,12 +315,6 @@ if [ -n "${UNIONFS}" -o -n "${UNION}" ] ; then UNIONFS=""; } fi -# if additional sources should be used for a combined root filesystem -# probably more sources should be merged into union (${UNION} is defined) -if [ -n "${UNION}" ] ; then - # unionctl - : -fi # setup of client root filesystem dependent on the availability of UnionFS if [ -n "${UNIONFS}" ] ; then @@ -333,8 +327,14 @@ if [ -n "${UNIONFS}" ] ; then none /mnt mkdir -p /mnt/uniontmp mount -n --move ${RWDIR}/uniontmp /mnt/uniontmp + # if additional sources should be used for a combined root filesystem + # probably more sources should be merged into union (${UNION} is defined) + if [ -n "${UNION}" ] ; then + # unionctl + : + fi # run ldconfig if not switched off via kernel command line - [ -z "${NOLDSC}" ] && echo "$init_ldcfg" && ldconfig /etc/ld.so.cache & + ldcfg elif [ -z "$COWLOOP" ] ; then echo "Using bind mounts to ramdisk for rw access" mount -n -t tmpfs -o size=${TMPFSSIZE} ramfs ${RWDIR} @@ -343,7 +343,7 @@ elif [ -z "$COWLOOP" ] ; then mount -n --bind ${RWDIR}/${path} /mnt/${path} done # see above ... - [ -z "${NOLDSC}" ] && echo "$init_ldcfg" && ldconfig /tmp/ld.so.cache & + ldcfg for path in ${D_RODIRSINRW}; do if [ -d /mnt/${path} ] ; then LIST=${path}" "$LIST |