diff options
Diffstat (limited to 'serverboot/bootstrap.c')
-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); /* |