pxe: improve autostart
This commit is contained in:
parent
94da8a9a1c
commit
bea653cdcd
|
@ -264,7 +264,6 @@ prepare_app() {
|
|||
# startup script execution
|
||||
cat > "${ISO_PATH}/chroot/root/.profile" <<END
|
||||
set -x
|
||||
set -e
|
||||
|
||||
if [ -f /tmp/workbench_lock ]; then
|
||||
return 0
|
||||
|
@ -285,8 +284,8 @@ fi
|
|||
# clearly specify the right working directory, used in the python script as os.getcwd()
|
||||
cd /mnt
|
||||
pipenv run python /opt/workbench/workbench-script.py --config /mnt/settings.ini
|
||||
stty echo
|
||||
|
||||
stty echo
|
||||
set +x
|
||||
set +e
|
||||
END
|
||||
|
|
|
@ -276,7 +276,7 @@ def save_snapshot_in_disk(snapshot, path):
|
|||
f.write(json.dumps(snapshot))
|
||||
print(f"workbench: INFO: Snapshot written in fallback path '{fallback_filename}'")
|
||||
except Exception as e:
|
||||
print(f"workbench: ERROR: Failed to write in fallback path: {fallback_filename}. Could not save snapshot locally.")
|
||||
print(f"workbench: ERROR: Failed to write in fallback path: {e}. Could not save snapshot locally.")
|
||||
|
||||
# TODO sanitize url, if url is like this, it fails
|
||||
# url = 'http://127.0.0.1:8000/api/snapshot/'
|
||||
|
|
Loading…
Reference in a new issue