From 4fca608b84d4bc1c5abe78cb5956ff17c924e2c2 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Fri, 20 Jan 2006 10:31:01 +0000 Subject: Boot.ld als erstes Runlevelskript (per distro-spez. Funktion). git-svn-id: http://svn.openslx.org/svn/openslx/dxs/ld4@27 95ad53e4-c205-0410-b2fa-d234c58c8868 --- .../distro-specs/suse-10.0/files/etc/init.d/boot | 7 ------ initrd/distro-specs/suse-10.0/functions-suse-10.0 | 20 ++++++++++++++++ initrd/distro-specs/ubuntu/functions-ubuntu | 27 +++++++++++++++++++--- 3 files changed, 44 insertions(+), 10 deletions(-) (limited to 'initrd/distro-specs') diff --git a/initrd/distro-specs/suse-10.0/files/etc/init.d/boot b/initrd/distro-specs/suse-10.0/files/etc/init.d/boot index 6db53181..f975046f 100755 --- a/initrd/distro-specs/suse-10.0/files/etc/init.d/boot +++ b/initrd/distro-specs/suse-10.0/files/etc/init.d/boot @@ -74,13 +74,6 @@ if [ -d /sys ] ; then done < /proc/filesystems fi -# script stuff written within initrd -if [ -s /etc/init.d/boot.ld ] ; then - rc_reset - echo -n "Running post configuration required by initrd" - chmod u+x /etc/init.d/boot.ld && /etc/init.d/boot.ld - rc_status -v -r -fi # Start blogd, requires /proc and /dev/pts. # Export the real device in variable REDIRECT. test -x /sbin/blogd -a -n "$REDIRECT" && /sbin/blogd $REDIRECT diff --git a/initrd/distro-specs/suse-10.0/functions-suse-10.0 b/initrd/distro-specs/suse-10.0/functions-suse-10.0 index ed033707..3016d222 100644 --- a/initrd/distro-specs/suse-10.0/functions-suse-10.0 +++ b/initrd/distro-specs/suse-10.0/functions-suse-10.0 @@ -360,3 +360,23 @@ if [ "x$start_dreshal" = "xyes" ]; then fi } +# initialize boot.ld - skript to be executed during early system startup +# (before most of the normal boot init scripts) +# this script should operate like a normal runlevel script +d_bootld () { +case "$1" in + init) + echo -e "#!/bin/sh\n# skeleton of /etc/${D_INITDIR}/boot.ld written \ +from $0" >/mnt/etc/${D_INITDIR}/boot.ld + echo -e '\n\n. /etc/rc.status\nrc_reset\ncase "$1" in start)' \ + >>/mnt/etc/${D_INITDIR}/boot.ld + echo -e '\techo -n "Running post configuration required by initrd"' \ + >>/mnt/etc/${D_INITDIR}/boot.ld + ;; + close) + echo -e "\trc_status -v\n\t;;\n stop)\n\t;;esac\nrc_exit" \ + >>/mnt/etc/${D_INITDIR}/boot.ld + + ;; +esac +} diff --git a/initrd/distro-specs/ubuntu/functions-ubuntu b/initrd/distro-specs/ubuntu/functions-ubuntu index 4344ac96..47826957 100644 --- a/initrd/distro-specs/ubuntu/functions-ubuntu +++ b/initrd/distro-specs/ubuntu/functions-ubuntu @@ -2,9 +2,9 @@ # linux diskless clients (executed within initial # ramdisk after genconfig) # -# Author(s): Dirk von Suchodoletz , 18-01-2006 -# Blabla -# Blub +# Author(s): Dirk von Suchodoletz , 20-01-2006 +# Nico Dietrich +# Felix Endres # # Copyright: (c) 2006 - RZ Universitaet Freiburg # @@ -200,3 +200,24 @@ if [ "x$start_dreshal" = "xyes" ]; then echo >/dev/null fi } + +# initialize boot.ld - skript to be executed during early system startup +# (before most of the normal boot init scripts) +# this script should operate like a normal runlevel script (fixme!!) +d_bootld () { +case "$1" in + init) + echo -e "#!/bin/sh\n# skeleton of /etc/${D_INITDIR}/boot.ld written \ +from $0" >/mnt/etc/${D_INITDIR}/boot.ld + echo -e '\n\ncase "$1" in start)' \ + >>/mnt/etc/${D_INITDIR}/boot.ld + echo -e '\techo -n "Running post configuration required by initrd"' \ + >>/mnt/etc/${D_INITDIR}/boot.ld + ;; + close) + echo -e "\t;;\n stop)\n\t;;esac\nexit 0" \ + >>/mnt/etc/${D_INITDIR}/boot.ld + + ;; +esac +} -- cgit v1.2.3-55-g7522