linux-automation / lxa-iobus

Linux Automation IOBus server
https://lxa-iobus.readthedocs.io/en/latest/
Apache License 2.0
3 stars 4 forks source link

Disable flash own firmware by default #14

Closed SmithChart closed 3 years ago

SmithChart commented 3 years ago

The feature to flash own firmware by default is intended for a development use-case where the operator is close to the device or is aware of the risk to brick a device on a remote location.

This feature should only be enabled if really needed. This change adds a new command line switch --flash-own that enables the upload and flash feature for arbitrary firmware. The switch defaults to False thus disabling the feature by default.

The new switch is then plumbed through the server into the frontend.

jluebbe commented 3 years ago

As this doesn't actually trigger flashing, maybe call it --allow-custom-firmware or --allow-firmware-upload?

SmithChart commented 3 years ago

As this doesn't actually trigger flashing, maybe call it --allow-custom-firmware or --allow-firmware-upload?

That's right. I renamed the option to --allow-custom-firmware.

This commit only removes the option from the website. Shouldn't the upload function also check the flag?

Totally right. I am now checking the option in the flash, upload, delete and list-functions.

SmithChart commented 3 years ago

@hnez, @jluebbe: Could you give this another look?