]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3669] Specify the pid file location for kea-lfc in the Memfile backend.
authorMarcin Siodelski <marcin@isc.org>
Thu, 29 Jan 2015 18:13:18 +0000 (19:13 +0100)
committerMarcin Siodelski <marcin@isc.org>
Thu, 29 Jan 2015 18:13:18 +0000 (19:13 +0100)
src/lib/dhcpsrv/memfile_lease_mgr.cc
src/lib/dhcpsrv/memfile_lease_mgr.h

index 34a6b2ef8e9fbbb5d116e10135e31e6096d72f50..0604892a5d68682e05ea2c8bacc2891b9670b228 100644 (file)
@@ -442,6 +442,9 @@ Memfile_LeaseMgr::appendSuffix(const std::string& file_name,
     case FILE_FINISH:
         name += ".completed";
         break;
+    case FILE_PID:
+        name += ".pid";
+        break;
     default:
         // Do not append any suffix for the FILE_CURRENT.
         ;
@@ -554,7 +557,7 @@ Memfile_LeaseMgr::lfcSetup() {
         // Universe: v4 or v6.
         args.push_back(lease_file4_ ? "-4" : "-6");
         // Previous file.
-        args.push_back("-p");
+        args.push_back("-x");
         args.push_back(appendSuffix(lease_file, FILE_PREVIOUS));
         // Input file.
         args.push_back("-i");
@@ -565,6 +568,10 @@ Memfile_LeaseMgr::lfcSetup() {
         // Finish file.
         args.push_back("-f");
         args.push_back(appendSuffix(lease_file, FILE_FINISH));
+        // PID file.
+        args.push_back("-p");
+        args.push_back(appendSuffix(lease_file, FILE_PID));
+
         // The configuration file is currently unused.
         args.push_back("-c");
         args.push_back("ignored-path");
index 76b15a677a268d2e3ad0a302fb3401b2f08b20ff..b90035476777c7fd32e2d8413c4af81c4512d52c 100644 (file)
@@ -123,7 +123,8 @@ public:
         FILE_INPUT,
         FILE_PREVIOUS,
         FILE_OUTPUT,
-        FILE_FINISH
+        FILE_FINISH,
+        FILE_PID
     };
 
     /// @brief The sole lease manager constructor