VirtualBox

source: vbox/trunk/src/VBox/Main/UnattendedTemplates/lgw_postinstall.sh@ 106901

Last change on this file since 106901 was 106061, checked in by vboxsync, 3 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 17.2 KB
Line 
1#!/bin/bash
2## @file
3# Post installation script template for local gateway image.
4#
5# Note! This script expects to be running chrooted (inside new sytem).
6#
7
8#
9# Copyright (C) 2020-2024 Oracle and/or its affiliates.
10#
11# This file is part of VirtualBox base platform packages, as
12# available from https://www.virtualbox.org.
13#
14# This program is free software; you can redistribute it and/or
15# modify it under the terms of the GNU General Public License
16# as published by the Free Software Foundation, in version 3 of the
17# License.
18#
19# This program is distributed in the hope that it will be useful, but
20# WITHOUT ANY WARRANTY; without even the implied warranty of
21# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22# General Public License for more details.
23#
24# You should have received a copy of the GNU General Public License
25# along with this program; if not, see <https://www.gnu.org/licenses>.
26#
27# SPDX-License-Identifier: GPL-3.0-only
28#
29
30
31#
32# Globals.
33#
34MY_TARGET="/mnt/sysimage"
35MY_LOGFILE="${MY_TARGET}/var/log/vboxpostinstall.log"
36MY_CHROOT_CDROM="/cdrom"
37MY_CDROM_NOCHROOT="/tmp/vboxcdrom"
38MY_EXITCODE=0
39MY_DEBUG="" # "yes"
40
41@@VBOX_COND_HAS_PROXY@@
42PROXY="@@VBOX_INSERT_PROXY@@"
43export http_proxy="${PROXY}"
44export https_proxy="${PROXY}"
45echo "HTTP proxy is ${http_proxy}" | tee -a "${MY_LOGFILE}"
46echo "HTTPS proxy is ${https_proxy}" | tee -a "${MY_LOGFILE}"
47@@VBOX_COND_END@@
48
49#
50# Do we need to exec using target bash? If so, we must do that early
51# or ash will bark 'bad substitution' and fail.
52#
53if [ "$1" = "--need-target-bash" ]; then
54 # Try figure out which directories we might need in the library path.
55 if [ -z "${LD_LIBRARY_PATH}" ]; then
56 LD_LIBRARY_PATH="${MY_TARGET}/lib"
57 fi
58 for x in \
59 ${MY_TARGET}/lib \
60 ${MY_TARGET}/usr/lib \
61 ${MY_TARGET}/lib/*linux-gnu/ \
62 ${MY_TARGET}/lib32/ \
63 ${MY_TARGET}/lib64/ \
64 ${MY_TARGET}/usr/lib/*linux-gnu/ \
65 ${MY_TARGET}/usr/lib32/ \
66 ${MY_TARGET}/usr/lib64/ \
67 ;
68 do
69 if [ -e "$x" ]; then LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${x}"; fi;
70 done
71 export LD_LIBRARY_PATH
72
73 # Append target bin directories to the PATH as busybox may not have tee.
74 PATH="${PATH}:${MY_TARGET}/bin:${MY_TARGET}/usr/bin:${MY_TARGET}/sbin:${MY_TARGET}/usr/sbin"
75 export PATH
76
77 # Drop the --need-target-bash argument and re-exec.
78 shift
79 echo "******************************************************************************" >> "${MY_LOGFILE}"
80 echo "** Relaunching using ${MY_TARGET}/bin/bash $0 $*" >> "${MY_LOGFILE}"
81 echo "** LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> "${MY_LOGFILE}"
82 echo "** PATH=${PATH}" >> "${MY_LOGFILE}"
83 exec "${MY_TARGET}/bin/bash" "$0" "$@"
84fi
85
86
87#
88# Commands.
89#
90
91# Logs execution of a command.
92log_command()
93{
94 echo "--------------------------------------------------" >> "${MY_LOGFILE}"
95 echo "** Date: `date -R`" >> "${MY_LOGFILE}"
96 echo "** Executing: $*" >> "${MY_LOGFILE}"
97 "$@" 2>&1 | tee -a "${MY_LOGFILE}"
98 MY_TMP_EXITCODE="${PIPESTATUS[0]}" # bashism - whatever.
99 if [ "${MY_TMP_EXITCODE}" != "0" ]; then
100 if [ "${MY_TMP_EXITCODE}" != "${MY_IGNORE_EXITCODE}" ]; then
101 echo "** exit code: ${MY_TMP_EXITCODE}" | tee -a "${MY_LOGFILE}"
102 MY_EXITCODE=1;
103 else
104 echo "** exit code: ${MY_TMP_EXITCODE} (ignored)" | tee -a "${MY_LOGFILE}"
105 fi
106 fi
107}
108
109# Logs execution of a command inside the target.
110log_command_in_target()
111{
112 log_command chroot "${MY_TARGET}" "$@"
113}
114
115# Checks if $1 is a command on the PATH inside the target jail.
116chroot_which()
117{
118 for dir in /bin /usr/bin /sbin /usr/sbin;
119 do
120 if [ -x "${MY_TARGET}${dir}/$1" ]; then
121 return 0;
122 fi
123 done
124 return 1;
125}
126
127#
128# Log header.
129#
130echo "******************************************************************************" >> "${MY_LOGFILE}"
131echo "** VirtualBox Unattended Guest Installation - Late installation actions" >> "${MY_LOGFILE}"
132echo "** Date: `date -R`" >> "${MY_LOGFILE}"
133echo "** Started: $0 $*" >> "${MY_LOGFILE}"
134
135
136#
137# We want the ISO available inside the target jail.
138#
139if [ -d "${MY_TARGET}${MY_CHROOT_CDROM}" ]; then
140 MY_RMDIR_TARGET_CDROM=
141else
142 MY_RMDIR_TARGET_CDROM="yes"
143 log_command mkdir -p ${MY_TARGET}${MY_CHROOT_CDROM}
144fi
145
146if [ -f "${MY_TARGET}${MY_CHROOT_CDROM}/vboxpostinstall.sh" ]; then
147 MY_UNMOUNT_TARGET_CDROM=
148 echo "** binding cdrom into jail: already done" | tee -a "${MY_LOGFILE}"
149else
150 MY_UNMOUNT_TARGET_CDROM="yes"
151 log_command mount -o bind "${MY_CDROM_NOCHROOT}" "${MY_TARGET}${MY_CHROOT_CDROM}"
152 if [ -f "${MY_TARGET}${MY_CHROOT_CDROM}/vboxpostinstall.sh" ]; then
153 echo "** binding cdrom into jail: success" | tee -a "${MY_LOGFILE}"
154 else
155 echo "** binding cdrom into jail: failed" | tee -a "${MY_LOGFILE}"
156 fi
157 if [ "${MY_DEBUG}" = "yes" ]; then
158 log_command find "${MY_TARGET}${MY_CHROOT_CDROM}"
159 fi
160fi
161
162
163#
164# Debug
165#
166if [ "${MY_DEBUG}" = "yes" ]; then
167 log_command id
168 log_command ps
169 log_command ps auxwwwf
170 log_command env
171 log_command df
172 log_command mount
173 log_command_in_target df
174 log_command_in_target mount
175 #log_command find /
176 MY_EXITCODE=0
177fi
178
179
180#
181# Proxy hack for yum
182#
183@@VBOX_COND_HAS_PROXY@@
184echo "" >> "${MY_TARGET}/etc/yum.conf"
185echo "proxy=@@VBOX_INSERT_PROXY@@" >> "${MY_TARGET}/etc/yum.conf"
186@@VBOX_COND_END@@
187
188#
189# Packages needed for GAs.
190#
191echo "--------------------------------------------------" >> "${MY_LOGFILE}"
192echo '** Installing packages for building kernel modules...' | tee -a "${MY_LOGFILE}"
193log_command_in_target yum -y install "kernel-devel-$(uname -r)"
194log_command_in_target yum -y install "kernel-headers-$(uname -r)"
195log_command_in_target yum -y install gcc
196log_command_in_target yum -y install binutils
197log_command_in_target yum -y install make
198log_command_in_target yum -y install dkms
199log_command_in_target yum -y install make
200log_command_in_target yum -y install bzip2
201log_command_in_target yum -y install perl
202
203
204#
205# GAs
206#
207@@VBOX_COND_IS_INSTALLING_ADDITIONS@@
208echo "--------------------------------------------------" >> "${MY_LOGFILE}"
209echo '** Installing VirtualBox Guest Additions...' | tee -a "${MY_LOGFILE}"
210MY_IGNORE_EXITCODE=2 # returned if modules already loaded and reboot required.
211log_command_in_target /bin/bash "${MY_CHROOT_CDROM}/vboxadditions/VBoxLinuxAdditions.run" --nox11
212log_command_in_target /bin/bash -c "udevadm control --reload-rules" # GAs doesn't yet do this.
213log_command_in_target /bin/bash -c "udevadm trigger" # (ditto)
214MY_IGNORE_EXITCODE=
215log_command_in_target usermod -a -G vboxsf "@@VBOX_INSERT_USER_LOGIN@@"
216@@VBOX_COND_END@@
217
218#
219# Local gateway support
220#
221log_command_in_target yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
222#log_command_in_target yum -y update
223log_command_in_target yum -y install openvpn
224log_command_in_target yum -y install connect-proxy
225log_command_in_target usermod -a -G wheel "@@VBOX_INSERT_USER_LOGIN@@"
226
227echo "** Creating ${MY_TARGET}/home/@@VBOX_INSERT_USER_LOGIN@@/cloud-bridge.conf..." | tee -a "${MY_LOGFILE}"
228cat >"${MY_TARGET}/home/@@VBOX_INSERT_USER_LOGIN@@/cloud-bridge.conf" <<'EOT'
229# port 1194
230# proto udp
231port 443
232proto tcp-server
233dev tap0
234secret static.key
235keepalive 10 120
236compress lz4-v2
237push "compress lz4-v2"
238persist-key
239persist-tun
240status /var/log/openvpn-status.log
241log-append /var/log/openvpn.log
242verb 3
243EOT
244
245echo "** Creating ${MY_TARGET}/home/@@VBOX_INSERT_USER_LOGIN@@/cloud-bridge.sh..." | tee -a "${MY_LOGFILE}"
246cat >"${MY_TARGET}/home/@@VBOX_INSERT_USER_LOGIN@@/cloud-bridge.sh" <<'EOT'
247# Initialize variables
248br="br0"
249tap="tap0"
250vnic1=$1
251vnic2=$2
252vnic2_gw=$3
253target_mac=$4
254
255# Install openvpn if it is missing
256if ! yum list installed openvpn; then
257 sudo yum -y install openvpn
258fi
259
260# Let openvpn traffic through Linux firewall
261#sudo iptables -I INPUT -p udp --dport 1194 -j ACCEPT
262sudo iptables -I INPUT -p tcp --dport 443 -j ACCEPT
263
264# Switch to secondary VNIC
265sudo ip route change default via $vnic2_gw dev $vnic2
266sudo ip link set dev $vnic1 down
267
268# Bring up the cloud end of the tunnel
269sudo openvpn --config cloud-bridge.conf --daemon
270
271# Use target MAC for primary VNIC
272sudo ip link set dev $vnic1 address $target_mac
273
274# Bridge tap and primary VNIC
275sudo ip link add name $br type bridge
276sudo ip link set dev $vnic1 master $br
277sudo ip link set dev $tap master $br
278
279# Bring up all interfaces
280sudo ip link set dev $tap up
281sudo ip link set dev $vnic1 up
282sudo ip link set dev $br up
283EOT
284log_command chmod +x "${MY_TARGET}/home/@@VBOX_INSERT_USER_LOGIN@@/cloud-bridge.sh"
285
286echo "** Creating ${MY_TARGET}/home/@@VBOX_INSERT_USER_LOGIN@@/local-bridge.conf..." | tee -a "${MY_LOGFILE}"
287cat >"${MY_TARGET}/home/@@VBOX_INSERT_USER_LOGIN@@/local-bridge.conf" <<'EOT'
288dev tap0
289# proto udp
290# port 1194
291proto tcp-client
292port 443
293persist-key
294persist-tun
295secret static.key
296compress lz4-v2
297log-append /var/log/openvpn.log
298verb 3
299EOT
300
301echo "** Creating ${MY_TARGET}/home/@@VBOX_INSERT_USER_LOGIN@@/local-bridge.sh..." | tee -a "${MY_LOGFILE}"
302cat >"${MY_TARGET}/home/@@VBOX_INSERT_USER_LOGIN@@/local-bridge.sh" <<'EOT'
303echo Complete command line for debugging purposes:
304echo $0 $*
305
306# Make sure we are at home
307cd ~
308
309# Initialize variables
310user=opc
311cbr_ip1=$1
312cbr_ip2=$2
313target_mac=$3
314br="br0"
315tap="tap0"
316eth="enp0s8"
317
318proxy1_ssh=""
319proxy2_ssh=""
320proxy2_vpn=""
321case $4 in
322 HTTP | HTTPS)
323 proxy1_ssh="connect-proxy -w 30 -H $5:$6 %h %p"
324 ;;
325 SOCKS | SOCKS5)
326 proxy1_ssh="connect-proxy -w 30 -S $5:$6 %h %p"
327 ;;
328 SOCKS4)
329 proxy1_ssh="connect-proxy -w 30 -4 -S $5:$6 %h %p"
330 ;;
331esac
332case $7 in
333 HTTP | HTTPS)
334 proxy2_ssh="connect-proxy -w 30 -H $8:$9 %h %p"
335 proxy2_vpn="--http-proxy $8 $9"
336 ;;
337 SOCKS | SOCKS5)
338 proxy2_ssh="connect-proxy -w 30 -S $8:$9 %h %p"
339 proxy2_vpn="--socks-proxy $8 $9"
340 ;;
341 SOCKS4)
342 proxy2_ssh="connect-proxy -w 30 -4 -S $8:$9 %h %p"
343 proxy2_vpn="--socks-proxy $8 $9"
344 ;;
345esac
346
347# Generate pre-shared secret and share it with the server, bypassing proxy if necessary
348/usr/sbin/openvpn --genkey --secret static.key
349for i in 1 2 3 4
350do
351 # Go via proxy if set
352 scp ${proxy1_ssh:+ -o ProxyCommand="$proxy1_ssh"} static.key cloud-bridge.conf cloud-bridge.sh $user@$cbr_ip1:
353 if [ $? -eq 0 ]; then break; fi; sleep 15
354 # Go direct even if proxy is set
355 scp static.key cloud-bridge.conf cloud-bridge.sh $user@$cbr_ip1:
356 if [ $? -eq 0 ]; then proxy1_ssh=""; break; fi; sleep 15
357done
358
359# Get metadata info from the cloud bridge
360for i in 1 2 3 4; do metadata=$(ssh ${proxy1_ssh:+ -o ProxyCommand="$proxy1_ssh"} $user@$cbr_ip1 sudo oci-network-config) && break || sleep 15; done
361
362# Extract primary VNIC info
363vnic1_md=`echo "$metadata"|grep -E "\sUP\s"`
364vnic1_dev=`echo $vnic1_md|cut -d ' ' -f 8`
365vnic1_mac=`echo $vnic1_md|cut -d ' ' -f 12`
366# Extract secondary VNIC info
367vnic2_md=`echo "$metadata"|grep -E "\sDOWN\s"`
368vnic2_dev=`echo $vnic2_md|cut -d ' ' -f 8`
369vnic2_gw=`echo $vnic2_md|cut -d ' ' -f 5`
370
371# Configure secondary VNIC
372ssh ${proxy1_ssh:+ -o ProxyCommand="$proxy1_ssh"} $user@$cbr_ip1 sudo oci-network-config -c
373
374# Bring up the cloud bridge
375ssh ${proxy2_ssh:+ -o ProxyCommand="$proxy2_ssh"} $user@$cbr_ip2 /bin/sh -x cloud-bridge.sh $vnic1_dev $vnic2_dev $vnic2_gw $target_mac
376if [ $? -eq 0 ]
377then
378 # SSH was able to reach cloud via proxy, establish a tunnel via proxy as well
379 sudo /usr/sbin/openvpn $proxy2_vpn --config local-bridge.conf --daemon --remote $cbr_ip2
380else
381 # Retry without proxy
382 ssh $user@$cbr_ip2 /bin/sh -x cloud-bridge.sh $vnic1_dev $vnic2_dev $vnic2_gw $target_mac
383 # Establish a tunnel to the cloud bridge
384 sudo /usr/sbin/openvpn --config local-bridge.conf --daemon --remote $cbr_ip2
385fi
386
387# Bridge the openvpn tap device and the local Ethernet interface
388sudo ip link set dev $eth down
389sudo ip link add name $br type bridge
390sudo ip link set dev $eth master $br
391sudo ip link set dev $tap master $br
392
393# Bring up all interfaces
394sudo ip link set dev $tap up
395sudo ip link set dev $eth up
396sudo ip link set dev $br up
397EOT
398log_command chmod +x "${MY_TARGET}/home/@@VBOX_INSERT_USER_LOGIN@@/local-bridge.sh"
399
400echo "** Creating ${MY_TARGET}/home/@@VBOX_INSERT_USER_LOGIN@@/.ssh/config..." | tee -a "${MY_LOGFILE}"
401log_command mkdir "${MY_TARGET}/home/@@VBOX_INSERT_USER_LOGIN@@/.ssh"
402cat >"${MY_TARGET}/home/@@VBOX_INSERT_USER_LOGIN@@/.ssh/config" <<'EOT'
403Host *
404 StrictHostKeyChecking no
405EOT
406log_command chmod 400 "${MY_TARGET}/home/@@VBOX_INSERT_USER_LOGIN@@/.ssh/config"
407
408log_command_in_target chown -R @@VBOX_INSERT_USER_LOGIN@@:@@VBOX_INSERT_USER_LOGIN@@ "/home/@@VBOX_INSERT_USER_LOGIN@@"
409
410echo '** Creating /etc/systemd/system/keygen.service...' | tee -a "${MY_LOGFILE}"
411cat >"${MY_TARGET}/etc/systemd/system/keygen.service" <<'EOT'
412[Unit]
413Description=Boot-time ssh key pair generator
414After=vboxadd.service
415
416[Service]
417ExecStart=/bin/sh -c 'su - vbox -c "cat /dev/zero | ssh-keygen -q -N \\\"\\\""'
418ExecStartPost=/bin/sh -c 'VBoxControl guestproperty set "/VirtualBox/Gateway/PublicKey" "`cat ~vbox/.ssh/id_rsa.pub`" --flags TRANSIENT'
419Type=oneshot
420RemainAfterExit=yes
421
422[Install]
423WantedBy=multi-user.target
424EOT
425log_command chmod 644 "${MY_TARGET}/etc/systemd/system/keygen.service"
426log_command_in_target systemctl enable keygen.service
427
428echo '** Creating /etc/sudoers.d/020_vbox_sudo...' | tee -a "${MY_LOGFILE}"
429echo "@@VBOX_INSERT_USER_LOGIN@@ ALL=(ALL) NOPASSWD: ALL" > "${MY_TARGET}/etc/sudoers.d/020_vbox_sudo"
430
431#
432# Test Execution Service.
433#
434@@VBOX_COND_IS_INSTALLING_TEST_EXEC_SERVICE@@
435echo "--------------------------------------------------" >> "${MY_LOGFILE}"
436echo '** Installing Test Execution Service...' | tee -a "${MY_LOGFILE}"
437log_command_in_target test "${MY_CHROOT_CDROM}/vboxvalidationkit/linux/@@VBOX_INSERT_OS_ARCH@@/TestExecService"
438log_command mkdir -p "${MY_TARGET}/opt/validationkit" "${MY_TARGET}/media/cdrom"
439log_command cp -R ${MY_CDROM_NOCHROOT}/vboxvalidationkit/* "${MY_TARGET}/opt/validationkit/"
440log_command chmod -R u+rw,a+xr "${MY_TARGET}/opt/validationkit/"
441if [ -e "${MY_TARGET}/usr/bin/chcon" -o -e "${MY_TARGET}/bin/chcon" -o -e "${MY_TARGET}/usr/sbin/chcon" -o -e "${MY_TARGET}/sbin/chcon" ]; then
442 MY_IGNORE_EXITCODE=1
443 log_command_in_target chcon -R -t usr_t "/opt/validationkit/"
444 MY_IGNORE_EXITCODE=
445fi
446
447# systemd service config:
448MY_UNIT_PATH="${MY_TARGET}/lib/systemd/system"
449test -d "${MY_TARGET}/usr/lib/systemd/system" && MY_UNIT_PATH="${MY_TARGET}/usr/lib/systemd/system"
450if [ -d "${MY_UNIT_PATH}" ]; then
451 log_command cp "${MY_TARGET}/opt/validationkit/linux/vboxtxs.service" "${MY_UNIT_PATH}/vboxtxs.service"
452 log_command chmod 644 "${MY_UNIT_PATH}/vboxtxs.service"
453 log_command_in_target systemctl -q enable vboxtxs
454
455# System V like:
456elif [ -e "${MY_TARGET}/etc/init.d/" ]; then
457
458 # Install the script. On rhel6 scripts are under /etc/rc.d/ with /etc/init.d and /etc/rc?.d being symlinks.
459 if [ -d "${MY_TARGET}/etc/rc.d/init.d/" ]; then
460 MY_INIT_D_PARENT_PATH="${MY_TARGET}/etc/rc.d"
461 log_command ln -s "../../../opt/validationkit/linux/vboxtxs" "${MY_INIT_D_PARENT_PATH}/init.d/"
462 else
463 MY_INIT_D_PARENT_PATH="${MY_TARGET}/etc"
464 log_command ln -s "../../opt/validationkit/linux/vboxtxs" "${MY_INIT_D_PARENT_PATH}/init.d/"
465 fi
466
467 # Use runlevel management script if found.
468 if chroot_which chkconfig; then # Redhat based sysvinit systems
469 log_command_in_target chkconfig --add vboxtxs
470 elif chroot_which insserv; then # SUSE-based sysvinit systems
471 log_command_in_target insserv vboxtxs
472 elif chroot_which update-rc.d; then # Debian/Ubuntu-based systems
473 log_command_in_target update-rc.d vboxtxs defaults
474 elif chroot_which rc-update; then # Gentoo Linux
475 log_command_in_target rc-update add vboxtxs default
476 # Fall back on hardcoded symlinking.
477 else
478 log_command ln -s "../init.d/vboxtxs" "${MY_INIT_D_PARENT_PATH}/rc0.d/K65vboxtxs"
479 log_command ln -s "../init.d/vboxtxs" "${MY_INIT_D_PARENT_PATH}/rc1.d/K65vboxtxs"
480 log_command ln -s "../init.d/vboxtxs" "${MY_INIT_D_PARENT_PATH}/rc6.d/K65vboxtxs"
481 log_command ln -s "../init.d/vboxtxs" "${MY_INIT_D_PARENT_PATH}/rc2.d/S35vboxtxs"
482 log_command ln -s "../init.d/vboxtxs" "${MY_INIT_D_PARENT_PATH}/rc3.d/S35vboxtxs"
483 log_command ln -s "../init.d/vboxtxs" "${MY_INIT_D_PARENT_PATH}/rc4.d/S35vboxtxs"
484 log_command ln -s "../init.d/vboxtxs" "${MY_INIT_D_PARENT_PATH}/rc5.d/S35vboxtxs"
485 fi
486else
487 echo "** error: Unknown init script system." | tee -a "${MY_LOGFILE}"
488fi
489
490@@VBOX_COND_END@@
491
492
493#
494# Run user command.
495#
496@@VBOX_COND_HAS_POST_INSTALL_COMMAND@@
497echo '** Running custom user command ...' | tee -a "${MY_LOGFILE}"
498log_command @@VBOX_INSERT_POST_INSTALL_COMMAND@@
499@@VBOX_COND_END@@
500
501
502#
503# Unmount the cdrom if we bound it and clean up the chroot if we set it up.
504#
505if [ -n "${MY_UNMOUNT_TARGET_CDROM}" ]; then
506 echo "** unbinding cdrom from jail..." | tee -a "${MY_LOGFILE}"
507 log_command umount "${MY_TARGET}${MY_CHROOT_CDROM}"
508fi
509
510if [ -n "${MY_RMDIR_TARGET_CDROM}" ]; then
511 log_command rmdir "${MY_TARGET}${MY_CHROOT_CDROM}"
512fi
513
514
515#
516# Log footer.
517#
518echo "******************************************************************************" >> "${MY_LOGFILE}"
519echo "** Date: `date -R`" >> "${MY_LOGFILE}"
520echo "** Final exit code: ${MY_EXITCODE}" >> "${MY_LOGFILE}"
521echo "******************************************************************************" >> "${MY_LOGFILE}"
522
523exit ${MY_EXITCODE}
524
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette