Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 May 2020 01:48:50 +0200
From:      Oliver Pinter <oliver.pntr@gmail.com>
To:        Colin Percival <cperciva@freebsd.org>
Cc:        "src-committers@freebsd.org" <src-committers@freebsd.org>,  "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,  "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r361143 - head/release/tools
Message-ID:  <CAPjTQNGakmfGtR2%2BxJ62YTRooDNG8=q=hThPyksTyf99F8Ybgg@mail.gmail.com>
In-Reply-To: <202005172155.04HLt07J036230@repo.freebsd.org>
References:  <202005172155.04HLt07J036230@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday, May 17, 2020, Colin Percival <cperciva@freebsd.org> wrote:

> Author: cperciva
> Date: Sun May 17 21:54:59 2020
> New Revision: 361143
> URL: https://svnweb.freebsd.org/changeset/base/361143
>
> Log:
>   Add /etc/autofs/special_efs to EC2 AMIs
>
>   Since Amazon Elastic File System is only available within AWS, it seems
>   more appropriate to have this added only in EC2 AMIs rather than
>   "polluting" non-EC2 images with it.
>
>   Reviewed by:  gjb
>   MFC after:    7 days
>   Relnotes:     Amazon EFS filesystems can be automounted by enabling
> autofs
>                 and placing "/efs -efs" into /etc/auto_master.
>   Sponsored by: https://www.patreon.com/cperciva
>   Differential Revision:        https://reviews.freebsd.org/D24791
>
> Modified:
>   head/release/tools/ec2.conf
>
> Modified: head/release/tools/ec2.conf
> ============================================================
> ==================
> --- head/release/tools/ec2.conf Sun May 17 21:29:45 2020        (r361142)
> +++ head/release/tools/ec2.conf Sun May 17 21:54:59 2020        (r361143)
> @@ -113,6 +113,23 @@ vm_extra_pre_umount() {
>                 -e '1,/^#server/s/^#server.*/server 169.254.169.123
> iburst/' \
>                 ${DESTDIR}/etc/ntp.conf
>
> +       # Provide a map for accessing Elastic File System mounts
> +       cat > ${DESTDIR}/etc/autofs/special_efs <<'EOF'
> +#!/bin/sh
> +
> +if [ $# -eq 0 ]; then
> +        # No way to know which EFS filesystems exist and are
> +        # accessible to this EC2 instance.
> +        exit 0
> +fi
> +
> +# Provide instructions on how to mount the requested filesystem.
> +FS=$1
> +REGION=`fetch -qo- http://169.254.169.254/latest/meta-data/placement/
> availability-zone | sed -e 's/[a-z]$//'`


What will be this hard-coded ip address without any verification or at
least https?


> +echo "-nfsv4,minorversion=1,oneopenown ${FS}.efs.${REGION}.amazonaws.
> com:/"
> +EOF
> +       chmod 755 ${DESTDIR}/etc/autofs/special_efs
> +
>         # The first time the AMI boots, the installed "first boot" scripts
>         # should be allowed to run:
>         # * ec2_configinit (download and process EC2 user-data)
> _______________________________________________
> svn-src-head@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPjTQNGakmfGtR2%2BxJ62YTRooDNG8=q=hThPyksTyf99F8Ybgg>