File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -172,9 +172,12 @@ set -efu ${enable_debug}
172
172
has(){
173
173
command -v "\$ 1" >/dev/null && echo "y" || echo "n"
174
174
}
175
+ is_nixos=\$ (if test -f /etc/os-release && grep -q ID=nixos /etc/os-release; then echo "y"; else echo "n"; fi)
175
176
cat <<FACTS
176
177
is_os=\$ (uname)
177
178
is_kexec=\$ (if test -f /etc/is_kexec; then echo "y"; else echo "n"; fi)
179
+ is_nixos=\$ is_nixos
180
+ is_installer=\$ (if [[ "\$ is_nixos" == "y" ]] && grep -q VARIANT_ID=installer /etc/os-release; then echo "y"; else echo "n"; fi)
178
181
has_tar=\$ (has tar)
179
182
has_sudo=\$ (has sudo)
180
183
has_wget=\$ (has wget)
@@ -204,7 +207,7 @@ if [[ ${is_kexec-n} != "y" ]] && [[ ${no_ssh_copy-n} != "y" ]]; then
204
207
ssh-copy-id -o ConnectTimeout=10 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no " $ssh_connection "
205
208
fi
206
209
207
- if [[ ${is_kexec-n} == " n" ]]; then
210
+ if [[ ${is_kexec-n} == " n" ]] && [[ ${is_installer-n} == " n " ]] ; then
208
211
ssh_ << SSH
209
212
set -efu ${enable_debug}
210
213
$maybesudo rm -rf /root/kexec
You can’t perform that action at this time.
0 commit comments