summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorLee Duncan <lduncan@suse.com>2021-10-28 09:15:37 -0700
committerLee Duncan <lduncan@suse.com>2021-10-28 09:15:37 -0700
commita5f09ce5855d448d14148dfe46ce595bfb18cea8 (patch)
treec39c0d5d67cd4522dc19aa039af4b82a0fe436d2 /utils
parent4353670c281ccd4dd1c028be8c806797580ecd66 (diff)
downloadopen-iscsi-a5f09ce5855d448d14148dfe46ce595bfb18cea8.tar.gz
Finish ability to have binary location configurable.
A Recent commit, fff82c57f5df ("Use "sbindir" for path in systemd service files") added the ability to have our binaries in another location rather than /sbin (e.g. /usr/sbin), but it was incomplete. This commit finishes the job. Fixes: fff82c57f5dfe6d3db795f1195b4d2ebc497d33c
Diffstat (limited to 'utils')
-rw-r--r--utils/50-iscsi-firmware-login.rules2
-rwxr-xr-xutils/iscsi-gen-initiatorname10
-rw-r--r--utils/iscsi_fw_login2
3 files changed, 7 insertions, 7 deletions
diff --git a/utils/50-iscsi-firmware-login.rules b/utils/50-iscsi-firmware-login.rules
index 47b3cf9..9fa1e7d 100644
--- a/utils/50-iscsi-firmware-login.rules
+++ b/utils/50-iscsi-firmware-login.rules
@@ -12,4 +12,4 @@
# having it as one single line avoids those problems.
#
# DO NOT WRAP THIS LINE
-SUBSYSTEM=="iscsi_boot*", ACTION=="add", DEVPATH=="*/target*", RUN+="/sbin/iscsi_fw_login"
+SUBSYSTEM=="iscsi_boot*", ACTION=="add", DEVPATH=="*/target*", RUN+="@SBINDIR@/iscsi_fw_login"
diff --git a/utils/iscsi-gen-initiatorname b/utils/iscsi-gen-initiatorname
index 88bd43b..3e30465 100755
--- a/utils/iscsi-gen-initiatorname
+++ b/utils/iscsi-gen-initiatorname
@@ -1,10 +1,10 @@
#!/bin/bash
#
-# /sbin/iscsi-gen-initiatorname
+# iscsi-gen-initiatorname
#
# Generate a default iSCSI Initiatorname for SUSE installations.
#
-# Copyright (c) 2011 Hannes Reinecke, SUSE Labs
+# Copyright (c) 2021 Hannes Reinecke, SUSE Labs
# This script is licensed under the GPL.
#
@@ -27,7 +27,7 @@ if [ -f /etc/iscsi/initiatorname.iscsi -a -z "$FORCE" ] ; then
eval $(cat /etc/iscsi/initiatorname.iscsi | sed -e '/^#/d')
if [ "$iSCSI_INITIATOR_NAME" != "$InitiatorName" ] ; then
echo "iSCSI Initiatorname from iBFT is different from the current setting."
- echo "Please call '/sbin/iscsi-gen-initiatorname -f' to update the iSCSI Initiatorname."
+ echo "Please call '@SBINDIR@/iscsi-gen-initiatorname -f' to update the iSCSI Initiatorname."
exit 1
fi
fi
@@ -45,7 +45,7 @@ if [ "$iSCSI_INITIATOR_NAME" ] ; then
## Any change here will not be reflected to the iBFT BIOS tables.
## If a different initiatorname is required please change the
## initiatorname in the BIOS setup and call
-## /sbin/iscsi-gen-initiatorname -f
+## @SBINDIR@/iscsi-gen-initiatorname -f
## to recreate an updated version of this file.
##
InitiatorName=$iSCSI_INITIATOR_NAME
@@ -66,7 +66,7 @@ if [ ! -f /etc/iscsi/initiatorname.iscsi ] ; then
## for each iSCSI initiator. Do NOT duplicate iSCSI InitiatorNames.
EOF
ISSUEDATE="1996-04"
- INAME=$(/sbin/iscsi-iname -p iqn.$ISSUEDATE.de.suse:01)
+ INAME=$(@SBINDIR@/iscsi-iname -p iqn.$ISSUEDATE.de.suse:01)
printf "InitiatorName=$INAME\n" >>/etc/iscsi/initiatorname.iscsi
chmod 0600 /etc/iscsi/initiatorname.iscsi
fi
diff --git a/utils/iscsi_fw_login b/utils/iscsi_fw_login
index 1312ed3..aae9e4c 100644
--- a/utils/iscsi_fw_login
+++ b/utils/iscsi_fw_login
@@ -7,6 +7,6 @@
#
ARGS="-m fw -l"
-ISCSIADM="/sbin/iscsiadm"
+ISCSIADM="@SBINDIR@/iscsiadm"
$ISCSIADM $ARGS