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
13