Skip to content

Commit 98c64da

Browse files
committed
force sync at shutdown: instant action now working all the time
1 parent 51bb45c commit 98c64da

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

FunKey/board/funkey/rootfs-overlay/usr/local/sbin/shutdown_funkey

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
#!/bin/sh
22

3-
# Notify system, reboot in progress
4-
REBOOTING_FILE="/run/rebooting"
5-
touch $REBOOTING_FILE
3+
# Sync before all else
4+
sync
65

76
# Notif fullscreen "Shutting down"
87
notif_set 0 "^^^^^^^^ SHUTTING DOWN...^^^^^^^^"
98

9+
# Notify system, reboot in progress
10+
REBOOTING_FILE="/run/rebooting"
11+
touch $REBOOTING_FILE
12+
1013
# Shutdown amp
1114
start_audio_amp 0 >/dev/null 2>&1
1215

1316
# Force Read Only
1417
ro
1518

16-
# Unmount writeable partition to force
19+
# Force unmount writeable partition
1720
umount -r /mnt
1821

1922
# Poweroff

0 commit comments

Comments
 (0)