File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ isInstaller=$(if [ "$isNixos" = "y" ] && grep -Eq 'VARIANT_ID="?installer"?' /et
13
13
isContainer=$( if [ " $( has systemd-detect-virt) " = " y" ]; then systemd-detect-virt --container; else echo " none" ; fi)
14
14
hasIpv6Only=$( if [ " $( has ip) " = " n" ] || ip r g 1 > /dev/null 2> /dev/null || ! ip -6 r g :: > /dev/null 2> /dev/null; then echo " n" ; else echo " y" ; fi)
15
15
hasTar=$( has tar)
16
+ hasCpio=$( has cpio)
16
17
hasSudo=$( has sudo)
17
18
hasDoas=$( has doas)
18
19
hasWget=$( has wget)
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ isInstaller=
45
45
isContainer=
46
46
hasIpv6Only=
47
47
hasTar=
48
+ hasCpio=
48
49
hasSudo=
49
50
hasDoas=
50
51
hasWget=
@@ -434,7 +435,7 @@ importFacts() {
434
435
# shellcheck disable=SC2046
435
436
export $( echo " $filteredFacts " | xargs)
436
437
437
- for var in isOs isArch isKexec isInstaller isContainer hasIpv6Only hasTar hasSudo hasDoas hasWget hasCurl hasSetsid; do
438
+ for var in isOs isArch isKexec isInstaller isContainer hasIpv6Only hasTar hasCpio hasSudo hasDoas hasWget hasCurl hasSetsid; do
438
439
if [[ -z ${! var} ]]; then
439
440
abort " Failed to retrieve fact $var from host"
440
441
fi
@@ -673,6 +674,10 @@ main() {
673
674
abort " no tar command found, but required to unpack kexec tarball"
674
675
fi
675
676
677
+ if [[ ${hasCpio-n} == " n" ]]; then
678
+ abort " no cpio command found, but required to build the new initrd"
679
+ fi
680
+
676
681
if [[ ${hasSetsid-n} == " n" ]]; then
677
682
abort " no setsid command found, but required to run the kexec script under a new session"
678
683
fi
You can’t perform that action at this time.
0 commit comments