Skip to content

Commit d9ecb92

Browse files
committed
kbuild: deb-pkg: do not include empty hook directories
The linux-image package currently includes empty hook directories (/etc/kernel/{pre,post}{inst,rm}.d/ by default). These directories were perhaps intended as a fail-safe in case no hook scripts exist there. However, they are really unnecessary because the run-parts command is already guarded by the following check: test -d ${debhookdir}/${script}.d && run-parts ... The only difference is that the run-parts command either runs for empty directories (resulting in a no-op) or is skipped entirely. The maintainer scripts will succeed without these dummy directories. The linux-image packages from the Debian kernel do not contain /etc/kernel/*.d/, either. Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 9d89551 commit d9ecb92

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

scripts/package/builddeb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ install_maint_scripts () {
7676
# so do we; recent versions of dracut and initramfs-tools will obey this.
7777
debhookdir=${KDEB_HOOKDIR:-/etc/kernel}
7878
for script in postinst postrm preinst prerm; do
79-
mkdir -p "${pdir}${debhookdir}/${script}.d"
80-
8179
mkdir -p "${pdir}/DEBIAN"
8280
cat <<-EOF > "${pdir}/DEBIAN/${script}"
8381
#!/bin/sh

0 commit comments

Comments
 (0)