source: trunk/packages/invirt-dev/debian/invirt-dev.postinst @ 2608

Last change on this file since 2608 was 2588, checked in by broder, 15 years ago

Create /srv/git when installing invirt-dev if it doesn't exist.

(Otherwise invirt-build-conf fails)

  • Property svn:executable set to *
File size: 1.0 KB
RevLine 
[956]1#!/bin/sh
2set -e
3
4#DEBHELPER#
5
6case "$1" in
7    configure)
[2556]8        if ! getent passwd repository >/dev/null 2>&1; then
[956]9            adduser --system repository
[2556]10        fi
11        if ! getent group repo >/dev/null 2>&1; then
[956]12            addgroup --system repo
[2556]13        fi
[2580]14
15        if ! getent passwd git >/dev/null 2>&1; then
16            adduser --system --home /srv/git --shell /usr/bin/git-shell git
17        fi
[2581]18
[2588]19        if ! [ -d /srv/git ]; then
20            mkdir -p /srv/git
21        fi
22
[2581]23        invirt-build-conf
[1770]24           
[2556]25        cat >>/etc/sudoers <<EOF
[1770]26### BEGIN invirt-dev
27%repo   ALL=(repository)        ALWAYS_SET_HOME,NOPASSWD: /usr/bin/reprepro
28### END invirt-dev
29EOF
[2556]30        echo "-----"
31        echo "invirt-dev: run"
32        echo "  adduser --disabled-password \$user"
33        echo "  adduser \$user repo"
34        echo "  adduser \$user sbuild"
35        echo "to make individual users that will build packages."
36        echo "-----"
[956]37    ;;
38
39    abort-upgrade|abort-remove|abort-deconfigure)
40    ;;
41
42    *)
43        echo "postinst called with unknown argument \`$1'" >&2
44        exit 1
45    ;;
46esac
Note: See TracBrowser for help on using the repository browser.