summaryrefslogtreecommitdiff
path: root/baserock/strata/openstack-services/rtslib-fb.morph
diff options
context:
space:
mode:
authorPaul Sherwood <paul.sherwood@codethink.co.uk>2015-09-25 08:47:49 +0000
committerPaul Sherwood <paul.sherwood@codethink.co.uk>2015-09-26 08:27:41 +0100
commit3a2f641e4e70e76ffa77629c6208970c1a7af667 (patch)
treee6635788976c616017c05b5ea93432f9b2dc769e /baserock/strata/openstack-services/rtslib-fb.morph
parentc844667a718e8640d9ae2b7640a3b0dc0fb53b0e (diff)
downloaddefinitions-3a2f641e4e70e76ffa77629c6208970c1a7af667.tar.gz
Proposed re-org of definitions repobaserock/ps/reorganise-definitions
Diffstat (limited to 'baserock/strata/openstack-services/rtslib-fb.morph')
-rw-r--r--baserock/strata/openstack-services/rtslib-fb.morph27
1 files changed, 27 insertions, 0 deletions
diff --git a/baserock/strata/openstack-services/rtslib-fb.morph b/baserock/strata/openstack-services/rtslib-fb.morph
new file mode 100644
index 00000000..26de3f9b
--- /dev/null
+++ b/baserock/strata/openstack-services/rtslib-fb.morph
@@ -0,0 +1,27 @@
+name: rtslib-fb
+kind: chunk
+build-system: python-distutils
+post-install-commands:
+- mkdir -p "$DESTDIR$PREFIX"/lib/systemd/system
+
+# The following systemd unit is from the fedora package see
+# http://pkgs.fedoraproject.org/cgit/python-rtslib.git/tree/target.service for
+# more information
+
+- |
+ install -D -m 0644 /proc/self/fd/0 <<'EOF' "$DESTDIR$PREFIX"/lib/systemd/system/target.service
+ [Unit]
+ Description=Restore LIO kernel target configuration
+ Requires=sys-kernel-config.mount
+ After=sys-kernel-config.mount network.target local-fs.target
+
+ [Service]
+ Type=oneshot
+ RemainAfterExit=yes
+ ExecStart=/usr/bin/targetctl restore
+ ExecStop=/usr/bin/targetctl clear
+ SyslogIdentifier=target
+
+ [Install]
+ WantedBy=multi-user.target
+ EOF