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

Revision 24333, 1.4 KB checked in by rbasch, 14 years ago (diff)
Add /usr/bin to the PATH in reactivate's init script.
  • Property svn:executable set to *
RevLine 
[24012]1#! /bin/sh
2### BEGIN INIT INFO
[24093]3# Provides:          debathena-reactivate
4# Required-Start:
[24012]5# Required-Stop:
6# Default-Start:     2 3 4 5
7# Default-Stop:
[24093]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.
[24125]11#                    Currently, it mutes the sound and sets up a filesystem
12#                    for snapshots.
[24012]13### END INIT INFO
14
[24333]15PATH=/sbin:/bin:/usr/bin
[24012]16
17case "$1" in
18  start)
[24332]19        # Clean up the per-user files cached locally by gdm.
20        rm -rf /var/cache/gdm/*
21
[24012]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
[24125]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.
[24317]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
[24151]31
32        # Enable subtree operations on /media by making it a mount point,
33        # then share it.
[24332]34        media_mount=$(mount | awk '$1 == "/media" && $3 == "/media"')
35        if [ -z "$media_mount" ]; then
[24151]36            mount --bind /media /media
37            mount --make-shared /media
38        fi
[24012]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.