/[fai]/people/michael/features/setup_harddisks_2/implementation/storage-magic
ViewVC logotype

Contents of /people/michael/features/setup_harddisks_2/implementation/storage-magic

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3666 - (show annotations) (download)
Sun Jul 23 19:40:32 2006 UTC (6 years, 9 months ago) by michael-guest
Original Path: people/michael/features/setup_harddisks_2/implementation/shdd2
File size: 1458 byte(s)
lots of cleanup, some of the code is more perlish (and thus less readable) - and
quite of lot of comments were added
1 #!/usr/bin/perl -w
2
3 use strict;
4
5 ################################################################################
6 #
7 # @file shdd2
8 #
9 # @brief The main function of setup harddisks 2 - the tool to configure the
10 # partitioning from within FAI.
11 #
12 # This is an implementation from scratch to properly support LVM and RAID. The
13 # input format is documented in @ref shdd2-parser
14 #
15 # $Id$
16 #
17 # @author Christian Kern, Michael Tautschnig
18 # @date Sun Jul 23 16:09:36 CEST 2006
19 #
20 ################################################################################
21
22 package FAI;
23
24 # include all subparts
25 require "shdd2-init";
26 require "shdd2-lib";
27 require "shdd2-parser";
28 require "shdd2-sizes";
29 require "shdd2-commands";
30 require "shdd2-fstab";
31 require "shdd2-exec";
32
33 # start the parsing - thereby $FAI::configs is filled
34 &FAI::run_parser;
35
36 # read the sizes and partition tables of all disks listed in $FAI::disks
37 &FAI::get_current_disks;
38
39 # compute the new partition sizes
40 &FAI::compute_sizes;
41
42 # TODO - debugging only: print the current contents of $FAI::configs
43 &FAI::print_hash( \%FAI::configs );
44
45 # generate the command script
46 &FAI::build_commands;
47
48 # TODO - debugging only: print the command script
49 foreach my $cmd (@FAI::commands)
50 {
51 print $cmd . "\n";
52 # &FAI::execute_command($cmd);
53 }
54
55 # generate the proposed fstab contents
56 my @fstab = &FAI::generate_fstab( \%FAI::configs );
57 # TODO - debugging only; print fstab
58 foreach my $line (@fstab)
59 {
60 printf "$line\n";
61 }
62

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5