From a0382dfab86db5718a9485df970fb903d0ef59b4 Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Fri, 13 Jun 2008 20:31:49 -0300 Subject: [PATCH] Keep /etc/resolveconf/run code commented until we check Xandros Signed-off-by: Claudio Matsuoka --- Changelog | 2 ++ finit-alt.c | 24 +++++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index f4bc7fbb..c0d55c72 100644 --- a/Changelog +++ b/Changelog @@ -3,6 +3,8 @@ - write runlevel to utmp, needed by Printerdrake (Pascal Terjan) - fix ownership of /var/run/utmp (reported by Pascal Terjan) - remove obsolete code to load AGP drivers + - remove useless (?) /etc/resolveconf/run support (blino) + - add support to /var/run/resolvconf in Mandriva (blino) O.4 (20080516) - default username for finit-alt configurable in Makefile diff --git a/finit-alt.c b/finit-alt.c index 41342b02..8a66c402 100644 --- a/finit-alt.c +++ b/finit-alt.c @@ -57,6 +57,7 @@ THE SOFTWARE. #define PAM_CONSOLE #define LISTEN_INITCTL #define RUNLEVEL 5 +#define USE_VAR_RUN_RESOLVCONF #elif defined DIST_EEEXUBUNTU /* eeeXubuntu */ #define RANDOMSEED "/var/lib/urandom/random-seed" #define SYSROOT "/sysroot" @@ -310,7 +311,7 @@ int main() chardev("/dev/urandom", 0666, 1, 9); chardev("/dev/ptmx", 0666, 5, 2); chardev("/dev/null", 0666, 1, 3); - chmod("/dev/null", 0666); + chmod("/dev/null", 0666); /* blino's sanity check */ chardev("/dev/mem", 0640, 1, 1); chardev("/dev/tty0", 0660, 4, 0); chardev("/dev/input/mice", 0660, 13, 63); @@ -338,8 +339,29 @@ int main() /* * Network stuff */ +#if 0 + /* CM: not sure if anyone actually needs this, check Xandros in Eeepc */ + + makepath("/dev/shm/network"); + makepath("/dev/shm/resolvconf/interface"); + + if ((dir = opendir("/etc/resolvconf/run/interface")) != NULL) { + while ((d = readdir(dir)) != NULL) { + if (isalnum(d->d_name[0])) + continue; + snprintf(line, LINE_SIZE, + "/etc/resolvconf/run/interface/%s", d->d_name); + unlink(line); + } + + closedir(dir); + } +#endif + +#ifdef USE_VAR_RUN_RESOLVCONF makepath("/var/run/resolvconf/interface"); symlink("../../../etc/resolv.conf", "/var/run/resolvconf/resolv.conf"); +#endif touch("/var/run/utmp"); chown("/var/run/utmp", 0, getgroup("utmp"));