Patch to freeswitch.spec by Igor Neves fixing useradd and userdel on Linux, Thank you

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15586 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michal Bielicki 2009-11-21 00:04:27 +00:00
parent b5435e918e
commit ae7aa36f61
1 changed files with 9 additions and 2 deletions

View File

@ -408,7 +408,10 @@ touch .noversion
# Add a freeswitch user with group daemon # Add a freeswitch user with group daemon
%pre %pre
%ifos linux %ifos linux
/usr/sbin/useradd -r -g daemon -s /bin/false -c "The FreeSWITCH Open Source Voice Platform" -d %{prefix} freeswitch 2> /dev/null || : if ! /usr/bin/id freeswitch &>/dev/null; then
/usr/sbin/useradd -r -g daemon -s /bin/false -c "The FreeSWITCH Open Source Voice Platform" -d %{prefix} freeswitch || \
%logmsg "Unexpected error adding user \"freeswitch\". Aborting installation."
fi
%endif %endif
%post %post
@ -421,7 +424,9 @@ chkconfig --add freeswitch
%postun %postun
%{?run_ldconfig:%run_ldconfig} %{?run_ldconfig:%run_ldconfig}
userdel freeswitch if [ $1 -eq 0 ]; then
userdel freeswitch || %logmsg "User \"freeswitch\" could not be deleted."
fi
%clean %clean
%{__rm} -rf $RPM_BUILD_ROOT %{__rm} -rf $RPM_BUILD_ROOT
@ -806,6 +811,8 @@ userdel freeswitch
%changelog %changelog
* Sat Nov 21 2009 - michal.bielicki@seventhsignal.de
- added patch by Igor Neves <neves.igor@gmail.com>: Added some checkup in %post and %postun to prevent upgrades from removing freeswitch user
* Thu Nov 18 2009 - michal.bielicki@seventhsignal.de * Thu Nov 18 2009 - michal.bielicki@seventhsignal.de
- added new config files for diretory and distributor - added new config files for diretory and distributor
- removed sangoma boost from openzap for builds that do not inherit wanpipe while building. - removed sangoma boost from openzap for builds that do not inherit wanpipe while building.