diff options
author | John Klug <john.klug@multitech.com> | 2021-02-12 11:26:10 -0600 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2021-02-15 18:32:10 -0600 |
commit | 1bb19350497986cf795c8d37537a1344d8ec7049 (patch) | |
tree | 8bce7f6788c1f72fd924f8160edc66a56cc81b6c /recipes-core/initscripts | |
parent | 4ebe6db0cf0165c2477b6d4d0ed7298a294a46f7 (diff) | |
download | meta-mlinux-1bb19350497986cf795c8d37537a1344d8ec7049.tar.gz meta-mlinux-1bb19350497986cf795c8d37537a1344d8ec7049.tar.bz2 meta-mlinux-1bb19350497986cf795c8d37537a1344d8ec7049.zip |
Do not do flash upgrade if no power
Diffstat (limited to 'recipes-core/initscripts')
-rw-r--r-- | recipes-core/initscripts/initscripts-1.0/umountfs | 8 | ||||
-rw-r--r-- | recipes-core/initscripts/initscripts_1.0.bbappend | 2 |
2 files changed, 9 insertions, 1 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 diff --git a/recipes-core/initscripts/initscripts_1.0.bbappend b/recipes-core/initscripts/initscripts_1.0.bbappend index c5bd486..c07757c 100644 --- a/recipes-core/initscripts/initscripts_1.0.bbappend +++ b/recipes-core/initscripts/initscripts_1.0.bbappend @@ -3,4 +3,4 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" # flash on reboot/umountfs needs regular umount (not busybox) RDEPENDS_${PN} += "util-linux-umount util-linux-mount bash" -PR .= ".44" +PR .= ".45" |