From b4e1ad544a320efcfe83469614516821966a89a3 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Sat, 17 Jan 2009 02:28:38 +0000 Subject: Some more fixes, added missing file. git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2486 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/distro-specs/scilin/functions-default | 38 ++++++++++++++++--------- initramfs/stage3-stuff/etc/messages | 6 ++-- 2 files changed, 28 insertions(+), 16 deletions(-) (limited to 'initramfs') diff --git a/initramfs/distro-specs/scilin/functions-default b/initramfs/distro-specs/scilin/functions-default index 93e11405..8b3e0fec 100644 --- a/initramfs/distro-specs/scilin/functions-default +++ b/initramfs/distro-specs/scilin/functions-default @@ -25,9 +25,9 @@ D_BINDMPTS="tmp root media home" D_DIRINBINDMNT="/var/run /var/log /var/tmp" D_RODIRSINRW="/etc/bootsplash /etc/gconf /var/adm /var/lib/texmf /var/lib/rpm \ /var/cache/fontconfig" -D_DIRINDXS="/var/lib/rpm /var/lib/nobody /var/lib/alternatives/ \ -/var/db/nscd /var/lib/bluetooth /var/lib/scrollkeeper /var/lib/nfs/sm \ -/var/lib/nfs/sm.bak /var/lib/misc /var/spool/cron" +D_DIRINDXS="/var/lib/rpm /var/lib/nobody /var/lib/alternatives/ /var/db/nscd \ +/var/lib/bluetooth /var/lib/scrollkeeper /var/lib/nfs/sm /var/lib/nfs/sm.bak \ +/var/lib/misc /var/spool/cron" # empty functions are defined at the beginning of /etc/functions @@ -41,9 +41,10 @@ config_distro () { echo -e "SLX VERSION = $SLXVERSION\nINITRAMFS GENERATION DATE = $date" \ >>/mnt/etc/redhat-release # simple bash configuration for root - echo ". /etc/bashrc" >/mnt/root/.profile + echo -e "# Generated in OpenSLX stage3\n. /etc/bashrc" >/mnt/root/.profile # enable sysrq - sed -e "s/kernel.sysrq =.*/kernel.sysrq = 1/" -i /mnt/etc/sysctl.conf + sed -e "1i# Configuration modified by $0 during stage3 bootup." \ + -e "s/kernel.sysrq =.*/kernel.sysrq = 1/" -i /mnt/etc/sysctl.conf # set some networking stuff if needed [ -e /mnt/etc/sysconfig/network ] && \ sed -e "s/HOSTNAME=.*/HOSTNAME=$host_name/" \ @@ -53,23 +54,34 @@ config_distro () { # initial (boot time) runlevel scripts initial_boot () { # delete all classical disk base rootfs stuff from rc.sysinit -sed -e "/# Initialize ha/,/success/d" -e "/^ROOTFSTYPE/,/Remounting root/d" \ +sed -e "6i# Script modified by $0 during stage3 bootup." \ + -e "/# Initialize ha/,/success/d" -e "/^ROOTFSTYPE/,/Remounting root/d" \ -e "/# Check f/,/Mounting l/d" -e "/^# Configure mach/,/-f \/fastboot/d" \ - -i /mnt/etc/rc.d/rc.sysinit + -e "s,/sbin/start_udev$,/etc/init.d/udevd," -i /mnt/etc/rc.d/rc.sysinit +# write a custom udev script (to be checked!!) +echo -e "#!/bin/sh\n# Simple udev starter script created as a replacement \ +during OpenSLX stage3\n# bootup." >/mnt/etc/init.d/udevd +echo -e '. /etc/init.d/functions\nSTRING=$"Starting udev: " +echo -n "$STRING "\n/sbin/udevstart /dev/null 2>&1 +\n[ $? -eq 0 ] && success $"$STRING" || failure $"$STRING" +\necho\nexit 0' >>/mnt/etc/init.d/udevd +chmod u+x /mnt/etc/init.d/udevd # delete all classical disk base rootfs stuff from halt -sed -e "/# Save mixer/,/Saving random/d" -e "/quotaoff/,/^# Now halt/d" \ +sed -e "7i# Modified by $0 during stage3 bootup." \ + -e "/# Save mixer/,/Saving random/d" -e "/quotaoff/,/^# Now halt/d" \ -i /mnt/etc/init.d/halt # boot.slx is a special runlevel script generated within initialramfs which -# should be executed before the normal runlevel scripts. Proper shutdown is -# not needed!? -echo "/etc/init.d/boot.slx" >>/mnt/etc/rc.d/rc.sysinit +# should be executed before the normal runlevel scripts. +echo -e "# Run OpenSLX init runlevel script\n/etc/init.d/boot.slx" \ + >>/mnt/etc/rc.d/rc.sysinit # switch off SElinux enforcing -sed -e "s/SELINUX=.*/SELINUX=permissive/" -i /mnt/etc/selinux/config +sed -e "1i# Configuration modified by $0 during stage3 bootup." \ + -e "s/SELINUX=.*/SELINUX=permissive/" -i /mnt/etc/selinux/config # link halt and reboot scripts ln -s ../init.d/killall /mnt/etc/rc.d/rc0.d/S00killall ln -s ../init.d/halt /mnt/etc/rc.d/rc0.d/S01halt ln -s ../init.d/killall /mnt/etc/rc.d/rc6.d/S00killall -ln -s ../init.d/halt /mnt/etc/rc.d/rc0.d/S01reboot +ln -s ../init.d/halt /mnt/etc/rc.d/rc6.d/S01reboot } # linking runlevel scripts diff --git a/initramfs/stage3-stuff/etc/messages b/initramfs/stage3-stuff/etc/messages index 7f6ed647..5ad40756 100644 --- a/initramfs/stage3-stuff/etc/messages +++ b/initramfs/stage3-stuff/etc/messages @@ -31,8 +31,8 @@ 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 \ +init_errnwad=" Failed to load the network adaptor modules added via \ +slxconfig-demuxer\n run. Please reconfigure the module list and add the \ appropriate modules (without .ko)." init_bootmac=" If you have more than one ethernet adaptor present in your \ machine or using\n a NVidia chipset then it would be advisable to switch on \ @@ -57,7 +57,7 @@ init_dnbd2s=" After 100 retries, it was not possible to start the dnbd2 \ service. Please\n check that at least one server is available. You might \ use the\n /sys/block/vnbd0 interface for this." init_moddir=" The requested modules directory does not exist. That could \ -mean:\n * The kernel was updated but mkdxsinitrd was not run afterwards.\n\ +mean:\n * The kernel was updated but the demuxer was not run afterwards.\n\ * The mounted filesystem does not contain the modules directory at all.\n\ You might want to check the list of mounted filesystems and if /mnt is\n\ not empty run 'ls /mnt/lib/modules' to check." -- cgit v1.2.3-55-g7522