sysuser-tools/sysusers.prov
Thorsten Kukuk 69b475fe74 - sysuser-shadow: remove systemd 238 dependency, this does not
work in a single RPM transaction [bsc#1234277]. Call
  systemd-sysuser instead again without --replace.

OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=62
2024-12-09 06:28:19 +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