Skip to content

Commit 7c328c4

Browse files
committed
nixos-anywhere: remove isKexec as /etc/is_kexec is no longer present
nix-community/nixos-images@7d888c1
1 parent 213ee01 commit 7c328c4

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/get-facts.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ isNixos=$(if test -f /etc/os-release && grep -Eq 'ID(_LIKE)?="?nixos"?' /etc/os-
77
cat <<FACTS
88
isOs=$(uname)
99
isArch=$(uname -m)
10-
isKexec=$(if test -f /etc/is_kexec; then echo "y"; else echo "n"; fi)
1110
isNixos=$isNixos
1211
isInstaller=$(if [ "$isNixos" = "y" ] && grep -Eq 'VARIANT_ID="?installer"?' /etc/os-release; then echo "y"; else echo "n"; fi)
1312
isContainer=$(if [ "$(has systemd-detect-virt)" = "y" ]; then systemd-detect-virt --container; else echo "none"; fi)

src/nixos-anywhere.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ envPassword=n
4646
# Facts set by get-facts.sh
4747
isOs=
4848
isArch=
49-
isKexec=
5049
isInstaller=
5150
isContainer=
5251
hasIpv6Only=
@@ -526,7 +525,7 @@ importFacts() {
526525
# shellcheck disable=SC2046
527526
export $(echo "$filteredFacts" | xargs)
528527

529-
for var in isOs isArch isKexec isInstaller isContainer hasIpv6Only hasTar hasCpio hasSudo hasDoas hasWget hasCurl hasSetsid; do
528+
for var in isOs isArch isInstaller isContainer hasIpv6Only hasTar hasCpio hasSudo hasDoas hasWget hasCurl hasSetsid; do
530529
if [[ -z ${!var} ]]; then
531530
abort "Failed to retrieve fact $var from host"
532531
fi
@@ -618,7 +617,7 @@ generateHardwareConfig() {
618617
}
619618
620619
runKexec() {
621-
if [[ ${isKexec} == "y" ]] || [[ ${isInstaller} == "y" ]]; then
620+
if [[ ${isInstaller} == "y" ]]; then
622621
return
623622
fi
624623

0 commit comments

Comments
 (0)