summaryrefslogtreecommitdiff
path: root/unmaintained/strata/openstack-services/open-iscsi.morph
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2016-10-31 15:35:03 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2016-11-11 17:36:41 +0900
commit82d358156d80fabb06702023178445ec90b7ada9 (patch)
treeb6783c139d95c608dc7bf1ce85e5a213a4397cf4 /unmaintained/strata/openstack-services/open-iscsi.morph
parentec458e22d52b15458636a1f550e55e92a4fee962 (diff)
downloaddefinitions-82d358156d80fabb06702023178445ec90b7ada9.tar.gz
Moving unmaintained systems, clusters and their strata to unmaintained directory
This includes ceph, chef, cxmanage, java, openstack, nodejs, ocaml, qt4, qt5 (system only, qt5 is used by ivi projects), swift, web, xfce and zookeeper systems. All strata which is referred to exclusively by systems and clusters in the unmaintained directory have also been moved to the unmaintained directory. Change-Id: If60b0fa8bc1d7f9c53137fa7106b396668682a9a
Diffstat (limited to 'unmaintained/strata/openstack-services/open-iscsi.morph')
-rw-r--r--unmaintained/strata/openstack-services/open-iscsi.morph46
1 files changed, 46 insertions, 0 deletions
diff --git a/unmaintained/strata/openstack-services/open-iscsi.morph b/unmaintained/strata/openstack-services/open-iscsi.morph
new file mode 100644
index 00000000..6a0b73b3
--- /dev/null
+++ b/unmaintained/strata/openstack-services/open-iscsi.morph
@@ -0,0 +1,46 @@
+name: open-iscsi
+kind: chunk
+build-commands:
+- make
+install-commands:
+# Rewrite prefix and exec_prefix which are set to "/usr" and "/" respectively
+- make prefix="$PREFIX" exec_prefix="$PREFIX" DESTDIR="$DESTDIR" install
+# Install iscsistart app which is not listed by default in PROGRAMS
+- make prefix="$PREFIX" exec_prefix="$PREFIX" DESTDIR="$DESTDIR" PROGRAMS="usr/iscsistart"
+ install
+post-install-commands:
+# Configure iscsi daemon
+# Point the startup to the installed binary
+- |
+ sed -i -e "s|iscsid.startup = \/sbin\/iscsid|iscsid.startup = "$PREFIX"/sbin/iscsid|" \
+ etc/iscsid.conf
+# Start up a session automatically
+- sed -i -e 's|node.startup = manual|node.startup = automatic|' etc/iscsid.conf
+# Install config file
+- install -D -m 644 etc/iscsid.conf "$DESTDIR"/etc/iscsi
+# Install custom systemd unit file
+- |
+ install -D -m 644 /proc/self/fd/0 << 'EOF' "$DESTDIR$PREFIX"/lib/systemd/system/iscsid.service
+ [Unit]
+ Description=Open iSCSI Daemon
+ After=network.target
+
+ [Service]
+ Type=forking
+ ExecStart=/usr/sbin/iscsid
+
+ [Install]
+ WantedBy=multi-user.target
+ EOF
+# Install iscsi socket unit
+- |
+ install -D -m 644 /proc/self/fd/0 << 'EOF' "$DESTDIR$PREFIX"/lib/systemd/system/iscsid.socket
+ [Unit]
+ Description=Open-iSCSI iscsid Socket
+
+ [Socket]
+ ListenStream=@ISCSIADM_ABSTRACT_NAMESPACE
+
+ [Install]
+ WantedBy=sockets.target
+ EOF