There is a facility to update the buses deployed in the fleet with updates. This is necessary as routes, drivers, etc. change.
As the system changes over to a newer version, there will be some legacy system infrastructure to deal with making sure legacy systems aren't updated with new code and the new systems aren't running legacy update scripts.
The script update_loop.sh looks at the list of package checksums and sends them
to the server.
The server responds with updated packages, including the checksum, file size and server side
location.
If the DIU receives this information, update_loop.sh then proceeds to:
scp the remote file locallyapply_update.sh with the file, checksum, size, path and package versionThe apply_update.sh script
common_values.shinstall.sh script from the downloaded tar.gz packageinstall.shfix_pkg_perms.sh as ssh will start to fail when keys or directories the keys are in
don't have proper permissions or if executable bits on binaries aren't set properly
will cause other processes to fail.From what I can tell, the following is noteworthy:
install.sh needs to return a proper value to indicate to apply_update.sh it's been successful/tmp/reboot_flag file will be touched if the system needs a rebootHere's my suggestion on how to proceed:
firmware.tgz package updatesconfig.tgz packages and deposits
them in the appropriate placepopufare_package.tgz, that checks for a "magic" file (/home/bus/config/popufare.witness)
and only proceeds if this file is present