22 lines
494 B
Plaintext
22 lines
494 B
Plaintext
description "Enabling Quantum external networking port"
|
|
|
|
start on runlevel [2345]
|
|
|
|
task
|
|
|
|
script
|
|
devs="{{ devs }}"
|
|
mtu="{{ mtu }}"
|
|
tmpfile=`mktemp`
|
|
echo $devs > $tmpfile
|
|
if [ -n "$mtu" ]; then
|
|
while read -r dev; do
|
|
[ -n "$dev" ] || continue
|
|
rc=0
|
|
# Try all devices before exiting with error
|
|
ip link set $dev mtu $mtu || rc=$?
|
|
done < $tmpfile
|
|
rm $tmpfile
|
|
[ $rc = 0 ] || exit $rc
|
|
fi
|
|
end script |