retroflag-picase | RetroFlag Pi-Case Safe Shutdown | Command Line Interface library
kandi X-RAY | retroflag-picase Summary
kandi X-RAY | retroflag-picase Summary
Turn switch "SAFE SHUTDOWN" to ON. wget -O - "| sudo bash. wget -O - "| bash.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of retroflag-picase
retroflag-picase Key Features
retroflag-picase Examples and Code Snippets
Community Discussions
Trending Discussions on retroflag-picase
QUESTION
Ok so running raspberry pi (RetroPie) and have a python script running a shutdown, but I want to avoid any possible data corruption when the power button is pressed.
Is there a way to check to see if any of the connected drives are being written to and if so to wait and check again every 2 seconds until it detects nothing else is being written and then continues shutting down.
I am using the retroflag-picase -SafeShutdown.py
...ANSWER
Answered 2018-Aug-26 at 09:22You can use os.sync()
to wait till everything is written to disk. Or you can use the cmd sudo sync
instead of sleep 5s
before reboot
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install retroflag-picase
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page