diff options
author | John Klug <john.klug@multitech.com> | 2017-04-21 10:35:44 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2017-05-23 15:22:10 -0500 |
commit | 00ce6692fd0287c15b7f6e5aa25fa66eb2221971 (patch) | |
tree | bc86a0166540bc2d16fe720df226a1201e9ae58a /recipes-core/initscripts | |
parent | df5312a5710020377380fd4e5b0e971366edc319 (diff) | |
download | meta-mlinux-00ce6692fd0287c15b7f6e5aa25fa66eb2221971.tar.gz meta-mlinux-00ce6692fd0287c15b7f6e5aa25fa66eb2221971.tar.bz2 meta-mlinux-00ce6692fd0287c15b7f6e5aa25fa66eb2221971.zip |
mtadm user, root password removed, sudo
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 |