Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 528608 - net-misc/netifrc-0.2.4 - udhcpc.sh uses bashisms
Summary: net-misc/netifrc-0.2.4 - udhcpc.sh uses bashisms
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: netifrc Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: nonbash
  Show dependency tree
 
Reported: 2014-11-08 03:03 UTC by Sven E.
Modified: 2015-05-25 10:05 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.