summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/set_initiatorname
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/set_initiatorname')
-rw-r--r--meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/set_initiatorname12
1 files changed, 12 insertions, 0 deletions
diff --git a/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/set_initiatorname b/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/set_initiatorname
new file mode 100644
index 000000000..a196c6b79
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/set_initiatorname
@@ -0,0 +1,12 @@
+#!/bin/sh
+if [ ! -f /etc/iscsi/initiatorname.iscsi ]; then
+ INITIATORNAME=$(iscsi-iname)
+ cat >/etc/iscsi/initiatorname.iscsi <<EOF
+## DO NOT EDIT OR REMOVE THIS FILE!
+## If you remove this file, the iSCSI daemon will not start.
+## If you change the InitiatorName, existing access control lists
+## may reject this initiator. The InitiatorName must be unique
+## for each iSCSI initiator. Do NOT duplicate iSCSI InitiatorNames.
+InitiatorName=$INITIATORNAME
+EOF
+fi
OpenPOWER on IntegriCloud