From a04a8a952354f0f1b23bd97e154b55371ee735ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= Date: Fri, 2 Mar 2018 10:15:13 +0100 Subject: [PATCH] removed useless cat and cleaned if statemants up Calling bash is no longer needed. Also grep can search on files on its own. The return status of grep is usable with if and avoids calling test (or [ for that matter ). --- ubuntu/18.04/install.sh | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/ubuntu/18.04/install.sh b/ubuntu/18.04/install.sh index 47491ff..773338c 100644 --- a/ubuntu/18.04/install.sh +++ b/ubuntu/18.04/install.sh @@ -18,7 +18,6 @@ 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 @@ -57,23 +56,21 @@ rmmod vsock modprobe hv_sock # Blacklist the vmw module -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 <> /etc/modprobe.d/blacklist.conf <> /etc/modules <> /etc/modules fi # Configure the policy xrdp session -bash -c 'cat >/etc/polkit-1/localauthority.conf.d/02-allow-colord.conf </etc/polkit-1/localauthority.conf.d/02-allow-colord.conf <