]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
console_init/plymouth: use systemd-vconsole, if available
authorHarald Hoyer <harald@redhat.com>
Thu, 28 Apr 2011 15:33:26 +0000 (17:33 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 3 May 2011 07:59:14 +0000 (09:59 +0200)
also init the console before starting the plymouth daemon

modules.d/10i18n/console_init
modules.d/10i18n/module-setup.sh
modules.d/50plymouth/plymouth-pretrigger.sh

index bdd39b00d87a5454af53bee13f73fa197a9d1540..30b2582db9271719fa464c81d180e0b1ac882c9c 100755 (executable)
@@ -72,20 +72,25 @@ devname=${dev#/dev/}
 
 [ -e /tmp/console_init.${devname} ] && exit 0
 
-dev_open ${dev}
+if [ -x /lib/systemd/systemd-vconsole ]; then
+    /lib/systemd/systemd-vconsole
+else
+    dev_open ${dev}
+
+    for fd in 6 7; do
+        if ! [ -t ${fd} ]; then
+            echo "ERROR: File descriptor not opened: ${fd}" >&2
+            dev_close
+            exit 1
+        fi
+    done
+
+    set_keyboard
+    set_terminal ${dev}
+    set_font ${dev}
+    set_keymap
+
+    dev_close
+fi
 
-for fd in 6 7; do
-    if ! [ -t ${fd} ]; then
-        echo "ERROR: File descriptor not opened: ${fd}" >&2
-        dev_close
-        exit 1
-    fi
-done
-
-set_keyboard
-set_terminal ${dev}
-set_font ${dev}
-set_keymap
-
-dev_close
 >/tmp/console_init.${devname}
index f764c8e1e98d2c0d6ebd3498b8a81fb7abc835be..a374c33513bd7ee485cad8d4f9a579ac57d803cf 100755 (executable)
@@ -11,6 +11,7 @@ depends() {
 }
 
 install() {
+    [ -x /lib/systemd/systemd-vconsole ] && dracut_install /lib/systemd/systemd-vconsole
     KBDSUBDIRS=consolefonts,consoletrans,keymaps,unimaps
     DEFAULT_FONT=LatArCyrHeb-16
     I18N_CONF="/etc/locale.conf"
index 6f8628df1021b5a917a243354e4033a3f0b23c8b..222dc20839ace28432713ad875625e75de6e436a 100755 (executable)
@@ -18,7 +18,7 @@ if getargbool 1 rd.plymouth -n rd_NO_PLYMOUTH; then
 
     info "Starting plymouth daemon"
     mkdir -m 0755 /run/plymouth
-    [ -x /bin/plymouthd ] && /bin/plymouthd --attach-to-session --pid-file /run/plymouth/pid
     [ -x /lib/udev/console_init ] && /lib/udev/console_init tty0
+    [ -x /bin/plymouthd ] && /bin/plymouthd --attach-to-session --pid-file /run/plymouth/pid
     /bin/plymouth --show-splash 2>&1 | vinfo
 fi