Verified Commit 649023ed authored by Karel Koci's avatar Karel Koci 🤘
Browse files

Add --autorun option and allow run even if autorun is disabled

The original idea was to use autorun configuration to disable automatic
updates. As it was implemented until now it was preventing execution of
updates not just automatic but manual as well. The only option was to
use pkgupdate directly. This should allow usage of supervisor not just
when automatic updates are enabled.
parent 448f5954
......@@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](
- Possibility to disable network test by setting zero
- System shutdown is now retained till there is process holding opkg lock
- argument `--autorun` to mark execution as automatic run to adhere autorun
### Changed
- Disabled autorun now won't prevent from update, you have to use `--autorun` to
get previous behavior
## [1.3.2] - 2020-08-17
### Changed
......@@ -19,6 +19,11 @@ def parse_arguments():
Run supervisor in background (detach from terminal).
prs.add_argument('--autorun', '-a', action='store_true',
Use this option when this is automatic execution. It prevents run of updater when autorun is not
prs.add_argument('--rand-sleep', const=7200, nargs='?', type=int,
Sleep random amount of the time with maximum of given number of seconds. In default two hours are
......@@ -59,12 +64,12 @@ def parse_arguments():
def main():
"Main function for updater-supervisor run as executable"
if not autorun.enabled():
args = parse_arguments()
if args.autorun and not autorun.enabled():
print('Updater autorun disabled.')
args = parse_arguments()
if args.daemon and daemonize():
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment