diff options
author | Ben Pfaff <blp@nicira.com> | 2010-11-29 12:28:26 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2010-11-29 16:29:11 -0800 |
commit | b43c6fe279a5630dfbc0273e06bd1e8ca530ba35 (patch) | |
tree | 0b3ccc94c79b5058006a0deb88e322364fd4232b /lib/daemon.c | |
parent | 614c4892032f424efa5f0ec404b2d499acad254d (diff) |
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.
Diffstat (limited to 'lib/daemon.c')
-rw-r--r-- | lib/daemon.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/daemon.c b/lib/daemon.c index c6489cd5..c0f16829 100644 --- a/lib/daemon.c +++ b/lib/daemon.c @@ -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 |