Apologies for my late reply and thank you very much for your advice.
I'm now looking into the scripts, I will report back again if this works.
thanks,
Tsubasa Ishijima
(2010/10/29 20:08), Trevor Hemsley wrote:
I just read ifup-post and it will execute `ifup-local ${interface}` if
ifup-local exists and is executable. Since this is a shell script you
should be able to create this file and add some logic to it to work
out if it needs to do anything or not based on the interface name
passed to it.
TORO wrote:
Hi, I have multiple NIC on this server and I only want to run script
on specific Interface.
Looks like if I add on ifup and ifdown post, script will run when I
turn up other Interface.
regards,
Tsubasa Ishijima
(2010/10/29 15:09), solarflow99 wrote:
Can you add a line to ifup-post and ifdown-post to call your script?
There may be a cleaner way to do this, i'd have to check.
ifup-post
On Thu, Oct 28, 2010 at 10:32 PM, TORO<t...@mail.trollope.asia> wrote:
Hi,
Thanks for the prompt reply.I have edited ifcfg-eth0 but seems like
not
working correctly.
Please look at the results. Is there an option to run a script only
when
trun up/down the interface?
That is ,that every time I restart the service network or I do ifup
eth0 the
script runs.
regards,
Tsubasa Ishijima
---------------------the results----------------------------------
[r...@host network-scripts]# cat say_hello.sh
#!/bin/sh
echo "hello"
[r...@host network-scripts]# cat ifcfg-eth0
# Intel Corporation 82562EZ 10/100 Ethernet Controller
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=my:mac:address:here
ONBOOT=yes
DHCP_HOSTNAME=host
/etc/sysconfig/network-scripts/say_hello.sh
[r...@host network-scripts]# service network restart
hello
Shutting down interface eth0: hello
hello
hello
hello
hello
[ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: hello
hello
Determining IP information for eth0...hello
hello
hello
hello
done.
hello
/etc/sysconfig/network-scripts/ifup-aliases: line 137: hello:
command not
found
[ OK ]
---------------------------------------------
(2010/10/29 13:34), solarflow99 wrote:
hi, I would just use the "setup" command for configuration. The
network setting you make are written to
/etc/sysconfig/network-scripts/ifcfg-eth0 which can also be edited by
hand.
hope this helps..
On Thu, Oct 28, 2010 at 8:48 PM, TORO<t...@mail.trollope.asia> wrote:
Hello,ALL
My name is Tsubasa, This is my first time to post a mail on
rhelv5-list.
Please kindly advice me if I'm not following the rules around
here(also
my English might be a bit weird, sorry).
Could some one give me an advice on how to automatically run a
script(or
command) when network interface turns up ,just like editing
/etc/network/interfaces in debian series?
regards
Tsubasa Ishijima
_______________________________________________
rhelv5-list mailing list
rhelv5-list@redhat.com
https://www.redhat.com/mailman/listinfo/rhelv5-list
_______________________________________________
rhelv5-list mailing list
rhelv5-list@redhat.com
https://www.redhat.com/mailman/listinfo/rhelv5-list
_______________________________________________
rhelv5-list mailing list
rhelv5-list@redhat.com
https://www.redhat.com/mailman/listinfo/rhelv5-list
_______________________________________________
rhelv5-list mailing list
rhelv5-list@redhat.com
https://www.redhat.com/mailman/listinfo/rhelv5-list
_______________________________________________
rhelv5-list mailing list
rhelv5-list@redhat.com
https://www.redhat.com/mailman/listinfo/rhelv5-list
_______________________________________________
rhelv5-list mailing list
rhelv5-list@redhat.com
https://www.redhat.com/mailman/listinfo/rhelv5-list