File: op.postinst

package info (click to toggle)
op 1.32-4
  • links: PTS, VCS
  • area: main
  • in suites: lenny, squeeze
  • size: 716 kB
  • ctags: 360
  • sloc: ansic: 2,272; sh: 800; lex: 447; makefile: 68
file content (25 lines) | stat: -rw-r--r-- 565 bytes parent folder | download
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
#!/bin/sh -e

# inspired by the tor postinst script
# checking op group

gid=`getent group op | cut -d ":" -f 3`

# if there is the uid the account is there and we can do
# the sanit(ar)y checks otherwise we can safely create it.

if [ -z "$gid" ]; then
    # what this might mean?? oh creating a system l^Huser!
    addgroup --quiet \
            --system \
	    op 
fi

# only do something when no setting exists
if ! dpkg-statoverride --list /usr/bin/op >/dev/null 2>&1 ; then
   dpkg-statoverride --update --add root op 4755 /usr/bin/op
fi

#DEBHELPER#

exit 0