systemd-logind to be safe. See
https://cgit.freedesktop.org/xorg/xserver/commit/?id=dc48bd653c7e101.)
- * All kernel install plugins are called with the environment variable
+ * All kernel-install plugins are called with the environment variable
KERNEL_INSTALL_MACHINE_ID which is set to the machine ID given by
- /etc/machine-id. If the file is missing or empty, the variable is
- empty and BOOT_DIR_ABS is the path of a temporary directory which is
- removed after all the plugins exit. So, if KERNEL_INSTALL_MACHINE_ID
- is empty, all plugins should not put anything in BOOT_DIR_ABS.
+ /etc/machine-id. If the machine ID could not be determined,
+ $KERNEL_INSTALL_MACHINE_ID will be empty. Plugins should not put
+ anything in the entry directory (passed as the second argument) if
+ $KERNEL_INSTALL_MACHINE_ID is empty. For backwards compatiblity, a
+ temporary directory is passed as the entry directory and removed
+ after all the plugins exit.
Contributions from: Adrian Heine né Lang, Aggelos Avgerinos, Alexander
Kurtz, Alexandros Frantzis, Alexey Brodkin, Alex Lu, Amir Pakdel, Amir
SPDX-License-Identifier: LGPL-2.1+
-->
-<refentry id="kernel-install">
+<refentry id="kernel-install"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
<refentryinfo>
<title>kernel-install</title>
<cmdsynopsis>
<command>kernel-install</command>
<arg choice="plain">COMMAND</arg>
+ <arg choice="opt" rep="repeat">OPTIONS</arg>
<arg choice="plain"><replaceable>KERNEL-VERSION</replaceable></arg>
<arg choice="plain"><replaceable>KERNEL-IMAGE</replaceable></arg>
<arg choice="opt" rep="repeat"><replaceable>INITRD-FILE</replaceable></arg>
<refsect1>
<title>Description</title>
- <para>
- <command>kernel-install</command> is used to install and remove kernel and
- initramfs images to and from <filename>/boot</filename>.
+ <para><command>kernel-install</command> is used to install and remove kernel and initramfs images to and
+ from the boot loader partition, referred to as <varname>$BOOT</varname> here. It will usually be one of
+ <filename>/boot</filename>, <filename>/efi</filename>, or <filename>/boot/efi</filename>, see below.
</para>
<para><command>kernel-install</command> will execute the files
<term><command>add <replaceable>KERNEL-VERSION</replaceable> <replaceable>KERNEL-IMAGE</replaceable> [<replaceable>INITRD-FILE</replaceable> ...]</command></term>
<listitem>
<para>This command expects a kernel version string and a path to a kernel image file as
- arguments. <command>kernel-install</command> creates the directory
- <filename>/boot/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename>
- and calls the executables from <filename>/usr/lib/kernel/install.d/*.install</filename> and
+ arguments. <command>kernel-install</command> calls the executables from
+ <filename>/usr/lib/kernel/install.d/*.install</filename> and
<filename>/etc/kernel/install.d/*.install</filename> with the following arguments:
- <programlisting>add <replaceable>KERNEL-VERSION</replaceable> <filename>/boot/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename> <replaceable>KERNEL-IMAGE</replaceable> [<replaceable>INITRD-FILE</replaceable> ...]</programlisting>
+ <programlisting>add <replaceable>KERNEL-VERSION</replaceable> <filename>$BOOT/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename> <replaceable>KERNEL-IMAGE</replaceable> [<replaceable>INITRD-FILE</replaceable> ...]</programlisting>
</para>
- <para>Two default plugins execute the following operations in this case:</para>
+ <para>Three default plugins execute the following operations in this case:</para>
<itemizedlist>
+ <listitem><para><filename>00-entry-directory.install</filename> creates the directory
+ <filename>$BOOT/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename>
+ if <filename>$BOOT/<replaceable>MACHINE-ID</replaceable>/</filename> already exists.
+ </para></listitem>
<listitem><para><filename>50-depmod.install</filename> runs
<citerefentry><refentrytitle>depmod</refentrytitle><manvolnum>8</manvolnum></citerefentry> for the
<listitem><para><filename>90-loaderentry.install</filename> copies <replaceable>KERNEL-IMAGE</replaceable>
to
- <filename>/boot/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/linux</filename>.
+ <filename>$BOOT/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/linux</filename>.
If an <replaceable>INITRD-FILE</replaceable> is provided, it also copies <replaceable>INITRD-FILE</replaceable>
to
- <filename>/boot/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL_VERSION</replaceable>/<replaceable>INITRD-FILE</replaceable></filename>.
+ <filename>$BOOT/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL_VERSION</replaceable>/<replaceable>INITRD-FILE</replaceable></filename>.
It also creates a boot loader entry according to the <ulink
url="https://systemd.io/BOOT_LOADER_SPECIFICATION">Boot Loader Specification</ulink> in
- <filename>/boot/loader/entries/<replaceable>MACHINE-ID</replaceable>-<replaceable>KERNEL-VERSION</replaceable>.conf</filename>.
+ <filename>$BOOT/loader/entries/<replaceable>MACHINE-ID</replaceable>-<replaceable>KERNEL-VERSION</replaceable>.conf</filename>.
The title of the entry is the <replaceable>PRETTY_NAME</replaceable> parameter specified in
<filename>/etc/os-release</filename> or <filename>/usr/lib/os-release</filename> (if the former is
- missing), or "Linux <replaceable>KERNEL-VERSION</replaceable>", if unset.</para></listitem>
+ missing), or "Linux <replaceable>KERNEL-VERSION</replaceable>", if unset.</para>
+
+ <para>If the entry directory
+ <filename>$BOOT/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename>
+ does not exist, this plugin does nothing.</para></listitem>
</itemizedlist>
</listitem>
</varlistentry>
<filename>/usr/lib/kernel/install.d/*.install</filename> and
<filename>/etc/kernel/install.d/*.install</filename> with the following arguments:
- <programlisting>remove <replaceable>KERNEL-VERSION</replaceable> <filename>/boot/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename></programlisting>
+ <programlisting>remove <replaceable>KERNEL-VERSION</replaceable> <filename>$BOOT/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename></programlisting>
</para>
<para>Afterwards, <command>kernel-install</command> removes the directory
- <filename>/boot/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename>
+ <filename>$BOOT/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename>
and its contents.</para>
<para>Two default plugins execute the following operations in this case:</para>
<listitem><para><filename>50-depmod.install</filename> removes the files generated by <command>depmod</command> for this kernel again.</para></listitem>
<listitem><para><filename>90-loaderentry.install</filename> removes the file
- <filename>/boot/loader/entries/<replaceable>MACHINE-ID</replaceable>-<replaceable>KERNEL-VERSION</replaceable>.conf</filename>.</para></listitem>
+ <filename>$BOOT/loader/entries/<replaceable>MACHINE-ID</replaceable>-<replaceable>KERNEL-VERSION</replaceable>.conf</filename>.</para></listitem>
</itemizedlist>
</listitem>
</varlistentry>
</variablelist>
+ </refsect1>
+
+ <refsect1>
+ <title>The <varname>$BOOT</varname> partition</title>
+ <para>The partition where the kernels and <ulink url="https://systemd.io/BOOT_LOADER_SPECIFICATION">Boot
+ Loader Specification</ulink> snippets are located is called <varname>$BOOT</varname>.
+ <command>kernel-install</command> determines the location of this partition by checking
+ <filename>/efi/</filename>, <filename>/boot/</filename>, and <filename>/boot/efi</filename>
+ in turn. The first location where <filename>$BOOT/loader/entries/</filename> or
+ <filename>$BOOT/$MACHINE_ID/</filename> exists is used.</para>
+ </refsect1>
+
+ <refsect1>
+ <title>Options</title>
+ <para>The following options are understood:</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><option>-v</option></term>
+ <term><option>--verbose</option></term>
+ <listitem>
+ <para>Output additional information about operations being performed.</para>
+ </listitem>
+ </varlistentry>
+
+ <xi:include href="standard-options.xml" xpointer="help" />
+ </variablelist>
+ </refsect1>
+ <refsect1>
+ <title>Environment variables</title>
+ <para>If <option>--verbose</option> is used, <varname>$KERNEL_INSTALL_VERBOSE=1</varname> will be set for
+ the plugins. They may output additional logs in this case.</para>
</refsect1>
<refsect1>
<listitem>
<para>Read by <filename>90-loaderentry.install</filename>. If this file exists a numeric value is read from
it and the naming of the generated entry file is slightly altered to include it as
- <filename>/boot/loader/entries/<replaceable>MACHINE-ID</replaceable>-<replaceable>KERNEL-VERSION</replaceable>+<replaceable>TRIES</replaceable>.conf</filename>. This
+ <filename>$BOOT/loader/entries/<replaceable>MACHINE-ID</replaceable>-<replaceable>KERNEL-VERSION</replaceable>+<replaceable>TRIES</replaceable>.conf</filename>. This
is useful for boot loaders such as
<citerefentry><refentrytitle>systemd-boot</refentrytitle><manvolnum>7</manvolnum></citerefentry> which
implement boot attempt counting with a counter embedded in the entry file name.</para>
#include "pretty-print.h"
#include "rm-rf.h"
#include "stat-util.h"
+#include "stdio-util.h"
#include "string-util.h"
#include "strv.h"
#include "terminal-util.h"
}
static int mkdir_one(const char *prefix, const char *suffix) {
- char *p;
+ _cleanup_free_ char *p = NULL;
- p = strjoina(prefix, "/", suffix);
+ p = path_join(prefix, suffix);
if (mkdir(p, 0700) < 0) {
if (errno != EEXIST)
return log_error_errno(errno, "Failed to create \"%s\": %m", p);
return 0;
}
-static int install_loader_config(const char *esp_path) {
+static int install_loader_config(const char *esp_path, sd_id128_t machine_id) {
char machine_string[SD_ID128_STRING_MAX];
_cleanup_(unlink_and_freep) char *t = NULL;
_cleanup_fclose_ FILE *f = NULL;
- sd_id128_t machine_id;
const char *p;
int r, fd;
if (access(p, F_OK) >= 0) /* Silently skip creation if the file already exists (early check) */
return 0;
- r = sd_id128_get_machine(&machine_id);
- if (r < 0)
- return log_error_errno(r, "Failed to get machine id: %m");
-
fd = open_tmpfile_linkable(p, O_WRONLY|O_CLOEXEC, &t);
if (fd < 0)
return log_error_errno(fd, "Failed to open \"%s\" for writing: %m", p);
return 1;
}
-static int install_entries_directory(const char *dollar_boot_path) {
+static int install_entries_directories(const char *dollar_boot_path, sd_id128_t machine_id) {
+ int r;
+ char buf[SD_ID128_STRING_MAX];
+
assert(dollar_boot_path);
- return mkdir_one(dollar_boot_path, "/loader/entries");
+ /* Both /loader/entries and the entry directories themselves should be located on the same
+ * partition. Also create the parent directory for entry directories, so that kernel-install
+ * knows where to put them. */
+
+ r = mkdir_one(dollar_boot_path, "loader/entries");
+ if (r < 0)
+ return r;
+
+ return mkdir_one(dollar_boot_path, sd_id128_to_string(machine_id, buf));
}
static int help(int argc, char *argv[], void *userdata) {
sd_id128_t uuid = SD_ID128_NULL;
uint64_t pstart = 0, psize = 0;
uint32_t part = 0;
+ sd_id128_t machine_id;
bool install;
int r;
if (r < 0)
return r;
+ r = sd_id128_get_machine(&machine_id);
+ if (r < 0)
+ return log_error_errno(r, "Failed to get machine id: %m");
+
install = streq(argv[0], "install");
RUN_WITH_UMASK(0002) {
return r;
if (install) {
- r = install_loader_config(arg_esp_path);
+ r = install_loader_config(arg_esp_path, machine_id);
if (r < 0)
return r;
- r = install_entries_directory(arg_dollar_boot_path());
+ r = install_entries_directories(arg_dollar_boot_path(), machine_id);
if (r < 0)
return r;
}
log_parse_environment();
log_open();
- /* If we run in a container, automatically turn of EFI file system access */
+ /* If we run in a container, automatically turn off EFI file system access */
if (detect_container() > 0)
arg_touch_variables = false;
--- /dev/null
+#!/bin/bash
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+COMMAND="$1"
+KERNEL_VERSION="$2"
+ENTRY_DIR_ABS="$3"
+KERNEL_IMAGE="$4"
+INITRD_OPTIONS_START="5"
+
+if ! [[ $KERNEL_INSTALL_MACHINE_ID ]]; then
+ exit 0
+fi
+
+if [[ $COMMAND != add ]]; then
+ exit 0
+fi
+
+# If the boot dir exists (e.g. $ESP/<machine-id>),
+# create the entry directory ($ESP/<machine-id>/<kernel-version>).
+# This is the only function of this plugin.
+MACHINE_ID_DIR="${ENTRY_DIR_ABS%/*}"
+if ! [ -d "$MACHINE_ID_DIR" ]; then
+ exit 0
+fi
+
+if [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ]; then
+ echo "+mkdir -v -p $ENTRY_DIR_ABS"
+ exec mkdir -v -p "$ENTRY_DIR_ABS"
+else
+ exec mkdir -p "$ENTRY_DIR_ABS"
+fi
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
-[[ $2 ]] || exit 1
+COMMAND="$1"
+KERNEL_VERSION="$2"
+ENTRY_DIR_ABS="$3"
+KERNEL_IMAGE="$4"
+INITRD_OPTIONS_START="5"
-case "$1" in
+[[ $KERNEL_VERSION ]] || exit 1
+
+case "$COMMAND" in
add)
- [[ -d /lib/modules/"$2"/kernel ]] || exit 0
- exec depmod -a "$2"
+ [[ -d "/lib/modules/${KERNEL_VERSION}/kernel" ]] || exit 0
+ [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \
+ echo "Running depmod -a ${KERNEL_VERSION}"
+ exec depmod -a "${KERNEL_VERSION}"
;;
remove)
- exec rm -f /lib/modules/"$2"/modules.{alias{,.bin},builtin.bin,dep{,.bin},devname,softdep,symbols{,.bin}}
+ [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \
+ echo "Removing /lib/modules/${KERNEL_VERSION}/modules.dep and associated files"
+ exec rm -f /lib/modules/"${KERNEL_VERSION}"/modules.{alias{,.bin},builtin.bin,dep{,.bin},devname,softdep,symbols{,.bin}}
;;
*)
exit 0
COMMAND="$1"
KERNEL_VERSION="$2"
-BOOT_DIR_ABS="$3"
+ENTRY_DIR_ABS="$3"
KERNEL_IMAGE="$4"
INITRD_OPTIONS_START="5"
exit 0
fi
-if ! [[ -d "$BOOT_DIR_ABS" ]]; then
+if ! [[ -d "$ENTRY_DIR_ABS" ]]; then
exit 0
fi
MACHINE_ID=$KERNEL_INSTALL_MACHINE_ID
-BOOT_DIR="/$MACHINE_ID/$KERNEL_VERSION"
-BOOT_ROOT=${BOOT_DIR_ABS%$BOOT_DIR}
+ENTRY_DIR="/$MACHINE_ID/$KERNEL_VERSION"
+BOOT_ROOT=${ENTRY_DIR_ABS%$ENTRY_DIR}
if [[ $COMMAND == remove ]]; then
rm -f "$BOOT_ROOT/loader/entries/$MACHINE_ID-$KERNEL_VERSION.conf"
LOADER_ENTRY="$BOOT_ROOT/loader/entries/$MACHINE_ID-$KERNEL_VERSION.conf"
fi
-cp "$KERNEL_IMAGE" "$BOOT_DIR_ABS/linux" &&
- chown root:root "$BOOT_DIR_ABS/linux" &&
- chmod 0644 "$BOOT_DIR_ABS/linux" || {
- echo "Could not copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/linux'." >&2
+cp "$KERNEL_IMAGE" "$ENTRY_DIR_ABS/linux" &&
+ chown root:root "$ENTRY_DIR_ABS/linux" &&
+ chmod 0644 "$ENTRY_DIR_ABS/linux" || {
+ echo "Could not copy '$KERNEL_IMAGE to '$ENTRY_DIR_ABS/linux'." >&2
exit 1
}
for initrd in "${INITRD_OPTIONS[@]}"; do
if [[ -f "${initrd}" ]]; then
initrd_basename="$(basename ${initrd})"
- cp "${initrd}" "$BOOT_DIR_ABS/${initrd_basename}" &&
- chown root:root "$BOOT_DIR_ABS/${initrd_basename}" &&
- chmod 0644 "$BOOT_DIR_ABS/${initrd_basename}" || {
- echo "Could not copy '${initrd}' to '$BOOT_DIR_ABS/${initrd_basename}'." >&2
+ [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \
+ echo "Installing $ENTRY_DIR_ABS/${initrd_basename}"
+ cp "${initrd}" "$ENTRY_DIR_ABS/${initrd_basename}" &&
+ chown root:root "$ENTRY_DIR_ABS/${initrd_basename}" &&
+ chmod 0644 "$ENTRY_DIR_ABS/${initrd_basename}" || {
+ echo "Could not copy '${initrd}' to '$ENTRY_DIR_ABS/${initrd_basename}'." >&2
exit 1
}
fi
exit 1
}
+[ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \
+ echo "Creating $LOADER_ENTRY"
{
echo "title $PRETTY_NAME"
echo "version $KERNEL_VERSION"
echo "machine-id $MACHINE_ID"
echo "options ${BOOT_OPTIONS[*]}"
- echo "linux $BOOT_DIR/linux"
+ echo "linux $ENTRY_DIR/linux"
for initrd in "${INITRD_OPTIONS[@]}"; do
- [[ -f $BOOT_DIR_ABS/$(basename ${initrd}) ]] && \
- echo "initrd $BOOT_DIR/$(basename ${initrd})"
+ [[ -f $ENTRY_DIR_ABS/$(basename ${initrd}) ]] && \
+ echo "initrd $ENTRY_DIR/$(basename ${initrd})"
done
:
} > "$LOADER_ENTRY" || {
#
# This file is part of systemd.
#
-#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
fi
done
+KERNEL_INSTALL_VERBOSE=0
+if [ "$1" == "--verbose" -o "$1" == "-v" ]; then
+ shift
+ KERNEL_INSTALL_VERBOSE=1
+fi
+export KERNEL_INSTALL_VERBOSE
+
if [[ "${0##*/}" == 'installkernel' ]]; then
COMMAND='add'
# make install doesn't pass any parameter wrt initrd handling
fi
if ! [[ $MACHINE_ID ]]; then
- BOOT_DIR_ABS=$(mktemp -d /tmp/kernel-install.XXXXX) || exit 1
- trap "rm -rf '$BOOT_DIR_ABS'" EXIT INT QUIT PIPE
+ ENTRY_DIR_ABS=$(mktemp -d /tmp/kernel-install.XXXXX) || exit 1
+ trap "rm -rf '$ENTRY_DIR_ABS'" EXIT INT QUIT PIPE
elif [[ -d /efi/loader/entries ]] || [[ -d /efi/$MACHINE_ID ]]; then
- BOOT_DIR_ABS="/efi/$MACHINE_ID/$KERNEL_VERSION"
+ ENTRY_DIR_ABS="/efi/$MACHINE_ID/$KERNEL_VERSION"
elif [[ -d /boot/loader/entries ]] || [[ -d /boot/$MACHINE_ID ]]; then
- BOOT_DIR_ABS="/boot/$MACHINE_ID/$KERNEL_VERSION"
+ ENTRY_DIR_ABS="/boot/$MACHINE_ID/$KERNEL_VERSION"
elif [[ -d /boot/efi/loader/entries ]] || [[ -d /boot/efi/$MACHINE_ID ]]; then
- BOOT_DIR_ABS="/boot/efi/$MACHINE_ID/$KERNEL_VERSION"
+ ENTRY_DIR_ABS="/boot/efi/$MACHINE_ID/$KERNEL_VERSION"
elif mountpoint -q /efi; then
- BOOT_DIR_ABS="/efi/$MACHINE_ID/$KERNEL_VERSION"
+ ENTRY_DIR_ABS="/efi/$MACHINE_ID/$KERNEL_VERSION"
elif mountpoint -q /boot/efi; then
- BOOT_DIR_ABS="/boot/efi/$MACHINE_ID/$KERNEL_VERSION"
+ ENTRY_DIR_ABS="/boot/efi/$MACHINE_ID/$KERNEL_VERSION"
else
- BOOT_DIR_ABS="/boot/$MACHINE_ID/$KERNEL_VERSION"
+ ENTRY_DIR_ABS="/boot/$MACHINE_ID/$KERNEL_VERSION"
fi
export KERNEL_INSTALL_MACHINE_ID=$MACHINE_ID
exit 1
fi
- mkdir -p "$BOOT_DIR_ABS" || {
- echo "Could not create boot directory '$BOOT_DIR_ABS'." >&2
- exit 1
- }
-
for f in "${PLUGINS[@]}"; do
if [[ -x $f ]]; then
- "$f" add "$KERNEL_VERSION" "$BOOT_DIR_ABS" "$KERNEL_IMAGE" "${INITRD_OPTIONS[@]}"
+ [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \
+ echo "+$f add $KERNEL_VERSION $ENTRY_DIR_ABS $KERNEL_IMAGE ${INITRD_OPTIONS[@]}"
+ "$f" add "$KERNEL_VERSION" "$ENTRY_DIR_ABS" "$KERNEL_IMAGE" "${INITRD_OPTIONS[@]}"
x=$?
if [[ $x == $SKIP_REMAINING ]]; then
ret=0
fi
done
- if ! [[ $MACHINE_ID ]] && ! rmdir "$BOOT_DIR_ABS"; then
- echo "Warning: In kernel-install plugins, requiring BOOT_DIR_ABS to be preset is deprecated." >&2
- echo " All plugins should not put anything in BOOT_DIR_ABS if the environment" >&2
+ if ! [[ $MACHINE_ID ]] && ! rmdir "$ENTRY_DIR_ABS"; then
+ echo "Warning: In kernel-install plugins, requiring ENTRY_DIR_ABS to be preset is deprecated." >&2
+ echo " All plugins should not put anything in ENTRY_DIR_ABS if the environment" >&2
echo " variable KERNEL_INSTALL_MACHINE_ID is empty." >&2
- rm -rf "$BOOT_DIR_ABS"
+ rm -rf "$ENTRY_DIR_ABS"
((ret+=$?))
fi
;;
remove)
for f in "${PLUGINS[@]}"; do
if [[ -x $f ]]; then
- "$f" remove "$KERNEL_VERSION" "$BOOT_DIR_ABS"
+ [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \
+ echo "+$f remove $KERNEL_VERSION $ENTRY_DIR_ABS"
+ "$f" remove "$KERNEL_VERSION" "$ENTRY_DIR_ABS"
x=$?
if [[ $x == $SKIP_REMAINING ]]; then
ret=0
fi
done
- rm -rf "$BOOT_DIR_ABS"
+ [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \
+ echo "Removing $ENTRY_DIR_ABS"
+
+ rm -rf "$ENTRY_DIR_ABS"
((ret+=$?))
;;
install_mode : 'rwxr-xr-x',
install_dir : bindir)
-install_data('50-depmod.install',
+install_data('00-entry-directory.install',
+ '50-depmod.install',
'90-loaderentry.install',
install_mode : 'rwxr-xr-x',
install_dir : kernelinstalldir)
if (path_equal(n, "udev/rules.d"))
ext = ".rules";
+ if (path_equal(n, "kernel/install.d"))
+ ext = ".install";
+
if (PATH_IN_SET(n, "systemd/system-preset", "systemd/user-preset")) {
coll = true;
ext = ".preset";