Changeset 34


Ignore:
Timestamp:
01/24/08 20:05:59 (4 years ago)
Author:
bruno
Message:

first working packages for common and dhcp.
dhcp needs more work to handle correctly subnet, which was not considered up to now

Location:
devel
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • devel/dploy-common/install.sh

    r33 r34  
    66if [ "_$PREFIX" != "_" ]; then 
    77    local=${DESTDIR}$PREFIX 
     8    conf=${DESTDIR}$CONFDIR 
    89else 
    910    local=/usr/local 
    1011        echo $PATH | grep $local/bin > /dev/null || echo "Warning - your PATH environmental variable is BROKEN. Please add $local/bin to your PATH." 
     12    conf=$local/$CONFDIR 
    1113fi 
    1214 
    1315echo "PBPKG PBVER-rPBREV will be installed under $local" 
    14 mkdir -p $local/share/data 
    15 cd $local/share/data 
     16mkdir -p $conf/keys 
     17cd $conf/keys 
    1618ssh-keygen -b 1024 -t dsa -f dploy_id_dsa -q -N "" 
  • devel/dploy-dhcp/bin/dploy-add2dhcp

    r32 r34  
    2020# 
    2121 
    22 my $mac=$ARGV[0]; 
     22my $mac=$ARGV[0] || ""; 
    2323 
    2424if ($mac !~ /^(?:[[:xdigit:]]{1,2}[-:]){5}[[:xdigit:]]{1,2}$/) { 
     
    3030$mac =~ tr/A-Z/a-z/; 
    3131 
    32 my $ip=$ARGV[1]; 
     32my $ip=$ARGV[1] || ""; 
    3333 
    3434if ($ip !~ /^([1-9]?\d|1\d\d|2[0-4]\d|25[0-5])\.([1-9]?\d|1\d\d|2[0-4]\d|25[0-5])\.([1-9]?\d|1\d\d|2[0-4]\d|25[0-5])\.([1-9]?\d|1\d\d|2[0-4]\d|25[0-5])$/) { 
  • devel/dploy-dhcp/install.sh

    r33 r34  
    66if [ "_$PREFIX" != "_" ]; then 
    77    local=${DESTDIR}$PREFIX 
     8    conf=$CONFDIR 
    89else 
    910    local=/usr/local 
    1011        echo $PATH | grep $local/bin > /dev/null || echo "Warning - your PATH environmental variable is BROKEN. Please add $local/bin to your PATH." 
     12    conf=$local/$CONFDIR 
    1113fi 
    1214 
     
    1416mkdir -p $local/bin 
    1517install -m 0755 bin/dploy-add2dhcp $local/bin  
     18 
     19# The script need to know where the CONFDIR is 
     20perl -pi -e "s|PBCONF|$conf|" $local/bin/dploy-add2dhcp 
  • devel/pbconf/dploy-dhcp/rpm/dploy-dhcp.spec

    r33 r34  
    2828%{__rm} -rf $RPM_BUILD_ROOT 
    2929export DESTDIR=$RPM_BUILD_ROOT 
    30 export PREFIX=%{_exec_prefix} 
     30export PREFIX=%{_exec_prefix}  
     31export CONFDIR=%{_sysconfdir}/PBPROJ 
    3132./install.sh 
    3233 
     
    4243%post 
    4344# Include our configuration file in std dhcp.conf file 
    44 grep -qE '^include "PBCONF/dhcpd.conf";' /etc/dhcpd.conf 
     45grep -qE '^include "%{_sysconfdir}/PBPROJ/dhcpd.conf";' /etc/dhcpd.conf 
    4546if [ $? -ne 0 ]; then 
    46     echo 'include "PBCONF/dhcpd.conf";' >> /etc/dhcpd.conf 
     47    echo 'include "%{_sysconfdir}/PBPROJ/dhcpd.conf";' >> /etc/dhcpd.conf 
    4748fi 
    4849 
     
    5051grep -qE '^dploy ' /etc/sudoers 
    5152if [ $? -ne 0 ]; then 
    52     echo 'dploy ALL=NOPASSWD: /etc/init.d/dhcpd ?*' >> /etc/dhcpd.conf 
     53    echo 'dploy ALL=NOPASSWD: /etc/init.d/dhcpd ?*' >> /etc/sudoers 
    5354fi 
    5455 
  • devel/pbconf/dploy.pb

    r32 r34  
    6767# 
    6868pkgver dploy-dhcp = devel 
     69pkgver dploy-common = devel 
    6970pkgver dploy-pxe = devel 
    7071#pkgtag dploy-dhcp = 3 
     
    7475# Hash of default package/package directory 
    7576defpkgdir dploy-dhcp = dploy-dhcp 
     77defpkgdir dploy-common = dploy-common 
    7678defpkgdir dploy-pxe = dploy-pxe 
    7779 
     
    8486# List of files per pkg on which to apply filters 
    8587# Files are mentioned relatively to pbroot/defpkgdir 
    86 filteredfiles dploy-dhcp = install.sh,bin/dploy-add2dhcp, 
     88filteredfiles dploy-dhcp = install.sh,bin/dploy-add2dhcp 
     89filteredfiles dploy-common = install.sh 
    8790#filteredfiles pkg1-doc = configure.in 
  • devel/pbconf/pbfilter/all.pbf

    r32 r34  
    3434filter PBURL = http://www.dploy.org 
    3535 
    36 # Where are stored conf files 
    37 filter PBCONF = /etc/dploy.org 
     36# Project Name 
     37filter PBPROJ = $pbproj 
  • devel/pbconf/pbfilter/rpm.pbf

    r30 r34  
    1010 
    1111# PBDEP is replaced by the list of dependencies 
    12 filter PBDEP = 
     12filter PBDEP =  
    1313 
    1414# PBSUF is replaced by the package name ($pbpkg in code) 
Note: See TracChangeset for help on using the changeset viewer.