aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--src/rc.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6257af43..bcc71ac7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for Gentoo System Intialization ("rc") scripts
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPLv2
+ 22 Aug 2007; Roy Marples <uberlord@gentoo.org>:
+
+ Only open /proc/cmdline if it exists, #189686 thanks to Christian Affolter
+
21 Aug 2007; Roy Marples <uberlord@gentoo.org>:
Fix pppd getting the interface metric.
diff --git a/src/rc.c b/src/rc.c
index f4613a8a..1cb899a6 100644
--- a/src/rc.c
+++ b/src/rc.c
@@ -378,7 +378,10 @@ static char *proc_getent (const char *ent)
char *p;
char *value = NULL;
int i;
-
+
+ if (! rc_exists ("/proc/cmdline"))
+ return (NULL);
+
if (! (fp = fopen ("/proc/cmdline", "r"))) {
eerror ("failed to open `/proc/cmdline': %s", strerror (errno));
return (NULL);