diff options
author | A. Wilcox <awilcox@wilcox-tech.com> | 2019-07-24 05:54:10 +0000 |
---|---|---|
committer | A. Wilcox <awilcox@wilcox-tech.com> | 2019-07-24 05:54:10 +0000 |
commit | bed7a51ed2c79f05cb1cf4708d4e128cfb23133a (patch) | |
tree | ec42f502556c869d54bc511d1c8f3248db80d566 /system/openrc/sysfsconf.initd | |
parent | 6574a30b9b98a3464ff4cebe381b3732a8dabfc3 (diff) | |
parent | d88486a76bb0d6bafb97fc9f0b5ae909f61b18e8 (diff) | |
download | packages-bed7a51ed2c79f05cb1cf4708d4e128cfb23133a.tar.gz packages-bed7a51ed2c79f05cb1cf4708d4e128cfb23133a.tar.bz2 packages-bed7a51ed2c79f05cb1cf4708d4e128cfb23133a.tar.xz packages-bed7a51ed2c79f05cb1cf4708d4e128cfb23133a.zip |
Merge branch 'openrc-bashisms' into 'master'
Cleanup OpenRC init.d scripts, and more
See merge request adelie/packages!295
Diffstat (limited to 'system/openrc/sysfsconf.initd')
-rw-r--r-- | system/openrc/sysfsconf.initd | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/system/openrc/sysfsconf.initd b/system/openrc/sysfsconf.initd index 433e51d63..5d4f9aeab 100644 --- a/system/openrc/sysfsconf.initd +++ b/system/openrc/sysfsconf.initd @@ -12,14 +12,14 @@ setval() { local value="$1" attrib="$2" # Some fields need a terminating newline, others # need the terminating newline to be absent :-( - echo -n "$value" > "$attrib" 2>/dev/null \ - || echo "$value" > "$attrib" + printf '%s' "$value" > "$attrib" 2>/dev/null \ + || printf '%s\n' "$value" > "$attrib" } load_conffile() { local file="$1" while read line; do - local line=${line%%#*} + local line="${line%%#*}" local cmd= attrib= value= set -- $line if [ $# -eq 0 ]; then |