Hi,
Attached it's a patch that corrects the problem when doing upgrade to
other older version of freeswitch rpm the freeswitch user was being deleted.
This patch was made against freeswitch.spec from freeswitch 1.0.4.
It should be applied with "patch -p0 < freeswitch.spec".
Cheers,
--
Igor Neves<igor.ne...@3gnt.net>
3GNTW - Tecnologias de Informação, Lda
SIP: i...@3gnt.net JID: i...@3gnt.net
ICQ: 249075444 MSN: i...@3gnt.net
TLM: 00351914503611 PSTN: 00351252377120
--- freeswitch.spec 2009-08-06 17:36:10.000000000 -0400
+++ freeswitch.spec 2009-11-20 11:56:45.000000000 -0500
@@ -408,7 +408,10 @@
# Add a freeswitch user with group daemon
%pre
%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
%post
@@ -421,7 +424,9 @@
%postun
%{?run_ldconfig:%run_ldconfig}
-userdel freeswitch
+if [ $1 -eq 0 ]; then
+ userdel freeswitch || %logmsg "User \"freeswitch\" could not be deleted."
+fi
%clean
%{__rm} -rf $RPM_BUILD_ROOT
@@ -802,6 +808,8 @@
%changelog
+* Fri Nov 20 2009 - Igor Neves <neves.i...@gmail.com>
+- Added some checkup in %post and %postun to prevent upgrades from removing
freeswitch user
* Tue Jul 24 2009 - m...@jerris.com
- removed mod_http
- removed ozmod_wanpipe
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org