summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorLee Duncan <lduncan@suse.com>2019-05-14 11:18:40 -0700
committerLee Duncan <lduncan@suse.com>2019-05-14 11:18:40 -0700
commitc1870ae6dddb7bc2dbdc750df68edbbe1a80763f (patch)
treee2bb1d656a9864e3945a025e8b0a7a7cab226afa /etc
parent1aa16e914eec3c97210a93dfab25b194e56a8298 (diff)
downloadopen-iscsi-c1870ae6dddb7bc2dbdc750df68edbbe1a80763f.tar.gz
Add systemd support for iscsiuio
Add in example socket and service files for iscsiuio, such that it can socket-activated, as is iscsid. Also, update main in iscsiuio to use sd_notify() when it is ready for business. All of the systemd code can be skipped if NO_SYSTEMD is defined when building.
Diffstat (limited to 'etc')
-rw-r--r--etc/systemd/iscsiuio.service19
-rw-r--r--etc/systemd/iscsiuio.socket9
2 files changed, 28 insertions, 0 deletions
diff --git a/etc/systemd/iscsiuio.service b/etc/systemd/iscsiuio.service
new file mode 100644
index 0000000..e4d9fd0
--- /dev/null
+++ b/etc/systemd/iscsiuio.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=iSCSI UserSpace I/O driver
+Documentation=man:iscsiuio(8)
+DefaultDependencies=no
+Conflicts=shutdown.target
+Requires=iscsid.service
+BindTo=iscsid.service
+After=network.target
+Before=remote-fs-pre.target iscsid.service
+
+[Service]
+Type=notify
+NotifyAccess=main
+ExecStart=/sbin/iscsiuio -f
+KillMode=mixed
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
diff --git a/etc/systemd/iscsiuio.socket b/etc/systemd/iscsiuio.socket
new file mode 100644
index 0000000..d42cedc
--- /dev/null
+++ b/etc/systemd/iscsiuio.socket
@@ -0,0 +1,9 @@
+[Unit]
+Description=Open-iSCSI iscsiuio Socket
+Documentation=man:iscsiuio(8)
+
+[Socket]
+ListenStream=@ISCSID_UIP_ABSTRACT_NAMESPACE
+
+[Install]
+WantedBy=sockets.target