/[fai]/trunk/examples/simple/class/70partitions
ViewVC logotype

Contents of /trunk/examples/simple/class/70partitions

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1906 - (hide annotations) (download)
Tue Jul 15 09:27:22 2003 UTC (9 years, 11 months ago) by lange
File size: 869 byte(s)
moved simple examples to new dir
1 lange 1906 #! /usr/bin/perl
2    
3     # read one disk config file and define classes depending on partition names
4     # (c) Thomas Lange, 2001, lange@informatik.uni-koeln.de
5    
6     sub match {
7     # here you can add more definitions
8     m#\s/scratch\s# && print "NFS_SERVER SCRATCH ";
9     m#\s/files/scratch\s# && print "NFS_SERVER FILES_SCRATCH ";
10     m#\s/tmp\s# && print "TMP_PARTITION ";
11     m#\s/fai-boot\s# && print "FAI_BOOTPART ";
12     }
13    
14     # - - - - - - - - - - - - - - - - - - - - - - - - - - -
15     # main routine is read only for you
16     foreach $class ( $ENV{HOSTNAME}, reverse split /\s+/, $ENV{classes}) {
17     $file = "$ENV{FAI}/disk_config/$class";
18     next unless -f $file;
19     open (PART,"<$file") || die "Can't open $file\n";
20     while (<PART>) {
21     # skip comments
22     next if /^#/;
23     &match;
24     }
25     close PART;
26     print "\n";
27     # read only one config file
28     exit 0;
29     }

Properties

Name Value
svn:eol-style native
svn:executable *
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.5