Manually sync disk to prevent hardware reboot lost
This commit is contained in:
parent
c14bfde3c0
commit
20d1ed42d5
@ -12,5 +12,10 @@ echo 0 > /sys/class/gpio/gpio2/value
|
||||
|
||||
# replace the original reboot binary with the following command
|
||||
rm /sbin/reboot
|
||||
echo 'i2cset -y 0 0x31 1 0xfd' > /sbin/reboot
|
||||
cat <<EOF >> /sbin/reboot
|
||||
#!/bin/sh
|
||||
sync
|
||||
i2cset -y 0 0x31 1 0xfd
|
||||
EOF
|
||||
|
||||
chmod a+x /sbin/reboot
|
||||
|
Loading…
Reference in New Issue
Block a user