Accepting request 1190493 from Base:System
OBS-URL: https://build.opensuse.org/request/show/1190493 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/sysuser-tools?expand=0&rev=26
This commit is contained in:
commit
26683fb2a0
@ -1,7 +1,5 @@
|
|||||||
# Disable usage of systemd-sysusers for SLE15 to stay compatible
|
--- sysusers2shadow.sh.old 2024-07-04 14:24:01.013092683 +0200
|
||||||
|
+++ sysusers2shadow.sh 2024-07-04 14:28:06.701540250 +0200
|
||||||
--- sysusers2shadow.sh.old 2021-09-08 15:06:18.000000000 +0200
|
|
||||||
+++ sysusers2shadow.sh 2021-11-26 10:37:20.911541368 +0100
|
|
||||||
@@ -7,14 +7,6 @@
|
@@ -7,14 +7,6 @@
|
||||||
"$@"
|
"$@"
|
||||||
}
|
}
|
||||||
@ -14,10 +12,10 @@
|
|||||||
- # 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 -
|
- run /usr/bin/systemd-sysusers $REPLACE_ARG -
|
||||||
-else
|
-else
|
||||||
|
|
||||||
# Absolute path to busybox, if found
|
# Absolute path to busybox, if found
|
||||||
busybox=
|
busybox=
|
||||||
@@ -115,4 +115,3 @@
|
for i in /bin/busybox /usr/bin/busybox; do [ -x "$i" ] && busybox=$i; done
|
||||||
|
@@ -126,4 +118,3 @@
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jul 1 15:01:19 UTC 2024 - Johannes Weberhofer <jweberhofer@weberhofer.at>
|
||||||
|
|
||||||
|
- Allow setting of UID:GID for as defined in sysusers.d
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Nov 7 10:07:20 UTC 2023 - Dominique Leuenberger <dimstar@opensuse.org>
|
Tue Nov 7 10:07:20 UTC 2023 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package sysuser-tools
|
# spec file for package sysuser-tools
|
||||||
#
|
#
|
||||||
# Copyright (c) 2023 SUSE LLC
|
# Copyright (c) 2024 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: sysuser-tools
|
Name: sysuser-tools
|
||||||
Version: 3.2
|
Version: 3.3
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Auto provides for system users
|
Summary: Auto provides for system users
|
||||||
License: MIT
|
License: MIT
|
||||||
|
@ -15,7 +15,6 @@ if [ -x /usr/bin/systemd-sysusers ] && [ -e /proc/version ]; then
|
|||||||
# 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 -
|
run /usr/bin/systemd-sysusers $REPLACE_ARG -
|
||||||
else
|
else
|
||||||
|
|
||||||
# Absolute path to busybox, if found
|
# Absolute path to busybox, if found
|
||||||
busybox=
|
busybox=
|
||||||
for i in /bin/busybox /usr/bin/busybox; do [ -x "$i" ] && busybox=$i; done
|
for i in /bin/busybox /usr/bin/busybox; do [ -x "$i" ] && busybox=$i; done
|
||||||
@ -48,9 +47,23 @@ else
|
|||||||
u)
|
u)
|
||||||
shift
|
shift
|
||||||
ARGUMENTS="$1"
|
ARGUMENTS="$1"
|
||||||
if [ -n "${2-}" ] && [ "$2" != "-" ]; then
|
|
||||||
ARGUMENTS="-u $2 $ARGUMENTS"
|
# Split user and Group id
|
||||||
|
userGrouArr=(${2//:/ })
|
||||||
|
USER_ID=${userGrouArr[0]}
|
||||||
|
GROUP_ID=${userGrouArr[1]}
|
||||||
|
|
||||||
|
if [ -n "$USER_ID" ] && [ "$USER_ID" != "-" ]; then
|
||||||
|
ARGUMENTS="-u $USER_ID $ARGUMENTS"
|
||||||
fi
|
fi
|
||||||
|
if [ -n "$GROUP_ID" ] && [ "$GROUP_ID" != "-" ]; then
|
||||||
|
ARGUMENTS="-g $GROUP_ID $ARGUMENTS"
|
||||||
|
else
|
||||||
|
if [ "$USER_ID" == "-" ]; then
|
||||||
|
ARGUMENTS="-U $ARGUMENTS"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
homedir="/" # If null, empty or '-'
|
homedir="/" # If null, empty or '-'
|
||||||
if [ "${4:--}" != "-" ]; then
|
if [ "${4:--}" != "-" ]; then
|
||||||
homedir="$4"
|
homedir="$4"
|
||||||
@ -69,7 +82,7 @@ else
|
|||||||
if /usr/bin/getent group "$1" >> /dev/null; then
|
if /usr/bin/getent group "$1" >> /dev/null; then
|
||||||
ARGUMENTS="-g $1 $ARGUMENTS"
|
ARGUMENTS="-g $1 $ARGUMENTS"
|
||||||
else
|
else
|
||||||
ARGUMENTS="-U $ARGUMENTS"
|
ARGUMENTS="$ARGUMENTS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
run /usr/sbin/useradd -r -c "$3" -d "${homedir}" $ARGUMENTS
|
run /usr/sbin/useradd -r -c "$3" -d "${homedir}" $ARGUMENTS
|
||||||
|
Loading…
Reference in New Issue
Block a user