Re: ifupdown writes to /etc... a bug?
email@example.com (Miquel van Smoorenburg) writes:
> In article <firstname.lastname@example.org>,
> Goswin Brederlow <email@example.com> wrote:
> >Providing a state fs that you mount in place of a file would solve all
> >the problems without any change in userspace software. I think thats
> >still the best aproach.
> No it doesn't, because for example mount does this:
> fd = open("/etc/mtab.TMP", O_RDWR|O_CREATE, 0666);
> write(fd, "/dev/hda / ext3 ...", 100);
> rename("/etc/mtab.TMP", "/etc/mtab");
> That isn't going to work with a state fs.
> Besides, you can already mount things in place of a file. Create a file
> in /dev/shm, and bind-mount it over a file in /etc. Works fine. But
> it isn't enough, since it will not work with the above.
One would have to make that work. That would be the hard part for a
Maybe mount and ifup/down could be changed to use /dev/shm
optionally (maybe via symlink).
If everyone can live with that, especially the sysvinit maintainer who
has to include the changes to prepare /dev/shm for this, I'm willing
to write some patches to utilize /dev/shm for this.