#! /opt/bin/dash # # os/prog/disk/post.sh # uses non-standard -d,--dups option to avoid consecutive duplicate block requests export PATH="/opt/bin:/bin:/usr/bin" echo "Content-type: text/html\n\n
$in\n" #exit n="6"; A="$n,-1,0"; R="2"; S="2"; o="1"; z="60,60,60" case "$h" in "SATF") p="SATF"; s="123456789";; *) p="FIFO"; s="123456789";; esac if [ -n "$useed" ]; then seed="$useed" msg="- seed = $seed" else x=$(perl -e "print unpack(\"C*\",$user);"); seed="${s}${x}" #echo "
s = $s, x = $x, seed = $seed" msg="" fi echo "$user - disk results $msg
green = correct |
red = wrong |
Policy = $p
" #echo "
" #python3 ./disk.py -d -s "$seed" -p "$p" -A "$A" -R "$R" -S "$S" -o "$o" -z "$z" -c #echo "" out=$( (echo "$in"; python3 ./disk.py -d -s "$seed" -p "$p" -A "$A" -R "$R" -S "$S" -o "$o" -z "$z" -c) | awk 'BEGIN { v=0; print "
Block | "; print "Seek | Rotate |
---|---|---|
"x" | "; x=u["v"v"s"]; if( x != "" && x == s) color="#90EE90"; else color="#FF6347"; print ""x" | "; x=u["v"v"r"]; if( x != "" && x == r) color="#90EE90"; else color="#FF6347"; print ""x" | "; print "