From 0ea092dc3c6419028d380a6b0b04743c947040c0 Mon Sep 17 00:00:00 2001 From: Edward Hope-Morley Date: Mon, 29 Jun 2015 18:57:01 +0100 Subject: [PATCH] [hopem,r=] Ensure mktmp dir is deleted when no longer needed. Closes-Bug: 1467938 --- templates/os-charm-phy-nic-mtu.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/os-charm-phy-nic-mtu.conf b/templates/os-charm-phy-nic-mtu.conf index 06d1967b..287499f4 100644 --- a/templates/os-charm-phy-nic-mtu.conf +++ b/templates/os-charm-phy-nic-mtu.conf @@ -7,9 +7,9 @@ task script devs="{{ devs }}" mtu="{{ mtu }}" - tmpfile=`mktemp` - echo $devs > $tmpfile if [ -n "$mtu" ]; then + tmpfile=`mktemp` + echo $devs > $tmpfile while read -r dev; do [ -n "$dev" ] || continue rc=0 @@ -19,4 +19,4 @@ script rm $tmpfile [ $rc = 0 ] || exit $rc fi -end script \ No newline at end of file +end script