[OpenAFS-devel] Do depmod for correct kernel version on kernel module post-install

Mike Polek mike@pictage.com
Thu, 17 Nov 2005 18:37:02 -0800


Not sure if this should go here, or to the -bugs list. Sorry if
it's the wrong one.

In the openafs.spec file for building the RPMs, it's set up to
do a "depmod -ae" when the kernel module is installed. However,
it assumes that the module being installed is for the running
kernel. We're doing automated installs where we install the new
kernel and the openafs kernel module RPMs at the same time, while
running under the old kernel. I believe the following patch to
the openafs.spec file will update the depmod.* files for the
install kernel vs. the running kernel when installing a new
kernel module RPM.

Thanks!!
Mike

-------------------------------------------------------------

--- openafs.spec        2005-10-23 06:56:21.000000000 -0700
+++ openafs.spec.corrected_depmod       2005-11-17 18:27:53.000000000 -0800
@@ -1110,37 +1110,37 @@

  %if %{up_package}
  %post kernel
-/sbin/depmod -ae
+/sbin/depmod -ae %{kernvers}

  %postun kernel
-/sbin/depmod -ae
+/sbin/depmod -ae %{kernvers}

  %endif
  %if %{smp_package}

  %post kernel-smp
-/sbin/depmod -ae
+/sbin/depmod -ae %{kernvers}

  %postun kernel-smp
-/sbin/depmod -ae
+/sbin/depmod -ae %{kernvers}

  %endif
  %if %{bigmem_package}

  %post kernel-bigmem
-/sbin/depmod -ae
+/sbin/depmod -ae %{kernvers}

  %postun kernel-bigmem
-/sbin/depmod -ae
+/sbin/depmod -ae %{kernvers}

  %endif
  %if %{hugemem_package}

  %post kernel-hugemem
-/sbin/depmod -ae
+/sbin/depmod -ae %{kernvers}

  %postun kernel-hugemem
-/sbin/depmod -ae
+/sbin/depmod -ae %{kernvers}

  %endif
  %endif

-------------------------------------------------------------

-- 
Michael Polek
Manager of System Operations
Pictage, Inc.
1580 Francisco Street, Ste. 101
Torrance, CA 90501
(310) 525-1600 ext. 628
mike@pictage.com
Czar of all the Russias
--
Opinions are my own and do not necessarily reflect those
of the company. Viewer discretion is advised.
Please do not make any inferences about what is in this email
beyond what is stated. If there is any unclarity in this email,
please ask the author of the email for clarification. Any assumptions
about the content of this email or what it means are solely the
responsibility of the reader.
E Pluribus Unum. Annuit Coeptis. Novus Ordo Seclorum.

Confidentiality Notice:

This message, together with any attachments, is intended only for the use of
the individual or entity to which it is addressed. It may contain
information that is confidential and prohibited from disclosure. If you are
not the intended recipient, you are hereby notified that any dissemination
or copying of this message or any attachment is strictly prohibited. If you
have received this item in error, please notify the original sender and
destroy this item, along with any attachments.