Revision 25773,
1.6 KB
checked in by jdreed, 12 years ago
(diff) |
In reactivate:
* Cleanup cached user dmrc files and AccountService entries (Trac:
#1259)
In xsession:
* Cleanup lightdm's cached dmrc
|
-
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 | |
---|
15 | PATH=/sbin:/bin:/usr/bin |
---|
16 | |
---|
17 | case "$1" in |
---|
18 | start) |
---|
19 | # Clean up the per-user files cached locally by gdm. |
---|
20 | rm -rf /var/cache/gdm/* |
---|
21 | # And lightdm's cached dmrc |
---|
22 | rm -rf /var/cache/lightdm/dmrc/* |
---|
23 | # And AccountsService's cached session info |
---|
24 | rm -rf /var/lib/AccountsService/users/* |
---|
25 | |
---|
26 | # Set the volume to zero for all sound cards, and save that state. |
---|
27 | (/etc/init.d/alsa-utils stop all && alsactl store) > /dev/null 2>&1 |
---|
28 | |
---|
29 | # Create a tmpfs where schroot puts overlays. This is needed |
---|
30 | # because aufs won't let you put an overlay and underlay on the |
---|
31 | # same file system. |
---|
32 | tmpfssize="50%" |
---|
33 | if [ "$(machtype -M)" -le 2007518 ]; then |
---|
34 | tmpfssize="1073741824" |
---|
35 | fi |
---|
36 | if ! mountpoint -q /var/lib/schroot/union/overlay; then |
---|
37 | mount -t tmpfs -o size="$tmpfssize" tmpfs /var/lib/schroot/union/overlay |
---|
38 | fi |
---|
39 | |
---|
40 | # Enable subtree operations on /media by making it a mount point, |
---|
41 | # then share it. |
---|
42 | media_mount=$(mount | awk '$1 == "/media" && $3 == "/media"') |
---|
43 | if [ -z "$media_mount" ]; then |
---|
44 | mount --bind /media /media |
---|
45 | mount --make-shared /media |
---|
46 | fi |
---|
47 | ;; |
---|
48 | restart|reload|force-reload) |
---|
49 | echo "Error: argument '$1' not supported" >&2 |
---|
50 | exit 3 |
---|
51 | ;; |
---|
52 | stop) |
---|
53 | # No-op |
---|
54 | ;; |
---|
55 | *) |
---|
56 | echo "Usage: $0 start|stop" >&2 |
---|
57 | exit 3 |
---|
58 | ;; |
---|
59 | esac |
---|
60 | |
---|
61 | : |
---|
Note: See
TracBrowser
for help on using the repository browser.