1
0
mirror of synced 2026-04-16 07:56:15 +00:00

Replace tabs with spaces

This makes t/no-tabs.t pass.
I'm responsible for some tabs in previous patches, so this
fixes mine also :)

Note that I find this test silly, but "dura lex, sed lex"...
This commit is contained in:
Stéphane Jourdois
2010-07-11 14:05:40 +02:00
committed by Axel Beckert
parent c5b4f4bc73
commit bd840ba071
23 changed files with 165 additions and 165 deletions

View File

@@ -1339,17 +1339,17 @@ sub setupDefaultOptions
# Initialize per distribution mirror defaults: Debian
foreach my $debdist (qw(etch lenny squeeze sid testing stable unstable)) {
$CONFIG{ 'mirror_'.$debdist } = $CONFIG{ 'mirror' }
$CONFIG{ 'mirror_'.$debdist } = $CONFIG{ 'mirror' }
}
foreach my $debdist (qw(sarge)) {
$CONFIG{ 'mirror_'.$debdist } = 'http://archive.debian.org/debian';
$CONFIG{ 'mirror_'.$debdist } = 'http://archive.debian.org/debian';
}
# Initialize per distribution mirror defaults: Ubuntu
foreach my $ubuntudist (qw(dapper hardy intrepid jaunty karmic lucid maverick)) {
$CONFIG{ 'mirror_'.$ubuntudist } = 'http://archive.ubuntu.com/ubuntu';
$CONFIG{ 'mirror_'.$ubuntudist } = 'http://archive.ubuntu.com/ubuntu';
}
foreach my $ubuntudist (qw(edgy feisty gutsy)) {
$CONFIG{ 'mirror_'.$ubuntudist } = 'http://old-releases.ubuntu.com/ubuntu';
$CONFIG{ 'mirror_'.$ubuntudist } = 'http://old-releases.ubuntu.com/ubuntu';
}
$CONFIG{ 'arch' } = '';
$CONFIG{ 'fs' } = 'ext3';
@@ -1757,7 +1757,7 @@ sub checkArguments
# Sarge amd64 needs different default mirror
#
if ( $CONFIG{ 'dist' } =~ /sarge/ and
$CONFIG{ 'mirror_sarge' } eq 'http://archive.debian.org/debian' )
$CONFIG{ 'mirror_sarge' } eq 'http://archive.debian.org/debian' )
{
$CONFIG{ 'mirror_sarge' } = 'http://amd64.debian.net/debian';
}
@@ -1767,8 +1767,8 @@ sub checkArguments
#
my $distMirror = "mirror_" . $CONFIG{ 'dist' };
if ( !$CONFIG{ 'mirror' } and
$CONFIG{ $distMirror } and
length( $CONFIG{ $distMirror } ) )
$CONFIG{ $distMirror } and
length( $CONFIG{ $distMirror } ) )
{
$CONFIG{ 'mirror' } = $CONFIG{ $distMirror };
}
@@ -3402,7 +3402,7 @@ sub installSystem
# Propagate --debootstrap-cmd if install-method is debootstrap
#
if ( $CONFIG{ 'install-method' } eq 'debootstrap' and
$CONFIG{ 'debootstrap-cmd' } )
$CONFIG{ 'debootstrap-cmd' } )
{
$cmd .= " --debootstrap-cmd=$CONFIG{'debootstrap-cmd'}";
}
@@ -3554,9 +3554,9 @@ sub runCustomisationHooks
# Restore domU's resolv.conf if needed
#
if (-f "$MOUNT_POINT/etc/resolv.conf") {
mv("$MOUNT_POINT/etc/resolv.conf.old", "$MOUNT_POINT/etc/resolv.conf");
mv("$MOUNT_POINT/etc/resolv.conf.old", "$MOUNT_POINT/etc/resolv.conf");
} else {
unlink "$MOUNT_POINT/etc/resolv.conf";
unlink "$MOUNT_POINT/etc/resolv.conf";
}
#
@@ -4028,13 +4028,13 @@ sub runCommand
if (!defined($rcopen)) {
logprint("Starting command '$cmd' failed: $!\n");
logprint("Aborting\n");
print "See /var/log/xen-tools/$CONFIG{'hostname'}.log for details\n";
print "See /var/log/xen-tools/$CONFIG{'hostname'}.log for details\n";
$FAIL = 1;
exit 127;
}
while (my $line = <CMD>) {
logonly $line;
logonly $line;
}
my $rcclose = close(CMD);
@@ -4045,7 +4045,7 @@ sub runCommand
{
logprint("Running command '$cmd' failed with exit code $?.\n");
logprint("Aborting\n");
print "See /var/log/xen-tools/$CONFIG{'hostname'}.log for details\n";
print "See /var/log/xen-tools/$CONFIG{'hostname'}.log for details\n";
$FAIL = 1;
exit 127;
}

View File

@@ -240,8 +240,8 @@ sub parseCommandLineArguments
#
GetOptions( "test=s", \$CONFIG{ 'prefix' },
"help", \$HELP,
"manual", \$MANUAL,
"version", \$VERSION );
"manual", \$MANUAL,
"version", \$VERSION );
pod2usage(1) if $HELP;
pod2usage( -verbose => 2 ) if $MANUAL;

View File

@@ -288,11 +288,11 @@ sub updateXenImage
if ( ( -e $tmp . "/usr/bin/apt-get" ) &&
( -x $tmp . "/usr/bin/apt-get" ) )
{
#
# Copy dom0's resolv.conf to domU
#
mv("$tmp/etc/resolv.conf", "$tmp/etc/resolv.conf.old") if -f "$tmp/etc/resolv.conf";
cp("/etc/resolv.conf", "$tmp/etc/resolv.conf");
#
# Copy dom0's resolv.conf to domU
#
mv("$tmp/etc/resolv.conf", "$tmp/etc/resolv.conf.old") if -f "$tmp/etc/resolv.conf";
cp("/etc/resolv.conf", "$tmp/etc/resolv.conf");
#
# Now run the update command.
@@ -307,9 +307,9 @@ sub updateXenImage
"DEBIAN_FRONTEND=noninteractive chroot $tmp /usr/bin/apt-get upgrade --yes --force-yes"
);
#
# Restore domU's resolv.conf if needed
#
#
# Restore domU's resolv.conf if needed
#
if (-f "$tmp/etc/resolv.conf") {
mv("$tmp/etc/resolv.conf.old", "$tmp/etc/resolv.conf");
} else {
@@ -453,11 +453,11 @@ sub parseCommandLineArguments
# Parse options.
#
GetOptions( "dir=s", \$CONFIG{ 'dir' },
"lvm=s", \$CONFIG{ 'lvm' },
"lvm=s", \$CONFIG{ 'lvm' },
"evms=s", \$CONFIG{ 'evms' },
"help", \$HELP,
"help", \$HELP,
"manual", \$MANUAL,
"version", \$VERSION );
"version", \$VERSION );
pod2usage(1) if $HELP;
pod2usage( -verbose => 2 ) if $MANUAL;

View File

@@ -322,9 +322,9 @@ sub runDistributionHooks
print "--\n";
my $rc = system($cmd);
if ($rc != 0) {
print "hook $name failed: $?\n";
exit 1;
}
print "hook $name failed: $?\n";
exit 1;
}
print "--\n";
print "Done\n\n";
}
@@ -333,9 +333,9 @@ sub runDistributionHooks
print "Running hook $name\n";
my $rc = system($cmd);
if ($rc != 0) {
print "hook $name failed: $?\n";
exit 1;
}
print "hook $name failed: $?\n";
exit 1;
}
print "hook $name: done.\n";
}
}

View File

@@ -9,8 +9,8 @@ mirror for DomUs on Debian and Ubuntu Dom0s.
=head1 SYNOPSIS
--suite Show suite
--mirror Show mirror
--suite Show suite
--mirror Show mirror
Shows both if no parameter is given.

View File

@@ -256,8 +256,8 @@ if ( defined( $CONFIG{ 'install-method' } ) &&
# Test that we have some "standard" files present.
#
checkForCommonFilesInChroot($CONFIG{ 'location' },
"installed system");
checkForCommonFilesInChroot($CONFIG{ 'location' },
"installed system");
#
# All done.
@@ -538,13 +538,13 @@ sub checkForCommonFilesInChroot {
my ($chroot, $what) = @_;
foreach my $file (qw( /bin/ls /bin/cp ))
{
if ( !-x $chroot.$file )
{
print STDERR <<EOT;
if ( !-x $chroot.$file )
{
print STDERR <<EOT;
WARNING ($0): The $what at $chroot doesn\'t seem to be a full system.
WARNING ($0): The $what is missing the common file: $file.
EOT
}
}
}
}
@@ -661,7 +661,7 @@ sub do_copy
# Check if the copy source has at least some "standard" files present.
#
checkForCommonFilesInChroot($CONFIG{ 'install-source' },
"installation source");
"installation source");
#
# Find the copy command to run from the configuration file.
@@ -706,15 +706,15 @@ sub do_debootstrap
my $cachedir = $CONFIG{ 'cachedir' };
if ( !$cmd )
{
if (-x '/usr/sbin/debootstrap') {
$cmd = '/usr/sbin/debootstrap';
} elsif (-x '/usr/sbin/cdebootstrap') {
$cmd = '/usr/sbin/cdebootstrap';
} else {
print STDERR "Found neither debootstrap nor cdebootstrap and no --debootstrap-cmd given\n";
exit 1;
}
print "Using $cmd as debootstrap command\n";
if (-x '/usr/sbin/debootstrap') {
$cmd = '/usr/sbin/debootstrap';
} elsif (-x '/usr/sbin/cdebootstrap') {
$cmd = '/usr/sbin/cdebootstrap';
} else {
print STDERR "Found neither debootstrap nor cdebootstrap and no --debootstrap-cmd given\n";
exit 1;
}
print "Using $cmd as debootstrap command\n";
}