> In general it's done on an interface by interface basis. The commands ifdown > and ifup are almost always used rather than /etc/init.d/networking. The init > script itself just calls ifdown -a or ifup -a anyway. Debian never expects > all interfaces to be altered in one shot unless you're on the console, and if > you're remote that you have enough sense not to down the interface connected > on. > > Another way to do this after drastically editing /etc/network/interfaces > would be to loop through "ifconfig down" (not ifdown*) for all interfaces, > clear /etc/network/run/ifstate, then call ifup -a. > > * ifup/ifdown only work on interfaces exactly as they have been configured in > the interfaces file. If the current state doesn't match the interfaces file > then ifdown will refuse to down it. >
Indeed, the recommended way is to alter the /etc/network/interfaces file and then call ifdown to deconfigure the interface and ifup to reconfigure it. But for that I need to know which interface changed. I think that Nick's idea is a good one, stop the network if the resulted file is different from the new one and then copy it. --- Jimmy Thrasibule _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine