diff options
-rw-r--r-- | scripts/kconfig/streamline_config.pl | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl index 9e66fa8dc52e..d7f7db73e587 100644 --- a/scripts/kconfig/streamline_config.pl +++ b/scripts/kconfig/streamline_config.pl | |||
@@ -264,7 +264,20 @@ foreach my $makefile (@makefiles) { | |||
264 | my %modules; | 264 | my %modules; |
265 | 265 | ||
266 | # see what modules are loaded on this system | 266 | # see what modules are loaded on this system |
267 | open(LIN,"/sbin/lsmod|") || die "Cant lsmod"; | 267 | my $lsmod; |
268 | |||
269 | foreach $dir ( ("/sbin", "/bin", "/usr/sbin", "/usr/bin") ) { | ||
270 | if ( -x "$dir/lsmod" ) { | ||
271 | $lsmod = "$dir/lsmod"; | ||
272 | last; | ||
273 | } | ||
274 | } | ||
275 | if (!defined($lsmod)) { | ||
276 | # try just the path | ||
277 | $lsmod = "lsmod"; | ||
278 | } | ||
279 | |||
280 | open(LIN,"$lsmod|") || die "Can not call lsmod with $lsmod"; | ||
268 | while (<LIN>) { | 281 | while (<LIN>) { |
269 | next if (/^Module/); # Skip the first line. | 282 | next if (/^Module/); # Skip the first line. |
270 | if (/^(\S+)/) { | 283 | if (/^(\S+)/) { |