Ab openSUSE 13.2 wird systemd statt sysvinit gestartet. Das neue Init-System erfordert eine andere Vorgehensweise als Sysvinit.
So ist zu beachten, das unter systemd die Abfrage der Cronjobs zum Löschen des /tmp-Ordners nicht mehr greift.
systemd reagiert nicht mehr auf die sysconfig Variablen in /etc/sysconfig/cron. (z.B. TMP_DIRS_TO_CLEAR)
Es muss also eine völlig andere Vorgehensweise gewählt werden.
Wir kopieren als Root die Datei
nach
Dort ändern wir die Einträge wie folgt:
Original
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
# See tmpfiles.d(5) for details
# Clear tmp directories separately, to make them easier to override
# SUSE policy: we don't clean those directories
d /tmp 1777 root root -
d /var/tmp 1777 root root -
# Exclude namespace mountpoints created with PrivateTmp=yes
x /tmp/systemd-private-*
x /var/tmp/systemd-private-*
X /tmp/systemd-private-*/tmp
X /var/tmp/systemd-private-*/tmp
Alles anzeigen
Änderung:
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
# See tmpfiles.d(5) for details
# Clear tmp directories separately, to make them easier to override
# SUSE policy: we don't clean those directories
D /tmp 1777 root root 1d
D /var/tmp 1777 root root 1d
# Exclude namespace mountpoints created with PrivateTmp=yes
x /tmp/systemd-private-*
x /var/tmp/systemd-private-*
X /tmp/systemd-private-*/tmp
X /var/tmp/systemd-private-*/tmp
Alles anzeigen
Man beachte die Änderung in den Zeilen 12 und 13 in beiden obigen Ausgaben.
Man kann "1d" auch ersetzen durch z.B. "5d" oder "10d" oder sonst irgend etwas anderes.
Das bewirkt ein Löschen aller Dateien die älter als 5 oder 10 Tage sind.
Datei speichern nicht vergessen.