diff options
| author | Simon Rettberg | 2014-01-29 21:10:04 +0100 |
|---|---|---|
| committer | Simon Rettberg | 2014-01-29 21:10:04 +0100 |
| commit | b77ffba65617c4001e85a31dc9673d0abe481fb8 (patch) | |
| tree | 40033a4e82cc9e8e3b13889c4aec3aa5f1acd3ee /remote/modules/dhcpc-busybox/data/opt/openslx/scripts | |
| parent | Merge branch 'master' of simonslx:openslx-ng/tm-scripts (diff) | |
| download | tm-scripts-b77ffba65617c4001e85a31dc9673d0abe481fb8.tar.gz tm-scripts-b77ffba65617c4001e85a31dc9673d0abe481fb8.tar.xz tm-scripts-b77ffba65617c4001e85a31dc9673d0abe481fb8.zip | |
<stage32> Trigger network target as soon as possible if network/dhcp has been done in stage31
Diffstat (limited to 'remote/modules/dhcpc-busybox/data/opt/openslx/scripts')
| -rwxr-xr-x | remote/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/remote/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx b/remote/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx index 546750b9..e43afb33 100755 --- a/remote/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx +++ b/remote/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx @@ -20,12 +20,12 @@ . /opt/openslx/config RESOLV_CONF="/etc/resolv.conf" -THIS_RESOLV="/run/dhcpc/${interface}.resolv" +THIS_RESOLV="/run/network/${interface}.resolv" rebuild_resolv_conf () { # Maybe make this smarter some time, if anyone is using client's that are on multiple networks at once etc... # This is a little braindead but should work most of the time - sort -u /run/dhcpc/*.resolv > "$RESOLV_CONF" 2> /dev/null + sort -u /run/network/*.resolv > "$RESOLV_CONF" 2> /dev/null } escape_search() { @@ -96,7 +96,7 @@ case "$1" in sed -i "s/^\(SLX_PXE_CLIENT_IP=\).*$/\1'$ip'/" /opt/openslx/config # Only if network is not ready yet - if [ ! -e "/run/dhcpc/network-ready" ]; then + if [ ! -e "/run/network/network-ready" ]; then # Update hostname if [ -z "$dns_host" ]; then # fallback to what the dhcp told us @@ -130,7 +130,7 @@ case "$1" in fi # Update /etc/issue for proper spacing /opt/openslx/scripts/openslx-create_issue - touch "/run/dhcpc/network-ready" + touch "/run/network/network-ready" # Mark network target as reached systemctl start network.target & fi # end "network not ready yet" @@ -158,16 +158,16 @@ case "$1" in sed -i -r '/^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\s*$/d' /etc/hosts # "dns ready" target - if [ -n "$dns" ] && [ ! -e "/run/dhcpc/dns-ready" ]; then - touch "/run/dhcpc/dns-ready" + if [ -n "$dns" ] && [ ! -e "/run/network/dns-ready" ]; then + touch "/run/network/dns-ready" # Write to openslx-config echo "# Config written by openslx-dhcp-script (2)" >> /opt/openslx/config echo "SLX_DNS='$dns'" >> /opt/openslx/config systemctl start network-dns.target & fi # "default route exists" target - if [ -n "$router" ] && [ ! -e "/run/dhcpc/routing-ready" ]; then - touch "/run/dhcpc/routing-ready" + if [ -n "$router" ] && [ ! -e "/run/network/gateway-ready" ]; then + touch "/run/network/gateway-ready" # Write to openslx-config echo "# Config written by openslx-dhcp-script (3)" >> /opt/openslx/config echo "SLX_DNS='$dns'" >> /opt/openslx/config |
