Skip to content

Commit ec8d128

Browse files
committed
nisabamount for mickey
1 parent 7c0d951 commit ec8d128

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

nisabamount

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ if ls -1qA "$MOUNTPOINT" | grep -q . ; then
3131
exit 1
3232
fi
3333

34+
if [ $(hostname) == "micc" ];then
35+
nodes="1 2 3 4 5"
36+
nodename=node
37+
else
38+
nodes="1 2"
39+
nodename=mickey-node
40+
fi
41+
3442
echo -n "Going to mount //${SERVER}/${SHARENAME} on $(readlink -f $MOUNTPOINT) as $MGBID. OK? (y/n): "
3543
read -r answer
3644
if [ "$answer" != "${answer#[Yy]}" ] ;then
@@ -42,9 +50,9 @@ if [ "$answer" != "${answer#[Yy]}" ] ;then
4250

4351
mount -t cifs -o vers=3.0,sec=ntlmv2i,credentials=$CREDFILE,uid="$SUDO_USER" //${SERVER}/"$SHARENAME" "$MOUNTPOINT"
4452
MOUNTPOINT=$(realpath $MOUNTPOINT)
45-
for i in 1 2 3 4 5 ; do
46-
echo mounting node$i
47-
sudo -u $SUDO_USER ssh node$i sudo /usr/local/bin/nisabamount-node $SHARENAME $MOUNTPOINT $SUDO_USER $CREDFILE
53+
for i in $nodes ; do
54+
echo mounting ${nodename}${i}
55+
sudo -u $SUDO_USER ssh ${nodename}${i} sudo /usr/local/bin/nisabamount-node $SHARENAME $MOUNTPOINT $SUDO_USER $CREDFILE
4856
done
4957
else
5058
echo Aborted.

0 commit comments

Comments
 (0)