diff --git a/debian/Makefile b/debian/Makefile index fbd29720b..c08e91fbf 100644 --- a/debian/Makefile +++ b/debian/Makefile @@ -158,6 +158,7 @@ header-install-$(subarch): templates/header-install.in post-install-$(subarch): templates/post-install.in sed -e 's,@initrd_modules@,$(initrd_modules),' \ -e 's,@append_subarch@,$(append),' \ + -e 's,@extra_postinstall_command@,$(extra_postinstall_command),' \ templates/post-install.in > post-install-$(subarch) # # Generates the kernel config file for a subarch by merging diff --git a/debian/README b/debian/README index 97c24f1eb..b4fc7d93f 100644 --- a/debian/README +++ b/debian/README @@ -210,3 +210,13 @@ default_config Typical usage: default_config := 386 + +extra_postinstall_command + + This variable, if defined, is executed at the end of the post-install script, + which is used by kernel-package to add or modify the files going into the + kernel image package. + + It can use these variables (but see templates/post-install.in for details) : + $(subarch), $(flavour), $(version) and $(abiname). Since Makefile.inc is a + Makefile, the leading $ need to be escaped as double $$. diff --git a/debian/templates/post-install.in b/debian/templates/post-install.in index 3e025431a..1e62c3115 100644 --- a/debian/templates/post-install.in +++ b/debian/templates/post-install.in @@ -105,6 +105,12 @@ if [ -n "${modules}" ]; then fi done fi + +# Execute any extra post-install command provided by the arch/subarch/flavour +if [ '@extra_postinstall_command@' ]; then + @extra_postinstall_command@ +fi + # # Clean up the build and source symlinks #