#!/usr/bin/python3 -I
"""Login shell of restricted users: opens nuc-cockpit-setup instead of a command line."""
import os
import sys

# never let the caller redirect the paths this gate relies on
for key in [k for k in os.environ if k.startswith("NUC_COCKPIT_") and k != "NUC_COCKPIT_SHELL"]:
    del os.environ[key]
sys.path.insert(0, "/usr/lib/nuc-cockpit")

from nuc_cockpit.loginshell import main  # noqa: E402

sys.exit(main())
