Last change
on this file since 2557 was
2556,
checked in by broder, 15 years ago
|
In invirt-dev:
- Since the prerm code to remove the repo group from sudoers runs on
upgrades, make sure the postinst code to add it back runs on all
upgrades, too.
|
-
Property svn:executable set to
*
|
File size:
837 bytes
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | set -e |
---|
3 | |
---|
4 | #DEBHELPER# |
---|
5 | |
---|
6 | case "$1" in |
---|
7 | configure) |
---|
8 | if ! getent passwd repository >/dev/null 2>&1; then |
---|
9 | adduser --system repository |
---|
10 | fi |
---|
11 | if ! getent group repo >/dev/null 2>&1; then |
---|
12 | addgroup --system repo |
---|
13 | fi |
---|
14 | |
---|
15 | cat >>/etc/sudoers <<EOF |
---|
16 | ### BEGIN invirt-dev |
---|
17 | %repo ALL=(repository) ALWAYS_SET_HOME,NOPASSWD: /usr/bin/reprepro |
---|
18 | ### END invirt-dev |
---|
19 | EOF |
---|
20 | echo "-----" |
---|
21 | echo "invirt-dev: run" |
---|
22 | echo " adduser --disabled-password \$user" |
---|
23 | echo " adduser \$user repo" |
---|
24 | echo " adduser \$user sbuild" |
---|
25 | echo "to make individual users that will build packages." |
---|
26 | echo "-----" |
---|
27 | ;; |
---|
28 | |
---|
29 | abort-upgrade|abort-remove|abort-deconfigure) |
---|
30 | ;; |
---|
31 | |
---|
32 | *) |
---|
33 | echo "postinst called with unknown argument \`$1'" >&2 |
---|
34 | exit 1 |
---|
35 | ;; |
---|
36 | esac |
---|
Note: See
TracBrowser
for help on using the repository browser.