diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2015-10-05 11:08:11 -0500 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2015-10-05 11:08:11 -0500 |
commit | 1558ad2b9ebf319b85876a940d31d513bf21324f (patch) | |
tree | 7ead5c751dd7f5fe6248f7bb4999aea3a1c3653f /init.d | |
parent | 5f4f2420364098835522da868a9e75205c9e4f9c (diff) |
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
Diffstat (limited to 'init.d')
-rw-r--r-- | init.d/bootmisc.in | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/init.d/bootmisc.in b/init.d/bootmisc.in index 13f23891..952475dd 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 |