mirror of
https://github.com/troglobit/finit.git
synced 2026-11-07 16:01:08 +00:00
Follow-up to #338: return early if conditions are not available
As pointed out by Jack Newman in issue #338, when conditions are not available (at boot before cond_init(), or shutdown when /var or /var/run have been unmounted) we should not try to create any conditions. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
89772bf6c0
commit
308b7c5197
1 file changed
+1
-1
+1
-1
@@ -261,7 +261,7 @@ void plugin_run_hook(hook_point_t no, void *arg)
|
|||||||
/* Conditions are stored in /run, so don't try to signal
|
/* Conditions are stored in /run, so don't try to signal
|
||||||
* conditions for any hooks before filesystems have been
|
* conditions for any hooks before filesystems have been
|
||||||
* mounted. */
|
* mounted. */
|
||||||
if (no >= HOOK_MOUNT_ERROR && no <= HOOK_SHUTDOWN)
|
if (cond_is_available() && no >= HOOK_MOUNT_ERROR && no <= HOOK_SHUTDOWN)
|
||||||
cond_set_oneshot(hook_cond[no]);
|
cond_set_oneshot(hook_cond[no]);
|
||||||
|
|
||||||
service_step_all(SVC_TYPE_RUNTASK);
|
service_step_all(SVC_TYPE_RUNTASK);
|
||||||
|
|||||||
Reference in new issue
Block a user