MightyPirates / OpenComputers

Home of the OpenComputers mod for Minecraft.
https://oc.cil.li
Other
1.59k stars 430 forks source link

"init" event not caught by /boot/94_shell.lua #2264

Closed Sukasa closed 7 years ago

Sukasa commented 7 years ago

Using /oc_spawnComputer to spawn in a computer, I installed openOS and then removed the install disk and rebooted.

I then typed 'hostname test', and then 'reboot'. After rebooting, the hostname does not show up as part of the shell prompt.

Entering the lua interpreter and running "event.push('init')" and closing the Lua interpreter resulted in the hostname showing up as part of the shell prompt. It seems that the "init" event is either being fired before 94_shell.lua can execute, or is not firing at all.

payonel commented 7 years ago

I believe all boot scripts (everything under /boot) are run before init is pushed. I'll review this workflow and fix later.

payonel commented 7 years ago

Ok, there is not a bug with the signaling system here, the issue is that the user profile runs after the init signal, and the user profile changes PS1 and ignores /etc/hostname

payonel commented 7 years ago

closed by https://github.com/MightyPirates/OpenComputers/commit/8f9eabc84e8dbdeb98c8ee2e7af85f00add91677