Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame^] | 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 |