Forum: Cfengine Help Subject: Re: Cfengine Help: cfengine_stdlib.cf and hardclasses Author: Seva Gluschenko Link to topic: https://cfengine.com/forum/read.php?3,21982,22006#msg-22006
So the issue is not about ifvarclass, but about matching body names and classnames indeed. One possible approach is exactly what you've done: to rename bodies, so that they couldn't match hard classes anymore. Another approach is to use class functions like canonify or classmatch. Last, but not least, I don't see why use ifvarclass for hard class at all, since there's no necessity to convert a variable into a class (i.e. there's no variable class in question). You could easily rewrite your promises as follows: commands: reload_firewall.linux:: "/sbin/iptables-restore /etc/iptables.rules" contain => silent; reload_firewall.freebsd:: "/sbin/pfctl -f /etc/pf.conf" contain => silent; _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine