kb:embedded:raspberrypi:udpate
Table of Contents
21 Updater
see also HAPROplace Updater .
The updater consists of the following components:
-
updatePackage.tar.gpg
: Encrypted package containing theupdatePackage.tar
archive-
Uploaded to the device via the web interface
updatePackage.tar
: archive containing theinstall
script and thecomponents
directory-
is included in the
updatePackage.tar.gpg
package
components
: directory containing the actual updates in the form of debian packages-
is included in the
updatePackage.tar
archive
install
: script executed bysetup
-
is included in the
updatePackage.tar
archive
setup
: script that runs at every boot and runsinstall
(if present)Update Package
-
Update Package is a gpg encrypted tar archive
-
Uploaded to the device via the web interface
-
root-node decrypts the update package
-
decrypted file is the update archive (tar) and is called
updatePackage.tar
-
if decryption succeeds:
-
root-node unpacks the update-archive
updatePackage.tar
to/var/local/setup/
Update archive
-
updatePackage.tar
contains theinstall
script and thecomponents
directory -
install-script
/var/local/setup/install
-
Directory
/var/local/setup/components/
Create
Components archive
-
components
directory, which contains the actual updates in the form of debian packages
Create
Install script
-
install
is a Python script that performs the actual update -
is located in
/var/local/setup
-
standard operation: install the debian packages in
components/
(s.o.) (?) -
additional actions optional (rights, other installs, etc. etc.)
Setup script
20160905: No longer own setup script, as the same script in raspi-sd-builder -> haprotec-setup
-
“webic-setup” is a Python script that executes the install script
-
Default operation: searches for a script
/var/local/setup/install
-
if available: execute
-
automatically empties the folder
/var/local/ setup
after successful execution of the install script -
If the install script ends with exit-code
100
, the system restarts and the script is called again -
installation
-
is in
/usr/etc
-
must be executable (chmod +x)
-
template is in webic-setup (siehe auch haprotec-setup)
-
is executed by
systemd
on every boot -
service file is in
/etc/systemd/system
-
template is in webic-setup.service (siehe auch haprotec-setup.service)
-
activate with
sudo systemctl enable webic-setup
Python scripts
-
shebang =
#!/usr/bin/env python3
-
prerequisite: a symlink of python3→python3.4
-
to be created with
ln -s /usr/bin/python3.4 /usr/bin/python3
kb/embedded/raspberrypi/udpate.txt · Last modified: 2022/08/16 13:10 by joerg.hampel
-