Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Taylor runs during the night, and taylor runs 'yum upgrade'.  When there is a new kernel available, yum will install it.  When it gets installed, the postinstall scripts in the RPM are run.  Many things are run in the these postinstall scripts, including a script called '/sbin/new-kernel-pkg'.  /sbin/new-kernel-pkg looks in the /etc/kernel/postinst.d/ directory and runs anything in there.  /sbin/new-kernel-pkg finds a script called dkms inside the /etc/kernel/postinst.d/ directory.  The /etc/kernel/postinst.d/dkms script runs the /usr/sbin/dkms script.  The dkms man page describes how the build happens from here.

A side note: if you want to get notified anytime a new kernel is installed via RPM on a certain host, you can write a script and put it in the /etc/kernel/postinst.d/ directory.  When a new kernel is installed, the /sbin/new-kernel-pkg script will look in /etc/kernel/postinst.d/ and run anything it finds there (with 2 arguments supplied).  This is a script I've installed on a machine, so I get an email whenever a new kernel is installed there:

Code Block
languagebash
cat /etc/kernel/postinst.d/notify 
#!/bin/sh

cat <<EOF | mail -r unix-admin@slac.stanford.edu -s "$1 installed on `hostname`" ksa@slac.stanford.edu
New kernel was installed on `hostname` at `date`.

$1
$2
EOF

 

References:

DKMS
See the dkms manual page, using the command: 'man dkms'
https://en.wikipedia.org/wiki/Dynamic_Kernel_Module_Support
https://github.com/dell/dkms

...