Small bug fix for ec2-scripts/ec2_fetchkey
Bradley T. Hughes
bradleythughes at fastmail.fm
Thu Feb 12 12:42:39 UTC 2015
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 at fastmail.fm
More information about the freebsd-cloud
mailing list