cvs commit: LFS/bootscripts/lfs/init.d console swap

Nathan Coulson conathan at conet.dyndns.org
Wed May 12 22:38:04 PDT 2004


> winkie at linuxfromscratch.org wrote:
>> winkie      04/05/12 14:59:53
>>
>>   Modified:    bootscripts/lfs/init.d console swap
>>   Log:
>>   Fixed console script to not be broken
>>    # Native English speakers probably don't have /etc/sysconfig/console
>> at all
>>   -
>>   +if [ -f /etc/sysconfig/console ]; then
>>   +	. /etc/sysconfig/console
>>   +else
>>   +	exit 0
>>   +fi
>
> This way, if there is no /etc/sysconfig/console file, ./console --help
> will display nothing. Please back this out. Nathan and I have already
> been in this trap :(
>
> <snip>
>
>>   -		if [ ! -z "$KEYMAP" ]
>>   -		then
>>   +		if [ -n "$KEYMAP" ]; then
> As far as I know that [ ! -z "$KEYMAP" ] and [ -n "$KEYMAP" ] are
> synonims. What does it gain except reducing the length of the script?
>
> --
> Alexander E. Patrakov

it's broken in some spots [looking over

  -                if [ ! -z "$KEYMAP_ CORRECTIONS" ]
  -                then
  +
  +                if [ -n "$KEYMAP_CORRECTIONS" ]; then
                           echo -n "Correcting keymap..."
  -                        loadkeys $KEYMAP_CORRECTION
  +                        loadkeys $KEYMAP_CORRECTIONS

].

the -n's dont hurt either.  [I've been trying to remember to do that].

But, moving the /etc/sysconfig/console check back to start would be for
the best.



More information about the lfs-book mailing list