Denis Pelletier <[EMAIL PROTECTED]> writes:

> Hi,
> 
> I want samba to start on boot. So to do this I use drakxservices and I 
> choose the option "run on boot". Everything is ok. But everytime I upgrade 
> samba the option "run on boot" is turned off.

Sylvestre, it seems that you don't use the necessary macros to
handle sysv service correctly, particularly with upgrades, in
samba.spec. You should use the following two macros:

[gc@bi ~/rpm] rpm --eval %_post_service
if [ $1 = 1 ]; then /sbin/chkconfig --add %{1}; else if [ -f /var/lock/subsys/%{1} ]; 
then service %{1} restart > /dev/null 2>/dev/null || : ; fi; fi; 

[gc@bi ~/rpm] rpm --eval %_preun_service
if [ $1 = 0 ]; then service %{1} stop > /dev/null 2>/dev/null || :; /sbin/chkconfig 
--del %{1}; fi; 


See explanation in:

http://www.linux-mandrake.com/howtos/mdk-rpm/more-macros.html



-- 
Guillaume Cottenceau - http://www.frozen-bubble.org/

Reply via email to