From c0fbd6dc6bbbad38b97595f2469eb7fabd250760 Mon Sep 17 00:00:00 2001 From: Bjørn Mork Date: Sat, 11 May 2019 20:28:00 +0200 Subject: WiP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bjørn Mork --- .gitignore | 2 ++ dcs8000lh-configure.py | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 7cecdf0..c758f4d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ *~ .#* #* +version +opt.squashfs diff --git a/dcs8000lh-configure.py b/dcs8000lh-configure.py index 131462f..8f223d1 100755 --- a/dcs8000lh-configure.py +++ b/dcs8000lh-configure.py @@ -9,7 +9,7 @@ import base64 import hashlib from bluepy.btle import Peripheral -VERSION = "0.01" +VERSION = "9.9.9-bmork" # helper converting "K=V;L=W;.." strings to { "K": "V", "L": "W". ...} dicts def kv2dict(kvstr, sep=";"): @@ -141,8 +141,8 @@ if __name__ == '__main__': if args.telnetd: print("Adding the 'admin' user as an alias for 'root'") cam.run_command("grep -Eq ^admin: /etc/passwd||echo admin:x:0:0::/:/bin/sh >>/etc/passwd") - print("Setting the 'admin' user passwrd to '%s'"% args.pincode) - cam.run_command("echo admin:" + args.pincode + "|chpasswd") + print("Setting the 'admin' user password to '%s'"% args.pincode) + cam.run_command("grep -Eq ^admin:x: /etc/passwd&&echo admin:" + args.pincode + "|chpasswd") print("Starting telnetd") cam.run_command("pidof telnetd||telnetd") if args.lighttpd: -- cgit v1.2.3