[ -n "$LANGUAGE" ] || LANGUAGE='en'
fi
- # if bootoption lang is used update /etc/default/locale, otherwise *not*!
- if [ -n "$BOOT_LANGUAGE" -a -x /usr/sbin/grml-setlang ] ; then
- if checkgrmlsmall ; then
- /usr/sbin/grml-setlang "POSIX"
- else
- /usr/sbin/grml-setlang "$LANGUAGE"
- fi
+ if [ -x /usr/sbin/grml-setlang ] ; then
+ # if bootoption lang is used update /etc/default/locale accordingly
+ if [ -n "$BOOT_LANGUAGE" ] ; then
+ checkgrmlsmall && /usr/sbin/grml-setlang "POSIX" || /usr/sbin/grml-setlang "$LANGUAGE"
+ # otherwise default to lang=en
+ else
+ checkgrmlsmall && /usr/sbin/grml-setlang "POSIX" || /usr/sbin/grml-setlang "en"
+ fi
fi
# set console font
if checkbootparam 'hostname' ; then
HOSTNAME="$(getbootparam 'hostname' 2>>$DEBUG)"
einfo "Setting hostname to $HOSTNAME as requested."
- sed -i "s/^127.0.0.1.*localhost/127.0.0.1 $HOSTNAME localhost/" /etc/hosts
- hostname $HOSTNAME ; eend $?
+ grml-hostname $HOSTNAME >>$DEBUG ; RC=$?
+ [ "$RC" = "0" ] && hostname $HOSTNAME
+ eend $RC
else
hostname --file /etc/hostname
fi