ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/mports/trunk/devel/distcc/pkg-install
Revision: 15604
Committed: Sat Nov 23 05:02:57 2013 UTC (10 years, 5 months ago) by laffer1
File size: 762 byte(s)
Log Message:
drop cvs2svn prop

File Contents

# Content
1 #!/bin/sh
2
3 case $2 in
4 POST-INSTALL)
5 USER=distcc
6 GROUP=${USER}
7 UID=561
8 GID=${UID}
9 PW=/usr/sbin/pw
10 CHOWN=/usr/sbin/chown
11 if ${PW} group show "${GROUP}" 2>/dev/null; then
12 echo "You already have a group \"${GROUP}\", so I will use it."
13 else
14 if ${PW} groupadd ${GROUP} -g ${GID}; then
15 echo "Added group \"${GROUP}\"."
16 else
17 echo "Adding group \"${GROUP}\" failed..."
18 exit 1
19 fi
20 fi
21
22 if ${PW} user show "${USER}" 2>/dev/null; then
23 echo "You already have a user \"${USER}\", so I will use it."
24 else
25 if ${PW} useradd ${USER} -u ${UID} -g ${GROUP} -h - \
26 -d "/nonexistent" -s /usr/sbin/nologin -c "Distcc user"
27 then
28 echo "Added user \"${USER}\"."
29 else
30 echo "Adding user \"${USER}\" failed..."
31 exit 1
32 fi
33 fi
34 exit 0
35 ;;
36 esac