diff options
Diffstat (limited to 'main/openrc/modloop.initd')
-rw-r--r-- | main/openrc/modloop.initd | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/main/openrc/modloop.initd b/main/openrc/modloop.initd index c32e1f49f..cf46c98df 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 } |