From mboxrd@z Thu Jan 1 00:00:00 1970 From: Piter PUNK Date: Tue, 07 Nov 2006 13:09:04 +0000 Subject: Re: rule_generator.functions: invalid PATH? Message-Id: <45508570.1050706@terra.com.br> List-Id: References: <454EA668.7030203@kadzban.is-a-geek.net> In-Reply-To: <454EA668.7030203@kadzban.is-a-geek.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Kay Sievers wrote: > On 11/7/06, Marco d'Itri wrote: >> On Nov 07, Piter PUNK wrote: >> >>> /bin/pwd >> pwd is a shell built-in. > > Right, and "pwd -P" returns the real path, without the need for the loop. sysreadlink() { local file="$1" local LINK="" local i [ -e "/sys$DEVPATH/$file" ] || return 0 cd /sys$DEVPATH/$file pwd -P } Tested again with /block/hdc and works fine. In dash "pwd -P" works fine? Thanks for your help Piter PUNK -- | E-Mail: piterpk@terra.com.br (personal) .|. roberto.batista@ntux.com.br (professional) /V\ // \\ UIN:116043354 Homepage:http://piterpunk.info02.com.br /( )\ ^`~'^ ----> Slackware Linux - The Best One! <---- #105432 ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel