[Bps-public-commit] git-sync branch, master, updated. 681e4d3d76a499cab4a3a95c1c0f37cf81d2936b
Alex M Vandiver
alexmv at bestpractical.com
Tue Dec 1 15:27:55 EST 2009
The branch, master has been updated
via 681e4d3d76a499cab4a3a95c1c0f37cf81d2936b (commit)
from 67c6185e6bcb5655d240143ec26f782b5ba35172 (commit)
Summary of changes:
git-sync | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 681e4d3d76a499cab4a3a95c1c0f37cf81d2936b
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue Dec 1 15:27:09 2009 -0500
Show PIDs of ssh master connection
diff --git a/git-sync b/git-sync
index 8392d5d..89ac0ec 100755
--- a/git-sync
+++ b/git-sync
@@ -338,8 +338,8 @@ sub start_master {
my ($host) = @_;
printf colored(" %-40s ", "dark"), "Starting ssh master connection";
my $status = `ssh -O check $host 2>&1`;
- if ( $status =~ /^Master running/) {
- print colored( "[ Already running ]\n", "dark");
+ if ( $status =~ /^Master running \(pid=(\d+)\)/) {
+ print colored( "[ Already running (PID $1) ]\n", "dark");
return;
} elsif ( $status =~ /^No ControlPath/) {
print colored( "[ Not configured -- see ControlPath in sshd_config(5) ]\n", "yellow" );
@@ -365,8 +365,8 @@ sub start_master {
exit;
}
- sleep 1 while (`ssh -O check $host 2>&1` !~ /Master running/);
- print colored( "[ Done ]\n", "green" );
+ sleep 1 while (`ssh -O check $host 2>&1` !~ /Master running \(pid=(\d+)\)/);
+ print colored( "[ Started (PID $1) ]\n", "green" );
return $pid;
}
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list