source: drbl-virt/conf/initrd_bin/xen-script-common.sh @ 221

Last change on this file since 221 was 170, checked in by rock, 14 years ago

Add: DRBL client -> Xen configuration file

File size: 993 bytes
RevLine 
[169]1#
2# Copyright (c) 2005 XenSource Ltd.
3#
4# This library is free software; you can redistribute it and/or
5# modify it under the terms of version 2.1 of the GNU Lesser General Public
6# License as published by the Free Software Foundation.
7#
8# This library is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11# Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public
14# License along with this library; if not, write to the Free Software
15# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16#
17
18
19set -e
20
21
22evalVariables()
23{
24  for arg in "$@"
25  do
26    if expr 'index' "$arg" '=' '>' '1' >/dev/null
27    then
28      eval "$arg"
29    fi
30  done
31}
32
33
34findCommand()
35{
36  for arg in "$@"
37  do
38    if ! expr 'index' "$arg" '=' >/dev/null
39    then
40      command="$arg"
41      return
42    fi
43  done
44}
Note: See TracBrowser for help on using the repository browser.