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 @@ -181,10 +181,13 @@ set -efu ${enable_debug}
181
181
has(){
182
182
command -v "\$ 1" >/dev/null && echo "y" || echo "n"
183
183
}
184
+ is_nixos=\$ (if test -f /etc/os-release && grep -q ID=nixos /etc/os-release; then echo "y"; else echo "n"; fi)
184
185
cat <<FACTS
185
186
is_os=\$ (uname)
186
187
is_arch=\$ (uname -m)
187
188
is_kexec=\$ (if test -f /etc/is_kexec; then echo "y"; else echo "n"; fi)
189
+ is_nixos=\$ is_nixos
190
+ is_installer=\$ (if [[ "\$ is_nixos" == "y" ]] && grep -q VARIANT_ID=installer /etc/os-release; then echo "y"; else echo "n"; fi)
188
191
has_tar=\$ (has tar)
189
192
has_sudo=\$ (has sudo)
190
193
has_wget=\$ (has wget)
@@ -218,7 +221,7 @@ if [[ ${is_kexec-n} != "y" ]] && [[ ${no_ssh_copy-n} != "y" ]]; then
218
221
ssh-copy-id -o ConnectTimeout=10 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no " $ssh_connection "
219
222
fi
220
223
221
- if [[ ${is_kexec-n} == " n" ]]; then
224
+ if [[ ${is_kexec-n} == " n" ]] && [[ ${is_installer-n} == " n " ]] ; then
222
225
ssh_ << SSH
223
226
set -efu ${enable_debug}
224
227
$maybesudo rm -rf /root/kexec
You can’t perform that action at this time.
0 commit comments