Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -1404,6 +1404,7 @@ Additional variables for the **system accounts** can be specified to change its
- `<account>_descr` the description for the new user. If unset defaults to `<account> unprivileged user`.
- `<account>_groups` additional groups to be added to for the new user.
- `<account>_pgroup` to set the primary group, by default primary group is set to `<account>`.
- `<account>_uname` to specify the account user name, by default the user name is set to `<account>`.

The **system user** is created by using a dynamically allocated **uid/gid** in your system
and it's created as a `system account`, unless the **uid** is set. A new group will be created for the
Expand Down
4 changes: 4 additions & 0 deletions common/hooks/post-install/04-create-xbps-metadata-scripts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,15 @@ _EOF
local _uname="${f%:*}"
local _uid="${f#*:}"

eval user_name="\$${_uname}_uname"
eval homedir="\$${_uname}_homedir"
eval shell="\$${_uname}_shell"
eval descr="\$${_uname}_descr"
eval groups="\$${_uname}_groups"
eval pgroup="\$${_uname}_pgroup"
if [ -n "$user_name" ]; then
echo "export ${_uname}_uname=\"$user_name\"" >> $tmpf
fi
if [ -n "$homedir" ]; then
echo "export ${_uname}_homedir=\"$homedir\"" >> $tmpf
fi
Expand Down
6 changes: 6 additions & 0 deletions srcpkgs/xbps-triggers/files/system-accounts
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,14 @@ run)

[ "${_uname}" = "${_uid}" ] && _uid=

eval user_name="\$${_uname}_uname"
eval homedir="\$${_uname}_homedir"
eval shell="\$${_uname}_shell"
eval descr="\$${_uname}_descr"
eval groups="\$${_uname}_groups"
eval pgroup="\$${_uname}_pgroup"

[ -n "$user_name" ] && _uname="${user_name}"
[ -z "$homedir" ] && homedir="/var/empty"
[ -z "$shell" ] && shell="/sbin/nologin"
[ -z "$descr" ] && descr="${_uname} unprivileged user"
Expand Down Expand Up @@ -152,6 +154,10 @@ run)
for acct in ${system_accounts}; do
_uname="${acct%:*}"

eval user_name="\$${_uname}_uname"

[ -n "$user_name" ] && _uname="${user_name}"

comment="$( (getent passwd "${_uname}" | cut -d: -f5 | head -n1) 2>/dev/null )"
comment="${comment:-unprivileged user} - for uninstalled package ${PKGNAME}"

Expand Down
2 changes: 1 addition & 1 deletion srcpkgs/xbps-triggers/template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Template file for 'xbps-triggers'
pkgname=xbps-triggers
version=0.131
version=0.132
revision=1
bootstrap=yes
short_desc="XBPS triggers for Void Linux"
Expand Down
Loading