From mboxrd@z Thu Jan 1 00:00:00 1970 From: Piter PUNK Date: Tue, 07 Nov 2006 12:39:34 +0000 Subject: Re: rule_generator.functions: invalid PATH? Message-Id: <45507E86.4000309@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: >> >>>> Which distributions do not provide readlink in /bin? >> And how many of these distributions actually support a stand-alone /usr? >> The affected maintainers can easily modify the script. > > Can't we do the silly "cd, pwd" trick we do in path_id? Maybe it work: sysreadlink() { local file="$1" local LINK="" local i [ -e "/sys$DEVPATH/$file" ] || return 0 cd /sys$DEVPATH for i in `ls -la $i | grep \>`; do LINK="$i"; done cd $LINK /bin/pwd } I do a quick test with /block/hdc (my cdrom) and it works fine. 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