Giter Site home page Giter Site logo

Comments (8)

davesteele avatar davesteele commented on June 12, 2024 1

Thanks. It's not quite ready for inclusion in the package, but I've linked it from the Install Page. That should be on the path for those who would need it.

from comitup.

davesteele avatar davesteele commented on June 12, 2024

Comitup uses NetworkManager, which obsoletes wpa_supplicant.conf (and the interfaces file).

Comitup will use any predefined NetworkManager WiFi connections.

from comitup.

Miniontoby avatar Miniontoby commented on June 12, 2024

Wait,

But that is NOT my question!

I know it makes wpa_supplicant.conf useless, but you should read out that file (at installation) for any predefined networks!

wpa_supplicant.conf has the networkname and password saved in plaintext

from comitup.

davesteele avatar davesteele commented on June 12, 2024

I have no plans to do that, but I endeavor to review patches promptly.

from comitup.

Miniontoby avatar Miniontoby commented on June 12, 2024

What command is ran to connect to a new network in this thing? Cause I can find dbus controlled, but I cannot find the code of the comitup dbus

from comitup.

davesteele avatar davesteele commented on June 12, 2024

comitup-cli

The Comitup class in statemgr.py.

from comitup.

davesteele avatar davesteele commented on June 12, 2024

... and look at the man pages.

from comitup.

Miniontoby avatar Miniontoby commented on June 12, 2024

Here is a script to import from wpa_supplicant:

(it needs the comitup python lib to work, but it could be added in the apt install script after the lib has been installed)

#!/usr/bin/env python3

from re import finditer

try:
    from comitup.nm import make_connection_for
except:
    print ("[ERROR] Comitup python lib missing!")
    quit()

try:
    f = open("/etc/wpa_supplicant/wpa_supplicant.conf", "r")
except FileNotFoundError:
    print ("[WARNING] No wpa_supplicant file, skipping import")
    quit()

wpa_conf = f.read()
f.close()

matches = finditer(r"network=\{\n([\s\t]+(ssid=\"([^\"]+)\"|psk=\"([^\"]+)\"|[\w\=\"-_]+)\n)+\}( |)", wpa_conf)
for match in matches:
    ssid = match.group(3)
    psk = match.group(4)
    print ("[INFO] Adding {ssid} {psk}".format(ssid=ssid, psk="without psk" if psk is None else "with psk"))
    make_connection_for(ssid, psk)

from comitup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.