troglobit / finit

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

trouble changing default shell in finit.conf #354

Closed cornerfix closed 1 year ago

cornerfix commented 1 year ago

I have trouble changing default shell in finit.conf

I am not sure I am able to do that. In one place documentation seems to suggesrt this should be possible with e.g. PATH = /bin/bash in finit.conf

However, when i put this line in finit.conf - nothing happens. Finit still launches defautl shell (sh).

I am not sure whether or not this is a bug. In my finit.conf I have a bunch of commented lines (beginning with #) followed by 2 lines at the end of file:

SHELL=/bin/bash PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/libexec/finit:/

I tried putting spaces aroung = - nothing changed.

I am doing 'initctl reload' after every change.

Setting PATH seems to work.

troglobit commented 1 year ago

I'm not sure what you mean, the shell for a user is set in /etc/passwd. You can set environment variables in /etc/finit.conf to be used by your tasks and such, but variables like SHELL are not inherited via getty and login to the user's shell. The login program scrubs the environment before starting the users selected shell.

If you are talking about the rescue/fallback shell, it always defaults to _PATH_BSHELL from /usr/include/paths.h

troglobit commented 1 year ago

Closing due to lack of activity.