1
0
forked from mir/linux-vm-tools

Merge pull request #16 from Thaodan/grep_quiet

use --quiet rather than redirecting to /dev/null
This commit is contained in:
Justin 2018-03-19 08:27:03 -07:00 committed by GitHub
commit 5ba1db8391
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,6 +18,7 @@ fi
apt update && apt upgrade -y
if [ -f /var/run/reboot-required ]; then
echo "A reboot is required in order to proceed with the install." >&2
echo "Please reboot and re-run this script to finish the install." >&2
@ -56,14 +57,15 @@ rmmod vsock
modprobe hv_sock
# Blacklist the vmw module
cat /etc/modprobe.d/blacklist.conf | grep vmw_vsock_vmci_transport > /dev/null
cat /etc/modprobe.d/blacklist.conf | grep vmw_vsock_vmci_transport --quiet
if [ "$?" == "1" ]; then
bash -c 'echo "blacklist vmw_vsock_vmci_transport" >> /etc/modprobe.d/blacklist.conf <<EOF
EOF'
fi
#Ensure hv_sock gets loaded
cat /etc/modules | grep hv_sock > /dev/null
cat /etc/modules | grep hv_sock --quiet
if [ "$?" == "1" ]; then
bash -c 'echo "hv_sock" >> /etc/modules <<EOF
EOF'