summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorsbd <sbd@pkgsrc.org>2013-04-05 03:30:40 +0000
committersbd <sbd@pkgsrc.org>2013-04-05 03:30:40 +0000
commit8c28072afd03bc2f7031841f5c1ac53369f5ca6d (patch)
tree9e99f1ffb2ca2923c901375ab66d05d4cfcf9851 /mk
parent6f3ca99529c733461ea2322c4dd417d795d5a257 (diff)
downloadpkgsrc-8c28072afd03bc2f7031841f5c1ac53369f5ca6d.tar.gz
Add the '-r' option to useradd/groupadd when no uid/git is given so that
a system account/group (differance id range) will be created.
Diffstat (limited to 'mk')
-rw-r--r--mk/pkginstall/usergroupfuncs.Linux6
1 files changed, 3 insertions, 3 deletions
diff --git a/mk/pkginstall/usergroupfuncs.Linux b/mk/pkginstall/usergroupfuncs.Linux
index 57be340c927..c2791ce7cd3 100644
--- a/mk/pkginstall/usergroupfuncs.Linux
+++ b/mk/pkginstall/usergroupfuncs.Linux
@@ -1,4 +1,4 @@
-# $NetBSD: usergroupfuncs.Linux,v 1.5 2009/03/08 19:39:03 joerg Exp $
+# $NetBSD: usergroupfuncs.Linux,v 1.6 2013/04/05 03:30:40 sbd Exp $
#
# Platform-specific adduser and addgroup functionality
# on top of shadow-utils. (Not libuser)
@@ -96,7 +96,7 @@ call_useradd()
case $userid in
"")
${USERADD} \
- -c "$descr" -d "$home" -s "$shell" \
+ -r -c "$descr" -d "$home" -s "$shell" \
-g $group $user "$@"
;;
*)
@@ -149,7 +149,7 @@ addgroup()
if ${TEST} -n "${GROUPADD}" -a -x "${GROUPADD}"; then
${ECHO} "${PKGNAME}: Creating group \`\`$group''"
case $groupid in
- "") ${GROUPADD} $group ;;
+ "") ${GROUPADD} -r $group ;;
*) ${GROUPADD} -g $groupid $group ;;
esac
fi