Hi again Hideo-san, Again, apologies for such a late response.
On Tue, Nov 29, 2011 at 02:49:24PM +0900, [email protected] wrote: > Hi All, > > We made a patch to IPsrcaddr. > > This patch revises the next point. > > * Made modifications to carry out validate_all processing. I'm not necessarily against it, but I wonder why. This would make monitor validate the environment every time. Is that really necessary? What was your motivation for this change? > * Undefined and deleted the unused IPROUTE variable OK. > * The find_interface_generic processing revised it to search it by ip > command. Good. > However, we cannot test environment except Linux. > Therefore, we limited a condition to carry out processing to environment of > Linux. That's fine too. Cheers, Dejan > (snip) > @@ -458,6 +440,10 @@ > > ipaddress="$OCF_RESKEY_ipaddress" > > +if [ "x$SYSTYPE" = "xLinux" ]; then > + srca_validate_all > +fi > + > (snip) > > > Please please confirm my correction. > And please commit a correction. > > > > Best Regards, > Hideo Yamauchi > diff -r e4d9d86a9577 IPsrcaddr > --- a/IPsrcaddr Mon Nov 28 20:02:26 2011 +0900 > +++ b/IPsrcaddr Mon Nov 28 20:03:07 2011 +0900 > @@ -307,35 +307,14 @@ > # > find_interface_generic() { > > - $IFCONFIG $IFCONFIG_A_OPT | > - while read ifname linkstuff > - do > - : Read gave us ifname = $ifname > - > - read inet addr junk > - : Read gave us inet = $inet addr = $addr > - > - while > - read line && [ "X$line" != "X" ] > - do > - : Nothing > - done > - > - case "$SYSTYPE" in > - *BSD) > - $IFCONFIG | grep "$BASEIP" -B`$IFCONFIG | grep -c inet` | grep > "UP," | cut -d ":" -f 1 > - return 0;; > - *) > - : "comparing $BASEIP to $addr (from ifconfig)" > - case $addr in > - addr:$BASEIP) echo $ifname; return $OCF_SUCCESS;; > - $BASEIP) echo $ifname; return $OCF_SUCCESS;; > - esac > - continue;; > - esac > - > - done > - return $OCF_ERR_GENERIC > + local iface=`$IP2UTIL -o -f inet addr show | grep "\ $BASEIP" \ > + | cut -d ' ' -f2 | grep -v '^ipsec[0-9][0-9]*$'` > + if [ -z "$iface" ]; then > + return $OCF_ERR_GENERIC > + else > + echo $iface > + return $OCF_SUCCESS > + fi > } > > > @@ -409,7 +388,6 @@ > srca_validate_all() { > > check_binary $AWK > - check_binary $IPROUTE > check_binary $IFCONFIG > > # The IP address should be in good shape > @@ -420,6 +398,10 @@ > exit $OCF_ERR_CONFIGURED > fi > > + if ocf_is_probe; then > + return $OCF_SUCCESS > + fi > + > # We should serve this IP address of course > if ip_status "$ipaddress"; then > : > @@ -458,6 +440,10 @@ > > ipaddress="$OCF_RESKEY_ipaddress" > > +if [ "x$SYSTYPE" = "xLinux" ]; then > + srca_validate_all > +fi > + > findif_out=`$FINDIF -C` > rc=$? > [ $rc -ne 0 ] && { > _______________________________________________________ > Linux-HA-Dev: [email protected] > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev > Home Page: http://linux-ha.org/ _______________________________________________________ Linux-HA-Dev: [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/
