[klibc] [PATCH v3 2/2] kinit: Add callsites to execute files in drop-directories.
Mike Waychison
mikew at google.com
Wed Aug 3 12:38:28 PDT 2011
This patch adds two callsites where kinit will go off and execute
executable files in hard-coded drop-directories.
We introduce a drop-directory at
/scripts/after-network: ipconfig is completed, but the root
filesystem isn't yet mounted.
/scripts/after-mount: the root filesystem is mounted at /root.
Each part executed is passed all of the command line flags in their
argv.
Signed-off-by: Mike Waychison <mikew at google.com>
---
usr/kinit/kinit.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/usr/kinit/kinit.c b/usr/kinit/kinit.c
index 4a1f40b..a824520 100644
--- a/usr/kinit/kinit.c
+++ b/usr/kinit/kinit.c
@@ -285,9 +285,13 @@ int main(int argc, char *argv[])
/* Initialize networking, if applicable */
do_ipconfig(cmdc, cmdv);
+ run_parts("/scripts/after-ipconfig", cmdc, cmdv);
+
check_path("/root");
do_mounts(cmdc, cmdv);
+ run_parts("/scripts/after-mount", cmdc, cmdv);
+
if (mnt_procfs) {
umount2("/proc", 0);
mnt_procfs = 0;
More information about the klibc
mailing list