summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk von Suchodoletz2008-02-16 01:10:16 +0100
committerDirk von Suchodoletz2008-02-16 01:10:16 +0100
commit9a366317c1e65bda6dc9b53bf860c0a630183055 (patch)
tree32b58d3a2b058742486e79b00547d5409acd4cc0
parentbugfix: ugly but it works now, i hope ;) (diff)
downloadcore-9a366317c1e65bda6dc9b53bf860c0a630183055.tar.gz
core-9a366317c1e65bda6dc9b53bf860c0a630183055.tar.xz
core-9a366317c1e65bda6dc9b53bf860c0a630183055.zip
Remove udev rules for eth* device (and other) modification (not correct for
Debian yet, see #187). Fix for ubuntu syslog config writer (just creating empty config instead of using the installed one with missing files ...) git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1549 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r--initramfs/distro-specs/debian/functions-default11
-rw-r--r--initramfs/distro-specs/gentoo/functions-default13
-rw-r--r--initramfs/distro-specs/suse/functions-default55
-rw-r--r--initramfs/distro-specs/ubuntu/functions-default8
4 files changed, 52 insertions, 35 deletions
diff --git a/initramfs/distro-specs/debian/functions-default b/initramfs/distro-specs/debian/functions-default
index 24f0fa2b..742153df 100644
--- a/initramfs/distro-specs/debian/functions-default
+++ b/initramfs/distro-specs/debian/functions-default
@@ -23,10 +23,14 @@ preinit () {
# distro specific function called from servconfig script
config_distro () {
-# add the halt link to the 0 and 6 runlevel directories
+ # add the halt link to the 0 and 6 runlevel directories
ln -sf ../init.d/halt /mnt/etc/rc0.d/S90halt
ln -sf ../init.d/reboot /mnt/etc/rc6.d/S90reboot
-
+
+ # remove annoying udev rule set for changing eth interface
+ # fixme: not that simple, see ticket 187
+ #rm /mnt/etc/udev/rules.d/*persistent-net.rules >/dev/null 2>&1
+
# set default runlevel
sed -e "s/.*initdefault/id:${D_INITDEFAULT}:initdefault/" -i /mnt/etc/inittab
}
@@ -193,7 +197,8 @@ done
# consolefont and language
consolefont () {
-echo -e "setfont ${CONSOLE_FONT} >${LOGFILE} 2>&1" \
+# console font setting program not available in Debian 4!?
+echo -e "\t#setfont ${CONSOLE_FONT} >${LOGFILE} 2>&1" \
>>/mnt/etc/${D_INITDIR}/boot.slx
chmod 744 /mnt/etc/${D_INITDIR}/boot.slx
# fixme!! check for proper operation
diff --git a/initramfs/distro-specs/gentoo/functions-default b/initramfs/distro-specs/gentoo/functions-default
index 3bb0103f..ccfcf57b 100644
--- a/initramfs/distro-specs/gentoo/functions-default
+++ b/initramfs/distro-specs/gentoo/functions-default
@@ -16,12 +16,13 @@
# distro specific general function called from servconfig script
config_distro () {
-echo -e "OpenSLX version ${SLXVERSION}\ninitramfs generation date $date" \
- >> /mnt/etc/gentoo-release
-echo -e "# changes made to this file by $0 (initramfs from $date)" \
- > /etc/rc.conf
-# keytable is set by hwautocfg script (added just for convenience here)
-config_rc_entry "KEYMAP" "${KEYTABLE}" "conf.d/keymaps"
+ echo -e "OpenSLX version ${SLXVERSION}\ninitramfs generation date $date" \
+ >> /mnt/etc/gentoo-release
+ echo -e "# changes made to this file by $0 (initramfs from $date)" \
+ > /etc/rc.conf
+ # keytable is set by hwautocfg script (added just for convenience here)
+ config_rc_entry "KEYMAP" "${KEYTABLE}" "conf.d/keymaps"
+ # fixme: check for strange udev rules which want to rename eth* names!
}
# linking runlevel scripts and defining execution order
diff --git a/initramfs/distro-specs/suse/functions-default b/initramfs/distro-specs/suse/functions-default
index 9adedaae..6627c435 100644
--- a/initramfs/distro-specs/suse/functions-default
+++ b/initramfs/distro-specs/suse/functions-default
@@ -20,22 +20,29 @@
config_distro () {
# no need to run start scripts in parallel
# enable magic sysrequest for the clients
-sed -e "1i# /etc/${D_SYSCONFDIR}/sysctl - modified by $0 version $version" \
- -e "s,ENABLE_SYSRQ=.*,ENABLE_SYSRQ=\"yes\"," \
- -i /mnt/etc/${D_SYSCONFDIR}/sysctl
-# add specific path /var/X11R6/bin ...
-echo -e "# stuff generated by $0 (out of InitRamFS written $date)\n\
+ sed -e "1i# /etc/${D_SYSCONFDIR}/sysctl - modified by $0 version $version" \
+ -e "s,ENABLE_SYSRQ=.*,ENABLE_SYSRQ=\"yes\"," \
+ -i /mnt/etc/${D_SYSCONFDIR}/sysctl
+ # add specific path /var/X11R6/bin ...
+ echo -e "# stuff generated by $0 (out of InitRamFS written $date)\n\
PATH=\"\$PATH:/var/X11R6/bin\"\n\
test \"\$UID\" -ge 100 && PATH=\"\$PATH:.\"\n\
QTDIR=/usr/lib/qt3\nexport QTDIR\nno_proxy='localhost'\n\
export no_proxy" > /mnt/etc/SuSEconfig/profile
-echo -e "SLX VERSION = $SLXVERSION\nINITRAMFS GENERATION DATE = $date" \
- >> /mnt/etc/SuSE-release
-# create a stateless specific halt script
-echo -e '#!/bin/sh\n# script generated in InitRamFS (SLX stage3)
-. /etc/rc.status\n
-trap "echo" SIGINT SIGSEGV SIGQUIT SIGTERM\nset +e\n\n
-case "$0" in\n\t*halt)
+ echo -e "SLX VERSION = $SLXVERSION\nINITRAMFS GENERATION DATE = $date" \
+ >> /mnt/etc/SuSE-release
+
+ # remove annoying udev rule set for changing eth interface and rtc symlink
+ rm /mnt/etc/udev/rules.d/*persistent-net.rules \
+ /mnt/etc/udev/rules.d/*net_persistent_names.rules >/dev/null 2>&1
+ sed '/SYMLINK+="rtc"/d' -i \
+ /mnt/etc/udev/rules.d/50-udev-default.rules >/dev/null 2>&1
+
+ # create a stateless specific halt script
+ echo -e '#!/bin/sh\n# script generated in InitRamFS (SLX stage3)
+ . /etc/rc.status\n
+ trap "echo" SIGINT SIGSEGV SIGQUIT SIGTERM\nset +e\n\n
+ case "$0" in\n\t*halt)
\t message="The system will be halted immediately."
\t command="halt -p"\n\t ;;\n\t*reboot)\n
\t message="Please stand by while rebooting the system..."
@@ -44,18 +51,18 @@ rc_reset\ntest -e /etc/init.d/halt.local && {
\techo Running /etc/init.d/halt.local\n\t/bin/sh /etc/init.d/halt.local
\trc_status -v1 -r\n}
echo $message\nexec $command -d -f' > /mnt/etc/${D_INITDIR}/halt
-# add the halt link to the 0 and 6 runlevel directories
-ln -sf ../halt /mnt/etc/${D_INITDIR}/rc0.d/S20halt
-ln -sf ../halt /mnt/etc/${D_INITDIR}/rc6.d/S20reboot
-# enable execution of all important start scripts
-# running stuff in parallel seems to be rather useless and generates some
-# difficult to solve problems. If you want to try nevertheless enable the
-# following line and disable the latter one (switching off that feature)
-sed -e "s,RUN_PARALLEL=.*,RUN_PARALLEL=\"no\"," \
- -i /mnt/etc/${D_SYSCONFDIR}/boot
-# if YaST2 should be runnable (without much effect anyway) on the client
-testmkd /mnt/var/log/YaST2
-echo "$host_name" > /mnt/etc/HOSTNAME
+ # add the halt link to the 0 and 6 runlevel directories
+ ln -sf ../halt /mnt/etc/${D_INITDIR}/rc0.d/S20halt
+ ln -sf ../halt /mnt/etc/${D_INITDIR}/rc6.d/S20reboot
+ # enable execution of all important start scripts
+ # running stuff in parallel seems to be rather useless and generates some
+ # difficult to solve problems. If you want to try nevertheless enable the
+ # following line and disable the latter one (switching off that feature)
+ sed -e "s,RUN_PARALLEL=.*,RUN_PARALLEL=\"no\"," \
+ -i /mnt/etc/${D_SYSCONFDIR}/boot
+ # if YaST2 should be runnable (without much effect anyway) on the client
+ testmkd /mnt/var/log/YaST2
+ echo "$host_name" > /mnt/etc/HOSTNAME
}
# linking runlevel scripts
diff --git a/initramfs/distro-specs/ubuntu/functions-default b/initramfs/distro-specs/ubuntu/functions-default
index 0bd396cb..a327e797 100644
--- a/initramfs/distro-specs/ubuntu/functions-default
+++ b/initramfs/distro-specs/ubuntu/functions-default
@@ -50,9 +50,13 @@ synapticsdrv=""
}
# distro specific function called from servconfig script
config_distro () {
-# add the halt link to the 0 and 6 runlevel directories
+ # add the halt link to the 0 and 6 runlevel directories
ln -sf ../init.d/halt /mnt/etc/rc0.d/S90halt
ln -sf ../init.d/reboot /mnt/etc/rc6.d/S90reboot
+
+ # remove annoying udev rule set for changing eth interface
+ rm /mnt/etc/udev/rules.d/*persistent-net.rules >/dev/null 2>&1
+
# set default runlevel
sed -e "s/.*initdefault/id:${D_INITDEFAULT}:initdefault/" -i /mnt/etc/inittab
}
@@ -125,7 +129,7 @@ if [ "x$start_syslog" != "xno" ] ; then
# fixme, welcher Syslog wird verwendet?
#if syslog
testmkd /mnt/var/log/news
- echo -e "# /etc/syslog.conf - file generated by $0" >/mnt/etc/syslogd.conf
+ echo -e "# /etc/syslog.conf - file generated by $0" >/mnt/etc/syslog.conf
# test -n "$log_servers" && \
# for logserver in $log_servers; do
# echo -e "*.*;*.*;*.*;*kern.!*\t@$logserver" >>/mnt/etc/syslog.conf