On Wed, 2010-12-22 at 09:31 -0500, JIM AMANATIDIS, BLOOMBERG/ 731 LEXIN wrote: > Having an issue with iprange not working in v3. Stripped out everything and > reduced it to this code snippet (below), still not working. What gives? >
I think your test for Net1 should be 10.125.7.128/25 instead of 10.125.7.0/25. See if that doesn't work better. > # cat test.cf > body common control { > bundlesequence => { "test_routes" }; > } > bundle agent test_routes { > classes: > "Has_Net1" expression => iprange("10.125.7.0/25"); > "Has_Net2" expression => iprange("10.126.19.128/25"); > > commands: > Has_Net1:: > "/bin/echo Has_Net1 is true"; > !Has_Net1:: > "/bin/echo Has_Net1 is false"; > Has_Net2:: > "/bin/echo Has_Net2 is true"; > !Has_Net2:: > "/bin/echo Has_Net2 is false"; > } > > # ifconfig -a | grep inet | grep broadcast > inet 10.126.19.172 netmask ffffff80 broadcast 10.126.19.255 > inet 10.125.7.98 netmask ffffff80 broadcast 10.125.7.127 > > And I get this during cf-agent run > > # cf-agent -nf test.cf > -> Would execute script /bin/echo Has_Net1 is false > -> Would execute script /bin/echo Has_Net2 is true > > Both should be true. > > - Jim > _______________________________________________ > Help-cfengine mailing list > Help-cfengine@cfengine.org > https://cfengine.org/mailman/listinfo/help-cfengine > > -- Daniel R. Bidwell | bidw...@andrews.edu Andrews University | Information Technology Services If two always agree, one of them is unnecessary "Friends don't let friends do DOS" "In theory, theory and practice are the same. In practice, however, they are not." _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine