summaryrefslogtreecommitdiffstats
path: root/initrd
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-02-08 15:04:31 +0100
committerDirk von Suchodoletz2006-02-08 15:04:31 +0100
commit81564fb755ce81eca58924e53147839d12c42fde (patch)
tree0dc4ce53b39a7ff35638c380fcd37bd179979454 /initrd
parentMinor additions for preinit ... (diff)
downloadcore-81564fb755ce81eca58924e53147839d12c42fde.tar.gz
core-81564fb755ce81eca58924e53147839d12c42fde.tar.xz
core-81564fb755ce81eca58924e53147839d12c42fde.zip
Changed pivoting mechanism to new style (run-init from klibc) ...
git-svn-id: http://svn.openslx.org/svn/openslx/dxs/ld4@65 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd')
-rw-r--r--initrd/distro-specs/suse/functions-10.13
-rw-r--r--initrd/distro-specs/suse/functions-9.36
-rwxr-xr-xinitrd/initrd-stuff/bin/run-initbin0 -> 9588 bytes
-rwxr-xr-xinitrd/initrd-stuff/init23
-rwxr-xr-xinitrd/mkdxsinitrd2
5 files changed, 18 insertions, 16 deletions
diff --git a/initrd/distro-specs/suse/functions-10.1 b/initrd/distro-specs/suse/functions-10.1
index 2979089e..7cbaaf01 100644
--- a/initrd/distro-specs/suse/functions-10.1
+++ b/initrd/distro-specs/suse/functions-10.1
@@ -16,7 +16,8 @@ preinit () {
for i in usb_id scsi_id vol_id edd_id hwup ; do
echo -e "#!/bin/sh\n:" >/sbin/$i
done
-chmod u+x /sbin/*
+echo -e "#!/bin/sh\n:" >/lib/udev/mount.sh
+chmod u+x /sbin/* /lib/udev/mount.sh
}
# udev service
diff --git a/initrd/distro-specs/suse/functions-9.3 b/initrd/distro-specs/suse/functions-9.3
index 3b3412c8..2411dc9b 100644
--- a/initrd/distro-specs/suse/functions-9.3
+++ b/initrd/distro-specs/suse/functions-9.3
@@ -4,13 +4,13 @@
# functions file). This file is the main base for the
# following SuSE distributions
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 06-02-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 08-02-2006
# Blabla
# Blub
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
#
-# Version: 0.2.1d
+# Version: 0.2.1e
# distro specific stuff to initialize
preinit () {
@@ -189,7 +189,7 @@ cp /etc/displaymanager /mnt/etc/sysconfig/displaymanager
#ln -sf /etc/${D_INITDIR}/xdm /mnt/etc/${D_INITDIR}/rc5.d/S01xdm
ln -sf /etc/${D_INITDIR}/xdm /mnt/etc/${D_INITDIR}/rc5.d/K20xdm
echo -e "\t/etc/init.d/xdm start >${LOGFILE} 2>&1\n\t( sleep 60; \
-ln -sf /etc/${D_INITDIR}/xdm /etc/${D_INITDIR}/rc5.d/S01xdm \
+ln -sf ../xdm /etc/${D_INITDIR}/rc5.d/S01xdm \
>${LOGFILE} 2>&1) &\n" >>/mnt/etc/${D_INITDIR}/boot.ld
}
diff --git a/initrd/initrd-stuff/bin/run-init b/initrd/initrd-stuff/bin/run-init
new file mode 100755
index 00000000..722a7219
--- /dev/null
+++ b/initrd/initrd-stuff/bin/run-init
Binary files differ
diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init
index e066bae2..324ee103 100755
--- a/initrd/initrd-stuff/init
+++ b/initrd/initrd-stuff/init
@@ -2,13 +2,13 @@
# Description: main script for new type of initial ramdisk for
# linux diskless clients version 4
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 04-02-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 08-02-2006
# Bla
# Blub
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
#
-# Version: 0.2.1c
+# Version: 0.2.2a
# functions common for all distros
errmsg="functions file contains a lot of script \
@@ -23,7 +23,7 @@ specific configuration file could not be found" && exit 1 )
preinit
date
export PATH=/bin:/sbin:/usr/bin/:/usr/sbin
-export date="07-02-2006"
+export date="08-02-2006"
exec < /dev/console > /dev/console 2>&1
export KERNEL="@@@KERNVER@@@"
@@ -345,7 +345,7 @@ for path in @@@COMDIRINDXS@@@ ${D_DIRINDXS} ${D_DIRINBINDMNT} ; do
testmkd /mnt/${path}
done
for i in /var/run/utmp /var/log/wtmp /var/log/lastlog /etc/mtab ; do
- echo -n > /mnt$i
+ echo -n > /mnt/$i
done
chmod a+rwxt /mnt/tmp /mnt/tmp/scratch 2>/dev/null &
chown 65534:0 /mnt/var/lib/nobody &
@@ -402,14 +402,15 @@ failed for some\nreason. You will get some error messages that some files \
could not be\n removed." nonfatal
umount -n /proc/bus/usb >/dev/null 2>&1
mount -n --move /dev /mnt/dev
-cd /mnt
+#cd /mnt
# kill udevd
[ -n "${UDEVD_EXPECTED_SEQNUM}" ] && killall -9 udevd 2>/dev/null
umount -n /proc
[ -n "${UNIONFS}" ] && mount -n --move /root /mnt/mnt
-pivot_root . mnt || error " Could not execute pivot_root due to missing \
-command or wrong\n parameters given."
-echo "Exiting the initial ramdisk init"
-exec `which chroot` . sh -c 'rm -rf mnt/*; exec /sbin/init' \
- <dev/console >dev/console 2>&1
-
+# --> pivot_root seems to be deprecated - check for older kernels too
+#pivot_root . mnt || error " Could not execute pivot_root due to missing \
+#command or wrong\n parameters given."
+#echo "Exiting the initial ramdisk init"
+#exec `which chroot` . sh -c 'rm -rf mnt/*; exec /sbin/init' \
+# <dev/console >dev/console 2>&1
+exec run-init -c dev/console /mnt /sbin/init
diff --git a/initrd/mkdxsinitrd b/initrd/mkdxsinitrd
index 98a63510..d3515080 100755
--- a/initrd/mkdxsinitrd
+++ b/initrd/mkdxsinitrd
@@ -327,7 +327,7 @@ done
# needed standard binaries
for bbins in \
cat chmod chown chroot cp expr killall ln mkdir modprobe \
- mount portmap pivot_root rmmod sed tar umount
+ mount portmap rmmod sed tar umount
do
cobi ${bbins} bin || echo "Program ${bbins} not found"
done