From 4d98232656d54632d54427d08a02395accde55d7 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Mon, 7 May 2012 22:56:33 +0200 Subject: [PATCH] Replace tabs with spaces --- bin/xen-create-nfs | 30 +++++++++---------- bin/xt-guess-suite-and-mirror | 56 +++++++++++++++++------------------ 2 files changed, 43 insertions(+), 43 deletions(-) diff --git a/bin/xen-create-nfs b/bin/xen-create-nfs index 5b1dc3a..a118c94 100755 --- a/bin/xen-create-nfs +++ b/bin/xen-create-nfs @@ -385,23 +385,23 @@ sub testArguments # this code is borrowed for now... if ( exists($CONFIG{ 'memory' }) and - defined($CONFIG{ 'memory' }) ) { + defined($CONFIG{ 'memory' }) ) { - # - # The memory size: Convert Gb -> Mb. - # - if ( $CONFIG{ 'memory' } =~ /^(\d+)Gb.*$/i ) - { - $CONFIG{ 'memory' } = $1 * 1024; - } + # + # The memory size: Convert Gb -> Mb. + # + if ( $CONFIG{ 'memory' } =~ /^(\d+)Gb.*$/i ) + { + $CONFIG{ 'memory' } = $1 * 1024; + } - # - # Remove any trailing Mb. - # - if ( $CONFIG{ 'memory' } =~ /^(\d+)Mb.*$/i ) - { - $CONFIG{ 'memory' } = $1; - } + # + # Remove any trailing Mb. + # + if ( $CONFIG{ 'memory' } =~ /^(\d+)Mb.*$/i ) + { + $CONFIG{ 'memory' } = $1; + } } # All OK. diff --git a/bin/xt-guess-suite-and-mirror b/bin/xt-guess-suite-and-mirror index 7bf4e16..a8bb8c3 100755 --- a/bin/xt-guess-suite-and-mirror +++ b/bin/xt-guess-suite-and-mirror @@ -69,7 +69,7 @@ my %fallback_suite = ( Debian => 'stable', # Where to look for the sources.list to parse my @sources_list_files = ( '/etc/apt/sources.list', - glob('/etc/apt/sources.list.d/*.list')); + glob('/etc/apt/sources.list.d/*.list')); use File::Slurp; use Getopt::Long; @@ -111,43 +111,43 @@ if ($want_manual) { all_sources_list_files: foreach my $sources_list_file (@sources_list_files) { if (-r $sources_list_file) { - # sources.list file exists, so it's something debianoid. + # sources.list file exists, so it's something debianoid. - # read sources.list and split it into lines - my @sources_list = read_file($sources_list_file); + # read sources.list and split it into lines + my @sources_list = read_file($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/; + # 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/; - # 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 all_sources_list_files; - } - } + $found = 1; + last all_sources_list_files; + } + } } } die "Couldn't find a useful entry in the sources.list files of the Dom0. Tried:\n ".