Move main program files to 'prog', add support for CLI-based interfaces (no boot file).
This commit is contained in:
15
lib/boot.ks
15
lib/boot.ks
@ -8,11 +8,17 @@ function Bootstrap {
|
||||
if debug {
|
||||
// Open a terminal and run init.
|
||||
CORE:PART:GETMODULE("kOSProcessor"):DOEVENT("Open Terminal").
|
||||
run "/init".
|
||||
if init <> "" {
|
||||
run "/init".
|
||||
}
|
||||
} else {
|
||||
DeletePath("1:" + bootfile).
|
||||
// Set OS to boot and restart.
|
||||
set core:bootfilename to "/init".
|
||||
if init = "" {
|
||||
set CORE:BOOTFILENAME to init.
|
||||
} else {
|
||||
set CORE:BOOTFILENAME to "/init".
|
||||
}
|
||||
reboot.
|
||||
}
|
||||
}
|
||||
@ -38,6 +44,11 @@ function copyLibs {
|
||||
|
||||
function compileInit {
|
||||
parameter init, debug is false.
|
||||
|
||||
if init = "" {
|
||||
return.
|
||||
}
|
||||
|
||||
if debug {
|
||||
copypath("0:" + init, "1:/init").
|
||||
return.
|
||||
|
Reference in New Issue
Block a user