troglobit / finit

Fast init for Linux. Cookies included
https://troglobit.com/projects/finit/
MIT License
622 stars 61 forks source link

[formatting] WARN or FAIL during reboot causes erroneous formatting chars #318

Closed hongkongkiwi closed 1 year ago

hongkongkiwi commented 1 year ago

Unfortunately I cannot share pictures easily on github.

When I was shutting down, a formatting character got leftover which changed my terminal text to be the warning colour (yellow). It's a very minor issue (!) but a bit annoying. But I've seen it happen before with red fail as well.

It's a bit inconsistent

You can see a colour picture here.

[ OK ] Taking down network interfaces ...
Nov 21 14:37:40 finit[1]: Stopped dbus-daemon[223]
Nov 21 14:37:40 finit[1]: Stopped mdevd[224]
Nov 21 14:37:40 finit[1]: Stopped chronyd[225]
Nov 21 14:37:40 finit[1]: Stopped qmi-proxy[226]
Nov 21 14:37:42 finit[1]: Stopping wifi:wpa_cli[1189], sending SIGKILL ...
[WARN] Killing WPA Events (wlan0) Daemon
[ OK ] Calling /usr/share/finit/hooks/svc/down/50-notify-nordic
[ OK ] Advising watchdog, system going down
Nov 21 14:37:43 finit-watchdog[540]: System going down ...
[ ⋯

I2C:   ready
SPI:   ready
DRAM:  256 MiB
troglobit commented 1 year ago

9pzAvShCwdDM

Yeah, that's a bit unfortunate. I'll see what I can do about making it a bit more atomic, but I can't make any promises since stdout/stderr is a shared medium and any process can basically open /dev/console and barf their output at any time.

troglobit commented 1 year ago

I dropped the progress output from the internal runparts when called to run hook scripts. It seemed to be the best approach, so should work better for you now.