[pve-devel] [PATCH 2/2] moving more binary initialization code into prepare()

Wolfgang Bumiller w.bumiller at proxmox.com
Fri May 29 14:09:51 CEST 2015


> On May 29, 2015 at 1:59 PM Dietmar Maurer <dietmar at proxmox.com> wrote:
> > diff --git a/bin/pveceph b/bin/pveceph
> > index 18a4e8b..092c569 100755
> > --- a/bin/pveceph
> > +++ b/bin/pveceph
> > @@ -24,19 +24,34 @@ use PVE::CLIHandler;
> >  
> >  use base qw(PVE::CLIHandler);
> >  
> > -$ENV{'PATH'} = '/sbin:/bin:/usr/sbin:/usr/bin';
> 
> Sorry, but why do you want to move this inside prepare?

Because it doesn't seem to make sense to care about the $PATH in an
environment where the program isn't actually executed. The `printmanpod`
and `verifyapi` commands never touch the outer environment.
 
> > +my $cmddef;
> > +my $nodename;
> >  
> > -initlog ('pveceph');
> 
> same here

Because you're otherwise effectively opening a syslog connection at
buildtime, which doesn't make sense.

> And what exactly is the problem with nodename? Seems we can
> call PVE::INotify::nodename() before inotify_init without problems?
> So why all this restructuring?

Ah yes, I was just mislead by the name again. It only calls POSIX::uname so it
could stay.



More information about the pve-devel mailing list