diff options
Diffstat (limited to 'recipes-core/initscripts')
-rw-r--r-- | recipes-core/initscripts/initscripts-1.0/umountfs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/recipes-core/initscripts/initscripts-1.0/umountfs b/recipes-core/initscripts/initscripts-1.0/umountfs index 8c12ebe..bfd4d47 100644 --- a/recipes-core/initscripts/initscripts-1.0/umountfs +++ b/recipes-core/initscripts/initscripts-1.0/umountfs @@ -10,6 +10,7 @@ ### END INIT INFO PATH=/sbin:/bin:/usr/sbin:/usr/bin +upgrade_fname="/var/volatile/do_flash_upgrade" umount_all() { echo "Deactivating swap..." @@ -256,9 +257,13 @@ flash_upgrade() { } # do flash on reboot if do_flash_upgrade exists -if [ -f /var/volatile/do_flash_upgrade ]; then - flash_upgrade /var/volatile - flash_upgrade /media/card +# and is owned by root +if [[ -f ${upgrade_fname} ]] ; then + owner=$(stat -c%u "${upgrade_fname}") + if ((${#owner} > 0)) && ((owner == 0)) ; then + flash_upgrade /var/volatile + flash_upgrade /media/card + fi fi umount_all |