Arch Linux /usr/lib/initcpio/busybox
is owned by package mkinitcpio-busybox 1.27.2-1 and is configured low on features, for example CONFIG_FEATURE_USE_INITTAB is not set.
In a custom initramfs, containing that busybox, I managed to get ssh network logins that do source /etc/profile
working. Also there is an ash shell prompt visible on the VGA monitor.
However that "vga" shell doesn't source /etc/profile
.
Q:Difference between Login Shell and Non-Login Shell? makes me think that this shell is not a login shell.
That shell is started by /init
:
exec setsid sh -c 'exec sh </dev/tty1 >/dev/tty1 2>&1'
Regression:
exec setsid sh -c 'exec sh -i </dev/tty1 >/dev/tty1 2>&1'
exec setsid sh -c 'exec sh - </dev/tty1 >/dev/tty1 2>&1'
exec setsid sh -c 'exec -sh </dev/tty1 >/dev/tty1 2>&1'
How to make this busybox
ash
shell to source /etc/profile
and/or make it an (auto) login shell?