6c3148f502
The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/systemd#14b2fafb3688a4170a9c15235d1c3feb7ddeaf9d
29 lines
601 B
Bash
Executable File
29 lines
601 B
Bash
Executable File
#!/bin/bash
|
|
|
|
parse() {
|
|
while read line; do
|
|
[ "${line:0:1}" = '#' -o "${line:0:1}" = ';' ] && continue
|
|
line="${line## *}"
|
|
[ -z "$line" ] && continue
|
|
set -- $line
|
|
case "$1" in
|
|
('u')
|
|
echo "user($2)"
|
|
echo "group($2)"
|
|
# TODO: user:group support
|
|
;;
|
|
('g')
|
|
echo "group($2)"
|
|
;;
|
|
('m')
|
|
echo "user($2)"
|
|
echo "group($3)"
|
|
;;
|
|
esac
|
|
done
|
|
}
|
|
|
|
while read fn; do
|
|
parse < "$fn"
|
|
done
|