diff options
-rw-r--r-- | install/consolefont | 14 | ||||
-rw-r--r-- | install/keymap | 19 |
2 files changed, 26 insertions, 7 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 } diff --git a/install/keymap b/install/keymap index 51bb1a2..fe5e459 100644 --- a/install/keymap +++ b/install/keymap @@ -4,13 +4,25 @@ build() { # subshell to avoid namespace pollution ( - . "$BASEDIR/etc/rc.conf" + l=$LANG + unset LANG + + for cfg in etc/{rc,vconsole,locale}.conf; do + [[ -s $BASEDIR/$cfg ]] && . "$BASEDIR/$cfg" + done + + [[ $LANG ]] && LOCALE=$LANG + LANG=$l + if [[ $KEYMAP ]]; then - if [[ $LOCALE = *[Uu][Tt][Ff]-8 ]]; then + if [[ $LOCALE = *[Uu][Tt][Ff]?(-)8 ]]; then touch "$BUILDROOT/keymap.utf8" uc=-u fi loadkeys -q $uc $KEYMAP -b > "$BUILDROOT/keymap.bin" + else + warning "keymap: hook specified, but no KEYMAP found in configuration" + return 1 fi ) @@ -19,7 +31,8 @@ build() { help() { cat <<HELPEOF -This hook loads keymap(s) specified in rc.conf during early userspace. +This hook loads keymap(s) specified in vconsole.conf or rc.conf during early +userspace. HELPEOF } |