Commit ec5e27ce authored by Michael Biebl's avatar Michael Biebl
Browse files

Do not accidentally re-enable /var/tmp cleaning

when migrating the TMPTIME setting from /etc/default/rcS.
Fix up existing broken configurations.

Closes: #738862
parent a807b976
...@@ -65,6 +65,9 @@ systemd (204-9) UNRELEASED; urgency=medium ...@@ -65,6 +65,9 @@ systemd (204-9) UNRELEASED; urgency=medium
systemd unit drop-in files to add corresponding dependencies. Also ship systemd unit drop-in files to add corresponding dependencies. Also ship
targets for the Debian specific $x-display-manager and targets for the Debian specific $x-display-manager and
$mail-transport-agent system facilities. (Closes: #690892) $mail-transport-agent system facilities. (Closes: #690892)
* Do not accidentally re-enable /var/tmp cleaning when migrating the TMPTIME
setting from /etc/default/rcS. Fix up existing broken configurations.
(Closes: #738862)
-- Michael Biebl <biebl@debian.org> Sat, 26 Apr 2014 10:41:18 +0200 -- Michael Biebl <biebl@debian.org> Sat, 26 Apr 2014 10:41:18 +0200
......
...@@ -42,7 +42,12 @@ if dpkg --compare-versions "$2" lt "33-1"; then ...@@ -42,7 +42,12 @@ if dpkg --compare-versions "$2" lt "33-1"; then
fi fi
# Do a one-time migration of the TMPTIME setting # Do a one-time migration of the TMPTIME setting
if dpkg --compare-versions "$2" lt "36-2"; then if dpkg --compare-versions "$2" lt "204-9"; then
# Fix up potentially broken tmp.conf, see Debian#738862
if [ -e /etc/tmpfiles.d/tmp.conf ]; then
sed -i 's,^\(d /var/tmp\),#\1,g' /etc/tmpfiles.d/tmp.conf
fi
if [ -f /etc/default/rcS ]; then if [ -f /etc/default/rcS ]; then
. /etc/default/rcS . /etc/default/rcS
fi fi
...@@ -50,9 +55,10 @@ if dpkg --compare-versions "$2" lt "36-2"; then ...@@ -50,9 +55,10 @@ if dpkg --compare-versions "$2" lt "36-2"; then
case "$TMPTIME" in case "$TMPTIME" in
-*|infinite|infinity) -*|infinite|infinity)
cat > /etc/tmpfiles.d/tmp.conf <<EOF cat > /etc/tmpfiles.d/tmp.conf <<EOF
# Automatically migrated from TMPTIME in /etc/default/rcS # Avoid clearing /tmp by shipping an empty /etc/tmpfiles.d/tmp.conf file
# Clear /var/tmp as in /usr/lib/tmpfiles.d/tmp.conf, but avoid clearing /tmp # which overrides /usr/lib/tmpfiles.d/tmp.conf.
d /var/tmp 1777 root root 30d # This file was automatically created because of local modifications in
# /etc/default/rcS where TMPTIME was set to infinite.
EOF EOF
;; ;;
esac esac
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment