Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/openrc:master commit in: init.d/
Date: Mon, 05 Oct 2015 16:11:22
Message-Id: 1444061291.1558ad2b9ebf319b85876a940d31d513bf21324f.williamh@OpenRC
1 commit: 1558ad2b9ebf319b85876a940d31d513bf21324f
2 Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
3 AuthorDate: Mon Oct 5 16:08:11 2015 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 5 16:08:11 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=1558ad2b
7
8 bootmisc: only remove temp directory if umount is successful
9
10 Change the clean_run function to only remove the temp directory if the
11 umount was successful.
12
13 X-Gentoo-Bug: 561230
14 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=561230
15
16 init.d/bootmisc.in | 3 +--
17 1 file changed, 1 insertion(+), 2 deletions(-)
18
19 diff --git a/init.d/bootmisc.in b/init.d/bootmisc.in
20 index 13f2389..952475d 100644
21 --- a/init.d/bootmisc.in
22 +++ b/init.d/bootmisc.in
23 @@ -136,8 +136,7 @@ clean_run()
24 dir=$(mktemp -d)
25 if [ -n "$dir" -a -d $dir -a -w $dir ]; then
26 mount --bind / $dir && rm -rf $dir/run/* || rc=1
27 - umount $dir
28 - rm -rf $dir
29 + umount $dir && rmdir $dir
30 else
31 rc=1
32 fi