Blob Blame History Raw
From ee876e03b9c88bed7fb3d2a337b2361e07bbb0e3 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 21 Jun 2012 09:24:44 +0200
Subject: [PATCH] fixed i18n for systemd and include more config files in
 host-only

---
 modules.d/10i18n/console_init.sh    |    2 ++
 modules.d/98systemd/module-setup.sh |   17 ++++++++++++++---
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/modules.d/10i18n/console_init.sh b/modules.d/10i18n/console_init.sh
index b46046b..37efdd1 100755
--- a/modules.d/10i18n/console_init.sh
+++ b/modules.d/10i18n/console_init.sh
@@ -2,6 +2,8 @@
 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
 # ex: ts=8 sw=4 sts=4 et filetype=sh
 
+[ -x /lib/systemd/systemd-vconsole-setup ] && exit 0
+
 [ -e /etc/vconsole.conf ] && . /etc/vconsole.conf
 
 DEFAULT_FONT=LatArCyrHeb-16
diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh
index d11aa8a..4c68a9a 100755
--- a/modules.d/98systemd/module-setup.sh
+++ b/modules.d/98systemd/module-setup.sh
@@ -7,7 +7,8 @@ check() {
     if [[ -x /lib/systemd/systemd ]] || [[ -x /usr/lib/systemd/systemd ]]; then
         return 255
     fi
-    pkg-config systemd --variable=systemdutildir >/dev/null && return 255
+    [[ $systemdutildir ]] && return 255
+
     return 1
 }
 
@@ -69,6 +70,7 @@ install() {
         $systemdsystemunitdir/systemd-vconsole-setup.service \
         $systemdsystemunitdir/sysinit.target.wants/systemd-modules-load.service \
         $systemdsystemunitdir/sysinit.target.wants/systemd-ask-password-console.path \
+        $systemdsystemunitdir/sysinit.target.wants/systemd-vconsole-setup.service \
         $systemdsystemunitdir/sysinit.target.wants/systemd-journald.service \
         $systemdsystemunitdir/sockets.target.wants/systemd-initctl.socket \
         $systemdsystemunitdir/sockets.target.wants/systemd-shutdownd.socket \
@@ -77,7 +79,6 @@ install() {
         $systemdsystemunitdir/sockets.target.wants/systemd-journald.socket \
         $systemdsystemunitdir/sysinit.target.wants/systemd-udev.service \
         $systemdsystemunitdir/sysinit.target.wants/systemd-udev-trigger.service \
-        $systemdsystemunitdir/local-fs.target.wants/tmp.mount \
         $systemdsystemunitdir/ctrl-alt-del.target \
         $systemdsystemunitdir/single.service \
         $systemdsystemunitdir/syslog.socket \
@@ -101,6 +102,17 @@ install() {
 
     dracut_install journalctl systemctl echo
 
+    if [[ $hostonly ]]; then
+        dracut_install -o /etc/systemd/journald.conf \
+            /etc/systemd/system.conf \
+            /etc/hostname \
+            /etc/machine-id \
+            /etc/vconsole.conf \
+            /etc/locale.conf
+    else
+        > "$initdir/etc/machine-id"
+    fi
+
     ln -fs $systemdutildir/systemd "$initdir/init"
 
     rm -f "${initdir}${systemdsystemunitdir}/emergency.service"
@@ -136,6 +148,5 @@ install() {
     mkdir -p "${initdir}${systemdsystemunitdir}/initrd-switch-root.target.wants"
     ln -s ../dracut-pre-pivot.service "${initdir}${systemdsystemunitdir}/initrd-switch-root.target.wants/dracut-pre-pivot.service"
 
-    > "$initdir/etc/machine-id"
 }