From: Eric Andersen Date: Fri, 20 Jun 2003 09:57:30 +0000 (-0000) Subject: Fall back to looking in /lib/modules/modules.dep if X-Git-Tag: 1_00_pre1~52 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=25ea42de9bb947193ac759e7bef6067ddf9c77ad;p=oweals%2Fbusybox.git Fall back to looking in /lib/modules/modules.dep if /lib/modules//modules.dep is missing --- diff --git a/modutils/modprobe.c b/modutils/modprobe.c index 13f17b869..b4bff5100 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c @@ -128,8 +128,13 @@ static struct dep_t *build_dep ( void ) strcat ( filename, un.release ); strcat ( filename, "/modules.dep" ); - if (( fd = open ( filename, O_RDONLY )) < 0 ) - return 0; + if (( fd = open ( filename, O_RDONLY )) < 0 ) { + + /* Ok, that didn't work. Fall back to looking in /lib/modules */ + if (( fd = open ( "/lib/modules/modules.dep", O_RDONLY )) < 0 ) { + return 0; + } + } while ( reads ( fd, buffer, sizeof( buffer ))) { int l = bb_strlen ( buffer );