Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIXED JENKINS-9281] Match entire port number instead of just prefix …
…using POSIX character class.

Originally-From: jenkins-ci.org/commit/core/506183064870a47fd1f8b4100e7188d80a23b6f9
  • Loading branch information
lhanson authored and kohsuke committed Apr 13, 2011
1 parent e84687b commit b7b197a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion debian/jenkins.init
Expand Up @@ -68,7 +68,7 @@ check_tcp_port() {
port=$default
fi

count=`netstat --listen --numeric-ports | grep \:$port | grep -c . `
count=`netstat --listen --numeric-ports | grep \:$port[[:space:]] | grep -c . `

if [ $count -ne 0 ]; then
echo "The selected $service port ($port) seems to be in use by another program "
Expand Down

0 comments on commit b7b197a

Please sign in to comment.