ia64/xen-unstable

changeset 13255:b071319927b6

Switch hotplug scripts to use /bin/bash rather than /bin/sh.

Hotplug scripts include certain bash-isms that are not supported under
some distros' default shell (eg. Ubuntu 6.10's use of dash)

Signed-off-by: Alastair Tse <atse@xensource.com>
author Alastair Tse <atse@xensource.com>
date Thu Jan 04 14:25:58 2007 +0000 (2007-01-04)
parents f3c3f9bd798e
children b82e1ed0870a
files tools/examples/blktap tools/examples/block tools/examples/block-enbd tools/examples/block-nbd tools/examples/external-device-migrate tools/examples/network-bridge tools/examples/network-nat tools/examples/network-route tools/examples/vif-bridge tools/examples/vif-common.sh tools/examples/vif-nat tools/examples/vif-route tools/examples/vtpm tools/examples/vtpm-delete tools/examples/xen-backend.agent tools/examples/xen-hotplug-cleanup
line diff
     1.1 --- a/tools/examples/blktap	Thu Jan 04 13:05:09 2007 +0000
     1.2 +++ b/tools/examples/blktap	Thu Jan 04 14:25:58 2007 +0000
     1.3 @@ -1,4 +1,4 @@
     1.4 -#!/bin/sh
     1.5 +#!/bin/bash
     1.6  
     1.7  # Copyright (c) 2005, XenSource Ltd.
     1.8  
     2.1 --- a/tools/examples/block	Thu Jan 04 13:05:09 2007 +0000
     2.2 +++ b/tools/examples/block	Thu Jan 04 14:25:58 2007 +0000
     2.3 @@ -1,4 +1,4 @@
     2.4 -#!/bin/sh
     2.5 +#!/bin/bash
     2.6  
     2.7  dir=$(dirname "$0")
     2.8  . "$dir/block-common.sh"
     3.1 --- a/tools/examples/block-enbd	Thu Jan 04 13:05:09 2007 +0000
     3.2 +++ b/tools/examples/block-enbd	Thu Jan 04 14:25:58 2007 +0000
     3.3 @@ -1,4 +1,4 @@
     3.4 -#!/bin/sh
     3.5 +#!/bin/bash
     3.6  
     3.7  # Usage: block-enbd [bind server ctl_port |unbind node]
     3.8  #
     4.1 --- a/tools/examples/block-nbd	Thu Jan 04 13:05:09 2007 +0000
     4.2 +++ b/tools/examples/block-nbd	Thu Jan 04 14:25:58 2007 +0000
     4.3 @@ -1,4 +1,4 @@
     4.4 -#!/bin/sh
     4.5 +#!/bin/bash
     4.6  
     4.7  # Usage: block-nbd [bind server ctl_port |unbind node]
     4.8  #
     5.1 --- a/tools/examples/external-device-migrate	Thu Jan 04 13:05:09 2007 +0000
     5.2 +++ b/tools/examples/external-device-migrate	Thu Jan 04 14:25:58 2007 +0000
     5.3 @@ -1,4 +1,4 @@
     5.4 -#!/bin/sh
     5.5 +#!/bin/bash
     5.6  
     5.7  # Copyright (c) 2005 IBM Corporation
     5.8  #
     6.1 --- a/tools/examples/network-bridge	Thu Jan 04 13:05:09 2007 +0000
     6.2 +++ b/tools/examples/network-bridge	Thu Jan 04 14:25:58 2007 +0000
     6.3 @@ -1,4 +1,4 @@
     6.4 -#!/bin/sh
     6.5 +#!/bin/bash
     6.6  #============================================================================
     6.7  # Default Xen network start/stop script.
     6.8  # Xend calls a network script when it starts.
     7.1 --- a/tools/examples/network-nat	Thu Jan 04 13:05:09 2007 +0000
     7.2 +++ b/tools/examples/network-nat	Thu Jan 04 14:25:58 2007 +0000
     7.3 @@ -1,4 +1,4 @@
     7.4 -#!/bin/sh
     7.5 +#!/bin/bash
     7.6  #============================================================================
     7.7  # Default Xen network start/stop script when using NAT.
     7.8  # Xend calls a network script when it starts.
     8.1 --- a/tools/examples/network-route	Thu Jan 04 13:05:09 2007 +0000
     8.2 +++ b/tools/examples/network-route	Thu Jan 04 14:25:58 2007 +0000
     8.3 @@ -1,4 +1,4 @@
     8.4 -#!/bin/sh
     8.5 +#!/bin/bash
     8.6  #============================================================================
     8.7  # Default Xen network start/stop script.
     8.8  # Xend calls a network script when it starts.
     9.1 --- a/tools/examples/vif-bridge	Thu Jan 04 13:05:09 2007 +0000
     9.2 +++ b/tools/examples/vif-bridge	Thu Jan 04 14:25:58 2007 +0000
     9.3 @@ -1,4 +1,4 @@
     9.4 -#!/bin/sh
     9.5 +#!/bin/bash
     9.6  #============================================================================
     9.7  # /etc/xen/vif-bridge
     9.8  #
    10.1 --- a/tools/examples/vif-common.sh	Thu Jan 04 13:05:09 2007 +0000
    10.2 +++ b/tools/examples/vif-common.sh	Thu Jan 04 14:25:58 2007 +0000
    10.3 @@ -64,7 +64,7 @@ then
    10.4  fi
    10.5  
    10.6  
    10.7 -function frob_iptable()
    10.8 +frob_iptable()
    10.9  {
   10.10    if [ "$command" == "online" ]
   10.11    then
   10.12 @@ -89,7 +89,7 @@ If you are using iptables, this may affe
   10.13  # to those coming from the specified networks, though we allow DHCP requests
   10.14  # as well.
   10.15  #
   10.16 -function handle_iptable()
   10.17 +handle_iptable()
   10.18  {
   10.19    # Check for a working iptables installation.  Checking for the iptables
   10.20    # binary is not sufficient, because the user may not have the appropriate
   10.21 @@ -123,7 +123,7 @@ function handle_iptable()
   10.22  # Print the IP address currently in use at the given interface, or nothing if
   10.23  # the interface is not up.
   10.24  #
   10.25 -function ip_of()
   10.26 +ip_of()
   10.27  {
   10.28    ip addr show "$1" | awk "/^.*inet.*$1\$/{print \$2}" | sed -n '1 s,/.*,,p'
   10.29  }
   10.30 @@ -137,7 +137,7 @@ function ip_of()
   10.31  # to these scripts, or eth0 by default.  This function will call fatal if no
   10.32  # such interface could be found.
   10.33  #
   10.34 -function dom0_ip()
   10.35 +dom0_ip()
   10.36  {
   10.37    local nd=${netdev:-eth0}
   10.38    local result=$(ip_of "$nd")
    11.1 --- a/tools/examples/vif-nat	Thu Jan 04 13:05:09 2007 +0000
    11.2 +++ b/tools/examples/vif-nat	Thu Jan 04 14:25:58 2007 +0000
    11.3 @@ -1,4 +1,4 @@
    11.4 -#!/bin/sh
    11.5 +#!/bin/bash
    11.6  #============================================================================
    11.7  # /etc/xen/vif-nat
    11.8  #
    12.1 --- a/tools/examples/vif-route	Thu Jan 04 13:05:09 2007 +0000
    12.2 +++ b/tools/examples/vif-route	Thu Jan 04 14:25:58 2007 +0000
    12.3 @@ -1,4 +1,4 @@
    12.4 -#!/bin/sh
    12.5 +#!/bin/bash
    12.6  #============================================================================
    12.7  # /etc/xen/vif-route
    12.8  #
    13.1 --- a/tools/examples/vtpm	Thu Jan 04 13:05:09 2007 +0000
    13.2 +++ b/tools/examples/vtpm	Thu Jan 04 14:25:58 2007 +0000
    13.3 @@ -1,4 +1,4 @@
    13.4 -#!/bin/sh
    13.5 +#!/bin/bash
    13.6  
    13.7  dir=$(dirname "$0")
    13.8  . "$dir/vtpm-hotplug-common.sh"
    14.1 --- a/tools/examples/vtpm-delete	Thu Jan 04 13:05:09 2007 +0000
    14.2 +++ b/tools/examples/vtpm-delete	Thu Jan 04 14:25:58 2007 +0000
    14.3 @@ -1,4 +1,4 @@
    14.4 -#!/bin/sh
    14.5 +#!/bin/bash
    14.6  
    14.7  # This scripts must be called the following way:
    14.8  # vtpm-delete <domain name>
    15.1 --- a/tools/examples/xen-backend.agent	Thu Jan 04 13:05:09 2007 +0000
    15.2 +++ b/tools/examples/xen-backend.agent	Thu Jan 04 14:25:58 2007 +0000
    15.3 @@ -1,4 +1,4 @@
    15.4 -#! /bin/sh
    15.5 +#! /bin/bash
    15.6  
    15.7  PATH=/etc/xen/scripts:$PATH
    15.8  
    16.1 --- a/tools/examples/xen-hotplug-cleanup	Thu Jan 04 13:05:09 2007 +0000
    16.2 +++ b/tools/examples/xen-hotplug-cleanup	Thu Jan 04 14:25:58 2007 +0000
    16.3 @@ -1,4 +1,4 @@
    16.4 -#! /bin/sh
    16.5 +#! /bin/bash
    16.6  
    16.7  dir=$(dirname "$0")
    16.8  . "$dir/xen-hotplug-common.sh"