For packaging, it's very useful to to check for /etc/iscsi/initiatorname.iscsi in the real
filesystem but if we have to generate a new one, this should be done inside DESTDIR and not
in the real filesystem as we might be in a sandboxed environment without being able to
write anywhere else.
---
Makefile | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 9b22b7c..7bd1e2f 100644
--- a/Makefile
+++ b/Makefile
@@ -123,9 +123,9 @@ install_kernel:
install_iname:
if [ ! -f /etc/iscsi/initiatorname.iscsi ]; then \
- echo "InitiatorName=`/sbin/iscsi-iname`" > /etc/iscsi/initiatorname.iscsi ; \
+ echo "InitiatorName=`$(DESTDIR)/sbin/iscsi-iname`" > $(DESTDIR)/etc/iscsi/initiatorname.iscsi ; \
echo "***************************************************" ; \
- echo "Setting InitiatorName to `cat /etc/iscsi/initiatorname.iscsi`" ; \
+ echo "Setting InitiatorName to `cat $(DESTDIR)/etc/iscsi/initiatorname.iscsi`" ; \
echo "To override edit /etc/iscsi/initiatorname.iscsi" ; \
echo "***************************************************" ; \
fi
--
1.6.5.7
Looks ok to me. Thanks, and sorry for the reply. Merged in commit
2bca7ca86cd7b2743a4611ba89c3963b8fddbd02.