diff options
Diffstat (limited to 'initramfs/initrd-stuff')
-rwxr-xr-x | initramfs/initrd-stuff/bin/servconfig | 25 | ||||
-rw-r--r-- | initramfs/initrd-stuff/etc/functions | 12 | ||||
-rwxr-xr-x | initramfs/initrd-stuff/init | 38 |
3 files changed, 13 insertions, 62 deletions
diff --git a/initramfs/initrd-stuff/bin/servconfig b/initramfs/initrd-stuff/bin/servconfig index 2b8ff72c..2b7a4cf2 100755 --- a/initramfs/initrd-stuff/bin/servconfig +++ b/initramfs/initrd-stuff/bin/servconfig @@ -187,22 +187,6 @@ test -n "$domain_name_servers" && { done; } ############################################################################# -# initial boot scripts -# delete and create runlevel links for initial booting (SuSE, Debian, Ubuntu, -# Fedora, ...) -# splashy stuff -if [ ${nosplash} = 0 ]; then - D_INITSCRIPTS="${D_INITSCRIPTS} splashy.stop" - d_mkrlscript init splashy.stop "Stopping Splashy ..." - echo -e "\t/var/lib/openslx/bin/splashy_update exit 2>/dev/null - \tkillall -9 splashy\n\trm -f /var/lib/openslx/bin/splashy_update" \ - >>/mnt/etc/${D_INITDIR}/splashy.stop - d_mkrlscript close splashy.stop "" -fi - -initial_boot - -############################################################################# # run distro specific configuration function config_distro @@ -439,15 +423,6 @@ if [ "x$vmware" != "x" ] && [ "x$vmware" != "xno" ] ; then fi ############################################################################# -# theming -testmkd /mnt/var/lib/openslx/themes/displaymanager -testmkd /mnt/var/lib/openslx/bin -[ -d /usr/share/themes/displaymanager ] && \ - cp -a /usr/share/themes/displaymanager /mnt/var/lib/openslx/themes -[ -d /etc/splashy -a ${nosplash} = 0 ] && (cp -a /bin/splashy_update \ - /mnt/var/lib/openslx/bin) - -############################################################################# # preparation of /tmp directory (partition 44, nfs scratch, ramdisk). there # might be the chance that we have a disk partition available, so wait for # completion of detection, setup process diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions index 830e7008..577bf9b8 100644 --- a/initramfs/initrd-stuff/etc/functions +++ b/initramfs/initrd-stuff/etc/functions @@ -556,9 +556,9 @@ fi # execute all shell scripts in the given init-hook folder runinithook () { local hook=$1 -if [ -d /initramfs/init-hooks/$hook ]; then - for hook_script in /initramfs/init-hooks/$hook/*; do - . hook_script +if [ -d /etc/init-hooks/$hook ]; then + for hook_script in /etc/init-hooks/$hook/*; do + . $hook_script done fi } @@ -846,15 +846,17 @@ esac # setup initial boot scripts (for most standard distributions, gentoo is to # be handled differently) initial_boot () { +local scripts=$* local count=10 # boot.slx is a special runlevel script generated within initialramfs which # should be executed before the normal runlevel scripts. Proper shutdown is # not needed!? -for i in boot.slx ${D_INITSCRIPTS}; do +for i in boot.slx $scripts; do count=$(($count + 1)) - revcnt=$((41 - $count)) + echo "boot-runlevelscript $i" ln -sf /etc${D_INITDIR}/$i /mnt/etc/${D_INITBOOTD}/S${count}$i # uncomment if proper shutdown of bootup scripts is required + #revcnt=$((41 - $count)) #ln -sf /etc${D_INITDIR}/$i /mnt/etc/${D_INITBOOTD}/K${revcnt}$i done } diff --git a/initramfs/initrd-stuff/init b/initramfs/initrd-stuff/init index 7cfba25b..28a98459 100755 --- a/initramfs/initrd-stuff/init +++ b/initramfs/initrd-stuff/init @@ -113,15 +113,6 @@ echo "noldap" > /tmp/ldap-done # standard path (.../tftpboot/client-config/ ...) file="yes" -# splashy stuff seems to depend on /proc/fb with VESA!? -# only activate with kernel option quiet -if grep -E "(VESA|VGA)" /proc/fb > /dev/null 2>&1 \ - && grep -qi " quiet " /proc/cmdline > /dev/null 2>&1; then - export nosplash=0 -else - export nosplash=1 -fi - # read kernel commandline read KCMDLINE < /proc/cmdline export KCMDLINE @@ -137,14 +128,12 @@ in $0\ncountry=\"${COUNTRY}\"" >> /etc/machine-setup # single token for debugging ... debug) DEBUGLEVEL=1 - nosplash=1 ;; # ... or a specified debug level debug=*) DEBUGLEVEL=${opts#debug=} [ $DEBUGLEVEL -eq 8 -o $DEBUGLEVEL -eq 20 ] && \ echo "** SLX init started near $(sysup)" - [ ${DEBUGLEVEL} != 0 ] && nosplash=1 ;; # essid for WLAN boot (experimental, might be moved to a module component # in later versions @@ -281,9 +270,6 @@ done runinithook '05-have-kernelvars' -# splashy stuff -[ ${nosplash} = 0 ] && /bin/splashy boot 2>/dev/null - # at this point a timer should be started to ensure an automated reboot # or halt of the machine if SLX init does not succeed (e.g. missing kernel # module for the network adaptor) @@ -566,9 +552,6 @@ $(sysup)" # and should be generalized for nbd, dnbd, iscsi fi -# splashy stuff -[ ${nosplash} = 0 ] && /bin/splashy_update "progress 10" 2>/dev/null - # if no type of root filesystem is passed via kernel command line try # information gathered from dhcp process (only valid for nfs) if [ -z "${bldmod}" -a -z "${bldhost}" -a -z "${nfsroot}" ] ; then @@ -637,9 +620,6 @@ if [ -n "${aufs}" ]; then fi fi -# splashy stuff -[ ${nosplash} = 0 ] && /bin/splashy_update "progress 30" 2>/dev/null - # setup of client root filesystem dependent on the availability of UnionFS if [ -n "${unionfs}" -o -n "${aufs}" ] ; then echo "Using ${union_type} for rw access" @@ -714,9 +694,6 @@ fi runinithook '50-have-layered-fs' -# splashy stuff -[ ${nosplash} = 0 ] && /bin/splashy_update "progress 50" 2>/dev/null - # script for stuff to execute during early bootup d_mkrlscript init boot.slx "Running configuration postponed from InitRamFS" echo "fs complete at $(sysup)" >/tmp/fscmpl @@ -772,9 +749,6 @@ fi runinithook '60-have-servconfig' -# splashy stuff -[ ${nosplash} = 0 ] && /bin/splashy_update "progress 80" 2>/dev/null - # wait a while for hardware setup to complete and copy stuff to stage4 waitfor /tmp/hwcfg 20000 || error "$init_errhw" [ -f /tmp/scanner-udev ] && cat /tmp/scanner-udev \ @@ -817,14 +791,17 @@ runinithook '70-before-plugins' # check for any plugin-specific runlevel scripts and run them, if found: if [ -d /initramfs/plugin-init.d ]; then for plugin_starter in /initramfs/plugin-init.d/*; do - [ $DEBUGLEVEL -gt 0 ] && \ - echo "Running plugin starter $plugin_starter ..." - /bin/sh $plugin_starter + [ $DEBUGLEVEL -gt 0 ] \ + && echo "Running plugin starter $plugin_starter ..." + . $plugin_starter done fi runinithook '80-after-plugins' +# create links for initial stage4 boot scripts +initial_boot $D_INITSCRIPTS + # post init for some distro specific postinit [ -s /initramfs/postinit.local ] && { @@ -875,8 +852,5 @@ unset BOOT_IMAGE KCMDLINE KERNEL MODPRV NWMODULES OLDPWD UDEVD_EVENT_TIMEOUT \ runinithook '99-handing-over' -# splashy stuff -[ ${nosplash} = 0 ] && /bin/splashy_update "progress 100" 2>/dev/null - # new style of pivoting (switch_root or run-init) exec /bin/switch_root -c dev/console /mnt /sbin/init || error "$init_runinit" |