SPECS: plptools.spec - use %service (weird upgrade procedure removed)

Elan Ruusamäe glen at delfi.ee
Sun Mar 12 23:58:41 CET 2006


On Sunday 12 March 2006 21:11, Przemek Iskra wrote:
> On Sun, Mar 12, 2006 at 07:20:17PM +0100, glen wrote:
> > Author: glen                         Date: Sun Mar 12 18:20:17 2006 GMT
> > Module: SPECS                         Tag: HEAD
> > ---- Log message:
> > - use %service (weird upgrade procedure removed)
>
> now upgrade will fail if service is running:
> file deamon mounts special nfs filesystem under /media/psion and changes
> it's attributes
> it must be stopped before upgrading files or rpm will fail on
> /media/psion directory coldn't change it's attributes to in-rpm ones
so it shouldn't be packaged.
or the path should be added to %_netsharedpath.

i believe #1 is correct way.

> > -%pre
> > -if [ "$1" != "0" -a -f /var/lock/subsys/psion ]; then
> > -	/etc/rc.d/init.d/psion stop >&2
> > -	touch /var/lock/subsys/psion_was_started
> > -fi
> > -
> >  %post
> >  /sbin/ldconfig
> >  /sbin/chkconfig --add psion
> > -if [ -f /var/lock/subsys/psion_was_started ]; then
> > -	/etc/rc.d/init.d/psion start >&2
> > -fi
> > -rm -f /var/lock/subsys/psion_was_started
> > +%service psion restart

-- 
glen


More information about the pld-devel-en mailing list