X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=openpandora.oe.git;a=blobdiff_plain;f=recipes%2Fpandora-system%2Fpandora-scripts%2Fop_osupgrade.sh;h=197433e4fcded4f0a20d61d20f859b87773840d5;hp=14cc71fdecde6d7f0b5efd8a24b74f62bfa5ea43;hb=e9b6b9e539ff88cbe37aea0d43e9970209338293;hpb=33bcc1ec06f25750f0df1957c56ab9f20253d421 diff --git a/recipes/pandora-system/pandora-scripts/op_osupgrade.sh b/recipes/pandora-system/pandora-scripts/op_osupgrade.sh index 14cc71f..197433e 100644 --- a/recipes/pandora-system/pandora-scripts/op_osupgrade.sh +++ b/recipes/pandora-system/pandora-scripts/op_osupgrade.sh @@ -22,14 +22,20 @@ Aborting." exit 1 fi +rm -f /tmp/upgrade_ok kernelmd5_old=`md5sum $kernel_path` +# reminder: don't use '&&' '||' ... after tee, it breaks set -e, no idea why terminal -x bash -c \ - 'echo "Updating package lists..." && \ - opkg update 2>&1 | tee /tmp/upgrade.log && test ${PIPESTATUS[0]} -eq 0 && \ - echo "Checking for updated packages..." && \ - opkg upgrade 2>&1 | tee -a /tmp/upgrade.log && test ${PIPESTATUS[0]} -eq 0 && \ - touch /tmp/upgrade_ok || sleep 3' + '( set -e; \ + cd /tmp/; \ + echo "Updating package lists..."; \ + opkg update 2>&1; \ + echo "Checking for updated packages..."; \ + opkg upgrade 2>&1; \ + touch /tmp/upgrade_ok; \ + sync ) | tee /tmp/upgrade.log; \ + test -e /tmp/upgrade_ok || sleep 3' sync