openwisp-firmware-upgrader icon indicating copy to clipboard operation
openwisp-firmware-upgrader copied to clipboard

WIP/RFC: [feature] Support sysupgrade options --force and -n

Open mips171 opened this issue 3 years ago • 0 comments

Closes https://github.com/openwisp/openwisp-firmware-upgrader/issues/155

This WIP/RFC adds support for specifying sysupgrade options --force and -n no preserve settings. -n and the default -c are mutually exclusive, so we only add the -c if we are not wiping the settings.

When I started this I felt like it should be part of an UpgradeOperation, not a FirmwareImage. Would that make more sense?

I feel like the option to -F should be allowed, but we need to really stress to the user that unless they know what they are doing, they could end up with a potentially very far away brick. So, I was thinking we either remove that altogether, or add an extra field, kind of like github's delete repo confirmation, that requires a string like I want a brick or I understand the risks or maybe the MAC address of the device to be included along with the boolean. I suppose this could also be secured further via permissions.

firmware new options

sysupgrade command with options

mips171 avatar Aug 29 '21 05:08 mips171