1
0
forked from pool/sysuser-tools
sysuser-tools/sysusers.prov
Thorsten Kukuk 45d70a85d7 Accepting request 863987 from home:kukuk:etc
- An "u" in a sysusers.d file will create an user and a group.
  Create provides for both, user and group.

OBS-URL: https://build.opensuse.org/request/show/863987
OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=35
2021-01-18 07:13:39 +00:00

22 lines
313 B
Bash

#!/bin/bash
parse()
{
while read line; do
[ "${line:0:1}" != '#' ] || continue
line="${line## *}"
[ -n "$line" ] || continue
set -- $line
if [ "$1" = 'g' ]; then
echo "group($2)"
elif [ "$1" = 'u' ]; then
echo "user($2)"
echo "group($2)"
fi
done
}
while read fn; do
parse < "$fn"
done