]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
kernel-install: rename $ADDON_DIR -> $EXTRA_DIR
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 7 Feb 2025 05:46:05 +0000 (14:46 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 7 Feb 2025 10:46:57 +0000 (19:46 +0900)
As the directory contains not only addons, but also credentials and
extensions.

No functional change, just refactoring.

Follow-up for 75ee025c5de5d753dc1d8a28f8780247f5a887ae.
Addresses the post-merge comment
https://github.com/systemd/systemd/pull/36218#discussion_r1940872236.

src/kernel-install/90-uki-copy.install

index e34c8dcdcf7c5616f402e78db96aabadc6b496a1..465af49c80082809563afef993c84376e2a410e9 100755 (executable)
@@ -73,7 +73,7 @@ else
     UKI_FILE="$UKI_DIR/$ENTRY_TOKEN-$KERNEL_VERSION.efi"
 fi
 
-ADDON_DIR="$UKI_DIR/$ENTRY_TOKEN-$KERNEL_VERSION.efi.extra.d"
+EXTRA_DIR="$UKI_DIR/$ENTRY_TOKEN-$KERNEL_VERSION.efi.extra.d"
 
 # If there is a UKI named uki.efi on the staging area use that, if not use what
 # was passed in as $KERNEL_IMAGE but insist it has a .efi extension
@@ -85,9 +85,9 @@ if [ -f "$KERNEL_INSTALL_STAGING_AREA/uki.efi" ]; then
     }
     for f in "$KERNEL_INSTALL_STAGING_AREA/uki.efi.extra.d"/*; do
         [ -f "$f" ] || continue
-        [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "Installing $f as $ADDON_DIR/$(basename "$f")"
-        install -D -m 0644 "$f" "$ADDON_DIR/$(basename "$f")" || {
-            echo "Error: could not copy '$f' to '$ADDON_DIR/$(basename "$f")'." >&2
+        [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "Installing $f as $EXTRA_DIR/$(basename "$f")"
+        install -D -m 0644 "$f" "$EXTRA_DIR/$(basename "$f")" || {
+            echo "Error: could not copy '$f' to '$EXTRA_DIR/$(basename "$f")'." >&2
             exit 1
         }
     done
@@ -107,9 +107,9 @@ elif [ -n "$KERNEL_IMAGE" ]; then
     }
     for f in "$KERNEL_IMAGE.extra.d"/* "$KERNEL_INSTALL_STAGING_AREA/uki.efi.extra.d"/*; do
         [ -f "$f" ] || continue
-        [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "Installing $f as $ADDON_DIR/$(basename "$f")"
-        install -D -m 0644 "$f" "$ADDON_DIR/$(basename "$f")" || {
-            echo "Error: could not copy '$f' to '$ADDON_DIR/$(basename "$f")'." >&2
+        [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "Installing $f as $EXTRA_DIR/$(basename "$f")"
+        install -D -m 0644 "$f" "$EXTRA_DIR/$(basename "$f")" || {
+            echo "Error: could not copy '$f' to '$EXTRA_DIR/$(basename "$f")'." >&2
             exit 1
         }
     done