Statistics
| Branch: | Tag: | Revision:

one / install.sh @ 50155b65

History | View | Annotate | Download (39 KB)

1
#!/bin/bash
2

    
3
# -------------------------------------------------------------------------- #
4
# Copyright 2002-2011, OpenNebula Project Leads (OpenNebula.org)             #
5
#                                                                            #
6
# Licensed under the Apache License, Version 2.0 (the "License"); you may    #
7
# not use this file except in compliance with the License. You may obtain    #
8
# a copy of the License at                                                   #
9
#                                                                            #
10
# http://www.apache.org/licenses/LICENSE-2.0                                 #
11
#                                                                            #
12
# Unless required by applicable law or agreed to in writing, software        #
13
# distributed under the License is distributed on an "AS IS" BASIS,          #
14
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
15
# See the License for the specific language governing permissions and        #
16
# limitations under the License.                                             #
17
#--------------------------------------------------------------------------- #
18

    
19
#-------------------------------------------------------------------------------
20
# Install program for OpenNebula. It will install it relative to
21
# $ONE_LOCATION if defined with the -d option, otherwise it'll be installed
22
# under /. In this case you may specified the oneadmin user/group, so you do
23
# not need run the OpenNebula daemon with root priviledges
24
#-------------------------------------------------------------------------------
25

    
26
#-------------------------------------------------------------------------------
27
# COMMAND LINE PARSING
28
#-------------------------------------------------------------------------------
29
usage() {
30
 echo
31
 echo "Usage: install.sh [-u install_user] [-g install_group] [-k keep conf]"
32
 echo "                  [-d ONE_LOCATION] [-c occi|ec2] [-r] [-h]"
33
 echo
34
 echo "-u: user that will run opennebula, defults to user executing install.sh"
35
 echo "-g: group of the user that will run opennebula, defults to user"
36
 echo "    executing install.sh"
37
 echo "-k: keep configuration files of existing OpenNebula installation, useful"
38
 echo "    when upgrading. This flag should not be set when installing"
39
 echo "    OpenNebula for the first time"
40
 echo "-d: target installation directory, if not defined it'd be root. Must be"
41
 echo "    an absolute path."
42
 echo "-c: install client utilities: OpenNebula cli, occi and ec2 client files"
43
 echo "-s: install OpenNebula Sunstone"
44
 echo "-r: remove Opennebula, only useful if -d was not specified, otherwise"
45
 echo "    rm -rf \$ONE_LOCATION would do the job"
46
 echo "-l: creates symlinks instead of copying files, useful for development"
47
 echo "-h: prints this help"
48
}
49
#-------------------------------------------------------------------------------
50

    
51
TEMP_OPT=`getopt -o hkrlcsu:g:d: -n 'install.sh' -- "$@"`
52

    
53
if [ $? != 0 ] ; then
54
    usage
55
    exit 1
56
fi
57

    
58
eval set -- "$TEMP_OPT"
59

    
60
INSTALL_ETC="yes"
61
UNINSTALL="no"
62
LINK="no"
63
CLIENT="no"
64
SUNSTONE="no"
65
ONEADMIN_USER=`id -u`
66
ONEADMIN_GROUP=`id -g`
67
SRC_DIR=$PWD
68

    
69
while true ; do
70
    case "$1" in
71
        -h) usage; exit 0;;
72
        -k) INSTALL_ETC="no"   ; shift ;;
73
        -r) UNINSTALL="yes"   ; shift ;;
74
        -l) LINK="yes" ; shift ;;
75
        -c) CLIENT="yes"; INSTALL_ETC="no" ; shift ;;
76
        -s) SUNSTONE="yes"; INSTALL_ETC="no" ; shift ;;
77
        -u) ONEADMIN_USER="$2" ; shift 2;;
78
        -g) ONEADMIN_GROUP="$2"; shift 2;;
79
        -d) ROOT="$2" ; shift 2 ;;
80
        --) shift ; break ;;
81
        *)  usage; exit 1 ;;
82
    esac
83
done
84

    
85
#-------------------------------------------------------------------------------
86
# Definition of locations
87
#-------------------------------------------------------------------------------
88

    
89
if [ -z "$ROOT" ] ; then
90
    BIN_LOCATION="/usr/bin"
91
    LIB_LOCATION="/usr/lib/one"
92
    ETC_LOCATION="/etc/one"
93
    LOG_LOCATION="/var/log/one"
94
    VAR_LOCATION="/var/lib/one"
95
    SUNSTONE_LOCATION="$LIB_LOCATION/sunstone"
96
    IMAGES_LOCATION="$VAR_LOCATION/images"
97
    RUN_LOCATION="/var/run/one"
98
    LOCK_LOCATION="/var/lock/one"
99
    INCLUDE_LOCATION="/usr/include"
100
    SHARE_LOCATION="/usr/share/one"
101
    MAN_LOCATION="/usr/share/man/man8"
102

    
103
    if [ "$CLIENT" = "yes" ]; then
104
        MAKE_DIRS="$BIN_LOCATION $LIB_LOCATION"
105

    
106
        DELETE_DIRS=""
107

    
108
        CHOWN_DIRS=""
109
    elif [ "$SUNSTONE" = "yes" ]; then
110
        MAKE_DIRS="$BIN_LOCATION $LIB_LOCATION $VAR_LOCATION $SUNSTONE_LOCATION"
111

    
112
        DELETE_DIRS="$MAKE_DIRS"
113

    
114
        CHOWN_DIRS=""
115
    else
116
        MAKE_DIRS="$BIN_LOCATION $LIB_LOCATION $ETC_LOCATION $VAR_LOCATION \
117
                   $INCLUDE_LOCATION $SHARE_LOCATION \
118
                   $LOG_LOCATION $RUN_LOCATION $LOCK_LOCATION \
119
                   $IMAGES_LOCATION $MAN_LOCATION"
120

    
121
        DELETE_DIRS="$LIB_LOCATION $ETC_LOCATION $LOG_LOCATION $VAR_LOCATION \
122
                     $RUN_LOCATION $SHARE_DIRS"
123

    
124
        CHOWN_DIRS="$LOG_LOCATION $VAR_LOCATION $RUN_LOCATION $LOCK_LOCATION"
125
    fi
126

    
127
else
128
    BIN_LOCATION="$ROOT/bin"
129
    LIB_LOCATION="$ROOT/lib"
130
    ETC_LOCATION="$ROOT/etc"
131
    VAR_LOCATION="$ROOT/var"
132
    SUNSTONE_LOCATION="$LIB_LOCATION/sunstone"
133
    IMAGES_LOCATION="$VAR_LOCATION/images"
134
    INCLUDE_LOCATION="$ROOT/include"
135
    SHARE_LOCATION="$ROOT/share"
136
    MAN_LOCATION="$ROOT/share/man/man8"
137

    
138
    if [ "$CLIENT" = "yes" ]; then
139
        MAKE_DIRS="$BIN_LOCATION $LIB_LOCATION"
140

    
141
        DELETE_DIRS="$MAKE_DIRS"
142
    elif [ "$SUNSTONE" = "yes" ]; then
143
        MAKE_DIRS="$BIN_LOCATION $LIB_LOCATION $VAR_LOCATION $SUNSTONE_LOCATION"
144

    
145
        DELETE_DIRS="$MAKE_DIRS"
146
    else
147
        MAKE_DIRS="$BIN_LOCATION $LIB_LOCATION $ETC_LOCATION $VAR_LOCATION \
148
                   $INCLUDE_LOCATION $SHARE_LOCATION $IMAGES_LOCATION \
149
                   $MAN_LOCATION"
150

    
151
        DELETE_DIRS="$MAKE_DIRS"
152

    
153
        CHOWN_DIRS="$ROOT"
154
    fi
155

    
156
    CHOWN_DIRS="$ROOT"
157
fi
158

    
159
SHARE_DIRS="$SHARE_LOCATION/examples \
160
            $SHARE_LOCATION/examples/tm \
161
            $SHARE_LOCATION/hooks"
162

    
163
ETC_DIRS="$ETC_LOCATION/im_kvm \
164
          $ETC_LOCATION/im_xen \
165
          $ETC_LOCATION/im_ec2 \
166
          $ETC_LOCATION/vmm_ec2 \
167
          $ETC_LOCATION/vmm_ssh \
168
          $ETC_LOCATION/vmm_sh \
169
          $ETC_LOCATION/tm_nfs \
170
          $ETC_LOCATION/tm_ssh \
171
          $ETC_LOCATION/tm_dummy \
172
          $ETC_LOCATION/tm_lvm \
173
          $ETC_LOCATION/hm \
174
          $ETC_LOCATION/auth \
175
          $ETC_LOCATION/ec2query_templates \
176
          $ETC_LOCATION/occi_templates"
177

    
178
LIB_DIRS="$LIB_LOCATION/ruby \
179
          $LIB_LOCATION/ruby/OpenNebula \
180
          $LIB_LOCATION/ruby/cloud/ \
181
          $LIB_LOCATION/ruby/cloud/econe \
182
          $LIB_LOCATION/ruby/cloud/econe/views \
183
          $LIB_LOCATION/ruby/cloud/occi \
184
          $LIB_LOCATION/tm_commands \
185
          $LIB_LOCATION/tm_commands/nfs \
186
          $LIB_LOCATION/tm_commands/ssh \
187
          $LIB_LOCATION/tm_commands/dummy \
188
          $LIB_LOCATION/tm_commands/lvm \
189
          $LIB_LOCATION/mads \
190
          $LIB_LOCATION/remotes \
191
          $LIB_LOCATION/remotes/im \
192
          $LIB_LOCATION/remotes/im/kvm.d \
193
          $LIB_LOCATION/remotes/im/xen.d \
194
          $LIB_LOCATION/remotes/im/ganglia.d \
195
          $LIB_LOCATION/remotes/vmm/xen \
196
          $LIB_LOCATION/remotes/vmm/kvm \
197
          $LIB_LOCATION/remotes/image \
198
          $LIB_LOCATION/remotes/image/fs \
199
          $LIB_LOCATION/sh"
200

    
201
VAR_DIRS="$VAR_LOCATION/remotes \
202
          $VAR_LOCATION/remotes/im \
203
          $VAR_LOCATION/remotes/im/kvm.d \
204
          $VAR_LOCATION/remotes/im/xen.d \
205
          $VAR_LOCATION/remotes/im/ganglia.d \
206
          $VAR_LOCATION/remotes/vmm/xen \
207
          $VAR_LOCATION/remotes/vmm/kvm \
208
          $VAR_LOCATION/remotes/image \
209
          $VAR_LOCATION/remotes/image/fs"
210

    
211
SUNSTONE_DIRS="$SUNSTONE_LOCATION/models \
212
               $SUNSTONE_LOCATION/models/OpenNebulaJSON \
213
               $SUNSTONE_LOCATION/public \
214
               $SUNSTONE_LOCATION/public/js \
215
               $SUNSTONE_LOCATION/public/js/plugins \
216
               $SUNSTONE_LOCATION/public/css \
217
               $SUNSTONE_LOCATION/public/vendor \
218
               $SUNSTONE_LOCATION/public/vendor/jQueryLayout \
219
               $SUNSTONE_LOCATION/public/vendor/dataTables \
220
               $SUNSTONE_LOCATION/public/vendor/jQueryUI \
221
               $SUNSTONE_LOCATION/public/vendor/jQuery \
222
               $SUNSTONE_LOCATION/public/vendor/jGrowl \
223
               $SUNSTONE_LOCATION/public/images \
224
               $SUNSTONE_LOCATION/templates"
225

    
226
LIB_ECO_CLIENT_DIRS="$LIB_LOCATION/ruby \
227
                 $LIB_LOCATION/ruby/OpenNebula \
228
                 $LIB_LOCATION/ruby/cloud/ \
229
                 $LIB_LOCATION/ruby/cloud/econe"
230

    
231
LIB_OCCI_CLIENT_DIRS="$LIB_LOCATION/ruby \
232
                 $LIB_LOCATION/ruby/OpenNebula \
233
                 $LIB_LOCATION/ruby/cloud/occi"
234

    
235
LIB_OCA_CLIENT_DIRS="$LIB_LOCATION/ruby \
236
                 $LIB_LOCATION/ruby/OpenNebula"
237

    
238
LIB_CLI_DIRS="$LIB_LOCATION/ruby \
239
              $LIB_LOCATION/ruby/OpenNebula"
240

    
241
if [ "$CLIENT" = "yes" ]; then
242
    MAKE_DIRS="$MAKE_DIRS $LIB_ECO_CLIENT_DIRS $LIB_OCCI_CLIENT_DIRS \
243
               $LIB_CLI_DIRS"
244
elif [ "$SUNSTONE" = "yes" ]; then
245
    MAKE_DIRS="$MAKE_DIRS $SUNSTONE_DIRS $LIB_OCA_CLIENT_DIRS"
246
else
247
    MAKE_DIRS="$MAKE_DIRS $SHARE_DIRS $ETC_DIRS $LIB_DIRS $VAR_DIRS $SUNSTONE_DIRS"
248
fi
249

    
250
#-------------------------------------------------------------------------------
251
#-------------------------------------------------------------------------------
252
# FILE DEFINITION, WHAT IS GOING TO BE INSTALLED AND WHERE
253
#-------------------------------------------------------------------------------
254
#-------------------------------------------------------------------------------
255
INSTALL_FILES=(
256
    BIN_FILES:$BIN_LOCATION
257
    INCLUDE_FILES:$INCLUDE_LOCATION
258
    LIB_FILES:$LIB_LOCATION
259
    RUBY_LIB_FILES:$LIB_LOCATION/ruby
260
    RUBY_OPENNEBULA_LIB_FILES:$LIB_LOCATION/ruby/OpenNebula
261
    MAD_RUBY_LIB_FILES:$LIB_LOCATION/ruby
262
    MAD_RUBY_LIB_FILES:$LIB_LOCATION/remotes
263
    MAD_RUBY_LIB_FILES:$VAR_LOCATION/remotes
264
    MAD_SH_LIB_FILES:$LIB_LOCATION/sh
265
    MAD_SH_LIB_FILES:$LIB_LOCATION/remotes
266
    MAD_SH_LIB_FILES:$VAR_LOCATION/remotes
267
    MADS_LIB_FILES:$LIB_LOCATION/mads
268
    IM_PROBES_FILES:$VAR_LOCATION/remotes/im
269
    IM_PROBES_KVM_FILES:$VAR_LOCATION/remotes/im/kvm.d
270
    IM_PROBES_XEN_FILES:$VAR_LOCATION/remotes/im/xen.d
271
    IM_PROBES_GANGLIA_FILES:$VAR_LOCATION/remotes/im/ganglia.d
272
    VMM_SSH_KVM_SCRIPTS:$VAR_LOCATION/remotes/vmm/kvm
273
    VMM_SSH_XEN_SCRIPTS:$VAR_LOCATION/remotes/vmm/xen
274
    VMM_SSH_XEN_KVM_POLL:$VAR_LOCATION/remotes/vmm/kvm/poll
275
    VMM_SSH_XEN_KVM_POLL:$VAR_LOCATION/remotes/vmm/xen/poll
276
    VMM_SSH_GANGLIA_POLL:$VAR_LOCATION/remotes/vmm/kvm/poll_local
277
    VMM_SSH_GANGLIA_POLL:$VAR_LOCATION/remotes/vmm/xen/poll_local
278
    IM_PROBES_FILES:$LIB_LOCATION/remotes/im
279
    IM_PROBES_KVM_FILES:$LIB_LOCATION/remotes/im/kvm.d
280
    IM_PROBES_XEN_FILES:$LIB_LOCATION/remotes/im/xen.d
281
    IM_PROBES_GANGLIA_FILES:$LIB_LOCATION/remotes/im/ganglia.d
282
    VMM_SSH_KVM_SCRIPTS:$LIB_LOCATION/remotes/vmm/kvm
283
    VMM_SSH_XEN_SCRIPTS:$LIB_LOCATION/remotes/vmm/xen
284
    VMM_SSH_XEN_KVM_POLL:$LIB_LOCATION/remotes/vmm/kvm/poll
285
    VMM_SSH_XEN_KVM_POLL:$LIB_LOCATION/remotes/vmm/xen/poll
286
    VMM_SSH_GANGLIA_POLL:$LIB_LOCATION/remotes/vmm/kvm/poll_local
287
    VMM_SSH_GANGLIA_POLL:$LIB_LOCATION/remotes/vmm/xen/poll_local
288
    NFS_TM_COMMANDS_LIB_FILES:$LIB_LOCATION/tm_commands/nfs
289
    SSH_TM_COMMANDS_LIB_FILES:$LIB_LOCATION/tm_commands/ssh
290
    DUMMY_TM_COMMANDS_LIB_FILES:$LIB_LOCATION/tm_commands/dummy
291
    LVM_TM_COMMANDS_LIB_FILES:$LIB_LOCATION/tm_commands/lvm
292
    IMAGE_DRIVER_FS_SCRIPTS:$LIB_LOCATION/remotes/image/fs
293
    IMAGE_DRIVER_FS_SCRIPTS:$VAR_LOCATION/remotes/image/fs
294
    EXAMPLE_SHARE_FILES:$SHARE_LOCATION/examples
295
    TM_EXAMPLE_SHARE_FILES:$SHARE_LOCATION/examples/tm
296
    HOOK_SHARE_FILES:$SHARE_LOCATION/hooks
297
    COMMON_CLOUD_LIB_FILES:$LIB_LOCATION/ruby/cloud
298
    ECO_LIB_FILES:$LIB_LOCATION/ruby/cloud/econe
299
    ECO_LIB_VIEW_FILES:$LIB_LOCATION/ruby/cloud/econe/views
300
    ECO_BIN_FILES:$BIN_LOCATION
301
    OCCI_LIB_FILES:$LIB_LOCATION/ruby/cloud/occi
302
    OCCI_BIN_FILES:$BIN_LOCATION
303
    MAN_FILES:$MAN_LOCATION
304
)
305

    
306
INSTALL_CLIENT_FILES=(
307
    COMMON_CLOUD_CLIENT_LIB_FILES:$LIB_LOCATION/ruby/cloud
308
    ECO_LIB_CLIENT_FILES:$LIB_LOCATION/ruby/cloud/econe
309
    ECO_BIN_CLIENT_FILES:$BIN_LOCATION
310
    COMMON_CLOUD_CLIENT_LIB_FILES:$LIB_LOCATION/ruby/cloud
311
    OCCI_LIB_CLIENT_FILES:$LIB_LOCATION/ruby/cloud/occi
312
    OCCI_BIN_CLIENT_FILES:$BIN_LOCATION
313
    CLI_BIN_FILES:$BIN_LOCATION
314
    CLI_LIB_FILES:$LIB_LOCATION/ruby
315
    RUBY_OPENNEBULA_LIB_FILES:$LIB_LOCATION/ruby/OpenNebula
316
)
317

    
318
INSTALL_SUNSTONE_RUBY_FILES=(
319
    SUNSTONE_RUBY_LIB_FILES:$LIB_LOCATION/ruby
320
    RUBY_OPENNEBULA_LIB_FILES:$LIB_LOCATION/ruby/OpenNebula
321
)
322

    
323
INSTALL_SUNSTONE_FILES=(
324
    SUNSTONE_FILES:$SUNSTONE_LOCATION
325
    SUNSTONE_BIN_FILES:$BIN_LOCATION
326
    SUNSTONE_MODELS_FILES:$SUNSTONE_LOCATION/models
327
    SUNSTONE_MODELS_JSON_FILES:$SUNSTONE_LOCATION/models/OpenNebulaJSON
328
    SUNSTONE_TEMPLATE_FILES:$SUNSTONE_LOCATION/templates
329
    SUNSTONE_PUBLIC_JS_FILES:$SUNSTONE_LOCATION/public/js
330
    SUNSTONE_PUBLIC_JS_PLUGINS_FILES:$SUNSTONE_LOCATION/public/js/plugins
331
    SUNSTONE_PUBLIC_CSS_FILES:$SUNSTONE_LOCATION/public/css
332
    SUNSTONE_PUBLIC_VENDOR_DATATABLES:$SUNSTONE_LOCATION/public/vendor/dataTables
333
    SUNSTONE_PUBLIC_VENDOR_JGROWL:$SUNSTONE_LOCATION/public/vendor/jGrowl
334
    SUNSTONE_PUBLIC_VENDOR_JQUERY:$SUNSTONE_LOCATION/public/vendor/jQuery
335
    SUNSTONE_PUBLIC_VENDOR_JQUERYUI:$SUNSTONE_LOCATION/public/vendor/jQueryUI
336
    SUNSTONE_PUBLIC_VENDOR_JQUERYLAYOUT:$SUNSTONE_LOCATION/public/vendor/jQueryLayout
337
    SUNSTONE_PUBLIC_IMAGES_FILES:$SUNSTONE_LOCATION/public/images
338
)
339

    
340
INSTALL_ETC_FILES=(
341
    ETC_FILES:$ETC_LOCATION
342
    VMM_EC2_ETC_FILES:$ETC_LOCATION/vmm_ec2
343
    VMM_SSH_ETC_FILES:$ETC_LOCATION/vmm_ssh
344
    VMM_SH_ETC_FILES:$ETC_LOCATION/vmm_sh
345
    IM_EC2_ETC_FILES:$ETC_LOCATION/im_ec2
346
    TM_NFS_ETC_FILES:$ETC_LOCATION/tm_nfs
347
    TM_SSH_ETC_FILES:$ETC_LOCATION/tm_ssh
348
    TM_DUMMY_ETC_FILES:$ETC_LOCATION/tm_dummy
349
    TM_LVM_ETC_FILES:$ETC_LOCATION/tm_lvm
350
    HM_ETC_FILES:$ETC_LOCATION/hm
351
    AUTH_ETC_FILES:$ETC_LOCATION/auth
352
    ECO_ETC_FILES:$ETC_LOCATION
353
    ECO_ETC_TEMPLATE_FILES:$ETC_LOCATION/ec2query_templates
354
    OCCI_ETC_FILES:$ETC_LOCATION
355
    OCCI_ETC_TEMPLATE_FILES:$ETC_LOCATION/occi_templates
356
)
357

    
358
#-------------------------------------------------------------------------------
359
# Binary files, to be installed under $BIN_LOCATION
360
#-------------------------------------------------------------------------------
361

    
362
BIN_FILES="src/nebula/oned \
363
           src/scheduler/src/sched/mm_sched \
364
           src/cli/onevm \
365
           src/cli/onehost \
366
           src/cli/onevnet \
367
           src/cli/oneuser \
368
           src/cli/oneimage \
369
           src/cli/onecluster \
370
           src/cli/onetemplate \
371
           share/scripts/one \
372
           src/authm_mad/oneauth"
373

    
374
#-------------------------------------------------------------------------------
375
# C/C++ OpenNebula API Library & Development files
376
# Include files, to be installed under $INCLUDE_LOCATION
377
# Library files, to be installed under $LIB_LOCATION
378
#-------------------------------------------------------------------------------
379

    
380
INCLUDE_FILES=""
381
LIB_FILES=""
382

    
383
#-------------------------------------------------------------------------------
384
# Ruby library files, to be installed under $LIB_LOCATION/ruby
385
#-------------------------------------------------------------------------------
386

    
387
RUBY_LIB_FILES="src/mad/ruby/ActionManager.rb \
388
                src/mad/ruby/CommandManager.rb \
389
                src/mad/ruby/OpenNebulaDriver.rb \
390
                src/mad/ruby/VirtualMachineDriver.rb \
391
                src/mad/ruby/Ganglia.rb \
392
                src/cli/client_utilities.rb \
393
                src/cli/command_parse.rb \
394
                src/oca/ruby/OpenNebula.rb \
395
                src/tm_mad/TMScript.rb \
396
                src/authm_mad/one_usage.rb \
397
                src/authm_mad/quota.rb \
398
                src/authm_mad/simple_auth.rb \
399
                src/authm_mad/simple_permissions.rb \
400
                src/authm_mad/ssh_auth.rb"
401

    
402
RUBY_OPENNEBULA_LIB_FILES="src/oca/ruby/OpenNebula/Host.rb \
403
                           src/oca/ruby/OpenNebula/HostPool.rb \
404
                           src/oca/ruby/OpenNebula/Pool.rb \
405
                           src/oca/ruby/OpenNebula/User.rb \
406
                           src/oca/ruby/OpenNebula/UserPool.rb \
407
                           src/oca/ruby/OpenNebula/VirtualMachine.rb \
408
                           src/oca/ruby/OpenNebula/VirtualMachinePool.rb \
409
                           src/oca/ruby/OpenNebula/VirtualNetwork.rb \
410
                           src/oca/ruby/OpenNebula/VirtualNetworkPool.rb \
411
                           src/oca/ruby/OpenNebula/Image.rb \
412
                           src/oca/ruby/OpenNebula/ImagePool.rb \
413
                           src/oca/ruby/OpenNebula/Cluster.rb \
414
                           src/oca/ruby/OpenNebula/ClusterPool.rb \
415
                           src/oca/ruby/OpenNebula/Template.rb \
416
                           src/oca/ruby/OpenNebula/TemplatePool.rb \
417
                           src/oca/ruby/OpenNebula/XMLUtils.rb"
418

    
419

    
420
#-----------------------------------------------------------------------------
421
# MAD Script library files, to be installed under $LIB_LOCATION/<script lang>
422
# and remotes directory
423
#-----------------------------------------------------------------------------
424

    
425
MAD_SH_LIB_FILES="src/mad/sh/scripts_common.sh"
426
MAD_RUBY_LIB_FILES="src/mad/ruby/scripts_common.rb"
427

    
428
#-------------------------------------------------------------------------------
429
# Driver executable files, to be installed under $LIB_LOCATION/mads
430
#-------------------------------------------------------------------------------
431

    
432
MADS_LIB_FILES="src/mad/sh/madcommon.sh \
433
              src/tm_mad/tm_common.sh \
434
              src/vmm_mad/ssh/one_vmm_ssh.rb \
435
              src/vmm_mad/ssh/one_vmm_ssh \
436
              src/vmm_mad/sh/one_vmm_sh.rb \
437
              src/vmm_mad/sh/one_vmm_sh \
438
              src/vmm_mad/ec2/one_vmm_ec2.rb \
439
              src/vmm_mad/ec2/one_vmm_ec2 \
440
              src/vmm_mad/dummy/one_vmm_dummy.rb \
441
              src/vmm_mad/dummy/one_vmm_dummy \
442
              src/im_mad/im_ssh/one_im_ssh.rb \
443
              src/im_mad/im_ssh/one_im_ssh \
444
              src/im_mad/im_sh/one_im_sh.rb \
445
              src/im_mad/im_sh/one_im_sh \
446
              src/im_mad/ec2/one_im_ec2.rb \
447
              src/im_mad/ec2/one_im_ec2 \
448
              src/im_mad/dummy/one_im_dummy.rb \
449
              src/im_mad/dummy/one_im_dummy \
450
              src/tm_mad/one_tm \
451
              src/tm_mad/one_tm.rb \
452
              src/hm_mad/one_hm.rb \
453
              src/hm_mad/one_hm \
454
              src/authm_mad/one_auth_mad.rb \
455
              src/authm_mad/one_auth_mad \
456
              src/image_mad/one_image.rb \
457
              src/image_mad/one_image"
458

    
459
#-------------------------------------------------------------------------------
460
# VMM SH Driver KVM scripts, to be installed under $REMOTES_LOCATION/vmm/kvm
461
#-------------------------------------------------------------------------------
462

    
463
VMM_SSH_KVM_SCRIPTS="src/vmm_mad/remotes/kvm/cancel \
464
                    src/vmm_mad/remotes/kvm/deploy \
465
                    src/vmm_mad/remotes/kvm/kvmrc \
466
                    src/vmm_mad/remotes/kvm/migrate \
467
                    src/vmm_mad/remotes/kvm/restore \
468
                    src/vmm_mad/remotes/kvm/save \
469
                    src/vmm_mad/remotes/kvm/shutdown"
470

    
471
#-------------------------------------------------------------------------------
472
# VMM SH Driver Xen scripts, to be installed under $REMOTES_LOCATION/vmm/xen
473
#-------------------------------------------------------------------------------
474

    
475
VMM_SSH_XEN_SCRIPTS="src/vmm_mad/remotes/xen/cancel \
476
                    src/vmm_mad/remotes/xen/deploy \
477
                    src/vmm_mad/remotes/xen/xenrc \
478
                    src/vmm_mad/remotes/xen/migrate \
479
                    src/vmm_mad/remotes/xen/restore \
480
                    src/vmm_mad/remotes/xen/save \
481
                    src/vmm_mad/remotes/xen/shutdown"
482

    
483
#-----------------------------------------------------------------------------
484
# VMM SH Driver xen/kvm scripts, to be installed under $REMOTES_LOCATION/vmm/*
485
#-----------------------------------------------------------------------------
486

    
487
VMM_SSH_XEN_KVM_POLL="src/vmm_mad/remotes/poll_xen_kvm.rb"
488
VMM_SSH_GANGLIA_POLL="src/vmm_mad/remotes/poll_ganglia.rb"
489

    
490
#-------------------------------------------------------------------------------
491
# Information Manager Probes, to be installed under $LIB_LOCATION/remotes
492
#-------------------------------------------------------------------------------
493

    
494
IM_PROBES_FILES="src/im_mad/remotes/run_probes"
495

    
496
IM_PROBES_XEN_FILES="src/im_mad/remotes/xen.d/xen.rb \
497
                    src/im_mad/remotes/xen.d/architecture.sh \
498
                    src/im_mad/remotes/xen.d/cpu.sh \
499
                    src/im_mad/remotes/xen.d/name.sh"
500

    
501
IM_PROBES_KVM_FILES="src/im_mad/remotes/kvm.d/kvm.rb \
502
                    src/im_mad/remotes/kvm.d/architecture.sh \
503
                    src/im_mad/remotes/kvm.d/cpu.sh \
504
                    src/im_mad/remotes/kvm.d/name.sh"
505

    
506
IM_PROBES_GANGLIA_FILES="src/im_mad/remotes/ganglia.d/ganglia_probe"
507

    
508

    
509
#-------------------------------------------------------------------------------
510
# Transfer Manager commands, to be installed under $LIB_LOCATION/tm_commands
511
#   - NFS TM, $LIB_LOCATION/tm_commands/nfs
512
#   - SSH TM, $LIB_LOCATION/tm_commands/ssh
513
#   - dummy TM, $LIB_LOCATION/tm_commands/dummy
514
#   - LVM TM, $LIB_LOCATION/tm_commands/lvm
515
#-------------------------------------------------------------------------------
516

    
517
NFS_TM_COMMANDS_LIB_FILES="src/tm_mad/nfs/tm_clone.sh \
518
                           src/tm_mad/nfs/tm_delete.sh \
519
                           src/tm_mad/nfs/tm_ln.sh \
520
                           src/tm_mad/nfs/tm_mkswap.sh \
521
                           src/tm_mad/nfs/tm_mkimage.sh \
522
                           src/tm_mad/nfs/tm_mv.sh \
523
                           src/tm_mad/nfs/tm_context.sh"
524

    
525
SSH_TM_COMMANDS_LIB_FILES="src/tm_mad/ssh/tm_clone.sh \
526
                           src/tm_mad/ssh/tm_delete.sh \
527
                           src/tm_mad/ssh/tm_ln.sh \
528
                           src/tm_mad/ssh/tm_mkswap.sh \
529
                           src/tm_mad/ssh/tm_mkimage.sh \
530
                           src/tm_mad/ssh/tm_mv.sh \
531
                           src/tm_mad/ssh/tm_context.sh"
532

    
533
DUMMY_TM_COMMANDS_LIB_FILES="src/tm_mad/dummy/tm_dummy.sh"
534

    
535
LVM_TM_COMMANDS_LIB_FILES="src/tm_mad/lvm/tm_clone.sh \
536
                           src/tm_mad/lvm/tm_delete.sh \
537
                           src/tm_mad/lvm/tm_ln.sh \
538
                           src/tm_mad/lvm/tm_mkswap.sh \
539
                           src/tm_mad/lvm/tm_mkimage.sh \
540
                           src/tm_mad/lvm/tm_mv.sh \
541
                           src/tm_mad/lvm/tm_context.sh"
542

    
543
#-------------------------------------------------------------------------------
544
# Image Repository drivers, to be installed under $REMOTES_LOCTION/image
545
#   - FS based Image Repository, $REMOTES_LOCATION/image/fs
546
#-------------------------------------------------------------------------------
547
IMAGE_DRIVER_FS_SCRIPTS="src/image_mad/remotes/fs/cp \
548
                         src/image_mad/remotes/fs/mkfs \
549
                         src/image_mad/remotes/fs/mv \
550
                         src/image_mad/remotes/fs/fsrc \
551
                         src/image_mad/remotes/fs/rm"
552

    
553
#-------------------------------------------------------------------------------
554
# Configuration files for OpenNebula, to be installed under $ETC_LOCATION
555
#-------------------------------------------------------------------------------
556

    
557
ETC_FILES="share/etc/oned.conf \
558
           share/etc/defaultrc"
559

    
560
#-------------------------------------------------------------------------------
561
# Virtualization drivers config. files, to be installed under $ETC_LOCATION
562
#   - ec2, $ETC_LOCATION/vmm_ec2
563
#   - sh, $ETC_LOCATION/vmm_sh
564
#   - ssh, $ETC_LOCATION/vmm_ssh
565
#-------------------------------------------------------------------------------
566

    
567
VMM_EC2_ETC_FILES="src/vmm_mad/ec2/vmm_ec2rc \
568
                   src/vmm_mad/ec2/vmm_ec2.conf"
569

    
570
VMM_SSH_ETC_FILES="src/vmm_mad/ssh/vmm_sshrc \
571
                  src/vmm_mad/ssh/vmm_ssh_kvm.conf \
572
                  src/vmm_mad/ssh/vmm_ssh_xen.conf"
573

    
574
VMM_SH_ETC_FILES="src/vmm_mad/sh/vmm_shrc"
575

    
576
#-------------------------------------------------------------------------------
577
# Information drivers config. files, to be installed under $ETC_LOCATION
578
#   - ec2, $ETC_LOCATION/im_ec2
579
#-------------------------------------------------------------------------------
580

    
581
IM_EC2_ETC_FILES="src/im_mad/ec2/im_ec2rc \
582
                  src/im_mad/ec2/im_ec2.conf"
583

    
584
#-------------------------------------------------------------------------------
585
# Storage drivers config. files, to be installed under $ETC_LOCATION
586
#   - nfs, $ETC_LOCATION/tm_nfs
587
#   - ssh, $ETC_LOCATION/tm_ssh
588
#   - dummy, $ETC_LOCATION/tm_dummy
589
#   - lvm, $ETC_LOCATION/tm_lvm
590
#-------------------------------------------------------------------------------
591

    
592
TM_NFS_ETC_FILES="src/tm_mad/nfs/tm_nfs.conf \
593
                  src/tm_mad/nfs/tm_nfsrc"
594

    
595
TM_SSH_ETC_FILES="src/tm_mad/ssh/tm_ssh.conf \
596
                  src/tm_mad/ssh/tm_sshrc"
597

    
598
TM_DUMMY_ETC_FILES="src/tm_mad/dummy/tm_dummy.conf \
599
                    src/tm_mad/dummy/tm_dummyrc"
600

    
601
TM_LVM_ETC_FILES="src/tm_mad/lvm/tm_lvm.conf \
602
                  src/tm_mad/lvm/tm_lvmrc"
603

    
604
#-------------------------------------------------------------------------------
605
# Hook Manager driver config. files, to be installed under $ETC_LOCATION/hm
606
#-------------------------------------------------------------------------------
607

    
608
HM_ETC_FILES="src/hm_mad/hmrc"
609

    
610
#-------------------------------------------------------------------------------
611
# Hook Manager driver config. files, to be installed under $ETC_LOCATION/hm
612
#-------------------------------------------------------------------------------
613

    
614
AUTH_ETC_FILES="src/authm_mad/auth_mad \
615
                src/authm_mad/auth.conf"
616

    
617
#-------------------------------------------------------------------------------
618
# Sample files, to be installed under $SHARE_LOCATION/examples
619
#-------------------------------------------------------------------------------
620

    
621
EXAMPLE_SHARE_FILES="share/examples/vm.template \
622
                     share/examples/private.net \
623
                     share/examples/public.net"
624

    
625
#-------------------------------------------------------------------------------
626
# TM Sample files, to be installed under $SHARE_LOCATION/examples/tm
627
#-------------------------------------------------------------------------------
628

    
629
TM_EXAMPLE_SHARE_FILES="share/examples/tm/tm_clone.sh \
630
                        share/examples/tm/tm_delete.sh \
631
                        share/examples/tm/tm_ln.sh \
632
                        share/examples/tm/tm_mkimage.sh \
633
                        share/examples/tm/tm_mkswap.sh \
634
                        share/examples/tm/tm_mv.sh"
635

    
636
#-------------------------------------------------------------------------------
637
# HOOK scripts, to be installed under $SHARE_LOCATION/hooks
638
#-------------------------------------------------------------------------------
639

    
640
HOOK_SHARE_FILES="share/hooks/ebtables-xen \
641
                  share/hooks/ebtables-kvm \
642
                  share/hooks/ebtables-flush \
643
                  share/hooks/host_error.rb \
644
                  share/hooks/image.rb"
645

    
646
#-------------------------------------------------------------------------------
647
# Common Cloud Files
648
#-------------------------------------------------------------------------------
649

    
650
COMMON_CLOUD_LIB_FILES="src/cloud/common/CloudServer.rb \
651
                        src/cloud/common/CloudClient.rb \
652
                        src/cloud/common/Configuration.rb"
653

    
654
COMMON_CLOUD_CLIENT_LIB_FILES="src/cloud/common/CloudClient.rb"
655

    
656
#-------------------------------------------------------------------------------
657
# EC2 Query for OpenNebula
658
#-------------------------------------------------------------------------------
659

    
660
ECO_LIB_FILES="src/cloud/ec2/lib/EC2QueryClient.rb \
661
               src/cloud/ec2/lib/EC2QueryServer.rb \
662
               src/cloud/ec2/lib/ImageEC2.rb \
663
               src/cloud/ec2/lib/econe-server.rb"
664

    
665
ECO_LIB_CLIENT_FILES="src/cloud/ec2/lib/EC2QueryClient.rb"
666

    
667
ECO_LIB_VIEW_FILES="src/cloud/ec2/lib/views/describe_images.erb \
668
                    src/cloud/ec2/lib/views/describe_instances.erb \
669
                    src/cloud/ec2/lib/views/register_image.erb \
670
                    src/cloud/ec2/lib/views/run_instances.erb \
671
                    src/cloud/ec2/lib/views/terminate_instances.erb"
672

    
673
ECO_BIN_FILES="src/cloud/ec2/bin/econe-server \
674
               src/cloud/ec2/bin/econe-describe-images \
675
               src/cloud/ec2/bin/econe-describe-instances \
676
               src/cloud/ec2/bin/econe-register \
677
               src/cloud/ec2/bin/econe-run-instances \
678
               src/cloud/ec2/bin/econe-terminate-instances \
679
               src/cloud/ec2/bin/econe-upload"
680

    
681
ECO_BIN_CLIENT_FILES="src/cloud/ec2/bin/econe-describe-images \
682
               src/cloud/ec2/bin/econe-describe-instances \
683
               src/cloud/ec2/bin/econe-register \
684
               src/cloud/ec2/bin/econe-run-instances \
685
               src/cloud/ec2/bin/econe-terminate-instances \
686
               src/cloud/ec2/bin/econe-upload"
687

    
688
ECO_ETC_FILES="src/cloud/ec2/etc/econe.conf"
689

    
690
ECO_ETC_TEMPLATE_FILES="src/cloud/ec2/etc/templates/m1.small.erb"
691

    
692
#-----------------------------------------------------------------------------
693
# OCCI files
694
#-----------------------------------------------------------------------------
695

    
696
OCCI_LIB_FILES="src/cloud/occi/lib/OCCIServer.rb \
697
                src/cloud/occi/lib/occi-server.rb \
698
                src/cloud/occi/lib/OCCIClient.rb \
699
                src/cloud/occi/lib/VirtualMachineOCCI.rb \
700
                src/cloud/occi/lib/VirtualMachinePoolOCCI.rb \
701
                src/cloud/occi/lib/VirtualNetworkOCCI.rb \
702
                src/cloud/occi/lib/VirtualNetworkPoolOCCI.rb \
703
                src/cloud/occi/lib/ImageOCCI.rb \
704
                src/cloud/occi/lib/ImagePoolOCCI.rb"
705

    
706
OCCI_LIB_CLIENT_FILES="src/cloud/occi/lib/OCCIClient.rb"
707

    
708
OCCI_BIN_FILES="src/cloud/occi/bin/occi-server \
709
               src/cloud/occi/bin/occi-compute \
710
               src/cloud/occi/bin/occi-network \
711
               src/cloud/occi/bin/occi-storage"
712

    
713
OCCI_BIN_CLIENT_FILES="src/cloud/occi/bin/occi-compute \
714
               src/cloud/occi/bin/occi-network \
715
               src/cloud/occi/bin/occi-storage"
716

    
717
OCCI_ETC_FILES="src/cloud/occi/etc/occi-server.conf"
718

    
719
OCCI_ETC_TEMPLATE_FILES="src/cloud/occi/etc/templates/common.erb \
720
                    src/cloud/occi/etc/templates/custom.erb \
721
                    src/cloud/occi/etc/templates/small.erb \
722
                    src/cloud/occi/etc/templates/medium.erb \
723
                    src/cloud/occi/etc/templates/large.erb"
724

    
725
#-----------------------------------------------------------------------------
726
# CLI files
727
#-----------------------------------------------------------------------------
728

    
729
CLI_LIB_FILES="src/mad/ruby/CommandManager.rb \
730
               src/cli/client_utilities.rb \
731
               src/cli/command_parse.rb \
732
               src/oca/ruby/OpenNebula.rb"
733

    
734
CLI_BIN_FILES="src/cli/onevm \
735
               src/cli/onehost \
736
               src/cli/onevnet \
737
               src/cli/oneuser \
738
               src/cli/oneimage \
739
               src/cli/onecluster \
740
               src/cli/onetemplate"
741

    
742
#-----------------------------------------------------------------------------
743
# Sunstone files
744
#-----------------------------------------------------------------------------
745

    
746
SUNSTONE_FILES="src/sunstone/config.ru \
747
                src/sunstone/sunstone-server.rb"
748

    
749
SUNSTONE_BIN_FILES="src/sunstone/bin/sunstone-server"
750

    
751
SUNSTONE_MODELS_FILES="src/sunstone/models/OpenNebulaJSON.rb \
752
                       src/sunstone/models/SunstoneServer.rb"
753

    
754
SUNSTONE_MODELS_JSON_FILES="src/sunstone/models/OpenNebulaJSON/ClusterJSON.rb \
755
                    src/sunstone/models/OpenNebulaJSON/HostJSON.rb \
756
                    src/sunstone/models/OpenNebulaJSON/ImageJSON.rb \
757
                    src/sunstone/models/OpenNebulaJSON/JSONUtils.rb \
758
                    src/sunstone/models/OpenNebulaJSON/PoolJSON.rb \
759
                    src/sunstone/models/OpenNebulaJSON/UserJSON.rb \
760
                    src/sunstone/models/OpenNebulaJSON/VirtualMachineJSON.rb \
761
                    src/sunstone/models/OpenNebulaJSON/TemplateJSON.rb \
762
                    src/sunstone/models/OpenNebulaJSON/VirtualNetworkJSON.rb"
763

    
764
SUNSTONE_TEMPLATE_FILES="src/sunstone/templates/index.html \
765
                         src/sunstone/templates/login.html"
766

    
767
SUNSTONE_PUBLIC_JS_FILES="src/sunstone/public/js/layout.js \
768
                        src/sunstone/public/js/login.js \
769
                        src/sunstone/public/js/sunstone.js \
770
                        src/sunstone/public/js/sunstone-util.js \
771
                        src/sunstone/public/js/opennebula.js"
772

    
773
SUNSTONE_PUBLIC_JS_PLUGINS_FILES="\
774
                            src/sunstone/public/js/plugins/dashboard-tab.js \
775
                            src/sunstone/public/js/plugins/hosts-tab.js \
776
                            src/sunstone/public/js/plugins/images-tab.js \
777
                            src/sunstone/public/js/plugins/templates-tab.js \
778
                            src/sunstone/public/js/plugins/users-tab.js \
779
                            src/sunstone/public/js/plugins/vms-tab.js \
780
                            src/sunstone/public/js/plugins/vnets-tab.js"
781

    
782
SUNSTONE_PUBLIC_CSS_FILES="src/sunstone/public/css/application.css \
783
                           src/sunstone/public/css/layout.css \
784
                           src/sunstone/public/css/login.css"
785

    
786
SUNSTONE_PUBLIC_VENDOR_DATATABLES="\
787
                src/sunstone/public/vendor/dataTables/jquery.dataTables.min.js \
788
                src/sunstone/public/vendor/dataTables/demo_table_jui.css \
789
                src/sunstone/public/vendor/dataTables/BSD-LICENSE.txt \
790
                src/sunstone/public/vendor/dataTables/NOTICE"
791

    
792
SUNSTONE_PUBLIC_VENDOR_JGROWL="\
793
                src/sunstone/public/vendor/jGrowl/jquery.jgrowl_minimized.js \
794
                src/sunstone/public/vendor/jGrowl/jquery.jgrowl.css \
795
                src/sunstone/public/vendor/jGrowl/NOTICE"
796

    
797
SUNSTONE_PUBLIC_VENDOR_JQUERY="\
798
                        src/sunstone/public/vendor/jQuery/jquery-1.4.4.min.js \
799
                        src/sunstone/public/vendor/jQuery/MIT-LICENSE.txt \
800
                        src/sunstone/public/vendor/jQuery/NOTICE"
801

    
802
SUNSTONE_PUBLIC_VENDOR_JQUERYUI="\
803
src/sunstone/public/vendor/jQueryUI/ui-bg_glass_75_dadada_1x400.png \
804
src/sunstone/public/vendor/jQueryUI/ui-icons_cd0a0a_256x240.png \
805
src/sunstone/public/vendor/jQueryUI/jquery-ui-1.8.7.custom.css \
806
src/sunstone/public/vendor/jQueryUI/ui-bg_flat_0_aaaaaa_40x100.png \
807
src/sunstone/public/vendor/jQueryUI/ui-bg_flat_0_8f9392_40x100.png \
808
src/sunstone/public/vendor/jQueryUI/MIT-LICENSE.txt \
809
src/sunstone/public/vendor/jQueryUI/jquery-ui-1.8.7.custom.min.js \
810
src/sunstone/public/vendor/jQueryUI/ui-bg_highlight-soft_75_cccccc_1x100.png \
811
src/sunstone/public/vendor/jQueryUI/ui-bg_glass_95_fef1ec_1x400.png \
812
src/sunstone/public/vendor/jQueryUI/ui-bg_glass_55_fbf9ee_1x400.png \
813
src/sunstone/public/vendor/jQueryUI/ui-icons_888888_256x240.png \
814
src/sunstone/public/vendor/jQueryUI/ui-bg_glass_75_e6e6e6_1x400.png \
815
src/sunstone/public/vendor/jQueryUI/ui-bg_flat_0_575c5b_40x100.png \
816
src/sunstone/public/vendor/jQueryUI/ui-bg_glass_65_ffffff_1x400.png \
817
src/sunstone/public/vendor/jQueryUI/ui-bg_flat_75_ffffff_40x100.png \
818
src/sunstone/public/vendor/jQueryUI/ui-icons_2e83ff_256x240.png \
819
src/sunstone/public/vendor/jQueryUI/ui-icons_454545_256x240.png \
820
src/sunstone/public/vendor/jQueryUI/NOTICE \
821
src/sunstone/public/vendor/jQueryUI/ui-icons_222222_256x240.png \
822
"
823
SUNSTONE_PUBLIC_VENDOR_JQUERYLAYOUT="\
824
            src/sunstone/public/vendor/jQueryLayout/layout-default-latest.css \
825
            src/sunstone/public/vendor/jQueryLayout/jquery.layout.min-1.2.0.js \
826
            src/sunstone/public/vendor/jQueryLayout/NOTICE"
827

    
828
SUNSTONE_PUBLIC_IMAGES_FILES="src/sunstone/public/images/ajax-loader.gif \
829
                        src/sunstone/public/images/login_over.png \
830
                        src/sunstone/public/images/login.png \
831
                        src/sunstone/public/images/opennebula-sunstone-big.png \
832
                        src/sunstone/public/images/opennebula-sunstone-small.png \
833
                        src/sunstone/public/images/panel.png \
834
                        src/sunstone/public/images/pbar.gif \
835
                        src/sunstone/public/images/Refresh-icon.png"
836

    
837
SUNSTONE_RUBY_LIB_FILES="src/mad/ruby/CommandManager.rb \
838
                         src/oca/ruby/OpenNebula.rb"
839

    
840
#-----------------------------------------------------------------------------
841
# MAN files
842
#-----------------------------------------------------------------------------
843

    
844
MAN_FILES="share/man/oneauth.8.gz \
845
        share/man/onecluster.8.gz \
846
        share/man/onehost.8.gz \
847
        share/man/oneimage.8.gz \
848
        share/man/oneuser.8.gz \
849
        share/man/onevm.8.gz \
850
        share/man/onevnet.8.gz \
851
        share/man/onetemplate.8.gz \
852
        share/man/econe-describe-images.8.gz \
853
        share/man/econe-describe-instances.8.gz \
854
        share/man/econe-register.8.gz \
855
        share/man/econe-run-instances.8.gz \
856
        share/man/econe-terminate-instances.8.gz \
857
        share/man/econe-upload.8.gz \
858
        share/man/occi-compute.8.gz \
859
        share/man/occi-network.8.gz \
860
        share/man/occi-storage.8.gz"
861

    
862
#-----------------------------------------------------------------------------
863
#-----------------------------------------------------------------------------
864
# INSTALL.SH SCRIPT
865
#-----------------------------------------------------------------------------
866
#-----------------------------------------------------------------------------
867

    
868
# --- Create OpenNebula directories ---
869

    
870
if [ "$UNINSTALL" = "no" ] ; then
871
    for d in $MAKE_DIRS; do
872
        mkdir -p $DESTDIR$d
873
    done
874
fi
875

    
876
# --- Install/Uninstall files ---
877

    
878
do_file() {
879
    if [ "$UNINSTALL" = "yes" ]; then
880
        rm $2/`basename $1`
881
    else
882
        if [ "$LINK" = "yes" ]; then
883
            ln -s $SRC_DIR/$1 $DESTDIR$2
884
        else
885
            cp $SRC_DIR/$1 $DESTDIR$2
886
        fi
887
    fi
888
}
889

    
890

    
891
if [ "$CLIENT" = "yes" ]; then
892
    INSTALL_SET=${INSTALL_CLIENT_FILES[@]}
893
elif [ "$SUNSTONE" = "yes" ]; then
894
    INSTALL_SET="${INSTALL_SUNSTONE_RUBY_FILES[@]} ${INSTALL_SUNSTONE_FILES[@]}"
895
else
896
    INSTALL_SET="${INSTALL_FILES[@]} ${INSTALL_SUNSTONE_FILES[@]}"
897
fi
898

    
899
for i in ${INSTALL_SET[@]}; do
900
    SRC=$`echo $i | cut -d: -f1`
901
    DST=`echo $i | cut -d: -f2`
902

    
903
    eval SRC_FILES=$SRC
904

    
905
    for f in $SRC_FILES; do
906
        do_file $f $DST
907
    done
908
done
909

    
910
if [ "$INSTALL_ETC" = "yes" ] ; then
911
    for i in ${INSTALL_ETC_FILES[@]}; do
912
        SRC=$`echo $i | cut -d: -f1`
913
        DST=`echo $i | cut -d: -f2`
914

    
915
        eval SRC_FILES=$SRC
916

    
917
        OLD_LINK=$LINK
918
        LINK="no"
919

    
920
        for f in $SRC_FILES; do
921
            do_file $f $DST
922
        done
923

    
924
        LINK=$OLD_LINK
925
   done
926
fi
927

    
928
# --- Set ownership or remove OpenNebula directories ---
929

    
930
if [ "$UNINSTALL" = "no" ] ; then
931
    for d in $CHOWN_DIRS; do
932
        chown -R $ONEADMIN_USER:$ONEADMIN_GROUP $DESTDIR$d
933
    done
934

    
935
    # --- Set correct permissions for Image Repository ---
936

    
937
    if [ -d "$DESTDIR$IMAGES_LOCATION" ]; then
938
        chmod 3770 $DESTDIR$IMAGES_LOCATION
939
    fi
940
else
941
    for d in `echo $DELETE_DIRS | awk '{for (i=NF;i>=1;i--) printf $i" "}'`; do
942
        rmdir $d
943
    done
944
fi