summaryrefslogtreecommitdiffstats
path: root/initrd
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-03-30 22:10:13 +0200
committerDirk von Suchodoletz2006-03-30 22:10:13 +0200
commit8cd82995c9c01fac59aa5ff6ef17a098d73db5d9 (patch)
treed59261674adccf0ee39016be3fef556463708dba /initrd
parentNew functionality for retrieving the frequency ranges of the monitor from ddc... (diff)
downloadcore-8cd82995c9c01fac59aa5ff6ef17a098d73db5d9.tar.gz
core-8cd82995c9c01fac59aa5ff6ef17a098d73db5d9.tar.xz
core-8cd82995c9c01fac59aa5ff6ef17a098d73db5d9.zip
more debug level, exclude-common for rsync (files and directories common
for all distros), ... git-svn-id: http://svn.openslx.org/svn/openslx/ld4@132 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd')
-rw-r--r--initrd/distro-specs/gentoo/functions-2005.16
-rw-r--r--initrd/distro-specs/suse/functions-10.19
-rw-r--r--initrd/distro-specs/suse/functions-9.321
-rw-r--r--initrd/distro-specs/ubuntu/functions-5.105
-rwxr-xr-xinitrd/initrd-stuff/bin/servconfig5
-rwxr-xr-xinitrd/initrd-stuff/init15
-rwxr-xr-xinitrd/mkdxsinitrd3
7 files changed, 47 insertions, 17 deletions
diff --git a/initrd/distro-specs/gentoo/functions-2005.1 b/initrd/distro-specs/gentoo/functions-2005.1
index ddc70fc9..30006b3a 100644
--- a/initrd/distro-specs/gentoo/functions-2005.1
+++ b/initrd/distro-specs/gentoo/functions-2005.1
@@ -2,7 +2,7 @@
# linux diskless clients (executed within initial
# ramdisk after genconfig)
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 26-03-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 30-03-2006
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
#
@@ -17,6 +17,10 @@ postinit () {
:
}
+config_distro () {
+ :
+}
+
# udev service - not checked!
udev_hotplug () {
echo "Starting udev"
diff --git a/initrd/distro-specs/suse/functions-10.1 b/initrd/distro-specs/suse/functions-10.1
index a41cd223..b58b9131 100644
--- a/initrd/distro-specs/suse/functions-10.1
+++ b/initrd/distro-specs/suse/functions-10.1
@@ -3,17 +3,15 @@
# changes should be done there, version specific changes for
# the 10.0 here.
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 16-02-2006
-# Blabla
-# Blub
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 30-03-2006
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
#
-# Version: 0.2.1d
+# Version: 0.2.1e
# distro specific stuff to initialize
preinit () {
-for i in usb_id scsi_id vol_id edd_id ata_id hwup ifup ; do
+for i in usb_id scsi_id vol_id edd_id ata_id path_id hwup ifup ; do
echo -e "#!/bin/sh\n:" >/sbin/$i
done
mkdir /lib/udev /usr/sbin
@@ -23,6 +21,7 @@ done
echo -e "#!/bin/sh\n:" >/usr/sbin/alsactl
chmod u+x /sbin/* /lib/udev/* /usr/sbin/*
}
+
postinit () {
:
}
diff --git a/initrd/distro-specs/suse/functions-9.3 b/initrd/distro-specs/suse/functions-9.3
index bd988d52..83ec77f6 100644
--- a/initrd/distro-specs/suse/functions-9.3
+++ b/initrd/distro-specs/suse/functions-9.3
@@ -20,6 +20,22 @@ postinit () {
udevstart
}
+# distro specific function called from servconfig script
+config_distro () {
+# enable magic sysrequest for the clients
+echo -e "# /etc/sysconfig/sysctl - file modified by $0 version $version"\
+ > /mnt/etc/${D_SYSCONFDIR}/sysctl.new
+sed -e "s,ENABLE_SYSRQ=.*,ENABLE_SYSRQ=\"yes\"," \
+ /mnt/etc/${D_SYSCONFDIR}/sysctl > /etc/sysctl
+cat /etc/sysctl >> /mnt/etc/${D_SYSCONFDIR}/sysctl
+# add specific path /var/X11R6/bin ...
+echo -e "# stuff generated by $0 (out of InitRD written $date)\n\
+test \"\$UID\" -ge 100 && PATH=\"\$PATH:/var/X11R6/bin:.\"\n\
+QTDIR=/usr/lib/qt3\nexport QTDIR\nno_proxy='localhost'\n\
+export no_proxy" > /etc/SuSEconfig/profile
+}
+
+
# udev/hotplug - auto device discovery service
udev_hotplug () {
local result=0
@@ -58,8 +74,9 @@ if [ -f /mnt/etc/init.d/ntp ] ; then
fi
testmkd /mnt/var/lib/ntp/var/run/ntp &>/dev/null
if [ "x$start_ntp" = "xinitial" ] ; then
- echo -e "\t# entries added by $0: $date\n\t( ntpdate -s -b $ntp_servers\
- >${LOGFILE} 2>&1 && {\n\t which hwclock &>/dev/null && hwclock -w;} ) &" \
+ echo -e "\t# entries added by $0 (InitRamFS from $date)\n\
+\t( ntpdate -s -b $ntp_servers >${LOGFILE} 2>&1 && {\n\t which \
+hwclock &>/dev/null && hwclock -w;} ) &" \
>>/mnt/etc/${D_INITDIR}/boot.ld
elif [ "x$start_ntp" = "xyes" ] ; then
rllinker "ntp" "$start" "$stop"
diff --git a/initrd/distro-specs/ubuntu/functions-5.10 b/initrd/distro-specs/ubuntu/functions-5.10
index 31a20a64..5f25d014 100644
--- a/initrd/distro-specs/ubuntu/functions-5.10
+++ b/initrd/distro-specs/ubuntu/functions-5.10
@@ -25,6 +25,11 @@ postinit () {
:
}
+# distro specific function called from servconfig script
+config_distro () {
+ :
+}
+
# AUS SuSE-9.3
# udev/hotplug - auto device discovery service
udev_hotplug () {
diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig
index 497be9b7..1f12f279 100755
--- a/initrd/initrd-stuff/bin/servconfig
+++ b/initrd/initrd-stuff/bin/servconfig
@@ -142,6 +142,11 @@ case ${DISTRO} in
;;
esac
+#######################################################################
+#
+# run distro specific configuration function
+config-distro
+
#######################################################################
#
diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init
index f0882aea..7081cd3e 100755
--- a/initrd/initrd-stuff/init
+++ b/initrd/initrd-stuff/init
@@ -2,13 +2,11 @@
# Description: main script for new type of initial ramdisk for
# linux diskless clients version 4
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 23-03-2006
-# Bla
-# Blub
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 30-03-2006
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
#
-# Version: 0.2.3c
+# Version: 0.2.3d
# functions common for all distros
errmsg="functions file contains a lot of script \
@@ -20,7 +18,7 @@ functionality. Without this\ninit script will not run."
specific configuration file could not be found" && exit 1 )
export PATH=/bin:/sbin:/usr/bin/:/usr/sbin
-export date="23-03-2006"
+export date="@@@DATE@@@"
export DEBUGLEVEL=0
export KERNEL="@@@KERNVER@@@"
@@ -166,7 +164,7 @@ if [ "${DEBUGLEVEL}" -gt 0 ] ; then
LOGFILE="/var/log/dxs-boot.log"
echo "1 4 1 7" >/proc/sys/kernel/printk
[ "${DEBUGLEVEL}" -eq 2 ] && MODPRV="-v"
- [ "${DEBUGLEVEL}" -gt 2 ] && {
+ [ "${DEBUGLEVEL}" -gt 3 ] && {
set -x
# modprobe should be verbose
MODPRV="-v";
@@ -425,11 +423,12 @@ and list the modules loaded until\n now."
# should be killed if started within init
killall -9 dhcpcd dhclient pump 2>/dev/null
-[ $DEBUGLEVEL -gt 1 ] && sh
-
# post init for some distro specific
postinit
+# start a debug shell in higher debug levels
+[ $DEBUGLEVEL -gt 2 ] && /bin/sh
+
# unmount the bind mounted modules directory
for i in 0 40 100 200 300 500 800 1000 1200; do
usleep $i && umount -n /lib/modules/${KERNEL} 2>/dev/null && break
diff --git a/initrd/mkdxsinitrd b/initrd/mkdxsinitrd
index e8c44915..4df246a7 100755
--- a/initrd/mkdxsinitrd
+++ b/initrd/mkdxsinitrd
@@ -100,6 +100,7 @@ chroot ${ROOTDIR} ldd.server ${FPTB#${ROOTDIR}*} >> ${INSTDIR}/tmp/libraries
repco()
{
local FILENAME=$1
+DATE=`date +%m-%d-%Y`
# do not forget to define all variables which should be replaced within
# the start and configuration scripts. All comment lines will be deleted.
if [ -d initrd-stuff/${FILENAME} ] ; then
@@ -115,7 +116,7 @@ else
-e "s,@@@NWMODULES@@@,${NWMODULES},g" \
-e "s,@@@COMDIRINDXS@@@,${COMDIRINDXS},g" \
-e "s,@@@COMETCEXCL@@@,${COMETCEXCL},g" \
- -e "/^#[^!].*/d" \
+ -e "s,@@@DATE@@@,${DATE},g;/^#[^!].*/d" \
initrd-stuff/${FILENAME} >> ${INSTDIR}/${FILENAME}
fi
fi