| « Rebuild your own battery packs | Minecraft Information » |
Mount SMB/CIFS share within a Docker container
https://lime-technology.com/forum/index.php?topic=38770.0
/boot/config/go file
# Wait ~ 90 seconds for network to come alive before proceeding
logger "Waiting for network services to come alive ~90 seconds"
echo "Waiting for network services to come alive ~90 seconds"
for COUNTER in {1..90}
do
sleep 1
if ping -c 1 192.168.1.62 > /dev/null 2>&1
then
break
else
echo "Server_B not available yet... Retry # $COUNTER"
logger "Server_B not available yet... Retrying # $COUNTER"
fi
done
# Mount the shares if the network is active
if ping -c 1 192.168.1.62 > /dev/null 2>&1
then
logger "Network active - mounting shares from SERVER_B"
echo "Network active - mounting shares from SERVER_B"
mkdir /mnt/server_b_movies
mkdir /mnt/server_b_television
mkdir /mnt/server_b_books
# Mount the shares
mount -t cifs //192.168.1.62/Movies /mnt/server_b_movies -o username=server_a,password=srv020,dir_mode=0777,file_mode=0777
mount -t cifs //192.168.1.62/Television /mnt/server_b_television -o username=server_a,password=srv020,dir_mode=0777,file_mode=0777
mount -t cifs //192.168.1.62/Ebooks /mnt/server_b_books -o username=server_a,password=srv020,dir_mode=0777,file_mode=0777
else
logger "Network not active - SERVER_B shares will not be mounted"
echo "Network not active - SERVER_B shares will not be mounted"
fi