forked from pool/sysuser-tools
Accepting request 785867 from home:favogt:branches:openSUSE:Factory
- Drop use of tail from the generated %pre scriptlets I'll try dropping the bash dep next. A pure lua implementation is possible, but would require some work and is IMO not really necessary. If any of those users are needed, there's very likely also a shell available. For system-user-root it's already pure lua. OBS-URL: https://build.opensuse.org/request/show/785867 OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=22
This commit is contained in:
parent
a19c937597
commit
81802b4712
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 17 10:12:15 UTC 2020 - Fabian Vogt <fvogt@suse.com>
|
||||
|
||||
- Drop use of tail from the generated %pre scriptlets
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 29 19:16:13 UTC 2019 - kukuk@suse.de
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package sysuser-tools
|
||||
#
|
||||
# Copyright (c) 2019 SUSE LLC
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
|
@ -1,26 +1,8 @@
|
||||
#!/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 'RET=$?'
|
||||
echo 'test -f /.buildenv && exit 0'
|
||||
echo 'exit $RET'
|
||||
echo '######## data below ########'
|
||||
cat "$tmpfile"
|
||||
echo 'cat <<"EOF" |'
|
||||
grep -he '^[ugmr]' "$@"
|
||||
echo 'EOF'
|
||||
echo '/usr/sbin/sysusers2shadow || [[ -f /.buildenv ]]'
|
Loading…
Reference in New Issue
Block a user