commit: 1558ad2b9ebf319b85876a940d31d513bf21324f Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com> AuthorDate: Mon Oct 5 16:08:11 2015 +0000 Commit: William Hubbs <williamh <AT> gentoo <DOT> org> CommitDate: Mon Oct 5 16:08:11 2015 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=1558ad2b
bootmisc: only remove temp directory if umount is successful Change the clean_run function to only remove the temp directory if the umount was successful. X-Gentoo-Bug: 561230 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=561230 init.d/bootmisc.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/init.d/bootmisc.in b/init.d/bootmisc.in index 13f2389..952475d 100644 --- a/init.d/bootmisc.in +++ b/init.d/bootmisc.in @@ -136,8 +136,7 @@ clean_run() dir=$(mktemp -d) if [ -n "$dir" -a -d $dir -a -w $dir ]; then mount --bind / $dir && rm -rf $dir/run/* || rc=1 - umount $dir - rm -rf $dir + umount $dir && rmdir $dir else rc=1 fi
