[debian-edu-commits] debian-edu/ 01/01: improve regex by not matching the ipv6 one
Holger Levsen
holger at layer-acht.org
Mon Apr 3 17:05:39 UTC 2017
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch master
in repository debian-edu-config.
commit 2b6f16edca98565580a92424cc5053f5ae6dbde2
Author: Holger Levsen <holger at layer-acht.org>
Date: Mon Apr 3 19:05:34 2017 +0200
improve regex by not matching the ipv6 one
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
sbin/update-hostname-from-ip | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sbin/update-hostname-from-ip b/sbin/update-hostname-from-ip
index 1888743..04560f2 100755
--- a/sbin/update-hostname-from-ip
+++ b/sbin/update-hostname-from-ip
@@ -97,7 +97,7 @@ done
# Extract current IP if non was provided on the command line
if [ -z "$IP" ] ; then
- IP=`ifconfig $INTERFACE 2>&1 |grep 'inet'|tr a-zA-Z: " "|awk '{print $1; exit}'`
+ IP=`ifconfig $INTERFACE 2>&1 |grep 'inet '|tr a-zA-Z: " "|awk '{print $1; exit}'`
fi
if [ "127.0.0.1" = "$IP" ] ; then
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-config.git
More information about the debian-edu-commits
mailing list