Skip to content
Permalink
Browse files

Patch Rock64 resize + sysbench unavailability

  • Loading branch information...
NEMS Linux
NEMS Linux committed Mar 25, 2019
1 parent 2308f4e commit 9c917f77774c1a7a77c353fd43cd37e81a163a6e
Showing with 24 additions and 4 deletions.
  1. +9 −4 benchmark.sh
  2. +15 −0 fixes.sh
@@ -7,6 +7,15 @@ if [[ $nemsinit == 0 ]]; then
exit
fi

if [[ ! -f /usr/bin/sysbench ]]; then
apt -y install sysbench
fi

if [[ ! -f /usr/bin/sysbench ]]; then
echo "sysbench is not yet available on this build."
exit
fi

# Set a runtime
if [[ -f /var/log/nems/benchmarks/runtime ]]; then
lastruntime=`cat /var/log/nems/benchmarks/runtime`
@@ -27,10 +36,6 @@ plannedend=$(($start + $thisruntime))

echo "NEMS System Benchmark... Please Wait (may take a while)."

if [[ ! -f /usr/bin/sysbench ]]; then
apt -y install sysbench
fi

echo "NEMS System Benchmark" > /tmp/nems-benchmark.log
date >> /tmp/nems-benchmark.log
printf "NEMS Version: " >> /tmp/nems-benchmark.log
@@ -391,6 +391,21 @@ if (( $(awk 'BEGIN {print ("'$ver'" >= "'1.5'")}') )); then
apt -y install glances
fi

# Rock64 - mark filesystem as resized if greater than 7.7 GB
# This is due to the way the resize script works on that board. Should move it to rc.local.
if (( $platform >= 45 )) && (( $platform <= 47 )); then
size=$(df --output=target,size /root | awk ' NR==2 { print $2 } ')
if (( $size > 7700000 )); then
# Log that patch (resize) has been applied to this system
# Activates features such as bootscreen.sh
if ! grep -q "PATCH-000002" /var/log/nems/patches.log; then
echo "PATCH-000002" >> /var/log/nems/patches.log
fi
fi
fi



fi


0 comments on commit 9c917f7

Please sign in to comment.
You can’t perform that action at this time.