Comment 4 for bug 1938043

Revision history for this message
Chad Smith (chad.smith) wrote :

Looks like logic in ubuntu-security-status bases that message only on whether livepatch is enabled or not. this is an invalid test because containers will not have livepatch enabled and neither will UA attached VMs with FIPS enabled.

So the following test is not an accurate representation of whether the system is attached to a license:

    if lts and not livepatch_enabled:
         print("\nThis machine is not attached to an Ubuntu Advantage "
               "subscription.\nSee https://ubuntu.com/advantage")

Attached is a patch that would allow ubuntu-security-updates to determine both attach status and service enabled/disabled by processing `ua status --format=json` or the JSON status cache provided by UA