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

Stijn Tintel stijn at linux-ipv6.be
Mon Aug 23 03:10:31 PDT 2021


On 23/08/2021 10:22, e9hack wrote:
> 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/ 


Good catch. I had initially named the option CONFIG_LN_VAR_TMP or
something, but didn't like the name. Guess I didn't think things through
when renaming the option. Sorry about that. Will push a fix.

Thanks,
Stijn




More information about the openwrt-devel mailing list