summaryrefslogtreecommitdiff
path: root/system/openrc/sysfsconf.initd
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2019-07-22 20:15:07 -0400
committerMax Rees <maxcrees@me.com>2019-07-22 20:15:07 -0400
commit2707df6cc761dcc2341faa8bafec5b4b4fa33e4d (patch)
tree9df7c2d2fd84f153634581ff4fb249b98bf34ffa /system/openrc/sysfsconf.initd
parentb7ffaa4d55e1faf4de0f8e6a2edf372fedfeaf71 (diff)
downloadpackages-2707df6cc761dcc2341faa8bafec5b4b4fa33e4d.tar.gz
packages-2707df6cc761dcc2341faa8bafec5b4b4fa33e4d.tar.bz2
packages-2707df6cc761dcc2341faa8bafec5b4b4fa33e4d.tar.xz
packages-2707df6cc761dcc2341faa8bafec5b4b4fa33e4d.zip
system/*, user/*: remove bashisms from initd scripts
Diffstat (limited to 'system/openrc/sysfsconf.initd')
-rw-r--r--system/openrc/sysfsconf.initd6
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