Guillaume Cottenceau wrote:
> 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;
>
Is there a list (besides maybe rpm-build's changelog) that documents
when (ie what Mandrake release) which macros were added?
We have gone to some effort to ensure that the samba rpms build cleanly
on everything from 7.2 to cooker (they might even build on 7.1 and
corpo), with easy ways to enable certain features that should not be
defaults (like storing smbpasswd's in ldap), and currently provide rpms
for 8.0 and 8.1.
If the macros aren't available in 7.2, we should then problably use the
expanded versions of the macros.
The original samba spec file is a bit of a mess, the samba team likes
doing things the hard way when it comes to packaging ...
Buchan
--
|----------------Registered Linux User #182071-----------------|
Buchan Milne Mechanical Engineer, Network Manager
Cellphone * Work +27 82 472 2231 * +27 21 8828820x202
Stellenbosch Automotive Engineering http://www.cae.co.za
GPG Key http://ranger.dnsalias.com/gpg.key