diff options
| author | Simon Rettberg | 2013-06-20 15:48:09 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2013-06-20 15:48:09 +0200 |
| commit | e4eabbb11af0d2d75dbc03940d359ed41234a80b (patch) | |
| tree | 519821d9d9520db78637db4f8fa8710fa0354ff6 /remote | |
| parent | [rootfs-stage32] remove unneeded binaries (diff) | |
| download | tm-scripts-e4eabbb11af0d2d75dbc03940d359ed41234a80b.tar.gz tm-scripts-e4eabbb11af0d2d75dbc03940d359ed41234a80b.tar.xz tm-scripts-e4eabbb11af0d2d75dbc03940d359ed41234a80b.zip | |
[udhcpc] Properly renew and fork to background
Diffstat (limited to 'remote')
| -rw-r--r-- | remote/modules/systemd/data/etc/systemd/system/udhcpc@.service | 4 | ||||
| -rwxr-xr-x | remote/rootfs/rootfs-stage32/data/opt/openslx/bin/dhcp++ | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/remote/modules/systemd/data/etc/systemd/system/udhcpc@.service b/remote/modules/systemd/data/etc/systemd/system/udhcpc@.service index db67c6b6..611d0f98 100644 --- a/remote/modules/systemd/data/etc/systemd/system/udhcpc@.service +++ b/remote/modules/systemd/data/etc/systemd/system/udhcpc@.service @@ -2,8 +2,10 @@ Description=DHCP Client [Service] -Type=simple +Type=forking +PIDFile=/run/udhcpc.%I.pid ExecStart=/opt/openslx/bin/dhcp++ %I +ExecStopPost=/bin/rm /run/udhcpc.%I.pid [Install] WantedBy=multi-user.target diff --git a/remote/rootfs/rootfs-stage32/data/opt/openslx/bin/dhcp++ b/remote/rootfs/rootfs-stage32/data/opt/openslx/bin/dhcp++ index a0a03497..1bc103b0 100755 --- a/remote/rootfs/rootfs-stage32/data/opt/openslx/bin/dhcp++ +++ b/remote/rootfs/rootfs-stage32/data/opt/openslx/bin/dhcp++ @@ -6,7 +6,7 @@ NET_IF="$1" NET_IP="$(ip addr show dev "${NET_IF}" | grep "inet " | awk -F " " '{print $2}' | awk -F "/" '{print $1}')" UDHCPC_OPTS="" -[ ! -z "$NET_IP" ] && UDHCPC_OPTS=" -r '$NET_IP' " +[ ! -z "$NET_IP" ] && UDHCPC_OPTS=" -r $NET_IP " echo "udhcp++: running on $NET_IF with additional params $UDHCPC_OPTS" >> "/tmp/udhcpclog" -/opt/openslx/sbin/udhcpc -f -p /var/run/udhcpc.pid $UDHCPC_OPTS -O domain -O nissrv -O nisdomain -O wpad -t 8 -s /opt/openslx/bin/udhcpc.openslx.script -i "$NET_IF" +/opt/openslx/sbin/udhcpc $UDHCPC_OPTS -O domain -O nissrv -O nisdomain -O wpad -t 8 -s /opt/openslx/bin/udhcpc.openslx.script -i "$NET_IF" -p "/run/udhcpc.$NET_IF.pid" |
