Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 528608

Summary: net-misc/netifrc-0.2.4 - udhcpc.sh uses bashisms
Product: Gentoo Linux Reporter: Sven E. <dark>
Component: [OLD] Core systemAssignee: netifrc Team <netifrc>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 526268    

Description Sven E. 2014-11-08 03:03:41 UTC
In line 28 the script issues a echo -n > "$conf". The parameter -n to echo is not posix conforming and as a result -n ends up in the config file which in turn throws an error later on when the config is sourced.


Reproducible: Always

Actual Results:  
broken config is created

Expected Results:  
a clean config

replace with printf? truncate -s 0?
Comment 1 Alexander Tsoy 2014-11-08 15:12:47 UTC
(In reply to Sven E. from comment #0)
> replace with printf? truncate -s 0?

: > "$conf"

or just

>"$conf"
Comment 2 Sven E. 2014-11-09 16:45:38 UTC
(In reply to Alexander Tsoy from comment #1)
> (In reply to Sven E. from comment #0)
> > replace with printf? truncate -s 0?
> 
> : > "$conf"
> 
> or just
> 
> >"$conf"

Okay, wasn't sure if that's POSIX, thanks for the feedback.