diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-03-21 14:17:59 +0100 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-03-24 20:43:12 +0100 |
commit | 757ae1fb693ccc556e4d8af1b858d476e53dede8 (patch) | |
tree | 00b7c768589524d0288b48ae83b986d942d2750a /install/consolefont | |
parent | f97d0cc8b46709cc94154eb36bdd784a879e63b4 (diff) | |
download | mkinitcpio-757ae1fb693ccc556e4d8af1b858d476e53dede8.tar.gz mkinitcpio-757ae1fb693ccc556e4d8af1b858d476e53dede8.tar.xz |
natively support locale.conf and vconsole.conf
This is implemented for the keymap and consolefont hooks. It's done in
such a way that vconsole.conf and locale.conf will override and
supplement rc.conf.
Implements FS#29022.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'install/consolefont')
-rw-r--r-- | install/consolefont | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/install/consolefont b/install/consolefont index 7110c3c..2d2d8ea 100644 --- a/install/consolefont +++ b/install/consolefont @@ -5,8 +5,13 @@ build() { # subshell to avoid namespace pollution ( - . "$BASEDIR/etc/rc.conf" - if [[ -n "$CONSOLEFONT" ]]; then + for cfg in etc/{rc,vconsole}.conf; do + [[ -s $BASEDIR/$cfg ]] && . "$BASEDIR/$cfg" + done + + [[ $FONT ]] && CONSOLEFONT=$FONT + + if [[ $CONSOLEFONT ]]; then for file in "$BASEDIR/usr/share/kbd/consolefonts/$CONSOLEFONT".psf?(u)?(.gz); do if [[ -e $file ]]; then [[ $file =~ \.(psfu?)(\.gz)?$ ]] && ext=${BASH_REMATCH[1]} @@ -21,7 +26,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 configuration" exit 1 fi ) @@ -31,7 +36,8 @@ build() { help() { cat <<HELPEOF -This hook loads consolefont specified in rc.conf during early userspace. +This hook loads consolefont specified in locale.conf or rc.conf during early +userspace. HELPEOF } |