Changeset 1533


Ignore:
Timestamp:
May 13, 2012, 4:42:10 AM (7 years ago)
Author:
bruno
Message:
  • rpmbootstrap: If we have a proxy defined, write it into /etc/sysconfig/proxy. Otherwise one of the opensuse's doesn't work right. Various hacks to keep the redhat distros from destroying the nis name of the machine during the install (in comment). (Eric Anderson)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/rpmbootstrap/bin/rpmbootstrap

    r1532 r1533  
    541541#
    542542$pbos->{'install'} =~ s/sudo//g;
     543if (((defined $ENV{http_proxy}) && ($ENV{http_proxy} ne '')) || ((defined $ENV{ftp_proxy}) && ($ENV{ftp_proxy} ne ''))) {
     544    if ($pbos->{'name'} eq "opensuse") {
     545        # For opensuse 11.4 or 12.1 -- one of them didn't work with http_proxy or HTTP_PROXY set.
     546        open(PROXY, "> $vepath/etc/sysconfig/proxy") || die "can't open $vepath/etc/sysconfig/proxy: $!";
     547        print PROXY "HTTP_PROXY=$ENV{http_proxy}\n" if ((defined $ENV{http_proxy}) && ($ENV{http_proxy} ne ''));
     548        print PROXY "FTP_PROXY=$ENV{ftp_proxy}\n" if ((defined $ENV{ftp_proxy}) && ($ENV{ftp_proxy} ne ''));
     549        close(PROXY);
     550    }
     551}
     552
     553# Keep redhat variants from destroying nis domain on install
     554#pb_system("chroot $vepath /bin/bash -e -c \"ln -snf /bin/true /bin/domainname\"");
     555
     556#if ($pbos->{'name'} =~ /fedora/i) { # hack to prevent fedora from destroying NIS settings on host
     557#   open (AUTH, ">$vepath/etc/pam.d/system-auth-ac") || die "unable to open $vepath/etc/pam.d/system-auth-ac for write: $!";
     558#   print AUTH "#pam_systemd -- will fix later in bootstrap\n";
     559#   close(AUTH);
     560#}
    543561pb_system("chroot $vepath /bin/bash -c \"$pbos->{'install'} $minipkglist \"","Bootstrapping OS by running $pbos->{'install'} $minipkglist");
    544562
     
    557575#
    558576pb_log(1,"Authfix\n");
    559 pb_system("chroot $vepath /bin/bash -c \"if [ -x /usr/bin/authconfig ]; then /usr/bin/authconfig --enableshadow --update; fi\"","Calling authconfig");
     577# TODO: Not generic enough to be done like that IMHO
     578# In case it was changed during the install
     579#pb_system("chroot $vepath /bin/bash -e -c \"ln -snf /bin/true /bin/domainname\"");
     580pb_system("chroot $vepath /bin/bash -c \"if [ -x /usr/bin/authconfig ]; then /usr/bin/authconfig --enableshadow --update --nostart; fi\"","Calling authconfig");
    560581
    561582# Installed additional packages we were asked to
Note: See TracChangeset for help on using the changeset viewer.