mirror of
https://git.disroot.org/pranav/pybatmesh.git
synced 2025-02-12 21:46:07 +05:30
added implementation of --print-wifi
And added it to the README. Cleaned up the docstring in naxalnet/__main__.py
This commit is contained in:
parent
b50d0e3656
commit
fe146b7a0d
@ -122,6 +122,7 @@ wifi ap (also called wifi hotspot) on one of them.
|
||||
|
||||
Connect two wifi adapters on a device and [start naxalnet][startnx].
|
||||
Now an ap will be created on one of the adapters.
|
||||
Type `naxalnet --print-wifi` to get the WiFi SSID and password.
|
||||
|
||||
If you had set up internet access on one of the peers, internet
|
||||
can be accessed from the AP.
|
||||
|
@ -15,6 +15,13 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
"""
|
||||
naxalnet
|
||||
========
|
||||
|
||||
Create mesh networks with batman-adv, systemd-networkd and iwd.
|
||||
See README.md for documentation.
|
||||
"""
|
||||
|
||||
# GUIDE FOR CHANGING __version__
|
||||
#
|
||||
@ -29,4 +36,4 @@
|
||||
#
|
||||
# In case you forgot to add a version, put the next number
|
||||
# in the next commit
|
||||
__version__ = "0.2.0a3.dev1"
|
||||
__version__ = "0.2.0a3.dev2"
|
||||
|
@ -16,11 +16,9 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
"""
|
||||
naxalnet
|
||||
========
|
||||
|
||||
If called as python -m naxalnet, this file makes naxalnet run like
|
||||
it was called from the commandline.
|
||||
it was called from the commandline. Try:
|
||||
python -m naxalnet --help
|
||||
"""
|
||||
|
||||
from naxalnet.scripts import here_be_dragons
|
||||
|
@ -105,6 +105,12 @@ def setup_devices(args):
|
||||
ap_device.start_ap(args.ap_ssid, args.ap_passwd)
|
||||
|
||||
|
||||
def print_wifi(args):
|
||||
print("Mesh name:", args.adhoc_name)
|
||||
print("SSID:", args.ap_ssid)
|
||||
print("Password:", args.ap_passwd)
|
||||
|
||||
|
||||
def here_be_dragons():
|
||||
"""
|
||||
This function is run every time you
|
||||
@ -112,6 +118,10 @@ def here_be_dragons():
|
||||
"""
|
||||
args = parse_args()
|
||||
|
||||
if args.print_wifi:
|
||||
print_wifi(args)
|
||||
sys.exit(0)
|
||||
|
||||
try:
|
||||
copy_files(args)
|
||||
except PermissionError as error:
|
||||
|
Loading…
x
Reference in New Issue
Block a user