diff options
| -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" |
