Skip to content

Commit 8221438

Browse files
authored
Check for setsid respecting --wait (#595)
2 parents 5d57604 + 2dbe2b4 commit 8221438

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/get-facts.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ hasSudo=$(has sudo)
1818
hasDoas=$(has doas)
1919
hasWget=$(has wget)
2020
hasCurl=$(has curl)
21-
hasSetsid=$(has setsid)
21+
hasSetsid=$(if [ "$(has setsid)" = "y" ] && setsid --wait true 2>/dev/null; then echo "y"; else echo "n"; fi)
2222
hasNixOSFacter=$(command -v nixos-facter >/dev/null && echo "y" || echo "n")
2323
FACTS

src/nixos-anywhere.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,7 @@ main() {
993993
fi
994994
995995
if [[ ${hasSetsid-n} == "n" ]]; then
996-
abort "no setsid command found, but required to run the kexec script under a new session"
996+
abort "no setsid command respecting --wait found, but required to run the kexec script under a new session"
997997
fi
998998
999999
if [[ ${isOs} != "Linux" ]]; then

0 commit comments

Comments
 (0)