From be70b4cc8020a10e4f83da75c3a3c02665fc777b Mon Sep 17 00:00:00 2001 From: TomasM Date: Wed, 8 Nov 2017 06:52:33 -0500 Subject: [PATCH] create a flag file in /mnt/live if network is set up by initrd, make dhclient.service in slax check for this file and skip network reconfig if exists --- Slax/debian/rootcopy/lib/systemd/system/dhclient.service | 3 ++- livekitlib | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Slax/debian/rootcopy/lib/systemd/system/dhclient.service b/Slax/debian/rootcopy/lib/systemd/system/dhclient.service index cc4be09..a4b6cac 100644 --- a/Slax/debian/rootcopy/lib/systemd/system/dhclient.service +++ b/Slax/debian/rootcopy/lib/systemd/system/dhclient.service @@ -4,10 +4,11 @@ Documentation=man:dhclient(8) Wants=network.target After=network-pre.target systemd-sysctl.service systemd-modules-load.service Before=network.target shutdown.target network-online.target +ConditionPathExists=/mnt/live/net.up.flag [Service] Type=forking -ExecStart=-/bin/sh -c 'udevadm settle && cat /proc/cmdline | egrep -qvi " ip=| from=http" && dhclient -nw' +ExecStart=-/bin/sh -c 'udevadm settle && dhclient -nw' PIDFile=/run/dhclient.pid [Install] diff --git a/livekitlib b/livekitlib index 15ecc1f..2aa4999 100644 --- a/livekitlib +++ b/livekitlib @@ -739,9 +739,10 @@ change_root() { debug_log "change_root" "$*" - # if we are booting over httpfs, we need to copyup these files so they are + # if we are booting over httpfs, we need to copyup some files so they are # accessible on union without any further lookup down, else httpfs locks if [ "$(network_device)" != "" ]; then + touch "/net.up.flag" touch "$1/etc/resolv.conf" touch "$1/etc/hosts" touch "$1/etc/gai.conf"