Changeset 518 for 0.9.3


Ignore:
Timestamp:
Aug 7, 2008, 2:36:45 PM (12 years ago)
Author:
Bruno Cornec
Message:
  • Fix for fedora VM setups
  • Support for ntp server added to avoid time sync issues in VMs

(backport from devel)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 0.9.3/pb/bin/pb

    r516 r518  
    15511551        my $keyfile = pb_ssh_get(1);
    15521552       
    1553         my ($vmhost,$vmport) = pb_conf_get("vmhost","vmport");
     1553        my ($vmhost,$vmport,$vmntp) = pb_conf_get("vmhost","vmport","vmntp");
    15541554        my $nport = $vmport->{$ENV{'PBPROJ'}};
    15551555        $nport = "$pbport" if (defined $pbport);
     
    15811581use strict;
    15821582use File::Copy;
     1583
     1584# We should not need in this script more functions than what is provided
     1585# by Base and Distribution to avoid problems at exec time.
     1586# They are appended at the end.
    15831587
    15841588our $pbdebug;
     
    16001604my $count = 0;
    16011605while (<PBFILE>) {
     1606
    16021607EOF
    16031608        print SCRIPT << "EOF";
     
    16111616rename("\$file1.new",\$file1);
    16121617chmod 0600,\$file1;
     1618
     1619# Sync date
     1620pb_system("/usr/sbin/ntpdate \$vmntp->{'PBPRROJ'}","Syncing date to \$vmntp{'PBPRROJ'}");
     1621
    16131622EOF
    16141623    }
     
    17201729}
    17211730
    1722 # Sync date
    1723 #system "/usr/sbin/ntpdate ntp.pool.org";
    1724 
    17251731pb_system("rm -rf perl-ProjectBuilder-* ; wget --passive-ftp ftp://ftp.mondorescue.org/src/perl-ProjectBuilder-latest.tar.gz ; tar xvfz perl-ProjectBuilder-latest.tar.gz ; cd perl-ProjectBuilder-* ; perl Makefile.PL ; make ; make install ; cd .. ; rm -rf perl-ProjectBuilder-* ; rm -rf project-builder-* ; wget --passive-ftp ftp://ftp.mondorescue.org/src/project-builder-latest.tar.gz ; tar xvfz project-builder-latest.tar.gz ; cd project-builder-* ; perl Makefile.PL ; make ; make install ; cd .. ; rm -rf project-builder-* ;","Building Project-Builder");
    17261732system "pb 2>&1 | head -5";
    17271733EOF
    1728     # Adds pb_distro_init from ProjectBuilder::Distribution
     1734    # Adds pb_distro_init from ProjectBuilder::Distribution and Base
    17291735    foreach my $d (@INC) {
    17301736        my @f = ("$d/ProjectBuilder/Base.pm","$d/ProjectBuilder/Distribution.pm");
     
    17931799    }
    17941800
    1795     pb_system("yum -y $opt install rpm-build wget patch ntp sudo perl-DateManip perl-File-MimeInfo perl-ExtUtils-MakeMaker perl-Mail-Sendmail",$cmtall);
    17961801    if ($dver eq 4) {
     1802        pb_system("yum -y $opt install rpm-build wget patch ntp sudo perl-DateManip perl-ExtUtils-MakeMaker",$cmtall);
    17971803        pb_system("$insmb","$cmtmb");
    17981804        pb_system("$insfm","$cmtfm");
    17991805        pb_system("$insfb","$cmtfb");
     1806        pb_system("$insms","$cmtms");
     1807    } else {
     1808        pb_system("yum -y $opt install rpm-build wget patch ntp sudo perl-DateManip perl-ExtUtils-MakeMaker perl-File-MimeInfo perl-Mail-Sendmail",$cmtall);
    18001809    }
    18011810} elsif (( $dfam eq "rh" ) || ($ddir eq "sles") || (($ddir eq "suse") && (($dver eq "10.1") || ($dver eq "10.0"))) || ($ddir eq "slackware")) {
Note: See TracChangeset for help on using the changeset viewer.