Hello, everyone.
At the moment I'm trying to bodge some scripts in order to make updating easier.
I just wonder whether it would make sense for `slackpkg upgrade-all` to return some false value (that is non-zero) in the case of cancelling the update (or, thinking further, different return values in cases of different interruption causes).
That is, zero (0) would mean "update succeeded", 1 would, for example, mean "update cancelled by the user", 2 could mean "download failed".
Then it would be easier to use slackpkg within the scripts.
For example, at the moment I'm doing four things at each update:
- slackpkg update && slackpkg install-new && slackpkg upgrade-all
- sbopkg -i nvidia-legacy390-kernel:KERNEL=$(find /lib/modules/ | head -1)
- sbopkg -i wireguard-linux-compat:KERNEL=$(find /lib/modules/ | head -1)
- dd if=/dev/root of=/mnt/backup/$(date)
I would like each of those steps to fail in case something is wrong and terminate the whole script. Hitting "cancel" at the update screen counts as a failure, because apparently means that updating is inappropriate at the moment.
What do people thing about this? Is it a good idea? Would anyone find this useful?