Last active
February 26, 2022 00:29
-
-
Save MattMcNam/c307762088c3119480fe4d15b39a9fe4 to your computer and use it in GitHub Desktop.
autofs script for AWS EFS IDs - uses amazon-efs-utils helper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Stripped down and tweaked version of auto.net | |
# This file must be executable to work! chmod 755! | |
key="$1" | |
echo "/" | awk -v key="$key" -v opts="-fstype=efs" -- ' | |
BEGIN { ORS=""; first=1 } | |
{ if (first) { print opts; first=0 }; print "\\\n\t" $1, key ":" $1 } | |
END { if (!first) print "\n"; else exit 1 } | |
' | sed 's/#/\\#/g' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment