Commit graph

23 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 25612ecba4 tree-wide: drop copyright lines for more authors
Acks in https://github.com/systemd/systemd/issues/9320.
2018-06-22 16:39:45 +02:00
Lennart Poettering 96b2fb93c5 tree-wide: beautify remaining copyright statements
Let's unify an beautify our remaining copyright statements, with a
unicode ©. This means our copyright statements are now always formatted
the same way. Yay.
2018-06-14 10:20:21 +02:00
Zbigniew Jędrzejewski-Szmek d9215cd838 Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
Yu Watanabe 9d8813b3b4 kernel-install: support the case /etc/machine-id is missing or empty (#5975)
Some .install plugins does not require that machine ID is set such as
20-grubby.install for Fedora and 50-depmod.install.
To support such plugins to run without valid machine-id, this commit
makes the following change:
* if /etc/machine-id is missing or empty, create temporary directory
  and set its path to BOOT_DIR_ABS,
* run the .install helpers with KERNEL_INSTALL_MACHINE_ID environment
  variable that'd be empty if /etc/machine-id is missing or empty.
This may be useful for installing kernel for e.g. stateless systems
which initialize machine-id while booting the systems.
2017-05-30 09:45:10 -04:00
Michal Schmidt db1e2bfc4f kernel-install: avoid process substitution
bash implements process substitution using /dev/fd/N (this is documented
in man bash). We'd like kernel-install to work in chrooted RPM
scriptlets without /dev.

We can use here-strings instead. bash uses temporary files to implement
those.
2017-01-11 15:34:54 -05:00
Yu Watanabe 9156493171 kernel-install: use exit instead of return (#4565)
/bin/kernel-install: line 143: return: can only `return' from a function or sourced script

https://bugzilla.redhat.com/show_bug.cgi?id=1391829
2016-11-04 08:58:41 -04:00
Zbigniew Jędrzejewski-Szmek eb93312810 kernel-install: allow plugins to terminate the procedure (#4174)
Replaces #4103.
2016-09-24 09:03:54 -04:00
Martin Pitt 7ce9cc1545 Revert "kernel-install: Add KERNEL_INSTALL_NOOP (#4103)"
Further discussion showed that this better gets addressed at the packaging
level.

This reverts commit 34210af7c6.
2016-09-17 16:39:00 +02:00
Colin Walters 34210af7c6 kernel-install: Add KERNEL_INSTALL_NOOP (#4103)
Will be used by rpm-ostree (and likely lorax) to suppress
RPM->kernel->%posttrans->dracut runs, and basically everything
else this script is doing.

I'll also likely change the `kernel.spec` to respect this as well.
2016-09-14 07:57:43 +02:00
Lennart Poettering 5b8411a2aa kernel-install: when searching for location to place kernel consider /efi
With this change kernel-install will now first look for an existing kernel
installation in /efi, /boot and /boot/efi. If none is found, /efi is used if it
is a mount point, otherwise /boot/efi if it is one. If nothing of that worked
/boot is used without further checking.

This means /boot should be the default unless something was installed before or
something else was explicitly mounted.
2016-07-21 11:37:59 +02:00
Harald Hoyer 340defcd06 kernel-install: recognize /boot/efi mountpoint (#3751)
install everything in /boot/efi, if this is a mountpoint
2016-07-19 12:10:09 +02:00
Sébastien Luttringer d838db0d3b kernel-install: fix help output
Kernel install doesn't need the second argument on his command line when
removing.
This is correctly documented in the man page.
2013-12-09 23:19:16 -05:00
Zbigniew Jędrzejewski-Szmek a6c3d202b1 kernel-install: add -h/--help 2013-12-08 19:26:51 -05:00
Tom Gundersen ea52e2aee8 kernel-install: add compat with 'installkernel'
If 'kernel-install' is called as 'installkernel' it will be compatible with the
syntax used by the kernel's build system.

This means it can be called by doing 'make install' in a kernel build
directory, if the correct symlink has been installed (which we don't do by
default yet).

[Edit harald@redhat.com: removed basename and use shift]
2013-10-01 17:40:30 +02:00
Harald Hoyer 8f51399e75 kernel-install: add default install scripts
Do the depmod in the kernel-install hooks, so hooks can produce/install
kernel modules and be part of the depmod.

Also move the basic boot loader entry creation and removal to a
plugin script.

If PRETTY_NAME is not defined in /etc/os-release, fallback to
PRETTY_NAME="Linux $KERNEL_VERSION".

Add documentation for everything in the man page.
2013-05-06 16:19:02 +02:00
Mantas Mikulėnas 6886b0449d kernel-install: Clean up
- Consistent use of $VAR vs ${VAR}
- Consistent use of && vs 'if'
- Add error checking to some places
- Consistent error messages ("Can't" vs "Cannot", etc.)
- Function declarations at the top
- Miscellaneous adjustments
2013-04-30 12:14:35 +02:00
Marc-Antoine Perennou d82d87dac1 kernel-install: don't make unused parameter mandatory
We only use the image name in the case we're adding a kernel

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2013-04-08 17:00:04 +02:00
Harald Hoyer 82673dd410 kernel-install: rename the loader entry filename
The wildcard matching the default loader entry should always be able to point to
the same machine.

So instead of sorting by <distribution>-<kernel-version>-<machine-id>
we better sort by <machine-id>-<kernel-version>.
2013-02-26 15:21:23 +01:00
Harald Hoyer 4120b92f8e kernel-install: create the loader entries with absolute paths relative to /boot 2013-02-26 10:56:07 +01:00
Harald Hoyer d1ebea5f2c kernel-install: replace URLs with man pages in the error messages 2013-02-26 08:56:45 +01:00
Harald Hoyer 6557484fb1 kernel-install: fixed paths in boot loader entry
For the loader entry a relative path has to be used.
2013-02-26 08:52:17 +01:00
Kay Sievers 61f99b6064 kernel-install: remove LANG= 2013-02-25 23:18:57 +01:00
Harald Hoyer 81516adcb7 kernel-install: add kernel-install tool 2013-02-25 18:58:06 +01:00