Used to use the following to auto-update my image on a periodic basis
#!/bin/vbash
# Include VyOS functions
source /opt/vyatta/etc/functions/script-template
# Script debugging
#set -x
# Set variables and change vrf
URL=$(curl -s "https://api.github.com/repos/vyos/vyos-rolling-nightly-builds/releases/latest" | grep browser_download_url | head -n 1 | cut -d\" -f4)
# Perform update
#run add system image ${URL}
printf "y" '%s\n' "y" "y" | /opt/vyatta/bin/vyatta-op-cmd-wrapper add system image ${URL}
Printf entries handled skipping the signature not valid warning, accepting the default image name, boot and config choices.
Now I get the following error which I think is caused by incorrectly sending a new line to a python script but for the life of me I don’t know, and cannot find, the correct formatting.
The file is 430.000 MiB.
[#################################################################] 100%
Validating signature
Signature is not valid. Do you want to continue with installation? [y/N] Validating image checksums
What would you like to name this image? (Default: 1.5-rolling-202311280023) Cleaning up
Unmounting target filesystems
Removing temporary files
Whooops: EOF when reading a line
Apologies in advance for the basic nature of this problem, but any help would be appreciated.
One note: later today we’ll merge the missing step in the new image-tools that copied the ssh host keys (T5789), so at some future point, when updating from an instance containing that fix, the line will be: printf "y\n\ny\ny\ny\n"