Merge lp:~kees/charms/precise/sbuild/trunk into lp:charms/sbuild

Proposed by Kees Cook
Status: Merged
Merged at revision: 6
Proposed branch: lp:~kees/charms/precise/sbuild/trunk
Merge into: lp:charms/sbuild
Diff against target: 43 lines (+9/-5)
2 files modified
hooks/package-builder-relation-joined (+4/-0)
wait-for-ssh (+5/-5)
To merge this branch: bzr merge lp:~kees/charms/precise/sbuild/trunk
Reviewer Review Type Date Requested Status
Juan L. Negron (community) Approve
Review via email: mp+140119@code.launchpad.net

Description of the change

Updates on helper tools from Steve Langasek.

To post a comment you must log in.
Revision history for this message
Juan L. Negron (negronjl) wrote :

Reviewing this now.

-Juan

Revision history for this message
Juan L. Negron (negronjl) wrote :

Minor changes ... approved.

-Juan

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'hooks/package-builder-relation-joined'
2--- hooks/package-builder-relation-joined 1970-01-01 00:00:00 +0000
3+++ hooks/package-builder-relation-joined 2012-12-17 00:40:33 +0000
4@@ -0,0 +1,4 @@
5+#!/bin/bash
6+set -ex
7+
8+relation-set hostname=$(unit-get private-address)
9
10=== modified file 'wait-for-ssh'
11--- wait-for-ssh 2011-12-07 17:31:20 +0000
12+++ wait-for-ssh 2012-12-17 00:40:33 +0000
13@@ -4,10 +4,9 @@
14 set -e
15
16 INSTANCE="$1"
17-HOST="$2"
18-REGION="$3"
19-if [ -z "$INSTANCE" ] || [ -z "$HOST" ]; then
20- echo "Usage: $0 INSTANCE HOST [REGION]" >&2
21+REGION="$2"
22+if [ -z "$INSTANCE" ]; then
23+ echo "Usage: $0 INSTANCE [REGION]" >&2
24 exit 1
25 fi
26 if [ -z "$REGION" ]; then
27@@ -23,7 +22,7 @@
28 expected_fp=""
29 expected_length=""
30 while [ -z "$expected_length" ]; do
31- CONSOLE=$(ec2 ec2-get-console-output --region $REGION $INSTANCE)
32+ CONSOLE=$(ec2-get-console-output --region $REGION $INSTANCE)
33 expected_type=$(echo "$CONSOLE" | grep "^Your public key has been saved in /etc/ssh/ssh_host_" | tail -n1 | cut -d/ -f4 | cut -d_ -f3)
34 LINES=$(echo "$CONSOLE" | grep -A4 "^Your public key has been saved in /etc/ssh/ssh_host_${expected_type}_key.pub" || true)
35 if [ -z "$LINES" ]; then
36@@ -35,6 +34,7 @@
37 done
38 echo "expected: $expected_type $expected_length $expected_fp"
39
40+HOST=$(ec2-describe-instances --region $REGION $INSTANCE | awk '/^INSTANCE/ { print $4 }')
41 pubkey=$(mktemp -t pubkey-XXXXXX)
42 fprint=$(mktemp -t fprint-XXXXXX)
43 ssh-keyscan -t $expected_type $HOST > $pubkey

Subscribers

People subscribed via source and target branches

to all changes: