ksync 302 B

1234567891011121314151617181920
  1. #!/bin/rc
  2. fn dosync {
  3. echo disk/kfscmd $* sync
  4. if(disk/kfscmd $* sync)
  5. echo synced
  6. if not
  7. echo sync failed
  8. }
  9. kfs = `{ls /srv/kfs.*.cmd >[2]/dev/null}
  10. switch($#kfs){
  11. case 0
  12. dosync
  13. case *
  14. if(test -r /srv/kfs.cmd)
  15. dosync
  16. for(i in $kfs)
  17. dosync -n `{echo $i|sed 's%/srv/kfs.(.*).cmd%\1%'}
  18. }