Bug#490273: PATH setting in hotplug.functions

2008-07-11 Thread Peter Eisentraut
Package: udev
Version: 0.124-2
Severity: normal

Somewhere between udev 0.114-2 and 0.124-2, the PATH setting in 
hotplug.functions was changed from

PATH='/sbin:/bin:/usr/sbin:/usr/bin'

to

PATH='/sbin:/bin'

This causes problems for other packages using the functions in this file, 
e.g., ntpdate has been getting a few complaints lately like #490225.  
Basically, we are doing

#!/bin/sh

set -e

PATH=/sbin:/bin:/usr/sbin:/usr/bin

if [ -r /lib/udev/hotplug.functions ]; then
. /lib/udev/hotplug.functions
wait_for_file /usr/sbin/ntpdate-debian
fi

 do more work using programs in /usr/bin ...

Maybe hotplug.functions isn't actually intended to be used by other packages, 
but you once advised me to use it in this instance.  I can try to use 
something else.

Otherwise, perhaps the path shouldn't be overwritten but preprended to?

if [ -z $PATH]; then # unlikely?
PATH='/sbin:/bin'
else
PATH='/sbin:/bin':$PATH
fi



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#490273: PATH setting in hotplug.functions

2008-07-11 Thread Marco d'Itri
On Jul 11, Peter Eisentraut [EMAIL PROTECTED] wrote:

 #!/bin/sh
 
 set -e
 
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 
 if [ -r /lib/udev/hotplug.functions ]; then
 . /lib/udev/hotplug.functions
 wait_for_file /usr/sbin/ntpdate-debian
 fi

Fixed, but where does this code comes from?
It's seriously broken, programs must use wait_for_file only after forking.

-- 
ciao,
Marco


signature.asc
Description: Digital signature


Bug#490273: PATH setting in hotplug.functions

2008-07-11 Thread Peter Eisentraut
Am Freitag, 11. Juli 2008 schrieb Marco d'Itri:
 On Jul 11, Peter Eisentraut [EMAIL PROTECTED] wrote:
  #!/bin/sh
 
  set -e
 
  PATH=/sbin:/bin:/usr/sbin:/usr/bin
 
  if [ -r /lib/udev/hotplug.functions ]; then
  . /lib/udev/hotplug.functions
  wait_for_file /usr/sbin/ntpdate-debian
  fi

 Fixed, but where does this code comes from?
 It's seriously broken, programs must use wait_for_file only after forking.

Yeah, there is actually a

( ... ) 

around it.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]