From 2707df6cc761dcc2341faa8bafec5b4b4fa33e4d Mon Sep 17 00:00:00 2001 From: Max Rees Date: Mon, 22 Jul 2019 20:15:07 -0400 Subject: system/*, user/*: remove bashisms from initd scripts --- system/openrc/sysfsconf.initd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system/openrc/sysfsconf.initd') 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 -- cgit v1.2.3-70-g09d2