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