Changeset 33


Ignore:
Timestamp:
01/22/08 18:51:20 (4 years ago)
Author:
bruno
Message:

Create a new pkg dplo-common which handles the account creation + ssh key

Location:
devel
Files:
2 added
2 edited

Legend:

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

    r32 r33  
    1313echo "PBPKG PBVER-rPBREV will be installed under $local" 
    1414mkdir -p $local/bin 
    15 install -m 0755 -g dploy -o dploy bin/dploy-add2dhcp $local/bin  
     15install -m 0755 bin/dploy-add2dhcp $local/bin  
  • devel/pbconf/dploy-dhcp/rpm/dploy-dhcp.spec

    r32 r33  
    1414Source:         PBSRC 
    1515BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n) 
    16 Requires:       dhcp-server, sudo, perl, PBDEP 
     16Requires:       dploy-common, dhcp-server, sudo, perl, PBDEP 
    1717 
    1818%description 
     
    4040%{_bindir}/* 
    4141 
    42 %pre 
    43 # Create dploy Account and group if needed 
    44 grep -qE '^dploy:' /etc/group 
    45 if [ $? -ne 0 ]; then 
    46     addgroup dploy 
    47 fi 
    48 grep -qE '^dploy:' /etc/passwd 
    49 if [ $? -ne 0 ]; then 
    50     adduser dploy dploy 
    51 fi 
    52  
    5342%post 
    5443# Include our configuration file in std dhcp.conf file 
    55 grep -qE '^include "PBCONF/dhcpd.conf";' /etc/passwd 
     44grep -qE '^include "PBCONF/dhcpd.conf";' /etc/dhcpd.conf 
    5645if [ $? -ne 0 ]; then 
    5746    echo 'include "PBCONF/dhcpd.conf";' >> /etc/dhcpd.conf 
    5847fi 
    5948 
     49# Include dploy in sudoers 
     50grep -qE '^dploy ' /etc/sudoers 
     51if [ $? -ne 0 ]; then 
     52    echo 'dploy ALL=NOPASSWD: /etc/init.d/dhcpd ?*' >> /etc/dhcpd.conf 
     53fi 
     54 
    6055%changelog 
    6156PBLOG 
Note: See TracChangeset for help on using the changeset viewer.