]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
modules.d/10i18n/module-setup.sh: handle empty vconsole.conf
authorHarald Hoyer <harald@redhat.com>
Fri, 5 Jul 2013 13:33:28 +0000 (15:33 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 5 Jul 2013 13:48:40 +0000 (15:48 +0200)
if /etc/vconsole.conf exists and is empty, then do not install anything.

modules.d/10i18n/module-setup.sh

index a91b5806c8f6387bcf948c9ef18e6b3cce62f1fb..b309faa70b1f0157114c1dcb3fe0d1a492d4057d 100755 (executable)
@@ -12,6 +12,15 @@ depends() {
 }
 
 install() {
+    if dracut_module_included "systemd"; then
+        [[ -f /etc/vconsole.conf ]] || return 0
+        unset FONT
+        unset KEYMAP
+        . /etc/vconsole.conf
+        # if vconsole.conf has no settings, do not include anything
+        [[ $FONT ]] || [[ $KEYMAP ]] || return 0
+    fi
+
     dracut_install -o $systemdutildir/systemd-vconsole-setup
     KBDSUBDIRS=consolefonts,consoletrans,keymaps,unimaps
     DEFAULT_FONT="${i18n_default_font:-LatArCyrHeb-16}"