fix: fixed reboot procedure (fixes #313)
This commit is contained in:
parent
13b1fb6d14
commit
79688305fd
@ -65,3 +65,9 @@ def shutdown():
|
|||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
os.system("sync")
|
os.system("sync")
|
||||||
os.system("halt")
|
os.system("halt")
|
||||||
|
|
||||||
|
|
||||||
|
def reboot():
|
||||||
|
logging.warning("rebooting ...")
|
||||||
|
os.system("sync")
|
||||||
|
os.system("shutdown -r now")
|
||||||
|
@ -481,9 +481,7 @@ class Agent(Client, AsyncAdvertiser, AsyncTrainer):
|
|||||||
def _reboot(self):
|
def _reboot(self):
|
||||||
self.set_rebooting()
|
self.set_rebooting()
|
||||||
self._save_recovery_data()
|
self._save_recovery_data()
|
||||||
logging.warning("rebooting the system ...")
|
pwnagotchi.reboot()
|
||||||
os.system("/usr/bin/sync")
|
|
||||||
os.system("/usr/sbin/shutdown -r now")
|
|
||||||
|
|
||||||
def next_epoch(self):
|
def next_epoch(self):
|
||||||
was_stale = self.is_stale()
|
was_stale = self.is_stale()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user