bug in base-files: add option to make /var persistent ?

e9hack e9hack at gmail.com
Mon Aug 23 00:22:56 PDT 2021


Hi,

I didn't select 'make /var persistent' but /var is generated persistent. I think in the Makefile the test for CONFIG_TARGET_ROOTFS_PERSIST_VAR = n must be changed to y (or empty).

--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -181,12 +181,12 @@ define Package/base-files/install
  	mkdir -p $(1)/www
  	mkdir -p $(1)/root
  	$(LN) /proc/mounts $(1)/etc/mtab
-ifeq ($(CONFIG_TARGET_ROOTFS_PERSIST_VAR),n)
-	rm -f $(1)/var
-	$(LN) tmp $(1)/var
-else
+ifeq ($(CONFIG_TARGET_ROOTFS_PERSIST_VAR),y)
  	mkdir -p $(1)/var
  	$(LN) /tmp/run $(1)/var/run
+else
+	rm -f $(1)/var
+	$(LN) tmp $(1)/var
  endif
  	mkdir -p $(1)/etc
  	$(LN) /tmp/resolv.conf /tmp/TZ /tmp/localtime $(1)/etc/

Regards,
Hartmut



More information about the openwrt-devel mailing list