Re: [LEDE-DEV] [PATCH v4] base-files: Ensure reset only works if an overlay exists

2016-10-24 Thread Bastian Bittorf
* Chris Blake  [24.10.2016 07:47]:
> Alexis is correct, it's to ensure any chance of a random error is
> suppressed. 2> /dev/null was just added as a protection.

i will explain why this makes no sense:

grep will complain if e.g. the file '/proc/mounts' does not exist,
otherwise it output the lines matching the pattern or an empty result
if there is no match.

if there is really an error, it's a good idea NOT to suppress it.
so please resend without this 2>...

bye, bastian

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH v4] base-files: Ensure reset only works if an overlay exists

2016-10-23 Thread Chris Blake
Hello,

Alexis is correct, it's to ensure any chance of a random error is
suppressed. 2> /dev/null was just added as a protection.

Regards,
Chris Blake


On Sun, Oct 23, 2016 at 4:46 PM, Alexis Green  wrote:
> I’m guessing it’s because there might some random error message from grep?
> Maybe use -s option for grep instead to suppress error messages?
>
>> On Oct 23, 2016, at 12:30 PM, Bastian Bittorf  wrote:
>>
>> * Chris Blake  [23.10.2016 21:10]:
>>> +OVERLAY="$( grep ' /overlay ' /proc/mounts 2>/dev/null )"
>>
>> whats the reason for the 2>...?
>>
>> bye, bastian
>>
>> ___
>> Lede-dev mailing list
>> Lede-dev@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/lede-dev
>

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH v4] base-files: Ensure reset only works if an overlay exists

2016-10-23 Thread Alexis Green
I’m guessing it’s because there might some random error message from grep?
Maybe use -s option for grep instead to suppress error messages?

> On Oct 23, 2016, at 12:30 PM, Bastian Bittorf  wrote:
> 
> * Chris Blake  [23.10.2016 21:10]:
>> +OVERLAY="$( grep ' /overlay ' /proc/mounts 2>/dev/null )"
> 
> whats the reason for the 2>...?
> 
> bye, bastian
> 
> ___
> Lede-dev mailing list
> Lede-dev@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH v4] base-files: Ensure reset only works if an overlay exists

2016-10-23 Thread edgar . soldin
On 23.10.2016 23:42, edgar.sol...@web.de wrote:
> On 23.10.2016 21:30, Bastian Bittorf wrote:
>> * Chris Blake  [23.10.2016 21:10]:
>>> +OVERLAY="$( grep ' /overlay ' /proc/mounts 2>/dev/null )"
>>
>> whats the reason for the 2>...?
>>
> 
> for the corner case that the error message might contain ' /overlay' ?
> 
> just a guess.. ede
> 

hmm, right were talking about the grep error here. no clue either ;) please 
ignore my waste precious bandwidth.

..ede

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH v4] base-files: Ensure reset only works if an overlay exists

2016-10-23 Thread edgar . soldin
On 23.10.2016 21:30, Bastian Bittorf wrote:
> * Chris Blake  [23.10.2016 21:10]:
>> +OVERLAY="$( grep ' /overlay ' /proc/mounts 2>/dev/null )"
> 
> whats the reason for the 2>...?
> 

for the corner case that the error message might contain ' /overlay' ?

just a guess.. ede

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH v4] base-files: Ensure reset only works if an overlay exists

2016-10-23 Thread Bastian Bittorf
* Chris Blake  [23.10.2016 21:10]:
> +OVERLAY="$( grep ' /overlay ' /proc/mounts 2>/dev/null )"

whats the reason for the 2>...?

bye, bastian

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev