Changeset 63


Ignore:
Timestamp:
06/05/08 16:23:10 (4 years ago)
Author:
bruno
Message:

Save current state of art :-) remains to do is the conf file for Apache with dploy-dhcp. focus on post install deloyment

Location:
devel
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • devel/dploy-common/bin/dploy-common-post

    r62 r63  
    8787chown $uid,$gid,$keyf; 
    8888chmod 0600,$keyf; 
     89 
     90chown $uid,$gid,PBCONF; 
     91chmod 0755,PBCONF; 
  • devel/dploy-dhcp/bin/dploy-dhcp-post

    r62 r63  
    88use strict; 
    99use ProjectBuilder::Base; 
     10use ProjectBuilder::Conf; 
    1011 
    1112=pod 
     
    5455my ($login,$pass,$uid,$gid,$gecos,$dir,$shell) = getpwnam($user) or die "$user not in passwd file"; 
    5556 
    56 chown 0,$gid,"/etc/dhcpd.conf"; 
    57 chmod 0644,"/etc/dhcpd.conf"; 
     57pb_conf_add("PBCONF/dploy.conf"); 
     58my ($pathdhcp) = pb_conf_get("pathdhcp"); 
     59 
     60chown 0,$gid,$pathdhcp->{$ENV{'PBPROJ'}}; 
     61chmod 0644,$pathdhcp->{$ENV{'PBPROJ'}}; 
    5862 
    5963# Include dploy in sudoers 
  • devel/dploy-pxe/bin/dploy-pxe-post

    r62 r63  
    77 
    88use strict; 
     9use File::Basename; 
     10use File::Copy; 
    911use ProjectBuilder::Base; 
    1012use ProjectBuilder::Conf; 
     
    7173 
    7274pb_conf_add("PBCONF/dploy.conf"); 
    73 my ($pxepath) = pb_conf_get("pxepath"); 
     75my ($pathpxe) = pb_conf_get("pathpxe"); 
    7476 
    75 foreach $d ("$pxepath->{$ENV{'PBPROJ'}}", "$pxepath->{$ENV{'PBPROJ'}}/../linuxcoe", "$pxepath->{$ENV{'PBPROJ'}}/../mondorescue") { 
     77# Create dir structure 
     78foreach $d ("$pathpxe->{$ENV{'PBPROJ'}}", "$pathpxe->{$ENV{'PBPROJ'}}/../linuxcoe", "$pathpxe->{$ENV{'PBPROJ'}}/../mondorescue") { 
    7679    pb_mkdir_p($d) if ( not -d $d); 
    7780    chown $uid,$gid,$d; 
     
    7982} 
    8083 
     84# Adapt tftp xinetd conf file 
     85my $xin = ""; 
     86$xin = "/etc/xinetd.d/tftp" if (! -f $xin); 
     87$xin = "/etc/xinetd.d/tftpd" if (! -f $xin); 
     88 
     89open(XIN,$xin)  || die "Unable to read $xin: $!"; 
     90open(OUT,"$xin.tmp")  || die "Unable to write $xin.tmp: $!"; 
     91while (<XIN>) { 
     92    s/disable(\s*)=(\s*)yes/disable$1=$2no/; 
     93    s/server_args(\s*)=(\s*)(.*)/change_parms($1,$2,$3)/; 
     94    print OUT; 
     95} 
     96close(XIN); 
     97close(OUT); 
     98move("$xin.tmp",$xin); 
     99 
     100# Restart xinetd 
     101pb_system("/etc/init.d/xinetd restart","Restarting xinetd"); 
     102 
     103# Restart Apache 
     104pb_system("/etc/init.d/apache restart","Restarting Apache"); 
     105 
     106# PBHTTPDCONFDIR 
     107# Prepare Apache conf for kickstart support for LinuxCOE 
     108 
     109sub change_parms() { 
     110     
     111    my ($s1, $s2, $params) = @_; 
     112    print "# Modified by dploy.org\n"; 
     113    print "# server_args$s1=$s2$params\n"; 
     114    my $dir = dirname($pathpxe->{$ENV{'PBPROJ'}}); 
     115    $params =~ s/-s\s+\S+\s+/-s $dir/; 
     116    print "server_args$s1=$s2$params\n"; 
     117$xin)} 
  • devel/dploy-pxe/install.sh

    r62 r63  
    1818install -m 0755 bin/dploy-pxe-post $local/bin  
    1919 
    20 # The script need to know where the CONFDIR is 
     20# The scripts need to know where the CONFDIR is 
    2121perl -pi -e "s|PBCONF|$conf|" $local/bin/dploy-add2pxe $local/bin/dploy-pxe-post 
Note: See TracChangeset for help on using the changeset viewer.