[systemd-devel] [PATCH] kernel-install: add default 50-depmod.install script

harald at redhat.com harald at redhat.com
Tue Apr 30 09:04:09 PDT 2013


From: Harald Hoyer <harald at redhat.com>

Do the depmod in the kernel-install hooks, so hooks can produce/install
kernel modules and be part of the depmod.
---
 Makefile.am                          | 7 ++++---
 src/kernel-install/50-depmod.install | 8 ++++++++
 2 files changed, 12 insertions(+), 3 deletions(-)
 create mode 100644 src/kernel-install/50-depmod.install

diff --git a/Makefile.am b/Makefile.am
index ff70223..7fbec77 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -90,6 +90,7 @@ udevhomedir=$(udevlibexecdir)
 udevrulesdir=$(udevlibexecdir)/rules.d
 udevhwdbdir=$(udevlibexecdir)/hwdb.d
 catalogdir=$(prefix)/lib/systemd/catalog
+kernelinstalldir = $(prefix)/lib/kernel/install.d
 
 # And these are the special ones for /
 rootprefix=@rootprefix@
@@ -291,11 +292,11 @@ bin_PROGRAMS = \
 	systemd-delta \
 	systemd-analyze
 
-bin_SCRIPTS = \
+dist_bin_SCRIPTS = \
 	src/kernel-install/kernel-install
 
-EXTRA_DIST += \
-	src/kernel-install/kernel-install
+dist_kernelinstall_SCRIPTS = \
+	src/kernel-install/50-depmod.install
 
 rootlibexec_PROGRAMS = \
 	systemd \
diff --git a/src/kernel-install/50-depmod.install b/src/kernel-install/50-depmod.install
new file mode 100644
index 0000000..68c24be
--- /dev/null
+++ b/src/kernel-install/50-depmod.install
@@ -0,0 +1,8 @@
+#!/bin/bash
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+[[ $1 == "add" ]] || exit 0
+[[ $2 ]] || exit 1
+
+exec depmod -a "$2"
-- 
1.8.2.1



More information about the systemd-devel mailing list