diff options
author | Lee Duncan <lduncan@suse.com> | 2021-12-03 10:06:54 -0800 |
---|---|---|
committer | Lee Duncan <lduncan@suse.com> | 2021-12-03 10:06:54 -0800 |
commit | ad7c5d6b5ccadb122662961e5316eadebbe4f4a4 (patch) | |
tree | 8d84cb12e4868728c4e884f66a295fc78539939e /utils | |
parent | 6a631b538c721bbadd2889d3bc609c0e172aeced (diff) | |
download | open-iscsi-ad7c5d6b5ccadb122662961e5316eadebbe4f4a4.tar.gz |
change iscsi-gen-initiatorname option -b => -p
This matches with iscsi-iname, which already exists and is
used by this script.
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/iscsi-gen-initiatorname | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/iscsi-gen-initiatorname b/utils/iscsi-gen-initiatorname index a375968..e182f8a 100755 --- a/utils/iscsi-gen-initiatorname +++ b/utils/iscsi-gen-initiatorname @@ -10,7 +10,7 @@ NAME="$0" INAME_FILE="/etc/iscsi/initiatorname.iscsi" -IQN_BASE="iqn.1996-04.de.suse:01" +IQN_PREFIX="iqn.1996-04.de.suse:01" usage_and_exit() { @@ -20,15 +20,15 @@ usage_and_exit() echo "Where OPTIONS are from:" echo " -h print usage and exit" echo " -f overwrite existing initiator name, if any" - echo " -b IQN-BASE use IQN-BASE for the IQN generated (default $IQN_BASE)" + echo " -p IQN-PRE set the prefix for the IQN generated (default $IQN_PREFIX)" exit $xit_val } -while getopts "hfb:" o ; do +while getopts "hfp:" o ; do case "${o}" in h) usage_and_exit 0 ;; f) FORCE=1 ;; - b) IQN_BASE=${OPTARG} ;; + p) IQN_PREFIX=${OPTARG} ;; ?) usage_and_exit 1 ;; esac done @@ -94,7 +94,7 @@ if [ ! -f $INAME_FILE ] ; then ## for each iSCSI initiator. Do NOT duplicate iSCSI InitiatorNames. EOF # create a unique initiator name using iscsi-iname - INAME=$(@SBINDIR@/iscsi-iname -p "$IQN_BASE") + INAME=$(@SBINDIR@/iscsi-iname -p "$IQN_PREFIX") echo "InitiatorName=$INAME" >> $INAME_FILE chmod 0600 $INAME_FILE fi |