All of lore.kernel.org
 help / color / mirror / Atom feed
From: Piter PUNK <piterpk@terra.com.br>
To: linux-hotplug@vger.kernel.org
Subject: Re: rule_generator.functions: invalid PATH?
Date: Tue, 07 Nov 2006 17:49:56 +0000	[thread overview]
Message-ID: <4550C744.4070606@terra.com.br> (raw)
In-Reply-To: <454EA668.7030203@kadzban.is-a-geek.net>

[-- Attachment #1: Type: text/plain, Size: 566 bytes --]

Hi,

	This patch removes the readlink in rule_generator.functions.
The patch uses cd and built-in pwd, as pointed by Kay Sievers and
Marco D'Itri and the file exist test is changed from [ -e ] to
[ -d ] as pointed by Muneda Takahiro.

				I hope it's ok now,

							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

[-- Attachment #2: remove_readlink.patch --]
[-- Type: text/plain, Size: 521 bytes --]

--- udev-103/extras/rule_generator/rule_generator.functions	2006-10-20 09:43:35.000000000 -0300
+++ udev-103pk/extras/rule_generator/rule_generator.functions	2006-11-07 15:38:13.000000000 -0200
@@ -18,8 +18,11 @@
 
 sysreadlink() {
 	local file="$1"
-	[ -e "/sys$DEVPATH/$file" ] || return 0
-	readlink -f /sys$DEVPATH/$file 2> /dev/null || true
+	local OLD_DIRECTORY=$(pwd)
+	[ -d "/sys$DEVPATH/$file" ] || return 0
+	cd /sys$DEVPATH/$file
+	pwd -P
+	cd "$OLD_DIRECTORY"
 }
 
 # Return true if a directory is writeable.

[-- Attachment #3: Type: text/plain, Size: 373 bytes --]

-------------------------------------------------------------------------
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&kid=120709&bid=263057&dat=121642

[-- Attachment #4: Type: text/plain, Size: 226 bytes --]

_______________________________________________
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

  parent reply	other threads:[~2006-11-07 17:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-06  3:05 rule_generator.functions: invalid PATH? Bryan Kadzban
2006-11-06 20:20 ` Marco d'Itri
2006-11-06 23:23 ` Bryan Kadzban
2006-11-06 23:42 ` Dan Nicholson
2006-11-07 11:35 ` Piter PUNK
2006-11-07 11:39 ` Marco d'Itri
2006-11-07 11:44 ` Piter PUNK
2006-11-07 12:22 ` Kay Sievers
2006-11-07 12:39 ` Piter PUNK
2006-11-07 12:42 ` Marco d'Itri
2006-11-07 12:56 ` Piter PUNK
2006-11-07 12:57 ` Kay Sievers
2006-11-07 12:58 ` Marco d'Itri
2006-11-07 13:09 ` Piter PUNK
2006-11-07 13:14 ` Marco d'Itri
2006-11-07 13:17 ` MUNEDA Takahiro
2006-11-07 13:19 ` Piter PUNK
2006-11-07 17:49 ` Piter PUNK [this message]
2006-11-07 17:55 ` Bryan Kadzban

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4550C744.4070606@terra.com.br \
    --to=piterpk@terra.com.br \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.