All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Fail to automatically create if-scripts dirs
@ 2010-09-21 13:45 Yegor Yefremov
  0 siblings, 0 replies; only message in thread
From: Yegor Yefremov @ 2010-09-21 13:45 UTC (permalink / raw)
  To: buildroot

For the case of creating devices via mdev/udev I wanted to create those missing dirs in 

output/target/etc/network/

Here is what I'm doing:

Index: b/fs/common.mk
===================================================================
--- a/fs/common.mk	2010-09-21 15:35:52.000000000 +0200
+++ b/fs/common.mk	2010-09-21 15:39:31.000000000 +0200
@@ -33,6 +33,7 @@
 
 FAKEROOT_SCRIPT = $(BUILD_DIR)/_fakeroot.fs
 ROOTFS_DEVICE_TABLE = $(call qstrip,$(BR2_ROOTFS_DEVICE_TABLE))
+NET_DIRS = if-down.d if-post-down.d if-post-down.d if-up.d
 
 define ROOTFS_TARGET_INTERNAL
 
@@ -45,6 +46,10 @@
 	echo "chown -R 0:0 $(TARGET_DIR)" >> $(FAKEROOT_SCRIPT)
 ifneq ($(ROOTFS_DEVICE_TABLE),)
 	echo "$(HOST_DIR)/usr/bin/makedevs -d $(ROOTFS_DEVICE_TABLE) $(TARGET_DIR)" >> $(FAKEROOT_SCRIPT)
+else
+	for i in $(NET_DIRS) ; do \
+		[ -d $(TARGET_DIR)/etc/network/$$i ] || mkdir $(TARGET_DIR)/etc/network/$$i; \
+	done
 endif
 	echo "$(ROOTFS_$(2)_CMD)" >> $(FAKEROOT_SCRIPT)
 	chmod a+x $(FAKEROOT_SCRIPT)

As result the folders will not be created and even if I replace test & mkdir with echo $$i, I can just see 4 blank lines, but $$i doesn't show the value it should. 

What am I doing wrong?

Regards,
Yegor

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-09-21 13:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-21 13:45 [Buildroot] Fail to automatically create if-scripts dirs Yegor Yefremov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.