mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-11 04:36:48 +00:00
fix(bootstrap): the compute bootstrap script parses again
The quoting of the tr argument in the /etc/os-release parsing put the closing parenthesis inside a single-quoted string, so sh and bash stopped with "unexpected EOF while looking for matching )" before doing anything: 'curl ... | sudo sh' failed on every distribution. It is now tr -d "\"'"; bash -n and shellcheck -S error pass. Also drops the spice_listen edits of qemu.conf; only VNC is used.
This commit is contained in:
parent
65a9b9e370
commit
47c480f059
1 changed files with 2 additions and 7 deletions
|
|
@ -223,8 +223,8 @@ __gather_linux_system_info() {
|
||||||
done < /etc/"${rsource}"
|
done < /etc/"${rsource}"
|
||||||
;;
|
;;
|
||||||
os )
|
os )
|
||||||
nn=$(grep '^ID=' /etc/os-release | sed -e 's/^ID=\(.*\)$/\1/g' | tr -d '"'\'')
|
nn=$(grep '^ID=' /etc/os-release | sed -e 's/^ID=\(.*\)$/\1/g' | tr -d "\"'")
|
||||||
rv=$(grep '^VERSION_ID=' /etc/os-release | sed -e 's/^VERSION_ID=\(.*\)$/\1/g' | tr -d '"'\'')
|
rv=$(grep '^VERSION_ID=' /etc/os-release | sed -e 's/^VERSION_ID=\(.*\)$/\1/g' | tr -d "\"'")
|
||||||
[ "${rv}x" != "x" ] && v=$(__parse_version_string "$rv") || v=""
|
[ "${rv}x" != "x" ] && v=$(__parse_version_string "$rv") || v=""
|
||||||
case $(echo "${nn}" | tr '[:upper:]' '[:lower:]') in
|
case $(echo "${nn}" | tr '[:upper:]' '[:lower:]') in
|
||||||
arch )
|
arch )
|
||||||
|
|
@ -410,7 +410,6 @@ install_centos_post() {
|
||||||
fi
|
fi
|
||||||
if [ -f /etc/libvirt/qemu.conf ]; then
|
if [ -f /etc/libvirt/qemu.conf ]; then
|
||||||
sed -i 's/#[ ]*vnc_listen.*/vnc_listen = "0.0.0.0"/g' /etc/libvirt/qemu.conf
|
sed -i 's/#[ ]*vnc_listen.*/vnc_listen = "0.0.0.0"/g' /etc/libvirt/qemu.conf
|
||||||
sed -i 's/#[ ]*spice_listen.*/spice_listen = "0.0.0.0"/g' /etc/libvirt/qemu.conf
|
|
||||||
else
|
else
|
||||||
echoerror "/etc/libvirt/qemu.conf not found. Exiting..."
|
echoerror "/etc/libvirt/qemu.conf not found. Exiting..."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -512,7 +511,6 @@ install_fedora_post() {
|
||||||
fi
|
fi
|
||||||
if [ -f /etc/libvirt/qemu.conf ]; then
|
if [ -f /etc/libvirt/qemu.conf ]; then
|
||||||
sed -i 's/#[ ]*vnc_listen.*/vnc_listen = "0.0.0.0"/g' /etc/libvirt/qemu.conf
|
sed -i 's/#[ ]*vnc_listen.*/vnc_listen = "0.0.0.0"/g' /etc/libvirt/qemu.conf
|
||||||
sed -i 's/#[ ]*spice_listen.*/spice_listen = "0.0.0.0"/g' /etc/libvirt/qemu.conf
|
|
||||||
else
|
else
|
||||||
echoerror "/etc/libvirt/qemu.conf not found. Exiting..."
|
echoerror "/etc/libvirt/qemu.conf not found. Exiting..."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -581,7 +579,6 @@ install_opensuse_post() {
|
||||||
fi
|
fi
|
||||||
if [ -f /etc/libvirt/qemu.conf ]; then
|
if [ -f /etc/libvirt/qemu.conf ]; then
|
||||||
sed -i 's/#[ ]*vnc_listen.*/vnc_listen = "0.0.0.0"/g' /etc/libvirt/qemu.conf
|
sed -i 's/#[ ]*vnc_listen.*/vnc_listen = "0.0.0.0"/g' /etc/libvirt/qemu.conf
|
||||||
sed -i 's/#[ ]*spice_listen.*/spice_listen = "0.0.0.0"/g' /etc/libvirt/qemu.conf
|
|
||||||
fi
|
fi
|
||||||
mkdir -p /etc/supervisord.d /etc/supervisor/conf.d
|
mkdir -p /etc/supervisord.d /etc/supervisor/conf.d
|
||||||
if [ -f /etc/supervisord.conf ] || [ -f /etc/supervisor/supervisord.conf ]; then
|
if [ -f /etc/supervisord.conf ] || [ -f /etc/supervisor/supervisord.conf ]; then
|
||||||
|
|
@ -650,7 +647,6 @@ install_ubuntu_post() {
|
||||||
fi
|
fi
|
||||||
if [ -f /etc/libvirt/qemu.conf ]; then
|
if [ -f /etc/libvirt/qemu.conf ]; then
|
||||||
sed -i 's/#[ ]*vnc_listen.*/vnc_listen = "0.0.0.0"/g' /etc/libvirt/qemu.conf
|
sed -i 's/#[ ]*vnc_listen.*/vnc_listen = "0.0.0.0"/g' /etc/libvirt/qemu.conf
|
||||||
sed -i 's/#[ ]*spice_listen.*/spice_listen = "0.0.0.0"/g' /etc/libvirt/qemu.conf
|
|
||||||
|
|
||||||
else
|
else
|
||||||
echoerror "/etc/libvirt/qemu.conf not found. Exiting..."
|
echoerror "/etc/libvirt/qemu.conf not found. Exiting..."
|
||||||
|
|
@ -730,7 +726,6 @@ install_debian_post() {
|
||||||
fi
|
fi
|
||||||
if [ -f /etc/libvirt/qemu.conf ]; then
|
if [ -f /etc/libvirt/qemu.conf ]; then
|
||||||
sed -i 's/#[ ]*vnc_listen.*/vnc_listen = "0.0.0.0"/g' /etc/libvirt/qemu.conf
|
sed -i 's/#[ ]*vnc_listen.*/vnc_listen = "0.0.0.0"/g' /etc/libvirt/qemu.conf
|
||||||
sed -i 's/#[ ]*spice_listen.*/spice_listen = "0.0.0.0"/g' /etc/libvirt/qemu.conf
|
|
||||||
else
|
else
|
||||||
echoerror "/etc/libvirt/qemu.conf not found. Exiting..."
|
echoerror "/etc/libvirt/qemu.conf not found. Exiting..."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue