Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ nav_order: 9

### Bug fixes

- Include `groupmod` binary in initramfs ([#2190](https://github.com/coreos/ignition/pull/2190))

## Ignition 2.25.1 (2025-12-22)

### Bug fixes
Expand Down
35 changes: 19 additions & 16 deletions dracut/30ignition/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ depends() {
}

install_ignition_unit() {
local unit="$1"; shift
local target="${1:-ignition-complete.target}"; shift
local instantiated="${1:-$unit}"; shift
local unit="$1"
shift
local target="${1:-ignition-complete.target}"
shift
local instantiated="${1:-$unit}"
shift
Comment on lines +17 to +22

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While you're refactoring this for style, you can simplify the argument parsing. Using positional parameters directly ($1, $2, etc.) is clearer and less prone to errors than using shift multiple times, especially if set -e were active and the function was called with fewer arguments than expected.

Suggested change
local unit="$1"
shift
local target="${1:-ignition-complete.target}"
shift
local instantiated="${1:-$unit}"
shift
local unit="$1"
local target="${2:-ignition-complete.target}"
local instantiated="${3:-$unit}"

inst_simple "$moddir/$unit" "$systemdsystemunitdir/$unit"
# note we `|| exit 1` here so we error out if e.g. the units are missing
# see https://github.com/coreos/fedora-coreos-config/issues/799
Expand All @@ -33,6 +36,7 @@ install() {
# present
inst_multiple -o \
groupadd \
groupmod \
groupdel \
mkfs.btrfs \
mkfs.ext4 \
Expand Down Expand Up @@ -110,23 +114,22 @@ install() {
}

installkernel() {
# required by hyperv platform to read kvp from the kernel
instmods hv_utils
# required by hyperv platform to read kvp from the kernel
instmods hv_utils

# required by applehv platform to read ignition file through vsock
instmods -c vsock
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, between this formatting change and the "shift" changes above, I think we can keep the formatting the same or make it an intentional commit along so that functional and stylistic choices are separated.

instmods -c vmw_vsock_virtio_transport_common
instmods -c vmw_vsock_virtio_transport
# required by applehv platform to read ignition file through vsock
instmods -c vsock
instmods -c vmw_vsock_virtio_transport_common
instmods -c vmw_vsock_virtio_transport

# required for cex card early initialization
if [[ ${DRACUT_ARCH:-$(uname -m)} == s390x ]]; then
# required for cex card early initialization
if [[ ${DRACUT_ARCH:-$(uname -m)} == s390x ]]; then
instmods -c zcrypt_cex4
instmods -c pkey_cca
fi
fi

# required by nvidiabluefield platform to read ignition file through bootfifo sysfs interface
if [[ ${DRACUT_ARCH:-$(uname -m)} == aarch64 ]]; then
# required by nvidiabluefield platform to read ignition file through bootfifo sysfs interface
if [[ ${DRACUT_ARCH:-$(uname -m)} == aarch64 ]]; then
instmods -c mlxbf_bootctl
fi
fi
}

Loading