ssh_upgrade: Add handling for config option.

can now handle no reboot and keep config options.
This commit is contained in:
Kenneth Johansson 2020-10-30 19:06:22 +01:00
parent 3b283b8f3a
commit ff63939e84

View file

@ -329,8 +329,12 @@ function ssh_upgrade {
cat $upd_fw | pv -s ${file_size_kb}k | ssh root@$upd_host "iopu $extra_args"
fi
else
extra_args=""
[ $upd_noreboot -eq 1 ] && extra_args="$extra_args -d"
[ $upd_keepconf -eq 0 ] && extra_args="$extra_args -n"
scp $upd_fw root@$upd_host:/tmp/ &&
ssh -o ConnectTimeout=60 root@$upd_host "sysupgrade -v $3 /tmp/$upd_fw_base" &&
ssh -o ConnectTimeout=60 root@$upd_host "sysupgrade -v $extra_args /tmp/$upd_fw_base" &&
echo "sysupgrade done!"
fi
}