fs2ram(8) manage post-mount/pre-mount scripts

SYNOPSIS

fs2ram action -a [-f] [-q]

fs2ram action <mountpoint> [-f] [-q]

fs2ram -h

DESCRIPTION

fs2ram manages temporary file systems across reboots. Each tmpfs <mountpoint> can be associated with a pre-mount script, which is executed by fs2ram at each shutdown/reboot before the file system is unmounted. The pre-unmount script must print a post-mount script on standard output, which is saved and then run at boot time after fs2ram mounts the corresponding file system.

OPTIONS

action
This option specifies the action to execute. It could be :
unmount:
This action first execute-unmount-script and then unmount.
mount:
This action first mount-only and then execute-mount-script.
mount-only:
This action mounts the filesystem given in parameters.
unmount-only:
This action unmounts the filesystem given in parameters.
execute-unmount-script:
This action executes the unmount script corresponding to the mountpoint given in parameters.
execute-mount-script:
This action executes the mount script corresponding to the mountpoint given in parameters.
-a
This option tells to do action for each <mountpoint> specified in /etc/fs2ram/fs2ram.conf
-q
This option tells to be quiet (only warning/error).
-h
This option tells to display the command usage.
-f
For the action unmount and mount, this option tells to proceed execute-mount-script/unmount respectively even if mount/execute-unmount-script failed. This option has no effect for the other options.

DEFAULTS

By default, fs2ram won't make /var/run, /var/lock or /tmp available as ram filesystems. Since sysvinit provides a way to achieve this, it is preferable to use it. See tmpfs(5) for more information.

UNMOUNT SCRIPTS

An unmount script has to produce to the standard output the mount script that fs2ram will execute at boot. The unmount script takes two arguments. The first one is the concerned mountpoint. The second one, optional, is the options given to the script. The default unmount scripts are in /lib/fs2ram/unmount-scripts/

FILES

/etc/fs2ram/fs2ram.conf
Mountpoints configuration file,
/lib/fs2ram/unmount-scripts/*
Default unmount scripts used by fs2ram,
/etc/fs2ram/unmount-scripts/*
User-defined unmount scripts used by fs2ram,
/etc/init.d/fs2ram
Script executed at runlevels S/0/6,
/var/lib/fs2ram/mount-scripts/*
Mount scripts created by fs2ram.

AUTHOR

fs2ram was written by Philippe Le Brouster <[email protected]> for the Debian project (and may be used by others).