Date: Thu, 12 Feb 2015 04:47:59 -0800 From: Colin Percival <cperciva@freebsd.org> To: "Bradley T. Hughes" <bradleythughes@fastmail.fm>, freebsd-cloud@freebsd.org Subject: Re: Small bug fix for ec2-scripts/ec2_fetchkey Message-ID: <54DCA0FF.7000600@freebsd.org> In-Reply-To: <36FD975E-DF0D-43EF-A4BE-3A2A16C5944D@fastmail.fm> References: <36FD975E-DF0D-43EF-A4BE-3A2A16C5944D@fastmail.fm>
next in thread | previous in thread | raw e-mail | index | archive | help
On 02/12/15 04:42, Bradley T. Hughes wrote:
> I noticed a small bug in ec2_fetchkey: it needs a '$' to expand ec2_fetchkey_user when grepping through /etc/passwd.
Oops! Thanks, I've fixed this locally and I'll roll a new distfile and
update the port soon.
Colin Percival
>
> diff --git a/ec2_fetchkey b/ec2_fetchkey
> --- a/ec2_fetchkey
> +++ b/ec2_fetchkey
> @@ -24,7 +24,7
> ec2_fetchkey_run()
> {
> # If the user does not exist, create it.
> - if ! grep -q "^{ec2_fetchkey_user}:" /etc/passwd; then
> + if ! grep -q "^${ec2_fetchkey_user}:" /etc/passwd; then
> echo "Creating user ${ec2_fetchkey_user}"
> pw useradd ${ec2_fetchkey_user} -m -G wheel
> fi
>
> --
> Bradley T. Hughes
> bradleythughes@fastmail.fm
>
> _______________________________________________
> freebsd-cloud@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-cloud
> To unsubscribe, send any mail to "freebsd-cloud-unsubscribe@freebsd.org"
>
>
--
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54DCA0FF.7000600>
