Marcus Meissner
ac43675b41
Any thoughts about this change? currently we simply hide all errors deep into zypp's log files and somehow hope the system would be working in the end OBS-URL: https://build.opensuse.org/request/show/528932 OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=11
25 lines
492 B
Bash
25 lines
492 B
Bash
#!/bin/bash
|
|
# pass systemd sysusers config files a as argument to this script.
|
|
# It will output a shell script that creates those users by
|
|
# appending the data to itself.
|
|
|
|
tmpfile=`mktemp -q -t sysusers.XXXXXX`
|
|
cleanup()
|
|
{
|
|
rm -f "$tmpfile"
|
|
}
|
|
|
|
trap cleanup EXIT
|
|
|
|
for i in "$@"; do
|
|
grep -e '^[ugmr]' "$i" >> "$tmpfile"
|
|
done
|
|
|
|
lines=`wc -l < "$tmpfile"`
|
|
|
|
echo '#!/bin/bash'
|
|
echo "tail -n $lines \$0 | /usr/sbin/sysusers2shadow"
|
|
echo "exit $?"
|
|
echo '######## data below ########'
|
|
cat "$tmpfile"
|