From 986f18faa1f93913561757182c07f39261d6bf4b Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 28 Dec 2010 13:03:04 +0100 Subject: [PATCH] xbps-triggers: fixed the system-accounts trigger, bump to 0.13. --- srcpkgs/xbps-triggers/files/system-accounts | 16 ++++++++-------- srcpkgs/xbps-triggers/template | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/srcpkgs/xbps-triggers/files/system-accounts b/srcpkgs/xbps-triggers/files/system-accounts index 05d0f7be6f..6f1cbe9846 100755 --- a/srcpkgs/xbps-triggers/files/system-accounts +++ b/srcpkgs/xbps-triggers/files/system-accounts @@ -51,6 +51,11 @@ run) case "$TARGET" in post-install) + # System groups required by a package. + for grp in ${system_groups}; do + group_add $grp + done + # System user/group required by a package. for acct in ${system_accounts}; do eval homedir="\$${acct}_homedir" @@ -60,13 +65,13 @@ run) [ -z "$homedir" ] && homedir="/" [ -z "$shell" ] && shell="/sbin/nologin" [ -z "$descr" ] && descr="$acct unpriviledged user" - [ -n "$groups" ] && groups="-G $groups" + [ -n "$groups" ] && user_groups="-G $groups" - group_add $groups + group_add $acct if ! $GETENT passwd ${acct} >/dev/null; then $USERADD -c "$descr" -d "$homedir" \ - -s "$shell" -g ${acct} $groups \ + -s "$shell" -g ${acct} $user_groups \ -r ${acct} && \ $PASSWD -l ${acct} >/dev/null 2>&1 if [ $? -eq 0 ]; then @@ -77,11 +82,6 @@ run) fi fi done - - # System groups required by a package. - for grp in ${system_groups}; do - group_add $grp - done ;; pre-remove) # diff --git a/srcpkgs/xbps-triggers/template b/srcpkgs/xbps-triggers/template index 87e33796cb..9672be3b36 100644 --- a/srcpkgs/xbps-triggers/template +++ b/srcpkgs/xbps-triggers/template @@ -1,6 +1,6 @@ # Template file for 'xbps-triggers' pkgname=xbps-triggers -version=0.13 +version=0.14 build_style=custom-install short_desc="XBPS triggers" maintainer="Juan RP "