feat(shell): add informative SSH prompt

Create a default root profile when one does not already exist. Show the user, hostname, and working directory while preserving custom profiles.
This commit is contained in:
watermeko
2026-09-04 02:40:06 +00:00
committed by Guoguo
parent 7f95fe9bbd
commit 283c1390e5

View File

@@ -76,6 +76,7 @@ start_services() {
case "$1" in case "$1" in
start) start)
echo -n kvm > /boot/hostname.prefix echo -n kvm > /boot/hostname.prefix
[ -e /root/.profile ] || printf '%s\n' 'export PS1="\u@\h:\w# "' > /root/.profile
# Copy sensor config if the file exists # Copy sensor config if the file exists
[ -f /mnt/data/sensor_cfg.ini.LT ] && cp /mnt/data/sensor_cfg.ini.LT /mnt/data/sensor_cfg.ini [ -f /mnt/data/sensor_cfg.ini.LT ] && cp /mnt/data/sensor_cfg.ini.LT /mnt/data/sensor_cfg.ini