freebsd-src/sbin/init
Jilles Tjoelker 779812d669 init: Use root's home directory in single-user mode
When starting single-user mode, use the home directory from user root as
current directory and for the HOME environment variable. If the
directory does not exist, set HOME=/.

Also adjust /root/.profile to stop setting HOME, since it should always
have been set now.

This is intended to keep shell startup files working in single-user mode
after /.profile has been removed.

Reviewed by:	emaste, ivy, kevans
MFC after:	1 week
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D52527
2025-09-16 22:36:41 +02:00
..
init.8 manuals: Fix "missing end of block" errors 2024-10-07 15:40:58 -03:00
init.c init: Use root's home directory in single-user mode 2025-09-16 22:36:41 +02:00
Makefile Move mntopts(3) suppport into libutil 2025-04-22 22:51:42 +01:00
Makefile.depend
NOTES
pathnames.h
ttys