Files
Marc 721c919c7b ChibraxOS 2
Changes:
- kernel 6.0.2
- Broken init scripts
- Switch to bun for better peroformance an easier ffi
- Removed grup
- Efi support without graphics (at least graphics werent tested)
- Suppression de toutes les dépendance non libc
- new splash
- broken audio
- typescript support
- ls rewritten to be more reliable
2022-10-22 13:47:33 +02:00

36 lines
742 B
JavaScript

//@ts-check
import * as fs from 'fs'
import { init } from './initd.js'
import * as reboot from './reboot.js'
import { fHook } from './hook.js'
function panic() {
console.log("/!\\ INIT PANIK /!\\ LOSE CHIBRE")
while(1) {}
}
async function main() {
try {
console.clear()
await init()
//chainload into sheebr
if(fs.existsSync("/usr/bin/sheebr.js")) {
await fHook("/usr/bin/sheebr.js")
} else {
console.log('wrong shell path')
}
reboot.disableCtrlAltSupr()
reboot.powerOff()
console.log("End of init reached")
reboot.enableCtrlAltSupr()
panic()
} catch(e) {
console.log(e)
panic()
}
}
main()