hooks/create-xbps-metadata-scripts: fix system account props.
This commit is contained in:
parent
2c1068b64f
commit
7ab7ba07fd
1 changed files with 10 additions and 14 deletions
|
@ -83,28 +83,24 @@ _EOF
|
||||||
_add_trigger system-accounts
|
_add_trigger system-accounts
|
||||||
echo "export system_accounts=\"${system_accounts}\"" >> $tmpf
|
echo "export system_accounts=\"${system_accounts}\"" >> $tmpf
|
||||||
for f in ${system_accounts}; do
|
for f in ${system_accounts}; do
|
||||||
local _uname="${acct%:*}"
|
local _uname="${f%:*}"
|
||||||
local _uid="${acct#*:}"
|
local _uid="${f#*:}"
|
||||||
|
|
||||||
if [ "${_uid}" = "${_uname}" ]; then
|
eval homedir="\$${_uname}_homedir"
|
||||||
continue
|
eval shell="\$${_uname}_shell"
|
||||||
fi
|
eval descr="\$${_uname}_descr"
|
||||||
|
eval groups="\$${_uname}_groups"
|
||||||
eval homedir="\$${f}_homedir"
|
|
||||||
eval shell="\$${f}_shell"
|
|
||||||
eval descr="\$${f}_descr"
|
|
||||||
eval groups="\$${f}_groups"
|
|
||||||
if [ -n "$homedir" ]; then
|
if [ -n "$homedir" ]; then
|
||||||
echo "export ${f}_homedir=\"$homedir\"" >> $tmpf
|
echo "export ${_uname}_homedir=\"$homedir\"" >> $tmpf
|
||||||
fi
|
fi
|
||||||
if [ -n "$shell" ]; then
|
if [ -n "$shell" ]; then
|
||||||
echo "export ${f}_shell=\"$shell\"" >> $tmpf
|
echo "export ${_uname}_shell=\"$shell\"" >> $tmpf
|
||||||
fi
|
fi
|
||||||
if [ -n "$descr" ]; then
|
if [ -n "$descr" ]; then
|
||||||
echo "export ${f}_descr=\"$descr\"" >> $tmpf
|
echo "export ${_uname}_descr=\"$descr\"" >> $tmpf
|
||||||
fi
|
fi
|
||||||
if [ -n "$groups" ]; then
|
if [ -n "$groups" ]; then
|
||||||
echo "export ${f}_groups=\"${groups}\"" >> $tmpf
|
echo "export ${_uname}_groups=\"${groups}\"" >> $tmpf
|
||||||
fi
|
fi
|
||||||
unset homedir shell descr groups
|
unset homedir shell descr groups
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue