Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (28 sloc) 1.06 KB
#!/bin/bash
build() {
use_hookscript
eval "$(grep "^CONSOLEFONT=" /etc/rc.conf)"
if [[ -z $CONSOLEFONT ]]; then
error "no appropriate file found for consolefont"
return 0
fi
if [[ -f /usr/share/kbd/consolefonts/$CONSOLEFONT.psfu.gz ]]; then
CONSOLEFONT_FILE_GZ="/usr/share/kbd/consolefonts/$CONSOLEFONT.psfu.gz"
CONSOLEFONT_FILE="$(mktemp "$tmpdir/consolefont.psfu.XXXXXX")"
gzip -cd "$CONSOLEFONT_FILE_GZ" > "$CONSOLEFONT_FILE"
add_file ${CONSOLEFONT_FILE} /consolefont.psfu
elif [[ -f /usr/share/kbd/consolefonts/$CONSOLEFONT.psf.gz ]]; then
CONSOLEFONT_FILE_GZ="/usr/share/kbd/consolefonts/$CONSOLEFONT.psf.gz"
CONSOLEFONT_FILE="$(mktemp "$tmpdir/consolefont.psf.XXXXXX")"
gzip -cd "$CONSOLEFONT_FILE_GZ" > "$CONSOLEFONT_FILE"
add_file "$CONSOLEFONT_FILE" /consolefont.psf
else
error "consolefont: Font file does not exist or does not end with .psf.gz or .psfu.gz."
fi
}
helpmsg() {
cat<<HELPEOF
This builder loads the CONSOLEFONT specified in rc.conf during early userspace.
HELPEOF
}
# vim: set et ts=2 sw=2: