pxe: improve autostart script

This commit is contained in:
pedro 2024-09-26 19:41:16 -03:00
parent 7675974a1c
commit 920d0ef8fa

View file

@ -263,16 +263,16 @@ prepare_app() {
# startup script execution # startup script execution
cat > "${ISO_PATH}/chroot/root/.profile" <<END cat > "${ISO_PATH}/chroot/root/.profile" <<END
set -x
if [ -f /tmp/workbench_lock ]; then if [ -f /tmp/workbench_lock ]; then
return 0 return 0
else else
touch /tmp/workbench_lock touch /tmp/workbench_lock
fi fi
set -x
stty -echo # Do not show what we type in terminal so it does not meddle with our nice output stty -echo # Do not show what we type in terminal so it does not meddle with our nice output
dmesg -n 1 # Do not report *useless* system messages to the terminal dmesg -n 1 # Do not report *useless* system messages to the terminal
# detect pxe env # detect pxe env
if [ -d /run/live/medium ]; then if [ -d /run/live/medium ]; then
mount --bind /run/live/medium /mnt mount --bind /run/live/medium /mnt
@ -287,7 +287,6 @@ pipenv run python /opt/workbench/workbench-script.py --config /mnt/settings.ini
stty echo stty echo
set +x set +x
set +e
END END
#TODO add some useful commands #TODO add some useful commands
cat > "${ISO_PATH}/chroot/root/.bash_history" <<END cat > "${ISO_PATH}/chroot/root/.bash_history" <<END