I have a very strange problem. The script I wrote and placed in /etc/network/if-up.d/ wont quit after running.
My script is:
#! /bin/bash
Dev="eth0"
echo "$IFACE" >> /debug
if [ "$IFACE" = "$Dev" ] || [ "$IFACE" = "--all" ]; then
echo "run start" >> /debug
bash /LANRoute
echo "run end" >> /debug
fi
echo "end" >> /debug
exit 0
While booting, this script always time out (5m+). But running /LANRoute will be finished within 2 min if I run it manually in bash. Even I remove the /LANRoute file, booting still stuck to timeout.
The contents of /debug file:
eth0
lo
run start
end
run end
end
It looks like this script run twice and all are ended well.
If I remove this script, it can boot up without any problem. What causes the timeout in booting up?
Thanks.