Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Why changes to inittab, call telinit u during halt/reboot?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Wed Mar 13, 2019 10:41 pm    Post subject: Why changes to inittab, call telinit u during halt/reboot? Reply with quote

Code:
$ diff /etc/inittab /etc/._cfg0000_inittab
23c23,24
< l0:0:wait:/sbin/openrc shutdown
---
> l0u:0:wait:/sbin/telinit u
> l0:0:wait:/sbin/openrc shutdown
29a31
> l6u:6:wait:/sbin/telinit u
man telinit wrote:
U or u tell init to re-execute itself (preserving the state). No re-examining of /etc/inittab file happens. Runlevel should be one of
Ss0123456 otherwise request would be silently ignored.
It doesn't appear that upstream provides a default inittab, and the statement of the obvious (call telinit u when halting or rebooting) isn't helpful with the important part, why the change was made.

So, does anyone have an idea why this might have been done? It kind of seems kludgy.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Thu Mar 14, 2019 9:22 pm    Post subject: Reply with quote

If you're unmounting filesystems, /sbin/init will usually be the last open filehandle after killall5's done its work. Possibly this is an attempt to release that FH so a full unmount can be done (on brittle filesystems like ext2, which don't like being mounted when the system goes down). Also, it's been a while since I touched this stuff, but I think initramfs/pivot_root has similar weird implications.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Fri Mar 15, 2019 3:05 am    Post subject: Reply with quote

Thanks, that sounds plausible.

It had the feel of "adjusting" a tube TV by whacking it :)
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum