Re: Execute command before reparation

2012-03-11 Thread Nick Anderson
That's what I do. It's more precise. Restarting all of networking for a single interface change seems like using a slegde hammer. Jimmy Thrasibule wrote: >> 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. > >Oops,

Re: Execute command before reparation

2012-03-11 Thread Jimmy Thrasibule
> 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. Oops, I was talking about Neil's idea. But I think I got the solution here. As I list all the interfaces that are about to change, I will just call ifup/ifdown for each

Re: Execute command before reparation

2012-03-11 Thread Jimmy Thrasibule
> 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 t

CFEngine Help: Re: Execute command before reparation

2012-03-11 Thread no-reply
Forum: CFEngine Help Subject: Re: Execute command before reparation Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,25219,25228#msg-25228 Nick: agreed. ___ Help-cfengine mailing list Help-cfengine@cfengine.org https

Re: Execute command before reparation

2012-03-11 Thread Brian Bennett
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 conso

Re: CFEngine Help: Re: Execute command before reparation

2012-03-11 Thread Nick Anderson
rum: CFEngine Help >Subject: Re: Execute command before reparation >Author: neilhwatson >Link to topic: >https://cfengine.com/forum/read.php?3,25219,25225#msg-25225 > >The sure way to restart networking in Debian is /etc/init.d/networking >stop; /etc/init.d/networking start I

CFEngine Help: Re: Execute command before reparation

2012-03-11 Thread no-reply
Forum: CFEngine Help Subject: Re: Execute command before reparation Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,25219,25225#msg-25225 The sure way to restart networking in Debian is /etc/init.d/networking stop; /etc/init.d/networking start I do not know why that is

Re: Execute command before reparation

2012-03-11 Thread Diego Zamboni
What is the recommended way of restarting networking after making changes in Debian? That is the command you should execute then, instead of "/etc/init.d/networking restart". I haven't used Debian in a while, but I can't believe you are expected to stop network services before making any change

CFEngine Help: Re: Execute command before reparation

2012-03-11 Thread no-reply
Forum: CFEngine Help Subject: Re: Execute command before reparation Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,25219,25223#msg-25223 I know what you want. If the interfaces file is too different after the change the restart may not remove unwanted interfaces. I

Re: Execute command before reparation

2012-03-11 Thread Jimmy THRASIBULE
Hi Brian, > In this case you don't have to. > > After editing `/etc/network/interfaces` you can execute > `/etc/init.d/networking restart` to safely & completely apply the new > configuration. The problem is that Debian wants to avoid the use of `/etc/init.d/networking restart` Running /et

Re: Execute command before reparation

2012-03-10 Thread Brian Bennett
On Mar 10, 2012, at 4:37 PM, Jimmy THRASIBULE wrote: > Hi, > > I am discovering CFEngine3 and I would like to execute a command if a > file is about to be repaired. > > The case here is to stop the Debian networking service if a change > must be done on `/et/network/interfaces`. Is that possible?

Execute command before reparation

2012-03-10 Thread Jimmy THRASIBULE
Hi, I am discovering CFEngine3 and I would like to execute a command if a file is about to be repaired. The case here is to stop the Debian networking service if a change must be done on `/et/network/interfaces`. Is that possible? ___ Jimmy THRASIBULE ___