mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-21 13:47:50 +00:00
Update to the udhcpc wrapper script. Ref #1890
This commit is contained in:
parent
6a726d0344
commit
c13f5c6627
@ -1,8 +1,15 @@
|
||||
#!/gns3/bin/busybox sh
|
||||
|
||||
SCRIPT="/gns3/etc/udhcpc/default.script"
|
||||
EXTRA=""
|
||||
|
||||
[ "$(cat "/proc/$PPID/comm" 2>/dev/null)" = ifup ] && EXTRA="-t 3 -T 2 -A 1 -b"
|
||||
if [ "$(cat "/proc/$PPID/comm" 2>/dev/null)" = ifup ]; then
|
||||
# remove "-n" argument
|
||||
for arg do
|
||||
shift
|
||||
[ "$arg" = "-n" ] || set -- "$@" "$arg"
|
||||
done
|
||||
# add default parameters
|
||||
set -- -t 3 -T 2 -A 1 -b "$@"
|
||||
fi
|
||||
|
||||
exec /tmp/gns3/bin/udhcpc -s "$SCRIPT" $EXTRA "$@"
|
||||
exec /tmp/gns3/bin/udhcpc -s "$SCRIPT" "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user