From: Michael Biebl Date: Sat, 6 Sep 2014 19:36:18 +0000 (+0200) Subject: Use adduser in quiet mode X-Git-Tag: debian/247.3-7+deb11u1~2058 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=2b9f2a670cbc9d4d756d4e71810a392245967f2f;p=systemd.git Use adduser in quiet mode * Use adduser in quiet mode when creating the system users/groups to avoid warning messages about the missing home directories. Those are created dynamically during runtime. * Set the gecos field when creating the system users. Closes: #759175 --- diff --git a/debian/changelog b/debian/changelog index 629874adf..ee203bf02 100644 --- a/debian/changelog +++ b/debian/changelog @@ -33,6 +33,10 @@ systemd (215-1) UNRELEASED; urgency=medium * Cherry-pick upstream commit to fix ProtectSystem=full and make the ProtectSystem= option consider /bin, /sbin, /lib and /lib64 (if it exists) on Debian systems. (Closes: #759689) + * Use adduser in quiet mode when creating the system users/groups to avoid + warning messages about the missing home directories. Those are created + dynamically during runtime. (Closes: #759175) + * Set the gecos field when creating the system users. -- Michael Biebl Tue, 26 Aug 2014 12:09:10 +0200 diff --git a/debian/systemd.postinst b/debian/systemd.postinst index 55fbf1e64..d167ac1fd 100644 --- a/debian/systemd.postinst +++ b/debian/systemd.postinst @@ -103,21 +103,15 @@ fi # Create /etc/machine-id systemd-machine-id-setup -if ! getent group systemd-journal >/dev/null; then - addgroup --system systemd-journal -fi - -if ! getent passwd systemd-timesync >/dev/null; then - adduser --system --group --no-create-home --home /run/systemd systemd-timesync -fi - -if ! getent passwd systemd-network >/dev/null; then - adduser --system --group --no-create-home --home /run/systemd/netif systemd-network -fi - -if ! getent passwd systemd-resolve >/dev/null; then - adduser --system --group --no-create-home --home /run/systemd/resolve systemd-resolve -fi +# Setup system users and groups +addgroup --quiet --system systemd-journal + +adduser --quiet --system --group --no-create-home --home /run/systemd \ + --gecos "systemd Time Synchronization" systemd-timesync +adduser --quiet --system --group --no-create-home --home /run/systemd/netif \ + --gecos "systemd Network Management" systemd-network +adduser --quiet --system --group --no-create-home --home /run/systemd/resolve \ + --gecos "systemd Resolver" systemd-resolve # Initial update of the Message Catalogs database _update_catalog diff --git a/debian/udev.postinst b/debian/udev.postinst index 06b1d611b..5db502812 100644 --- a/debian/udev.postinst +++ b/debian/udev.postinst @@ -147,9 +147,7 @@ case "$1" in update_hwdb # Add new system group used by udev rules - if ! getent group "input" >/dev/null; then - addgroup --system "input" - fi + addgroup --quiet --system input if [ -z "$2" ]; then # first install if ! chrooted && ! in_debootstrap; then