[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#3290 acknowledged by developer (was: sysvinit path doesn't include /usr/local/{,s}bin)



You (rdm@tad.micro.umn.edu) wrote:
> Raul Miller
> > > > /etc/init.d/boot sets up a path that doesn't include /usr/local/bin
> > > > nor /usr/local/sbin.  In my opinion, the PATH= from /etc/profile
> > > > (supplied by the bash package) should be used here as well.  It's
> > > > rather silly to have two different default paths for root.
>  
> Dominik Kubla:
> > > No it is not.  It is the basic law of system administration that during
> > > system setup the PATH should be as short as possible and only include
> > > _MACHINE_LOCAL_ path names (/usr/local might be shared over NFS!).
> 
> Miquel van Smoorenburg:
> > OK, so I'm closing this bug report.
> 
> I think there's a very big opportunity here that's being missed.
> 
> We have a large problem of configuring the default path for shells
> and such that don't use /etc/profile.  It's fine to have a restricted
> path during boot, but this path setting persists long after boot, and
> is inherited by everything that init inherits.

Nope, if a daemon started by init needs its PATH set it's probably
broken, and the rest goes through login which clears the environment
anyway (most logins reset the PATH - I don't know what the Debian login
does). So you should fix login.

If you really want to set an environment or ulimits or whatever for
everything that is spawned by init use "initscript" - see man
initscript(8). It does everything you're talking about.

Mike.
-- 
  Miquel van    | Cistron Internet Services   --    Alphen aan den Rijn.
  Smoorenburg,  | mailto:info@cistron.nl          http://www.cistron.nl/
miquels@het.net | Tel: +31-172-419445 (Voice) 430979 (Fax) 442580 (Data)


Reply to: