1 --- vmware-distrib/bin/vmware 2005-03-23 05:54:18.000000000 -0600
2 +++ vmware-distrib.new/bin/vmware 2005-04-13 09:35:12.000000000 -0500
4 # the VMware software is installed. --hpreg
7 -# BEGINNING_OF_DB_DOT_SH
11 -# Manage an installer database
14 -# Add an answer to a database in memory
16 - local dbvar="$1" # IN/OUT
18 - local value="$3" # IN
22 - eval "$dbvar"'_answer_'"$id"'="$value"'
24 - eval 'answers="$'"$dbvar"'_answers"'
25 - # There is no double quote around $answers on purpose
26 - for i in $answers; do
27 - if [ "$i" = "$id" ]; then
31 - answers="$answers"' '"$id"
32 - eval "$dbvar"'_answers="$answers"'
35 -# Remove an answer from a database in memory
37 - local dbvar="$1" # IN/OUT
43 - eval 'unset '"$dbvar"'_answer_'"$id"
46 - eval 'answers="$'"$dbvar"'_answers"'
47 - # There is no double quote around $answers on purpose
48 - for i in $answers; do
49 - if [ "$i" != "$id" ]; then
50 - new_answers="$new_answers"' '"$i"
53 - eval "$dbvar"'_answers="$new_answers"'
56 -# Load all answers from a database on stdin to memory (<dbvar>_answer_*
58 -db_load_from_stdin() {
59 - local dbvar="$1" # OUT
61 - eval "$dbvar"'_answers=""'
63 - # read doesn't support -r on FreeBSD 3.x. For this reason, the following line
64 - # is patched to remove the -r in case of FreeBSD tools build. So don't make
65 - # changes to it. -- Jeremy Bar
66 - while read -r action p1 p2; do
67 - if [ "$action" = 'answer' ]; then
68 - db_answer_add "$dbvar" "$p1" "$p2"
69 - elif [ "$action" = 'remove_answer' ]; then
70 - db_answer_remove "$dbvar" "$p1"
75 -# Load all answers from a database on disk to memory (<dbvar>_answer_*
78 - local dbvar="$1" # OUT
79 - local dbfile="$2" # IN
81 - db_load_from_stdin "$dbvar" < "$dbfile"
84 -# Iterate through all answers in a database in memory, calling <func> with
85 -# id/value pairs and the remaining arguments to this function
87 - local dbvar="$1" # IN
88 - local func="$2" # IN
94 - eval 'answers="$'"$dbvar"'_answers"'
95 - # There is no double quote around $answers on purpose
96 - for i in $answers; do
97 - eval 'value="$'"$dbvar"'_answer_'"$i"'"'
98 - "$func" "$i" "$value" "$@"
102 -# If it exists in memory, remove an answer from a database (disk and memory)
103 -db_remove_answer() {
104 - local dbvar="$1" # IN/OUT
105 - local dbfile="$2" # IN
110 - eval 'answers="$'"$dbvar"'_answers"'
111 - # There is no double quote around $answers on purpose
112 - for i in $answers; do
113 - if [ "$i" = "$id" ]; then
114 - echo 'remove_answer '"$id" >> "$dbfile"
115 - db_answer_remove "$dbvar" "$id"
121 -# Add an answer to a database (disk and memory)
123 - local dbvar="$1" # IN/OUT
124 - local dbfile="$2" # IN
126 - local value="$4" # IN
128 - db_remove_answer "$dbvar" "$dbfile" "$id"
129 - echo 'answer '"$id"' '"$value" >> "$dbfile"
130 - db_answer_add "$dbvar" "$id" "$value"
133 -# Add a file to a database on disk
134 -# 'file' is the file to put in the database (it may not exist on the disk)
135 -# 'tsfile' is the file to get the timestamp from, '' if no timestamp
137 - local dbfile="$1" # IN
138 - local file="$2" # IN
139 - local tsfile="$3" # IN
142 - if [ "$tsfile" = '' ]; then
143 - echo 'file '"$file" >> "$dbfile"
145 - date=`date -r "$tsfile" '+%s' 2> /dev/null`
146 - if [ "$date" != '' ]; then
149 - echo 'file '"$file$date" >> "$dbfile"
153 -# Add a directory to a database on disk
155 - local dbfile="$1" # IN
156 - local dir="$2" # IN
158 - echo 'directory '"$dir" >> "$dbfile"
162 -db_load 'vm_db' '/etc/vmware/locations'
163 +. /etc/vmware/locations
165 if [ "vmware" = "vmware-console" ]; then
166 vmware_config_name="vmware-config-console"
167 --- vmware-distrib/vmware-console-distrib/bin/vmware-console~ 2006-03-01 21:07:14.275705656 +0100
168 +++ vmware-distrib/vmware-console-distrib/bin/vmware-console 2006-03-01 21:08:49.076293776 +0100
170 # the VMware software is installed. --hpreg
173 -# BEGINNING_OF_DB_DOT_SH
175 +. /etc/vmware-console/locations
178 -# Manage an installer database
181 -# Add an answer to a database in memory
183 - local dbvar="$1" # IN/OUT
185 - local value="$3" # IN
189 - eval "$dbvar"'_answer_'"$id"'="$value"'
191 - eval 'answers="$'"$dbvar"'_answers"'
192 - # There is no double quote around $answers on purpose
193 - for i in $answers; do
194 - if [ "$i" = "$id" ]; then
198 - answers="$answers"' '"$id"
199 - eval "$dbvar"'_answers="$answers"'
202 -# Remove an answer from a database in memory
203 -db_answer_remove() {
204 - local dbvar="$1" # IN/OUT
210 - eval 'unset '"$dbvar"'_answer_'"$id"
213 - eval 'answers="$'"$dbvar"'_answers"'
214 - # There is no double quote around $answers on purpose
215 - for i in $answers; do
216 - if [ "$i" != "$id" ]; then
217 - new_answers="$new_answers"' '"$i"
220 - eval "$dbvar"'_answers="$new_answers"'
223 -# Load all answers from a database on stdin to memory (<dbvar>_answer_*
225 -db_load_from_stdin() {
226 - local dbvar="$1" # OUT
228 - eval "$dbvar"'_answers=""'
230 - # read doesn't support -r on FreeBSD 3.x. For this reason, the following line
231 - # is patched to remove the -r in case of FreeBSD tools build. So don't make
232 - # changes to it. -- Jeremy Bar
233 - while read -r action p1 p2; do
234 - if [ "$action" = 'answer' ]; then
235 - db_answer_add "$dbvar" "$p1" "$p2"
236 - elif [ "$action" = 'remove_answer' ]; then
237 - db_answer_remove "$dbvar" "$p1"
242 -# Load all answers from a database on disk to memory (<dbvar>_answer_*
245 - local dbvar="$1" # OUT
246 - local dbfile="$2" # IN
248 - db_load_from_stdin "$dbvar" < "$dbfile"
251 -# Iterate through all answers in a database in memory, calling <func> with
252 -# id/value pairs and the remaining arguments to this function
254 - local dbvar="$1" # IN
255 - local func="$2" # IN
261 - eval 'answers="$'"$dbvar"'_answers"'
262 - # There is no double quote around $answers on purpose
263 - for i in $answers; do
264 - eval 'value="$'"$dbvar"'_answer_'"$i"'"'
265 - "$func" "$i" "$value" "$@"
269 -# If it exists in memory, remove an answer from a database (disk and memory)
270 -db_remove_answer() {
271 - local dbvar="$1" # IN/OUT
272 - local dbfile="$2" # IN
277 - eval 'answers="$'"$dbvar"'_answers"'
278 - # There is no double quote around $answers on purpose
279 - for i in $answers; do
280 - if [ "$i" = "$id" ]; then
281 - echo 'remove_answer '"$id" >> "$dbfile"
282 - db_answer_remove "$dbvar" "$id"
288 -# Add an answer to a database (disk and memory)
290 - local dbvar="$1" # IN/OUT
291 - local dbfile="$2" # IN
293 - local value="$4" # IN
295 - db_remove_answer "$dbvar" "$dbfile" "$id"
296 - echo 'answer '"$id"' '"$value" >> "$dbfile"
297 - db_answer_add "$dbvar" "$id" "$value"
300 -# Add a file to a database on disk
301 -# 'file' is the file to put in the database (it may not exist on the disk)
302 -# 'tsfile' is the file to get the timestamp from, '' if no timestamp
304 - local dbfile="$1" # IN
305 - local file="$2" # IN
306 - local tsfile="$3" # IN
309 - if [ "$tsfile" = '' ]; then
310 - echo 'file '"$file" >> "$dbfile"
312 - date=`date -r "$tsfile" '+%s' 2> /dev/null`
313 - if [ "$date" != '' ]; then
316 - echo 'file '"$file$date" >> "$dbfile"
320 -# Add a directory to a database on disk
322 - local dbfile="$1" # IN
323 - local dir="$2" # IN
325 - echo 'directory '"$dir" >> "$dbfile"
329 -db_load 'vm_db' '/etc/vmware-console/locations'
331 -if [ -e '/etc/vmware-console/not_configured' ]; then
332 +if [ -e '/etc/vmware-console/not_configured' ]; then
333 echo 'vmware-console is installed, but it has not been (correctly) configured'
334 echo 'for this system. To (re-)configure it, invoke the following command:'
335 - echo "$vm_db_answer_BINDIR"'/vmware-config-console.pl.'
336 + echo "$VM_BINDIR"'/vmware-config-console.pl.'
342 -exec "$vm_db_answer_LIBDIR"'/lib/wrapper-gtk24.sh' \
343 - "$vm_db_answer_LIBDIR"'/lib' \
344 - "$vm_db_answer_LIBDIR"'/bin/vmware-console' \
345 - "$vm_db_answer_LIBDIR"'/libconf' "$@"
346 +exec "$VM_LIBDIR"'/lib/wrapper-gtk24.sh' \
347 + "$VM_LIBDIR"'/lib' \
348 + "$VM_LIBDIR"'/bin/vmware-console' \
349 + "$VM_LIBDIR"'/libconf' "$@"