1
0
forked from mir/linux-vm-tools

Merge pull request #17 from Thaodan/use_seperate_files

Use seperate files
This commit is contained in:
Justin 2018-03-19 13:57:17 -07:00 committed by GitHub
commit 3261fefb8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,6 @@ fi
apt update && apt upgrade -y apt update && apt upgrade -y
if [ -f /var/run/reboot-required ]; then if [ -f /var/run/reboot-required ]; then
echo "A reboot is required in order to proceed with the install." >&2 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 echo "Please reboot and re-run this script to finish the install." >&2
@ -57,23 +56,20 @@ rmmod vsock
modprobe hv_sock modprobe hv_sock
# Blacklist the vmw module # Blacklist the vmw module
cat /etc/modprobe.d/blacklist.conf | grep vmw_vsock_vmci_transport --quiet if [ ! -e /etc/modprobe.d/blacklist_vmw_vsock_vmci_transport.conf ] ; then
if [ "$?" == "1" ]; then cat >> /etc/modprobe.d/blacklist_vmw_vsock_vmci_transport.conf <<EOF
bash -c 'echo "blacklist vmw_vsock_vmci_transport" >> /etc/modprobe.d/blacklist.conf <<EOF blacklist vmw_vsock_vmci_transport"
EOF' EOF
fi fi
#Ensure hv_sock gets loaded #Ensure hv_sock gets loaded
cat /etc/modules | grep hv_sock --quiet if [ ! -e /etc/modules-load.d/hv_sock.conf ] ; then
if [ "$?" == "1" ]; then echo "hv_sock" > /etc/modules-load.d/hv_sock.conf
bash -c 'echo "hv_sock" >> /etc/modules <<EOF
EOF'
fi fi
# Configure the policy xrdp session # Configure the policy xrdp session
bash -c 'cat >/etc/polkit-1/localauthority.conf.d/02-allow-colord.conf <<EOF cat >/etc/polkit-1/localauthority.conf.d/02-allow-colord.conf <<EOF
polkit.addRule(function(action, subject) { polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.color-manager.create-device" || if ((action.id == "org.freedesktop.color-manager.create-device" ||
action.id == "org.freedesktop.color-manager.modify-profile" || action.id == "org.freedesktop.color-manager.modify-profile" ||
@ -86,7 +82,7 @@ polkit.addRule(function(action, subject) {
return polkit.Result.YES; return polkit.Result.YES;
} }
}); });
EOF' EOF
# reconfigure the service # reconfigure the service
systemctl daemon-reload systemctl daemon-reload