55 lines
1.5 KiB
Diff
55 lines
1.5 KiB
Diff
|
From c34e0bdcbafdb6f9304e1474d51fe1c789c5dea2 Mon Sep 17 00:00:00 2001
|
||
|
From: Tomasz Torcz <tomek@pipebreaker.pl>
|
||
|
Date: Wed, 28 Nov 2012 13:37:08 +0100
|
||
|
Subject: iscsid: add example unit files for systemd
|
||
|
MIME-Version: 1.0
|
||
|
Content-Type: text/plain; charset=UTF-8
|
||
|
Content-Transfer-Encoding: 8bit
|
||
|
|
||
|
Those two units, based on the work by Jóhann B. Guðmundsson, exploit
|
||
|
on-demand socket activation in iscsid.
|
||
|
---
|
||
|
etc/systemd/iscsid.service | 13 +++++++++++++
|
||
|
etc/systemd/iscsid.socket | 9 +++++++++
|
||
|
2 files changed, 22 insertions(+)
|
||
|
create mode 100644 etc/systemd/iscsid.service
|
||
|
create mode 100644 etc/systemd/iscsid.socket
|
||
|
|
||
|
diff --git a/etc/systemd/iscsid.service b/etc/systemd/iscsid.service
|
||
|
new file mode 100644
|
||
|
index 0000000..028e0b3
|
||
|
--- /dev/null
|
||
|
+++ b/etc/systemd/iscsid.service
|
||
|
@@ -0,0 +1,13 @@
|
||
|
+[Unit]
|
||
|
+Description=Open-iSCSI
|
||
|
+Documentation=man:iscsid(8) man:iscsiuio(8) man:iscsiadm(8)
|
||
|
+After=network.target NetworkManager-wait-online.service iscsiuio.service tgtd.service targetcli.service
|
||
|
+
|
||
|
+[Service]
|
||
|
+Type=forking
|
||
|
+PIDFile=/var/run/iscsid.pid
|
||
|
+ExecStart=/usr/sbin/iscsid
|
||
|
+ExecStop=/sbin/iscsiadm -k 0 2
|
||
|
+
|
||
|
+[Install]
|
||
|
+WantedBy=multi-user.target
|
||
|
diff --git a/etc/systemd/iscsid.socket b/etc/systemd/iscsid.socket
|
||
|
new file mode 100644
|
||
|
index 0000000..832451d
|
||
|
--- /dev/null
|
||
|
+++ b/etc/systemd/iscsid.socket
|
||
|
@@ -0,0 +1,9 @@
|
||
|
+[Unit]
|
||
|
+Description=Open-iSCSI iscsid Socket
|
||
|
+Documentation=man:iscsid(8) man:iscsiuio(8) man:iscsiadm(8)
|
||
|
+
|
||
|
+[Socket]
|
||
|
+ListenStream=@ISCSIADM_ABSTRACT_NAMESPACE
|
||
|
+
|
||
|
+[Install]
|
||
|
+WantedBy=sockets.target
|
||
|
--
|
||
|
1.7.11.7
|
||
|
|