Add -r to xargs command

-r on xargs will not run the command if the input is empty.
Otherwise the command will get run once and it will fail, though
the || true catches the error. With this the || true can be
removed.

Change-Id: I12fbe83b69de39d0cae67e337cbacf8cfab02180
This commit is contained in:
Curtis Collicutt 2017-06-06 13:58:47 -06:00
parent 086411857b
commit 249536bc18

View File

@ -23,7 +23,7 @@ sudo mount --make-shared /var/lib/kubelet
# Cleanup any old deployment
sudo docker rm -f kubeadm-aio || true
sudo docker rm -f kubelet || true
sudo docker ps -aq | xargs -l1 sudo docker rm -f || true
sudo docker ps -aq | xargs -r -l1 sudo docker rm -f
sudo rm -rfv \
/etc/cni/net.d \
/etc/kubernetes \