diff --git a/src/plugins/dnf/subscription_manager.py b/src/plugins/dnf/subscription_manager.py index 4032387b4a..38d213abf2 100644 --- a/src/plugins/dnf/subscription_manager.py +++ b/src/plugins/dnf/subscription_manager.py @@ -14,6 +14,7 @@ import os import logging +import shutil from subscription_manager import injection as inj from subscription_manager.action_client import ProfileActionClient @@ -48,6 +49,13 @@ """ ) +not_registered_warning_rhc = _( + """ +This system is not registered with an entitlement server. \ +You can use "rhc" or "subscription-manager" to register. +""" +) + no_subs_warning = _( """ This system is registered with an entitlement server, but is not receiving updates. You can use \ @@ -182,7 +190,10 @@ def _warn_or_give_usage_message(): ent_dir = inj.require(inj.ENT_DIR) # Don't warn people to register if we see entitlements, but no identity: if not identity.is_valid() and len(ent_dir.list_valid()) == 0: - msg = not_registered_warning + if shutil.which("rhc") is not None: + msg = not_registered_warning_rhc + else: + msg = not_registered_warning elif len(ent_dir.list_valid()) == 0 and not is_simple_content_access(identity=identity): msg = no_subs_warning finally: