[Pkg-sysvinit-devel] Bug#693398: broken cleanup handling in *-bootclean
Michael Biebl
biebl at debian.org
Fri Nov 16 03:07:17 UTC 2012
Package: initscripts
Version: 2.88dsf-32
Severity: important
Hi,
initscripts ships three scripts which basically do all the same, i.e.
run clean_all() from /lib/init/bootclean.sh:
/etc/init.d/checkroot-bootclean.sh
/etc/init.d/mountall-bootclean.sh
/etc/init.d/mountnfs-bootclean.sh
I think there are several issues here:
- /run is a tmpfs nowadays, and mounted in mountkernfs, i.e. before any
of those scripts starts. Thus cleaning the tmpfs is pointless.
If the goal is to clean the underlying file system behind /run, then
this script would have to be run before mountkernfs. But at that point
/ is not yet writable.
- mountnfs-bootclean looks like it can be dropped completely.
- mountall-bootclean should probably only run clean_tmp(), I don't see
why we would want to clean /run, /run/shm or /run/lock.
The only exception here is the cleanup of /lib/init/rw, but we can
just as well do that as a one-time migration via a rm -rf in the
maintainer scripts (in jessie).
- checkroot-bootclean runs after mountkernfs, so again cleaning up
/run/{,lock,shm} seems pointless, so we again probably should only run
clean_tmp() here.
If /tmp is on a separate partition or a tmpfs, then cleaning the
underlying directory might be useful. In that case though, we need to
make sure that mountall is only run after that cleanup has finished,
so mountall needs a Required-Start: checkroot-bootclean.
Michael
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.5-trunk-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages initscripts depends on:
ii coreutils 8.20-1
ii debianutils 4.3.4
ii libc6 2.13-36
ii lsb-base 4.1+Debian8
ii mount 2.20.1-5.2
ii sysv-rc 2.88dsf-32
ii sysvinit-utils 2.88dsf-32
Versions of packages initscripts recommends:
ii e2fsprogs 1.42.5-1
ii psmisc 22.20-1
initscripts suggests no packages.
-- Configuration Files:
/etc/default/tmpfs changed [not included]
-- no debconf information
More information about the Pkg-sysvinit-devel
mailing list