File: postinst

package info (click to toggle)
dnscvsutil 0.10
  • links: PTS
  • area: main
  • in suites: sarge, woody
  • size: 84 kB
  • ctags: 39
  • sloc: perl: 679; makefile: 72; sh: 64
file content (39 lines) | stat: -rw-r--r-- 1,247 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
32
33
34
35
36
37
38
39
#!/bin/sh -e

STATEDIR="/var/lib/dnscvsutil"
if [ "$1" = "configure" ]; then
    if [ \! -d "$STATEDIR/cvs/CVSROOT" ]
    then
        addgroup --quiet dnsadmin
        cvs -d "$STATEDIR/cvs" init
        mkdir "$STATEDIR/cvs/domains"
        chgrp -R dnsadmin "$STATEDIR/cvs" \
            "$STATEDIR/compiled"
        cd "$STATEDIR"
        cvs -q -d "$STATEDIR/cvs" co -l domains
        chgrp -R dnsadmin "$STATEDIR/domains"
        chmod g+ws "$STATEDIR/cvs" \
            "$STATEDIR/cvs/CVSROOT" \
            "$STATEDIR/cvs/domains" \
            "$STATEDIR/domains" \
            "$STATEDIR/compiled"
    elif [ "$(cat $STATEDIR/domains/CVS/Root)" \
            = "/var/state/dnscvsutil/cvs" ]; then
        # Moving /var/state to /var/lib, need to re-checkout
        # the dns-update CVS tree
        rm -rf "$STATEDIR/domains"
        cd "$STATEDIR"
        cvs -q -d "$STATEDIR/cvs" co -l domains
        chgrp -R dnsadmin "$STATEDIR/domains"
        chmod g+ws "$STATEDIR/domains" \
             "$STATEDIR/domains/CVS"
    fi
fi

PACKAGE=dnscvsutil
if [ "$1" = "configure" ]; then
	if [ -d /usr/doc -a ! -e /usr/doc/$PACKAGE \
            -a -d /usr/share/doc/$PACKAGE ]; then
		ln -sf ../share/doc/$PACKAGE /usr/doc/$PACKAGE
	fi
fi