]> andersk Git - moira.git/commitdiff
Changed loop construct yet again; used C syntax instead of Perl by accident.
authorprobe <probe>
Sun, 31 Jan 1993 13:19:47 +0000 (13:19 +0000)
committerprobe <probe>
Sun, 31 Jan 1993 13:19:47 +0000 (13:19 +0000)
incremental/afs_create.pl

index efc1a843222eea63295a1e897797f075a631942a..20a6e89d7bb7236f0c8e5ae5bada9bfbf17c8436 100644 (file)
@@ -22,13 +22,13 @@ $vname = $vtype . "." . $locker;
 $vname =~ s/[^-A-Za-z0-9_.]//g;                # strip out illegal characters
 
 # Find free space/Create volume
-foreach $tries (1..3) {
+$tries = 0; $code = 1;
+while ($tries<3 && $code) {
     ($asrv,$apart) = &afs_find($cell,$type,$quota,@except);
     die "Unable to find space to create $vname in $cell\n" unless ($asrv&&$apart);
     $code = system("$vos create $asrv $apart $vname -cell $cell >/dev/null");
     push(@except, $asrv);
-    next if ($code);
-    break;
+    $tries++;
 }
 &fatal("Unable to create $vname in $cell") if ($code); # Too many create errors
 push(@clean, "$vos remove $asrv $apart $vname -cell $cell >/dev/null");
This page took 0.042037 seconds and 5 git commands to generate.