:: Re: [DNG] vdev
Startseite
Nachricht löschen
Nachricht beantworten
Autor: Ralph Ronnquist
Datum:  
To: dng
Betreff: Re: [DNG] vdev
On 11/08/16 00:13, richard lucassen wrote:
> ...
>> diff -rc clean/usr/lib/vdev/udev-compat.sh
>>       echo "event-put $_DEVICE_ID" >> /tmp/udev-compat.log
>>       echo "" >> /tmp/udev-compat.log

>>
>> -    _RC=$?

>
> What are the consequences of moving this _RC?
>
>> +    _RC=$?
>>       echo "event-put $_DEVICE_ID" >> /tmp/udev-compat.log
>>       echo "" >> /tmp/udev-compat.log


Since '$?' is 'the result code of last command", it's IMO best placed
immediately after the command whose result code to capture. Here,
previously, it captured the result of the (failed, as it were) attempt
to echo to the log file, rather than the result of event-put.

Ralph.