[PATCH] Use DESTDIR when generating an InitiatorName.

17 views
Skip to first unread message

phila...@exherbo.org

unread,
Dec 21, 2009, 3:55:52 PM12/21/09
to open-...@googlegroups.com, Wulf C. Krueger
From: Wulf C. Krueger <phila...@exherbo.org>

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

Mike Christie

unread,
Jan 6, 2010, 1:37:40 PM1/6/10
to open-...@googlegroups.com, phila...@exherbo.org

Looks ok to me. Thanks, and sorry for the reply. Merged in commit
2bca7ca86cd7b2743a4611ba89c3963b8fddbd02.

Reply all
Reply to author
Forward
0 new messages