FHS.diff

FHS patch - soren-ubuntu-com -, 12/24/2008 12:07 AM

Download (52.9 KB)

View differences:

one-1.1.80/install.sh 2008-12-22 23:56:17.657767980 +0100
30 30
    exit -1
31 31
fi
32 32

  
33
DIRS="/bin /include /etc /etc/im_kvm /etc/im_xen /etc/vmm_kvm /etc/vmm_xen /libexec /lib/ruby /var /share/examples /share/examples/tm /lib/im_probes /lib/tm_commands/nfs /lib/tm_commands/ssh /lib/tm_commands/dummy /etc/vmm_ec2 /etc/im_ec2 /etc/tm_nfs /etc/tm_ssh /etc/tm_dummy"
33
DIRS="usr/bin usr/include /etc etc/one/im_kvm etc/one/im_xen etc/one/vmm_kvm etc/one/vmm_xen usr/lib/one usr/lib/one/ruby var/lib/one var/log/one usr/share/doc/opennebula/examples usr/share/doc/opennebula/examples/tm usr/lib/one/im_probes usr/lib/one/tm_commands/nfs usr/lib/one/tm_commands/ssh usr/lib/one/tm_commands/dummy etc/one/vmm_ec2 etc/one/im_ec2 etc/one/tm_nfs etc/one/tm_ssh etc/one/tm_dummy"
34 34

  
35 35
for d in $DIRS; do
36
    mkdir -p $DST_DIR$d
36
    mkdir -p $DST_DIR/$d
37 37
done
38 38

  
39 39
# --- Programs & Scripts---
40 40

  
41
inst_ln src/nebula/oned bin
42
inst_ln src/scheduler/mm_sched bin
41
inst_ln src/nebula/oned usr/bin
42
inst_ln src/scheduler/mm_sched usr/lib/one
43 43

  
44
inst_ln src/client/ruby/onevm bin
45
inst_ln src/client/ruby/onehost bin
46
inst_ln src/client/ruby/onevnet bin
44
inst_ln src/client/ruby/onevm usr/bin
45
inst_ln src/client/ruby/onehost usr/bin
46
inst_ln src/client/ruby/onevnet usr/bin
47 47

  
48
inst_ln share/scripts/madcommon.sh libexec
49
inst_ln share/scripts/one bin
48
inst_ln share/scripts/madcommon.sh usr/lib/one
49
inst_ln share/scripts/one usr/bin
50 50

  
51 51
# --- C/C++ OpenNebula API Library & Development files
52 52

  
53
inst_ln src/client/liboneapi.a lib/
54
inst_ln include/OneClient.h include/
53
inst_ln src/client/liboneapi.a usr/lib
54
inst_ln include/OneClient.h usr/include
55 55

  
56 56
# --- Ruby Libraries
57 57

  
58
inst_ln src/mad/ruby/one_mad.rb lib/ruby
59
inst_ln src/mad/ruby/one_ssh.rb lib/ruby
60
inst_ln src/mad/ruby/ThreadScheduler.rb lib/ruby
61

  
62
inst_ln src/client/ruby/one.rb lib/ruby
63
inst_ln src/client/ruby/client_utilities.rb lib/ruby
64
inst_ln src/client/ruby/command_parse.rb lib/ruby
58
inst_ln src/mad/ruby/one_mad.rb usr/lib/one/ruby
59
inst_ln src/mad/ruby/one_ssh.rb usr/lib/one/ruby
60
inst_ln src/mad/ruby/ThreadScheduler.rb usr/lib/one/ruby
61

  
62
inst_ln src/client/ruby/one.rb usr/lib/one/ruby
63
inst_ln src/client/ruby/client_utilities.rb usr/lib/one/ruby
64
inst_ln src/client/ruby/command_parse.rb usr/lib/one/ruby
65 65

  
66 66
# --- ONE configuration files ---
67 67

  
68
inst_cp share/etc/oned.conf etc
69
inst_cp share/etc/defaultrc etc
68
inst_cp share/etc/oned.conf etc/one
69
inst_cp share/etc/defaultrc etc/one
70 70

  
71 71
# --- XEN driver & configuration files ---
72 72

  
73
inst_ln src/vmm_mad/xen/one_vmm_xen.rb bin
74
inst_ln src/vmm_mad/xen/one_vmm_xen bin
73
inst_ln src/vmm_mad/xen/one_vmm_xen.rb usr/lib/one
74
inst_ln src/vmm_mad/xen/one_vmm_xen usr/bin
75 75

  
76
inst_ln src/im_mad/xen/xen.rb lib/im_probes
76
inst_ln src/im_mad/xen/xen.rb usr/lib/one/im_probes
77 77

  
78
inst_cp src/vmm_mad/xen/vmm_xenrc etc/vmm_xen
79
inst_cp src/vmm_mad/xen/vmm_xen.conf etc/vmm_xen
78
inst_cp src/vmm_mad/xen/vmm_xenrc etc/one/vmm_xen
79
inst_cp src/vmm_mad/xen/vmm_xen.conf etc/one/vmm_xen
80 80

  
81
inst_cp src/im_mad/xen/im_xenrc etc/im_xen
82
inst_cp src/im_mad/xen/im_xen.conf etc/im_xen
81
inst_cp src/im_mad/xen/im_xenrc etc/one/im_xen
82
inst_cp src/im_mad/xen/im_xen.conf etc/one/im_xen
83 83

  
84 84
# --- KVM driver & configuration files ---
85 85

  
86
inst_ln src/vmm_mad/kvm/one_vmm_kvm.rb bin
87
inst_ln src/vmm_mad/kvm/one_vmm_kvm bin
86
inst_ln src/vmm_mad/kvm/one_vmm_kvm.rb usr/lib/one
87
inst_ln src/vmm_mad/kvm/one_vmm_kvm usr/bin
88 88

  
89
inst_ln src/im_mad/kvm/kvm.rb lib/im_probes
89
inst_ln src/im_mad/kvm/kvm.rb usr/lib/one/im_probes
90 90

  
91
inst_cp src/vmm_mad/kvm/vmm_kvmrc etc/vmm_kvm
92
inst_cp src/vmm_mad/kvm/vmm_kvm.conf etc/vmm_kvm
91
inst_cp src/vmm_mad/kvm/vmm_kvmrc etc/one/vmm_kvm
92
inst_cp src/vmm_mad/kvm/vmm_kvm.conf etc/one/vmm_kvm
93 93

  
94
inst_cp src/im_mad/kvm/im_kvmrc etc/im_kvm
95
inst_cp src/im_mad/kvm/im_kvm.conf etc/im_kvm
94
inst_cp src/im_mad/kvm/im_kvmrc etc/one/im_kvm
95
inst_cp src/im_mad/kvm/im_kvm.conf etc/one/im_kvm
96 96

  
97 97
# --- EC2 driver & configuration files ---
98 98

  
99
inst_ln src/vmm_mad/ec2/one_vmm_ec2.rb bin
100
inst_ln src/vmm_mad/ec2/one_vmm_ec2 bin
99
inst_ln src/vmm_mad/ec2/one_vmm_ec2.rb usr/lib/one
100
inst_ln src/vmm_mad/ec2/one_vmm_ec2 usr/bin
101 101

  
102
inst_ln src/im_mad/ec2/one_im_ec2.rb bin
103
inst_ln src/im_mad/ec2/one_im_ec2 bin
102
inst_ln src/im_mad/ec2/one_im_ec2.rb usr/lib/one
103
inst_ln src/im_mad/ec2/one_im_ec2 usr/bin
104 104

  
105
inst_cp src/vmm_mad/ec2/vmm_ec2rc etc/vmm_ec2
106
inst_cp src/vmm_mad/ec2/vmm_ec2.conf etc/vmm_ec2
105
inst_cp src/vmm_mad/ec2/vmm_ec2rc etc/one/vmm_ec2
106
inst_cp src/vmm_mad/ec2/vmm_ec2.conf etc/one/vmm_ec2
107 107

  
108
inst_cp src/im_mad/ec2/im_ec2rc etc/im_ec2
109
inst_cp src/im_mad/ec2/im_ec2.conf etc/im_ec2
108
inst_cp src/im_mad/ec2/im_ec2rc etc/one/im_ec2
109
inst_cp src/im_mad/ec2/im_ec2.conf etc/one/im_ec2
110 110

  
111 111
# --- Information driver & probes ---
112 112

  
113
inst_ln src/im_mad/im_ssh/one_im_ssh.rb bin
114
inst_ln src/im_mad/im_ssh/one_im_ssh bin
113
inst_ln src/im_mad/im_ssh/one_im_ssh.rb usr/lib/one
114
inst_ln src/im_mad/im_ssh/one_im_ssh usr/bin
115 115

  
116
inst_ln src/im_mad/host_probes/architecture.sh lib/im_probes
117
inst_ln src/im_mad/host_probes/cpu.sh lib/im_probes
118
inst_ln src/im_mad/host_probes/name.sh lib/im_probes
116
inst_ln src/im_mad/host_probes/architecture.sh usr/lib/one/im_probes
117
inst_ln src/im_mad/host_probes/cpu.sh usr/lib/one/im_probes
118
inst_ln src/im_mad/host_probes/name.sh usr/lib/one/im_probes
119 119

  
120 120
# -- Transfer manager --
121 121

  
122
inst_ln src/tm_mad/one_tm               bin
123
inst_ln src/tm_mad/one_tm.rb            bin
122
inst_ln src/tm_mad/one_tm               usr/bin
123
inst_ln src/tm_mad/one_tm.rb            usr/lib/one
124 124

  
125
inst_ln src/tm_mad/TMScript.rb          lib/ruby
126
inst_ln src/tm_mad/tm_common.sh         libexec
125
inst_ln src/tm_mad/TMScript.rb          usr/lib/one/ruby
126
inst_ln src/tm_mad/tm_common.sh         usr/lib/one
127 127

  
128
inst_ln src/tm_mad/nfs/tm_nfs.conf      etc/tm_nfs
129
inst_ln src/tm_mad/nfs/tm_nfsrc         etc/tm_nfs
128
inst_ln src/tm_mad/nfs/tm_nfs.conf      etc/one/tm_nfs
129
inst_ln src/tm_mad/nfs/tm_nfsrc         etc/one/tm_nfs
130 130

  
131
inst_ln src/tm_mad/nfs/tm_clone.sh      lib/tm_commands/nfs
132
inst_ln src/tm_mad/nfs/tm_delete.sh     lib/tm_commands/nfs
133
inst_ln src/tm_mad/nfs/tm_ln.sh         lib/tm_commands/nfs
134
inst_ln src/tm_mad/nfs/tm_mkswap.sh     lib/tm_commands/nfs
135
inst_ln src/tm_mad/nfs/tm_mkimage.sh    lib/tm_commands/nfs
136
inst_ln src/tm_mad/nfs/tm_mv.sh         lib/tm_commands/nfs
137

  
138
inst_ln src/tm_mad/ssh/tm_ssh.conf      etc/tm_ssh
139
inst_ln src/tm_mad/ssh/tm_sshrc         etc/tm_ssh
140

  
141
inst_ln src/tm_mad/ssh/tm_clone.sh      lib/tm_commands/ssh
142
inst_ln src/tm_mad/ssh/tm_delete.sh     lib/tm_commands/ssh
143
inst_ln src/tm_mad/ssh/tm_ln.sh         lib/tm_commands/ssh
144
inst_ln src/tm_mad/ssh/tm_mkswap.sh     lib/tm_commands/ssh
145
inst_ln src/tm_mad/ssh/tm_mkimage.sh    lib/tm_commands/ssh
146
inst_ln src/tm_mad/ssh/tm_mv.sh         lib/tm_commands/ssh
131
inst_ln src/tm_mad/nfs/tm_clone.sh      usr/lib/one/tm_commands/nfs
132
inst_ln src/tm_mad/nfs/tm_delete.sh     usr/lib/one/tm_commands/nfs
133
inst_ln src/tm_mad/nfs/tm_ln.sh         usr/lib/one/tm_commands/nfs
134
inst_ln src/tm_mad/nfs/tm_mkswap.sh     usr/lib/one/tm_commands/nfs
135
inst_ln src/tm_mad/nfs/tm_mkimage.sh    usr/lib/one/tm_commands/nfs
136
inst_ln src/tm_mad/nfs/tm_mv.sh         usr/lib/one/tm_commands/nfs
137

  
138
inst_ln src/tm_mad/ssh/tm_ssh.conf      etc/one/tm_ssh
139
inst_ln src/tm_mad/ssh/tm_sshrc         etc/one/tm_ssh
140

  
141
inst_ln src/tm_mad/ssh/tm_clone.sh      usr/lib/one/tm_commands/ssh
142
inst_ln src/tm_mad/ssh/tm_delete.sh     usr/lib/one/tm_commands/ssh
143
inst_ln src/tm_mad/ssh/tm_ln.sh         usr/lib/one/tm_commands/ssh
144
inst_ln src/tm_mad/ssh/tm_mkswap.sh     usr/lib/one/tm_commands/ssh
145
inst_ln src/tm_mad/ssh/tm_mkimage.sh    usr/lib/one/tm_commands/ssh
146
inst_ln src/tm_mad/ssh/tm_mv.sh         usr/lib/one/tm_commands/ssh
147 147

  
148
inst_ln src/tm_mad/dummy/tm_dummy.conf  etc/tm_dummy
149
inst_ln src/tm_mad/dummy/tm_dummyrc     etc/tm_dummy
148
inst_ln src/tm_mad/dummy/tm_dummy.conf  etc/one/tm_dummy
149
inst_ln src/tm_mad/dummy/tm_dummyrc     etc/one/tm_dummy
150 150

  
151
inst_ln src/tm_mad/dummy/tm_dummy.sh    lib/tm_commands/dummy
151
inst_ln src/tm_mad/dummy/tm_dummy.sh    usr/lib/one/tm_commands/dummy
152 152

  
153 153

  
154 154
# --- Examples ---
155 155

  
156
inst_cp share/examples/vm.template      share/examples
157
inst_cp share/examples/vm.schema        share/examples
158
inst_cp share/examples/private.net      share/examples
159
inst_cp share/examples/public.net       share/examples
160

  
161
inst_cp share/examples/tm/tm_clone.sh   share/examples/tm
162
inst_cp share/examples/tm/tm_delete.sh  share/examples/tm
163
inst_cp share/examples/tm/tm_ln.sh      share/examples/tm
164
inst_cp share/examples/tm/tm_mkimage.sh share/examples/tm
165
inst_cp share/examples/tm/tm_mkswap.sh  share/examples/tm
166
inst_cp share/examples/tm/tm_mv.sh      share/examples/tm
156
inst_cp share/examples/vm.template      usr/share/doc/opennebula/examples
157
inst_cp share/examples/vm.schema        usr/share/doc/opennebula/examples
158
inst_cp share/examples/private.net      usr/share/doc/opennebula/examples
159
inst_cp share/examples/public.net       usr/share/doc/opennebula/examples
160

  
161
inst_cp share/examples/tm/tm_clone.sh   usr/share/doc/opennebula/examples/tm
162
inst_cp share/examples/tm/tm_delete.sh  usr/share/doc/opennebula/examples/tm
163
inst_cp share/examples/tm/tm_ln.sh      usr/share/doc/opennebula/examples/tm
164
inst_cp share/examples/tm/tm_mkimage.sh usr/share/doc/opennebula/examples/tm
165
inst_cp share/examples/tm/tm_mkswap.sh  usr/share/doc/opennebula/examples/tm
166
inst_cp share/examples/tm/tm_mv.sh      usr/share/doc/opennebula/examples/tm
one-1.1.80/include/NebulaTemplate.h 2008-12-22 23:56:17.681754758 +0100
25 25
{    
26 26
public:
27 27

  
28
    NebulaTemplate(string& nebula_location);
28
    NebulaTemplate();
29 29
    
30 30
    ~NebulaTemplate(){};
31 31

  
one-1.1.80/include/VirtualMachine.h 2008-12-22 23:56:17.685725654 +0100
252 252

  
253 253
    /**
254 254
     *  Returns the transfer filename. The transfer file is in the form: 
255
     *  		$ONE_LOCATION/var/$VM_ID/transfer.$SEQ
255
     *  		/var/lib/one/$VM_ID/transfer.$SEQ
256 256
     *  The hasHistory() function MUST be called before this one.
257 257
     *    @return the transfer filename
258 258
     */ 
......
263 263

  
264 264
    /**
265 265
     *  Returns the deployment filename. The deployment file is in the form:
266
     *  		$ONE_LOCATION/var/$VM_ID/deployment.$SEQ 
266
     *  		/var/lib/one/$VM_ID/deployment.$SEQ 
267 267
     *  The hasHistory() function MUST be called before this one.
268 268
     *    @return the deployment filename
269 269
     */ 
......
308 308
    
309 309
    /**
310 310
     *  Returns the local VM directory. The VM local dir is in the form: 
311
     *  		$ONE_LOCATION/var/$VM_ID/  
311
     *  		/var/lib/one/$VM_ID/  
312 312
     *  The hasHistory() function MUST be called before this one.
313 313
     *    @return the remote directory
314 314
     */ 
......
729 729

  
730 730
    /**
731 731
     *  Log class for the virtual machine, it writes log messages in
732
     *  $ONE_LOCATION/var/$VID/vm.log
732
     *  /var/log/one/$VID.log
733 733
     */
734 734
    Log *       _log;
735 735
    
one-1.1.80/share/etc/defaultrc 2008-12-22 23:56:17.725724382 +0100
29 29
#-------------------------------------------------------------------------------
30 30

  
31 31
# Debug for MADs. 
32
# If set, MADs will generate cores and logs in $ONE_LOCATION/var. 
32
# If set, MADs will generate cores and logs in /var/lib/one. 
33 33
# Possible values are [0=ERROR, 1=DEBUG]
34 34
ONE_MAD_DEBUG=
35 35

  
one-1.1.80/share/etc/oned.conf 2008-12-22 23:59:23.714725779 +0100
48 48
# You can add more information managers with different configurations but make 
49 49
# sure it has different names.
50 50
#   name      : name for this information manager
51
#   executable: path of the virtual machine manager executable, can be an 
52
#               absolute path or a relative path from $ONE_LOCATION
51
#   executable: absolute path of the virtual machine manager executable
53 52
#   arguments : for the driver executable
54 53
#   default   : default values and configuration parameters for the driver
55 54
#-------------------------------------------------------------------------------
56 55

  
57 56
IM_MAD = [
58 57
    name       = "im_xen",
59
    executable = "bin/one_im_ssh",
60
    arguments  = "etc/im_xen/im_xen.conf",
61
    default    = "etc/im_xen/im_xen.conf" ]
58
    executable = "/usr/bin/one_im_ssh",
59
    arguments  = "/etc/one/im_xen/im_xen.conf",
60
    default    = "/etc/one/im_xen/im_xen.conf" ]
62 61

  
63 62
#-------------------------------------------------------------------------------
64 63
#  KVM Information Driver Manager sample configuration
65 64
#-------------------------------------------------------------------------------
66 65
#  IM_MAD = [
67 66
#      name       = "im_kvm",
68
#      executable = "bin/one_im_ssh",
69
#      arguments  = "etc/im_kvm/im_kvm.conf",
70
#      default    = "etc/im_kvm/im_kvm.conf" ]
67
#      executable = "/usr/bin/one_im_ssh",
68
#      arguments  = "/etc/one/im_kvm/im_kvm.conf",
69
#      default    = "/etc/one/im_kvm/im_kvm.conf" ]
71 70
#-------------------------------------------------------------------------------
72 71

  
73 72
#-------------------------------------------------------------------------------
......
75 74
#-------------------------------------------------------------------------------
76 75
#  IM_MAD = [
77 76
#      name       = "im_ec2",
78
#      executable = "bin/one_im_ec2",
79
#      arguments  = "etc/im_ec2/im_ec2.conf",
80
#      default    = "etc/im_ec2/im_ec2.conf" ]
77
#      executable = "/usr/bin/one_im_ec2",
78
#      arguments  = "/etc/one/im_ec2/im_ec2.conf",
79
#      default    = "/etc/one/im_ec2/im_ec2.conf" ]
81 80
#-------------------------------------------------------------------------------
82 81

  
83 82
#-------------------------------------------------------------------------------
......
86 85
# You can add more virtualization managers with different configurations but 
87 86
# make sure it has different names.
88 87
#   name      : name of the virtual machine manager driver
89
#   executable: path of the virtual machine manager executable, can be an 
90
#               absolute path or a relative path from $ONE_LOCATION
88
#   executable: absolute path of the virtual machine manager executable
91 89
#   arguments : for the driver executable
92 90
#   default   : default values and configuration parameters for the driver
93 91
#   type      : driver type, supported drivers: xen, kvm, ec2
......
95 93

  
96 94
VM_MAD = [
97 95
    name       = "vmm_xen",
98
    executable = "bin/one_vmm_xen",
99
    default    = "etc/vmm_xen/vmm_xen.conf",
96
    executable = "/usr/bin/one_vmm_xen",
97
    default    = "/etc/one/vmm_xen/vmm_xen.conf",
100 98
    type       = "xen" ]
101 99

  
102 100
#-------------------------------------------------------------------------------
......
104 102
#-------------------------------------------------------------------------------
105 103
#	VM_MAD = [
106 104
#      name       = "vmm_kvm",
107
#      executable = "bin/one_vmm_kvm",
108
#      default    = "etc/vmm_kvm/vmm_kvm.conf",
105
#      executable = "/usr/bin/one_vmm_kvm",
106
#      default    = "/etc/one/vmm_kvm/vmm_kvm.conf",
109 107
#      type       = "kvm" ]
110 108
#-------------------------------------------------------------------------------
111 109

  
......
114 112
#-------------------------------------------------------------------------------
115 113
# 	VM_MAD = [
116 114
#      name       = "vmm_ec2",
117
#      executable = "bin/one_vmm_ec2",
118
#      default    = "etc/vmm_ec2/vmm_ec2.conf",
115
#      executable = "/usr/bin/one_vmm_ec2",
116
#      default    = "/etc/one/vmm_ec2/vmm_ec2.conf",
119 117
#      type       = "ec2" ]
120 118
#-------------------------------------------------------------------------------
121 119

  
......
126 124
# You can add more transfer managers with different configurations but make 
127 125
# sure it has different names.
128 126
#   name      : name for this transfer manager
129
#   executable: path of the transfer manager executable, can be an 
130
#               absolute path or a relative path from $ONE_LOCATION
127
#   executable: absolute path of the transfer manager executable
131 128
#   arguments : for the driver executable
132 129
#   default   : default values and configuration parameters for the driver
133 130
#-------------------------------------------------------------------------------
134 131

  
135 132
TM_MAD = [
136 133
    name       = "tm_ssh",
137
    executable = "bin/one_tm",
138
    arguments  = "etc/tm_ssh/tm_ssh.conf",
139
    default    = "etc/tm_ssh/tm_ssh.conf" ]
134
    executable = "/usr/bin/one_tm",
135
    arguments  = "/etc/one/tm_ssh/tm_ssh.conf",
136
    default    = "/etc/one/tm_ssh/tm_ssh.conf" ]
140 137

  
141 138
#-------------------------------------------------------------------------------
142 139
# NFS Transfer Manager Driver sample configuration
143 140
#-------------------------------------------------------------------------------
144 141
#  TM_MAD = [
145 142
#      name       = "tm_nfs",
146
#      executable = "bin/one_tm",
147
#      arguments  = "etc/tm_nfs/tm_nfs.conf",
148
#      default    = "etc/tm_nfs/tm_nfs.conf" ]
143
#      executable = "/usr/bin/one_tm",
144
#      arguments  = "/etc/one/tm_nfs/tm_nfs.conf",
145
#      default    = "/etc/one/tm_nfs/tm_nfs.conf" ]
149 146
#-------------------------------------------------------------------------------
150 147

  
151 148
#-------------------------------------------------------------------------------
......
153 150
#-------------------------------------------------------------------------------
154 151
#  TM_MAD = [
155 152
#      name       = "tm_dummy",
156
#      executable = "bin/one_tm",
157
#      arguments  = "etc/tm_dummy/tm_dummy.conf",
158
#      default    = "etc/tm_dummy/tm_dummy.conf" ]
153
#      executable = "/usr/bin/one_tm",
154
#      arguments  = "/etc/one/tm_dummy/tm_dummy.conf",
155
#      default    = "/etc/one/tm_dummy/tm_dummy.conf" ]
159 156
#-------------------------------------------------------------------------------
one-1.1.80/share/examples/tm/tm_clone.sh 2008-12-22 23:56:17.769757772 +0100
3 3
SRC=$1
4 4
DST=$2
5 5

  
6
. $ONE_LOCATION/libexec/tm_common.sh
6
. /usr/lib/one/tm_common.sh
7 7

  
8 8
SRC_PATH=`arg_path $SRC`
9 9
DST_PATH=`arg_path $DST`
one-1.1.80/share/examples/tm/tm_delete.sh 2008-12-22 23:56:17.769757772 +0100
3 3
SRC=$1
4 4
DST=$2
5 5

  
6
. $ONE_LOCATION/libexec/tm_common.sh
6
. /usr/lib/one/tm_common.sh
7 7

  
8 8
SRC_PATH=`arg_path $SRC`
9 9
SRC_HOST=`arg_host $SRC`
one-1.1.80/share/examples/tm/tm_ln.sh 2008-12-22 23:56:17.769757772 +0100
3 3
SRC=$1
4 4
DST=$2
5 5

  
6
. $ONE_LOCATION/libexec/tm_common.sh
6
. /usr/lib/one/tm_common.sh
7 7

  
8 8
SRC_PATH=`arg_path $SRC`
9 9
DST_PATH=`arg_path $DST`
one-1.1.80/share/examples/tm/tm_mkimage.sh 2008-12-22 23:56:17.773726992 +0100
1 1
#!/bin/bash
2 2

  
3
. $ONE_LOCATION/libexec/tm_common.sh
3
. /usr/lib/one/tm_common.sh
4 4

  
5 5
log "mkimage placeholder"
one-1.1.80/share/examples/tm/tm_mkswap.sh 2008-12-22 23:56:17.773726992 +0100
3 3
SIZE=$1
4 4
DST=$2
5 5

  
6
. $ONE_LOCATION/libexec/tm_common.sh
6
. /usr/lib/one/tm_common.sh
7 7

  
8 8
DST_PATH=`arg_path $DST`
9 9
DST_HOST=`arg_host $DST`
one-1.1.80/share/examples/tm/tm_mv.sh 2008-12-22 23:56:17.773726992 +0100
3 3
SRC=$1
4 4
DST=$2
5 5

  
6
. $ONE_LOCATION/libexec/tm_common.sh
6
. /usr/lib/one/tm_common.sh
7 7

  
8 8
SRC_PATH=`arg_path $SRC`
9 9
DST_PATH=`arg_path $DST`
......
13 13
    log "Will not move, source and destination are equal"
14 14
else
15 15
    # Is saving a disk image?
16
    echo "$DST_PATH" | egrep -e "^$ONE_LOCATION/var/.+/disk\..+$"
16
    echo "$DST_PATH" | egrep -e "^/var/lib/one/.+/disk\..+$"
17 17
    if [ "x$?" == "x0" ]; then
18 18
        log "Moving $SRC_PATH"
19 19
        exec_and_log "ssh $DST_HOST mv $SRC_PATH $DST_PATH"
one-1.1.80/share/scripts/madcommon.sh 2008-12-22 23:56:17.793775071 +0100
45 45
    fi
46 46

  
47 47
    if [ -n "${ONE_MAD_DEBUG}" ]; then
48
        exec nice -n $PRIORITY bin/$MAD_FILE.rb $* 2>> var/$LOG_FILE.log
48
        exec nice -n $PRIORITY /usr/lib/one/$MAD_FILE.rb $* 2>> /var/log/one/$LOG_FILE.log
49 49
    else
50
        exec nice -n $PRIORITY bin/$MAD_FILE.rb $* 2> /dev/null
50
        exec nice -n $PRIORITY /usr/lib/one/$MAD_FILE.rb $* 2> /dev/null
51 51
    fi
52 52
}
53 53

  
54 54

  
55 55
# Set global environment
56 56

  
57
export_rc_vars $ONE_LOCATION/etc/defaultrc
57
export_rc_vars /etc/one/defaultrc
58 58

  
59 59
# Sanitize PRIORITY variable
60 60
if [ -z "$PRIORITY" ]; then
one-1.1.80/share/scripts/one 2008-12-22 23:56:17.793775071 +0100
1 1
#! /bin/sh
2 2

  
3
if [ -z "$ONE_LOCATION" ]; then 
4
	echo "ONE_LOCATION is not defined"
5
	exit 1
6
fi 
7

  
8
ONE_PID=$ONE_LOCATION/var/oned.pid
9
ONE_SCHEDPID=$ONE_LOCATION/var/sched.pid
10
ONE_CONF=$ONE_LOCATION/etc/oned.conf
3
ONE_PID=/var/run/one/oned.pid
4
ONE_SCHEDPID=/var/run/one/sched.pid
5
ONE_CONF=/etc/one/oned.conf
11 6

  
12
ONED=$ONE_LOCATION/bin/oned
13
ONE_SCHEDULER=$ONE_LOCATION/bin/mm_sched
7
ONED=/usr/bin/oned
8
ONE_SCHEDULER=/usr/lib/one/mm_sched
14 9

  
15 10
setup()
16 11
{
......
21 16
		exit 1
22 17
	fi
23 18
	
24
	if [ -f $ONE_LOCATION/var/.lock ]; then
19
	if [ -f /var/lock/one ]; then
25 20
		if [ -f  $ONE_PID ]; then
26 21
			ONEPID=`cat $ONE_PID`
27 22
			ps $ONEPID &> /dev/null
......
39 34
			fi
40 35
		fi
41 36
		echo "Stale .lock detected. Erasing it."
42
		rm $ONE_LOCATION/var/.lock   
37
		rm /var/lock/one
43 38
	fi
44 39
}
45 40

  
one-1.1.80/src/client/ruby/one.rb 2008-12-22 23:56:17.793775071 +0100
30 30
    # DATABASE DEFINITIONS #
31 31
    ########################
32 32
    
33
    ONE_LOCATION=ENV["ONE_LOCATION"]
34
    
35 33
    TABLES={
36 34
        "vm_pool" => %w{oid uid last_poll template_id state lcm_state 
37 35
            stime etime deploy_id memory cpu net_tx net_rx},
......
95 93
    class Database
96 94
        attr_reader :db
97 95
        
98
        def initialize(file=ONE_LOCATION+"/var/one.db")
96
        def initialize(file="/var/lib/one/one.db")
99 97
            @db=SQLite3::Database.new(file)
100 98
            @db.busy_timeout(5000)
101 99
            
one-1.1.80/src/client/ruby/onehost 2008-12-22 23:58:10.670756154 +0100
19 19

  
20 20

  
21 21

  
22
ONE_LOCATION=ENV["ONE_LOCATION"]
23

  
24
if !ONE_LOCATION
25
    puts "ONE_LOCATION not set"
26
    exit -1
27
end
28

  
29
$: << ONE_LOCATION+"/lib/ruby"
22
$: << "/usr/lib/one/ruby"
30 23

  
31 24
require 'one'
32 25
require 'client_utilities'
one-1.1.80/src/client/ruby/onevm 2008-12-22 23:56:17.797726062 +0100
18 18
#--------------------------------------------------------------------------- #
19 19

  
20 20

  
21
ONE_LOCATION=ENV["ONE_LOCATION"]
22

  
23
if !ONE_LOCATION
24
    puts "ONE_LOCATION not set"
25
    exit -1
26
end
27

  
28
$: << ONE_LOCATION+"/lib/ruby"
21
$: << "/usr/lib/one/ruby"
29 22

  
30 23
require 'one'
31 24
require 'client_utilities'
one-1.1.80/src/client/ruby/onevnet 2008-12-22 23:56:17.797726062 +0100
19 19

  
20 20

  
21 21

  
22
ONE_LOCATION=ENV["ONE_LOCATION"]
23

  
24
if !ONE_LOCATION
25
    puts "ONE_LOCATION not set"
26
    exit -1
27
end
28

  
29
$: << ONE_LOCATION+"/lib/ruby"
22
$: << "/usr/lib/one/ruby"
30 23

  
31 24
require 'one'
32 25
require 'client_utilities'
one-1.1.80/src/im_mad/ec2/one_im_ec2 2008-12-22 23:56:17.797726062 +0100
1 1
#!/bin/bash
2 2

  
3
if [ -z "${ONE_LOCATION}" ]; then
4
    echo "Please, set ONE_LOCATION variable."
5
    exit -1
6
fi
7

  
8
. $ONE_LOCATION/libexec/madcommon.sh
3
. /usr/lib/one/madcommon.sh
9 4

  
10 5
# Export the vmm_mad specific rc
11
export_rc_vars $ONE_LOCATION/etc/im_ec2/im_ec2rc
6
export_rc_vars /etc/one/im_ec2/im_ec2rc
12 7

  
13 8
# Export max instance type usages
14
export_rc_vars $ONE_LOCATION/etc/im_ec2/im_ec2.conf
15

  
16
# Go to ONE_LOCATION
17
cd $ONE_LOCATION
9
export_rc_vars /etc/one/im_ec2/im_ec2.conf
18 10

  
19 11
# Execute the actual MAD
20 12
execute_mad $*
one-1.1.80/src/im_mad/ec2/one_im_ec2.rb 2008-12-22 23:56:17.797726062 +0100
1 1
#!/usr/bin/env ruby
2 2

  
3
ONE_LOCATION=ENV["ONE_LOCATION"]
4

  
5
if !ONE_LOCATION
6
    puts "ONE_LOCATION not set"
7
    exit -1
8
end
9

  
10
$: << ONE_LOCATION+"/lib/ruby"
3
$: << "/usr/lib/one/ruby"
11 4

  
12 5
require 'pp'
13 6
require 'one_mad'
one-1.1.80/src/im_mad/im_ssh/one_im_ssh 2008-12-22 23:56:17.801726570 +0100
1 1
#!/bin/bash
2 2

  
3
if [ -z "${ONE_LOCATION}" ]; then
4
    echo "Please, set ONE_LOCATION variable."
5
    exit -1
6
fi
7

  
8
. $ONE_LOCATION/libexec/madcommon.sh
3
. /usr/lib/one/madcommon.sh
9 4

  
10 5
# Export the im_mad specific rc
11 6

  
12 7
DRIVER_NAME=`basename $1 | cut -d. -f1`
13 8

  
14
export_rc_vars $ONE_LOCATION/etc/${DRIVER_NAME}/${DRIVER_NAME}rc
9
export_rc_vars /etc/one/${DRIVER_NAME}/${DRIVER_NAME}rc
15 10

  
16 11
# Go to ONE_LOCATION
17

  
18
cd $ONE_LOCATION
19

  
20 12
LOG_FILE=$DRIVER_NAME
21 13

  
22 14
# Execute the actual MAD
one-1.1.80/src/im_mad/im_ssh/one_im_ssh.rb 2008-12-22 23:56:17.801726570 +0100
1 1
#!/usr/bin/env ruby
2 2

  
3
ONE_LOCATION=ENV["ONE_LOCATION"]
4

  
5
if !ONE_LOCATION
6
    puts "ONE_LOCATION not set"
7
    exit(-1)
8
end
9

  
10
$: << ONE_LOCATION+"/lib/ruby"
3
$: << "/usr/lib/one/ruby"
11 4

  
12 5
require 'pp'
13 6

  
......
168 161
            (name, script)=l.split("=")
169 162
            name.strip!
170 163
            script.strip!
171
            script=ONE_LOCATION+"/"+script if script[0] != ?/
164
            script="/usr/"+script if script[0] != ?/
172 165
            self<<Sensor.new(name, script)
173 166
        else
174 167
            STDERR.puts "Malformed line in configuration file: " + line
......
262 255
    exit(-1)
263 256
end
264 257

  
265
im_conf=ONE_LOCATION+"/"+im_conf if im_conf[0] != ?/
258
im_conf="/etc/one/"+im_conf if im_conf[0] != ?/
266 259
sensors.load_sensors(im_conf)
267 260

  
268 261
im=IM.new(sensors)
one-1.1.80/src/mad/Mad.cc 2008-12-22 23:56:17.801726570 +0100
110 110
    {
111 111
        if ( it->second.empty() == false )
112 112
        {
113
            if (it->second[0] != '/') //Look in ONE_LOCATION
113
            if (it->second[0] != '/') // Look in /
114 114
            {
115 115
                Nebula& nd = Nebula::instance();
116 116
                                
117
                exec_path = nd.get_nebula_location() + "/" + it->second;
117
                exec_path = "/" + it->second;
118 118
                executable= exec_path.c_str();
119 119
            }
120 120
            else //Absolute Path
one-1.1.80/src/mad/ruby/one_mad.rb 2008-12-22 23:56:17.801726570 +0100
151 151
    def get_local_deployment_file(remote_deployment_file)
152 152
        local_deployment_file=nil
153 153

  
154
        one_location=ENV["ONE_LOCATION"]
155 154
        m=remote_deployment_file.match(/.*?\/(\d+)\/images\/(deployment.\d+)$/)
156
        local_deployment_file="#{one_location}/var/#{m[1]}/#{m[2]}" if m
155
        local_deployment_file="/var/lib/one/#{m[1]}/#{m[2]}" if m
157 156

  
158 157
        return local_deployment_file
159 158
    end
one-1.1.80/src/nebula/Nebula.cc 2008-12-22 23:56:17.801726570 +0100
36 36
void Nebula::start()
37 37
{
38 38
    int                 rc;
39
    const char *        nl;
40 39
    int                 fd;
41 40
    sigset_t            mask;
42 41
    int                 signal;
......
45 44
    const SingleAttribute *     sattr;
46 45
    vector<const Attribute *>   attr;
47 46
    
48
    nl = getenv("ONE_LOCATION");
49

  
50
    if (nl == 0)
51
    {
52
        throw runtime_error("Environment variable ONE_LOCATION not defined");
53
    }
54
    
55
    nebula_location = nl;
56
    
57 47
    if ( gethostname(hn,79) != 0 )
58 48
    {
59 49
    	throw runtime_error("Error getting hostname");
......
65 55
    // Configuration 
66 56
    // ----------------------------------------------------------- 
67 57

  
68
    nebula_configuration = new NebulaTemplate(nebula_location);
58
    nebula_configuration = new NebulaTemplate();
69 59
    
70 60
    rc = nebula_configuration->load_configuration();
71 61
    
......
84 74
    {
85 75
        string log_fname;
86 76
        int    log_level_int;        
87
        log_fname = nebula_location + "/var/oned.log";
77
        log_fname = "/var/log/one/oned.log";
88 78
        Log::MessageType   clevel = Log::ERROR;
89 79
        
90 80
        nebula_configuration->get("DEBUG_LEVEL", log_level_int);
......
140 130

  
141 131
    try
142 132
    {
143
        string db_name = nebula_location + "/var/one.db";
133
        string db_name = "/var/lib/one/one.db";
144 134
        
145 135
        db = new SqliteDB(db_name,Nebula::log);
146 136
    }
......
350 340
            hpool,
351 341
            vnpool,
352 342
            rm_port,
353
            nebula_location + "/var/one_xmlrpc.log");
343
            "/var/log/one/one_xmlrpc.log");
354 344
    }
355 345
    catch (bad_alloc&)
356 346
    {
one-1.1.80/src/nebula/NebulaTemplate.cc 2008-12-22 23:56:17.805725612 +0100
28 28
/* -------------------------------------------------------------------------- */
29 29
/* -------------------------------------------------------------------------- */
30 30

  
31
NebulaTemplate::NebulaTemplate(string& nebula_location)
31
NebulaTemplate::NebulaTemplate()
32 32
{
33 33
    ostringstream       os;
34 34
    SingleAttribute *   attribute;
35 35
    string              value;
36 36
        
37
    conf_file  = nebula_location + "/etc/";
37
    conf_file  = "/etc/one/";
38 38
    conf_file += conf_name;
39 39
            
40 40
    // POLL_INTERVAL
......
62 62
    conf_default.insert(make_pair(attribute->name(),attribute));
63 63
       
64 64
    //VM_DIR    
65
    value = nebula_location + "/var";
65
    value = "/var/lib/one";
66 66
    
67 67
    attribute = new SingleAttribute("VM_DIR",value);
68 68
    conf_default.insert(make_pair(attribute->name(),attribute));
one-1.1.80/src/nebula/oned.cc 2008-12-22 23:56:17.805725612 +0100
77 77
{
78 78
    char            opt;
79 79
    bool            foreground = false;
80
    const char *    nl;
81 80
    int             fd;
82 81
    pid_t           pid,sid;
83 82
    string          wd;
......
107 106
    //   Check if other oned is running  
108 107
    // --------------------------------- 
109 108
        
110
    nl = getenv("ONE_LOCATION");
111

  
112
    if (nl == 0)
113
    {
114
        cerr << "Error: ONE_LOCATION environment variable is undefined.\n";        
115
        exit(-1);
116
    }
117

  
118
    string lockfile(nl);
109
    string lockfile("/var/lock/one");
119 110
    
120
    lockfile += "/var/.lock";
121

  
122 111
    fd = open(lockfile.c_str(), O_CREAT|O_EXCL, 0640);
123 112

  
124 113
    if( fd == -1)
......
151 140
            
152 141

  
153 142
        case 0: // Child process
154
            wd=nl;
155
            wd += "/var/";
143
            wd = "/var/";
156 144
            rc  = chdir(wd.c_str());
157 145
                        
158 146
            if (rc != 0)
one-1.1.80/src/scheduler/Scheduler.cc 2008-12-22 23:56:17.805725612 +0100
63 63
{
64 64
    int             rc;
65 65

  
66
    string          nebula_location;
67
    const char *    nl;
68

  
69 66
    pthread_attr_t    pattr;
70 67

  
71
    nl = getenv("ONE_LOCATION");
72

  
73
    if (nl == 0)
74
    {
75
        throw runtime_error("Environment variable ONE_LOCATION not defined");
76
    }
77

  
78
    nebula_location = nl;
79

  
80 68
    // -----------------------------------------------------------
81 69
    // Log system
82 70
    // -----------------------------------------------------------
......
85 73
    {
86 74
        string log_fname;
87 75

  
88
        log_fname = nebula_location + "/var/sched.log";
76
        log_fname = "/var/log/one/sched.log";
89 77

  
90 78
        Scheduler::log("SCHED",
91 79
                        Log::INFO,
......
103 91

  
104 92
    try
105 93
    {
106
        string db_name = nebula_location + "/var/one.db";
94
        string db_name = "/var/lib/one/one.db";
107 95
        
108 96
        db = new SqliteDB(db_name,Scheduler::log);
109 97
    }
......
114 102

  
115 103
    try
116 104
    {
117
        string db_name = nebula_location + "/var/one.db";
105
        string db_name = "/var/lib/one/one.db";
118 106
        
119 107
        hpool  = new SchedulerHostPool(db);
120 108
        vmpool = new SchedulerVirtualMachinePool(db);
one-1.1.80/src/tm/TransferManagerDriver.cc 2008-12-22 23:56:17.805725612 +0100
37 37
            
38 38
    if ( it != attrs.end() )
39 39
    {        	        	
40
       	if (it->second[0] != '/') //Look in ONE_LOCATION
40
       	if (it->second[0] != '/') //Look in /
41 41
        {
42 42
      		Nebula& nd = Nebula::instance();
43 43
                                    
44
            file  = nd.get_nebula_location() + "/" + it->second;
44
            file  = "/" + it->second;
45 45
            cfile = file.c_str();
46 46
        }
47 47
        else //Absolute Path
one-1.1.80/src/tm_mad/TMScript.rb 2008-12-22 23:56:17.805725612 +0100
92 92
            return
93 93
        end
94 94
        
95
        one_location=ENV['ONE_LOCATION']
95
        one_location="/"
96 96
        
97 97
        scripts_text.each_line {|line|
98 98
            case line
one-1.1.80/src/tm_mad/nfs/tm_clone.sh 2008-12-22 23:56:17.809725422 +0100
3 3
SRC=$1
4 4
DST=$2
5 5

  
6
. $ONE_LOCATION/libexec/tm_common.sh
6
. /usr/lib/one/tm_common.sh
7 7

  
8 8
SRC_PATH=`arg_path $SRC`
9 9
DST_PATH=`arg_path $DST`
one-1.1.80/src/tm_mad/nfs/tm_delete.sh 2008-12-22 23:56:17.809725422 +0100
3 3
SRC=$1
4 4
DST=$2
5 5

  
6
. $ONE_LOCATION/libexec/tm_common.sh
6
. /usr/lib/one/tm_common.sh
7 7

  
8 8
SRC_PATH=`arg_path $SRC`
9 9

  
one-1.1.80/src/tm_mad/nfs/tm_ln.sh 2008-12-22 23:56:17.809725422 +0100
3 3
SRC=$1
4 4
DST=$2
5 5

  
6
. $ONE_LOCATION/libexec/tm_common.sh
6
. /usr/lib/one/tm_common.sh
7 7

  
8 8
SRC_PATH=`arg_path $SRC`
9 9
DST_PATH=`arg_path $DST`
one-1.1.80/src/tm_mad/nfs/tm_mkimage.sh 2008-12-22 23:56:17.809725422 +0100
1 1
#!/bin/bash
2 2

  
3
. $ONE_LOCATION/libexec/tm_common.sh
3
. /usr/lib/one/tm_common.sh
4 4

  
5 5
log "mkimage placeholder"
one-1.1.80/src/tm_mad/nfs/tm_mkswap.sh 2008-12-22 23:56:17.809725422 +0100
3 3
SIZE=$1
4 4
DST=$2
5 5

  
6
. $ONE_LOCATION/libexec/tm_common.sh
6
. /usr/lib/one/tm_common.sh
7 7

  
8 8
DST_PATH=`arg_path $DST`
9 9

  
one-1.1.80/src/tm_mad/nfs/tm_mv.sh 2008-12-22 23:56:17.809725422 +0100
3 3
SRC=$1
4 4
DST=$2
5 5

  
6
. $ONE_LOCATION/libexec/tm_common.sh
6
. /usr/lib/one/tm_common.sh
7 7

  
8 8
SRC_PATH=`arg_path $SRC`
9 9
DST_PATH=`arg_path $DST`
......
12 12
    log "Will not move, source and destination are equal"
13 13
else
14 14
    # Is saving a disk image?
15
    echo "$DST_PATH" | egrep -e "^$ONE_LOCATION/var/.+/disk\..+$"
15
    echo "$DST_PATH" | egrep -e "^/var/lib/one/.+/disk\..+$"
16 16
    if [ "x$?" == "x0" ]; then
17 17
        log "Moving $SRC_PATH"
18 18
        exec_and_log "mv $SRC_PATH $DST_PATH"
one-1.1.80/src/tm_mad/one_tm 2008-12-22 23:56:17.809725422 +0100
1 1
#!/bin/bash
2 2

  
3
if [ -z "${ONE_LOCATION}" ]; then
4
    echo "Please, set ONE_LOCATION variable."
5
    exit -1
6
fi
7

  
8
. $ONE_LOCATION/libexec/madcommon.sh
3
. /usr/lib/one/madcommon.sh
9 4

  
10 5
# Export the im_mad specific rc
11 6

  
12 7
DRIVER_NAME=`basename $1 | cut -d. -f1`
13 8

  
14
export_rc_vars $ONE_LOCATION/etc/${DRIVER_NAME}/${DRIVER_NAME}rc
9
export_rc_vars /etc/one/${DRIVER_NAME}/${DRIVER_NAME}rc
15 10

  
16 11
# Go to ONE_LOCATION
17 12

  
18
cd $ONE_LOCATION
19

  
20 13
LOG_FILE=$DRIVER_NAME
21 14

  
22 15
# Execute the actual MAD
one-1.1.80/src/tm_mad/one_tm.rb 2008-12-22 23:56:17.813726000 +0100
1 1
#!/usr/bin/env ruby
2 2

  
3
ONE_LOCATION=ENV["ONE_LOCATION"]
4

  
5
if !ONE_LOCATION
6
    puts "ONE_LOCATION not set"
7
    exit(-1)
8
end
9

  
10
$: << ONE_LOCATION+"/lib/ruby"
3
$: << "/usr/lib/one/ruby"
11 4

  
12 5
require 'pp'
13 6
require 'one_mad'
......
73 66
    exit(-1)
74 67
end
75 68

  
76
tm_conf=ONE_LOCATION+"/"+tm_conf if tm_conf[0] != ?/
69
tm_conf="/etc/one/"+tm_conf if tm_conf[0] != ?/
77 70

  
78 71
plugin=TMPlugin.new(tm_conf)
79 72

  
one-1.1.80/src/tm_mad/ssh/tm_clone.sh 2008-12-22 23:56:17.813726000 +0100
3 3
SRC=$1
4 4
DST=$2
5 5

  
6
. $ONE_LOCATION/libexec/tm_common.sh
6
. /usr/lib/one/tm_common.sh
7 7

  
8 8
SRC_PATH=`arg_path $SRC`
9 9
DST_PATH=`arg_path $DST`
one-1.1.80/src/tm_mad/ssh/tm_delete.sh 2008-12-22 23:56:17.813726000 +0100
3 3
SRC=$1
4 4
DST=$2
5 5

  
6
. $ONE_LOCATION/libexec/tm_common.sh
6
. /usr/lib/one/tm_common.sh
7 7

  
8 8
SRC_PATH=`arg_path $SRC`
9 9
SRC_HOST=`arg_host $SRC`
one-1.1.80/src/tm_mad/ssh/tm_ln.sh 2008-12-22 23:56:17.813726000 +0100
3 3
SRC=$1
4 4
DST=$2
5 5

  
6
. $ONE_LOCATION/libexec/tm_common.sh
6
. /usr/lib/one/tm_common.sh
7 7

  
8 8
log "Link $SRC_PATH (non shared dir, will clone)"
9 9
#exec_and_log "ln -s $SRC_PATH $DST_PATH"
10
exec $ONE_LOCATION/lib/tm_commands/ssh/tm_clone.sh $SRC $DST
10
exec /usr/lib/one/tm_commands/ssh/tm_clone.sh $SRC $DST
11 11

  
one-1.1.80/src/tm_mad/ssh/tm_mkimage.sh 2008-12-22 23:56:17.813726000 +0100
1 1
#!/bin/bash
2 2

  
3
. $ONE_LOCATION/libexec/tm_common.sh
3
. /usr/lib/one/tm_common.sh
4 4

  
5 5
log "mkimage placeholder"
one-1.1.80/src/tm_mad/ssh/tm_mkswap.sh 2008-12-22 23:56:17.813726000 +0100
3 3
SIZE=$1
4 4
DST=$2
5 5

  
6
. $ONE_LOCATION/libexec/tm_common.sh
6
. /usr/lib/one/tm_common.sh
7 7

  
8 8
DST_PATH=`arg_path $DST`
9 9
DST_HOST=`arg_host $DST`
one-1.1.80/src/tm_mad/ssh/tm_mv.sh 2008-12-22 23:56:17.813726000 +0100
3 3
SRC=$1
4 4
DST=$2
5 5

  
6
. $ONE_LOCATION/libexec/tm_common.sh
6
. /usr/lib/one/tm_common.sh
7 7

  
8 8
SRC_PATH=`arg_path $SRC`
9 9
DST_PATH=`arg_path $DST`
one-1.1.80/src/vm/History.cc 2008-12-22 23:56:17.817725321 +0100
98 98
    
99 99
    // ----------- Local Locations ------------
100 100
    os.str("");
101
    os << nd.get_nebula_location() << "/var/" << oid; 
101
    os << "/var/lib/one/" << oid; 
102 102
    
103 103
    vm_lhome = os.str();
104 104
    
one-1.1.80/src/vm/VirtualMachine.cc 2008-12-22 23:56:17.817725321 +0100
217 217

  
218 218
    //Create Log support fo this VM
219 219
    
220
    nl = getenv("ONE_LOCATION");
221

  
222
    if (nl == 0)
223
    {
224
        goto error_env;  //no logging support for this VM
225
    }
226
        
227 220
    oss.str("");
228
    oss << nl << "/var/" << oid;
221
    oss << "/var/log/one/" << oid;
229 222
    
230 223
    mkdir(oss.str().c_str(), 0777);
231 224
    chmod(oss.str().c_str(), 0777);
......
245 238
    	goto error_log;
246 239
	}
247 240

  
248
    return 0;
241
    //Create support dir for this VM
242
    
243
    oss.str("");
244
    oss << "/var/lib/one/" << oid;
245
    
246
    mkdir(oss.str().c_str(), 0777);
247
    chmod(oss.str().c_str(), 0777);
248
       
249
	return 0;
249 250

  
250 251
error_log:
251 252
error_env:
one-1.1.80/src/vmm/VirtualMachineManagerDriver.cc 2008-12-22 23:56:17.817725321 +0100
37 37
            
38 38
    if ( it != attrs.end() )
39 39
    {        	        	
40
       	if (it->second[0] != '/') //Look in ONE_LOCATION
40
       	if (it->second[0] != '/') //Look in /
41 41
        {
42 42
      		Nebula& nd = Nebula::instance();
43 43
                                    
44
            file  = nd.get_nebula_location() + "/" + it->second;
44
            file  = "/" + it->second;
45 45
            cfile = file.c_str();
46 46
        }
47 47
        else //Absolute Path
one-1.1.80/src/vmm_mad/ec2/one_vmm_ec2 2008-12-22 23:56:17.817725321 +0100
1 1
#!/bin/bash
2 2

  
3
if [ -z "${ONE_LOCATION}" ]; then
4
    echo "Please, set ONE_LOCATION variable."
5
    exit -1
6
fi
7

  
8
. $ONE_LOCATION/libexec/madcommon.sh
3
. /usr/lib/one/madcommon.sh
9 4

  
10 5
# Export the vmm_mad specific rc
11
export_rc_vars $ONE_LOCATION/etc/vmm_ec2/vmm_ec2rc
12

  
13
# Go to ONE_LOCATION
14
cd $ONE_LOCATION
6
export_rc_vars /etc/one/vmm_ec2/vmm_ec2rc
15 7

  
16 8
# Execute the actual MAD
17 9
execute_mad 
one-1.1.80/src/vmm_mad/ec2/one_vmm_ec2.rb 2008-12-22 23:56:17.821725760 +0100
18 18

  
19 19
VMWARECMD="/usr/bin/"
20 20

  
21
ONE_LOCATION = ENV["ONE_LOCATION"]
22 21
EC2_LOCATION = ENV["EC2_HOME"]
23 22

  
24 23

  
25
if !ONE_LOCATION
26
        puts "ONE_LOCATION not set"
27
            exit -1
28
end
29

  
30 24
if !EC2_LOCATION
31 25
        puts "EC2_LOCATION not set"
32 26
            exit -1
33 27
end
34 28

  
35
$: << ONE_LOCATION+"/lib/ruby"
29
$: << "/usr/lib/one/ruby"
36 30

  
37 31

  
38 32
require 'pp'
one-1.1.80/src/vmm_mad/kvm/one_vmm_kvm 2008-12-22 23:56:17.821725760 +0100
1 1
#!/bin/bash
2 2

  
3
if [ -z "${ONE_LOCATION}" ]; then
4
    echo "Please, set ONE_LOCATION variable."
5
    exit -1
6
fi
7

  
8
. $ONE_LOCATION/libexec/madcommon.sh
3
. /usr/lib/one/madcommon.sh
9 4

  
10 5
# Export the vmm_mad specific rc
11
export_rc_vars $ONE_LOCATION/etc/vmm_kvm/vmm_kvmrc
12

  
13
# Go to ONE_LOCATION
14
cd $ONE_LOCATION
6
export_rc_vars /etc/one/vmm_kvm/vmm_kvmrc
15 7

  
16 8
# Execute the actual MAD
17
execute_mad $*
9
execute_mad $*
one-1.1.80/src/vmm_mad/kvm/one_vmm_kvm.rb 2008-12-22 23:56:17.821725760 +0100
1 1
#!/usr/bin/env ruby
2 2

  
3
ONE_LOCATION=ENV["ONE_LOCATION"]
4

  
5 3
DEBUG_LEVEL=ENV["ONE_MAD_DEBUG"]
6 4

  
7
if !ONE_LOCATION
8
    puts "ONE_LOCATION not set"
9
    exit -1
10
end
11

  
12
$: << ONE_LOCATION+"/lib/ruby"
5
$: << "/usr/lib/one/ruby"
13 6

  
14 7
require 'pp'
15 8

  
one-1.1.80/src/vmm_mad/xen/one_vmm_xen 2008-12-22 23:56:17.821725760 +0100
1 1
#!/bin/bash
2 2

  
3
if [ -z "${ONE_LOCATION}" ]; then
4
    echo "Please, set ONE_LOCATION variable."
5
    exit -1
6
fi
7

  
8
. $ONE_LOCATION/libexec/madcommon.sh
3
. /usr/lib/one/madcommon.sh
9 4

  
10 5
# Export the vmm_mad specific rc
11
export_rc_vars $ONE_LOCATION/etc/vmm_xen/vmm_xenrc
12

  
13
# Go to ONE_LOCATION
14
cd $ONE_LOCATION
6
export_rc_vars /etc/one/vmm_xen/vmm_xenrc
15 7

  
16 8
# Execute the actual MAD
17
execute_mad 
9
execute_mad 
one-1.1.80/src/vmm_mad/xen/one_vmm_xen.rb 2008-12-22 23:56:17.821725760 +0100
3 3
XENTOP_PATH=ENV["XENTOP_PATH"]
4 4
XM_PATH=ENV["XM_PATH"]
5 5

  
6
ONE_LOCATION=ENV["ONE_LOCATION"]
7

  
8 6
DEBUG_LEVEL=ENV["ONE_MAD_DEBUG"]
9 7

  
10
if !ONE_LOCATION
11
    puts "ONE_LOCATION not set"
12
    exit -1
13
end
14

  
15
$: << ONE_LOCATION+"/lib/ruby"
8
$: << "/usr/lib/one/ruby"
16 9

  
17 10
require 'pp'
18 11

  
one-1.1.80/src/im_mad/xen/im_xen.conf 2008-12-22 23:56:17.821725760 +0100
2 2
# Remote directory where scripts are written
3 3
REMOTE_DIR=/tmp/ne_im_scripts
4 4

  
5
cpuarchitecture=lib/im_probes/architecture.sh
6
nodename=lib/im_probes/name.sh
7
cpu=lib/im_probes/cpu.sh
8
xen=lib/im_probes/xen.rb
5
cpuarchitecture=/usr/lib/one/im_probes/architecture.sh
6
nodename=/usr/lib/one/im_probes/name.sh
7
cpu=/usr/lib/one/im_probes/cpu.sh
8
xen=/usr/lib/one/im_probes/xen.rb
one-1.1.80/src/tm_mad/dummy/tm_dummy.conf 2008-12-22 23:56:17.821725760 +0100
1
CLONE   = lib/tm_commands/dummy/tm_dummy.sh
2
LN      = lib/tm_commands/dummy/tm_dummy.sh
3
MKSWAP  = lib/tm_commands/dummy/tm_dummy.sh
4
MKIMAGE = lib/tm_commands/dummy/tm_dummy.sh
5
DELETE  = lib/tm_commands/dummy/tm_dummy.sh
6
MV      = lib/tm_commands/dummy/tm_dummy.sh
1
CLONE   = /usr/lib/one/tm_commands/dummy/tm_dummy.sh
2
LN      = /usr/lib/one/tm_commands/dummy/tm_dummy.sh
3
MKSWAP  = /usr/lib/one/tm_commands/dummy/tm_dummy.sh
4
MKIMAGE = /usr/lib/one/tm_commands/dummy/tm_dummy.sh
5
DELETE  = /usr/lib/one/tm_commands/dummy/tm_dummy.sh
6
MV      = /usr/lib/one/tm_commands/dummy/tm_dummy.sh
... This diff was truncated because it exceeds the maximum size that can be displayed.