From ae5a2eab536f38a6f32bcfcd2c30ad075bd1a4c8 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Thu, 15 Apr 2010 02:21:42 +0200 Subject: [PATCH] Replace all tabs with 8 blanks to make t/no-tabs.t happy --- bin/xen-create-image | 22 ++++---- bin/xt-guess-suite-and-mirror | 84 +++++++++++++++---------------- hooks/fedora-core-6/90-make-fstab | 2 +- 3 files changed, 54 insertions(+), 54 deletions(-) diff --git a/bin/xen-create-image b/bin/xen-create-image index 8dc5d1e..810ca71 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -1903,15 +1903,15 @@ sub generateMACAddress my $hash = ''; foreach my $key (qw/ hostname ip dhcp dist /) { - if ( $CONFIG{ $key } ) { - if (ref($CONFIG{ $key }) eq 'ARRAY') { - $hash .= join(',',@{$CONFIG{ $key }}); - } elsif (ref($CONFIG{ $key }) eq 'HASH') { - $hash .= join(',',values %{$CONFIG{ $key }}); - } else { - $hash .= $CONFIG{ $key }; - } - } + if ( $CONFIG{ $key } ) { + if (ref($CONFIG{ $key }) eq 'ARRAY') { + $hash .= join(',',@{$CONFIG{ $key }}); + } elsif (ref($CONFIG{ $key }) eq 'HASH') { + $hash .= join(',',values %{$CONFIG{ $key }}); + } else { + $hash .= $CONFIG{ $key }; + } + } } # @@ -2615,7 +2615,7 @@ sub createLoopbackImages my $oldumask = umask; umask(0077); - # run the image creation command + # run the image creation command runCommand($image_cmd); logprint("Done\n"); @@ -3521,7 +3521,7 @@ sub runXenConfigCreation logprint("The Xen configuration file $file exists\n"); logprint("Specify --force to force overwriting it.\n"); logprint("Aborting\n"); - # FAIL = 2 will keep existing config file + # FAIL = 2 will keep existing config file $FAIL = 2; exit 127; } diff --git a/bin/xt-guess-suite-and-mirror b/bin/xt-guess-suite-and-mirror index 60d8ae0..05aef84 100755 --- a/bin/xt-guess-suite-and-mirror +++ b/bin/xt-guess-suite-and-mirror @@ -51,14 +51,14 @@ my $fallback = 'Debian'; # Which mirrors to use if everything else fails my %fallback_mirror = ( Debian => 'http://ftp.debian.org/debian/', - Ubuntu => 'http://archive.ubuntu.com/ubuntu/' ); + Ubuntu => 'http://archive.ubuntu.com/ubuntu/' ); # Which suite to use if everything else fails. For Debian "stable" # should be the best choice independent of the time. Ubuntu does not # have aliases like stable or testing, so we take the nearest LTS # release which is 10.04 at the time of writing. my %fallback_suite = ( Debian => 'stable', - Ubuntu => 'lucid' ); + Ubuntu => 'lucid' ); # Where to look for the sources.list to parse my $sources_list_file = '/etc/apt/sources.list'; @@ -88,10 +88,10 @@ my $want_help = 0; my $want_usage = 0; my $result = GetOptions ('mirror' => \$want_mirror, - 'suite' => \$want_suite, - 'version' => \$want_version, - 'usage' => \$want_usage, - 'help' => \$want_help); + 'suite' => \$want_suite, + 'version' => \$want_version, + 'usage' => \$want_usage, + 'help' => \$want_help); if ($want_help) { print "Usage: $0 [-m] [-s]\n"; @@ -111,34 +111,34 @@ if (-r $sources_list_file) { # Find the first line which is a Debian or Ubuntu mirror but not # an updates, backports, volatile or security mirror. foreach my $sources_list_entry (@sources_list) { - # Normalize line - chomp($sources_list_entry); - $sources_list_entry =~ s/^\s*(.*?)\s*$/$1/; + # Normalize line + chomp($sources_list_entry); + $sources_list_entry =~ s/^\s*(.*?)\s*$/$1/; - # Skip definite non-entries - next if $sources_list_entry =~ /^\s*($|#)/; + # Skip definite non-entries + next if $sources_list_entry =~ /^\s*($|#)/; - # Split up into fields - my @source_components = split(/\s+/, $sources_list_entry); + # Split up into fields + my @source_components = split(/\s+/, $sources_list_entry); - # Minimum number of components is 4 - next if $#source_components < 3; + # Minimum number of components is 4 + next if $#source_components < 3; - # Don't use deb-src entries. - next if $source_components[0] eq 'deb-src'; + # Don't use deb-src entries. + next if $source_components[0] eq 'deb-src'; - # Skip updates, backports, volatile or security mirror. - next if $source_components[2] !~ /^[a-z]+$/; + # Skip updates, backports, volatile or security mirror. + next if $source_components[2] !~ /^[a-z]+$/; - if ($source_components[1] =~ m(/debian/?$|/ubuntu/?$)) { - # Seems a typical mirror. Let's use that one + if ($source_components[1] =~ m(/debian/?$|/ubuntu/?$)) { + # Seems a typical mirror. Let's use that one - $mirror = $source_components[1]; - $suite = $source_components[2]; + $mirror = $source_components[1]; + $suite = $source_components[2]; - $found = 1; - last; - } + $found = 1; + last; + } } warn "Couldn't parse $sources_list_file of the Dom0.\n" unless $found; @@ -151,31 +151,31 @@ if (!$found and $lsb_release and -x $lsb_release) { my $vendor = `$lsb_release -s -i`; if ($vendor eq 'Debian' or $vendor eq 'Ubuntu') { - $suite = `$lsb_release -s -c`; - chomp($suite); + $suite = `$lsb_release -s -c`; + chomp($suite); - unless ($suite) { - $suite = $fallback_suite{$vendor}; - warn "Dom0 seems to be $vendor, but couldn't determine suite. Falling back to $suite.\n"; - } + unless ($suite) { + $suite = $fallback_suite{$vendor}; + warn "Dom0 seems to be $vendor, but couldn't determine suite. Falling back to $suite.\n"; + } - $mirror = $fallback_mirror{$vendor}; + $mirror = $fallback_mirror{$vendor}; - $found = 1; + $found = 1; } } if ($found) { unless ($want_help || $want_version || $want_suite || $want_mirror) { - print "$mirror $suite\n"; + print "$mirror $suite\n"; } else { - if ($want_mirror) { - print "$mirror"; - } - if ($want_suite) { - print "$suite"; - } - print "\n"; + if ($want_mirror) { + print "$mirror"; + } + if ($want_suite) { + print "$suite"; + } + print "\n"; } } else { $suite = $fallback_suite{$fallback}; diff --git a/hooks/fedora-core-6/90-make-fstab b/hooks/fedora-core-6/90-make-fstab index c6d813b..ea389e7 100755 --- a/hooks/fedora-core-6/90-make-fstab +++ b/hooks/fedora-core-6/90-make-fstab @@ -64,7 +64,7 @@ cat < ${prefix}/etc/fstab # # proc /proc proc defaults 0 0 -devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0 +devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0 E_O_FSTAB for part in `seq 1 ${NUMPARTITIONS}`; do eval "PARTITION=\"\${PARTITION${part}}\""