Package: pppconfig
Version: 2.3.10
Severity: minor
The issue may be just a badly worded comment but I report it because
it might be a bug. /etc/ppp/ip-up.d/0dns-up contains this:
# Is resolv.conf a non-symlink on a ro root? If so give up.
if test -f "$RESOLVCONF" && test -e /proc/mounts; then
grep " / " /proc/mounts | grep -q " rw " || exit 0
fi
However, "test -f" does not test that $RESOLVCONF is a non-symlink.
What it tests is that $RESOLVCONF is a file, either immediately or
at the end of a symlink chain.
To really exit in the case that resolv.conf is a non-symlink on a ro
root, you need to do this:
if ! [ -L "$RESOLVCONF" ] && [ -f "$RESOLVCONF" ] && [ -e /proc/mounts ];
then
grep " / " /proc/mounts | grep -q " rw " || exit 0
fi
The absence of resolv.conf shouldn't prevent the script from exiting if
/etc/resolv.conf isn't a symlink and the root fs is read-only. Also,
not being able to read /proc/mounts should be treated as an error rather
than as a reason to continue. So I suggest the following code.
[ -e /proc/mounts ] || { echo "$0: Error: Could not read /proc/mounts" ;
exit 1 ; }
[ -L "$RESOLVCONF" ] || grep " / " /proc/mounts | grep -q " rw " || exit 0
-- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (500, 'testing'), (50, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.10
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)
Versions of packages pppconfig depends on:
ii dialog 1.0-20050306-1 Displays user-friendly dialog boxe
ii ppp 2.4.3-20041231+3 Point-to-Point Protocol (PPP) daem
ii whiptail 0.51.6-20 Displays user-friendly dialog boxe
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]