summaryrefslogtreecommitdiffstats
path: root/initrd
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-04-02 16:36:35 +0200
committerDirk von Suchodoletz2006-04-02 16:36:35 +0200
commite440fba7ab8427b2eb8834a284078479a29fffbf (patch)
tree0b99cf01c52658291a7a0cdd5dd736953606201c /initrd
parentput error/info messages to a separat file (base for later localization (diff)
downloadcore-e440fba7ab8427b2eb8834a284078479a29fffbf.tar.gz
core-e440fba7ab8427b2eb8834a284078479a29fffbf.tar.xz
core-e440fba7ab8427b2eb8834a284078479a29fffbf.zip
enforced use of variables instead of static settings (init.d, sysconfig,
...) git-svn-id: http://svn.openslx.org/svn/openslx/ld4@141 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd')
-rw-r--r--initrd/distro-specs/gentoo/functions-2005.134
-rw-r--r--initrd/distro-specs/suse/functions-10.06
-rw-r--r--initrd/distro-specs/suse/functions-10.18
-rw-r--r--initrd/distro-specs/suse/functions-9.348
-rw-r--r--initrd/initrd-stuff/etc/messages3
5 files changed, 50 insertions, 49 deletions
diff --git a/initrd/distro-specs/gentoo/functions-2005.1 b/initrd/distro-specs/gentoo/functions-2005.1
index 9408122e..9416607f 100644
--- a/initrd/distro-specs/gentoo/functions-2005.1
+++ b/initrd/distro-specs/gentoo/functions-2005.1
@@ -47,12 +47,12 @@ local script="$1"
local need="$2"
# empty runlevel links - decision on running certain services is
# passed via configuration
-ln -s /etc/init.d/$1 /mnt/etc/runlevels/default/$1
+ln -s /etc/${D_INITDIR}/$1 /mnt/etc/runlevels/default/$1
echo $1 >> /mnt/etc/runlevels/default/.critical
# hack to remove unneeded dependency stuff
#if [ "$script" != "vmware-prep" ] ; then
-# sed "/depend/,/}/d" /mnt/etc/init.d/$1 > /etc/rls
-# cp /etc/rls /mnt/etc/init.d/$1
+# sed "/depend/,/}/d" /mnt/etc/${D_INITDIR}/$1 > /etc/rls
+# cp /etc/rls /mnt/etc/${D_INITDIR}/$1
#fi
}
@@ -84,7 +84,7 @@ esac
# group of functions for the normal runlevels
# function for ntp configuration (unchecked)
config_ntp () {
-if [ -f /mnt/etc/init.d/ntp ] ; then
+if [ -f /mnt/etc/${D_INITDIR}/ntp ] ; then
if ! strinfile "ntp:" /mnt/etc/passwd ; then
echo -e "ntp:x:74:65534:NTP daemon:/var/lib/ntp:/bin/false" \
>>/mnt/etc/passwd
@@ -112,7 +112,7 @@ fi
# cron service
config_cron () {
if [ "x$start_cron" = "xyes" ] ; then
- if [ -f /mnt/etc/init.d/cron ] ; then
+ if [ -f /mnt/etc/${D_INITDIR}/cron ] ; then
:
else
error $df_errcron nonfatal
@@ -123,7 +123,7 @@ fi
# syslog service
config_syslog () {
if [ "x$start_syslog" = "xyes" ] ; then
- if [ -f /mnt/etc/init.d/syslog-ng ] ; then
+ if [ -f /mnt/etc/${D_INITDIR}/syslog-ng ] ; then
rllinker syslog-ng
else
error $df_errsysl nonfatal
@@ -134,7 +134,7 @@ fi
# secure shell service
config_sshd () {
if [ "x$start_sshd" = "xyes" ] ; then
- if [ -f /mnt/etc/init.d/sshd ] ; then
+ if [ -f /mnt/etc/${D_INITDIR}/sshd ] ; then
rllinker "sshd"
else
error $df_errsshd nonfatal
@@ -145,7 +145,7 @@ fi
# snmp agent for remote monitoring (unchecked)
config_snmp () {
if [ "x$start_snmp" = "xyes" ] ; then
- if [ -f /mnt/etc/init.d/snmpd ] ; then
+ if [ -f /mnt/etc/${D_INITDIR}/snmpd ] ; then
rllinker "snmpd"
testmkd /mnt/var/lib/net-snmp >/dev/null 2>&1
fi
@@ -156,12 +156,12 @@ if [ "x$start_snmp" = "xyes" ] ; then
# configure X display manager (runlevel links and kind of manager)
config_xdm () {
-if [ -f /mnt/etc/init.d/xdm ] ; then
+if [ -f /mnt/etc/${D_INITDIR}/xdm ] ; then
sed -e "s,DISPLAYMANAGER=.*,DISPLAYMANAGER=\"xdm\"," /mnt/etc/rc.conf \
> /etc/rc.conf
cp /etc/rc.conf /mnt/etc/rc.conf
- ln -s /etc/init.d/xdm /mnt/etc/runlevels/boot/xdm
- ln -s /etc/init.d/xdm /mnt/etc/runlevels/default/xdm
+ ln -s /etc/${D_INITDIR}/xdm /mnt/etc/runlevels/boot/xdm
+ ln -s /etc/${D_INITDIR}/xdm /mnt/etc/runlevels/default/xdm
echo "xdm" >> /mnt/etc/runlevels/boot/.critical
fi
}
@@ -210,8 +210,8 @@ config_rc_entry "CONSOLEFONT" "${CONSOLE_FONT}"
config_acpi () {
rllinker acpid
# remove dependencies (runs unneeded services ...)
-sed "/depend/,/}/d" /mnt/etc/init.d/acpid > /etc/rls
-cp /etc/rls /mnt/etc/init.d/acpid
+sed "/depend/,/}/d" /mnt/etc/${D_INITDIR}/acpid > /etc/rls
+cp /etc/rls /mnt/etc/${D_INITDIR}/acpid
}
# configure dbus (inter application communication for kde and gnome), hal
@@ -223,14 +223,12 @@ config_dreshal () {
# configure automounter
config_automount () {
-if [ -f /mnt/etc/init.d/autofs ] ; then
+if [ -f /mnt/etc/${D_INITDIR}/autofs ] ; then
rllinker autofs
if [ -n "${automnt_src}" ] ; then
# local directory and home directory server from machine-setup
[ -z "${automnt_dir}" ] && automnt_dir="/home"
- strinstr "/" "${automnt_dir}" && error " Only toplevel directories \
-are allowed as mount points for user home\n directories. Please set the \
-variable \${automnt_dir} appropriately in\n machine-setup file." nonfatal
+ strinstr "/" "${automnt_dir}" && error $df_erratpld nonfatal
automnt_dir=${automnt_dir#/}
echo -e "/home\t/etc/auto.${automnt_dir}\n" >> /mnt/etc/auto.master
echo -e "# /etc/auto.${automnt_dir} created by $0:\n" \
@@ -247,7 +245,7 @@ fi
# start name service caching daemon (recommended in combination with
# ldap source as user admin base)
config_nscd () {
-if [ -f /mnt/etc/init.d/nscd ] ; then
+if [ -f /mnt/etc/${D_INITDIR}/nscd ] ; then
#testmkd /mnt/var/run/nscd
rllinker "nscd"
fi
diff --git a/initrd/distro-specs/suse/functions-10.0 b/initrd/distro-specs/suse/functions-10.0
index a4220542..074f730f 100644
--- a/initrd/distro-specs/suse/functions-10.0
+++ b/initrd/distro-specs/suse/functions-10.0
@@ -50,7 +50,7 @@ config_dreshal () {
local start="05"
local stop="18"
if [ "x$start_dreshal" = "xyes" ]; then
- if [ -f /mnt/etc/init.d/dbus ] ; then
+ if [ -f /mnt/etc/${D_INITDIR}/dbus ] ; then
strinfile "messagebus:" /mnt/etc/passwd || \
echo "messagebus:x:100:101:User for D-BUS:/var/run/dbus:/bin/false" \
>> /mnt/etc/passwd
@@ -62,13 +62,13 @@ if [ "x$start_dreshal" = "xyes" ]; then
>>/mnt/etc/${D_INITDIR}/boot.ld
rllinker "dbus" "$start" "$stop"
fi
- if [ -f /mnt/etc/init.d/resmgr ] ; then
+ if [ -f /mnt/etc/${D_INITDIR}/resmgr ] ; then
testmkd /mnt/var/run/resmgr/classes
start="0"`expr $start + 1`
stop="0"`expr $start - 1`
rllinker "resmgr" "$start" "$stop"
fi
- if [ -f /mnt/etc/init.d/haldaemon ] ; then
+ if [ -f /mnt/etc/${D_INITDIR}/haldaemon ] ; then
strinfile "haldaemon:" /mnt/etc/passwd || \
echo "haldaemon:x:105:103:User for haldaemon:/var/run/hal:/bin/false" \
>> /mnt/etc/passwd
diff --git a/initrd/distro-specs/suse/functions-10.1 b/initrd/distro-specs/suse/functions-10.1
index b58b9131..1eb49dfd 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>, 30-03-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 02-04-2006
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
#
@@ -63,7 +63,7 @@ config_dreshal () {
local start="05"
local stop="18"
if [ "x$start_dreshal" = "xyes" ]; then
- if [ -f /mnt/etc/init.d/dbus ] ; then
+ if [ -f /mnt/etc/${D_INITDIR}/dbus ] ; then
strinfile "messagebus:" /mnt/etc/passwd || \
echo "messagebus:x:100:101:User for D-BUS:/var/run/dbus:/bin/false" \
>> /mnt/etc/passwd
@@ -75,13 +75,13 @@ if [ "x$start_dreshal" = "xyes" ]; then
>>/mnt/etc/${D_INITDIR}/boot.ld
rllinker "dbus" "$start" "$stop"
fi
- if [ -f /mnt/etc/init.d/resmgr ] ; then
+ if [ -f /mnt/etc/${D_INITDIR}/resmgr ] ; then
testmkd /mnt/var/run/resmgr/classes
start="0"`expr $start + 1`
stop="0"`expr $start - 1`
rllinker "resmgr" "$start" "$stop"
fi
- if [ -f /mnt/etc/init.d/haldaemon ] ; then
+ if [ -f /mnt/etc/${D_INITDIR}/haldaemon ] ; then
strinfile "haldaemon:" /mnt/etc/passwd || \
echo "haldaemon:x:105:103:User for haldaemon:/var/run/hal:/bin/false" \
>> /mnt/etc/passwd
diff --git a/initrd/distro-specs/suse/functions-9.3 b/initrd/distro-specs/suse/functions-9.3
index 1b58c332..53270443 100644
--- a/initrd/distro-specs/suse/functions-9.3
+++ b/initrd/distro-specs/suse/functions-9.3
@@ -37,8 +37,8 @@ export no_proxy" > /mnt/etc/SuSEconfig/profile
echo -e "DXS VERSION = 4.0a\nINITRAMFS GENERATION DATE = $date" \
>> /mnt/etc/SuSE-release
# add the halt link to the 0 and 6 runlevel directories
- ln -sf ../halt /mnt/etc/init.d/rc0.d/S20halt
- ln -sf ../halt /mnt/etc/init.d/rc6.d/S20reboot
+ ln -sf ../halt /mnt/etc/${D_INITDIR}/rc0.d/S20halt
+ ln -sf ../halt /mnt/etc/${D_INITDIR}/rc6.d/S20reboot
}
# udev/hotplug - auto device discovery service
@@ -61,7 +61,7 @@ local stop="$3"
# passed via configuration
for i in rc3.d/K$stop$script rc5.d/K$stop$script \
rc3.d/S$start$script rc5.d/S$start$script ; do
- ln -sf ../$script /mnt/etc/init.d/$i
+ ln -sf ../$script /mnt/etc/${D_INITDIR}/$i
done
}
@@ -71,7 +71,7 @@ done
config_ntp () {
local start="07"
local stop="14"
-if [ -f /mnt/etc/init.d/ntp ] ; then
+if [ -f /mnt/etc/${D_INITDIR}/ntp ] ; then
if ! strinfile "ntp:" /mnt/etc/passwd ; then
echo -e "ntp:x:74:65534:NTP daemon:/var/lib/ntp:/bin/false" \
>>/mnt/etc/passwd
@@ -99,7 +99,7 @@ fi
# function for configuration of cron services
config_cron () {
if [ "x$start_cron" = "xyes" ] ; then
- if [ -f /mnt/etc/init.d/cron ] ; then
+ if [ -f /mnt/etc/${D_INITDIR}/cron ] ; then
testmkd /mnt/var/spool/cron/lastrun
testmkd /mnt/var/spool/cron/tabs
echo -e "# /etc/crontab - file generated by $0:\n\
@@ -115,7 +115,7 @@ fi
# syslog service
config_syslog () {
if [ "x$start_syslog" = "xyes" ] ; then
- if [ -f /mnt/etc/init.d/syslog ] ; then
+ if [ -f /mnt/etc/${D_INITDIR}/syslog ] ; then
# how to configure remote log server?
# logging servers might be specified in $log_servers (from e.g. dhcp)
echo -e "# File modified by $0 within initial ramdisk" \
@@ -133,7 +133,7 @@ fi
# secure shell service
config_sshd () {
if [ "x$start_sshd" = "xyes" ] ; then
- if [ -f /mnt/etc/init.d/sshd ] ; then
+ if [ -f /mnt/etc/${D_INITDIR}/sshd ] ; then
testmkd /mnt/var/lib/sshd
testmkd /mnt/var/lib/empty
rllinker "sshd" "12" "10"
@@ -146,7 +146,7 @@ fi
# snmp agent for remote monitoring
config_snmp () {
if [ "x$start_snmp" = "xyes" ] ; then
- if [ -f /mnt/etc/init.d/snmpd ] ; then
+ if [ -f /mnt/etc/${D_INITDIR}/snmpd ] ; then
rllinker "snmpd" "24" "02"
testmkd /mnt/var/lib/net-snmp >/dev/null 2>&1
fi
@@ -155,19 +155,19 @@ if [ "x$start_snmp" = "xyes" ] ; then
fi
}
-# configure X display manager (/etc/sysconfig/displaymanager)
+# configure X display manager (/etc/${D_SYSCONFDIR}/displaymanager)
config_dm_entry () {
local dm="$1"
# should be stated that entries were made (fixmee how??)
sed -e "s,DISPLAYMANAGER=.*,DISPLAYMANAGER=\"$start_xdmcp\"," \
-e "s,.*_XSERVER.*,DISPLAYMANAGER_STARTS_XSERVER=\"$dm\"," \
- /mnt/etc/sysconfig/displaymanager > /etc/displaymanager
-cp /etc/displaymanager /mnt/etc/sysconfig/displaymanager
+ /mnt/etc/${D_SYSCONFDIR}/displaymanager > /etc/displaymanager
+cp /etc/displaymanager /mnt/etc/${D_SYSCONFDIR}/displaymanager
# start the display manager as early as possible, but avoid that is
# started twice during bootup - quickhack ...
#ln -sf /etc/${D_INITDIR}/xdm /mnt/etc/${D_INITDIR}/rc5.d/S01xdm
ln -sf ../xdm /mnt/etc/${D_INITDIR}/rc5.d/K20xdm
-echo -e "\t/etc/init.d/xdm start >${LOGFILE} 2>&1\n\
+echo -e "\t/etc/${D_INITDIR}/xdm start >${LOGFILE} 2>&1\n\
\t( sleep 120; ln -sf ../xdm /etc/${D_INITDIR}/rc5.d/S01xdm \
>${LOGFILE} 2>&1) &\n" >>/mnt/etc/${D_INITDIR}/boot.ld
}
@@ -304,11 +304,11 @@ config_dm_entry yes
# configure bluetooth services
config_bt () {
- echo -e "# /etc/sysconfig/bluetooth - file modified by $0"\
+ echo -e "# /etc/${D_SYSCONFDIR}/bluetooth - file modified by $0"\
> /etc/bluetooth
sed -e "s,START_SERVICES.*,START_SERVICES=\"yes\"," \
- /mnt/etc/sysconfig/bluetooth >> /etc/bluetooth
- cp /etc/bluetooth /mnt/etc/sysconfig/bluetooth
+ /mnt/etc/${D_SYSCONFDIR}/bluetooth >> /etc/bluetooth
+ cp /etc/bluetooth /mnt/etc/${D_SYSCONFDIR}/bluetooth
}
# consolefont
@@ -334,7 +334,7 @@ config_dreshal () {
local start="05"
local stop="18"
if [ "x$start_dreshal" = "xyes" ]; then
- if [ -f /mnt/etc/init.d/dbus ] ; then
+ if [ -f /mnt/etc/${D_INITDIR}/dbus ] ; then
strinfile "messagebus:" /mnt/etc/passwd || \
echo "messagebus:x:100:101:User for D-BUS:/var/run/dbus:/bin/false" \
>> /mnt/etc/passwd
@@ -346,13 +346,13 @@ if [ "x$start_dreshal" = "xyes" ]; then
>>/mnt/etc/${D_INITDIR}/boot.ld
rllinker "dbus" "$start" "$stop"
fi
- if [ -f /mnt/etc/init.d/resmgr ] ; then
+ if [ -f /mnt/etc/${D_INITDIR}/resmgr ] ; then
testmkd /mnt/var/run/resmgr/classes
start="0"`expr $start + 1`
stop="0"`expr $start - 1`
rllinker "resmgr" "$start" "$stop"
fi
- if [ -f /mnt/etc/init.d/hal ] ; then
+ if [ -f /mnt/etc/${D_INITDIR}/hal ] ; then
strinfile "haldaemon:" /mnt/etc/passwd || \
echo "haldaemon:x:105:103:User for haldaemon:/var/run/hal:/bin/false" \
>> /mnt/etc/passwd
@@ -371,7 +371,7 @@ fi
# configure automounter
config_automount () {
-if [ -f /mnt/etc/sysconfig/autofs ] ; then
+if [ -f /mnt/etc/${D_SYSCONFDIR}/autofs ] ; then
testmkd /var/lock/subsys
echo -e "# /etc/auto.master - file generated by $0:\n\
/misc\t/etc/auto.misc" >/mnt/etc/auto.master
@@ -388,18 +388,18 @@ if [ -f /mnt/etc/sysconfig/autofs ] ; then
echo -e "*\t-rsize=32768,wsize=32768,rw\t${automnt_src}/&" \
>> /mnt/etc/auto.${automnt_dir}
fi
- echo -e "# /etc/sysconfig/autofs - file modified by\n#\t$0:\n#" \
+ echo -e "# /etc/${D_SYSCONFDIR}/autofs - file modified by\n#\t$0:\n#" \
> /etc/autofs
sed -e "s,AUTOFS_OPTIONS.*,AUTOFS_OPTIONS=\"--timeout 3\"," \
- /mnt/etc/sysconfig/autofs >> /etc/autofs
- cp /etc/autofs /mnt/etc/sysconfig/autofs
+ /mnt/etc/${D_SYSCONFDIR}/autofs >> /etc/autofs
+ cp /etc/autofs /mnt/etc/${D_SYSCONFDIR}/autofs
config_portmap
rllinker "autofs" "18" "04"
fi
}
# start name service caching daemon
config_nscd () {
-if [ -f /mnt/etc/init.d/nscd ] ; then
+if [ -f /mnt/etc/${D_INITDIR}/nscd ] ; then
testmkd /mnt/var/run/nscd
rllinker "nscd" "02" "16"
fi
@@ -436,7 +436,7 @@ local info="$3"
case "$1" in
init)
echo -e "#!/bin/sh\n# skeleton of /etc/${D_INITDIR}/$name created \
-by $0\n. /etc/rc.status\n. /etc/sysconfig/logfile\nrc_reset\ncase \
+by $0\n. /etc/rc.status\n. /etc/${D_SYSCONFDIR}/logfile\nrc_reset\ncase \
\"\$1\" in\n start)\n\techo -n \"$info\"" >>/mnt/etc/${D_INITDIR}/$name
chmod u+x /mnt/etc/${D_INITDIR}/$name
;;
diff --git a/initrd/initrd-stuff/etc/messages b/initrd/initrd-stuff/etc/messages
index 1f5014b4..99bbe060 100644
--- a/initrd/initrd-stuff/etc/messages
+++ b/initrd/initrd-stuff/etc/messages
@@ -26,6 +26,9 @@ init_errldap=" Unable to setup at \
least basic functionality, because no IP configuration\n available. Please \
beware - ldap works only in combination of either\n ipappend or similar or \
with dhcp!"
+init_errnwad=" Failed to load the network \
+adaptor modules defined via mkdxsinitrd\n run. Please rerun and list the \
+appropriate modules (without .ko)."
# messages from functions
error_msg="An error occured during execution of $0 script:\n\n"