mirror of
https://github.com/troglobit/finit.git
synced 2026-10-18 10:59:34 +00:00
Fix #315: add environment variables to hook scripts
All hook scripts are called with at least one environment variable set, FINIT_HOOK_NAME, useful when reusing the same hook script for multiple hook points. It is set to the string name, also used by the path, e.g., hook/net/up. For all hook points from hook/sys/shutdown and later, FINIT_SHUTDOWN is also set, to one of: halt, poweroff, reboot. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
d4ee44e27f
commit
70c2939596
7 files changed
+61
-6
No files matched your search
+1
-1
@@ -602,7 +602,7 @@ static void bootstrap_worker(void *work)
|
||||
* Run startup scripts in the runparts directory, if any.
|
||||
*/
|
||||
if (runparts && fisdir(runparts) && !rescue)
|
||||
run_parts(runparts, NULL, 1);
|
||||
run_parts(runparts, NULL, NULL, 1);
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user