From 1558ad2b9ebf319b85876a940d31d513bf21324f Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Mon, 5 Oct 2015 11:08:11 -0500 Subject: [PATCH] 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 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