Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754584Ab0ASQi2 (ORCPT ); Tue, 19 Jan 2010 11:38:28 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754542Ab0ASQi1 (ORCPT ); Tue, 19 Jan 2010 11:38:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48300 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750783Ab0ASQi0 (ORCPT ); Tue, 19 Jan 2010 11:38:26 -0500 Subject: Re: [PATCH] kconfig: dont hardcode path to lsmod From: Steven Rostedt To: John Kacur Cc: Mike Frysinger , =?ISO-8859-1?Q?Am=E9rico?= Wang , Andrew Morton , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org In-Reply-To: References: <1263883920-17289-1-git-send-email-vapier@gentoo.org> <20100119142545.GB3473@hack> <520f0cf11001190822t6d3221bco20739d586608bfde@mail.gmail.com> Content-Type: text/plain Organization: Red Hat Date: Tue, 19 Jan 2010 11:37:55 -0500 Message-Id: <1263919075.2737.134.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 996 Lines: 28 On Tue, 2010-01-19 at 17:29 +0100, John Kacur wrote: > diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl > index 0d80082..1803d2e 100644 > --- a/scripts/kconfig/streamline_config.pl > +++ b/scripts/kconfig/streamline_config.pl > @@ -238,7 +238,8 @@ foreach my $makefile (@makefiles) { > my %modules; > > # see what modules are loaded on this system > -open(LIN,"/sbin/lsmod|") || die "Cant lsmod"; > +# If lsmod isn't in the sbin dir, check if it is in the path > +open(LIN,"/sbin/lsmod|") || open(LIN,"lsmod|") || die "Cant lsmod"; I've tried this before, but it gives an error that the "|" pipe failed. -- Steve > while () { > next if (/^Module/); # Skip the first line. > if (/^(\S+)/) { -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/