diff --git a/Makefile-ostree.am b/Makefile-ostree.am index 6b3b3b9b..0cd821d8 100644 --- a/Makefile-ostree.am +++ b/Makefile-ostree.am @@ -75,11 +75,15 @@ endif MANPAGES += doc/ostree.1 -if ENABLE_KERNEL_UPDATES +if ENABLE_GRUB2_HOOK grub2dir = $(sysconfdir)/grub.d grub2_SCRIPTS = src/ostree/grub2/15_ostree +endif + +if ENABLE_KERNEL_UPDATES + kernelpostinstdir = $(sysconfdir)/kernel/postinst.d kernelpostinst_SCRIPTS = src/ostree/kernel/15_ostree_update diff --git a/configure.ac b/configure.ac index 05d89061..b9577e65 100644 --- a/configure.ac +++ b/configure.ac @@ -112,7 +112,7 @@ AS_IF([ test x$with_libarchive != xno ], [ ], [ with_libarchive=no ]) AM_CONDITIONAL(USE_LIBARCHIVE, test $with_libarchive != no) -AS_IF([test x$cross_compiling != xyes && test -d /etc/kernel && test x$enable_triggers_only != xno ], +AS_IF([test x$cross_compiling != xyes && test -d /etc/kernel && test x$enable_triggers_only != xyes ], [kernel_updates_default=yes], [kernel_updates_default=no]) @@ -123,6 +123,16 @@ AC_ARG_ENABLE(kernel-updates, enable_kernel_updates=${kernel_updates_default}) AM_CONDITIONAL(ENABLE_KERNEL_UPDATES, test $enable_kernel_updates != no) +AS_IF([test x$cross_compiling != xyes && test -d /etc/grub.d && test x$enable_triggers_only != xyes ], + [grub2_hook_default=yes], + [grub2_hook_default=no]) + +AC_ARG_ENABLE(grub2-hook, + AS_HELP_STRING([--enable-grub2-hook], + [Install GRUB2 hook]), , + enable_grub2_hook=${grub2_hook_default}) +AM_CONDITIONAL(ENABLE_GRUB2_HOOK, test $enable_grub2_hook != no) + AC_CONFIG_FILES([ Makefile embedded-dependencies/Makefile @@ -140,4 +150,5 @@ echo " libarchive (parse tar files directly): $with_libarchive documentation: $enable_documentation kernel updates integration: $enable_kernel_updates + GRUB2 hook: $enable_grub2_hook "