]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
kernel-install: add header to generate entry files 25486/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 22 Nov 2022 14:59:21 +0000 (15:59 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 23 Nov 2022 09:14:25 +0000 (10:14 +0100)
I was looking at a bug in bugzilla about some boot loader issue, and it was
hard to say if the boot entry files were generated by our plugin or something
else. Add a header to make this clear.

kernel-install invokes the plugins via absolute path always, so $0 gives as
the full path the location where the plugin is installed. This is what we want:

  title      Fedora Linux 37 (Workstation Edition)
  # Boot Loader Specification type#1 entry
  # File created by /usr/lib/kernel/install.d/90-loaderentry.install (systemd 252-409-g5028904^)

src/kernel-install/90-loaderentry.install.in

index 41a05534b93ab31838d7aa9f73d55f91dfe54fc9..4e936d95f49e065349c7a94f4459c14b3697d1fb 100755 (executable)
@@ -138,6 +138,8 @@ mkdir -p "${LOADER_ENTRY%/*}" || {
 
 [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "Creating $LOADER_ENTRY"
 {
+    echo "# Boot Loader Specification type#1 entry"
+    echo "# File created by $0 (systemd {{GIT_VERSION}})"
     echo "title      $PRETTY_NAME"
     echo "version    $KERNEL_VERSION"
     if [ "$ENTRY_TOKEN" = "$MACHINE_ID" ]; then