| 52 |
|
|
| 53 |
package FAI; |
package FAI; |
| 54 |
|
|
| 55 |
|
my $version = "0.1.4893"; |
| 56 |
|
|
| 57 |
# command line parameter handling |
# command line parameter handling |
| 58 |
use Getopt::Std; |
use Getopt::Std; |
| 59 |
our ($opt_X, $opt_f); # the variables for getopt |
our ($opt_X, $opt_f, $opt_h, $opt_d); # the variables for getopt |
| 60 |
&getopts('Xf:') || die <<EOF; |
&getopts('Xf:hd') || die <<EOF; |
| 61 |
|
setup-storage version $version |
| 62 |
|
|
| 63 |
USAGE: [-X] no test, your harddisks will be formated |
USAGE: [-X] no test, your harddisks will be formated |
| 64 |
default: only test, no real formating |
default: only test, no real formating |
| 65 |
[-f<config-filename>] default: parse classes |
[-f<config-filename>] default: parse classes |
| 66 |
|
[-d] enable debug output (equivalent to debug=1) |
| 67 |
|
[-h] print this help message |
| 68 |
EOF |
EOF |
| 69 |
|
|
| 70 |
# $disklist must be provided by the environment |
# $disklist must be provided by the environment |
| 107 |
defined ($config_file) or die "No matching disk_config found\n"; |
defined ($config_file) or die "No matching disk_config found\n"; |
| 108 |
|
|
| 109 |
# start the parsing - thereby $FAI::configs is filled |
# start the parsing - thereby $FAI::configs is filled |
| 110 |
|
warn "Starting setup-storage $version"; |
| 111 |
&FAI::run_parser($config_file); |
&FAI::run_parser($config_file); |
| 112 |
|
|
| 113 |
# read the sizes and partition tables of all disks listed in $FAI::disks |
# read the sizes and partition tables of all disks listed in $FAI::disks |