diff -p -up mkinitrd-6.0.62/mkinitrd.splashy mkinitrd-6.0.62/mkinitrd --- mkinitrd-6.0.62/mkinitrd.splashy 2008-08-26 16:55:42.000000000 +0200 +++ mkinitrd-6.0.62/mkinitrd 2008-08-26 16:59:14.000000000 +0200 @@ -1371,6 +1371,12 @@ mknod $MNTIMAGE/dev/tty c 5 0 mknod $MNTIMAGE/dev/console c 5 1 mknod $MNTIMAGE/dev/ptmx c 5 2 +if (source /etc/sysconfig/bootsplash 2>/dev/null; [ "$SPLASH" != "no" ] && [ -x /sbin/splashy ]); then + for f in $(/usr/sbin/splashy_find_files); do + inst $f "$MNTIMAGE" + done +fi + if [ -n "$raiddevices" ]; then inst /sbin/mdadm "$MNTIMAGE" if [ -f /etc/mdadm.conf ]; then @@ -1619,6 +1625,10 @@ if [ -x /usr/libexec/plymouth/plymouth-p /usr/libexec/plymouth/plymouth-populate-initrd $(get_verbose) -t "$MNTIMAGE" fi +emit "echo Starting splash." +emit "nash-if-splash splashy_chvt 8" +emit "nash-if-splash splashy boot" + emit "echo Setting up hotplug." emit "hotplug" @@ -1759,8 +1769,11 @@ fi emit "loadpolicy" emit "plymouth --newroot=/sysroot" emit "echo Switching to new root and running init." +emit "nash-if-splash splashy_update \"chroot /sysroot\"" emit "switchroot" emit "echo Booting has failed." +emit "nash-if-splash splashy_update exit" +emit "nash-if-splash splashy_chvt 1" emit "sleep -1" chmod +x $RCFILE diff -p -up mkinitrd-6.0.62/nash/nash.c.splashy mkinitrd-6.0.62/nash/nash.c --- mkinitrd-6.0.62/nash/nash.c.splashy 2008-08-26 16:55:42.000000000 +0200 +++ mkinitrd-6.0.62/nash/nash.c 2008-08-26 16:55:42.000000000 +0200 @@ -3062,6 +3062,29 @@ waitdevCommand(char *cmd, char *end) } static int +ifSplashCommand(char * cmd, char * end) +{ + const char * splash_exec = "/sbin/splashy"; + char * splash = getKernelArg("splash"); + if (splash && strcmp(splash, "silent") && !access(splash_exec, R_OK)) { + char * chptr; + char * fullPath = NULL; + + chptr = cmd; + while (chptr < end && !isspace(*chptr)) + chptr++; + *(chptr++) = '\0'; + + if (searchPath(cmd, &fullPath) >= 0) { + int rc = otherCommand(fullPath, chptr, end, 1, 0); + free(fullPath); + return rc; + } + } + return 0; +} + +static int setQuietCommand(char * cmd, char * end) { char *quietcmd; @@ -3143,6 +3166,7 @@ static const struct commandHandler handl { "showelfinterp", showElfInterpCommand }, { "showlabels", showLabelsCommand }, { "sleep", sleepCommand }, + { "if-splash", ifSplashCommand }, { "stabilized", stabilizedCommand }, { "status", statusCommand }, { "switchroot", switchrootCommand },