mirror of
https://github.com/ostreedev/ostree.git
synced 2025-01-09 01:18:35 +03:00
admin: Install grub2 config file if we detect /etc/grub.d
Decouple this from the kernel postinst one, since it's possible to have one but not the other.
This commit is contained in:
parent
8153799121
commit
5f25762122
@ -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
|
||||
|
||||
|
13
configure.ac
13
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
|
||||
"
|
||||
|
Loading…
Reference in New Issue
Block a user