source: trunk/athena/lib/locker/debian/debathena-liblocker.init @ 24221

Revision 24221, 955 bytes checked in by broder, 14 years ago (diff)
Change the owner and permissions on the attachtab, even if it already exists.
Line 
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides:          attachtab
4# Required-Start:    $local_fs
5# Required-Stop:
6# Default-Start:     S
7# Default-Stop:
8# Short-Description: Creates attachtab.
9# Description:       Creates /var/run/attachtab.
10### END INIT INFO
11
12if [ -e /lib/lsb/init-functions ]; then
13    . /lib/lsb/init-functions
14else
15    alias log_action_begin_msg="echo -n"
16    log_action_end_msg () {
17        echo .
18    }
19fi
20
21case "$1" in
22    start)
23        for dir in /var/run/attachtab \
24            /var/run/attachtab/directory \
25            /var/run/attachtab/locker \
26            /var/run/attachtab/mountpoint; do
27            if ! [ -e "$dir" ]; then
28                mkdir -m 2770 "$dir"
29            fi
30            chown root:attach "$dir"
31            chmod 2770 "$dir"
32        done
33        for lock in /var/run/attachtab/.lock \
34            /var/run/attachtab/.dirlock; do
35            touch "$lock"
36            chown root:attach "$lock"
37            chmod 660 "$lock"
38        done
39        ;;
40    restart|stop|force-reload)
41        ;;
42    *)
43        echo "Usage: $0 {start}" >&2
44        exit 3
45        ;;
46esac
47
48:
Note: See TracBrowser for help on using the repository browser.