kernel-install: rename $ADDON_DIR -> $EXTRA_DIR

As the directory contains not only addons, but also credentials and
extensions.

No functional change, just refactoring.

Follow-up for 75ee025c5d.
Addresses the post-merge comment
https://github.com/systemd/systemd/pull/36218#discussion_r1940872236.
This commit is contained in:
Yu Watanabe
2025-02-07 14:46:05 +09:00
parent d7c86fea6b
commit ab676c768a

View File

@@ -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