diff options
author | Roland McGrath <roland@gnu.org> | 1999-05-30 03:01:22 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1999-05-30 03:01:22 +0000 |
commit | 61854b5b1b5d082f9cfdf3c28e6761da3f85c978 (patch) | |
tree | 24206bc6901b4e7a74f0e2f368d89e8d562fdea4 | |
parent | d1d86177761eedee8267b48a1795440c30d55722 (diff) |
1999-05-29 Roland McGrath <roland@baalperazim.frob.com>
* bootstrap.c (main): Define $(serverboot) function for "serverboot
controls", control command replacing the pathname. For command "die",
terminate ourselves after running the boot script, no default pager.
-rw-r--r-- | serverboot/bootstrap.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/serverboot/bootstrap.c b/serverboot/bootstrap.c index d103e60f..58096f21 100644 --- a/serverboot/bootstrap.c +++ b/serverboot/bootstrap.c @@ -144,6 +144,7 @@ main(argc, argv) int argc; char **argv; { + int die = 0; int script_paging_file (const struct cmd *cmd, int linux_signature) { if (add_paging_file (bootstrap_master_device_port, cmd->path, @@ -163,6 +164,15 @@ main(argc, argv) { return script_paging_file (cmd, 1); } + int script_serverboot_ctl (const struct cmd *cmd, int *val) + { + const char *const ctl = cmd->path; + if (!strcmp (ctl, "die")) + die = 1; + else + printf ("(serverboot): Unknown control word `%s' ignored\n", ctl); + return 0; + } register kern_return_t result; struct file scriptf; @@ -320,6 +330,9 @@ main(argc, argv) || boot_script_define_function ("add-linux-paging-file", VAL_NONE, &script_add_linux_paging_file) + || boot_script_define_function ("serverboot", + VAL_NONE, + &script_serverboot_ctl) ) panic ("bootstrap: error setting boot script variables"); @@ -392,6 +405,13 @@ main(argc, argv) } #endif + if (die) + { + printf ("(serverboot): terminating, not becoming default pager\n"); + while (1) + task_terminate (mach_task_self ()); + } + default_pager_initialize (bootstrap_master_host_port); /* |