diff options
Diffstat (limited to 'initrd/initrd-stuff')
| -rw-r--r-- | initrd/initrd-stuff/etc/functions | 4 | ||||
| -rwxr-xr-x | initrd/initrd-stuff/init | 12 |
2 files changed, 10 insertions, 6 deletions
diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions index bb834756..f400425e 100644 --- a/initrd/initrd-stuff/etc/functions +++ b/initrd/initrd-stuff/etc/functions @@ -34,8 +34,8 @@ function trigger_device_events() { done # trigger the sorted events - for i in \$first \$default \$last; do - echo "add" > "\$i" + for i in $first $default $last; do + echo "add" > "$i" done } diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init index 324ee103..2584c993 100755 --- a/initrd/initrd-stuff/init +++ b/initrd/initrd-stuff/init @@ -19,12 +19,9 @@ functionality. Without this\ninit script will not run." . /etc/sysconfig/config || ( echo -e " The distribution \ specific configuration file could not be found" && exit 1 ) -# run pre init script -preinit date export PATH=/bin:/sbin:/usr/bin/:/usr/sbin export date="08-02-2006" -exec < /dev/console > /dev/console 2>&1 export KERNEL="@@@KERNVER@@@" export NWMODULES="@@@NWMODULES@@@" @@ -32,6 +29,8 @@ export DISTRO="@@@DISTRO@@@" DEVDIR="/dev" mount -n -t tmpfs -o 'size=25%,mode=0755' initramfsdevs ${DEVDIR} + +cp -a /tmp/null /tmp/console /dev mkdir -p ${DEVDIR}/pts mkdir -p ${DEVDIR}/shm mkdir -p ${DEVDIR}/.udevdb @@ -40,6 +39,12 @@ mkdir -p ${DEVDIR}/.udevdb echo 256 > /proc/sys/kernel/real-root-dev [ ! -d /sys/class ] && mount -n -t sysfs sysfs /sys +# redirect console (after /dev/console is available, and /dev mounted) +exec < /dev/console > /dev/console 2>&1 + +# run pre init script +preinit + # start device auto discovery service - distro specific function udev_hotplug # read kernel commandline @@ -383,7 +388,6 @@ of this client did not finish in\n time. You might check the process list \ and list the modules loaded until\n now." # close runlevel script for stuff to execute during early bootup d_mkbootld close -bash # IP configuration is made and should not be updated automatically, udevd # should be killed if started within init killall -9 dhcpcd dhclient pump 2>/dev/null |
