Add Onboarding/xe-utils-install.sh
This commit is contained in:
parent
78f1ffefbf
commit
ffec27796b
45
Onboarding/xe-utils-install.sh
Normal file
45
Onboarding/xe-utils-install.sh
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Check if root
|
||||||
|
if [ $(whoami) != 'root' ]; then
|
||||||
|
echo "Please run as root."
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "root check complete."
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd /tmp
|
||||||
|
|
||||||
|
#Check OS Version
|
||||||
|
case $(cat /etc/os-release | grep ^ID= | sed -e "s/^ID=//") in
|
||||||
|
"debian")
|
||||||
|
wget http://config.lan.fisherhome.xyz/xe-utils/xe-guest-utilities_8.4.0-1_amd64.deb
|
||||||
|
dpkg -i *.deb
|
||||||
|
success=true
|
||||||
|
;;
|
||||||
|
"ubuntu")
|
||||||
|
wget http://config.lan.fisherhome.xyz/xe-utils/xe-guest-utilities_8.4.0-1_amd64.deb
|
||||||
|
dpkg -i *.deb
|
||||||
|
success=true
|
||||||
|
;;
|
||||||
|
'"almalinux"')
|
||||||
|
wget http://config.lan.fisherhome.xyz/xe-utils/xe-guest-utilities-8.4.0-1.x86_64.rpm
|
||||||
|
wget http://config.lan.fisherhome.xyz/xe-utils/xe-guest-utilities-xenstore-8.4.0-1.x86_64.rpm
|
||||||
|
dnf install -y *.rpm
|
||||||
|
success=true
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Uknown OS Type. Exiting"
|
||||||
|
success=false
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ $success = true ]; then
|
||||||
|
echo "Installation complete rebooting in 3 seconds."
|
||||||
|
sleep 1
|
||||||
|
echo "2.."
|
||||||
|
sleep 1
|
||||||
|
echo "1..."
|
||||||
|
sleep 1
|
||||||
|
reboot now
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user