summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--systemd/netcfg.service13
-rw-r--r--systemd/netcfg@.service12
3 files changed, 26 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 5c26d35..ddddbe8 100644
--- a/Makefile
+++ b/Makefile
@@ -35,8 +35,7 @@ install: install-docs
$(DESTDIR)/etc/rc.d/
install -d $(DESTDIR)/usr/lib/systemd/system
install -m644 \
- systemd/net-auto-wireless.service \
- systemd/net-auto-wired.service \
+ systemd/*.service \
$(DESTDIR)/usr/lib/systemd/system/
install-docs: docs
diff --git a/systemd/netcfg.service b/systemd/netcfg.service
new file mode 100644
index 0000000..d61d902
--- /dev/null
+++ b/systemd/netcfg.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Netcfg multi-profile daemon
+Before=network.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+EnvironmentFile=/etc/conf.d/netcfg
+ExecStart=/usr/bin/netcfg-daemon start
+ExecStop=/usr/bin/netcfg-daemon stop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/systemd/netcfg@.service b/systemd/netcfg@.service
new file mode 100644
index 0000000..5c0619d
--- /dev/null
+++ b/systemd/netcfg@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Netcfg profile based networking service
+Before=network.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/bin/netcfg check-iface %i
+ExecStop=-/usr/bin/netcfg down %i
+
+[Install]
+WantedBy=multi-user.target