File: postinst

package info (click to toggle)
at 3.1.10.2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 476 kB
  • ctags: 253
  • sloc: sh: 2,842; ansic: 2,215; yacc: 550; makefile: 206; lex: 92
file content (31 lines) | stat: -rw-r--r-- 1,015 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh -e

if [ "$1" = "configure" ]; then
    SEQFILE=/var/spool/cron/atjobs/.SEQ
    if [ ! -f $SEQFILE ]; then
	echo 0 > $SEQFILE
	chmod 600 $SEQFILE
	chown daemon:daemon $SEQFILE
    fi
    if [ -z "$2" ]; then
	update-rc.d atd defaults 89 11 > /dev/null
    else
	if dpkg --compare-versions "$2" lt 3.1.9; then
	    chown daemon:daemon /var/spool/cron/atjobs /var/spool/cron/atspool /var/spool/cron/atjobs/.SEQ
	    chmod 1770 /var/spool/cron/atjobs /var/spool/cron/atspool 
	    # If we upgrade from an older version which still had a setuid root
	    # /usr/bin/at, change the /etc/at.deny permissions (since dpkg does not do it
	    # automatically).
	    if [ -f /etc/at.deny ] && ! dpkg-statoverride --list /etc/at.deny > /dev/null; then
		chown root:daemon /etc/at.deny
		chmod 0640 /etc/at.deny
	    fi
	    if [ -f /etc/at.allow ] && ! dpkg-statoverride --list /etc/at.allow > /dev/null; then
		chown root:daemon /etc/at.allow
		chmod 0640 /etc/at.allow
	    fi
	fi
    fi
fi

invoke-rc.d atd start