From 2e88073174f1d3f7ecaad1e28c46e4b7971c738d Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Wed, 6 Jan 2010 18:49:44 -0500 Subject: [PATCH] --- yaml --- r: 180871 b: refs/heads/master c: 88f66ea98d7ae6a8b6a34e38b1b4fa51abc1c9ca h: refs/heads/master i: 180869: 5abc8ad6228e7455c19bdce8ff6d66a94d61c51b 180867: 91143de34ee7e2b0ec5a2c5ddd673fd0530b0269 180863: c604f4472054ced0cc16ebb767314453066a7aed v: v3 --- [refs] | 2 +- trunk/scripts/kconfig/streamline_config.pl | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index b93e7f885bc3..47814e1bd8d3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 13d7e9385644d376a0816ad663ba3dfc45359f2f +refs/heads/master: 88f66ea98d7ae6a8b6a34e38b1b4fa51abc1c9ca diff --git a/trunk/scripts/kconfig/streamline_config.pl b/trunk/scripts/kconfig/streamline_config.pl index 9e66fa8dc52e..d7f7db73e587 100644 --- a/trunk/scripts/kconfig/streamline_config.pl +++ b/trunk/scripts/kconfig/streamline_config.pl @@ -264,7 +264,20 @@ sub read_kconfig { my %modules; # see what modules are loaded on this system -open(LIN,"/sbin/lsmod|") || die "Cant lsmod"; +my $lsmod; + +foreach $dir ( ("/sbin", "/bin", "/usr/sbin", "/usr/bin") ) { + if ( -x "$dir/lsmod" ) { + $lsmod = "$dir/lsmod"; + last; + } +} +if (!defined($lsmod)) { + # try just the path + $lsmod = "lsmod"; +} + +open(LIN,"$lsmod|") || die "Can not call lsmod with $lsmod"; while () { next if (/^Module/); # Skip the first line. if (/^(\S+)/) {