From 269afbcfe090b1e30d16929618ef1fcb605787f4 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Thu, 20 Aug 2009 10:04:22 +0000 Subject: main/openrc: do not barf if modloop is already unmounted --- main/openrc/APKBUILD | 4 ++-- main/openrc/modloop.initd | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'main/openrc') diff --git a/main/openrc/APKBUILD b/main/openrc/APKBUILD index 415f24a58..c0c3ec3b4 100644 --- a/main/openrc/APKBUILD +++ b/main/openrc/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa pkgname=openrc pkgver=0.5.0 -pkgrel=6 +pkgrel=7 pkgdesc="OpenRC manages the services, startup and shutdown of a host" url="http://roy.marples.name/openrc" license='BSD-2' @@ -50,7 +50,7 @@ c32e15b0858eef708497e7ee6355a055 hostname.initd b1e64885f301166df30be3e3cf5338ff hwdrivers.initd 33ca3e558c42cdd17adccbc7807298f7 keymaps.initd 098a1f16812f56fcb56eb6b6f0fa31f6 modules.initd -c77cb4a67aa7ef40dfb12dd1ff5bf5e2 modloop.initd +4c69d1c6a84cbe0195496c14a757579b modloop.initd 747168eee535e845179eaef5a3fcb334 networking.initd 71d823acc9935a8ac82649a94b5bc0b9 openrc.post-install 393ff61bc0bf2c07f9af81795554c584 openrc.post-upgrade" 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 } -- cgit v1.2.3