OSDN Git Service

New services: dhcpcd_ns, dhcpcd_ns@
authormobinmob <mobinmob@disroot.org>
Tue, 4 May 2021 21:25:48 +0000 (00:25 +0300)
committermobinmob <mobinmob@disroot.org>
Tue, 4 May 2021 21:25:48 +0000 (00:25 +0300)
- dhcpcd and dhcpcd@ services enhances with 66-ns (pid namespace)
- the original services remain since 66-ns does not provide -yet-
restart if the service crashes.

usr/share/66/service/dhcpcd_ns [new file with mode: 0644]
usr/share/66/service/dhcpcd_ns@ [new file with mode: 0644]

diff --git a/usr/share/66/service/dhcpcd_ns b/usr/share/66/service/dhcpcd_ns
new file mode 100644 (file)
index 0000000..7588964
--- /dev/null
@@ -0,0 +1,13 @@
+[main]
+@type = classic
+@version = 0.0.1
+@description = "dhcpcd daemon"
+@user = ( root )
+
+[start]
+@execute = ( execl-cmdline -s { 66-ns -o unshare=pid dhcpcd ${cmd_args} } )
+
+[environment]
+# -j sends the logs to a logfile for the per-service logger. Please consult
+# dhcpcd(8) for more options/switches.
+cmd_args=!-M -j /dev/stderr
diff --git a/usr/share/66/service/dhcpcd_ns@ b/usr/share/66/service/dhcpcd_ns@
new file mode 100644 (file)
index 0000000..bd74e54
--- /dev/null
@@ -0,0 +1,14 @@
+# The service takes the network interface device name as @I - e.g. dhcpcd@wlp0s18f2u5
+[main]
+@type = classic
+@version = 0.0.1
+@description = "dhcpcd daemon for @I"
+@user = ( root )
+
+[start]
+@execute = ( execl-cmdline -s { 66-ns -o unshare=pid dhcpcd -B @I ${cmd_args} } )
+
+[environment]
+# -j sends log to a logfile for the per-service logger. For more options/switches
+# please see dhcpcd(8).
+cmd_args=!-j /dev/stderr