mirror of
https://github.com/openvswitch/ovs
synced 2025-10-25 15:07:05 +00:00
Make installation directories overridable at runtime.
This makes it possible to run tests that need access to installation directories, such as the rundir, without having access to the actual installation directories (/var/run is generally not world-writable), by setting environment variables. This is not a good way to do things in general--usually it would be better to choose the correct directories at configure time--so for now this is undocumented.
This commit is contained in:
@@ -67,8 +67,8 @@ char *
|
||||
make_pidfile_name(const char *name)
|
||||
{
|
||||
return (!name
|
||||
? xasprintf("%s/%s.pid", ovs_rundir, program_name)
|
||||
: abs_file_name(ovs_rundir, name));
|
||||
? xasprintf("%s/%s.pid", ovs_rundir(), program_name)
|
||||
: abs_file_name(ovs_rundir(), name));
|
||||
}
|
||||
|
||||
/* Sets up a following call to daemonize() to create a pidfile named 'name'.
|
||||
@@ -500,7 +500,7 @@ daemon_usage(void)
|
||||
" --pidfile[=FILE] create pidfile (default: %s/%s.pid)\n"
|
||||
" --overwrite-pidfile with --pidfile, start even if already "
|
||||
"running\n",
|
||||
ovs_rundir, program_name);
|
||||
ovs_rundir(), program_name);
|
||||
}
|
||||
|
||||
/* Opens and reads a PID from 'pidfile'. Returns the nonnegative PID if
|
||||
|
||||
Reference in New Issue
Block a user