[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ifupdown writes to /etc... a bug?

Anthony Towns <aj@azure.humbug.org.au> writes:
> If you know /var will be available, and want /etc not to be written to:
> # mv /etc/network/ifstate /var/run/ifupdown-state
> # ln -s /var/run/ifupdown-state /etc/network/ifstate
> Likewise if you have some other directory available.

If root is writable but var will be mounted separately, it seems like
you could just put all these files in /var/run even at boot time, and
then simply be careful to copy the values somewhere before you do the
mount and immediately copy them back to the newly mounted directory
(with exactly the same names).

This seems like it would have the following advantages:

 (1) For utilities that you can recompile to point directly at a
     /var/run name, no symlinks would be necessary.
 (2) For utilities that need a symlink from /etc for some reason, you
     could use a static symlink that always points to /var/run/...
 (3) For people that _don't_ mount a separate /var, you could skip all
     the wierdness, and simply do nothing special at mount time.

80% of success is just showing up.  --Woody Allen

Reply to: