xbps-triggers: fixed the system-accounts trigger, bump to 0.13.
This commit is contained in:
parent
9317ea447b
commit
986f18faa1
2 changed files with 9 additions and 9 deletions
|
@ -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)
|
||||
#
|
||||
|
|
|
@ -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 <xtraeme@gmail.com>"
|
||||
|
|
Loading…
Reference in a new issue