It's an expect script and I trigger it via bash in background using:
bash -c "script.exp" #! /usr/bin/expect -f set password "mypassword" set
timeout -1 exp_internal -f /tmp/expect.log 0 spawn sudo
/usr/sbin/softwareupdate -iR "macOS Big Sur 11.5.1-2...
@EdLuousing the expect script, my M1 outputs that its "Restarting", but
doesn't restart.After reboot, I have to re-run it to download the update
and install it which again might not re-start automatically. Did you
face a similar issue?