mount_shares.sh 317 Bytes
Newer Older
1
#!/bin/bash
David Beniamine's avatar
David Beniamine committed
2 3 4 5 6 7 8 9

# Ensure ecole-dc is reachable before mounts
while ! ping -c 1 ecole-dc  > /dev/null 2>&1
do
    echo "Cannot reach ecole-dc, waiting 10 sec"
    sleep 10
done

10
[ `grep -c '^//ecole-dc/' /etc/mtab` -gt 0 ] && exit 0
11 12 13 14 15
awk '/^\/\/ecole-dc/{print $2}' /etc/fstab | \
	while read dest
do
    mount $dest
done