directory /var not persistent in openwrt?

David Kuehling dvdkhlng at
Tue Jun 7 17:14:59 EDT 2011

>>>>> "Bas" == Bas Wijnen <wijnen at> writes:

> Op 07-06-11 21:53, David Kuehling schreef:
>> for the "alex4" port I configured the game to write save-data and
>> score data to /var .
>> Now I just realized that /var is a tmpfs that looses all data after
>> reboot.
>> Is that really intended?  Where would I then write save-data to?
>> /usr/share?  /etc?

> I would expect any program to write only to places where the user
> executing the program would normally have write access. A game should
> not normally be run as root, which means it should really only write
> to the home directory or subdirectories of it.

> The only exception is a centralized high score file, but on the Ben we
> don't have multiple users, so that's a non-issue.

> Following the xdg base directory specification you should use:
> $HOME/.local/share for data (saves and score are both data)
> $HOME/.config for configuration $HOME/.cache for regeneratable data

> All data should be in a subdir in there. So for alex4, you should use
> $HOME/.local/share/alex4/

Well as somebody with an email address, I'd assume that
you'd suggest something complicated like that :)

But if we don't have multiple users on the ben (on openwrt in general?),
maybe I could just hardcode the path to /root/.local/share?  Yeah ugly,
but then patching other people's software is a nuisance.  If just posix
file routines would understand '~'.

Ah, but liballegro understands '~' when feeding filenames through
canonicalize_filename().  Maybe that's the solution here.

thanks for your ideas


GnuPG public key:
Fingerprint: B17A DC95 D293 657B 4205  D016 7DEF 5323 C174 7D40
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the discussion mailing list