Last change
on this file since 2562 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
|
Rev | Line | |
---|
[956] | 1 | #!/bin/sh |
---|
| 2 | set -e |
---|
| 3 | |
---|
| 4 | #DEBHELPER# |
---|
| 5 | |
---|
| 6 | case "$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 |
---|
[1770] | 14 | |
---|
[2556] | 15 | cat >>/etc/sudoers <<EOF |
---|
[1770] | 16 | ### BEGIN invirt-dev |
---|
| 17 | %repo ALL=(repository) ALWAYS_SET_HOME,NOPASSWD: /usr/bin/reprepro |
---|
| 18 | ### END invirt-dev |
---|
| 19 | EOF |
---|
[2556] | 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 "-----" |
---|
[956] | 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.