diff options
author | John Klug <john.klug@multitech.com> | 2021-02-12 11:26:10 -0600 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2021-06-22 09:18:32 -0500 |
commit | 9a422725ab9a59f7f22c0a7dfeac4a6384814ed3 (patch) | |
tree | 60fa292e704ef900a53215061a03cde03d8b6d98 /recipes-core/initscripts/initscripts-1.0 | |
parent | ae4ee2cbb42e5e2ce29fc4f2f89d23aee30754d5 (diff) | |
download | meta-mlinux-9a422725ab9a59f7f22c0a7dfeac4a6384814ed3.tar.gz meta-mlinux-9a422725ab9a59f7f22c0a7dfeac4a6384814ed3.tar.bz2 meta-mlinux-9a422725ab9a59f7f22c0a7dfeac4a6384814ed3.zip |
Do not do flash upgrade if no power
Diffstat (limited to 'recipes-core/initscripts/initscripts-1.0')
-rw-r--r-- | recipes-core/initscripts/initscripts-1.0/umountfs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/recipes-core/initscripts/initscripts-1.0/umountfs b/recipes-core/initscripts/initscripts-1.0/umountfs index 07379c4..0827d72 100644 --- a/recipes-core/initscripts/initscripts-1.0/umountfs +++ b/recipes-core/initscripts/initscripts-1.0/umountfs @@ -78,6 +78,14 @@ err_leds() { flash_upgrade() { + supercap=$(mts-io-sysfs show capability/supercap 2>/dev/null) + if ((supercap == 1)) ; then + powerfail=$(mts-io-sysfs show power-fail) + if ((powerfail == 1)) ; then + logger -s -t 'flash_upgrade' -p daemon.err 'Power has failed. Skipping flash upgrade. Try again later' + return + fi + fi if [ $# -ne 1 ]; then echo "need to specify flash-root" return |