fshalt: wait for fileservers command file to vanish
cwfs and hjfs create ther /srv command files with ORCLOSE flag, so they get removed once the fileserver terminates. we can use this to check that the fileserver has in fact finished halting without making assumtions about the time it should maximally take for any fileserver to write out its buffers to disk.
This commit is contained in:
parent
243c25fd8f
commit
22b28520cd
1 changed files with 6 additions and 8 deletions
|
@ -45,6 +45,7 @@ cp /bin/rc /tmp
|
|||
cp /bin/sed /tmp
|
||||
cp /bin/sleep /tmp
|
||||
cp /bin/scram /tmp
|
||||
cp /bin/test /tmp
|
||||
bind /tmp /rc
|
||||
bind /tmp /bin
|
||||
|
||||
|
@ -53,15 +54,12 @@ bind /tmp /bin
|
|||
fn x {
|
||||
echo
|
||||
echo -n halting...
|
||||
for (i in $c){
|
||||
for (i in $c $h)
|
||||
echo halt >>$i
|
||||
for (i in $c $h){
|
||||
echo -n $i...
|
||||
echo halt >>$i
|
||||
sleep 2
|
||||
}
|
||||
for(i in $h){
|
||||
echo -n $i
|
||||
echo halt >>$i
|
||||
sleep 2
|
||||
while(test -e $i)
|
||||
sleep 1
|
||||
}
|
||||
echo
|
||||
echo done halting
|
||||
|
|
Loading…
Reference in a new issue