Or, to be more precise, a fix for the fix preceding the current fix for
issue #25 that just didn't fix things right. If your head spins, see the
previous commit, or call an ambulance (that is, if you are privileged
enough to access a phone and know your local helpline number)
Uses multithreading.Process instead of GLib.timeout_add()
The moment I finished writing this part, I found out the only problem
with my previous commit was that I had setup the timeout _after_ calling
the blocking function wait_for_change instead of before it.
Although this version (with Process) works, I'm reverting to the
previous version and swapping the two lines (which I had tested and
found to work)
And in case you have read upto the previous line you should also know I
fixed some code in the README
TL;DR: I have proven once again I am an idiot
Made messages printed in Makefile more understandable. Removed full path
of naxalnet from the systemd service. Now you can start naxalnet even if
it is installed in /usr/local/bin, if systemd allows (I have not tested
it). Many comments were made to respect the 80 chars per line rule.
And, of course, added some political commentary to insult the global
superpower (superpower in terms of money, military and something else I
forgot). And removed MANIFEST.in, which probably haven't changed anything.
This makes things easier to maintain, or so I hope.
Added more comments in files in systemd-networkd, made CHANGELOG.md
better, and updated the README.
For some days I've been testing this program without realising that
gateway_mode was set to off every time. Remove dependencies from install
in Makefile, which we don't need anyway, since it builds twice when
installing from the AUR PKGBUILD.
This was previously done by the systemd service. But since we allowed
changing the name of bat0 and bridge0, we can't expect systemd to still
do that job. Commented out some lines in the systemd service and made it
send SIGINT instead of the default SIGTERM to kill naxalnet. I
accidentally used to increment a2, a3, a4, ... in the __version__
instead of dev1, dev2, &c. a few commits back. Removed some print()
lines lurking somewhere in the code. The cleanup is still not completed.
We still have to delete the interfaces bridge0 and bat0, or whatever
name the user gives it. Just out of boredom, I added some description to
some network configuration, though so I doubt if anyone will understand
it more because of that.
Added arg and config option to manually set gw_mode.
When gateway_mode is auto, a temporary config will be added, and after a
ten sec delay, naxalnet will check if systemd-networkd shows a
'routable' connection. If the connection is routable, gw_mode will be
set to server; or client otherwise.
We now use NetworkD() to configure systemd-networkd.
Path.glob doesn't return things in alphabetical order, which is needed
to configure networkd without any error. Need a fix for that.
There was a problem with indentation which made the line starting adhoc
not being run at all.
Updated CHANGELOG
Moved some things to other places
log.py is back! It isn't needed, but it doesn't do any harm anyway.
naxalnet is now a daemon! When run from systemd, it checks for new
devices or removal of devices and reloads the wifi configuration.
Updated the systemd service and changed Type to notify. Unfortunately,
there is some problem with logging. The messages from naxalnet.iwd could
not be found in the systemd journal or while running without --systemd.
- Renamed here_be_dragons() to main().
- Added daemon.py (doesn't do anything yet).
- Added GPL disclaimer to all python files and removed the shebang #!
from all files.
- args is now defined outside any function in scripts.py
- Changed arguments of some functions in scripts.py
- New dependency -- python-systemd for logging to journal
- Changed service file to start after networkd
- New submodule which contains "logger" for use by all other submodules
- Removed bus argument from Device and Adapter classes
* Improved docstrings, README
* Added argument --version and its implementation
* Added "uninstall" rule to Makefile and added it in the README
* Updated CHANGELOG
* Cleaned up code
I've probably forgot something so we can't merge to master yet.
And we still have to add installation instructions for ubuntu and fedora
Tidied up code, added more documentation, and the version now confirms
to some PEP standard. Because of the way configuration and arguments are
implemented, ALL the keys in configuration files should have an argument
that can change its value.
Verbose option was commented out, since it is not implemented. An
argument --print-wifi, which should print out WiFi ssid and password is
not implemented at the moment. Also, the README should be updated to
show the new changes. By the way I just remembered I didn't update the
CHANGELOG; I'll do it in the next commit. 😁
This should be used if the python executable is not python3 in your
distro.
I would like to express my displeasure to the Government of India for
not including me in the list of targets for Pegasus, even though I'm
convinced I am a threat to the sovereignty and integrity of the nation