summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons/iscsi-initiator-utils/files
diff options
context:
space:
mode:
authorQi.Chen@windriver.com <Qi.Chen@windriver.com>2016-10-31 10:05:11 +0800
committerJoe MacDonald <joe_macdonald@mentor.com>2016-11-14 10:07:27 -0500
commit816c723aa5b4c106dcc37815a5691173f9f02af1 (patch)
treeaecf7f530059e8dfe879917d13c29ae6f802484b /meta-networking/recipes-daemons/iscsi-initiator-utils/files
parent06d15756bd6f77da57f527f08c9f2a3227acb3e9 (diff)
downloadmeta-openembedded-816c723aa5b4c106dcc37815a5691173f9f02af1.tar.gz
iscsi-initiator-utils: fix postinstall and systemd service file
Fix postinstall and systemd service file so that the postinstall script does not fail at rootfs time. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-daemons/iscsi-initiator-utils/files')
-rw-r--r--meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator.service1
-rw-r--r--meta-networking/recipes-daemons/iscsi-initiator-utils/files/set_initiatorname12
2 files changed, 13 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator.service b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator.service
index b1397513b..3790daebd 100644
--- a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator.service
+++ b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator.service
@@ -5,6 +5,7 @@ After=syslog.target
5[Service] 5[Service]
6EnvironmentFile=/etc/default/iscsi-initiator 6EnvironmentFile=/etc/default/iscsi-initiator
7ExecStartPre=/sbin/modprobe iscsi_tcp 7ExecStartPre=/sbin/modprobe iscsi_tcp
8ExecStartPre=/usr/lib/iscsi/set_initiatorname
8ExecStart=/usr/sbin/iscsid -f $OPTS_ISCSID 9ExecStart=/usr/sbin/iscsid -f $OPTS_ISCSID
9 10
10[Install] 11[Install]
diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/set_initiatorname b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/set_initiatorname
new file mode 100644
index 000000000..a196c6b79
--- /dev/null
+++ b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/set_initiatorname
@@ -0,0 +1,12 @@
1#!/bin/sh
2if [ ! -f /etc/iscsi/initiatorname.iscsi ]; then
3 INITIATORNAME=$(iscsi-iname)
4 cat >/etc/iscsi/initiatorname.iscsi <<EOF
5## DO NOT EDIT OR REMOVE THIS FILE!
6## If you remove this file, the iSCSI daemon will not start.
7## If you change the InitiatorName, existing access control lists
8## may reject this initiator. The InitiatorName must be unique
9## for each iSCSI initiator. Do NOT duplicate iSCSI InitiatorNames.
10InitiatorName=$INITIATORNAME
11EOF
12fi