summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-09-13 23:31:54 +0000
committerMike Frysinger <vapier@gentoo.org>2005-09-13 23:31:54 +0000
commit67bbe73ef14bdf5ee215a366174abc607db8100d (patch)
treef876690b68d8e2c56f44dd3f6da1bd2022373dc3 /sys-fs
parentSome cleanup. fix bug #69678 (diff)
downloadgentoo-2-67bbe73ef14bdf5ee215a366174abc607db8100d.tar.gz
gentoo-2-67bbe73ef14bdf5ee215a366174abc607db8100d.tar.bz2
gentoo-2-67bbe73ef14bdf5ee215a366174abc607db8100d.zip
make sure we clean up our temp files #105827 by Robert Forsman
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'sys-fs')
-rwxr-xr-xsys-fs/udev/files/udev-stop.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys-fs/udev/files/udev-stop.sh b/sys-fs/udev/files/udev-stop.sh
index aea78be71eb1..8be8e3ced11c 100755
--- a/sys-fs/udev/files/udev-stop.sh
+++ b/sys-fs/udev/files/udev-stop.sh
@@ -3,8 +3,8 @@
main() {
if [[ -e /dev/.devfsd || ! -e /dev/.udev || ! -z ${CDBOOT} || \
- ${RC_DEVICE_TARBALL} != "yes" ]] || \
- ! touch /lib/udev-state/devices.tar.bz2 2>/dev/null
+ ${RC_DEVICE_TARBALL} != "yes" ]] || \
+ ! touch /lib/udev-state/devices.tar.bz2 2>/dev/null
then
return 0
fi
@@ -16,8 +16,7 @@ main() {
devices_totar=$(mktemp /tmp/devices.totar.XXXXXX)
device_tarball=$(mktemp /tmp/devices-XXXXXX)
- if [[ -z ${devices_udev} || -z ${devices_real} || \
- -z ${device_tarball} ]]; then
+ if [[ -z ${devices_udev} || -z ${devices_real} || -z ${device_tarball} ]] ; then
eend 1 "Could not create temporary files!"
else
cd /dev
@@ -51,12 +50,13 @@ main() {
if [[ -s ${devices_totar} ]]; then
try tar --one-file-system -jcpf "${device_tarball}" -T "${devices_totar}"
try mv -f "${device_tarball}" /lib/udev-state/devices.tar.bz2
- try rm -f "${devices_udev}" "${devices_real}"
else
rm -f /lib/udev-state/devices.tar.bz2
fi
eend 0
fi
+
+ rm -f "${devices_udev}" "${devices_real}" "${devices_totar}" "${device_tarball}"
}
main