Your message dated Sun, 20 Aug 2017 18:48:42 +0200
with message-id <[email protected]>
and subject line Re: Bug#872703: system.conf.d include directories are ignored
has caused the Debian Bug report #872703,
regarding system.conf.d include directories are ignored
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
872703: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=872703
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: systemd
Version: 232-25+deb9u1
Severity: normal

Hello,

apparently, the system.conf.d include directories as mentioned in
systemd-system.conf(5) manpage are not considered by the systemd daemon.

When trying to set a global environment variable using the
DefaultEnvironment directive, I discovered that it is only recognized
when set in /etc/systemd/system.conf. If I put it into an include file
at either of /etc/systemd/system.conf.d/, /lib/systemd/system.conf.d/ or
/run/systemd/system.conf.d/ it's not recognized:

# systemctl show-environment
LANG=en_US.UTF-8
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# echo 'DefaultEnvironment="VAR1=val1"'
>/etc/systemd/system.conf.d/test.conf
# systemctl daemon-reexec
# systemctl show-environment
LANG=en_US.UTF-8
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# echo 'DefaultEnvironment="VAR1=val1"' >>/etc/systemd/system.conf
# systemctl daemon-reexec
# systemctl show-environment
LANG=en_US.UTF-8
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
VAR1=val1

I tested this on Debian Jessie with systemd 215-17 and on Stretch with
systemd 232-25+deb9u1.

Cheers,
 jonas

-- Package-specific info:

-- System Information:
Debian Release: 9.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) (ignored:
LC_ALL set to en_US.UTF-8), LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
(ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages systemd depends on:
ii  adduser         3.115
ii  libacl1         2.2.52-3+b1
ii  libapparmor1    2.11.0-3
ii  libaudit1       1:2.6.7-2
ii  libblkid1       2.29.2-1
ii  libc6           2.24-11+deb9u1
ii  libcap2         1:2.25-1
ii  libcryptsetup4  2:1.7.3-4
ii  libgcrypt20     1.7.6-2+deb9u1
ii  libgpg-error0   1.26-2
ii  libidn11        1.33-1
ii  libip4tc0       1.6.0+snapshot20161117-6
ii  libkmod2        23-2
ii  liblz4-1        0.0~r131-2+b1
ii  liblzma5        5.2.2-1.2+b1
ii  libmount1       2.29.2-1
ii  libpam0g        1.1.8-3.6
ii  libseccomp2     2.3.1-2.1
ii  libselinux1     2.6-3+b1
ii  libsystemd0     232-25+deb9u1
ii  mount           2.29.2-1
ii  procps          2:3.3.12-3
ii  util-linux      2.29.2-1

Versions of packages systemd recommends:
ii  dbus            1.10.18-1
ii  libpam-systemd  232-25+deb9u1

Versions of packages systemd suggests:
ii  policykit-1        0.105-18
pn  systemd-container  <none>
pn  systemd-ui         <none>

Versions of packages systemd is related to:
pn  dracut           <none>
ii  initramfs-tools  0.130
ii  udev             232-25+deb9u1

-- no debconf information

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
--- Begin Message ---
Am 20.08.2017 um 10:43 schrieb Jonas Meurer:
> Package: systemd
> Version: 232-25+deb9u1
> Severity: normal
> 
> Hello,
> 
> apparently, the system.conf.d include directories as mentioned in
> systemd-system.conf(5) manpage are not considered by the systemd daemon.
> 
> When trying to set a global environment variable using the
> DefaultEnvironment directive, I discovered that it is only recognized
> when set in /etc/systemd/system.conf. If I put it into an include file
> at either of /etc/systemd/system.conf.d/, /lib/systemd/system.conf.d/ or
> /run/systemd/system.conf.d/ it's not recognized:
> 
> # systemctl show-environment
> LANG=en_US.UTF-8
> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
> # echo 'DefaultEnvironment="VAR1=val1"'
>> /etc/systemd/system.conf.d/test.conf

You need to set the proper section when using a drop-in config file.
In this case this would be [Manager]

Something like this works fine here:

# cat /etc/systemd/system.conf.d/test.conf
[Manager]
DefaultEnvironment="VAR2=val2"

# systemctl show-environment
LANG=en_US.utf-8
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
VAR2=val2


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
_______________________________________________
Pkg-systemd-maintainers mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-systemd-maintainers

Reply via email to