[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: init scripts macros for openssh alternative



Hmmm; do you have access to the spec file 
that was used for the previous package ?

what I do is:

%postun
if [ $1 = 0 ]; then
	stop services and maybe do some cleanup
fi


iirc the arg to postun represents how many
versions are still present of `package'
after `this' erasure (but I'm really not sure;
it's been working for me though).

but that doesn't solve your problem :(

Regards,
		-Tristan

Robin Mordasiewicz wrote:
> 
> it seems that some scripts from other packages are run last after an
> upgrade, which means that if you are upgrading package xxx.rpm which has a
> trigger script that kills the daemon after being uninstalled you will then
> have to start your newly installed package manually. I have not yet
> figured out how to get around this.
> 
> On Fri, 7 Mar 2003, Tristan Van Berkom wrote:
> 
> > Hah ; I was just contemplating a very similar
> > problem.
> >
> > I have an rpm that depends on a mysql server.
> >
> > my currently hacked version does this
> >
> > %pre
> > /etc/rc.d/ini.d/mysql start
> >
> > what I'm wondering is what do I put in %post ?
> >
> > should I really grep the filenames to be found
> > in :
> >
> > /etc/rc.`runlevel`/*
> >
> > and see if it should be stopped ?
> >
> > is there possibly a way to remember if mysql
> > was running in the first place ?
> >
> > i.e.
> > if [ ! -f /var/lock/subsys/mysqld ]
> >    must_stop_mysql = TRUE
> >
> > ?????
> >
> > anything to add to the thoughtpool
> > would be apreciated ;)
> >
> >       -Tristan
> >
> 
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/rpm-list





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []