Changeset 470 in ProjectBuilder


Ignore:
Timestamp:
Jun 2, 2008, 7:11:23 PM (16 years ago)
Author:
Bruno Cornec
Message:
  • dploy-pxe requires syslinux (at least on rhel 5)
  • dploy-pxe adds permission to mount/umount iso images via sudoers
  • dploy-pxe now creates all required dirs under /tftpboot
  • dploy-dhcp owns the /etc/dhcpd.conf file
  • dploy-dhcp doesn't include by default a non-existent /etc/dploy/dhcp.conf file

(Those post install script should become real scripts launched by all install means)

Location:
projects/dploy/pbconf/devel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • projects/dploy/pbconf/devel/dploy-common/rpm/dploy-common.spec

    r468 r470  
    5959%pre
    6060# Create dploy Account and group if needed
    61 grep -qE '^dploy:' /etc/group
     61grep -qE '^dploy:' %{_sysconfdir}/group
    6262if [ $? -ne 0 ]; then
    6363    groupadd dploy
    6464fi
    65 grep -qE '^dploy:' /etc/passwd
     65grep -qE '^dploy:' %{_sysconfdir}/passwd
    6666if [ $? -ne 0 ]; then
    6767    useradd -g dploy dploy
  • projects/dploy/pbconf/devel/dploy-dhcp/rpm/dploy-dhcp.spec

    r469 r470  
    4444%post
    4545# Include our configuration file in std dhcp.conf file
    46 grep -qE '^include "%{_sysconfdir}/PBPROJ/dhcpd.conf";' /etc/dhcpd.conf
    47 if [ $? -ne 0 ]; then
    48     echo 'include "%{_sysconfdir}/PBPROJ/dhcpd.conf";' >> /etc/dhcpd.conf
    49 fi
     46#grep -qE '^include "%{_sysconfdir}/PBPROJ/dhcpd.conf";' /etc/dhcpd.conf
     47#if [ $? -ne 0 ]; then
     48    #echo 'include "%{_sysconfdir}/PBPROJ/dhcpd.conf";' >> /etc/dhcpd.conf
     49#fi
     50
     51# Give us the rights to modify the DHCP conf file
     52chgrp dploy %{_sysconfdir}/dhcpd.conf
     53chmod 664 %{_sysconfdir}/dhcpd.conf
    5054
    5155# Include dploy in sudoers
    52 grep -qE '^dploy ' /etc/sudoers
     56grep -qE '^dploy ' %{_sysconfdir}/sudoers | grep %{_sysconfdir}/init.d/dhcpd
    5357if [ $? -ne 0 ]; then
    54     echo 'dploy ALL=NOPASSWD: /etc/init.d/dhcpd ?*' >> /etc/sudoers
     58    echo 'dploy ALL=NOPASSWD: /etc/init.d/dhcpd ?*' >> %{_sysconfdir}/sudoers
    5559fi
    5660
  • projects/dploy/pbconf/devel/dploy-pxe/rpm/dploy-pxe.spec

    r421 r470  
    1515BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
    1616BuildArch:      noarch
    17 Requires:       dploy-common, tftp-server, sudo, perl, PBDEP
     17Requires:       dploy-common, tftp-server, sudo, perl, syslinux, PBDEP
    1818
    1919%description
     
    4343
    4444%post
     45# Include dploy in sudoers
     46grep -qE '^dploy ' %{_sysconfdir}/sudoers | grep /bin/umount
     47if [ $? -ne 0 ]; then
     48    echo 'dploy ALL=NOPASSWD: /bin/mount -o loop ?*' >> %{_sysconfdir}/sudoers
     49    echo 'dploy ALL=NOPASSWD: /bin/umount ?*' >> %{_sysconfdir}/sudoers
     50fi
     51
     52# Setup all required paths for tftpboot environment
     53pathpxe=`grep pathpxe %{_sysconfdir}/PBPROJ/dploy.conf | cut -d= -f2`
     54for p in $pathpxe $pathpxe/../mondorescue $pathpxe/../linuxcoe; do
     55    if [ ! -d $p ]; then
     56        mkdir -p $p
     57    fi
     58    chgrp dploy $p
     59    chmod 775 $p
     60done
    4561
    4662%changelog
Note: See TracChangeset for help on using the changeset viewer.