Signed-off-by: Stijn Tintel <[email protected]>
---
config/Config-images.in | 5 +++++
package/base-files/Makefile | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/config/Config-images.in b/config/Config-images.in
index a60dd50..3619256 100644
--- a/config/Config-images.in
+++ b/config/Config-images.in
@@ -312,4 +312,9 @@ menu "Target Images"
Include the device tree blob file(s) in the rootfs. Typically
the DTBs
are placed below /boot.
+ config TARGET_ROOTFS_LN_VAR_TMP
+ bool "Symlink /var to /tmp"
+ default y
+ help
+ Make /var a symlink to /tmp.
endmenu
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 8bb6225..aa7ed34 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -164,8 +164,13 @@ define Package/base-files/install
mkdir -p $(1)/www
mkdir -p $(1)/root
$(LN) /proc/mounts $(1)/etc/mtab
+ifeq ($(CONFIG_TARGET_ROOTFS_LN_VAR_TMP),y)
rm -f $(1)/var
$(LN) /tmp $(1)/var
+else
+ mkdir $(1)/var
+ $(LN) /tmp/run $(1)/var/run
+endif
mkdir -p $(1)/etc
$(LN) /tmp/resolv.conf /tmp/fstab /tmp/TZ /tmp/localtime $(1)/etc/
--
2.7.3
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel