Skip to content
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