diff options
author | Qi.Chen@windriver.com <Qi.Chen@windriver.com> | 2016-10-31 10:05:11 +0800 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2016-11-14 10:07:27 -0500 |
commit | 816c723aa5b4c106dcc37815a5691173f9f02af1 (patch) | |
tree | aecf7f530059e8dfe879917d13c29ae6f802484b /meta-networking/recipes-daemons/iscsi-initiator-utils/files | |
parent | 06d15756bd6f77da57f527f08c9f2a3227acb3e9 (diff) | |
download | meta-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.service | 1 | ||||
-rw-r--r-- | meta-networking/recipes-daemons/iscsi-initiator-utils/files/set_initiatorname | 12 |
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] |
6 | EnvironmentFile=/etc/default/iscsi-initiator | 6 | EnvironmentFile=/etc/default/iscsi-initiator |
7 | ExecStartPre=/sbin/modprobe iscsi_tcp | 7 | ExecStartPre=/sbin/modprobe iscsi_tcp |
8 | ExecStartPre=/usr/lib/iscsi/set_initiatorname | ||
8 | ExecStart=/usr/sbin/iscsid -f $OPTS_ISCSID | 9 | ExecStart=/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 | ||
2 | if [ ! -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. | ||
10 | InitiatorName=$INITIATORNAME | ||
11 | EOF | ||
12 | fi | ||