149 |
char **argv; |
char **argv; |
150 |
{ |
{ |
151 |
int die = 0; |
int die = 0; |
152 |
int script_paging_file (const struct cmd *cmd, int *val) |
int script_paging_file (const struct cmd *cmd, integer_t *val) |
153 |
{ |
{ |
154 |
printf ("*** paging files no longer supported in boot scripts ***\n\a" |
printf ("*** paging files no longer supported in boot scripts ***\n\a" |
155 |
"*** use swapon %s and/or /etc/fstab instead ***\n", |
"*** use swapon %s and/or /etc/fstab instead ***\n", |
156 |
cmd->path); |
cmd->path); |
157 |
return 0; |
return 0; |
158 |
} |
} |
159 |
int script_serverboot_ctl (const struct cmd *cmd, int *val) |
int script_serverboot_ctl (const struct cmd *cmd, integer_t *val) |
160 |
{ |
{ |
161 |
const char *const ctl = cmd->path; |
const char *const ctl = cmd->path; |
162 |
if (!strcmp (ctl, "die")) |
if (!strcmp (ctl, "die")) |
323 |
|
|
324 |
/* Initialize boot script variables. */ |
/* Initialize boot script variables. */ |
325 |
if (boot_script_set_variable ("host-port", VAL_PORT, |
if (boot_script_set_variable ("host-port", VAL_PORT, |
326 |
(int) bootstrap_master_host_port) |
(integer_t) bootstrap_master_host_port) |
327 |
|| boot_script_set_variable ("device-port", VAL_PORT, |
|| boot_script_set_variable ("device-port", VAL_PORT, |
328 |
(int) bootstrap_master_device_port) |
(integer_t) bootstrap_master_device_port) |
329 |
|| boot_script_set_variable ("root-device", VAL_STR, |
|| boot_script_set_variable ("root-device", VAL_STR, |
330 |
(int) root_name) |
(integer_t) root_name) |
331 |
|| boot_script_set_variable ("boot-args", VAL_STR, |
|| boot_script_set_variable ("boot-args", VAL_STR, |
332 |
(int) flag_string) |
(integer_t) flag_string) |
333 |
|| boot_script_define_function ("add-paging-file", VAL_NONE, |
|| boot_script_define_function ("add-paging-file", VAL_NONE, |
334 |
&script_paging_file) |
&script_paging_file) |
335 |
|| boot_script_define_function ("add-raw-paging-file", VAL_NONE, |
|| boot_script_define_function ("add-raw-paging-file", VAL_NONE, |
347 |
if (cmdline != NULL |
if (cmdline != NULL |
348 |
&& boot_script_set_variable ("kernel-command-line", |
&& boot_script_set_variable ("kernel-command-line", |
349 |
VAL_STR, |
VAL_STR, |
350 |
(int) cmdline)) |
(integer_t) cmdline)) |
351 |
panic ("bootstrap: error setting boot script variables"); |
panic ("bootstrap: error setting boot script variables"); |
352 |
|
|
353 |
parse_script (&scriptf); |
parse_script (&scriptf); |