ia64/xen-unstable
changeset 924:4f30a5c41876
bitkeeper revision 1.587 (3fafd0aetHCEr89pQ3yPEASCbKFapg)
xen_netwatch_redhatscript:
new file
xen_netwatch.c:
More xen_netwatch fixes.
xen_netwatch_redhatscript:
new file
xen_netwatch.c:
More xen_netwatch fixes.
author | kaf24@scramble.cl.cam.ac.uk |
---|---|
date | Mon Nov 10 17:53:50 2003 +0000 (2003-11-10) |
parents | cd3505c22fa4 |
children | 0a901de56d7c 48a22092d446 |
files | .rootkeys tools/misc/xen_netwatch.c tools/misc/xen_netwatch_redhatscript |
line diff
1.1 --- a/.rootkeys Mon Nov 10 16:49:52 2003 +0000 1.2 +++ b/.rootkeys Mon Nov 10 17:53:50 2003 +0000 1.3 @@ -192,6 +192,7 @@ 3f8bcf29ulZIC9rC4wM70H_q4s6VPg tools/mis 1.4 3f13d81eQ9Vz-h-6RDGFkNR9CRP95g tools/misc/xen_nat_enable 1.5 3f13d81e6Z6806ihYYUw8GVKNkYnuw tools/misc/xen_nat_enable.README 1.6 3fafbef1fJFKCcJLq-ffpauvpM10jQ tools/misc/xen_netwatch.c 1.7 +3fafd0abTbQjsCr5W3DDyNdqdJezrA tools/misc/xen_netwatch_redhatscript 1.8 3f1668d4F29Jsw0aC0bJEIkOBiagiQ tools/misc/xen_read_console.c 1.9 3f87ba90EUVPQLVOlFG0sW89BCwouQ tools/misc/xen_refresh_dev.c 1.10 3f72f1bdJPsV3JCnBqs9ddL9tr6D2g xen/COPYING
2.1 --- a/tools/misc/xen_netwatch.c Mon Nov 10 16:49:52 2003 +0000 2.2 +++ b/tools/misc/xen_netwatch.c Mon Nov 10 17:53:50 2003 +0000 2.3 @@ -30,8 +30,8 @@ 2.4 #include <unistd.h> 2.5 #include <time.h> 2.6 2.7 -#define DEFAULT_SCRIPT "/var/xen/netwatch" 2.8 -#define DEFAULT_LOGFILE "/etc/xen/netwatch" 2.9 +#define DEFAULT_SCRIPT "/etc/xen/netwatch" 2.10 +#define DEFAULT_LOGFILE "/var/xen/netwatch" 2.11 2.12 #define LOG(_f, _a...) \ 2.13 do { \
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/tools/misc/xen_netwatch_redhatscript Mon Nov 10 17:53:50 2003 +0000 3.3 @@ -0,0 +1,33 @@ 3.4 +#!/bin/sh 3.5 + 3.6 +# Example xen_netwatch script for Red Hat systems. 3.7 +# If the network interface goes up or down then standard Red Hat 3.8 +# scripts are executed. This may be necessary to reconfigure default 3.9 +# routes, for example. 3.10 +# 3.11 +# This script should be placed at /etc/xen/netwatch 3.12 +# You should make sure that the directory /var/xen/ exists. 3.13 +# 3.14 +# Something like the follwoing should be placed in a startup script 3.15 +# such as /etc/rc.d/rc.local: 3.16 +# 3.17 +# if [ -x /usr/bin/xen_netwatch ]; then 3.18 +# if [ -a /etc/xen/netwatch ]; then 3.19 +# mkdir -p /var/xen 3.20 +# /usr/bin/xen_netwatch 3.21 +# fi 3.22 +# fi 3.23 + 3.24 +cd /etc/sysconfig/network-scripts || exit 1 3.25 + 3.26 +if [ "x$2" == "xup" ]; then 3.27 + if [ -x ./ifup ]; then 3.28 + ./ifup $1 3.29 + fi 3.30 +fi 3.31 + 3.32 +if [ "x$2" == "xdown" ] ; then 3.33 + if [ -x ./ifdown ]; then 3.34 + ./ifdown $1 3.35 + fi 3.36 +fi