linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch to call dev.d scripts also with $SYMLINK
@ 2004-09-20 13:27 Harald Hoyer
  2004-10-05 21:18 ` Greg KH
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Harald Hoyer @ 2004-09-20 13:27 UTC (permalink / raw)
  To: linux-hotplug

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

especially useful to set pam_console ownerships for e.g. /dev/cdrom, which is a symlink to the $DEVNAME.

[-- Attachment #2: udev-030-symlink.patch --]
[-- Type: text/plain, Size: 921 bytes --]

--- udev-030/dev_d.c.symlink	2004-09-20 15:12:08.511594704 +0200
+++ udev-030/dev_d.c	2004-09-20 15:16:27.944154960 +0200
@@ -65,22 +84,31 @@
 {
 	char dirname[256];
 	char env_devname[NAME_SIZE];
+	char env_symlink[NAME_SIZE];
 	char *devname;
 	char *temp;
 
 	if (udev_dev_d == 0)
 		return;
 
+	env_devname[0] = 0;
+	env_symlink[0] = 0;
+
 	if (dev->type == 'b' || dev->type == 'c') {
 		strfieldcpy(env_devname, udev_root);
 		strfieldcat(env_devname, dev->name);
+		if (dev->symlink[0]) {
+			strfieldcpy(env_symlink, udev_root);
+			strfieldcat(env_symlink, dev->symlink);
+		} 
 	} else if (dev->type == 'n') {
 		strfieldcpy(env_devname, dev->name);
 		setenv("DEVPATH", devpath, 1);
 	}
-	else env_devname[0] = 0;
 	setenv("DEVNAME", env_devname, 1);
 	dbg("DEVNAME='%s'", env_devname);
+	setenv("SYMLINK", env_symlink, 1);
+	dbg("SYMLINK='%s'", env_symlink);
 
 	devname = strdup(dev->name);
 	if (!devname) {

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Patch to call dev.d scripts also with $SYMLINK
  2004-09-20 13:27 Patch to call dev.d scripts also with $SYMLINK Harald Hoyer
@ 2004-10-05 21:18 ` Greg KH
  2004-10-05 21:39 ` Kay Sievers
  2004-10-05 21:52 ` Greg KH
  2 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2004-10-05 21:18 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Sep 20, 2004 at 03:27:29PM +0200, Harald Hoyer wrote:
> especially useful to set pam_console ownerships for e.g. /dev/cdrom, which 
> is a symlink to the $DEVNAME.

Hm, this patch doesn't apply anymore.  Care to redo it?

thanks,

greg k-h


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Patch to call dev.d scripts also with $SYMLINK
  2004-09-20 13:27 Patch to call dev.d scripts also with $SYMLINK Harald Hoyer
  2004-10-05 21:18 ` Greg KH
@ 2004-10-05 21:39 ` Kay Sievers
  2004-10-05 21:52 ` Greg KH
  2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2004-10-05 21:39 UTC (permalink / raw)
  To: linux-hotplug

On Tue, Oct 05, 2004 at 02:18:44PM -0700, Greg KH wrote:
> On Mon, Sep 20, 2004 at 03:27:29PM +0200, Harald Hoyer wrote:
> > especially useful to set pam_console ownerships for e.g. /dev/cdrom, which 
> > is a symlink to the $DEVNAME.
> 
> Hm, this patch doesn't apply anymore.  Care to redo it?

Why not just ask udevinfo for the symlinks pointing to the device node?
That was the original idea, why we didn't put this in the dev.d/
environment.

  [kay@pim ~]$ udevinfo -q symlink -n /dev/hdc
  cdrom

Thanks,
Kay


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Patch to call dev.d scripts also with $SYMLINK
  2004-09-20 13:27 Patch to call dev.d scripts also with $SYMLINK Harald Hoyer
  2004-10-05 21:18 ` Greg KH
  2004-10-05 21:39 ` Kay Sievers
@ 2004-10-05 21:52 ` Greg KH
  2 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2004-10-05 21:52 UTC (permalink / raw)
  To: linux-hotplug

On Tue, Oct 05, 2004 at 11:39:33PM +0200, Kay Sievers wrote:
> On Tue, Oct 05, 2004 at 02:18:44PM -0700, Greg KH wrote:
> > On Mon, Sep 20, 2004 at 03:27:29PM +0200, Harald Hoyer wrote:
> > > especially useful to set pam_console ownerships for e.g. /dev/cdrom, which 
> > > is a symlink to the $DEVNAME.
> > 
> > Hm, this patch doesn't apply anymore.  Care to redo it?
> 
> Why not just ask udevinfo for the symlinks pointing to the device node?
> That was the original idea, why we didn't put this in the dev.d/
> environment.
> 
>   [kay@pim ~]$ udevinfo -q symlink -n /dev/hdc
>   cdrom

Ah, even better.  Glad I didn't apply it :)

greg k-h


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-10-05 21:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-20 13:27 Patch to call dev.d scripts also with $SYMLINK Harald Hoyer
2004-10-05 21:18 ` Greg KH
2004-10-05 21:39 ` Kay Sievers
2004-10-05 21:52 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).