sv: make default service dir configurable (Vladimir wants it)
authorDenis Vlasenko <vda.linux@googlemail.com>
Thu, 6 Nov 2008 23:07:42 +0000 (23:07 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Thu, 6 Nov 2008 23:07:42 +0000 (23:07 -0000)
runit/Config.in
runit/sv.c

index beff1e7e2da9213d775a413b3237cf72ef17fa71..422ca7517da34e735e0bfc5a94a44b9bfec0b82c 100644 (file)
@@ -36,6 +36,14 @@ config SV
          sv reports the current status and controls the state of services
          monitored by the runsv supervisor.
 
+config SV_DEFAULT_SERVICE_DIR
+       string "Default directory for services"
+       default "/var/service"
+       depends on SV
+       help
+         Default directory for services.
+         Defaults to "/var/service"
+
 config SVLOGD
        bool "svlogd"
        default n
index 532bdb87d425e8864b20040ce739de081568ba33..7e5efdea997ef3b586c5dae42a1e43cc3bc8c407 100644 (file)
@@ -417,7 +417,7 @@ int sv_main(int argc, char **argv)
        unsigned i, want_exit;
        char *x;
        char *action;
-       const char *varservice = "/var/service/";
+       const char *varservice = CONFIG_SV_DEFAULT_SERVICE_DIR;
        unsigned services;
        char **servicex;
        unsigned waitsec = 7;