From: Dietmar Maurer Date: Fri, 2 Jan 2015 13:15:09 +0000 (+0100) Subject: Daemon: change option name 'run_dir' to 'pidfile' X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=309d99e71818b7af5092152d02dff39894ecf432 Daemon: change option name 'run_dir' to 'pidfile' --- diff --git a/data/PVE/Daemon.pm b/data/PVE/Daemon.pm index 9c001e8..264f8be 100644 --- a/data/PVE/Daemon.pm +++ b/data/PVE/Daemon.pm @@ -411,20 +411,21 @@ sub new { $self = bless { name => $name, - run_dir => '/var/run', + pidfile => "/var/run/${name}.pid", env_restart_pve_daemon => $restart, env_pve_lock_fd => $lockfd, workers => {}, old_workers => {}, }, $class; + foreach my $opt (keys %params) { my $value = $params{$opt}; if ($opt eq 'restart_on_error') { $self->{$opt} = $value; } elsif ($opt eq 'stop_wait_time') { $self->{$opt} = $value; - } elsif ($opt eq 'run_dir') { + } elsif ($opt eq 'pidfile') { $self->{$opt} = $value; } elsif ($opt eq 'max_workers') { $self->{$opt} = $value; @@ -464,8 +465,6 @@ sub new { } } - $self->{pidfile} = "$self->{run_dir}/${name}.pid"; - $self->{nodename} = PVE::INotify::nodename(); $self->{cmdline} = [];