aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modutils/modprobe.c9
1 files changed, 7 insertions, 2 deletions
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 )
128 strcat ( filename, un.release ); 128 strcat ( filename, un.release );
129 strcat ( filename, "/modules.dep" ); 129 strcat ( filename, "/modules.dep" );
130 130
131 if (( fd = open ( filename, O_RDONLY )) < 0 ) 131 if (( fd = open ( filename, O_RDONLY )) < 0 ) {
132 return 0; 132
133 /* Ok, that didn't work. Fall back to looking in /lib/modules */
134 if (( fd = open ( "/lib/modules/modules.dep", O_RDONLY )) < 0 ) {
135 return 0;
136 }
137 }
133 138
134 while ( reads ( fd, buffer, sizeof( buffer ))) { 139 while ( reads ( fd, buffer, sizeof( buffer ))) {
135 int l = bb_strlen ( buffer ); 140 int l = bb_strlen ( buffer );