]> git.proxmox.com Git - mirror_zfs-debian.git/commitdiff
Added call to hide Plymouth when error shell is launched.
authorWill Rouesnel <w.rouesnel@gmail.com>
Sat, 8 Dec 2012 12:46:35 +0000 (23:46 +1100)
committerDarik Horn <dajhorn@vanadac.com>
Sat, 15 Dec 2012 21:42:01 +0000 (15:42 -0600)
This allows users with Plymouth to see and interact with the spawned
shell under error conditions.

Amended-by: Darik Horn <dajhorn@vanadac.com>
debian/tree/zfs-initramfs/usr/share/initramfs-tools/scripts/zfs

index fb633b25e4764132c983616cedf7d2fc0bf7d931..1c8da77c0ff37dd5395016a7ba9d391fbedde867 100644 (file)
@@ -14,6 +14,15 @@ pre_mountroot()
        [ "$quiet" != "y" ] && log_end_msg
 }
 
+# Duplicates the functionality found under try_failure_hooks in functions
+# but invoking that would be inappropriate here.
+disable_plymouth()
+{
+       if [ -x /bin/plymouth ] && /bin/plymouth --ping
+       then
+               /bin/plymouth hide-splash >/dev/null 2>&1
+       fi
+}
 
 mountroot()
 {
@@ -77,6 +86,7 @@ mountroot()
 
        if [ "$ZFS_ERROR" -ne 0 ]
        then
+               disable_plymouth
                echo "Command: zpool import -f -N $ZFS_RPOOL"
                echo "Message: $ZFS_STDERR"
                echo "Error: $ZFS_ERROR"
@@ -96,6 +106,7 @@ mountroot()
 
        if [ -z "$ZFS_BOOTFS" ]
        then
+               disable_plymouth
                echo "Command: zpool list -H -o bootfs $ZFS_RPOOL"
                echo "Error: $ZFS_ERROR, unable to get the bootfs property."
                echo ""
@@ -125,6 +136,7 @@ mountroot()
 
        if [ "$ZFS_ERROR" -ne 0 ]
        then
+               disable_plymouth
                echo ""
                echo "Command: mount -t zfs -o zfsutil $ZFS_BOOTFS $rootmnt"
                echo "Message: $ZFS_STDERR"