[hopem,r=]

Ensure mktmp dir is deleted when no longer
needed.

Closes-Bug: 1467938
This commit is contained in:
Edward Hope-Morley 2015-06-29 18:57:01 +01:00
parent a83a29eec2
commit 0ea092dc3c

View File

@ -7,9 +7,9 @@ task
script script
devs="{{ devs }}" devs="{{ devs }}"
mtu="{{ mtu }}" mtu="{{ mtu }}"
tmpfile=`mktemp`
echo $devs > $tmpfile
if [ -n "$mtu" ]; then if [ -n "$mtu" ]; then
tmpfile=`mktemp`
echo $devs > $tmpfile
while read -r dev; do while read -r dev; do
[ -n "$dev" ] || continue [ -n "$dev" ] || continue
rc=0 rc=0
@ -19,4 +19,4 @@ script
rm $tmpfile rm $tmpfile
[ $rc = 0 ] || exit $rc [ $rc = 0 ] || exit $rc
fi fi
end script end script