From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthias Schwarzott Date: Thu, 29 Mar 2007 07:49:41 +0000 Subject: Starting helper programs - explicit check instead of just adding Message-Id: <200703290949.41993.zzam@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org Hi there! Generally executing udev-helper programs located in /lib/udev works well=20 (without specifying a path). Only one rule I use, just does not work like one could think: SUBSYSTEM=3D"pnp", ENV{MODALIAS}!=3D"?*", RUN+=3D"/bin/sh -c 'while read id= ;=20 do /lib/udev/modprobe.sh pnp:d$$id; done < /sys$devpath/id'" Here I have to explicitly give the full path to modprobe.sh. The code uses this to look for not fully qualified pathes: if (strchr(argv[0], '/') =3D NULL) { strlcpy(program, "/lib/udev/", sizeof(program)); strlcat(program, argv[0], sizeof(program)); argv[0] =3D program; } ... execv(argv[0], argv); And that only looks at the main program started in the cmd-line and not wha= t=20 this shell does. Is this something that could be changed? By e.g. using some exec-call respecting path? Or keeping the code as it is, but still adding /lib/udev to PATH for such=20 embedded calls to work like one could assume with common-sense? Matthias --=20 Matthias Schwarzott (zzam) ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=DEVD= EV _______________________________________________ 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