[DRBD-cvs] user by lars; sometimes ip add show lacks the netmask....
drbd-user@lists.linbit.com
drbd-user@lists.linbit.com
Thu, 3 Jun 2004 13:12:02 +0200 (CEST)
DRBD CVS committal
Author : lars
Project : drbd
Module : user
Dir : drbd/user
Modified Files:
Tag: rel-0_7-branch
drbdadm_main.c
Log Message:
sometimes ip add show lacks the netmask. support that
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/user/Attic/drbdadm_main.c,v
retrieving revision 1.1.2.52
retrieving revision 1.1.2.53
diff -u -3 -r1.1.2.52 -r1.1.2.53
--- drbdadm_main.c 24 May 2004 11:39:45 -0000 1.1.2.52
+++ drbdadm_main.c 3 Jun 2004 11:11:57 -0000 1.1.2.53
@@ -620,7 +620,7 @@
"IP=%s; IP=${IP//./\\\\.};"
"LANG=; PATH=/sbin/:$PATH;"
"if type -p ip ; then"
- " ip addr show | grep -qE 'inet '$IP/;"
+ " ip addr show | grep -qE 'inet '$IP'[ /]';"
"elif type -p ifconfig ; then"
" ifconfig | grep -qE ' inet addr:'$IP' ';"
"else"