Skip to content

Add dbus warning #136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: release_2_0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion devices/linux/Files/main_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,22 @@ def run_installer():
NM_AVAILABLE = False
if not NM_AVAILABLE:
# no dbus so ask if the user will want wpa_supplicant config

dbus_package = {
'Ubuntu': 'python3-dbus',
'Debian': 'python3-dbus',
'Fedora': 'python3-dbus',
'openSuse': 'python3-dbus-python',
'Arch': 'python-dbus',
'CentOS': 'dbus-python'
# I could extend this
}
package = dbus_package.get(get_system()[0], '')

if package:
if installer_data.ask(Messages.dbus_missing, Messages.cont, 1):
installer_data.show_info(Messages.install_package.format(package))
sys.exit(1)
if installer_data.ask(Messages.save_wpa_conf, Messages.cont, 1):
sys.exit(1)
installer_data.get_user_cred()
Expand Down Expand Up @@ -166,6 +182,7 @@ class Messages(object):
cert_error = "Certificate file not found, looks like a CAT error"
unknown_version = "Unknown version"
dbus_error = "DBus connection problem, a sudo might help"
dbus_missing = "Do you want to install the dbus package to fix the error?"
yes = "Y"
nay = "N"
p12_filter = "personal certificate file (p12 or pfx)"
Expand All @@ -186,7 +203,8 @@ class Messages(object):
user_cert_missing = "personal certificate file not found"
# "File %s exists; it will be overwritten."
# "Output written to %s"

install_package = 'Please install the package {}. Then start the eduroam ' \
'linux installer again'

class Config(object):
"""
Expand Down