wrtape 555 B

123456789101112131415161718192021
  1. #!/bin/rc
  2. tape=$1
  3. start=`{echo $tape'*32+1' | hoc}
  4. end=`{echo $start'+31' | hoc}
  5. echo rewind | scuzz /dev/sd03
  6. arenas=`{hget http://iolaire/index | grep '^arena' | sed -n $start,$end^p | sed 's/^.*=//' | sed 's/ .*//'}
  7. for(i in $arenas) {
  8. dev=`{hget http://iolaire/index | grep ''''$i'''' | sed 's/.* on //' | sed 's/ .*//'}
  9. echo `{date} $tape $i
  10. echo `{date} $tape $i >> /sys/log/ventibackup
  11. echo $dev
  12. echo write '''|venti/rdarena $dev $i''' | scuzz -m 8192 /dev/sd03
  13. echo filemark | scuzz -m 6144 /dev/sd03
  14. }
  15. echo rewind | scuzz /dev/sd03