[arch-projects] [initscripts] [PATCH 02/12] mtab, dmesg: show status

Kurt J. Bosch kjb-temp-2009 at alpenjodel.de
Sat Jun 25 09:45:55 EDT 2011


Dave Reisner, 2011-06-25 15:41:
> On Sat, Jun 25, 2011 at 12:15:54PM +0200, Kurt J. Bosch wrote:
>> ---
>>   rc.sysinit |   28 ++++++++++++++++------------
>>   1 files changed, 16 insertions(+), 12 deletions(-)
>>
>> diff --git a/rc.sysinit b/rc.sysinit
>> index 50a8faf..225790d 100755
>> --- a/rc.sysinit
>> +++ b/rc.sysinit
>> @@ -197,12 +197,14 @@ status "Remounting Root Read/Write" \
>>   	mount -n -o remount,rw /
>>
>>   # don't touch /etc/mtab if it is a symlink to /proc/self/mounts
>> -if [[ -L /etc/mtab ]]; then
>> -	:
>> -elif [[ -x $(type -P findmnt)&&  -e /proc/self/mountinfo ]]; then
>> -	findmnt -rnu -o SOURCE,TARGET,FSTYPE,OPTIONS>| /etc/mtab
>> -else
>> -	cat /proc/mounts>| /etc/mtab
>> +if [[ ! -L /etc/mtab ]]; then
>> +	stat_busy "Creating mtab"
>> +		if [[ -x $(type -P findmnt)&&  -e /proc/self/mountinfo ]]; then
>> +			findmnt -rnu -o SOURCE,TARGET,FSTYPE,OPTIONS>| /etc/mtab
>> +		else
>> +			cat /proc/mounts>| /etc/mtab
>> +		fi
>> +	if (( $? == 0 )); then stat_done; else stat_fail; fi
>
> Can we stay away from these one line if statements? We don't use them
> anywhere else. Otherwise, ACK.

These are changed in a later patch into

  (( $? == 0 )) && stat_done || stat_fail

I guess that looks much better, doesn't it?


More information about the arch-projects mailing list