From owner-freebsd-cloud@FreeBSD.ORG Thu Feb 12 12:42:38 2015 Return-Path: Delivered-To: freebsd-cloud@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E6635157 for ; Thu, 12 Feb 2015 12:42:38 +0000 (UTC) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B12FBC40 for ; Thu, 12 Feb 2015 12:42:38 +0000 (UTC) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 4166020729 for ; Thu, 12 Feb 2015 07:42:36 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Thu, 12 Feb 2015 07:42:36 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.fm; h= x-sasl-enc:from:content-type:content-transfer-encoding:subject :message-id:date:to:mime-version; s=mesmtp; bh=9JPWLYTMrXiUWlqCe TuNB80M318=; b=UsQOIEJonrATRSxazeywUVPNvqYOLEvxtpjkzrC8cpsSFZ7sD 6mJdnH4coMP0FDHlzJoobr+D4hMqBJD8RSZilmcfZ2mBf4WZ45BY63+DJFX1u0iS hFB8ZiLZkOtP3YjJ7+tpxiSUqLb2Q9+mpzG1XJIiewwhoWnnQpNS/1tr4A= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:from:content-type :content-transfer-encoding:subject:message-id:date:to :mime-version; s=smtpout; bh=9JPWLYTMrXiUWlqCeTuNB80M318=; b=fPH 5gIm7dpEuTR5TRVTaK3D3HqUKREF8R5xY+jLQ55qiWNA/1sjLzxw8o1iq5paQPN5 nADAfEukHZTcv79LtiijbRekNZuOcaom8PGFDnEBVK9ZDOMmuS+gE/1ZiMAArKil IMM6kyS+uQawRb1+OFjygNT/CBlD3hL9o7XTfvMc= X-Sasl-enc: sI1vthFCdyVlttfUwdc2cESBTeh9/KbDQ0pAKoqFVh5c 1423744955 Received: from [10.6.1.229] (unknown [148.122.175.42]) by mail.messagingengine.com (Postfix) with ESMTPA id C9441C002A0 for ; Thu, 12 Feb 2015 07:42:35 -0500 (EST) From: "Bradley T. Hughes" Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Small bug fix for ec2-scripts/ec2_fetchkey Message-Id: <36FD975E-DF0D-43EF-A4BE-3A2A16C5944D@fastmail.fm> Date: Thu, 12 Feb 2015 13:42:34 +0100 To: freebsd-cloud@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) X-Mailer: Apple Mail (2.2070.6) X-BeenThere: freebsd-cloud@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "FreeBSD on cloud platforms \(EC2, GCE, Azure, etc.\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 12:42:39 -0000 Howdy! I noticed a small bug in ec2_fetchkey: it needs a '$' to expand = ec2_fetchkey_user when grepping through /etc/passwd. 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 From owner-freebsd-cloud@FreeBSD.ORG Thu Feb 12 12:49:29 2015 Return-Path: Delivered-To: freebsd-cloud@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D9BC207 for ; Thu, 12 Feb 2015 12:49:29 +0000 (UTC) Received: from o3.shared.sendgrid.net (o3.shared.sendgrid.net [208.117.48.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C2CCC7A for ; Thu, 12 Feb 2015 12:49:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h=from:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpapi; bh=yXFVeIJrUBF5YYQg/GwD9TDEV3k=; b=aYykSxhkNcCybCjDel T9FHEpaeRwms33OeHjQcStK4YeqJGQBT59ftBCMQeTc+lVbzYo7PsfwPoLvNLo9y vF3Y5rvHfSyvVqwrpH5a5L/1jApDQtpwZKe9wO4TEh0JOkwGSXW9ym49BDrkzmGC ou/GlXOe1/k2SXVoiXsaDEzZc= Received: by filter0220p1mdw1.sendgrid.net with SMTP id filter0220p1mdw1.19602.54DCA15428 2015-02-12 12:49:24.876507947 +0000 UTC Received: from mail.tarsnap.com (ec2-54-86-246-204.compute-1.amazonaws.com [54.86.246.204]) by ismtpd-041 (SG) with ESMTP id 14b7dd63355.4284.4bbc3e for ; Thu, 12 Feb 2015 12:49:24 +0000 (UTC) Received: (qmail 73419 invoked from network); 12 Feb 2015 12:48:28 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 12 Feb 2015 12:48:28 -0000 Received: (qmail 13035 invoked from network); 12 Feb 2015 12:47:59 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 12 Feb 2015 12:47:59 -0000 Message-ID: <54DCA0FF.7000600@freebsd.org> Date: Thu, 12 Feb 2015 04:47:59 -0800 From: Colin Percival User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: "Bradley T. Hughes" , freebsd-cloud@freebsd.org Subject: Re: Small bug fix for ec2-scripts/ec2_fetchkey References: <36FD975E-DF0D-43EF-A4BE-3A2A16C5944D@fastmail.fm> In-Reply-To: <36FD975E-DF0D-43EF-A4BE-3A2A16C5944D@fastmail.fm> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SG-EID: XhyBwObMhraAR+zdwMupjd7LSrZ36RouVZZW3oDOpB24t/Wd+/6Z23xz1SriGRnOTx55rCf9PZ3+IF Pcw4KFLW9yGECwBlT4JTBWvHfTnblZLNTNFx/u4LJVRnfooGYli/D4nt0HnwRIenfgHP7b4by5E7gH 1H4DvnPCt6JN5UYefLNe/IZW3mBJvFNKA/Hk X-BeenThere: freebsd-cloud@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "FreeBSD on cloud platforms \(EC2, GCE, Azure, etc.\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 12:49:29 -0000 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