Skip to main content
Sign in
Snippets Groups Projects
Commit f613e84c authored by František Dvořák's avatar František Dvořák
Browse files

Shell linting

parent 4289fa7a
Branches
No related tags found
No related merge requests found
......@@ -24,11 +24,11 @@ echo "Terraform finished. Continue? (CTRL-C to quit)"
read -r _
# wait for ping and ssh
for ip in $(cat terraform/hosts.txt); do
while read -r ip; do
while ! ping -c 1 "$ip"; do sleep 5; done
ssh-keygen -R "$ip"
while ! ssh egi@"$ip" -o ConnectTimeout=10 -o PreferredAuthentications=publickey -o StrictHostKeyChecking=no :; do sleep 10; done
done
done <terraform/hosts.txt
# check ssh access
ansible -m command -a 'uname -a' allnodes
......
......
File changed. Contains only whitespace changes. Show whitespace changes.
......@@ -42,7 +42,6 @@ EOF
return 0
}
TEMP=$(getopt -o 'i:e:s:q:hn' --long 'include:,exclude:,soft-quota:,hard-quota:,help,dry-run' -n 'xfs-quotas.sh' -- "$@") || exit $?
eval set -- "$TEMP"
unset TEMP
......@@ -106,7 +105,16 @@ mv /tmp/quota.list2 /tmp/quota.list
cut -d: -f1 /etc/projid 2>/dev/null | sort | uniq >/tmp/quota.xfs.list
lastid=0
lastid="$( (maxid=0; IFS=:; while read -r dir id; do if test "$id" -gt "$maxid"; then maxid="$id"; fi; done; echo "$maxid") < /etc/projid )"
lastid="$( (
maxid=0
IFS=:
while read -r dir id; do
if test "$id" -gt "$maxid"; then
maxid="$id"
fi
done
echo "$maxid"
) </etc/projid)"
cat <<EOF >/tmp/quota-cmd.sh
#! /bin/sh -e
cp -p /etc/projects /etc/projects.new
......
......
......@@ -24,11 +24,11 @@ echo "Terraform finished. Check terraform/docker-volume.sh. Continue? (CTRL-C to
read -r _
# wait for ping and ssh
for ip in $(cat terraform/fip.txt); do
while read -r ip; do
while ! ping -c 1 "$ip"; do sleep 5; done
ssh-keygen -R "$ip"
while ! ssh egi@"$ip" -o ConnectTimeout=10 -o PreferredAuthentications=publickey -o StrictHostKeyChecking=no :; do sleep 10; done
done
done <terraform/fip.txt
# check ssh access
ansible -m command -a 'uname -a' allnodes
......
......
......@@ -24,11 +24,11 @@ echo "Terraform finished. Check terraform/docker-volume.sh. Continue? (CTRL-C to
read -r _
# wait for ping and ssh
for ip in $(cat terraform/hosts.txt); do
while read -r ip; do
while ! ping -c 1 "$ip"; do sleep 5; done
ssh-keygen -R "$ip"
while ! ssh egi@"$ip" -o ConnectTimeout=10 -o PreferredAuthentications=publickey -o StrictHostKeyChecking=no :; do sleep 10; done
done
done <terraform/hosts.txt
# check ssh access
ansible -m command -a 'uname -a' allnodes
......
......
......@@ -24,11 +24,11 @@ echo "Terraform finished. Check terraform/docker-volume.sh. Continue? (CTRL-C to
read -r _
# wait for ping and ssh
for ip in $(cat terraform/fip.txt); do
while read -r ip; do
while ! ping -c 1 "$ip"; do sleep 5; done
ssh-keygen -R "$ip"
while ! ssh egi@"$ip" -o ConnectTimeout=10 -o PreferredAuthentications=publickey -o StrictHostKeyChecking=no :; do sleep 10; done
done
done <terraform/fip.txt
# check ssh access
ansible -m command -a 'uname -a' allnodes
......
......
......@@ -24,11 +24,11 @@ echo "Terraform finished. Check terraform/docker-volume.sh. Continue? (CTRL-C to
read -r _
# wait for ping and ssh
for ip in $(cat terraform/hosts.txt); do
while read -r ip; do
while ! ping -c 1 "$ip"; do sleep 5; done
ssh-keygen -R "$ip"
while ! ssh egi@"$ip" -o ConnectTimeout=10 -o PreferredAuthentications=publickey -o StrictHostKeyChecking=no :; do sleep 10; done
done
done <terraform/hosts.txt
# check ssh access
ansible -m command -a 'uname -a' allnodes
......
......
......@@ -24,7 +24,7 @@ echo "Terraform finished. Check terraform/docker-volume.sh. Continue? (CTRL-C to
read -r _
# wait for ping and ssh
for ip in $(cat terraform/hosts.txt) $(cat terraform/fip.txt); do
cat terraform/hosts.txt terraform/fip.txt | while read -r ip; do
while ! ping -c 1 "$ip"; do sleep 5; done
ssh-keygen -R "$ip"
while ! ssh egi@"$ip" -o ConnectTimeout=10 -o PreferredAuthentications=publickey -o StrictHostKeyChecking=no :; do sleep 10; done
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment