[PATCH] config: PID_FILE_PATH required for FEATURE_CROND_SPECIAL_TIMES

James Byrne james.byrne at origamienergy.com
Wed Jul 17 15:53:04 UTC 2019


When crond is built with FEATURE_CROND_SPECIAL_TIMES enabled, it creates
a file called 'crond.reboot' at CONFIG_PID_FILE_PATH, but if
FEATURE_PIDFILE is disabled, this will be an empty string and the file
will be created in the root directory, which is undesirable.

This commit makes PID_FILE_PATH depend on FEATURE_CROND_SPECIAL_TIMES as
well as FEATURE_PIDFILE so that you get sensible behaviour in crond when
FEATURE_PIDFILE is switched off.

Signed-off-by: James Byrne <james.byrne at origamienergy.com>
---
 Config.in | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Config.in b/Config.in
index 14f54aacc..b62b2abb8 100644
--- a/Config.in
+++ b/Config.in
@@ -156,12 +156,13 @@ config FEATURE_PIDFILE
 config PID_FILE_PATH
 	string "Directory for pidfiles"
 	default "/var/run"
-	depends on FEATURE_PIDFILE
+	depends on FEATURE_PIDFILE || FEATURE_CROND_SPECIAL_TIMES
 	help
 	This is the default path where pidfiles are created.  Applets which
 	allow you to set the pidfile path on the command line will override
 	this value.  The option has no effect on applets that require you to
-	specify a pidfile path.
+	specify a pidfile path.  When crond has the 'Support special times'
+	option enabled, the 'crond.reboot' file is also stored here.
 
 config BUSYBOX
 	bool "Include busybox applet"
-- 
2.17.1



More information about the busybox mailing list