selinux: umount $NEWROOT/dev and its submounts
authorWANG Chao <chaowang@redhat.com>
Tue, 18 Jun 2013 05:58:04 +0000 (13:58 +0800)
committerHarald Hoyer <harald@redhat.com>
Tue, 18 Jun 2013 06:56:11 +0000 (08:56 +0200)
$NEWROOT/dev and its submounts should be umounted after we use it.
Otherwise it fails other scripts that umount /sysroot only.

Signed-off-by: WANG Chao <chaowang@redhat.com>
modules.d/98selinux/selinux-loadpolicy.sh

index 5dddfc2..436ee6b 100755 (executable)
@@ -48,6 +48,7 @@ rd_load_policy()
             [ -e "$NEWROOT"/.autorelabel ] && LANG=C /usr/sbin/setenforce 0
             mount --rbind /dev "$NEWROOT/dev"
             LANG=C chroot "$NEWROOT" /sbin/restorecon -R /dev
+            umount -R "$NEWROOT/dev"
             return 0
         fi