Page 1 of 1

systemd: references path below legacy directory /var/run/

Posted: Tue 17. Mar 2020, 11:47
by stfn116
Hallo zusammen,
gelegentlich tauchen folgende Fehlermeldungen auf, die Dienste laufen alle weiterhin ganz normal.
Kann ich das vernachlässigen oder hat das mit dem Update von Deb9 auf Deb10 zu tun?

Code: Select all

Mär 17 11:33:10 panel.mytld.de systemd[1]: /lib/systemd/system/spamassassin.service:6: PIDFile= references path below legacy directory /var/run/, updating /var/run/spamd.pid → /run/spamd.pid; please update the unit fil
e accordingly.
Mär 17 11:33:10 panel.mytld.de systemd[1]: /lib/systemd/system/opendkim.service:7: PIDFile= references path below legacy directory /var/run/, updating /var/run/opendkim/opendkim.pid → /run/opendkim/opendkim.pid; please
 update the unit file accordingly.
Mär 17 11:33:10 panel.mytld.de systemd[1]: /lib/systemd/system/fail2ban.service:12: PIDFile= references path below legacy directory /var/run/, updating /var/run/fail2ban/fail2ban.pid → /run/fail2ban/fail2ban.pid; pleas
e update the unit file accordingly.
Mär 17 11:33:10 panel.mytld.de systemd[1]: /lib/systemd/system/dovecot.service:9: PIDFile= references path below legacy directory /var/run/, updating /var/run/dovecot/master.pid → /run/dovecot/master.pid; please update
 the unit file accordingly.
Mär 17 11:33:10 panel.mytld.de systemd[1]: Reloading.
Mär 17 11:33:10 panel.mytld.de systemd[1]: /lib/systemd/system/spamassassin.service:6: PIDFile= references path below legacy directory /var/run/, updating /var/run/spamd.pid → /run/spamd.pid; please update the unit fil
e accordingly.
Mär 17 11:33:10 panel.mytld.de systemd[1]: /lib/systemd/system/opendkim.service:7: PIDFile= references path below legacy directory /var/run/, updating /var/run/opendkim/opendkim.pid → /run/opendkim/opendkim.pid; please
 update the unit file accordingly.
Mär 17 11:33:10 panel.mytld.de systemd[1]: /lib/systemd/system/fail2ban.service:12: PIDFile= references path below legacy directory /var/run/, updating /var/run/fail2ban/fail2ban.pid → /run/fail2ban/fail2ban.pid; pleas
e update the unit file accordingly.
Mär 17 11:33:10 panel.mytld.de systemd[1]: /lib/systemd/system/dovecot.service:9: PIDFile= references path below legacy directory /var/run/, updating /var/run/dovecot/master.pid → /run/dovecot/master.pid; please update
 the unit file accordingly.
Mär 17 11:33:10 panel.mytld.de systemd[1]: Reloading.
Mär 17 11:33:10 panel.mytld.de systemd[1]: /lib/systemd/system/spamassassin.service:6: PIDFile= references path below legacy directory /var/run/, updating /var/run/spamd.pid → /run/spamd.pid; please update the unit fil
e accordingly.
Mär 17 11:33:10 panel.mytld.de systemd[1]: /lib/systemd/system/opendkim.service:7: PIDFile= references path below legacy directory /var/run/, updating /var/run/opendkim/opendkim.pid → /run/opendkim/opendkim.pid; please
 update the unit file accordingly.
Mär 17 11:33:10 panel.mytld.de systemd[1]: /lib/systemd/system/fail2ban.service:12: PIDFile= references path below legacy directory /var/run/, updating /var/run/fail2ban/fail2ban.pid → /run/fail2ban/fail2ban.pid; pleas
e update the unit file accordingly.
Mär 17 11:33:10 panel.mytld.de systemd[1]: /lib/systemd/system/dovecot.service:9: PIDFile= references path below legacy directory /var/run/, updating /var/run/dovecot/master.pid → /run/dovecot/master.pid; please update
 the unit file accordingly.
Mär 17 11:33:10 panel.mytld.de sudo[6535]:     root : TTY=unknown ; PWD=/root ; USER=root ; COMMAND=/usr/sbin/service clamav-daemon stop
Mär 17 11:33:10 panel.mytld.de sudo[6535]: pam_unix(sudo:session): session opened for user root by (uid=0)

Re: systemd: references path below legacy directory /var/run/

Posted: Thu 26. Mar 2020, 08:31
by stfn116
anyone?

Re: systemd: references path below legacy directory /var/run/

Posted: Fri 27. Mar 2020, 07:42
by space2place
Ich weiss jetzt nicht wie Du Dein Distupgrade durchgeführt hast.
Bei wir lasse ich immer die Einstellungen des Maintaner meine aktuellen Konfigs überschreiben.

Problem ist hier, dass früher von von systemd "/var/run" genutzt wurde, und wenn ich mich nicht ganz verlesen habe soll es jetzt unter "/run" abgelegt werden.
Was Du liest ist ein freundlicher Hinweis Deine Konfig anzupassen. Deswegen meine Eingangsworte.

Du kannst jetzt entweder die Pakete purgen und anschließend auch die noch verbleibenden Konfigs purgen (aptitude purge '~c') oder es manuell anpassen. Bei der Neuinstallation der Pakete musst Du auch hoffen das der Maintainer seine Pakete angepasst hat. Einige haben das wohl noch nicht gemacht.

Manuell z.B. für Fail2Ban:

Code: Select all

systemctl stop fail2ban
Nun die Datei editieren

Code: Select all

vi /etc/systemd/system/multi-user.target.wants/fail2ban.service
Den Einträge

Code: Select all

ExecStartPre=/bin/mkdir -p /var/run/fail2ban
PIDFile=/var/run/fail2ban/fail2ban.pid
mit

Code: Select all

ExecStartPre=/bin/mkdir -p /run/fail2ban
PIDFile=/run/fail2ban/fail2ban.pid
ersetzen

Danach

Code: Select all

systemctl daemon-reload
Als letztes

Code: Select all

systemctl start fail2ban
Dann sollte der Hinweis für Fail2Ban nicht mehr erscheinen.

Cu

Re: systemd: references path below legacy directory /var/run/

Posted: Fri 27. Mar 2020, 12:47
by Martin
Hallo,

bei einem dist-upgrade mit dem von uns bereitgestellten Script ist es wichtig die Konfigurationen beizubehalten. Dies ist entsprechend auch so in der Anleitung aufgeführt.

Ansonsten fehlen die Includes für die KeyHelp Konfiguration.

Re: systemd: references path below legacy directory /var/run/

Posted: Fri 27. Mar 2020, 19:09
by stfn116
Hallo Martin,

selbst bei einer "frischen" Debian 10 Installation ist das Verzeichnis der entsprechenden PID-Files in
/var/run
anstatt
/run/
Beispiel Opendkim:

Code: Select all

[Unit]
Description=OpenDKIM DomainKeys Identified Mail (DKIM) Milter
Documentation=man:opendkim(8) man:opendkim.conf(5) man:opendkim-genkey(8) man:opendkim-genzone(8) man:opendkim-testadsp(8) man:opendkim-testkey http://www.opendkim.org/docs.html
After=network.target nss-lookup.target

[Service]
Type=forking
PIDFile=/var/run/opendkim/opendkim.pid
UMask=0007
ExecStart=/usr/sbin/opendkim -x /etc/opendkim.conf
Restart=on-failure
ExecReload=/bin/kill -USR1 $MAINPID

[Install]
WantedBy=multi-user.target
~