<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 10/06/2009 08:25 AM, Nathan Kinder wrote:
<blockquote cite="mid:4ACB6186.8070800@redhat.com" type="cite">
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
On 10/05/2009 07:37 PM, Rich Megginson wrote:
  <blockquote cite="mid:4ACAAD68.3050003@redhat.com" type="cite">It is
a
problem that upgrade is not run automatically during rpm installation.&nbsp;
It causes problems for other packages that depend on 389.&nbsp; This fix
allows rpm to run the upgrade script.&nbsp; Some notes: <br>
* had to write scriptlets in lua to allow data to be passed among
different phases - %posttrans does not know if it is being run as a
fresh install or an upgrade, so we have to get that information from
%post to pass to %posttrans <br>
* upgrade must be run in posttrans - in %post, the old package that is
being upgraded will still be around - this includes the old schema in
the schema dir - the update script assumes the contents of the schema
dir are correct and current - so we have to wait until %posttrans when
the schema dir will contain only the new schema <br>
* the upgrade script can only run non-interactively if the servers are
all shutdown first - so we have to shutdown the servers, run the
upgrade, then start the servers back up - however, if the user did not
want certain servers to be running, we first get a list of the running
servers, and only start those back up after the upgrade <br>
    <br>
    <pre wrap=""><hr size="4" width="90%">
  </pre>
  </blockquote>
I believe you need to add something like the following since you added
the new dirsrv-snmp init script to the package:<br>
  <br>
  <pre wrap=""><tt>%post
os.execute('/sbin/chkconfig --add %{pkgname}')
</tt></pre>
</blockquote>
Sorry, I meant the following for the above line:<br>
<pre wrap=""><tt>os.execute('/sbin/chkconfig --add %{pkgname}-snmp')</tt></pre>
<blockquote cite="mid:4ACB6186.8070800@redhat.com" type="cite">
  <tt><br>
%postun<br>
/sbin/service %{pkgname}-snmp stop &gt;/dev/null 2&gt;&amp;1 || :<br>
/sbin/chkconfig --del %{pkgname}-snmp</tt><br>
  <br>
Other than that, it looks good.<br>
  <blockquote cite="mid:4ACAAD68.3050003@redhat.com" type="cite">
    <pre wrap="">--
389-devel mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:389-devel@redhat.com">389-devel@redhat.com</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="https://www.redhat.com/mailman/listinfo/fedora-directory-devel">https://www.redhat.com/mailman/listinfo/fedora-directory-devel</a>
  </pre>
  </blockquote>
  <br>
  <pre wrap="">
<hr size="4" width="90%">
--
389-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:389-devel@redhat.com">389-devel@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/fedora-directory-devel">https://www.redhat.com/mailman/listinfo/fedora-directory-devel</a>
  </pre>
</blockquote>
<br>
</body>
</html>