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

Revision 24333, 1.4 KB checked in by rbasch, 15 years ago (diff)
Add /usr/bin to the PATH in reactivate's init script.
  • 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:/usr/bin
16
17case "$1" in
18  start)
19        # Clean up the per-user files cached locally by gdm.
20        rm -rf /var/cache/gdm/*
21
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        if ! mountpoint -q /var/lib/schroot/union/overlay; then
29            mount -t tmpfs -o size=1073741824 tmpfs /var/lib/schroot/union/overlay
30        fi
31
32        # Enable subtree operations on /media by making it a mount point,
33        # then share it.
34        media_mount=$(mount | awk '$1 == "/media" && $3 == "/media"')
35        if [ -z "$media_mount" ]; then
36            mount --bind /media /media
37            mount --make-shared /media
38        fi
39        ;;
40  restart|reload|force-reload)
41        echo "Error: argument '$1' not supported" >&2
42        exit 3
43        ;;
44  stop)
45        # No-op
46        ;;
47  *)
48        echo "Usage: $0 start|stop" >&2
49        exit 3
50        ;;
51esac
52
53:
Note: See TracBrowser for help on using the repository browser.