From 2539e85e0078a580cd468333c794c30e2f53c0a7 Mon Sep 17 00:00:00 2001 From: Keith Amidon Date: Tue, 7 Apr 2009 16:49:42 -0700 Subject: [PATCH] Change paths to match locations used in installs. --- vswitchd/etc/init.d/vswitch | 16 ++++++++-------- vswitchd/etc/init.d/vswitch-brcompatd | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/vswitchd/etc/init.d/vswitch b/vswitchd/etc/init.d/vswitch index 8406ebf2..3f0b2ece 100755 --- a/vswitchd/etc/init.d/vswitch +++ b/vswitchd/etc/init.d/vswitch @@ -9,7 +9,7 @@ . /etc/init.d/functions test -e /etc/sysconfig/vswitch && . /etc/sysconfig/vswitch -VSWITCH_BASE="${VSWITCH_BASE:-/root/vswitch/openflow/build}" +VSWITCH_BASE="${VSWITCH_BASE:-/root/vswitch}" VSWITCHD_CONF="${VSWITCHD_CONF:-/etc/vswitchd.conf}" VSWITCHD_PIDFILE="${VSWITCHD_PIDFILE:-/var/run/vswitchd.pid}" VSWITCHD_PRIORITY="${VSWITCHD_PRIORITY:--5}" @@ -25,13 +25,13 @@ BRCOMPATD_SYSLOG_LOGLEVEL="${BRCOMPATD_SYSLOG_LOGLEVEL:-WARN}" BRCOMPATD_MEMLEAK_LOGFILE="${BRCOMPATD_MEMLEAK_LOGFILE:-}" function dp_list { - $VSWITCH_BASE/utilities/dpctl dp-show | grep '^dp[0-9]\+:' | cut -d':' -f 1 + $VSWITCH_BASE/bin/dpctl dp-show | grep '^dp[0-9]\+:' | cut -d':' -f 1 } function dp_intf { local dp=$1 # Currently port0 is hardcoded to be the local port. - $VSWITCH_BASE/utilities/dpctl dp-show $dp | grep 'port 0:' | cut -d' ' -f 3 + $VSWITCH_BASE/bin/dpctl dp-show $dp | grep 'port 0:' | cut -d' ' -f 3 } function clear_old_bridge_ports { @@ -41,10 +41,10 @@ function clear_old_bridge_ports { function start { if ! lsmod | grep -q "openflow_mod"; then - action "Inserting openflow module" insmod $VSWITCH_BASE/datapath/linux-2.6/openflow_mod.ko + action "Inserting openflow module" insmod $VSWITCH_BASE/kernel_modules/openflow_mod.ko fi if [ -n "$BRCOMPATD_PIDFILE" ] && ! lsmod | grep -q "brcompat_mod"; then - action "Inserting brcompat module" insmod $VSWITCH_BASE/datapath/linux-2.6/brcompat_mod.ko + action "Inserting brcompat module" insmod $VSWITCH_BASE/kernel_modules/brcompat_mod.ko fi ulimit -c unlimited # Ensure core dump on crash. Will be in '/'. echo "/var/log/%e-%t" > /proc/sys/kernel/core_pattern @@ -77,7 +77,7 @@ function start { daemonize_opt="" fi #[ "$1" = "update-modules" ] || [ "$1" = "restart" ] || clear_old_bridge_ports - action "Starting vswitchd" nice -n "$VSWITCHD_PRIORITY" $strace_opt $valgrind_opt $VSWITCH_BASE/vswitchd/vswitchd -P"$VSWITCHD_PIDFILE" $daemonize_opt -vANY:CONSOLE:EMER $syslog_opt $logfile_level_opt $logfile_file_opt $leak_opt "$VSWITCHD_CONF" + action "Starting vswitchd" nice -n "$VSWITCHD_PRIORITY" $strace_opt $valgrind_opt $VSWITCH_BASE/sbin/vswitchd -P"$VSWITCHD_PIDFILE" $daemonize_opt -vANY:CONSOLE:EMER $syslog_opt $logfile_level_opt $logfile_file_opt $leak_opt "$VSWITCHD_CONF" # Always attempt to force bridge interfaces up because otherwise # vswitch and XAPI interact badly on startup sleep 2 # Give time for vswitch to get up and running. @@ -104,7 +104,7 @@ function stop { if [ "$1" = "update-modules" ]; then for dp in $(dp_list); do local intf=$(dp_intf $dp) - action "Removing datapath: $dp" $VSWITCH_BASE/utilities/dpctl deldp $dp + action "Removing datapath: $dp" $VSWITCH_BASE/bin/dpctl deldp $dp if [ -e "/etc/sysconfig/network-scripts/ifcfg-$intf" ]; then action "Shutting down datapath interface: $intf" ifdown "$intf" fi @@ -157,7 +157,7 @@ case "$1" in status -p vswitchd.pid vswitchd ;; version) - "$VSWITCH_BASE"/vswitchd/vswitchd -V + "$VSWITCH_BASE"/sbin/vswitchd -V ;; help) printf "vswitch [start|stop|restart|reload|unload|status|version]\n" diff --git a/vswitchd/etc/init.d/vswitch-brcompatd b/vswitchd/etc/init.d/vswitch-brcompatd index 475c06a0..f276f15e 100755 --- a/vswitchd/etc/init.d/vswitch-brcompatd +++ b/vswitchd/etc/init.d/vswitch-brcompatd @@ -9,7 +9,7 @@ . /etc/init.d/functions test -e /etc/sysconfig/vswitch && . /etc/sysconfig/vswitch -VSWITCH_BASE="${VSWITCH_BASE:-/root/vswitch/openflow/build}" +VSWITCH_BASE="${VSWITCH_BASE:-/root/vswitch}" VSWITCHD_CONF="${VSWITCHD_CONF:-/etc/vswitchd.conf}" VSWITCHD_PIDFILE="${VSWITCHD_PIDFILE:-/var/run/vswitchd.pid}" VSWITCHD_PRIORITY="${VSWITCHD_PRIORITY:--5}" @@ -59,7 +59,7 @@ function start { valgrind_opt="valgrind --log-file=$VALGRIND_LOG $VALGRIND_OPT" daemonize_opt="" fi - action "Starting brcompatd" nice -n "$BRCOMPATD_PRIORITY" $strace_opt $valgrind_opt $VSWITCH_BASE/vswitchd/brcompatd -P$BRCOMPATD_PIDFILE --vswitchd-pidfile=$VSWITCHD_PIDFILE $daemonize_opt -vANY:CONSOLE:EMER $syslog_opt $logfile_level_opt $logfile_file_opt $leak_opt "$VSWITCHD_CONF" + action "Starting brcompatd" nice -n "$BRCOMPATD_PRIORITY" $strace_opt $valgrind_opt $VSWITCH_BASE/sbin/brcompatd -P$BRCOMPATD_PIDFILE --vswitchd-pidfile=$VSWITCHD_PIDFILE $daemonize_opt -vANY:CONSOLE:EMER $syslog_opt $logfile_level_opt $logfile_file_opt $leak_opt "$VSWITCHD_CONF" } function stop { @@ -101,7 +101,7 @@ case "$1" in status -p brcompatd.pid brcompatd ;; version) - "$VSWITCH_BASE"/vswitchd/brcompatd -V + "$VSWITCH_BASE"/sbin/brcompatd -V ;; help) printf "vswitch-brcompatd [start|stop|restart|status|version]\n" -- 2.30.2