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

RE: init scripts macros for openssh alternative



To work around this problem I have the following in my script:

%postun
# if files are there, assume this is upgrade and don't disable the service
if [ ! -f some/file/which/is/part/of/package ]; then
	chkconfig --del myservice
fi

This seems to work?

> -----Original Message-----
> From: Robin Mordasiewicz [mailto:robin@primus.ca]
> Sent: Friday, March 07, 2003 12:54 PM
> To: rpm-list@redhat.com
> Subject: Re: init scripts macros for openssh alternative
> 
> 
> 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] []