Changeset 1123 for dasscm/trunk


Ignore:
Timestamp:
Nov 30, 2012, 11:08:25 AM (12 years ago)
Author:
joergs
Message:

better handling of extra files. always integrate /etc/nagios/nrpe.d/dasscm.cfg

Location:
dasscm/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • dasscm/trunk/dasscm.install.sh

    r1121 r1123  
    1010fi
    1111
    12 if ! [ -d "${DESTDIR}" ]; then
    13     echo "failed: DESTDIR ${DESTDIR} is not accessable. Giving up"
    14     exit 1
    15 fi
    16 
     12# if ! [ -d "${DESTDIR}" ]; then
     13#     echo "failed: DESTDIR ${DESTDIR} is not accessable. Giving up"
     14#     exit 1
     15# fi
     16mkdir -p ${DESTDIR}
    1717
    1818install -d ${DESTDIR}/var/lib/dasscm/
     
    3131fi
    3232
    33 if test -d /etc/nagios/nrpe.d/; then
     33#if test -d /etc/nagios/nrpe.d/; then
    3434    mkdir -p ${DESTDIR}/etc/nagios/nrpe.d/
    3535    install -m 644 etc/nagios/nrpe.d/nrpe-dasscm.cfg ${DESTDIR}/etc/nagios/nrpe.d/dasscm.cfg
    36 fi
     36#fi
    3737
    3838install -d ${DESTDIR}/etc/profile.d/
  • dasscm/trunk/dasscm.spec

    r1122 r1123  
    2424BuildRequires:  gzip pam-modules tar
    2525%endif
     26#BuildRequires:  nagios-nrpe
    2627
    2728# Subversion should be installed during build
     
    5051
    5152# handle special files, not useful on all distributions
    52 %if %(test -d /etc/bash_completion.d/ && echo 1 || echo 0)
    53     %define use_bash_completion 1
    54 %endif
    55 %if %(test -d /etc/nagios/nrpe.d/ && echo 1 || echo 0)
    56     %define use_nagios_nrpe_d 1
    57 %endif
     53rm -f files
     54touch files
     55if test -e $RPM_BUILD_ROOT/etc/bash_completion.d/dasscm.sh; then
     56    echo '%config(noreplace)  /etc/bash_completion.d/dasscm.sh' >> files
     57else
     58    echo '%doc                etc/bash_completion.d/bash_completion_dasscm.sh' >> files
     59fi
     60
     61if test -e $RPM_BUILD_ROOT/etc/nagios/nrpe.d/dasscm.cfg; then
     62    test -d /etc/nagios        || echo '%dir /etc/nagios' >> files
     63    test -d /etc/nagios/nrpe.d || echo '%dir /etc/nagios/nrpe.d' >> files
     64    echo '%config(noreplace)  /etc/nagios/nrpe.d/dasscm.cfg' >> files
     65else
     66    echo '%doc                etc/nagios/nrpe.d/nrpe-dasscm.cfg' >> files
     67fi
     68
     69#cat files
    5870
    5971
     
    6577#       groupadd -g 4199 dasscm
    6678
    67 %files
     79%files -f files
    6880%defattr(-,root,root)
    6981%dir /var/lib/dasscm/
     
    7587%config(noreplace)  %attr(640,root,root) /etc/dasscm.conf
    7688%config(noreplace)  /etc/profile.d/dasscm.sh
    77 %if 0%{?use_bash_completion}
    78 %config(noreplace)  /etc/bash_completion.d/dasscm.sh
    79 %else
    80 %doc                etc/bash_completion.d/bash_completion_dasscm.sh
    81 %endif
    82 
    83 %if 0%{?use_nagios_nrpe_d}
    84 %config(noreplace)  /etc/nagios/nrpe.d/dasscm.cfg
    85 %else
    86 %doc                etc/nagios/nrpe.d/nrpe-dasscm.cfg
    87 %endif
    8889
    8990# /etc/sudoers.d/ should not belong to dasscm,
Note: See TracChangeset for help on using the changeset viewer.