source: trunk/debathena/config/reactivate/debian/debathena-reactivate.init @ 24151

Revision 24151, 1.2 KB checked in by geofft, 15 years ago (diff)
reactivate: Restore shared mountpoint at /media.
  • Property svn:executable set to *
Line 
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides:          debathena-reactivate
4# Required-Start:
5# Required-Stop:
6# Default-Start:     2 3 4 5
7# Default-Stop:
8# X-Start-Before:    gdm
9# Short-Description: Re-activate Athena cluster machine
10# Description:       This script sets up an Athena cluster machine at boot.
11#                    Currently, it mutes the sound and sets up a filesystem
12#                    for snapshots.
13### END INIT INFO
14
15PATH=/sbin:/bin
16
17. /lib/init/vars.sh
18. /lib/init/mount-functions.sh
19
20case "$1" in
21  start)
22        # Set the volume to zero for all sound cards, and save that state.
23        (/etc/init.d/alsa-utils stop all && alsactl store) > /dev/null 2>&1
24
25        # Create a tmpfs where schroot puts overlays. This is needed
26        # because aufs won't let you put an overlay and underlay on the
27        # same file system.
28        domount tmpfs "" /var/lib/schroot/union/overlay tmpfs -osize=1073741824
29
30        # Enable subtree operations on /media by making it a mount point,
31        # then share it.
32        if ! mountpoint -q /media; then
33            mount --bind /media /media
34            mount --make-shared /media
35        fi
36        ;;
37  restart|reload|force-reload)
38        echo "Error: argument '$1' not supported" >&2
39        exit 3
40        ;;
41  stop)
42        # No-op
43        ;;
44  *)
45        echo "Usage: $0 start|stop" >&2
46        exit 3
47        ;;
48esac
49
50:
Note: See TracBrowser for help on using the repository browser.