summaryrefslogtreecommitdiff
path: root/system/openrc/modloop.initd
diff options
context:
space:
mode:
authorA. Wilcox <awilcox@wilcox-tech.com>2019-07-24 05:54:10 +0000
committerA. Wilcox <awilcox@wilcox-tech.com>2019-07-24 05:54:10 +0000
commitbed7a51ed2c79f05cb1cf4708d4e128cfb23133a (patch)
treeec42f502556c869d54bc511d1c8f3248db80d566 /system/openrc/modloop.initd
parent6574a30b9b98a3464ff4cebe381b3732a8dabfc3 (diff)
parentd88486a76bb0d6bafb97fc9f0b5ae909f61b18e8 (diff)
downloadpackages-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/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
}