Ignore:
Timestamp:
Jun 4, 2008, 4:42:52 PM (16 years ago)
Author:
Bruno Cornec
Message:

moving post install from %post to a dedicated external perl script

File:
1 edited

Legend:

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

    r470 r476  
    4545
    4646%files
    47 %defattr(-,dploy,dploy)
     47%defattr(-,root,root)
    4848%doc ChangeLog
    4949%doc INSTALL COPYING README
     
    5353
    5454%{perlvendorlib}/*
    55 #%{_bindir}/*
    56 #%{_mandir}/man1/*
     55%{_bindir}/*
     56%{_mandir}/man1/*
    5757%{_mandir}/man3/*
    5858
    5959%pre
    6060# Create dploy Account and group if needed
    61 grep -qE '^dploy:' %{_sysconfdir}/group
     61grep -qE '^PBPROJ:' %{_sysconfdir}/group
    6262if [ $? -ne 0 ]; then
    63     groupadd dploy
     63    groupadd PBPROJ
    6464fi
    65 grep -qE '^dploy:' %{_sysconfdir}/passwd
     65grep -qE '^PBPROJ:' %{_sysconfdir}/passwd
    6666if [ $? -ne 0 ]; then
    67     useradd -g dploy dploy
     67    useradd -g PBPROJ PBPROJ
    6868fi
    6969
    7070%post
    71 # Open ssh access for dploy account with generated keys
    72 mkdir -p ~dploy/.ssh
    73 chmod 700 ~dploy/.ssh
    74 keyf=~dploy/.ssh/authorized_keys
    75 if [ -f $keyf ]; then
    76     key=`cut -d' ' -f2 %{_sysconfdir}/PBPROJ/keys/dploy_id_dsa.pub`
    77     grep -qE \'$key\' $keyf
    78     if [ $? -ne 0 ]; then
    79         cat %{_sysconfdir}/PBPROJ/keys/dploy_id_dsa.pub >> $keyf
    80     fi
    81 else
    82     cp %{_sysconfdir}/PBPROJ/keys/dploy_id_dsa.pub $keyf
    83     chown dploy:dploy $keyf
    84     chmod 600 $keyf
    85 fi
     71%{_bindir}/dploy-common-post
    8672
    8773%changelog
Note: See TracChangeset for help on using the changeset viewer.