Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] Fix dhcp symlink in target/var/lib/dhcp
@ 2016-09-28 16:07 Root, Build
  2016-10-05 23:20 ` Arnout Vandecappelle
  0 siblings, 1 reply; 6+ messages in thread
From: Root, Build @ 2016-09-28 16:07 UTC (permalink / raw)
  To: buildroot

The symlink was to /tmp causing an error on the target install step:
rsync: chgrp "/<path>/output/target/var/lib/dhcp" failed: Operation
not permitted

Changing the symlink to "../../tmp" rather than "/tmp" references the
target's /tmp directory rather than the build machine's /tmp directory.

Signed-off-by: Gerald Van Baren <jerry@vibrationresearch.com>
---
 package/dhcp/dhcp.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/dhcp/dhcp.mk b/package/dhcp/dhcp.mk
index 5cb6043..80c984b 100644
--- a/package/dhcp/dhcp.mk
+++ b/package/dhcp/dhcp.mk
@@ -56,7 +56,7 @@ endif
 ifeq ($(BR2_PACKAGE_DHCP_SERVER),y)
 define DHCP_INSTALL_SERVER
        mkdir -p $(TARGET_DIR)/var/lib
-       (cd $(TARGET_DIR)/var/lib; ln -snf /tmp dhcp)
+       (cd $(TARGET_DIR)/var/lib; ln -snf ../../tmp dhcp)
        $(INSTALL) -m 0755 -D $(@D)/server/dhcpd $(TARGET_DIR)/usr/sbin/dhcpd
        $(INSTALL) -m 0644 -D package/dhcp/dhcpd.conf \
                $(TARGET_DIR)/etc/dhcp/dhcpd.conf
@@ -66,7 +66,7 @@ endif
 ifeq ($(BR2_PACKAGE_DHCP_RELAY),y)
 define DHCP_INSTALL_RELAY
        mkdir -p $(TARGET_DIR)/var/lib
-       (cd $(TARGET_DIR)/var/lib; ln -snf /tmp dhcp)
+       (cd $(TARGET_DIR)/var/lib; ln -snf ../../tmp dhcp)
        $(INSTALL) -m 0755 -D $(DHCP_DIR)/relay/dhcrelay \
                $(TARGET_DIR)/usr/sbin/dhcrelay
 endef
@@ -75,7 +75,7 @@ endif
 ifeq ($(BR2_PACKAGE_DHCP_CLIENT),y)
 define DHCP_INSTALL_CLIENT
        mkdir -p $(TARGET_DIR)/var/lib
-       (cd $(TARGET_DIR)/var/lib; ln -snf /tmp dhcp)
+       (cd $(TARGET_DIR)/var/lib; ln -snf ../../tmp dhcp)
        $(INSTALL) -m 0755 -D $(DHCP_DIR)/client/dhclient \
                $(TARGET_DIR)/sbin/dhclient
        $(INSTALL) -m 0644 -D package/dhcp/dhclient.conf \
--
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-10-24 21:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-28 16:07 [Buildroot] [PATCH] Fix dhcp symlink in target/var/lib/dhcp Root, Build
2016-10-05 23:20 ` Arnout Vandecappelle
2016-10-06 17:38   ` Jerry Van Baren
2016-10-06 19:22     ` Arnout Vandecappelle
2016-10-06 21:02       ` Jerry Van Baren
2016-10-24 21:01   ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox