- Directly check return value of systemd-sysusers

OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=64
This commit is contained in:
Thorsten Kukuk 2024-12-11 11:07:04 +00:00 committed by Git OBS Bridge
parent fac252d429
commit a572aa9c30
2 changed files with 8 additions and 4 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Dec 11 11:05:25 UTC 2024 - Thorsten Kukuk <kukuk@suse.com>
- Directly check return value of systemd-sysusers
-------------------------------------------------------------------
Mon Dec 9 06:30:23 UTC 2024 - Thorsten Kukuk <kukuk@suse.com>

View File

@ -13,10 +13,9 @@ if [ -x /usr/bin/systemd-sysusers ] && [ -e /proc/version ]; then
REPLACE_ARG="--replace=/usr/lib/sysusers.d/$1"
fi
# Use systemd-sysusers and let it read the input directly from stdin
run /usr/bin/systemd-sysusers $REPLACE_ARG -
# Could be that the installed systemd-sysusers is too old and does
# not understand --replace, try again without
if [ $? -ne 0 ]; then
if ! run /usr/bin/systemd-sysusers $REPLACE_ARG - ; then
# Could be that the installed systemd-sysusers is too old
# and does not understand --replace, try again without
run /usr/bin/systemd-sysusers -
fi
else