Support user:group notation by sysusers.generate-pre.sh script
#Type Name ID GECOS Home directory Shell u user_name uid:gid "User Description" /home/dir /path/to/shell According to: https://www.freedesktop.org/software/systemd/man/sysusers.d.html
This commit is contained in:
parent
b3fa8789f9
commit
83301531c0
|
@ -70,9 +70,12 @@ parse() {
|
||||||
eval "arr=( $line )"
|
eval "arr=( $line )"
|
||||||
case "${arr[0]}" in
|
case "${arr[0]}" in
|
||||||
('u')
|
('u')
|
||||||
|
if [[ "${arr[2]}" == *":"* ]]; then
|
||||||
|
user "${arr[1]}" "${arr[2]%:*}" "${arr[3]}" "${arr[2]#*:}" "${arr[4]}" "${arr[5]}"
|
||||||
|
else
|
||||||
group "${arr[1]}" "${arr[2]}"
|
group "${arr[1]}" "${arr[2]}"
|
||||||
user "${arr[1]}" "${arr[2]}" "${arr[3]}" "${arr[1]}" "${arr[4]}" "${arr[5]}"
|
user "${arr[1]}" "${arr[2]}" "${arr[3]}" "${arr[1]}" "${arr[4]}" "${arr[5]}"
|
||||||
# TODO: user:group support
|
fi
|
||||||
;;
|
;;
|
||||||
('g')
|
('g')
|
||||||
group "${arr[1]}" "${arr[2]}"
|
group "${arr[1]}" "${arr[2]}"
|
||||||
|
|
Loading…
Reference in New Issue