mirror of
https://github.com/sipeed/NanoKVM.git
synced 2026-09-11 00:22:56 -05:00
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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user