- 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> 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" REPLACE_ARG="--replace=/usr/lib/sysusers.d/$1"
fi fi
# Use systemd-sysusers and let it read the input directly from stdin # Use systemd-sysusers and let it read the input directly from stdin
run /usr/bin/systemd-sysusers $REPLACE_ARG - if ! run /usr/bin/systemd-sysusers $REPLACE_ARG - ; then
# Could be that the installed systemd-sysusers is too old and does # Could be that the installed systemd-sysusers is too old
# not understand --replace, try again without # and does not understand --replace, try again without
if [ $? -ne 0 ]; then
run /usr/bin/systemd-sysusers - run /usr/bin/systemd-sysusers -
fi fi
else else