summaryrefslogtreecommitdiffstats
path: root/initrd
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-02-08 19:28:09 +0100
committerDirk von Suchodoletz2006-02-08 19:28:09 +0100
commite5695c3fa1e7f423c8efec765cdf7f78a9d50576 (patch)
treeddc08322dcc29c9b871aabc133e5f7f16c9b3d81 /initrd
parentChanged pivoting mechanism to new style (run-init from klibc) ... (diff)
downloadcore-e5695c3fa1e7f423c8efec765cdf7f78a9d50576.tar.gz
core-e5695c3fa1e7f423c8efec765cdf7f78a9d50576.tar.xz
core-e5695c3fa1e7f423c8efec765cdf7f78a9d50576.zip
Major additions to preinit funktion in functions-10.1, switch over to
new pivoting/run-init completed. Fixup in a function for new udev in general functions ... git-svn-id: http://svn.openslx.org/svn/openslx/dxs/ld4@66 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd')
-rw-r--r--initrd/distro-specs/suse/functions-10.118
-rw-r--r--initrd/initrd-stuff/etc/functions4
-rwxr-xr-xinitrd/initrd-stuff/init12
-rwxr-xr-xinitrd/mkdxsinitrd8
4 files changed, 26 insertions, 16 deletions
diff --git a/initrd/distro-specs/suse/functions-10.1 b/initrd/distro-specs/suse/functions-10.1
index 7cbaaf01..7873286d 100644
--- a/initrd/distro-specs/suse/functions-10.1
+++ b/initrd/distro-specs/suse/functions-10.1
@@ -3,7 +3,7 @@
# changes should be done there, version specific changes for
# the 10.0 here.
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 06-02-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 08-02-2006
# Blabla
# Blub
#
@@ -13,20 +13,24 @@
# distro specific stuff to initialize
preinit () {
-for i in usb_id scsi_id vol_id edd_id hwup ; do
+for i in usb_id scsi_id vol_id edd_id hwup ifup ; do
echo -e "#!/bin/sh\n:" >/sbin/$i
done
-echo -e "#!/bin/sh\n:" >/lib/udev/mount.sh
-chmod u+x /sbin/* /lib/udev/mount.sh
+mkdir /lib/udev /usr/sbin
+for i in idedma.sh mount.sh rename_netiface create_floppy_devices ; do
+ echo -e "#!/bin/sh\n:" >/lib/udev/$i
+done
+echo -e "#!/bin/sh\n:" >/usr/sbin/alsactl
+chmod u+x /sbin/* /lib/udev/* /usr/sbin/*
}
# udev service
udev_hotplug () {
local result=0
echo "Starting udev"
-mknod /dev/console c 5 1
-mknod /dev/null c 1 3
-mknod /dev/kmsg c 1 11
+#mknod /dev/console c 5 1
+#mknod /dev/null c 1 3
+#mknod /dev/kmsg c 1 11
if [ -x /bin/udevd ] ; then
echo "" > /proc/sys/kernel/hotplug
udevd --daemon || result=1
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
diff --git a/initrd/mkdxsinitrd b/initrd/mkdxsinitrd
index d3515080..b77319cd 100755
--- a/initrd/mkdxsinitrd
+++ b/initrd/mkdxsinitrd
@@ -288,7 +288,6 @@ case "${DISTRO}" in
;;
10*)
DISTRO_VER=10.1
- cobi mknod bin
;;
esac
@@ -305,9 +304,12 @@ esac
copy_distro_stuff ${DISTRO} ${DISTRO_VER}
+# devices needed rather early (copied from /tmp to /dev in init)
+mknod ${INSTDIR}/tmp/console c 5 1 &>/dev/null
+mknod ${INSTDIR}/tmp/null c 1 3 &>/dev/null
+mknod ${INSTDIR}/tmp/kmsg c 1 11 &>/dev/null
-
-#if no klibc
+#if no klibc - klibc shell seems not to have enough functionality :-(
for bbins in bash ash sh; do
if cobi ${bbins} bin ; then
ln -fs ${bbins} ${INSTDIR}/bin/sh