mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
Merge pull request #874 from grokbeer/reboot-sync
Ensure fs is synced before reboot so logs aren't lost
This commit is contained in:
@ -153,5 +153,11 @@ def reboot(mode=None):
|
|||||||
elif mode == 'MANU':
|
elif mode == 'MANU':
|
||||||
os.system("touch /root/.pwnagotchi-manual")
|
os.system("touch /root/.pwnagotchi-manual")
|
||||||
|
|
||||||
|
logging.warning("syncing...")
|
||||||
|
|
||||||
|
from pwnagotchi import fs
|
||||||
|
for m in fs.mounts:
|
||||||
|
m.sync()
|
||||||
|
|
||||||
os.system("sync")
|
os.system("sync")
|
||||||
os.system("shutdown -r now")
|
os.system("shutdown -r now")
|
||||||
|
Reference in New Issue
Block a user