[arch-projects] [PATCH] get console font from vconsole.conf too

Peter A. Shevtsov pshevtsov at severusweb.ru
Fri Mar 23 03:15:43 EDT 2012


From: "Peter A. Shevtsov" <pshevtsov at severusweb.ru>

Signed-off-by: Peter A. Shevtsov <pshevtsov at severusweb.ru>
---
 install/consolefont |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/install/consolefont b/install/consolefont
index 7110c3c..0843718 100644
--- a/install/consolefont
+++ b/install/consolefont
@@ -5,7 +5,13 @@ build() {
 
     # subshell to avoid namespace pollution
     (
-        . "$BASEDIR/etc/rc.conf"
+    if [[ -e "$BASEDIR/etc/vconsole.conf" ]]; then
+        source "$BASEDIR/etc/vconsole.conf"
+    fi
+    source "$BASEDIR/etc/rc.conf"
+    if [[ -n "$FONT" ]]; then
+        CONSOLEFONT=$FONT
+    fi
         if [[ -n "$CONSOLEFONT" ]]; then
             for file in "$BASEDIR/usr/share/kbd/consolefonts/$CONSOLEFONT".psf?(u)?(.gz); do
                 if [[ -e $file ]]; then
@@ -21,7 +27,7 @@ build() {
             error "consolefont: requested font not found: \`%s'" "$CONSOLEFONT"
             exit 1
         else
-            warning "consolefont: no font found in %s/etc/rc.conf" "${BASEDIR%/}"
+            warning "consolefont: no font found in %s/etc/vconsole.conf or %s/etc/rc.conf" "${BASEDIR%/}" "${BASEDIR%/}"
             exit 1
         fi
     )
@@ -31,7 +37,7 @@ build() {
 
 help() {
     cat <<HELPEOF
-This hook loads consolefont specified in rc.conf during early userspace.
+This hook loads consolefont specified in vconsole.conf or rc.conf during early userspace.
 HELPEOF
 }
 
-- 
1.7.9.4



More information about the arch-projects mailing list