[Bio] / FigKernelPackages / FIG.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/FIG.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.37, Mon Mar 15 04:37:50 2004 UTC revision 1.38, Mon Mar 15 23:06:47 2004 UTC
# Line 328  Line 328 
328      return $ip;      return $ip;
329  }  }
330    
331    sub get_seed_id {
332        #
333        # Retrieve the seed identifer from FIGdisk/config/seed_id.
334        #
335        # If it's not there, create one, and make it readonly.
336        #
337    
338        my $id;
339        my $id_file = "$FIG_Config::fig_disk/config/seed_id";
340        if (! -f $id_file)
341        {
342            my $newid = `uuidgen`;
343            if (!$newid)
344            {
345                die "Cannot run uuidgen: $!";
346            }
347    
348            chomp($newid);
349            my $fh = new FileHandle(">$id_file");
350            if (!$fh)
351            {
352                die "error creating $id_file: $!";
353            }
354            print $fh "$newid\n";
355            $fh->close();
356            chmod(0444, $id_file);
357        }
358        my $fh = new FileHandle("<$id_file");
359        $id = <$fh>;
360        chomp($id);
361        return $id;
362    }
363    
364  sub cgi_url {  sub cgi_url {
365      return &plug_url($FIG_Config::cgi_url);      return &plug_url($FIG_Config::cgi_url);
366  }  }

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3