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

The scripts to implement /mem (was: Re: ifupdown writes to /etc... a bug?)



Hi,

On Thu, Mar 13, 2003 at 02:12:18AM +0100, Emile van Bergen wrote:

> [...] the combination of /mem, /mem built from a skeleton at bootup,
> /mem/run, /mem/preserved that may be copied back and *possibly* a mode
> 1777 /mem/tmp, is a solution for:
> 
> - the ifstate and/or dhcp vs. networked var problem
> - things that must be cleaned at boot
> - less important differences between tmpfs, shmfs, ramfs and ext2-on-ramdisk
> - readonly / or /etc
> - laptop disk spinups
> - applications that want a filesystem interface to memory [ed: changed]
> 
> I'm implementing it in three scripts right now.

Find them below. The three scripts are 

/etc/init.d/mountmem.sh
/etc/init.d/initmem.sh 
/etc/init.d/savemem.sh

and should be linked to as follows:

etc/rcS.d/S09mountmem.sh -> ../init.d/mountmem.sh
etc/rcS.d/S36initmem.sh -> ../init.d/initmem.sh
etc/rc0.d/S37savemem.sh -> ../init.d/savemem.sh

In addition, I have a /var/state/mem that holds a skeleton for /mem; you
could also put it in /etc/ if you want not only to have /mem available
before /var is mounted (which it is), but to be able to have it
initialized as well.

*My* /var/run is a symlink to /mem/run, but of course that's a little
difficult to accomplish in some postinst, so that should probably best
be left to the admin, if he wants it at all.

The same goes for /var/lib/ntp/ntp.drift which is a symlink to
/mem/preserved/ntp.drift on my laptop.

As said, I'll try to move R/W files in /etc/ such as mtab there as well
and see what it takes in practice and what the consequences are for
/etc/rcS.d/*.

Cheers,


Emile.

-- 
E-Advies - Emile van Bergen           emile@e-advies.nl      
tel. +31 (0)70 3906153           http://www.e-advies.nl    

Attachment: mountmem.sh
Description: Bourne shell script

Attachment: initmem.sh
Description: Bourne shell script

Attachment: savemem.sh
Description: Bourne shell script

Attachment: pgpbgtxPGsnrg.pgp
Description: PGP signature


Reply to: