From 00ce6692fd0287c15b7f6e5aa25fa66eb2221971 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 21 Apr 2017 10:35:44 -0500 Subject: mtadm user, root password removed, sudo --- recipes-core/initscripts/initscripts-1.0/umountfs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'recipes-core/initscripts') 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 -- cgit v1.2.3