stationgroup / aws-helper-scripts

⚠️ [Moved to r21.io] 🥞 A set of scripts designed to ease the pain of working with AWS (EC2 and S3). Based on Sean Bannister original.

Home Page:https://git.r21.io/stationgroup/aws-helper-scripts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature - auto mount

reelsense opened this issue · comments

The original version of this script had an auto option that would find an unused device name automatically, vs. needing to specify the device path.

Here is the original code: # If the user specified auto we locate the next avaliable device location

# If the user specified auto we locate the next avaliable device location
if [ $DEVICE = "auto" ]; then
if ls /dev/xvdk* >/dev/null 2>&1; then
LAST_DEVICE_NUMBER=$(ls -1 /dev/xvdk* | sed 's/[a-z\/]//g' | sort -n | tail -1)
DEVICE_NUMBER=$(expr $LAST_DEVICE_NUMBER + 1)
else
DEVICE_NUMBER="1"
fi
fi