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
This commit is contained in:
parent
5f4f242036
commit
1558ad2b9e
@ -136,8 +136,7 @@ clean_run()
|
|||||||
dir=$(mktemp -d)
|
dir=$(mktemp -d)
|
||||||
if [ -n "$dir" -a -d $dir -a -w $dir ]; then
|
if [ -n "$dir" -a -d $dir -a -w $dir ]; then
|
||||||
mount --bind / $dir && rm -rf $dir/run/* || rc=1
|
mount --bind / $dir && rm -rf $dir/run/* || rc=1
|
||||||
umount $dir
|
umount $dir && rmdir $dir
|
||||||
rm -rf $dir
|
|
||||||
else
|
else
|
||||||
rc=1
|
rc=1
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user