summaryrefslogtreecommitdiff
path: root/system/openrc/modloop.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/modloop.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/modloop.initd')
-rw-r--r--system/openrc/modloop.initd7
1 files changed, 4 insertions, 3 deletions
diff --git a/system/openrc/modloop.initd b/system/openrc/modloop.initd
index 9d664dd40..85ad2b165 100644
--- a/system/openrc/modloop.initd
+++ b/system/openrc/modloop.initd
@@ -24,9 +24,10 @@ mountdirs() {
find_modloop() {
local dir="$1"
- local kver=$(uname -r)
+ local kver="$(uname -r)"
local oifs="$IFS"
- IFS=$'\n'
+ IFS="
+"
set -- $(blkid "$dir"/boot/* "$dir"/*)
IFS="$oifs"
for line; do
@@ -42,7 +43,7 @@ find_modloop() {
find_backing_file() {
local dir="$1"
- local dev=$(df -P "$dir" | tail -1 | awk '{print $1}')
+ local dev="$(df -P "$dir" | tail -1 | awk '{print $1}')"
cat /sys/block/${dev#/dev/}/loop/backing_file 2>/dev/null
}