Your message dated Wed, 11 Jan 2012 11:12:47 +0000
with message-id <[email protected]>
and subject line Re: Bug#653333: [Pkg-sysvinit-devel] Bug#653333: initscripts:
/etc/mtab is replaced unnecessarily if it points to /proc/self/mounts
has caused the Debian Bug report #653333,
regarding initscripts: /etc/mtab is replaced unnecessarily if it points to
/proc/self/mounts
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.)
--
653333: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=653333
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: initscripts
Version: 2.88dsf-18
Severity: minor
Tags: patch
/proc/mounts is symlink to /proc/self/mounts. So there is no need to
replace /etc/mtab if it is symlink to /proc/self/mounts.
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-rc7 (SMP w/4 CPU cores)
Locale: LANG=ja_JP.eucJP, LC_CTYPE=ja_JP.eucJP (charmap=EUC-JP)
Shell: /bin/sh linked to /bin/dash
Versions of packages initscripts depends on:
ii coreutils 8.13-3
ii debianutils 4.1
ii libc6 2.13-24
ii lsb-base 3.2-28
ii mount 2.20.1-1
ii sysv-rc 2.88dsf-18
ii sysvinit-utils 2.88dsf-18
Versions of packages initscripts recommends:
pn e2fsprogs 1.42-1
pn psmisc <none>
initscripts suggests no packages.
-- no debconf information
diff -uNrp sysvinit-2.88dsf.orig/debian/src/initscripts/lib/init/mount-functions.sh sysvinit-2.88dsf/debian/src/initscripts/lib/init/mount-functions.sh
--- sysvinit-2.88dsf.orig/debian/src/initscripts/lib/init/mount-functions.sh 2011-12-13 20:16:15.000000000 +0000
+++ sysvinit-2.88dsf/debian/src/initscripts/lib/init/mount-functions.sh 2011-12-27 02:33:57.594409728 +0000
@@ -340,21 +340,24 @@ run_migrate ()
#
mtab_migrate ()
{
+ if [ -L "/etc/mtab" ] && [ -r /etc/mtab ]; then
+ case "$(readlink "/etc/mtab")" in
+ /proc/mounts|/proc/self/mounts)
+ return 0
+ esac
+ fi
+
# Don't symlink if /proc/mounts does not exist.
if [ ! -r "/proc/mounts" ]; then
return 1
fi
# Create symlink if not already present.
- if [ -L "/etc/mtab" ] && [ "$(readlink "/etc/mtab")" = "/proc/mounts" ]; then
- :
- else
- log_warning_msg "Creating compatibility symlink from /etc/mtab to /proc/mounts."
+ log_warning_msg "Creating compatibility symlink from /etc/mtab to /proc/mounts."
- rm -f "/etc/mtab" || return 1
- ln -fs "/proc/mounts" "/etc/mtab" || return 1
- [ -x /sbin/restorecon ] && /sbin/restorecon "/etc/mtab"
- fi
+ rm -f "/etc/mtab" || return 1
+ ln -fs "/proc/mounts" "/etc/mtab" || return 1
+ [ -x /sbin/restorecon ] && /sbin/restorecon "/etc/mtab"
return 0
}
--- End Message ---
--- Begin Message ---
tags 653333 + wontfix
thanks
On Tue, Dec 27, 2011 at 10:01:03PM +0900, Kusanagi Kouichi wrote:
> On 2011-12-27 09:48:27 +0100, Petter Reinholdtsen wrote:
> > [Kusanagi Kouichi]
> > > /proc/mounts is symlink to /proc/self/mounts. So there is no need to
> > > replace /etc/mtab if it is symlink to /proc/self/mounts.
> >
> > There is also, as far as I know, no reason to _not_ change it, given
> > that both give the same result. There is a reason to change it, and
> > that is to make Debian installations more consistent to avoid
> > surprises.
> >
> > Why should we _not_ change the /etc/mtab symlink from
> > /proc/self/mounts to /proc/mounts?
>
> If /etc/mtab must be a symlink to /proc/mounts and an admin must not
> change it, shouldn't policy state about that?
Policy mainly dictates best practices, and the state of /etc/mtab
is really only dictated by one package (initscripts), and of course
util-linux (which needs to support it). Additionally, some
architectures don't have a /proc/mounts, in which case we still
need to support a static mtab (Hurd). The current situation is
that we create the symlink if /proc/mounts exists, otherwise it's
left static.
I agree with Petter that while /proc/self/mounts is OK, having things
consistent across all installations is more important, and the end
result is the same anyway, given that /proc/mounts points to
/proc/self/mounts.
Regards,
Roger
--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
--- End Message ---
_______________________________________________
Pkg-sysvinit-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-sysvinit-devel