Commit 3791c46b authored by David Mondou's avatar David Mondou
Browse files

Fix hosapd.conf path

parent 39606850
......@@ -189,7 +189,7 @@ def _changeHostName(newName):
def _changeAPSSID(newName):
saveDefaultSSID()
subprocess.call(["sed", "-i", "s/^ssid=.*/ssid=" + re.escape(newName) + "/", "/etc/hostapd/hostapd.conf"])
subprocess.call(["sed", "-i", "s/^ssid=.*/ssid=" + re.escape(newName) + "/", "/etc/hostapd.conf"])
subprocess.call("/etc/init.d/avahi-daemon restart && sleep 2", shell=True)
def _changeP2PSSID(newName):
......@@ -206,7 +206,7 @@ def changePassword(newPass):
if (not os.path.isfile(STATE_DIR + "/password-setup.done")):
pass_done = open(STATE_DIR + "/password-setup.done", "w")
pass_done.write("Indicates that password has been changed via oobe.\n")
pass_done.write("Indicates that password has been changed.\n")
pass_done.close()
print "First-time root password setup complete. Enabling SSH on WiFi interface."
# subprocess.call("sed -i 's/^BindToDevice=/# BindToDevice=/g' /lib/systemd/system/sshd.socket ; sync ; systemctl daemon-reload; systemctl restart sshd.socket", shell=True)
......@@ -629,7 +629,7 @@ def full():
print "Done.\n"
def getSSID():
return subprocess.check_output("grep -o '^ssid=.*' /etc/hostapd/hostapd.conf | awk -F'=' '{print $2}'", shell=True).strip()
return subprocess.check_output("grep -o '^ssid=.*' /etc/hostapd.conf | awk -F'=' '{print $2}'", shell=True).strip()
def saveDefaultSSID():
if not os.path.isfile(STATE_DIR + "/default-ssid.txt"):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment