aboutsummaryrefslogtreecommitdiffstats
path: root/main/openrc/modloop.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-08-20 10:04:22 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-08-20 11:21:48 +0000
commit269afbcfe090b1e30d16929618ef1fcb605787f4 (patch)
tree446692f797c2ea17daa758bd6e3b38952fbf768f /main/openrc/modloop.initd
parentb0967a4e74e3ca80310e9e10647b43041913e709 (diff)
downloadaports-269afbcfe090b1e30d16929618ef1fcb605787f4.tar.bz2
aports-269afbcfe090b1e30d16929618ef1fcb605787f4.tar.xz
main/openrc: do not barf if modloop is already unmounted
Diffstat (limited to 'main/openrc/modloop.initd')
-rw-r--r--main/openrc/modloop.initd11
1 files changed, 8 insertions, 3 deletions
diff --git a/main/openrc/modloop.initd b/main/openrc/modloop.initd
index c32e1f49f5..cf46c98df0 100644
--- a/main/openrc/modloop.initd
+++ b/main/openrc/modloop.initd
@@ -77,11 +77,16 @@ start() {
}
stop() {
+ local rc=0
find_media
[ -z "$alpine_dev" ] && return 0
ebegin "Unmounting loopback device for kernel modules"
- umount -d /.modloop &&\
- umount $alpine_mnt 2>/dev/null
- eend $?
+ if mountinfo --quiet /.modloop; then
+ umount -d /.modloop || rc=1
+ fi
+ if mountinfo --quiet $alpine_mnt; then
+ umount $alpine_mnt || rc=1
+ fi
+ eend $rc
}