Skip to content
  • Thomas Haller's avatar
    nm-online: refactor and fix nm-online · f7875a42
    Thomas Haller authored
    Moving nm-online to async init introduced various issues:
    - with a timeout of zero, nm-online would terminate with failure
      before initializing the NMClient instance.
    - add a timeout for safeguarding the async creation of NMClient
    - fix adding trailing newline for the progress bar.
    
    While at it, refactor:
    - use defines for the exit codes
    - don't use exit(), but instead always properly quit the mainloop
      and cleanup all resources.
    - in non-quiet mode, print the result [online] or [offline] at
      the end.
    
    Fixes: c5f17a97
    
    https://bugzilla.gnome.org/show_bug.cgi?id=777914
    f7875a42