* 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 <biebl@debian.org> Tue, 26 Aug 2014 12:09:10 +0200
# 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
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