summaryrefslogtreecommitdiffstats
path: root/remote
diff options
context:
space:
mode:
authorSimon Rettberg2014-01-13 18:46:44 +0100
committerSimon Rettberg2014-01-13 18:46:44 +0100
commit2c5d9da396bd174a07846b7e24bc6cfcaf2aa824 (patch)
treef6896bce99431d83a579986fed08c4676f7bb5e0 /remote
parent[systemd] update udev rule for systemd: only start dhcp on br0 (diff)
downloadtm-scripts-2c5d9da396bd174a07846b7e24bc6cfcaf2aa824.tar.gz
tm-scripts-2c5d9da396bd174a07846b7e24bc6cfcaf2aa824.tar.xz
tm-scripts-2c5d9da396bd174a07846b7e24bc6cfcaf2aa824.zip
<system startup> rework dhcp request: try to get an address (and dns/hostname earlier)
Diffstat (limited to 'remote')
l---------remote/modules/sshd/data/etc/systemd/system/network.target.wants/sshd.service1
-rw-r--r--remote/modules/systemd/data/etc/systemd/system/network-interface@.service2
l---------remote/modules/systemd/data/etc/systemd/system/sysinit.target.wants/udhcpc@br0.service1
-rw-r--r--remote/modules/systemd/data/etc/systemd/system/udhcpc@.service2
-rw-r--r--remote/modules/systemd/data/usr/lib/udev/rules.d/99-systemd.rules4
5 files changed, 7 insertions, 3 deletions
diff --git a/remote/modules/sshd/data/etc/systemd/system/network.target.wants/sshd.service b/remote/modules/sshd/data/etc/systemd/system/network.target.wants/sshd.service
new file mode 120000
index 00000000..d41264ec
--- /dev/null
+++ b/remote/modules/sshd/data/etc/systemd/system/network.target.wants/sshd.service
@@ -0,0 +1 @@
+../sshd.service \ No newline at end of file
diff --git a/remote/modules/systemd/data/etc/systemd/system/network-interface@.service b/remote/modules/systemd/data/etc/systemd/system/network-interface@.service
index 77bbd287..73cc6239 100644
--- a/remote/modules/systemd/data/etc/systemd/system/network-interface@.service
+++ b/remote/modules/systemd/data/etc/systemd/system/network-interface@.service
@@ -1,6 +1,6 @@
[Unit]
Description=Brings interface %i up
-Wants=udhcpc@%i.service sshd.service
+Wants=udhcpc@%i.service
Before=udhcpc@%i.service
[Service]
diff --git a/remote/modules/systemd/data/etc/systemd/system/sysinit.target.wants/udhcpc@br0.service b/remote/modules/systemd/data/etc/systemd/system/sysinit.target.wants/udhcpc@br0.service
new file mode 120000
index 00000000..dff66b14
--- /dev/null
+++ b/remote/modules/systemd/data/etc/systemd/system/sysinit.target.wants/udhcpc@br0.service
@@ -0,0 +1 @@
+../udhcpc@.service \ No newline at end of file
diff --git a/remote/modules/systemd/data/etc/systemd/system/udhcpc@.service b/remote/modules/systemd/data/etc/systemd/system/udhcpc@.service
index 0b198476..6547de5b 100644
--- a/remote/modules/systemd/data/etc/systemd/system/udhcpc@.service
+++ b/remote/modules/systemd/data/etc/systemd/system/udhcpc@.service
@@ -1,5 +1,7 @@
[Unit]
Description=DHCP Client
+DefaultDependencies=no
+Before=sysinit.target
[Service]
Type=forking
diff --git a/remote/modules/systemd/data/usr/lib/udev/rules.d/99-systemd.rules b/remote/modules/systemd/data/usr/lib/udev/rules.d/99-systemd.rules
index 8c54da70..c148de7a 100644
--- a/remote/modules/systemd/data/usr/lib/udev/rules.d/99-systemd.rules
+++ b/remote/modules/systemd/data/usr/lib/udev/rules.d/99-systemd.rules
@@ -31,7 +31,7 @@ SUBSYSTEM=="block", KERNEL!="ram*|loop*", ENV{DM_UUID}=="CRYPT-*", ENV{ID_PART_T
#
# http://git.kernel.org/?p=linux/hotplug/udev.git;a=blob;f=libudev/libudev-enumerate.c;h=da831449dcaf5e936a14409e8e68ab12d30a98e2;hb=HEAD#l742
-SUBSYSTEM=="net", KERNEL=="br0", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/sys/subsystem/net/devices/$name", ENV{SYSTEMD_WANTS}="network-interface@$name.service"
+#SUBSYSTEM=="net", KERNEL=="eth*", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/sys/subsystem/net/devices/$name", ENV{SYSTEMD_WANTS}="network-interface@$name.service"
SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/sys/subsystem/bluetooth/devices/%k"
SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_WANTS}="bluetooth.target"
@@ -44,7 +44,7 @@ SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:
# Apply sysctl variables to network devices (and only to those) as they appear.
-SUBSYSTEM=="net", KERNEL=="br0", RUN+="/usr/lib/systemd/systemd-sysctl --prefix=/proc/sys/net/ipv4/conf/$name --prefix=/proc/sys/net/ipv4/neigh/$name --prefix=/proc/sys/net/ipv6/conf/$name --prefix=/proc/sys/net/ipv6/neigh/$name"
+#SUBSYSTEM=="net", KERNEL=="eth*", RUN+="/usr/lib/systemd/systemd-sysctl --prefix=/proc/sys/net/ipv4/conf/$name --prefix=/proc/sys/net/ipv4/neigh/$name --prefix=/proc/sys/net/ipv6/conf/$name --prefix=/proc/sys/net/ipv6/neigh/$name"
# Asynchronously mount file systems implemented by these modules as
# soon as they are loaded.