diff options
| author | Jonathan Bauer | 2012-12-20 16:48:55 +0100 |
|---|---|---|
| committer | Jonathan Bauer | 2012-12-20 16:48:55 +0100 |
| commit | cb5c7640b2c85cf3fd88190574d1150fa4357048 (patch) | |
| tree | caf2204c91a5e5fe2863c611eaa386f3e32ac87d /remote/tools/base | |
| parent | minor fix (diff) | |
| download | tm-scripts-cb5c7640b2c85cf3fd88190574d1150fa4357048.tar.gz tm-scripts-cb5c7640b2c85cf3fd88190574d1150fa4357048.tar.xz tm-scripts-cb5c7640b2c85cf3fd88190574d1150fa4357048.zip | |
udev fix & network.service first steps...
Diffstat (limited to 'remote/tools/base')
| -rw-r--r-- | remote/tools/base/data/etc/systemd/system/network.service (renamed from remote/tools/base/data/etc/systemd/system/network-fast.service) | 2 | ||||
| -rwxr-xr-x | remote/tools/base/data/etc/udhcpc.default.script | 25 |
2 files changed, 9 insertions, 18 deletions
diff --git a/remote/tools/base/data/etc/systemd/system/network-fast.service b/remote/tools/base/data/etc/systemd/system/network.service index 6656b189..04f033e6 100644 --- a/remote/tools/base/data/etc/systemd/system/network-fast.service +++ b/remote/tools/base/data/etc/systemd/system/network.service @@ -3,6 +3,6 @@ Description=Setup Network Connection After=udev.service [Service] -ExecPre=/openslx/bin/ip link set dev eth0 up +ExecStartPre=/openslx/bin/ip link set dev eth0 up ExecStart=/openslx/sbin/udhcpc -O domain -O nissrv -O nisdomain -t 8 -s /etc/udhcpc.default.script -i eth0 diff --git a/remote/tools/base/data/etc/udhcpc.default.script b/remote/tools/base/data/etc/udhcpc.default.script index 09442a5e..02ca9b05 100755 --- a/remote/tools/base/data/etc/udhcpc.default.script +++ b/remote/tools/base/data/etc/udhcpc.default.script @@ -1,27 +1,21 @@ -#!/bin/sh +#!/bin/bash # Busybox udhcpc dispatcher script. Copyright (C) 2009 by Axel Beckert. # # Based on the busybox example scripts and the old udhcp source # package default.* scripts. RESOLV_CONF="/etc/resolv.conf" +IP_CONF="/tmp/udhcpc_ip_config" + +set > /tmp/udhcpc_env case $1 in bound|renew) - [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" - [ -n "$subnet" ] && NETMASK="netmask $subnet" - ip addr add $ip/$(ipcalc -s -p $ip $subnet|sed s/.*=//) dev $interface - ip route add default via $router - - # read filename from fbgui.conf where ip config should be saved. - ipconf=$(cat /etc/fbgui.conf | grep ip_config | cut -d '=' -f2) - - echo "ip=$ip" > $ipconf - echo "subnet=$subnet" >> $ipconf - echo "broadcast=$broadcast" >> $ipconf - echo "gateway=$router" >> $ipconf - echo "$ip:132.230.4.3:$router:$subnet" > /tmp/ip_config_fbgui + echo "ip=$ip" > $IP_CONF + echo "subnet=$subnet" >> $IP_CONF + echo "broadcast=$broadcast" >> $IP_CONF + echo "gateway=$router" >> $IP_CONF # Update resolver configuration file R="" @@ -40,9 +34,6 @@ case $1 in else echo -n "$R" > "$RESOLV_CONF" fi - trigger=$(cat /etc/fbgui.conf | grep file_trigger | cut -d '=' -f2) - - echo "gogo" >> $trigger ;; deconfig) |
