summaryrefslogtreecommitdiffstats
path: root/remote/tools/systemd/data
diff options
context:
space:
mode:
authorroot2013-02-12 14:28:02 +0100
committerroot2013-02-12 14:28:02 +0100
commitdc54111382adcf4afc2539d2dc8ac0f822906c9e (patch)
treecca8050a1cc4df12e2a954fa485a9bbd55d3a6ef /remote/tools/systemd/data
parent[base] fix for mounting nfs (diff)
downloadtm-scripts-dc54111382adcf4afc2539d2dc8ac0f822906c9e.tar.gz
tm-scripts-dc54111382adcf4afc2539d2dc8ac0f822906c9e.tar.xz
tm-scripts-dc54111382adcf4afc2539d2dc8ac0f822906c9e.zip
[systemd] service files for: network interface, udhcpc, nfs mount
Diffstat (limited to 'remote/tools/systemd/data')
-rw-r--r--remote/tools/systemd/data/etc/systemd/system/network-interface@.service8
-rw-r--r--remote/tools/systemd/data/etc/systemd/system/network@.service14
-rw-r--r--remote/tools/systemd/data/etc/systemd/system/openslx-mnt.mount8
-rw-r--r--remote/tools/systemd/data/etc/systemd/system/udhcpc@.service9
l---------remote/tools/systemd/data/etc/systemd/system/udhcpc@.service.wants/openslx-mnt.mount1
-rw-r--r--remote/tools/systemd/data/usr/lib/udev/rules.d/99-systemd.rules2
6 files changed, 27 insertions, 15 deletions
diff --git a/remote/tools/systemd/data/etc/systemd/system/network-interface@.service b/remote/tools/systemd/data/etc/systemd/system/network-interface@.service
new file mode 100644
index 00000000..b3c67d09
--- /dev/null
+++ b/remote/tools/systemd/data/etc/systemd/system/network-interface@.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Brings interface %i up
+Wants=udhcpc@%i.service
+Before=udhcpc@%i.service
+
+[Service]
+Type=simple
+ExecStart=/openslx/bin/ip link set dev %I up
diff --git a/remote/tools/systemd/data/etc/systemd/system/network@.service b/remote/tools/systemd/data/etc/systemd/system/network@.service
deleted file mode 100644
index db8169c1..00000000
--- a/remote/tools/systemd/data/etc/systemd/system/network@.service
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=Setup Network Connection
-Wants=network.target
-Before=network.target
-
-[Service]
-Type=oneshot
-RemainAfterExit=yes
-ExecStart=/openslx/bin/ip link set dev %I up
-# We should have our own extended udhcpc script here (see stuff in ip-dns-conf)
-ExecStart=/openslx/sbin/udhcpc -O domain -O nissrv -O nisdomain -t 8 -s /etc/udhcpc.default.script -i %I
-
-[Install]
-WantedBy=multi-user.target
diff --git a/remote/tools/systemd/data/etc/systemd/system/openslx-mnt.mount b/remote/tools/systemd/data/etc/systemd/system/openslx-mnt.mount
new file mode 100644
index 00000000..995f123f
--- /dev/null
+++ b/remote/tools/systemd/data/etc/systemd/system/openslx-mnt.mount
@@ -0,0 +1,8 @@
+[Unit]
+Description=Mount NFS Share [TEST]
+
+[Mount]
+What=132.230.4.6:/srv/openslx/export/nfs/ubuntu-12.04-test
+Where=/openslx/mnt
+Type=nfs
+Options=ro,async,nolock
diff --git a/remote/tools/systemd/data/etc/systemd/system/udhcpc@.service b/remote/tools/systemd/data/etc/systemd/system/udhcpc@.service
new file mode 100644
index 00000000..6c5c289b
--- /dev/null
+++ b/remote/tools/systemd/data/etc/systemd/system/udhcpc@.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=DHCP Client
+
+[Service]
+Type=simple
+ExecStart=/openslx/sbin/udhcpc -O domain -O nissrv -O nisdomain -t 8 -s /etc/udhcpc.default.script -i %I
+
+[Install]
+WantedBy=multi-user.target
diff --git a/remote/tools/systemd/data/etc/systemd/system/udhcpc@.service.wants/openslx-mnt.mount b/remote/tools/systemd/data/etc/systemd/system/udhcpc@.service.wants/openslx-mnt.mount
new file mode 120000
index 00000000..70ba668d
--- /dev/null
+++ b/remote/tools/systemd/data/etc/systemd/system/udhcpc@.service.wants/openslx-mnt.mount
@@ -0,0 +1 @@
+../openslx-mnt.mount \ No newline at end of file
diff --git a/remote/tools/systemd/data/usr/lib/udev/rules.d/99-systemd.rules b/remote/tools/systemd/data/usr/lib/udev/rules.d/99-systemd.rules
index 52377d1f..387a5754 100644
--- a/remote/tools/systemd/data/usr/lib/udev/rules.d/99-systemd.rules
+++ b/remote/tools/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!="lo", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/sys/subsystem/net/devices/$name", ENV{SYSTEMD_WANTS}="network@$name.service"
+SUBSYSTEM=="net", KERNEL!="lo", 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"