From 9a41f68c32a74b0186a88820589beb023b464cd9 Mon Sep 17 00:00:00 2001 From: Darrin Husselmann Date: Thu, 27 Feb 2020 09:58:38 +0200 Subject: [PATCH 1/2] Updated vmware virtual hardware version in systemvmtemplate build script --- tools/appliance/build.sh | 2 +- tools/appliance/cloud_scripts_shar_archive.sh | 208895 +++++++++++++++ 2 files changed, 208896 insertions(+), 1 deletion(-) create mode 100755 tools/appliance/cloud_scripts_shar_archive.sh diff --git a/tools/appliance/build.sh b/tools/appliance/build.sh index 25d73f1d95fb..1c83f9aba510 100755 --- a/tools/appliance/build.sh +++ b/tools/appliance/build.sh @@ -227,7 +227,7 @@ function stage_vmx() { displayname = "${1}" annotation = "${1}" guestos = "otherlinux-64" -virtualHW.version = "8" +virtualHW.version = "11" config.version = "8" numvcpus = "1" cpuid.coresPerSocket = "1" diff --git a/tools/appliance/cloud_scripts_shar_archive.sh b/tools/appliance/cloud_scripts_shar_archive.sh new file mode 100755 index 000000000000..b2395cd65c77 --- /dev/null +++ b/tools/appliance/cloud_scripts_shar_archive.sh @@ -0,0 +1,208895 @@ +#!/bin/sh +# This is a shell archive (produced by GNU sharutils 4.15.2). +# To extract the files from this archive, save it to some FILE, remove +# everything before the '#!/bin/sh' line above, then type 'sh FILE'. +# +lock_dir=_sh57448 +# Made on 2020-02-27 09:37 SAST by . +# Source directory was '/tmp/shar_cloud.XnZHhBXb'. +# +# Existing files will *not* be overwritten, unless '-c' is specified. +# +# This shar contains: +# length mode name +# ------ ---------- ------------------------------------------ +# 253 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0003.json +# 77 -rw-r--r-- cloud_scripts/opt/cloud/testdata/vmp0001.json +# 267 -rw-r--r-- cloud_scripts/opt/cloud/testdata/gn0001.json +# 250 -rw-r--r-- cloud_scripts/opt/cloud/testdata/dhcp0001.json +# 1405 -rw-r--r-- cloud_scripts/opt/cloud/testdata/acl0001.json +# 70 -rw-r--r-- cloud_scripts/opt/cloud/testdata/README +# 254 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0001.json +# 1062 -rwxr-xr-x cloud_scripts/opt/cloud/testdata/test.sh +# 254 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0002.json +# 380 -rw-r--r-- cloud_scripts/opt/cloud/testdata/s2s0001.json +# 1177 -rw-r--r-- cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ +# 1357 -rwxr-xr-x cloud_scripts/opt/cloud/templates/checkrouter.sh.templ +# 853 -rwxr-xr-x cloud_scripts/opt/cloud/templates/heartbeat.sh.templ +# 15888 -rw-r--r-- cloud_scripts/opt/cloud/templates/conntrackd.conf.templ +# 2037 -rwxr-xr-x cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ +# 822 -rw-r--r-- cloud_scripts/opt/cloud/templates/check_bumpup.sh +# 1429 -rw-r--r-- cloud_scripts/opt/cloud/templates/keepalived.conf.templ +# 1792 -rwxr-xr-x cloud_scripts/opt/cloud/bin/prepare_pxe.sh +# 3239 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_forwardingrules.py +# 3377 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_netusage.sh +# 45920 -rwxr-xr-x cloud_scripts/opt/cloud/bin/configure.py +# 1126 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vmp.py +# 1526 -rwxr-xr-x cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh +# 2725 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vr_cfg.sh +# 2346 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_snat.sh +# 3043 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_staticroute.sh +# 5587 -rwxr-xr-x cloud_scripts/opt/cloud/bin/baremetal-vr.py +# 1141 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_firewallrules.py +# 3478 -rwxr-xr-x cloud_scripts/opt/cloud/bin/netusage.sh +# 2294 -rwxr-xr-x cloud_scripts/opt/cloud/bin/monitor_service.sh +# 2581 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_ip.py +# 824 -rwxr-xr-x cloud_scripts/opt/cloud/bin/bumpup_priority.sh +# 1706 -rwxr-xr-x cloud_scripts/opt/cloud/bin/getRouterAlerts.sh +# 2122 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/postinit.sh +# 2720 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/secstorage.sh +# 1442 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/ilbvm.sh +# 3885 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh +# 3355 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/router.sh +# 1578 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/elbvm.sh +# 7721 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/bootstrap.sh +# 1658 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh +# 22472 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/common.sh +# 1985 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh +# 2765 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/cloud-early-config +# 1002 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/default.sh +# 8234 -rwxr-xr-x cloud_scripts/opt/cloud/bin/loadbalancer.sh +# 1717 -rwxr-xr-x cloud_scripts/opt/cloud/bin/baremetal_snat.sh +# 1469 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vpnusers.py +# 13492 -rwxr-xr-x cloud_scripts/opt/cloud/bin/merge.py +# 2040 -rwxr-xr-x cloud_scripts/opt/cloud/bin/master.py +# 1663 -rwxr-xr-x cloud_scripts/opt/cloud/bin/set_redundant.py +# 1178 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checks2svpn.sh +# 994 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py +# 952 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_staticroutes.py +# 996 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py +# 7020 -rwxr-xr-x cloud_scripts/opt/cloud/bin/passwd_server_ip.py +# 881 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_network_acl.py +# 986 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cleanup.sh +# 1016 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_loadbalancer.py +# 1849 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_func.sh +# 8809 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDhcp.py +# 16789 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRedundant.py +# 7644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsHelper.py +# 2545 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py +# 3681 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsMonitor.py +# 11100 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py +# 4989 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRoute.py +# 1655 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py +# 3393 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py +# 4159 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsApp.py +# 6133 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsFile.py +# 785 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/__init__.py +# 29236 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsAddress.py +# 2156 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsProcess.py +# 3179 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsConfig.py +# 4808 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDatabag.py +# 2192 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRule.py +# 4723 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vmdata.py +# 4478 -rwxr-xr-x cloud_scripts/opt/cloud/bin/get_diagnostics_files.py +# 1445 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checkrouter.sh +# 5644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ilb.sh +# 924 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh +# 1525 -rwxr-xr-x cloud_scripts/opt/cloud/bin/savepassword.sh +# 2632 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cloud-nic.sh +# 8769 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ipsectunnel.sh +# 13401 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ipassoc.sh +# 7961 -rwxr-xr-x cloud_scripts/opt/cloud/bin/line_edit.py +# 1449 -rwxr-xr-x cloud_scripts/opt/cloud/bin/get_template_version.sh +# 5136 -rwxr-xr-x cloud_scripts/opt/cloud/bin/update_config.py +# 5502 -rwxr-xr-x cloud_scripts/opt/cloud/bin/edithosts.sh +# 2012 -rwxr-xr-x cloud_scripts/opt/cloud/bin/diagnostics.py +# 1541 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_monitorservice.py +# 6986 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpn_l2tp.sh +# 1401 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_guestnetwork.py +# 892 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vmdata.py +# 4359 -rwxr-xr-x cloud_scripts/opt/cloud/bin/dnsmasq.sh +# 1533 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_dhcp.py +# 1045 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_cmdline.py +# 1454 -rwxr-xr-x cloud_scripts/root/reconfigLB.sh +# 12747 -rwxr-xr-x cloud_scripts/root/monitorServices.py +# 3349 -rw-r--r-- cloud_scripts/root/health_checks/iptables_check.py +# 1966 -rw-r--r-- cloud_scripts/root/health_checks/memory_usage_check.py +# 5274 -rw-r--r-- cloud_scripts/root/health_checks/haproxy_check.py +# 2773 -rw-r--r-- cloud_scripts/root/health_checks/router_version_check.py +# 1865 -rw-r--r-- cloud_scripts/root/health_checks/utility/sharedFunctions.py +# 864 -rw-r--r-- cloud_scripts/root/health_checks/utility/__init__.py +# 1626 -rw-r--r-- cloud_scripts/root/health_checks/disk_space_check.py +# 1869 -rw-r--r-- cloud_scripts/root/health_checks/gateways_check.py +# 942 -rw-r--r-- cloud_scripts/root/health_checks/__init__.py +# 1972 -rw-r--r-- cloud_scripts/root/health_checks/dns_check.py +# 2078 -rw-r--r-- cloud_scripts/root/health_checks/cpu_usage_check.py +# 2386 -rwxr-xr-x cloud_scripts/root/health_checks/dhcp_check.py +# 3567 -rw-r--r-- cloud_scripts/root/func.sh +# 1461 -rwxr-xr-x cloud_scripts/root/clearUsageRules.sh +# 1425 -rw-r--r-- cloud_scripts/var/www/html/latest/.htaccess +# 17 -rw-r--r-- cloud_scripts/var/www/html/userdata/.htaccess +# 94 -rw-r--r-- cloud_scripts/etc/ipsec.conf +# 80 -rw-r--r-- cloud_scripts/etc/systemd/journald.conf +# 156 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service +# 143 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service +# 298 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud.service +# 280 -rw-r--r-- cloud_scripts/etc/systemd/system/open-vm-tools.service +# 257 -rw-r--r-- cloud_scripts/etc/systemd/system/baremetal-vr.service +# 398 -rw-r--r-- cloud_scripts/etc/systemd/system/xe-daemon.service +# 190 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service +# 348 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-early-config.service +# 244 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-password-server@.service +# 287 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-postinit.service +# 1731 -rw-r--r-- cloud_scripts/etc/iptables/rules +# 1601 -rw-r--r-- cloud_scripts/etc/iptables/iptables-consoleproxy +# 2348 -rw-r--r-- cloud_scripts/etc/iptables/iptables-router +# 1465 -rw-r--r-- cloud_scripts/etc/iptables/iptables-vpcrouter +# 2348 -rw-r--r-- cloud_scripts/etc/iptables/iptables-dhcpsrvr +# 1256 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-elbvm +# 1375 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-secstorage +# 1192 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-ilbvm +# 897 -rw-r--r-- cloud_scripts/etc/iptables/rt_tables_init +# 2049 -rw-r--r-- cloud_scripts/etc/sysctl.conf +# 139 -rw-r--r-- cloud_scripts/etc/xl2tpd/xl2tpd.conf +# 25321 -rw-r--r-- cloud_scripts/etc/dnsmasq.conf.tmpl +# 107 -rwxr-xr-x cloud_scripts/etc/cron.daily/clear_cache +# 477 -rw-r--r-- cloud_scripts/etc/vmware-tools/tools.conf +# 507 -rw-r--r-- cloud_scripts/etc/logrotate.conf +# 3603 -rw-r--r-- cloud_scripts/etc/ssh/sshd_config +# 141 -rw-r--r-- cloud_scripts/etc/ppp/options.xl2tpd +# 1234 -rw-r--r-- cloud_scripts/etc/ipsec.d/l2tp.conf +# 2298 -rw-r--r-- cloud_scripts/etc/rsyslog.conf +# 801 -rw-r--r-- cloud_scripts/etc/modprobe.d/pcspkr.conf +# 807 -rw-r--r-- cloud_scripts/etc/modprobe.d/aesni_intel.conf +# 183 -rwxr-xr-x cloud_scripts/etc/cron.hourly/clear_cache +# 54 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/security.conf +# 669 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf +# 8 -rw-r--r-- cloud_scripts/etc/apache2/httpd.conf +# 9955 -rw-r--r-- cloud_scripts/etc/apache2/vhost.template +# 17942 -rw-r--r-- cloud_scripts/etc/vpcdnsmasq.conf +# 80 -rw-r--r-- cloud_scripts/etc/ipsec.secrets +# 272 -rw-r--r-- cloud_scripts/etc/logrotate.d/dnsmasq +# 1124 -rw-r--r-- cloud_scripts/etc/logrotate.d/cloud +# 263 -rw-r--r-- cloud_scripts/etc/logrotate.d/conntrackd +# 922 -rw-r--r-- cloud_scripts/etc/logrotate.d/monitor +# 935 -rw-r--r-- cloud_scripts/etc/logrotate.d/routerServiceMonitor +# 98 -rw-r--r-- cloud_scripts/etc/logrotate.d/ppp +# 148 -rw-r--r-- cloud_scripts/etc/logrotate.d/apache2 +# 517 -rw-r--r-- cloud_scripts/etc/logrotate.d/rsyslog +# 194 -rw-r--r-- cloud_scripts/etc/logrotate.d/haproxy +# 861 -rwxr-xr-x cloud_scripts/etc/profile.d/cloud.sh +# 83 -rw-r--r-- cloud_scripts/etc/cloud-nic.rules +# 483 -rw-r--r-- cloud_scripts/etc/haproxy/haproxy.cfg +# 696320 -rw-r--r-- cloud_scripts/usr/share/cloud/cloud-scripts.tar +# 253 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0003.json +# 77 -rw-r--r-- cloud_scripts/opt/cloud/testdata/vmp0001.json +# 267 -rw-r--r-- cloud_scripts/opt/cloud/testdata/gn0001.json +# 250 -rw-r--r-- cloud_scripts/opt/cloud/testdata/dhcp0001.json +# 1405 -rw-r--r-- cloud_scripts/opt/cloud/testdata/acl0001.json +# 70 -rw-r--r-- cloud_scripts/opt/cloud/testdata/README +# 254 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0001.json +# 1062 -rwxr-xr-x cloud_scripts/opt/cloud/testdata/test.sh +# 254 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0002.json +# 380 -rw-r--r-- cloud_scripts/opt/cloud/testdata/s2s0001.json +# 1177 -rw-r--r-- cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ +# 1357 -rwxr-xr-x cloud_scripts/opt/cloud/templates/checkrouter.sh.templ +# 853 -rwxr-xr-x cloud_scripts/opt/cloud/templates/heartbeat.sh.templ +# 15888 -rw-r--r-- cloud_scripts/opt/cloud/templates/conntrackd.conf.templ +# 2037 -rwxr-xr-x cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ +# 822 -rw-r--r-- cloud_scripts/opt/cloud/templates/check_bumpup.sh +# 1429 -rw-r--r-- cloud_scripts/opt/cloud/templates/keepalived.conf.templ +# 1792 -rwxr-xr-x cloud_scripts/opt/cloud/bin/prepare_pxe.sh +# 3239 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_forwardingrules.py +# 3377 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_netusage.sh +# 45920 -rwxr-xr-x cloud_scripts/opt/cloud/bin/configure.py +# 1126 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vmp.py +# 1526 -rwxr-xr-x cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh +# 2725 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vr_cfg.sh +# 2346 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_snat.sh +# 3043 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_staticroute.sh +# 5587 -rwxr-xr-x cloud_scripts/opt/cloud/bin/baremetal-vr.py +# 1141 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_firewallrules.py +# 3478 -rwxr-xr-x cloud_scripts/opt/cloud/bin/netusage.sh +# 2294 -rwxr-xr-x cloud_scripts/opt/cloud/bin/monitor_service.sh +# 2581 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_ip.py +# 824 -rwxr-xr-x cloud_scripts/opt/cloud/bin/bumpup_priority.sh +# 1706 -rwxr-xr-x cloud_scripts/opt/cloud/bin/getRouterAlerts.sh +# 2122 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/postinit.sh +# 2720 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/secstorage.sh +# 1442 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/ilbvm.sh +# 3885 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh +# 3355 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/router.sh +# 1578 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/elbvm.sh +# 7721 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/bootstrap.sh +# 1658 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh +# 22472 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/common.sh +# 1985 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh +# 2765 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/cloud-early-config +# 1002 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/default.sh +# 8234 -rwxr-xr-x cloud_scripts/opt/cloud/bin/loadbalancer.sh +# 1717 -rwxr-xr-x cloud_scripts/opt/cloud/bin/baremetal_snat.sh +# 1469 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vpnusers.py +# 13492 -rwxr-xr-x cloud_scripts/opt/cloud/bin/merge.py +# 2040 -rwxr-xr-x cloud_scripts/opt/cloud/bin/master.py +# 1663 -rwxr-xr-x cloud_scripts/opt/cloud/bin/set_redundant.py +# 1178 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checks2svpn.sh +# 994 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py +# 952 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_staticroutes.py +# 996 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py +# 7020 -rwxr-xr-x cloud_scripts/opt/cloud/bin/passwd_server_ip.py +# 881 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_network_acl.py +# 986 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cleanup.sh +# 1016 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_loadbalancer.py +# 1849 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_func.sh +# 8809 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDhcp.py +# 16789 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRedundant.py +# 7644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsHelper.py +# 2545 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py +# 3681 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsMonitor.py +# 11100 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py +# 4989 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRoute.py +# 1655 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py +# 3393 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py +# 4159 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsApp.py +# 6133 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsFile.py +# 785 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/__init__.py +# 29236 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsAddress.py +# 2156 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsProcess.py +# 3179 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsConfig.py +# 4808 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDatabag.py +# 2192 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRule.py +# 4723 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vmdata.py +# 4478 -rwxr-xr-x cloud_scripts/opt/cloud/bin/get_diagnostics_files.py +# 1445 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checkrouter.sh +# 5644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ilb.sh +# 924 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh +# 1525 -rwxr-xr-x cloud_scripts/opt/cloud/bin/savepassword.sh +# 2632 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cloud-nic.sh +# 8769 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ipsectunnel.sh +# 13401 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ipassoc.sh +# 7961 -rwxr-xr-x cloud_scripts/opt/cloud/bin/line_edit.py +# 1449 -rwxr-xr-x cloud_scripts/opt/cloud/bin/get_template_version.sh +# 5136 -rwxr-xr-x cloud_scripts/opt/cloud/bin/update_config.py +# 5502 -rwxr-xr-x cloud_scripts/opt/cloud/bin/edithosts.sh +# 2012 -rwxr-xr-x cloud_scripts/opt/cloud/bin/diagnostics.py +# 1541 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_monitorservice.py +# 6986 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpn_l2tp.sh +# 1401 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_guestnetwork.py +# 892 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vmdata.py +# 4359 -rwxr-xr-x cloud_scripts/opt/cloud/bin/dnsmasq.sh +# 1533 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_dhcp.py +# 1045 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_cmdline.py +# 1454 -rwxr-xr-x cloud_scripts/root/reconfigLB.sh +# 12747 -rwxr-xr-x cloud_scripts/root/monitorServices.py +# 3349 -rw-r--r-- cloud_scripts/root/health_checks/iptables_check.py +# 1966 -rw-r--r-- cloud_scripts/root/health_checks/memory_usage_check.py +# 5274 -rw-r--r-- cloud_scripts/root/health_checks/haproxy_check.py +# 2773 -rw-r--r-- cloud_scripts/root/health_checks/router_version_check.py +# 1865 -rw-r--r-- cloud_scripts/root/health_checks/utility/sharedFunctions.py +# 864 -rw-r--r-- cloud_scripts/root/health_checks/utility/__init__.py +# 1626 -rw-r--r-- cloud_scripts/root/health_checks/disk_space_check.py +# 1869 -rw-r--r-- cloud_scripts/root/health_checks/gateways_check.py +# 942 -rw-r--r-- cloud_scripts/root/health_checks/__init__.py +# 1972 -rw-r--r-- cloud_scripts/root/health_checks/dns_check.py +# 2078 -rw-r--r-- cloud_scripts/root/health_checks/cpu_usage_check.py +# 2386 -rwxr-xr-x cloud_scripts/root/health_checks/dhcp_check.py +# 3567 -rw-r--r-- cloud_scripts/root/func.sh +# 1461 -rwxr-xr-x cloud_scripts/root/clearUsageRules.sh +# 1425 -rw-r--r-- cloud_scripts/var/www/html/latest/.htaccess +# 17 -rw-r--r-- cloud_scripts/var/www/html/userdata/.htaccess +# 94 -rw-r--r-- cloud_scripts/etc/ipsec.conf +# 80 -rw-r--r-- cloud_scripts/etc/systemd/journald.conf +# 156 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service +# 143 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service +# 298 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud.service +# 280 -rw-r--r-- cloud_scripts/etc/systemd/system/open-vm-tools.service +# 257 -rw-r--r-- cloud_scripts/etc/systemd/system/baremetal-vr.service +# 398 -rw-r--r-- cloud_scripts/etc/systemd/system/xe-daemon.service +# 190 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service +# 348 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-early-config.service +# 244 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-password-server@.service +# 287 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-postinit.service +# 1731 -rw-r--r-- cloud_scripts/etc/iptables/rules +# 1601 -rw-r--r-- cloud_scripts/etc/iptables/iptables-consoleproxy +# 2348 -rw-r--r-- cloud_scripts/etc/iptables/iptables-router +# 1465 -rw-r--r-- cloud_scripts/etc/iptables/iptables-vpcrouter +# 2348 -rw-r--r-- cloud_scripts/etc/iptables/iptables-dhcpsrvr +# 1256 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-elbvm +# 1375 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-secstorage +# 1192 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-ilbvm +# 897 -rw-r--r-- cloud_scripts/etc/iptables/rt_tables_init +# 2049 -rw-r--r-- cloud_scripts/etc/sysctl.conf +# 139 -rw-r--r-- cloud_scripts/etc/xl2tpd/xl2tpd.conf +# 25321 -rw-r--r-- cloud_scripts/etc/dnsmasq.conf.tmpl +# 107 -rwxr-xr-x cloud_scripts/etc/cron.daily/clear_cache +# 477 -rw-r--r-- cloud_scripts/etc/vmware-tools/tools.conf +# 507 -rw-r--r-- cloud_scripts/etc/logrotate.conf +# 3603 -rw-r--r-- cloud_scripts/etc/ssh/sshd_config +# 141 -rw-r--r-- cloud_scripts/etc/ppp/options.xl2tpd +# 1234 -rw-r--r-- cloud_scripts/etc/ipsec.d/l2tp.conf +# 2298 -rw-r--r-- cloud_scripts/etc/rsyslog.conf +# 801 -rw-r--r-- cloud_scripts/etc/modprobe.d/pcspkr.conf +# 807 -rw-r--r-- cloud_scripts/etc/modprobe.d/aesni_intel.conf +# 183 -rwxr-xr-x cloud_scripts/etc/cron.hourly/clear_cache +# 54 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/security.conf +# 669 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf +# 8 -rw-r--r-- cloud_scripts/etc/apache2/httpd.conf +# 9955 -rw-r--r-- cloud_scripts/etc/apache2/vhost.template +# 17942 -rw-r--r-- cloud_scripts/etc/vpcdnsmasq.conf +# 80 -rw-r--r-- cloud_scripts/etc/ipsec.secrets +# 272 -rw-r--r-- cloud_scripts/etc/logrotate.d/dnsmasq +# 1124 -rw-r--r-- cloud_scripts/etc/logrotate.d/cloud +# 263 -rw-r--r-- cloud_scripts/etc/logrotate.d/conntrackd +# 922 -rw-r--r-- cloud_scripts/etc/logrotate.d/monitor +# 935 -rw-r--r-- cloud_scripts/etc/logrotate.d/routerServiceMonitor +# 98 -rw-r--r-- cloud_scripts/etc/logrotate.d/ppp +# 148 -rw-r--r-- cloud_scripts/etc/logrotate.d/apache2 +# 517 -rw-r--r-- cloud_scripts/etc/logrotate.d/rsyslog +# 194 -rw-r--r-- cloud_scripts/etc/logrotate.d/haproxy +# 861 -rwxr-xr-x cloud_scripts/etc/profile.d/cloud.sh +# 83 -rw-r--r-- cloud_scripts/etc/cloud-nic.rules +# 483 -rw-r--r-- cloud_scripts/etc/haproxy/haproxy.cfg +# 696320 -rw-r--r-- cloud_scripts/usr/share/cloud/cloud-scripts.tar +# 253 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0003.json +# 77 -rw-r--r-- cloud_scripts/opt/cloud/testdata/vmp0001.json +# 267 -rw-r--r-- cloud_scripts/opt/cloud/testdata/gn0001.json +# 250 -rw-r--r-- cloud_scripts/opt/cloud/testdata/dhcp0001.json +# 1405 -rw-r--r-- cloud_scripts/opt/cloud/testdata/acl0001.json +# 70 -rw-r--r-- cloud_scripts/opt/cloud/testdata/README +# 254 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0001.json +# 1062 -rwxr-xr-x cloud_scripts/opt/cloud/testdata/test.sh +# 254 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0002.json +# 380 -rw-r--r-- cloud_scripts/opt/cloud/testdata/s2s0001.json +# 1177 -rw-r--r-- cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ +# 1357 -rwxr-xr-x cloud_scripts/opt/cloud/templates/checkrouter.sh.templ +# 853 -rwxr-xr-x cloud_scripts/opt/cloud/templates/heartbeat.sh.templ +# 15888 -rw-r--r-- cloud_scripts/opt/cloud/templates/conntrackd.conf.templ +# 2037 -rwxr-xr-x cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ +# 822 -rw-r--r-- cloud_scripts/opt/cloud/templates/check_bumpup.sh +# 1429 -rw-r--r-- cloud_scripts/opt/cloud/templates/keepalived.conf.templ +# 1792 -rwxr-xr-x cloud_scripts/opt/cloud/bin/prepare_pxe.sh +# 3239 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_forwardingrules.py +# 3377 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_netusage.sh +# 45920 -rwxr-xr-x cloud_scripts/opt/cloud/bin/configure.py +# 1126 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vmp.py +# 1526 -rwxr-xr-x cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh +# 2725 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vr_cfg.sh +# 2346 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_snat.sh +# 3043 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_staticroute.sh +# 5587 -rwxr-xr-x cloud_scripts/opt/cloud/bin/baremetal-vr.py +# 1141 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_firewallrules.py +# 3478 -rwxr-xr-x cloud_scripts/opt/cloud/bin/netusage.sh +# 2294 -rwxr-xr-x cloud_scripts/opt/cloud/bin/monitor_service.sh +# 2581 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_ip.py +# 824 -rwxr-xr-x cloud_scripts/opt/cloud/bin/bumpup_priority.sh +# 1706 -rwxr-xr-x cloud_scripts/opt/cloud/bin/getRouterAlerts.sh +# 2122 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/postinit.sh +# 2720 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/secstorage.sh +# 1442 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/ilbvm.sh +# 3885 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh +# 3355 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/router.sh +# 1578 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/elbvm.sh +# 7721 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/bootstrap.sh +# 1658 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh +# 22472 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/common.sh +# 1985 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh +# 2765 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/cloud-early-config +# 1002 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/default.sh +# 8234 -rwxr-xr-x cloud_scripts/opt/cloud/bin/loadbalancer.sh +# 1717 -rwxr-xr-x cloud_scripts/opt/cloud/bin/baremetal_snat.sh +# 1469 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vpnusers.py +# 13492 -rwxr-xr-x cloud_scripts/opt/cloud/bin/merge.py +# 2040 -rwxr-xr-x cloud_scripts/opt/cloud/bin/master.py +# 1663 -rwxr-xr-x cloud_scripts/opt/cloud/bin/set_redundant.py +# 1178 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checks2svpn.sh +# 994 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py +# 952 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_staticroutes.py +# 996 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py +# 7020 -rwxr-xr-x cloud_scripts/opt/cloud/bin/passwd_server_ip.py +# 881 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_network_acl.py +# 986 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cleanup.sh +# 1016 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_loadbalancer.py +# 1849 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_func.sh +# 8809 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDhcp.py +# 16789 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRedundant.py +# 7644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsHelper.py +# 2545 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py +# 3681 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsMonitor.py +# 11100 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py +# 4989 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRoute.py +# 1655 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py +# 3393 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py +# 4159 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsApp.py +# 6133 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsFile.py +# 785 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/__init__.py +# 29236 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsAddress.py +# 2156 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsProcess.py +# 3179 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsConfig.py +# 4808 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDatabag.py +# 2192 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRule.py +# 4723 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vmdata.py +# 4478 -rwxr-xr-x cloud_scripts/opt/cloud/bin/get_diagnostics_files.py +# 1445 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checkrouter.sh +# 5644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ilb.sh +# 924 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh +# 1525 -rwxr-xr-x cloud_scripts/opt/cloud/bin/savepassword.sh +# 2632 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cloud-nic.sh +# 8769 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ipsectunnel.sh +# 13401 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ipassoc.sh +# 7961 -rwxr-xr-x cloud_scripts/opt/cloud/bin/line_edit.py +# 1449 -rwxr-xr-x cloud_scripts/opt/cloud/bin/get_template_version.sh +# 5136 -rwxr-xr-x cloud_scripts/opt/cloud/bin/update_config.py +# 5502 -rwxr-xr-x cloud_scripts/opt/cloud/bin/edithosts.sh +# 2012 -rwxr-xr-x cloud_scripts/opt/cloud/bin/diagnostics.py +# 1541 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_monitorservice.py +# 6986 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpn_l2tp.sh +# 1401 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_guestnetwork.py +# 892 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vmdata.py +# 4359 -rwxr-xr-x cloud_scripts/opt/cloud/bin/dnsmasq.sh +# 1533 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_dhcp.py +# 1045 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_cmdline.py +# 253 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0003.json +# 77 -rw-r--r-- cloud_scripts/opt/cloud/testdata/vmp0001.json +# 267 -rw-r--r-- cloud_scripts/opt/cloud/testdata/gn0001.json +# 250 -rw-r--r-- cloud_scripts/opt/cloud/testdata/dhcp0001.json +# 1405 -rw-r--r-- cloud_scripts/opt/cloud/testdata/acl0001.json +# 70 -rw-r--r-- cloud_scripts/opt/cloud/testdata/README +# 254 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0001.json +# 1062 -rwxr-xr-x cloud_scripts/opt/cloud/testdata/test.sh +# 254 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0002.json +# 380 -rw-r--r-- cloud_scripts/opt/cloud/testdata/s2s0001.json +# 1177 -rw-r--r-- cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ +# 1357 -rwxr-xr-x cloud_scripts/opt/cloud/templates/checkrouter.sh.templ +# 853 -rwxr-xr-x cloud_scripts/opt/cloud/templates/heartbeat.sh.templ +# 15888 -rw-r--r-- cloud_scripts/opt/cloud/templates/conntrackd.conf.templ +# 2037 -rwxr-xr-x cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ +# 822 -rw-r--r-- cloud_scripts/opt/cloud/templates/check_bumpup.sh +# 1429 -rw-r--r-- cloud_scripts/opt/cloud/templates/keepalived.conf.templ +# 1792 -rwxr-xr-x cloud_scripts/opt/cloud/bin/prepare_pxe.sh +# 3239 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_forwardingrules.py +# 3377 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_netusage.sh +# 45920 -rwxr-xr-x cloud_scripts/opt/cloud/bin/configure.py +# 1126 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vmp.py +# 1526 -rwxr-xr-x cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh +# 2725 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vr_cfg.sh +# 2346 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_snat.sh +# 3043 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_staticroute.sh +# 5587 -rwxr-xr-x cloud_scripts/opt/cloud/bin/baremetal-vr.py +# 1141 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_firewallrules.py +# 3478 -rwxr-xr-x cloud_scripts/opt/cloud/bin/netusage.sh +# 2294 -rwxr-xr-x cloud_scripts/opt/cloud/bin/monitor_service.sh +# 2581 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_ip.py +# 824 -rwxr-xr-x cloud_scripts/opt/cloud/bin/bumpup_priority.sh +# 1706 -rwxr-xr-x cloud_scripts/opt/cloud/bin/getRouterAlerts.sh +# 2122 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/postinit.sh +# 2720 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/secstorage.sh +# 1442 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/ilbvm.sh +# 3885 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh +# 3355 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/router.sh +# 1578 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/elbvm.sh +# 7721 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/bootstrap.sh +# 1658 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh +# 22472 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/common.sh +# 1985 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh +# 2765 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/cloud-early-config +# 1002 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/default.sh +# 8234 -rwxr-xr-x cloud_scripts/opt/cloud/bin/loadbalancer.sh +# 1717 -rwxr-xr-x cloud_scripts/opt/cloud/bin/baremetal_snat.sh +# 1469 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vpnusers.py +# 13492 -rwxr-xr-x cloud_scripts/opt/cloud/bin/merge.py +# 2040 -rwxr-xr-x cloud_scripts/opt/cloud/bin/master.py +# 1663 -rwxr-xr-x cloud_scripts/opt/cloud/bin/set_redundant.py +# 1178 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checks2svpn.sh +# 994 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py +# 952 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_staticroutes.py +# 996 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py +# 7020 -rwxr-xr-x cloud_scripts/opt/cloud/bin/passwd_server_ip.py +# 881 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_network_acl.py +# 986 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cleanup.sh +# 1016 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_loadbalancer.py +# 1849 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_func.sh +# 8809 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDhcp.py +# 16789 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRedundant.py +# 7644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsHelper.py +# 2545 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py +# 3681 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsMonitor.py +# 11100 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py +# 4989 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRoute.py +# 1655 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py +# 3393 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py +# 4159 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsApp.py +# 6133 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsFile.py +# 785 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/__init__.py +# 29236 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsAddress.py +# 2156 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsProcess.py +# 3179 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsConfig.py +# 4808 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDatabag.py +# 2192 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRule.py +# 4723 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vmdata.py +# 4478 -rwxr-xr-x cloud_scripts/opt/cloud/bin/get_diagnostics_files.py +# 1445 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checkrouter.sh +# 5644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ilb.sh +# 924 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh +# 1525 -rwxr-xr-x cloud_scripts/opt/cloud/bin/savepassword.sh +# 2632 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cloud-nic.sh +# 8769 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ipsectunnel.sh +# 13401 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ipassoc.sh +# 7961 -rwxr-xr-x cloud_scripts/opt/cloud/bin/line_edit.py +# 1449 -rwxr-xr-x cloud_scripts/opt/cloud/bin/get_template_version.sh +# 5136 -rwxr-xr-x cloud_scripts/opt/cloud/bin/update_config.py +# 5502 -rwxr-xr-x cloud_scripts/opt/cloud/bin/edithosts.sh +# 2012 -rwxr-xr-x cloud_scripts/opt/cloud/bin/diagnostics.py +# 1541 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_monitorservice.py +# 6986 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpn_l2tp.sh +# 1401 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_guestnetwork.py +# 892 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vmdata.py +# 4359 -rwxr-xr-x cloud_scripts/opt/cloud/bin/dnsmasq.sh +# 1533 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_dhcp.py +# 1045 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_cmdline.py +# 253 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0003.json +# 77 -rw-r--r-- cloud_scripts/opt/cloud/testdata/vmp0001.json +# 267 -rw-r--r-- cloud_scripts/opt/cloud/testdata/gn0001.json +# 250 -rw-r--r-- cloud_scripts/opt/cloud/testdata/dhcp0001.json +# 1405 -rw-r--r-- cloud_scripts/opt/cloud/testdata/acl0001.json +# 70 -rw-r--r-- cloud_scripts/opt/cloud/testdata/README +# 254 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0001.json +# 1062 -rwxr-xr-x cloud_scripts/opt/cloud/testdata/test.sh +# 254 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0002.json +# 380 -rw-r--r-- cloud_scripts/opt/cloud/testdata/s2s0001.json +# 253 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0003.json +# 77 -rw-r--r-- cloud_scripts/opt/cloud/testdata/vmp0001.json +# 267 -rw-r--r-- cloud_scripts/opt/cloud/testdata/gn0001.json +# 250 -rw-r--r-- cloud_scripts/opt/cloud/testdata/dhcp0001.json +# 1405 -rw-r--r-- cloud_scripts/opt/cloud/testdata/acl0001.json +# 70 -rw-r--r-- cloud_scripts/opt/cloud/testdata/README +# 254 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0001.json +# 1062 -rwxr-xr-x cloud_scripts/opt/cloud/testdata/test.sh +# 254 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0002.json +# 380 -rw-r--r-- cloud_scripts/opt/cloud/testdata/s2s0001.json +# 1177 -rw-r--r-- cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ +# 1357 -rwxr-xr-x cloud_scripts/opt/cloud/templates/checkrouter.sh.templ +# 853 -rwxr-xr-x cloud_scripts/opt/cloud/templates/heartbeat.sh.templ +# 15888 -rw-r--r-- cloud_scripts/opt/cloud/templates/conntrackd.conf.templ +# 2037 -rwxr-xr-x cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ +# 822 -rw-r--r-- cloud_scripts/opt/cloud/templates/check_bumpup.sh +# 1429 -rw-r--r-- cloud_scripts/opt/cloud/templates/keepalived.conf.templ +# 1177 -rw-r--r-- cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ +# 1357 -rwxr-xr-x cloud_scripts/opt/cloud/templates/checkrouter.sh.templ +# 853 -rwxr-xr-x cloud_scripts/opt/cloud/templates/heartbeat.sh.templ +# 15888 -rw-r--r-- cloud_scripts/opt/cloud/templates/conntrackd.conf.templ +# 2037 -rwxr-xr-x cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ +# 822 -rw-r--r-- cloud_scripts/opt/cloud/templates/check_bumpup.sh +# 1429 -rw-r--r-- cloud_scripts/opt/cloud/templates/keepalived.conf.templ +# 1792 -rwxr-xr-x cloud_scripts/opt/cloud/bin/prepare_pxe.sh +# 3239 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_forwardingrules.py +# 3377 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_netusage.sh +# 45920 -rwxr-xr-x cloud_scripts/opt/cloud/bin/configure.py +# 1126 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vmp.py +# 1526 -rwxr-xr-x cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh +# 2725 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vr_cfg.sh +# 2346 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_snat.sh +# 3043 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_staticroute.sh +# 5587 -rwxr-xr-x cloud_scripts/opt/cloud/bin/baremetal-vr.py +# 1141 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_firewallrules.py +# 3478 -rwxr-xr-x cloud_scripts/opt/cloud/bin/netusage.sh +# 2294 -rwxr-xr-x cloud_scripts/opt/cloud/bin/monitor_service.sh +# 2581 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_ip.py +# 824 -rwxr-xr-x cloud_scripts/opt/cloud/bin/bumpup_priority.sh +# 1706 -rwxr-xr-x cloud_scripts/opt/cloud/bin/getRouterAlerts.sh +# 2122 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/postinit.sh +# 2720 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/secstorage.sh +# 1442 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/ilbvm.sh +# 3885 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh +# 3355 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/router.sh +# 1578 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/elbvm.sh +# 7721 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/bootstrap.sh +# 1658 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh +# 22472 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/common.sh +# 1985 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh +# 2765 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/cloud-early-config +# 1002 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/default.sh +# 8234 -rwxr-xr-x cloud_scripts/opt/cloud/bin/loadbalancer.sh +# 1717 -rwxr-xr-x cloud_scripts/opt/cloud/bin/baremetal_snat.sh +# 1469 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vpnusers.py +# 13492 -rwxr-xr-x cloud_scripts/opt/cloud/bin/merge.py +# 2040 -rwxr-xr-x cloud_scripts/opt/cloud/bin/master.py +# 1663 -rwxr-xr-x cloud_scripts/opt/cloud/bin/set_redundant.py +# 1178 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checks2svpn.sh +# 994 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py +# 952 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_staticroutes.py +# 996 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py +# 7020 -rwxr-xr-x cloud_scripts/opt/cloud/bin/passwd_server_ip.py +# 881 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_network_acl.py +# 986 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cleanup.sh +# 1016 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_loadbalancer.py +# 1849 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_func.sh +# 8809 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDhcp.py +# 16789 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRedundant.py +# 7644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsHelper.py +# 2545 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py +# 3681 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsMonitor.py +# 11100 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py +# 4989 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRoute.py +# 1655 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py +# 3393 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py +# 4159 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsApp.py +# 6133 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsFile.py +# 785 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/__init__.py +# 29236 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsAddress.py +# 2156 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsProcess.py +# 3179 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsConfig.py +# 4808 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDatabag.py +# 2192 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRule.py +# 4723 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vmdata.py +# 4478 -rwxr-xr-x cloud_scripts/opt/cloud/bin/get_diagnostics_files.py +# 1445 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checkrouter.sh +# 5644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ilb.sh +# 924 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh +# 1525 -rwxr-xr-x cloud_scripts/opt/cloud/bin/savepassword.sh +# 2632 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cloud-nic.sh +# 8769 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ipsectunnel.sh +# 13401 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ipassoc.sh +# 7961 -rwxr-xr-x cloud_scripts/opt/cloud/bin/line_edit.py +# 1449 -rwxr-xr-x cloud_scripts/opt/cloud/bin/get_template_version.sh +# 5136 -rwxr-xr-x cloud_scripts/opt/cloud/bin/update_config.py +# 5502 -rwxr-xr-x cloud_scripts/opt/cloud/bin/edithosts.sh +# 2012 -rwxr-xr-x cloud_scripts/opt/cloud/bin/diagnostics.py +# 1541 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_monitorservice.py +# 6986 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpn_l2tp.sh +# 1401 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_guestnetwork.py +# 892 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vmdata.py +# 4359 -rwxr-xr-x cloud_scripts/opt/cloud/bin/dnsmasq.sh +# 1533 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_dhcp.py +# 1045 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_cmdline.py +# 1792 -rwxr-xr-x cloud_scripts/opt/cloud/bin/prepare_pxe.sh +# 3239 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_forwardingrules.py +# 3377 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_netusage.sh +# 45920 -rwxr-xr-x cloud_scripts/opt/cloud/bin/configure.py +# 1126 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vmp.py +# 1526 -rwxr-xr-x cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh +# 2725 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vr_cfg.sh +# 2346 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_snat.sh +# 3043 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_staticroute.sh +# 5587 -rwxr-xr-x cloud_scripts/opt/cloud/bin/baremetal-vr.py +# 1141 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_firewallrules.py +# 3478 -rwxr-xr-x cloud_scripts/opt/cloud/bin/netusage.sh +# 2294 -rwxr-xr-x cloud_scripts/opt/cloud/bin/monitor_service.sh +# 2581 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_ip.py +# 824 -rwxr-xr-x cloud_scripts/opt/cloud/bin/bumpup_priority.sh +# 1706 -rwxr-xr-x cloud_scripts/opt/cloud/bin/getRouterAlerts.sh +# 2122 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/postinit.sh +# 2720 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/secstorage.sh +# 1442 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/ilbvm.sh +# 3885 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh +# 3355 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/router.sh +# 1578 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/elbvm.sh +# 7721 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/bootstrap.sh +# 1658 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh +# 22472 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/common.sh +# 1985 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh +# 2765 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/cloud-early-config +# 1002 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/default.sh +# 2122 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/postinit.sh +# 2720 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/secstorage.sh +# 1442 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/ilbvm.sh +# 3885 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh +# 3355 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/router.sh +# 1578 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/elbvm.sh +# 7721 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/bootstrap.sh +# 1658 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh +# 22472 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/common.sh +# 1985 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh +# 2765 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/cloud-early-config +# 1002 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/default.sh +# 8234 -rwxr-xr-x cloud_scripts/opt/cloud/bin/loadbalancer.sh +# 1717 -rwxr-xr-x cloud_scripts/opt/cloud/bin/baremetal_snat.sh +# 1469 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vpnusers.py +# 13492 -rwxr-xr-x cloud_scripts/opt/cloud/bin/merge.py +# 2040 -rwxr-xr-x cloud_scripts/opt/cloud/bin/master.py +# 1663 -rwxr-xr-x cloud_scripts/opt/cloud/bin/set_redundant.py +# 1178 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checks2svpn.sh +# 994 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py +# 952 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_staticroutes.py +# 996 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py +# 7020 -rwxr-xr-x cloud_scripts/opt/cloud/bin/passwd_server_ip.py +# 881 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_network_acl.py +# 986 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cleanup.sh +# 1016 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_loadbalancer.py +# 1849 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_func.sh +# 8809 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDhcp.py +# 16789 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRedundant.py +# 7644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsHelper.py +# 2545 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py +# 3681 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsMonitor.py +# 11100 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py +# 4989 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRoute.py +# 1655 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py +# 3393 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py +# 4159 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsApp.py +# 6133 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsFile.py +# 785 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/__init__.py +# 29236 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsAddress.py +# 2156 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsProcess.py +# 3179 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsConfig.py +# 4808 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDatabag.py +# 2192 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRule.py +# 8809 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDhcp.py +# 16789 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRedundant.py +# 7644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsHelper.py +# 2545 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py +# 3681 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsMonitor.py +# 11100 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py +# 4989 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRoute.py +# 1655 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py +# 3393 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py +# 4159 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsApp.py +# 6133 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsFile.py +# 785 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/__init__.py +# 29236 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsAddress.py +# 2156 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsProcess.py +# 3179 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsConfig.py +# 4808 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDatabag.py +# 2192 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRule.py +# 4723 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vmdata.py +# 4478 -rwxr-xr-x cloud_scripts/opt/cloud/bin/get_diagnostics_files.py +# 1445 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checkrouter.sh +# 5644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ilb.sh +# 924 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh +# 1525 -rwxr-xr-x cloud_scripts/opt/cloud/bin/savepassword.sh +# 2632 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cloud-nic.sh +# 8769 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ipsectunnel.sh +# 13401 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ipassoc.sh +# 7961 -rwxr-xr-x cloud_scripts/opt/cloud/bin/line_edit.py +# 1449 -rwxr-xr-x cloud_scripts/opt/cloud/bin/get_template_version.sh +# 5136 -rwxr-xr-x cloud_scripts/opt/cloud/bin/update_config.py +# 5502 -rwxr-xr-x cloud_scripts/opt/cloud/bin/edithosts.sh +# 2012 -rwxr-xr-x cloud_scripts/opt/cloud/bin/diagnostics.py +# 1541 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_monitorservice.py +# 6986 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpn_l2tp.sh +# 1401 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_guestnetwork.py +# 892 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vmdata.py +# 4359 -rwxr-xr-x cloud_scripts/opt/cloud/bin/dnsmasq.sh +# 1533 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_dhcp.py +# 1045 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_cmdline.py +# 1454 -rwxr-xr-x cloud_scripts/root/reconfigLB.sh +# 12747 -rwxr-xr-x cloud_scripts/root/monitorServices.py +# 3349 -rw-r--r-- cloud_scripts/root/health_checks/iptables_check.py +# 1966 -rw-r--r-- cloud_scripts/root/health_checks/memory_usage_check.py +# 5274 -rw-r--r-- cloud_scripts/root/health_checks/haproxy_check.py +# 2773 -rw-r--r-- cloud_scripts/root/health_checks/router_version_check.py +# 1865 -rw-r--r-- cloud_scripts/root/health_checks/utility/sharedFunctions.py +# 864 -rw-r--r-- cloud_scripts/root/health_checks/utility/__init__.py +# 1626 -rw-r--r-- cloud_scripts/root/health_checks/disk_space_check.py +# 1869 -rw-r--r-- cloud_scripts/root/health_checks/gateways_check.py +# 942 -rw-r--r-- cloud_scripts/root/health_checks/__init__.py +# 1972 -rw-r--r-- cloud_scripts/root/health_checks/dns_check.py +# 2078 -rw-r--r-- cloud_scripts/root/health_checks/cpu_usage_check.py +# 2386 -rwxr-xr-x cloud_scripts/root/health_checks/dhcp_check.py +# 3567 -rw-r--r-- cloud_scripts/root/func.sh +# 1461 -rwxr-xr-x cloud_scripts/root/clearUsageRules.sh +# 1454 -rwxr-xr-x cloud_scripts/root/reconfigLB.sh +# 12747 -rwxr-xr-x cloud_scripts/root/monitorServices.py +# 3349 -rw-r--r-- cloud_scripts/root/health_checks/iptables_check.py +# 1966 -rw-r--r-- cloud_scripts/root/health_checks/memory_usage_check.py +# 5274 -rw-r--r-- cloud_scripts/root/health_checks/haproxy_check.py +# 2773 -rw-r--r-- cloud_scripts/root/health_checks/router_version_check.py +# 1865 -rw-r--r-- cloud_scripts/root/health_checks/utility/sharedFunctions.py +# 864 -rw-r--r-- cloud_scripts/root/health_checks/utility/__init__.py +# 1626 -rw-r--r-- cloud_scripts/root/health_checks/disk_space_check.py +# 1869 -rw-r--r-- cloud_scripts/root/health_checks/gateways_check.py +# 942 -rw-r--r-- cloud_scripts/root/health_checks/__init__.py +# 1972 -rw-r--r-- cloud_scripts/root/health_checks/dns_check.py +# 2078 -rw-r--r-- cloud_scripts/root/health_checks/cpu_usage_check.py +# 2386 -rwxr-xr-x cloud_scripts/root/health_checks/dhcp_check.py +# 3349 -rw-r--r-- cloud_scripts/root/health_checks/iptables_check.py +# 1966 -rw-r--r-- cloud_scripts/root/health_checks/memory_usage_check.py +# 5274 -rw-r--r-- cloud_scripts/root/health_checks/haproxy_check.py +# 2773 -rw-r--r-- cloud_scripts/root/health_checks/router_version_check.py +# 1865 -rw-r--r-- cloud_scripts/root/health_checks/utility/sharedFunctions.py +# 864 -rw-r--r-- cloud_scripts/root/health_checks/utility/__init__.py +# 1865 -rw-r--r-- cloud_scripts/root/health_checks/utility/sharedFunctions.py +# 864 -rw-r--r-- cloud_scripts/root/health_checks/utility/__init__.py +# 1626 -rw-r--r-- cloud_scripts/root/health_checks/disk_space_check.py +# 1869 -rw-r--r-- cloud_scripts/root/health_checks/gateways_check.py +# 942 -rw-r--r-- cloud_scripts/root/health_checks/__init__.py +# 1972 -rw-r--r-- cloud_scripts/root/health_checks/dns_check.py +# 2078 -rw-r--r-- cloud_scripts/root/health_checks/cpu_usage_check.py +# 2386 -rwxr-xr-x cloud_scripts/root/health_checks/dhcp_check.py +# 3567 -rw-r--r-- cloud_scripts/root/func.sh +# 1461 -rwxr-xr-x cloud_scripts/root/clearUsageRules.sh +# 1425 -rw-r--r-- cloud_scripts/var/www/html/latest/.htaccess +# 17 -rw-r--r-- cloud_scripts/var/www/html/userdata/.htaccess +# 1425 -rw-r--r-- cloud_scripts/var/www/html/latest/.htaccess +# 17 -rw-r--r-- cloud_scripts/var/www/html/userdata/.htaccess +# 1425 -rw-r--r-- cloud_scripts/var/www/html/latest/.htaccess +# 17 -rw-r--r-- cloud_scripts/var/www/html/userdata/.htaccess +# 1425 -rw-r--r-- cloud_scripts/var/www/html/latest/.htaccess +# 1425 -rw-r--r-- cloud_scripts/var/www/html/latest/.htaccess +# 17 -rw-r--r-- cloud_scripts/var/www/html/userdata/.htaccess +# 17 -rw-r--r-- cloud_scripts/var/www/html/userdata/.htaccess +# 94 -rw-r--r-- cloud_scripts/etc/ipsec.conf +# 80 -rw-r--r-- cloud_scripts/etc/systemd/journald.conf +# 156 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service +# 143 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service +# 298 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud.service +# 280 -rw-r--r-- cloud_scripts/etc/systemd/system/open-vm-tools.service +# 257 -rw-r--r-- cloud_scripts/etc/systemd/system/baremetal-vr.service +# 398 -rw-r--r-- cloud_scripts/etc/systemd/system/xe-daemon.service +# 190 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service +# 348 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-early-config.service +# 244 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-password-server@.service +# 287 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-postinit.service +# 1731 -rw-r--r-- cloud_scripts/etc/iptables/rules +# 1601 -rw-r--r-- cloud_scripts/etc/iptables/iptables-consoleproxy +# 2348 -rw-r--r-- cloud_scripts/etc/iptables/iptables-router +# 1465 -rw-r--r-- cloud_scripts/etc/iptables/iptables-vpcrouter +# 2348 -rw-r--r-- cloud_scripts/etc/iptables/iptables-dhcpsrvr +# 1256 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-elbvm +# 1375 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-secstorage +# 1192 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-ilbvm +# 897 -rw-r--r-- cloud_scripts/etc/iptables/rt_tables_init +# 2049 -rw-r--r-- cloud_scripts/etc/sysctl.conf +# 139 -rw-r--r-- cloud_scripts/etc/xl2tpd/xl2tpd.conf +# 25321 -rw-r--r-- cloud_scripts/etc/dnsmasq.conf.tmpl +# 107 -rwxr-xr-x cloud_scripts/etc/cron.daily/clear_cache +# 477 -rw-r--r-- cloud_scripts/etc/vmware-tools/tools.conf +# 507 -rw-r--r-- cloud_scripts/etc/logrotate.conf +# 3603 -rw-r--r-- cloud_scripts/etc/ssh/sshd_config +# 141 -rw-r--r-- cloud_scripts/etc/ppp/options.xl2tpd +# 1234 -rw-r--r-- cloud_scripts/etc/ipsec.d/l2tp.conf +# 2298 -rw-r--r-- cloud_scripts/etc/rsyslog.conf +# 801 -rw-r--r-- cloud_scripts/etc/modprobe.d/pcspkr.conf +# 807 -rw-r--r-- cloud_scripts/etc/modprobe.d/aesni_intel.conf +# 183 -rwxr-xr-x cloud_scripts/etc/cron.hourly/clear_cache +# 54 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/security.conf +# 669 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf +# 8 -rw-r--r-- cloud_scripts/etc/apache2/httpd.conf +# 9955 -rw-r--r-- cloud_scripts/etc/apache2/vhost.template +# 17942 -rw-r--r-- cloud_scripts/etc/vpcdnsmasq.conf +# 80 -rw-r--r-- cloud_scripts/etc/ipsec.secrets +# 272 -rw-r--r-- cloud_scripts/etc/logrotate.d/dnsmasq +# 1124 -rw-r--r-- cloud_scripts/etc/logrotate.d/cloud +# 263 -rw-r--r-- cloud_scripts/etc/logrotate.d/conntrackd +# 922 -rw-r--r-- cloud_scripts/etc/logrotate.d/monitor +# 935 -rw-r--r-- cloud_scripts/etc/logrotate.d/routerServiceMonitor +# 98 -rw-r--r-- cloud_scripts/etc/logrotate.d/ppp +# 148 -rw-r--r-- cloud_scripts/etc/logrotate.d/apache2 +# 517 -rw-r--r-- cloud_scripts/etc/logrotate.d/rsyslog +# 194 -rw-r--r-- cloud_scripts/etc/logrotate.d/haproxy +# 861 -rwxr-xr-x cloud_scripts/etc/profile.d/cloud.sh +# 83 -rw-r--r-- cloud_scripts/etc/cloud-nic.rules +# 483 -rw-r--r-- cloud_scripts/etc/haproxy/haproxy.cfg +# 94 -rw-r--r-- cloud_scripts/etc/ipsec.conf +# 80 -rw-r--r-- cloud_scripts/etc/systemd/journald.conf +# 156 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service +# 143 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service +# 298 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud.service +# 280 -rw-r--r-- cloud_scripts/etc/systemd/system/open-vm-tools.service +# 257 -rw-r--r-- cloud_scripts/etc/systemd/system/baremetal-vr.service +# 398 -rw-r--r-- cloud_scripts/etc/systemd/system/xe-daemon.service +# 190 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service +# 348 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-early-config.service +# 244 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-password-server@.service +# 287 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-postinit.service +# 80 -rw-r--r-- cloud_scripts/etc/systemd/journald.conf +# 156 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service +# 143 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service +# 298 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud.service +# 280 -rw-r--r-- cloud_scripts/etc/systemd/system/open-vm-tools.service +# 257 -rw-r--r-- cloud_scripts/etc/systemd/system/baremetal-vr.service +# 398 -rw-r--r-- cloud_scripts/etc/systemd/system/xe-daemon.service +# 190 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service +# 348 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-early-config.service +# 244 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-password-server@.service +# 287 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-postinit.service +# 156 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service +# 143 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service +# 298 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud.service +# 280 -rw-r--r-- cloud_scripts/etc/systemd/system/open-vm-tools.service +# 257 -rw-r--r-- cloud_scripts/etc/systemd/system/baremetal-vr.service +# 398 -rw-r--r-- cloud_scripts/etc/systemd/system/xe-daemon.service +# 190 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service +# 348 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-early-config.service +# 244 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-password-server@.service +# 287 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-postinit.service +# 1731 -rw-r--r-- cloud_scripts/etc/iptables/rules +# 1601 -rw-r--r-- cloud_scripts/etc/iptables/iptables-consoleproxy +# 2348 -rw-r--r-- cloud_scripts/etc/iptables/iptables-router +# 1465 -rw-r--r-- cloud_scripts/etc/iptables/iptables-vpcrouter +# 2348 -rw-r--r-- cloud_scripts/etc/iptables/iptables-dhcpsrvr +# 1256 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-elbvm +# 1375 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-secstorage +# 1192 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-ilbvm +# 897 -rw-r--r-- cloud_scripts/etc/iptables/rt_tables_init +# 1731 -rw-r--r-- cloud_scripts/etc/iptables/rules +# 1601 -rw-r--r-- cloud_scripts/etc/iptables/iptables-consoleproxy +# 2348 -rw-r--r-- cloud_scripts/etc/iptables/iptables-router +# 1465 -rw-r--r-- cloud_scripts/etc/iptables/iptables-vpcrouter +# 2348 -rw-r--r-- cloud_scripts/etc/iptables/iptables-dhcpsrvr +# 1256 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-elbvm +# 1375 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-secstorage +# 1192 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-ilbvm +# 897 -rw-r--r-- cloud_scripts/etc/iptables/rt_tables_init +# 2049 -rw-r--r-- cloud_scripts/etc/sysctl.conf +# 139 -rw-r--r-- cloud_scripts/etc/xl2tpd/xl2tpd.conf +# 139 -rw-r--r-- cloud_scripts/etc/xl2tpd/xl2tpd.conf +# 25321 -rw-r--r-- cloud_scripts/etc/dnsmasq.conf.tmpl +# 107 -rwxr-xr-x cloud_scripts/etc/cron.daily/clear_cache +# 107 -rwxr-xr-x cloud_scripts/etc/cron.daily/clear_cache +# 477 -rw-r--r-- cloud_scripts/etc/vmware-tools/tools.conf +# 477 -rw-r--r-- cloud_scripts/etc/vmware-tools/tools.conf +# 507 -rw-r--r-- cloud_scripts/etc/logrotate.conf +# 3603 -rw-r--r-- cloud_scripts/etc/ssh/sshd_config +# 3603 -rw-r--r-- cloud_scripts/etc/ssh/sshd_config +# 141 -rw-r--r-- cloud_scripts/etc/ppp/options.xl2tpd +# 141 -rw-r--r-- cloud_scripts/etc/ppp/options.xl2tpd +# 1234 -rw-r--r-- cloud_scripts/etc/ipsec.d/l2tp.conf +# 1234 -rw-r--r-- cloud_scripts/etc/ipsec.d/l2tp.conf +# 2298 -rw-r--r-- cloud_scripts/etc/rsyslog.conf +# 801 -rw-r--r-- cloud_scripts/etc/modprobe.d/pcspkr.conf +# 807 -rw-r--r-- cloud_scripts/etc/modprobe.d/aesni_intel.conf +# 801 -rw-r--r-- cloud_scripts/etc/modprobe.d/pcspkr.conf +# 807 -rw-r--r-- cloud_scripts/etc/modprobe.d/aesni_intel.conf +# 183 -rwxr-xr-x cloud_scripts/etc/cron.hourly/clear_cache +# 183 -rwxr-xr-x cloud_scripts/etc/cron.hourly/clear_cache +# 54 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/security.conf +# 669 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf +# 8 -rw-r--r-- cloud_scripts/etc/apache2/httpd.conf +# 9955 -rw-r--r-- cloud_scripts/etc/apache2/vhost.template +# 54 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/security.conf +# 669 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf +# 54 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/security.conf +# 669 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf +# 669 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf +# 8 -rw-r--r-- cloud_scripts/etc/apache2/httpd.conf +# 9955 -rw-r--r-- cloud_scripts/etc/apache2/vhost.template +# 17942 -rw-r--r-- cloud_scripts/etc/vpcdnsmasq.conf +# 80 -rw-r--r-- cloud_scripts/etc/ipsec.secrets +# 272 -rw-r--r-- cloud_scripts/etc/logrotate.d/dnsmasq +# 1124 -rw-r--r-- cloud_scripts/etc/logrotate.d/cloud +# 263 -rw-r--r-- cloud_scripts/etc/logrotate.d/conntrackd +# 922 -rw-r--r-- cloud_scripts/etc/logrotate.d/monitor +# 935 -rw-r--r-- cloud_scripts/etc/logrotate.d/routerServiceMonitor +# 98 -rw-r--r-- cloud_scripts/etc/logrotate.d/ppp +# 148 -rw-r--r-- cloud_scripts/etc/logrotate.d/apache2 +# 517 -rw-r--r-- cloud_scripts/etc/logrotate.d/rsyslog +# 194 -rw-r--r-- cloud_scripts/etc/logrotate.d/haproxy +# 272 -rw-r--r-- cloud_scripts/etc/logrotate.d/dnsmasq +# 1124 -rw-r--r-- cloud_scripts/etc/logrotate.d/cloud +# 263 -rw-r--r-- cloud_scripts/etc/logrotate.d/conntrackd +# 922 -rw-r--r-- cloud_scripts/etc/logrotate.d/monitor +# 935 -rw-r--r-- cloud_scripts/etc/logrotate.d/routerServiceMonitor +# 98 -rw-r--r-- cloud_scripts/etc/logrotate.d/ppp +# 148 -rw-r--r-- cloud_scripts/etc/logrotate.d/apache2 +# 517 -rw-r--r-- cloud_scripts/etc/logrotate.d/rsyslog +# 194 -rw-r--r-- cloud_scripts/etc/logrotate.d/haproxy +# 861 -rwxr-xr-x cloud_scripts/etc/profile.d/cloud.sh +# 861 -rwxr-xr-x cloud_scripts/etc/profile.d/cloud.sh +# 83 -rw-r--r-- cloud_scripts/etc/cloud-nic.rules +# 483 -rw-r--r-- cloud_scripts/etc/haproxy/haproxy.cfg +# 483 -rw-r--r-- cloud_scripts/etc/haproxy/haproxy.cfg +# 696320 -rw-r--r-- cloud_scripts/usr/share/cloud/cloud-scripts.tar +# 696320 -rw-r--r-- cloud_scripts/usr/share/cloud/cloud-scripts.tar +# 696320 -rw-r--r-- cloud_scripts/usr/share/cloud/cloud-scripts.tar +# 696320 -rw-r--r-- cloud_scripts/usr/share/cloud/cloud-scripts.tar +# +MD5SUM=${MD5SUM-md5sum} +f=`${MD5SUM} --version | egrep '^md5sum .*(core|text)utils'` +test -n "${f}" && md5check=true || md5check=false +${md5check} || \ + echo 'Note: not verifying md5sums. Consider installing GNU coreutils.' +if test "X$1" = "X-c" +then keep_file='' +else keep_file=true +fi +echo=echo +save_IFS="${IFS}" +IFS="${IFS}:" +gettext_dir= +locale_dir= +set_echo=false + +for dir in $PATH +do + if test -f $dir/gettext \ + && ($dir/gettext --version >/dev/null 2>&1) + then + case `$dir/gettext --version 2>&1 | sed 1q` in + *GNU*) gettext_dir=$dir + set_echo=true + break ;; + esac + fi +done + +if ${set_echo} +then + set_echo=false + for dir in $PATH + do + if test -f $dir/shar \ + && ($dir/shar --print-text-domain-dir >/dev/null 2>&1) + then + locale_dir=`$dir/shar --print-text-domain-dir` + set_echo=true + break + fi + done + + if ${set_echo} + then + TEXTDOMAINDIR=$locale_dir + export TEXTDOMAINDIR + TEXTDOMAIN=sharutils + export TEXTDOMAIN + echo="$gettext_dir/gettext -s" + fi +fi +IFS="$save_IFS" +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null +then if (echo -n test; echo 1,2,3) | grep n >/dev/null + then shar_n= shar_c=' +' + else shar_n=-n shar_c= ; fi +else shar_n= shar_c='\c' ; fi +f=shar-touch.$$ +st1=200112312359.59 +st2=123123592001.59 +st2tr=123123592001.5 # old SysV 14-char limit +st3=1231235901 + +if touch -am -t ${st1} ${f} >/dev/null 2>&1 && \ + test ! -f ${st1} && test -f ${f}; then + shar_touch='touch -am -t $1$2$3$4$5$6.$7 "$8"' + +elif touch -am ${st2} ${f} >/dev/null 2>&1 && \ + test ! -f ${st2} && test ! -f ${st2tr} && test -f ${f}; then + shar_touch='touch -am $3$4$5$6$1$2.$7 "$8"' + +elif touch -am ${st3} ${f} >/dev/null 2>&1 && \ + test ! -f ${st3} && test -f ${f}; then + shar_touch='touch -am $3$4$5$6$2 "$8"' + +else + shar_touch=: + echo + ${echo} 'WARNING: not restoring timestamps. Consider getting and +installing GNU '\''touch'\'', distributed in GNU coreutils...' + echo +fi +rm -f ${st1} ${st2} ${st2tr} ${st3} ${f} +# +if test ! -d ${lock_dir} ; then : +else ${echo} "lock directory ${lock_dir} exists" + exit 1 +fi +if mkdir ${lock_dir} +then ${echo} "x - created lock directory ${lock_dir}." +else ${echo} "x - failed to create lock directory ${lock_dir}." + exit 1 +fi +# ============= cloud_scripts/opt/cloud/testdata/ips0003.json ============== +if test ! -d 'cloud_scripts'; then + mkdir 'cloud_scripts' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts." +else ${echo} "x - failed to create directory cloud_scripts." + exit 1 +fi +fi +if test ! -d 'cloud_scripts/opt'; then + mkdir 'cloud_scripts/opt' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/opt." +else ${echo} "x - failed to create directory cloud_scripts/opt." + exit 1 +fi +fi +if test ! -d 'cloud_scripts/opt/cloud'; then + mkdir 'cloud_scripts/opt/cloud' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/opt/cloud." +else ${echo} "x - failed to create directory cloud_scripts/opt/cloud." + exit 1 +fi +fi +if test ! -d 'cloud_scripts/opt/cloud/testdata'; then + mkdir 'cloud_scripts/opt/cloud/testdata' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/opt/cloud/testdata." +else ${echo} "x - failed to create directory cloud_scripts/opt/cloud/testdata." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0003.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0003.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0003.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0003.json' && +{"ip_address": +[{"public_ip":"10.0.3.10", +"source_nat":true, +"add":true, +"one_to_one_nat":false, +"first_i_p":false, +"gateway":"10.0.3.1", +"netmask":"255.255.255.0", +"vif_mac_address":"06:cb:aa:00:00:03", +"nic_dev_id":2, +"new_nic":false}], +"type":"ips"} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0003.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0003.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0003.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0003.json': 'MD5 check failed' + ) << \SHAR_EOF +e8113ca4dc70734a2e07e4cd5aa817e7 cloud_scripts/opt/cloud/testdata/ips0003.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0003.json'` -ne 253 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0003.json' is not 253" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/vmp0001.json ============== +if test ! -d 'cloud_scripts/opt/cloud/testdata'; then + mkdir 'cloud_scripts/opt/cloud/testdata' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/opt/cloud/testdata." +else ${echo} "x - failed to create directory cloud_scripts/opt/cloud/testdata." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/vmp0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/vmp0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/vmp0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/testdata/vmp0001.json +M>R)I<%]A9&1R97-S(CHB,3/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/vmp0001.json': 'MD5 check failed' + ) << \SHAR_EOF +a3150c6241b311cbfc2180be23d1ddee cloud_scripts/opt/cloud/testdata/vmp0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/vmp0001.json'` -ne 77 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/vmp0001.json' is not 77" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/gn0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/gn0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/gn0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/gn0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/gn0001.json' && +{"add":true, +"mac_address":"02:00:56:36:00:02", +"device":"eth3", +"router_guest_ip":"172.16.1.1", +"router_guest_gateway":"172.16.1.0", +"router_guest_netmask":"255.255.255.0", +"cidr":"24", +"dns":"8.8.8.8,8.8.8.4", +"domain_name":"devcloud.local", +"type":"guestnetwork"} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/gn0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/gn0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/gn0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/gn0001.json': 'MD5 check failed' + ) << \SHAR_EOF +e790842388eb0a3f86ea0dbbcf4608eb cloud_scripts/opt/cloud/testdata/gn0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/gn0001.json'` -ne 267 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/gn0001.json' is not 267" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/dhcp0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/dhcp0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/dhcp0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' && +{ +X "host_name":"VM-58976c22-0832-451e-9ab2-039e9f27e415", +X "mac_address":"02:00:26:c3:00:02", +X "ipv4_address":"172.16.1.102", +X "ipv6_duid":"00:03:00:01:02:00:26:c3:00:02", +X "default_gateway":"172.16.1.1", +X "default_entry":true, +X "type":"dhcpentry" +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/dhcp0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/dhcp0001.json': 'MD5 check failed' + ) << \SHAR_EOF +0f44da4132b56f2ece9b36bab3213f28 cloud_scripts/opt/cloud/testdata/dhcp0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/dhcp0001.json'` -ne 250 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' is not 250" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/acl0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/acl0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/acl0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/acl0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/acl0001.json' && +{ +X "eth2": { +X "device": "eth2", +X "egress_rules": [ +X { +X "allowed": false, +X "cidr": "10.0.6.0/8", +X "first_port": 60, +X "last_port": 60, +X "type": "tcp" +X } +X ], +X "ingress_rules": [ +X { +X "allowed": true, +X "cidr": "10.0.1.0/8", +X "protocol": 41, +X "type": "protocol" +X }, +X { +X "allowed": true, +X "cidr": "10.0.4.0/8", +X "type": "all" +X }, +X { +X "allowed": true, +X "cidr": "10.0.3.0/8", +X "icmp_code": -1, +X "icmp_type": -1, +X "type": "icmp" +X }, +X { +X "allowed": true, +X "cidr": "10.0.2.0/8", +X "first_port": 40, +X "last_port": 40, +X "type": "udp" +X }, +X { +X "allowed": true, +X "cidr": "10.0.1.0/8", +X "first_port": 30, +X "last_port": 30, +X "type": "tcp" +X } +X ], +X "mac_address": "02:00:0d:7b:00:04", +X "nic_ip": "172.16.1.1", +X "nic_netmask": "24", +X "private_gateway_acl": false, +X "type": "networkacl" +X }, +X "id": "networkacl" +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/acl0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/acl0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/acl0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/acl0001.json': 'MD5 check failed' + ) << \SHAR_EOF +1ea2a1b5d6a98bc6c0fc2375de284b17 cloud_scripts/opt/cloud/testdata/acl0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/acl0001.json'` -ne 1405 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/acl0001.json' is not 1405" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/README ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/README' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/README (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/README (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/README' && +Json file used to test the provisioning scripts on virtual appliances +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/README' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/README' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/README failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/README': 'MD5 check failed' + ) << \SHAR_EOF +13e5ecf4d998c3df3cf53485d6f46ee1 cloud_scripts/opt/cloud/testdata/README +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/README'` -ne 70 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/README' is not 70" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/ips0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0001.json' && +{"ip_address": +[{"public_ip":"10.0.2.102", +"source_nat":true, +"add":true, +"one_to_one_nat":false, +"first_i_p":false, +"gateway":"10.0.2.1", +"netmask":"255.255.255.0", +"vif_mac_address":"06:cb:aa:00:00:03", +"nic_dev_id":1, +"new_nic":false}], +"type":"ips"} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0001.json': 'MD5 check failed' + ) << \SHAR_EOF +6f7337aaa605096eef31300afba0f4af cloud_scripts/opt/cloud/testdata/ips0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0001.json'` -ne 254 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0001.json' is not 254" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/test.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/test.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/test.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/test.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/test.sh' && +#!/bin/sh +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +cp /opt/cloud/testdata/* /etc/cloudstack +/opt/cloud/bin/update_config.py cmd_line.json +/opt/cloud/bin/update_config.py gn0001.json +/opt/cloud/bin/update_config.py ips0001.json +/opt/cloud/bin/update_config.py ips0002.json +/opt/cloud/bin/update_config.py ips0003.json +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/test.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/testdata/test.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/test.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/test.sh': 'MD5 check failed' + ) << \SHAR_EOF +7fbb72051fd8d3b66fd481aa51d3debe cloud_scripts/opt/cloud/testdata/test.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/test.sh'` -ne 1062 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/test.sh' is not 1062" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/ips0002.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0002.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0002.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0002.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0002.json' && +{"ip_address": +[{"public_ip":"10.0.2.103", +"source_nat":true, +"add":true, +"one_to_one_nat":false, +"first_i_p":false, +"gateway":"10.0.2.1", +"netmask":"255.255.255.0", +"vif_mac_address":"06:cb:aa:00:00:03", +"nic_dev_id":1, +"new_nic":false}], +"type":"ips"} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0002.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0002.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0002.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0002.json': 'MD5 check failed' + ) << \SHAR_EOF +12aec2bca1d88c499ee0af39c2e20ea1 cloud_scripts/opt/cloud/testdata/ips0002.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0002.json'` -ne 254 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0002.json' is not 254" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/s2s0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/s2s0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/s2s0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/s2s0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/s2s0001.json' && +{ +X "local_public_ip":"172.16.1.1", +X "local_guest_cidr":"172.16.1.0/24", +X "local_public_gateway":"172.16.1.1", +X "peer_gateway_ip":"10.200.200.1", +X "peer_guest_cidr_list":"10.0.0.0/24", +X "esp_policy":"3des-md5", +X "ike_policy":"3des-md5", +X "ipsec_psk":"vpnblabla", +X "ike_lifetime":86400, +X "esp_lifetime":3600, +X "create":true, +X "dpd":false, +X "passive":false, +X "type":"site2sitevpn" +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/s2s0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/s2s0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/s2s0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/s2s0001.json': 'MD5 check failed' + ) << \SHAR_EOF +ff589cb7ab7721a270f4cc703719c917 cloud_scripts/opt/cloud/testdata/s2s0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/s2s0001.json'` -ne 380 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/s2s0001.json' is not 380" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ ============== +if test ! -d 'cloud_scripts/opt/cloud/templates'; then + mkdir 'cloud_scripts/opt/cloud/templates' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/opt/cloud/templates." +else ${echo} "x - failed to create directory cloud_scripts/opt/cloud/templates." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +ip link|grep BROADCAST|grep -v eth0|grep -v eth1|cut -d ":" -f 2 > /tmp/iflist +while read i +do +X ip addr show $i|grep "inet " > /tmp/iplist_$i +X while read line +X do +X ip=`echo $line|cut -d " " -f 2|cut -d "/" -f 1` +X arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 +X arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 +X done < /tmp/iplist_$i +done < /tmp/iflist +sleep 1 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ': 'MD5 check failed' + ) << \SHAR_EOF +023d994f54c0955f160f127c1d85d6ae cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ'` -ne 1177 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' is not 1177" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/checkrouter.sh.templ ============== +if test ! -d 'cloud_scripts/opt/cloud/templates'; then + mkdir 'cloud_scripts/opt/cloud/templates' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/opt/cloud/templates." +else ${echo} "x - failed to create directory cloud_scripts/opt/cloud/templates." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/checkrouter.sh.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/checkrouter.sh.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +STATUS=UNKNOWN +INTERFACE=eth1 +ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g') +if [ $ROUTER_TYPE = "router" ] +then +X ROUTER_STATE=$(ip addr | grep eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi') +X STATUS=$ROUTER_STATE +else +X ROUTER_STATE=$(ip addr | grep $INTERFACE | grep state | awk '{print $9;}') +X if [ $ROUTER_STATE = "UP" ] +X then +X STATUS=MASTER +X elif [ $ROUTER_STATE = "DOWN" ] +X then +X STATUS=BACKUP +X fi +fi +X +echo "Status: ${STATUS}" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/checkrouter.sh.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ': 'MD5 check failed' + ) << \SHAR_EOF +bbd331057760019d05ead01eec5e42aa cloud_scripts/opt/cloud/templates/checkrouter.sh.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ'` -ne 1357 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' is not 1357" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/heartbeat.sh.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/heartbeat.sh.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/heartbeat.sh.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +t=$(date +%s) +echo $t > /ramdisk/rrouter/keepalived.ts +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/heartbeat.sh.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ': 'MD5 check failed' + ) << \SHAR_EOF +c006a52c775a0418870c0c50f0131ee7 cloud_scripts/opt/cloud/templates/heartbeat.sh.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ'` -ne 853 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' is not 853" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/conntrackd.conf.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/conntrackd.conf.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/conntrackd.conf.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# Synchronizer settings +# +Sync { +X Mode FTFW { +X # +X # Size of the resend queue (in objects). This is the maximum +X # number of objects that can be stored waiting to be confirmed +X # via acknoledgment. If you keep this value low, the daemon +X # will have less chances to recover state-changes under message +X # omission. On the other hand, if you keep this value high, +X # the daemon will consume more memory to store dead objects. +X # Default is 131072 objects. +X # +X # ResendQueueSize 131072 +X +X # +X # This parameter allows you to set an initial fixed timeout +X # for the committed entries when this node goes from backup +X # to primary. This mechanism provides a way to purge entries +X # that were not recovered appropriately after the specified +X # fixed timeout. If you set a low value, TCP entries in +X # Established states with no traffic may hang. For example, +X # an SSH connection without KeepAlive enabled. If not set, +X # the daemon uses an approximate timeout value calculation +X # mechanism. By default, this option is not set. +X # +X # CommitTimeout 180 +X +X # +X # If the firewall replica goes from primary to backup, +X # the conntrackd -t command is invoked in the script. +X # This command schedules a flush of the table in N seconds. +X # This is useful to purge the connection tracking table of +X # zombie entries and avoid clashes with old entries if you +X # trigger several consecutive hand-overs. Default is 60 seconds. +X # +X # PurgeTimeout 60 +X +X # Set the acknowledgement window size. If you decrease this +X # value, the number of acknowlegdments increases. More +X # acknowledgments means more overhead as conntrackd has to +X # handle more control messages. On the other hand, if you +X # increase this value, the resend queue gets more populated. +X # This results in more overhead in the queue releasing. +X # The following value is based on some practical experiments +X # measuring the cycles spent by the acknowledgment handling +X # with oprofile. If not set, default window size is 300. +X # +X # ACKWindowSize 300 +X +X # +X # This clause allows you to disable the external cache. Thus, +X # the state entries are directly injected into the kernel +X # conntrack table. As a result, you save memory in user-space +X # but you consume slots in the kernel conntrack table for +X # backup state entries. Moreover, disabling the external cache +X # means more CPU consumption. You need a Linux kernel +X # >= 2.6.29 to use this feature. By default, this clause is +X # set off. If you are installing conntrackd for first time, +X # please read the user manual and I encourage you to consider +X # using the fail-over scripts instead of enabling this option! +X # +X # DisableExternalCache Off +X } +X +X # +X # Multicast IP and interface where messages are +X # broadcasted (dedicated link). IMPORTANT: Make sure +X # that iptables accepts traffic for destination +X # 225.0.0.50, eg: +X # +X # iptables -I INPUT -d 225.0.0.50 -j ACCEPT +X # iptables -I OUTPUT -d 225.0.0.50 -j ACCEPT +X # +X Multicast { +X # +X # Multicast address: The address that you use as destination +X # in the synchronization messages. You do not have to add +X # this IP to any of your existing interfaces. If any doubt, +X # do not modify this value. +X # +X IPv4_address 225.0.0.50 +X +X # +X # The multicast group that identifies the cluster. If any +X # doubt, do not modify this value. +X # +X Group 3780 +X +X # +X # IP address of the interface that you are going to use to +X # send the synchronization messages. Remember that you must +X # use a dedicated link for the synchronization messages. +X # +X IPv4_interface [LINK_IP] +X +X # +X # The name of the interface that you are going to use to +X # send the synchronization messages. +X # +X Interface [LINK_IF] +X +X # The multicast sender uses a buffer to enqueue the packets +X # that are going to be transmitted. The default size of this +X # socket buffer is available at /proc/sys/net/core/wmem_default. +X # This value determines the chances to have an overrun in the +X # sender queue. The overrun results packet loss, thus, losing +X # state information that would have to be retransmitted. If you +X # notice some packet loss, you may want to increase the size +X # of the sender buffer. The default size is usually around +X # ~100 KBytes which is fairly small for busy firewalls. +X # +X SndSocketBuffer 1249280 +X +X # The multicast receiver uses a buffer to enqueue the packets +X # that the socket is pending to handle. The default size of this +X # socket buffer is available at /proc/sys/net/core/rmem_default. +X # This value determines the chances to have an overrun in the +X # receiver queue. The overrun results packet loss, thus, losing +X # state information that would have to be retransmitted. If you +X # notice some packet loss, you may want to increase the size of +X # the receiver buffer. The default size is usually around +X # ~100 KBytes which is fairly small for busy firewalls. +X # +X RcvSocketBuffer 1249280 +X +X # +X # Enable/Disable message checksumming. This is a good +X # property to achieve fault-tolerance. In case of doubt, do +X # not modify this value. +X # +X Checksum on +X } +X # +X # You can specify more than one dedicated link. Thus, if one dedicated +X # link fails, conntrackd can fail-over to another. Note that adding +X # more than one dedicated link does not mean that state-updates will +X # be sent to all of them. There is only one active dedicated link at +X # a given moment. The `Default' keyword indicates that this interface +X # will be selected as the initial dedicated link. You can have +X # up to 4 redundant dedicated links. Note: Use different multicast +X # groups for every redundant link. +X # +X # Multicast Default { +X # IPv4_address 225.0.0.51 +X # Group 3781 +X # IPv4_interface 192.168.100.101 +X # Interface eth3 +X # # SndSocketBuffer 1249280 +X # # RcvSocketBuffer 1249280 +X # Checksum on +X # } +X +X # +X # You can use Unicast UDP instead of Multicast to propagate events. +X # Note that you cannot use unicast UDP and Multicast at the same +X # time, you can only select one. +X # +X # UDP { +X # +X # UDP address that this firewall uses to listen to events. +X # +X # IPv4_address 192.168.2.100 +X # +X # or you may want to use an IPv6 address: +X # +X # IPv6_address fe80::215:58ff:fe28:5a27 +X +X # +X # Destination UDP address that receives events, ie. the other +X # firewall's dedicated link address. +X # +X # IPv4_Destination_Address 192.168.2.101 +X # +X # or you may want to use an IPv6 address: +X # +X # IPv6_Destination_Address fe80::2d0:59ff:fe2a:775c +X +X # +X # UDP port used +X # +X # Port 3780 +X +X # +X # The name of the interface that you are going to use to +X # send the synchronization messages. +X # +X # Interface eth2 +X +X # +X # The sender socket buffer size +X # +X # SndSocketBuffer 1249280 +X +X # +X # The receiver socket buffer size +X # +X # RcvSocketBuffer 1249280 +X +X # +X # Enable/Disable message checksumming. +X # +X # Checksum on +X # } +X +} +X +# +# General settings +# +General { +X # +X # Set the nice value of the daemon, this value goes from -20 +X # (most favorable scheduling) to 19 (least favorable). Using a +X # very low value reduces the chances to lose state-change events. +X # Default is 0 but this example file sets it to most favourable +X # scheduling as this is generally a good idea. See man nice(1) for +X # more information. +X # +X Nice -20 +X +X # +X # Select a different scheduler for the daemon, you can select between +X # RR and FIFO and the process priority (minimum is 0, maximum is 99). +X # See man sched_setscheduler(2) for more information. Using a RT +X # scheduler reduces the chances to overrun the Netlink buffer. +X # +X # Scheduler { +X # Type FIFO +X # Priority 99 +X # } +X +X # +X # Number of buckets in the cache hashtable. The bigger it is, +X # the closer it gets to O(1) at the cost of consuming more memory. +X # Read some documents about tuning hashtables for further reference. +X # +X HashSize 32768 +X +X # +X # Maximum number of conntracks, it should be double of: +X # $ cat /proc/sys/net/netfilter/nf_conntrack_max +X # since the daemon may keep some dead entries cached for possible +X # retransmission during state synchronization. +X # +X HashLimit 131072 +X +X LogFile on +X +X # +X # Syslog: on, off or a facility name (daemon (default) or local0..7) +X # Default: off +X # +X Syslog on +X +X # +X # Lockfile +X # +X LockFile /var/lock/conntrackd.lock +X +X # +X # Unix socket configuration +X # +X UNIX { +X Path /var/run/conntrackd.sock +X Backlog 20 +X } +X +X SocketBufferSize 2097152 +X SocketBufferSizeMaxGrown 8388608 +X +X # +X # Netlink event socket buffer size. If you do not specify this clause, +X # the default buffer size value in /proc/net/core/rmem_default is +X # used. This default value is usually around 100 Kbytes which is +X # fairly small for busy firewalls. This leads to event message dropping +X # and high CPU consumption. This example configuration file sets the +X # size to 2 MBytes to avoid this sort of problems. +X # +X NetlinkBufferSize 2097152 +X +X # +X # The daemon doubles the size of the netlink event socket buffer size +X # if it detects netlink event message dropping. This clause sets the +X # maximum buffer size growth that can be reached. This example file +X # sets the size to 8 MBytes. +X # +X NetlinkBufferSizeMaxGrowth 8388608 +X +X # +X # If the daemon detects that Netlink is dropping state-change events, +X # it automatically schedules a resynchronization against the Kernel +X # after 30 seconds (default value). Resynchronizations are expensive +X # in terms of CPU consumption since the daemon has to get the full +X # kernel state-table and purge state-entries that do not exist anymore. +X # Be careful of setting a very small value here. You have the following +X # choices: On (enabled, use default 30 seconds value), Off (disabled) +X # or Value (in seconds, to set a specific amount of time). If not +X # specified, the daemon assumes that this option is enabled. +X # +X # NetlinkOverrunResync On +X +X # +X # If you want reliable event reporting over Netlink, set on this +X # option. If you set on this clause, it is a good idea to set off +X # NetlinkOverrunResync. This option is off by default and you need +X # a Linux kernel >= 2.6.31. +X # +X # NetlinkEventsReliable Off +X +X # +X # By default, the daemon receives state updates following an +X # event-driven model. You can modify this behaviour by switching to +X # polling mode with the PollSecs clause. This clause tells conntrackd +X # to dump the states in the kernel every N seconds. With regards to +X # synchronization mode, the polling mode can only guarantee that +X # long-lifetime states are recovered. The main advantage of this method +X # is the reduction in the state replication at the cost of reducing the +X # chances of recovering connections. +X # +X # PollSecs 15 +X +X # +X # The daemon prioritizes the handling of state-change events coming +X # from the core. With this clause, you can set the maximum number of +X # state-change events (those coming from kernel-space) that the daemon +X # will handle after which it will handle other events coming from the +X # network or userspace. A low value improves interactivity (in terms of +X # real-time behaviour) at the cost of extra CPU consumption. +X # Default (if not set) is 100. +X # +X # EventIterationLimit 100 +X +X # +X # Event filtering: This clause allows you to filter certain traffic, +X # There are currently three filter-sets: Protocol, Address and +X # State. The filter is attached to an action that can be: Accept or +X # Ignore. Thus, you can define the event filtering policy of the +X # filter-sets in positive or negative logic depending on your needs. +X # You can select if conntrackd filters the event messages from +X # user-space or kernel-space. The kernel-space event filtering +X # saves some CPU cycles by avoiding the copy of the event message +X # from kernel-space to user-space. The kernel-space event filtering +X # is prefered, however, you require a Linux kernel >= 2.6.29 to +X # filter from kernel-space. If you want to select kernel-space +X # event filtering, use the keyword 'Kernelspace' instead of +X # 'Userspace'. +X # +X Filter From Userspace { +X # +X # Accept only certain protocols: You may want to replicate +X # the state of flows depending on their layer 4 protocol. +X # +X Protocol Accept { +X TCP +X SCTP +X DCCP +X UDP +X ICMP # This requires a Linux kernel >= 2.6.31 +X } +X +X # +X # Ignore traffic for a certain set of IP's: Usually all the +X # IP assigned to the firewall since local traffic must be +X # ignored, only forwarded connections are worth to replicate. +X # Note that these values depends on the local IPs that are +X # assigned to the firewall. +X # +X Address Ignore { +X IPv4_address 127.0.0.1 # loopback +X IPv4_address [IGNORE_IP1] +X IPv4_address [IGNORE_IP2] +X IPv4_address [IGNORE_IP3] +X #IPv4_address 192.168.0.100 # virtual IP 1 +X #IPv4_address 192.168.1.100 # virtual IP 2 +X #IPv4_address 192.168.0.1 +X #IPv4_address 192.168.1.1 +X #IPv4_address 192.168.100.100 # dedicated link ip +X # +X # You can also specify networks in format IP/cidr. +X # IPv4_address 192.168.0.0/24 +X # +X # You can also specify an IPv6 address +X # IPv6_address ::1 +X } +X +X # +X # Uncomment this line below if you want to filter by flow state. +X # This option introduces a trade-off in the replication: it +X # reduces CPU consumption at the cost of having lazy backup +X # firewall replicas. The existing TCP states are: SYN_SENT, +X # SYN_RECV, ESTABLISHED, FIN_WAIT, CLOSE_WAIT, LAST_ACK, +X # TIME_WAIT, CLOSED, LISTEN. +X # +X # State Accept { +X # ESTABLISHED CLOSED TIME_WAIT CLOSE_WAIT for TCP +X # } +X } +X +X # default debian service unit file is of Type=notify +X Systemd on +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/conntrackd.conf.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ': 'MD5 check failed' + ) << \SHAR_EOF +13781a8581b74b0cf402c01264bdca48 cloud_scripts/opt/cloud/templates/conntrackd.conf.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ'` -ne 15888 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' is not 15888" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +ROUTER_BIN_PATH="/ramdisk/rrouter" +ROUTER_LOG="${ROUTER_BIN_PATH}/keepalived.log" +STRIKE_FILE="$ROUTER_BIN_PATH/keepalived.strikes" +TS_FILE="$ROUTER_BIN_PATH/keepalived.ts" +CT_FILE="$ROUTER_BIN_PATH/keepalived.ct" +X +checktime=$(date +%s) +hbtime=$(cat $TS_FILE) +diff=$(($checktime - $hbtime)) +X +lastcheck=0 +if [ -e $CT_FILE ] +then +X lastcheck=$(cat $CT_FILE 2>/dev/null) +fi +checkdiff=$(($checktime - $lastcheck)) +if [ $checkdiff -ge 0 ] && [ $checkdiff -lt 30 ] +then +X exit +fi +echo $checktime > $CT_FILE +X +s=0 +if [ $diff -gt 10 ] +then +X if [ -e $STRIKE_FILE ] +X then +X s=$(cat $STRIKE_FILE 2>/dev/null) +X fi +X s=$(($s+1)) +X echo $s > $STRIKE_FILE +X echo "Check time: $checktime, last heartbeat time: $hbtime, time diff: $diff, strike count: $s" >> $ROUTER_LOG +else +X rm -f $STRIKE_FILE +fi +X +if [ $s -gt 3 ] +then +X systemctl stop --now keepalived >> $ROUTER_LOG 2>&1 +X systemctl stop --now conntrackd >> $ROUTER_LOG 2>&1 +X +X #Set fault so we have the same effect as a KeepaliveD fault. +X python /opt/cloud/bin/master.py --fault +X +X pkill -9 keepalived >> $ROUTER_LOG 2>&1 || true +X pkill -9 conntrackd >> $ROUTER_LOG 2>&1 || true +X echo Status: FAULT \(keepalived process is dead\) >> $ROUTER_LOG +X exit +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ': 'MD5 check failed' + ) << \SHAR_EOF +7040d7485f89a97be367132d28af1267 cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ'` -ne 2037 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' is not 2037" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/check_bumpup.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/check_bumpup.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/check_bumpup.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +cat /tmp/rrouter_bumped +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/check_bumpup.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/check_bumpup.sh': 'MD5 check failed' + ) << \SHAR_EOF +ab6cbce5de505d137d05bcae1af8e18a cloud_scripts/opt/cloud/templates/check_bumpup.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/check_bumpup.sh'` -ne 822 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' is not 822" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/keepalived.conf.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/keepalived.conf.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/keepalived.conf.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' && +! Licensed to the Apache Software Foundation (ASF) under one +! or more contributor license agreements. See the NOTICE file +! distributed with this work for additional information +! regarding copyright ownership. The ASF licenses this file +! to you under the Apache License, Version 2.0 (the +! "License"); you may not use this file except in compliance +! with the License. You may obtain a copy of the License at +! +! http://www.apache.org/licenses/LICENSE-2.0 +! +! Unless required by applicable law or agreed to in writing, +! software distributed under the License is distributed on an +! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +! KIND, either express or implied. See the License for the +! specific language governing permissions and limitations +! under the License. +X +global_defs { +X router_id [ROUTER_ID] +} +X +vrrp_script heartbeat { +X script "[RROUTER_BIN_PATH]/heartbeat.sh" +X interval 5 +} +X +vrrp_instance inside_network { +X state BACKUP +X interface eth2 +X virtual_router_id 51 +X nopreempt +X +X advert_int 1 +X +X #use_vmac +X #vmac_xmit_base +X +X authentication { +X auth_type AH +X auth_pass PASS +X } +X +X virtual_ipaddress { +X [ROUTER_IP] brd [BOARDCAST] dev eth2 +X } +X +X track_script { +X heartbeat +X } +X +X notify_backup "/opt/cloud/bin/master.py --backup" +X notify_master "/opt/cloud/bin/master.py --master" +X notify_fault "/opt/cloud/bin/master.py --fault" +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/keepalived.conf.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ': 'MD5 check failed' + ) << \SHAR_EOF +464642e87bbb032071111b84f82ba135 cloud_scripts/opt/cloud/templates/keepalived.conf.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ'` -ne 1429 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' is not 1429" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/prepare_pxe.sh ============== +if test ! -d 'cloud_scripts/opt/cloud/bin'; then + mkdir 'cloud_scripts/opt/cloud/bin' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/opt/cloud/bin." +else ${echo} "x - failed to create directory cloud_scripts/opt/cloud/bin." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/prepare_pxe.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/prepare_pxe.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' && +#!/bin/sh +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# # regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +X +set +u +X +err_exit() { +X echo $1 +X exit 1 +} +X +success() { +X exit 0 +} +X +TFTP_ROOT='/opt/tftpboot' +PXELINUX_CFG_DIR='/opt/tftpboot/pxelinux.cfg' +X +kernel_nfs_path=$1 +kernel_file_name=`basename $kernel_nfs_path` +initrd_nfs_path=$2 +initrd_file_name=`basename $initrd_nfs_path` +tmpt_uuid=$3 +pxe_cfg_filename=$4 +ks_file=$5 +X +kernel_path=$tmpt_uuid/$kernel_file_name +initrd_path=$tmpt_uuid/$initrd_file_name +X +cat > $PXELINUX_CFG_DIR/$pxe_cfg_filename </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh': 'MD5 check failed' + ) << \SHAR_EOF +8b495c4ea50905f4197974ee82e607ba cloud_scripts/opt/cloud/bin/prepare_pxe.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh'` -ne 1792 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' is not 1792" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_forwardingrules.py ============== +if test ! -d 'cloud_scripts/opt/cloud/bin'; then + mkdir 'cloud_scripts/opt/cloud/bin' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/opt/cloud/bin." +else ${echo} "x - failed to create directory cloud_scripts/opt/cloud/bin." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_forwardingrules.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_forwardingrules.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, rules): +X for rule in rules["rules"]: +X source_ip = rule["source_ip_address"] +X destination_ip = rule["destination_ip_address"] +X revoke = rule["revoke"] +X +X newrule = dict() +X newrule["public_ip"] = source_ip +X newrule["internal_ip"] = destination_ip +X +X if rules["type"] == "staticnatrules": +X newrule["type"] = "staticnat" +X elif rules["type"] == "forwardrules": +X newrule["type"] = "forward" +X newrule["public_ports"] = rule["source_port_range"] +X newrule["internal_ports"] = rule["destination_port_range"] +X newrule["protocol"] = rule["protocol"] +X +X if not revoke: +X if rules["type"] == "staticnatrules": +X dbag[source_ip] = [newrule] +X elif rules["type"] == "forwardrules": +X index = -1 +X if source_ip in dbag.keys(): +X for forward in dbag[source_ip]: +X if ruleCompare(forward, newrule): +X index = dbag[source_ip].index(forward) +X if not index == -1: +X dbag[source_ip][index] = newrule +X else: +X dbag[source_ip].append(newrule) +X else: +X dbag[source_ip] = [newrule] +X else: +X if rules["type"] == "staticnatrules": +X if source_ip in dbag.keys(): +X del dbag[source_ip] +X elif rules["type"] == "forwardrules": +X if source_ip in dbag.keys(): +X index = -1 +X for forward in dbag[source_ip]: +X if ruleCompare(forward, newrule): +X index = dbag[source_ip].index(forward) +X print "removing index %s" % str(index) +X if not index == -1: +X del dbag[source_ip][index] +X +X return dbag +X +X +# Compare function checks only the public side, those must be equal the internal details could change +def ruleCompare(ruleA, ruleB): +X if not ruleA["type"] == ruleB["type"]: +X return False +X if ruleA["type"] == "staticnat": +X return ruleA["public_ip"] == ruleB["public_ip"] +X elif ruleA["type"] == "forward": +X return ruleA["public_ip"] == ruleB["public_ip"] and ruleA["public_ports"] == ruleB["public_ports"] \ +X and ruleA["protocol"] == ruleB["protocol"] +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_forwardingrules.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py': 'MD5 check failed' + ) << \SHAR_EOF +278288da98263d674e9d0d0aecaca56d cloud_scripts/opt/cloud/bin/cs_forwardingrules.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py'` -ne 3239 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' is not 3239" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpc_netusage.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_netusage.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_netusage.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +source /root/func.sh +source /opt/cloud/bin/vpc_func.sh +X +vpnoutmark="0x525" +vpninmark="0x524" +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s -[c|g|r|n|d] [-l ] [-v ] \n" $(basename $0) >&2 +} +X +create_usage_rules () { +X iptables-save|grep "NETWORK_STATS_$ethDev" > /dev/null +X if [ $? -gt 0 ] +X then +X iptables -N NETWORK_STATS_$ethDev > /dev/null; +X iptables -I FORWARD -j NETWORK_STATS_$ethDev > /dev/null; +X iptables -A NETWORK_STATS_$ethDev -o $ethDev -s $vcidr > /dev/null; +X iptables -A NETWORK_STATS_$ethDev -i $ethDev -d $vcidr > /dev/null; +X fi +X return $? +} +X +create_vpn_usage_rules () { +X iptables-save|grep "VPN_STATS_$ethDev" > /dev/null +X if [ $? -gt 0 ] +X then +X iptables -t mangle -N VPN_STATS_$ethDev > /dev/null; +X iptables -t mangle -I FORWARD -j VPN_STATS_$ethDev > /dev/null; +X iptables -t mangle -A VPN_STATS_$ethDev -o $ethDev -m mark --mark $vpnoutmark > /dev/null; +X iptables -t mangle -A VPN_STATS_$ethDev -i $ethDev -m mark --mark $vpninmark > /dev/null; +X fi +X return $? +} +X +remove_usage_rules () { +X return 0 +} +X +get_usage () { +X iptables -L NETWORK_STATS_$ethDev -n -v -x 2> /dev/null | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null +X return 0 +} +X +get_vpn_usage () { +X iptables -t mangle -L VPN_STATS_$ethDev -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null +X if [ $? -gt 0 ] +X then +X printf $? +X return 1 +X fi +} +X +reset_usage () { +X iptables -Z NETWORK_STATS_$ethDev > /dev/null +X if [ $? -gt 0 -a $? -ne 2 ] +X then +X return 1 +X fi +} +X +#set -x +X +cflag= +gflag= +rflag= +lflag= +vflag= +nflag= +dflag= +X +while getopts 'cgndrl:v:' OPTION +do +X case $OPTION in +X c) cflag=1 +X ;; +X g) gflag=1 +X ;; +X r) rflag=1 +X ;; +X l) lflag=1 +X publicIp="$OPTARG" +X ;; +X v) vflag=1 +X vcidr="$OPTARG" +X ;; +X n) nflag=1 +X ;; +X d) dflag=1 +X ;; +X i) #Do nothing, since it's parameter for host script +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +ethDev=$(getEthByIp $publicIp) +if [ "$cflag" == "1" ] +then +X if [ "$ethDev" != "" ] +X then +X create_usage_rules +X create_vpn_usage_rules +X unlock_exit 0 $lock $locked +X fi +fi +X +if [ "$gflag" == "1" ] +then +X get_usage +X unlock_exit $? $lock $locked +fi +X +if [ "$nflag" == "1" ] +then +X #get_vpn_usage +X unlock_exit $? $lock $locked +fi +X +if [ "$dflag" == "1" ] +then +X #remove_usage_rules +X unlock_exit 0 $lock $locked +fi +X +if [ "$rflag" == "1" ] +then +X reset_usage +X unlock_exit $? $lock $locked +fi +X +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_netusage.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh': 'MD5 check failed' + ) << \SHAR_EOF +f3f8069de696e92a24cbc694275c0bd5 cloud_scripts/opt/cloud/bin/vpc_netusage.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh'` -ne 3377 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' is not 3377" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/configure.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/configure.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/configure.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/configure.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/configure.py +M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&-E<'0@24]%2@I"B`@("`@("`@ +M("`@("`@("`@("`@9W5E22R)$;VU57U)E<75E&-E<'0@17AC97!T:6]N(&%S +M(&4Z"B`@("`@("`@("`@("`@("`@("`@;&]G9VEN9RYE7!E)UT@/3T@)V%L;"<@86YD(&]B +M:ELG7!E(#T@(F%N>2(*("`@("`@("`@("`@:68@ +M(FEC;7!?='EP92(@:6X@7,H*2!A;F0@7!E)UT*("`@("`@("`@("`@:68@(FEC +M;7!?8V]D92(@:6X@7,H*2!A;F0@7!E)UTL('-E;&8N7!E("5S("UJ("5S(B`E("AI8VUP7W1Y<&4L('-E;&8N&5C=71E*&1S=$EP2==.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U +M;&5;)V%C=&EO;B==(#T@(D%#0T505"(*("`@("`@("`@("`@("`@("`@("!E +M;'-E.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5;)V%C=&EO +M;B==(#T@(D123U`B"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@ +M("`@("`@("`@(",@1F]R(&]T:&5R(')U;&5S(&%D9&5D+"!I9B!D969A=6QT +M7V5G7!E("5S(B`E(&EC;7!?='EP90H@("`@("`@("`@ +M("`@("`@96QI9B!R=6QE6R=P7!E+B!3;RP@:71S(&9W(&%T=')I8G5T92!I7!E +M(#T@(F%N>2(*("`@("`@("`@("`@("`@('-E;&8N<')O=&]C;VP@/2!S96QF +M+G1Y<&4*("`@("`@("`@("`@("`@(&EF(")I8VUP7W1Y<&4B(&EN(')U;&4N +M:V5Y7!E+"!R=6QE6R=I8VUP7V-O9&4G72D*("`@("`@("`@("`@("`@(&EF('-E +M;&8N='EP92`]/2`B<')O=&]C;VPB.@H@("`@("`@("`@("`@("`@("`@(&EF +M(')U;&5;)W!R;W1O8V]L)UT@/3T@-#$Z"B`@("`@("`@("`@("`@("`@("`@ +M("`@(')U;&5;)W!R;W1O8V]L)UT@/2`B:7!V-B(*("`@("`@("`@("`@("`@ +M("`@("!S96QF+G!R;W1O8V]L(#T@&5C=71E*")I +M<'1A8FQE+4$O:7!T86)L97,@+70@9FEL=&5R("U$+V&5C=71E +M*")I<'-E="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\ +M(&EP&5C=71E*")I<'-E +M="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP2!V86QI9"!D871A"B`@("`@("`@("`@("`@("!I9B!F;VQD97(@(3T@(G5S +M97)D871A(B!A;F0@9F]L9&5R("$](")M971A9&%T82(Z"B`@("`@("`@("`@ +M("`@("`@("`@8V]N=&EN=64*"B`@("`@("`@("`@("`@("!I9B!F:6QE(#T] +M("(B.@H@("`@("`@("`@("`@("`@("`@(&-O;G1I;G5E"@H@("`@("`@("`@ +M("`@("`@7,N97AI="@Q*0H@("`@("`@("`@("!I9B!O2Q!;&QO=UQN1&5N>2!F2!E>&ES=',L('=E(&1O(&ET('1H +M:7,@=V%Y(&9O7,N97AI +M="@Q*0H*("`@("`@("!F:"`](&]P96XH:'1A8V-E2`] +M(")297=R:71E4G5L92!>;65T82UD871A+R@N*RDD("`N+B\B("L@9F]L9&5R +M("L@(B\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%=(@H@("`@("`@("`@ +M("!H=&%C8V5S7,N97AI="@Q +M*2`@(R!&25A-10H@("`@("`@(')E='5R;B!4&ET*#$I("`C($9)6$U%"B`@("`@("`@:7!S96,N=G!N+2@N*BDN8V]N9B(L(&9I;&4I"B`@ +M("`@("`@("`@(&EF(&TZ"B`@("`@("`@("`@("`@("!S96QF+F-O;F9I<',N +M87!P96YD*&TN9W)O=7`H,2DI"@H@("`@("`@(&9O&5C=71E*")I +M<'-E8R!R96QO860B*0H*("`@(&1E9B!C;VYF:6=U#4R-2`M:B!!0T-%4%0B("4@9&5V72D* +M("`@("`@("!F;W(@;F5T(&EN(&]B:ELG<&5E&UA&UA5]I<"=="B`@("`@("`@<&5E7!E/71U;FYE;"(I +M"B`@("`@("`@9FEL92YA9&1E<2@B(&%U=&AB>3US96-R970B*0H@("`@("`@ +M(&9I;&4N861D97$H(B!K97EE>&-H86YG93UI:V4B*0H@("`@("`@(&9I;&4N +M861D97$H(B!I:V4])7,B("4@:6ME<&]L:6-Y*0H@("`@("`@(&9I;&4N861D +M97$H(B!I:V5L:69E=&EM93TE3TS,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1T:6UE;W5T +M/3$R,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1A8W1I;VX]')A;F=E*#,I.@H@("`@("`@("`@ +M("!R97-U;'0@/2!#&5C=71E*"=I<'-E8R!S=&%T=7,@=G!N +M+25S('P@9W)E<"`B)7,B)R`E("AR:6=H='!E97(L('!E97)L:7-T+G-P;&ET +M*"(L(BP@,2E;,%TI*0H@("`@("`@("`@("!I9B!L96XH2P@)R,G*0H@("`@("`@(&EF(&YO="!U&5C=71E*")T9&)D=6UP("]V87(O&5C=71E*"=K:6QL("TY("5S)R`E('!I9"D*"@IC;&%S +M&5C=71E*")S>7-T96UC=&P@2YS96-R971S(B`E("AS96QF+E903D-/3D9$25(I"B`@ +M("`@("`@>&PR='!D8V]N9F9I;&4@/2`B+V5T8R]X;#)T<&0O>&PR='!D+F-O +M;F8B"B`@("`@("`@>&PR='!O<'1I;VYS9FEL92`]("(O971C+W!P<"]O<'1I +M;VYS+GAL,G1P9"(*"B`@("`@("`@;&]C86QI<"`](&]B:ELG;&]C86Q?:7`G +M70H@("`@("`@(&QO8V%L8VED2`Z(%!32R!<(B5S7"(B("4@*&QE9G0L('!S:RDI"B`@ +M("`@("`@&PR='!D8V]N9F9I;&4I"B`@("`@("`@>&PR='!D8V]N9BYA9&1E +M<2@B:7`@&PR='!O<'1I;VYS+F-O;6UI="@I"@H@("`@9&5F(')E;6]T96%C8V5S +M2@I"B`@("`@("`@4EP +M*')U;&5;)W!U8FQI8U]I<"==*0H@("`@("`@(&EN=&5R;F%L7V9W:6YT97)F +M86-E(#T@4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI +M"B`@("`@("`@<'5B;&EC7V9W<&]R=',@/2!S96QF+G!O4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI +M+`H@("`@("`@("`@("`@("`@&UA2(Z"B`@("`@("`@("`@(&9W7W!R97)O=71? +M2(Z"B`@("`@ +M("`@("`@(&9W7W!O2(Z"B`@("`@("`@ +M("`@(&9W7W!O2(Z"B`@("`@ +M("`@("`@(&9W7V]U='!U=%]R=6QE("L]("(@+2UD<&]R="`E2(Z"B`@("`@("`@("`@ +M(&9W7V]U='!U=%]R=6QE("L]("(Z(B`K('-E;&8N<&]R='-4;U-T4EP*')U;&5;)VEN=&5R;F%L7VEP +M)UTI+`H@("`@("`@("`@("`@("`@&9F9F9F9F9F +M("TM8W1M87-K(#!X9F9F9F9F9F8B("4*("`@("`@("`@("`@("`@("`@("`@ +M("`@4EP*')U;&5;(FEN=&5R;F%L +M7VEP(ETI+"!S96QF+F=E=$=U97-T27`H*2E=*0H*"F-L87-S($EP5&%B;&5S +M17AE8W5T;W(Z"@H@("`@8V]N9FEG(#T@3F]N90H*("`@(&1E9B!?7VEN:71? +M7RAS96QF+"!C;VYF:62!PR)P&5C=71OR)P&5C=71OR)P&5C=71O7!E.B`E&5C27!T86)L97,H8V]N9FEG +M*3H*("`@("`@("!L;V=G:6YG+F1E8G5G*")0&5C=71O7,H*3H*("`@("`@("`@ +M("`@97AE8T1A=&%B86&5C +M27!T86)L97,H8V]N9FEG*0H@("`@96QI9B!J&5C27!T86)L +M97,H8V]N9FEG*0H@("`@96QS93H*("`@("`@("!L;V=G:6YG+G=A7!E/25S(B`E("AP/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/configure.py': 'MD5 check failed' + ) << \SHAR_EOF +8987217852a386250687dfce6d0b10be cloud_scripts/opt/cloud/bin/configure.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/configure.py'` -ne 45920 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/configure.py' is not 45920" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_vmp.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vmp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vmp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vmp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_vmp.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=WWT*("`@(')C6R=I9"==(#T@)W9M<&%S/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vmp.py': 'MD5 check failed' + ) << \SHAR_EOF +3e1ea6831cb27eedc825e25bf817cb9c cloud_scripts/opt/cloud/bin/cs_vmp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vmp.py'` -ne 1126 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vmp.py' is not 1126" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# getRouterMonitorResults.sh --- Send the monitor results to Management Server +X +if [ "$1" == "true" ] +then +X python /root/monitorServices.py > /dev/null +fi +X +printf "FAILING CHECKS:\n" +X +if [ -f /root/basic_failing_health_checks ] +then +X echo `cat /root/basic_failing_health_checks` +fi +X +if [ -f /root/advanced_failing_health_checks ] +then +X echo `cat /root/advanced_failing_health_checks` +fi +X +printf "MONITOR RESULTS:\n" +X +echo "{\"basic\":" +if [ -f /root/basic_monitor_results.json ] +then +X echo `cat /root/basic_monitor_results.json` +else +X echo "{}" +fi +echo ",\"advanced\":" +if [ -f /root/advanced_monitor_results.json ] +then +X echo `cat /root/advanced_monitor_results.json` +else +X echo "{}" +fi +X +echo "}" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh': 'MD5 check failed' + ) << \SHAR_EOF +35649a8a1a8339aaa42a311826699849 cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh'` -ne 1526 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' is not 1526" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vr_cfg.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vr_cfg.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vr_cfg.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +#set -x +X +cfg= +version= +log=/var/log/cloud.log +X +log_it() { +X logger -t cloud "$*" +X echo "$(date) : $*" >> $log +} +X +while getopts 'c:' OPTION; do +X case $OPTION in +X c) cfg="$OPTARG" ;; +esac; done +X +export DEFER_CONFIG=true +while read line; do +X #comment +X if [[ $line == \#* ]]; then +X continue +X +X elif [ "$line" == "" ]; then +X read line +X version=$line +X log_it "VR config: configuation format version $version" +X #skip +X read line +X +X elif [ "$line" == " +X read line +X log_it "VR config: execution success " +X +X elif [ "$line" == "" ]; then +X read line +X file=$line +X log_it "VR config: creating file: $file" +X rm -f $file +X while read -r line; do +X if [ "$line" == "" ]; then +X break +X fi +X echo $line >> $file +X done +X log_it "VR config: create file success" +X +X fi +X +done < $cfg +X +# archive the configuration file +mv $cfg /var/cache/cloud/processed/ +X +unset DEFER_CONFIG +# trigger finish_config() +if [ -f /etc/cloudstack/dhcpentry.json ]; then +X /opt/cloud/bin/configure.py vm_dhcp_entry.json +fi +if [ -f /etc/cloudstack/vmdata.json ]; then +X /opt/cloud/bin/configure.py vm_metadata.json +fi +X +# Flush kernel conntrack table +log_it "VR config: Flushing conntrack table" +conntrackd -d 2> /dev/null +if [ $? -eq 0 ]; then +X conntrackd -F +X conntrackd -k +else +X conntrackd -F +fi +log_it "VR config: Flushing conntrack table completed" +X +Xexit 0 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vr_cfg.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vr_cfg.sh': 'MD5 check failed' + ) << \SHAR_EOF +da02bd413616a9cc131fd039e627eb3e cloud_scripts/opt/cloud/bin/vr_cfg.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vr_cfg.sh'` -ne 2725 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' is not 2725" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpc_snat.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_snat.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_snat.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# @VERSION@ +X +source /root/func.sh +source /opt/cloud/bin/vpc_func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage:\n %s -A -l \n" $(basename $0) >&2 +X printf " %s -D -l \n" $(basename $0) >&2 +} +X +X +add_snat() { +X logger -t cloud "$(basename $0):Added SourceNAT $pubIp on interface $ethDev" +X vpccidr=$(getVPCcidr) +X sudo iptables -D FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT +X sudo iptables -A FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT +X sudo iptables -t nat -D POSTROUTING -j SNAT -o $ethDev --to-source $pubIp +X sudo iptables -t nat -A POSTROUTING -j SNAT -o $ethDev --to-source $pubIp +X return $? +} +remove_snat() { +X logger -t cloud "$(basename $0):Removing SourceNAT $pubIp on interface $ethDev" +X sudo iptables -t nat -D POSTROUTING -j SNAT -o $ethDev --to-source $pubIp +X return $? +} +X +#set -x +lflag=0 +cflag=0 +op="" +X +while getopts 'ADl:c:' OPTION +do +X case $OPTION in +X A) Aflag=1 +X op="-A" +X ;; +X D) Dflag=1 +X op="-D" +X ;; +X l) lflag=1 +X pubIp="$OPTARG" +X ;; +X c) cflag=1 +X ethDev="$OPTARG" +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [ "$Aflag$Dflag" != "1" ] +then +X usage +X unlock_exit 2 $lock $locked +fi +X +if [ "$lflag$cflag" != "11" ] +then +X usage +X unlock_exit 2 $lock $locked +fi +X +if [ "$Aflag" == "1" ] +then +X add_snat $publicIp +X unlock_exit $? $lock $locked +fi +X +if [ "$Dflag" == "1" ] +then +X remove_sat $publicIp +X unlock_exit $? $lock $locked +fi +X +unlock_exit 1 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_snat.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_snat.sh': 'MD5 check failed' + ) << \SHAR_EOF +23502a2ce3829fb787464124f13b9141 cloud_scripts/opt/cloud/bin/vpc_snat.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_snat.sh'` -ne 2346 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' is not 2346" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpc_staticroute.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_staticroute.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_staticroute.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# @VERSION@ +X +source /root/func.sh +source /opt/cloud/bin/vpc_func.sh +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s: -a < routes > \n" $(basename $0) >&2 +} +X +#set -x +X +flush_table_backup() { +X flush_table "static_route_back" +} +X +flush_table() { +X local tab=$1 +X sudo ip route flush table $tab +} +X +copy_table() { +X local from=$1 +X local to=$2 +X sudo ip route show table $from | while read route +X do +X sudo ip route add table $to $route +X done +} +X +backup_table() { +X flush_table "static_route_back" +X copy_table "static_route" "static_route_back" +X flush_table "static_route" +} +X +restore_table() { +X flush_table "static_route" +X copy_table "static_route_back" "static_route" +X flush_table "static_route_back" +} +X +static_route() { +X local rule=$1 +X local ip=$(echo $rule | cut -d: -f1) +X if [ $ip == "Revoke" ] +X then +X return 0 +X fi +X local gateway=$(echo $rule | cut -d: -f2) +X local cidr=$(echo $rule | cut -d: -f3) +X logger -t cloud "$(basename $0): static route: public ip=$ip \ +X gateway=$gateway cidr=$cidr" +X local dev=$(getEthByIp $ip) +X if [ $? -gt 0 ] +X then +X return 1 +X fi +X sudo ip route add $cidr dev $dev via $gateway table static_route &>/dev/null +X result=$? +X logger -t cloud "$(basename $0): done static route: public ip=$ip \ +X gateway=$gateway cidr=$cidr" +X return $result +} +X +gflag= +aflag= +while getopts 'a:' OPTION +X +do +X case $OPTION in +X a) aflag=1 +X rules="$OPTARG" +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [ -n "$rules" ] +then +X rules_list=$(echo $rules | cut -d, -f1- --output-delimiter=" ") +fi +X +success=0 +X +backup_table +X +for r in $rules_list +do +X static_route $r +X success=$? +X if [ $success -gt 0 ] +X then +X logger -t cloud "$(basename $0): failure to apply fw rules for guest network: $gcidr" +X break +X else +X logger -t cloud "$(basename $0): successful in applying fw rules for guest network: $gcidr" +X fi +done +X +if [ $success -gt 0 ] +then +X logger -t cloud "$(basename $0): restoring from backup for guest network: $gcidr" +X restore_table +else +X logger -t cloud "$(basename $0): deleting backup for guest network: $gcidr" +X flush_table_backup +fi +unlock_exit $success $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_staticroute.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh': 'MD5 check failed' + ) << \SHAR_EOF +4080c04ff7600874ef4a4364aefc4d18 cloud_scripts/opt/cloud/bin/vpc_staticroute.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh'` -ne 3043 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' is not 3043" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/baremetal-vr.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/baremetal-vr.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/baremetal-vr.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/baremetal-vr.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/baremetal-vr.py +M(TQI8V5N6ME>2<@:6X@<#H*("`@("`@("`@("`@("`@("`@("`@("`@ +M2`]('`N6ME>2!I;B`E0H*("`@(&1E +M9B!?9V5T7VUG;71?:7`H4)AFEP*')E<7,N:V5Y2P@:&%S:%-T5]P/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/baremetal-vr.py': 'MD5 check failed' + ) << \SHAR_EOF +f87e8890aa7ad3cc522c5c5ceb2fbf69 cloud_scripts/opt/cloud/bin/baremetal-vr.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/baremetal-vr.py'` -ne 5587 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/baremetal-vr.py' is not 5587" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_firewallrules.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_firewallrules.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_firewallrules.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import copy +X +X +def merge(dbag, data): +X dbagc = copy.deepcopy(dbag) +X if "rules" not in data: +X return dbagc +X for rule in data['rules']: +X id = str(rule['id']) +X if rule['revoked']: +X if id in dbagc.keys(): +X del(dbagc[id]) +X elif id not in dbagc.keys(): +X dbagc[id] = rule +X return dbagc +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_firewallrules.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py': 'MD5 check failed' + ) << \SHAR_EOF +6d3faf49679b84bf9a098eee6b630f69 cloud_scripts/opt/cloud/bin/cs_firewallrules.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py'` -ne 1141 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' is not 1141" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/netusage.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/netusage.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/netusage.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/netusage.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/netusage.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +X +# netusage.sh -- create iptable rules to gather network stats, running within DomR +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s -[c|g|r] [-[a|d] ]\n" $(basename $0) >&2 +} +X +create_usage_rules () { +X iptables-save|grep "INPUT -j NETWORK_STATS" > /dev/null +X if [ $? -eq 0 ] +X then +X return $? +X fi +X iptables -N NETWORK_STATS > /dev/null +X iptables -I FORWARD -j NETWORK_STATS > /dev/null +X iptables -I INPUT -j NETWORK_STATS > /dev/null +X iptables -I OUTPUT -j NETWORK_STATS > /dev/null +X iptables -A NETWORK_STATS -i eth0 -o eth2 > /dev/null +X iptables -A NETWORK_STATS -i eth2 -o eth0 > /dev/null +X iptables -A NETWORK_STATS -o eth2 ! -i eth0 -p tcp > /dev/null +X iptables -A NETWORK_STATS -i eth2 ! -o eth0 -p tcp > /dev/null +X return $? +} +X +add_public_interface () { +X local pubIf=$1 +X iptables-save|grep "NETWORK_STATS -i eth0 -o $pubIf" > /dev/null +X if [ $? -eq 0 ] +X then +X return $? +X fi +X iptables -A NETWORK_STATS -i eth0 -o $pubIf > /dev/null +X iptables -A NETWORK_STATS -i $pubIf -o eth0 > /dev/null +X iptables -A NETWORK_STATS -o $pubIf ! -i eth0 -p tcp > /dev/null +X iptables -A NETWORK_STATS -i $pubIf ! -o eth0 -p tcp > /dev/null +X return $? +} +X +delete_public_interface () { +X local pubIf=$1 +X echo $pubIf >> /root/removedVifs +X return $? +} +X +get_usage () { +X iptables -L NETWORK_STATS -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null +X if [ -f /root/removedVifs ] ; then iptables -Z NETWORK_STATS ; fi; > /dev/null +X /root/clearUsageRules.sh > /dev/null +X if [ $? -gt 0 -a $? -ne 2 ] +X then +X printf $? +X return 1 +X fi +} +X +reset_usage () { +X iptables -Z NETWORK_STATS > /dev/null +X if [ $? -gt 0 -a $? -ne 2 ] +X then +X return 1 +X fi +} +X +#set -x +X +cflag= +gflag= +rflag= +iflag= +aflag= +dflag= +X +while getopts 'cgria:d:' OPTION +do +X case $OPTION in +X c) cflag=1 +X ;; +X g) gflag=1 +X ;; +X r) rflag=1 +X ;; +X a) aflag=1 +X publicIf="$OPTARG" +X ;; +X d) dflag=1 +X publicIf="$OPTARG" +X ;; +X i) #Do nothing, since it's parameter for host script +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [ "$cflag" == "1" ] +then +X #create_usage_rules +X unlock_exit $? $lock $locked +fi +X +if [ "$gflag" == "1" ] +then +X get_usage +X unlock_exit $? $lock $locked +fi +X +if [ "$rflag" == "1" ] +then +X reset_usage +X unlock_exit $? $lock $locked +fi +X +if [ "$aflag" == "1" ] +then +X #add_public_interface $publicIf +X unlock_exit $? $lock $locked +fi +X +if [ "$dflag" == "1" ] +then +X #delete_public_interface $publicIf +X unlock_exit $? $lock $locked +fi +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/netusage.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/netusage.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/netusage.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/netusage.sh': 'MD5 check failed' + ) << \SHAR_EOF +2966c6cafee62e66ff903e53367b498b cloud_scripts/opt/cloud/bin/netusage.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/netusage.sh'` -ne 3478 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/netusage.sh' is not 3478" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/monitor_service.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/monitor_service.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/monitor_service.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/monitor_service.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/monitor_service.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +set -x +usage() { +X printf "Usage: %s: -c config string \n" $(basename $0) >&2 +} +X +configFile='/etc/monitor.conf' +X +create_config() { +services=$1; +services_list=$(echo $services | cut -d, -f1- --output-delimiter=" "); +X +echo "#Monitor services config" >$configFile +X +for s in $services_list +do +service=$(echo $s | cut -d: -f1); +processname=$(echo $s | cut -d: -f2); +service_name=$(echo $s | cut -d: -f3); +pidfile=$(echo $s | cut -d: -f4); +X +echo "$service" >> $configFile; +echo $processname >> $configFile +echo $service_name >> $configFile +echo $pidfile >> $configFile +X +done +X +} +X +config=$2 +if [ -n "$3" ] +then +X +#delete cron job before updating config file +crontab -l|grep "monitorServices.py" +X +if [ $? -eq 0 ] +then +X t=`date +%s`; +X touch /tmp/monitor-$t.txt; +X conf=/tmp/monitor-$t.txt +X crontab -l >$conf +X sed -i /#monitoringConfig/,+3d $conf +X crontab $conf +X rm $conf +fi +X +X +logger -t cloud "deleted crontab entry for monitoring services" +unlock_exit 0 $lock $locked +fi +X +create_config $config +X +#add cron job +crontab -l|grep "monitorServices.py" +if [ $? -ne 0 ] +X then +X (crontab -l ;echo -e "#monitoringConfig\nSHELL=/bin/bash\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n */3 * * * * /usr/bin/python /root/monitorServices.py") | crontab - +X logger -t cloud "added crontab entry for monitoring services" +fi +X +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/monitor_service.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/monitor_service.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/monitor_service.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/monitor_service.sh': 'MD5 check failed' + ) << \SHAR_EOF +3419e7baf45ac36d3d69ca71ef7ab978 cloud_scripts/opt/cloud/bin/monitor_service.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/monitor_service.sh'` -ne 2294 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/monitor_service.sh' is not 2294" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_ip.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_ip.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_ip.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_ip.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_ip.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N7!E)UT@/2!I<%LG;G=?='EP92==+FQO=V5R*"D*("`@(&EF(&EP +M6R=N=U]T>7!E)UT@/3T@)V-O;G1R;VPG.@H@("`@("`@(&1B86=;:7!;)V1E +M=FEC92==72`](%MI<%T*("`@(&5L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_ip.py': 'MD5 check failed' + ) << \SHAR_EOF +856c6261f2876c280c49fa486f4f7408 cloud_scripts/opt/cloud/bin/cs_ip.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_ip.py'` -ne 2581 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_ip.py' is not 2581" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/bumpup_priority.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/bumpup_priority.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/bumpup_priority.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +touch /tmp/rrouter_bumped +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/bumpup_priority.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh': 'MD5 check failed' + ) << \SHAR_EOF +35091259ed848a9f7270aca1a90e95af cloud_scripts/opt/cloud/bin/bumpup_priority.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh'` -ne 824 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' is not 824" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/getRouterAlerts.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/getRouterAlerts.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/getRouterAlerts.sh (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/getRouterAlerts.sh +M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5LP77T*"B`@("`@("`@("`@ +M("`@("!T;T1A=&5686P])"AD871E("UD("(D9&%T979A;"(@(BLE/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh': 'MD5 check failed' + ) << \SHAR_EOF +6c3803100b0923fd3f9017a0e09d6fd5 cloud_scripts/opt/cloud/bin/getRouterAlerts.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh'` -ne 1706 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh' is not 1706" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/postinit.sh ============== +if test ! -d 'cloud_scripts/opt/cloud/bin/setup'; then + mkdir 'cloud_scripts/opt/cloud/bin/setup' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/opt/cloud/bin/setup." +else ${echo} "x - failed to create directory cloud_scripts/opt/cloud/bin/setup." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/postinit.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/postinit.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# This scripts before ssh.service but after cloud-early-config +X +# Eject cdrom if any +eject || true +X +# Restart journald for setting changes to apply +systemctl restart systemd-journald +X +TYPE=$(grep -Po 'type=\K[a-zA-Z]*' /var/cache/cloud/cmdline) +if [ "$TYPE" == "router" ] || [ "$TYPE" == "vpcrouter" ] || [ "$TYPE" == "dhcpsrvr" ] +then +X if [ -x /opt/cloud/bin/update_config.py ] +X then +X /opt/cloud/bin/update_config.py cmd_line.json || true +X fi +fi +X +[ ! -f /var/cache/cloud/enabled_svcs ] && touch /var/cache/cloud/enabled_svcs +for svc in $(cat /var/cache/cloud/enabled_svcs) +do +X systemctl enable --now --no-block $svc +done +X +[ ! -f /var/cache/cloud/disabled_svcs ] && touch /var/cache/cloud/disabled_svcs +for svc in $(cat /var/cache/cloud/disabled_svcs) +do +X systemctl disable --now --no-block $svc +done +X +# Restore the persistent iptables nat, rules and filters for IPv4 and IPv6 if they exist +ipv4="/etc/iptables/rules.v4" +if [ -e $ipv4 ] +then +X iptables-restore < $ipv4 +fi +X +ipv6="/etc/iptables/rules.v6" +if [ -e $ipv6 ] +then +X ip6tables-restore < $ipv6 +fi +X +# Patch known systemd/sshd memory leak - https://github.com/systemd/systemd/issues/8015#issuecomment-476160981 +echo '@include null' >> /etc/pam.d/systemd-user +X +# Enable and Start SSH +systemctl enable --now --no-block ssh +X +date > /var/cache/cloud/boot_up_done +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/postinit.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/postinit.sh': 'MD5 check failed' + ) << \SHAR_EOF +170afadf6f130e9cb697dca65a87aacb cloud_scripts/opt/cloud/bin/setup/postinit.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/postinit.sh'` -ne 2122 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' is not 2122" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/secstorage.sh ============== +if test ! -d 'cloud_scripts/opt/cloud/bin/setup'; then + mkdir 'cloud_scripts/opt/cloud/bin/setup' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/opt/cloud/bin/setup." +else ${echo} "x - failed to create directory cloud_scripts/opt/cloud/bin/setup." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/secstorage.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/secstorage.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_secstorage() { +X log_it "Setting up secondary storage system vm" +X +X echo "cloud apache2 nfs-common portmap" > /var/cache/cloud/enabled_svcs +X echo "conntrackd keepalived haproxy dnsmasq" > /var/cache/cloud/disabled_svcs +X mkdir -p /var/log/cloud +X +X setup_common eth0 eth1 eth2 +X setup_storage_network +X setup_system_rfc1918_internal +X +X log_it "Setting up entry in hosts" +X sed -i /$NAME/d /etc/hosts +X public_ip=`getPublicIp` +X echo "$public_ip $NAME" >> /etc/hosts +X +X log_it "Applying iptables rules" +X cp /etc/iptables/iptables-secstorage /etc/iptables/rules.v4 +X +X log_it "Configuring sshd" +X local hyp=$HYPERVISOR +X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then +X setup_sshd $ETH1_IP "eth1" +X else +X setup_sshd $ETH0_IP "eth0" +X fi +X +X log_it "Configuring apache2" +X setup_apache2 $ETH2_IP +X +X # Deprecated, should move to Cs Python all of it +X sed -e "s///" \ +X -e "s///" \ +X -e "s/Listen .*:8180/Listen $ETH2_IP:80/g" \ +X -e "s/Listen .*:8443/Listen $ETH2_IP:443/g" /etc/apache2/vhost.template > /etc/apache2/sites-enabled/vhost-${ETH2_IP}.conf +X +X log_it "Setting up apache2 for post upload of volume/template" +X a2enmod proxy +X a2enmod proxy_http +X a2enmod headers +X +X cat >/etc/apache2/cors.conf </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh': 'MD5 check failed' + ) << \SHAR_EOF +14aea171a5e0fdfd3069bb96bde91e0b cloud_scripts/opt/cloud/bin/setup/secstorage.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh'` -ne 2720 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' is not 2720" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/ilbvm.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +ilbvm_svcs() { +X echo "haproxy" > /var/cache/cloud/enabled_svcs +X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs +} +X +setup_ilbvm() { +X log_it "Setting up Internal Load Balancer system vm" +X setup_common eth0 eth1 +X #eth0 = guest network, eth1=control network +X +X sed -i /$NAME/d /etc/hosts +X echo "$ETH0_IP $NAME" >> /etc/hosts +X +X cp /etc/iptables/iptables-ilbvm /etc/iptables/rules.v4 +X setup_sshd $ETH1_IP "eth1" +X +X enable_fwding 0 +X enable_irqbalance 1 +} +X +ilbvm_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute ilbvm svcs" +X exit 1 +fi +setup_ilbvm +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/ilbvm.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh': 'MD5 check failed' + ) << \SHAR_EOF +87c70bdf6c0d4d41f0ff87475494188f cloud_scripts/opt/cloud/bin/setup/ilbvm.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh'` -ne 1442 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' is not 1442" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_vpcrouter() { +X log_it "Setting up VPC virtual router system vm" +X +X if [ -f /etc/hosts ]; then +X grep -q $NAME /etc/hosts || echo "127.0.0.1 $NAME" >> /etc/hosts; +X fi +X +X cat > /etc/network/interfaces << EOF +auto lo eth0 +iface lo inet loopback +EOF +X setup_interface "0" $ETH0_IP $ETH0_MASK $GW +X +X echo $NAME > /etc/hostname +X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon +X hostnamectl set-hostname $NAME +X +X #Nameserver +X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries +X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries +X if [ -n "$internalNS1" ] +X then +X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS1" > /etc/resolv.conf +X fi +X +X if [ -n "$internalNS2" ] +X then +X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS2" >> /etc/resolv.conf +X fi +X if [ -n "$NS1" ] +X then +X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS1" >> /etc/resolv.conf +X fi +X +X if [ -n "$NS2" ] +X then +X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS2" >> /etc/resolv.conf +X fi +X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] +X then +X if [ "$HYPERVISOR" == "vmware" ] || [ "$HYPERVISOR" == "hyperv" ]; +X then +X ip route add $MGMTNET via $LOCAL_GW dev eth0 +X # workaround to activate vSwitch under VMware +X timeout 3 ping -n -c 3 $LOCAL_GW || true +X fi +X fi +X +X ip route delete default +X # create route table for static route +X +X sudo echo "252 static_route" >> /etc/iproute2/rt_tables 2>/dev/null +X sudo echo "251 static_route_back" >> /etc/iproute2/rt_tables 2>/dev/null +X sudo ip rule add from $VPCCIDR table static_route 2>/dev/null +X sudo ip rule add from $VPCCIDR table static_route_back 2>/dev/null +X +X setup_vpc_apache2 +X +X enable_irqbalance 1 +X enable_vpc_rpsrfs 1 +X disable_rpfilter +X enable_fwding 1 +X enable_passive_ftp 1 +X cp /etc/iptables/iptables-vpcrouter /etc/iptables/rules.v4 +X setup_sshd $ETH0_IP "eth0" +X cp /etc/vpcdnsmasq.conf /etc/dnsmasq.conf +X cp /etc/cloud-nic.rules /etc/udev/rules.d/cloud-nic.rules +X echo "" > /etc/dnsmasq.d/dhcphosts.txt +X echo "dhcp-hostsfile=/etc/dhcphosts.txt" > /etc/dnsmasq.d/cloud.conf +X +X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" +X #DNS server will append $DOMAIN to local queries +X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf +X #answer all local domain queries +X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf +X +X command -v dhcp_release > /dev/null 2>&1 +X no_dhcp_release=$? +X if [ $no_dhcp_release -eq 0 ] +X then +X echo 1 > /var/cache/cloud/dnsmasq_managed_lease +X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf +X else +X echo 0 > /var/cache/cloud/dnsmasq_managed_lease +X fi +X +X # Setup hourly logrotate +X if [ -f /etc/cron.daily/logrotate ]; then +X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 +X fi +} +X +routing_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute routing_svcs" +X exit 1 +fi +setup_vpcrouter +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh': 'MD5 check failed' + ) << \SHAR_EOF +811420d11f97b1d7237b964e8bbbdf5d cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh'` -ne 3885 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' is not 3885" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/router.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/router.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/router.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/router.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/router.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +check_reboot_vmware() { +X if [ "$HYPERVISOR" != "vmware" ]; then +X return +X fi +X +X if [ -n "$MGMTNET" ]; then +X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') +X if ping -n -c 1 -W 3 $MGMT_GW &> /dev/null; then +X log_it "Management gateway pingable, skipping VR reboot" +X return +X fi +X fi +X +X log_it "Management gateway not pingable, rebooting VR" +X sync +X reboot +} +X +setup_router() { +X # To save router public interface and gw ip information +X touch /var/cache/cloud/ifaceGwIp +X +X oldmd5= +X [ -f "/etc/udev/rules.d/70-persistent-net.rules" ] && oldmd5=$(md5sum "/etc/udev/rules.d/70-persistent-net.rules" | awk '{print $1}') +X +X if [ -n "$ETH2_IP" ]; then +X setup_common eth0 eth1 eth2 +X +X if [ -n "$EXTRA_PUBNICS" ]; then +X for ((i = 3; i < 3 + $EXTRA_PUBNICS; i++)); do +X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" +X done +X fi +X else +X setup_common eth0 eth1 +X if [ -n "$EXTRA_PUBNICS" ]; then +X for ((i = 2; i < 2 + $EXTRA_PUBNICS; i++)); do +X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" +X done +X fi +X fi +X +X log_it "Checking udev NIC assignment order changes" +X if [ "$NIC_MACS" != "" ] +X then +X init_interfaces_orderby_macs "$NIC_MACS" "/tmp/interfaces" "/tmp/udev-rules" +X newmd5=$(md5sum "/tmp/udev-rules" | awk '{print $1}') +X rm /tmp/interfaces +X rm /tmp/udev-rules +X +X if [ "$oldmd5" != "$newmd5" ] +X then +X log_it "Reloading udev for new udev NIC assignment" +X udevadm control --reload-rules && udevadm trigger +X check_reboot_vmware +X fi +X fi +X +X setup_aesni +X setup_dnsmasq +X setup_apache2 $ETH0_IP +X +X sed -i /$NAME/d /etc/hosts +X echo "$ETH0_IP $NAME" >> /etc/hosts +X +X enable_irqbalance 1 +X disable_rpfilter_domR +X enable_fwding 1 +X enable_rpsrfs 1 +X enable_passive_ftp 1 +X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 +X setup_sshd $ETH1_IP "eth1" +X +X # Only allow DNS service for current network +X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X +X # Setup hourly logrotate +X if [ -f /etc/cron.daily/logrotate ]; then +X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 +X fi +} +X +routing_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute routing_svcs" +X exit 1 +fi +setup_router +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/router.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/router.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/router.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/router.sh': 'MD5 check failed' + ) << \SHAR_EOF +2ae62d5d44c716730231c9d77618fe91 cloud_scripts/opt/cloud/bin/setup/router.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/router.sh'` -ne 3355 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/router.sh' is not 3355" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/elbvm.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/elbvm.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/elbvm.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +elbvm_svcs() { +X echo "haproxy" > /var/cache/cloud/enabled_svcs +X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs +} +X +setup_elbvm() { +X log_it "Setting up Elastic Load Balancer system vm" +X setup_common eth0 eth1 +X sed -i /$NAME/d /etc/hosts +X public_ip=$ETH2_IP +X [ "$ETH2_IP" == "0.0.0.0" ] || [ "$ETH2_IP" == "" ] && public_ip=$ETH0_IP +X echo "$public_ip $NAME" >> /etc/hosts +X +X cp /etc/iptables/iptables-elbvm /etc/iptables/rules.v4 +X if [ "$SSHONGUEST" == "true" ] +X then +X setup_sshd $ETH0_IP "eth0" +X else +X setup_sshd $ETH1_IP "eth1" +X fi +X +X enable_fwding 0 +X enable_irqbalance 0 +} +X +elbvm_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute elbvm svcs" +X exit 1 +fi +setup_elbvm +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/elbvm.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh': 'MD5 check failed' + ) << \SHAR_EOF +2d34615f1d40f6125a2205e6118ba07f cloud_scripts/opt/cloud/bin/setup/elbvm.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh'` -ne 1578 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' is not 1578" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/bootstrap.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" +CMDLINE=/var/cache/cloud/cmdline +X +rm -f /var/cache/cloud/enabled_svcs +rm -f /var/cache/cloud/disabled_svcs +X +X. /lib/lsb/init-functions +X +log_it() { +X echo "$(date) $@" >> /var/log/cloud.log +X log_action_msg "$@" +} +X +hypervisor() { +X if [ -d /proc/xen ]; then +X mount -t xenfs none /proc/xen +X $(dmesg | grep -q "Xen HVM") +X if [ $? -eq 0 ]; then # 1=PV,0=HVM +X echo "xen-hvm" && return 0 +X else +X echo "xen-pv" && return 0 +X fi +X fi +X +X [ -x /usr/sbin/virt-what ] && local facts=( $(virt-what) ) +X if [ "$facts" != "" ]; then +X # Xen HVM is recognized as Hyperv when Viridian extensions are enabled +X if [ "${facts[-1]}" == "xen-domU" ] && [ "${facts[0]}" == "hyperv" ]; then +X echo "xen-hvm" && return 0 +X else +X echo ${facts[-1]} && return 0 +X fi +X fi +X +X grep -q QEMU /proc/cpuinfo && echo "kvm" && return 0 +X grep -q QEMU /var/log/messages && echo "kvm" && return 0 +X +X vmware-checkvm &> /dev/null && echo "vmware" && return 0 +X +X echo "unknown" && return 1 +} +X +config_guest() { +X [ ! -d /proc/xen ] && sed -i 's/^vc/#vc/' /etc/inittab && telinit q +X [ -d /proc/xen ] && sed -i 's/^#vc/vc/' /etc/inittab && telinit q +X +X systemctl daemon-reload +X +X case $HYPERVISOR in +X xen-pv|xen-domU) +X systemctl stop ntpd +X systemctl disable ntpd +X systemctl enable xe-daemon +X systemctl start xe-daemon +X +X cat /proc/cmdline > $CMDLINE +X sed -i "s/%/ /g" $CMDLINE +X ;; +X xen-hvm) +X systemctl stop ntpd +X systemctl disable ntpd +X systemctl enable xe-daemon +X systemctl start xe-daemon +X +X if [ ! -f /usr/bin/xenstore-read ]; then +X log_it "ERROR: xentools not installed, cannot found xenstore-read" && exit 5 +X fi +X /usr/bin/xenstore-read vm-data/cloudstack/init > $CMDLINE +X sed -i "s/%/ /g" $CMDLINE +X ;; +X kvm) +X # Configure kvm hotplug support +X if grep -E 'CONFIG_HOTPLUG_PCI=y|CONFIG_HOTPLUG_PCI_ACPI=y' /boot/config-`uname -r`; then +X log_it "acpiphp and pci_hotplug module already compiled in" +X else +X modprobe acpiphp 2> /dev/null && log_it "acpiphp module loaded" || true +X modprobe pci_hotplug 2> /dev/null && log_it "pci_hotplug module loaded" || true +X fi +X +X sed -i -e "/^s0:2345:respawn.*/d" /etc/inittab +X sed -i -e "/6:23:respawn/a\s0:2345:respawn:/sbin/getty -L 115200 ttyS0 vt102" /etc/inittab +X systemctl enable qemu-guest-agent +X systemctl start qemu-guest-agent +X +X # Wait for $CMDLINE file to be written by the qemu-guest-agent +X for i in {1..60}; do +X if [ -s $CMDLINE ]; then +X log_it "Received a new non-empty cmdline file from qemu-guest-agent" +X break +X fi +X sleep 1 +X done +X if [ ! -s $CMDLINE ]; then +X log_it "Failed to receive the cmdline file via the qemu-guest-agent" +X fi +X ;; +X vmware) +X # system time sync'd with host via vmware tools +X systemctl stop ntpd +X systemctl disable ntpd +X systemctl enable open-vm-tools +X systemctl start open-vm-tools +X +X vmtoolsd --cmd 'machine.id.get' > $CMDLINE +X ;; +X virtualpc|hyperv) +X # Hyper-V is recognized as virtualpc hypervisor type. Boot args are passed using KVP Daemon +X systemctl enable hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service +X systemctl start hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service +X sleep 5 +X cp -f /var/opt/hyperv/.kvp_pool_0 $CMDLINE +X cat /dev/null > /var/opt/hyperv/.kvp_pool_0 +X ;; +X virtualbox) +X # Virtualbox is used to test the virtual router +X # get the commandline from a dmistring (yes, hacky!) +X dmidecode | grep cmdline | sed 's/^.*cmdline://' > $CMDLINE +X RV=$? +X if [ $RV -ne 0 ] ; then +X log_it "Failed to get cmdline from a virtualbox dmi property" +X fi +X ;; +X esac +X +X # Find and export guest type +X export TYPE=$(grep -Po 'type=\K[a-zA-Z]*' $CMDLINE) +} +X +patch_systemvm() { +X local patchfile=$1 +X local backupfolder="/tmp/.conf.backup" +X local logfile="/var/log/patchsystemvm.log" +X if [ -f /usr/local/cloud/systemvm/conf/cloud.jks ]; then +X rm -fr $backupfolder +X mkdir -p $backupfolder +X cp -r /usr/local/cloud/systemvm/conf/* $backupfolder/ +X fi +X rm /usr/local/cloud/systemvm -rf +X mkdir -p /usr/local/cloud/systemvm +X echo "All" | unzip $patchfile -d /usr/local/cloud/systemvm >$logfile 2>&1 +X find /usr/local/cloud/systemvm/ -name \*.sh | xargs chmod 555 +X if [ -f $backupfolder/cloud.jks ]; then +X cp -r $backupfolder/* /usr/local/cloud/systemvm/conf/ +X echo "Restored keystore file and certs using backup" >> $logfile +X fi +X rm -fr $backupfolder +X # Import global cacerts into 'cloud' service's keystore +X keytool -importkeystore -srckeystore /etc/ssl/certs/java/cacerts -destkeystore /usr/local/cloud/systemvm/certs/realhostip.keystore -srcstorepass changeit -deststorepass vmops.com -noprompt || true +X return 0 +} +X +patch() { +X local PATCH_MOUNT=/media/cdrom +X local logfile="/var/log/patchsystemvm.log" +X if [ "$TYPE" == "consoleproxy" ] || [ "$TYPE" == "secstorage" ] && [ -f ${PATCH_MOUNT}/agent.zip ] && [ -f /var/cache/cloud/patch.required ] +X then +X echo "Patching systemvm for cloud service with mount=$PATCH_MOUNT for type=$TYPE" >> $logfile +X patch_systemvm ${PATCH_MOUNT}/agent.zip +X if [ $? -gt 0 ] +X then +X echo "Failed to apply patch systemvm\n" >> $logfile +X exit 1 +X fi +X fi +X +X rm -f /var/cache/cloud/patch.required +X chmod -x /etc/systemd/system/cloud*.service +X systemctl daemon-reload +X umount $PATCH_MOUNT || true +X +X if [ -f /mnt/cmdline ]; then +X cat /mnt/cmdline > $CMDLINE +X fi +X return 0 +} +X +config_sysctl() { +X # When there is more memory reset the cache back pressure to default 100 +X physmem=$(free|awk '/^Mem:/{print $2}') +X if [ $((physmem)) -lt 409600 ]; then +X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 200" /etc/sysctl.conf +X else +X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 100" /etc/sysctl.conf +X fi +X +X sync +X sysctl -p +} +X +bootstrap() { +X log_it "Bootstrapping systemvm appliance" +X +X export HYPERVISOR=$(hypervisor) +X [ $? -ne 0 ] && log_it "Failed to detect hypervisor type, bailing out" && exit 10 +X log_it "Starting guest services for $HYPERVISOR" +X +X config_guest +X patch +X config_sysctl +X +X log_it "Configuring systemvm type=$TYPE" +X if [ -f "/opt/cloud/bin/setup/$TYPE.sh" ]; then +X /opt/cloud/bin/setup/$TYPE.sh +X else +X /opt/cloud/bin/setup/default.sh +X fi +X +X log_it "Finished setting up systemvm" +X exit 0 +} +X +bootstrap +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/bootstrap.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh': 'MD5 check failed' + ) << \SHAR_EOF +722a9c6abfff147c7727fdcd85c96767 cloud_scripts/opt/cloud/bin/setup/bootstrap.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh'` -ne 7721 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' is not 7721" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_console_proxy() { +X log_it "Setting up console proxy system vm" +X +X echo "cloud" > /var/cache/cloud/enabled_svcs +X echo "haproxy dnsmasq apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs +X mkdir -p /var/log/cloud +X +X setup_common eth0 eth1 eth2 +X setup_system_rfc1918_internal +X +X log_it "Setting up entry in hosts" +X sed -i /$NAME/d /etc/hosts +X public_ip=`getPublicIp` +X echo "$public_ip $NAME" >> /etc/hosts +X +X log_it "Applying iptables rules" +X cp /etc/iptables/iptables-consoleproxy /etc/iptables/rules.v4 +X +X log_it "Configuring sshd" +X local hyp=$HYPERVISOR +X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then +X setup_sshd $ETH1_IP "eth1" +X else +X setup_sshd $ETH0_IP "eth0" +X fi +X +X disable_rpfilter +X enable_fwding 0 +X enable_irqbalance 0 +X rm -f /etc/logrotate.d/cloud +} +X +setup_console_proxy +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh': 'MD5 check failed' + ) << \SHAR_EOF +44adac9bf5e54d4791da00e3d1bdaf46 cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh'` -ne 1658 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' is not 1658" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/common.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/common.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/common.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/common.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/common.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" +X +X. /lib/lsb/init-functions +X +log_it() { +X echo "$(date) $@" >> /var/log/cloud.log +X log_action_msg "$@" +} +X +init_interfaces_orderby_macs() { +X macs=( $(echo $1 | sed "s/|/ /g") ) +X total_nics=${#macs[@]} +X interface_file=${2:-"/etc/network/interfaces"} +X rule_file=${3:-"/etc/udev/rules.d/70-persistent-net.rules"} +X +X echo -n "auto lo" > $interface_file +X for((i=0; i> $interface_file +X fi +X done +X +X cat >> $interface_file << EOF +X +iface lo inet loopback +X +EOF +X +X echo "" > $rule_file +X for((i=0; i < ${#macs[@]}; i++)) +X do +X echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${macs[$i]}\", NAME=\"eth$i\"" >> $rule_file +X done +} +X +init_interfaces() { +X if [ "$NIC_MACS" == "" ] +X then +X cat > /etc/network/interfaces << EOF +auto lo $1 $2 $3 +iface lo inet loopback +X +EOF +X else +X init_interfaces_orderby_macs "$NIC_MACS" +X fi +} +X +setup_interface() { +X local intfnum=$1 +X local ip=$2 +X local mask=$3 +X local gw=$4 +X local force=$5 +X local intf=eth${intfnum} +X local bootproto="static" +X +X if [ "$BOOTPROTO" == "dhcp" ] +X then +X if [ "$intfnum" != "0" ] +X then +X bootproto="dhcp" +X fi +X fi +X +X if [ "$ip" != "0.0.0.0" -a "$ip" != "" -o "$force" == "force" ] +X then +X echo "iface $intf inet $bootproto" >> /etc/network/interfaces +X if [ "$bootproto" == "static" ] +X then +X echo " address $ip " >> /etc/network/interfaces +X echo " netmask $mask" >> /etc/network/interfaces +X fi +X fi +X +X if [ "$ip" == "0.0.0.0" -o "$ip" == "" ] +X then +X ifconfig $intf down +X fi +X +X if [ "$force" == "force" ] +X then +X ifdown $intf +X else +X ifdown $intf +X if [ "$RROUTER" != "1" -o "$1" != "2" ] +X then +X ifup $intf +X fi +X fi +} +X +setup_interface_ipv6() { +X sysctl net.ipv6.conf.all.disable_ipv6=0 +X sysctl net.ipv6.conf.all.forwarding=1 +X sysctl net.ipv6.conf.all.accept_ra=1 +X +X sed -i "s/net.ipv6.conf.all.disable_ipv6 =.*$/net.ipv6.conf.all.disable_ipv6 = 0/" /etc/sysctl.conf +X sed -i "s/net.ipv6.conf.all.forwarding =.*$/net.ipv6.conf.all.forwarding = 1/" /etc/sysctl.conf +X sed -i "s/net.ipv6.conf.all.accept_ra =.*$/net.ipv6.conf.all.accept_ra = 1/" /etc/sysctl.conf +X +X local intfnum=$1 +X local ipv6="$2" +X local prelen="$3" +X local intf=eth${intfnum} +X +X echo "iface $intf inet6 static" >> /etc/network/interfaces +X echo " address $ipv6 " >> /etc/network/interfaces +X echo " netmask $prelen" >> /etc/network/interfaces +X echo " accept_ra 1" >> /etc/network/interfaces +X ifdown $intf +X ifup $intf +} +X +X +enable_fwding() { +X local enabled=$1 +X log_it "cloud: enable_fwding = $1" +X log_it "enable_fwding = $1" +X echo "$1" > /proc/sys/net/ipv4/ip_forward +X [ -f /etc/iptables/iptables.conf ] && sed -i "s/ENABLE_ROUTING=.*$/ENABLE_ROUTING=$enabled/" /etc/iptables/iptables.conf && return +} +X +enable_passive_ftp() { +X log_it "cloud: enabling passive FTP for guest VMs" +X echo "$1" > /proc/sys/net/netfilter/nf_conntrack_helper +} +X +disable_rpfilter() { +X log_it "cloud: disable rp_filter" +X log_it "disable rpfilter" +X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf +} +X +get_public_vif_list() { +X local vif_list="" +X for i in /sys/class/net/eth*; do +X vif=$(basename $i); +X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] +X then +X vif_list="$vif_list $vif"; +X fi +X done +X +X echo $vif_list +} +X +disable_rpfilter_domR() { +X log_it "cloud: Tuning rp_filter on public interfaces" +X +X VIF_LIST=$(get_public_vif_list) +X log_it "rpfilter public interfaces : $VIF_LIST" +X if [ "$DISABLE_RP_FILTER" == "true" ] +X then +X log_it "cloud: disable rp_filter on public interfaces" +X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf +X echo "0" > /proc/sys/net/ipv4/conf/default/rp_filter +X for vif in $VIF_LIST; do +X log_it "cloud: disable rp_filter on public interface: $vif" +X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 0/" /etc/sysctl.conf +X echo "0" > /proc/sys/net/ipv4/conf/$vif/rp_filter +X done +X else +X log_it "cloud: enable rp_filter on public interfaces" +X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 1/" /etc/sysctl.conf +X echo "1" > /proc/sys/net/ipv4/conf/default/rp_filter +X for vif in $VIF_LIST; do +X log_it "cloud: enable rp_filter on public interface: $vif" +X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 1/" /etc/sysctl.conf +X echo "1" > /proc/sys/net/ipv4/conf/$vif/rp_filter +X done +X fi +X log_it "cloud: Enabling rp_filter on Non-public interfaces(eth0,eth1,lo)" +X echo "1" > /proc/sys/net/ipv4/conf/eth0/rp_filter +X echo "1" > /proc/sys/net/ipv4/conf/eth1/rp_filter +X echo "1" > /proc/sys/net/ipv4/conf/lo/rp_filter +} +X +enable_irqbalance() { +X local enabled=$1 +X local proc=0 +X +X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) +X if [ $proc -le 1 ] && [ $enabled -eq 1 ] +X then +X enabled=0 +X fi +X +X log_it "Processors = $proc Enable service ${svc} = $enabled" +X local cfg=/etc/default/irqbalance +X [ -f $cfg ] && sed -i "s/ENABLED=.*$/ENABLED=$enabled/" $cfg && return +} +X +enable_vpc_rpsrfs() { +X local enable=$1 +X if [ $enable -eq 0 ] +X then +X echo 0 > /etc/rpsrfsenable +X else +X echo 1 > /etc/rpsrfsenable +X fi +X +X return 0 +} +X +enable_rpsrfs() { +X local enable=$1 +X +X if [ $enable -eq 0 ] +X then +X echo 0 > /etc/rpsrfsenable +X return 0 +X fi +X +X if [ ! -f /sys/class/net/eth0/queues/rx-0/rps_cpus ] +X then +X echo "rps is not enabled in the kernel" +X echo 0 > /etc/rpsrfsenable +X return 0 +X fi +X +X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) +X if [ $proc -le 1 ] +X then +X echo 0 > /etc/rpsrfsenable +X return 0; +X fi +X +X echo 1 > /etc/rpsrfsenable +X num=1 +X num=$(($num<<$proc)) +X num=$(($num-1)); +X echo $num; +X hex=$(printf "%x\n" $num) +X echo $hex; +X #enable rps +X echo $hex > /sys/class/net/eth0/queues/rx-0/rps_cpus +X echo $hex > /sys/class/net/eth2/queues/rx-0/rps_cpus +X +X #enble rfs +X echo 256 > /proc/sys/net/core/rps_sock_flow_entries +X echo 256 > /sys/class/net/eth0/queues/rx-0/rps_flow_cnt +X echo 256 > /sys/class/net/eth2/queues/rx-0/rps_flow_cnt +} +X +setup_common() { +X init_interfaces $1 $2 $3 +X if [ -n "$ETH0_IP" ] +X then +X setup_interface "0" $ETH0_IP $ETH0_MASK $GW +X fi +X if [ -n "$ETH0_IP6" ] +X then +X setup_interface_ipv6 "0" $ETH0_IP6 $ETH0_IP6_PRELEN +X fi +X setup_interface "1" $ETH1_IP $ETH1_MASK $GW +X if [ -n "$ETH2_IP" ] +X then +X setup_interface "2" $ETH2_IP $ETH2_MASK $GW +X fi +X +X echo $NAME > /etc/hostname +X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon +X hostnamectl set-hostname $NAME +X +X #Nameserver +X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries +X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries +X if [ -n "$internalNS1" ] +X then +X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS1" > /etc/resolv.conf +X fi +X +X if [ -n "$internalNS2" ] +X then +X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS2" >> /etc/resolv.conf +X fi +X if [ -n "$NS1" ] +X then +X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS1" >> /etc/resolv.conf +X fi +X +X if [ -n "$NS2" ] +X then +X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS2" >> /etc/resolv.conf +X fi +X +X if [ -n "$IP6_NS1" ] +X then +X echo "nameserver $IP6_NS1" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $IP6_NS1" >> /etc/resolv.conf +X fi +X if [ -n "$IP6_NS2" ] +X then +X echo "nameserver $IP6_NS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $IP6_NS2" >> /etc/resolv.conf +X fi +X +X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] +X then +X ip route add $MGMTNET via $LOCAL_GW dev eth1 +X fi +X +X ip route delete default +X if [ "$RROUTER" != "1" ] +X then +X gwdev=$3 +X if [ -z "$gwdev" ] +X then +X gwdev="eth0" +X fi +X +X ip route add default via $GW dev $gwdev +X fi +X +X # Workaround to activate vSwitch under VMware +X timeout 3 ping -n -c 3 $GW & +X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] +X then +X timeout 3 ping -n -c 3 $LOCAL_GW & +X #This code is added to address ARP issue by pinging MGMT_GW +X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') +X timeout 3 ping -n -c 3 $MGMT_GW & +X fi +X +X if [ "$HYPERVISOR" == "vmware" ]; then +X ntpq -p &> /dev/null || vmware-toolbox-cmd timesync enable +X fi +} +X +setup_dnsmasq() { +X log_it "Setting up dnsmasq" +X +X touch /etc/dhcpopts.txt +X +X [ -z $DHCP_RANGE ] && [ $ETH0_IP ] && DHCP_RANGE=$ETH0_IP +X [ $ETH0_IP6 ] && DHCP_RANGE_IP6=$ETH0_IP6 +X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" +X #removing the dnsmasq multiple ranges config file. +X rm /etc/dnsmasq.d/multiple_ranges.conf +X +X #get the template +X cp /etc/dnsmasq.conf.tmpl /etc/dnsmasq.conf +X +X if [ -n "$DOMAIN" ] +X then +X #send domain name to dhcp clients +X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\"$DOMAIN\"/ /etc/dnsmasq.conf +X #DNS server will append $DOMAIN to local queries +X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf +X #answer all local domain queries +X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf +X fi +X +X if [ -n "$DNS_SEARCH_ORDER" ] +X then +X sed -i -e "/^[#]*dhcp-option.*=119.*$/d" /etc/dnsmasq.conf +X echo "dhcp-option-force=119,$DNS_SEARCH_ORDER" >> /etc/dnsmasq.conf +X # set the domain search order as a space seprated list for option 15 +X DNS_SEARCH_ORDER=$(echo $DNS_SEARCH_ORDER | sed 's/,/ /g') +X #send domain name to dhcp clients +X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\""$DNS_SEARCH_ORDER"\"/ /etc/dnsmasq.conf +X fi +X +X if [ $DHCP_RANGE ] +X then +X sed -i -e "s/^dhcp-range_ip4=.*$/dhcp-range=$DHCP_RANGE,static/" /etc/dnsmasq.conf +X else +X sed -i -e "s/^dhcp-range_ip4=.*$//" /etc/dnsmasq.conf +X fi +X if [ $DHCP_RANGE_IP6 ] +X then +X sed -i -e "s/^dhcp-range_ip6=.*$/dhcp-range=$DHCP_RANGE_IP6,static/" /etc/dnsmasq.conf +X # For nondefault6 tagged host, don't send dns-server information +X sed -i /nondefault6/d /etc/dnsmasq.conf +X echo "dhcp-option=nondefault6,option6:dns-server" >> /etc/dnsmasq.conf +X else +X sed -i -e "s/^dhcp-range_ip6=.*$//" /etc/dnsmasq.conf +X fi +X +X if [ "$RROUTER" == "1" ] +X then +X DEFAULT_GW=$GUEST_GW +X INTERNAL_DNS=$GUEST_GW +X else +X if [ "$TYPE" == "dhcpsrvr" ] +X then +X DEFAULT_GW=$GW +X else +X DEFAULT_GW=$ETH0_IP +X fi +X INTERNAL_DNS=$ETH0_IP +X fi +X sed -i -e "/^[#]*dhcp-option=option:router.*$/d" /etc/dnsmasq.conf +X [ $DEFAULT_GW ] && echo "dhcp-option=option:router,$DEFAULT_GW" >> /etc/dnsmasq.conf +X +X [ $ETH0_IP ] && [ $NS1 ] && NS="$NS1," +X [ $ETH0_IP ] && [ $NS2 ] && NS="$NS$NS2," +X [ $ETH0_IP6 ] && [ $IP6_NS1 ] && NS6="[$IP6_NS1]," +X [ $ETH0_IP6 ] && [ $IP6_NS2 ] && NS6="$NS6[$IP6_NS2]," +X #for now set up ourself as the dns server as well +X sed -i -e "/^[#]*dhcp-option=6,.*$/d" /etc/dnsmasq.conf +X sed -i -e "/^[#]*dhcp-option=option6:dns-server,.*$/d" /etc/dnsmasq.conf +X if [ "$USE_EXTERNAL_DNS" != "true" ] +X then +X [ $ETH0_IP ] && NS="$INTERNAL_DNS,$NS" +X [ $ETH0_IP6 ] && NS6="[::],$NS6" +X # enable dns +X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf +X else +X # disable dns +X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf +X echo "port=0" >> /etc/dnsmasq.conf +X fi +X NS=${NS%?} +X NS6=${NS6%?} +X [ $ETH0_IP ] && echo "dhcp-option=6,$NS" >> /etc/dnsmasq.conf +X [ $ETH0_IP6 ] && echo "dhcp-option=option6:dns-server,$NS6" >> /etc/dnsmasq.conf +X #adding the name data-server to the /etc/hosts for allowing the access to user-data service and ssh-key reset in every subnet. +X #removing the existing entires to avoid duplicates on restarts. +X sed -i '/data-server/d' /etc/hosts +X if [ -n "$ETH0_IP" ] +X then +X echo "$ETH0_IP data-server" >> /etc/hosts +X fi +X if [ -n "$ETH0_IP6" ] +X then +X echo "$ETH0_IP6 data-server" >> /etc/hosts +X fi +X #add the dhcp-client-update only if dnsmasq version is 2.6 and above +X dnsmasqVersion=$(dnsmasq -v | grep version -m 1 | grep -o "[[:digit:]]\.[[:digit:]]") +X major=$(echo "$dnsmasqVersion" | cut -d '.' -f 1) +X minor=$(echo "$dnsmasqVersion" | cut -d '.' -f 2) +X if [ "$major" -eq '2' -a "$minor" -ge '6' ] || [ "$major" -gt '2' ] +X then +X sed -i -e "/^dhcp-client-update/d" /etc/dnsmasq.conf +X echo 'dhcp-client-update' >> /etc/dnsmasq.conf +X fi +X +X command -v dhcp_release > /dev/null 2>&1 +X no_dhcp_release=$? +X if [ $no_dhcp_release -eq 0 -a -z "$ETH0_IP6" ] +X then +X echo 1 > /var/cache/cloud/dnsmasq_managed_lease +X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf +X else +X echo 0 > /var/cache/cloud/dnsmasq_managed_lease +X fi +} +X +setup_sshd(){ +X local ip=$1 +X local eth=$2 +X [ -f /etc/ssh/sshd_config ] && sed -i -e "s/^[#]*ListenAddress.*$/ListenAddress $ip/" /etc/ssh/sshd_config +X sed -i "/3922/s/eth./$eth/" /etc/iptables/rules.v4 +} +X +setup_vpc_apache2() { +X log_it "Setting up apache web server for VPC" +X systemctl disable apache2 +X clean_ipalias_config +X setup_apache2_common +} +X +clean_ipalias_config() { +X rm -f /etc/apache2/conf.d/ports.*.meta-data.conf +X rm -f /etc/apache2/sites-available/ipAlias* +X rm -f /etc/apache2/sites-enabled/ipAlias* +X rm -f /etc/apache2/conf.d/vhost*.conf +X rm -f /etc/apache2/ports.conf +X rm -f /etc/apache2/vhostexample.conf +X rm -f /etc/apache2/sites-available/* +X rm -f /etc/apache2/sites-enabled/* +X +X rm -rf /etc/failure_config +} +X +setup_apache2_common() { +X sed -i 's/^Include ports.conf.*/# CS: Done by Python CsApp config\n#Include ports.conf/g' /etc/apache2/apache2.conf +X # Disable listing of http://SSVM-IP/icons folder for security issue. see article http://www.i-lateral.com/tutorials/disabling-the-icons-folder-on-an-ubuntu-web-server/ +X [ -f /etc/apache2/mods-available/alias.conf ] && sed -i s/"Options Indexes MultiViews"/"Options -Indexes MultiViews"/ /etc/apache2/mods-available/alias.conf +X +X echo "Options -Indexes" > /var/www/html/.htaccess +} +X +setup_apache2() { +X log_it "Setting up apache web server" +X mkdir -p /var/www +X chown www-data:www-data -R /var/www +X clean_ipalias_config +X setup_apache2_common +X local ip=$1 +} +X +setup_aesni() { +X if [ `grep aes /proc/cpuinfo | wc -l` -gt 0 ] +X then +X modprobe aesni_intel +X fi +} +X +setup_storage_network() { +X if [ x"$STORAGE_IP" == "x" -o x"$STORAGE_NETMASK" == "x" ] +X then +X log_it "Incompleted parameters STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR. Cannot setup storage network" +X return +X fi +X +X echo "" >> /etc/network/interfaces +X echo "auto eth3" >> /etc/network/interfaces +X +X setup_interface "3" "$STORAGE_IP" "$STORAGE_NETMASK" +X [ -n "$MTU" ] && ifconfig eth3 mtu $MTU && echo " mtu $MTU" >> /etc/network/interfaces +X #ip route add "$STORAGE_CIDR" via "$STORAGE_IP" +X log_it "Successfully setup storage network with STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR" +} +X +setup_system_rfc1918_internal() { +X public_ip=`getPublicIp` +X echo "$public_ip" | grep -E "^((127\.)|(10\.)|(172\.1[6-9]\.)|(172\.2[0-9]\.)|(172\.3[0-1]\.)|(192\.168\.))" +X if [ "$?" == "0" ]; then +X log_it "Not setting up route of RFC1918 space to $LOCAL_GW befause $public_ip is RFC1918." +X else +X log_it "Setting up route of RFC1918 space to $LOCAL_GW" +X # Setup general route for RFC 1918 space, as otherwise it will be sent to +X # the public gateway and not work +X # More specific routes that may be set have preference over this generic route. +X ip route add 10.0.0.0/8 via $LOCAL_GW +X ip route add 172.16.0.0/12 via $LOCAL_GW +X ip route add 192.168.0.0/16 via $LOCAL_GW +X fi +} +X +getPublicIp() { +X public_ip=$ETH2_IP +X [ "$ETH2_IP" == "0.0.0.0" ] && public_ip=$ETH1_IP +X echo $public_ip +} +X +setup_ntp() { +X log_it "Setting up NTP" +X NTP_CONF_FILE="/etc/ntp.conf" +X if [ -f $NTP_CONF_FILE ] +X then +X IFS=',' read -a server_list <<< "$NTP_SERVER_LIST" +X for (( iterator=${#server_list[@]}-1 ; iterator>=0 ; iterator-- )) +X do +X server=$(echo ${server_list[iterator]} | tr -d '\r') +X PATTERN="server $server" +X if grep -q "^$PATTERN$" $NTP_CONF_FILE ; then +X sed -i "/^$PATTERN$/d" $NTP_CONF_FILE +X fi +X sed -i "0,/^server/s//$PATTERN\nserver/" $NTP_CONF_FILE +X done +X systemctl enable ntp +X else +X log_it "NTP configuration file not found" +X fi +} +X +routing_svcs() { +X echo "haproxy apache2" > /var/cache/cloud/enabled_svcs +X echo "cloud nfs-common portmap" > /var/cache/cloud/disabled_svcs +X if [ "$RROUTER" -eq "1" ] +X then +X echo "keepalived conntrackd" >> /var/cache/cloud/enabled_svcs +X echo "dnsmasq" >> /var/cache/cloud/disabled_svcs +X else +X echo "dnsmasq" >> /var/cache/cloud/enabled_svcs +X echo "keepalived conntrackd " >> /var/cache/cloud/disabled_svcs +X fi +} +X +parse_cmd_line() { +X CMDLINE=$(cat /var/cache/cloud/cmdline) +X TYPE="unknown" +X BOOTPROTO="static" +X DISABLE_RP_FILTER="false" +X STORAGE_IP="" +X STORAGE_NETMASK="" +X STORAGE_CIDR="" +X VM_PASSWORD="" +X +X CHEF_TMP_FILE=/tmp/cmdline.json +X COMMA="\t" +X echo -e "{\n\"type\": \"cmdline\"," > ${CHEF_TMP_FILE} +X echo -e "\"cmd_line\": {" >> ${CHEF_TMP_FILE} +X +X for i in $CMDLINE +X do +X # search for foo=bar pattern and cut out foo +X KEY=$(echo $i | cut -d= -f1) +X VALUE=$(echo $i | cut -d= -f2) +X echo -en ${COMMA} >> ${CHEF_TMP_FILE} +X # Two lines so values do not accidently interpretted as escapes!! +X echo -n \"${KEY}\"': '\"${VALUE}\" >> ${CHEF_TMP_FILE} +X COMMA=",\n\t" +X case $KEY in +X disable_rp_filter) +X export DISABLE_RP_FILTER=$VALUE +X ;; +X eth0ip) +X export ETH0_IP=$VALUE +X ;; +X eth1ip) +X export ETH1_IP=$VALUE +X ;; +X eth2ip) +X export ETH2_IP=$VALUE +X ;; +X host) +X export MGMT_HOST=$VALUE +X ;; +X gateway) +X export GW=$VALUE +X ;; +X ip6gateway) +X export IP6GW=$VALUE +X ;; +X eth0mask) +X export ETH0_MASK=$VALUE +X ;; +X eth1mask) +X export ETH1_MASK=$VALUE +X ;; +X eth2mask) +X export ETH2_MASK=$VALUE +X ;; +X eth0ip6) +X export ETH0_IP6=$VALUE +X ;; +X eth0ip6prelen) +X export ETH0_IP6_PRELEN=$VALUE +X ;; +X internaldns1) +X export internalNS1=$VALUE +X ;; +X internaldns2) +X export internalNS2=$VALUE +X ;; +X dns1) +X export NS1=$VALUE +X ;; +X dns2) +X export NS2=$VALUE +X ;; +X ip6dns1) +X export IP6_NS1=$VALUE +X ;; +X ip6dns2) +X export IP6_NS2=$VALUE +X ;; +X domain) +X export DOMAIN=$VALUE +X ;; +X dnssearchorder) +X export DNS_SEARCH_ORDER=$VALUE +X ;; +X useextdns) +X export USE_EXTERNAL_DNS=$VALUE +X ;; +X mgmtcidr) +X export MGMTNET=$VALUE +X ;; +X localgw) +X export LOCAL_GW=$VALUE +X ;; +X template) +X export TEMPLATE=$VALUE +X ;; +X sshonguest) +X export SSHONGUEST=$VALUE +X ;; +X name) +X export NAME=$VALUE +X ;; +X dhcprange) +X export DHCP_RANGE=$(echo $VALUE | tr ':' ',') +X ;; +X bootproto) +X export BOOTPROTO=$VALUE +X ;; +X type) +X export TYPE=$VALUE +X ;; +X defaultroute) +X export DEFAULTROUTE=$VALUE +X ;; +X redundant_router) +X export RROUTER=$VALUE +X ;; +X redundant_state) +X export RROUTER_STATE=$VALUE +X ;; +X guestgw) +X export GUEST_GW=$VALUE +X ;; +X guestbrd) +X export GUEST_BRD=$VALUE +X ;; +X guestcidrsize) +X export GUEST_CIDR_SIZE=$VALUE +X ;; +X router_pr) +X export ROUTER_PR=$VALUE +X ;; +X extra_pubnics) +X export EXTRA_PUBNICS=$VALUE +X ;; +X nic_macs) +X export NIC_MACS=$VALUE +X ;; +X mtu) +X export MTU=$VALUE +X ;; +X storageip) +X export STORAGE_IP=$VALUE +X ;; +X storagenetmask) +X export STORAGE_NETMASK=$VALUE +X ;; +X storagecidr) +X export STORAGE_CIDR=$VALUE +X ;; +X vmpassword) +X export VM_PASSWORD=$VALUE +X ;; +X vpccidr) +X export VPCCIDR=$VALUE +X ;; +X cidrsize) +X export CIDR_SIZE=$VALUE +X ;; +X advert_int) +X export ADVERT_INT=$VALUE +X ;; +X ntpserverlist) +X export NTP_SERVER_LIST=$VALUE +X ;; +X esac +X done +X echo -e "\n\t}\n}" >> ${CHEF_TMP_FILE} +X if [ "$TYPE" != "unknown" ] +X then +X mv ${CHEF_TMP_FILE} /var/cache/cloud/cmd_line.json +X fi +X +X [ $ETH0_IP ] && export LOCAL_ADDRS=$ETH0_IP +X [ $ETH0_IP6 ] && export LOCAL_ADDRS=$ETH0_IP6 +X [ $ETH0_IP ] && [ $ETH0_IP6 ] && export LOCAL_ADDRS="$ETH0_IP,$ETH0_IP6" +X +X # Randomize cloud password so only ssh login is allowed +X echo "cloud:`openssl rand -base64 32`" | chpasswd +X +X if [ x"$VM_PASSWORD" != x"" ] +X then +X echo "root:$VM_PASSWORD" | chpasswd +X fi +} +X +parse_cmd_line +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/common.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/common.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/common.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/common.sh': 'MD5 check failed' + ) << \SHAR_EOF +8754c81bacd82458e4ce221b476505ea cloud_scripts/opt/cloud/bin/setup/common.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/common.sh'` -ne 22472 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/common.sh' is not 22472" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +dhcpsrvr_svcs() { +X echo "dnsmasq apache2" > /var/cache/cloud/enabled_svcs +X echo "cloud nfs-common conntrackd keepalived haproxy portmap" > /var/cache/cloud/disabled_svcs +} +X +setup_dhcpsrvr() { +X log_it "Setting up dhcp server system vm" +X setup_common eth0 eth1 +X setup_dnsmasq +X setup_apache2 $ETH0_IP +X +X sed -i /$NAME/d /etc/hosts +X [ $ETH0_IP ] && echo "$ETH0_IP $NAME" >> /etc/hosts +X [ $ETH0_IP6 ] && echo "$ETH0_IP6 $NAME" >> /etc/hosts +X +X enable_irqbalance 0 +X enable_fwding 0 +X +X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 +X +X #Only allow DNS service for current network +X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X +X if [ "$SSHONGUEST" == "true" ] +X then +X setup_sshd $ETH0_IP "eth0" +X else +X setup_sshd $ETH1_IP "eth1" +X fi +} +X +dhcpsrvr_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute dhcpsrvr_svcs" +X exit 1 +fi +setup_dhcpsrvr +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh': 'MD5 check failed' + ) << \SHAR_EOF +08afc46420e5e388ba6be68cfdbd4a59 cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh'` -ne 1985 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' is not 1985" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/cloud-early-config ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/cloud-early-config (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/cloud-early-config (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" +X +# Clear boot up flag, it would be created by rc.local after boot up done +mkdir -p /var/cache/cloud +rm -f /var/cache/cloud/boot_up_done +X +[ -x /sbin/ifup ] || exit 0 +X +X. /lib/lsb/init-functions +X +log_it() { +X echo "$(date) $@" >> /var/log/cloud.log +X log_action_msg "$@" +} +X +patch() { +X local PATCH_MOUNT=/media/cdrom +X local patchfile=$PATCH_MOUNT/cloud-scripts.tgz +X local privkey=$PATCH_MOUNT/authorized_keys +X local md5file=/var/cache/cloud/cloud-scripts-signature +X local cdrom_dev= +X mkdir -p $PATCH_MOUNT +X +X if [ -e /dev/xvdd ]; then +X cdrom_dev=/dev/xvdd +X elif [ -e /dev/cdrom ]; then +X cdrom_dev=/dev/cdrom +X elif [ -e /dev/cdrom1 ]; then +X cdrom_dev=/dev/cdrom1 +X elif [ -e /dev/cdrom2 ]; then +X cdrom_dev=/dev/cdrom2 +X elif [ -e /dev/cdrom3 ]; then +X cdrom_dev=/dev/cdrom3 +X fi +X +X if [ -f /var/cache/cloud/authorized_keys ]; then +X privkey=/var/cache/cloud/authorized_keys +X fi +X +X if [ -n "$cdrom_dev" ]; then +X mount -o ro $cdrom_dev $PATCH_MOUNT +X local oldmd5= +X [ -f ${md5file} ] && oldmd5=$(cat ${md5file}) +X local newmd5= +X [ -f ${patchfile} ] && newmd5=$(md5sum ${patchfile} | awk '{print $1}') +X +X log_it "Scripts checksum detected: oldmd5=$oldmd5 newmd5=$newmd5" +X if [ "$oldmd5" != "$newmd5" ] && [ -f ${patchfile} ] && [ "$newmd5" != "" ] +X then +X tar xzf $patchfile -C / +X echo ${newmd5} > ${md5file} +X log_it "Patched scripts using $patchfile" +X touch /var/cache/cloud/patch.required +X fi +X +X if [ -f $privkey ]; then +X cp -f $privkey /root/.ssh/ +X chmod go-rwx /root/.ssh/authorized_keys +X fi +X fi +X +X return 0 +} +X +start() { +X log_it "Executing cloud-early-config" +X +X # Clear /tmp for file lock +X rm -f /tmp/*.lock +X rm -f /tmp/rrouter_bumped +X rm -f /root/.rnd +X echo "" > /root/.ssh/known_hosts +X +X patch +X sync +X /opt/cloud/bin/setup/bootstrap.sh +X +X log_it "Finished setting up systemvm" +X exit 0 +} +X +start +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/cloud-early-config failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config': 'MD5 check failed' + ) << \SHAR_EOF +c9e5973de3771fd5f5e9b490c60db970 cloud_scripts/opt/cloud/bin/setup/cloud-early-config +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config'` -ne 2765 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' is not 2765" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/default.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/default.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/default.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/default.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/default.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_default() { +X cat > /etc/network/interfaces << EOF +auto lo +iface lo inet loopback +EOF +X cp -f /etc/iptables/rt_tables_init /etc/iproute2/rt_tables +} +X +setup_default +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/default.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/default.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/default.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/default.sh': 'MD5 check failed' + ) << \SHAR_EOF +20e3a01cb77930eba6438de6d9a3f193 cloud_scripts/opt/cloud/bin/setup/default.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/default.sh'` -ne 1002 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/default.sh' is not 1002" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/loadbalancer.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/loadbalancer.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/loadbalancer.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +X +# $Id: loadbalancer.sh 9947 2010-06-25 19:34:24Z manuel $ $HeadURL: svn://svn.lab.vmops.com/repos/vmdev/java/patches/xenserver/root/loadbalancer.sh $ +# loadbalancer.sh -- reconfigure loadbalancer rules +# @VERSION@ +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s: -i -a -d -f -s \n" $(basename $0) >&2 +} +X +# set -x +X +# ensure that the nic has the public ip we are load balancing on +ip_entry() { +X local added=$1 +X local removed=$2 +X +X if [ "$added" == "none" ] +X then +X added="" +X fi +X +X if [ "$removed" == "none" ] +X then +X removed="" +X fi +X +X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") +X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") +X +X for i in $a +X do +X local pubIp=$(echo $i | cut -d: -f1) +X logger -t cloud "Adding public ip $pubIp for load balancing" +X for vif in $VIF_LIST; do +X sudo ip addr add dev $vif $pubIp/32 +X #ignore error since it is because the ip is already there +X done +X done +X +X for i in $r +X do +X logger -t cloud "Removing public ips for deleted loadbalancers" +X local pubIp=$(echo $i | cut -d: -f1) +X logger -t cloud "Removing public ip $pubIp for deleted loadbalancers" +X for vif in $VIF_LIST; do +X sudo ip addr del $pubIp/32 dev $vif +X done +X done +X +X return 0 +} +get_lb_vif_list() { +# add eth0 to the VIF_LIST if it is not there, this allows guest VMs to use the LB service. +X local lb_list="$VIF_LIST eth0"; +X lb_list=$(echo $lb_list | tr " " "\n" | sort | uniq | tr "\n" " ") +X echo $lb_list +} +fw_remove_backup() { +X local lb_vif_list=$(get_lb_vif_list) +X for vif in $lb_vif_list; do +X sudo iptables -F back_load_balancer_$vif 2> /dev/null +X sudo iptables -D INPUT -i $vif -p tcp -j back_load_balancer_$vif 2> /dev/null +X sudo iptables -X back_load_balancer_$vif 2> /dev/null +X done +X sudo iptables -F back_lb_stats 2> /dev/null +X sudo iptables -D INPUT -p tcp -j back_lb_stats 2> /dev/null +X sudo iptables -X back_lb_stats 2> /dev/null +} +fw_restore() { +X local lb_vif_list=$(get_lb_vif_list) +X for vif in $lb_vif_list; do +X sudo iptables -F load_balancer_$vif 2> /dev/null +X sudo iptables -D INPUT -i $vif -p tcp -j load_balancer_$vif 2> /dev/null +X sudo iptables -X load_balancer_$vif 2> /dev/null +X sudo iptables -E back_load_balancer_$vif load_balancer_$vif 2> /dev/null +X done +X sudo iptables -F lb_stats 2> /dev/null +X sudo iptables -D INPUT -p tcp -j lb_stats 2> /dev/null +X sudo iptables -X lb_stats 2> /dev/null +X sudo iptables -E back_lb_stats lb_stats 2> /dev/null +} +# firewall entry to ensure that haproxy can receive on specified port +fw_entry() { +X local added=$1 +X local removed=$2 +X local stats=$3 +X +X if [ "$added" == "none" ] +X then +X added="" +X fi +X +X if [ "$removed" == "none" ] +X then +X removed="" +X fi +X +X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") +X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") +X +# back up the iptable rules by renaming before creating new. +X local lb_vif_list=$(get_lb_vif_list) +X for vif in $lb_vif_list; do +X sudo iptables -E load_balancer_$vif back_load_balancer_$vif 2> /dev/null +X sudo iptables -N load_balancer_$vif 2> /dev/null +X sudo iptables -A INPUT -i $vif -p tcp -j load_balancer_$vif +X done +X sudo iptables -E lb_stats back_lb_stats 2> /dev/null +X sudo iptables -N lb_stats 2> /dev/null +X sudo iptables -A INPUT -p tcp -j lb_stats +X +X for i in $a +X do +X local pubIp=$(echo $i | cut -d: -f1) +X local dport=$(echo $i | cut -d: -f2) +X local lb_vif_list=$(get_lb_vif_list) +X for vif in $lb_vif_list; do +X +#TODO : The below delete will be used only when we upgrade the from older verion to the newer one , the below delete become obsolute in the future. +X sudo iptables -D INPUT -i $vif -p tcp -d $pubIp --dport $dport -j ACCEPT 2> /dev/null +X +X sudo iptables -A load_balancer_$vif -p tcp -d $pubIp --dport $dport -j ACCEPT +X +X if [ $? -gt 0 ] +X then +X return 1 +X fi +X done +X done +X local pubIp=$(echo $stats | cut -d: -f1) +X local dport=$(echo $stats | cut -d: -f2) +X local cidrs=$(echo $stats | cut -d: -f3 | sed 's/-/,/') +X sudo iptables -A lb_stats -s $cidrs -p tcp -m state --state NEW -d $pubIp --dport $dport -j ACCEPT +X +X +#TODO : The below delete in the for-loop will be used only when we upgrade the from older verion to the newer one , the below delete become obsolute in the future. +X for i in $r +X do +X local pubIp=$(echo $i | cut -d: -f1) +X local dport=$(echo $i | cut -d: -f2) +X +X for vif in $VIF_LIST; do +X sudo iptables -D INPUT -i $vif -p tcp -d $pubIp --dport $dport -j ACCEPT 2> /dev/null +X done +X done +X +X return 0 +} +X +#Hot reconfigure HA Proxy in the routing domain +reconfig_lb() { +X logger -t cloud "Reconfiguring loadbalancer using $1" +X /root/reconfigLB.sh $1 +X return $? +} +X +# Restore the HA Proxy to its previous state, and revert iptables rules on DomR +restore_lb() { +X logger -t cloud "Restoring HA Proxy to previous state" +X # Copy the old version of haproxy.cfg into the file that reconfigLB.sh uses +X cp /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg.new +X +X if [ $? -eq 0 ] +X then +X # Run reconfigLB.sh again +X /root/reconfigLB.sh /etc/haproxy/haproxy.cfg.new +X fi +} +X +get_vif_list() { +X local vif_list="" +X for i in /sys/class/net/eth*; do +X vif=$(basename $i); +X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] +X then +X vif_list="$vif_list $vif"; +X fi +X done +X if [ "$vif_list" == "" ] +X then +X vif_list="eth0" +X fi +X +X logger -t cloud "Loadbalancer public interfaces = $vif_list" +X echo $vif_list +} +X +mflag= +iflag= +aflag= +dflag= +fflag= +sflag= +X +while getopts 'i:a:d:f:s:' OPTION +do +X case $OPTION in +X i) iflag=1 +X domRIp="$OPTARG" +X ;; +X a) aflag=1 +X addedIps="$OPTARG" +X ;; +X d) dflag=1 +X removedIps="$OPTARG" +X ;; +X f) fflag=1 +X cfgfile="$OPTARG" +X ;; +X s) sflag=1 +X statsIp="$OPTARG" +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [ "$addedIps" == "" ] +then +X addedIps="none" +fi +X +X +if [ "$removedIps" == "" ] +then +X removedIps="none" +fi +X +VIF_LIST=$(get_vif_list) +X +X +if [ "$addedIps" == "" ] +then +X addedIps="none" +fi +X +if [ "$removedIps" == "" ] +then +X removedIps="none" +fi +X +#FIXME: make this explicit via check on vm type or passed in flag +if [ "$VIF_LIST" == "eth0" ] +then +X ip_entry $addedIps $removedIps +fi +X +# hot reconfigure haproxy +reconfig_lb $cfgfile +X +if [ $? -gt 0 ] +then +X logger -t cloud "Reconfiguring loadbalancer failed" +X #FIXME: make this explicit via check on vm type or passed in flag +X if [ "$VIF_LIST" == "eth0" ] +X then +X ip_entry $removedIps $addedIps +X fi +X unlock_exit 1 $lock $locked +fi +X +# iptables entry to ensure that haproxy receives traffic +fw_entry $addedIps $removedIps $statsIp +X +if [ $? -gt 0 ] +then +X logger -t cloud "Failed to apply firewall rules for load balancing, reverting HA Proxy config" +X # Restore the LB +X restore_lb +X +X logger -t cloud "Reverting firewall config" +X # Revert iptables rules on DomR +X fw_restore +X +X #FIXME: make this explicit via check on vm type or passed in flag +X if [ "$VIF_LIST" == "eth0" ] +X then +X logger -t cloud "Reverting ip address changes to eth0" +X ip_entry $removedIps $addedIps +X fi +X +X unlock_exit 1 $lock $locked +else +X # Remove backedup iptable rules +X fw_remove_backup +fi +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/loadbalancer.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/loadbalancer.sh': 'MD5 check failed' + ) << \SHAR_EOF +6da53e4d9dd0b11f6fa334c6f583f8cd cloud_scripts/opt/cloud/bin/loadbalancer.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/loadbalancer.sh'` -ne 8234 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' is not 8234" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/baremetal_snat.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/baremetal_snat.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/baremetal_snat.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' && +#!/bin/bash +X +#Licensed to the Apache Software Foundation (ASF) under one +#or more contributor license agreements. See the NOTICE file +#distributed with this work for additional information +#regarding copyright ownership. The ASF licenses this file +#to you under the Apache License, Version 2.0 (the +#"License"); you may not use this file except in compliance +#with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +#Unless required by applicable law or agreed to in writing, +#software distributed under the License is distributed on an +#"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +#KIND, either express or implied. See the License for the +#specific language governing permissions and limitations +#under the License. +X +set +u +X +mgmt_nic_ip=$1 +internal_server_ip=$2 +gateway_ip=$3 +X +ip route | grep "$internal_server_ip" > /dev/null +X +if [ $? -ne 0 ]; then +X ip route add $internal_server_ip via $gateway_ip +fi +X +iptables-save | grep -- "-A POSTROUTING -d $internal_server_ip" > /dev/null +X +if [ $? -ne 0 ]; then +X iptables -t nat -A POSTROUTING -d $internal_server_ip -j SNAT --to-source $mgmt_nic_ip +fi +X +X +iptables-save | grep -- "-A INPUT -i eth0 -p udp -m udp --dport 69 -j ACCEPT" > /dev/null +if [ $? -ne 0 ]; then +X iptables -I INPUT -i eth0 -p udp -m udp --dport 69 -j ACCEPT +fi +X +iptables-save | grep -- "-A FORWARD -i eth1 -o eth0 -j ACCEPT" > /dev/null +if [ $? -ne 0 ]; then +X iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT +fi +X +rule="-A FORWARD -d $internal_server_ip/32 -i eth0 -o eth1 -j ACCEPT" +iptables-save | grep -- "$rule" > /dev/null +if [ $? -ne 0 ]; then +X iptables -I FORWARD -d $internal_server_ip/32 -i eth0 -o eth1 -j ACCEPT +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/baremetal_snat.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh': 'MD5 check failed' + ) << \SHAR_EOF +acab3e2b25ee898e7dd05c4e77b15569 cloud_scripts/opt/cloud/bin/baremetal_snat.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh'` -ne 1717 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' is not 1717" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_vpnusers.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vpnusers.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vpnusers.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import copy +X +X +def merge(dbag, data): +X dbagc = copy.deepcopy(dbag) +X +X print dbag +X print data +X if "vpn_users" not in data: +X return dbagc +X +X # remove previously deleted user from the dict +X for user in dbagc.keys(): +X if user == 'id': +X continue +X userrec = dbagc[user] +X add = userrec['add'] +X if not add: +X del(dbagc[user]) +X +X for user in data['vpn_users']: +X username = user['user'] +X add = user['add'] +X if username not in dbagc.keys(): +X dbagc[username] = user +X elif username in dbagc.keys() and not add: +X dbagc[username] = user +X +X return dbagc +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_vpnusers.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py': 'MD5 check failed' + ) << \SHAR_EOF +d54ff81fd9901ecc0bfbe9528343e238 cloud_scripts/opt/cloud/bin/cs_vpnusers.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py'` -ne 1469 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' is not 1469" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/merge.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/merge.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/merge.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/merge.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/merge.py' && +#!/usr/bin/python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import json +import os +import uuid +import logging +import gzip +import shutil +import cs_ip +import cs_guestnetwork +import cs_cmdline +import cs_vmp +import cs_network_acl +import cs_firewallrules +import cs_loadbalancer +import cs_monitorservice +import cs_vmdata +import cs_dhcp +import cs_forwardingrules +import cs_site2sitevpn +import cs_remoteaccessvpn +import cs_vpnusers +import cs_staticroutes +X +X +class DataBag: +X +X DPATH = "/etc/cloudstack" +X +X def __init__(self): +X self.bdata = {} +X +X def load(self): +X data = self.bdata +X if not os.path.exists(self.DPATH): +X os.makedirs(self.DPATH) +X self.fpath = os.path.join(self.DPATH, self.key + '.json') +X +X try: +X with open(self.fpath, 'r') as _fh: +X logging.debug("Loading data bag type %s", self.key) +X data = json.load(_fh) +X except (IOError, ValueError): +X logging.debug("Caught load error, creating empty data bag type %s", self.key) +X data.update({"id": self.key}) +X finally: +X self.dbag = data +X +X def save(self, dbag): +X try: +X with open(self.fpath, 'w') as _fh: +X logging.debug("Writing data bag type %s", self.key) +X json.dump( +X dbag, _fh, +X sort_keys=True, +X indent=2 +X ) +X except IOError: +X logging.error("Could not write data bag %s", self.key) +X +X def getDataBag(self): +X return self.dbag +X +X def setKey(self, key): +X self.key = key +X +X +class updateDataBag: +X +X DPATH = "/etc/cloudstack" +X +X def __init__(self, qFile): +X self.qFile = qFile +X self.fpath = '' +X self.bdata = {} +X self.process() +X +X def process(self): +X self.db = DataBag() +X if (self.qFile.type == "staticnatrules" or self.qFile.type == "forwardrules"): +X self.db.setKey("forwardingrules") +X else: +X self.db.setKey(self.qFile.type) +X dbag = self.db.load() +X logging.info("Command of type %s received", self.qFile.type) +X +X if self.qFile.type == 'ips': +X dbag = self.processIP(self.db.getDataBag()) +X elif self.qFile.type == 'guestnetwork': +X dbag = self.processGuestNetwork(self.db.getDataBag()) +X elif self.qFile.type == 'cmdline': +X dbag = self.processCL(self.db.getDataBag()) +X elif self.qFile.type == 'vmpassword': +X dbag = self.processVMpassword(self.db.getDataBag()) +X elif self.qFile.type == 'networkacl': +X dbag = self.process_network_acl(self.db.getDataBag()) +X elif self.qFile.type == 'firewallrules': +X dbag = self.process_firewallrules(self.db.getDataBag()) +X elif self.qFile.type == 'loadbalancer': +X dbag = self.process_loadbalancer(self.db.getDataBag()) +X elif self.qFile.type == 'monitorservice': +X dbag = self.process_monitorservice(self.db.getDataBag()) +X elif self.qFile.type == 'vmdata': +X dbag = self.processVmData(self.db.getDataBag()) +X elif self.qFile.type == 'dhcpentry': +X dbag = self.process_dhcp_entry(self.db.getDataBag()) +X elif self.qFile.type == 'staticnatrules' or self.qFile.type == 'forwardrules': +X dbag = self.processForwardingRules(self.db.getDataBag()) +X elif self.qFile.type == 'site2sitevpn': +X dbag = self.process_site2sitevpn(self.db.getDataBag()) +X elif self.qFile.type == 'remoteaccessvpn': +X dbag = self.process_remoteaccessvpn(self.db.getDataBag()) +X elif self.qFile.type == 'vpnuserlist': +X dbag = self.process_vpnusers(self.db.getDataBag()) +X elif self.qFile.type == 'staticroutes': +X dbag = self.process_staticroutes(self.db.getDataBag()) +X elif self.qFile.type == 'ipaliases': +X self.db.setKey('ips') +X self.db.load() +X dbag = self.process_ipaliases(self.db.getDataBag()) +X elif self.qFile.type == 'dhcpconfig': +X logging.error("I don't think I need %s anymore", self.qFile.type) +X return +X else: +X logging.error("Error I do not know what to do with file of type %s", self.qFile.type) +X return +X self.db.save(dbag) +X +X def processGuestNetwork(self, dbag): +X d = self.qFile.data +X dp = {} +X dp['public_ip'] = d['router_guest_ip'] +X dp['netmask'] = d['router_guest_netmask'] +X dp['source_nat'] = False +X dp['add'] = d['add'] +X dp['one_to_one_nat'] = False +X dp['gateway'] = d['router_guest_gateway'] +X dp['nic_dev_id'] = d['device'][3:] +X dp['nw_type'] = 'guest' +X dp = PrivateGatewayHack.update_network_type_for_privategateway(dbag, dp) +X qf = QueueFile() +X qf.load({'ip_address': [dp], 'type': 'ips'}) +X if 'domain_name' not in d.keys() or d['domain_name'] == '': +X d['domain_name'] = "cloudnine.internal" +X +X d = PrivateGatewayHack.update_network_type_for_privategateway(dbag, d) +X return cs_guestnetwork.merge(dbag, d) +X +X def process_dhcp_entry(self, dbag): +X return cs_dhcp.merge(dbag, self.qFile.data) +X +X def process_site2sitevpn(self, dbag): +X return cs_site2sitevpn.merge(dbag, self.qFile.data) +X +X def process_remoteaccessvpn(self, dbag): +X return cs_remoteaccessvpn.merge(dbag, self.qFile.data) +X +X def process_vpnusers(self, dbag): +X return cs_vpnusers.merge(dbag, self.qFile.data) +X +X def process_network_acl(self, dbag): +X return cs_network_acl.merge(dbag, self.qFile.data) +X +X def process_firewallrules(self, dbag): +X return cs_firewallrules.merge(dbag, self.qFile.data) +X +X def process_loadbalancer(self, dbag): +X return cs_loadbalancer.merge(dbag, self.qFile.data) +X +X def process_monitorservice(self, dbag): +X return cs_monitorservice.merge(dbag, self.qFile.data) +X +X def process_staticroutes(self, dbag): +X return cs_staticroutes.merge(dbag, self.qFile.data) +X +X def processVMpassword(self, dbag): +X return cs_vmp.merge(dbag, self.qFile.data) +X +X def processForwardingRules(self, dbag): +X # to be used by both staticnat and portforwarding +X return cs_forwardingrules.merge(dbag, self.qFile.data) +X +X def processIP(self, dbag): +X for ip in self.qFile.data["ip_address"]: +X dbag = cs_ip.merge(dbag, ip) +X return dbag +X +X def processCL(self, dbag): +X # Convert the ip stuff to an ip object and pass that into cs_ip_merge +X # "eth0ip": "192.168.56.32", +X # "eth0mask": "255.255.255.0", +X self.newData = [] +X if (self.qFile.data['cmd_line']['type'] == "router"): +X self.processCLItem('0', "guest") +X self.processCLItem('1', "control") +X self.processCLItem('2', "public") +X elif (self.qFile.data['cmd_line']['type'] == "vpcrouter"): +X self.processCLItem('0', "control") +X elif (self.qFile.data['cmd_line']['type'] == "dhcpsrvr"): +X self.processCLItem('0', "guest") +X self.processCLItem('1', "control") +X elif (self.qFile.data['cmd_line']['type'] == "ilbvm"): +X self.processCLItem('0', "guest") +X self.processCLItem('1', "control") +X +X return cs_cmdline.merge(dbag, self.qFile.data) +X +X def processCLItem(self, num, nw_type): +X key = 'eth' + num + 'ip' +X dp = {} +X if(key in self.qFile.data['cmd_line']): +X dp['public_ip'] = self.qFile.data['cmd_line'][key] +X dp['netmask'] = self.qFile.data['cmd_line']['eth' + num + 'mask'] +X dp['source_nat'] = False +X dp['add'] = True +X dp['one_to_one_nat'] = False +X if nw_type == "public": +X dp['gateway'] = self.qFile.data['cmd_line']['gateway'] +X else: +X if('localgw' in self.qFile.data['cmd_line']): +X dp['gateway'] = self.qFile.data['cmd_line']['localgw'] +X else: +X dp['gateway'] = '' +X dp['nic_dev_id'] = num +X dp['nw_type'] = nw_type +X qf = QueueFile() +X qf.load({'ip_address': [dp], 'type': 'ips'}) +X +X def processVmData(self, dbag): +X cs_vmdata.merge(dbag, self.qFile.data) +X return dbag +X +X def process_ipaliases(self, dbag): +X nic_dev = None +X # Should be a way to deal with this better +X for intf, data in dbag.items(): +X if intf == 'id': +X continue +X elif any([net['nw_type'] == 'guest' for net in data]): +X nic_dev = intf +X break +X +X assert nic_dev is not None, 'Unable to determine Guest interface' +X +X nic_dev_id = nic_dev[3:] +X +X for alias in self.qFile.data['aliases']: +X ip = { +X 'add': not alias['revoke'], +X 'nw_type': 'guest', +X 'public_ip': alias['ip_address'], +X 'netmask': alias['netmask'], +X 'nic_dev_id': nic_dev_id +X } +X dbag = cs_ip.merge(dbag, ip) +X return dbag +X +X +class QueueFile: +X +X fileName = '' +X configCache = "/var/cache/cloud" +X keep = True +X data = {} +X +X def load(self, data): +X if data is not None: +X self.data = data +X self.type = self.data["type"] +X updateDataBag(self) +X return +X filename = '{cache_location}/{json_file}'.format(cache_location=self.configCache, json_file=self.fileName) +X try: +X handle = open(filename) +X except IOError as exception: +X error_message = ("Exception occurred with the following exception error '{error}'. Could not open '{filename}'. " +X "It seems that the file has already been moved.".format(error=exception, filename=filename)) +X logging.error(error_message) +X else: +X logging.info("Continuing with the processing of file '{filename}'".format(filename=filename)) +X +X self.data = json.load(handle) +X self.type = self.data["type"] +X handle.close() +X if self.keep: +X self.__moveFile(filename, self.configCache + "/processed") +X else: +X logging.debug("Processed file deleted: %s and not kept in /processed", filename) +X os.remove(filename) +X updateDataBag(self) +X +X def setFile(self, name): +X self.fileName = name +X +X def getType(self): +X return self.type +X +X def getData(self): +X return self.data +X +X def setPath(self, path): +X self.configCache = path +X +X def __moveFile(self, origPath, path): +X if not os.path.exists(path): +X os.makedirs(path) +X originalName = os.path.basename(origPath) +X if originalName.count(".") == 1: +X originalName += "." + str(uuid.uuid4()) +X zipped_file_name = path + "/" + originalName + ".gz" +X with open(origPath, 'rb') as f_in, gzip.open(zipped_file_name, 'wb') as f_out: +X shutil.copyfileobj(f_in, f_out) +X os.remove(origPath) +X +X logging.debug("Processed file written to %s", zipped_file_name) +X +X +class PrivateGatewayHack: +X +X @classmethod +X def update_network_type_for_privategateway(cls, dbag, data): +X ip = data['router_guest_ip'] if 'router_guest_ip' in data.keys() else data['public_ip'] +X +X initial_data = cls.load_inital_data() +X has_private_gw_ip = cls.if_config_has_privategateway(initial_data) +X private_gw_matches = 'privategateway' in initial_data['config'] and cls.ip_matches_private_gateway_ip(ip, initial_data['config']['privategateway']) +X +X if has_private_gw_ip and private_gw_matches: +X data['nw_type'] = "public" +X logging.debug("Updating nw_type for ip %s" % ip) +X else: +X logging.debug("Not updating nw_type for ip %s because has_private_gw_ip = %s and private_gw_matches = %s " % (ip, has_private_gw_ip, private_gw_matches)) +X return data +X +X @classmethod +X def if_config_has_privategateway(cls, dbag): +X return 'privategateway' in dbag['config'].keys() and dbag['config']['privategateway'] != "None" +X +X @classmethod +X def ip_matches_private_gateway_ip(cls, ip, private_gateway_ip): +X new_ip_matches_private_gateway_ip = False +X if ip == private_gateway_ip: +X new_ip_matches_private_gateway_ip = True +X return new_ip_matches_private_gateway_ip +X +X @classmethod +X def load_inital_data(cls): +X initial_data_bag = DataBag() +X initial_data_bag.setKey('cmdline') +X initial_data_bag.load() +X initial_data = initial_data_bag.getDataBag() +X logging.debug("Initial data = %s" % initial_data) +X +X return initial_data +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/merge.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/merge.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/merge.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/merge.py': 'MD5 check failed' + ) << \SHAR_EOF +dc7c85d58b4e5f38ae61c82679523884 cloud_scripts/opt/cloud/bin/merge.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/merge.py'` -ne 13492 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/merge.py' is not 13492" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/master.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/master.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/master.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/master.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/master.py +M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2!&875L="(I"BAO<'1I +M;VYS+"!A/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/master.py': 'MD5 check failed' + ) << \SHAR_EOF +602ac6725c182da5ffa17760b2fe3ba5 cloud_scripts/opt/cloud/bin/master.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/master.py'` -ne 2040 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/master.py' is not 2040" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/set_redundant.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/set_redundant.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/set_redundant.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/set_redundant.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/set_redundant.py +M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/set_redundant.py': 'MD5 check failed' + ) << \SHAR_EOF +648b240f11d938ebd185d0e2a75004b8 cloud_scripts/opt/cloud/bin/set_redundant.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/set_redundant.py'` -ne 1663 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/set_redundant.py' is not 1663" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/checks2svpn.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checks2svpn.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/checks2svpn.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +if [ -z $1 ] +then +X echo "Fail to find VPN peer address!" +X exit 1 +fi +X +ipsec status vpn-$1 > /tmp/vpn-$1.status +X +cat /tmp/vpn-$1.status | grep "ESTABLISHED" > /dev/null +ipsecok=$? +if [ $ipsecok -ne 0 ] +then +X echo -n "IPsec SA not found;" +X echo "Site-to-site VPN have not connected" +X exit 11 +fi +echo -n "IPsec SA found;" +echo "Site-to-site VPN have connected" +Xexit 0 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/checks2svpn.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checks2svpn.sh': 'MD5 check failed' + ) << \SHAR_EOF +8aed94140f491ae027b3b55e9b1535bb cloud_scripts/opt/cloud/bin/checks2svpn.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checks2svpn.sh'` -ne 1178 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' is not 1178" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, vpn): +X key = vpn['vpn_server_ip'] +X op = vpn['create'] +X if key in dbag.keys() and not op: +X del(dbag[key]) +X else: +X dbag[key] = vpn +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py': 'MD5 check failed' + ) << \SHAR_EOF +9945565c7eb92c9fd9aa85648f8c4352 cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py'` -ne 994 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' is not 994" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_staticroutes.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_staticroutes.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_staticroutes.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, staticroutes): +X for route in staticroutes['routes']: +X key = route['network'] +X dbag[key] = route +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_staticroutes.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py': 'MD5 check failed' + ) << \SHAR_EOF +c89832deefffed1dcc12b367d9f9062e cloud_scripts/opt/cloud/bin/cs_staticroutes.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py'` -ne 952 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' is not 952" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, vpn): +X key = vpn['peer_gateway_ip'] +X op = vpn['create'] +X if key in dbag.keys() and not op: +X del(dbag[key]) +X else: +X dbag[key] = vpn +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py': 'MD5 check failed' + ) << \SHAR_EOF +37138a9d2b00c0cd0488f03f0b1e1c34 cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py'` -ne 996 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' is not 996" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/passwd_server_ip.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/passwd_server_ip.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/passwd_server_ip.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/passwd_server_ip.py +M(R$O=7-R+V)I;B]E;G8@<'ET:&]N"B,@3&EC96YS960@=&\@=&AE($%P86-H +M92!3;V9T=V%R92!&;W5N9&%T:6]N("A!4T8I('5N9&5R(&]N90HC(&]R(&UO +M2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N5]P87-S=V]R9"<@/')O=71E$EN(",L +M($9O2AO3H*("`@("`@("!W:71H(&9I;&4H9V5T4&%S +M&-E<'0@24]%3H* +M("`@("`@("`@("`@=VET:"!F:6QE*&=E=%!A&-E +M<'0@24]%"<*("`@(&1E9B!D;U]'150H5]P87-S=V]R9"7!E(#T]("=S879E9%]P87-S=V]R9"7-L;VR=215%515-47TU%5$A/1"7!E)UTL"B`@("`@("`@("`@("`@ +M("`@("`@?2D*("`@("`@("!S96QF+G-E;F1?7-L;V6EN9R!T;R!S879E('!A7-L;V6EN9R!T;R!S879E('!A7-L +M;V7-L;V7-L;V7,N87)G=BD@/B`Q +M.@H@("`@("`@(&%D9')E7-L +M;V6)O87)D26YT97)R +M=7!T.@H@("`@("`@('-Y7-L;V&-E<'0@17AC97!T:6]N+"!E.@H@("`@("`@('-Y7-L;V&-E<'1I;VX@)7,@+2T@ +M9&EE9"<@)2!E*0H@("`@("`@('!A/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py': 'MD5 check failed' + ) << \SHAR_EOF +1d63c1d8b2e5a6a48d48d76228964aee cloud_scripts/opt/cloud/bin/passwd_server_ip.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py'` -ne 7020 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py' is not 7020" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_network_acl.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_network_acl.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_network_acl.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_network_acl.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_network_acl.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_network_acl.py': 'MD5 check failed' + ) << \SHAR_EOF +79760ec4739cb68a9a8bf86319a2dd65 cloud_scripts/opt/cloud/bin/cs_network_acl.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_network_acl.py'` -ne 881 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_network_acl.py' is not 881" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cleanup.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cleanup.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cleanup.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cleanup.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cleanup.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +#rm -rf $@ && echo $? +X +zip_file=$1 +if [ -e "$zip_file" ]; +then +X rm -rf "$zip_file" +X echo "Deleting diagnostics zip file $zip_file" +else +X echo "File $zip_file not found in vm " +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cleanup.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cleanup.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cleanup.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cleanup.sh': 'MD5 check failed' + ) << \SHAR_EOF +63ca1758ffda6344d2622a21f5fc15b9 cloud_scripts/opt/cloud/bin/cleanup.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cleanup.sh'` -ne 986 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cleanup.sh' is not 986" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_loadbalancer.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_loadbalancer.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_loadbalancer.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import copy +X +X +def merge(dbag, data): +X """ Simply overwrite the existsing bag as, the whole configuration is sent every time """ +X if "rules" not in data: +X return dbag +X dbag['config'] = data['rules'] +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_loadbalancer.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py': 'MD5 check failed' + ) << \SHAR_EOF +667380d51eaa9aade2317d66a11529aa cloud_scripts/opt/cloud/bin/cs_loadbalancer.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py'` -ne 1016 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' is not 1016" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpc_func.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_func.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_func.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_func.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_func.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# @VERSION@ +X +getEthByIp (){ +X local ip=$1 +X for dev in `ls -1 /sys/class/net | grep eth` +X do +X sudo ip addr show dev $dev | grep $ip\/ > /dev/null +X if [ $? -eq 0 ] +X then +X echo $dev +X return 0 +X fi +X done +X return 1 +} +X +getVPCcidr () { +X CMDLINE=$(cat /var/cache/cloud/cmdline) +X for i in $CMDLINE +X do +X # search for foo=bar pattern and cut out foo +X KEY=$(echo $i | cut -d= -f1) +X VALUE=$(echo $i | cut -d= -f2) +X if [ "$KEY" == "vpccidr" ] +X then +X echo "$VALUE" +X return 0 +X fi +X done +X return 1 +} +X +removeRulesForIp() { +X local ip=$1 +X iptables-save -t mangle | grep $ip | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t mangle $rule +X done +X iptables-save -t nat | grep $ip | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t nat $rule +X done +X iptables-save -t filter | grep $ip | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t filter $rule +X done +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_func.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_func.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_func.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_func.sh': 'MD5 check failed' + ) << \SHAR_EOF +bc1b0432818cc40ea79df6720e16ecad cloud_scripts/opt/cloud/bin/vpc_func.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_func.sh'` -ne 1849 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_func.sh' is not 1849" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsDhcp.py ============== +if test ! -d 'cloud_scripts/opt/cloud/bin/cs'; then + mkdir 'cloud_scripts/opt/cloud/bin/cs' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/opt/cloud/bin/cs." +else ${echo} "x - failed to create directory cloud_scripts/opt/cloud/bin/cs." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsDhcp.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N'0B"D1(0U!?3U!44R`]("(O971C+V1H8W!O<'1S +M+G1X="(*0TQ/541?0T].1B`]("(O971C+V1N"`](#`*("`@("`@("!L:7-T96Y?861D0H@("`@("`@("`@("!G871E=V%Y(#T@ +M)R<*("`@("`@("`@("`@:68@2`](&E;)V=A=&5W +M87DG70H@("`@("`@("`@("!S;&EN92`](")D:&-P+7)A;F=E/7-E=#II;G1E +M"P@9V%T97=A>2D*("`@("`@("`@("`@96QS93H*("`@ +M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UR86YG93US970Z:6YT97)F86-E +M+25S+25S+"5S+'-T871I8R(@)2`H9&5V:6-E+"!I9'@L(&EP*0H@("`@("`@ +M("`@("!S96QF+F-O;F8N"D*("`@("`@("`@("`@;&EN92`](")D:&-P+6]P +M=&EO;CUT86"P@9VXN9V5T7V1O;6%I;B@I*0H@("`@("`@("`@("!S96QF+F-O;F8N"!F;W(@>"!I;B!G;BYG971?9&YS*"D@:68@>%T*("`@ +M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C +M92TE"P@)RPG+FIO:6XH9&YS7VQI +M2`A/2`G,"XP+C`N,""D*("`@("`@("`@("`@("`@ +M(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C92TE"P@9V%T97=A>2D*("`@("`@("`@("`@("`@('-E +M;&8N8V]N9BYS96%R8V@H"P@;F5T;6%S:RD*("`@("`@("`@("`@"`K/2`Q"@H@("`@("`@(",@ +M3&ES=&5N($%D9')E3H*("`@ +M("`@("`@("`@;&]G9VEN9RYI;F9O*")!='1E;7!T:6YG('1O(&1E;&5T92!E +M;G1R:65S(&9R;VT@9&YS;6%S<2YL96%S97,@9FEL92!F;W(@5DUS('=H:6-H +M(&%R92!N;W0@;VX@9&AC<&AOW!R:6YT("0S?22DZ"B`@("`@("`@5LG:7!V-%]A +M9&1R97-S)UTL(&5N=')Y6R=H;W-T7VYA;64G72D*("`@("`@("`C($QE87-E +M('1I;64@'!U;F=E9"P@:71S(&%C=&EV +M92!L96%S92!A;F0@1$A#4"]$3E,@8V]N9FEG(&ES('!R;W!E2!I2!R=6YN:6YG(&EN('!R;V1U8W1I;VYS +M('-Y5LG:7!V-%]A9&1R +M97-S)UTL"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@ +M("`@("`@("`@("`@("!E;G1R>5LG:&]S=%]N86UE)UTL"B`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!L96%S +M92DI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L)7,B("4@ +M*'1A9RP@,RDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L +M)7,B("4@*'1A9RP@-BDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D +M9"@B)7,L)7,B("4@*'1A9RP@,34I*0H*("`@("`@("!I(#T@25!!9&1R97-S +M*&5N=')Y6R=I<'8T7V%D9')E2==(#T@96YT2=="@H@("`@9&5F(&%D9%]H;W-T*'-E;&8L(&EP+"!H;W-T +M/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py': 'MD5 check failed' + ) << \SHAR_EOF +bcf1831b38d86bf041523540fa8f821e cloud_scripts/opt/cloud/bin/cs/CsDhcp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py'` -ne 8809 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' is not 8809" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsRedundant.py ============== +if test ! -d 'cloud_scripts/opt/cloud/bin/cs'; then + mkdir 'cloud_scripts/opt/cloud/bin/cs' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/opt/cloud/bin/cs." +else ${echo} "x - failed to create directory cloud_scripts/opt/cloud/bin/cs." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsRedundant.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N7,N2`](%1R=64*"B`@ +M("`@("`@:68@;F]T(&ES1&5V:6-E4F5A9'DZ"B`@("`@("`@("`@(&QO9V=I +M;F5]I9E]N965D960H"B`@("`@("`@("`@("(E&5C("1$045-3TX@+2T@+2UVR(L(")](BP@6PH@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("`@("(@("`@("`@(&%U=&A?='EP92!!2"!< +M;B(L("(@("`@("`@(&%U=&A?<&%S2AC;VYN=')A8VMD7W1E;7!L871E7V-O;F8L(&-O;FYT0H@("`@("`@("(B(@H@("`@("`@(&ET97)A=&EO;G,@ +M/2`Q,`H@("`@("`@('1I;65?8F5T=V5E;B`](#$*"B`@("`@("`@9F]R(&ET +M97(@:6X@3H* +M("`@("`@("`@("`@("`@(',@/2!S;V-K970N2!R=6YN:6YG("@E9#HE2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I<"@I*2YS=&]P*"D* +M"B`@("`@("`@0W-(96QP97(N2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@ +M("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")!9&1I;F<@9V%T97=A>2`]/3X@ +M)7,@=&\@9&5V:6-E(#T]/B`E2P@9&5V*2D*("`@("`@ +M("`@("`@("`@("`@("!I9B!D978@/3T@0W-(96QP97(N4%5"3$E#7TE.5$52 +M1D%#15-;&5C +M=71E*"(E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I +M<"@I*2YR97-T87)T*"D*"B`@("`@("`@0W-(96QP97(N2D*"B`@("`@("`@("`@(",@5&AE(&9I +M2!I;G1E2!V'1E2!E=F5R(&)E(&]N92!A9&1R97-S(&EN +M(&$@5E!#('1H97)E(&-A;B!B92!M86YY"B`@("`@("`@5&AE(&YE=R!C;V1E +M(&%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py': 'MD5 check failed' + ) << \SHAR_EOF +6936e38f53736f7c5a04b255800a242d cloud_scripts/opt/cloud/bin/cs/CsRedundant.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py'` -ne 16789 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' is not 16789" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsHelper.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsHelper.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsHelper.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsHelper.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B +M971H,2)]"@I35$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S +M:"`M8R`@)VEF(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@ +M96QS92!E8VAO(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@ +M(")V<&-R;W5T97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@ +M6R`D,"`]/2!<(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ +M"B`@("`@("`@("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@ +M("`@("`@(&-M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@ +M("`@("`@;&]G9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S +M(B`E('-T871E7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X +M96-U=&4H7!E*"E=(&%N9"!S +M=&%T92`]/2`B34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE +M8W5T92AC;60I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ +M("`@("`@(&5X96-U=&4H8VUD*0H*"F1E9B!I&5C=71E +M*")M;W5N="!T;7!F6XH=F%L*3H*("`@(&EF('9A;#H* +M("`@("`@("!R971U&5C=71E*")I<"!A9&1R('-H;W<@ +M?&=R97`@+78@WT*("`@("`@("`@("`@ +M=&];)VEP)UT@/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A +M;'-;+3%="B`@("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@ +M("(B(@H@("`@9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G +M*")3879I;F<@:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C +M=71E*")S>7-T96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I +M;F7-T96UC=&P@&5C=71E*")K:6QL +M("U(55`@)7,B("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D +M;G-M87-Q(BP@(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py': 'MD5 check failed' + ) << \SHAR_EOF +9bdd1fdfea8177d3e408b2cc87e5d503 cloud_scripts/opt/cloud/bin/cs/CsHelper.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py'` -ne 7644 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' is not 7644" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5NWT*("`@("`@("!S96QF+F=U97-T(#T@5')U90H@("`@("`@ +M(&1B(#T@1&%T84)A9R@I"B`@("`@("`@9&(N7,H*2!A;F0@;&5N*&1B86=;9&5V:6-E +M72D@(3T@,#H*("`@("`@("`@("`@2==*0H*("`@ +M("`@("!I9B`G9&YS)R!I;B!S96QF+F1A=&$Z"B`@("`@("`@("`@(&1N'1E;F0H&-E<'1I;VXN"B`@("`@("`@:68@)W)O +M=71E"!I="!P2X@22!J=7-T(&%D +M9&5D('1H92!I9BP@87,@26%N(&1I9"!I;B!S;VUE(&]T:&5R(&9I;&5S+"!T +M;R!A=F]I9"!T:&4@97AC97!T:6]N+@H@("`@("`@(&EF("=R;W5T97)?9W5E +M2<@:6X@2=="B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py': 'MD5 check failed' + ) << \SHAR_EOF +98c84f4067412f263891f8293f185243 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py'` -ne 2545 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' is not 2545" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsMonitor.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N"!I;B!S96QF+F1B86=;)V-O;F9I9R==+G-P;&ET*"WT*("`@("`@("!H8U]D871A6R)H96%L=&A?8VAE8VMS7V)A&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!S96QF+F1B +M86&-L=61E9%]H96%L=&A?8VAE8VMS(ET@/2!;70H* +M("`@("`@("!I9B`B:&5A;'1H7V-H96-K/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py': 'MD5 check failed' + ) << \SHAR_EOF +d8f5dcf496dbc6d8508e40b906f48245 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py'` -ne 3681 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' is not 3681" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@ +M("`@("!S96QF+FQA2!E>&ES=',Z(')U;&4] +M)7,@=&%B;&4])7,@8VAA:6X])7,B+"!N97=?2`](&-P>2YR97!L86-E*"(M02`E&5C=71E,B@B:7!T86)L97,@+70@)7,@ +M)7,B("4@*&YE=U]R=6QE+F=E=%]T86)L92@I+"!C<'DI*0H@("`@("`@("`@ +M("`@("`@(R!4:&5R92!A"!I;B!T:&4@ +M9G)A;65W;W)K+@H@("`@("`@("`@("`@("`@:68@&5C=71E*")I<'1A8FQE7!E(#T@0W-#;61,:6YE*")C;61L:6YE(BDN9V5T7W1Y<&4H*0H* +M("`@("`@("!T7!E*3H*("`@("`@("`@("`@("`@(&EF(&DNFEP*&)I='-;,#HZ,ETL(&)I='-;,3HZ,ETI*0H@("`@("`@(&EF +M("(M02(@:6X@2!C;W)R96-T(&EP=&%B;&5S(&-O;6UA +M;F0@(B(B"B`@("`@("`@(R!/7,H*3H*("`@("`@("`@("`@("`@('!R:6YT86)L92`] +M(&LN=7)N($9A;'-E"B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py': 'MD5 check failed' + ) << \SHAR_EOF +7456b53eba9f115f9ad344bc1c01611d cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py'` -ne 11100 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' is not 11100" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsRoute.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRoute.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRoute.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import CsHelper +import logging +X +X +class CsRoute: +X +X """ Manage routes """ +X +X def __init__(self): +X self.table_prefix = "Table_" +X +X def get_tablename(self, name): +X return self.table_prefix + name +X +X def add_table(self, devicename): +X tablenumber = 100 + int(devicename[3:]) +X tablename = self.get_tablename(devicename) +X str = "%s %s" % (tablenumber, tablename) +X filename = "/etc/iproute2/rt_tables" +X logging.info("Adding route table: " + str + " to " + filename + " if not present ") +X if not CsHelper.definedinfile(filename, str): +X CsHelper.execute("sudo echo " + str + " >> /etc/iproute2/rt_tables") +X # remove "from all table tablename" if exists, else it will interfer with +X # routing of unintended traffic +X if self.findRule("from all lookup " + tablename): +X CsHelper.execute("sudo ip rule delete from all table " + tablename) +X +X def flush_table(self, tablename): +X CsHelper.execute("ip route flush table %s" % (tablename)) +X CsHelper.execute("ip route flush cache") +X +X def add_route(self, dev, address): +X """ Wrapper method that adds table name and device to route statement """ +X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 +X table = self.get_tablename(dev) +X +X if not table or not address: +X empty_param = "table" if not table else "address" +X logging.info("Empty parameter received %s while trying to add route, skipping" % empty_param) +X else: +X logging.info("Adding route: dev " + dev + " table: " + +X table + " network: " + address + " if not present") +X cmd = "default via %s table %s proto static" % (address, table) +X self.set_route(cmd) +X +X def add_network_route(self, dev, address): +X """ Wrapper method that adds table name and device to route statement """ +X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 +X table = self.get_tablename(dev) +X +X if not table or not address: +X empty_param = "table" if not table else "address" +X logging.info("Empty parameter received %s while trying to add network route, skipping" % empty_param) +X else: +X logging.info("Adding route: dev " + dev + " table: " + +X table + " network: " + address + " if not present") +X cmd = "throw %s table %s proto static" % (address, table) +X self.set_route(cmd) +X +X def set_route(self, cmd, method="add"): +X """ Add a route if it is not already defined """ +X found = False +X search = cmd +X if "throw" in search: +X search = search.replace("throw", "") +X for i in CsHelper.execute("ip route show " + search): +X found = True +X if not found and method == "add": +X logging.info("Add " + cmd) +X cmd = "ip route add " + cmd +X elif found and method == "delete": +X logging.info("Delete " + cmd) +X cmd = "ip route delete " + cmd +X else: +X return +X CsHelper.execute(cmd) +X +X def add_defaultroute(self, gateway): +X """ Add a default route +X :param str gateway +X :return: bool +X """ +X if not gateway: +X raise Exception("Gateway cannot be None.") +X +X if self.defaultroute_exists(): +X return False +X else: +X cmd = "default via " + gateway +X logging.info("Adding default route") +X self.set_route(cmd) +X return True +X +X def defaultroute_exists(self): +X """ Return True if a default route is present +X :return: bool +X """ +X logging.info("Checking if default ipv4 route is present") +X route_found = CsHelper.execute("ip -4 route list 0/0") +X +X if len(route_found) > 0: +X logging.info("Default route found: " + route_found[0]) +X return True +X else: +X logging.warn("No default route found!") +X return False +X +X def findRule(self, rule): +X for i in CsHelper.execute("ip rule show"): +X if rule in i.strip(): +X return True +X return False +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRoute.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py': 'MD5 check failed' + ) << \SHAR_EOF +4f2109aa1d89157e14817f90c676c2d3 cloud_scripts/opt/cloud/bin/cs/CsRoute.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py'` -ne 4989 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' is not 4989" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py +M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2==*0H@("`@("`@("`@ +M("!#&5C=71E*&-O;6UA;F0I"B`@("`@("`@96QS93H*("`@ +M("`@("`@("`@8V]M;6%N9"`](")I<"!R;W5T92!S:&]W('P@9W)E<"`EW!R:6YT("0Q+"`D,WTG(B`E(')O=71E6R=N971W;W)K)UT*("`@ +M("`@("`@("`@2==*0H@("`@("`@("`@("`@ +C("`@0W-(96QP97(N97AE8W5T92AR;W5T95]C;VUM86YD*0H@ +` +end +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py': 'MD5 check failed' + ) << \SHAR_EOF +f9f9db3a4543397153d69a62551a6c8c cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py'` -ne 1655 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' is not 1655" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N7,H*3H* +M("`@("`@("`@("`@"YS<&QI="@G7&XG*5T*"B`@("`@("`@9FEL +M93$N8V]M;6ET*"D*("`@("`@("!F:6QE,B`]($-S1FEL92A(05!23UA97T-/ +M3D9?4"D*("`@("`@("!I9B!N;W0@9FEL93(N8V]M<&%R92AF:6QE,2DZ"B`@ +M("`@("`@("`@($-S2&5L<&5R+F-O<'DH2$%04D]865]#3TY&7U0L($A!4%)/ +M6%E?0T].1E]0*0H*("`@("`@("`@("`@<')O8R`]($-S4')O8V5S2YP:60G72D*("`@("`@("`@("`@:68@;F]T('!R;V,N9FEN +M9"@I.@H@("`@("`@("`@("`@("`@;&]G9VEN9RYD96)U9R@B0W-,;V%D0F%L +M86YC97(Z.B!W:6QL(')E2$B*0H@("`@("`@("`@("`@ +M("`@0W-(96QP97(N2(L(")R97-T87)T(BD*("`@ +M("`@("`@("`@96QS93H*("`@("`@("`@("`@("`@(&QO9V=I;F2$B*0H@("`@ +M("`@("`@("`@("`@0W-(96QP97(N2(L(")R96QO +M860B*0H*("`@("`@("!A9&1?/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py': 'MD5 check failed' + ) << \SHAR_EOF +8f93571ff9b8f21c947e90193c3efa38 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py'` -ne 3393 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' is not 3393" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsApp.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsApp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsApp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsApp.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G +M871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG971?='EP92@I"B`@ +M("`@("`@5]I9E]N965D +M960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L"B`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE,B]S:71E2DI"B`@("`@("`@ +M("`@(&9I;&4N&5C=71E,B@B/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsApp.py': 'MD5 check failed' + ) << \SHAR_EOF +fa071a9d58a918b6a9d5e09ae10e3e11 cloud_scripts/opt/cloud/bin/cs/CsApp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsApp.py'` -ne 4159 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' is not 4159" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsFile.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsFile.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsFile.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import logging +import re +import copy +X +X +class CsFile: +X """ File editors """ +X +X def __init__(self, filename): +X self.filename = filename +X self.load() +X +X def load(self): +X self.new_config = [] +X self.config = [] +X try: +X for line in open(self.filename): +X self.new_config.append(line) +X except IOError: +X logging.debug("File %s does not exist" % self.filename) +X else: +X logging.debug("Reading file %s" % self.filename) +X self.config = list(self.new_config) +X +X def is_changed(self): +X if set(self.config) != set(self.new_config): +X return True +X else: +X return False +X +X def __len__(self): +X return len(self.config) +X +X def empty(self): +X self.config = [] +X self.new_config = [] +X +X def repopulate(self): +X self.new_config = [] +X +X def commit(self): +X if not self.is_changed(): +X logging.info("Nothing to commit. The %s file did not change" % self.filename) +X return False +X handle = open(self.filename, "w+") +X for line in self.new_config: +X handle.write(line) +X handle.close() +X logging.info("Wrote edited file %s" % self.filename) +X self.config = list(self.new_config) +X logging.info("Updated file in-cache configuration") +X return True +X +X def dump(self): +X for line in self.new_config: +X print line +X +X def addeq(self, string): +X """ Update a line in a file of the form token=something +X match on token= and replace something if needed +X Add line if token is not present +X """ +X token = string.split('=')[0] + '=' +X self.search(token, string) +X +X def append(self, string, where=-1): +X if where == -1: +X self.new_config.append("%s\n" % string) +X else: +X self.new_config.insert(where, "%s\n" % string) +X +X def add(self, string, where=-1): +X for index, line in enumerate(self.new_config): +X if line.strip() == string: +X return False +X if where == -1: +X self.new_config.append("%s\n" % string) +X else: +X self.new_config.insert(where, "%s\n" % string) +X return True +X +X def section(self, start, end, content): +X sind = -1 +X eind = -1 +X found = False +X for index, line in enumerate(self.new_config): +X if found and line.strip() == end: +X eind = index +X found = False +X if line.strip() == start: +X sind = index + 1 +X found = True +X if sind == -1: +X content.insert(0, start + "\n") +X content.append(end + "\n") +X self.new_config[sind:eind] = content +X +X def greplace(self, search, replace): +X logging.debug("Searching for %s and replacing with %s" % (search, replace)) +X self.new_config = [w.replace(search, replace) for w in self.new_config] +X +X def replaceIfFound(self, search, replace): +X found = False +X replace_filtered = replace +X if re.search("PSK \"", replace): +X replace_filtered = re.sub(r'".*"', '"****"', replace) +X logging.debug("Searching for %s and replacing with %s if found" % (search, replace_filtered)) +X for index, line in enumerate(self.new_config): +X if line.lstrip().startswith("#"): +X continue +X if re.search(search, line): +X if replace not in line: +X self.new_config[index] = replace + "\n" +X return False +X +X def search(self, search, replace): +X found = False +X replace_filtered = replace +X if re.search("PSK \"", replace): +X replace_filtered = re.sub(r'".*"', '"****"', replace) +X logging.debug("Searching for %s and replacing with %s" % (search, replace_filtered)) +X for index, line in enumerate(self.new_config): +X if line.lstrip().startswith("#"): +X continue +X if re.search(search, line): +X found = True +X if replace not in line: +X self.new_config[index] = replace + "\n" +X if not found: +X self.new_config.append(replace + "\n") +X return True +X return False +X +X def searchString(self, search, ignoreLinesStartWith): +X found = False +X logging.debug("Searching for %s string " % search) +X +X for index, line in enumerate(self.new_config): +X print ' line = ' + line +X if line.lstrip().startswith(ignoreLinesStartWith): +X continue +X if search in line: +X found = True +X break +X +X return found +X +X def deleteLine(self, search): +X found = False +X logging.debug("Searching for %s to remove the line " % search) +X temp_config = [] +X for index, line in enumerate(self.new_config): +X if line.lstrip().startswith("#"): +X continue +X if search not in line: +X temp_config.append(line) +X +X self.new_config = list(temp_config) +X +X def compare(self, o): +X result = (isinstance(o, self.__class__) and set(self.config) == set(o.config)) +X logging.debug("Comparison of CsFiles content is ==> %s" % result) +X return result +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsFile.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsFile.py': 'MD5 check failed' + ) << \SHAR_EOF +81531ddee205a5eb66bb44f400ab222c cloud_scripts/opt/cloud/bin/cs/CsFile.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsFile.py'` -ne 6133 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' is not 6133" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/__init__.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/__init__.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/__init__.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/__init__.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/__init__.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/__init__.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/__init__.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/__init__.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/__init__.py': 'MD5 check failed' + ) << \SHAR_EOF +33215d440d5ba5fa95b1ffa035d769e2 cloud_scripts/opt/cloud/bin/cs/__init__.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/__init__.py'` -ne 785 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/__init__.py' is not 785" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsAddress.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsAddress.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsAddress.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsAddress.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N`H@("`@("`@("`@("`@("`@("`@ +M(&=U97-T7VEN=&5R9F%C92`](&EN=&5R9F%C90H@("`@("`@("`@("`@("`@ +M("`@(&QO9V=I;F2!C;VYF:6=U2AS96QF*3H*("`@("`@("!I +M9B!S96QF+F-O;F9I9RYI2(I +M"B`@("`@("`@96QS93H*("`@("`@("`@("`@2@I+"!S96QF+F=E=%]S +M:7IE*"DI"@H@("`@9&5F(&=E=%]S:7IE*'-E;&8I.@H@("`@("`@("(B(B!2 +M971U7!E +M(B!I;B!S96QF+F%D9')E"@Q,#`@*R!I;G0H9&5V6S,Z72DI +M"B`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@("`@97AC97!T($5X8V5P=&EO;B!A +M&-E<'1I;VX@ +M;V-C=7)R960@/3T^("5S(B`E(&4I"@H@("`@("`@("`@("!S96QF+G!O7!E*"D@:6X@6R)C;VYT7!E*"D@:6X@ +M6R=P=6)L:6,G73H*("`@("`@("`@("`@("`@('-E;&8N7!E*"E=.@H@("`@("`@ +M("`@("`@("`@9V%T97=A>2`]('-T2@I*3H* +M("`@("`@("`@("`@("`@(')O=71E+F%D9%]D969A=6QT2@I*0H*("`@(&1E9B!S971?;6%R:RAS96QF*3H*("`@ +M("`@("!C;60@/2`B+4$@4%)%4D]55$E.1R`M:2`E7!E(&]F('1H92!)4`H@("`@("`@(&=U97-T"B`@("`@("`@8V]N +M=')O;`H@("`@("`@('!U8FQI8PH@("`@("`@("(B(@H@("`@("`@(&EF(")N +M=U]T>7!E(B!I;B!S96QF+F%D9')E&9F9F9F9F9F +M("TM8W1M87-K(#!X9F9F9F9F9F8B72D*"B`@("`@("`@&UA7!E*"D@:6X@6R)G=65S=")=.@H@("`@("`@("`@("!G=65S +M=$YE='=O&9F9F9F9F9F(ETI"B`@ +M("`@("`@("`@(&=U97-T3F5T=V]R:T-I9'(@/2!S96QF+F%D9')E#4R-2\P>&9F9F9F9F9F(B`E +M("AS96QF+F1E=BP@2)=("$](").;VYE(CH* +M("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@("`@("`@:68@ +M(FYE='=O7!E*"D@:6X@6R)P=6)L:6,B +M72!A;F0@(F=A=&5W87DB(&EN('-E;&8N861D2)=("$] +M(").;VYE(CH*("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@ +M("`@("`@("`@(&9O7!E(B!I;B!A9&1R97-S(&%N9"!A +M9&1R97-S6R)N=U]T>7!E(ET@/3T@(F=U97-T(CH*("`@("`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("!R;W5T92YA9&1?;F5T=V]R:U]R;W5T92AS96QF +M+F1E=BP@&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A8VAE(BD*"B`@("`@("`@ +M96QI9B!M971H;V0@/3T@(F1E;&5T92(Z"B`@("`@("`@("`@(",@=')E870@ +M=&AE(&QA&5C=71E*")S=61O(&EP(')U;&4@9&5L971E('1A8FQE("(@*R!T86)L94YA +M;64I"B`@("`@("`@("`@("`@("!#&5C=71E*")S=61O(&EP +M(')O=71E(&9L=7-H('1A8FQE("(@*R!T86)L94YA;64I"B`@("`@("`@("`@ +M("`@("!#&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A +M8VAE(BD*("`@("`@("`@("`@("`@($-S4G5L92AS96QF+F1E=BDN9&5L36%R +M:R@I"@H@("`@("`@('-E;&8N9G=?7!E('=I;&P@ +M;F\@;&]N9V5R(&)E(&MN;W=N"B`@("`@("`@:68@7!E*"D@/3T@(G!U8FQI8R(@86YD('-E;&8N8V]N9FEG+FES7W9P8R@I +M(&%N9"!M971H;V0@/3T@(F%D9"(Z"B`@("`@("`@("`@(&EF('-E;&8N861D +M7,H*3H*("`@("`@("`@ +M("`@7!E)UT@:6X@5E)2 +M4%]465!%4SH*("`@("`@("`@("`@7!E(B!I;B!S96QF+F%D9')E&5C=71E,BAC;60L($9A +M;'-E*0H*("`@(",@1&5L971E(&%N>2!I<',@=&AA="!A7,H*2!O2AS96QF+"!B862!F;W(@ +M7,O8VQA"TP+W)P&-E<'0@24]%/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py': 'MD5 check failed' + ) << \SHAR_EOF +5cebbbd106abd3eba7ee0e4d23277dda cloud_scripts/opt/cloud/bin/cs/CsAddress.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py'` -ne 29236 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' is not 29236" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsProcess.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsProcess.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsProcess.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import os +import re +import CsHelper +import logging +X +X +class CsProcess(object): +X """ Manipulate processes """ +X +X def __init__(self, search): +X self.search = search +X +X def start(self, thru, background=''): +X # if(background): +X # cmd = cmd + " &" +X logging.info("Started %s", " ".join(self.search)) +X os.system("%s %s %s" % (thru, " ".join(self.search), background)) +X +X def kill_all(self): +X pids = self.find_pid() +X for p in pids: +X CsHelper.execute("kill -9 %s" % p) +X +X def find_pid(self): +X self.pid = [] +X for i in CsHelper.execute("ps aux"): +X items = len(self.search) +X proc = re.split(r"\s+", i)[items*-1:] +X matches = len([m for m in proc if m in self.search]) +X if matches == items: +X self.pid.append(re.split(r"\s+", i)[1]) +X +X logging.debug("CsProcess:: Searching for process ==> %s and found PIDs ==> %s", self.search, self.pid) +X return self.pid +X +X def find(self): +X has_pid = len(self.find_pid()) > 0 +X return has_pid +X +X def kill(self, pid): +X if pid > 1: +X CsHelper.execute("kill -9 %s" % pid) +X +X def grep(self, str): +X for i in CsHelper.execute("ps aux"): +X if i.find(str) != -1: +X return re.split(r"\s+", i)[1] +X return -1 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsProcess.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py': 'MD5 check failed' + ) << \SHAR_EOF +75a4650fe1e521049e80d32a022d8689 cloud_scripts/opt/cloud/bin/cs/CsProcess.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py'` -ne 2156 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' is not 2156" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsConfig.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsConfig.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsConfig.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsConfig.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N7!E*"D@/3T@)W9P8W)O=71E'1D;G,H'1D;G,G+"`G9F%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py': 'MD5 check failed' + ) << \SHAR_EOF +836541a5b9cb1b2f9df5dad6bb806745 cloud_scripts/opt/cloud/bin/cs/CsConfig.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py'` -ne 3179 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' is not 3179" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsDatabag.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@("`@ +M("!S96QF+F1B(#T@1&%T84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF +M+F1B+G-A=F4HWT*("`@("`@("!R971U&1I9V5S="@I"@H@("`@ +M9&5F(&=E=%]G871E=V%Y*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I +M;B!S96QF+FED871A*"DZ"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A +M*"E;)V=A=&5W87DG70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G +M971?=7-E7V5X=%]D;G,H'1D;G,G70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E +M9B!G971?861V97)T7VEN="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN +M="<@:6X@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py': 'MD5 check failed' + ) << \SHAR_EOF +9e4de6e0a115a5e806e80dc151769b21 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py'` -ne 4808 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' is not 4808" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsRule.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRule.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRule.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import CsHelper +import logging +X +X +class CsRule: +X """ Manage iprules +X Supported Types: +X fwmark +X """ +X +X def __init__(self, dev): +X self.dev = dev +X self.tableNo = 100 + int(dev[3:]) +X self.table = "Table_%s" % (dev) +X +X def addRule(self, rule): +X if not self.findRule(rule + " lookup " + self.table): +X cmd = "ip rule add " + rule + " table " + self.table +X CsHelper.execute(cmd) +X logging.info("Added rule %s for %s" % (cmd, self.table)) +X +X def findRule(self, rule): +X for i in CsHelper.execute("ip rule show"): +X if rule in i.strip(): +X return True +X return False +X +X def addMark(self): +X if not self.findMark(): +X cmd = "ip rule add fwmark %s table %s" % (self.tableNo, self.table) +X CsHelper.execute(cmd) +X logging.info("Added fwmark rule for %s" % (self.table)) +X +X def delMark(self): +X if self.findMark(): +X cmd = "ip rule delete fwmark %s table %s" % (self.tableNo, self.table) +X CsHelper.execute(cmd) +X logging.info("Deleting fwmark rule for %s" % (self.table)) +X +X def findMark(self): +X srch = "from all fwmark %s lookup %s" % (hex(self.tableNo), self.table) +X for i in CsHelper.execute("ip rule show"): +X if srch in i.strip(): +X return True +X return False +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRule.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRule.py': 'MD5 check failed' + ) << \SHAR_EOF +78748432f1ac57194339aef8bdb7c9f8 cloud_scripts/opt/cloud/bin/cs/CsRule.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRule.py'` -ne 2192 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' is not 2192" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vmdata.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vmdata.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vmdata.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vmdata.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/vmdata.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&ET*#(I +M"@H@("`@9F]R(&EP(&EN(&IS;VY?9&%T83H*("`@("`@("!F;W(@:71E;2!I +M;B!J2!V86QI9"!D +M871A"B`@("`@("`@("`@(&EF(&9O;&1E&ES=',H;65T +M86UA;FEF97-T*3H*("`@("`@("!O2Q!;&QO=UQN1&5N +M>2!F&-E<'0@3U-%2!E>&ES=',L('=E(&1O(&ET('1H:7,@=V%Y(&9O +M7,N97AI="@Q*0H*("`@(&9H(#T@;W!E;BAH +M=&%C8V5S2`K("=<;B&9L;V-K*&9I;&4I.@H@("`@=')Y.@H@("`@("`@(&9L;V-K +M*&9I;&4L($Q/0TM?15@I"B`@("!E>&-E<'0@24]%7,N97AI="@Q +M*0H@("`@3H*("`@("`@("!F;&]C:RAF:6QE+"!,3T-+7U5.*0H@("`@97AC97!T($E/ +M17)R;W(@87,@93H*("`@("`@("!P7,N97AI="@Q*0H@("`@7,N87)G=ELQ.ETI"FYA +` +end +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vmdata.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vmdata.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vmdata.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vmdata.py': 'MD5 check failed' + ) << \SHAR_EOF +f585277ddefb989a0662db609bc199c7 cloud_scripts/opt/cloud/bin/vmdata.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vmdata.py'` -ne 4723 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vmdata.py' is not 4723" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/get_diagnostics_files.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/get_diagnostics_files.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/get_diagnostics_files.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' && +#!/usr/bin/env python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import logging +import os +import re +import shlex +import subprocess as sp +import sys +import time +import zipfile +X +X +# Create zip archive and append files for retrieval +def zip_files(files): +X fList = files +X compression = zipfile.ZIP_DEFLATED +X time_str = time.strftime("%Y%m%d-%H%M%S") +X zf_name = '/root/diagnostics_files_' + time_str + '.zip' +X zf = zipfile.ZipFile(zf_name, 'w', compression) +X +X ''' +X Initialize 3 empty arrays to collect found files, non-existent files +X and last one to collect temp files to be cleaned up when script exits +X ''' +X files_found_list = [] +X files_not_found_list = [] +X files_from_shell_commands = [] +X +X try: +X for f in fList: +X f = f.strip() +X +X if f in ('iptables', 'ipaddr', 'iprule', 'iproute'): +X f = execute_shell_script(f) +X files_from_shell_commands.append(f) +X +X if len(f) > 3 and f.startswith('[') and f.endswith(']'): +X f = execute_shell_script(f[1:-1]) +X files_from_shell_commands.append(f) +X +X if os.path.isfile(f): +X try: +X zf.write(f, f[f.rfind('/') + 1:]) +X except OSError or RuntimeError as e: +X files_not_found_list.append(f) +X else: +X files_found_list.append(f) +X finally: +X cleanup(files_from_shell_commands) +X generate_retrieved_files_txt(zf, files_found_list, files_not_found_list) +X zf.close() +X print zf_name +X +X +def get_cmd(script): +X if script is None or len(script) == 0: +X return None +X +X cmd = None +X if script == 'iptables': +X cmd = 'iptables-save' +X elif script == 'ipaddr': +X cmd = 'ip address' +X elif script == 'iprule': +X cmd = 'ip rule list' +X elif script == 'iproute': +X cmd = 'ip route show table all' +X else: +X cmd = '/opt/cloud/bin/' + script +X if not os.path.isfile(cmd.split(' ')[0]): +X cmd = None +X +X return cmd +X +X +def execute_shell_script(script): +X script = script.strip() +X outputfile = script + '.log' +X +X with open(outputfile, 'wb', 0) as f: +X try: +X cmd = get_cmd(script) +X if cmd is None: +X f.write('Unable to generate command for ' + script + ', perhaps missing file') +X else: +X p = sp.Popen(cmd, shell=True, stdout=sp.PIPE, stderr=sp.PIPE) +X stdout, stderr = p.communicate() +X return_code = p.returncode +X if return_code is 0: +X f.write(stdout) +X else: +X f.write(stderr) +X except OSError as ex: +X delete_tmp_file_cmd = 'rm -f %s' % outputfile +X sp.check_call(shlex.split(delete_tmp_file_cmd)) +X finally: +X f.close() +X return outputfile +X +X +def cleanup(file_list): +X files = ' '.join(file_list) +X cmd = 'rm -f %s' % files +X try: +X p = sp.Popen(shlex.split(cmd), stderr=sp.PIPE, stdout=sp.PIPE) +X p.communicate() +X except OSError as e: +X logging.debug("Failed to execute bash command") +X +X +def generate_retrieved_files_txt(zip_file, files_found, files_not_found): +X output_file = 'fileinfo.txt' +X try: +X with open(output_file, 'wb', 0) as man: +X for i in files_found: +X man.write(i + '\n') +X for j in files_not_found: +X man.write(j + 'File Not Found!!\n') +X zip_file.write(output_file, output_file) +X finally: +X cleanup_cmd = "rm -f %s" % output_file +X sp.check_call(shlex.split(cleanup_cmd)) +X +X +if __name__ == '__main__': +X fileList = sys.argv[1:] +X zip_files(fileList) +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/get_diagnostics_files.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py': 'MD5 check failed' + ) << \SHAR_EOF +f8b91c14af848f14696aa2c1193b0907 cloud_scripts/opt/cloud/bin/get_diagnostics_files.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py'` -ne 4478 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' is not 4478" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/checkrouter.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checkrouter.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checkrouter.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/checkrouter.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checkrouter.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +STATUS=UNKNOWN +X +if [ "$(systemctl is-active keepalived)" != "active" ] +then +X echo "Status: FAULT" +X exit +fi +X +ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g') +if [ "$ROUTER_TYPE" = "router" ] +then +X ROUTER_STATE=$(ip addr show dev eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi') +X STATUS=$ROUTER_STATE +else +X ROUTER_STATE=$(ip addr show dev eth1 | grep state | awk '{print $9;}') +X if [ "$ROUTER_STATE" = "UP" ] +X then +X STATUS=MASTER +X elif [ "$ROUTER_STATE" = "DOWN" ] +X then +X STATUS=BACKUP +X fi +fi +X +echo "Status: ${STATUS}" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checkrouter.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/checkrouter.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/checkrouter.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checkrouter.sh': 'MD5 check failed' + ) << \SHAR_EOF +b107b37bc85a7036ef9f4e81cf4ae8b2 cloud_scripts/opt/cloud/bin/checkrouter.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checkrouter.sh'` -ne 1445 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checkrouter.sh' is not 1445" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/ilb.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ilb.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ilb.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/ilb.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/ilb.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s: -a -d -f -s \n" $(basename $0) >&2 +} +X +#set -x +X +fw_remove_backup() { +X logger -t cloud "$(basename $0): Entering fw_remove_backup" +X local lb_vif_list=eth0 +X for vif in $lb_vif_list; do +X sudo iptables -F back_load_balancer_$vif 2> /dev/null +X sudo iptables -D INPUT -i $vif -p tcp -j back_load_balancer_$vif 2> /dev/null +X sudo iptables -X back_load_balancer_$vif 2> /dev/null +X done +X sudo iptables -F back_lb_stats 2> /dev/null +X sudo iptables -D INPUT -p tcp -j back_lb_stats 2> /dev/null +X sudo iptables -X back_lb_stats 2> /dev/null +} +X +fw_restore() { +X logger -t cloud "$(basename $0): Entering fw_restore" +X local lb_vif_list="eth0" +X for vif in $lb_vif_list; do +X sudo iptables -F load_balancer_$vif 2> /dev/null +X sudo iptables -D INPUT -i $vif -p tcp -j load_balancer_$vif 2> /dev/null +X sudo iptables -X load_balancer_$vif 2> /dev/null +X sudo iptables -E back_load_balancer_$vif load_balancer_$vif 2> /dev/null +X done +X sudo iptables -F lb_stats 2> /dev/null +X sudo iptables -D INPUT -p tcp -j lb_stats 2> /dev/null +X sudo iptables -X lb_stats 2> /dev/null +X sudo iptables -E back_lb_stats lb_stats 2> /dev/null +} +X +# firewall entry to ensure that haproxy can receive on specified port +fw_entry() { +X logger -t cloud "$(basename $0): Entering fw_entry" +X local added=$1 +X local removed=$2 +X local stats=$3 +X +X if [ "$added" == "none" ] +X then +X added="" +X fi +X +X if [ "$removed" == "none" ] +X then +X removed="" +X fi +X +X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") +X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") +X +# back up the iptable rules by renaming before creating new. +X local lb_vif_list=eth0 +X for vif in $lb_vif_list; do +X sudo iptables -E load_balancer_$vif back_load_balancer_$vif 2> /dev/null +X sudo iptables -N load_balancer_$vif 2> /dev/null +X sudo iptables -A INPUT -i $vif -p tcp -j load_balancer_$vif +X done +X sudo iptables -E lb_stats back_lb_stats 2> /dev/null +X sudo iptables -N lb_stats 2> /dev/null +X sudo iptables -A INPUT -p tcp -j lb_stats +X +X for i in $a +X do +X local pubIp=$(echo $i | cut -d: -f1) +X local dport=$(echo $i | cut -d: -f2) +X local lb_vif_list="eth0" +X for vif in $lb_vif_list; do +X sudo iptables -A load_balancer_$vif -p tcp -d $pubIp --dport $dport -j ACCEPT +X if [ $? -gt 0 ] +X then +X return 1 +X fi +X done +X done +X local pubIp=$(echo $stats | cut -d: -f1) +X local dport=$(echo $stats | cut -d: -f2) +X local cidrs=$(echo $stats | cut -d: -f3 | sed 's/-/,/') +X sudo iptables -A lb_stats -s $cidrs -p tcp -m state --state NEW -d $pubIp --dport $dport -j ACCEPT +X +X return 0 +} +X +#Hot reconfigure HA Proxy in the routing domain +reconfig_lb() { +X logger -t cloud "Reconfiguring ilb using $1" +X /root/reconfigLB.sh $1 +X return $? +} +X +# Restore the HA Proxy to its previous state, and revert iptables rules on loadbalancer +restore_lb() { +X logger -t cloud "Restoring HA Proxy to previous state" +X # Copy the old version of haproxy.cfg into the file that reconfigLB.sh uses +X cp /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg.new +X +X if [ $? -eq 0 ] +X then +X # Run reconfigLB.sh again +X /root/reconfigLB.sh /etc/haproxy/haproxy.cfg.new +X fi +} +X +X +logger -t cloud "$(basename $0): Entering $(dirname $0)/$(basename $0)" +X +iflag= +aflag= +dflag= +fflag= +sflag= +X +while getopts 'i:a:d:f:s:' OPTION +do +X case $OPTION in +X i) iflag=1 +X domRIp="$OPTARG" #unused but passed in +X ;; +X a) aflag=1 +X addedIps="$OPTARG" +X ;; +X d) dflag=1 +X removedIps="$OPTARG" +X ;; +X f) fflag=1 +X cfgfile="$OPTARG" +X ;; +X s) sflag=1 +X statsIp="$OPTARG" +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [[ "$aflag$dflag" != "1" && "$aflag$dflag" != "11" ]] +then +X usage +X unlock_exit 2 $lock $locked +fi +X +if [ "$addedIps" == "" ] +then +X addedIps="none" +fi +X +X +if [ "$removedIps" == "" ] +then +X removedIps="none" +fi +X +X +# hot reconfigure haproxy +reconfig_lb $cfgfile +X +if [ $? -gt 0 ] +then +X logger -t cloud "Reconfiguring ilb failed" +X unlock_exit 1 $lock $locked +fi +X +logger -t cloud "HAProxy reconfigured successfully, configuring firewall" +X +# iptables entry to ensure that haproxy receives traffic +fw_entry $addedIps $removedIps $statsIp +X +if [ $? -gt 0 ] +then +X logger -t cloud "Failed to apply firewall rules for internal load balancing, reverting HA Proxy config" +X # Restore the LB +X restore_lb +X +X logger -t cloud "Reverting firewall config" +X fw_restore +X +X unlock_exit 1 $lock $locked +else +X # Remove backedup iptable rules +X logger -t cloud "Firewall configured successfully, deleting backup firewall config" +X fw_remove_backup +fi +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/ilb.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/ilb.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/ilb.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ilb.sh': 'MD5 check failed' + ) << \SHAR_EOF +8b7374975ee7d7a5d73da78b60bd508c cloud_scripts/opt/cloud/bin/ilb.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ilb.sh'` -ne 5644 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ilb.sh' is not 5644" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +for i in $* +do +X info=`/opt/cloud/bin/checks2svpn.sh $i` +X ret=$? +X batchInfo+="$i:$ret:$info&" +done +echo -n $batchInfo +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh': 'MD5 check failed' + ) << \SHAR_EOF +36a25911b669737ea678011f72a6f3f9 cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh'` -ne 924 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' is not 924" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/savepassword.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/savepassword.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/savepassword.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/savepassword.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/savepassword.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# Usage +# save_password -v -p +X +while getopts 'v:p:' OPTION +do +X case $OPTION in +X v) VM_IP="$OPTARG" +X ;; +X p) PASSWORD="$OPTARG" +X ;; +X ?) echo "Incorrect usage" +X ;; +X esac +done +TOKEN_FILE="/tmp/passwdsrvrtoken" +TOKEN="" +if [ -f $TOKEN_FILE ]; then +X TOKEN=$(cat $TOKEN_FILE) +fi +ps aux | grep passwd_server_ip.py |grep -v grep 2>&1 > /dev/null +if [ $? -eq 0 ] +then +X ips=$(ip addr show | grep inet | awk '{print $2}') +X for ip in $ips; do +X server_ip=$(echo $ip | awk -F'/' '{print $1}') +X curl --header "DomU_Request: save_password" "http://$server_ip:8080/" -F "ip=$VM_IP" -F "password=$PASSWORD" -F "token=$TOKEN" >/dev/null 2>/dev/null & +X done +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/savepassword.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/savepassword.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/savepassword.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/savepassword.sh': 'MD5 check failed' + ) << \SHAR_EOF +edebd2c25984e1ed00b36e4f8d360a63 cloud_scripts/opt/cloud/bin/savepassword.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/savepassword.sh'` -ne 1525 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/savepassword.sh' is not 1525" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cloud-nic.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cloud-nic.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cloud-nic.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +plug_nic() { +X sudo echo "$tableNo $tableName" >> /etc/iproute2/rt_tables 2>/dev/null +X sudo ip rule add fwmark $tableNo table $tableName 2>/dev/null +X sudo ip route flush table $tableName +X sudo ip route flush cache +} +X +X +unplug_nic() { +X sudo iptables -t mangle -D PREROUTING -i $dev -m state --state NEW -j CONNMARK --set-mark $tableNo 2>/dev/null +X +X sudo ip rule del fwmark $tableNo 2>/dev/null +X sudo ip route flush table $tableName +X sudo sed -i /"$tableNo $tableName"/d /etc/iproute2/rt_tables 2>/dev/null +X sudo ip route flush cache +X # remove network usage rules +X sudo iptables -F NETWORK_STATS_$dev 2>/dev/null +X iptables-save | grep NETWORK_STATS_$dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables $rule +X done +X sudo iptables -X NETWORK_STATS_$dev 2>/dev/null +X # remove vpn network usage rules +X sudo iptables -t mangle -F VPN_STATS_$dev 2>/dev/null +X iptables-save -t mangle | grep VPN_STATS_$dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t mangle $rule +X done +X sudo iptables -t mangle -X VPN_STATS_$dev 2>/dev/null +X # remove rules on this dev +X iptables-save -t mangle | grep $dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t mangle $rule +X done +X iptables-save -t nat | grep $dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t nat $rule +X done +X iptables-save | grep $dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables $rule +X done +X # remove apache config for this eth +X rm -f /etc/apache2/conf.d/vhost$dev.conf +} +X +action=$1 +dev=$2 +tableNo=$((100+${dev:3})) +tableName="Table_$dev" +X +if [ $action == 'add' ] +then +X plug_nic +else +X unplug_nic +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cloud-nic.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cloud-nic.sh': 'MD5 check failed' + ) << \SHAR_EOF +6afed00cefb1dc06b8b4969c2c26933e cloud_scripts/opt/cloud/bin/cloud-nic.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cloud-nic.sh'` -ne 2632 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' is not 2632" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/ipsectunnel.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ipsectunnel.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/ipsectunnel.sh (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/ipsectunnel.sh +M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N#4R-2(*=G!N:6YM87)K/2(P>#4R-"(*"G5S86=E*"D@ +M>PH@("`@<')I;G1F(")5PH@('-U9&\@:7!T86)L +M97,MPH@(&1I2!<"B`@("!P +M:&%S93(@<&]L:6-Y/21ER1R:6=H=&YE='-] +M(B`^/B`D=G!N8V]N9F9I;&4@)B8*("!S=61O(&5C:&\@(B`@='EP93UT=6YN +M96PB(#X^("1V<&YC;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!A=71H8GD] +MVEK96QI9F5T:6UE?7,B(#X^("1V<&YC +M;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!E2(@/CX@ +M)'9P;F-O;F9F:6QE("8F"B`@2!F +M;W(@'1H;W`](B1/4%1!4D&ET("1R970* +` +end +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/ipsectunnel.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh': 'MD5 check failed' + ) << \SHAR_EOF +097a970ec94a68d965ffd7f446e3862d cloud_scripts/opt/cloud/bin/ipsectunnel.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh'` -ne 8769 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' is not 8769" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/ipassoc.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ipassoc.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ipassoc.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/ipassoc.sh (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/ipassoc.sh +M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N"`D("1(96%D55),.B!S=FXZ+R]S=FXN;&%B+G9M;W!S+F-O;2]R97!O2!E>&ES=',B"GT* +M"F1E;%]F=U]C:&%I;E]F;W)?:7`@*"D@>PH@(&QO8V%L('!U8DEP/20H96-H +M;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?2W!R:6YT("0R?2W!R:6YT("0R?2W!R:6YT("0Q?2PH@(&QO +M8V%L(&1E=CTB)#$B"B`@;&]C86P@:7`](B0R(@H@('-U9&\@:7`@861DW!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP/20Q +M"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0Q?22!F;W(@:7`@)'!U8DEP(&]N(&EN=&5R9F%C92`D971H1&5V(@H@("`@ +M(')E='5R;B`Q"B`@9FD*"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0R?2<@('P@9W)E<"`M=R`D +M:7!.;TUAW!R +M:6YT("0R?2#TD*'!R:6YT9B`B)7A<;B(@)&YU;2D*("`@("`@("`@ +M(&5C:&\@)&AE>#L*("`@("`@("`@("-E;F%B;&4@`IS +M9FQA9STP"FQF;&%G/0IF9FQA9ST*8V9L86<]"FYF;&%G/0IO<#TB(@H*:7-? +M;6%S=&5R/3`*:7-?&ET(#(@)&QO8VL@)&QO8VME9`H)"3L["B`@ +M97-A8PID;VYE"@H*:68@6R`B)$%F;&%G)$1F;&%G(B`A/2`B,2(@70IT:&5N +M"B`@("!U&ET("0_("1L;V-K +M("1L;V-K960*9FD*"FEF(%L@(B1F9FQA9R(@/3T@(C$B(%T@)B8@6R`B)$1F +M;&%G(B`]/2`B,2(@70IT:&5N"B`@&ET("0_ +M("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1$9FQA9R(@/3T@(C$B(%T*=&AE +M;@H@(')E;6]V95]A;E]I<"`@)'!U8FQI8TEP("8F"B`@9&5L7V9W7V-H86EN +M7V9O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ipassoc.sh': 'MD5 check failed' + ) << \SHAR_EOF +ad068a0cc84ded8f79c63ce3aced4586 cloud_scripts/opt/cloud/bin/ipassoc.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ipassoc.sh'` -ne 13401 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ipassoc.sh' is not 13401" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/line_edit.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/line_edit.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/line_edit.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/line_edit.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/line_edit.py' && +#!/usr/bin/python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import logging +import re +import shutil +import os +X +X +class LineEdit(object): +X """Helper for LineEditingFile that keeps track of one edit.""" +X def __init__(self, search, sub, *sub_args, **kwargs): +X if len(sub_args) > 0: +X sub = sub % sub_args +X flags = kwargs.get('flags', 0) +X self.pattern = re.compile(search, flags=flags) +X self.sub = sub +X self.count = kwargs.get('count', 0) # max subs to make +X self.subs = 0 # subs made so far +X +X +class LineEditingFile(object): +X """ +X Atomic, conservative, by-line editing of configuration files. +X +X Will not touch the file if there are no changes to do. +X Reasonably efficient for large files, though files with a long time +X before their first match will use memory. +X +X +X Given a vhosts file such as: +X >>> with open('doctest-vhosts.conf', 'w') as f: +X ... f.write(''' +X ... Listen foo:80 +X ... +X ... DocRoot /var/www +X ... +X ... +X ... Listen other:80 +X ... +X ... DocRoot /var/www +X ... +X ... ''') +X ... +X +X To replace the hostname for the first virtualhost entry: +X >>> new_hostname = 'fooooo' +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... f.replace(r'', '', new_hostname, count=1, flags=re.I) +X ... f.replace(r'Listen .*?:80', 'Listen %s:80', new_hostname, count=1, flags=re.I) +X ... +X +X Be careful with the matches! +X A second invocation of the same rule will edit the second vhost: +X >>> new_hostname = 'fooooo' +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... f.replace(r'', '', new_hostname, count=1, flags=re.I) +X ... +X +X To move all hosts from port 80 to port 8080: +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... f.replace(r'', '', flags=re.I) +X ... f.replace(r'Listen (.*?):80', 'Listen \\\\1:80', flags=re.I) +X ... +X +X (please note in this example there's a double escape of the backreference +X \\\\1, to make the example work with doctest) +X +X Since this example already matched all files, a second invocation does nothing: +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... f.replace(r'', '', flags=re.I) +X ... +X +X It's also acceptable to not make any edits at all: +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... pass +X ... +X +X You don't _have_ to use a with statement: +X >>> f = LineEditingFile('doctest-vhosts.conf') +X >>> f.replace(r'DocRoot /var/www', 'DocRoot /var/www/html', flags=re.I) +X >>> changes = f.commit() +X >>> print changes +X 2 +X >>> +X +X Cleanup of the example vhosts.conf: +X >>> # noinspection PyBroadException +X >>> try: +X ... os.unlink('doctest-vhosts.conf') +X ... os.unlink('doctest-vhosts.conf.bak') +X ... os.unlink('doctest-vhosts.conf.new') +X ... except: +X ... pass +X ... +X """ +X +X def __init__(self, filename): +X self.filename = filename +X self.changed = False +X self.edits = [] +X +X def __enter__(self): +X return self +X +X def replace(self, search, sub, *sub_args, **kwargs): +X edit = LineEdit(search, sub, *sub_args, **kwargs) +X self.edits.append(edit) +X +X # noinspection PyUnusedLocal +X def __exit__(self, exc, value, traceback): +X if exc is not None: +X return False # return false results in re-raise +X +X self.commit() +X +X def commit(self): +X changes = 0 +X changed_file = None +X changed_filename = self.filename + '.new' +X try: +X lines = [] +X backup_filename = self.filename + '.bak' +X # noinspection PyUnusedLocal +X stat = None +X with open(self.filename, 'r') as orig: +X stat = os.fstat(orig.fileno()) +X for line in orig: +X changed_line = line +X for edit in self.edits: +X remaining_count = 0 +X if edit.count != 0: +X remaining_count = edit.count - edit.subs +X if remaining_count < 0: +X raise Exception("Made too many edits") +X elif remaining_count == 0: +X continue +X changed_line, subs = edit.pattern.subn( +X edit.sub, line, remaining_count) +X if changed_line != line: +X if changed_file is None: +X logging.debug("Editing file %s" % self.filename) +X logging.debug(" - %s" % line[:-1]) +X logging.debug(" + %s" % changed_line[:-1]) +X changes += subs +X edit.subs += subs +X if changes == 0: # buffer until we find a change +X lines.append(changed_line) +X elif changed_file is None: # found first change, flush buffer +X changed_file = open(changed_filename, 'w') +X if hasattr(os, 'fchmod'): +X os.fchmod(changed_file.fileno(), # can cause OSError which aborts +X stat.st_mode) +X if hasattr(os, 'fchown'): +X os.fchown(changed_file.fileno(), # can cause OSError which aborts +X stat.st_uid, stat.st_gid) +X changed_file.writelines(lines) +X changed_file.write(changed_line) +X del lines # reclaim buffer memory +X else: # already flushed, just write +X changed_file.write(changed_line) +X +X if changes == 0: +X logging.info("No edits need for file %s" % +X self.filename) +X else: +X changed_file.close() +X changed_file = None +X if os.path.exists(backup_filename): # back up the original +X os.unlink(backup_filename) +X shutil.copy(self.filename, backup_filename) +X os.rename(changed_filename, self.filename) # the swap +X logging.info("Edited file %s (%d changes)" % +X (self.filename, changes)) +X finally: +X if changed_file is not None: # failed, clean up +X changed_file.close() +X os.unlink(changed_filename) +X return changes +X +X +if __name__ == "__main__": +X logging.basicConfig(level=logging.DEBUG) +X import doctest +X doctest.testmod() +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/line_edit.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/line_edit.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/line_edit.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/line_edit.py': 'MD5 check failed' + ) << \SHAR_EOF +4d05b8a011ff9c6132a3ca4ff477a161 cloud_scripts/opt/cloud/bin/line_edit.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/line_edit.py'` -ne 7961 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/line_edit.py' is not 7961" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/get_template_version.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/get_template_version.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/get_template_version.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/get_template_version.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/get_template_version.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# As the last command send to router before any rules operation, wait until boot up done +X +__TIMEOUT=240 +__FLAGFILE=/var/cache/cloud/boot_up_done +done=0 +for i in `seq 1 $(($__TIMEOUT * 10))` +do +X if [ -e $__FLAGFILE ] +X then +X done=1 +X break +X fi +X sleep 0.1 +X if [ $((i % 10)) -eq 0 ] +X then +X logger -t cloud "Waiting for VM boot up done for one second" +X fi +done +X +if [ -z $done ] +then +X # declare we failed booting process +X echo "Waited 60 seconds but boot up haven't been completed" +X exit +fi +X +release=`cat /etc/cloudstack-release` +sig=`cat /var/cache/cloud/cloud-scripts-signature` +echo "${release}&${sig}" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/get_template_version.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/get_template_version.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/get_template_version.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/get_template_version.sh': 'MD5 check failed' + ) << \SHAR_EOF +2234ad00c02a6be63cb0f4f876b8960b cloud_scripts/opt/cloud/bin/get_template_version.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/get_template_version.sh'` -ne 1449 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/get_template_version.sh' is not 1449" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/update_config.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/update_config.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/update_config.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/update_config.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/update_config.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,N87)G=BD*:68@87)G8R`A/2`R(&%N9"!A7,N97AI="@Q*0H*(R!&25A- +M12!W92!S:&]U;&0@9V5T('1H:7,@;&]C871I;VX@9G)O;2!A(&-O;F9I9W5R +M871I;VX@8VQA7,N97AI="AR971U +M2!S<&5E9&EN9R!U<"!L;V%D:6YG('1I;65S +M"B`@("!I9B!N;W0@*&]S+F5N=FER;VXN9V5T*"=$149%4E]#3TY&242YJ7,N87)G=ELQ +M72!O2`]($YO +M;F4*"B`@("!F;W(@:S$L('8Q(&EN(&=U97-T;F5T7V1I8W0N:71E7,N87!P96YD*&LQ*0H*("`@(&EF(&YO +M="!E>&ES=&EN9U]K97ES.@H@("`@("`@("2`Z +M.B!296-O;F9I9W5R:6YG(&=U97-T(&YE='=O&ES=&EN9U]K97ES.@H@("`@("`@("2!I;B!E>&ES=&EN9U]K97ES.@H@("`@("`@(&9O&ES=',@/2!4&ES=',Z"B`@("`@("`@("`@(&)R96%K +M"@H@("`@B(I*3H* +M("`@("`@("!S>7,N97AI="@P*0H@("`@;&]G9VEN9RYE2`Z.B!5;F%B;&4@=&\@7,N97AI="@Q +M*0H*(R!)9B!T:&4@9W5E2`Z.B!.;R!N965D('1O('!R;V-E/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/update_config.py': 'MD5 check failed' + ) << \SHAR_EOF +a2062b2b010940ea783d8256b807c488 cloud_scripts/opt/cloud/bin/update_config.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/update_config.py'` -ne 5136 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/update_config.py' is not 5136" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/edithosts.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/edithosts.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/edithosts.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/edithosts.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/edithosts.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +X +# edithosts.sh -- edit the dhcphosts file on the routing domain +X +usage() { +X printf "Usage: %s: -m -4 -6 -h -d -n -s -u [-N]\n" $(basename $0) >&2 +} +X +mac= +ipv4= +ipv6= +host= +dflt= +dns= +routes= +duid= +nondefault= +X +while getopts 'm:4:h:d:n:s:6:u:N' OPTION +do +X case $OPTION in +X m) mac="$OPTARG" +X ;; +X 4) ipv4="$OPTARG" +X ;; +X 6) ipv6="$OPTARG" +X ;; +X u) duid="$OPTARG" +X ;; +X h) host="$OPTARG" +X ;; +X d) dflt="$OPTARG" +X ;; +X n) dns="$OPTARG" +X ;; +X s) routes="$OPTARG" +X ;; +X N) nondefault=1 +X ;; +X ?) usage +X exit 2 +X ;; +X esac +done +X +DHCP_HOSTS=/etc/dhcphosts.txt +DHCP_OPTS=/etc/dhcpopts.txt +DHCP_LEASES=/var/lib/misc/dnsmasq.leases +HOSTS=/etc/hosts +X +source /root/func.sh +X +lock="biglock" +#default timeout value is 30 mins as DhcpEntryCommand is not synchronized on agent side any more, +#and multiple commands can be sent to the same VR at a time +locked=$(getLockFile $lock 1800) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +grep "redundant_router=1" /var/cache/cloud/cmdline > /dev/null +no_redundant=$? +X +dnsmasq_managed_lease=`cat /var/cache/cloud/dnsmasq_managed_lease` +X +wait_for_dnsmasq () { +X local _pid=$(pidof dnsmasq) +X for i in 0 1 2 3 4 5 6 7 8 9 10 +X do +X sleep 1 +X _pid=$(pidof dnsmasq) +X [ "$_pid" != "" ] && break; +X done +X [ "$_pid" != "" ] && return 0; +X logger -t cloud "edithosts: timed out waiting for dnsmasq to start" +X return 1 +} +X +if [ $dnsmasq_managed_lease ] +then +X #release previous dhcp lease if present +X logger -t cloud "edithosts: releasing $ipv4" +X dhcp_release $(ip route get "$ipv4/32" | grep " dev " | sed -e "s/^.* dev \([^ ]*\) .*$/\1/g") $ipv4 $(grep "$ipv4 " $DHCP_LEASES | awk '{print $2}') > /dev/null 2>&1 +X logger -t cloud "edithosts: released $ipv4" +fi +X +logger -t cloud "edithosts: update $mac $ipv4 $ipv6 $host to hosts" +X +[ ! -f $DHCP_HOSTS ] && touch $DHCP_HOSTS +[ ! -f $DHCP_OPTS ] && touch $DHCP_OPTS +[ ! -f $DHCP_LEASES ] && touch $DHCP_LEASES +X +#delete any previous entries from the dhcp hosts file +sed -i /$mac/d $DHCP_HOSTS +if [ $ipv4 ] +then +X sed -i /$ipv4,/d $DHCP_HOSTS +fi +if [ $ipv6 ] +then +X #searching with [$ipv6], matching other ip so using $ipv6], +X sed -i /$ipv6],/d $DHCP_HOSTS +fi +# don't want to do this in the future, we can have same VM with multiple nics/entries +sed -i /$host,/d $DHCP_HOSTS +X +#put in the new entry +if [ $ipv4 ] +then +X echo "$mac,$ipv4,$host,infinite" >>$DHCP_HOSTS +fi +if [ $ipv6 ] +then +X if [ $nondefault ] +X then +X echo "id:$duid,set:nondefault6,[$ipv6],$host,infinite" >>$DHCP_HOSTS +X else +X echo "id:$duid,[$ipv6],$host,infinite" >>$DHCP_HOSTS +X fi +fi +X +if [ $dnsmasq_managed_lease -eq 0 ] +then +X #delete leases to supplied mac and ip addresses +X if [ $ipv4 ] +X then +X sed -i /$mac/d $DHCP_LEASES +X sed -i /"$ipv4 "/d $DHCP_LEASES +X fi +X if [ $ipv6 ] +X then +X sed -i /$duid/d $DHCP_LEASES +X sed -i /"$ipv6 "/d $DHCP_LEASES +X fi +X sed -i /"$host "/d $DHCP_LEASES +X +X #put in the new entry +X if [ $ipv4 ] +X then +X echo "0 $mac $ipv4 $host *" >> $DHCP_LEASES +X fi +X if [ $ipv6 ] +X then +X echo "0 $duid $ipv6 $host *" >> $DHCP_LEASES +X fi +fi +X +#edit hosts file as well +if [ $ipv4 ] +then +X sed -i /"$ipv4 "/d $HOSTS +fi +if [ $ipv6 ] +then +X sed -i /"$ipv6 "/d $HOSTS +fi +sed -i /" $host$"/d $HOSTS +if [ $ipv4 ] +then +X echo "$ipv4 $host" >> $HOSTS +fi +if [ $ipv6 ] +then +X echo "$ipv6 $host" >> $HOSTS +fi +X +if [ "$dflt" != "" -a "$ipv4" != "" ] +then +X #make sure dnsmasq looks into options file +X sed -i /dhcp-optsfile/d /etc/dnsmasq.conf +X echo "dhcp-optsfile=$DHCP_OPTS" >> /etc/dnsmasq.conf +X +X tag=$(echo $ipv4 | tr '.' '_') +X sed -i /$tag,/d $DHCP_OPTS +X if [ "$dflt" == "0.0.0.0" ] +X then +X logger -t cloud "$0: unset default router for $ipv4" +X logger -t cloud "$0: unset dns server for $ipv4" +X echo "$tag,3" >> $DHCP_OPTS +X echo "$tag,6" >> $DHCP_OPTS +X echo "$tag,15" >> $DHCP_OPTS +X fi +X [ "$routes" != "" ] && echo "$tag,121,$routes" >> $DHCP_OPTS +X #delete entry we just put in because we need a tag +X sed -i /$ipv4,/d $DHCP_HOSTS +X #put it back with a tag +X echo "$mac,set:$tag,$ipv4,$host,infinite" >>$DHCP_HOSTS +fi +X +# make dnsmasq re-read files +pid=$(pidof dnsmasq) +if [ "$pid" != "" ] +then +X # use SIGHUP to avoid service outage if dhcp_release is available. +X if [ $dnsmasq_managed_lease ] +X then +X kill -HUP $pid +X else +X systemctl restart dnsmasq +X fi +else +X if [ $no_redundant -eq 1 ] +X then +X wait_for_dnsmasq +X else +X logger -t cloud "edithosts: skip wait dnsmasq due to redundant virtual router" +X fi +fi +X +ret=$? +unlock_exit $ret $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/edithosts.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/edithosts.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/edithosts.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/edithosts.sh': 'MD5 check failed' + ) << \SHAR_EOF +68e47d6a7efaacefbbaebf8b4e7408c3 cloud_scripts/opt/cloud/bin/edithosts.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/edithosts.sh'` -ne 5502 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/edithosts.sh' is not 5502" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/diagnostics.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/diagnostics.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/diagnostics.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/diagnostics.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/diagnostics.py' && +#!/usr/bin/env python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import shlex +import subprocess +import sys +X +X +def run_cmd(command): +X if command is not None: +X try: +X p = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE) +X stdout, stderr = p.communicate() +X return_code = p.returncode +X +X except OSError as e: +X stdout = "Check your command type" +X stderr = "Exception occurred: %s" % e +X return_code = 1 +X +X finally: +X print('%s&&' % stdout.strip()) +X print('%s&&' % stderr.strip()) +X print('%s' % return_code) +X +X +def get_command(): +X arguments = sys.argv +X cmd = " ".join(arguments[1:]) +X cmd_type = sys.argv[1] +X +X if cmd_type == 'ping': +X if '-c' in arguments: +X return cmd +X else: +X return cmd + " -c 4" +X +X elif cmd_type == 'traceroute': +X if '-m' in arguments: +X return cmd +X else: +X return cmd + " -m 20" +X +X elif cmd_type == 'arping': +X if '-c' in arguments: +X return cmd +X else: +X return cmd + " -c 4" +X +X else: +X return None +X +X +if __name__ == "__main__": +X command = get_command() +X run_cmd(command) +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/diagnostics.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/diagnostics.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/diagnostics.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/diagnostics.py': 'MD5 check failed' + ) << \SHAR_EOF +91a837e5bcafee663cbfb8532574405a cloud_scripts/opt/cloud/bin/diagnostics.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/diagnostics.py'` -ne 2012 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/diagnostics.py' is not 2012" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_monitorservice.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_monitorservice.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_monitorservice.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_monitorservice.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py': 'MD5 check failed' + ) << \SHAR_EOF +1121a063f2dbcfc1bdc426ceba249184 cloud_scripts/opt/cloud/bin/cs_monitorservice.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py'` -ne 1541 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py' is not 1541" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpn_l2tp.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpn_l2tp.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpn_l2tp.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +X +X +#set -x +usage() { +X printf "Usage:\n" +X printf "Create VPN : %s -c -r -l -p -s -i \n" $(basename $0) +X printf "Delete VPN : %s -d -l -s -D -C < local cidr> \n" $(basename $0) +X printf "Add VPN User : %s -u \n" $(basename $0) +X printf "Remote VPN User: %s -U /dev/null +X then +X is_vpc=true +X fi +X +X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 500 -j ACCEPT +X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 4500 -j ACCEPT +X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 1701 -j ACCEPT +X sudo iptables $op INPUT -i $dev -p ah -j ACCEPT +X sudo iptables $op INPUT -i $dev -p esp -j ACCEPT +X if $is_vpc +X then +X # Need to apply the following ACL rules as well. +X if sudo iptables -N VPN_FORWARD &> /dev/null +X then +X sudo iptables -I FORWARD -i ppp+ -j VPN_FORWARD +X sudo iptables -I FORWARD -o ppp+ -j VPN_FORWARD +X sudo iptables -A VPN_FORWARD -j DROP +X fi +X sudo iptables $op VPN_FORWARD -i ppp+ -o ppp+ -j RETURN +X sudo iptables $op VPN_FORWARD -i ppp+ -d $cidr -j RETURN +X sudo iptables $op VPN_FORWARD -s $cidr -o ppp+ -j RETURN +X else +X sudo iptables $op FORWARD -i ppp+ -d $cidr -j ACCEPT +X sudo iptables $op FORWARD -s $cidr -o ppp+ -j ACCEPT +X sudo iptables $op FORWARD -i ppp+ -o ppp+ -j ACCEPT +X fi +X sudo iptables $op INPUT -i ppp+ -m udp -p udp --dport 53 -j ACCEPT +X sudo iptables $op INPUT -i ppp+ -m tcp -p tcp --dport 53 -j ACCEPT +X sudo iptables -t nat $op PREROUTING -i ppp+ -p tcp -m tcp --dport 53 -j DNAT --to-destination $local_ip +X sudo iptables -t nat $op PREROUTING -i ppp+ -p udp -m udp --dport 53 -j DNAT --to-destination $local_ip +X +X if $is_vpc +X then +X return +X fi +X +X if sudo iptables -t mangle -N VPN_$public_ip &> /dev/null +X then +X logger -t cloud "$(basename $0): created VPN chain in PREROUTING mangle" +X sudo iptables -t mangle -I PREROUTING -d $public_ip -j VPN_$public_ip +X sudo iptables -t mangle -A VPN_$public_ip -j RETURN +X fi +X op2="-D" +X [ "$op" == "-A" ] && op2="-I" +X sudo iptables -t mangle $op VPN_$public_ip -p ah -j ACCEPT +X sudo iptables -t mangle $op VPN_$public_ip -p esp -j ACCEPT +} +X +start_ipsec() { +X systemctl is-active ipsec > /dev/null +X if [ $? -ne 0 ] +X then +X systemctl start ipsec > /dev/null +X #Wait until ipsec started, 5 seconds at most +X for i in {1..5} +X do +X logger -t cloud "$(basename $0): waiting ipsec start..." +X systemctl is-active ipsec > /dev/null +X result=$? +X if [ $result -eq 0 ] +X then +X break +X fi +X sleep 1 +X done +X fi +X systemctl is-active ipsec > /dev/null +X return $? +} +X +ipsec_server() { +X local op=$1 +X case $op in +X "start") start_ipsec +X sudo systemctl start xl2tpd +X ;; +X "stop") sudo systemctl stop xl2tpd +X ;; +X "restart") start_ipsec +X sudo ipsec auto --rereadall +X systemctl stop xl2tpd +X systemctl start xl2tpd +X ;; +X esac +} +X +create_l2tp_ipsec_vpn_server() { +X local ipsec_psk=$1 +X local public_ip=$2 +X local client_range=$3 +X local local_ip=$4 +X +X sed -i -e "s/left=.*$/left=$public_ip/" /etc/ipsec.d/l2tp.conf +X echo "$public_ip %any : PSK \"$ipsec_psk\"" > /etc/ipsec.d/ipsec.any.secrets +X sed -i -e "s/^ip range = .*$/ip range = $client_range/" /etc/xl2tpd/xl2tpd.conf +X sed -i -e "s/^local ip = .*$/local ip = $local_ip/" /etc/xl2tpd/xl2tpd.conf +X +X sed -i -e "s/^ms-dns.*$/ms-dns $local_ip/" /etc/ppp/options.xl2tpd +X +X iptables_ "-D" $public_ip +X iptables_ "-I" $public_ip +X +X ipsec_server "restart" +X +X ipsec auto --rereadsecrets +X ipsec auto --replace L2TP-PSK +} +X +destroy_l2tp_ipsec_vpn_server() { +X local public_ip=$1 +X +X ipsec auto --down L2TP-PSK +X +X iptables_ "-D" $public_ip +X +X ipsec_server "stop" +} +X +remove_l2tp_ipsec_user() { +X local u=$1 +X sed -i -e "/^$u .*$/d" /etc/ppp/chap-secrets +X if [ -x /usr/bin/tdbdump ]; then +X pid=$(tdbdump /var/run/pppd2.tdb | grep -w $u | awk -F';' '{print $4}' | awk -F= '{print $2}') +X [ "$pid" != "" ] && kill -9 $pid +X fi +X return 0 +} +X +add_l2tp_ipsec_user() { +X local u=$1 +X local passwd=$2 +X +X uptodate=$(grep "^$u \* \"$passwd\" \*$" /etc/ppp/chap-secrets) +X if [ "$uptodate" == "" ] +X then +X remove_l2tp_ipsec_user $u +X echo "$u * \"$passwd\" *" >> /etc/ppp/chap-secrets +X fi +} +X +rflag= +pflag= +lflag= +sflag= +create= +destroy= +useradd= +userdel= +dev= +cidr= +X +while getopts 'cdl:p:r:s:u:U:i:C:' OPTION +do +X case $OPTION in +X c) create=1 +X ;; +X d) destroy=1 +X ;; +X u) useradd=1 +X user_pwd="$OPTARG" +X ;; +X U) userdel=1 +X user="$OPTARG" +X ;; +X r) rflag=1 +X client_range="$OPTARG" +X ;; +X p) pflag=1 +X ipsec_psk="$OPTARG" +X ;; +X l) lflag=1 +X local_ip="$OPTARG" +X ;; +X s) sflag=1 +X server_ip="$OPTARG" +X ;; +X i) dev="$OPTARG" +X ;; +X C) cidr="$OPTARG" +X ;; +X ?) usage +X exit 2 +X ;; +X esac +done +X +if [ "$dev" == "" ] +then +X dev="eth2" +fi +X +if [ "$cidr" == "" ] +then +X cidr=$(get_intf_ip "eth0") +fi +X +[ "$create$destroy" == "11" ] || [ "$create$destroy$useradd$userdel" == "" ] && usage && exit 2 +[ "$create" == "1" ] && [ "$lflag$pflag$rflag$sflag" != "1111" ] && usage && exit 2 +X +if [ "$create" == "1" ]; then +X create_l2tp_ipsec_vpn_server $ipsec_psk $server_ip $client_range $local_ip +X exit $? +fi +X +if [ "$destroy" == "1" ]; then +X destroy_l2tp_ipsec_vpn_server $server_ip +X exit $? +fi +X +if [ "$useradd" == "1" ]; then +X u=$(echo $user_pwd | awk -F',' '{print $1}') +X pwd=$(echo $user_pwd | awk -F',' '{print $2}') +X add_l2tp_ipsec_user $u $pwd +X exit $? +fi +if [ "$userdel" == "1" ]; then +X remove_l2tp_ipsec_user $user +X exit $? +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpn_l2tp.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh': 'MD5 check failed' + ) << \SHAR_EOF +79e41044b43cc49c6b11859534bc454d cloud_scripts/opt/cloud/bin/vpn_l2tp.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh'` -ne 6986 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' is not 6986" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_guestnetwork.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_guestnetwork.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_guestnetwork.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +keys = ['eth1', 'eth2', 'eth3', 'eth4', 'eth5', 'eth6', 'eth7', 'eth8', 'eth9'] +X +X +def merge(dbag, gn): +X device = gn['device'] +X +X if not gn['add'] and device in dbag: +X +X if dbag[device]: +X device_to_die = dbag[device][0] +X try: +X dbag[device].remove(device_to_die) +X except ValueError, e: +X print "[WARN] cs_guestnetwork.py :: Error occurred removing item from databag. => %s" % device_to_die +X del(dbag[device]) +X else: +X del(dbag[device]) +X +X else: +X dbag.setdefault(device, []).append(gn) +X +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_guestnetwork.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py': 'MD5 check failed' + ) << \SHAR_EOF +599105da1bdfaced1f2c8078d3fbed19 cloud_scripts/opt/cloud/bin/cs_guestnetwork.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py'` -ne 1401 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' is not 1401" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_vmdata.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vmdata.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vmdata.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, metadata): +X dbag[metadata["vm_ip_address"]] = metadata["vm_metadata"] +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_vmdata.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vmdata.py': 'MD5 check failed' + ) << \SHAR_EOF +3ee2451cb48927d361f05bb5fe3df4ce cloud_scripts/opt/cloud/bin/cs_vmdata.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vmdata.py'` -ne 892 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' is not 892" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/dnsmasq.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/dnsmasq.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/dnsmasq.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +usage() { +X printf "Usage: %s: \n" $(basename $0) >&2 +} +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +#set -x +#backup the old config file +DHCP_CONFIG=/etc/dnsmasq.d/multiple_ranges.conf +DHCP_CONFIG_BAK=/etc/dnsmasq.d/multiple_ranges.conf.bak +DHCP_CONFIG_MAIN=/etc/dnsmasq.conf +DHCP_CONFIG_MAIN_BAK=/etc/dnsmasq.conf.bak +DHCP_FAILURE_CONFIG=/etc/multiple_ranges.conf.failure +DHCP_FAILURE_CONFIG_MAIN=/etc/dnsmasq.conf.failure +CMDLINE=$(cat /var/cache/cloud/cmdline | tr '\n' ' ') +X +#take a backup copy of the dnsmasq file. +cp "$DHCP_CONFIG_MAIN" "$DHCP_CONFIG_MAIN_BAK" +cp "$DHCP_CONFIG" "$DHCP_CONFIG_BAK" +X +#empty the config file +echo > $DHCP_CONFIG +X +var="$1" +dhcp_range="" +dhcp_gateway="" +dhcp_netmask="" +dns_option="" +dns_servers="" +count=0 +X +X +# fetching the dns Ips from the command line. +dns1=$(echo "$CMDLINE" | grep -o " dns1=[[:digit:]].* " | sed -e 's/dns1=//' | awk '{print $1}') +dns2=$(echo "$CMDLINE" | grep -o " dns2=[[:digit:]].* " | sed -e 's/dns2=//' | awk '{print $1}') +X +dns_servers="${dns1}" +if [ -n "$dns2" ] +then +dns_servers="${dns1},${dns2}" +fi +X +X +# check if useextdns is true +use_ext_dns=$(echo "$CMDLINE" | grep -o "useextdns=true") +while [ -n "$var" ] +do +X var1=$(echo $var | cut -f1 -d "-") +X routerip=$( echo $var1 | cut -f1 -d ":" ) +X gateway=$(echo $var1 | cut -f2 -d ":") +X netmask=$(echo $var1 | cut -f3 -d ":") +X start_ip_of_subnet=$(echo $var1 | cut -f4 -d ":") +X dhcp_range="${dhcp_range}"'dhcp-range=set:range'$count","$start_ip_of_subnet",static \n" +X dhcp_gateway="${dhcp_gateway}"'dhcp-option=tag:range'$count",3,"$gateway" \n" +X dhcp_netmask="${dhcp_netmask}"'dhcp-option=tag:range'$count",1,"$netmask" \n" +X if [ -n "$use_ext_dns" ] +X then +X dns_option="${dns_option}"'dhcp-option=tag:range'$count",6,"$dns_servers" \n" +X else +X dns_option="${dns_option}"'dhcp-option=tag:range'$count",6,$routerip"","$dns_servers" \n" +X fi +X var=$( echo $var | sed "s/${var1}-//" ) +X count=$[$count+1] +done +X +#logging the configuration being removed. +log="" +log="${log}"`grep "^dhcp-option=6" "$DHCP_CONFIG_MAIN"`"\n" +log="${log}"`grep "^dhcp-option=option:router" "$DHCP_CONFIG_MAIN"`"\n" +log="${log}"`grep "^dhcp-range=" "$DHCP_CONFIG_MAIN"`"\n" +X +if [ "$log" != '\n\n\n' ] +then +X #Cleaning the existing dhcp confgiuration +X logger -t cloud "dnsmasq.sh: remvoing the primaryip confg from dnsmasq.conf and adding it to /etc/dnsmaq.d/multiple_ranges.conf" +X logger -t cloud "dnsmasq.sh: config removed from dnsmasq.conf is $log" +X sed -i -e '/dhcp-option=6/d' "$DHCP_CONFIG_MAIN" +X sed -i -e '/dhcp-option=option:router/d' "$DHCP_CONFIG_MAIN" +X sed -i -e '/^dhcp-range=/d' "$DHCP_CONFIG_MAIN" +fi +X +#wrting the new config into the config file. +echo -e "$dhcp_range" >> "$DHCP_CONFIG" +echo -e "$dhcp_gateway" >> "$DHCP_CONFIG" +echo -e "$dhcp_netmask" >> "$DHCP_CONFIG" +echo -e "$dns_option" >> "$DHCP_CONFIG" +X +X +#restart the dnsmasq +systemctl restart dnsmasq +result=$? +if [ "$result" -ne "0" ] +then +X logger -t cloud "dnsmasq.sh: could not configure dnsmasq" +X logger -t cloud "dnsmasq.sh: reverting to the old config" +X logger -t cloud "dnsmasq.sh: copying the failure config to `$DHCP_FAILURE_CONFIG` and `$DHCP_FAILURE_CONFIG_MAIN`" +X cp "$DHCP_CONFIG" "$DHCP_FAILURE_CONFIG" +X cp "$DHCP_CONFIG_MAIN" "$DHCP_FAILURE_CONFIG_MAIN" +X cp "$DHCP_CONFIG_BAK" "$DHCP_CONFIG" +X cp "$DHCP_CONFIG_MAIN_BAK" "$DHCP_CONFIG_MAIN" +X systemctl restart dnsmasq +X unlock_exit $result $lock $locked +fi +rm "$DHCP_CONFIG_BAK" +rm "$DHCP_CONFIG_MAIN_BAK" +unlock_exit $result $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/dnsmasq.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/dnsmasq.sh': 'MD5 check failed' + ) << \SHAR_EOF +d603da3043a61bea911e21fb4da8ded0 cloud_scripts/opt/cloud/bin/dnsmasq.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/dnsmasq.sh'` -ne 4359 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' is not 4359" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_dhcp.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_dhcp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_dhcp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_dhcp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_dhcp.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2P@96YT2!N;W0@ +M:6X@7,Z"B`@("`@("`@("`@(')E;6]V95]K97ES+F%D9"AK +M97DI"@H@("`@("`@(&9O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_dhcp.py': 'MD5 check failed' + ) << \SHAR_EOF +9b17e95a8fcb1cf185c9e74cc6ddecca cloud_scripts/opt/cloud/bin/cs_dhcp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_dhcp.py'` -ne 1533 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_dhcp.py' is not 1533" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_cmdline.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_cmdline.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_cmdline.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, cmdline): +X if 'redundant_router' in cmdline['cmd_line']: +X cmdline['cmd_line']['redundant_router'] = "true" +X else: +X cmdline['cmd_line']['redundant_router'] = "false" +X dbag['config'] = cmdline['cmd_line'] +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_cmdline.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_cmdline.py': 'MD5 check failed' + ) << \SHAR_EOF +a6290582c86832c4c94985580ceda8e5 cloud_scripts/opt/cloud/bin/cs_cmdline.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_cmdline.py'` -ne 1045 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' is not 1045" + fi +fi +# ============= cloud_scripts/root/reconfigLB.sh ============== +if test ! -d 'cloud_scripts/root'; then + mkdir 'cloud_scripts/root' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/root." +else ${echo} "x - failed to create directory cloud_scripts/root." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/root/reconfigLB.sh' +then +${echo} "x - SKIPPING cloud_scripts/root/reconfigLB.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/reconfigLB.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/reconfigLB.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +ret=0 +X +new_config=$1 +X +# save previous state +X mv /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy.cfg.old +X +X mv $new_config /etc/haproxy/haproxy.cfg +X if haproxy -p /var/run/haproxy.pid -f /etc/haproxy/haproxy.cfg -sf $(cat /var/run/haproxy.pid); then +X logger -t cloud "New haproxy instance successfully loaded, stopping previous one." +X ret=0 +X else +X logger -t cloud "New instance failed to start, resuming previous one." +X mv /etc/haproxy/haproxy.cfg $new_config +X mv /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg +X haproxy -p /var/run/haproxy.pid -f /etc/haproxy/haproxy.cfg -sf $(cat /var/run/haproxy.pid) +X ret=1 +X fi +X +exit $ret +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/reconfigLB.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/root/reconfigLB.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/reconfigLB.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/reconfigLB.sh': 'MD5 check failed' + ) << \SHAR_EOF +d73e1491560b810ac47d1aaeb2b466ba cloud_scripts/root/reconfigLB.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/reconfigLB.sh'` -ne 1454 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/reconfigLB.sh' is not 1454" + fi +fi +# ============= cloud_scripts/root/monitorServices.py ============== +if test ! -d 'cloud_scripts/root'; then + mkdir 'cloud_scripts/root' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/root." +else ${echo} "x - failed to create directory cloud_scripts/root." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/root/monitorServices.py' +then +${echo} "x - SKIPPING cloud_scripts/root/monitorServices.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/monitorServices.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/monitorServices.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,L('!A=&@*9G)O;2!H96%L=&A?8VAE +M8VMS+G5T:6QI='D@:6UP;W)T(&=E=$AE86QT:$-H96-KWT* +M("`@('!A2`K)UTG*R(@(B`K +M("=;)RMP2LG72<@*R`B("(@*R!M +M2!O;F4@<&ED(&]R +M(&YO=`H@("`@:68@97AI=%-T871U6EN9R!F97<@;6]R92!T:6UEPH@("`@("`@("`@("`@("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EWT@(U-K:7`@WT*("`@(&9A:6QI;F=#:&5C:W,@/2!;70H@ +M("`@:68@8VAE8VM4>7!E(#T](")B87-I8R(Z"B`@("`@("`@;6]N:71297-U +M;'0L(&9A:6QI;F=#:&5C:W,@/2!M;VYI=%!R;V-E&-L=61E(#T@ +M:&-?9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K&-L=61E +M9%]H96%L=&A?8VAE8VMS(B!I;B!H8U]D871A(&5L7!E*0H@("`@("`@("`@("`@("`@:68@;&5N*')E="D@/3T@,#H*("`@("`@ +M("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@("`@("`@:68@(G-U +M8V-E7,N87)G=BD@/3T@,CH*("`@("`@("!I9B!S>7,N87)G=ELQ72`]/2`B +M861V86YC960B.@H@("`@("`@("`@("!M86EN*")A9'9A;F-E9"(I"B`@("`@ +M("`@96QI9B!S>7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@("`@("!M +M86EN*")B87-I8R(I"B`@("`@("`@96QS93H*("`@("`@("`@("`@<')I;G1D +M*")%7!E(&]F('1E7,N87)G=BD* +M("`@(&5L/dev/null 2>&1 || ${echo} 'cloud_scripts/root/monitorServices.py': 'MD5 check failed' + ) << \SHAR_EOF +d46009a10f68b7f2c57e43e215cba41c cloud_scripts/root/monitorServices.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/monitorServices.py'` -ne 12747 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/monitorServices.py' is not 12747" + fi +fi +# ============= cloud_scripts/root/health_checks/iptables_check.py ============== +if test ! -d 'cloud_scripts/root/health_checks'; then + mkdir 'cloud_scripts/root/health_checks' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/root/health_checks." +else ${echo} "x - failed to create directory cloud_scripts/root/health_checks." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/iptables_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/iptables_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/iptables_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/iptables_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W'!E8W1E9"`](%M="B`@("`@("`@9&5S=$EP(#T@<&]R=$9O'0L('-R8U!O2!I;B!I<%1A8FQE4QI'!E8W1E9#H*("`@("`@("`@("`@("`@("`@ +M("!I9B!I<%1A8FQE16YT'!E8W1E9$5N=')Y*2`]/2`M,3H* +M("`@("`@("`@("`@("`@("`@("`@("`@9F]U;F1!;&P@/2!&86QS90H@("`@ +M("`@("`@("`@("`@("`@("`@("!B4QI +M/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/iptables_check.py': 'MD5 check failed' + ) << \SHAR_EOF +36d30e9b9ff7842db6472b1f063bb076 cloud_scripts/root/health_checks/iptables_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/iptables_check.py'` -ne 3349 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/iptables_check.py' is not 3349" + fi +fi +# ============= cloud_scripts/root/health_checks/memory_usage_check.py ============== +if test ! -d 'cloud_scripts/root/health_checks'; then + mkdir 'cloud_scripts/root/health_checks' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/root/health_checks." +else ${echo} "x - failed to create directory cloud_scripts/root/health_checks." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/memory_usage_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/memory_usage_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/memory_usage_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/memory_usage_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W$UE;6]R>55S86=E(ETI"B`@("!C;60@/2`B9G)E92!\(&%W:R`G1DY2(#T] +M(#(@>R!P2!5$UE;6]R>55S86=E*2`K("(E(@H@("`@("`@("`@("!E>&ET*#$I"B`@ +M("`@("`@<')I;G0@(DUE;6]R>2!5/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/memory_usage_check.py': 'MD5 check failed' + ) << \SHAR_EOF +1d0f74928584f4e36af8d1d726fac4a4 cloud_scripts/root/health_checks/memory_usage_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/memory_usage_check.py'` -ne 1966 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/memory_usage_check.py' is not 1966" + fi +fi +# ============= cloud_scripts/root/health_checks/haproxy_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/haproxy_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/haproxy_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/haproxy_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/haproxy_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&-O;FXH +M:&%P41A=&$L(&AA0V9G4V5C=&EO;G,I.@H@("`@:68@(FUA>&-O;FXB +M(&EN(&AA<')O>'E$871A(&%N9"`B;6%X8V]N;B(@:6X@:&%#9F=396-T:6]N +M41A=&%;(FUA>&-O;FXB +M72`A/2!H84-F9U-E8W1I;VYS6R)G;&]B86PB75LB;6%X8V]N;B)=6S!=+G-T +M'E$871A +M+"!H84-F9U-E8W1I;VYS*3H*("`@(&-O41A=&$Z"B`@("`@("`@'!E8W1E9"`Z("(@*R!L8E-E8ULB86QG +M;W)I=&AM(ET@*R!<"B`@("`@("`@("`@("`@("`@("`@("`@("`@(B!B=70@ +M9F]U;F0@(B`K(&-F9U-E8W1I;VY;(F)A;&%N8V4B75LP72`K(")<;B(*("`@ +M("`@("`@("`@("`@("`@("!C;W)R96-T(#T@1F%L'!E8W1E9%-E'!E8W1E9%-E"!C;VX@86YD(&5A8V@@;&]A +M9"!B86QA;F-I;F<@41A=&$@/2!G971(96%L=&A#:&5C:W-$ +M871A*")H87!R;WAY1&%T82(I"B`@("!I9B!H87!R;WAY1&%T82!I'DN8V9G +M(BP@)W(G*2!A2]H87!R +M;WAY+F-F9R(*("`@("`@("!E>&ET*#$I"@H@("`@:&%#9F=396-T:6]NWT*("`@("`@("`@("`@8V]N=&EN=64*"B`@("`@("`@ +M:68@8W5R$-O;FX@ +M/2!C:&5C:TUA>&-O;FXH:&%P41A=&%;,%TL(&AA0V9G4V5C=&EO;G,I +M"B`@("!C:&5C:TQB4G5L97,@/2!C:&5C:TQO861"86QA;F-E*&AA<')O>'E$ +M871A+"!H84-F9U-E8W1I;VYS*0H*("`@(&EF(&-H96-K36%X0V]N;B!A;F0@ +M8VAE8VM,8E)U;&5S.@H@("`@("`@('!R:6YT(")!;&P@8VAE8VMS('!A&ET*#$I"@H* +M:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH*("`@(&EF(&QE;BAS>7,N87)G +M=BD@/3T@,B!A;F0@/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/haproxy_check.py': 'MD5 check failed' + ) << \SHAR_EOF +a6a55e4accdf61929c52391235dea744 cloud_scripts/root/health_checks/haproxy_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/haproxy_check.py'` -ne 5274 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/haproxy_check.py' is not 5274" + fi +fi +# ============= cloud_scripts/root/health_checks/router_version_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/router_version_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/router_version_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/router_version_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/router_version_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O +M'!E8W1E9#H@(B`K(%P*("`@("`@ +M("`@("`@("`@("`@97AP96-T960@*R`B+"!F;W5N9#H@(B`K(&9O=6YD"B`@ +M("`@("`@("`@('1E;7!L871E5F5R'!E8W1E +M9"`](&1A=&%;(G-C'!E8W1E9#H@(B`K(%P*("`@("`@ +M("`@("`@("`@("`@97AP96-T960@*R`B+"!F;W5N9#H@(B`K(&9O=6YD"B`@ +M("`@("`@("`@('-C/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/router_version_check.py': 'MD5 check failed' + ) << \SHAR_EOF +408778f28fd8559df294e18256af1f0b cloud_scripts/root/health_checks/router_version_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/router_version_check.py'` -ne 2773 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/router_version_check.py' is not 2773" + fi +fi +# ============= cloud_scripts/root/health_checks/utility/sharedFunctions.py ============== +if test ! -d 'cloud_scripts/root/health_checks/utility'; then + mkdir 'cloud_scripts/root/health_checks/utility' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/root/health_checks/utility." +else ${echo} "x - failed to create directory cloud_scripts/root/health_checks/utility." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/utility/sharedFunctions.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/utility/sharedFunctions.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import json +X +X +def getHealthChecksData(additionalDataKey=None): +X with open('/root/health_checks_data.json', 'r') as hc_data_file: +X hc_data = json.load(hc_data_file) +X +X # If no specific key is requested return all the data as JSON +X if additionalDataKey is None: +X return hc_data +X +X if additionalDataKey not in hc_data["health_checks_config"]: +X return None +X +X data = hc_data["health_checks_config"][additionalDataKey].strip().split(";") +X addData = [] +X for line in data: +X line = line.strip() +X if len(line) == 0: +X continue +X entries = line.split(',') +X d = {} +X for entry in entries: +X entry = entry.strip() +X if len(entry) == 0: +X continue +X keyVal = entry.split("=") +X if len(keyVal) == 2: +X d[keyVal[0].strip()] = keyVal[1].strip() +X if len(d) > 0: +X addData.append(d) +X +X return addData +X +X +def formatPort(portStart, portEnd, delim="-"): +X return portStart if portStart == portEnd else portStart + delim + portEnd +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/health_checks/utility/sharedFunctions.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/utility/sharedFunctions.py': 'MD5 check failed' + ) << \SHAR_EOF +4fa10a419db9715b34c7037bce5e6fe8 cloud_scripts/root/health_checks/utility/sharedFunctions.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/utility/sharedFunctions.py'` -ne 1865 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' is not 1865" + fi +fi +# ============= cloud_scripts/root/health_checks/utility/__init__.py ============== +if test ! -d 'cloud_scripts/root/health_checks/utility'; then + mkdir 'cloud_scripts/root/health_checks/utility' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/root/health_checks/utility." +else ${echo} "x - failed to create directory cloud_scripts/root/health_checks/utility." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/utility/__init__.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/utility/__init__.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/utility/__init__.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/utility/__init__.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/utility/__init__.py': 'MD5 check failed' + ) << \SHAR_EOF +ea0b11e040da094dd4f5628b467d5d88 cloud_scripts/root/health_checks/utility/__init__.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/utility/__init__.py'` -ne 864 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/utility/__init__.py' is not 864" + fi +fi +# ============= cloud_scripts/root/health_checks/disk_space_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/disk_space_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/disk_space_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/disk_space_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/disk_space_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O +MWT*("`@(&EF(&5N=')I97,@:7,@;F]T($YO;F4@86YD +M(&QE;BAE;G1R:65S*2`]/2`Q.@H@("`@("`@(&1A=&$@/2!E;G1R:65S6S!= +M"@H@("`@:68@(FUI;D1I/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/disk_space_check.py': 'MD5 check failed' + ) << \SHAR_EOF +9bbb07b130e3946c35263c2e970b59ba cloud_scripts/root/health_checks/disk_space_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/disk_space_check.py'` -ne 1626 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/disk_space_check.py' is not 1626" + fi +fi +# ============= cloud_scripts/root/health_checks/gateways_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/gateways_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/gateways_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/gateways_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/gateways_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,B*0H@("`@:68@9W=S(&ES($YO;F4@86YD(&QE;BAG=W,I(#T](#`Z"B`@ +M("`@("`@<')I;G0@(DYO(&=A=&5W87ES(&1A=&$@879A:6QA8FQE+"!S:VEP +M<&EN9R(*("`@("`@("!E>&ET*#`I"@H@("`@=6YR96%C:&%B;&5'871E5V%Y +M7,N87!P +M96YD*&=W*0H*("`@(&EF(&QE;BAU;G)E86-H86)L94=A=&5787ES*2`]/2`P +M.@H@("`@("`@('!R:6YT(")!;&P@(B`K('-T7,* +M("`@("`@("!E>&ET*#$I"@H*:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH* +M("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A;F0@/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/gateways_check.py': 'MD5 check failed' + ) << \SHAR_EOF +d1715f65dfe24b77c489d24fc1717bc9 cloud_scripts/root/health_checks/gateways_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/gateways_check.py'` -ne 1869 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/gateways_check.py' is not 1869" + fi +fi +# ============= cloud_scripts/root/health_checks/__init__.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/__init__.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/__init__.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/__init__.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/health_checks/__init__.py' && +#!/usr/bin/python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# Needed to expose utility as package outside for monitorServices.py. +# This directory should only contain executables for health checks. +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/__init__.py' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/root/health_checks/__init__.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/health_checks/__init__.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/__init__.py': 'MD5 check failed' + ) << \SHAR_EOF +fb151d74c97d6b3926d6b7a48eea3e56 cloud_scripts/root/health_checks/__init__.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/__init__.py'` -ne 942 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/__init__.py' is not 942" + fi +fi +# ============= cloud_scripts/root/health_checks/dns_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/dns_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/dns_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/dns_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/dns_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I"@H@("`@=VET:"!O<&5N*"/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/dns_check.py': 'MD5 check failed' + ) << \SHAR_EOF +b3192e74a4e52893fdeca4850eb096f4 cloud_scripts/root/health_checks/dns_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/dns_check.py'` -ne 1972 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/dns_check.py' is not 1972" + fi +fi +# ============= cloud_scripts/root/health_checks/cpu_usage_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/cpu_usage_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/cpu_usage_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/cpu_usage_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/cpu_usage_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W$-P=55S86=E(ETI"B`@("!C;60@/2`B=&]P("UB +M("UN,B`M<"`Q('P@9F=R97`@7")#<'4H7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@ +((&UA:6XH*0HR +` +end +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/cpu_usage_check.py' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/root/health_checks/cpu_usage_check.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/health_checks/cpu_usage_check.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/cpu_usage_check.py': 'MD5 check failed' + ) << \SHAR_EOF +faa54497a494f763c8f1a5a4d9b49c4f cloud_scripts/root/health_checks/cpu_usage_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/cpu_usage_check.py'` -ne 2078 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/cpu_usage_check.py' is not 2078" + fi +fi +# ============= cloud_scripts/root/health_checks/dhcp_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/dhcp_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/dhcp_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/dhcp_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/dhcp_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I"@H@("`@=VET:"!O<&5N*"'0G+"`G +M2`]($9A;'-E"B`@("`@("`@9F]R(&AO'0B"B`@("`@("`@97AI="@P*0H*"FEF(%]?;F%M +M95]?(#T](")?7VUA:6Y?7R(Z"B`@("!I9B!L96XH/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/dhcp_check.py': 'MD5 check failed' + ) << \SHAR_EOF +20e7a36b29f4160ae3e5814f042a8242 cloud_scripts/root/health_checks/dhcp_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/dhcp_check.py'` -ne 2386 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/dhcp_check.py' is not 2386" + fi +fi +# ============= cloud_scripts/root/func.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/func.sh' +then +${echo} "x - SKIPPING cloud_scripts/root/func.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/func.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/func.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# Only one lock is allowed: biglock +X +# getLockFile() parameters +# $1 lock filename +# $2 timeout seconds +X +#set -x +X +getCurrLock() { +X result=`ls $__LOCKDIR/*-$1.lock 2>/dev/null | head -n1` +X while [ $? -ne 0 ] +X do +X result=`ls $__LOCKDIR/*-$1.lock 2>/dev/null| head -n1` +X done +X echo $result +} +X +getLockFile() { +X lock=$1 +X +X __locked=0 +X __TS=`date +%s%N` +X __LOCKDIR="/tmp" +X __LOCKFILE="$__LOCKDIR/$__TS-$$-$lock.lock" +X +X if [ $2 ] +X then +X __TIMEOUT=$2 +X else +X __TIMEOUT=30 +X fi +X +X if [ -e $__LOCKFILE ] +X then +X logger -t cloud "Process $0 pid $$ want to get ECLUSIVE LOCK $lock RECURSIVELY!" +X psline=`ps u $$` +X logger -t cloud "Failed job detail: $psline" +X echo 0 +X return +X fi +X +X psline=`ps u $$` +X echo $psline > $__LOCKFILE +X if [ ! -e $__LOCKFILE ] +X then +X return +X fi +X +X for i in `seq 1 $(($__TIMEOUT * 10))` +X do +X currlock=$(getCurrLock $lock) +X if [ $currlock -ef $__LOCKFILE ] +X then +X __locked=1 +X break +X fi +X +X sleep 0.1 +X if [ $((i % 10)) -eq 0 ] +X then +X logger -t cloud "Process $0 pid $$ waiting for the lock $lock for another 1 second" +X fi +X done +X if [ $__locked -ne 1 ] +X then +X logger -t cloud "fail to acquire the lock $lock for process $0 pid $$ after $__TIMEOUT seconds time out!" +X cmd=`cat $currlock 2>/dev/null` +X if [ $? -eq 0 ] +X then +X logger -t cloud "waiting for process: $cmd" +X else +X logger -t cloud "didn't get info about process who we're waiting for" +X fi +X psline=`ps u $$` +X logger -t cloud "Failed job detail: $psline" +X rm $__LOCKFILE +X fi +X echo $__locked +} +X +# releaseLockFile() parameters +# $1 lock filename +# $2 locked(1) or not(0) +releaseLockFile() { +X __LOCKDIR="/tmp" +X __LOCKFILE="$__LOCKDIR/*-$$-$1.lock" +X __locked=$2 +X if [ "$__locked" == "1" ] +X then +X rm $__LOCKFILE +X fi +} +X +# releaseLockFile() parameters +# $1 exit value +# $2 lock filename +# $3 locked(1) or not(0) +unlock_exit() { +X releaseLockFile $2 $3 +X exit $1 +} +X +# calcuate the ip & network mask +rangecalc(){ +X local IFS='.' +X local -a oct mask ip +X +X read -ra oct <<<"$1" +X read -ra mask <<<"$2" +X for i in {0..3} +X do +X ip+=( "$(( oct[i] & mask[i] ))" ) +X done +X echo "${ip[*]}" +} +X +#get cidr of the nic +getcidr(){ +X local dev=$1 +X local mask=`ifconfig $dev|grep "Mask"|cut -d ":" -f 4` +X local cidrsize=`ip addr show $dev|grep inet|head -n 1|awk '{print $2}'|cut -d '/' -f 2` +X local ipaddr=`ip addr show $dev|grep inet|head -n 1|awk '{print $2}'|cut -d '/' -f 1` +X local base=$(rangecalc $ipaddr $mask) +X echo $base/$cidrsize +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/func.sh' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/root/func.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/func.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/func.sh': 'MD5 check failed' + ) << \SHAR_EOF +89141bce2eaa74a4a9a9788cae397be4 cloud_scripts/root/func.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/func.sh'` -ne 3567 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/func.sh' is not 3567" + fi +fi +# ============= cloud_scripts/root/clearUsageRules.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/clearUsageRules.sh' +then +${echo} "x - SKIPPING cloud_scripts/root/clearUsageRules.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/clearUsageRules.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/clearUsageRules.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +# clearUsageRules.sh - remove iptable rules for removed public interfaces +# @VERSION@ +X +if [ -f /root/removedVifs ] +then +X var=`cat /root/removedVifs` +X # loop through even vif to be cleared +X for i in $var; do +X # Make sure vif doesn't exist +X if [ ! -f /sys/class/net/$i ] +X then +X # remove rules +X iptables -D NETWORK_STATS -i eth0 -o $i > /dev/null; +X iptables -D NETWORK_STATS -i $i -o eth0 > /dev/null; +X iptables -D NETWORK_STATS -o $i ! -i eth0 -p tcp > /dev/null; +X iptables -D NETWORK_STATS -i $i ! -o eth0 -p tcp > /dev/null; +X fi +X done +rm /root/removedVifs +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/clearUsageRules.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/root/clearUsageRules.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/clearUsageRules.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/clearUsageRules.sh': 'MD5 check failed' + ) << \SHAR_EOF +f176fc60b3a7b07a47482d68528bb460 cloud_scripts/root/clearUsageRules.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/clearUsageRules.sh'` -ne 1461 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/clearUsageRules.sh' is not 1461" + fi +fi +# ============= cloud_scripts/var/www/html/latest/.htaccess ============== +if test ! -d 'cloud_scripts/var'; then + mkdir 'cloud_scripts/var' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/var." +else ${echo} "x - failed to create directory cloud_scripts/var." + exit 1 +fi +fi +if test ! -d 'cloud_scripts/var/www'; then + mkdir 'cloud_scripts/var/www' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/var/www." +else ${echo} "x - failed to create directory cloud_scripts/var/www." + exit 1 +fi +fi +if test ! -d 'cloud_scripts/var/www/html'; then + mkdir 'cloud_scripts/var/www/html' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/var/www/html." +else ${echo} "x - failed to create directory cloud_scripts/var/www/html." + exit 1 +fi +fi +if test ! -d 'cloud_scripts/var/www/html/latest'; then + mkdir 'cloud_scripts/var/www/html/latest' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/var/www/html/latest." +else ${echo} "x - failed to create directory cloud_scripts/var/www/html/latest." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/latest/.htaccess' +then +${echo} "x - SKIPPING cloud_scripts/var/www/html/latest/.htaccess (file already exists)" + +else +${echo} "x - extracting cloud_scripts/var/www/html/latest/.htaccess (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/latest/.htaccess' && +Options +FollowSymLinks +RewriteEngine On +X +#http:///latest/user-data and .../user-data/ (both yield user-data file) +#http:///latest/meta-data and .../meta-data/ (dir listing of meta-data) +RewriteRule ^user-data/?$ ../userdata/%{REMOTE_ADDR}/user-data [L,NC,QSA] +RewriteRule ^meta-data/?$ ../metadata/%{REMOTE_ADDR}/meta-data [L,NC,QSA] +X +#http:///latest/foo and .../foo/ (yield metadata/$IP/foo) +#are these used? +RewriteRule ^availability-zone/?$ ../metadata/%{REMOTE_ADDR}/availability-zone [L,NC,QSA] +RewriteRule ^cloud-identifier/?$ ../metadata/%{REMOTE_ADDR}/cloud-identifier [L,NC,QSA] +RewriteRule ^instance-id/?$ ../metadata/%{REMOTE_ADDR}/instance-id [L,NC,QSA] +RewriteRule ^local-hostname/?$ ../metadata/%{REMOTE_ADDR}/local-hostname [L,NC,QSA] +RewriteRule ^local-ipv4/?$ ../metadata/%{REMOTE_ADDR}/local-ipv4 [L,NC,QSA] +RewriteRule ^public-hostname/?$ ../metadata/%{REMOTE_ADDR}/public-hostname [L,NC,QSA] +RewriteRule ^public-ipv4/?$ ../metadata/%{REMOTE_ADDR}/public-ipv4 [L,NC,QSA] +RewriteRule ^public-keys/?$ ../metadata/%{REMOTE_ADDR}/public-keys [L,NC,QSA] +RewriteRule ^service-offering/?$ ../metadata/%{REMOTE_ADDR}/service-offering [L,NC,QSA] +RewriteRule ^vm-id/?$ ../metadata/%{REMOTE_ADDR}/vm-id [L,NC,QSA] +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/latest/.htaccess' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/var/www/html/latest/.htaccess' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/var/www/html/latest/.htaccess failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/latest/.htaccess': 'MD5 check failed' + ) << \SHAR_EOF +b20d7331940666e4f160df0a03678813 cloud_scripts/var/www/html/latest/.htaccess +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/latest/.htaccess'` -ne 1425 && \ + ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/latest/.htaccess' is not 1425" + fi +fi +# ============= cloud_scripts/var/www/html/userdata/.htaccess ============== +if test ! -d 'cloud_scripts/var/www/html/userdata'; then + mkdir 'cloud_scripts/var/www/html/userdata' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/var/www/html/userdata." +else ${echo} "x - failed to create directory cloud_scripts/var/www/html/userdata." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/userdata/.htaccess' +then +${echo} "x - SKIPPING cloud_scripts/var/www/html/userdata/.htaccess (file already exists)" + +else +${echo} "x - extracting cloud_scripts/var/www/html/userdata/.htaccess (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/userdata/.htaccess' && +Options -Indexes +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/userdata/.htaccess' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/var/www/html/userdata/.htaccess' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/var/www/html/userdata/.htaccess failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/userdata/.htaccess': 'MD5 check failed' + ) << \SHAR_EOF +7eb825c9c5f32d7efe110c8d7ed402dc cloud_scripts/var/www/html/userdata/.htaccess +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/userdata/.htaccess'` -ne 17 && \ + ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/userdata/.htaccess' is not 17" + fi +fi +# ============= cloud_scripts/etc/ipsec.conf ============== +if test ! -d 'cloud_scripts/etc'; then + mkdir 'cloud_scripts/etc' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/etc." +else ${echo} "x - failed to create directory cloud_scripts/etc." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/ipsec.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/ipsec.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.conf' && +# ipsec.conf - strongSwan IPsec configuration file +X +config setup +X +include /etc/ipsec.d/*.conf +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/ipsec.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/ipsec.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.conf': 'MD5 check failed' + ) << \SHAR_EOF +da4dd5d331eed3e64a528dc648aa7cae cloud_scripts/etc/ipsec.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.conf'` -ne 94 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.conf' is not 94" + fi +fi +# ============= cloud_scripts/etc/systemd/journald.conf ============== +if test ! -d 'cloud_scripts/etc'; then + mkdir 'cloud_scripts/etc' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/etc." +else ${echo} "x - failed to create directory cloud_scripts/etc." + exit 1 +fi +fi +if test ! -d 'cloud_scripts/etc/systemd'; then + mkdir 'cloud_scripts/etc/systemd' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/etc/systemd." +else ${echo} "x - failed to create directory cloud_scripts/etc/systemd." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/journald.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/journald.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/journald.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/journald.conf' && +[Journal] +Compress=yes +SystemMaxUse=40M +SystemMaxFileSize=10M +RuntimeMaxUse=20M +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/journald.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/journald.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/journald.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/journald.conf': 'MD5 check failed' + ) << \SHAR_EOF +ea3c97c4a558fbfdf53304f77275ef8a cloud_scripts/etc/systemd/journald.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/journald.conf'` -ne 80 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/journald.conf' is not 80" + fi +fi +# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service ============== +if test ! -d 'cloud_scripts/etc/systemd'; then + mkdir 'cloud_scripts/etc/systemd' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/etc/systemd." +else ${echo} "x - failed to create directory cloud_scripts/etc/systemd." + exit 1 +fi +fi +if test ! -d 'cloud_scripts/etc/systemd/system'; then + mkdir 'cloud_scripts/etc/systemd/system' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/etc/systemd/system." +else ${echo} "x - failed to create directory cloud_scripts/etc/systemd/system." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service +M[[N_6U5N:71="D1E/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service': 'MD5 check failed' + ) << \SHAR_EOF +58d4e646ee66ac7c470796bd6ce9e2a6 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service'` -ne 156 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service' is not 156" + fi +fi +# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service ============== +if test ! -d 'cloud_scripts/etc/systemd/system'; then + mkdir 'cloud_scripts/etc/systemd/system' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/etc/systemd/system." +else ${echo} "x - failed to create directory cloud_scripts/etc/systemd/system." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service +M[[N_6U5N:71="D1E/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service': 'MD5 check failed' + ) << \SHAR_EOF +027a172fad275171647740477b78ca93 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service'` -ne 143 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service' is not 143" + fi +fi +# ============= cloud_scripts/etc/systemd/system/cloud.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud.service' && +[Unit] +Description=CloudStack Agent service +After=cloud-early-config.service network.target cloud-postinit.service local-fs.target +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=simple +WorkingDirectory=/usr/local/cloud/systemvm +ExecStart=/usr/local/cloud/systemvm/_run.sh +Restart=on-failure +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/cloud.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud.service': 'MD5 check failed' + ) << \SHAR_EOF +b7eb67763e7d694ed98758faef961ac6 cloud_scripts/etc/systemd/system/cloud.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud.service'` -ne 298 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud.service' is not 298" + fi +fi +# ============= cloud_scripts/etc/systemd/system/open-vm-tools.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/open-vm-tools.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/open-vm-tools.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/open-vm-tools.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/open-vm-tools.service +M[[N_6U5N:71="D1E&5C4W1A/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/open-vm-tools.service': 'MD5 check failed' + ) << \SHAR_EOF +10af19a17cd3ee299f08c46bace0f56f cloud_scripts/etc/systemd/system/open-vm-tools.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/open-vm-tools.service'` -ne 280 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/open-vm-tools.service' is not 280" + fi +fi +# ============= cloud_scripts/etc/systemd/system/baremetal-vr.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/baremetal-vr.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/baremetal-vr.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/baremetal-vr.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/baremetal-vr.service' && +[Unit] +Description=CloudStack Baremetal VR service +After=network.target local-fs.target +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=simple +WorkingDirectory=/opt/cloud/bin +ExecStart=/usr/bin/python /opt/cloud/bin/baremetal-vr.py +Restart=on-failure +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/baremetal-vr.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/baremetal-vr.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/baremetal-vr.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/baremetal-vr.service': 'MD5 check failed' + ) << \SHAR_EOF +9fc2a325a709e7cf9ae4d4ec8b7e692a cloud_scripts/etc/systemd/system/baremetal-vr.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/baremetal-vr.service'` -ne 257 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/baremetal-vr.service' is not 257" + fi +fi +# ============= cloud_scripts/etc/systemd/system/xe-daemon.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/xe-daemon.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/xe-daemon.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/xe-daemon.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/xe-daemon.service +M[[N_6U5N:71="D1E&5N+FUO=6YT"D)E9F]R93UN971W;W)K+G1A +M2UC;VYF:6&5C +M4W1A&5C4W1A3UM=6QT:2UU/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/xe-daemon.service': 'MD5 check failed' + ) << \SHAR_EOF +51e30000a8c2d2a91ba1a372bc40a628 cloud_scripts/etc/systemd/system/xe-daemon.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/xe-daemon.service'` -ne 398 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/xe-daemon.service' is not 398" + fi +fi +# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service +M[[N_6U5N:71="D1E5]D865M;VX@+6X*"EM);G-T86QL70I786YT961">3UM=6QT:2UU +*/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service': 'MD5 check failed' + ) << \SHAR_EOF +b1d4d295d2f3dff1ed1e13835e365e86 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service'` -ne 190 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service' is not 190" + fi +fi +# ============= cloud_scripts/etc/systemd/system/cloud-early-config.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-early-config.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-early-config.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-early-config.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-early-config.service' && +[Unit] +Description=CloudStack post-boot patching service using cmdline +DefaultDependencies=no +X +Before=network-pre.target +Wants=network-pre.target +X +Requires=local-fs.target +After=local-fs.target +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=oneshot +ExecStart=/opt/cloud/bin/setup/cloud-early-config +RemainAfterExit=true +TimeoutStartSec=5min +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-early-config.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/cloud-early-config.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-early-config.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-early-config.service': 'MD5 check failed' + ) << \SHAR_EOF +60723561261aa16ed4477c5e02c52bcd cloud_scripts/etc/systemd/system/cloud-early-config.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-early-config.service'` -ne 348 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-early-config.service' is not 348" + fi +fi +# ============= cloud_scripts/etc/systemd/system/cloud-password-server@.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-password-server@.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-password-server@.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' && +[Unit] +Description=Cloud password server on %I +After=network.target local-fs.target +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=simple +WorkingDirectory=/opt/cloud/bin +ExecStart=/opt/cloud/bin/passwd_server_ip.py %I +Restart=on-failure +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-password-server@.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-password-server@.service': 'MD5 check failed' + ) << \SHAR_EOF +3edb13a39635749f16f0579b481c5f25 cloud_scripts/etc/systemd/system/cloud-password-server@.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-password-server@.service'` -ne 244 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' is not 244" + fi +fi +# ============= cloud_scripts/etc/systemd/system/cloud-postinit.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-postinit.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-postinit.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-postinit.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-postinit.service' && +[Unit] +Description=CloudStack post-patching init script +After=cloud-early-config.service network.target local-fs.target +Before=ssh.service +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=oneshot +ExecStart=/opt/cloud/bin/setup/postinit.sh +RemainAfterExit=true +TimeoutStartSec=10min +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-postinit.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/cloud-postinit.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-postinit.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-postinit.service': 'MD5 check failed' + ) << \SHAR_EOF +22b48cd2a7478d27cb155d32cc2610cb cloud_scripts/etc/systemd/system/cloud-postinit.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-postinit.service'` -ne 287 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-postinit.service' is not 287" + fi +fi +# ============= cloud_scripts/etc/iptables/rules ============== +if test ! -d 'cloud_scripts/etc/iptables'; then + mkdir 'cloud_scripts/etc/iptables' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/etc/iptables." +else ${echo} "x - failed to create directory cloud_scripts/etc/iptables." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/rules' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/rules (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/rules (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/rules' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT +-A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT +-A INPUT -i eth0 -p tcp -m state --state NEW --dport 8080 -j ACCEPT +-A INPUT -i eth0 -p tcp -m state --state NEW --dport 80 -j ACCEPT +-A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth0 -o eth2 -j ACCEPT +-A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/rules' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/rules' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/rules failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/rules': 'MD5 check failed' + ) << \SHAR_EOF +e2be370a53cd4e436ce4c298b16ead21 cloud_scripts/etc/iptables/rules +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/rules'` -ne 1731 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/rules' is not 1731" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-consoleproxy ============== +if test ! -d 'cloud_scripts/etc/iptables'; then + mkdir 'cloud_scripts/etc/iptables' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/etc/iptables." +else ${echo} "x - failed to create directory cloud_scripts/etc/iptables." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-consoleproxy' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-consoleproxy (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-consoleproxy (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-consoleproxy' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp --icmp-type 13 -j DROP +-A INPUT -p icmp -j ACCEPT +-A INPUT -i eth1 -p tcp -m state --state NEW -m tcp --dport 3922 -j ACCEPT +-A INPUT -i eth0 -p tcp -m state --state NEW -m tcp --dport 8001 -j ACCEPT +-A INPUT -i eth1 -p tcp -m state --state NEW -m tcp --dport 8001 -j ACCEPT +-A INPUT -i eth2 -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT +-A INPUT -i eth2 -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-consoleproxy' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/iptables-consoleproxy' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-consoleproxy failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-consoleproxy': 'MD5 check failed' + ) << \SHAR_EOF +2840365dad7fe832ea35d8f72a3bfdca cloud_scripts/etc/iptables/iptables-consoleproxy +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-consoleproxy'` -ne 1601 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-consoleproxy' is not 1601" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-router ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-router' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-router (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-router (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-router' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +:FW_EGRESS_RULES - [0:0] +:FW_OUTBOUND - [0:0] +-A INPUT -d 224.0.0.18/32 -j ACCEPT +-A INPUT -d 225.0.0.50/32 -j ACCEPT +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT +-A INPUT -i eth1 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp -m state --state NEW --dport 80 -j ACCEPT +-A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth0 -o eth0 -m state --state NEW -j ACCEPT +-A FORWARD -i eth0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth0 -o eth2 -j FW_OUTBOUND +-A FW_EGRESS_RULES -j ACCEPT +-I FW_OUTBOUND -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FW_OUTBOUND -j FW_EGRESS_RULES +COMMIT +*mangle +:PREROUTING ACCEPT [0:0] +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +-A PREROUTING -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark +-A POSTROUTING -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-router' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/iptables-router' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-router failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-router': 'MD5 check failed' + ) << \SHAR_EOF +aeabe6897f9969f64a87b793deee6500 cloud_scripts/etc/iptables/iptables-router +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-router'` -ne 2348 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-router' is not 2348" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-vpcrouter ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-vpcrouter' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-vpcrouter (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-vpcrouter (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-vpcrouter' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -d 224.0.0.18/32 -j ACCEPT +-A INPUT -d 225.0.0.50/32 -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT +-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT +-A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT +COMMIT +*mangle +:PREROUTING ACCEPT [0:0] +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +-A OUTPUT -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-vpcrouter' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/iptables-vpcrouter' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-vpcrouter failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-vpcrouter': 'MD5 check failed' + ) << \SHAR_EOF +f3e4459f3b0eea8f2de2a6f01ef79866 cloud_scripts/etc/iptables/iptables-vpcrouter +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-vpcrouter'` -ne 1465 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-vpcrouter' is not 1465" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-dhcpsrvr ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-dhcpsrvr (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-dhcpsrvr (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +:FW_EGRESS_RULES - [0:0] +:FW_OUTBOUND - [0:0] +-A INPUT -d 224.0.0.18/32 -j ACCEPT +-A INPUT -d 225.0.0.50/32 -j ACCEPT +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT +-A INPUT -i eth1 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp -m state --state NEW --dport 80 -j ACCEPT +-A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth0 -o eth0 -m state --state NEW -j ACCEPT +-A FORWARD -i eth0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth0 -o eth2 -j FW_OUTBOUND +-A FW_EGRESS_RULES -j ACCEPT +-I FW_OUTBOUND -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FW_OUTBOUND -j FW_EGRESS_RULES +COMMIT +*mangle +:PREROUTING ACCEPT [0:0] +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +-A PREROUTING -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark +-A POSTROUTING -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-dhcpsrvr failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-dhcpsrvr': 'MD5 check failed' + ) << \SHAR_EOF +aeabe6897f9969f64a87b793deee6500 cloud_scripts/etc/iptables/iptables-dhcpsrvr +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-dhcpsrvr'` -ne 2348 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' is not 2348" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-elbvm ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-elbvm' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-elbvm (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-elbvm (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-elbvm' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-elbvm' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/iptables/iptables-elbvm' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-elbvm failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-elbvm': 'MD5 check failed' + ) << \SHAR_EOF +7a950ed86376c0166c53943cdf68ccb2 cloud_scripts/etc/iptables/iptables-elbvm +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-elbvm'` -ne 1256 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-elbvm' is not 1256" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-secstorage ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-secstorage' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-secstorage (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-secstorage (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-secstorage' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +:HTTP - [0:0] +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth3 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -p icmp --icmp-type 13 -j DROP +-A INPUT -p icmp -j ACCEPT +-A INPUT -i eth0 -p tcp -m state --state NEW --dport 3922 -j ACCEPT +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-secstorage' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/iptables/iptables-secstorage' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-secstorage failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-secstorage': 'MD5 check failed' + ) << \SHAR_EOF +d031185b81ee7ee008b80d434d44b61d cloud_scripts/etc/iptables/iptables-secstorage +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-secstorage'` -ne 1375 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-secstorage' is not 1375" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-ilbvm ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-ilbvm' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-ilbvm (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-ilbvm (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-ilbvm' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-ilbvm' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/iptables/iptables-ilbvm' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-ilbvm failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-ilbvm': 'MD5 check failed' + ) << \SHAR_EOF +85129e942bc07d1fb67e0e169238c345 cloud_scripts/etc/iptables/iptables-ilbvm +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-ilbvm'` -ne 1192 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-ilbvm' is not 1192" + fi +fi +# ============= cloud_scripts/etc/iptables/rt_tables_init ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/rt_tables_init' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/rt_tables_init (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/rt_tables_init (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/rt_tables_init' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +# +# reserved values +# +255 local +254 main +253 default +0 unspec +# +# local +# +#1 inr.ruhep +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/rt_tables_init' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/rt_tables_init' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/rt_tables_init failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/rt_tables_init': 'MD5 check failed' + ) << \SHAR_EOF +86477f42d18121a176751c7284251089 cloud_scripts/etc/iptables/rt_tables_init +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/rt_tables_init'` -ne 897 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/rt_tables_init' is not 897" + fi +fi +# ============= cloud_scripts/etc/sysctl.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/sysctl.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/sysctl.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/sysctl.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/sysctl.conf' && +# Kernel sysctl configuration file +# +# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and +# sysctl.conf(5) for more details. +# @VERSION@ +X +# Controls IP packet forwarding +net.ipv4.ip_forward = 1 +X +# Controls source route verification +net.ipv4.conf.default.rp_filter = 0 +X +# Do not accept source routing +net.ipv4.conf.default.accept_source_route = 0 +X +# Respect local interface in ARP interactions +net.ipv4.conf.default.arp_announce = 2 +net.ipv4.conf.default.arp_ignore = 2 +net.ipv4.conf.all.arp_announce = 2 +net.ipv4.conf.all.arp_ignore = 2 +X +# IPSec NETKEY -- avoid bogus redirects +net.ipv4.conf.all.accept_redirects = 0 +net.ipv4.conf.default.accept_redirects = 0 +net.ipv4.conf.all.send_redirects = 0 +net.ipv4.conf.default.send_redirects = 0 +net.ipv4.conf.all.secure_redirects = 0 +net.ipv4.conf.default.secure_redirects = 0 +X +# For smooth transition of the vip address in case of a keepalived failover +net.ipv4.ip_nonlocal_bind = 1 +X +# Controls the System Request debugging functionality of the kernel +kernel.sysrq = 0 +X +# Controls whether core dumps will append the PID to the core filename. +# Useful for debugging multi-threaded applications. +kernel.core_uses_pid = 1 +X +# A better way for the instance to die +kernel.panic = 10 +kernel.panic_on_oops = 1 +vm.panic_on_oom = 1 +X +# Controls the use of TCP syncookies +net.ipv4.tcp_syncookies = 1 +X +# disable tcp time stamps +net.ipv4.tcp_timestamps = 0 +X +net.ipv4.tcp_tw_reuse = 1 +net.ipv4.tcp_max_tw_buckets = 1000000 +net.core.somaxconn = 65535 +net.nf_conntrack_max = 1000000 +net.netfilter.nf_conntrack_max = 1000000 +X +# Disable IPv6 +net.ipv6.conf.all.disable_ipv6 = 1 +net.ipv6.conf.all.forwarding = 0 +net.ipv6.conf.all.accept_ra = 0 +net.ipv6.conf.all.accept_redirects = 0 +net.ipv6.conf.all.autoconf = 0 +X +# Minimum swappiness without disabling it +vm.swappiness=1 +X +# make the kernel more aggressive in reclaiming RAM from the disk and swap caches +vm.vfs_cache_pressure = 200 +X +# try to maintain 'free' memory thereby reducing the size of disk cache, hence reducing swapping. +vm.min_free_kbytes = 20480 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/sysctl.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/sysctl.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/sysctl.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/sysctl.conf': 'MD5 check failed' + ) << \SHAR_EOF +f1cef50b7a8a7cc7a7a24ff08cbea1f8 cloud_scripts/etc/sysctl.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/sysctl.conf'` -ne 2049 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/sysctl.conf' is not 2049" + fi +fi +# ============= cloud_scripts/etc/xl2tpd/xl2tpd.conf ============== +if test ! -d 'cloud_scripts/etc/xl2tpd'; then + mkdir 'cloud_scripts/etc/xl2tpd' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/etc/xl2tpd." +else ${echo} "x - failed to create directory cloud_scripts/etc/xl2tpd." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/xl2tpd/xl2tpd.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/xl2tpd/xl2tpd.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' && +[lns default] +ip range = 10.1.9.2-10.1.9.8 +local ip = 10.1.9.1 +require chap = yes +refuse pap = yes +pppoptfile = /etc/ppp/options.xl2tpd +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/xl2tpd/xl2tpd.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/xl2tpd/xl2tpd.conf': 'MD5 check failed' + ) << \SHAR_EOF +060f03388ae34c64f85a45f47c9f6d48 cloud_scripts/etc/xl2tpd/xl2tpd.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/xl2tpd/xl2tpd.conf'` -ne 139 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' is not 139" + fi +fi +# ============= cloud_scripts/etc/dnsmasq.conf.tmpl ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/dnsmasq.conf.tmpl' +then +${echo} "x - SKIPPING cloud_scripts/etc/dnsmasq.conf.tmpl (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/dnsmasq.conf.tmpl (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/dnsmasq.conf.tmpl' && +# Configuration file for dnsmasq. +# +# Format is one option per line, legal options are the same +# as the long options legal on the command line. See +# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. +X +# Listen on this specific port instead of the standard DNS port +# (53). Setting this to zero completely disables DNS function, +# leaving only DHCP and/or TFTP. +#port=5353 +X +# The following two options make you a better netizen, since they +# tell dnsmasq to filter out queries which the public DNS cannot +# answer, and which load the servers (especially the root servers) +# unnecessarily. If you have a dial-on-demand link they also stop +# these requests from bringing up the link unnecessarily. +X +# Never forward plain names (without a dot or domain part) +domain-needed +# Never forward addresses in the non-routed address spaces. +bogus-priv +X +X +# Uncomment this to filter useless windows-originated DNS requests +# which can trigger dial-on-demand links needlessly. +# Note that (amongst other things) this blocks all SRV requests, +# so don't use it if you use eg Kerberos, SIP, XMMP or Google-talk. +# This option only affects forwarding, SRV records originating for +# dnsmasq (via srv-host= lines) are not suppressed by it. +# filterwin2k +X +# Change this line if you want dns to get its upstream servers from +# somewhere other that /etc/resolv.conf +resolv-file=/etc/dnsmasq-resolv.conf +X +# By default, dnsmasq will send queries to any of the upstream +# servers it knows about and tries to favour servers to are known +# to be up. Uncommenting this forces dnsmasq to try each query +# with each server strictly in the order they appear in +# /etc/resolv.conf +#strict-order +X +# If you don't want dnsmasq to read /etc/resolv.conf or any other +# file, getting its servers from this file instead (see below), then +# uncomment this. +#no-resolv +X +# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv +# files for changes and re-read them then uncomment this. +#no-poll +X +# Add other name servers here, with domain specs if they are for +# non-public domains. +#server=/localnet/192.168.0.1 +X +# Example of routing PTR queries to nameservers: this will send all +# address->name queries for 192.168.3/24 to nameserver 10.1.2.3 +#server=/3.168.192.in-addr.arpa/10.1.2.3 +X +# Add local-only domains here, queries in these domains are answered +# from /etc/hosts or DHCP only. +local=/2.vmops-test.vmops.com/ +X +# Add domains which you want to force to an IP address here. +# The example below send any host in double-click.net to a local +# web-server. +#address=/double-click.net/127.0.0.1 +X +# --address (and --server) work with IPv6 addresses too. +#address=/www.thekelleys.org.uk/fe80::20d:60ff:fe36:f83 +X +# You can control how dnsmasq talks to a server: this forces +# queries to 10.1.2.3 to be routed via eth1 +# server=10.1.2.3@eth1 +X +# and this sets the source (ie local) address used to talk to +# 10.1.2.3 to 192.168.1.1 port 55 (there must be a interface with that +# IP on the machine, obviously). +# server=10.1.2.3@192.168.1.1#55 +X +# If you want dnsmasq to change uid and gid to something other +# than the default, edit the following lines. +#user= +#group= +X +# If you want dnsmasq to listen for DHCP and DNS requests only on +# specified interfaces (and the loopback) give the name of the +# interface (eg eth0) here. +# Repeat the line for more than one interface. +#interface=eth0 +# Or you can specify which interface _not_ to listen on +except-interface=eth1 +except-interface=eth2 +except-interface=lo +# Or which to listen on by address (remember to include 127.0.0.1 if +# you use this.) +#listen-address= +# If you want dnsmasq to provide only DNS service on an interface, +# configure it as shown above, and then use the following line to +# disable DHCP and TFTP on it. +no-dhcp-interface=eth1 +no-dhcp-interface=eth2 +X +# On systems which support it, dnsmasq binds the wildcard address, +# even when it is listening on only some interfaces. It then discards +# requests that it shouldn't reply to. This has the advantage of +# working even when interfaces come and go and change address. If you +# want dnsmasq to really bind only the interfaces it is listening on, +# uncomment this option. About the only time you may need this is when +# running another nameserver on the same machine. +#bind-interfaces +X +# If you don't want dnsmasq to read /etc/hosts, uncomment the +# following line. +#no-hosts +# or if you want it to read another file, as well as /etc/hosts, use +# this. +#addn-hosts=/etc/banner_add_hosts +X +# Set this (and domain: see below) if you want to have a domain +# automatically added to simple names in a hosts-file. +expand-hosts +X +# Set the domain for dnsmasq. this is optional, but if it is set, it +# does the following things. +# 1) Allows DHCP hosts to have fully qualified domain names, as long +# as the domain part matches this setting. +# 2) Sets the "domain" DHCP option thereby potentially setting the +# domain of all systems configured by DHCP +# 3) Provides the domain part for "expand-hosts" +domain=2.vmops-test.vmops.com +X +# Set a different domain for a particular subnet +#domain=wireless.thekelleys.org.uk,192.168.2.0/24 +X +# Same idea, but range rather then subnet +#domain=reserved.thekelleys.org.uk,192.68.3.100,192.168.3.200 +X +# Uncomment this to enable the integrated DHCP server, you need +# to supply the range of addresses available for lease and optionally +# a lease time. If you have more than one network, you will need to +# repeat this for each network on which you want to supply DHCP +# service. +dhcp-range_ip4=10.1.1.1,static +dhcp-range_ip6=::1,static +dhcp-hostsfile=/etc/dhcphosts.txt +X +# This is an example of a DHCP range where the netmask is given. This +# is needed for networks we reach the dnsmasq DHCP server via a relay +# agent. If you don't know what a DHCP relay agent is, you probably +# don't need to worry about this. +#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h +X +# This is an example of a DHCP range which sets a tag, so that +# some DHCP options may be set only for this network. +#dhcp-range=set:red,192.168.0.50,192.168.0.150 +X +# Use this DHCP range only when the tag "green" is set. +#dhcp-range=tag:green,192.168.0.50,192.168.0.150,12h +X +# Specify a subnet which can't be used for dynamic address allocation, +# is available for hosts with matching --dhcp-host lines. Note that +# dhcp-host declarations will be ignored unless there is a dhcp-range +# of some type for the subnet in question. +# In this case the netmask is implied (it comes from the network +# configuration on the machine running dnsmasq) it is possible to give +# an explicit netmask instead. +#dhcp-range=192.168.0.0,static +X +# Enable DHCPv6. Note that the prefix-length does not need to be specified +# and defaults to 64 if missing/ +#dhcp-range=1234::2, 1234::500, 64, 12h +X +# Do Router Advertisements, BUT NOT DHCP for this subnet. +#dhcp-range=1234::, ra-only +X +# Do Router Advertisements, BUT NOT DHCP for this subnet, also try and +# add names to the DNS for the IPv6 address of SLAAC-configured dual-stack +# hosts. Use the DHCPv4 lease to derive the name, network segment and +# MAC address and assume that the host will also have an +# IPv6 address calculated using the SLAAC alogrithm. +#dhcp-range=1234::, ra-names +X +# Do Router Advertisements, BUT NOT DHCP for this subnet. +# Set the lifetime to 46 hours. (Note: minimum lifetime is 2 hours.) +#dhcp-range=1234::, ra-only, 48h +X +# Do DHCP and Router Advertisements for this subnet. Set the A bit in the RA +# so that clients can use SLAAC addresses as well as DHCP ones. +#dhcp-range=1234::2, 1234::500, slaac +X +# Do Router Advertisements and stateless DHCP for this subnet. Clients will +# not get addresses from DHCP, but they will get other configuration information. +# They will use SLAAC for addresses. +#dhcp-range=1234::, ra-stateless +X +# Do stateless DHCP, SLAAC, and generate DNS names for SLAAC addresses +# from DHCPv4 leases. +#dhcp-range=1234::, ra-stateless, ra-names +X +# Do router advertisements for all subnets where we're doing DHCPv6 +# Unless overriden by ra-stateless, ra-names, et al, the router +# advertisements will have the M and O bits set, so that the clients +# get addresses and configuration from DHCPv6, and the A bit reset, so the +# clients don't use SLAAC addresses. +#enable-ra +X +# Supply parameters for specified hosts using DHCP. There are lots +# of valid alternatives, so we will give examples of each. Note that +# IP addresses DO NOT have to be in the range given above, they just +# need to be on the same network. The order of the parameters in these +# do not matter, it's permissible to give name, address and MAC in any +# order. +X +# Always allocate the host with Ethernet address 11:22:33:44:55:66 +# The IP address 192.168.0.60 +#dhcp-host=11:22:33:44:55:66,192.168.0.60 +X +# Always set the name of the host with hardware address +# 11:22:33:44:55:66 to be "fred" +#dhcp-host=11:22:33:44:55:66,fred +X +# Always give the host with Ethernet address 11:22:33:44:55:66 +# the name fred and IP address 192.168.0.60 and lease time 45 minutes +#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m +X +# Give a host with Ethernet address 11:22:33:44:55:66 or +# 12:34:56:78:90:12 the IP address 192.168.0.60. Dnsmasq will assume +# that these two Ethernet interfaces will never be in use at the same +# time, and give the IP address to the second, even if it is already +# in use by the first. Useful for laptops with wired and wireless +# addresses. +#dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.60 +X +# Give the machine which says its name is "bert" IP address +# 192.168.0.70 and an infinite lease +#dhcp-host=bert,192.168.0.70,infinite +X +# Always give the host with client identifier 01:02:02:04 +# the IP address 192.168.0.60 +#dhcp-host=id:01:02:02:04,192.168.0.60 +X +# Always give the host with client identifier "marjorie" +# the IP address 192.168.0.60 +#dhcp-host=id:marjorie,192.168.0.60 +X +# Enable the address given for "judge" in /etc/hosts +# to be given to a machine presenting the name "judge" when +# it asks for a DHCP lease. +#dhcp-host=judge +X +# Never offer DHCP service to a machine whose Ethernet +# address is 11:22:33:44:55:66 +#dhcp-host=11:22:33:44:55:66,ignore +X +# Ignore any client-id presented by the machine with Ethernet +# address 11:22:33:44:55:66. This is useful to prevent a machine +# being treated differently when running under different OS's or +# between PXE boot and OS boot. +#dhcp-host=11:22:33:44:55:66,id:* +X +# Send extra options which are tagged as "red" to +# the machine with Ethernet address 11:22:33:44:55:66 +#dhcp-host=11:22:33:44:55:66,set:red +X +# Send extra options which are tagged as "red" to +# any machine with Ethernet address starting 11:22:33: +#dhcp-host=11:22:33:*:*:*,set:red +X +# Give a fixed IPv6 address and name to client with +# DUID 00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2 +# Note the MAC addresses CANNOT be used to identify DHCPv6 clients. +# Note also the they [] around the IPv6 address are obilgatory. +#dhcp-host=id:00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2, fred, [1234::5] +X +# Ignore any clients which are not specified in dhcp-host lines +# or /etc/ethers. Equivalent to ISC "deny unknown-clients". +# This relies on the special "known" tag which is set when +# a host is matched. +# +# When using bridged networks in ACS this prevents ack to DHCPINFORM etc. request +dhcp-ignore=tag:!known +X +# Send extra options which are tagged as "red" to any machine whose +# DHCP vendorclass string includes the substring "Linux" +#dhcp-vendorclass=set:red,Linux +X +# Send extra options which are tagged as "red" to any machine one +# of whose DHCP userclass strings includes the substring "accounts" +#dhcp-userclass=set:red,accounts +X +# Send extra options which are tagged as "red" to any machine whose +# MAC address matches the pattern. +#dhcp-mac=set:red,00:60:8C:*:*:* +X +# If this line is uncommented, dnsmasq will read /etc/ethers and act +# on the ethernet-address/IP pairs found there just as if they had +# been given as --dhcp-host options. Useful if you keep +# MAC-address/host mappings there for other purposes. +#read-ethers +X +# Send options to hosts which ask for a DHCP lease. +# See RFC 2132 for details of available options. +# Common options can be given to dnsmasq by name: +# run "dnsmasq --help dhcp" to get a list. +# Note that all the common settings, such as netmask and +# broadcast address, DNS server and default route, are given +# sane defaults by dnsmasq. You very likely will not need +# any dhcp-options. If you use Windows clients and Samba, there +# are some options which are recommended, they are detailed at the +# end of this section. +X +# Override the default route supplied by dnsmasq, which assumes the +# router is the same machine as the one running dnsmasq. +#dhcp-option=3,1.2.3.4 +X +# Do the same thing, but using the option name +#dhcp-option=option:router,1.2.3.4 +X +# Override the default route supplied by dnsmasq and send no default +# route at all. Note that this only works for the options sent by +# default (1, 3, 6, 12, 28) the same line will send a zero-length option +# for all other option numbers. +#dhcp-option=3 +X +# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 +#dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5 +X +# Send DHCPv6 option. Note [] around IPv6 addresses. +#dhcp-option=option6:dns-server,[1234::77],[1234::88] +X +# Send DHCPv6 option for namservers as the machine running +# dnsmasq and another. +#dhcp-option=option6:dns-server,[::],[1234::88] +X +# Set the NTP time server address to be the same machine as +# is running dnsmasq +#dhcp-option=42,0.0.0.0 +X +# Set the NIS domain name to "welly" +#dhcp-option=40,welly +X +# Set the default time-to-live to 50 +#dhcp-option=23,50 +X +# Set the "all subnets are local" flag +#dhcp-option=27,1 +X +# Set the domain +dhcp-option=15,"2.vmops-test.vmops.com" +X +# Send the etherboot magic flag and then etherboot options (a string). +#dhcp-option=128,e4:45:74:68:00:00 +#dhcp-option=129,NIC=eepro100 +X +# Specify an option which will only be sent to the "red" network +# (see dhcp-range for the declaration of the "red" network) +# Note that the tag: part must precede the option: part. +#dhcp-option = tag:red, option:ntp-server, 192.168.1.1 +X +# The following DHCP options set up dnsmasq in the same way as is specified +# for the ISC dhcpcd in +# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt +# adapted for a typical dnsmasq installation where the host running +# dnsmasq is also the host running samba. +# you may want to uncomment some or all of them if you use +# Windows clients and Samba. +#dhcp-option=19,0 # option ip-forwarding off +#dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) +#dhcp-option=45,0.0.0.0 # netbios datagram distribution server +#dhcp-option=46,8 # netbios node type +X +# Send an empty WPAD option. This may be REQUIRED to get windows 7 to behave. +#dhcp-option=252,"\n" +X +# Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client +# probably doesn't support this...... +#dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com +X +# Send RFC-3442 classless static routes (note the netmask encoding) +#dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8 +X +# Send vendor-class specific options encapsulated in DHCP option 43. +# The meaning of the options is defined by the vendor-class so +# options are sent only when the client supplied vendor class +# matches the class given here. (A substring match is OK, so "MSFT" +# matches "MSFT" and "MSFT 5.0"). This example sets the +# mtftp address to 0.0.0.0 for PXEClients. +#dhcp-option=vendor:PXEClient,1,0.0.0.0 +X +# Send microsoft-specific option to tell windows to release the DHCP lease +# when it shuts down. Note the "i" flag, to tell dnsmasq to send the +# value as a four-byte integer - that's what microsoft wants. See +# http://technet2.microsoft.com/WindowsServer/en/library/a70f1bb7-d2d4-49f0-96d6-4b7414ecfaae1033.mspx?mfr=true +dhcp-option=vendor:MSFT,2,1i +X +# Send the Encapsulated-vendor-class ID needed by some configurations of +# Etherboot to allow is to recognise the DHCP server. +#dhcp-option=vendor:Etherboot,60,"Etherboot" +X +# Send options to PXELinux. Note that we need to send the options even +# though they don't appear in the parameter request list, so we need +# to use dhcp-option-force here. +# See http://syslinux.zytor.com/pxe.php#special for details. +# Magic number - needed before anything else is recognised +#dhcp-option-force=208,f1:00:74:7e +# Configuration file name +#dhcp-option-force=209,configs/common +# Path prefix +#dhcp-option-force=210,/tftpboot/pxelinux/files/ +# Reboot time. (Note 'i' to send 32-bit value) +#dhcp-option-force=211,30i +X +# Set the boot filename for netboot/PXE. You will only need +# this is you want to boot machines over the network and you will need +# a TFTP server; either dnsmasq's built in TFTP server or an +# external one. (See below for how to enable the TFTP server.) +dhcp-boot=pxelinux.0 +X +# The same as above, but use custom tftp-server instead machine running dnsmasq +#dhcp-boot=pxelinux,server.name,192.168.1.100 +X +# Boot for Etherboot gPXE. The idea is to send two different +# filenames, the first loads gPXE, and the second tells gPXE what to +# load. The dhcp-match sets the gpxe tag for requests from gPXE. +#dhcp-match=set:gpxe,175 # gPXE sends a 175 option. +#dhcp-boot=tag:!gpxe,undionly.kpxe +#dhcp-boot=mybootimage +X +# Encapsulated options for Etherboot gPXE. All the options are +# encapsulated within option 175 +#dhcp-option=encap:175, 1, 5b # priority code +#dhcp-option=encap:175, 176, 1b # no-proxydhcp +#dhcp-option=encap:175, 177, string # bus-id +#dhcp-option=encap:175, 189, 1b # BIOS drive code +#dhcp-option=encap:175, 190, user # iSCSI username +#dhcp-option=encap:175, 191, pass # iSCSI password +X +# Test for the architecture of a netboot client. PXE clients are +# supposed to send their architecture as option 93. (See RFC 4578) +#dhcp-match=peecees, option:client-arch, 0 #x86-32 +#dhcp-match=itanics, option:client-arch, 2 #IA64 +#dhcp-match=hammers, option:client-arch, 6 #x86-64 +#dhcp-match=mactels, option:client-arch, 7 #EFI x86-64 +X +# Do real PXE, rather than just booting a single file, this is an +# alternative to dhcp-boot. +#pxe-prompt="What system shall I netboot?" +# or with timeout before first available action is taken: +#pxe-prompt="Press F8 for menu.", 60 +X +# Available boot services. for PXE. +#pxe-service=x86PC, "Boot from local disk" +X +# Loads /pxelinux.0 from dnsmasq TFTP server. +#pxe-service=x86PC, "Install Linux", pxelinux +X +# Loads /pxelinux.0 from TFTP server at 1.2.3.4. +# Beware this fails on old PXE ROMS. +#pxe-service=x86PC, "Install Linux", pxelinux, 1.2.3.4 +X +# Use bootserver on network, found my multicast or broadcast. +#pxe-service=x86PC, "Install windows from RIS server", 1 +X +# Use bootserver at a known IP address. +#pxe-service=x86PC, "Install windows from RIS server", 1, 1.2.3.4 +X +# If you have multicast-FTP available, +# information for that can be passed in a similar way using options 1 +# to 5. See page 19 of +# http://download.intel.com/design/archives/wfm/downloads/pxespec.pdf +X +X +# Enable dnsmasq's built-in TFTP server +enable-tftp +X +# Set the root directory for files available via FTP. +tftp-root=/opt/tftpboot +X +# Make the TFTP server more secure: with this set, only files owned by +# the user dnsmasq is running as will be send over the net. +#tftp-secure +X +# This option stops dnsmasq from negotiating a larger blocksize for TFTP +# transfers. It will slow things down, but may rescue some broken TFTP +# clients. +#tftp-no-blocksize +X +# Set the boot file name only when the "red" tag is set. +#dhcp-boot=net:red,pxelinux.red-net +X +# An example of dhcp-boot with an external TFTP server: the name and IP +# address of the server are given after the filename. +# Can fail with old PXE ROMS. Overridden by --pxe-service. +#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 +X +# If there are multiple external tftp servers having a same name +# (using /etc/hosts) then that name can be specified as the +# tftp_servername (the third option to dhcp-boot) and in that +# case dnsmasq resolves this name and returns the resultant IP +# addresses in round robin fasion. This facility can be used to +# load balance the tftp load among a set of servers. +#dhcp-boot=/var/ftpd/pxelinux.0,boothost,tftp_server_name +X +# Set the limit on DHCP leases, the default is 150 +dhcp-lease-max=2100 +X +# The DHCP server needs somewhere on disk to keep its lease database. +# This defaults to a sane location, but if you want to change it, use +# the line below. +#dhcp-leasefile=/var/lib/misc/dnsmasq.leases +leasefile-ro +X +# Set the DHCP server to authoritative mode. In this mode it will barge in +# and take over the lease for any client which broadcasts on the network, +# whether it has a record of the lease or not. This avoids long timeouts +# when a machine wakes up on a new network. DO NOT enable this if there's +# the slightest chance that you might end up accidentally configuring a DHCP +# server for your campus/company accidentally. The ISC server uses +# the same option, and this URL provides more information: +# http://www.isc.org/files/auth.html +#dhcp-authoritative +X +# Run an executable when a DHCP lease is created or destroyed. +# The arguments sent to the script are "add" or "del", +# then the MAC address, the IP address and finally the hostname +# if there is one. +#dhcp-script=/bin/echo +X +# Set the cachesize here. +#cache-size=150 +X +# If you want to disable negative caching, uncomment this. +#no-negcache +X +# Normally responses which come form /etc/hosts and the DHCP lease +# file have Time-To-Live set as zero, which conventionally means +# do not cache further. If you are happy to trade lower load on the +# server for potentially stale date, you can set a time-to-live (in +# seconds) here. +#local-ttl= +X +# If you want dnsmasq to detect attempts by Verisign to send queries +# to unregistered .com and .net hosts to its sitefinder service and +# have dnsmasq instead return the correct NXDOMAIN response, uncomment +# this line. You can add similar lines to do the same for other +# registries which have implemented wildcard A records. +#bogus-nxdomain=64.94.110.11 +X +# If you want to fix up DNS results from upstream servers, use the +# alias option. This only works for IPv4. +# This alias makes a result of 1.2.3.4 appear as 5.6.7.8 +#alias=1.2.3.4,5.6.7.8 +# and this maps 1.2.3.x to 5.6.7.x +#alias=1.2.3.0,5.6.7.0,255.255.255.0 +# and this maps 192.168.0.10->192.168.0.40 to 10.0.0.10->10.0.0.40 +#alias=192.168.0.10-192.168.0.40,10.0.0.0,255.255.255.0 +X +# Change these lines if you want dnsmasq to serve MX records. +X +# Return an MX record named "maildomain.com" with target +# servermachine.com and preference 50 +#mx-host=maildomain.com,servermachine.com,50 +X +# Set the default target for MX records created using the localmx option. +#mx-target=servermachine.com +X +# Return an MX record pointing to the mx-target for all local +# machines. +#localmx +X +# Return an MX record pointing to itself for all local machines. +#selfmx +X +# Change the following lines if you want dnsmasq to serve SRV +# records. These are useful if you want to serve ldap requests for +# Active Directory and other windows-originated DNS requests. +# See RFC 2782. +# You may add multiple srv-host lines. +# The fields are ,,,, +# If the domain part if missing from the name (so that is just has the +# service and protocol sections) then the domain given by the domain= +# config option is used. (Note that expand-hosts does not need to be +# set for this to work.) +X +# A SRV record sending LDAP for the example.com domain to +# ldapserver.example.com port 389 +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389 +X +# A SRV record sending LDAP for the example.com domain to +# ldapserver.example.com port 389 (using domain=) +#domain=example.com +#srv-host=_ldap._tcp,ldapserver.example.com,389 +X +# Two SRV records for LDAP, each with different priorities +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1 +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2 +X +# A SRV record indicating that there is no LDAP server for the domain +# example.com +#srv-host=_ldap._tcp.example.com +X +# The following line shows how to make dnsmasq serve an arbitrary PTR +# record. This is useful for DNS-SD. (Note that the +# domain-name expansion done for SRV records _does_not +# occur for PTR records.) +#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services" +X +# Change the following lines to enable dnsmasq to serve TXT records. +# These are used for things like SPF and zeroconf. (Note that the +# domain-name expansion done for SRV records _does_not +# occur for TXT records.) +X +#Example SPF. +#txt-record=example.com,"v=spf1 a -all" +X +#Example zeroconf +#txt-record=_http._tcp.example.com,name=value,paper=A4 +X +# Provide an alias for a "local" DNS name. Note that this _only_ works +# for targets which are names from DHCP or /etc/hosts. Give host +# "bert" another name, bertrand +#cname=bertand,bert +X +# For debugging purposes, log each DNS query as it passes through +# dnsmasq. +#log-queries +X +# Log lots of extra information about DHCP transactions. +#log-dhcp +X +log-facility=/var/log/dnsmasq.log +X +# Include a another lot of configuration options. +#conf-file=/etc/dnsmasq.more.conf +conf-dir=/etc/dnsmasq.d +X +dhcp-optsfile=/etc/dhcpopts.txt +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/dnsmasq.conf.tmpl' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/dnsmasq.conf.tmpl' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/dnsmasq.conf.tmpl failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/dnsmasq.conf.tmpl': 'MD5 check failed' + ) << \SHAR_EOF +a0f6d4fbdef769352c0b4c6aee0e5b0b cloud_scripts/etc/dnsmasq.conf.tmpl +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/dnsmasq.conf.tmpl'` -ne 25321 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/dnsmasq.conf.tmpl' is not 25321" + fi +fi +# ============= cloud_scripts/etc/cron.daily/clear_cache ============== +if test ! -d 'cloud_scripts/etc/cron.daily'; then + mkdir 'cloud_scripts/etc/cron.daily' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/etc/cron.daily." +else ${echo} "x - failed to create directory cloud_scripts/etc/cron.daily." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cron.daily/clear_cache' +then +${echo} "x - SKIPPING cloud_scripts/etc/cron.daily/clear_cache (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/cron.daily/clear_cache (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cron.daily/clear_cache' && +#!/bin/bash +X +# clear memory cache to ultimately reduce swapping +X +sync && echo 1 > /proc/sys/vm/drop_caches +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cron.daily/clear_cache' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/cron.daily/clear_cache' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/cron.daily/clear_cache failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cron.daily/clear_cache': 'MD5 check failed' + ) << \SHAR_EOF +7935ce340439ae62c8f12f337d420207 cloud_scripts/etc/cron.daily/clear_cache +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/cron.daily/clear_cache'` -ne 107 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/cron.daily/clear_cache' is not 107" + fi +fi +# ============= cloud_scripts/etc/vmware-tools/tools.conf ============== +if test ! -d 'cloud_scripts/etc/vmware-tools'; then + mkdir 'cloud_scripts/etc/vmware-tools' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/etc/vmware-tools." +else ${echo} "x - failed to create directory cloud_scripts/etc/vmware-tools." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/vmware-tools/tools.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/vmware-tools/tools.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/vmware-tools/tools.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/vmware-tools/tools.conf' && +[logging] +# Turns on logging globally. It can still be disabled for each domain. +# log = true +X +# Disables core dumps on fatal errors; they're enabled by default. +enableCoreDump = false +X +# Defines the "vmsvc" domain, logging to file +# vmsvc.level = message +vmsvc.handler = file +# Setup file rotation - keep 3 files +vmsvc.maxOldLogFiles = 2 +# Max log file size kept: 1 MB +vmsvc.maxLogSize = 1 +X +# Defines the "vmtoolsd" domain, and disable logging for it. +# vmtoolsd.level = none +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/vmware-tools/tools.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/vmware-tools/tools.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/vmware-tools/tools.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/vmware-tools/tools.conf': 'MD5 check failed' + ) << \SHAR_EOF +4d08804e1a2d4526faeec6404c18fabe cloud_scripts/etc/vmware-tools/tools.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/vmware-tools/tools.conf'` -ne 477 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/vmware-tools/tools.conf' is not 477" + fi +fi +# ============= cloud_scripts/etc/logrotate.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.conf' && +# rotate log files daily +daily +# keep 3 days worth +rotate 3 +# create new (empty) log files after rotating old ones +create +# use date as a suffix of the rotated file +#dateext +# max size 50M +size 50M +compress +# RPM packages drop log rotation information into this directory +include /etc/logrotate.d +# no packages own wtmp and btmp -- we'll rotate them here +/var/log/wtmp { +X monthly +X create 0664 root utmp +X rotate 1 +} +/var/log/btmp { +X missingok +X monthly +X create 0600 root utmp +X rotate 1 +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.conf': 'MD5 check failed' + ) << \SHAR_EOF +2430f483d055288c92deb28733562d8f cloud_scripts/etc/logrotate.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.conf'` -ne 507 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.conf' is not 507" + fi +fi +# ============= cloud_scripts/etc/ssh/sshd_config ============== +if test ! -d 'cloud_scripts/etc/ssh'; then + mkdir 'cloud_scripts/etc/ssh' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/etc/ssh." +else ${echo} "x - failed to create directory cloud_scripts/etc/ssh." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ssh/sshd_config' +then +${echo} "x - SKIPPING cloud_scripts/etc/ssh/sshd_config (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/ssh/sshd_config (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ssh/sshd_config' && +# $OpenBSD: sshd_config,v 1.75 2007/03/19 01:01:29 djm Exp $ +X +# This is the sshd server system-wide configuration file. See +# sshd_config(5) for more information. +X +# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin +X +# The strategy used for options in the default sshd_config shipped with +# OpenSSH is to specify options with their default value where +# possible, but leave them commented. Uncommented options change a +# default value. +X +Port 3922 +#AddressFamily any +#ListenAddress 0.0.0.0 +X +# Disable legacy (protocol version 1) support in the server for new +# installations. In future the default will change to require explicit +# activation of protocol 1 +Protocol 2 +X +# HostKey for protocol version 1 +#HostKey /etc/ssh/ssh_host_key +# HostKeys for protocol version 2 +#HostKey /etc/ssh/ssh_host_rsa_key +#HostKey /etc/ssh/ssh_host_dsa_key +X +# Lifetime and size of ephemeral version 1 server key +#KeyRegenerationInterval 1h +#ServerKeyBits 768 +X +# Logging +# obsoletes QuietMode and FascistLogging +#SyslogFacility AUTH +SyslogFacility AUTHPRIV +#LogLevel INFO +X +# Authentication: +X +#LoginGraceTime 2m +PermitRootLogin yes +#StrictModes yes +#MaxAuthTries 6 +X +#RSAAuthentication yes +PubkeyAuthentication yes +AuthorizedKeysFile .ssh/authorized_keys +X +# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts +#RhostsRSAAuthentication no +# similar for protocol version 2 +#HostbasedAuthentication no +# Change to yes if you don't trust ~/.ssh/known_hosts for +# RhostsRSAAuthentication and HostbasedAuthentication +#IgnoreUserKnownHosts no +# Don't read the user's ~/.rhosts and ~/.shosts files +#IgnoreRhosts yes +X +# To disable tunneled clear text passwords, change to no here! +#PermitEmptyPasswords no +PasswordAuthentication no +X +# Change to no to disable s/key passwords +#ChallengeResponseAuthentication yes +ChallengeResponseAuthentication no +X +# Kerberos options +#KerberosAuthentication no +#KerberosOrLocalPasswd yes +#KerberosTicketCleanup yes +#KerberosGetAFSToken no +X +# GSSAPI options +#GSSAPIAuthentication no +GSSAPIAuthentication no +#GSSAPICleanupCredentials yes +GSSAPICleanupCredentials yes +X +# Set this to 'yes' to enable PAM authentication, account processing, +# and session processing. If this is enabled, PAM authentication will +# be allowed through the ChallengeResponseAuthentication and +# PasswordAuthentication. Depending on your PAM configuration, +# PAM authentication via ChallengeResponseAuthentication may bypass +# the setting of "PermitRootLogin without-password". +# If you just want the PAM account and session checks to run without +# PAM authentication, then enable this but set PasswordAuthentication +# and ChallengeResponseAuthentication to 'no'. +#UsePAM no +UsePAM yes +X +# Accept locale-related environment variables +AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES +AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT +AcceptEnv LC_IDENTIFICATION LC_ALL +#AllowTcpForwarding yes +#GatewayPorts no +#X11Forwarding no +#X11Forwarding yes +#X11DisplayOffset 10 +#X11UseLocalhost yes +#PrintMotd yes +#PrintLastLog yes +TCPKeepAlive yes +#UseLogin no +#UsePrivilegeSeparation yes +#PermitUserEnvironment no +#Compression delayed +#ClientAliveInterval 0 +#ClientAliveCountMax 3 +#ShowPatchLevel no +UseDNS no +#PidFile /var/run/sshd.pid +#PermitTunnel no +X +MaxStartups 1000 +MaxSessions 1000 +X +# no default banner path +#Banner /some/path +X +# override default of no subsystems +Subsystem sftp /usr/lib/openssh/sftp-server +X +# Example of overriding settings on a per-user basis +#Match User anoncvs +# X11Forwarding no +# AllowTcpForwarding no +# ForceCommand cvs server +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ssh/sshd_config' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/ssh/sshd_config' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/ssh/sshd_config failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ssh/sshd_config': 'MD5 check failed' + ) << \SHAR_EOF +842613e1f724e90888a90882ed1a5684 cloud_scripts/etc/ssh/sshd_config +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/ssh/sshd_config'` -ne 3603 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/ssh/sshd_config' is not 3603" + fi +fi +# ============= cloud_scripts/etc/ppp/options.xl2tpd ============== +if test ! -d 'cloud_scripts/etc/ppp'; then + mkdir 'cloud_scripts/etc/ppp' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/etc/ppp." +else ${echo} "x - failed to create directory cloud_scripts/etc/ppp." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ppp/options.xl2tpd' +then +${echo} "x - SKIPPING cloud_scripts/etc/ppp/options.xl2tpd (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/ppp/options.xl2tpd (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ppp/options.xl2tpd' && +proxyarp +ipcp-accept-local +ipcp-accept-remote +noccp +idle 1800 +auth +mtu 1410 +mru 1410 +nodefaultroute +debug +connect-delay 5000 +ms-dns 10.1.1.1 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ppp/options.xl2tpd' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/ppp/options.xl2tpd' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/ppp/options.xl2tpd failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ppp/options.xl2tpd': 'MD5 check failed' + ) << \SHAR_EOF +80ba26ac087aaf7f13cdc1fa8f985d72 cloud_scripts/etc/ppp/options.xl2tpd +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/ppp/options.xl2tpd'` -ne 141 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/ppp/options.xl2tpd' is not 141" + fi +fi +# ============= cloud_scripts/etc/ipsec.d/l2tp.conf ============== +if test ! -d 'cloud_scripts/etc/ipsec.d'; then + mkdir 'cloud_scripts/etc/ipsec.d' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/etc/ipsec.d." +else ${echo} "x - failed to create directory cloud_scripts/etc/ipsec.d." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.d/l2tp.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/ipsec.d/l2tp.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/ipsec.d/l2tp.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.d/l2tp.conf' && +#ipsec remote access vpn configuration +conn L2TP-PSK +X authby=secret +X rekey=no +X keyingtries=3 +X leftfirewall=yes +X type=transport +X # +X # ---------------------------------------------------------- +X # The VPN server. +X # +X # Allow incoming connections on the external network interface. +X # If you want to use a different interface or if there is no +X # defaultroute, you can use: left=your.ip.addr.ess +X # +X left=172.26.0.151 +X # +X leftprotoport=udp/l2tp +X # If you insist on supporting non-updated Windows clients, +X # you can use: leftprotoport=17/%any +X # +X # ---------------------------------------------------------- +X # The remote user(s). +X # +X # Allow incoming connections only from this IP address. +X right=%any +X # If you want to allow multiple connections from any IP address, +X # you can use: right=%any +X # +X rightprotoport=udp/%any +X # +X # ---------------------------------------------------------- +X # Change 'ignore' to 'add' to enable this configuration. +X # +X rightsubnetwithin=0.0.0.0/0 +X auto=route +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.d/l2tp.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/ipsec.d/l2tp.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/ipsec.d/l2tp.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.d/l2tp.conf': 'MD5 check failed' + ) << \SHAR_EOF +8ca6cb315858c9ccf8c91374c4f32def cloud_scripts/etc/ipsec.d/l2tp.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.d/l2tp.conf'` -ne 1234 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.d/l2tp.conf' is not 1234" + fi +fi +# ============= cloud_scripts/etc/rsyslog.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/rsyslog.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/rsyslog.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/rsyslog.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/rsyslog.conf' && +# /etc/rsyslog.conf Configuration file for rsyslog. +# +# For more information see +# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html +X +X +################# +#### MODULES #### +################# +X +$ModLoad imuxsock # provides support for local system logging +$ModLoad imklog # provides kernel logging support (previously done by rklogd) +#$ModLoad immark # provides --MARK-- message capability +X +# provides UDP syslog reception +$ModLoad imudp +$UDPServerRun 3914 +X +# provides TCP syslog reception +#$ModLoad imtcp +#$InputTCPServerRun 514 +X +X +########################### +#### GLOBAL DIRECTIVES #### +########################### +X +# +# Use traditional timestamp format. +# To enable high precision timestamps, comment out the following line. +# +$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat +X +# +# Set the default permissions for all log files. +# +$FileOwner root +$FileGroup adm +$FileCreateMode 0640 +$DirCreateMode 0755 +$Umask 0022 +X +# +# Include all config files in /etc/rsyslog.d/ +# +$IncludeConfig /etc/rsyslog.d/*.conf +X +X +############### +#### RULES #### +############### +X +# +# First some standard log files. Log by facility. +# +auth,authpriv.* /var/log/auth.log +#*.*;auth,authpriv.none -/var/log/syslog +cron.* /var/log/cron.log +daemon.* -/var/log/daemon.log +kern.* -/var/log/kern.log +lpr.* -/var/log/lpr.log +mail.* -/var/log/mail.log +#user.* -/var/log/user.log +X +# +# Logging for the mail system. Split it up so that +# it is easy to write scripts to parse these files. +# +mail.info -/var/log/mail.info +mail.warn -/var/log/mail.warn +mail.err /var/log/mail.err +X +# +# Logging for INN news system. +# +news.crit /var/log/news/news.crit +news.err /var/log/news/news.err +news.notice -/var/log/news/news.notice +X +# +# Some "catch-all" log files. +# +#*.=debug;\ +# auth,authpriv.none;\ +# news.none;mail.none -/var/log/debug +*.=info;*.=notice;*.=warn;\ +X auth,authpriv.none;\ +X cron.none,daemon.none;\ +X local0.none,daemon.none;\ +X mail.none,news.none -/var/log/messages +X +# +# Emergencies are sent to everybody logged in. +# +*.emerg :omusrmsg:* +X +# +# I like to have messages displayed on the console, but only on a virtual +# console I usually leave idle. +# +#daemon,mail.*;\ +# news.=crit;news.=err;news.=notice;\ +# *.=debug;*.=info;\ +# *.=notice;*.=warn /dev/tty8 +X +local0.* -/var/log/haproxy.log +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/rsyslog.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/rsyslog.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/rsyslog.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/rsyslog.conf': 'MD5 check failed' + ) << \SHAR_EOF +1ae97a7bb7bd89a2a7c2e9507bd5c95f cloud_scripts/etc/rsyslog.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/rsyslog.conf'` -ne 2298 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/rsyslog.conf' is not 2298" + fi +fi +# ============= cloud_scripts/etc/modprobe.d/pcspkr.conf ============== +if test ! -d 'cloud_scripts/etc/modprobe.d'; then + mkdir 'cloud_scripts/etc/modprobe.d' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/etc/modprobe.d." +else ${echo} "x - failed to create directory cloud_scripts/etc/modprobe.d." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/modprobe.d/pcspkr.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/modprobe.d/pcspkr.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/modprobe.d/pcspkr.conf (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/modprobe.d/pcspkr.conf +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/modprobe.d/pcspkr.conf': 'MD5 check failed' + ) << \SHAR_EOF +6dc1a7a74dfa22c4f3b37e8700b61658 cloud_scripts/etc/modprobe.d/pcspkr.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/modprobe.d/pcspkr.conf'` -ne 801 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/modprobe.d/pcspkr.conf' is not 801" + fi +fi +# ============= cloud_scripts/etc/modprobe.d/aesni_intel.conf ============== +if test ! -d 'cloud_scripts/etc/modprobe.d'; then + mkdir 'cloud_scripts/etc/modprobe.d' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/etc/modprobe.d." +else ${echo} "x - failed to create directory cloud_scripts/etc/modprobe.d." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/modprobe.d/aesni_intel.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/modprobe.d/aesni_intel.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +blacklist aesni_intel +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/modprobe.d/aesni_intel.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/modprobe.d/aesni_intel.conf': 'MD5 check failed' + ) << \SHAR_EOF +45027ef77fea6dd170da8ea5e1ad1268 cloud_scripts/etc/modprobe.d/aesni_intel.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/modprobe.d/aesni_intel.conf'` -ne 807 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' is not 807" + fi +fi +# ============= cloud_scripts/etc/cron.hourly/clear_cache ============== +if test ! -d 'cloud_scripts/etc/cron.hourly'; then + mkdir 'cloud_scripts/etc/cron.hourly' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/etc/cron.hourly." +else ${echo} "x - failed to create directory cloud_scripts/etc/cron.hourly." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cron.hourly/clear_cache' +then +${echo} "x - SKIPPING cloud_scripts/etc/cron.hourly/clear_cache (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/cron.hourly/clear_cache (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cron.hourly/clear_cache' && +#!/bin/bash +X +# clear memory cache to ultimately reduce swapping +X +phymem=$(free|awk '/^Mem:/{print $2}') +if [ $phymem -lt 513000 ]; then +X sync && echo 1 > /proc/sys/vm/drop_caches +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cron.hourly/clear_cache' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/cron.hourly/clear_cache' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/cron.hourly/clear_cache failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cron.hourly/clear_cache': 'MD5 check failed' + ) << \SHAR_EOF +648c036aba1a5d72010bf11e0ec95147 cloud_scripts/etc/cron.hourly/clear_cache +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/cron.hourly/clear_cache'` -ne 183 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/cron.hourly/clear_cache' is not 183" + fi +fi +# ============= cloud_scripts/etc/apache2/conf-enabled/security.conf ============== +if test ! -d 'cloud_scripts/etc/apache2'; then + mkdir 'cloud_scripts/etc/apache2' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/etc/apache2." +else ${echo} "x - failed to create directory cloud_scripts/etc/apache2." + exit 1 +fi +fi +if test ! -d 'cloud_scripts/etc/apache2/conf-enabled'; then + mkdir 'cloud_scripts/etc/apache2/conf-enabled' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/etc/apache2/conf-enabled." +else ${echo} "x - failed to create directory cloud_scripts/etc/apache2/conf-enabled." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/security.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/security.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/security.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/security.conf' && +ServerTokens Prod +ServerSignature Off +TraceEnable Off +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/security.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/security.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/security.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/security.conf': 'MD5 check failed' + ) << \SHAR_EOF +73e01a3d1cf4f93cb11afb4eb1a6f252 cloud_scripts/etc/apache2/conf-enabled/security.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/security.conf'` -ne 54 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/security.conf' is not 54" + fi +fi +# ============= cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf ============== +if test ! -d 'cloud_scripts/etc/apache2/conf-enabled'; then + mkdir 'cloud_scripts/etc/apache2/conf-enabled' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/etc/apache2/conf-enabled." +else ${echo} "x - failed to create directory cloud_scripts/etc/apache2/conf-enabled." + exit 1 +fi +fi +if test ! -d 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled'; then + mkdir 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/etc/apache2/conf-enabled/mods-enabled." +else ${echo} "x - failed to create directory cloud_scripts/etc/apache2/conf-enabled/mods-enabled." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' && +# event MPM +# StartServers: initial number of server processes to start +# MinSpareThreads: minimum number of worker threads which are kept spare +# MaxSpareThreads: maximum number of worker threads which are kept spare +# ThreadsPerChild: constant number of worker threads in each server process +# MaxRequestWorkers: maximum number of worker threads +# MaxConnectionsPerChild: maximum number of requests a server process serves + +X StartServers 1 +X MinSpareThreads 25 +X MaxSpareThreads 75 +X ThreadLimit 64 +X ThreadsPerChild 25 +X MaxRequestWorkers 30 +X MaxConnectionsPerChild 1000 + +X +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf': 'MD5 check failed' + ) << \SHAR_EOF +b05dce38d6618734e7f49eddcb8ac131 cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf'` -ne 669 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' is not 669" + fi +fi +# ============= cloud_scripts/etc/apache2/httpd.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/httpd.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/apache2/httpd.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/apache2/httpd.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/httpd.conf' && +# Empty +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/httpd.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/apache2/httpd.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/apache2/httpd.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/httpd.conf': 'MD5 check failed' + ) << \SHAR_EOF +2402d4d5cd982d8b74e5c4d62ab0b20b cloud_scripts/etc/apache2/httpd.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/httpd.conf'` -ne 8 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/httpd.conf' is not 8" + fi +fi +# ============= cloud_scripts/etc/apache2/vhost.template ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/vhost.template' +then +${echo} "x - SKIPPING cloud_scripts/etc/apache2/vhost.template (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/apache2/vhost.template (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/apache2/vhost.template +M/%9I3X*"3Q$:7)E8W1O0H)"6%L;&]W(&9R +M;VT@86QL"@D\+T1I3X*"@E38W)I<'1!;&EA0H)"4%L;&]W(&9R;VT@86QL"@D\+T1I3X*"@E%T%004-(15],3T=?1$E2?2]ET%004-(15],3T=?1$E2?2]A8V-E&5S($UU;'1I5FEE=W,@1F]L;&]W4WEM3&EN:W,*("`@("`@("!!;&QO +M=T]V97)R:61E($YO;F4*("`@("`@("!/2!F3X*"CPO5FER='5A +M;$AO2`O/@H)"4]P=&EO;G,@1F]L;&]W +M4WEM3&EN:W,*"0E!;&QO=T]V97)R:61E($YO;F4*"3PO1&ER96-T;W)Y/@H) +M/$1I2`O=F%R+W=W=R]H=&UL/@H)"4]P=&EO;G,@26YD97AE6U,:6YK2`B+W5S&5S($UU;'1I5FEE=W,@1F]L;&]W +M4WEM3&EN:W,*"0E!;&QO=T]V97)R:61E($YO;F4*"0E/2!F3X*"@DC($EN8VQU9&4@0T]2 +M4R!C;VYF:6=U2!A;F0@8V5R=&EF:6-A=&4@87)E('-T;W)E9"!I;B!T:&4@2!A<'!E;F1E9"!T;R!T:&4@2!O;F4*"2,@("!H=6=E(&9I;&4@8V]N=&%I +M;FEN9R!A;&P@;V8@=&AE;2`H9FEL92!M=7-T(&)E(%!%32!E;F-O9&5D*0H) +M(R`@($YO=&4Z($EN2!O;F4@:'5G92!F:6QE(&-O;G1A:6YI +M;F<@86QL"@DC("`@;V8@=&AE;2`H9FEL92!M=7-T(&)E(%!%32!E;F-O9&5D +M*0H)(R`@($YO=&4Z($EN7!E2!T:&4@8V5R=&EF:6-A=&4*"2,@("!I2!A8V-E2!C;VUP;&5X(&)O;VQE86X@97AP"!I*$58 +M4'Q.54Q,*2\@7`H)(R`@("`@("`@("`@(&%N9"`E>U-33%]#3$E%3E1?4U]$ +M3E]/?2!E<2`B4VYA:V4@3VEL+"!,=&0N(B!<"@DC("`@("`@("`@("`@86YD +M("5[4U-,7T-,245.5%]37T1.7T]5?2!I;B![(E-T869F(BP@(D-!(BP@(D1E +M=B)](%P*"2,@("`@("`@("`@("!A;F0@)7M424U%7U=$05E](#X](#$@86YD +M("5[5$E-15]71$%9?2`\/2`U(%P*"2,@("`@("`@("`@("!A;F0@)7M424U% +M7TA/55)](#X](#@@86YD("5[5$E-15](3U52?2`\/2`R,"`@("`@("`I(%P* +M"2,@("`@("`@("`@(&]R("5[4D5-3U1%7T%$1%)](#U^(&TO7C$Y,EPN-S9< +M+C$V,EPN6S`M.5TK)"\*"2,\+TQO8V%T:6]N/@H*"2,@("!34TP@16YG:6YE +M($]P=&EO;G,Z"@DC("`@4V5T('9A2!E;G1R>2!I;B!T:&4@=7-E<@H)(R`@("`@9FEL92!N +M965D'AJ,S%:351:>FM602'!O7,@97AI'!O +M2X*"2,@("!O +M(%-T2!A;GDB('-I='5A=&EO;BP@:2YE +M+B!W:&5N(&ET(&%P<&QI97,@86-C97-S(&ES(&1E;FEE9`H)(R`@("`@86YD +M(&YO(&]T:&5R(&UO9'5L92!C86X@8VAA;F=E(&ET+@H)(R`@(&\@3W!T4F5N +M96=O=&EA=&4Z"@DC("`@("!4:&ES(&5N86)L97,@;W!T:6UI>F5D(%-33"!C +M;VYN96-T:6]N(')E;F5G;W1I871I;VX@:&%N9&QI;F<@=VAE;B!34TP*"2,@ +M("`@(&1I2!C;VYT +M97AT+@H)(U-33$]P=&EO;G,@*T9A:V5"87-I8T%U=&@@*T5X<&]R=$-E2!A;&5R="!B=70@9&]E6]U(&YE +M960@82!D:69F97)E;G0@2P@6]U('5S=6%L;'D@861D:71I;VYA;&QY('=A +M;G0@=&\@9&ES86)L90H)(R`@(&ME97`M86QI=F4@9F]R('1H;W-E(&-L:65N +M=',L('1O;RX@57-E('9A2!-4TE%(&]N(%=I;F1O=W,@6%`N +M"B`@("!,:7-T96X@,3`N,2XQ+C$Z.#0T,PH\+TEF36]D=6QE/@H*/$EF36]D +M=6QE(&UO9%]G;G5T;',N8SX*("`@($QI/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/vhost.template': 'MD5 check failed' + ) << \SHAR_EOF +e42ce7d6f871a7efa7a3c0e164f75dfc cloud_scripts/etc/apache2/vhost.template +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/vhost.template'` -ne 9955 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/vhost.template' is not 9955" + fi +fi +# ============= cloud_scripts/etc/vpcdnsmasq.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/vpcdnsmasq.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/vpcdnsmasq.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/vpcdnsmasq.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/vpcdnsmasq.conf' && +# Configuration file for dnsmasq. +# +# Format is one option per line, legal options are the same +# as the long options legal on the command line. See +# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. +X +# The following two options make you a better netizen, since they +# tell dnsmasq to filter out queries which the public DNS cannot +# answer, and which load the servers (especially the root servers) +# uneccessarily. If you have a dial-on-demand link they also stop +# these requests from bringing up the link uneccessarily. +X +# Never forward plain names (without a dot or domain part) +domain-needed +# Never forward addresses in the non-routed address spaces. +bogus-priv +X +X +# Uncomment this to filter useless windows-originated DNS requests +# which can trigger dial-on-demand links needlessly. +# Note that (amongst other things) this blocks all SRV requests, +# so don't use it if you use eg Kerberos. +# This option only affects forwarding, SRV records originating for +# dnsmasq (via srv-host= lines) are not suppressed by it. +#filterwin2k +X +# Change this line if you want dns to get its upstream servers from +# somewhere other that /etc/resolv.conf +resolv-file=/etc/dnsmasq-resolv.conf +X +# By default, dnsmasq will send queries to any of the upstream +# servers it knows about and tries to favour servers to are known +# to be up. Uncommenting this forces dnsmasq to try each query +# with each server strictly in the order they appear in +# /etc/resolv.conf +#strict-order +X +# If you don't want dnsmasq to read /etc/resolv.conf or any other +# file, getting its servers from this file instead (see below), then +# uncomment this. +#no-resolv +X +# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv +# files for changes and re-read them then uncomment this. +#no-poll +X +# Add other name servers here, with domain specs if they are for +# non-public domains. +#server=/localnet/192.168.0.1 +X +# Example of routing PTR queries to nameservers: this will send all +# address->name queries for 192.168.3/24 to nameserver 10.1.2.3 +#server=/3.168.192.in-addr.arpa/10.1.2.3 +X +# Add local-only domains here, queries in these domains are answered +# from /etc/hosts or DHCP only. +local=/2.vmops-test.vmops.com/ +X +# Add domains which you want to force to an IP address here. +# The example below send any host in doubleclick.net to a local +# webserver. +#address=/doubleclick.net/127.0.0.1 +X +# If you want dnsmasq to change uid and gid to something other +# than the default, edit the following lines. +#user= +#group= +X +# If you want dnsmasq to listen for DHCP and DNS requests only on +# specified interfaces (and the loopback) give the name of the +# interface (eg eth0) here. +# Repeat the line for more than one interface. +#interface=eth0 +X +# Or you can specify which interface _not_ to listen on +except-interface=lo +X +# Or which to listen on by address (remember to include 127.0.0.1 if +# you use this.) +#listen-address= +# If you want dnsmasq to provide only DNS service on an interface, +# configure it as shown above, and then use the following line to +# disable DHCP on it. +#no-dhcp-interface=eth1 +X +# On systems which support it, dnsmasq binds the wildcard address, +# even when it is listening on only some interfaces. It then discards +# requests that it shouldn't reply to. This has the advantage of +# working even when interfaces come and go and change address. If you +# want dnsmasq to really bind only the interfaces it is listening on, +# uncomment this option. About the only time you may need this is when +# running another nameserver on the same machine. +#bind-interfaces +X +# If you don't want dnsmasq to read /etc/hosts, uncomment the +# following line. +#no-hosts +# or if you want it to read another file, as well as /etc/hosts, use +# this. +#addn-hosts=/etc/banner_add_hosts +X +# Set this (and domain: see below) if you want to have a domain +# automatically added to simple names in a hosts-file. +expand-hosts +X +# Set the domain for dnsmasq. this is optional, but if it is set, it +# does the following things. +# 1) Allows DHCP hosts to have fully qualified domain names, as long +# as the domain part matches this setting. +# 2) Sets the "domain" DHCP option thereby potentially setting the +# domain of all systems configured by DHCP +# 3) Provides the domain part for "expand-hosts" +#domain=2.vmops-test.vmops.com +X +# Uncomment this to enable the integrated DHCP server, you need +# to supply the range of addresses available for lease and optionally +# a lease time. If you have more than one network, you will need to +# repeat this for each network on which you want to supply DHCP +# service. +#dhcp-range=10.1.1.1,static +#dhcp-range=10.0.0.1,10.255.255.255 +#dhcp-hostsfile=/etc/dhcphosts.txt +X +# This is an example of a DHCP range where the netmask is given. This +# is needed for networks we reach the dnsmasq DHCP server via a relay +# agent. If you don't know what a DHCP relay agent is, you probably +# don't need to worry about this. +#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h +X +# This is an example of a DHCP range with a network-id, so that +# some DHCP options may be set only for this network. +#dhcp-range=red,192.168.0.50,192.168.0.150 +X +# Supply parameters for specified hosts using DHCP. There are lots +# of valid alternatives, so we will give examples of each. Note that +# IP addresses DO NOT have to be in the range given above, they just +# need to be on the same network. The order of the parameters in these +# do not matter, it's permissble to give name,adddress and MAC in any order +X +# Always allocate the host with ethernet address 11:22:33:44:55:66 +# The IP address 192.168.0.60 +#dhcp-host=11:22:33:44:55:66,192.168.0.60 +X +# Always set the name of the host with hardware address +# 11:22:33:44:55:66 to be "fred" +#dhcp-host=11:22:33:44:55:66,fred +X +# Always give the host with ethernet address 11:22:33:44:55:66 +# the name fred and IP address 192.168.0.60 and lease time 45 minutes +#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m +X +# Give the machine which says it's name is "bert" IP address +# 192.168.0.70 and an infinite lease +#dhcp-host=bert,192.168.0.70,infinite +X +# Always give the host with client identifier 01:02:02:04 +# the IP address 192.168.0.60 +#dhcp-host=id:01:02:02:04,192.168.0.60 +X +# Always give the host with client identifier "marjorie" +# the IP address 192.168.0.60 +#dhcp-host=id:marjorie,192.168.0.60 +X +# Enable the address given for "judge" in /etc/hosts +# to be given to a machine presenting the name "judge" when +# it asks for a DHCP lease. +#dhcp-host=judge +X +# Never offer DHCP service to a machine whose ethernet +# address is 11:22:33:44:55:66 +#dhcp-host=11:22:33:44:55:66,ignore +X +# Ignore any client-id presented by the machine with ethernet +# address 11:22:33:44:55:66. This is useful to prevent a machine +# being treated differently when running under different OS's or +# between PXE boot and OS boot. +#dhcp-host=11:22:33:44:55:66,id:* +X +# Send extra options which are tagged as "red" to +# the machine with ethernet address 11:22:33:44:55:66 +#dhcp-host=11:22:33:44:55:66,net:red +X +# Send extra options which are tagged as "red" to +# any machine with ethernet address starting 11:22:33: +#dhcp-host=11:22:33:*:*:*,net:red +X +# Ignore any clients which are specified in dhcp-host lines +# or /etc/ethers. Equivalent to ISC "deny unkown-clients". +# This relies on the special "known" tag which is set when +# a host is matched. +#dhcp-ignore=#known +X +# Send extra options which are tagged as "red" to any machine whose +# DHCP vendorclass string includes the substring "Linux" +#dhcp-vendorclass=red,Linux +X +# Send extra options which are tagged as "red" to any machine one +# of whose DHCP userclass strings includes the substring "accounts" +#dhcp-userclass=red,accounts +X +# Send extra options which are tagged as "red" to any machine whose +# MAC address matches the pattern. +#dhcp-mac=red,00:60:8C:*:*:* +X +# If this line is uncommented, dnsmasq will read /etc/ethers and act +# on the ethernet-address/IP pairs found there just as if they had +# been given as --dhcp-host options. Useful if you keep +# MAC-address/host mappings there for other purposes. +#read-ethers +X +# Send options to hosts which ask for a DHCP lease. +# See RFC 2132 for details of available options. +# Common options can be given to dnsmasq by name: +# run "dnsmasq --help dhcp" to get a list. +# Note that all the common settings, such as netmask and +# broadcast address, DNS server and default route, are given +# sane defaults by dnsmasq. You very likely will not need +# any dhcp-options. If you use Windows clients and Samba, there +# are some options which are recommended, they are detailed at the +# end of this section. +X +# Override the default route supplied by dnsmasq, which assumes the +# router is the same machine as the one running dnsmasq. +#dhcp-option=3,1.2.3.4 +X +# Do the same thing, but using the option name +#dhcp-option=option:router,1.2.3.4 +X +# Override the default route supplied by dnsmasq and send no default +# route at all. Note that this only works for the options sent by +# default (1, 3, 6, 12, 28) the same line will send a zero-length option +# for all other option numbers. +#dhcp-option=3 +X +# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 +#dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5 +X +# Set the NTP time server address to be the same machine as +# is running dnsmasq +#dhcp-option=42,0.0.0.0 +X +# Set the NIS domain name to "welly" +#dhcp-option=40,welly +X +# Set the default time-to-live to 50 +#dhcp-option=23,50 +X +# Set the "all subnets are local" flag +#dhcp-option=27,1 +X +# Set the domain +dhcp-option=15,"2.vmops-test.vmops.com" +X +# Send the etherboot magic flag and then etherboot options (a string). +#dhcp-option=128,e4:45:74:68:00:00 +#dhcp-option=129,NIC=eepro100 +X +# Specify an option which will only be sent to the "red" network +# (see dhcp-range for the declaration of the "red" network) +# Note that the net: part must precede the option: part. +#dhcp-option = net:red, option:ntp-server, 192.168.1.1 +X +# The following DHCP options set up dnsmasq in the same way as is specified +# for the ISC dhcpcd in +# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt +# adapted for a typical dnsmasq installation where the host running +# dnsmasq is also the host running samba. +# you may want to uncomment them if you use Windows clients and Samba. +#dhcp-option=19,0 # option ip-forwarding off +#dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) +#dhcp-option=45,0.0.0.0 # netbios datagram distribution server +#dhcp-option=46,8 # netbios node type +#dhcp-option=47 # empty netbios scope. +X +# Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client +# probably doesn't support this...... +#dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com +X +# Send RFC-3442 classless static routes (note the netmask encoding) +#dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8 +X +# Send vendor-class specific options encapsulated in DHCP option 43. +# The meaning of the options is defined by the vendor-class so +# options are sent only when the client supplied vendor class +# matches the class given here. (A substring match is OK, so "MSFT" +# matches "MSFT" and "MSFT 5.0"). This example sets the +# mtftp address to 0.0.0.0 for PXEClients. +#dhcp-option=vendor:PXEClient,1,0.0.0.0 +X +# Send microsoft-specific option to tell windows to release the DHCP lease +# when it shuts down. Note the "i" flag, to tell dnsmasq to send the +# value as a four-byte integer - that's what microsoft wants. See +# http://technet2.microsoft.com/WindowsServer/en/library/a70f1bb7-d2d4-49f0-96d6-4b7414ecfaae1033.mspx?mfr=true +dhcp-option=vendor:MSFT,2,1i +X +# Send the Encapsulated-vendor-class ID needed by some configurations of +# Etherboot to allow is to recognise the DHCP server. +#dhcp-option=vendor:Etherboot,60,"Etherboot" +X +# Send options to PXELinux. Note that we need to send the options even +# though they don't appear in the parameter request list, so we need +# to use dhcp-option-force here. +# See http://syslinux.zytor.com/pxe.php#special for details. +# Magic number - needed before anything else is recognised +#dhcp-option-force=208,f1:00:74:7e +# Configuration file name +#dhcp-option-force=209,configs/common +# Path prefix +#dhcp-option-force=210,/tftpboot/pxelinux/files/ +# Reboot time. (Note 'i' to send 32-bit value) +#dhcp-option-force=211,30i +X +# Set the boot filename for BOOTP. You will only need +# this is you want to boot machines over the network and you will need +# a TFTP server; either dnsmasq's built in TFTP server or an +# external one. (See below for how to enable the TFTP server.) +#dhcp-boot=pxelinux.0 +X +# Enable dnsmasq's built-in TFTP server +#enable-tftp +X +# Set the root directory for files availble via FTP. +#tftp-root=/var/ftpd +X +# Make the TFTP server more secure: with this set, only files owned by +# the user dnsmasq is running as will be send over the net. +#tftp-secure +X +# Set the boot file name only when the "red" tag is set. +#dhcp-boot=net:red,pxelinux.red-net +X +# An example of dhcp-boot with an external server: the name and IP +# address of the server are given after the filename. +#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 +X +# Set the limit on DHCP leases, the default is 150 +dhcp-lease-max=2100 +X +# The DHCP server needs somewhere on disk to keep its lease database. +# This defaults to a sane location, but if you want to change it, use +# the line below. +#dhcp-leasefile=/var/lib/misc/dnsmasq.leases +leasefile-ro +X +# Set the DHCP server to authoritative mode. In this mode it will barge in +# and take over the lease for any client which broadcasts on the network, +# whether it has a record of the lease or not. This avoids long timeouts +# when a machine wakes up on a new network. DO NOT enable this if there's +# the slighest chance that you might end up accidentally configuring a DHCP +# server for your campus/company accidentally. The ISC server uses +# the same option, and this URL provides more information: +# http://www.isc.org/index.pl?/sw/dhcp/authoritative.php +#dhcp-authoritative +X +# Run an executable when a DHCP lease is created or destroyed. +# The arguments sent to the script are "add" or "del", +# then the MAC address, the IP address and finally the hostname +# if there is one. +#dhcp-script=/bin/echo +X +# Set the cachesize here. +#cache-size=150 +X +# If you want to disable negative caching, uncomment this. +#no-negcache +X +# Normally responses which come form /etc/hosts and the DHCP lease +# file have Time-To-Live set as zero, which conventionally means +# do not cache further. If you are happy to trade lower load on the +# server for potentially stale date, you can set a time-to-live (in +# seconds) here. +#local-ttl= +X +# If you want dnsmasq to detect attempts by Verisign to send queries +# to unregistered .com and .net hosts to its sitefinder service and +# have dnsmasq instead return the correct NXDOMAIN response, uncomment +# this line. You can add similar lines to do the same for other +# registries which have implemented wildcard A records. +#bogus-nxdomain=64.94.110.11 +X +# If you want to fix up DNS results from upstream servers, use the +# alias option. This only works for IPv4. +# This alias makes a result of 1.2.3.4 appear as 5.6.7.8 +#alias=1.2.3.4,5.6.7.8 +# and this maps 1.2.3.x to 5.6.7.x +#alias=1.2.3.0,5.6.7.0,255.255.255.0 +X +X +# Change these lines if you want dnsmasq to serve MX records. +X +# Return an MX record named "maildomain.com" with target +# servermachine.com and preference 50 +#mx-host=maildomain.com,servermachine.com,50 +X +# Set the default target for MX records created using the localmx option. +#mx-target=servermachine.com +X +# Return an MX record pointing to the mx-target for all local +# machines. +#localmx +X +# Return an MX record pointing to itself for all local machines. +#selfmx +X +# Change the following lines if you want dnsmasq to serve SRV +# records. These are useful if you want to serve ldap requests for +# Active Directory and other windows-originated DNS requests. +# See RFC 2782. +# You may add multiple srv-host lines. +# The fields are ,,,, +# If the domain part if missing from the name (so that is just has the +# service and protocol sections) then the domain given by the domain= +# config option is used. (Note that expand-hosts does not need to be +# set for this to work.) +X +# A SRV record sending LDAP for the example.com domain to +# ldapserver.example.com port 289 +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389 +X +# A SRV record sending LDAP for the example.com domain to +# ldapserver.example.com port 289 (using domain=) +###domain=example.com +#srv-host=_ldap._tcp,ldapserver.example.com,389 +X +# Two SRV records for LDAP, each with different priorities +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1 +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2 +X +# A SRV record indicating that there is no LDAP server for the domain +# example.com +#srv-host=_ldap._tcp.example.com +X +# The following line shows how to make dnsmasq serve an arbitrary PTR +# record. This is useful for DNS-SD. (Note that the +# domain-name expansion done for SRV records _does_not +# occur for PTR records.) +#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services" +X +# Change the following lines to enable dnsmasq to serve TXT records. +# These are used for things like SPF and zeroconf. (Note that the +# domain-name expansion done for SRV records _does_not +# occur for TXT records.) +X +#Example SPF. +#txt-record=example.com,"v=spf1 a -all" +X +#Example zeroconf +#txt-record=_http._tcp.example.com,name=value,paper=A4 +X +X +# For debugging purposes, log each DNS query as it passes through +# dnsmasq. +#log-queries +X +# Log lots of extra information about DHCP transactions. +#log-dhcp +X +log-facility=/var/log/dnsmasq.log +X +# Include a another lot of configuration options. +#conf-file=/etc/dnsmasq.more.conf +conf-dir=/etc/dnsmasq.d +X +dhcp-optsfile=/etc/dhcpopts.txt +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/vpcdnsmasq.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/vpcdnsmasq.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/vpcdnsmasq.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/vpcdnsmasq.conf': 'MD5 check failed' + ) << \SHAR_EOF +0b53d152c88ebce3ee09d8e9c8addd6b cloud_scripts/etc/vpcdnsmasq.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/vpcdnsmasq.conf'` -ne 17942 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/vpcdnsmasq.conf' is not 17942" + fi +fi +# ============= cloud_scripts/etc/ipsec.secrets ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.secrets' +then +${echo} "x - SKIPPING cloud_scripts/etc/ipsec.secrets (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/ipsec.secrets (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.secrets' && +include /var/lib/strongswan/ipsec.conf.inc +include /etc/ipsec.d/ipsec.*.secrets +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.secrets' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/ipsec.secrets' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/ipsec.secrets failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.secrets': 'MD5 check failed' + ) << \SHAR_EOF +7ab0bddd5ec64ebda91cf3c5262fef2d cloud_scripts/etc/ipsec.secrets +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.secrets'` -ne 80 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.secrets' is not 80" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/dnsmasq ============== +if test ! -d 'cloud_scripts/etc/logrotate.d'; then + mkdir 'cloud_scripts/etc/logrotate.d' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/etc/logrotate.d." +else ${echo} "x - failed to create directory cloud_scripts/etc/logrotate.d." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/dnsmasq' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/dnsmasq (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/dnsmasq (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/dnsmasq' && +/var/log/dnsmasq.log { +X maxsize 10M +X missingok +X rotate 5 +X notifempty +X delaycompress +X sharedscripts +X postrotate +X [ ! -f /var/run/dnsmasq/dnsmasq.pid ] || kill -USR2 `cat /var/run/dnsmasq/dnsmasq.pid` +X endscript +X create 0640 dnsmasq root +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/dnsmasq' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/dnsmasq' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/dnsmasq failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/dnsmasq': 'MD5 check failed' + ) << \SHAR_EOF +e42458bd875605d1cd625f0596b38d4c cloud_scripts/etc/logrotate.d/dnsmasq +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/dnsmasq'` -ne 272 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/dnsmasq' is not 272" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/cloud ============== +if test ! -d 'cloud_scripts/etc/logrotate.d'; then + mkdir 'cloud_scripts/etc/logrotate.d' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/etc/logrotate.d." +else ${echo} "x - failed to create directory cloud_scripts/etc/logrotate.d." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/cloud' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/cloud (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/cloud (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/cloud' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +/var/log/cloud.log { +X rotate 10 +X maxsize 10M +X missingok +X notifempty +X compress +X # CLOUDSTACK-9155: We cannot tell the processes that are writing to this +X # file to use the new inode, so instead we copy the original file, truncate +X # it and keep the same inode. +X copytruncate +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/cloud' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/cloud' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/cloud failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/cloud': 'MD5 check failed' + ) << \SHAR_EOF +f83a4d4cf36adb81699ac5892bf6c6f5 cloud_scripts/etc/logrotate.d/cloud +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/cloud'` -ne 1124 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/cloud' is not 1124" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/conntrackd ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/conntrackd' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/conntrackd (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/conntrackd (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/conntrackd' && +/var/log/conntrackd-stats.log { +X maxsize 10M +X rotate 2 +X missingok +X compress +X delaycompress +X +X postrotate +X if [ -e /var/run/conntrackd.sock ]; then +X /usr/sbin/invoke-rc.d conntrackd restart > /dev/null +X fi +X endscript +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/conntrackd' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/conntrackd' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/conntrackd failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/conntrackd': 'MD5 check failed' + ) << \SHAR_EOF +334d9dd543fcb9c8682b4b8fc3987c4c cloud_scripts/etc/logrotate.d/conntrackd +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/conntrackd'` -ne 263 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/conntrackd' is not 263" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/monitor ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/monitor' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/monitor (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/monitor (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/monitor' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +/var/log/monitor.log { +X rotate 5 +X maxsize 10M +X missingok +X notifempty +X compress +X copytruncate +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/monitor' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/monitor' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/monitor failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/monitor': 'MD5 check failed' + ) << \SHAR_EOF +dbf4af64f49d5ffbf4a725cca714ccd0 cloud_scripts/etc/logrotate.d/monitor +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/monitor'` -ne 922 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/monitor' is not 922" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/routerServiceMonitor ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/routerServiceMonitor (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/routerServiceMonitor (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +/var/log/routerServiceMonitor.log { +X rotate 5 +X maxsize 10M +X missingok +X notifempty +X compress +X copytruncate +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/routerServiceMonitor failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/routerServiceMonitor': 'MD5 check failed' + ) << \SHAR_EOF +0f7968ad2bdbb870fa6a7f55565003c1 cloud_scripts/etc/logrotate.d/routerServiceMonitor +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/routerServiceMonitor'` -ne 935 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' is not 935" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/ppp ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/ppp' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/ppp (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/ppp (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/ppp' && +/var/log/ppp-connect-errors { +X maxsize 10M +X rotate 5 +X missingok +X notifempty +X compress +X nocreate +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/ppp' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/ppp' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/ppp failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/ppp': 'MD5 check failed' + ) << \SHAR_EOF +7d16a52cb372773845f812e51f52318f cloud_scripts/etc/logrotate.d/ppp +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/ppp'` -ne 98 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/ppp' is not 98" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/apache2 ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/apache2' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/apache2 (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/apache2 (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/apache2' && +/var/log/apache2/*.log { +X missingok +X copytruncate +X rotate 3 +X compress +X dateext +X maxsize 10M +X notifempty +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/apache2' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/apache2' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/apache2 failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/apache2': 'MD5 check failed' + ) << \SHAR_EOF +eefd54e0be665bd8a76a7aebee89d6d5 cloud_scripts/etc/logrotate.d/apache2 +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/apache2'` -ne 148 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/apache2' is not 148" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/rsyslog ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/rsyslog' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/rsyslog (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/rsyslog (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/rsyslog' && +/var/log/syslog +{ +X rotate 7 +X maxsize 10M +X missingok +X notifempty +X compress +X postrotate +X /usr/sbin/invoke-rc.d rsyslog rotate > /dev/null +X endscript +} +X +/var/log/mail.info +/var/log/mail.warn +/var/log/mail.err +/var/log/mail.log +/var/log/daemon.log +/var/log/kern.log +/var/log/auth.log +/var/log/user.log +/var/log/lpr.log +/var/log/cron.log +/var/log/debug +/var/log/messages +{ +X rotate 10 +X maxsize 10M +X missingok +X notifempty +X compress +X sharedscripts +X postrotate +X /usr/sbin/invoke-rc.d rsyslog rotate > /dev/null +X endscript +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/rsyslog' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/rsyslog' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/rsyslog failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/rsyslog': 'MD5 check failed' + ) << \SHAR_EOF +b4409ff800ad8ac42c79f412d6b90094 cloud_scripts/etc/logrotate.d/rsyslog +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/rsyslog'` -ne 517 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/rsyslog' is not 517" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/haproxy ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/haproxy' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/haproxy (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/haproxy (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/haproxy' && +/var/log/haproxy.log { +X rotate 5 +X missingok +X notifempty +X maxsize 10M +X postrotate +X /bin/kill -HUP `cat /var/run/rsyslog.pid 2> /dev/null` 2> /dev/null || true +X endscript +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/haproxy' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/haproxy' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/haproxy failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/haproxy': 'MD5 check failed' + ) << \SHAR_EOF +e584fdf0d2a25578f651fccce265ff09 cloud_scripts/etc/logrotate.d/haproxy +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/haproxy'` -ne 194 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/haproxy' is not 194" + fi +fi +# ============= cloud_scripts/etc/profile.d/cloud.sh ============== +if test ! -d 'cloud_scripts/etc/profile.d'; then + mkdir 'cloud_scripts/etc/profile.d' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/etc/profile.d." +else ${echo} "x - failed to create directory cloud_scripts/etc/profile.d." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/profile.d/cloud.sh' +then +${echo} "x - SKIPPING cloud_scripts/etc/profile.d/cloud.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/profile.d/cloud.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/profile.d/cloud.sh' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +if [ "`id -u`" -eq 0 ]; then +X PATH=${PATH}:/opt/cloud/bin +fi +export PATH +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/profile.d/cloud.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/profile.d/cloud.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/profile.d/cloud.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/profile.d/cloud.sh': 'MD5 check failed' + ) << \SHAR_EOF +78e5d1f4d852b0af96f8b2efa5245c86 cloud_scripts/etc/profile.d/cloud.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/profile.d/cloud.sh'` -ne 861 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/profile.d/cloud.sh' is not 861" + fi +fi +# ============= cloud_scripts/etc/cloud-nic.rules ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cloud-nic.rules' +then +${echo} "x - SKIPPING cloud_scripts/etc/cloud-nic.rules (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/cloud-nic.rules (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cloud-nic.rules' && +SUBSYSTEM=="net" KERNEL=="eth*" RUN+="/opt/cloud/bin/cloud-nic.sh $env{ACTION} %k" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cloud-nic.rules' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/cloud-nic.rules' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/cloud-nic.rules failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cloud-nic.rules': 'MD5 check failed' + ) << \SHAR_EOF +4ffd506afaa6a69a55ba9ab6bbf706f5 cloud_scripts/etc/cloud-nic.rules +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/cloud-nic.rules'` -ne 83 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/cloud-nic.rules' is not 83" + fi +fi +# ============= cloud_scripts/etc/haproxy/haproxy.cfg ============== +if test ! -d 'cloud_scripts/etc/haproxy'; then + mkdir 'cloud_scripts/etc/haproxy' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/etc/haproxy." +else ${echo} "x - failed to create directory cloud_scripts/etc/haproxy." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/haproxy/haproxy.cfg' +then +${echo} "x - SKIPPING cloud_scripts/etc/haproxy/haproxy.cfg (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/haproxy/haproxy.cfg (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/haproxy/haproxy.cfg' && +global +X log 127.0.0.1:3914 local0 info +X chroot /var/lib/haproxy +X user haproxy +X group haproxy +X daemon +X +defaults +X log global +X mode tcp +X option dontlognull +X retries 3 +X option redispatch +X option forwardfor +X stats enable +X stats uri /admin?stats +X stats realm Haproxy\ Statistics +X stats auth admin1:AdMiN123 +X option forceclose +X timeout connect 5000 +X timeout client 50000 +X timeout server 50000 +X +X +listen cloud-default +X bind 0.0.0.0:35999 +X option transparent +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/haproxy/haproxy.cfg' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/haproxy/haproxy.cfg' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/haproxy/haproxy.cfg failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/haproxy/haproxy.cfg': 'MD5 check failed' + ) << \SHAR_EOF +a554fcecbaff9747723f9cd3aedf1ffd cloud_scripts/etc/haproxy/haproxy.cfg +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/haproxy/haproxy.cfg'` -ne 483 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/haproxy/haproxy.cfg' is not 483" + fi +fi +# ============= cloud_scripts/usr/share/cloud/cloud-scripts.tar ============== +if test ! -d 'cloud_scripts/usr'; then + mkdir 'cloud_scripts/usr' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/usr." +else ${echo} "x - failed to create directory cloud_scripts/usr." + exit 1 +fi +fi +if test ! -d 'cloud_scripts/usr/share'; then + mkdir 'cloud_scripts/usr/share' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/usr/share." +else ${echo} "x - failed to create directory cloud_scripts/usr/share." + exit 1 +fi +fi +if test ! -d 'cloud_scripts/usr/share/cloud'; then + mkdir 'cloud_scripts/usr/share/cloud' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/usr/share/cloud." +else ${echo} "x - failed to create directory cloud_scripts/usr/share/cloud." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/usr/share/cloud/cloud-scripts.tar' +then +${echo} "x - SKIPPING cloud_scripts/usr/share/cloud/cloud-scripts.tar (file already exists)" + +else +${echo} "x - extracting cloud_scripts/usr/share/cloud/cloud-scripts.tar (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/usr/share/cloud/cloud-scripts.tar +M971C+P`````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````#`P,#`W-34`,#`P,37-T96U-87A& +M:6QE4VEZ93TQ,$T*4G5N=&EM94UA>%5S93TR,$T*```````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````971C+W-Y7-T +M96TO:'EP97)V+61A96UO;G,N:'8M=G-S+61A96UO;BYS97)V:6-E```````` +M````````````````````````````````````````````````````,#`P,#8T +M-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,S0`,3,V,C4Q-3`S,30`,#(S +M,37!E2!S97)V:6-E("A64U,I(&1A96UO;@H*6U-E&5C4W1A3UM=6QT:2UU7-T96UD+W-Y2UC;VYF +M:63TO=7-R+VQO8V%L+V-L;W5D+W-Y7-T96TO;W!E;BUV;2UT;V]L3UM=6QT:2UU3UM=6QT:2UU7-T96UD+W-Y&5N+FUO=6YT"D)E9F]R93UN971W;W)K+G1A2UC;VYF:6&5C4W1A&5C4W1A3UM=6QT:2UU7-T96TO:'EP97)V+61A96UO;G,N:'8M +M9F-O<'DM9&%E;6]N+G-E7!E2!S97)V:6-E("A&0T]062D@9&%E;6]N"D-O +M;F1I=&EO;E!A=&A%>&ES=',]+V1E=B]V;6)U0H*6U-E3UM=6QT:2UU7-T96TO8VQO=60M +M<&]S=&EN:70N2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N0`````````````````````````````````````````````` +M`````````````````````````````````````````#`P,#`V-#0`,#`P,36]U(&UA>2!N;W0@=7-E +M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI +M8V5N7!E(#$S("UJ($123U`*+4$@24Y0550@+7`@:6-M<"`M:B!!0T-%4%0* +M+4$@24Y0550@+6D@971H,2`M<"!T8W`@+6T@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* +M(R`@(&AT='`Z+R]W=W7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E +M<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H +M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N +M2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H +M92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R +M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T +M"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7-C=&P@8V]N9FEG=7)A +M=&EO;B!F:6QE"B,*(R!&;W(@8FEN87)Y('9A;'5E7-C=&PN +M8V]N9B@U*2!F;W(@;6]R92!D971A:6QS+@HC($!615)324].0`H*(R!#;VYT +M2!T:&5R +M96)Y(')E9'5C:6YG('1H92!S:7IE(&]F(&1I&PR='!D+WAL +M,G1P9"YC;VYF```````````````````````````````````````````````` +M````````````````````````````````````````````````````````,#`P +M,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,3,`,3,U-C$W,C4Q-3(` +M,#$T-#4U`"`P```````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````'5S=&%R("``9&%R65S"G!P<&]P=&9I;&4@/2`@("`O971C+W!P<"]O<'1I;VYS +M+GAL,G1P9`H````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````971C+V1N2!D:7-A8FQE +MF5N+"!S:6YC92!T:&5Y"B,@=&5L;"!D +M;G-M87-Q('1O(&9I;'1E2X@268@>6]U(&AA=F4@82!D:6%L+6]N+61E;6%N9"!L:6YK('1H97D@ +M86QS;R!S=&]P"B,@=&AE6]U('=A;G0@9&YS('1O(&=E="!I=',@=7!S=')E86T@2`@(&%P<&5A2!O=&AE<@HC(&9I +M;&4L(&=E='1I;F<@:71S('-E2!O;@HC('-P96-I9FEE9"!I;G1E +M&-E<'0M:6YT97)F86-E/65T:#$*97AC97!T+6EN +M=&5R9F%C93UE=&@R"F5X8V5P="UI;G1E6]U('=A;G0@9&YS;6%S<2!T;R!P6]U"B,@=V%N="!D;G-M +M87-Q('1O(')E86QL>2!B:6YD(&]N;'D@=&AE(&EN=&5R9F%C97,@:70@:7,@ +M;&ES=&5N:6YG(&]N+`HC('5N8V]M;65N="!T:&ES(&]P=&EO;BX@06)O=70@ +M=&AE(&]N;'D@=&EM92!Y;W4@;6%Y(&YE960@=&AI6]U('=A;G0@=&\@ +M:&%V92!A(&1O;6%I;@HC(&%U=&]M871I8V%L;'D@861D960@=&\@2!Q=6%L:69I +M960@9&]M86EN(&YA;65S+"!A7-T96US(&-O;F9I9W5R960@8GD@ +M1$A#4`HC(#,I(%!R;W9I9&5S('1H92!D;VUA:6X@<&%R="!F;W(@(F5X<&%N +M9"UH;W-T7,N;W)G+G5K+#$Y,BXQ-C@N,BXP +M+S(T"@HC(%-A;64@:61E82P@8G5T(')A;F=E(')A=&AE7,N;W)G+G5K+#$Y,BXV."XS +M+C$P,"PQ.3(N,38X+C,N,C`P"@HC(%5N8V]M;65N="!T:&ES('1O(&5N86)L +M92!T:&4@:6YT96=R871E9"!$2$-0('-E6]U(&YE960*(R!T;R!S +M=7!P;'D@=&AE(')A;F=E(&]F(&%D9')E2!$2$-0"B,@2!B92!S970@;VYL>2!F;W(@=&AI2!W:&5N('1H92!T86<@(F=R965N +M(B!I2!A('-U8FYE="!W:&EC:"!C +M86XG="!B92!U6YA;6EC(&%D9')E2!A;F0*(R!A9&0@;F%M97,@=&\@=&AE($1.4R!F;W(@=&AE($E0 +M=C8@861D2P@-#AH"@HC($1O($1(0U`@86YD(%)O=71E2!W:6QL('5S +M92!33$%!0R!F;W(@861D2!R82US=&%T96QE2!J +M=7-T"B,@;F5E9"!T;R!B92!O;B!T:&4@7,@9VEV92!T:&4@:&]S="!W:71H($5T +M:&5R;F5T(&%D9')E7,@9VEV92!T:&4@:&]S="!W +M:71H(&-L:65N="!I9&5N=&EF:65R(#`Q.C`R.C`R.C`T"B,@=&AE($E0(&%D +M9')E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ +M(G)E9"(@=&\*(R!T:&4@;6%C:&EN92!W:71H($5T:&5R;F5T(&%D9')E&5D($E0=C8@861D2!;72!A2X*(V1H8W`M:&]S=#UI9#HP,#HP,3HP +M,#HP,3HQ-CID,CHX,SIF8SHY,CID-#HQ.3IE,CID.#IB,BP@9G)E9"P@6S$R +M,S0Z.C5="@HC($EG;F]R92!A;GD@8VQI96YT2!M86-H:6YE('=H;W-E"B,@1$A#4"!V96YD;W)C;&%S +M'1R82!O<'1I +M;VYS('=H:6-H(&%R92!T86=G960@87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@ +M;VYE"B,@;V8@=VAO'1R82!O<'1I;VYS('=H:6-H(&%R +M92!T86=G960@87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO2!D;G-M +M87-Q(&%N9"!S96YD(&YO(&1E9F%U;'0*(R!R;W5T92!A="!A;&PN($YO=&4@ +M=&AA="!T:&ES(&]N;'D@=V]R:W,@9F]R('1H92!O<'1I;VYS('-E;G0@8GD* +M(R!D969A=6QT("@Q+"`S+"`V+"`Q,BP@,C@I('1H92!S86UE(&QI;F4@=VEL +M;"!S96YD(&$@>F5R;RUL96YG=&@@;W!T:6]N"B,@9F]R(&%L;"!O=&AE0H*(R!3970@=&AE(&1E9F%U;'0@=&EM92UT;RUL:79E +M('1O(#4P"B-D:&-P+6]P=&EO;CTR,RPU,`H*(R!3970@=&AE(")A;&P@2!A;B!O<'1I;VX@=VAI8V@@=VEL;"!O;FQY +M(&)E('-E;G0@=&\@=&AE(")R960B(&YE='=O2!A6]U +M(&UA>2!W86YT('1O('5N8V]M;65N="!S;VUE(&]R(&%L;"!O9B!T:&5M(&EF +M('EO=2!U7!E"@HC(%-E;F0@86X@96UP='D@5U!! +M1"!O<'1I;VXN(%1H:7,@;6%Y(&)E(%)%455)4D5$('1O(&=E="!W:6YD;W=S +M(#<@=&\@8F5H879E+@HC9&AC<"UO<'1I;VX],C4R+")<;B(*"B,@4V5N9"!2 +M1D,M,S,Y-R!$3E,@9&]M86EN('-E87)C:"!$2$-0(&]P=&EO;BX@5T%23DE. +M1SH@66]U71H:6YG(&5L&4@=&%G(&9O2YK<'AE"B-D:&-P+6)O;W0];7EB;V]T:6UA9V4*"B,@16YC87!S +M=6QA=&5D(&]P=&EO;G,@9F]R($5T:&5R8F]O="!G4%A%+B!!;&P@=&AE(&]P +M=&EO;G,@87)E"B,@96YC87!S=6QA=&5D('=I=&AI;B!O<'1I;VX@,32!C;V1E"B-D:&-P+6]P=&EO;CUE;F-A<#HQ-S4L(#$W-BP@,6(@("`@("`@ +M(R!N;RUP61H8W`*(V1H8W`M;W!T:6]N/65N8V%P.C$W-2P@,3#@V+3,R"B-D:&-P+6UA=&-H/6ET86YI8W,L(&]P=&EO;CIC;&EE;G0M87)C +M:"P@,B`C24$V-`HC9&AC<"UM871C:#UH86UM97)S+"!O<'1I;VXZ8VQI96YT +M+6%R8V@L(#8@(W@X-BTV-`HC9&AC<"UM871C:#UM86-T96QS+"!O<'1I;VXZ +M8VQI96YT+6%R8V@L(#<@(T5&22!X.#8M-C0*"B,@1&\@&4M<')O;7!T/2)0#@V4$,L("));G-T86QL($QI;G5X(BP@<'AE;&EN=7@*"B,@3&]A +M9',@/'1F='`M#@V4$,L("));G-T86QL($QI;G5X(BP@<'AE;&EN +M=7@L(#$N,BXS+C0*"B,@57-E(&)O;W1S97)V97(@;VX@;F5T=V]R:RP@9F]U +M;F0@;7D@;75L=&EC87-T(&]R(&)R;V%D8V%S="X*(W!X92US97)V:6-E/7@X +M-E!#+"`B26YS=&%L;"!W:6YD;W=S(&9R;VT@4DE3('-E#@V4$,L("));G-T86QL('=I;F1O=W,@9G)O;2!225,@2!F:6QE0HC('1H92!U&%M<&QE(&]F(&1H8W`M8F]O="!W:71H(&%N(&5X=&5R;F%L(%1& +M5%`@2`M+7!X92US97)V +M:6-E+@HC9&AC<"UB;V]T/2]V87(O9G1P9"]P>&5L:6YU>"XP+&)O;W1H;W-T +M+#$Y,BXQ-C@N,"XS"@HC($EF('1H97)E(&%R92!M=6QT:7!L92!E>'1E#TR,3`P"@HC(%1H92!$2$-0('-E6]U(&UI9VAT(&5N9"!U<"!A8V-I9&5N=&%L +M;'D@8V]N9FEG=7)I;F<@82!$2$-0"B,@2X@5&AE($E30R!S97)V97(@=7-E&5C=71A8FQE +M('=H96X@82!$2$-0(&QE87-E(&ES(&-R96%T960@;W(@9&5S=')O>65D+@HC +M(%1H92!A`HC86QI87,],2XR+C,N +M,"PU+C8N-RXP+#(U-2XR-34N,C4U+C`*(R!A;F0@=&AI"UT87)G970@9F]R(&%L;"!L;V-A;`HC(&UA8VAI;F5S+@HC;&]C86QM>`H* +M(R!2971U6]U('=A;G0@=&\@ +M3XL/'=E:6=H=#X*(R!)9B!T:&4@9&]M86EN('!A&%M<&QE+F-O;2!D;VUA:6X@=&\* +M(R!L9&%P&%M +M<&QE+F-O;2!D;VUA:6X@=&\*(R!L9&%P&%M<&QE+F-O;2PS +M.#DL,@H*(R!!(%-25B!R96-O'!A;G-I;VX@ +M9&]N92!F;W(@4U)6(')E8V]R9',@7V1O97-?;F]T"B,@;V-C=7(@9F]R(%!4 +M4B!R96-O'!A;G-I;VX@9&]N92!F;W(@4U)6 +M(')E8V]R9',@7V1O97-?;F]T"B,@;V-C=7(@9F]R(%185"!R96-O&%M<&QE(%-01BX*(W1X="UR96-O5\@=V]R:W,*(R!F;W(@=&%R9V5T3TO=F%R +M+VQO9R]D;G-M87-Q+FQO9PH*(R!);F-L=61E(&$@86YO=&AE'0*```````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````971C+V-R;VXN9&%I +M;'DO```````````````````````````````````````````````````````` +M`````````````````````````````````````````````````````````#`P +M,#`W-34`,#`P,32]C;&5A2!C86-H92!T;R!U;'1I;6%T96QY(')E9'5C92!S=V%P<&EN9PH*7,O=FTO9')O<%]C86-H97,*```````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````````````971C+W9M +M=V%R92UT;V]LF4@:V5P=#H@,2!-0@IV;7-V8RYM +M87A,;V=3:7IE(#T@,0H*(R!$969I;F5S('1H92`B=FUT;V]L"!S:7IE(#4P30IS:7IE(#4P30IC;VUP0HC3&ES=&5N061D7,@9F]R('!R;W1O8V]L('9E2`O971C+W-S:"]SF4@;V8@97!H +M96UE7-L;V=& +M86-I;&ET>2!!551("E-Y65S"D%U=&AO7,@:6X@+V5T8R]S65S(&EF('EO=2!D;VXG="!T'0@<&%S65S"D=34T%024-L96%N=7!#65S"@HC($%C8V5P="!L;V-A;&4M4]F9G-E="`Q,`HC6#$Q57-E3&]C86QH;W-T +M('EE65S"B-5&PR='!D```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````,#`P,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,34`,3,U +M-C$W,C4Q-3(`,#$T-C`W`"`P```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````'5S=&%R("``9&%R6]U('=A;G0@=&\@=7-E(&$@9&EF9F5R +M96YT(&EN=&5R9F%C92!O6]U(&EN2!F2!)4"!A9&1R97-S+`H@("`@("`@(",@>6]U(&-A;B!U7-L;V'-O8VL@(R!P7-T96T@;&]G9VEN9PHD36]D3&]A9"!I;6ML;V<@ +M("`C('!R;W9I9&5S(&ME2!R:VQO9V0I"B,D36]D3&]A9"!I;6UA7-L;V<@7-T96TN("!3<&QI="!I="!U<"!S;R!T:&%T"B,@:70@:7,@96%S>2!T +M;R!W2YL;V<* +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````````````&5T8R]M;V1P +M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@ +M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2!C86-H92!T +M;R!U;'1I;6%T96QY(')E9'5C92!S=V%P<&EN9PH*<&AY;65M/20H9G)E97QA +M=VL@)R]>365M.B][<')I;G0@)#)])RD*:68@6R`D<&AY;65M("UL="`U,3,P +M,#`@73L@=&AE;@H@('-Y;F,@)B8@96-H;R`Q(#X@+W!R;V,O2YC;VYF```````````````````````````````````````````````` +M```````````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P +M,3$-O;FYE8W1I +M;VYS4&5R0VAI;&0@("`),3`P,`H\+TEF36]D=6QE/@H*(R!V:6TZ('-Y;G1A +M>#UA<&%C:&4@=',]-"!S=STT('-T6U,:6YK&5S($9O;&QO=U-Y;4QI;FMS($UU;'1I5FEE=W,*"0E!;&QO=T]V97)R:61E +M($%L;`H)"4]R9&5R(&%L;&]W+&1E;GD*"0EA;&QO=R!F&5C0T=)("U-=6QT:59I97=S +M("M3>6U,:6YK2QA;&QO=PH@("`@("`@($1E;GD@9G)O +M;2!A;&P*("`@("`@("!!;&QO=R!F3X*"3Q$:7)E8W1O0H)"6%L;&]W(&9R;VT@86QL"@D\+T1I3X*"@E38W)I +M<'1!;&EA0H)"4%L;&]W(&9R;VT@86QL"@D\ +M+T1I3X*"@E%T%004-(15],3T=?1$E2?2]ET%004-(15],3T=?1$E2 +M?2]S2QA;&QO=PH)"41E;GD@ +M9G)O;2!A;&P*"0E!;&QO=R!F2!T +M:&4*"2,@("!34TQ#97)T:69I8V%T949I;&4@9&ER96-T:79E(&ES(&YE961E +M9"X*"5-33$-E0H*"2,@("!397)V +M97(@0V5R=&EF:6-A=&4@0VAA:6XZ"@DC("`@4&]I;G0@4U-,0V5R=&EF:6-A +M=&5#:&%I;D9I;&4@870@82!F:6QE(&-O;G1A:6YI;F<@=&AE"@DC("`@8V]N +M8V%T96YA=&EO;B!O9B!014T@96YC;V1E9"!#02!C97)T:69I8V%T97,@=VAI +M8V@@9F]R;2!T:&4*"2,@("!C97)T:69I8V%T92!C:&%I;B!F;W(@=&AE('-E +M0H)(R`@('1H92!R969E +M2`H0T$I.@H)(R`@(%-E="!T:&4@0T$@8V5R=&EF:6-A +M=&4@=F5R:69I8V%T:6]N('!A=&@@=VAE6]U(&YE960@:&%S:"!S>6UL +M:6YK6UL:6YK7!E*3H* +M"2,@("!#;&EE;G0@8V5R=&EF:6-A=&4@=F5R:69I8V%T:6]N('1Y<&4@86YD +M(&1E<'1H+B`@5'EP97,@87)E"@DC("`@;F]N92P@;W!T:6]N86PL(')E<75I +M2!T;R!V97)I9GD@=&AE(&-E +M4-L:65N +M="!R97%U:7)E"@DC4U-,5F5R:69Y1&5P=&@@(#$P"@H)(R`@($%C8V5S6YT87@@:7,@80H)(R`@(&UI>'1UU-33%]#25!(15)]("%^(&TO7BA%6%!\3E5,3"DO(%P* +M"2,@("`@("`@("`@("!A;F0@)7M34TQ?0TQ)14Y47U-?1$Y?3WT@97$@(E-N +M86ME($]I;"P@3'1D+B(@7`H)(R`@("`@("`@("`@(&%N9"`E>U-33%]#3$E% +M3E1?4U]$3E]/57T@:6X@>R)3=&%F9B(L(")#02(L(")$978B?2!<"@DC("`@ +M("`@("`@("`@86YD("5[5$E-15]71$%9?2`^/2`Q(&%N9"`E>U1)345?5T1! +M67T@/#T@-2!<"@DC("`@("`@("`@("`@86YD("5[5$E-15](3U52?2`^/2`X +M(&%N9"`E>U1)345?2$]54GT@/#T@,C`@("`@("`@*2!<"@DC("`@("`@("`@ +M("!OU)%34]415]!1$12?2`]?B!M+UXQ.3)<+C2!E>&ES=&EN9R!W:&5N(&-L +M:65N=`H)(R`@("`@875T:&5N=&EC871I;VX@:7,@=7-E9"DN(%1H:7,@8V%N +M(&)E('5S960@=&\@:6UP;W)T('1H92!C97)T:69I8V%T97,*"2,@("`@(&EN +M=&\@0T=)('-C'!O'!E;G-I=F4@;W!E2!E;F%B;&5S('1H90H)(R`@("`@97AP;W)T871I;VX@9F]R +M($-'22!A;F0@4U-)(')E<75E'!O2`O=7-R+VQI8B]C9VDM8FEN/@H)"5-33$]P=&EO;G,@*U-T +M9$5N=E9A6]U(&-A;B!U6]U(')E8V5I=F4@ +M22]/(&5R2!A;&5R="!I2!F;W(@8G)O=W-E6]U(&MN;W<@=&AA="!T:&5I2X*"2,@("!. +M;W1I8V4Z($UO2!W86YT('1O(&1I2P@;VYE(&AA6]U(&IU2!A;'-O"B,@:&%V92!T;R!C +M:&%N9V4@=&AE(%9I6]U(&AA=F4@=7!GB!A;F0*(R!214%$ +M344N1&5B:6%N+F=Z"@I,:7-T96X@,3`N,2XQ+C$Z.#$X,`H*/$EF36]D=6QE +M(&UO9%]S0HC('1E;&P@ +M9&YS;6%S<2!T;R!F:6QT97(@;W5T('%U97)I97,@=VAI8V@@=&AE('!U8FQI +M8R!$3E,@8V%N;F]T"B,@86YS=V5R+"!A;F0@=VAI8V@@;&]A9"!T:&4@2!T:&4@2X*"B,@3F5V97(@9F]R=V%R9"!P;&%I +M;B!N86UE2X*(R!.;W1E('1H870@*&%M;VYG2!O9B!T:&4@=7!S=')E86T*(R!S97)V97)S(&ET(&MN +M;W=S(&%B;W5T(&%N9"!T2!E86-H('%U97)Y"B,@=VET:"`@96%C:"`@2`@:6X@('1H92`@;W)D97(@('1H97D@("!A<'!E87(@ +M("!I;@HC("]E=&,O2!A&%M<&QE(&]F(')O=71I;F<@4%12('%U97)I97,@=&\@ +M;F%M97-E2!D;VUA:6YS(&AE6]U('=A;G0@=&\@9F]R8V4@=&\@86X@ +M25`@861D&%M<&QE(&)E;&]W('-E;F0@86YY +M(&AO6]U('=A;G0@ +M9&YS;6%S<2!T;R!L:7-T96X@9F]R($1(0U`@86YD($1.4R!R97%U97-T&-E<'0M +M:6YT97)F86-E/6QO"@HC($]R('=H:6-H('1O(&QI2!A9&1R +M97-S("AR96UE;6)E2!$3E,@7-T96US('=H:6-H +M('-U<'!O6]U(&UA>2!N965D('1H:7,@:7,@=VAE;@HC(')U;FYI;F<@ +M86YO=&AE6]U(&1O;B=T('=A;G0@9&YS;6%S<2!T;R!R +M96%D("]E=&,O:&]S=',L('5N8V]M;65N="!T:&4*(R!F;VQL;W=I;F<@;&EN +M92X*(VYO+6AO6]U('=A;G0@:70@=&\@2!P;W1E;G1I86QL>2!S971T:6YG('1H90HC +M("`@(&1O;6%I;B!O9B!A;&P@'!A;F0M:&]S +M=',B"B-D;VUA:6X],BYV;6]P0HC(&$@;&5A6]U(&AA=F4@;6]R92!T:&%N(&]N92!N971W;W)K+"!Y;W4@ +M=VEL;"!N965D('1O"B,@2!P87)A;65T97)S(&9O&%M<&QE +M7,@7,@:70G +M2!T +M:&4@;6%C:&EN92!W:71H(&5T:&5R;F5T"B,@861D'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ +M(G)E9"(@=&\*(R!A;GD@;6%C:&EN92!W:71H(&5T:&5R;F5T(&%D9')E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ +M(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO"(*(V1H8W`M +M=F5N9&]R8VQA2!M86-H:6YE(&]N90HC +M(&]F('=H;W-E($1(0U`@=7-E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@ +M87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO2!N86UE.@HC(')U;B`B9&YS;6%S<2`M+6AE;'`@9&AC<"(@=&\@9V5T +M(&$@;&ES="X*(R!.;W1E('1H870@86QL('1H92!C;VUM;VX@2!D;G-M87-Q+B!9;W4@=F5R>2!L:6ME;'D@=VEL;"!N;W0@ +M;F5E9`HC(&%N>2!D:&-P+6]P=&EO;G,N($EF('EO=2!U2!A2!W;W)K0HC(&1E9F%U;'0@*#$L +M(#,L(#8L(#$R+"`R."D@=&AE('-A;64@;&EN92!W:6QL('-E;F0@82!Z97)O +M+6QE;F=T:"!O<'1I;VX*(R!F;W(@86QL(&]T:&5R(&]P=&EO;B!N=6UB97)S +M+@HC9&AC<"UO<'1I;VX],PH*(R!3970@=&AE($Y44"!T:6UE('-E0H*(R!3970@=&AE(&1E +M9F%U;'0@=&EM92UT;RUL:79E('1O(#4P"B-D:&-P+6]P=&EO;CTR,RPU,`H* +M(R!3970@=&AE(")A;&P@2!A;B!O<'1I +M;VX@=VAI8V@@=VEL;"!O;FQY(&)E('-E;G0@=&\@=&AE(")R960B(&YE='=O +M2!A6]U(&UA>2!W86YT('1O('5N8V]M;65N="!T:&5M +M(&EF('EO=2!U2!N971B:6]S('-C;W!E+@H*(R!396YD(%)&0RTS +M,SDW($1.4R!D;VUA:6X@2!W:&5N('1H92!C;&EE;G0@71E(&EN=&5G97(@+2!T:&%T)W,@=VAA="!M:6-R;W-O9G0@=V%N +M=',N(%-E90HC(&AT='`Z+R]T96-H;F5T,BYM:6-R;W-O9G0N8V]M+U=I;F1O +M=W-397)V97(O96XO;&EB2]A-S!F,6)B-RUD,F0T+30Y9C`M.39D-BTT +M8C2!S;VUE(&-O;F9I9W5R871I;VYS(&]F"B,@ +M171H97)B;V]T('1O(&%L;&]W(&ES('1O(')E8V]G;FES92!T:&4@1$A#4"!S +M97)V97(N"B-D:&-P+6]P=&EO;CUV96YD;W(Z171H97)B;V]T+#8P+")%=&AE +M"X@3F]T92!T:&%T +M('=E(&YE960@=&\@2!N965D"B,@=&AI2!F:6QE0HC('1H92!U&5L:6YU>"YR +M960M;F5T"@HC($%N(&5X86UP;&4@;V8@9&AC<"UB;V]T('=I=&@@86X@97AT +M97)N86P@2!C;&EE +M;G0@=VAI8V@@8G)O861C87-T6]U(&UI9VAT(&5N9"!U +M<"!A8V-I9&5N=&%L;'D@8V]N9FEG=7)I;F<@82!$2$-0"B,@2X@5&AE($E30R!S +M97)V97(@=7-E2!T:&4@:&]S=&YA;64*(R!I9B!T:&5R92!IF4@:&5R92X*(V-A8VAE +M+7-I>F4],34P"@HC($EF('EO=2!W86YT('1O(&1I2!R97-P;VYS97,@=VAI8V@@8V]M92!F;W)M("]E=&,O:&]S=',@86YD +M('1H92!$2$-0(&QE87-E"B,@9FEL92!H879E(%1I;64M5&\M3&EV92!S970@ +M87,@>F5R;RP@=VAI8V@@8V]N=F5N=&EO;F%L;'D@;65A;G,*(R!D;R!N;W0@ +M8V%C:&4@9G5R=&AE6]U(&%R92!H87!P>2!T;R!T6]U(&-A;B!S970@82!T:6UE+71O+6QI=F4@*&EN"B,@6]U('=A;G0@9&YS;6%S<2!T +M;R!D971E8W0@871T96UP=',@8GD@5F5R:7-I9VX@=&\@"!U<"!$ +M3E,@2!W;W)K"!T;R`U+C8N-RYX"B-A;&EA"UT87)G970@9F]R(&%L;"!L;V-A;`HC(&UA8VAI;F5S+@HC;&]C86QM>`H* +M(R!2971U6]U('=A;G0@=&\@ +M3XL/'=E:6=H=#X*(R!)9B!T:&4@9&]M86EN('!A&%M<&QE+F-O;2!D;VUA:6X@=&\* +M(R!L9&%P&%M +M<&QE+F-O;2!D;VUA:6X@=&\*(R!L9&%P&%M<&QE+F-O;2PS +M.#D*"B,@5'=O(%-25B!R96-O&%M<&QE+F-O;2PS.#DL,0HC&%M<&QE+F-O;2QL9&%P&%M<&QE+F-O +M;0HC&%M<&QE+F-O;0H*(R!4:&4@9F]L +M;&]W:6YG(&QI;F4@65E(%!A9V4N7VAT='`N7W1C<"YD;G,M'0M3TO=F%R+VQO9R]D +M;G-M87-Q+FQO9PH*(R!);F-L=61E(&$@86YO=&AE'0*```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````&5T8R]I<'-E8RYS96-R971S```````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P,3PH@("`@;6%X2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P +M.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N +M71R=6YC871E"GT*```````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````&5T8R]L;V=R;W1A=&4N +M9"]C;VYN=')A8VMD```````````````````````````````````````````` +M```````````````````````````````````````````````````````P,#`P +M-C0T`#`P,#$W-3``,#`P,3PH@("`@;6%X6-O;7!R97-S"@H@("`@<&]S=')O=&%T90H@("`@("`@(&EF +M(%L@+64@+W9A2!O9B!T:&4@3&EC96YS92!A +M=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O +M'!R97-S(&]R(&EM<&QI960N("!3 +M964@=&AE($QI8V5NPH@("`@("`@(')O +M=&%T92`U"B`@("`@("`@;6%X2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N'-I>F4@,3!- +M"B`@("`@("`@;6ES0H@("`@("`@ +M(&-O;7!R97-S"B`@("`@("`@8V]P>71R=6YC871E"GT*```````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````!E=&,O;&]G0H)8V]M<')E71R=6YC871E"B`@("`@("!R;W1A=&4@,PH@("`@("`@8V]M<')E'0*("`@("`@(&UA>'-I>F4@,3!-"B`@("`@("!N;W1I9F5M +M<'1Y"GT*```````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````&5T8R]L;V=R;W1A=&4N9"]R0H)8V]M<')E +M2YL;V<@>PH@("`@0H@("`@;6%X7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ +M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E +M(&%T"B,*(R`@(&AT='`Z+R]W=W2\````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````,#`P,#'DN8V9G```````````````````````````````````````````` +M```````````````````````````````````````````````````````````P +M,#`P-C0T`#`P,#$W-3``,#`P,3'D*"75S97(@:&%P0H)9W)O +M=7`@:&%P0H)9&%E;6]N"@ID969A=6QT7!E(CHB9W5E2(Z(C$W,BXQ-BXQ+C$B+`H)(F1E9F%U +M;'1?96YT2(*?0H````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````;W!T+V-L;W5D+W1E7!E(CH@(FEC;7`B"B`@("`@("`@("`@('TL"B`@("`@("`@("`@ +M('L*("`@("`@("`@("`@("`@(")A;&QO=V5D(CH@=')U92P*("`@("`@("`@ +M("`@("`@(")C:61R(CH@(C$P+C`N,BXP+S@B+`H@("`@("`@("`@("`@("`@ +M(F9I7!E(CH@(G5D<"(*("`@("`@("`@ +M("`@?2P*("`@("`@("`@("`@>PH@("`@("`@("`@("`@("`@(F%L;&]W960B +M.B!T7!E(CH@(FYE='=OR)P=6)L:6-?:7`B.B(Q +M,"XP+C(N,3`R(BP*(G-O=7)C95]N870B.G1R=64L"B)A9&0B.G1R=64L"B)O +M;F5?=&]?;VYE7VYA="(Z9F%L2(Z(C$P+C`N,BXQ(BP*(FYE=&UA2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H +M92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2!C;61?;&EN92YJ2!I<',P,#`Q+FIS;VX*+V]P="]C;&]U9"]B:6XO +M=7!D871E7V-O;F9I9RYP>2!I<',P,#`R+FIS;VX*+V]P="]C;&]U9"]B:6XO +M=7!D871E7V-O;F9I9RYP>2!I<',P,#`S+FIS;VX*```````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````;W!T+V-L;W5D+W1ER)P +M=6)L:6-?:7`B.B(Q,"XP+C(N,3`S(BP*(G-O=7)C95]N870B.G1R=64L"B)A +M9&0B.G1R=64L"B)O;F5?=&]?;VYE7VYA="(Z9F%L2(Z(C$P+C`N,BXQ(BP*(FYE=&UAPH)(FQO8V%L7W!U8FQI8U]I<"(Z(C$W,BXQ-BXQ +M+C$B+`H)(FQO8V%L7V=U97-T7V-I9'(B.B(Q-S(N,38N,2XP+S(T(BP*"2)L +M;V-A;%]P=6)L:6-?9V%T97=A>2(Z(C$W,BXQ-BXQ+C$B+`H)(G!E97)?9V%T +M97=A>5]I<"(Z(C$P+C(P,"XR,#`N,2(L"@DB<&5E2(Z(C-D97,M;60U(BP* +M"2)I:V5?<&]L:6-Y(CHB,V1E7)I9VAT(&]W +M;F5R6]U +M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O +M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W +M=W2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NW!R:6YT("0Y.WTG*0H):68@ +M6R`D4D]55$527U-4051%(#T@(E50(B!="@ET:&5N"@D@("`@4U1!5%53/4U! +M4U1%4@H)96QI9B!;("123U5415)?4U1!5$4@/2`B1$]73B(@70H)=&AE;@H) +M("`@(%-405154SU"04-+55`*"69I"F9I"@IE8VAO(")3=&%T=7,Z("1[4U1! +M5%53?2(*```````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````!O<'0O8VQO=60O=&5M<&QA=&5S+VAE87)T8F5A="YS:"YT96UP;``` +M```````````````````````````````````````````````````````````` +M````````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC +M"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ +M=&AE($QI8V5N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H +M='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI +M8V5NPH@("`@36]D +M92!&5$97('L*("`@("`@("`C"B`@("`@("`@(R!3:7IE(&]F('1H92!R97-E +M;F0@<75E=64@*&EN(&]B:F5C=',I+B!4:&ES(&ES('1H92!M87AI;75M"B`@ +M("`@("`@(R!N=6UB97(@;V8@;V)J96-T2!T;R!S=&]R92!D96%D(&]B:F5C=',N"B`@("`@("`@(R!$969A +M=6QT(&ES(#$S,3`W,B!O8FIE8W1S+@H@("`@("`@(",*("`@("`@("`C(%)E +M6]U('-E="!A(&QO=R!V86QU92P@5$-0(&5N +M=')I97,@:6X*("`@("`@("`C($5S=&%B;&ES:&5D('-T871E&%M<&QE+`H@("`@("`@(",@86X@ +M4U-((&-O;FYE8W1I;VX@=VET:&]U="!+965P06QI=F4@96YA8FQE9"X@268@ +M;F]T('-E="P*("`@("`@("`C('1H92!D865M;VX@=7-E6]U(&1E +M8W)E87-E('1H:7,*("`@("`@("`C('9A;'5E+"!T:&4@;G5M8F5R(&]F(&%C +M:VYO=VQE9V1M96YT6]U"B`@("`@("`@(R!I;F-R96%S +M92!T:&ES('9A;'5E+"!T:&4@'!E6-L97,@6]U('1O(&1I +M'1E'1E +MF%T:6]N +M(&UE2!O9B!Y;W5R(&5X:7-T:6YG(&EN=&5R9F%C97,N($EF +M(&%N>2!D;W5B="P*("`@("`@("`C(&1O(&YO="!M;V1I9GD@=&AI0H@("`@("`@(",@9&]U +M8G0L(&1O(&YO="!M;V1I9GD@=&AIF%T:6]N(&UEF%T:6]N(&UE6]U"B`@("`@ +M("`@(R!N;W1I8V4@6]U(&UA>2!W86YT('1O +M(&EN8W)E87-E('1H92!S:7IE"B`@("`@("`@(R!O9B!T:&4@2!T;R!A8VAI979E(&9A=6QT+71O;&5R86YC92X@26X@ +M8V%S92!O9B!D;W5B="P@9&\*("`@("`@("`C(&YO="!M;V1I9GD@=&AI6]U(&-A;B!O;FQY('-E;&5C="!O;F4N"B`@("`C"B`@("`C(%5$4"![ +M"B`@("`@("`@(PH@("`@("`@(",@5410(&%D9')E6]U(&%R92!G;VEN9R!T;R!UF4*("`@("`@("`C"B`@("`@("`@ +M(R!28W93;V-K971"=69F97(@,3(T.3(X,`H*("`@("`@("`C"B`@("`@("`@ +M(R!%;F%B;&4O1&ES86)L92!M97-S86=E(&-H96-KPH@("`@(PH@("`@(R!3970@=&AE +M(&YI8V4@=F%L=64@;V8@=&AE(&1A96UO;BP@=&AI6]U(&-A;B!S96QE8W0@8F5T=V5E +M;@H@("`@(R!24B!A;F0@1DE&3R!A;F0@=&AE('!R;V-EPH@("`@(R`@(%1Y<&4@1DE&3PH@("`@(R`@(%!R:6]R:71Y +M(#DY"B`@("`C('T*"B`@("`C"B`@("`C($YU;6)E2X*("`@(",@4F5A9"!S;VUE(&1O8W5M96YT +M2!K965P +M('-O;64@9&5A9"!E;G1R:65S(&-A8VAE9"!F;W(@<&]S7-L;V2!N86UE +M("AD865M;VX@*&1E9F%U;'0I(&]R(&QO8V%L,"XN-RD*("`@(",@1&5F875L +M=#H@;V9F"B`@("`C"B`@("!3>7-L;V<@;VX*"B`@("`C"B`@("`C($QO8VMF +M:6QE"B`@("`C"B`@("!,;V-K1FEL92`O=F%R+VQO8VLO8V]N;G1R86-K9"YL +M;V-K"@H@("`@(PH@("`@(R!5;FEX('-O8VME="!C;VYF:6=UF5-87A'&%M<&QE(&-O;F9I9W5R +M871I;VX@9FEL92!S971S('1H90H@("`@(R!S:7IE('1O(#(@34)Y=&5S('1O +M(&%V;VED('1H:7,@F4*("`@(",@:68@:70@9&5T96-T&EM=6T@8G5F9F5R('-I>F4@9W)O=W1H('1H870@8V%N(&)E(')E86-H +M960N(%1H:7,@97AA;7!L92!F:6QE"B`@("`C('-E=',@=&AE('-I>F4@=&\@ +M."!-0GET97,N"B`@("`C"B`@("!.971L:6YK0G5F9F5R4VEZ94UA>$=R;W=T +M:"`X,S@X-C`X"@H@("`@(PH@("`@(R!)9B!T:&4@9&%E;6]N(&1E=&5C=',@ +M=&AA="!.971L:6YK(&ES(&1R;W!P:6YG('-T871E+6-H86YG92!E=F5N=',L +M"B`@("`C(&ET(&%U=&]M871I8V%L;'D@6YC:')O +M;FEZ871I;VX@86=A:6YS="!T:&4@2V5R;F5L"B`@("`C(&%F=&5R(#,P('-E +M8V]N9',@*&1E9F%U;'0@=F%L=64I+B!297-Y;F-H6]U('=A;G0@6YC+B!4:&ES(&]P=&EO;B!I"!K97)N96P@/CT@ +M,BXV+C,Q+@H@("`@(PH@("`@(R!.971L:6YK179E;G1S4F5L:6%B;&4@3V9F +M"@H@("`@(PH@("`@(R!">2!D969A=6QT+"!T:&4@9&%E;6]N(')E8V5I=F5S +M('-T871E('5P9&%T97,@9F]L;&]W:6YG(&%N"B`@("`C(&5V96YT+61R:79E +M;B!M;V1E;"X@66]U(&-A;B!M;V1I9GD@=&AIF%T:6]N(&UO +M9&4L('1H92!P;VQL:6YG(&UO9&4@8V%N(&]N;'D@9W5AF5S('1H92!H86YD;&EN9R!O9B!S +M=&%T92UC:&%N9V4@979E;G1S(&-O;6EN9PH@("`@(R!F2`H:6X@ +M=&5R;7,@;V8*("`@(",@2!T:')E92!F:6QT97(M6]U(&-A;B!D969I;F4@=&AE(&5V +M96YT(&9I;'1E2!A=F]I +M9&EN9R!T:&4@8V]P>2!O9B!T:&4@979E;G0@;65S6]U(')E<75I"!K97)N96P@/CT@,BXV+C(Y('1O"B`@("`C +M(&9I;'1E6]U('=A;G0@=&\@PH@ +M("`@("`@(",*("`@("`@("`C($%C8V5P="!O;FQY(&-E65R(#0@<')O +M=&]C;VPN"B`@("`@("`@(PH@("`@("`@(%!R;W1O8V]L($%C8V5P="!["B`@ +M("`@("`@("`@(%1#4`H@("`@("`@("`@("!30U10"B`@("`@("`@("`@($1# +M0U`*("`@("`@("`@("`@5410"B`@("`@("`@("`@($E#35`@(R!4:&ES(')E +M<75I2!A;&P@=&AE"B`@("`@("`@(R!)4"!A +MPH@("`@("`@("`@ +M("!)4'8T7V%D9')E2!A;B!)4'8V(&%D9')E2!F;&]W('-T871E+@H@("`@("`@(",@5&AI +M2!B86-K=7`*("`@("`@("`C(&9I +M7!E/6YO=&EF>0H@("`@4WES=&5M9"!O;@I]"@`````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````!O<'0O8VQO=60O=&5M +M<&QA=&5S+V-H96-K7VAE87)T8F5A="YS:"YT96UP;``````````````````` +M````````````````````````````````````````````````````````,#`P +M,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7-T96UC=&P@2`M+69A=6QT"@H@("`@<&MI;&P@+3D@:V5E<&%L:79E9"`^/B`D4D]55$52 +M7TQ/1R`R/B8Q('Q\('1R=64*("`@('!K:6QL("TY(&-O;FYT&ET"F9I"@``````````````;W!T+V-L;W5D+W1E;7!L871E +M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI +M86YC90HC('=I=&@@=&AE($QI8V5N6]U +M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HA +M('=I=&@@=&AE($QI8V5NPH@("`@PH@("`@("`@(&AE87)T +M8F5A=`H@("`@?0H*("`@(&YO=&EF>5]B86-K=7`@(B]O<'0O8VQO=60O8FEN +M+VUA2`M+6)A8VMU<"(*("`@(&YO=&EF>5]M87-T97(@(B]O<'0O +M8VQO=60O8FEN+VUA2`M+6UA5]F875L +M="`B+V]P="]C;&]U9"]B:6XO;6%S=&5R+G!Y("TM9F%U;'0B"GT*```````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````!O<'0O8VQO=60O8FEN+P`````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````,#`P,#&4N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&ET(#$*?0H*&5?8V9G7V9I;&5N86UE(#P\14]&"D1%1D%53%0@ +M9&5F875L=`I04D]-4%0@,0I424U%3U54(#(V"D1)4U!,05D@8F]O="YMF4]-C8P,#`@:6YI=')D/21I;FET0`````````````````````````````````````````` +M````````````````````````````````````````````,#`P,#2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA +M=R!O'!R97-S(&]R(&EM<&QI960N +M("!3964@=&AE($QI8V5N7!E(ET@/3T@(G-T871I8VYA +M=')U;&5S(CH*("`@("`@("`@("`@;F5W7!E(ET@/3T@(F9O"`](&1B86=;"AF;W)W87)D*0H@("`@("`@("`@("`@("`@("`@(&EF(&YO +M="!I;F1E>"`]/2`M,3H*("`@("`@("`@("`@("`@("`@("`@("`@9&)A9UMS +M;W5R8V5?:7!=6VEN9&5X72`](&YE=W)U;&4*("`@("`@("`@("`@("`@("`@ +M("!E;'-E.@H@("`@("`@("`@("`@("`@("`@("`@("!D8F%G6W-O=7)C95]I +M<%TN87!P96YD*&YE=W)U;&4I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@ +M("`@("`@("`@("`@("`@(&1B86=;7!E(ET@/3T@ +M(G-T871I8VYA=')U;&5S(CH*("`@("`@("`@("`@("`@(&EF('-O=7)C95]I +M<"!I;B!D8F%G+FME>7,H*3H*("`@("`@("`@("`@("`@("`@("!D96P@9&)A +M9UMS;W5R8V5?:7!="B`@("`@("`@("`@(&5L:68@7,H*3H*("`@("`@("`@("`@("`@("`@("!I;F1E>"`] +M("TQ"B`@("`@("`@("`@("`@("`@("`@9F]R(&9O%T*"B`@("!R971U2!T:&4@<'5B;&EC('-I9&4L +M('1H;W-E(&UU7!E(ET@/3T@7!E(ET@/3T@(G-T871I +M8VYA="(Z"B`@("`@("`@2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET(#$*9FD*"G5S86=E*"D@ +M>PH@('!R:6YT9B`B57-A9V4Z("5S("U;8WQG?')\;GQD72!;+6P@/'!U8FQI +M8R!G871E=V%Y/ET@6RUV(#QV<&,@8VED&ET(#(@)&QO8VL@)&QO8VME9`H).SL*("!E +M&ET("0_("1L;V-K("1L;V-K960*9FD*"FEF +M(%L@(B1N9FQA9R(@/3T@(C$B(%T*=&AE;@H@("-G971?=G!N7W5S86=E"B`@ +M=6YL;V-K7V5X:70@)#\@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)&1F;&%G +M(B`]/2`B,2(@70IT:&5N"B`@(W)E;6]V95]U&ET(#`@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)')F;&%G(B`]/2`B +M,2(@70IT:&5N"B`@71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A +M=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&-E +M<'0@24]%2@I"B`@("`@("`@("`@ +M("`@("`@("`@9W5E22R)$;VU57U)E<75E&-E<'0@17AC97!T:6]N(&%S(&4Z +M"B`@("`@("`@("`@("`@("`@("`@;&]G9VEN9RYE7!E)UT@/3T@)V%L;"<@86YD(&]B:ELG +M7!E(#T@(F%N>2(*("`@("`@("`@("`@:68@(FEC +M;7!?='EP92(@:6X@7,H*2!A;F0@7!E)UT*("`@("`@("`@("`@:68@(FEC;7!? +M8V]D92(@:6X@7,H*2!A;F0@7!E)UTL('-E;&8N7!E("5S("UJ("5S(B`E("AI8VUP7W1Y<&4L('-E;&8N&5C=71E*&1S=$EP2==.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5; +M)V%C=&EO;B==(#T@(D%#0T505"(*("`@("`@("`@("`@("`@("`@("!E;'-E +M.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5;)V%C=&EO;B== +M(#T@(D123U`B"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ +M("`@("`@(",@1F]R(&]T:&5R(')U;&5S(&%D9&5D+"!I9B!D969A=6QT7V5G +M7!E("5S(B`E(&EC;7!?='EP90H@("`@("`@("`@("`@ +M("`@96QI9B!R=6QE6R=P7!E +M+B!3;RP@:71S(&9W(&%T=')I8G5T92!I7!E(#T@ +M(F%N>2(*("`@("`@("`@("`@("`@('-E;&8N<')O=&]C;VP@/2!S96QF+G1Y +M<&4*("`@("`@("`@("`@("`@(&EF(")I8VUP7W1Y<&4B(&EN(')U;&4N:V5Y +M7!E +M+"!R=6QE6R=I8VUP7V-O9&4G72D*("`@("`@("`@("`@("`@(&EF('-E;&8N +M='EP92`]/2`B<')O=&]C;VPB.@H@("`@("`@("`@("`@("`@("`@(&EF(')U +M;&5;)W!R;W1O8V]L)UT@/3T@-#$Z"B`@("`@("`@("`@("`@("`@("`@("`@ +M(')U;&5;)W!R;W1O8V]L)UT@/2`B:7!V-B(*("`@("`@("`@("`@("`@("`@ +M("!S96QF+G!R;W1O8V]L(#T@&5C=71E*")I<'1A +M8FQE+4$O:7!T86)L97,@+70@9FEL=&5R("U$+V&5C=71E*")I +M<'-E="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP +M&5C=71E*")I<'-E="`M +M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP2!V +M86QI9"!D871A"B`@("`@("`@("`@("`@("!I9B!F;VQD97(@(3T@(G5S97)D +M871A(B!A;F0@9F]L9&5R("$](")M971A9&%T82(Z"B`@("`@("`@("`@("`@ +M("`@("`@8V]N=&EN=64*"B`@("`@("`@("`@("`@("!I9B!F:6QE(#T]("(B +M.@H@("`@("`@("`@("`@("`@("`@(&-O;G1I;G5E"@H@("`@("`@("`@("`@ +M("`@7,N97AI="@Q*0H@("`@("`@("`@("!I9B!O2Q!;&QO=UQN1&5N>2!F2!E>&ES=',L('=E(&1O(&ET('1H:7,@ +M=V%Y(&9O7,N97AI="@Q +M*0H*("`@("`@("!F:"`](&]P96XH:'1A8V-E2`](")2 +M97=R:71E4G5L92!>;65T82UD871A+R@N*RDD("`N+B\B("L@9F]L9&5R("L@ +M(B\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%=(@H@("`@("`@("`@("!H +M=&%C8V5S7,N97AI="@Q*2`@ +M(R!&25A-10H@("`@("`@(')E='5R;B!4&ET*#$I("`C($9)6$U%"B`@("`@("`@:7!S96,N=G!N+2@N*BDN8V]N9B(L(&9I;&4I"B`@("`@ +M("`@("`@(&EF(&TZ"B`@("`@("`@("`@("`@("!S96QF+F-O;F9I<',N87!P +M96YD*&TN9W)O=7`H,2DI"@H@("`@("`@(&9O&5C=71E*")I<'-E +M8R!R96QO860B*0H*("`@(&1E9B!C;VYF:6=U#4R-2`M:B!!0T-%4%0B("4@9&5V72D*("`@ +M("`@("!F;W(@;F5T(&EN(&]B:ELG<&5E&UA&UA5]I<"=="B`@("`@("`@<&5E7!E/71U;FYE;"(I"B`@ +M("`@("`@9FEL92YA9&1E<2@B(&%U=&AB>3US96-R970B*0H@("`@("`@(&9I +M;&4N861D97$H(B!K97EE>&-H86YG93UI:V4B*0H@("`@("`@(&9I;&4N861D +M97$H(B!I:V4])7,B("4@:6ME<&]L:6-Y*0H@("`@("`@(&9I;&4N861D97$H +M(B!I:V5L:69E=&EM93TE3TS,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1T:6UE;W5T/3$R +M,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1A8W1I;VX]')A;F=E*#,I.@H@("`@("`@("`@("!R +M97-U;'0@/2!#&5C=71E*"=I<'-E8R!S=&%T=7,@=G!N+25S +M('P@9W)E<"`B)7,B)R`E("AR:6=H='!E97(L('!E97)L:7-T+G-P;&ET*"(L +M(BP@,2E;,%TI*0H@("`@("`@("`@("!I9B!L96XH2P@)R,G*0H@("`@("`@(&EF(&YO="!U&5C +M=71E*")T9&)D=6UP("]V87(O&5C=71E*"=K:6QL("TY("5S)R`E('!I9"D*"@IC;&%S&5C=71E*")S>7-T96UC=&P@2YS96-R971S(B`E("AS96QF+E903D-/3D9$25(I"B`@("`@ +M("`@>&PR='!D8V]N9F9I;&4@/2`B+V5T8R]X;#)T<&0O>&PR='!D+F-O;F8B +M"B`@("`@("`@>&PR='!O<'1I;VYS9FEL92`]("(O971C+W!P<"]O<'1I;VYS +M+GAL,G1P9"(*"B`@("`@("`@;&]C86QI<"`](&]B:ELG;&]C86Q?:7`G70H@ +M("`@("`@(&QO8V%L8VED2`Z(%!32R!<(B5S7"(B("4@*&QE9G0L('!S:RDI"B`@("`@ +M("`@&PR='!D8V]N9F9I;&4I"B`@("`@("`@>&PR='!D8V]N9BYA9&1E<2@B +M:7`@&PR='!O<'1I;VYS+F-O;6UI="@I"@H@("`@9&5F(')E;6]T96%C8V5S4EP*'-E;&8L(&EP82DZ"B`@("`@("`@9F]R(&EN +M=&5R9F%C92!I;B!S96QF+F-O;F9I9RYA9&1R97-S*"DN9V5T7VEN=&5R9F%C +M97,H*3H*("`@("`@("`@("`@:68@:6YT97)F86-E+FEP7VEN7W-U8FYE="AI +M<&$I.@H@("`@("`@("`@("`@("`@2@I"B`@("`@("`@4EP*')U +M;&5;)W!U8FQI8U]I<"==*0H@("`@("`@(&EN=&5R;F%L7V9W:6YT97)F86-E +M(#T@4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI"B`@ +M("`@("`@<'5B;&EC7V9W<&]R=',@/2!S96QF+G!O4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI+`H@ +M("`@("`@("`@("`@("`@&UA2(Z"B`@("`@("`@("`@(&9W7W!R97)O=71?2(Z"B`@("`@("`@ +M("`@(&9W7W!O2(Z"B`@("`@("`@("`@ +M(&9W7W!O2(Z"B`@("`@("`@ +M("`@(&9W7V]U='!U=%]R=6QE("L]("(@+2UD<&]R="`E2(Z"B`@("`@("`@("`@(&9W +M7V]U='!U=%]R=6QE("L]("(Z(B`K('-E;&8N<&]R='-4;U-T4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI +M+`H@("`@("`@("`@("`@("`@&9F9F9F9F9F("TM +M8W1M87-K(#!X9F9F9F9F9F8B("4*("`@("`@("`@("`@("`@("`@("`@("`@ +M4EP*')U;&5;(FEN=&5R;F%L7VEP +M(ETI+"!S96QF+F=E=$=U97-T27`H*2E=*0H*"F-L87-S($EP5&%B;&5S17AE +M8W5T;W(Z"@H@("`@8V]N9FEG(#T@3F]N90H*("`@(&1E9B!?7VEN:71?7RAS +M96QF+"!C;VYF:62!PR)P&5C=71OR)P&5C +M=71OR)P +M&5C=71O7!E.B`E&5C27!T86)L97,H8V]N9FEG*3H* +M("`@("`@("!L;V=G:6YG+F1E8G5G*")0&5C=71O7,H*3H*("`@("`@("`@("`@ +M97AE8T1A=&%B86&5C27!T +M86)L97,H8V]N9FEG*0H@("`@96QI9B!J&5C27!T86)L97,H +M8V]N9FEG*0H@("`@96QS93H*("`@("`@("!L;V=G:6YG+G=A7!E/25S(B`E("AP6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7)I9VAT(&]W;F5R6]U('5N9&5R('1H +M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C +M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7)I +M9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT +M='`Z+R]W=W&5C=71I;F'!O2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&QO9V=E +M&ET(#(@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)$%F;&%G(B`] +M/2`B,2(@70IT:&5N"B`@861D7W-N870@("1P=6)L:6-)<`H@('5N;&]C:U]E +M>&ET("0_("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1$9FQA9R(@/3T@(C$B +M(%T*=&AE;@H@(')E;6]V95]S870@("1P=6)L:6-)<`H@('5N;&]C:U]E>&ET +M("0_("1L;V-K("1L;V-K960*9FD*"G5N;&]C:U]E>&ET(#$@)&QO8VL@)&QO +M8VME9`H````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````````````;W!T+V-L +M;W5D+V)I;B]V<&-?2!O9B!T:&4@3&EC96YS92!A=`HC"B,@ +M("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE +M($QI8V5N5]T86)L92@I('L*("!L;V-A;"!F5]T86)L92`B +MPH@(&QO8V%L(')U +M;&4])#$*("!L;V-A;"!I<#TD*&5C:&\@)')U;&4@?"!C=70@+60Z("UF,2D* +M("!I9B!;("1I<"`]/2`B4F5V;VME(B!="B`@=&AE;@H@("`@3TD9V%T97=A>2!C:61R/21C +M:61R(@H@(&QO8V%L(&1E=CTD*&=E=$5T:$)Y27`@)&EP*0H@(&EF(%L@)#\@ +M+6=T(#`@70H@('1H96X*("`@(')E='5R;B`Q"B`@9FD*("!S=61O(&EP(')O +M=71E(&%D9"`D8VED3TD9V%T97=A>2!C:61R/21C:61R(@H@ +M(')E='5R;B`D&ET(#(@)&QO8VL@)&QO8VME +M9`H@("`@("`@(#L["B`@97-A8PID;VYE"@II9B!;("UN("(D6EN9R!F=R!R=6QE +M&ET("1S=6-C97-S("1L;V-K("1L;V-K960*```````` +M``````````````````````````````!O<'0O8VQO=60O8FEN+V)A0`````````````````````````````````````````````````` +M````````````````````````````````````````````,#`P,#7)I9VAT(&]W;F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* +M(R`@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI +M8V5N&5C=71A8FQE/2&-E<'1I;VX@86YD('-E;&8N<')O8V5S&5C=71E('-H96QL(&-O;6UA;F0Z("5S +M)R`E('-E;&8N8VUD*0H@("`@("`@("`@("!E2<@:6X@<#H*("`@ +M("`@("`@("`@("`@("`@("`@("`@&-E<'1I;VXH)V-A;FYO="!F:6YD(&)A2!I;B`E&-E<'1I;VXH)V-A;FYO="!F:6YD +M(&AO2P@PH@("`@("`@("`@("`B87!I2V5Y(CH@87!I:V5Y+`H@ +M("`@("`@("`@("`B8V]M;6%N9"(Z("=N;W1I9GE"87)E;65T86Q07,H*2P@4)A3TE2P@5]P2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ +M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&EP=&%B;&5S +M+7-A=F5\9W)E<"`B24Y0550@+6H@3D545T]22U]35$%44R(@/B`O9&5V+VYU +M;&P*("!I9B!;("0_("UE<2`P(%T*("!T:&5N"B`@("`@(')E='5R;B`D/PH@ +M(&9I"B`@:7!T86)L97,@+4X@3D545T]22U]35$%44R`^("]D978O;G5L;`H@ +M(&EP=&%B;&5S("U)($9/4E=!4D0@+6H@3D545T]22U]35$%44R`^("]D978O +M;G5L;`H@(&EP=&%B;&5S("U)($E.4%54("UJ($Y%5%=/4DM?4U1!5%,@/B`O +M9&5V+VYU;&P*("!I<'1A8FQEPH@(&EP=&%B +M;&5S("U,($Y%5%=/4DM?4U1!5%,@+6X@+78@+7@@?"!A=VL@)R0Q('X@+UY; +M,"TY72LD+R![('!R:6YT9B`B)7,Z(BP@)#)])SL@/B`O9&5V+VYU;&P*("!I +M9B!;("UF("]R;V]T+W)E;6]V9616:69S(%T@.R!T:&5N(&EP=&%B;&5S("U: +M($Y%5%=/4DM?4U1!5%,@.R!F:3L@/B`O9&5V+VYU;&P*("`O&ET("0_("1L;V-K("1L +M;V-K960*9FD*"FEF(%L@(B1A9FQA9R(@/3T@(C$B(%T*=&AE;@H@("-A9&1? +M<'5B;&EC7VEN=&5R9F%C92`D<'5B;&EC268*("!U;FQO8VM?97AI="`D/R`D +M;&]C:R`D;&]C:V5D"F9I"@II9B!;("(D9&9L867)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&ET(#$*9FD*"G-E="`M>`IU2(*"FEF(%L@)#\@+65Q(#`@70IT:&5N +M"B`@("!T/6!D871E("LE2(*:68@6R`D/R`M;F4@ +M,"!="B`@('1H96X*("`@("`@*&-R;VYT86(@+6P@.V5C:&\@+64@(B-M;VYI +M=&]R:6YG0V]N9FEG7&Y32$5,3#TO8FEN+V)A2(I('P@8W)O;G1A8B`M"B`@("`@(&QO9V=E2!F;W(@;6]N:71O6]U(&UA>2!N;W0@=7-E('1H:7,@ +M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NWT*("`@(&9OF4G72`]('-T&QE;BD*("`@(&EF("=N=U]T>7!E)R!N;W0@:6X@:7`N:V5Y7!E)UT@/2`G<'5B;&EC)PH@("`@96QS93H* +M("`@("`@("!I<%LG;G=?='EP92==(#T@:7!;)VYW7W1Y<&4G72YL;W=E7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C +M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F +M('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5LP77T*"B`@("`@("`@("`@ +M("`@("!T;T1A=&5686P])"AD871E("UD("(D9&%T979A;"(@(BLE7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z +M+R]W=W0IE:F5C +M="!\?"!T0IS>7-T96UC=&P@7-T96UD+6IO=7)N +M86QD"@I465!%/20H9W)E<"`M4&\@)W1Y<&4]7$M;82UZ02U:72HG("]V87(O +M8V%C:&4O8VQO=60O8VUD;&EN92D*:68@6R`B)%194$4B(#T](")R;W5T97(B +M(%T@?'P@6R`B)%194$4B(#T](")V<&-R;W5T97(B(%T@?'P@6R`B)%194$4B +M(#T](")D:&-P"`O;W!T+V-L;W5D+V)I +M;B]U<&1A=&5?8V]N9FEG+G!Y(%T*("!T:&5N"B`@("`O;W!T+V-L;W5D+V)I +M;B]U<&1A=&5?8V]N9FEG+G!Y(&-M9%]L:6YE+FIS;VX@?'P@=')U90H@(&9I +M"F9I"@I;("$@+68@+W9A7-T96UD+W-S:&0@;65M;W)Y(&QE86L@+2!H='1P7-T96UD+VES7-T +M96UD+75S97(*"B,@16YA8FQE(&%N9"!3=&%R="!34T@*7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R +M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T +M"B,*(R`@(&AT='`Z+R]W=W2!S=&]R86=E('-Y7`])$A94$525DE33U(*("!I9B!; +M("(D:'EP(B`]/2`B=FUW87)E(B!=('Q\(%L@(B1H>7`B(#T](")H>7!E5]H='1P"B`@83)E;FUO9"!H96%D97)S"@H@(&-A="`^+V5T8R]A +M<&%C:&4R+V-OTA45%!3?2`];VX*4F5W7,@"UR97%U97-T960M=VET:"P@0V]N=&5N="U4 +M>7!E+"!O6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I +M="`B4V5T=&EN9R!U<"!);G1E&5C=71E(&EL8G9M('-V8W,B"B`@97AI="`Q"F9I"G-E +M='5P7VEL8G9M"@`````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````!O<'0O8VQO=60O8FEN+W-E='5P+W9P8W)O=71E2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N7-T96T@=FTB"@H@(&EF(%L@+68@ +M+V5T8R]H;W-TB`D1$]-04E.(%T@)B8@ +M1$]-04E./2)C;&]U9&YI;F4N:6YT97)N86PB"B`@(T1.4R!S97)V97(@=VEL +M;"!A<'!E;F0@)$1/34%)3B!T;R!L;V-A;"!Q=65R:65S"B`@6R-=*FQO8V%L/2XJ)"]L;V-A;#U<+R1$3TU!24Y< +M+R\B("]E=&,O9&YS;6%S<2YC;VYF"@H@(&-O;6UA;F0@+78@9&AC<%]R96QE +M87-E(#X@+V1E=B]N=6QL(#(^)C$*("!N;U]D:&-P7W)E;&5A&ET(#$*9FD*2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&EF(%L@(B1(65!%4E9)4T]2(B`A/2`B=FUW87)E(B!=.R!T:&5N +M"B`@("!R971U6YC"B`@2]L;V=R;W1A=&4@+V5T8R]C2`R/B8Q"B`@9FD*?0H*6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ +M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I="`B +M4V5T=&EN9R!U<"!%;&%S=&EC($QO860@0F%L86YC97(@7)I9VAT(&]W;F5R6]U('5N9&5R('1H +M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C +M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7!EPH@(&EF(%L@+60@+W!R;V,O>&5N(%T[('1H96X*("`@ +M(&UO=6YT("UT('AE;F9S(&YO;F4@+W!R;V,O>&5N"B`@("`D*&1M97-G('P@ +M9W)E<"`M<2`B6&5N($A632(I"B`@("!I9B!;("0_("UE<2`P(%T[('1H96X@ +M(",@,3U05BPP/4A630H@("`@("!E8VAO(")X96XM:'9M(B`F)B!R971UF5D(&%S($AY +M<&5R=B!W:&5N(%9IPH@(%L@(2`M9"`O<')O +M8R]X96X@72`F)B!S960@+6D@)W,O7G9C+R-V8R\G("]E=&,O:6YI='1A8B`F +M)B!T96QI;FET('$*("!;("UD("]P +M(W9C+W9C+R<@+V5T8R]I;FET=&%B("8F('1E;&EN:70@<0H*("!S>7-T96UC +M=&P@9&%E;6]N+7)E;&]A9`H*("!C87-E("1(65!%4E9)4T]2(&EN"B`@("`@ +M>&5N+7!V?'AE;BUD;VU5*0H@("`@("`@("`@7-T +M96UC=&P@7-T96UC=&P@9&ES86)L92!N +M='!D"B`@("`@("`@("!S>7-T96UC=&P@96YA8FQE('AE+61A96UO;@H@("`@ +M("`@("`@&5N=&]O;',@;F]T(&EN7Q#3TY&24=? +M2$]44$Q51U]00TE?04-023UY)R`O8F]O="]C;VYF:62`M +M3"`Q,34R,#`@='1Y4S`@=G0Q,#(B("]E=&,O:6YI='1A8@H@("`@("`@("`@ +M7-T96UC=&P@2!C;61L +M:6YE(&9I;&4@9G)O;2!Q96UU+6=U97-T+6%G96YT(@H@("`@("`@("`@("`@ +M(&)R96%K"B`@("`@("`@("`@(&9I"B`@("`@("`@("`@('-L965P(#$*("`@ +M("`@("`@(&1O;F4*("`@("`@("`@(&EF(%L@(2`M7-T96T@=&EM92!S>6YC)V0@=VET:"!H;W-T('9I82!V;7=AF5D +M(&%S('9I7!E7!E +M65S+"!H86-K>2$I"B`@("`@ +M("`@("!D;6ED96-O9&4@?"!G2(*("`@("`@("`@(&9I"B`@("`@("`@("`[.PH@(&5S86,*"B`@ +M(R!&:6YD(&%N9"!E>'!O7-T96UV;2@I('L*("!L;V-A;"!P871C:&9I;&4])#$*("!L;V-A;"!B +M86-K=7!F;VQD97(](B]T;7`O+F-O;F8N8F%C:W5P(@H@(&QO8V%L(&QO9V9I +M;&4](B]V87(O;&]G+W!A=&-H7-T96UV;2]C;VYF+V-L;W5D+FIK7-T96UV;2]C +M;VYF+RH@)&)A8VMU<&9O;&1E7-T96UV;0H@(&5C:&\@(D%L;"(@?"!U;GII<"`D<&%T8VAF:6QE("UD("]U +M&%R +M9W,@8VAM;V0@-34U"B`@:68@6R`M9B`D8F%C:W5P9F]L9&5R+V-L;W5D+FIK +M7-T96UV;2]C;VYF+PH@("`@96-H;R`B4F5S=&]R960@:V5Y +M7-T;W)E"B`@ +M:V5Y=&]O;"`M:6UP;W)T:V5Y7-T;W)E("]E=&,O7-T;W)E("]UU!!5$-(7TU/54Y4?2]A9V5N="YZ:7`@72`F)B!; +M("UF("]V87(O8V%C:&4O8VQO=60O<&%T8V@N7!E/21465!%(B`^/B`D +M;&]G9FEL90H@("`@<&%T8VA?FEP"B`@("!I9B!;("0_("UG="`P(%T*("`@('1H96X*("`@("`@96-H +M;R`B1F%I;&5D('1O(&%P<&QY('!A=&-H('-Y7-T +M96UD+W-Y365M.B][<')I;G0@)#)])RD*("!I9B!;("0H*'!H>7-M +M96TI*2`M;'0@-#`Y-C`P(%T[('1H96X*("`@("`@6YC"B`@'!O7!E&ET(#$P"B`@;&]G7VET(")3=&%R=&EN9R!G=65S="!S97)V:6-E2YS:``````````` +M```````````````````````````````````````````````````````````` +M````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@ +M("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE +M($QI8V5NPH@(&QO9U]I="`B4V5T=&EN9R!U<"!C;VYS +M;VQE('!R;WAY('-Y'D@+V5T8R]I<'1A8FQE'D*```````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````````````````;W!T +M+V-L;W5D+V)I;B]S971U<"]C;VUM;VXN6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5]M86-S*"D@>PH@("`@;6%CS,Z+2(O971C+W5D978OV%D9')E5]M86-S("(D +M3DE#7TU!0U,B"B`@9FD*?0H*PH@(&QO8V%L +M(&EN=&9N=6T])#$*("!L;V-A;"!I<#TD,@H@(&QO8V%L(&UAVEN=&9N=6U]"B`@;&]C86P@8F]O='!R;W1O/2)S=&%T:6,B"@H@(&EF(%L@ +M(B1"3T]44%)/5$\B(#T](")D:&-P(B!="B`@=&AE;@H@("`@:68@6R`B)&EN +M=&9N=6TB("$]("(P(B!="B`@("!T:&5N"B`@("`@("!B;V]T<')O=&\](F1H +M8W`B"B`@("!F:0H@(&9I"@H@(&EF(%L@(B1I<"(@(3T@(C`N,"XP+C`B("UA +M("(D:7`B("$]("(B("UO("(D9F]R8V4B(#T](")F;W)C92(@70H@('1H96X* +M("`@("!E8VAO(")I9F%C92`@)&EN=&8@:6YE="`D8F]O='!R;W1O(B`^/B`O +M971C+VYE='=O7-C=&P@;F5T+FEP +M=C8N8V]N9BYA;&PN9&ES86)L95]I<'8V/3`*("!S>7-C=&P@;F5T+FEP=C8N +M8V]N9BYA;&PN9F]R=V%R9&EN9STQ"B`@7,O;F5T+VEP=C0O:7!?9F]R=V%R9`H@(%L@+68@+V5T +M8R]I<'1A8FQE7,O;F5T+VEP=C0O8V]N9B]D969A=6QT+W)P7V9I;'1E +M<@H@("`@("!F;W(@=FEF(&EN("16249?3$E35#L@9&\*("`@("`@("`@;&]G +M7VET(")C;&]U9#H@9&ES86)L92!R<%]F:6QT97(@;VX@<'5B;&EC(&EN=&5R +M9F%C93H@)'9I9B(*("`@("`@("`@7,O;F5T +M+VEP=C0O8V]N9B]L;R]R<%]F:6QT97(*?0H*96YA8FQE7VER<6)A;&%N8V4H +M*2!["B`@;&]C86P@96YA8FQE9#TD,0H@(&QO8V%L('!R;V,],`H*("!PPH@ +M(&QO8V%L(&5N86)L93TD,0H*("!I9B!;("1E;F%B;&4@+65Q(#`@70H@('1H +M96X*("`@("`@96-H;R`P(#X@+V5T8R]R<'-R9G-E;F%B;&4*("`@("`@#TD*'!R:6YT9B`B)7A<;B(@)&YU;2D*("!E8VAO("1H97@["B`@(V5N +M86)L92!R<',*("!E8VAO("1H97@@/B`O"TP+W)P7,O;F5T+V-OPH@(&EN:71?:6YT97)F86-EB`B)&=W9&5V +M(B!="B`@("!T:&5N"B`@("`@(&=W9&5V/2)E=&@P(@H@("`@9FD*"B`@("!I +M<"!R;W5T92!A9&0@9&5F875L="!V:6$@)$=7(&1E=B`D9W=D978*("!F:0H* +M("`C(%=OW!R:6YT("0Q(BXB)#(B+B(D,R(N,2)])RD*("`@("`@=&EM +M96]U="`S('!I;F<@+6X@+6,@,R`D34=-5%]'5R`F"B`@9FD*"B`@:68@6R`B +M)$A94$525DE33U(B(#T](")V;7=A6YC +M(&5N86)L90H@(&9I"GT*"G-E='5P7V1NB`D1$]-04E.(%T@)B8@1$]-04E./2)C +M;&]U9&YI;F4N:6YT97)N86PB"B`@(W)E;6]V:6YG('1H92!D;G-M87-Q(&UU +M;'1I<&QE(')A;F=E6R-=*FQO8V%L/2XJ +M)"]L;V-A;#U<+R1$3TU!24Y<+R\B("]E=&,O9&YS;6%S<2YC;VYF"B`@9FD* +M"B`@:68@6R`M;B`@(B1$3E-?4T5!4D-(7T]21$52(B!="B`@=&AE;@H@("`@ +M("!S960@+6D@+64@(B]>6R-=*F1H8W`M;W!T:6]N+BH],3$Y+BHD+V0B("]E +M=&,O9&YS;6%S<2YC;VYF"B`@("`@(&5C:&\@(F1H8W`M;W!T:6]N+69O9&AC<"UR86YG95]I<#0]+BHD+V1H8W`M9&AC<"UR86YG95]I<#8]+BHD+V1H8W`M +M6R-=*F1H8W`M;W!T:6]N/6]P=&EO;CIR;W5T97(N*B0O +M9"(@+V5T8R]D;G-M87-Q+F-O;F8*("!;("1$149!54Q47T=7(%T@)B8@96-H +M;R`B9&AC<"UO<'1I;VX];W!T:6]N.G)O=71E6R-=*F1H8W`M;W!T:6]N/6]P=&EO +M;C8Z9&YS+7-EB`B)$542#!?25`V(B!="B`@=&AE;@H@ +M("`@("!E8VAO(#$@/B`O=F%R+V-A8VAE+V-L;W5D+V1N;&5A7-T96UC=&P@9&ES86)L92!A<&%C:&4R"B`@8VQE86Y?:7!A;&EA +M&%M<&QE+F-O;F8*("!R +M;2`M9B`O971C+V%P86-H93(O26YC;'5D92!P;W)T2!0 +M>71H;VX@0W-!<'`@8V]N9FEG7&XC26YC;'5D92!P;W)T&5S +M($UU;'1I5FEE=W,B+R)/<'1I;VYS("U);F1E>&5S($UU;'1I5FEE=W,B+R`O +M971C+V%P86-H93(O;6]D&5S(B`^("]V87(O=W=W+VAT;6PO+FAT86-C97-S +M"GT*"G-E='5P7V%P86-H93(H*2!["B`@;&]G7VET(")3971T:6YG('5P(&%P +M86-H92!W96(@2!A;F0@;F]T('=OPH@('!U8FQI8U]I<#TD151(,E])4`H@(%L@(B1%5$@R7TE0(B`] +M/2`B,"XP+C`N,"(@72`F)B!P=6)L:6-?:7`])$542#%?25`*("!E8VAO("1P +M=6)L:6-?:7`*?0H*PH@("`@;&]G7VET(")3971T:6YG +M('5P($Y44"(*("`@($Y44%]#3TY&7T9)3$4](B]E=&,O;G1P+F-O;F8B"B`@ +M("!I9B!;("UF("1.5%!?0T].1E]&24Q%(%T*("`@('1H96X*("`@("`@("!) +M1E,])RPG(')E860@+6$@R-S97)V97)?;&ES=%M` +M77TM,2`[(&ET97)A=&]R/CTP(#L@:71E2!A<&%C:&4R +M(B`^("]V87(O8V%C:&4O8VQO=60O96YA8FQE9%]S=F-S"B`@(&5C:&\@(F-L +M;W5D(&YFT-(149?5$U0 +M7T9)3$5]"B`@("`@($-/34U!/2(L7&Y<="(*("`@("`@8V%S92`D2T59(&EN +M"B`@("`@("`@9&ES86)L95]R<%]F:6QT97(I"B`@("`@("`@("`@(&5X<&]R +M="!$25-!0DQ%7U)07T9)3%1%4CTD5D%,544*("`@("`@("`@("`@.SL*("`@ +M("`@("!E=&@P:7`I"B`@("`@("`@("`@(&5X<&]R="!%5$@P7TE0/21604Q5 +M10H@("`@("`@("`@("`[.PH@("`@("`@(&5T:#%I<"D*("`@("`@("`@("`@ +M97AP;W)T($542#%?25`])%9!3%5%"B`@("`@("`@("`@(#L["B`@("`@("`@ +M971H,FEP*0H@("`@("`@("`@("!E>'!O'!O'!O'!O'!O'!O'!O'!O +M'!O'!O'!O +MF4I"B`@("`@("`@("`@(&5X<&]R="!'54535%]#24127U-) +M6D4])%9!3%5%"B`@("`@("`@("`@(#L["B`@("`@("`@'!O'!O +M'!O'!OF4@8VQO=60@<&%S2!S"(B(%T*("!T:&5N"B`@("!E8VAO(")R;V]T.B1635]005-35T]21"(@?"!C +M:'!A6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I="`B4V5T=&EN9R!U<"!D:&-P('-E7-T96T@ +M=FTB"B`@2!A;&QO=R!$3E,@&5C=71E(&1H8W!S7)I9VAT(&]W +M;F5R6]U +M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O +M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W +M=WPH@ +M(&5C:&\@(B0H9&%T92D@)$`B(#X^("]V87(O;&]G+V-L;W5D+FQO9PH@(&QO +M9U]A8W1I;VY?;7-G("(D0"(*?0H*<&%T8V@H*2!["B`@;&]C86P@4$%40TA? +M34]53E0]+VUE9&EA+V-D@H@(&QO8V%L('!R:79K97D])%!!5$-( +M7TU/54Y4+V%U=&AOVUD-69I;&5]*0H@("`@;&]C +M86P@;F5W;60U/0H@("`@6R`M9B`D>W!A=&-H9FEL97T@72`F)B!N97=M9#4] +M)"AM9#5S=6T@)'MP871C:&9I;&5]('P@87=K("=[<')I;G0@)#%])RD*"B`@ +M("!L;V=?:70@(E-CW!A=&-H9FEL97T@72`F)B!;("(D;F5W +M;60U(B`A/2`B(B!="B`@("!T:&5N"B`@("`@('1AF8@)'!A=&-H9FEL +M92`M0R`O"B`@("`@(&5C:&\@)'MN97=M9#5](#X@)'MM9#5F:6QE?0H@("`@ +M("!L;V=?:70@(E!A=&-H960@2`OF5D7VME>7,*("`@(&9I"B`@9FD*"B`@&5C=71I;F<@8VQO=60M96%R +M;'DM8V]N9FEG(@H*("`C($-L96%R("]T;7`@9F]R(&9I;&4@;&]C:PH@(')M +M("UF("]T;7`O*BYL;V-K"B`@6]U +M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC +M('=I=&@@=&AE($QI8V5N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&5N2!T;R!E;G-U'D@:6X@=&AE(')O +M=71I;F<@9&]M86EN"G)E8V]N9FEG7VQB*"D@>PH@(&QO9V=E'D@=&\@<')E=FEO=7,@ +M'DN8V9G+F]L9"`O971C+VAA<')O>'DO:&%P +M2YC9F'DN8V9G+FYE=PH@(&9I"GT*"F=E=%]V +M:69?;&ES="@I('L*("!L;V-A;"!V:69?;&ES=#TB(@H@(&9O7,O8VQA7!E(&]R('!A7!E(&]R('!A2!R96-E +M:79E2!F:7)E=V%L;"!R=6QE2!C;VYF:67!E(&]R('!A2!O +M9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI +M8V5N0H*"F1E9B!M +M97)G92AD8F%G+"!D871A*3H*("`@(&1B86=C(#T@8V]P>2YD965P8V]P>2AD +M8F%G*0H*("`@('!R:6YT(&1B86<*("`@('!R:6YT(&1A=&$*("`@(&EF(")V +M<&Y?=7-E7,H*3H*("`@("`@("!I +M9B!U7,H*2!A;F0@;F]T +M(&%D9#H*("`@("`@("`@("`@9&)A9V-;=7-E6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2D*("`@("`@("`@("`@9&%T82YU +M<&1A=&4H>R)I9"(Z('-E;&8N:V5Y?2D*("`@("`@("!F:6YA;&QY.@H@("`@ +M("`@("`@("!S96QF+F1B86<@/2!D871A"@H@("`@9&5F('-A=F4H2D* +M("`@("`@("`@("`@("`@(&IS;VXN9'5M<"@*("`@("`@("`@("`@("`@("`@ +M("!D8F%G+"!?9F@L"B`@("`@("`@("`@("`@("`@("`@&-E<'0@24]%2`](&ME>0H*"F-L87-S('5P9&%T941A=&%"867!E(#T]("=M;VYI=&]R22AS96QF +M+F1B+F=E=$1A=&%"867!E(#T]("=V<&YU7!E(#T]("=I<&%L:6%S +M97,G.@H@("`@("`@("`@("!S96QF+F1B+G-E=$ME>2@G:7!S)RD*("`@("`@ +M("`@("`@7!E*0H@("`@("`@("`@("!R971U +M2=="B`@ +M("`@("`@9'!;)VYI8U]D979?:60G72`](&1;)V1E=FEC92==6S,Z70H@("`@ +M("`@(&1P6R=N=U]T>7!E)UT@/2`G9W5E4AA8VLN=7!D871E7VYE='=OR=I<%]A9&1R97-S)SH@6V1P72P@)W1Y<&4G.B`G +M:7!S)WTI"B`@("`@("`@:68@)V1O;6%I;E]N86UE)R!N;W0@:6X@9"YK97ES +M*"D@;W(@9%LG9&]M86EN7VYA;64G72`]/2`G)SH*("`@("`@("`@("`@9%LG +M9&]M86EN7VYA;64G72`](")C;&]U9&YI;F4N:6YT97)N86PB"@H@("`@("`@ +M(&0@/2!04AA8VLN=7!D871E7VYE='=O2AS96QF+"!D8F%G*3H*("`@("`@("!R971U2`]("=E=&@G("L@;G5M("L@)VEP)PH@("`@("`@(&1P(#T@>WT*("`@("`@ +M("!I9BAK97D@:6X@5T*("`@("`@("`@("`@9'!;)VYE=&UA7!E(#T] +M(")P=6)L:6,B.@H@("`@("`@("`@("`@("`@9'!;)V=A=&5W87DG72`]('-E +M;&8N<49I;&4N9&%T85LG8VUD7VQI;F4G75LG9V%T97=A>2=="B`@("`@("`@ +M("`@(&5L2==(#T@7!E)SH@)VEP +M2!T;R!D96%L('=I=&@@=&AIPH@("`@("`@("`@("`@("`@ +M)V%D9"7!E(#T@7!E(ET*("`@("`@("`@("`@=7!D871E1&%T84)A9RAS96QF*0H@ +M("`@("`@("`@("!R971U&-E<'1I;VX@97)R;W(@)WMEV9I;&5N86UE?22!B965N(&UO=F5D+B(N9F]R;6%T*&5RV9I;&5N86UE?27!E"@H@("`@9&5F(&=E=$1A=&$HB(*("`@("`@("!W:71H(&]P96XH +M;W)I9U!A=&@L("=R8B7,H*2!E;'-E(&1A +M=&%;)W!U8FQI8U]I<"=="@H@("`@("`@(&EN:71I86Q?9&%T82`](&-L5]I<"AI<"P@:6YI=&EA;%]D871A6R=C;VYF +M:62<@:6X@9&)A9ULG8V]N9FEG)UTN +M:V5Y5]I<"AC;',L(&EP+"!P5]I +M<"`]($9A;'-E"B`@("`@("`@:68@:7`@/3T@<')I=F%T95]G871E=V%Y7VEP +M.@H@("`@("`@("`@("!N97=?:7!?;6%T8VAE5]I<`H*("`@($!C;&%S0`````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````,#`P,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL +M92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2!S=&%T=7,*"F9R;VT@8W,N0W-#;VYF:6<@:6UP;W)T($-S +M0V]N9FEG"F9R;VT@;W!T<&%R7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R +M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T +M"B,*(R`@(&AT='`Z+R]W=WB`D,2!="G1H96X*("`@(&5C:&\@(D9A:6P@ +M=&\@9FEN9"!64$X@<&5E7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2`]('9P;ELG=G!N7W-E2!I;B!D +M8F%G+FME>7,H*2!A;F0@;F]T(&]P.@H@("`@("`@(&1E;"AD8F%G6VME>5TI +M"B`@("!E;'-E.@H@("`@("`@(&1B86=;:V5Y72`]('9P;@H@("`@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H +M='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI +M8V5N2`] +M(')O=71E6R=N971W;W)K)UT*("`@("`@("!D8F%G6VME>5T@/2!R;W5T90H@ +M("`@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R +M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T +M"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ +M=&AE($QI8V5N2`]('9P +M;ELG<&5E71H;VX*(R!, +M:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%3 +M1BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS +M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E +M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!F$EN"@H*<&%S&ES=',H9V5T5&]K96Y&:6QE*"DI.@H@("`@("`@('=I=&@@;W!E +M;BAG9714;VME;D9I;&4H*2P@)W(G*2!A2P@=F%L +M=64@/2!L:6YE+G-T7!E(#T@ +M7!E(#T]("=S96YD7VUY7W!A7-L;V7-L;V7-L;V7-L;V2!I +M<"]P87-S=V]R9%LE7-L;V7-L;V&-E<'0@2V5Y8F]A&-E<'1I +M;VXL(&4Z"B`@("`@("`@0`````````````````````````````````` +M`````````````````````````````````````````````````````````#`P +M,#`W-34`,#`P,36]U +M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC +M('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E +M<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NFEP7V9I;&4B"B`@("!E +M8VAO(")$96QE=&EN9R!D:6%G;F]S=&ECFEP7V9I;&4B +M"F5L6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ +M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N0H*"F1E9B!M97)G92AD8F%G+"!D871A*3H*("`@("(B(B!3:6UP;'D@ +M;W9E&ES='-I;F<@8F%G(&%S+"!T:&4@=VAO;&4@8V]N +M9FEG=7)A=&EO;B!I2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N4EP("@I +M>PH@(&QO8V%L(&EP/20Q"B`@9F]R(&1E=B!I;B!@;',@+3$@+W-Y6]U(&UA>2!N;W0@=7-E('1H +M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N +MWT*("`@("`@("!S96QF+F-H86YG960@/2!;70H@("`@("`@('-E +M;&8N9&5V:6YF;R`]($-S2&5L<&5R+F=E=%]D979I8V5?:6YF;R@I"B`@("`@ +M("`@2@I"B`@("`@("`@("`@(&5L2=="B`@("`@ +M("`@("`@('-L:6YE(#T@(F1H8W`M"P@:7`I"B`@("`@("`@("`@('-E;&8N +M8V]N9BYS96%R8V@H2D*("`@("`@("`@("`@ +M96QS93H*("`@("`@("`@("`@("`@(&QI&-E +M<'0@17AC97!T:6]N(&%S(&4Z"B`@("`@("`@("`@(&QO9V=I;F2!C;VYT2!R96-E:79E($1(0U!.04LN"B`@("`@ +M("`@(R!7:&5N(%9-(&ES(&5X<'5N9V5D+"!I=',@86-T:79E(&QE87-E(&%N +M9"!$2$-0+T1.4R!C;VYF:6<@:7,@<')O<&5R;'D@5LG;6%C7V%D9')E5LG9&5F875L=%]G871E=V%Y +M)UT*"B`@("!D968@861D7VAO6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7!E2`]($9A;'-E"B`@("`@("`@ +M9&5V(#T@)R<*("`@("`@("!F;W(@:6YT97)F86-E(&EN(&EN=&5R9F%C97,Z +M"B`@("`@("`@("`@(&EF(&1E=B`]/2!I;G1E&5C=71E*&-O;6UA;F0I"B`@("`@("`@("`@("`@("!I9B!D9795<#H*("`@ +M("`@("`@("`@("`@("`@("!L;V=G:6YG+FEN9F\H(D1E=FEC92`E65T+"!L970G +M5]I9E]N965D960H"B`@ +M("`@("`@("`@("`@("`B)7,O)7,B("4@*'-E;&8N0U-?5$5-4$Q!5$537T1) +M4BP@5]I9E]N965D960H"B`@("`@("`@("`@("(E +M&5C("1$045-3TX[+RTM97AE8R`D1$%%34].("TM("TM=G)R<#LO9R(@+V5T +M8R]I;FET+F0O:V5E<&%L:79E9"R(L(")] +M(BP@R(L(")](BP@6PH@("`@("`@("`@("`@("`@("`@ +M("`@(DE0=C1?861D&5C=71E*")R;2`M2`S,"!S96-O;F1S"B`@("`@("`@:&5A&ET:6YG +M(B`E("AE&5C=71E +M*"(E&PR='!D +M(BP@(G-T;W`B*0H@("`@("`@($-S2&5L<&5R+G-E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I +M<"@I*2YS=&]P*"D*"B`@("`@("`@&5C=71E*&-M9#(I"B`@("`@("`@("`@(&1E=B`] +M(&EN=&5R9F%C92YG971?9&5V:6-E*"D*"B`@("`@("`@8VUD(#T@(B5S("U# +M("5S(B`E("AS96QF+D-/3DY44D%#2T1?0DE.+"!S96QF+D-/3DY44D%#2T1? +M0T].1BD*("`@("`@("!#&5C=71E*"(E&PR='!D(BP@(G-T;W`B*0H*("`@ +M("`@("!I;G1E&5C=71E*&-M9"D*("`@("`@("`@("`@("`@(&QO9V=I +M;F2D*("`@("`@("`@ +M("`@("`@(&5X8V5P="!%>&-E<'1I;VXZ"B`@("`@("`@("`@("`@("`@("`@ +M;&]G9VEN9RYE&5C=71E*"(E&5C=71E*"(E&PR='!D(BP@(G)E +M2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@("`@ +M("`@("!I9B!G871E=V%Y.@H@("`@("`@("`@("`@("`@("`@(')O=71E+F%D +M9%]R;W5T92AD978L(&=A=&5W87DI"@H@("`@("`@("`@("`C(%1H92!F:7)S +M="!P=6)L:6,@:6YT97)F86-E(&AA&5C=71E +M*")A2!C;VYN=')A8VMD"B`@("`@("`@(B(B"B`@("`@("`@ +M;&EN97,@/2!;70H@("`@("`@(&QI;F5S+F%P<&5N9"@B7'1<=%QT25!V-%]A +M9&1R97-S("5S7&XB("4@(C$R-RXP+C`N,2(I"B`@("`@("`@;&EN97,N87!P +M96YD*")<=%QT7'1)4'8T7V%D9')E7!E(&%N9"!D96-I9&5S(&EF(&ET(&ES(&%N(&EN=&5R +M;F%L(&%D9')E0H@("`@("`@(%1H92!N97<@8V]D92!A +M;'-O(&=I=F5S('1H92!P;W-S:6)I;&ET>2!T;R!C;&]U9'-T86-K('1O(&AA +M=F4@82!H>6)R:60@9&5V:6-E"B`@("`@("`@=&AA="!C;W5L9"!F=6YC=&EO +M;B!A2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N +M;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B971H,2)]"@I3 +M5$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S:"`M8R`@)VEF +M(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@96QS92!E8VAO +M(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@(")V<&-R;W5T +M97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@6R`D,"`]/2!< +M(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ"B`@("`@("`@ +M("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@("`@("`@(&-M +M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U +M8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@("`@("`@;&]G +M9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S(B`E('-T871E +M7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X96-U=&4H7!E*"E=(&%N9"!S=&%T92`]/2`B +M34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE8W5T92AC;60I +M"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@("`@("`@(&5X +M96-U=&4H8VUD*0H*"F1E9B!I&5C=71E*")M;W5N="!T +M;7!F6XH=F%L*3H*("`@(&EF('9A;#H*("`@("`@("!R +M971U&5C=71E*")I<"!A9&1R('-H;W<@?&=R97`@+78@ +MWT*("`@("`@("`@("`@=&];)VEP)UT@ +M/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A;'-;+3%="B`@ +M("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@("(B(@H@("`@ +M9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G*")3879I;F<@ +M:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C=71E*")S>7-T +M96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I;F7-T96UC=&P@&5C=71E*")K:6QL("U(55`@)7,B +M("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D;G-M87-Q(BP@ +M(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O0`````````````````````````````````````````````` +M`````````````````````````````````````````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E +M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI +M8V5N'1D;G,H*3H*("`@("`@("`@("`@9&YS+F%P<&5N9"AS +M96QF+F1A=&%;)W)O=71E2==(#T@=F%L"@H@("`@9&5F(&=E=%]N971M87-K*'-E;&8I.@H@ +M("`@("`@(",@5V4@;F5E9"!T;R!F:7@@:70@<')O<&5R;'DN($D@:G5S="!A +M9&1E9"!T:&4@:68L(&%S($EA;B!D:60@:6X@&-E<'1I;VXN"B`@("`@("`@:68@)W)O=71E6]U +M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC +M('=I=&@@=&AE($QI8V5N"YS=')I +M<"@I(&9O2!A +M9'9A;F-E9"(L("TQ*0H@("`@("`@(&-R;VXN8V]M;6ET*"D*"B`@("!D968@ +M&-L=61E9%]H96%L=&A?8VAE8VMS(ET*("`@("`@("`@("`@:&-? +M9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K0`````````` +M```````````````````````````````````````````````````````````` +M`````````````````````#`P,#`W-34`,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N7,H*3H*("`@("`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@ +M("`@(R!P2!P&ES=',Z(')U;&4])7,@=&%B;&4])7,B+"!F=ULR72P@;F5W7W)U;&4N +M9V5T7W1A8FQE*"DI"B`@("`@("`@("`@(&5L2`](&9W6S)="B`@("`@("`@("`@("`@("!I9B!F=ULQ72`]/2`B9G)O;G0B +M.@H@("`@("`@("`@("`@("`@("`@(&-P>2`](&-P>2YR97!L86-E*"2DI"B`@("`@("`@("`@("`@("`C(%1H97)E(&%R92!S;VUE +M(&ES3H*("`@("`@("`@ +M("`@=&%B;&4@/2`G)PH@("`@("`@("`@("!F;W(@:2!I;B!O<&5N*"(O971C +M+VEP=&%B;&5S+VEP=&%B;&5S+25S(B`E('1Y<&4I.@H@("`@("`@("`@("`@ +M("`@:68@:2YS=&%R='-W:71H*""`]/2!R=6QE70H* +M"F-L87-S($-S3F5T9FEL=&5R*&]B:F5C="DZ"@H@("`@9&5F(%]?:6YI=%]? +M*'-E;&8I.@H@("`@("`@('-E;&8N7!E)RP@)RTM0`````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```P,#`P-S4U`#`P,#$W-3``,#`P,32!O9B!T:&4@3&EC96YS92!A=`HC"B,@ +M:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&ES=',L(&5L5]P87)A;2D*("`@("`@("!E;'-E +M.@H@("`@("`@("`@("!L;V=G:6YG+FEN9F\H(D%D9&EN9R!R;W5T93H@9&5V +M("(@*R!D978@*R`B('1A8FQE.B`B("L*("`@("`@("`@("`@("`@("`@("`@ +M("`@('1A8FQE("L@(B!N971W;W)K.B`B("L@861D2!P87)A;65T97(@5]P87)A;2D*("`@("`@("!E;'-E.@H@("`@("`@ +M("`@("!L;V=G:6YG+FEN9F\H(D%D9&EN9R!R;W5T93H@9&5V("(@*R!D978@ +M*R`B('1A8FQE.B`B("L*("`@("`@("`@("`@("`@("`@("`@("`@('1A8FQE +M("L@(B!N971W;W)K.B`B("L@861D2DZ"B`@("`@("`@(B(B("!!9&0@82!D969A=6QT(')O=71E"B`@("`@("`@ +M.G!A&-E<'1I;VXH(D=A=&5W87D@8V%N;F]T(&)E($YO;F4N(BD*"B`@ +M("`@("`@:68@0H@("`@("`@("`@("!L;V=G +M:6YG+FEN9F\H(D%D9&EN9R!D969A=6QT(')O=71E(BD*("`@("`@("`@("`@ +M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI +M86YC90HC('=I=&@@=&AE($QI8V5N0`````````````````````` +M```````````````````````````````````````````````````````````` +M`````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI +M86YC90HC('=I=&@@=&AE($QI8V5N'DO:&%P2YC9F'DO:&%P2YC9F2@I"B`@("`@("`@9F]R('@@:6X@8V]N9FEG.@H@("`@("`@("`@("!; +M9FEL93$N87!P96YD*'2A(05!23UA97T-/ +M3D9?5"P@2$%04D]865]#3TY&7U`I"@H@("`@("`@("`@("!P2!O9B!T:&4@3&EC96YS92!A=`HC +M"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG +M971?='EP92@I"B`@("`@("`@5]I9E]N965D960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L +M"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE +M,B]S:71E2DI"B`@("`@("`@("`@(&9I;&4N&5C=71E,B@B7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2AS96QF*3H*("`@("`@("!S96QF+F-O;F9I9R`](%M="B`@("`@("`@ +M"P@;&EN +M92!I;B!E;G5M97)A=&4H%T@/2!R97!L86-E("L@ +M(EQN(@H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!S96%R8V@H"P@;&EN92!I;B!E;G5M97)A=&4H +M"P@;&EN92!I;B!E;G5M97)A=&4H +M2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N0`````````````````````````````````````` +M````````````````````````````````````````````````````````,#`P +M,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N"`](&EN="@G)RYJ;VEN*%MD:6=I="!F;W(@9&EG:70@:6X@9&5V:6-E(&EF +M(&1I9VET+FES9&EG:70H*5TI*0H@("`@("`@("`@("`@("`@:68@9&5V:6-E +M7W-U9F9I>"`\(&QO=V5S=%]D979I8V4Z"B`@("`@("`@("`@("`@("`@("`@ +M;&]W97-T7V1E=FEC92`](&1E=FEC95]S=69F:7@*("`@("`@("`@("`@("`@ +M("`@("!G=65S=%]I;G1E5]C:61R*'-E;&8I.@H@("`@("`@ +M(')E='5R;B`B)7,O)7,B("4@*'-E;&8N9V5T7V=A=&5W87DH*2P@F4@:6X@8FETF4B +M*0H*("`@(&1E9B!G971?9&5V:6-E*'-E;&8I.@H@("`@("`@(')E='5R;B!S +M96QF+F=E=%]A='1R*")D979I8V4B*0H*("`@(&1E9B!G971?8VED7!E)UT@:6X@5E)24%]465!% +M4SH*("`@("`@("`@("`@7!E)UT@:6X@6R=G=65S="==.@H@("`@("`@("`@ +M("!R971U7!E)UT@:6X@6R=P=6)L +M:6,G73H*("`@("`@("`@("`@7-T +M96T*("`@("`@("`B(B(*("`@("`@("!S96QF+F1E=FQIWT*("`@("`@("!S96QF+F%D +M9')E7!E*"D@ +M:6X@6R)P=6)L:6,B72!A;F0@861D2)= +M*0H@("`@("`@("`@("`@("`@&UA7!E)UT*("`@("`@("!R971U&9F9F9F9F9F(ETI"@H@("`@("`@('-E;&8N9G7!E*"D@ +M:6X@6R)P=6)L:6,B73H*("`@("`@("`@("`@7!E*"D@:6X@ +M6R)P=6)L:6,B73H*("`@("`@("`@("`@#4R-"\P>&9F +M9F9F9F9F(B`E("AS96QF+F1E=BP@2)=(&%N9"!S96QF+F%D9')E2)=(&%N9"!S96QF+F%D9')E7!E*"D@:6X@6R)P +M=6)L:6,B72!A;F0@*&YO="!S96QF+F-O;F9I9RYI2!T +M:&4@;6%S=&5R(&)A8VMU<"!F=6YC=&EO;G,*("`@("`@("`@("`@("`@(&EF +M(&YO="!C;61L:6YE+FES7W)E9'5N9&%N="@I.@H@("`@("`@("`@("`@("`@ +M("`@(&EF(&UE=&AO9"`]/2`B861D(CH*("`@("`@("`@("`@("`@("`@("`@ +M("`@0W-087-S=V13=F,HWT*("`@("`@("!C +M;60@/2`H(FEP(&%D9'(@2!K965P86QI +M=F5D(&]R(&YO=`H@("`@("`@("(B(@H@("`@("`@(&EF(")N=U]T>7!E(B!I +M;B!S96QF+F%D9')E2==*0H@ +M("`@("`@(&EF(&YO="!S96QF+F-L+FES7W)E9'5N9&%N="@I(&%N9"`H;F]T +M('-E;&8N861D2==(&]R('-E;&8N861D2==(#T](").;VYE(BDZ"B`@("`@("`@("`@(&-M9"`](")A2!H87!P96X@8G5T(&1I9"`Z*0H@("`@ +M("`@(",@270@;65A;G,@86X@87!A8VAE(&9I;&4@9V]T(&]R<&AA;F5D(&%F +M=&5R(&$@9W5E2@I"@H@("`@9&5F +M(&ES7V=U97-T7V=A=&5W87DH7,O;F5T+V-O7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ +M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E +M(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O +M'!R97-S(&]R(&EM<&QI960N("!3 +M964@=&AE($QI8V5N"(I.@H@("`@("`@("`@("!I=&5M&5C +M=71E*")K:6QL("TY("5S(B`E('!I9"D*"B`@("!D968@9W)E<"AS96QF+"!S +M='(I.@H@("`@("`@(&9O"(I.@H@("`@("`@("`@("!I9B!I+F9I;F0H7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C +M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F +M('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L +M:6-A8FQE(&QA=R!O'!R97-S(&]R +M(&EM<&QI960N("!3964@=&AE($QI8V5N2!O +M9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI +M8V5NWT*("`@("`@("!S96QF+F1B(#T@1&%T +M84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF+F1B+G-A=F4HWT*("`@("`@ +M("!R971U&1I9V5S="@I"@H@("`@9&5F(&=E=%]G871E=V%Y +M*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I;B!S96QF+FED871A*"DZ +M"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A*"E;)V=A=&5W87DG70H@ +M("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G971?=7-E7V5X=%]D;G,H +M'1D;G,G +M70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G971?861V97)T7VEN +M="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN="<@:6X@0`````````````````````````````````````````````````````````` +M````````````````````````````````````````,#`P,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7!E&5C=71E*&-M9"D*("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")! +M9&1E9"!R=6QE("5S(&9O0`````````````````````````````````````````````` +M````````````````````````````````````````````````````````,#`P +M,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET*#(I +M"B`@("!F;W(@;W!T+"!A7,N97AI +M="@R*0H*("`@(&9O&ES=',H9&%T869I;&4I.@H@("`@("`@(&]S +M+G)E;6]V92AD871A9FEL92D*"@ID968@8W)E871E9FEL92AI<"P@9F]L9&5R +M+"!F:6QE+"!D871A*3H*("`@(&1E3H* +M("`@("`@("`@("`@;W,N;6%K961I2!E>&ES=',L('=E(&1O(&ET('1H:7,@=V%Y +M(&9O0H@("`@("`@("`@("!I9B!E+F5R&ET*#$I"B`@("`@("`@ +M:68@;W,N<&%T:"YE>&ES=',H;65T86UA;FEF97-T*3H*("`@("`@("`@("`@ +M9F@@/2!O<&5N*&UE=&%M86YI9F5S="P@(G(K82(I"B`@("`@("`@("`@(&5X +M9FQO8VLH9F@I"B`@("`@("`@("`@(&EF(&9I;&4@;F]T(&EN(&9H+G)E860H +M*3H*("`@("`@("`@("`@("`@(&9H+G=R:71E*&9I;&4@*R`G7&XG*0H@("`@ +M("`@("`@("!U;F9L;V-K*&9H*0H@("`@("`@("`@("!F:"YC;&]S92@I"B`@ +M("`@("`@96QS93H*("`@("`@("`@("`@9F@@/2!O<&5N*&UE=&%M86YI9F5S +M="P@(G&9L;V-K*&9H*0H@("`@("`@("`@("!F +M:"YW&9L;V-K*&9H*0H@("`@9F@N +M=W)I=&4H96YT3H*("`@("`@("!F +M;&]C:RAF:6QE+"!,3T-+7T58*0H@("`@97AC97!T($E/17)R;W(@87,@93H* +M("`@("`@("!P71H;VX*(R!,:6-E;G-E9"!T +M;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@ +M;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* +M(R`@(&AT='`Z+R]W=WFEP9FEL90H*"B,@0W)E871E('II<"!A +MFEP +M7V9I;&5S*&9I;&5S*3H*("`@(&9,:7-T(#T@9FEL97,*("`@(&-O;7!R97-S +M:6]N(#T@>FEP9FEL92Y:25!?1$5&3$%4140*("`@('1I;65?&5C=71E7W-H96QL7W-C3H*("`@("`@("`@ +M("`@("`@("`@("!Z9BYW3H*("`@("`@("!C;&5A;G5P*&9I;&5S7V9R;VU?F8N8VQO&5C=71E7W-H96QL +M7W-C&-E<'0@3U-%#H*("`@("`@("`@("`@9&5L971E7W1M<%]F:6QE7V-M9"`]("=R +M;2`M9B`E3H*("`@("`@("`@("`@9BYC;&]S92@I"B`@("!R971U"YS<&QI +M="AC;60I+"!S=&1E&-E<'0@3U-%&5C=71E(&)A'0H +M>FEP7V9I;&4L(&9I;&5S7V9O=6YD+"!F:6QE"YS<&QI="AC;&5A;G5P7V-M9"DI"@H* +M:68@7U]N86UE7U\@/3T@)U]?;6%I;E]?)SH*("`@(&9I;&5,:7-T(#T@7)I9VAT(&]W +M;F5R6]U +M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O +M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W +M=WW!R +M:6YT("0R.WTG('P@6]U(&UA>2!N +M;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@ +M=&AE($QI8V5N2!T;R!E;G-U2!T;R!I=',@<')E=FEO +M=7,@'D@=&\@<')E=FEO=7,@'DN8V9G+F]L9"`O971C+VAA<')O>'DO:&%P2YC9F'DN8V9G+FYE=PH@(&9I"GT*"@IL;V=G97(@+70@8VQO=60@(B0H8F%S +M96YA;64@)#`I.B!%;G1E'D*'D@2P@8V]N9FEG=7)I +M;F<@9FER97=A;&PB"@HC(&EP=&%B;&5S(&5N=')Y('1O(&5N'D@2`D861D961)<',@ +M)')E;6]V961)<',@)'-T871S27`*"FEF(%L@)#\@+6=T(#`@70IT:&5N"B`@ +M;&]G9V5R("UT(&-L;W5D(")&86EL960@=&\@87!P;'D@9FER97=A;&P@'D@8V]N9FEG(@H@(",@4F5S=&]R92!T:&4@3$(*("!R97-T;W)E7VQB +M"@H@(&QO9V=E&ET(#$@)&QO8VL@)&QO8VME +M9`IE;'-E"B`@(R!296UO=F4@8F%C:V5D=7`@:7!T86)L92!R=6QE6]U(&UA>2!N;W0@=7-E('1H:7,@ +M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E +M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI +M8V5N7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z +M+R]W=WPH@('-U9&\@:7!T86)L97,@+70@;6%N9VQE("U$(%!215)/ +M551)3D<@+6D@)&1E=B`M;2!S=&%T92`M+7-T871E($Y%5R`M:B!#3TY.34%2 +M2R`M+7-E="UM87)K("1T86)L94YO(#(^+V1E=B]N=6QL"@H@('-U9&\@:7`@ +MV1E=CHS?2DI"G1A8FQE3F%M93TB5&%B +M;&5?)&1E=B(*"FEF(%L@)&%C=&EO;B`]/2`G861D)R!="G1H96X*("!P;'5G +M7VYI8PIE;'-E"B`@=6YP;'5G7VYI8PIF:0H````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````&]P="]C;&]U9"]B:6XO:7!S96-T=6YN96PN6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC +M90HC('=I=&@@=&AE($QI8V5N#4R-2(*=G!N:6YM87)K/2(P>#4R-"(*"G5S86=E*"D@>PH@("`@<')I;G1F +M(")5'0@ +M:&]P/B`M3X@+6D@/&EK92!P;VQI +M8WD^("UT(#QI:V4@;&EF971I;64^("U4(#QEPH@('-U9&\@:7!T86)L97,MPH@(&1I2!<"B`@("!P:&%S93(@<&]L:6-Y +M/21ER1R:6=H=&YE='-](B`^/B`D=G!N8V]N +M9F9I;&4@)B8*("!S=61O(&5C:&\@(B`@='EP93UT=6YN96PB(#X^("1V<&YC +M;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!A=71H8GD]VEK96QI9F5T:6UE?7,B(#X^("1V<&YC;VYF9FEL92`F)@H@ +M('-U9&\@96-H;R`B("!E2(@/CX@)'9P;F-O;F9F:6QE +M("8F"B`@2!F;W(@'1H;W`](B1/4%1!4D&ET("1R970*```````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````;W!T+V-L;W5D+V)I;B]I<&%S2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&QO8V%L('!U8DEP +M/20H96-H;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?22!E>&ES +M=',B"GT*"F%D9%]V<&Y?8VAA:6Y?9F]R7VEP("@I('L*("!L;V-A;"!P=6)) +M<#TD*&5C:&\@)#$@?"!A=VL@+48G+R<@)WMPPH@(&QO8V%L('!U8DEP/20H96-H;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?2PH@(&QO8V%L +M('!U8DEP/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R +M:6YT("0Q?2W!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)A +MW!R:6YT("0R?2W!R:6YT("0R +M?25]R;W5T97-?9G)O;5]M86EN("1T86)L94YA;64*(R!.3U1%.B!T:&ES +M("!E;G1R>2!W:6QL(&)E(&1E;&5T960@:68@=&AE(&EN=&5R9F%C92!IW!R:6YT +M("0Q?2PH@(&EF(%L@(B1S9FQA9R(@/3T@(C`B +M(%T*("!T:&5N"B`@("!R971UW!R +M:6YT("0Q?2W!R:6YT("0R?22!I<"!I;F9O(&EN=&\@9FEL92P@ +M=7-E9"!O;B!R961U;F1A;G0@W!R:6YT("0Q?2&ES +M=&EN9TEP36%S:STD*'-U9&\@:7`@861DPH@(&QO8V%L('!U8DEP/20Q +M"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP +M/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)A&ES=&EN9TEP36%S:STD*'-U9&\@:7`@861DPH@("`@(V5N86)L92!R<',@ +M86YD(')F%QN(B`D;G5M*0H@("`@("`@("`@96-H +M;R`D:&5X.PH@("`@("`@("`@(V5N86)L92!R<',*("`@("`@("`@(&5C:&\@ +M)&AE>"`^("]S>7,O8VQA&ET +M("0_("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1!9FQA9R(@/3T@(C$B(%T* +M=&AE;@H@(&%D9%]A;E]I<"`@)'!U8FQI8TEP("`F)@H@(&%D9%]F=U]C:&%I +M;E]F;W)?:7`@)'!U8FQI8TEP"B`@=6YL;V-K7V5X:70@)#\@)&QO8VL@)&QO +M8VME9`IF:0H*:68@6R`B)&9F;&%G(B`]/2`B,2(@72`F)B!;("(D1&9L86&ET("0_("1L;V-K("1L;V-K960* +M9FD*"G5N;&]C:U]E>&ET(#`@)&QO8VL@)&QO8VME9`H````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````!O<'0O8VQO=60O8FEN+VQI;F5?961I="YP>0`````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````,#`P,#2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2UL:6YE(&5D:71I;F<@;V8@8V]N9FEG=7)A=&EO;B!F +M:6QE&%M<&QE('1H97)E)W,@82!D;W5B;&4@97-C87!E(&]F('1H92!B86-K2!M +M871C:&5D(&%L;"!F:6QE3H* +M("`@("XN+B`@(&]S+G5N;&EN:R@G9&]C=&5S="UV:&]S=',N8V]N9B55N=7-E9$QO8V%L"B`@ +M("`@("`@("`@('-T870@/2!.;VYE"B`@("`@("`@("`@('=I=&@@;W!E;BAS +M96QF+F9I;&5N86UE+"`G&-E<'1I;VXH +M(DUA9&4@=&]O(&UA;GD@961I=',B*0H@("`@("`@("`@("`@("`@("`@("`@ +M("`@("`@96QI9B!R96UA:6YI;F=?8V]U;G0@/3T@,#H*("`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@("`@("`@ +M("`@("`@("!C:&%N9V5D7VQI;F4L('-U8G,@/2!E9&ET+G!A='1E2AS96QF+F9I;&5N86UE+"!B86-K=7!?9FEL96YA;64I"B`@("`@("`@("`@ +M("`@("!O3H*("`@("`@("`@("`@:68@8VAA;F=E +M9%]F:6QE(&ES(&YO="!.;VYE.B`@("`@("`@("`@("`@("`@("`@("`@("`@ +M("`@("`C(&9A:6QE9"P@8VQE86X@=7`*("`@("`@("`@("`@("`@(&-H86YG +M961?9FEL92YC;&]S92@I"B`@("`@("`@("`@("`@("!O6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC +M90HC('=I=&@@=&AE($QI8V5N2!R=6QE2!O9B!T:&4@3&EC96YS92!A +M=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O +M'!R97-S(&]R(&EM<&QI960N("!3 +M964@=&AE($QI8V5N7,I.@H*("`@(&5X:7-T:6YG7VME>7,@/2!;70H@ +M("`@;F5W7V5T:%]K97D@/2!.;VYE"@H@("`@9F]R(&LQ+"!V,2!I;B!G=65S +M=&YE=%]D:6-T+FET97)I=&5M7,@ +M86YD(&QE;BAV,2D@/B`P.@H@("`@("`@("`@("!E>&ES=&EN9U]K97ES+F%P +M<&5N9"AK,2D*"B`@("!I9B!N;W0@97AI2`Z.B!296UO=FEN9R!G=65S="!N971W;W)K +M+BXN(BD*("`@("`@("!R971U2!T;R!B92!S +M971U<`H@("`@)R2!C;VYF:6=U&ES=',@/2!&86QS90H*("`@(&9O2!P2!C;VYF:6=U2`Z.B!02`Z.B!.;R!'=65S=$YE='=O7,N87)G +M=ELQ72D*("`@('!R;V-E7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=WPH@(&QO8V%L(%]P +M:60])"AP:61O9B!D;G-M87-Q*0H@(&9OW!R:6YT("0R?20H@(&EF(%L@)&EP +M=C0@70H@('1H96X*("`@(&5C:&\@(C`@)&UA8R`D:7!V-"`D:&]S="`J(B`^ +M/B`D1$A#4%],14%315,*("!F:0H@(&EF(%L@)&EP=C8@70H@('1H96X*("`@ +M(&5C:&\@(C`@)&1U:60@)&EP=C8@)&AO6]U(&UA>2!N +M;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@ +M=&AE($QI8V5N&-E<'0@3U-%6]U&-E<'1I;VX@;V-C=7)R960Z("5S(B`E(&4*("`@("`@("`@ +M("`@7!E(#T]("=T0`````````````` +M```````````````````````````````````````````````````````````` +M`````````````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ +M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&-L=61E9%]H96%L=&A?8VAE +M8VMS(ET@/2!D871A6R)E>&-L=61E9%]H96%L=&A?8VAE8VMS(ET*("`@(&EF +M(")H96%L=&A?8VAE8VMS7V-O;F9I9R(@:6X@9&%T83H*("`@("`@("!D8F%G +M6R)H96%L=&A?8VAE8VMS7V-O;F9I9R)=(#T@9&%T85LB:&5A;'1H7V-H96-K +M7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z +M+R]W=WW!R:6YT("0Q?2<*?0H* +M:7!T86)L97-?*"D@>PH@("!L;V-A;"!O<#TD,0H@("!L;V-A;"!P=6)L:6-? +M:7`])#(*("`@;&]C86P@:7-?=G!C/69A;'-E"B`@(&QO8V%L(&9O7-T96UC=&P@:7,M86-T +M:79E(&EPS$N+C5]"B`@("!D;PH@("`@("!L;V=G97(@+70@8VQO +M=60@(B0H8F%S96YA;64@)#`I.B!W86ET:6YG(&EP7-T96UC=&P@:7,M86-T:79E(&EP7-T96UC=&P@:7,M86-T:79E(&EP7-T96UC=&P@&PR='!D"B`@("`@("`@("`@("`@("`@("`@2`Z(%!32R!<(B1I<'-E8U]P +M&PR +M='!D"@H@("!I<'1A8FQEPH@("!L;V-A;"!P=6)L:6-?:7`])#$*"B`@(&EPPH@("!L;V-A;"!U/20Q"B`@(&QO +M8V%L('!A)'4@7"H@7"(D +M<&%S&ET(#(*"0D[.PH@(&5S86,*9&]N90H*:68@6R`B)&1E +M=B(@/3T@(B(@70IT:&5N"B`@("!D978](F5T:#(B"F9I"@II9B!;("(D8VED +M&ET(#(*6R`B)&-R96%T92(@/3T@(C$B(%T@)B8@6R`B)&QF;&%G +M)'!F;&%G)')F;&%G)'-F;&%G(B`A/2`B,3$Q,2(@72`F)B!U&ET(#(*"FEF(%L@(B1CW!R:6YT("0Q?27)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS +M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E +M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,@/2!;)V5T:#$G+"`G971H,B6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2!O9B!T:&4@ +M3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A +M8FQE(&QA=R!O2!O9B!T:&4@9&YS;6%S<2!F:6QE+@IC<"`B)$1( +M0U!?0T].1DE'7TU!24XB("`B)$1(0U!?0T].1DE'7TU!24Y?0D%+(@IC<"`B +M)$1(0U!?0T].1DE'(B`B)$1(0U!?0T].1DE'7T)!2R(*"B-E;7!T>2!T:&4@ +M8V]N9FEG(&9I;&4*96-H;R`^("1$2$-07T-/3D9)1PH*=F%R/2(D,2(*9&AC +M<%]R86YG93TB(@ID:&-P7V=A=&5W87D](B(*9&AC<%]N971M87-K/2(B"F1N +M'1?9&YS/20H96-H +M;R`B)$--1$Q)3D4B('P@9W)E<"`M;R`B=7-E97AT9&YS/71R=64B*0IW:&EL +M92!;("UN("(D=F%R(B!="F1O"B!V87(Q/20H96-H;R`D=F%R('P@8W5T("UF +M,2`M9"`B+2(I"B!R;W5T97)I<#TD*"!E8VAO("1V87(Q('P@8W5T("UF,2`M +M9"`B.B(@*0H@9V%T97=A>3TD*&5C:&\@)'9AV1H8W!?V1H8W!?;F5T;6%S:WTB)V1H8W`M;W!T:6]N/71A9SIR86YG +M92W9A +MVQO9WTB8&=R97`@(EYD:&-P+6]P=&EO;CTV(B`B)$1(0U!?0T].1DE'7TU! +M24XB8")<;B(*;&]G/2(D>VQO9WTB8&=R97`@(EYD:&-P+6]P=&EO;CUO<'1I +M;VXZVQO +M9WTB8&=R97`@(EYD:&-P+7)A;F=E/2(@(B1$2$-07T-/3D9)1U]-04E.(F`B +M7&XB"@II9B!;("(D;&]G(B`A/2`G7&Y<;EQN)R!="G1H96X*("-#;&5A;FEN +M9R!T:&4@97AI9&AC<"UR86YG93TO9"<@(B1$2$-07T-/3D9)1U]-04E.(@IF:0H*(W=R +M=&EN9R!T:&4@;F5W(&-O;F9I9R!I;G1O('1H92!C;VYF:6<@9FEL92X*96-H +M;R`M92`B)&1H8W!?&ET("1R +M97-U;'0@)&QO8VL@)&QO8VME9`H````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````````````````````!O +M<'0O8VQO=60O8FEN+V-S7V1H8W`N<'D````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7,@/2!S970H*0H@("`@("`@(&9O2`A/2`G +M:60G(&%N9"!E;G1R>5LG;6%C7V%D9')E7,N861D*&ME>2D* +M("`@("`@("`@("`@("`@(&)R96%K"@H@("`@("`@(&EF(&1A=&%;)W)E;6]V +M92==(&%N9"!K97D@;F]T(&EN(')E;6]V95]K97ES.@H@("`@("`@("`@("!R +M96UO=F5?:V5Y2!I +M;B!R96UO=F5?:V5Y5TI"@H@("`@("`@(&1B86=;9&%T85LG:7!V-%]A9&1R97-S)UU=(#T@9&%T +M80H*("`@(')E='5R;B!D8F%G"@```&]P="]C;&]U9"]B:6XO8W-?8VUD;&EN +M92YP>0`````````````````````````````````````````````````````` +M```````````````````````````````````````````P,#`P-S4U`#`P,#$W +M-3``,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ +M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E +M(&%T"B,*(R`@(&AT='`Z+R]W=W2!O9B!T:&4@ +M3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A +M8FQE(&QA=R!O'!R97-S(&]R(&EM +M<&QI960N("!3964@=&AE($QI8V5N'DN8V9G("]E=&,O:&%P2]H87!R;WAY+F-F9RYO;&0*"B`@;78@)&YE +M=U]C;VYF:6<@+V5T8R]H87!R;WAY+VAA<')O>'DN8V9G"B`@:68@:&%P2`M<"`O=F%R+W)U;B]H87!R;WAY+G!I9"`M9B`O971C+VAA<')O>'DO:&%P +M2YC9F<@+7-F("0H8V%T("]V87(O'DN<&ED*3L@=&AE +M;@H@("`@;&]G9V5R("UT(&-L;W5D(").97<@:&%P2!I;G-T86YC92!S +M=6-C97-S9G5L;'D@;&]A9&5D+"!S=&]P<&EN9R!P'DO:&%P2YC9F<@)&YE=U]C;VYF:6<* +M("`@(&UV("]E=&,O:&%P2]H87!R;WAY+F-F9RYO;&0@+V5T8R]H87!R +M;WAY+VAA<')O>'DN8V9G"B`@("!H87!R;WAY("UP("]V87(O'DN<&ED("UF("]E=&,O:&%P2]H87!R;WAY+F-F9R`M2YP:60I"B`@("!R970],0H@(&9I"@IE>&ET("1R +M970*```````````````````````````````````````````````````````` +M`````````````````````````````````````````````````````')O;W0O +M;6]N:71O71H;VX*(R!,:6-E;G-E9"!T;R!T +M:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE +M"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@ +M(&AT='`Z+R]W=WWT*("`@('!A2`K)UTG*R(@(B`K("=;)RMP2LG +M72<@*R`B("(@*R!M2!O;F4@<&ED(&]R(&YO=`H@("`@:68@97AI=%-T871U6EN9R!F97<@;6]R92!T:6UEWT*("`@(&9A:6QI +M;F=?PH@("`@("`@("`@("`@("`@ +M(G-U8V-EPH@("`@("`@("`@("`@ +M("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EWT@(U-K:7`@WT*("`@(&9A:6QI;F=# +M:&5C:W,@/2!;70H@("`@:68@8VAE8VM4>7!E(#T](")B87-I8R(Z"B`@("`@ +M("`@;6]N:71297-U;'0L(&9A:6QI;F=#:&5C:W,@/2!M;VYI=%!R;V-E&-L=61E(#T@:&-?9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!H8U]D871A(&5L7!E*0H@("`@("`@("`@("`@("`@:68@;&5N*')E="D@ +M/3T@,#H*("`@("`@("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@ +M("`@("`@:68@(G-U8V-E7,N87)G=BD@/3T@,CH*("`@("`@("!I9B!S>7,N +M87)G=ELQ72`]/2`B861V86YC960B.@H@("`@("`@("`@("!M86EN*")A9'9A +M;F-E9"(I"B`@("`@("`@96QI9B!S>7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@ +M("`@("`@("`@("!M86EN*")B87-I8R(I"B`@("`@("`@96QS93H*("`@("`@ +M("`@("`@<')I;G1D*")%7!E(&]F('1E7,N87)G=BD*("`@(&5L0`````` +M```````````````````````````````````````````````````````````` +M```````````````````P,#`P-C0T`#`P,#$W-3``,#`P,371H;VX*(R!,:6-E +M;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@ +M=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ +M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E +M(&%T"B,*(R`@(&AT='`Z+R]W=W'!E8W1E9"`](%M="B`@("`@("`@ +M9&5S=$EP(#T@<&]R=$9O'0L('-R8U!O2!I +M;B!I<%1A8FQE4QI'!E8W1E +M9#H*("`@("`@("`@("`@("`@("`@("!I9B!I<%1A8FQE16YT'!E8W1E9$5N=')Y*2`]/2`M,3H*("`@("`@("`@("`@("`@("`@("`@("`@ +M9F]U;F1!;&P@/2!&86QS90H@("`@("`@("`@("`@("`@("`@("`@("!B4QI2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA +M=R!O'!R97-S(&]R(&EM<&QI960N +M("!3964@=&AE($QI8V5N$UE;6]R>55S86=E(&EN(&AE86QT:%]C +M:&5C:W-?9&%T82`B("L@7`H@("`@("`@("`@("`@(")S>7-T96U4:')E&ET*#`I"@H@("`@;6%X365M;W)Y +M57-A9V4@/2!F;&]A="AD871A6R)M87A-96UO7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@ +M(&UA:6XH*0H````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M'E?8VAE8VLN<'D````````````` +M```````````````````````````````````````````````````````````` +M`````````````#`P,#`V-#0`,#`P,36]U(&UA>2!N;W0@=7-E('1H +M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N +M41A=&$@86YD(")M87AC;VYN +M(B!I;B!H84-F9U-E8W1I;VYS6R)G;&]B86PB73H*("`@("`@("!I9B!H87!R +M;WAY1&%T85LB;6%X8V]N;B)=("$](&AA0V9G4V5C=&EO;G-;(F=L;V)A;")= +M6R)M87AC;VYN(EU;,%TN'E$871A(BD*("`@(&EF(&AA +M<')O>'E$871A(&ES($YO;F4@;W(@;&5N*&AA<')O>'E$871A*2`]/2`P.@H@ +M("`@("`@('!R:6YT(").;R!D871A('!R;W9I9&5D('1O(&-H96-K+"!S:VEP +M<&EN9R(*("`@("`@("!E>&ET*#`I"@H@("`@=VET:"!O<&5N*"(O971C+VAA +M<')O>'DO:&%P2YC9FWT*("`@(&-UWT*("`@(&9O41A=&$L(&AA0V9G4V5C=&EO;G,I"@H@("`@:68@ +M8VAE8VM-87A#;VYN(&%N9"!C:&5C:TQB4G5L97,Z"B`@("`@("`@<')I;G0@ +M(D%L;"!C:&5C:W,@<&%S&ET*#`I"B`@("!E;'-E.@H@ +M("`@("`@(&5X:70H,2D*"@II9B!?7VYA;65?7R`]/2`B7U]M86EN7U\B.@H@ +M("`@:68@;&5N*'-Y7,N87)G=ELQ72`]/2`B +M861V86YC960B.@H@("`@("`@(&UA:6XH*0H````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&ET*#`I"@H@("`@=&5M<&QA=&5697)S:6]N36%T8VAE +M65T('-E='5P(&%T("(@*R!R96QE87-E1FEL92`K7`H@ +M("`@("`@("`@("`@("`@("`B+"!S:VEP<&EN9RXB"B`@("`@("`@96QI9B!E +M>'!E8W1E9"`A/2!F;W5N9#H*("`@("`@("`@("`@<')I;G0@(E1E;7!L871E +M(%9E'!E8W1E9"`K("(L(&9O=6YD.B`B("L@9F]U;F0*("`@("`@ +M("`@("`@=&5M<&QA=&5697)S:6]N36%T8VAE'!E8W1E9"`K("(L(&9O=6YD.B`B("L@9F]U;F0*("`@("`@ +M("`@("`@&ET*#$I"@H*:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH* +M("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A;F0@2\````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````,#`P,#0`````````````````````````` +M```````````````````````````````````````````````P,#`P-C0T`#`P +M,#$W-3``,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS +M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E +M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W3U.;VYE*3H*("`@('=I=&@@ +M;W!E;B@G+W)O;W0O:&5A;'1H7V-H96-K2!I2!I5TN2D@/3T@,#H*("`@("`@("`@("`@("`@(&-O;G1I +M;G5E"B`@("`@("`@("`@(&ME>59A;"`](&5N=')Y+G-P;&ET*"(](BD*("`@ +M("`@("`@("`@:68@;&5N*&ME>59A;"D@/3T@,CH*("`@("`@("`@("`@("`@ +M(&1;:V5Y5F%L6S!=+G-T2]?7VEN:71?7RYP>0`````````````````````````````````````````` +M````````````````````````````````````````,#`P,#8T-``P,#`Q-S4P +M`#`P,#$W-3``,#`P,#`P,#$U-#``,3,V,C4Q-3`S,30`,#$W-S8R`"`P```` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````'5S=&%R("``9&%R2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO +M2!A<'!L:6-A8FQE(&QA=R!O'!R +M97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N0`````````````````````````````````` +M````````````````````````````````````````````````,#`P,#8T-``P +M,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#,Q,S(`,3,V,C4Q-3`S,30`,#$W-S8Q +M`"`P```````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````'5S=&%R("``9&%R2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET +M*#`I"@H@("`@;6EN1&ES:TYE961E9"`](&9L;V%T*&1A=&%;(FUI;D1IF4I("\@,3`R-`H*("`@ +M(&EF("AF6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI +M86YC90HC('=I=&@@=&AE($QI8V5N2!I;7!O7,I(#T](#`Z"B`@("`@ +M("`@<')I;G0@(D%L;"`B("L@7,@ +M87)E(')E86-H86)L92!V:6$@<&EN9R(*("`@("`@("!E>&ET*#`I"B`@("!E +M;'-E.@H@("`@("`@('!R:6YT(")5;G)E86-H86)L92!G871E=V%Y7,N87)G=ELQ72`]/2`B8F%S:6,B +M.@H@("`@("`@(&UA:6XH*0H````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````')O;W0O:&5A;'1H7V-H96-K0`````````````````````````````````````````````````````````` +M```````````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P +M,371H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD +M871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C +M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F +M('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&5C=71A8FQE71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E +M($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H +M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C +M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I +M"@H@("`@=VET:"!O<&5N*"2!O +M9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A +M<'!L:6-A8FQE(&QA=R!O'!R97-S +M(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N$-P=55S86=E(&EN(&AE +M86QT:%]C:&5C:W-?9&%T82!S>7-T96U4:')E&ET*#`I"@H@("`@;6%X0W!U57-A9V4@/2!F;&]A="AD871A +M6R)M87A#<'55&ET*#`I"B`@("!E +M;'-E.@H@("`@("`@('!R:6YT(")&86EL960@=&\@&ET*#$I"@H*:68@7U]N86UE +M7U\@/3T@(E]?;6%I;E]?(CH*("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A +M;F0@0`````````````````````````````````````` +M````````````````````````````````````````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2`]('9-6R)M86-!9&1R97-S(ET@ +M*R`B("(@*R!V35LB:7`B72`K("(@(B`K('9-6R)V;4YA;64B70H@("`@("`@ +M(&9O=6YD16YT2`](%1R=64*("`@("`@("`@("`@("`@(&)R96%K"@H@("`@("`@("`@("!N +M;VY$969A=6QT4V5T(#T@(G-E=#HB("L@=DU;(FEP(ETN2`](%1R=64*("`@("`@ +M("`@("`@("`@(&)R96%K"@H@("`@("`@(&EF(&YO="!F;W5N9$5N=')Y.@H@ +M("`@("`@("`@("!F86EL961#:&5C:R`](%1R=64*("`@("`@("`@("`@9F%I +M;'5R94UE&ET*#$I"B`@("!E;'-E.@H@("`@("`@('!R +M:6YT(")!;&P@(B`K('-T7,N87)G=ELQ72`]/2`B861V86YC960B.@H@("`@("`@(&UA:6XH +M*0H````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````````````````!R;V]T +M+V9U;F,N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P +M.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N +M2!O;F4@;&]C:R!IPH@("`@ +MPH@("`@;&]C:STD,0H*("`@(%]?;&]C:V5D/3`*("`@ +M(%]?5%,]8&1A=&4@*R5S)4Y@"B`@("!?7TQ/0TM$25(](B]T;7`B"B`@("!? +M7TQ/0TM&24Q%/2(D7U],3T-+1$E2+R1?7U13+20D+21L;V-K+FQO8VLB"@H@ +M("`@:68@6R`D,B!="B`@("!T:&5N"B`@("`@("`@7U]424U%3U54/20R"B`@ +M("!E;'-E"B`@("`@("`@7U]424U%3U54/3,P"B`@("!F:0H*("`@(&EF(%L@ +M+64@)%]?3$]#2T9)3$4@70H@("`@=&AE;@H@("`@("`@(&QO9V=EPH@("`@7U],3T-+1$E2/2(O=&UP +M(@H@("`@7U],3T-+1DE,13TB)%]?3$]#2T1)4B\J+20D+20Q+FQO8VLB"B`@ +M("!?7VQO8VME9#TD,@H@("`@:68@6R`B)%]?;&]C:V5D(B`]/2`B,2(@70H@ +M("`@=&AE;@H@("`@("`@(')M("1?7TQ/0TM&24Q%"B`@("!F:0I]"@HC(')E +M;&5A&ET('9A;'5E"B,@ +M)#(@;&]C:R!F:6QE;F%M90HC("0S(&QO8VME9"@Q*2!OF4]8&EP(&%D9'(@2!O9B!T:&4@3&EC96YS92!A=`HC +M"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ +M=&AE($QI8V5N7,O8VQA;65T82UD871A+R@N*UM>+UTI+S\D("`N+B]M +M971A9&%T82\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%="@HC:'1T<#HO +M+SQR;W5T97))4#XO;&%T97-T+V9O;R!A;F0@+BXN+V9O;R\@*'EI96QD(&UE +M=&%D871A+R1)4"]F;V\I"B-A2UZ;VYE+S\D("`N+B]M971A9&%T82\E>U)%34]415]! +M1$12?2]A=F%I;&%B:6QI='DM>F]N92!;3"Q.0RQ14T%="E)E=W)I=&52=6QE +M(%YC;&]U9"UI9&5N=&EF:65R+S\D("`N+B]M971A9&%T82\E>U)%34]415]! +M1$12?2]C;&]U9"UI9&5N=&EF:65R(%M,+$Y#+%%305T*4F5WU)%34]415]!1$12?2]I +M;G-T86YC92UI9"!;3"Q.0RQ14T%="E)E=W)I=&52=6QE(%YL;V-A;"UH;W-T +M;F%M92\_)"`@+BXO;65T861A=&$O)7M214U/5$5?041$4GTO;&]C86PM:&]S +M=&YA;64@6TPL3D,L45-!70I297=R:71E4G5L92!>;&]C86PM:7!V-"\_)"`@ +M+BXO;65T861A=&$O)7M214U/5$5?041$4GTO;&]C86PM:7!V-"!;3"Q.0RQ1 +M4T%="E)E=W)I=&52=6QE(%YP=6)L:6,M:&]S=&YA;64O/R0@("XN+VUE=&%D +M871A+R5[4D5-3U1%7T%$1%)]+W!U8FQI8RUH;W-T;F%M92!;3"Q.0RQ14T%= +M"E)E=W)I=&52=6QE(%YP=6)L:6,M:7!V-"\_)"`@+BXO;65T861A=&$O)7M2 +M14U/5$5?041$4GTO<'5B;&EC+6EP=C0@6TPL3D,L45-!70I297=R:71E4G5L +M92!><'5B;&EC+6ME>7,O/R0@("XN+VUE=&%D871A+R5[4D5-3U1%7T%$1%)] +M+W!U8FQI8RUK97ES(%M,+$Y#+%%305T*4F5W=FTM:60O/R0@ +M("XN+VUE=&%D871A+R5[4D5-3U1%7T%$1%)]+W9M+6ED(%M,+$Y#+%%305T* +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````=F%R+W=W=R]H=&UL+W5S97)D871A+P`` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````#`P,#`W-34`,#`P,3/dev/null 2>&1 || ${echo} 'cloud_scripts/usr/share/cloud/cloud-scripts.tar': 'MD5 check failed' + ) << \SHAR_EOF +6c9c71f04c38fbbe6031c09a732f525d cloud_scripts/usr/share/cloud/cloud-scripts.tar +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/usr/share/cloud/cloud-scripts.tar'` -ne 696320 && \ + ${echo} "restoration warning: size of 'cloud_scripts/usr/share/cloud/cloud-scripts.tar' is not 696320" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/ips0003.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0003.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0003.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0003.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0003.json' && +{"ip_address": +[{"public_ip":"10.0.3.10", +"source_nat":true, +"add":true, +"one_to_one_nat":false, +"first_i_p":false, +"gateway":"10.0.3.1", +"netmask":"255.255.255.0", +"vif_mac_address":"06:cb:aa:00:00:03", +"nic_dev_id":2, +"new_nic":false}], +"type":"ips"} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0003.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0003.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0003.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0003.json': 'MD5 check failed' + ) << \SHAR_EOF +e8113ca4dc70734a2e07e4cd5aa817e7 cloud_scripts/opt/cloud/testdata/ips0003.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0003.json'` -ne 253 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0003.json' is not 253" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/vmp0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/vmp0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/vmp0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/vmp0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/testdata/vmp0001.json +M>R)I<%]A9&1R97-S(CHB,3/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/vmp0001.json': 'MD5 check failed' + ) << \SHAR_EOF +a3150c6241b311cbfc2180be23d1ddee cloud_scripts/opt/cloud/testdata/vmp0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/vmp0001.json'` -ne 77 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/vmp0001.json' is not 77" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/gn0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/gn0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/gn0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/gn0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/gn0001.json' && +{"add":true, +"mac_address":"02:00:56:36:00:02", +"device":"eth3", +"router_guest_ip":"172.16.1.1", +"router_guest_gateway":"172.16.1.0", +"router_guest_netmask":"255.255.255.0", +"cidr":"24", +"dns":"8.8.8.8,8.8.8.4", +"domain_name":"devcloud.local", +"type":"guestnetwork"} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/gn0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/gn0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/gn0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/gn0001.json': 'MD5 check failed' + ) << \SHAR_EOF +e790842388eb0a3f86ea0dbbcf4608eb cloud_scripts/opt/cloud/testdata/gn0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/gn0001.json'` -ne 267 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/gn0001.json' is not 267" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/dhcp0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/dhcp0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/dhcp0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' && +{ +X "host_name":"VM-58976c22-0832-451e-9ab2-039e9f27e415", +X "mac_address":"02:00:26:c3:00:02", +X "ipv4_address":"172.16.1.102", +X "ipv6_duid":"00:03:00:01:02:00:26:c3:00:02", +X "default_gateway":"172.16.1.1", +X "default_entry":true, +X "type":"dhcpentry" +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/dhcp0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/dhcp0001.json': 'MD5 check failed' + ) << \SHAR_EOF +0f44da4132b56f2ece9b36bab3213f28 cloud_scripts/opt/cloud/testdata/dhcp0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/dhcp0001.json'` -ne 250 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' is not 250" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/acl0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/acl0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/acl0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/acl0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/acl0001.json' && +{ +X "eth2": { +X "device": "eth2", +X "egress_rules": [ +X { +X "allowed": false, +X "cidr": "10.0.6.0/8", +X "first_port": 60, +X "last_port": 60, +X "type": "tcp" +X } +X ], +X "ingress_rules": [ +X { +X "allowed": true, +X "cidr": "10.0.1.0/8", +X "protocol": 41, +X "type": "protocol" +X }, +X { +X "allowed": true, +X "cidr": "10.0.4.0/8", +X "type": "all" +X }, +X { +X "allowed": true, +X "cidr": "10.0.3.0/8", +X "icmp_code": -1, +X "icmp_type": -1, +X "type": "icmp" +X }, +X { +X "allowed": true, +X "cidr": "10.0.2.0/8", +X "first_port": 40, +X "last_port": 40, +X "type": "udp" +X }, +X { +X "allowed": true, +X "cidr": "10.0.1.0/8", +X "first_port": 30, +X "last_port": 30, +X "type": "tcp" +X } +X ], +X "mac_address": "02:00:0d:7b:00:04", +X "nic_ip": "172.16.1.1", +X "nic_netmask": "24", +X "private_gateway_acl": false, +X "type": "networkacl" +X }, +X "id": "networkacl" +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/acl0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/acl0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/acl0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/acl0001.json': 'MD5 check failed' + ) << \SHAR_EOF +1ea2a1b5d6a98bc6c0fc2375de284b17 cloud_scripts/opt/cloud/testdata/acl0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/acl0001.json'` -ne 1405 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/acl0001.json' is not 1405" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/README ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/README' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/README (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/README (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/README' && +Json file used to test the provisioning scripts on virtual appliances +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/README' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/README' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/README failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/README': 'MD5 check failed' + ) << \SHAR_EOF +13e5ecf4d998c3df3cf53485d6f46ee1 cloud_scripts/opt/cloud/testdata/README +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/README'` -ne 70 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/README' is not 70" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/ips0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0001.json' && +{"ip_address": +[{"public_ip":"10.0.2.102", +"source_nat":true, +"add":true, +"one_to_one_nat":false, +"first_i_p":false, +"gateway":"10.0.2.1", +"netmask":"255.255.255.0", +"vif_mac_address":"06:cb:aa:00:00:03", +"nic_dev_id":1, +"new_nic":false}], +"type":"ips"} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0001.json': 'MD5 check failed' + ) << \SHAR_EOF +6f7337aaa605096eef31300afba0f4af cloud_scripts/opt/cloud/testdata/ips0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0001.json'` -ne 254 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0001.json' is not 254" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/test.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/test.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/test.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/test.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/test.sh' && +#!/bin/sh +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +cp /opt/cloud/testdata/* /etc/cloudstack +/opt/cloud/bin/update_config.py cmd_line.json +/opt/cloud/bin/update_config.py gn0001.json +/opt/cloud/bin/update_config.py ips0001.json +/opt/cloud/bin/update_config.py ips0002.json +/opt/cloud/bin/update_config.py ips0003.json +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/test.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/testdata/test.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/test.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/test.sh': 'MD5 check failed' + ) << \SHAR_EOF +7fbb72051fd8d3b66fd481aa51d3debe cloud_scripts/opt/cloud/testdata/test.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/test.sh'` -ne 1062 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/test.sh' is not 1062" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/ips0002.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0002.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0002.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0002.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0002.json' && +{"ip_address": +[{"public_ip":"10.0.2.103", +"source_nat":true, +"add":true, +"one_to_one_nat":false, +"first_i_p":false, +"gateway":"10.0.2.1", +"netmask":"255.255.255.0", +"vif_mac_address":"06:cb:aa:00:00:03", +"nic_dev_id":1, +"new_nic":false}], +"type":"ips"} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0002.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0002.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0002.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0002.json': 'MD5 check failed' + ) << \SHAR_EOF +12aec2bca1d88c499ee0af39c2e20ea1 cloud_scripts/opt/cloud/testdata/ips0002.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0002.json'` -ne 254 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0002.json' is not 254" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/s2s0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/s2s0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/s2s0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/s2s0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/s2s0001.json' && +{ +X "local_public_ip":"172.16.1.1", +X "local_guest_cidr":"172.16.1.0/24", +X "local_public_gateway":"172.16.1.1", +X "peer_gateway_ip":"10.200.200.1", +X "peer_guest_cidr_list":"10.0.0.0/24", +X "esp_policy":"3des-md5", +X "ike_policy":"3des-md5", +X "ipsec_psk":"vpnblabla", +X "ike_lifetime":86400, +X "esp_lifetime":3600, +X "create":true, +X "dpd":false, +X "passive":false, +X "type":"site2sitevpn" +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/s2s0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/s2s0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/s2s0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/s2s0001.json': 'MD5 check failed' + ) << \SHAR_EOF +ff589cb7ab7721a270f4cc703719c917 cloud_scripts/opt/cloud/testdata/s2s0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/s2s0001.json'` -ne 380 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/s2s0001.json' is not 380" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +ip link|grep BROADCAST|grep -v eth0|grep -v eth1|cut -d ":" -f 2 > /tmp/iflist +while read i +do +X ip addr show $i|grep "inet " > /tmp/iplist_$i +X while read line +X do +X ip=`echo $line|cut -d " " -f 2|cut -d "/" -f 1` +X arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 +X arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 +X done < /tmp/iplist_$i +done < /tmp/iflist +sleep 1 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ': 'MD5 check failed' + ) << \SHAR_EOF +023d994f54c0955f160f127c1d85d6ae cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ'` -ne 1177 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' is not 1177" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/checkrouter.sh.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/checkrouter.sh.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/checkrouter.sh.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +STATUS=UNKNOWN +INTERFACE=eth1 +ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g') +if [ $ROUTER_TYPE = "router" ] +then +X ROUTER_STATE=$(ip addr | grep eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi') +X STATUS=$ROUTER_STATE +else +X ROUTER_STATE=$(ip addr | grep $INTERFACE | grep state | awk '{print $9;}') +X if [ $ROUTER_STATE = "UP" ] +X then +X STATUS=MASTER +X elif [ $ROUTER_STATE = "DOWN" ] +X then +X STATUS=BACKUP +X fi +fi +X +echo "Status: ${STATUS}" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/checkrouter.sh.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ': 'MD5 check failed' + ) << \SHAR_EOF +bbd331057760019d05ead01eec5e42aa cloud_scripts/opt/cloud/templates/checkrouter.sh.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ'` -ne 1357 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' is not 1357" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/heartbeat.sh.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/heartbeat.sh.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/heartbeat.sh.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +t=$(date +%s) +echo $t > /ramdisk/rrouter/keepalived.ts +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/heartbeat.sh.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ': 'MD5 check failed' + ) << \SHAR_EOF +c006a52c775a0418870c0c50f0131ee7 cloud_scripts/opt/cloud/templates/heartbeat.sh.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ'` -ne 853 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' is not 853" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/conntrackd.conf.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/conntrackd.conf.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/conntrackd.conf.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# Synchronizer settings +# +Sync { +X Mode FTFW { +X # +X # Size of the resend queue (in objects). This is the maximum +X # number of objects that can be stored waiting to be confirmed +X # via acknoledgment. If you keep this value low, the daemon +X # will have less chances to recover state-changes under message +X # omission. On the other hand, if you keep this value high, +X # the daemon will consume more memory to store dead objects. +X # Default is 131072 objects. +X # +X # ResendQueueSize 131072 +X +X # +X # This parameter allows you to set an initial fixed timeout +X # for the committed entries when this node goes from backup +X # to primary. This mechanism provides a way to purge entries +X # that were not recovered appropriately after the specified +X # fixed timeout. If you set a low value, TCP entries in +X # Established states with no traffic may hang. For example, +X # an SSH connection without KeepAlive enabled. If not set, +X # the daemon uses an approximate timeout value calculation +X # mechanism. By default, this option is not set. +X # +X # CommitTimeout 180 +X +X # +X # If the firewall replica goes from primary to backup, +X # the conntrackd -t command is invoked in the script. +X # This command schedules a flush of the table in N seconds. +X # This is useful to purge the connection tracking table of +X # zombie entries and avoid clashes with old entries if you +X # trigger several consecutive hand-overs. Default is 60 seconds. +X # +X # PurgeTimeout 60 +X +X # Set the acknowledgement window size. If you decrease this +X # value, the number of acknowlegdments increases. More +X # acknowledgments means more overhead as conntrackd has to +X # handle more control messages. On the other hand, if you +X # increase this value, the resend queue gets more populated. +X # This results in more overhead in the queue releasing. +X # The following value is based on some practical experiments +X # measuring the cycles spent by the acknowledgment handling +X # with oprofile. If not set, default window size is 300. +X # +X # ACKWindowSize 300 +X +X # +X # This clause allows you to disable the external cache. Thus, +X # the state entries are directly injected into the kernel +X # conntrack table. As a result, you save memory in user-space +X # but you consume slots in the kernel conntrack table for +X # backup state entries. Moreover, disabling the external cache +X # means more CPU consumption. You need a Linux kernel +X # >= 2.6.29 to use this feature. By default, this clause is +X # set off. If you are installing conntrackd for first time, +X # please read the user manual and I encourage you to consider +X # using the fail-over scripts instead of enabling this option! +X # +X # DisableExternalCache Off +X } +X +X # +X # Multicast IP and interface where messages are +X # broadcasted (dedicated link). IMPORTANT: Make sure +X # that iptables accepts traffic for destination +X # 225.0.0.50, eg: +X # +X # iptables -I INPUT -d 225.0.0.50 -j ACCEPT +X # iptables -I OUTPUT -d 225.0.0.50 -j ACCEPT +X # +X Multicast { +X # +X # Multicast address: The address that you use as destination +X # in the synchronization messages. You do not have to add +X # this IP to any of your existing interfaces. If any doubt, +X # do not modify this value. +X # +X IPv4_address 225.0.0.50 +X +X # +X # The multicast group that identifies the cluster. If any +X # doubt, do not modify this value. +X # +X Group 3780 +X +X # +X # IP address of the interface that you are going to use to +X # send the synchronization messages. Remember that you must +X # use a dedicated link for the synchronization messages. +X # +X IPv4_interface [LINK_IP] +X +X # +X # The name of the interface that you are going to use to +X # send the synchronization messages. +X # +X Interface [LINK_IF] +X +X # The multicast sender uses a buffer to enqueue the packets +X # that are going to be transmitted. The default size of this +X # socket buffer is available at /proc/sys/net/core/wmem_default. +X # This value determines the chances to have an overrun in the +X # sender queue. The overrun results packet loss, thus, losing +X # state information that would have to be retransmitted. If you +X # notice some packet loss, you may want to increase the size +X # of the sender buffer. The default size is usually around +X # ~100 KBytes which is fairly small for busy firewalls. +X # +X SndSocketBuffer 1249280 +X +X # The multicast receiver uses a buffer to enqueue the packets +X # that the socket is pending to handle. The default size of this +X # socket buffer is available at /proc/sys/net/core/rmem_default. +X # This value determines the chances to have an overrun in the +X # receiver queue. The overrun results packet loss, thus, losing +X # state information that would have to be retransmitted. If you +X # notice some packet loss, you may want to increase the size of +X # the receiver buffer. The default size is usually around +X # ~100 KBytes which is fairly small for busy firewalls. +X # +X RcvSocketBuffer 1249280 +X +X # +X # Enable/Disable message checksumming. This is a good +X # property to achieve fault-tolerance. In case of doubt, do +X # not modify this value. +X # +X Checksum on +X } +X # +X # You can specify more than one dedicated link. Thus, if one dedicated +X # link fails, conntrackd can fail-over to another. Note that adding +X # more than one dedicated link does not mean that state-updates will +X # be sent to all of them. There is only one active dedicated link at +X # a given moment. The `Default' keyword indicates that this interface +X # will be selected as the initial dedicated link. You can have +X # up to 4 redundant dedicated links. Note: Use different multicast +X # groups for every redundant link. +X # +X # Multicast Default { +X # IPv4_address 225.0.0.51 +X # Group 3781 +X # IPv4_interface 192.168.100.101 +X # Interface eth3 +X # # SndSocketBuffer 1249280 +X # # RcvSocketBuffer 1249280 +X # Checksum on +X # } +X +X # +X # You can use Unicast UDP instead of Multicast to propagate events. +X # Note that you cannot use unicast UDP and Multicast at the same +X # time, you can only select one. +X # +X # UDP { +X # +X # UDP address that this firewall uses to listen to events. +X # +X # IPv4_address 192.168.2.100 +X # +X # or you may want to use an IPv6 address: +X # +X # IPv6_address fe80::215:58ff:fe28:5a27 +X +X # +X # Destination UDP address that receives events, ie. the other +X # firewall's dedicated link address. +X # +X # IPv4_Destination_Address 192.168.2.101 +X # +X # or you may want to use an IPv6 address: +X # +X # IPv6_Destination_Address fe80::2d0:59ff:fe2a:775c +X +X # +X # UDP port used +X # +X # Port 3780 +X +X # +X # The name of the interface that you are going to use to +X # send the synchronization messages. +X # +X # Interface eth2 +X +X # +X # The sender socket buffer size +X # +X # SndSocketBuffer 1249280 +X +X # +X # The receiver socket buffer size +X # +X # RcvSocketBuffer 1249280 +X +X # +X # Enable/Disable message checksumming. +X # +X # Checksum on +X # } +X +} +X +# +# General settings +# +General { +X # +X # Set the nice value of the daemon, this value goes from -20 +X # (most favorable scheduling) to 19 (least favorable). Using a +X # very low value reduces the chances to lose state-change events. +X # Default is 0 but this example file sets it to most favourable +X # scheduling as this is generally a good idea. See man nice(1) for +X # more information. +X # +X Nice -20 +X +X # +X # Select a different scheduler for the daemon, you can select between +X # RR and FIFO and the process priority (minimum is 0, maximum is 99). +X # See man sched_setscheduler(2) for more information. Using a RT +X # scheduler reduces the chances to overrun the Netlink buffer. +X # +X # Scheduler { +X # Type FIFO +X # Priority 99 +X # } +X +X # +X # Number of buckets in the cache hashtable. The bigger it is, +X # the closer it gets to O(1) at the cost of consuming more memory. +X # Read some documents about tuning hashtables for further reference. +X # +X HashSize 32768 +X +X # +X # Maximum number of conntracks, it should be double of: +X # $ cat /proc/sys/net/netfilter/nf_conntrack_max +X # since the daemon may keep some dead entries cached for possible +X # retransmission during state synchronization. +X # +X HashLimit 131072 +X +X LogFile on +X +X # +X # Syslog: on, off or a facility name (daemon (default) or local0..7) +X # Default: off +X # +X Syslog on +X +X # +X # Lockfile +X # +X LockFile /var/lock/conntrackd.lock +X +X # +X # Unix socket configuration +X # +X UNIX { +X Path /var/run/conntrackd.sock +X Backlog 20 +X } +X +X SocketBufferSize 2097152 +X SocketBufferSizeMaxGrown 8388608 +X +X # +X # Netlink event socket buffer size. If you do not specify this clause, +X # the default buffer size value in /proc/net/core/rmem_default is +X # used. This default value is usually around 100 Kbytes which is +X # fairly small for busy firewalls. This leads to event message dropping +X # and high CPU consumption. This example configuration file sets the +X # size to 2 MBytes to avoid this sort of problems. +X # +X NetlinkBufferSize 2097152 +X +X # +X # The daemon doubles the size of the netlink event socket buffer size +X # if it detects netlink event message dropping. This clause sets the +X # maximum buffer size growth that can be reached. This example file +X # sets the size to 8 MBytes. +X # +X NetlinkBufferSizeMaxGrowth 8388608 +X +X # +X # If the daemon detects that Netlink is dropping state-change events, +X # it automatically schedules a resynchronization against the Kernel +X # after 30 seconds (default value). Resynchronizations are expensive +X # in terms of CPU consumption since the daemon has to get the full +X # kernel state-table and purge state-entries that do not exist anymore. +X # Be careful of setting a very small value here. You have the following +X # choices: On (enabled, use default 30 seconds value), Off (disabled) +X # or Value (in seconds, to set a specific amount of time). If not +X # specified, the daemon assumes that this option is enabled. +X # +X # NetlinkOverrunResync On +X +X # +X # If you want reliable event reporting over Netlink, set on this +X # option. If you set on this clause, it is a good idea to set off +X # NetlinkOverrunResync. This option is off by default and you need +X # a Linux kernel >= 2.6.31. +X # +X # NetlinkEventsReliable Off +X +X # +X # By default, the daemon receives state updates following an +X # event-driven model. You can modify this behaviour by switching to +X # polling mode with the PollSecs clause. This clause tells conntrackd +X # to dump the states in the kernel every N seconds. With regards to +X # synchronization mode, the polling mode can only guarantee that +X # long-lifetime states are recovered. The main advantage of this method +X # is the reduction in the state replication at the cost of reducing the +X # chances of recovering connections. +X # +X # PollSecs 15 +X +X # +X # The daemon prioritizes the handling of state-change events coming +X # from the core. With this clause, you can set the maximum number of +X # state-change events (those coming from kernel-space) that the daemon +X # will handle after which it will handle other events coming from the +X # network or userspace. A low value improves interactivity (in terms of +X # real-time behaviour) at the cost of extra CPU consumption. +X # Default (if not set) is 100. +X # +X # EventIterationLimit 100 +X +X # +X # Event filtering: This clause allows you to filter certain traffic, +X # There are currently three filter-sets: Protocol, Address and +X # State. The filter is attached to an action that can be: Accept or +X # Ignore. Thus, you can define the event filtering policy of the +X # filter-sets in positive or negative logic depending on your needs. +X # You can select if conntrackd filters the event messages from +X # user-space or kernel-space. The kernel-space event filtering +X # saves some CPU cycles by avoiding the copy of the event message +X # from kernel-space to user-space. The kernel-space event filtering +X # is prefered, however, you require a Linux kernel >= 2.6.29 to +X # filter from kernel-space. If you want to select kernel-space +X # event filtering, use the keyword 'Kernelspace' instead of +X # 'Userspace'. +X # +X Filter From Userspace { +X # +X # Accept only certain protocols: You may want to replicate +X # the state of flows depending on their layer 4 protocol. +X # +X Protocol Accept { +X TCP +X SCTP +X DCCP +X UDP +X ICMP # This requires a Linux kernel >= 2.6.31 +X } +X +X # +X # Ignore traffic for a certain set of IP's: Usually all the +X # IP assigned to the firewall since local traffic must be +X # ignored, only forwarded connections are worth to replicate. +X # Note that these values depends on the local IPs that are +X # assigned to the firewall. +X # +X Address Ignore { +X IPv4_address 127.0.0.1 # loopback +X IPv4_address [IGNORE_IP1] +X IPv4_address [IGNORE_IP2] +X IPv4_address [IGNORE_IP3] +X #IPv4_address 192.168.0.100 # virtual IP 1 +X #IPv4_address 192.168.1.100 # virtual IP 2 +X #IPv4_address 192.168.0.1 +X #IPv4_address 192.168.1.1 +X #IPv4_address 192.168.100.100 # dedicated link ip +X # +X # You can also specify networks in format IP/cidr. +X # IPv4_address 192.168.0.0/24 +X # +X # You can also specify an IPv6 address +X # IPv6_address ::1 +X } +X +X # +X # Uncomment this line below if you want to filter by flow state. +X # This option introduces a trade-off in the replication: it +X # reduces CPU consumption at the cost of having lazy backup +X # firewall replicas. The existing TCP states are: SYN_SENT, +X # SYN_RECV, ESTABLISHED, FIN_WAIT, CLOSE_WAIT, LAST_ACK, +X # TIME_WAIT, CLOSED, LISTEN. +X # +X # State Accept { +X # ESTABLISHED CLOSED TIME_WAIT CLOSE_WAIT for TCP +X # } +X } +X +X # default debian service unit file is of Type=notify +X Systemd on +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/conntrackd.conf.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ': 'MD5 check failed' + ) << \SHAR_EOF +13781a8581b74b0cf402c01264bdca48 cloud_scripts/opt/cloud/templates/conntrackd.conf.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ'` -ne 15888 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' is not 15888" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +ROUTER_BIN_PATH="/ramdisk/rrouter" +ROUTER_LOG="${ROUTER_BIN_PATH}/keepalived.log" +STRIKE_FILE="$ROUTER_BIN_PATH/keepalived.strikes" +TS_FILE="$ROUTER_BIN_PATH/keepalived.ts" +CT_FILE="$ROUTER_BIN_PATH/keepalived.ct" +X +checktime=$(date +%s) +hbtime=$(cat $TS_FILE) +diff=$(($checktime - $hbtime)) +X +lastcheck=0 +if [ -e $CT_FILE ] +then +X lastcheck=$(cat $CT_FILE 2>/dev/null) +fi +checkdiff=$(($checktime - $lastcheck)) +if [ $checkdiff -ge 0 ] && [ $checkdiff -lt 30 ] +then +X exit +fi +echo $checktime > $CT_FILE +X +s=0 +if [ $diff -gt 10 ] +then +X if [ -e $STRIKE_FILE ] +X then +X s=$(cat $STRIKE_FILE 2>/dev/null) +X fi +X s=$(($s+1)) +X echo $s > $STRIKE_FILE +X echo "Check time: $checktime, last heartbeat time: $hbtime, time diff: $diff, strike count: $s" >> $ROUTER_LOG +else +X rm -f $STRIKE_FILE +fi +X +if [ $s -gt 3 ] +then +X systemctl stop --now keepalived >> $ROUTER_LOG 2>&1 +X systemctl stop --now conntrackd >> $ROUTER_LOG 2>&1 +X +X #Set fault so we have the same effect as a KeepaliveD fault. +X python /opt/cloud/bin/master.py --fault +X +X pkill -9 keepalived >> $ROUTER_LOG 2>&1 || true +X pkill -9 conntrackd >> $ROUTER_LOG 2>&1 || true +X echo Status: FAULT \(keepalived process is dead\) >> $ROUTER_LOG +X exit +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ': 'MD5 check failed' + ) << \SHAR_EOF +7040d7485f89a97be367132d28af1267 cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ'` -ne 2037 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' is not 2037" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/check_bumpup.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/check_bumpup.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/check_bumpup.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +cat /tmp/rrouter_bumped +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/check_bumpup.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/check_bumpup.sh': 'MD5 check failed' + ) << \SHAR_EOF +ab6cbce5de505d137d05bcae1af8e18a cloud_scripts/opt/cloud/templates/check_bumpup.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/check_bumpup.sh'` -ne 822 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' is not 822" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/keepalived.conf.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/keepalived.conf.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/keepalived.conf.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' && +! Licensed to the Apache Software Foundation (ASF) under one +! or more contributor license agreements. See the NOTICE file +! distributed with this work for additional information +! regarding copyright ownership. The ASF licenses this file +! to you under the Apache License, Version 2.0 (the +! "License"); you may not use this file except in compliance +! with the License. You may obtain a copy of the License at +! +! http://www.apache.org/licenses/LICENSE-2.0 +! +! Unless required by applicable law or agreed to in writing, +! software distributed under the License is distributed on an +! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +! KIND, either express or implied. See the License for the +! specific language governing permissions and limitations +! under the License. +X +global_defs { +X router_id [ROUTER_ID] +} +X +vrrp_script heartbeat { +X script "[RROUTER_BIN_PATH]/heartbeat.sh" +X interval 5 +} +X +vrrp_instance inside_network { +X state BACKUP +X interface eth2 +X virtual_router_id 51 +X nopreempt +X +X advert_int 1 +X +X #use_vmac +X #vmac_xmit_base +X +X authentication { +X auth_type AH +X auth_pass PASS +X } +X +X virtual_ipaddress { +X [ROUTER_IP] brd [BOARDCAST] dev eth2 +X } +X +X track_script { +X heartbeat +X } +X +X notify_backup "/opt/cloud/bin/master.py --backup" +X notify_master "/opt/cloud/bin/master.py --master" +X notify_fault "/opt/cloud/bin/master.py --fault" +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/keepalived.conf.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ': 'MD5 check failed' + ) << \SHAR_EOF +464642e87bbb032071111b84f82ba135 cloud_scripts/opt/cloud/templates/keepalived.conf.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ'` -ne 1429 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' is not 1429" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/prepare_pxe.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/prepare_pxe.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/prepare_pxe.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' && +#!/bin/sh +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# # regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +X +set +u +X +err_exit() { +X echo $1 +X exit 1 +} +X +success() { +X exit 0 +} +X +TFTP_ROOT='/opt/tftpboot' +PXELINUX_CFG_DIR='/opt/tftpboot/pxelinux.cfg' +X +kernel_nfs_path=$1 +kernel_file_name=`basename $kernel_nfs_path` +initrd_nfs_path=$2 +initrd_file_name=`basename $initrd_nfs_path` +tmpt_uuid=$3 +pxe_cfg_filename=$4 +ks_file=$5 +X +kernel_path=$tmpt_uuid/$kernel_file_name +initrd_path=$tmpt_uuid/$initrd_file_name +X +cat > $PXELINUX_CFG_DIR/$pxe_cfg_filename </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh': 'MD5 check failed' + ) << \SHAR_EOF +8b495c4ea50905f4197974ee82e607ba cloud_scripts/opt/cloud/bin/prepare_pxe.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh'` -ne 1792 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' is not 1792" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_forwardingrules.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_forwardingrules.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_forwardingrules.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, rules): +X for rule in rules["rules"]: +X source_ip = rule["source_ip_address"] +X destination_ip = rule["destination_ip_address"] +X revoke = rule["revoke"] +X +X newrule = dict() +X newrule["public_ip"] = source_ip +X newrule["internal_ip"] = destination_ip +X +X if rules["type"] == "staticnatrules": +X newrule["type"] = "staticnat" +X elif rules["type"] == "forwardrules": +X newrule["type"] = "forward" +X newrule["public_ports"] = rule["source_port_range"] +X newrule["internal_ports"] = rule["destination_port_range"] +X newrule["protocol"] = rule["protocol"] +X +X if not revoke: +X if rules["type"] == "staticnatrules": +X dbag[source_ip] = [newrule] +X elif rules["type"] == "forwardrules": +X index = -1 +X if source_ip in dbag.keys(): +X for forward in dbag[source_ip]: +X if ruleCompare(forward, newrule): +X index = dbag[source_ip].index(forward) +X if not index == -1: +X dbag[source_ip][index] = newrule +X else: +X dbag[source_ip].append(newrule) +X else: +X dbag[source_ip] = [newrule] +X else: +X if rules["type"] == "staticnatrules": +X if source_ip in dbag.keys(): +X del dbag[source_ip] +X elif rules["type"] == "forwardrules": +X if source_ip in dbag.keys(): +X index = -1 +X for forward in dbag[source_ip]: +X if ruleCompare(forward, newrule): +X index = dbag[source_ip].index(forward) +X print "removing index %s" % str(index) +X if not index == -1: +X del dbag[source_ip][index] +X +X return dbag +X +X +# Compare function checks only the public side, those must be equal the internal details could change +def ruleCompare(ruleA, ruleB): +X if not ruleA["type"] == ruleB["type"]: +X return False +X if ruleA["type"] == "staticnat": +X return ruleA["public_ip"] == ruleB["public_ip"] +X elif ruleA["type"] == "forward": +X return ruleA["public_ip"] == ruleB["public_ip"] and ruleA["public_ports"] == ruleB["public_ports"] \ +X and ruleA["protocol"] == ruleB["protocol"] +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_forwardingrules.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py': 'MD5 check failed' + ) << \SHAR_EOF +278288da98263d674e9d0d0aecaca56d cloud_scripts/opt/cloud/bin/cs_forwardingrules.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py'` -ne 3239 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' is not 3239" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpc_netusage.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_netusage.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_netusage.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +source /root/func.sh +source /opt/cloud/bin/vpc_func.sh +X +vpnoutmark="0x525" +vpninmark="0x524" +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s -[c|g|r|n|d] [-l ] [-v ] \n" $(basename $0) >&2 +} +X +create_usage_rules () { +X iptables-save|grep "NETWORK_STATS_$ethDev" > /dev/null +X if [ $? -gt 0 ] +X then +X iptables -N NETWORK_STATS_$ethDev > /dev/null; +X iptables -I FORWARD -j NETWORK_STATS_$ethDev > /dev/null; +X iptables -A NETWORK_STATS_$ethDev -o $ethDev -s $vcidr > /dev/null; +X iptables -A NETWORK_STATS_$ethDev -i $ethDev -d $vcidr > /dev/null; +X fi +X return $? +} +X +create_vpn_usage_rules () { +X iptables-save|grep "VPN_STATS_$ethDev" > /dev/null +X if [ $? -gt 0 ] +X then +X iptables -t mangle -N VPN_STATS_$ethDev > /dev/null; +X iptables -t mangle -I FORWARD -j VPN_STATS_$ethDev > /dev/null; +X iptables -t mangle -A VPN_STATS_$ethDev -o $ethDev -m mark --mark $vpnoutmark > /dev/null; +X iptables -t mangle -A VPN_STATS_$ethDev -i $ethDev -m mark --mark $vpninmark > /dev/null; +X fi +X return $? +} +X +remove_usage_rules () { +X return 0 +} +X +get_usage () { +X iptables -L NETWORK_STATS_$ethDev -n -v -x 2> /dev/null | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null +X return 0 +} +X +get_vpn_usage () { +X iptables -t mangle -L VPN_STATS_$ethDev -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null +X if [ $? -gt 0 ] +X then +X printf $? +X return 1 +X fi +} +X +reset_usage () { +X iptables -Z NETWORK_STATS_$ethDev > /dev/null +X if [ $? -gt 0 -a $? -ne 2 ] +X then +X return 1 +X fi +} +X +#set -x +X +cflag= +gflag= +rflag= +lflag= +vflag= +nflag= +dflag= +X +while getopts 'cgndrl:v:' OPTION +do +X case $OPTION in +X c) cflag=1 +X ;; +X g) gflag=1 +X ;; +X r) rflag=1 +X ;; +X l) lflag=1 +X publicIp="$OPTARG" +X ;; +X v) vflag=1 +X vcidr="$OPTARG" +X ;; +X n) nflag=1 +X ;; +X d) dflag=1 +X ;; +X i) #Do nothing, since it's parameter for host script +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +ethDev=$(getEthByIp $publicIp) +if [ "$cflag" == "1" ] +then +X if [ "$ethDev" != "" ] +X then +X create_usage_rules +X create_vpn_usage_rules +X unlock_exit 0 $lock $locked +X fi +fi +X +if [ "$gflag" == "1" ] +then +X get_usage +X unlock_exit $? $lock $locked +fi +X +if [ "$nflag" == "1" ] +then +X #get_vpn_usage +X unlock_exit $? $lock $locked +fi +X +if [ "$dflag" == "1" ] +then +X #remove_usage_rules +X unlock_exit 0 $lock $locked +fi +X +if [ "$rflag" == "1" ] +then +X reset_usage +X unlock_exit $? $lock $locked +fi +X +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_netusage.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh': 'MD5 check failed' + ) << \SHAR_EOF +f3f8069de696e92a24cbc694275c0bd5 cloud_scripts/opt/cloud/bin/vpc_netusage.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh'` -ne 3377 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' is not 3377" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/configure.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/configure.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/configure.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/configure.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/configure.py +M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&-E<'0@24]%2@I"B`@("`@("`@ +M("`@("`@("`@("`@9W5E22R)$;VU57U)E<75E&-E<'0@17AC97!T:6]N(&%S +M(&4Z"B`@("`@("`@("`@("`@("`@("`@;&]G9VEN9RYE7!E)UT@/3T@)V%L;"<@86YD(&]B +M:ELG7!E(#T@(F%N>2(*("`@("`@("`@("`@:68@ +M(FEC;7!?='EP92(@:6X@7,H*2!A;F0@7!E)UT*("`@("`@("`@("`@:68@(FEC +M;7!?8V]D92(@:6X@7,H*2!A;F0@7!E)UTL('-E;&8N7!E("5S("UJ("5S(B`E("AI8VUP7W1Y<&4L('-E;&8N&5C=71E*&1S=$EP2==.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U +M;&5;)V%C=&EO;B==(#T@(D%#0T505"(*("`@("`@("`@("`@("`@("`@("!E +M;'-E.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5;)V%C=&EO +M;B==(#T@(D123U`B"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@ +M("`@("`@("`@(",@1F]R(&]T:&5R(')U;&5S(&%D9&5D+"!I9B!D969A=6QT +M7V5G7!E("5S(B`E(&EC;7!?='EP90H@("`@("`@("`@ +M("`@("`@96QI9B!R=6QE6R=P7!E+B!3;RP@:71S(&9W(&%T=')I8G5T92!I7!E +M(#T@(F%N>2(*("`@("`@("`@("`@("`@('-E;&8N<')O=&]C;VP@/2!S96QF +M+G1Y<&4*("`@("`@("`@("`@("`@(&EF(")I8VUP7W1Y<&4B(&EN(')U;&4N +M:V5Y7!E+"!R=6QE6R=I8VUP7V-O9&4G72D*("`@("`@("`@("`@("`@(&EF('-E +M;&8N='EP92`]/2`B<')O=&]C;VPB.@H@("`@("`@("`@("`@("`@("`@(&EF +M(')U;&5;)W!R;W1O8V]L)UT@/3T@-#$Z"B`@("`@("`@("`@("`@("`@("`@ +M("`@(')U;&5;)W!R;W1O8V]L)UT@/2`B:7!V-B(*("`@("`@("`@("`@("`@ +M("`@("!S96QF+G!R;W1O8V]L(#T@&5C=71E*")I +M<'1A8FQE+4$O:7!T86)L97,@+70@9FEL=&5R("U$+V&5C=71E +M*")I<'-E="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\ +M(&EP&5C=71E*")I<'-E +M="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP2!V86QI9"!D871A"B`@("`@("`@("`@("`@("!I9B!F;VQD97(@(3T@(G5S +M97)D871A(B!A;F0@9F]L9&5R("$](")M971A9&%T82(Z"B`@("`@("`@("`@ +M("`@("`@("`@8V]N=&EN=64*"B`@("`@("`@("`@("`@("!I9B!F:6QE(#T] +M("(B.@H@("`@("`@("`@("`@("`@("`@(&-O;G1I;G5E"@H@("`@("`@("`@ +M("`@("`@7,N97AI="@Q*0H@("`@("`@("`@("!I9B!O2Q!;&QO=UQN1&5N>2!F2!E>&ES=',L('=E(&1O(&ET('1H +M:7,@=V%Y(&9O7,N97AI +M="@Q*0H*("`@("`@("!F:"`](&]P96XH:'1A8V-E2`] +M(")297=R:71E4G5L92!>;65T82UD871A+R@N*RDD("`N+B\B("L@9F]L9&5R +M("L@(B\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%=(@H@("`@("`@("`@ +M("!H=&%C8V5S7,N97AI="@Q +M*2`@(R!&25A-10H@("`@("`@(')E='5R;B!4&ET*#$I("`C($9)6$U%"B`@("`@("`@:7!S96,N=G!N+2@N*BDN8V]N9B(L(&9I;&4I"B`@ +M("`@("`@("`@(&EF(&TZ"B`@("`@("`@("`@("`@("!S96QF+F-O;F9I<',N +M87!P96YD*&TN9W)O=7`H,2DI"@H@("`@("`@(&9O&5C=71E*")I +M<'-E8R!R96QO860B*0H*("`@(&1E9B!C;VYF:6=U#4R-2`M:B!!0T-%4%0B("4@9&5V72D* +M("`@("`@("!F;W(@;F5T(&EN(&]B:ELG<&5E&UA&UA5]I<"=="B`@("`@("`@<&5E7!E/71U;FYE;"(I +M"B`@("`@("`@9FEL92YA9&1E<2@B(&%U=&AB>3US96-R970B*0H@("`@("`@ +M(&9I;&4N861D97$H(B!K97EE>&-H86YG93UI:V4B*0H@("`@("`@(&9I;&4N +M861D97$H(B!I:V4])7,B("4@:6ME<&]L:6-Y*0H@("`@("`@(&9I;&4N861D +M97$H(B!I:V5L:69E=&EM93TE3TS,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1T:6UE;W5T +M/3$R,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1A8W1I;VX]')A;F=E*#,I.@H@("`@("`@("`@ +M("!R97-U;'0@/2!#&5C=71E*"=I<'-E8R!S=&%T=7,@=G!N +M+25S('P@9W)E<"`B)7,B)R`E("AR:6=H='!E97(L('!E97)L:7-T+G-P;&ET +M*"(L(BP@,2E;,%TI*0H@("`@("`@("`@("!I9B!L96XH2P@)R,G*0H@("`@("`@(&EF(&YO="!U&5C=71E*")T9&)D=6UP("]V87(O&5C=71E*"=K:6QL("TY("5S)R`E('!I9"D*"@IC;&%S +M&5C=71E*")S>7-T96UC=&P@2YS96-R971S(B`E("AS96QF+E903D-/3D9$25(I"B`@ +M("`@("`@>&PR='!D8V]N9F9I;&4@/2`B+V5T8R]X;#)T<&0O>&PR='!D+F-O +M;F8B"B`@("`@("`@>&PR='!O<'1I;VYS9FEL92`]("(O971C+W!P<"]O<'1I +M;VYS+GAL,G1P9"(*"B`@("`@("`@;&]C86QI<"`](&]B:ELG;&]C86Q?:7`G +M70H@("`@("`@(&QO8V%L8VED2`Z(%!32R!<(B5S7"(B("4@*&QE9G0L('!S:RDI"B`@ +M("`@("`@&PR='!D8V]N9F9I;&4I"B`@("`@("`@>&PR='!D8V]N9BYA9&1E +M<2@B:7`@&PR='!O<'1I;VYS+F-O;6UI="@I"@H@("`@9&5F(')E;6]T96%C8V5S +M2@I"B`@("`@("`@4EP +M*')U;&5;)W!U8FQI8U]I<"==*0H@("`@("`@(&EN=&5R;F%L7V9W:6YT97)F +M86-E(#T@4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI +M"B`@("`@("`@<'5B;&EC7V9W<&]R=',@/2!S96QF+G!O4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI +M+`H@("`@("`@("`@("`@("`@&UA2(Z"B`@("`@("`@("`@(&9W7W!R97)O=71? +M2(Z"B`@("`@ +M("`@("`@(&9W7W!O2(Z"B`@("`@("`@ +M("`@(&9W7W!O2(Z"B`@("`@ +M("`@("`@(&9W7V]U='!U=%]R=6QE("L]("(@+2UD<&]R="`E2(Z"B`@("`@("`@("`@ +M(&9W7V]U='!U=%]R=6QE("L]("(Z(B`K('-E;&8N<&]R='-4;U-T4EP*')U;&5;)VEN=&5R;F%L7VEP +M)UTI+`H@("`@("`@("`@("`@("`@&9F9F9F9F9F +M("TM8W1M87-K(#!X9F9F9F9F9F8B("4*("`@("`@("`@("`@("`@("`@("`@ +M("`@4EP*')U;&5;(FEN=&5R;F%L +M7VEP(ETI+"!S96QF+F=E=$=U97-T27`H*2E=*0H*"F-L87-S($EP5&%B;&5S +M17AE8W5T;W(Z"@H@("`@8V]N9FEG(#T@3F]N90H*("`@(&1E9B!?7VEN:71? +M7RAS96QF+"!C;VYF:62!PR)P&5C=71OR)P&5C=71OR)P&5C=71O7!E.B`E&5C27!T86)L97,H8V]N9FEG +M*3H*("`@("`@("!L;V=G:6YG+F1E8G5G*")0&5C=71O7,H*3H*("`@("`@("`@ +M("`@97AE8T1A=&%B86&5C +M27!T86)L97,H8V]N9FEG*0H@("`@96QI9B!J&5C27!T86)L +M97,H8V]N9FEG*0H@("`@96QS93H*("`@("`@("!L;V=G:6YG+G=A7!E/25S(B`E("AP/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/configure.py': 'MD5 check failed' + ) << \SHAR_EOF +8987217852a386250687dfce6d0b10be cloud_scripts/opt/cloud/bin/configure.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/configure.py'` -ne 45920 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/configure.py' is not 45920" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_vmp.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vmp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vmp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vmp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_vmp.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=WWT*("`@(')C6R=I9"==(#T@)W9M<&%S/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vmp.py': 'MD5 check failed' + ) << \SHAR_EOF +3e1ea6831cb27eedc825e25bf817cb9c cloud_scripts/opt/cloud/bin/cs_vmp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vmp.py'` -ne 1126 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vmp.py' is not 1126" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# getRouterMonitorResults.sh --- Send the monitor results to Management Server +X +if [ "$1" == "true" ] +then +X python /root/monitorServices.py > /dev/null +fi +X +printf "FAILING CHECKS:\n" +X +if [ -f /root/basic_failing_health_checks ] +then +X echo `cat /root/basic_failing_health_checks` +fi +X +if [ -f /root/advanced_failing_health_checks ] +then +X echo `cat /root/advanced_failing_health_checks` +fi +X +printf "MONITOR RESULTS:\n" +X +echo "{\"basic\":" +if [ -f /root/basic_monitor_results.json ] +then +X echo `cat /root/basic_monitor_results.json` +else +X echo "{}" +fi +echo ",\"advanced\":" +if [ -f /root/advanced_monitor_results.json ] +then +X echo `cat /root/advanced_monitor_results.json` +else +X echo "{}" +fi +X +echo "}" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh': 'MD5 check failed' + ) << \SHAR_EOF +35649a8a1a8339aaa42a311826699849 cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh'` -ne 1526 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' is not 1526" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vr_cfg.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vr_cfg.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vr_cfg.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +#set -x +X +cfg= +version= +log=/var/log/cloud.log +X +log_it() { +X logger -t cloud "$*" +X echo "$(date) : $*" >> $log +} +X +while getopts 'c:' OPTION; do +X case $OPTION in +X c) cfg="$OPTARG" ;; +esac; done +X +export DEFER_CONFIG=true +while read line; do +X #comment +X if [[ $line == \#* ]]; then +X continue +X +X elif [ "$line" == "" ]; then +X read line +X version=$line +X log_it "VR config: configuation format version $version" +X #skip +X read line +X +X elif [ "$line" == " +X read line +X log_it "VR config: execution success " +X +X elif [ "$line" == "" ]; then +X read line +X file=$line +X log_it "VR config: creating file: $file" +X rm -f $file +X while read -r line; do +X if [ "$line" == "" ]; then +X break +X fi +X echo $line >> $file +X done +X log_it "VR config: create file success" +X +X fi +X +done < $cfg +X +# archive the configuration file +mv $cfg /var/cache/cloud/processed/ +X +unset DEFER_CONFIG +# trigger finish_config() +if [ -f /etc/cloudstack/dhcpentry.json ]; then +X /opt/cloud/bin/configure.py vm_dhcp_entry.json +fi +if [ -f /etc/cloudstack/vmdata.json ]; then +X /opt/cloud/bin/configure.py vm_metadata.json +fi +X +# Flush kernel conntrack table +log_it "VR config: Flushing conntrack table" +conntrackd -d 2> /dev/null +if [ $? -eq 0 ]; then +X conntrackd -F +X conntrackd -k +else +X conntrackd -F +fi +log_it "VR config: Flushing conntrack table completed" +X +Xexit 0 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vr_cfg.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vr_cfg.sh': 'MD5 check failed' + ) << \SHAR_EOF +da02bd413616a9cc131fd039e627eb3e cloud_scripts/opt/cloud/bin/vr_cfg.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vr_cfg.sh'` -ne 2725 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' is not 2725" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpc_snat.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_snat.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_snat.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# @VERSION@ +X +source /root/func.sh +source /opt/cloud/bin/vpc_func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage:\n %s -A -l \n" $(basename $0) >&2 +X printf " %s -D -l \n" $(basename $0) >&2 +} +X +X +add_snat() { +X logger -t cloud "$(basename $0):Added SourceNAT $pubIp on interface $ethDev" +X vpccidr=$(getVPCcidr) +X sudo iptables -D FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT +X sudo iptables -A FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT +X sudo iptables -t nat -D POSTROUTING -j SNAT -o $ethDev --to-source $pubIp +X sudo iptables -t nat -A POSTROUTING -j SNAT -o $ethDev --to-source $pubIp +X return $? +} +remove_snat() { +X logger -t cloud "$(basename $0):Removing SourceNAT $pubIp on interface $ethDev" +X sudo iptables -t nat -D POSTROUTING -j SNAT -o $ethDev --to-source $pubIp +X return $? +} +X +#set -x +lflag=0 +cflag=0 +op="" +X +while getopts 'ADl:c:' OPTION +do +X case $OPTION in +X A) Aflag=1 +X op="-A" +X ;; +X D) Dflag=1 +X op="-D" +X ;; +X l) lflag=1 +X pubIp="$OPTARG" +X ;; +X c) cflag=1 +X ethDev="$OPTARG" +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [ "$Aflag$Dflag" != "1" ] +then +X usage +X unlock_exit 2 $lock $locked +fi +X +if [ "$lflag$cflag" != "11" ] +then +X usage +X unlock_exit 2 $lock $locked +fi +X +if [ "$Aflag" == "1" ] +then +X add_snat $publicIp +X unlock_exit $? $lock $locked +fi +X +if [ "$Dflag" == "1" ] +then +X remove_sat $publicIp +X unlock_exit $? $lock $locked +fi +X +unlock_exit 1 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_snat.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_snat.sh': 'MD5 check failed' + ) << \SHAR_EOF +23502a2ce3829fb787464124f13b9141 cloud_scripts/opt/cloud/bin/vpc_snat.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_snat.sh'` -ne 2346 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' is not 2346" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpc_staticroute.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_staticroute.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_staticroute.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# @VERSION@ +X +source /root/func.sh +source /opt/cloud/bin/vpc_func.sh +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s: -a < routes > \n" $(basename $0) >&2 +} +X +#set -x +X +flush_table_backup() { +X flush_table "static_route_back" +} +X +flush_table() { +X local tab=$1 +X sudo ip route flush table $tab +} +X +copy_table() { +X local from=$1 +X local to=$2 +X sudo ip route show table $from | while read route +X do +X sudo ip route add table $to $route +X done +} +X +backup_table() { +X flush_table "static_route_back" +X copy_table "static_route" "static_route_back" +X flush_table "static_route" +} +X +restore_table() { +X flush_table "static_route" +X copy_table "static_route_back" "static_route" +X flush_table "static_route_back" +} +X +static_route() { +X local rule=$1 +X local ip=$(echo $rule | cut -d: -f1) +X if [ $ip == "Revoke" ] +X then +X return 0 +X fi +X local gateway=$(echo $rule | cut -d: -f2) +X local cidr=$(echo $rule | cut -d: -f3) +X logger -t cloud "$(basename $0): static route: public ip=$ip \ +X gateway=$gateway cidr=$cidr" +X local dev=$(getEthByIp $ip) +X if [ $? -gt 0 ] +X then +X return 1 +X fi +X sudo ip route add $cidr dev $dev via $gateway table static_route &>/dev/null +X result=$? +X logger -t cloud "$(basename $0): done static route: public ip=$ip \ +X gateway=$gateway cidr=$cidr" +X return $result +} +X +gflag= +aflag= +while getopts 'a:' OPTION +X +do +X case $OPTION in +X a) aflag=1 +X rules="$OPTARG" +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [ -n "$rules" ] +then +X rules_list=$(echo $rules | cut -d, -f1- --output-delimiter=" ") +fi +X +success=0 +X +backup_table +X +for r in $rules_list +do +X static_route $r +X success=$? +X if [ $success -gt 0 ] +X then +X logger -t cloud "$(basename $0): failure to apply fw rules for guest network: $gcidr" +X break +X else +X logger -t cloud "$(basename $0): successful in applying fw rules for guest network: $gcidr" +X fi +done +X +if [ $success -gt 0 ] +then +X logger -t cloud "$(basename $0): restoring from backup for guest network: $gcidr" +X restore_table +else +X logger -t cloud "$(basename $0): deleting backup for guest network: $gcidr" +X flush_table_backup +fi +unlock_exit $success $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_staticroute.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh': 'MD5 check failed' + ) << \SHAR_EOF +4080c04ff7600874ef4a4364aefc4d18 cloud_scripts/opt/cloud/bin/vpc_staticroute.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh'` -ne 3043 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' is not 3043" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/baremetal-vr.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/baremetal-vr.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/baremetal-vr.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/baremetal-vr.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/baremetal-vr.py +M(TQI8V5N6ME>2<@:6X@<#H*("`@("`@("`@("`@("`@("`@("`@("`@ +M2`]('`N6ME>2!I;B`E0H*("`@(&1E +M9B!?9V5T7VUG;71?:7`H4)AFEP*')E<7,N:V5Y2P@:&%S:%-T5]P/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/baremetal-vr.py': 'MD5 check failed' + ) << \SHAR_EOF +f87e8890aa7ad3cc522c5c5ceb2fbf69 cloud_scripts/opt/cloud/bin/baremetal-vr.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/baremetal-vr.py'` -ne 5587 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/baremetal-vr.py' is not 5587" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_firewallrules.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_firewallrules.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_firewallrules.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import copy +X +X +def merge(dbag, data): +X dbagc = copy.deepcopy(dbag) +X if "rules" not in data: +X return dbagc +X for rule in data['rules']: +X id = str(rule['id']) +X if rule['revoked']: +X if id in dbagc.keys(): +X del(dbagc[id]) +X elif id not in dbagc.keys(): +X dbagc[id] = rule +X return dbagc +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_firewallrules.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py': 'MD5 check failed' + ) << \SHAR_EOF +6d3faf49679b84bf9a098eee6b630f69 cloud_scripts/opt/cloud/bin/cs_firewallrules.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py'` -ne 1141 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' is not 1141" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/netusage.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/netusage.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/netusage.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/netusage.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/netusage.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +X +# netusage.sh -- create iptable rules to gather network stats, running within DomR +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s -[c|g|r] [-[a|d] ]\n" $(basename $0) >&2 +} +X +create_usage_rules () { +X iptables-save|grep "INPUT -j NETWORK_STATS" > /dev/null +X if [ $? -eq 0 ] +X then +X return $? +X fi +X iptables -N NETWORK_STATS > /dev/null +X iptables -I FORWARD -j NETWORK_STATS > /dev/null +X iptables -I INPUT -j NETWORK_STATS > /dev/null +X iptables -I OUTPUT -j NETWORK_STATS > /dev/null +X iptables -A NETWORK_STATS -i eth0 -o eth2 > /dev/null +X iptables -A NETWORK_STATS -i eth2 -o eth0 > /dev/null +X iptables -A NETWORK_STATS -o eth2 ! -i eth0 -p tcp > /dev/null +X iptables -A NETWORK_STATS -i eth2 ! -o eth0 -p tcp > /dev/null +X return $? +} +X +add_public_interface () { +X local pubIf=$1 +X iptables-save|grep "NETWORK_STATS -i eth0 -o $pubIf" > /dev/null +X if [ $? -eq 0 ] +X then +X return $? +X fi +X iptables -A NETWORK_STATS -i eth0 -o $pubIf > /dev/null +X iptables -A NETWORK_STATS -i $pubIf -o eth0 > /dev/null +X iptables -A NETWORK_STATS -o $pubIf ! -i eth0 -p tcp > /dev/null +X iptables -A NETWORK_STATS -i $pubIf ! -o eth0 -p tcp > /dev/null +X return $? +} +X +delete_public_interface () { +X local pubIf=$1 +X echo $pubIf >> /root/removedVifs +X return $? +} +X +get_usage () { +X iptables -L NETWORK_STATS -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null +X if [ -f /root/removedVifs ] ; then iptables -Z NETWORK_STATS ; fi; > /dev/null +X /root/clearUsageRules.sh > /dev/null +X if [ $? -gt 0 -a $? -ne 2 ] +X then +X printf $? +X return 1 +X fi +} +X +reset_usage () { +X iptables -Z NETWORK_STATS > /dev/null +X if [ $? -gt 0 -a $? -ne 2 ] +X then +X return 1 +X fi +} +X +#set -x +X +cflag= +gflag= +rflag= +iflag= +aflag= +dflag= +X +while getopts 'cgria:d:' OPTION +do +X case $OPTION in +X c) cflag=1 +X ;; +X g) gflag=1 +X ;; +X r) rflag=1 +X ;; +X a) aflag=1 +X publicIf="$OPTARG" +X ;; +X d) dflag=1 +X publicIf="$OPTARG" +X ;; +X i) #Do nothing, since it's parameter for host script +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [ "$cflag" == "1" ] +then +X #create_usage_rules +X unlock_exit $? $lock $locked +fi +X +if [ "$gflag" == "1" ] +then +X get_usage +X unlock_exit $? $lock $locked +fi +X +if [ "$rflag" == "1" ] +then +X reset_usage +X unlock_exit $? $lock $locked +fi +X +if [ "$aflag" == "1" ] +then +X #add_public_interface $publicIf +X unlock_exit $? $lock $locked +fi +X +if [ "$dflag" == "1" ] +then +X #delete_public_interface $publicIf +X unlock_exit $? $lock $locked +fi +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/netusage.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/netusage.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/netusage.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/netusage.sh': 'MD5 check failed' + ) << \SHAR_EOF +2966c6cafee62e66ff903e53367b498b cloud_scripts/opt/cloud/bin/netusage.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/netusage.sh'` -ne 3478 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/netusage.sh' is not 3478" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/monitor_service.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/monitor_service.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/monitor_service.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/monitor_service.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/monitor_service.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +set -x +usage() { +X printf "Usage: %s: -c config string \n" $(basename $0) >&2 +} +X +configFile='/etc/monitor.conf' +X +create_config() { +services=$1; +services_list=$(echo $services | cut -d, -f1- --output-delimiter=" "); +X +echo "#Monitor services config" >$configFile +X +for s in $services_list +do +service=$(echo $s | cut -d: -f1); +processname=$(echo $s | cut -d: -f2); +service_name=$(echo $s | cut -d: -f3); +pidfile=$(echo $s | cut -d: -f4); +X +echo "$service" >> $configFile; +echo $processname >> $configFile +echo $service_name >> $configFile +echo $pidfile >> $configFile +X +done +X +} +X +config=$2 +if [ -n "$3" ] +then +X +#delete cron job before updating config file +crontab -l|grep "monitorServices.py" +X +if [ $? -eq 0 ] +then +X t=`date +%s`; +X touch /tmp/monitor-$t.txt; +X conf=/tmp/monitor-$t.txt +X crontab -l >$conf +X sed -i /#monitoringConfig/,+3d $conf +X crontab $conf +X rm $conf +fi +X +X +logger -t cloud "deleted crontab entry for monitoring services" +unlock_exit 0 $lock $locked +fi +X +create_config $config +X +#add cron job +crontab -l|grep "monitorServices.py" +if [ $? -ne 0 ] +X then +X (crontab -l ;echo -e "#monitoringConfig\nSHELL=/bin/bash\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n */3 * * * * /usr/bin/python /root/monitorServices.py") | crontab - +X logger -t cloud "added crontab entry for monitoring services" +fi +X +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/monitor_service.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/monitor_service.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/monitor_service.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/monitor_service.sh': 'MD5 check failed' + ) << \SHAR_EOF +3419e7baf45ac36d3d69ca71ef7ab978 cloud_scripts/opt/cloud/bin/monitor_service.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/monitor_service.sh'` -ne 2294 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/monitor_service.sh' is not 2294" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_ip.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_ip.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_ip.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_ip.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_ip.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N7!E)UT@/2!I<%LG;G=?='EP92==+FQO=V5R*"D*("`@(&EF(&EP +M6R=N=U]T>7!E)UT@/3T@)V-O;G1R;VPG.@H@("`@("`@(&1B86=;:7!;)V1E +M=FEC92==72`](%MI<%T*("`@(&5L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_ip.py': 'MD5 check failed' + ) << \SHAR_EOF +856c6261f2876c280c49fa486f4f7408 cloud_scripts/opt/cloud/bin/cs_ip.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_ip.py'` -ne 2581 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_ip.py' is not 2581" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/bumpup_priority.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/bumpup_priority.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/bumpup_priority.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +touch /tmp/rrouter_bumped +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/bumpup_priority.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh': 'MD5 check failed' + ) << \SHAR_EOF +35091259ed848a9f7270aca1a90e95af cloud_scripts/opt/cloud/bin/bumpup_priority.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh'` -ne 824 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' is not 824" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/getRouterAlerts.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/getRouterAlerts.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/getRouterAlerts.sh (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/getRouterAlerts.sh +M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5LP77T*"B`@("`@("`@("`@ +M("`@("!T;T1A=&5686P])"AD871E("UD("(D9&%T979A;"(@(BLE/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh': 'MD5 check failed' + ) << \SHAR_EOF +6c3803100b0923fd3f9017a0e09d6fd5 cloud_scripts/opt/cloud/bin/getRouterAlerts.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh'` -ne 1706 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh' is not 1706" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/postinit.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/postinit.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/postinit.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# This scripts before ssh.service but after cloud-early-config +X +# Eject cdrom if any +eject || true +X +# Restart journald for setting changes to apply +systemctl restart systemd-journald +X +TYPE=$(grep -Po 'type=\K[a-zA-Z]*' /var/cache/cloud/cmdline) +if [ "$TYPE" == "router" ] || [ "$TYPE" == "vpcrouter" ] || [ "$TYPE" == "dhcpsrvr" ] +then +X if [ -x /opt/cloud/bin/update_config.py ] +X then +X /opt/cloud/bin/update_config.py cmd_line.json || true +X fi +fi +X +[ ! -f /var/cache/cloud/enabled_svcs ] && touch /var/cache/cloud/enabled_svcs +for svc in $(cat /var/cache/cloud/enabled_svcs) +do +X systemctl enable --now --no-block $svc +done +X +[ ! -f /var/cache/cloud/disabled_svcs ] && touch /var/cache/cloud/disabled_svcs +for svc in $(cat /var/cache/cloud/disabled_svcs) +do +X systemctl disable --now --no-block $svc +done +X +# Restore the persistent iptables nat, rules and filters for IPv4 and IPv6 if they exist +ipv4="/etc/iptables/rules.v4" +if [ -e $ipv4 ] +then +X iptables-restore < $ipv4 +fi +X +ipv6="/etc/iptables/rules.v6" +if [ -e $ipv6 ] +then +X ip6tables-restore < $ipv6 +fi +X +# Patch known systemd/sshd memory leak - https://github.com/systemd/systemd/issues/8015#issuecomment-476160981 +echo '@include null' >> /etc/pam.d/systemd-user +X +# Enable and Start SSH +systemctl enable --now --no-block ssh +X +date > /var/cache/cloud/boot_up_done +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/postinit.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/postinit.sh': 'MD5 check failed' + ) << \SHAR_EOF +170afadf6f130e9cb697dca65a87aacb cloud_scripts/opt/cloud/bin/setup/postinit.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/postinit.sh'` -ne 2122 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' is not 2122" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/secstorage.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/secstorage.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/secstorage.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_secstorage() { +X log_it "Setting up secondary storage system vm" +X +X echo "cloud apache2 nfs-common portmap" > /var/cache/cloud/enabled_svcs +X echo "conntrackd keepalived haproxy dnsmasq" > /var/cache/cloud/disabled_svcs +X mkdir -p /var/log/cloud +X +X setup_common eth0 eth1 eth2 +X setup_storage_network +X setup_system_rfc1918_internal +X +X log_it "Setting up entry in hosts" +X sed -i /$NAME/d /etc/hosts +X public_ip=`getPublicIp` +X echo "$public_ip $NAME" >> /etc/hosts +X +X log_it "Applying iptables rules" +X cp /etc/iptables/iptables-secstorage /etc/iptables/rules.v4 +X +X log_it "Configuring sshd" +X local hyp=$HYPERVISOR +X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then +X setup_sshd $ETH1_IP "eth1" +X else +X setup_sshd $ETH0_IP "eth0" +X fi +X +X log_it "Configuring apache2" +X setup_apache2 $ETH2_IP +X +X # Deprecated, should move to Cs Python all of it +X sed -e "s///" \ +X -e "s///" \ +X -e "s/Listen .*:8180/Listen $ETH2_IP:80/g" \ +X -e "s/Listen .*:8443/Listen $ETH2_IP:443/g" /etc/apache2/vhost.template > /etc/apache2/sites-enabled/vhost-${ETH2_IP}.conf +X +X log_it "Setting up apache2 for post upload of volume/template" +X a2enmod proxy +X a2enmod proxy_http +X a2enmod headers +X +X cat >/etc/apache2/cors.conf </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh': 'MD5 check failed' + ) << \SHAR_EOF +14aea171a5e0fdfd3069bb96bde91e0b cloud_scripts/opt/cloud/bin/setup/secstorage.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh'` -ne 2720 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' is not 2720" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/ilbvm.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +ilbvm_svcs() { +X echo "haproxy" > /var/cache/cloud/enabled_svcs +X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs +} +X +setup_ilbvm() { +X log_it "Setting up Internal Load Balancer system vm" +X setup_common eth0 eth1 +X #eth0 = guest network, eth1=control network +X +X sed -i /$NAME/d /etc/hosts +X echo "$ETH0_IP $NAME" >> /etc/hosts +X +X cp /etc/iptables/iptables-ilbvm /etc/iptables/rules.v4 +X setup_sshd $ETH1_IP "eth1" +X +X enable_fwding 0 +X enable_irqbalance 1 +} +X +ilbvm_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute ilbvm svcs" +X exit 1 +fi +setup_ilbvm +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/ilbvm.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh': 'MD5 check failed' + ) << \SHAR_EOF +87c70bdf6c0d4d41f0ff87475494188f cloud_scripts/opt/cloud/bin/setup/ilbvm.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh'` -ne 1442 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' is not 1442" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_vpcrouter() { +X log_it "Setting up VPC virtual router system vm" +X +X if [ -f /etc/hosts ]; then +X grep -q $NAME /etc/hosts || echo "127.0.0.1 $NAME" >> /etc/hosts; +X fi +X +X cat > /etc/network/interfaces << EOF +auto lo eth0 +iface lo inet loopback +EOF +X setup_interface "0" $ETH0_IP $ETH0_MASK $GW +X +X echo $NAME > /etc/hostname +X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon +X hostnamectl set-hostname $NAME +X +X #Nameserver +X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries +X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries +X if [ -n "$internalNS1" ] +X then +X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS1" > /etc/resolv.conf +X fi +X +X if [ -n "$internalNS2" ] +X then +X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS2" >> /etc/resolv.conf +X fi +X if [ -n "$NS1" ] +X then +X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS1" >> /etc/resolv.conf +X fi +X +X if [ -n "$NS2" ] +X then +X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS2" >> /etc/resolv.conf +X fi +X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] +X then +X if [ "$HYPERVISOR" == "vmware" ] || [ "$HYPERVISOR" == "hyperv" ]; +X then +X ip route add $MGMTNET via $LOCAL_GW dev eth0 +X # workaround to activate vSwitch under VMware +X timeout 3 ping -n -c 3 $LOCAL_GW || true +X fi +X fi +X +X ip route delete default +X # create route table for static route +X +X sudo echo "252 static_route" >> /etc/iproute2/rt_tables 2>/dev/null +X sudo echo "251 static_route_back" >> /etc/iproute2/rt_tables 2>/dev/null +X sudo ip rule add from $VPCCIDR table static_route 2>/dev/null +X sudo ip rule add from $VPCCIDR table static_route_back 2>/dev/null +X +X setup_vpc_apache2 +X +X enable_irqbalance 1 +X enable_vpc_rpsrfs 1 +X disable_rpfilter +X enable_fwding 1 +X enable_passive_ftp 1 +X cp /etc/iptables/iptables-vpcrouter /etc/iptables/rules.v4 +X setup_sshd $ETH0_IP "eth0" +X cp /etc/vpcdnsmasq.conf /etc/dnsmasq.conf +X cp /etc/cloud-nic.rules /etc/udev/rules.d/cloud-nic.rules +X echo "" > /etc/dnsmasq.d/dhcphosts.txt +X echo "dhcp-hostsfile=/etc/dhcphosts.txt" > /etc/dnsmasq.d/cloud.conf +X +X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" +X #DNS server will append $DOMAIN to local queries +X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf +X #answer all local domain queries +X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf +X +X command -v dhcp_release > /dev/null 2>&1 +X no_dhcp_release=$? +X if [ $no_dhcp_release -eq 0 ] +X then +X echo 1 > /var/cache/cloud/dnsmasq_managed_lease +X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf +X else +X echo 0 > /var/cache/cloud/dnsmasq_managed_lease +X fi +X +X # Setup hourly logrotate +X if [ -f /etc/cron.daily/logrotate ]; then +X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 +X fi +} +X +routing_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute routing_svcs" +X exit 1 +fi +setup_vpcrouter +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh': 'MD5 check failed' + ) << \SHAR_EOF +811420d11f97b1d7237b964e8bbbdf5d cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh'` -ne 3885 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' is not 3885" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/router.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/router.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/router.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/router.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/router.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +check_reboot_vmware() { +X if [ "$HYPERVISOR" != "vmware" ]; then +X return +X fi +X +X if [ -n "$MGMTNET" ]; then +X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') +X if ping -n -c 1 -W 3 $MGMT_GW &> /dev/null; then +X log_it "Management gateway pingable, skipping VR reboot" +X return +X fi +X fi +X +X log_it "Management gateway not pingable, rebooting VR" +X sync +X reboot +} +X +setup_router() { +X # To save router public interface and gw ip information +X touch /var/cache/cloud/ifaceGwIp +X +X oldmd5= +X [ -f "/etc/udev/rules.d/70-persistent-net.rules" ] && oldmd5=$(md5sum "/etc/udev/rules.d/70-persistent-net.rules" | awk '{print $1}') +X +X if [ -n "$ETH2_IP" ]; then +X setup_common eth0 eth1 eth2 +X +X if [ -n "$EXTRA_PUBNICS" ]; then +X for ((i = 3; i < 3 + $EXTRA_PUBNICS; i++)); do +X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" +X done +X fi +X else +X setup_common eth0 eth1 +X if [ -n "$EXTRA_PUBNICS" ]; then +X for ((i = 2; i < 2 + $EXTRA_PUBNICS; i++)); do +X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" +X done +X fi +X fi +X +X log_it "Checking udev NIC assignment order changes" +X if [ "$NIC_MACS" != "" ] +X then +X init_interfaces_orderby_macs "$NIC_MACS" "/tmp/interfaces" "/tmp/udev-rules" +X newmd5=$(md5sum "/tmp/udev-rules" | awk '{print $1}') +X rm /tmp/interfaces +X rm /tmp/udev-rules +X +X if [ "$oldmd5" != "$newmd5" ] +X then +X log_it "Reloading udev for new udev NIC assignment" +X udevadm control --reload-rules && udevadm trigger +X check_reboot_vmware +X fi +X fi +X +X setup_aesni +X setup_dnsmasq +X setup_apache2 $ETH0_IP +X +X sed -i /$NAME/d /etc/hosts +X echo "$ETH0_IP $NAME" >> /etc/hosts +X +X enable_irqbalance 1 +X disable_rpfilter_domR +X enable_fwding 1 +X enable_rpsrfs 1 +X enable_passive_ftp 1 +X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 +X setup_sshd $ETH1_IP "eth1" +X +X # Only allow DNS service for current network +X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X +X # Setup hourly logrotate +X if [ -f /etc/cron.daily/logrotate ]; then +X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 +X fi +} +X +routing_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute routing_svcs" +X exit 1 +fi +setup_router +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/router.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/router.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/router.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/router.sh': 'MD5 check failed' + ) << \SHAR_EOF +2ae62d5d44c716730231c9d77618fe91 cloud_scripts/opt/cloud/bin/setup/router.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/router.sh'` -ne 3355 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/router.sh' is not 3355" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/elbvm.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/elbvm.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/elbvm.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +elbvm_svcs() { +X echo "haproxy" > /var/cache/cloud/enabled_svcs +X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs +} +X +setup_elbvm() { +X log_it "Setting up Elastic Load Balancer system vm" +X setup_common eth0 eth1 +X sed -i /$NAME/d /etc/hosts +X public_ip=$ETH2_IP +X [ "$ETH2_IP" == "0.0.0.0" ] || [ "$ETH2_IP" == "" ] && public_ip=$ETH0_IP +X echo "$public_ip $NAME" >> /etc/hosts +X +X cp /etc/iptables/iptables-elbvm /etc/iptables/rules.v4 +X if [ "$SSHONGUEST" == "true" ] +X then +X setup_sshd $ETH0_IP "eth0" +X else +X setup_sshd $ETH1_IP "eth1" +X fi +X +X enable_fwding 0 +X enable_irqbalance 0 +} +X +elbvm_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute elbvm svcs" +X exit 1 +fi +setup_elbvm +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/elbvm.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh': 'MD5 check failed' + ) << \SHAR_EOF +2d34615f1d40f6125a2205e6118ba07f cloud_scripts/opt/cloud/bin/setup/elbvm.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh'` -ne 1578 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' is not 1578" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/bootstrap.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" +CMDLINE=/var/cache/cloud/cmdline +X +rm -f /var/cache/cloud/enabled_svcs +rm -f /var/cache/cloud/disabled_svcs +X +X. /lib/lsb/init-functions +X +log_it() { +X echo "$(date) $@" >> /var/log/cloud.log +X log_action_msg "$@" +} +X +hypervisor() { +X if [ -d /proc/xen ]; then +X mount -t xenfs none /proc/xen +X $(dmesg | grep -q "Xen HVM") +X if [ $? -eq 0 ]; then # 1=PV,0=HVM +X echo "xen-hvm" && return 0 +X else +X echo "xen-pv" && return 0 +X fi +X fi +X +X [ -x /usr/sbin/virt-what ] && local facts=( $(virt-what) ) +X if [ "$facts" != "" ]; then +X # Xen HVM is recognized as Hyperv when Viridian extensions are enabled +X if [ "${facts[-1]}" == "xen-domU" ] && [ "${facts[0]}" == "hyperv" ]; then +X echo "xen-hvm" && return 0 +X else +X echo ${facts[-1]} && return 0 +X fi +X fi +X +X grep -q QEMU /proc/cpuinfo && echo "kvm" && return 0 +X grep -q QEMU /var/log/messages && echo "kvm" && return 0 +X +X vmware-checkvm &> /dev/null && echo "vmware" && return 0 +X +X echo "unknown" && return 1 +} +X +config_guest() { +X [ ! -d /proc/xen ] && sed -i 's/^vc/#vc/' /etc/inittab && telinit q +X [ -d /proc/xen ] && sed -i 's/^#vc/vc/' /etc/inittab && telinit q +X +X systemctl daemon-reload +X +X case $HYPERVISOR in +X xen-pv|xen-domU) +X systemctl stop ntpd +X systemctl disable ntpd +X systemctl enable xe-daemon +X systemctl start xe-daemon +X +X cat /proc/cmdline > $CMDLINE +X sed -i "s/%/ /g" $CMDLINE +X ;; +X xen-hvm) +X systemctl stop ntpd +X systemctl disable ntpd +X systemctl enable xe-daemon +X systemctl start xe-daemon +X +X if [ ! -f /usr/bin/xenstore-read ]; then +X log_it "ERROR: xentools not installed, cannot found xenstore-read" && exit 5 +X fi +X /usr/bin/xenstore-read vm-data/cloudstack/init > $CMDLINE +X sed -i "s/%/ /g" $CMDLINE +X ;; +X kvm) +X # Configure kvm hotplug support +X if grep -E 'CONFIG_HOTPLUG_PCI=y|CONFIG_HOTPLUG_PCI_ACPI=y' /boot/config-`uname -r`; then +X log_it "acpiphp and pci_hotplug module already compiled in" +X else +X modprobe acpiphp 2> /dev/null && log_it "acpiphp module loaded" || true +X modprobe pci_hotplug 2> /dev/null && log_it "pci_hotplug module loaded" || true +X fi +X +X sed -i -e "/^s0:2345:respawn.*/d" /etc/inittab +X sed -i -e "/6:23:respawn/a\s0:2345:respawn:/sbin/getty -L 115200 ttyS0 vt102" /etc/inittab +X systemctl enable qemu-guest-agent +X systemctl start qemu-guest-agent +X +X # Wait for $CMDLINE file to be written by the qemu-guest-agent +X for i in {1..60}; do +X if [ -s $CMDLINE ]; then +X log_it "Received a new non-empty cmdline file from qemu-guest-agent" +X break +X fi +X sleep 1 +X done +X if [ ! -s $CMDLINE ]; then +X log_it "Failed to receive the cmdline file via the qemu-guest-agent" +X fi +X ;; +X vmware) +X # system time sync'd with host via vmware tools +X systemctl stop ntpd +X systemctl disable ntpd +X systemctl enable open-vm-tools +X systemctl start open-vm-tools +X +X vmtoolsd --cmd 'machine.id.get' > $CMDLINE +X ;; +X virtualpc|hyperv) +X # Hyper-V is recognized as virtualpc hypervisor type. Boot args are passed using KVP Daemon +X systemctl enable hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service +X systemctl start hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service +X sleep 5 +X cp -f /var/opt/hyperv/.kvp_pool_0 $CMDLINE +X cat /dev/null > /var/opt/hyperv/.kvp_pool_0 +X ;; +X virtualbox) +X # Virtualbox is used to test the virtual router +X # get the commandline from a dmistring (yes, hacky!) +X dmidecode | grep cmdline | sed 's/^.*cmdline://' > $CMDLINE +X RV=$? +X if [ $RV -ne 0 ] ; then +X log_it "Failed to get cmdline from a virtualbox dmi property" +X fi +X ;; +X esac +X +X # Find and export guest type +X export TYPE=$(grep -Po 'type=\K[a-zA-Z]*' $CMDLINE) +} +X +patch_systemvm() { +X local patchfile=$1 +X local backupfolder="/tmp/.conf.backup" +X local logfile="/var/log/patchsystemvm.log" +X if [ -f /usr/local/cloud/systemvm/conf/cloud.jks ]; then +X rm -fr $backupfolder +X mkdir -p $backupfolder +X cp -r /usr/local/cloud/systemvm/conf/* $backupfolder/ +X fi +X rm /usr/local/cloud/systemvm -rf +X mkdir -p /usr/local/cloud/systemvm +X echo "All" | unzip $patchfile -d /usr/local/cloud/systemvm >$logfile 2>&1 +X find /usr/local/cloud/systemvm/ -name \*.sh | xargs chmod 555 +X if [ -f $backupfolder/cloud.jks ]; then +X cp -r $backupfolder/* /usr/local/cloud/systemvm/conf/ +X echo "Restored keystore file and certs using backup" >> $logfile +X fi +X rm -fr $backupfolder +X # Import global cacerts into 'cloud' service's keystore +X keytool -importkeystore -srckeystore /etc/ssl/certs/java/cacerts -destkeystore /usr/local/cloud/systemvm/certs/realhostip.keystore -srcstorepass changeit -deststorepass vmops.com -noprompt || true +X return 0 +} +X +patch() { +X local PATCH_MOUNT=/media/cdrom +X local logfile="/var/log/patchsystemvm.log" +X if [ "$TYPE" == "consoleproxy" ] || [ "$TYPE" == "secstorage" ] && [ -f ${PATCH_MOUNT}/agent.zip ] && [ -f /var/cache/cloud/patch.required ] +X then +X echo "Patching systemvm for cloud service with mount=$PATCH_MOUNT for type=$TYPE" >> $logfile +X patch_systemvm ${PATCH_MOUNT}/agent.zip +X if [ $? -gt 0 ] +X then +X echo "Failed to apply patch systemvm\n" >> $logfile +X exit 1 +X fi +X fi +X +X rm -f /var/cache/cloud/patch.required +X chmod -x /etc/systemd/system/cloud*.service +X systemctl daemon-reload +X umount $PATCH_MOUNT || true +X +X if [ -f /mnt/cmdline ]; then +X cat /mnt/cmdline > $CMDLINE +X fi +X return 0 +} +X +config_sysctl() { +X # When there is more memory reset the cache back pressure to default 100 +X physmem=$(free|awk '/^Mem:/{print $2}') +X if [ $((physmem)) -lt 409600 ]; then +X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 200" /etc/sysctl.conf +X else +X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 100" /etc/sysctl.conf +X fi +X +X sync +X sysctl -p +} +X +bootstrap() { +X log_it "Bootstrapping systemvm appliance" +X +X export HYPERVISOR=$(hypervisor) +X [ $? -ne 0 ] && log_it "Failed to detect hypervisor type, bailing out" && exit 10 +X log_it "Starting guest services for $HYPERVISOR" +X +X config_guest +X patch +X config_sysctl +X +X log_it "Configuring systemvm type=$TYPE" +X if [ -f "/opt/cloud/bin/setup/$TYPE.sh" ]; then +X /opt/cloud/bin/setup/$TYPE.sh +X else +X /opt/cloud/bin/setup/default.sh +X fi +X +X log_it "Finished setting up systemvm" +X exit 0 +} +X +bootstrap +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/bootstrap.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh': 'MD5 check failed' + ) << \SHAR_EOF +722a9c6abfff147c7727fdcd85c96767 cloud_scripts/opt/cloud/bin/setup/bootstrap.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh'` -ne 7721 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' is not 7721" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_console_proxy() { +X log_it "Setting up console proxy system vm" +X +X echo "cloud" > /var/cache/cloud/enabled_svcs +X echo "haproxy dnsmasq apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs +X mkdir -p /var/log/cloud +X +X setup_common eth0 eth1 eth2 +X setup_system_rfc1918_internal +X +X log_it "Setting up entry in hosts" +X sed -i /$NAME/d /etc/hosts +X public_ip=`getPublicIp` +X echo "$public_ip $NAME" >> /etc/hosts +X +X log_it "Applying iptables rules" +X cp /etc/iptables/iptables-consoleproxy /etc/iptables/rules.v4 +X +X log_it "Configuring sshd" +X local hyp=$HYPERVISOR +X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then +X setup_sshd $ETH1_IP "eth1" +X else +X setup_sshd $ETH0_IP "eth0" +X fi +X +X disable_rpfilter +X enable_fwding 0 +X enable_irqbalance 0 +X rm -f /etc/logrotate.d/cloud +} +X +setup_console_proxy +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh': 'MD5 check failed' + ) << \SHAR_EOF +44adac9bf5e54d4791da00e3d1bdaf46 cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh'` -ne 1658 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' is not 1658" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/common.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/common.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/common.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/common.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/common.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" +X +X. /lib/lsb/init-functions +X +log_it() { +X echo "$(date) $@" >> /var/log/cloud.log +X log_action_msg "$@" +} +X +init_interfaces_orderby_macs() { +X macs=( $(echo $1 | sed "s/|/ /g") ) +X total_nics=${#macs[@]} +X interface_file=${2:-"/etc/network/interfaces"} +X rule_file=${3:-"/etc/udev/rules.d/70-persistent-net.rules"} +X +X echo -n "auto lo" > $interface_file +X for((i=0; i> $interface_file +X fi +X done +X +X cat >> $interface_file << EOF +X +iface lo inet loopback +X +EOF +X +X echo "" > $rule_file +X for((i=0; i < ${#macs[@]}; i++)) +X do +X echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${macs[$i]}\", NAME=\"eth$i\"" >> $rule_file +X done +} +X +init_interfaces() { +X if [ "$NIC_MACS" == "" ] +X then +X cat > /etc/network/interfaces << EOF +auto lo $1 $2 $3 +iface lo inet loopback +X +EOF +X else +X init_interfaces_orderby_macs "$NIC_MACS" +X fi +} +X +setup_interface() { +X local intfnum=$1 +X local ip=$2 +X local mask=$3 +X local gw=$4 +X local force=$5 +X local intf=eth${intfnum} +X local bootproto="static" +X +X if [ "$BOOTPROTO" == "dhcp" ] +X then +X if [ "$intfnum" != "0" ] +X then +X bootproto="dhcp" +X fi +X fi +X +X if [ "$ip" != "0.0.0.0" -a "$ip" != "" -o "$force" == "force" ] +X then +X echo "iface $intf inet $bootproto" >> /etc/network/interfaces +X if [ "$bootproto" == "static" ] +X then +X echo " address $ip " >> /etc/network/interfaces +X echo " netmask $mask" >> /etc/network/interfaces +X fi +X fi +X +X if [ "$ip" == "0.0.0.0" -o "$ip" == "" ] +X then +X ifconfig $intf down +X fi +X +X if [ "$force" == "force" ] +X then +X ifdown $intf +X else +X ifdown $intf +X if [ "$RROUTER" != "1" -o "$1" != "2" ] +X then +X ifup $intf +X fi +X fi +} +X +setup_interface_ipv6() { +X sysctl net.ipv6.conf.all.disable_ipv6=0 +X sysctl net.ipv6.conf.all.forwarding=1 +X sysctl net.ipv6.conf.all.accept_ra=1 +X +X sed -i "s/net.ipv6.conf.all.disable_ipv6 =.*$/net.ipv6.conf.all.disable_ipv6 = 0/" /etc/sysctl.conf +X sed -i "s/net.ipv6.conf.all.forwarding =.*$/net.ipv6.conf.all.forwarding = 1/" /etc/sysctl.conf +X sed -i "s/net.ipv6.conf.all.accept_ra =.*$/net.ipv6.conf.all.accept_ra = 1/" /etc/sysctl.conf +X +X local intfnum=$1 +X local ipv6="$2" +X local prelen="$3" +X local intf=eth${intfnum} +X +X echo "iface $intf inet6 static" >> /etc/network/interfaces +X echo " address $ipv6 " >> /etc/network/interfaces +X echo " netmask $prelen" >> /etc/network/interfaces +X echo " accept_ra 1" >> /etc/network/interfaces +X ifdown $intf +X ifup $intf +} +X +X +enable_fwding() { +X local enabled=$1 +X log_it "cloud: enable_fwding = $1" +X log_it "enable_fwding = $1" +X echo "$1" > /proc/sys/net/ipv4/ip_forward +X [ -f /etc/iptables/iptables.conf ] && sed -i "s/ENABLE_ROUTING=.*$/ENABLE_ROUTING=$enabled/" /etc/iptables/iptables.conf && return +} +X +enable_passive_ftp() { +X log_it "cloud: enabling passive FTP for guest VMs" +X echo "$1" > /proc/sys/net/netfilter/nf_conntrack_helper +} +X +disable_rpfilter() { +X log_it "cloud: disable rp_filter" +X log_it "disable rpfilter" +X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf +} +X +get_public_vif_list() { +X local vif_list="" +X for i in /sys/class/net/eth*; do +X vif=$(basename $i); +X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] +X then +X vif_list="$vif_list $vif"; +X fi +X done +X +X echo $vif_list +} +X +disable_rpfilter_domR() { +X log_it "cloud: Tuning rp_filter on public interfaces" +X +X VIF_LIST=$(get_public_vif_list) +X log_it "rpfilter public interfaces : $VIF_LIST" +X if [ "$DISABLE_RP_FILTER" == "true" ] +X then +X log_it "cloud: disable rp_filter on public interfaces" +X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf +X echo "0" > /proc/sys/net/ipv4/conf/default/rp_filter +X for vif in $VIF_LIST; do +X log_it "cloud: disable rp_filter on public interface: $vif" +X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 0/" /etc/sysctl.conf +X echo "0" > /proc/sys/net/ipv4/conf/$vif/rp_filter +X done +X else +X log_it "cloud: enable rp_filter on public interfaces" +X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 1/" /etc/sysctl.conf +X echo "1" > /proc/sys/net/ipv4/conf/default/rp_filter +X for vif in $VIF_LIST; do +X log_it "cloud: enable rp_filter on public interface: $vif" +X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 1/" /etc/sysctl.conf +X echo "1" > /proc/sys/net/ipv4/conf/$vif/rp_filter +X done +X fi +X log_it "cloud: Enabling rp_filter on Non-public interfaces(eth0,eth1,lo)" +X echo "1" > /proc/sys/net/ipv4/conf/eth0/rp_filter +X echo "1" > /proc/sys/net/ipv4/conf/eth1/rp_filter +X echo "1" > /proc/sys/net/ipv4/conf/lo/rp_filter +} +X +enable_irqbalance() { +X local enabled=$1 +X local proc=0 +X +X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) +X if [ $proc -le 1 ] && [ $enabled -eq 1 ] +X then +X enabled=0 +X fi +X +X log_it "Processors = $proc Enable service ${svc} = $enabled" +X local cfg=/etc/default/irqbalance +X [ -f $cfg ] && sed -i "s/ENABLED=.*$/ENABLED=$enabled/" $cfg && return +} +X +enable_vpc_rpsrfs() { +X local enable=$1 +X if [ $enable -eq 0 ] +X then +X echo 0 > /etc/rpsrfsenable +X else +X echo 1 > /etc/rpsrfsenable +X fi +X +X return 0 +} +X +enable_rpsrfs() { +X local enable=$1 +X +X if [ $enable -eq 0 ] +X then +X echo 0 > /etc/rpsrfsenable +X return 0 +X fi +X +X if [ ! -f /sys/class/net/eth0/queues/rx-0/rps_cpus ] +X then +X echo "rps is not enabled in the kernel" +X echo 0 > /etc/rpsrfsenable +X return 0 +X fi +X +X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) +X if [ $proc -le 1 ] +X then +X echo 0 > /etc/rpsrfsenable +X return 0; +X fi +X +X echo 1 > /etc/rpsrfsenable +X num=1 +X num=$(($num<<$proc)) +X num=$(($num-1)); +X echo $num; +X hex=$(printf "%x\n" $num) +X echo $hex; +X #enable rps +X echo $hex > /sys/class/net/eth0/queues/rx-0/rps_cpus +X echo $hex > /sys/class/net/eth2/queues/rx-0/rps_cpus +X +X #enble rfs +X echo 256 > /proc/sys/net/core/rps_sock_flow_entries +X echo 256 > /sys/class/net/eth0/queues/rx-0/rps_flow_cnt +X echo 256 > /sys/class/net/eth2/queues/rx-0/rps_flow_cnt +} +X +setup_common() { +X init_interfaces $1 $2 $3 +X if [ -n "$ETH0_IP" ] +X then +X setup_interface "0" $ETH0_IP $ETH0_MASK $GW +X fi +X if [ -n "$ETH0_IP6" ] +X then +X setup_interface_ipv6 "0" $ETH0_IP6 $ETH0_IP6_PRELEN +X fi +X setup_interface "1" $ETH1_IP $ETH1_MASK $GW +X if [ -n "$ETH2_IP" ] +X then +X setup_interface "2" $ETH2_IP $ETH2_MASK $GW +X fi +X +X echo $NAME > /etc/hostname +X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon +X hostnamectl set-hostname $NAME +X +X #Nameserver +X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries +X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries +X if [ -n "$internalNS1" ] +X then +X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS1" > /etc/resolv.conf +X fi +X +X if [ -n "$internalNS2" ] +X then +X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS2" >> /etc/resolv.conf +X fi +X if [ -n "$NS1" ] +X then +X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS1" >> /etc/resolv.conf +X fi +X +X if [ -n "$NS2" ] +X then +X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS2" >> /etc/resolv.conf +X fi +X +X if [ -n "$IP6_NS1" ] +X then +X echo "nameserver $IP6_NS1" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $IP6_NS1" >> /etc/resolv.conf +X fi +X if [ -n "$IP6_NS2" ] +X then +X echo "nameserver $IP6_NS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $IP6_NS2" >> /etc/resolv.conf +X fi +X +X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] +X then +X ip route add $MGMTNET via $LOCAL_GW dev eth1 +X fi +X +X ip route delete default +X if [ "$RROUTER" != "1" ] +X then +X gwdev=$3 +X if [ -z "$gwdev" ] +X then +X gwdev="eth0" +X fi +X +X ip route add default via $GW dev $gwdev +X fi +X +X # Workaround to activate vSwitch under VMware +X timeout 3 ping -n -c 3 $GW & +X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] +X then +X timeout 3 ping -n -c 3 $LOCAL_GW & +X #This code is added to address ARP issue by pinging MGMT_GW +X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') +X timeout 3 ping -n -c 3 $MGMT_GW & +X fi +X +X if [ "$HYPERVISOR" == "vmware" ]; then +X ntpq -p &> /dev/null || vmware-toolbox-cmd timesync enable +X fi +} +X +setup_dnsmasq() { +X log_it "Setting up dnsmasq" +X +X touch /etc/dhcpopts.txt +X +X [ -z $DHCP_RANGE ] && [ $ETH0_IP ] && DHCP_RANGE=$ETH0_IP +X [ $ETH0_IP6 ] && DHCP_RANGE_IP6=$ETH0_IP6 +X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" +X #removing the dnsmasq multiple ranges config file. +X rm /etc/dnsmasq.d/multiple_ranges.conf +X +X #get the template +X cp /etc/dnsmasq.conf.tmpl /etc/dnsmasq.conf +X +X if [ -n "$DOMAIN" ] +X then +X #send domain name to dhcp clients +X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\"$DOMAIN\"/ /etc/dnsmasq.conf +X #DNS server will append $DOMAIN to local queries +X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf +X #answer all local domain queries +X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf +X fi +X +X if [ -n "$DNS_SEARCH_ORDER" ] +X then +X sed -i -e "/^[#]*dhcp-option.*=119.*$/d" /etc/dnsmasq.conf +X echo "dhcp-option-force=119,$DNS_SEARCH_ORDER" >> /etc/dnsmasq.conf +X # set the domain search order as a space seprated list for option 15 +X DNS_SEARCH_ORDER=$(echo $DNS_SEARCH_ORDER | sed 's/,/ /g') +X #send domain name to dhcp clients +X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\""$DNS_SEARCH_ORDER"\"/ /etc/dnsmasq.conf +X fi +X +X if [ $DHCP_RANGE ] +X then +X sed -i -e "s/^dhcp-range_ip4=.*$/dhcp-range=$DHCP_RANGE,static/" /etc/dnsmasq.conf +X else +X sed -i -e "s/^dhcp-range_ip4=.*$//" /etc/dnsmasq.conf +X fi +X if [ $DHCP_RANGE_IP6 ] +X then +X sed -i -e "s/^dhcp-range_ip6=.*$/dhcp-range=$DHCP_RANGE_IP6,static/" /etc/dnsmasq.conf +X # For nondefault6 tagged host, don't send dns-server information +X sed -i /nondefault6/d /etc/dnsmasq.conf +X echo "dhcp-option=nondefault6,option6:dns-server" >> /etc/dnsmasq.conf +X else +X sed -i -e "s/^dhcp-range_ip6=.*$//" /etc/dnsmasq.conf +X fi +X +X if [ "$RROUTER" == "1" ] +X then +X DEFAULT_GW=$GUEST_GW +X INTERNAL_DNS=$GUEST_GW +X else +X if [ "$TYPE" == "dhcpsrvr" ] +X then +X DEFAULT_GW=$GW +X else +X DEFAULT_GW=$ETH0_IP +X fi +X INTERNAL_DNS=$ETH0_IP +X fi +X sed -i -e "/^[#]*dhcp-option=option:router.*$/d" /etc/dnsmasq.conf +X [ $DEFAULT_GW ] && echo "dhcp-option=option:router,$DEFAULT_GW" >> /etc/dnsmasq.conf +X +X [ $ETH0_IP ] && [ $NS1 ] && NS="$NS1," +X [ $ETH0_IP ] && [ $NS2 ] && NS="$NS$NS2," +X [ $ETH0_IP6 ] && [ $IP6_NS1 ] && NS6="[$IP6_NS1]," +X [ $ETH0_IP6 ] && [ $IP6_NS2 ] && NS6="$NS6[$IP6_NS2]," +X #for now set up ourself as the dns server as well +X sed -i -e "/^[#]*dhcp-option=6,.*$/d" /etc/dnsmasq.conf +X sed -i -e "/^[#]*dhcp-option=option6:dns-server,.*$/d" /etc/dnsmasq.conf +X if [ "$USE_EXTERNAL_DNS" != "true" ] +X then +X [ $ETH0_IP ] && NS="$INTERNAL_DNS,$NS" +X [ $ETH0_IP6 ] && NS6="[::],$NS6" +X # enable dns +X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf +X else +X # disable dns +X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf +X echo "port=0" >> /etc/dnsmasq.conf +X fi +X NS=${NS%?} +X NS6=${NS6%?} +X [ $ETH0_IP ] && echo "dhcp-option=6,$NS" >> /etc/dnsmasq.conf +X [ $ETH0_IP6 ] && echo "dhcp-option=option6:dns-server,$NS6" >> /etc/dnsmasq.conf +X #adding the name data-server to the /etc/hosts for allowing the access to user-data service and ssh-key reset in every subnet. +X #removing the existing entires to avoid duplicates on restarts. +X sed -i '/data-server/d' /etc/hosts +X if [ -n "$ETH0_IP" ] +X then +X echo "$ETH0_IP data-server" >> /etc/hosts +X fi +X if [ -n "$ETH0_IP6" ] +X then +X echo "$ETH0_IP6 data-server" >> /etc/hosts +X fi +X #add the dhcp-client-update only if dnsmasq version is 2.6 and above +X dnsmasqVersion=$(dnsmasq -v | grep version -m 1 | grep -o "[[:digit:]]\.[[:digit:]]") +X major=$(echo "$dnsmasqVersion" | cut -d '.' -f 1) +X minor=$(echo "$dnsmasqVersion" | cut -d '.' -f 2) +X if [ "$major" -eq '2' -a "$minor" -ge '6' ] || [ "$major" -gt '2' ] +X then +X sed -i -e "/^dhcp-client-update/d" /etc/dnsmasq.conf +X echo 'dhcp-client-update' >> /etc/dnsmasq.conf +X fi +X +X command -v dhcp_release > /dev/null 2>&1 +X no_dhcp_release=$? +X if [ $no_dhcp_release -eq 0 -a -z "$ETH0_IP6" ] +X then +X echo 1 > /var/cache/cloud/dnsmasq_managed_lease +X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf +X else +X echo 0 > /var/cache/cloud/dnsmasq_managed_lease +X fi +} +X +setup_sshd(){ +X local ip=$1 +X local eth=$2 +X [ -f /etc/ssh/sshd_config ] && sed -i -e "s/^[#]*ListenAddress.*$/ListenAddress $ip/" /etc/ssh/sshd_config +X sed -i "/3922/s/eth./$eth/" /etc/iptables/rules.v4 +} +X +setup_vpc_apache2() { +X log_it "Setting up apache web server for VPC" +X systemctl disable apache2 +X clean_ipalias_config +X setup_apache2_common +} +X +clean_ipalias_config() { +X rm -f /etc/apache2/conf.d/ports.*.meta-data.conf +X rm -f /etc/apache2/sites-available/ipAlias* +X rm -f /etc/apache2/sites-enabled/ipAlias* +X rm -f /etc/apache2/conf.d/vhost*.conf +X rm -f /etc/apache2/ports.conf +X rm -f /etc/apache2/vhostexample.conf +X rm -f /etc/apache2/sites-available/* +X rm -f /etc/apache2/sites-enabled/* +X +X rm -rf /etc/failure_config +} +X +setup_apache2_common() { +X sed -i 's/^Include ports.conf.*/# CS: Done by Python CsApp config\n#Include ports.conf/g' /etc/apache2/apache2.conf +X # Disable listing of http://SSVM-IP/icons folder for security issue. see article http://www.i-lateral.com/tutorials/disabling-the-icons-folder-on-an-ubuntu-web-server/ +X [ -f /etc/apache2/mods-available/alias.conf ] && sed -i s/"Options Indexes MultiViews"/"Options -Indexes MultiViews"/ /etc/apache2/mods-available/alias.conf +X +X echo "Options -Indexes" > /var/www/html/.htaccess +} +X +setup_apache2() { +X log_it "Setting up apache web server" +X mkdir -p /var/www +X chown www-data:www-data -R /var/www +X clean_ipalias_config +X setup_apache2_common +X local ip=$1 +} +X +setup_aesni() { +X if [ `grep aes /proc/cpuinfo | wc -l` -gt 0 ] +X then +X modprobe aesni_intel +X fi +} +X +setup_storage_network() { +X if [ x"$STORAGE_IP" == "x" -o x"$STORAGE_NETMASK" == "x" ] +X then +X log_it "Incompleted parameters STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR. Cannot setup storage network" +X return +X fi +X +X echo "" >> /etc/network/interfaces +X echo "auto eth3" >> /etc/network/interfaces +X +X setup_interface "3" "$STORAGE_IP" "$STORAGE_NETMASK" +X [ -n "$MTU" ] && ifconfig eth3 mtu $MTU && echo " mtu $MTU" >> /etc/network/interfaces +X #ip route add "$STORAGE_CIDR" via "$STORAGE_IP" +X log_it "Successfully setup storage network with STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR" +} +X +setup_system_rfc1918_internal() { +X public_ip=`getPublicIp` +X echo "$public_ip" | grep -E "^((127\.)|(10\.)|(172\.1[6-9]\.)|(172\.2[0-9]\.)|(172\.3[0-1]\.)|(192\.168\.))" +X if [ "$?" == "0" ]; then +X log_it "Not setting up route of RFC1918 space to $LOCAL_GW befause $public_ip is RFC1918." +X else +X log_it "Setting up route of RFC1918 space to $LOCAL_GW" +X # Setup general route for RFC 1918 space, as otherwise it will be sent to +X # the public gateway and not work +X # More specific routes that may be set have preference over this generic route. +X ip route add 10.0.0.0/8 via $LOCAL_GW +X ip route add 172.16.0.0/12 via $LOCAL_GW +X ip route add 192.168.0.0/16 via $LOCAL_GW +X fi +} +X +getPublicIp() { +X public_ip=$ETH2_IP +X [ "$ETH2_IP" == "0.0.0.0" ] && public_ip=$ETH1_IP +X echo $public_ip +} +X +setup_ntp() { +X log_it "Setting up NTP" +X NTP_CONF_FILE="/etc/ntp.conf" +X if [ -f $NTP_CONF_FILE ] +X then +X IFS=',' read -a server_list <<< "$NTP_SERVER_LIST" +X for (( iterator=${#server_list[@]}-1 ; iterator>=0 ; iterator-- )) +X do +X server=$(echo ${server_list[iterator]} | tr -d '\r') +X PATTERN="server $server" +X if grep -q "^$PATTERN$" $NTP_CONF_FILE ; then +X sed -i "/^$PATTERN$/d" $NTP_CONF_FILE +X fi +X sed -i "0,/^server/s//$PATTERN\nserver/" $NTP_CONF_FILE +X done +X systemctl enable ntp +X else +X log_it "NTP configuration file not found" +X fi +} +X +routing_svcs() { +X echo "haproxy apache2" > /var/cache/cloud/enabled_svcs +X echo "cloud nfs-common portmap" > /var/cache/cloud/disabled_svcs +X if [ "$RROUTER" -eq "1" ] +X then +X echo "keepalived conntrackd" >> /var/cache/cloud/enabled_svcs +X echo "dnsmasq" >> /var/cache/cloud/disabled_svcs +X else +X echo "dnsmasq" >> /var/cache/cloud/enabled_svcs +X echo "keepalived conntrackd " >> /var/cache/cloud/disabled_svcs +X fi +} +X +parse_cmd_line() { +X CMDLINE=$(cat /var/cache/cloud/cmdline) +X TYPE="unknown" +X BOOTPROTO="static" +X DISABLE_RP_FILTER="false" +X STORAGE_IP="" +X STORAGE_NETMASK="" +X STORAGE_CIDR="" +X VM_PASSWORD="" +X +X CHEF_TMP_FILE=/tmp/cmdline.json +X COMMA="\t" +X echo -e "{\n\"type\": \"cmdline\"," > ${CHEF_TMP_FILE} +X echo -e "\"cmd_line\": {" >> ${CHEF_TMP_FILE} +X +X for i in $CMDLINE +X do +X # search for foo=bar pattern and cut out foo +X KEY=$(echo $i | cut -d= -f1) +X VALUE=$(echo $i | cut -d= -f2) +X echo -en ${COMMA} >> ${CHEF_TMP_FILE} +X # Two lines so values do not accidently interpretted as escapes!! +X echo -n \"${KEY}\"': '\"${VALUE}\" >> ${CHEF_TMP_FILE} +X COMMA=",\n\t" +X case $KEY in +X disable_rp_filter) +X export DISABLE_RP_FILTER=$VALUE +X ;; +X eth0ip) +X export ETH0_IP=$VALUE +X ;; +X eth1ip) +X export ETH1_IP=$VALUE +X ;; +X eth2ip) +X export ETH2_IP=$VALUE +X ;; +X host) +X export MGMT_HOST=$VALUE +X ;; +X gateway) +X export GW=$VALUE +X ;; +X ip6gateway) +X export IP6GW=$VALUE +X ;; +X eth0mask) +X export ETH0_MASK=$VALUE +X ;; +X eth1mask) +X export ETH1_MASK=$VALUE +X ;; +X eth2mask) +X export ETH2_MASK=$VALUE +X ;; +X eth0ip6) +X export ETH0_IP6=$VALUE +X ;; +X eth0ip6prelen) +X export ETH0_IP6_PRELEN=$VALUE +X ;; +X internaldns1) +X export internalNS1=$VALUE +X ;; +X internaldns2) +X export internalNS2=$VALUE +X ;; +X dns1) +X export NS1=$VALUE +X ;; +X dns2) +X export NS2=$VALUE +X ;; +X ip6dns1) +X export IP6_NS1=$VALUE +X ;; +X ip6dns2) +X export IP6_NS2=$VALUE +X ;; +X domain) +X export DOMAIN=$VALUE +X ;; +X dnssearchorder) +X export DNS_SEARCH_ORDER=$VALUE +X ;; +X useextdns) +X export USE_EXTERNAL_DNS=$VALUE +X ;; +X mgmtcidr) +X export MGMTNET=$VALUE +X ;; +X localgw) +X export LOCAL_GW=$VALUE +X ;; +X template) +X export TEMPLATE=$VALUE +X ;; +X sshonguest) +X export SSHONGUEST=$VALUE +X ;; +X name) +X export NAME=$VALUE +X ;; +X dhcprange) +X export DHCP_RANGE=$(echo $VALUE | tr ':' ',') +X ;; +X bootproto) +X export BOOTPROTO=$VALUE +X ;; +X type) +X export TYPE=$VALUE +X ;; +X defaultroute) +X export DEFAULTROUTE=$VALUE +X ;; +X redundant_router) +X export RROUTER=$VALUE +X ;; +X redundant_state) +X export RROUTER_STATE=$VALUE +X ;; +X guestgw) +X export GUEST_GW=$VALUE +X ;; +X guestbrd) +X export GUEST_BRD=$VALUE +X ;; +X guestcidrsize) +X export GUEST_CIDR_SIZE=$VALUE +X ;; +X router_pr) +X export ROUTER_PR=$VALUE +X ;; +X extra_pubnics) +X export EXTRA_PUBNICS=$VALUE +X ;; +X nic_macs) +X export NIC_MACS=$VALUE +X ;; +X mtu) +X export MTU=$VALUE +X ;; +X storageip) +X export STORAGE_IP=$VALUE +X ;; +X storagenetmask) +X export STORAGE_NETMASK=$VALUE +X ;; +X storagecidr) +X export STORAGE_CIDR=$VALUE +X ;; +X vmpassword) +X export VM_PASSWORD=$VALUE +X ;; +X vpccidr) +X export VPCCIDR=$VALUE +X ;; +X cidrsize) +X export CIDR_SIZE=$VALUE +X ;; +X advert_int) +X export ADVERT_INT=$VALUE +X ;; +X ntpserverlist) +X export NTP_SERVER_LIST=$VALUE +X ;; +X esac +X done +X echo -e "\n\t}\n}" >> ${CHEF_TMP_FILE} +X if [ "$TYPE" != "unknown" ] +X then +X mv ${CHEF_TMP_FILE} /var/cache/cloud/cmd_line.json +X fi +X +X [ $ETH0_IP ] && export LOCAL_ADDRS=$ETH0_IP +X [ $ETH0_IP6 ] && export LOCAL_ADDRS=$ETH0_IP6 +X [ $ETH0_IP ] && [ $ETH0_IP6 ] && export LOCAL_ADDRS="$ETH0_IP,$ETH0_IP6" +X +X # Randomize cloud password so only ssh login is allowed +X echo "cloud:`openssl rand -base64 32`" | chpasswd +X +X if [ x"$VM_PASSWORD" != x"" ] +X then +X echo "root:$VM_PASSWORD" | chpasswd +X fi +} +X +parse_cmd_line +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/common.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/common.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/common.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/common.sh': 'MD5 check failed' + ) << \SHAR_EOF +8754c81bacd82458e4ce221b476505ea cloud_scripts/opt/cloud/bin/setup/common.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/common.sh'` -ne 22472 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/common.sh' is not 22472" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +dhcpsrvr_svcs() { +X echo "dnsmasq apache2" > /var/cache/cloud/enabled_svcs +X echo "cloud nfs-common conntrackd keepalived haproxy portmap" > /var/cache/cloud/disabled_svcs +} +X +setup_dhcpsrvr() { +X log_it "Setting up dhcp server system vm" +X setup_common eth0 eth1 +X setup_dnsmasq +X setup_apache2 $ETH0_IP +X +X sed -i /$NAME/d /etc/hosts +X [ $ETH0_IP ] && echo "$ETH0_IP $NAME" >> /etc/hosts +X [ $ETH0_IP6 ] && echo "$ETH0_IP6 $NAME" >> /etc/hosts +X +X enable_irqbalance 0 +X enable_fwding 0 +X +X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 +X +X #Only allow DNS service for current network +X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X +X if [ "$SSHONGUEST" == "true" ] +X then +X setup_sshd $ETH0_IP "eth0" +X else +X setup_sshd $ETH1_IP "eth1" +X fi +} +X +dhcpsrvr_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute dhcpsrvr_svcs" +X exit 1 +fi +setup_dhcpsrvr +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh': 'MD5 check failed' + ) << \SHAR_EOF +08afc46420e5e388ba6be68cfdbd4a59 cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh'` -ne 1985 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' is not 1985" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/cloud-early-config ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/cloud-early-config (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/cloud-early-config (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" +X +# Clear boot up flag, it would be created by rc.local after boot up done +mkdir -p /var/cache/cloud +rm -f /var/cache/cloud/boot_up_done +X +[ -x /sbin/ifup ] || exit 0 +X +X. /lib/lsb/init-functions +X +log_it() { +X echo "$(date) $@" >> /var/log/cloud.log +X log_action_msg "$@" +} +X +patch() { +X local PATCH_MOUNT=/media/cdrom +X local patchfile=$PATCH_MOUNT/cloud-scripts.tgz +X local privkey=$PATCH_MOUNT/authorized_keys +X local md5file=/var/cache/cloud/cloud-scripts-signature +X local cdrom_dev= +X mkdir -p $PATCH_MOUNT +X +X if [ -e /dev/xvdd ]; then +X cdrom_dev=/dev/xvdd +X elif [ -e /dev/cdrom ]; then +X cdrom_dev=/dev/cdrom +X elif [ -e /dev/cdrom1 ]; then +X cdrom_dev=/dev/cdrom1 +X elif [ -e /dev/cdrom2 ]; then +X cdrom_dev=/dev/cdrom2 +X elif [ -e /dev/cdrom3 ]; then +X cdrom_dev=/dev/cdrom3 +X fi +X +X if [ -f /var/cache/cloud/authorized_keys ]; then +X privkey=/var/cache/cloud/authorized_keys +X fi +X +X if [ -n "$cdrom_dev" ]; then +X mount -o ro $cdrom_dev $PATCH_MOUNT +X local oldmd5= +X [ -f ${md5file} ] && oldmd5=$(cat ${md5file}) +X local newmd5= +X [ -f ${patchfile} ] && newmd5=$(md5sum ${patchfile} | awk '{print $1}') +X +X log_it "Scripts checksum detected: oldmd5=$oldmd5 newmd5=$newmd5" +X if [ "$oldmd5" != "$newmd5" ] && [ -f ${patchfile} ] && [ "$newmd5" != "" ] +X then +X tar xzf $patchfile -C / +X echo ${newmd5} > ${md5file} +X log_it "Patched scripts using $patchfile" +X touch /var/cache/cloud/patch.required +X fi +X +X if [ -f $privkey ]; then +X cp -f $privkey /root/.ssh/ +X chmod go-rwx /root/.ssh/authorized_keys +X fi +X fi +X +X return 0 +} +X +start() { +X log_it "Executing cloud-early-config" +X +X # Clear /tmp for file lock +X rm -f /tmp/*.lock +X rm -f /tmp/rrouter_bumped +X rm -f /root/.rnd +X echo "" > /root/.ssh/known_hosts +X +X patch +X sync +X /opt/cloud/bin/setup/bootstrap.sh +X +X log_it "Finished setting up systemvm" +X exit 0 +} +X +start +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/cloud-early-config failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config': 'MD5 check failed' + ) << \SHAR_EOF +c9e5973de3771fd5f5e9b490c60db970 cloud_scripts/opt/cloud/bin/setup/cloud-early-config +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config'` -ne 2765 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' is not 2765" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/default.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/default.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/default.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/default.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/default.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_default() { +X cat > /etc/network/interfaces << EOF +auto lo +iface lo inet loopback +EOF +X cp -f /etc/iptables/rt_tables_init /etc/iproute2/rt_tables +} +X +setup_default +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/default.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/default.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/default.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/default.sh': 'MD5 check failed' + ) << \SHAR_EOF +20e3a01cb77930eba6438de6d9a3f193 cloud_scripts/opt/cloud/bin/setup/default.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/default.sh'` -ne 1002 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/default.sh' is not 1002" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/loadbalancer.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/loadbalancer.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/loadbalancer.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +X +# $Id: loadbalancer.sh 9947 2010-06-25 19:34:24Z manuel $ $HeadURL: svn://svn.lab.vmops.com/repos/vmdev/java/patches/xenserver/root/loadbalancer.sh $ +# loadbalancer.sh -- reconfigure loadbalancer rules +# @VERSION@ +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s: -i -a -d -f -s \n" $(basename $0) >&2 +} +X +# set -x +X +# ensure that the nic has the public ip we are load balancing on +ip_entry() { +X local added=$1 +X local removed=$2 +X +X if [ "$added" == "none" ] +X then +X added="" +X fi +X +X if [ "$removed" == "none" ] +X then +X removed="" +X fi +X +X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") +X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") +X +X for i in $a +X do +X local pubIp=$(echo $i | cut -d: -f1) +X logger -t cloud "Adding public ip $pubIp for load balancing" +X for vif in $VIF_LIST; do +X sudo ip addr add dev $vif $pubIp/32 +X #ignore error since it is because the ip is already there +X done +X done +X +X for i in $r +X do +X logger -t cloud "Removing public ips for deleted loadbalancers" +X local pubIp=$(echo $i | cut -d: -f1) +X logger -t cloud "Removing public ip $pubIp for deleted loadbalancers" +X for vif in $VIF_LIST; do +X sudo ip addr del $pubIp/32 dev $vif +X done +X done +X +X return 0 +} +get_lb_vif_list() { +# add eth0 to the VIF_LIST if it is not there, this allows guest VMs to use the LB service. +X local lb_list="$VIF_LIST eth0"; +X lb_list=$(echo $lb_list | tr " " "\n" | sort | uniq | tr "\n" " ") +X echo $lb_list +} +fw_remove_backup() { +X local lb_vif_list=$(get_lb_vif_list) +X for vif in $lb_vif_list; do +X sudo iptables -F back_load_balancer_$vif 2> /dev/null +X sudo iptables -D INPUT -i $vif -p tcp -j back_load_balancer_$vif 2> /dev/null +X sudo iptables -X back_load_balancer_$vif 2> /dev/null +X done +X sudo iptables -F back_lb_stats 2> /dev/null +X sudo iptables -D INPUT -p tcp -j back_lb_stats 2> /dev/null +X sudo iptables -X back_lb_stats 2> /dev/null +} +fw_restore() { +X local lb_vif_list=$(get_lb_vif_list) +X for vif in $lb_vif_list; do +X sudo iptables -F load_balancer_$vif 2> /dev/null +X sudo iptables -D INPUT -i $vif -p tcp -j load_balancer_$vif 2> /dev/null +X sudo iptables -X load_balancer_$vif 2> /dev/null +X sudo iptables -E back_load_balancer_$vif load_balancer_$vif 2> /dev/null +X done +X sudo iptables -F lb_stats 2> /dev/null +X sudo iptables -D INPUT -p tcp -j lb_stats 2> /dev/null +X sudo iptables -X lb_stats 2> /dev/null +X sudo iptables -E back_lb_stats lb_stats 2> /dev/null +} +# firewall entry to ensure that haproxy can receive on specified port +fw_entry() { +X local added=$1 +X local removed=$2 +X local stats=$3 +X +X if [ "$added" == "none" ] +X then +X added="" +X fi +X +X if [ "$removed" == "none" ] +X then +X removed="" +X fi +X +X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") +X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") +X +# back up the iptable rules by renaming before creating new. +X local lb_vif_list=$(get_lb_vif_list) +X for vif in $lb_vif_list; do +X sudo iptables -E load_balancer_$vif back_load_balancer_$vif 2> /dev/null +X sudo iptables -N load_balancer_$vif 2> /dev/null +X sudo iptables -A INPUT -i $vif -p tcp -j load_balancer_$vif +X done +X sudo iptables -E lb_stats back_lb_stats 2> /dev/null +X sudo iptables -N lb_stats 2> /dev/null +X sudo iptables -A INPUT -p tcp -j lb_stats +X +X for i in $a +X do +X local pubIp=$(echo $i | cut -d: -f1) +X local dport=$(echo $i | cut -d: -f2) +X local lb_vif_list=$(get_lb_vif_list) +X for vif in $lb_vif_list; do +X +#TODO : The below delete will be used only when we upgrade the from older verion to the newer one , the below delete become obsolute in the future. +X sudo iptables -D INPUT -i $vif -p tcp -d $pubIp --dport $dport -j ACCEPT 2> /dev/null +X +X sudo iptables -A load_balancer_$vif -p tcp -d $pubIp --dport $dport -j ACCEPT +X +X if [ $? -gt 0 ] +X then +X return 1 +X fi +X done +X done +X local pubIp=$(echo $stats | cut -d: -f1) +X local dport=$(echo $stats | cut -d: -f2) +X local cidrs=$(echo $stats | cut -d: -f3 | sed 's/-/,/') +X sudo iptables -A lb_stats -s $cidrs -p tcp -m state --state NEW -d $pubIp --dport $dport -j ACCEPT +X +X +#TODO : The below delete in the for-loop will be used only when we upgrade the from older verion to the newer one , the below delete become obsolute in the future. +X for i in $r +X do +X local pubIp=$(echo $i | cut -d: -f1) +X local dport=$(echo $i | cut -d: -f2) +X +X for vif in $VIF_LIST; do +X sudo iptables -D INPUT -i $vif -p tcp -d $pubIp --dport $dport -j ACCEPT 2> /dev/null +X done +X done +X +X return 0 +} +X +#Hot reconfigure HA Proxy in the routing domain +reconfig_lb() { +X logger -t cloud "Reconfiguring loadbalancer using $1" +X /root/reconfigLB.sh $1 +X return $? +} +X +# Restore the HA Proxy to its previous state, and revert iptables rules on DomR +restore_lb() { +X logger -t cloud "Restoring HA Proxy to previous state" +X # Copy the old version of haproxy.cfg into the file that reconfigLB.sh uses +X cp /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg.new +X +X if [ $? -eq 0 ] +X then +X # Run reconfigLB.sh again +X /root/reconfigLB.sh /etc/haproxy/haproxy.cfg.new +X fi +} +X +get_vif_list() { +X local vif_list="" +X for i in /sys/class/net/eth*; do +X vif=$(basename $i); +X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] +X then +X vif_list="$vif_list $vif"; +X fi +X done +X if [ "$vif_list" == "" ] +X then +X vif_list="eth0" +X fi +X +X logger -t cloud "Loadbalancer public interfaces = $vif_list" +X echo $vif_list +} +X +mflag= +iflag= +aflag= +dflag= +fflag= +sflag= +X +while getopts 'i:a:d:f:s:' OPTION +do +X case $OPTION in +X i) iflag=1 +X domRIp="$OPTARG" +X ;; +X a) aflag=1 +X addedIps="$OPTARG" +X ;; +X d) dflag=1 +X removedIps="$OPTARG" +X ;; +X f) fflag=1 +X cfgfile="$OPTARG" +X ;; +X s) sflag=1 +X statsIp="$OPTARG" +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [ "$addedIps" == "" ] +then +X addedIps="none" +fi +X +X +if [ "$removedIps" == "" ] +then +X removedIps="none" +fi +X +VIF_LIST=$(get_vif_list) +X +X +if [ "$addedIps" == "" ] +then +X addedIps="none" +fi +X +if [ "$removedIps" == "" ] +then +X removedIps="none" +fi +X +#FIXME: make this explicit via check on vm type or passed in flag +if [ "$VIF_LIST" == "eth0" ] +then +X ip_entry $addedIps $removedIps +fi +X +# hot reconfigure haproxy +reconfig_lb $cfgfile +X +if [ $? -gt 0 ] +then +X logger -t cloud "Reconfiguring loadbalancer failed" +X #FIXME: make this explicit via check on vm type or passed in flag +X if [ "$VIF_LIST" == "eth0" ] +X then +X ip_entry $removedIps $addedIps +X fi +X unlock_exit 1 $lock $locked +fi +X +# iptables entry to ensure that haproxy receives traffic +fw_entry $addedIps $removedIps $statsIp +X +if [ $? -gt 0 ] +then +X logger -t cloud "Failed to apply firewall rules for load balancing, reverting HA Proxy config" +X # Restore the LB +X restore_lb +X +X logger -t cloud "Reverting firewall config" +X # Revert iptables rules on DomR +X fw_restore +X +X #FIXME: make this explicit via check on vm type or passed in flag +X if [ "$VIF_LIST" == "eth0" ] +X then +X logger -t cloud "Reverting ip address changes to eth0" +X ip_entry $removedIps $addedIps +X fi +X +X unlock_exit 1 $lock $locked +else +X # Remove backedup iptable rules +X fw_remove_backup +fi +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/loadbalancer.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/loadbalancer.sh': 'MD5 check failed' + ) << \SHAR_EOF +6da53e4d9dd0b11f6fa334c6f583f8cd cloud_scripts/opt/cloud/bin/loadbalancer.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/loadbalancer.sh'` -ne 8234 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' is not 8234" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/baremetal_snat.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/baremetal_snat.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/baremetal_snat.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' && +#!/bin/bash +X +#Licensed to the Apache Software Foundation (ASF) under one +#or more contributor license agreements. See the NOTICE file +#distributed with this work for additional information +#regarding copyright ownership. The ASF licenses this file +#to you under the Apache License, Version 2.0 (the +#"License"); you may not use this file except in compliance +#with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +#Unless required by applicable law or agreed to in writing, +#software distributed under the License is distributed on an +#"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +#KIND, either express or implied. See the License for the +#specific language governing permissions and limitations +#under the License. +X +set +u +X +mgmt_nic_ip=$1 +internal_server_ip=$2 +gateway_ip=$3 +X +ip route | grep "$internal_server_ip" > /dev/null +X +if [ $? -ne 0 ]; then +X ip route add $internal_server_ip via $gateway_ip +fi +X +iptables-save | grep -- "-A POSTROUTING -d $internal_server_ip" > /dev/null +X +if [ $? -ne 0 ]; then +X iptables -t nat -A POSTROUTING -d $internal_server_ip -j SNAT --to-source $mgmt_nic_ip +fi +X +X +iptables-save | grep -- "-A INPUT -i eth0 -p udp -m udp --dport 69 -j ACCEPT" > /dev/null +if [ $? -ne 0 ]; then +X iptables -I INPUT -i eth0 -p udp -m udp --dport 69 -j ACCEPT +fi +X +iptables-save | grep -- "-A FORWARD -i eth1 -o eth0 -j ACCEPT" > /dev/null +if [ $? -ne 0 ]; then +X iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT +fi +X +rule="-A FORWARD -d $internal_server_ip/32 -i eth0 -o eth1 -j ACCEPT" +iptables-save | grep -- "$rule" > /dev/null +if [ $? -ne 0 ]; then +X iptables -I FORWARD -d $internal_server_ip/32 -i eth0 -o eth1 -j ACCEPT +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/baremetal_snat.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh': 'MD5 check failed' + ) << \SHAR_EOF +acab3e2b25ee898e7dd05c4e77b15569 cloud_scripts/opt/cloud/bin/baremetal_snat.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh'` -ne 1717 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' is not 1717" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_vpnusers.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vpnusers.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vpnusers.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import copy +X +X +def merge(dbag, data): +X dbagc = copy.deepcopy(dbag) +X +X print dbag +X print data +X if "vpn_users" not in data: +X return dbagc +X +X # remove previously deleted user from the dict +X for user in dbagc.keys(): +X if user == 'id': +X continue +X userrec = dbagc[user] +X add = userrec['add'] +X if not add: +X del(dbagc[user]) +X +X for user in data['vpn_users']: +X username = user['user'] +X add = user['add'] +X if username not in dbagc.keys(): +X dbagc[username] = user +X elif username in dbagc.keys() and not add: +X dbagc[username] = user +X +X return dbagc +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_vpnusers.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py': 'MD5 check failed' + ) << \SHAR_EOF +d54ff81fd9901ecc0bfbe9528343e238 cloud_scripts/opt/cloud/bin/cs_vpnusers.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py'` -ne 1469 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' is not 1469" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/merge.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/merge.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/merge.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/merge.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/merge.py' && +#!/usr/bin/python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import json +import os +import uuid +import logging +import gzip +import shutil +import cs_ip +import cs_guestnetwork +import cs_cmdline +import cs_vmp +import cs_network_acl +import cs_firewallrules +import cs_loadbalancer +import cs_monitorservice +import cs_vmdata +import cs_dhcp +import cs_forwardingrules +import cs_site2sitevpn +import cs_remoteaccessvpn +import cs_vpnusers +import cs_staticroutes +X +X +class DataBag: +X +X DPATH = "/etc/cloudstack" +X +X def __init__(self): +X self.bdata = {} +X +X def load(self): +X data = self.bdata +X if not os.path.exists(self.DPATH): +X os.makedirs(self.DPATH) +X self.fpath = os.path.join(self.DPATH, self.key + '.json') +X +X try: +X with open(self.fpath, 'r') as _fh: +X logging.debug("Loading data bag type %s", self.key) +X data = json.load(_fh) +X except (IOError, ValueError): +X logging.debug("Caught load error, creating empty data bag type %s", self.key) +X data.update({"id": self.key}) +X finally: +X self.dbag = data +X +X def save(self, dbag): +X try: +X with open(self.fpath, 'w') as _fh: +X logging.debug("Writing data bag type %s", self.key) +X json.dump( +X dbag, _fh, +X sort_keys=True, +X indent=2 +X ) +X except IOError: +X logging.error("Could not write data bag %s", self.key) +X +X def getDataBag(self): +X return self.dbag +X +X def setKey(self, key): +X self.key = key +X +X +class updateDataBag: +X +X DPATH = "/etc/cloudstack" +X +X def __init__(self, qFile): +X self.qFile = qFile +X self.fpath = '' +X self.bdata = {} +X self.process() +X +X def process(self): +X self.db = DataBag() +X if (self.qFile.type == "staticnatrules" or self.qFile.type == "forwardrules"): +X self.db.setKey("forwardingrules") +X else: +X self.db.setKey(self.qFile.type) +X dbag = self.db.load() +X logging.info("Command of type %s received", self.qFile.type) +X +X if self.qFile.type == 'ips': +X dbag = self.processIP(self.db.getDataBag()) +X elif self.qFile.type == 'guestnetwork': +X dbag = self.processGuestNetwork(self.db.getDataBag()) +X elif self.qFile.type == 'cmdline': +X dbag = self.processCL(self.db.getDataBag()) +X elif self.qFile.type == 'vmpassword': +X dbag = self.processVMpassword(self.db.getDataBag()) +X elif self.qFile.type == 'networkacl': +X dbag = self.process_network_acl(self.db.getDataBag()) +X elif self.qFile.type == 'firewallrules': +X dbag = self.process_firewallrules(self.db.getDataBag()) +X elif self.qFile.type == 'loadbalancer': +X dbag = self.process_loadbalancer(self.db.getDataBag()) +X elif self.qFile.type == 'monitorservice': +X dbag = self.process_monitorservice(self.db.getDataBag()) +X elif self.qFile.type == 'vmdata': +X dbag = self.processVmData(self.db.getDataBag()) +X elif self.qFile.type == 'dhcpentry': +X dbag = self.process_dhcp_entry(self.db.getDataBag()) +X elif self.qFile.type == 'staticnatrules' or self.qFile.type == 'forwardrules': +X dbag = self.processForwardingRules(self.db.getDataBag()) +X elif self.qFile.type == 'site2sitevpn': +X dbag = self.process_site2sitevpn(self.db.getDataBag()) +X elif self.qFile.type == 'remoteaccessvpn': +X dbag = self.process_remoteaccessvpn(self.db.getDataBag()) +X elif self.qFile.type == 'vpnuserlist': +X dbag = self.process_vpnusers(self.db.getDataBag()) +X elif self.qFile.type == 'staticroutes': +X dbag = self.process_staticroutes(self.db.getDataBag()) +X elif self.qFile.type == 'ipaliases': +X self.db.setKey('ips') +X self.db.load() +X dbag = self.process_ipaliases(self.db.getDataBag()) +X elif self.qFile.type == 'dhcpconfig': +X logging.error("I don't think I need %s anymore", self.qFile.type) +X return +X else: +X logging.error("Error I do not know what to do with file of type %s", self.qFile.type) +X return +X self.db.save(dbag) +X +X def processGuestNetwork(self, dbag): +X d = self.qFile.data +X dp = {} +X dp['public_ip'] = d['router_guest_ip'] +X dp['netmask'] = d['router_guest_netmask'] +X dp['source_nat'] = False +X dp['add'] = d['add'] +X dp['one_to_one_nat'] = False +X dp['gateway'] = d['router_guest_gateway'] +X dp['nic_dev_id'] = d['device'][3:] +X dp['nw_type'] = 'guest' +X dp = PrivateGatewayHack.update_network_type_for_privategateway(dbag, dp) +X qf = QueueFile() +X qf.load({'ip_address': [dp], 'type': 'ips'}) +X if 'domain_name' not in d.keys() or d['domain_name'] == '': +X d['domain_name'] = "cloudnine.internal" +X +X d = PrivateGatewayHack.update_network_type_for_privategateway(dbag, d) +X return cs_guestnetwork.merge(dbag, d) +X +X def process_dhcp_entry(self, dbag): +X return cs_dhcp.merge(dbag, self.qFile.data) +X +X def process_site2sitevpn(self, dbag): +X return cs_site2sitevpn.merge(dbag, self.qFile.data) +X +X def process_remoteaccessvpn(self, dbag): +X return cs_remoteaccessvpn.merge(dbag, self.qFile.data) +X +X def process_vpnusers(self, dbag): +X return cs_vpnusers.merge(dbag, self.qFile.data) +X +X def process_network_acl(self, dbag): +X return cs_network_acl.merge(dbag, self.qFile.data) +X +X def process_firewallrules(self, dbag): +X return cs_firewallrules.merge(dbag, self.qFile.data) +X +X def process_loadbalancer(self, dbag): +X return cs_loadbalancer.merge(dbag, self.qFile.data) +X +X def process_monitorservice(self, dbag): +X return cs_monitorservice.merge(dbag, self.qFile.data) +X +X def process_staticroutes(self, dbag): +X return cs_staticroutes.merge(dbag, self.qFile.data) +X +X def processVMpassword(self, dbag): +X return cs_vmp.merge(dbag, self.qFile.data) +X +X def processForwardingRules(self, dbag): +X # to be used by both staticnat and portforwarding +X return cs_forwardingrules.merge(dbag, self.qFile.data) +X +X def processIP(self, dbag): +X for ip in self.qFile.data["ip_address"]: +X dbag = cs_ip.merge(dbag, ip) +X return dbag +X +X def processCL(self, dbag): +X # Convert the ip stuff to an ip object and pass that into cs_ip_merge +X # "eth0ip": "192.168.56.32", +X # "eth0mask": "255.255.255.0", +X self.newData = [] +X if (self.qFile.data['cmd_line']['type'] == "router"): +X self.processCLItem('0', "guest") +X self.processCLItem('1', "control") +X self.processCLItem('2', "public") +X elif (self.qFile.data['cmd_line']['type'] == "vpcrouter"): +X self.processCLItem('0', "control") +X elif (self.qFile.data['cmd_line']['type'] == "dhcpsrvr"): +X self.processCLItem('0', "guest") +X self.processCLItem('1', "control") +X elif (self.qFile.data['cmd_line']['type'] == "ilbvm"): +X self.processCLItem('0', "guest") +X self.processCLItem('1', "control") +X +X return cs_cmdline.merge(dbag, self.qFile.data) +X +X def processCLItem(self, num, nw_type): +X key = 'eth' + num + 'ip' +X dp = {} +X if(key in self.qFile.data['cmd_line']): +X dp['public_ip'] = self.qFile.data['cmd_line'][key] +X dp['netmask'] = self.qFile.data['cmd_line']['eth' + num + 'mask'] +X dp['source_nat'] = False +X dp['add'] = True +X dp['one_to_one_nat'] = False +X if nw_type == "public": +X dp['gateway'] = self.qFile.data['cmd_line']['gateway'] +X else: +X if('localgw' in self.qFile.data['cmd_line']): +X dp['gateway'] = self.qFile.data['cmd_line']['localgw'] +X else: +X dp['gateway'] = '' +X dp['nic_dev_id'] = num +X dp['nw_type'] = nw_type +X qf = QueueFile() +X qf.load({'ip_address': [dp], 'type': 'ips'}) +X +X def processVmData(self, dbag): +X cs_vmdata.merge(dbag, self.qFile.data) +X return dbag +X +X def process_ipaliases(self, dbag): +X nic_dev = None +X # Should be a way to deal with this better +X for intf, data in dbag.items(): +X if intf == 'id': +X continue +X elif any([net['nw_type'] == 'guest' for net in data]): +X nic_dev = intf +X break +X +X assert nic_dev is not None, 'Unable to determine Guest interface' +X +X nic_dev_id = nic_dev[3:] +X +X for alias in self.qFile.data['aliases']: +X ip = { +X 'add': not alias['revoke'], +X 'nw_type': 'guest', +X 'public_ip': alias['ip_address'], +X 'netmask': alias['netmask'], +X 'nic_dev_id': nic_dev_id +X } +X dbag = cs_ip.merge(dbag, ip) +X return dbag +X +X +class QueueFile: +X +X fileName = '' +X configCache = "/var/cache/cloud" +X keep = True +X data = {} +X +X def load(self, data): +X if data is not None: +X self.data = data +X self.type = self.data["type"] +X updateDataBag(self) +X return +X filename = '{cache_location}/{json_file}'.format(cache_location=self.configCache, json_file=self.fileName) +X try: +X handle = open(filename) +X except IOError as exception: +X error_message = ("Exception occurred with the following exception error '{error}'. Could not open '{filename}'. " +X "It seems that the file has already been moved.".format(error=exception, filename=filename)) +X logging.error(error_message) +X else: +X logging.info("Continuing with the processing of file '{filename}'".format(filename=filename)) +X +X self.data = json.load(handle) +X self.type = self.data["type"] +X handle.close() +X if self.keep: +X self.__moveFile(filename, self.configCache + "/processed") +X else: +X logging.debug("Processed file deleted: %s and not kept in /processed", filename) +X os.remove(filename) +X updateDataBag(self) +X +X def setFile(self, name): +X self.fileName = name +X +X def getType(self): +X return self.type +X +X def getData(self): +X return self.data +X +X def setPath(self, path): +X self.configCache = path +X +X def __moveFile(self, origPath, path): +X if not os.path.exists(path): +X os.makedirs(path) +X originalName = os.path.basename(origPath) +X if originalName.count(".") == 1: +X originalName += "." + str(uuid.uuid4()) +X zipped_file_name = path + "/" + originalName + ".gz" +X with open(origPath, 'rb') as f_in, gzip.open(zipped_file_name, 'wb') as f_out: +X shutil.copyfileobj(f_in, f_out) +X os.remove(origPath) +X +X logging.debug("Processed file written to %s", zipped_file_name) +X +X +class PrivateGatewayHack: +X +X @classmethod +X def update_network_type_for_privategateway(cls, dbag, data): +X ip = data['router_guest_ip'] if 'router_guest_ip' in data.keys() else data['public_ip'] +X +X initial_data = cls.load_inital_data() +X has_private_gw_ip = cls.if_config_has_privategateway(initial_data) +X private_gw_matches = 'privategateway' in initial_data['config'] and cls.ip_matches_private_gateway_ip(ip, initial_data['config']['privategateway']) +X +X if has_private_gw_ip and private_gw_matches: +X data['nw_type'] = "public" +X logging.debug("Updating nw_type for ip %s" % ip) +X else: +X logging.debug("Not updating nw_type for ip %s because has_private_gw_ip = %s and private_gw_matches = %s " % (ip, has_private_gw_ip, private_gw_matches)) +X return data +X +X @classmethod +X def if_config_has_privategateway(cls, dbag): +X return 'privategateway' in dbag['config'].keys() and dbag['config']['privategateway'] != "None" +X +X @classmethod +X def ip_matches_private_gateway_ip(cls, ip, private_gateway_ip): +X new_ip_matches_private_gateway_ip = False +X if ip == private_gateway_ip: +X new_ip_matches_private_gateway_ip = True +X return new_ip_matches_private_gateway_ip +X +X @classmethod +X def load_inital_data(cls): +X initial_data_bag = DataBag() +X initial_data_bag.setKey('cmdline') +X initial_data_bag.load() +X initial_data = initial_data_bag.getDataBag() +X logging.debug("Initial data = %s" % initial_data) +X +X return initial_data +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/merge.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/merge.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/merge.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/merge.py': 'MD5 check failed' + ) << \SHAR_EOF +dc7c85d58b4e5f38ae61c82679523884 cloud_scripts/opt/cloud/bin/merge.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/merge.py'` -ne 13492 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/merge.py' is not 13492" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/master.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/master.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/master.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/master.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/master.py +M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2!&875L="(I"BAO<'1I +M;VYS+"!A/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/master.py': 'MD5 check failed' + ) << \SHAR_EOF +602ac6725c182da5ffa17760b2fe3ba5 cloud_scripts/opt/cloud/bin/master.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/master.py'` -ne 2040 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/master.py' is not 2040" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/set_redundant.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/set_redundant.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/set_redundant.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/set_redundant.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/set_redundant.py +M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/set_redundant.py': 'MD5 check failed' + ) << \SHAR_EOF +648b240f11d938ebd185d0e2a75004b8 cloud_scripts/opt/cloud/bin/set_redundant.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/set_redundant.py'` -ne 1663 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/set_redundant.py' is not 1663" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/checks2svpn.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checks2svpn.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/checks2svpn.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +if [ -z $1 ] +then +X echo "Fail to find VPN peer address!" +X exit 1 +fi +X +ipsec status vpn-$1 > /tmp/vpn-$1.status +X +cat /tmp/vpn-$1.status | grep "ESTABLISHED" > /dev/null +ipsecok=$? +if [ $ipsecok -ne 0 ] +then +X echo -n "IPsec SA not found;" +X echo "Site-to-site VPN have not connected" +X exit 11 +fi +echo -n "IPsec SA found;" +echo "Site-to-site VPN have connected" +Xexit 0 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/checks2svpn.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checks2svpn.sh': 'MD5 check failed' + ) << \SHAR_EOF +8aed94140f491ae027b3b55e9b1535bb cloud_scripts/opt/cloud/bin/checks2svpn.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checks2svpn.sh'` -ne 1178 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' is not 1178" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, vpn): +X key = vpn['vpn_server_ip'] +X op = vpn['create'] +X if key in dbag.keys() and not op: +X del(dbag[key]) +X else: +X dbag[key] = vpn +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py': 'MD5 check failed' + ) << \SHAR_EOF +9945565c7eb92c9fd9aa85648f8c4352 cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py'` -ne 994 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' is not 994" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_staticroutes.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_staticroutes.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_staticroutes.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, staticroutes): +X for route in staticroutes['routes']: +X key = route['network'] +X dbag[key] = route +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_staticroutes.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py': 'MD5 check failed' + ) << \SHAR_EOF +c89832deefffed1dcc12b367d9f9062e cloud_scripts/opt/cloud/bin/cs_staticroutes.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py'` -ne 952 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' is not 952" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, vpn): +X key = vpn['peer_gateway_ip'] +X op = vpn['create'] +X if key in dbag.keys() and not op: +X del(dbag[key]) +X else: +X dbag[key] = vpn +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py': 'MD5 check failed' + ) << \SHAR_EOF +37138a9d2b00c0cd0488f03f0b1e1c34 cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py'` -ne 996 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' is not 996" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/passwd_server_ip.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/passwd_server_ip.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/passwd_server_ip.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/passwd_server_ip.py +M(R$O=7-R+V)I;B]E;G8@<'ET:&]N"B,@3&EC96YS960@=&\@=&AE($%P86-H +M92!3;V9T=V%R92!&;W5N9&%T:6]N("A!4T8I('5N9&5R(&]N90HC(&]R(&UO +M2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N5]P87-S=V]R9"<@/')O=71E$EN(",L +M($9O2AO3H*("`@("`@("!W:71H(&9I;&4H9V5T4&%S +M&-E<'0@24]%3H* +M("`@("`@("`@("`@=VET:"!F:6QE*&=E=%!A&-E +M<'0@24]%"<*("`@(&1E9B!D;U]'150H5]P87-S=V]R9"7!E(#T]("=S879E9%]P87-S=V]R9"7-L;VR=215%515-47TU%5$A/1"7!E)UTL"B`@("`@("`@("`@("`@ +M("`@("`@?2D*("`@("`@("!S96QF+G-E;F1?7-L;V6EN9R!T;R!S879E('!A7-L;V6EN9R!T;R!S879E('!A7-L +M;V7-L;V7-L;V7,N87)G=BD@/B`Q +M.@H@("`@("`@(&%D9')E7-L +M;V6)O87)D26YT97)R +M=7!T.@H@("`@("`@('-Y7-L;V&-E<'0@17AC97!T:6]N+"!E.@H@("`@("`@('-Y7-L;V&-E<'1I;VX@)7,@+2T@ +M9&EE9"<@)2!E*0H@("`@("`@('!A/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py': 'MD5 check failed' + ) << \SHAR_EOF +1d63c1d8b2e5a6a48d48d76228964aee cloud_scripts/opt/cloud/bin/passwd_server_ip.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py'` -ne 7020 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py' is not 7020" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_network_acl.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_network_acl.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_network_acl.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_network_acl.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_network_acl.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_network_acl.py': 'MD5 check failed' + ) << \SHAR_EOF +79760ec4739cb68a9a8bf86319a2dd65 cloud_scripts/opt/cloud/bin/cs_network_acl.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_network_acl.py'` -ne 881 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_network_acl.py' is not 881" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cleanup.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cleanup.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cleanup.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cleanup.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cleanup.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +#rm -rf $@ && echo $? +X +zip_file=$1 +if [ -e "$zip_file" ]; +then +X rm -rf "$zip_file" +X echo "Deleting diagnostics zip file $zip_file" +else +X echo "File $zip_file not found in vm " +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cleanup.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cleanup.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cleanup.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cleanup.sh': 'MD5 check failed' + ) << \SHAR_EOF +63ca1758ffda6344d2622a21f5fc15b9 cloud_scripts/opt/cloud/bin/cleanup.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cleanup.sh'` -ne 986 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cleanup.sh' is not 986" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_loadbalancer.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_loadbalancer.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_loadbalancer.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import copy +X +X +def merge(dbag, data): +X """ Simply overwrite the existsing bag as, the whole configuration is sent every time """ +X if "rules" not in data: +X return dbag +X dbag['config'] = data['rules'] +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_loadbalancer.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py': 'MD5 check failed' + ) << \SHAR_EOF +667380d51eaa9aade2317d66a11529aa cloud_scripts/opt/cloud/bin/cs_loadbalancer.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py'` -ne 1016 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' is not 1016" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpc_func.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_func.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_func.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_func.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_func.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# @VERSION@ +X +getEthByIp (){ +X local ip=$1 +X for dev in `ls -1 /sys/class/net | grep eth` +X do +X sudo ip addr show dev $dev | grep $ip\/ > /dev/null +X if [ $? -eq 0 ] +X then +X echo $dev +X return 0 +X fi +X done +X return 1 +} +X +getVPCcidr () { +X CMDLINE=$(cat /var/cache/cloud/cmdline) +X for i in $CMDLINE +X do +X # search for foo=bar pattern and cut out foo +X KEY=$(echo $i | cut -d= -f1) +X VALUE=$(echo $i | cut -d= -f2) +X if [ "$KEY" == "vpccidr" ] +X then +X echo "$VALUE" +X return 0 +X fi +X done +X return 1 +} +X +removeRulesForIp() { +X local ip=$1 +X iptables-save -t mangle | grep $ip | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t mangle $rule +X done +X iptables-save -t nat | grep $ip | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t nat $rule +X done +X iptables-save -t filter | grep $ip | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t filter $rule +X done +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_func.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_func.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_func.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_func.sh': 'MD5 check failed' + ) << \SHAR_EOF +bc1b0432818cc40ea79df6720e16ecad cloud_scripts/opt/cloud/bin/vpc_func.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_func.sh'` -ne 1849 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_func.sh' is not 1849" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsDhcp.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsDhcp.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N'0B"D1(0U!?3U!44R`]("(O971C+V1H8W!O<'1S +M+G1X="(*0TQ/541?0T].1B`]("(O971C+V1N"`](#`*("`@("`@("!L:7-T96Y?861D0H@("`@("`@("`@("!G871E=V%Y(#T@ +M)R<*("`@("`@("`@("`@:68@2`](&E;)V=A=&5W +M87DG70H@("`@("`@("`@("!S;&EN92`](")D:&-P+7)A;F=E/7-E=#II;G1E +M"P@9V%T97=A>2D*("`@("`@("`@("`@96QS93H*("`@ +M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UR86YG93US970Z:6YT97)F86-E +M+25S+25S+"5S+'-T871I8R(@)2`H9&5V:6-E+"!I9'@L(&EP*0H@("`@("`@ +M("`@("!S96QF+F-O;F8N"D*("`@("`@("`@("`@;&EN92`](")D:&-P+6]P +M=&EO;CUT86"P@9VXN9V5T7V1O;6%I;B@I*0H@("`@("`@("`@("!S96QF+F-O;F8N"!F;W(@>"!I;B!G;BYG971?9&YS*"D@:68@>%T*("`@ +M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C +M92TE"P@)RPG+FIO:6XH9&YS7VQI +M2`A/2`G,"XP+C`N,""D*("`@("`@("`@("`@("`@ +M(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C92TE"P@9V%T97=A>2D*("`@("`@("`@("`@("`@('-E +M;&8N8V]N9BYS96%R8V@H"P@;F5T;6%S:RD*("`@("`@("`@("`@"`K/2`Q"@H@("`@("`@(",@ +M3&ES=&5N($%D9')E3H*("`@ +M("`@("`@("`@;&]G9VEN9RYI;F9O*")!='1E;7!T:6YG('1O(&1E;&5T92!E +M;G1R:65S(&9R;VT@9&YS;6%S<2YL96%S97,@9FEL92!F;W(@5DUS('=H:6-H +M(&%R92!N;W0@;VX@9&AC<&AOW!R:6YT("0S?22DZ"B`@("`@("`@5LG:7!V-%]A +M9&1R97-S)UTL(&5N=')Y6R=H;W-T7VYA;64G72D*("`@("`@("`C($QE87-E +M('1I;64@'!U;F=E9"P@:71S(&%C=&EV +M92!L96%S92!A;F0@1$A#4"]$3E,@8V]N9FEG(&ES('!R;W!E2!I2!R=6YN:6YG(&EN('!R;V1U8W1I;VYS +M('-Y5LG:7!V-%]A9&1R +M97-S)UTL"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@ +M("`@("`@("`@("`@("!E;G1R>5LG:&]S=%]N86UE)UTL"B`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!L96%S +M92DI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L)7,B("4@ +M*'1A9RP@,RDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L +M)7,B("4@*'1A9RP@-BDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D +M9"@B)7,L)7,B("4@*'1A9RP@,34I*0H*("`@("`@("!I(#T@25!!9&1R97-S +M*&5N=')Y6R=I<'8T7V%D9')E2==(#T@96YT2=="@H@("`@9&5F(&%D9%]H;W-T*'-E;&8L(&EP+"!H;W-T +M/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py': 'MD5 check failed' + ) << \SHAR_EOF +bcf1831b38d86bf041523540fa8f821e cloud_scripts/opt/cloud/bin/cs/CsDhcp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py'` -ne 8809 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' is not 8809" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsRedundant.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsRedundant.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N7,N2`](%1R=64*"B`@ +M("`@("`@:68@;F]T(&ES1&5V:6-E4F5A9'DZ"B`@("`@("`@("`@(&QO9V=I +M;F5]I9E]N965D960H"B`@("`@("`@("`@("(E&5C("1$045-3TX@+2T@+2UVR(L(")](BP@6PH@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("`@("(@("`@("`@(&%U=&A?='EP92!!2"!< +M;B(L("(@("`@("`@(&%U=&A?<&%S2AC;VYN=')A8VMD7W1E;7!L871E7V-O;F8L(&-O;FYT0H@("`@("`@("(B(@H@("`@("`@(&ET97)A=&EO;G,@ +M/2`Q,`H@("`@("`@('1I;65?8F5T=V5E;B`](#$*"B`@("`@("`@9F]R(&ET +M97(@:6X@3H* +M("`@("`@("`@("`@("`@(',@/2!S;V-K970N2!R=6YN:6YG("@E9#HE2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I<"@I*2YS=&]P*"D* +M"B`@("`@("`@0W-(96QP97(N2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@ +M("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")!9&1I;F<@9V%T97=A>2`]/3X@ +M)7,@=&\@9&5V:6-E(#T]/B`E2P@9&5V*2D*("`@("`@ +M("`@("`@("`@("`@("!I9B!D978@/3T@0W-(96QP97(N4%5"3$E#7TE.5$52 +M1D%#15-;&5C +M=71E*"(E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I +M<"@I*2YR97-T87)T*"D*"B`@("`@("`@0W-(96QP97(N2D*"B`@("`@("`@("`@(",@5&AE(&9I +M2!I;G1E2!V'1E2!E=F5R(&)E(&]N92!A9&1R97-S(&EN +M(&$@5E!#('1H97)E(&-A;B!B92!M86YY"B`@("`@("`@5&AE(&YE=R!C;V1E +M(&%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py': 'MD5 check failed' + ) << \SHAR_EOF +6936e38f53736f7c5a04b255800a242d cloud_scripts/opt/cloud/bin/cs/CsRedundant.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py'` -ne 16789 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' is not 16789" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsHelper.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsHelper.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsHelper.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsHelper.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B +M971H,2)]"@I35$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S +M:"`M8R`@)VEF(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@ +M96QS92!E8VAO(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@ +M(")V<&-R;W5T97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@ +M6R`D,"`]/2!<(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ +M"B`@("`@("`@("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@ +M("`@("`@(&-M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@ +M("`@("`@;&]G9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S +M(B`E('-T871E7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X +M96-U=&4H7!E*"E=(&%N9"!S +M=&%T92`]/2`B34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE +M8W5T92AC;60I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ +M("`@("`@(&5X96-U=&4H8VUD*0H*"F1E9B!I&5C=71E +M*")M;W5N="!T;7!F6XH=F%L*3H*("`@(&EF('9A;#H* +M("`@("`@("!R971U&5C=71E*")I<"!A9&1R('-H;W<@ +M?&=R97`@+78@WT*("`@("`@("`@("`@ +M=&];)VEP)UT@/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A +M;'-;+3%="B`@("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@ +M("(B(@H@("`@9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G +M*")3879I;F<@:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C +M=71E*")S>7-T96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I +M;F7-T96UC=&P@&5C=71E*")K:6QL +M("U(55`@)7,B("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D +M;G-M87-Q(BP@(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py': 'MD5 check failed' + ) << \SHAR_EOF +9bdd1fdfea8177d3e408b2cc87e5d503 cloud_scripts/opt/cloud/bin/cs/CsHelper.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py'` -ne 7644 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' is not 7644" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5NWT*("`@("`@("!S96QF+F=U97-T(#T@5')U90H@("`@("`@ +M(&1B(#T@1&%T84)A9R@I"B`@("`@("`@9&(N7,H*2!A;F0@;&5N*&1B86=;9&5V:6-E +M72D@(3T@,#H*("`@("`@("`@("`@2==*0H*("`@ +M("`@("!I9B`G9&YS)R!I;B!S96QF+F1A=&$Z"B`@("`@("`@("`@(&1N'1E;F0H&-E<'1I;VXN"B`@("`@("`@:68@)W)O +M=71E"!I="!P2X@22!J=7-T(&%D +M9&5D('1H92!I9BP@87,@26%N(&1I9"!I;B!S;VUE(&]T:&5R(&9I;&5S+"!T +M;R!A=F]I9"!T:&4@97AC97!T:6]N+@H@("`@("`@(&EF("=R;W5T97)?9W5E +M2<@:6X@2=="B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py': 'MD5 check failed' + ) << \SHAR_EOF +98c84f4067412f263891f8293f185243 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py'` -ne 2545 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' is not 2545" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsMonitor.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N"!I;B!S96QF+F1B86=;)V-O;F9I9R==+G-P;&ET*"WT*("`@("`@("!H8U]D871A6R)H96%L=&A?8VAE8VMS7V)A&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!S96QF+F1B +M86&-L=61E9%]H96%L=&A?8VAE8VMS(ET@/2!;70H* +M("`@("`@("!I9B`B:&5A;'1H7V-H96-K/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py': 'MD5 check failed' + ) << \SHAR_EOF +d8f5dcf496dbc6d8508e40b906f48245 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py'` -ne 3681 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' is not 3681" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@ +M("`@("!S96QF+FQA2!E>&ES=',Z(')U;&4] +M)7,@=&%B;&4])7,@8VAA:6X])7,B+"!N97=?2`](&-P>2YR97!L86-E*"(M02`E&5C=71E,B@B:7!T86)L97,@+70@)7,@ +M)7,B("4@*&YE=U]R=6QE+F=E=%]T86)L92@I+"!C<'DI*0H@("`@("`@("`@ +M("`@("`@(R!4:&5R92!A"!I;B!T:&4@ +M9G)A;65W;W)K+@H@("`@("`@("`@("`@("`@:68@&5C=71E*")I<'1A8FQE7!E(#T@0W-#;61,:6YE*")C;61L:6YE(BDN9V5T7W1Y<&4H*0H* +M("`@("`@("!T7!E*3H*("`@("`@("`@("`@("`@(&EF(&DNFEP*&)I='-;,#HZ,ETL(&)I='-;,3HZ,ETI*0H@("`@("`@(&EF +M("(M02(@:6X@2!C;W)R96-T(&EP=&%B;&5S(&-O;6UA +M;F0@(B(B"B`@("`@("`@(R!/7,H*3H*("`@("`@("`@("`@("`@('!R:6YT86)L92`] +M(&LN=7)N($9A;'-E"B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py': 'MD5 check failed' + ) << \SHAR_EOF +7456b53eba9f115f9ad344bc1c01611d cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py'` -ne 11100 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' is not 11100" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsRoute.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRoute.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRoute.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import CsHelper +import logging +X +X +class CsRoute: +X +X """ Manage routes """ +X +X def __init__(self): +X self.table_prefix = "Table_" +X +X def get_tablename(self, name): +X return self.table_prefix + name +X +X def add_table(self, devicename): +X tablenumber = 100 + int(devicename[3:]) +X tablename = self.get_tablename(devicename) +X str = "%s %s" % (tablenumber, tablename) +X filename = "/etc/iproute2/rt_tables" +X logging.info("Adding route table: " + str + " to " + filename + " if not present ") +X if not CsHelper.definedinfile(filename, str): +X CsHelper.execute("sudo echo " + str + " >> /etc/iproute2/rt_tables") +X # remove "from all table tablename" if exists, else it will interfer with +X # routing of unintended traffic +X if self.findRule("from all lookup " + tablename): +X CsHelper.execute("sudo ip rule delete from all table " + tablename) +X +X def flush_table(self, tablename): +X CsHelper.execute("ip route flush table %s" % (tablename)) +X CsHelper.execute("ip route flush cache") +X +X def add_route(self, dev, address): +X """ Wrapper method that adds table name and device to route statement """ +X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 +X table = self.get_tablename(dev) +X +X if not table or not address: +X empty_param = "table" if not table else "address" +X logging.info("Empty parameter received %s while trying to add route, skipping" % empty_param) +X else: +X logging.info("Adding route: dev " + dev + " table: " + +X table + " network: " + address + " if not present") +X cmd = "default via %s table %s proto static" % (address, table) +X self.set_route(cmd) +X +X def add_network_route(self, dev, address): +X """ Wrapper method that adds table name and device to route statement """ +X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 +X table = self.get_tablename(dev) +X +X if not table or not address: +X empty_param = "table" if not table else "address" +X logging.info("Empty parameter received %s while trying to add network route, skipping" % empty_param) +X else: +X logging.info("Adding route: dev " + dev + " table: " + +X table + " network: " + address + " if not present") +X cmd = "throw %s table %s proto static" % (address, table) +X self.set_route(cmd) +X +X def set_route(self, cmd, method="add"): +X """ Add a route if it is not already defined """ +X found = False +X search = cmd +X if "throw" in search: +X search = search.replace("throw", "") +X for i in CsHelper.execute("ip route show " + search): +X found = True +X if not found and method == "add": +X logging.info("Add " + cmd) +X cmd = "ip route add " + cmd +X elif found and method == "delete": +X logging.info("Delete " + cmd) +X cmd = "ip route delete " + cmd +X else: +X return +X CsHelper.execute(cmd) +X +X def add_defaultroute(self, gateway): +X """ Add a default route +X :param str gateway +X :return: bool +X """ +X if not gateway: +X raise Exception("Gateway cannot be None.") +X +X if self.defaultroute_exists(): +X return False +X else: +X cmd = "default via " + gateway +X logging.info("Adding default route") +X self.set_route(cmd) +X return True +X +X def defaultroute_exists(self): +X """ Return True if a default route is present +X :return: bool +X """ +X logging.info("Checking if default ipv4 route is present") +X route_found = CsHelper.execute("ip -4 route list 0/0") +X +X if len(route_found) > 0: +X logging.info("Default route found: " + route_found[0]) +X return True +X else: +X logging.warn("No default route found!") +X return False +X +X def findRule(self, rule): +X for i in CsHelper.execute("ip rule show"): +X if rule in i.strip(): +X return True +X return False +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRoute.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py': 'MD5 check failed' + ) << \SHAR_EOF +4f2109aa1d89157e14817f90c676c2d3 cloud_scripts/opt/cloud/bin/cs/CsRoute.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py'` -ne 4989 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' is not 4989" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py +M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2==*0H@("`@("`@("`@ +M("!#&5C=71E*&-O;6UA;F0I"B`@("`@("`@96QS93H*("`@ +M("`@("`@("`@8V]M;6%N9"`](")I<"!R;W5T92!S:&]W('P@9W)E<"`EW!R:6YT("0Q+"`D,WTG(B`E(')O=71E6R=N971W;W)K)UT*("`@ +M("`@("`@("`@2==*0H@("`@("`@("`@("`@ +C("`@0W-(96QP97(N97AE8W5T92AR;W5T95]C;VUM86YD*0H@ +` +end +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py': 'MD5 check failed' + ) << \SHAR_EOF +f9f9db3a4543397153d69a62551a6c8c cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py'` -ne 1655 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' is not 1655" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N7,H*3H* +M("`@("`@("`@("`@"YS<&QI="@G7&XG*5T*"B`@("`@("`@9FEL +M93$N8V]M;6ET*"D*("`@("`@("!F:6QE,B`]($-S1FEL92A(05!23UA97T-/ +M3D9?4"D*("`@("`@("!I9B!N;W0@9FEL93(N8V]M<&%R92AF:6QE,2DZ"B`@ +M("`@("`@("`@($-S2&5L<&5R+F-O<'DH2$%04D]865]#3TY&7U0L($A!4%)/ +M6%E?0T].1E]0*0H*("`@("`@("`@("`@<')O8R`]($-S4')O8V5S2YP:60G72D*("`@("`@("`@("`@:68@;F]T('!R;V,N9FEN +M9"@I.@H@("`@("`@("`@("`@("`@;&]G9VEN9RYD96)U9R@B0W-,;V%D0F%L +M86YC97(Z.B!W:6QL(')E2$B*0H@("`@("`@("`@("`@ +M("`@0W-(96QP97(N2(L(")R97-T87)T(BD*("`@ +M("`@("`@("`@96QS93H*("`@("`@("`@("`@("`@(&QO9V=I;F2$B*0H@("`@ +M("`@("`@("`@("`@0W-(96QP97(N2(L(")R96QO +M860B*0H*("`@("`@("!A9&1?/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py': 'MD5 check failed' + ) << \SHAR_EOF +8f93571ff9b8f21c947e90193c3efa38 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py'` -ne 3393 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' is not 3393" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsApp.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsApp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsApp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsApp.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G +M871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG971?='EP92@I"B`@ +M("`@("`@5]I9E]N965D +M960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L"B`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE,B]S:71E2DI"B`@("`@("`@ +M("`@(&9I;&4N&5C=71E,B@B/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsApp.py': 'MD5 check failed' + ) << \SHAR_EOF +fa071a9d58a918b6a9d5e09ae10e3e11 cloud_scripts/opt/cloud/bin/cs/CsApp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsApp.py'` -ne 4159 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' is not 4159" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsFile.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsFile.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsFile.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import logging +import re +import copy +X +X +class CsFile: +X """ File editors """ +X +X def __init__(self, filename): +X self.filename = filename +X self.load() +X +X def load(self): +X self.new_config = [] +X self.config = [] +X try: +X for line in open(self.filename): +X self.new_config.append(line) +X except IOError: +X logging.debug("File %s does not exist" % self.filename) +X else: +X logging.debug("Reading file %s" % self.filename) +X self.config = list(self.new_config) +X +X def is_changed(self): +X if set(self.config) != set(self.new_config): +X return True +X else: +X return False +X +X def __len__(self): +X return len(self.config) +X +X def empty(self): +X self.config = [] +X self.new_config = [] +X +X def repopulate(self): +X self.new_config = [] +X +X def commit(self): +X if not self.is_changed(): +X logging.info("Nothing to commit. The %s file did not change" % self.filename) +X return False +X handle = open(self.filename, "w+") +X for line in self.new_config: +X handle.write(line) +X handle.close() +X logging.info("Wrote edited file %s" % self.filename) +X self.config = list(self.new_config) +X logging.info("Updated file in-cache configuration") +X return True +X +X def dump(self): +X for line in self.new_config: +X print line +X +X def addeq(self, string): +X """ Update a line in a file of the form token=something +X match on token= and replace something if needed +X Add line if token is not present +X """ +X token = string.split('=')[0] + '=' +X self.search(token, string) +X +X def append(self, string, where=-1): +X if where == -1: +X self.new_config.append("%s\n" % string) +X else: +X self.new_config.insert(where, "%s\n" % string) +X +X def add(self, string, where=-1): +X for index, line in enumerate(self.new_config): +X if line.strip() == string: +X return False +X if where == -1: +X self.new_config.append("%s\n" % string) +X else: +X self.new_config.insert(where, "%s\n" % string) +X return True +X +X def section(self, start, end, content): +X sind = -1 +X eind = -1 +X found = False +X for index, line in enumerate(self.new_config): +X if found and line.strip() == end: +X eind = index +X found = False +X if line.strip() == start: +X sind = index + 1 +X found = True +X if sind == -1: +X content.insert(0, start + "\n") +X content.append(end + "\n") +X self.new_config[sind:eind] = content +X +X def greplace(self, search, replace): +X logging.debug("Searching for %s and replacing with %s" % (search, replace)) +X self.new_config = [w.replace(search, replace) for w in self.new_config] +X +X def replaceIfFound(self, search, replace): +X found = False +X replace_filtered = replace +X if re.search("PSK \"", replace): +X replace_filtered = re.sub(r'".*"', '"****"', replace) +X logging.debug("Searching for %s and replacing with %s if found" % (search, replace_filtered)) +X for index, line in enumerate(self.new_config): +X if line.lstrip().startswith("#"): +X continue +X if re.search(search, line): +X if replace not in line: +X self.new_config[index] = replace + "\n" +X return False +X +X def search(self, search, replace): +X found = False +X replace_filtered = replace +X if re.search("PSK \"", replace): +X replace_filtered = re.sub(r'".*"', '"****"', replace) +X logging.debug("Searching for %s and replacing with %s" % (search, replace_filtered)) +X for index, line in enumerate(self.new_config): +X if line.lstrip().startswith("#"): +X continue +X if re.search(search, line): +X found = True +X if replace not in line: +X self.new_config[index] = replace + "\n" +X if not found: +X self.new_config.append(replace + "\n") +X return True +X return False +X +X def searchString(self, search, ignoreLinesStartWith): +X found = False +X logging.debug("Searching for %s string " % search) +X +X for index, line in enumerate(self.new_config): +X print ' line = ' + line +X if line.lstrip().startswith(ignoreLinesStartWith): +X continue +X if search in line: +X found = True +X break +X +X return found +X +X def deleteLine(self, search): +X found = False +X logging.debug("Searching for %s to remove the line " % search) +X temp_config = [] +X for index, line in enumerate(self.new_config): +X if line.lstrip().startswith("#"): +X continue +X if search not in line: +X temp_config.append(line) +X +X self.new_config = list(temp_config) +X +X def compare(self, o): +X result = (isinstance(o, self.__class__) and set(self.config) == set(o.config)) +X logging.debug("Comparison of CsFiles content is ==> %s" % result) +X return result +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsFile.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsFile.py': 'MD5 check failed' + ) << \SHAR_EOF +81531ddee205a5eb66bb44f400ab222c cloud_scripts/opt/cloud/bin/cs/CsFile.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsFile.py'` -ne 6133 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' is not 6133" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/__init__.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/__init__.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/__init__.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/__init__.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/__init__.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/__init__.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/__init__.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/__init__.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/__init__.py': 'MD5 check failed' + ) << \SHAR_EOF +33215d440d5ba5fa95b1ffa035d769e2 cloud_scripts/opt/cloud/bin/cs/__init__.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/__init__.py'` -ne 785 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/__init__.py' is not 785" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsAddress.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsAddress.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsAddress.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsAddress.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N`H@("`@("`@("`@("`@("`@("`@ +M(&=U97-T7VEN=&5R9F%C92`](&EN=&5R9F%C90H@("`@("`@("`@("`@("`@ +M("`@(&QO9V=I;F2!C;VYF:6=U2AS96QF*3H*("`@("`@("!I +M9B!S96QF+F-O;F9I9RYI2(I +M"B`@("`@("`@96QS93H*("`@("`@("`@("`@2@I+"!S96QF+F=E=%]S +M:7IE*"DI"@H@("`@9&5F(&=E=%]S:7IE*'-E;&8I.@H@("`@("`@("(B(B!2 +M971U7!E +M(B!I;B!S96QF+F%D9')E"@Q,#`@*R!I;G0H9&5V6S,Z72DI +M"B`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@("`@97AC97!T($5X8V5P=&EO;B!A +M&-E<'1I;VX@ +M;V-C=7)R960@/3T^("5S(B`E(&4I"@H@("`@("`@("`@("!S96QF+G!O7!E*"D@:6X@6R)C;VYT7!E*"D@:6X@ +M6R=P=6)L:6,G73H*("`@("`@("`@("`@("`@('-E;&8N7!E*"E=.@H@("`@("`@ +M("`@("`@("`@9V%T97=A>2`]('-T2@I*3H* +M("`@("`@("`@("`@("`@(')O=71E+F%D9%]D969A=6QT2@I*0H*("`@(&1E9B!S971?;6%R:RAS96QF*3H*("`@ +M("`@("!C;60@/2`B+4$@4%)%4D]55$E.1R`M:2`E7!E(&]F('1H92!)4`H@("`@("`@(&=U97-T"B`@("`@("`@8V]N +M=')O;`H@("`@("`@('!U8FQI8PH@("`@("`@("(B(@H@("`@("`@(&EF(")N +M=U]T>7!E(B!I;B!S96QF+F%D9')E&9F9F9F9F9F +M("TM8W1M87-K(#!X9F9F9F9F9F8B72D*"B`@("`@("`@&UA7!E*"D@:6X@6R)G=65S=")=.@H@("`@("`@("`@("!G=65S +M=$YE='=O&9F9F9F9F9F(ETI"B`@ +M("`@("`@("`@(&=U97-T3F5T=V]R:T-I9'(@/2!S96QF+F%D9')E#4R-2\P>&9F9F9F9F9F(B`E +M("AS96QF+F1E=BP@2)=("$](").;VYE(CH* +M("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@("`@("`@:68@ +M(FYE='=O7!E*"D@:6X@6R)P=6)L:6,B +M72!A;F0@(F=A=&5W87DB(&EN('-E;&8N861D2)=("$] +M(").;VYE(CH*("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@ +M("`@("`@("`@(&9O7!E(B!I;B!A9&1R97-S(&%N9"!A +M9&1R97-S6R)N=U]T>7!E(ET@/3T@(F=U97-T(CH*("`@("`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("!R;W5T92YA9&1?;F5T=V]R:U]R;W5T92AS96QF +M+F1E=BP@&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A8VAE(BD*"B`@("`@("`@ +M96QI9B!M971H;V0@/3T@(F1E;&5T92(Z"B`@("`@("`@("`@(",@=')E870@ +M=&AE(&QA&5C=71E*")S=61O(&EP(')U;&4@9&5L971E('1A8FQE("(@*R!T86)L94YA +M;64I"B`@("`@("`@("`@("`@("!#&5C=71E*")S=61O(&EP +M(')O=71E(&9L=7-H('1A8FQE("(@*R!T86)L94YA;64I"B`@("`@("`@("`@ +M("`@("!#&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A +M8VAE(BD*("`@("`@("`@("`@("`@($-S4G5L92AS96QF+F1E=BDN9&5L36%R +M:R@I"@H@("`@("`@('-E;&8N9G=?7!E('=I;&P@ +M;F\@;&]N9V5R(&)E(&MN;W=N"B`@("`@("`@:68@7!E*"D@/3T@(G!U8FQI8R(@86YD('-E;&8N8V]N9FEG+FES7W9P8R@I +M(&%N9"!M971H;V0@/3T@(F%D9"(Z"B`@("`@("`@("`@(&EF('-E;&8N861D +M7,H*3H*("`@("`@("`@ +M("`@7!E)UT@:6X@5E)2 +M4%]465!%4SH*("`@("`@("`@("`@7!E(B!I;B!S96QF+F%D9')E&5C=71E,BAC;60L($9A +M;'-E*0H*("`@(",@1&5L971E(&%N>2!I<',@=&AA="!A7,H*2!O2AS96QF+"!B862!F;W(@ +M7,O8VQA"TP+W)P&-E<'0@24]%/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py': 'MD5 check failed' + ) << \SHAR_EOF +5cebbbd106abd3eba7ee0e4d23277dda cloud_scripts/opt/cloud/bin/cs/CsAddress.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py'` -ne 29236 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' is not 29236" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsProcess.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsProcess.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsProcess.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import os +import re +import CsHelper +import logging +X +X +class CsProcess(object): +X """ Manipulate processes """ +X +X def __init__(self, search): +X self.search = search +X +X def start(self, thru, background=''): +X # if(background): +X # cmd = cmd + " &" +X logging.info("Started %s", " ".join(self.search)) +X os.system("%s %s %s" % (thru, " ".join(self.search), background)) +X +X def kill_all(self): +X pids = self.find_pid() +X for p in pids: +X CsHelper.execute("kill -9 %s" % p) +X +X def find_pid(self): +X self.pid = [] +X for i in CsHelper.execute("ps aux"): +X items = len(self.search) +X proc = re.split(r"\s+", i)[items*-1:] +X matches = len([m for m in proc if m in self.search]) +X if matches == items: +X self.pid.append(re.split(r"\s+", i)[1]) +X +X logging.debug("CsProcess:: Searching for process ==> %s and found PIDs ==> %s", self.search, self.pid) +X return self.pid +X +X def find(self): +X has_pid = len(self.find_pid()) > 0 +X return has_pid +X +X def kill(self, pid): +X if pid > 1: +X CsHelper.execute("kill -9 %s" % pid) +X +X def grep(self, str): +X for i in CsHelper.execute("ps aux"): +X if i.find(str) != -1: +X return re.split(r"\s+", i)[1] +X return -1 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsProcess.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py': 'MD5 check failed' + ) << \SHAR_EOF +75a4650fe1e521049e80d32a022d8689 cloud_scripts/opt/cloud/bin/cs/CsProcess.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py'` -ne 2156 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' is not 2156" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsConfig.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsConfig.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsConfig.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsConfig.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N7!E*"D@/3T@)W9P8W)O=71E'1D;G,H'1D;G,G+"`G9F%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py': 'MD5 check failed' + ) << \SHAR_EOF +836541a5b9cb1b2f9df5dad6bb806745 cloud_scripts/opt/cloud/bin/cs/CsConfig.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py'` -ne 3179 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' is not 3179" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsDatabag.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@("`@ +M("!S96QF+F1B(#T@1&%T84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF +M+F1B+G-A=F4HWT*("`@("`@("!R971U&1I9V5S="@I"@H@("`@ +M9&5F(&=E=%]G871E=V%Y*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I +M;B!S96QF+FED871A*"DZ"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A +M*"E;)V=A=&5W87DG70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G +M971?=7-E7V5X=%]D;G,H'1D;G,G70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E +M9B!G971?861V97)T7VEN="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN +M="<@:6X@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py': 'MD5 check failed' + ) << \SHAR_EOF +9e4de6e0a115a5e806e80dc151769b21 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py'` -ne 4808 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' is not 4808" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsRule.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRule.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRule.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import CsHelper +import logging +X +X +class CsRule: +X """ Manage iprules +X Supported Types: +X fwmark +X """ +X +X def __init__(self, dev): +X self.dev = dev +X self.tableNo = 100 + int(dev[3:]) +X self.table = "Table_%s" % (dev) +X +X def addRule(self, rule): +X if not self.findRule(rule + " lookup " + self.table): +X cmd = "ip rule add " + rule + " table " + self.table +X CsHelper.execute(cmd) +X logging.info("Added rule %s for %s" % (cmd, self.table)) +X +X def findRule(self, rule): +X for i in CsHelper.execute("ip rule show"): +X if rule in i.strip(): +X return True +X return False +X +X def addMark(self): +X if not self.findMark(): +X cmd = "ip rule add fwmark %s table %s" % (self.tableNo, self.table) +X CsHelper.execute(cmd) +X logging.info("Added fwmark rule for %s" % (self.table)) +X +X def delMark(self): +X if self.findMark(): +X cmd = "ip rule delete fwmark %s table %s" % (self.tableNo, self.table) +X CsHelper.execute(cmd) +X logging.info("Deleting fwmark rule for %s" % (self.table)) +X +X def findMark(self): +X srch = "from all fwmark %s lookup %s" % (hex(self.tableNo), self.table) +X for i in CsHelper.execute("ip rule show"): +X if srch in i.strip(): +X return True +X return False +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRule.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRule.py': 'MD5 check failed' + ) << \SHAR_EOF +78748432f1ac57194339aef8bdb7c9f8 cloud_scripts/opt/cloud/bin/cs/CsRule.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRule.py'` -ne 2192 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' is not 2192" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vmdata.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vmdata.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vmdata.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vmdata.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/vmdata.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&ET*#(I +M"@H@("`@9F]R(&EP(&EN(&IS;VY?9&%T83H*("`@("`@("!F;W(@:71E;2!I +M;B!J2!V86QI9"!D +M871A"B`@("`@("`@("`@(&EF(&9O;&1E&ES=',H;65T +M86UA;FEF97-T*3H*("`@("`@("!O2Q!;&QO=UQN1&5N +M>2!F&-E<'0@3U-%2!E>&ES=',L('=E(&1O(&ET('1H:7,@=V%Y(&9O +M7,N97AI="@Q*0H*("`@(&9H(#T@;W!E;BAH +M=&%C8V5S2`K("=<;B&9L;V-K*&9I;&4I.@H@("`@=')Y.@H@("`@("`@(&9L;V-K +M*&9I;&4L($Q/0TM?15@I"B`@("!E>&-E<'0@24]%7,N97AI="@Q +M*0H@("`@3H*("`@("`@("!F;&]C:RAF:6QE+"!,3T-+7U5.*0H@("`@97AC97!T($E/ +M17)R;W(@87,@93H*("`@("`@("!P7,N97AI="@Q*0H@("`@7,N87)G=ELQ.ETI"FYA +` +end +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vmdata.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vmdata.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vmdata.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vmdata.py': 'MD5 check failed' + ) << \SHAR_EOF +f585277ddefb989a0662db609bc199c7 cloud_scripts/opt/cloud/bin/vmdata.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vmdata.py'` -ne 4723 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vmdata.py' is not 4723" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/get_diagnostics_files.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/get_diagnostics_files.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/get_diagnostics_files.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' && +#!/usr/bin/env python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import logging +import os +import re +import shlex +import subprocess as sp +import sys +import time +import zipfile +X +X +# Create zip archive and append files for retrieval +def zip_files(files): +X fList = files +X compression = zipfile.ZIP_DEFLATED +X time_str = time.strftime("%Y%m%d-%H%M%S") +X zf_name = '/root/diagnostics_files_' + time_str + '.zip' +X zf = zipfile.ZipFile(zf_name, 'w', compression) +X +X ''' +X Initialize 3 empty arrays to collect found files, non-existent files +X and last one to collect temp files to be cleaned up when script exits +X ''' +X files_found_list = [] +X files_not_found_list = [] +X files_from_shell_commands = [] +X +X try: +X for f in fList: +X f = f.strip() +X +X if f in ('iptables', 'ipaddr', 'iprule', 'iproute'): +X f = execute_shell_script(f) +X files_from_shell_commands.append(f) +X +X if len(f) > 3 and f.startswith('[') and f.endswith(']'): +X f = execute_shell_script(f[1:-1]) +X files_from_shell_commands.append(f) +X +X if os.path.isfile(f): +X try: +X zf.write(f, f[f.rfind('/') + 1:]) +X except OSError or RuntimeError as e: +X files_not_found_list.append(f) +X else: +X files_found_list.append(f) +X finally: +X cleanup(files_from_shell_commands) +X generate_retrieved_files_txt(zf, files_found_list, files_not_found_list) +X zf.close() +X print zf_name +X +X +def get_cmd(script): +X if script is None or len(script) == 0: +X return None +X +X cmd = None +X if script == 'iptables': +X cmd = 'iptables-save' +X elif script == 'ipaddr': +X cmd = 'ip address' +X elif script == 'iprule': +X cmd = 'ip rule list' +X elif script == 'iproute': +X cmd = 'ip route show table all' +X else: +X cmd = '/opt/cloud/bin/' + script +X if not os.path.isfile(cmd.split(' ')[0]): +X cmd = None +X +X return cmd +X +X +def execute_shell_script(script): +X script = script.strip() +X outputfile = script + '.log' +X +X with open(outputfile, 'wb', 0) as f: +X try: +X cmd = get_cmd(script) +X if cmd is None: +X f.write('Unable to generate command for ' + script + ', perhaps missing file') +X else: +X p = sp.Popen(cmd, shell=True, stdout=sp.PIPE, stderr=sp.PIPE) +X stdout, stderr = p.communicate() +X return_code = p.returncode +X if return_code is 0: +X f.write(stdout) +X else: +X f.write(stderr) +X except OSError as ex: +X delete_tmp_file_cmd = 'rm -f %s' % outputfile +X sp.check_call(shlex.split(delete_tmp_file_cmd)) +X finally: +X f.close() +X return outputfile +X +X +def cleanup(file_list): +X files = ' '.join(file_list) +X cmd = 'rm -f %s' % files +X try: +X p = sp.Popen(shlex.split(cmd), stderr=sp.PIPE, stdout=sp.PIPE) +X p.communicate() +X except OSError as e: +X logging.debug("Failed to execute bash command") +X +X +def generate_retrieved_files_txt(zip_file, files_found, files_not_found): +X output_file = 'fileinfo.txt' +X try: +X with open(output_file, 'wb', 0) as man: +X for i in files_found: +X man.write(i + '\n') +X for j in files_not_found: +X man.write(j + 'File Not Found!!\n') +X zip_file.write(output_file, output_file) +X finally: +X cleanup_cmd = "rm -f %s" % output_file +X sp.check_call(shlex.split(cleanup_cmd)) +X +X +if __name__ == '__main__': +X fileList = sys.argv[1:] +X zip_files(fileList) +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/get_diagnostics_files.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py': 'MD5 check failed' + ) << \SHAR_EOF +f8b91c14af848f14696aa2c1193b0907 cloud_scripts/opt/cloud/bin/get_diagnostics_files.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py'` -ne 4478 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' is not 4478" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/checkrouter.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checkrouter.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checkrouter.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/checkrouter.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checkrouter.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +STATUS=UNKNOWN +X +if [ "$(systemctl is-active keepalived)" != "active" ] +then +X echo "Status: FAULT" +X exit +fi +X +ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g') +if [ "$ROUTER_TYPE" = "router" ] +then +X ROUTER_STATE=$(ip addr show dev eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi') +X STATUS=$ROUTER_STATE +else +X ROUTER_STATE=$(ip addr show dev eth1 | grep state | awk '{print $9;}') +X if [ "$ROUTER_STATE" = "UP" ] +X then +X STATUS=MASTER +X elif [ "$ROUTER_STATE" = "DOWN" ] +X then +X STATUS=BACKUP +X fi +fi +X +echo "Status: ${STATUS}" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checkrouter.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/checkrouter.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/checkrouter.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checkrouter.sh': 'MD5 check failed' + ) << \SHAR_EOF +b107b37bc85a7036ef9f4e81cf4ae8b2 cloud_scripts/opt/cloud/bin/checkrouter.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checkrouter.sh'` -ne 1445 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checkrouter.sh' is not 1445" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/ilb.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ilb.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ilb.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/ilb.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/ilb.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s: -a -d -f -s \n" $(basename $0) >&2 +} +X +#set -x +X +fw_remove_backup() { +X logger -t cloud "$(basename $0): Entering fw_remove_backup" +X local lb_vif_list=eth0 +X for vif in $lb_vif_list; do +X sudo iptables -F back_load_balancer_$vif 2> /dev/null +X sudo iptables -D INPUT -i $vif -p tcp -j back_load_balancer_$vif 2> /dev/null +X sudo iptables -X back_load_balancer_$vif 2> /dev/null +X done +X sudo iptables -F back_lb_stats 2> /dev/null +X sudo iptables -D INPUT -p tcp -j back_lb_stats 2> /dev/null +X sudo iptables -X back_lb_stats 2> /dev/null +} +X +fw_restore() { +X logger -t cloud "$(basename $0): Entering fw_restore" +X local lb_vif_list="eth0" +X for vif in $lb_vif_list; do +X sudo iptables -F load_balancer_$vif 2> /dev/null +X sudo iptables -D INPUT -i $vif -p tcp -j load_balancer_$vif 2> /dev/null +X sudo iptables -X load_balancer_$vif 2> /dev/null +X sudo iptables -E back_load_balancer_$vif load_balancer_$vif 2> /dev/null +X done +X sudo iptables -F lb_stats 2> /dev/null +X sudo iptables -D INPUT -p tcp -j lb_stats 2> /dev/null +X sudo iptables -X lb_stats 2> /dev/null +X sudo iptables -E back_lb_stats lb_stats 2> /dev/null +} +X +# firewall entry to ensure that haproxy can receive on specified port +fw_entry() { +X logger -t cloud "$(basename $0): Entering fw_entry" +X local added=$1 +X local removed=$2 +X local stats=$3 +X +X if [ "$added" == "none" ] +X then +X added="" +X fi +X +X if [ "$removed" == "none" ] +X then +X removed="" +X fi +X +X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") +X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") +X +# back up the iptable rules by renaming before creating new. +X local lb_vif_list=eth0 +X for vif in $lb_vif_list; do +X sudo iptables -E load_balancer_$vif back_load_balancer_$vif 2> /dev/null +X sudo iptables -N load_balancer_$vif 2> /dev/null +X sudo iptables -A INPUT -i $vif -p tcp -j load_balancer_$vif +X done +X sudo iptables -E lb_stats back_lb_stats 2> /dev/null +X sudo iptables -N lb_stats 2> /dev/null +X sudo iptables -A INPUT -p tcp -j lb_stats +X +X for i in $a +X do +X local pubIp=$(echo $i | cut -d: -f1) +X local dport=$(echo $i | cut -d: -f2) +X local lb_vif_list="eth0" +X for vif in $lb_vif_list; do +X sudo iptables -A load_balancer_$vif -p tcp -d $pubIp --dport $dport -j ACCEPT +X if [ $? -gt 0 ] +X then +X return 1 +X fi +X done +X done +X local pubIp=$(echo $stats | cut -d: -f1) +X local dport=$(echo $stats | cut -d: -f2) +X local cidrs=$(echo $stats | cut -d: -f3 | sed 's/-/,/') +X sudo iptables -A lb_stats -s $cidrs -p tcp -m state --state NEW -d $pubIp --dport $dport -j ACCEPT +X +X return 0 +} +X +#Hot reconfigure HA Proxy in the routing domain +reconfig_lb() { +X logger -t cloud "Reconfiguring ilb using $1" +X /root/reconfigLB.sh $1 +X return $? +} +X +# Restore the HA Proxy to its previous state, and revert iptables rules on loadbalancer +restore_lb() { +X logger -t cloud "Restoring HA Proxy to previous state" +X # Copy the old version of haproxy.cfg into the file that reconfigLB.sh uses +X cp /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg.new +X +X if [ $? -eq 0 ] +X then +X # Run reconfigLB.sh again +X /root/reconfigLB.sh /etc/haproxy/haproxy.cfg.new +X fi +} +X +X +logger -t cloud "$(basename $0): Entering $(dirname $0)/$(basename $0)" +X +iflag= +aflag= +dflag= +fflag= +sflag= +X +while getopts 'i:a:d:f:s:' OPTION +do +X case $OPTION in +X i) iflag=1 +X domRIp="$OPTARG" #unused but passed in +X ;; +X a) aflag=1 +X addedIps="$OPTARG" +X ;; +X d) dflag=1 +X removedIps="$OPTARG" +X ;; +X f) fflag=1 +X cfgfile="$OPTARG" +X ;; +X s) sflag=1 +X statsIp="$OPTARG" +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [[ "$aflag$dflag" != "1" && "$aflag$dflag" != "11" ]] +then +X usage +X unlock_exit 2 $lock $locked +fi +X +if [ "$addedIps" == "" ] +then +X addedIps="none" +fi +X +X +if [ "$removedIps" == "" ] +then +X removedIps="none" +fi +X +X +# hot reconfigure haproxy +reconfig_lb $cfgfile +X +if [ $? -gt 0 ] +then +X logger -t cloud "Reconfiguring ilb failed" +X unlock_exit 1 $lock $locked +fi +X +logger -t cloud "HAProxy reconfigured successfully, configuring firewall" +X +# iptables entry to ensure that haproxy receives traffic +fw_entry $addedIps $removedIps $statsIp +X +if [ $? -gt 0 ] +then +X logger -t cloud "Failed to apply firewall rules for internal load balancing, reverting HA Proxy config" +X # Restore the LB +X restore_lb +X +X logger -t cloud "Reverting firewall config" +X fw_restore +X +X unlock_exit 1 $lock $locked +else +X # Remove backedup iptable rules +X logger -t cloud "Firewall configured successfully, deleting backup firewall config" +X fw_remove_backup +fi +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/ilb.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/ilb.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/ilb.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ilb.sh': 'MD5 check failed' + ) << \SHAR_EOF +8b7374975ee7d7a5d73da78b60bd508c cloud_scripts/opt/cloud/bin/ilb.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ilb.sh'` -ne 5644 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ilb.sh' is not 5644" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +for i in $* +do +X info=`/opt/cloud/bin/checks2svpn.sh $i` +X ret=$? +X batchInfo+="$i:$ret:$info&" +done +echo -n $batchInfo +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh': 'MD5 check failed' + ) << \SHAR_EOF +36a25911b669737ea678011f72a6f3f9 cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh'` -ne 924 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' is not 924" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/savepassword.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/savepassword.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/savepassword.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/savepassword.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/savepassword.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# Usage +# save_password -v -p +X +while getopts 'v:p:' OPTION +do +X case $OPTION in +X v) VM_IP="$OPTARG" +X ;; +X p) PASSWORD="$OPTARG" +X ;; +X ?) echo "Incorrect usage" +X ;; +X esac +done +TOKEN_FILE="/tmp/passwdsrvrtoken" +TOKEN="" +if [ -f $TOKEN_FILE ]; then +X TOKEN=$(cat $TOKEN_FILE) +fi +ps aux | grep passwd_server_ip.py |grep -v grep 2>&1 > /dev/null +if [ $? -eq 0 ] +then +X ips=$(ip addr show | grep inet | awk '{print $2}') +X for ip in $ips; do +X server_ip=$(echo $ip | awk -F'/' '{print $1}') +X curl --header "DomU_Request: save_password" "http://$server_ip:8080/" -F "ip=$VM_IP" -F "password=$PASSWORD" -F "token=$TOKEN" >/dev/null 2>/dev/null & +X done +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/savepassword.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/savepassword.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/savepassword.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/savepassword.sh': 'MD5 check failed' + ) << \SHAR_EOF +edebd2c25984e1ed00b36e4f8d360a63 cloud_scripts/opt/cloud/bin/savepassword.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/savepassword.sh'` -ne 1525 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/savepassword.sh' is not 1525" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cloud-nic.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cloud-nic.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cloud-nic.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +plug_nic() { +X sudo echo "$tableNo $tableName" >> /etc/iproute2/rt_tables 2>/dev/null +X sudo ip rule add fwmark $tableNo table $tableName 2>/dev/null +X sudo ip route flush table $tableName +X sudo ip route flush cache +} +X +X +unplug_nic() { +X sudo iptables -t mangle -D PREROUTING -i $dev -m state --state NEW -j CONNMARK --set-mark $tableNo 2>/dev/null +X +X sudo ip rule del fwmark $tableNo 2>/dev/null +X sudo ip route flush table $tableName +X sudo sed -i /"$tableNo $tableName"/d /etc/iproute2/rt_tables 2>/dev/null +X sudo ip route flush cache +X # remove network usage rules +X sudo iptables -F NETWORK_STATS_$dev 2>/dev/null +X iptables-save | grep NETWORK_STATS_$dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables $rule +X done +X sudo iptables -X NETWORK_STATS_$dev 2>/dev/null +X # remove vpn network usage rules +X sudo iptables -t mangle -F VPN_STATS_$dev 2>/dev/null +X iptables-save -t mangle | grep VPN_STATS_$dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t mangle $rule +X done +X sudo iptables -t mangle -X VPN_STATS_$dev 2>/dev/null +X # remove rules on this dev +X iptables-save -t mangle | grep $dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t mangle $rule +X done +X iptables-save -t nat | grep $dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t nat $rule +X done +X iptables-save | grep $dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables $rule +X done +X # remove apache config for this eth +X rm -f /etc/apache2/conf.d/vhost$dev.conf +} +X +action=$1 +dev=$2 +tableNo=$((100+${dev:3})) +tableName="Table_$dev" +X +if [ $action == 'add' ] +then +X plug_nic +else +X unplug_nic +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cloud-nic.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cloud-nic.sh': 'MD5 check failed' + ) << \SHAR_EOF +6afed00cefb1dc06b8b4969c2c26933e cloud_scripts/opt/cloud/bin/cloud-nic.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cloud-nic.sh'` -ne 2632 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' is not 2632" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/ipsectunnel.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ipsectunnel.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/ipsectunnel.sh (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/ipsectunnel.sh +M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N#4R-2(*=G!N:6YM87)K/2(P>#4R-"(*"G5S86=E*"D@ +M>PH@("`@<')I;G1F(")5PH@('-U9&\@:7!T86)L +M97,MPH@(&1I2!<"B`@("!P +M:&%S93(@<&]L:6-Y/21ER1R:6=H=&YE='-] +M(B`^/B`D=G!N8V]N9F9I;&4@)B8*("!S=61O(&5C:&\@(B`@='EP93UT=6YN +M96PB(#X^("1V<&YC;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!A=71H8GD] +MVEK96QI9F5T:6UE?7,B(#X^("1V<&YC +M;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!E2(@/CX@ +M)'9P;F-O;F9F:6QE("8F"B`@2!F +M;W(@'1H;W`](B1/4%1!4D&ET("1R970* +` +end +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/ipsectunnel.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh': 'MD5 check failed' + ) << \SHAR_EOF +097a970ec94a68d965ffd7f446e3862d cloud_scripts/opt/cloud/bin/ipsectunnel.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh'` -ne 8769 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' is not 8769" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/ipassoc.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ipassoc.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ipassoc.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/ipassoc.sh (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/ipassoc.sh +M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N"`D("1(96%D55),.B!S=FXZ+R]S=FXN;&%B+G9M;W!S+F-O;2]R97!O2!E>&ES=',B"GT* +M"F1E;%]F=U]C:&%I;E]F;W)?:7`@*"D@>PH@(&QO8V%L('!U8DEP/20H96-H +M;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?2W!R:6YT("0R?2W!R:6YT("0R?2W!R:6YT("0Q?2PH@(&QO +M8V%L(&1E=CTB)#$B"B`@;&]C86P@:7`](B0R(@H@('-U9&\@:7`@861DW!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP/20Q +M"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0Q?22!F;W(@:7`@)'!U8DEP(&]N(&EN=&5R9F%C92`D971H1&5V(@H@("`@ +M(')E='5R;B`Q"B`@9FD*"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0R?2<@('P@9W)E<"`M=R`D +M:7!.;TUAW!R +M:6YT("0R?2#TD*'!R:6YT9B`B)7A<;B(@)&YU;2D*("`@("`@("`@ +M(&5C:&\@)&AE>#L*("`@("`@("`@("-E;F%B;&4@`IS +M9FQA9STP"FQF;&%G/0IF9FQA9ST*8V9L86<]"FYF;&%G/0IO<#TB(@H*:7-? +M;6%S=&5R/3`*:7-?&ET(#(@)&QO8VL@)&QO8VME9`H)"3L["B`@ +M97-A8PID;VYE"@H*:68@6R`B)$%F;&%G)$1F;&%G(B`A/2`B,2(@70IT:&5N +M"B`@("!U&ET("0_("1L;V-K +M("1L;V-K960*9FD*"FEF(%L@(B1F9FQA9R(@/3T@(C$B(%T@)B8@6R`B)$1F +M;&%G(B`]/2`B,2(@70IT:&5N"B`@&ET("0_ +M("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1$9FQA9R(@/3T@(C$B(%T*=&AE +M;@H@(')E;6]V95]A;E]I<"`@)'!U8FQI8TEP("8F"B`@9&5L7V9W7V-H86EN +M7V9O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ipassoc.sh': 'MD5 check failed' + ) << \SHAR_EOF +ad068a0cc84ded8f79c63ce3aced4586 cloud_scripts/opt/cloud/bin/ipassoc.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ipassoc.sh'` -ne 13401 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ipassoc.sh' is not 13401" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/line_edit.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/line_edit.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/line_edit.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/line_edit.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/line_edit.py' && +#!/usr/bin/python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import logging +import re +import shutil +import os +X +X +class LineEdit(object): +X """Helper for LineEditingFile that keeps track of one edit.""" +X def __init__(self, search, sub, *sub_args, **kwargs): +X if len(sub_args) > 0: +X sub = sub % sub_args +X flags = kwargs.get('flags', 0) +X self.pattern = re.compile(search, flags=flags) +X self.sub = sub +X self.count = kwargs.get('count', 0) # max subs to make +X self.subs = 0 # subs made so far +X +X +class LineEditingFile(object): +X """ +X Atomic, conservative, by-line editing of configuration files. +X +X Will not touch the file if there are no changes to do. +X Reasonably efficient for large files, though files with a long time +X before their first match will use memory. +X +X +X Given a vhosts file such as: +X >>> with open('doctest-vhosts.conf', 'w') as f: +X ... f.write(''' +X ... Listen foo:80 +X ... +X ... DocRoot /var/www +X ... +X ... +X ... Listen other:80 +X ... +X ... DocRoot /var/www +X ... +X ... ''') +X ... +X +X To replace the hostname for the first virtualhost entry: +X >>> new_hostname = 'fooooo' +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... f.replace(r'', '', new_hostname, count=1, flags=re.I) +X ... f.replace(r'Listen .*?:80', 'Listen %s:80', new_hostname, count=1, flags=re.I) +X ... +X +X Be careful with the matches! +X A second invocation of the same rule will edit the second vhost: +X >>> new_hostname = 'fooooo' +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... f.replace(r'', '', new_hostname, count=1, flags=re.I) +X ... +X +X To move all hosts from port 80 to port 8080: +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... f.replace(r'', '', flags=re.I) +X ... f.replace(r'Listen (.*?):80', 'Listen \\\\1:80', flags=re.I) +X ... +X +X (please note in this example there's a double escape of the backreference +X \\\\1, to make the example work with doctest) +X +X Since this example already matched all files, a second invocation does nothing: +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... f.replace(r'', '', flags=re.I) +X ... +X +X It's also acceptable to not make any edits at all: +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... pass +X ... +X +X You don't _have_ to use a with statement: +X >>> f = LineEditingFile('doctest-vhosts.conf') +X >>> f.replace(r'DocRoot /var/www', 'DocRoot /var/www/html', flags=re.I) +X >>> changes = f.commit() +X >>> print changes +X 2 +X >>> +X +X Cleanup of the example vhosts.conf: +X >>> # noinspection PyBroadException +X >>> try: +X ... os.unlink('doctest-vhosts.conf') +X ... os.unlink('doctest-vhosts.conf.bak') +X ... os.unlink('doctest-vhosts.conf.new') +X ... except: +X ... pass +X ... +X """ +X +X def __init__(self, filename): +X self.filename = filename +X self.changed = False +X self.edits = [] +X +X def __enter__(self): +X return self +X +X def replace(self, search, sub, *sub_args, **kwargs): +X edit = LineEdit(search, sub, *sub_args, **kwargs) +X self.edits.append(edit) +X +X # noinspection PyUnusedLocal +X def __exit__(self, exc, value, traceback): +X if exc is not None: +X return False # return false results in re-raise +X +X self.commit() +X +X def commit(self): +X changes = 0 +X changed_file = None +X changed_filename = self.filename + '.new' +X try: +X lines = [] +X backup_filename = self.filename + '.bak' +X # noinspection PyUnusedLocal +X stat = None +X with open(self.filename, 'r') as orig: +X stat = os.fstat(orig.fileno()) +X for line in orig: +X changed_line = line +X for edit in self.edits: +X remaining_count = 0 +X if edit.count != 0: +X remaining_count = edit.count - edit.subs +X if remaining_count < 0: +X raise Exception("Made too many edits") +X elif remaining_count == 0: +X continue +X changed_line, subs = edit.pattern.subn( +X edit.sub, line, remaining_count) +X if changed_line != line: +X if changed_file is None: +X logging.debug("Editing file %s" % self.filename) +X logging.debug(" - %s" % line[:-1]) +X logging.debug(" + %s" % changed_line[:-1]) +X changes += subs +X edit.subs += subs +X if changes == 0: # buffer until we find a change +X lines.append(changed_line) +X elif changed_file is None: # found first change, flush buffer +X changed_file = open(changed_filename, 'w') +X if hasattr(os, 'fchmod'): +X os.fchmod(changed_file.fileno(), # can cause OSError which aborts +X stat.st_mode) +X if hasattr(os, 'fchown'): +X os.fchown(changed_file.fileno(), # can cause OSError which aborts +X stat.st_uid, stat.st_gid) +X changed_file.writelines(lines) +X changed_file.write(changed_line) +X del lines # reclaim buffer memory +X else: # already flushed, just write +X changed_file.write(changed_line) +X +X if changes == 0: +X logging.info("No edits need for file %s" % +X self.filename) +X else: +X changed_file.close() +X changed_file = None +X if os.path.exists(backup_filename): # back up the original +X os.unlink(backup_filename) +X shutil.copy(self.filename, backup_filename) +X os.rename(changed_filename, self.filename) # the swap +X logging.info("Edited file %s (%d changes)" % +X (self.filename, changes)) +X finally: +X if changed_file is not None: # failed, clean up +X changed_file.close() +X os.unlink(changed_filename) +X return changes +X +X +if __name__ == "__main__": +X logging.basicConfig(level=logging.DEBUG) +X import doctest +X doctest.testmod() +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/line_edit.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/line_edit.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/line_edit.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/line_edit.py': 'MD5 check failed' + ) << \SHAR_EOF +4d05b8a011ff9c6132a3ca4ff477a161 cloud_scripts/opt/cloud/bin/line_edit.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/line_edit.py'` -ne 7961 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/line_edit.py' is not 7961" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/get_template_version.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/get_template_version.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/get_template_version.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/get_template_version.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/get_template_version.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# As the last command send to router before any rules operation, wait until boot up done +X +__TIMEOUT=240 +__FLAGFILE=/var/cache/cloud/boot_up_done +done=0 +for i in `seq 1 $(($__TIMEOUT * 10))` +do +X if [ -e $__FLAGFILE ] +X then +X done=1 +X break +X fi +X sleep 0.1 +X if [ $((i % 10)) -eq 0 ] +X then +X logger -t cloud "Waiting for VM boot up done for one second" +X fi +done +X +if [ -z $done ] +then +X # declare we failed booting process +X echo "Waited 60 seconds but boot up haven't been completed" +X exit +fi +X +release=`cat /etc/cloudstack-release` +sig=`cat /var/cache/cloud/cloud-scripts-signature` +echo "${release}&${sig}" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/get_template_version.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/get_template_version.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/get_template_version.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/get_template_version.sh': 'MD5 check failed' + ) << \SHAR_EOF +2234ad00c02a6be63cb0f4f876b8960b cloud_scripts/opt/cloud/bin/get_template_version.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/get_template_version.sh'` -ne 1449 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/get_template_version.sh' is not 1449" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/update_config.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/update_config.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/update_config.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/update_config.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/update_config.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,N87)G=BD*:68@87)G8R`A/2`R(&%N9"!A7,N97AI="@Q*0H*(R!&25A- +M12!W92!S:&]U;&0@9V5T('1H:7,@;&]C871I;VX@9G)O;2!A(&-O;F9I9W5R +M871I;VX@8VQA7,N97AI="AR971U +M2!S<&5E9&EN9R!U<"!L;V%D:6YG('1I;65S +M"B`@("!I9B!N;W0@*&]S+F5N=FER;VXN9V5T*"=$149%4E]#3TY&242YJ7,N87)G=ELQ +M72!O2`]($YO +M;F4*"B`@("!F;W(@:S$L('8Q(&EN(&=U97-T;F5T7V1I8W0N:71E7,N87!P96YD*&LQ*0H*("`@(&EF(&YO +M="!E>&ES=&EN9U]K97ES.@H@("`@("`@("2`Z +M.B!296-O;F9I9W5R:6YG(&=U97-T(&YE='=O&ES=&EN9U]K97ES.@H@("`@("`@("2!I;B!E>&ES=&EN9U]K97ES.@H@("`@("`@(&9O&ES=',@/2!4&ES=',Z"B`@("`@("`@("`@(&)R96%K +M"@H@("`@B(I*3H* +M("`@("`@("!S>7,N97AI="@P*0H@("`@;&]G9VEN9RYE2`Z.B!5;F%B;&4@=&\@7,N97AI="@Q +M*0H*(R!)9B!T:&4@9W5E2`Z.B!.;R!N965D('1O('!R;V-E/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/update_config.py': 'MD5 check failed' + ) << \SHAR_EOF +a2062b2b010940ea783d8256b807c488 cloud_scripts/opt/cloud/bin/update_config.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/update_config.py'` -ne 5136 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/update_config.py' is not 5136" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/edithosts.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/edithosts.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/edithosts.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/edithosts.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/edithosts.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +X +# edithosts.sh -- edit the dhcphosts file on the routing domain +X +usage() { +X printf "Usage: %s: -m -4 -6 -h -d -n -s -u [-N]\n" $(basename $0) >&2 +} +X +mac= +ipv4= +ipv6= +host= +dflt= +dns= +routes= +duid= +nondefault= +X +while getopts 'm:4:h:d:n:s:6:u:N' OPTION +do +X case $OPTION in +X m) mac="$OPTARG" +X ;; +X 4) ipv4="$OPTARG" +X ;; +X 6) ipv6="$OPTARG" +X ;; +X u) duid="$OPTARG" +X ;; +X h) host="$OPTARG" +X ;; +X d) dflt="$OPTARG" +X ;; +X n) dns="$OPTARG" +X ;; +X s) routes="$OPTARG" +X ;; +X N) nondefault=1 +X ;; +X ?) usage +X exit 2 +X ;; +X esac +done +X +DHCP_HOSTS=/etc/dhcphosts.txt +DHCP_OPTS=/etc/dhcpopts.txt +DHCP_LEASES=/var/lib/misc/dnsmasq.leases +HOSTS=/etc/hosts +X +source /root/func.sh +X +lock="biglock" +#default timeout value is 30 mins as DhcpEntryCommand is not synchronized on agent side any more, +#and multiple commands can be sent to the same VR at a time +locked=$(getLockFile $lock 1800) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +grep "redundant_router=1" /var/cache/cloud/cmdline > /dev/null +no_redundant=$? +X +dnsmasq_managed_lease=`cat /var/cache/cloud/dnsmasq_managed_lease` +X +wait_for_dnsmasq () { +X local _pid=$(pidof dnsmasq) +X for i in 0 1 2 3 4 5 6 7 8 9 10 +X do +X sleep 1 +X _pid=$(pidof dnsmasq) +X [ "$_pid" != "" ] && break; +X done +X [ "$_pid" != "" ] && return 0; +X logger -t cloud "edithosts: timed out waiting for dnsmasq to start" +X return 1 +} +X +if [ $dnsmasq_managed_lease ] +then +X #release previous dhcp lease if present +X logger -t cloud "edithosts: releasing $ipv4" +X dhcp_release $(ip route get "$ipv4/32" | grep " dev " | sed -e "s/^.* dev \([^ ]*\) .*$/\1/g") $ipv4 $(grep "$ipv4 " $DHCP_LEASES | awk '{print $2}') > /dev/null 2>&1 +X logger -t cloud "edithosts: released $ipv4" +fi +X +logger -t cloud "edithosts: update $mac $ipv4 $ipv6 $host to hosts" +X +[ ! -f $DHCP_HOSTS ] && touch $DHCP_HOSTS +[ ! -f $DHCP_OPTS ] && touch $DHCP_OPTS +[ ! -f $DHCP_LEASES ] && touch $DHCP_LEASES +X +#delete any previous entries from the dhcp hosts file +sed -i /$mac/d $DHCP_HOSTS +if [ $ipv4 ] +then +X sed -i /$ipv4,/d $DHCP_HOSTS +fi +if [ $ipv6 ] +then +X #searching with [$ipv6], matching other ip so using $ipv6], +X sed -i /$ipv6],/d $DHCP_HOSTS +fi +# don't want to do this in the future, we can have same VM with multiple nics/entries +sed -i /$host,/d $DHCP_HOSTS +X +#put in the new entry +if [ $ipv4 ] +then +X echo "$mac,$ipv4,$host,infinite" >>$DHCP_HOSTS +fi +if [ $ipv6 ] +then +X if [ $nondefault ] +X then +X echo "id:$duid,set:nondefault6,[$ipv6],$host,infinite" >>$DHCP_HOSTS +X else +X echo "id:$duid,[$ipv6],$host,infinite" >>$DHCP_HOSTS +X fi +fi +X +if [ $dnsmasq_managed_lease -eq 0 ] +then +X #delete leases to supplied mac and ip addresses +X if [ $ipv4 ] +X then +X sed -i /$mac/d $DHCP_LEASES +X sed -i /"$ipv4 "/d $DHCP_LEASES +X fi +X if [ $ipv6 ] +X then +X sed -i /$duid/d $DHCP_LEASES +X sed -i /"$ipv6 "/d $DHCP_LEASES +X fi +X sed -i /"$host "/d $DHCP_LEASES +X +X #put in the new entry +X if [ $ipv4 ] +X then +X echo "0 $mac $ipv4 $host *" >> $DHCP_LEASES +X fi +X if [ $ipv6 ] +X then +X echo "0 $duid $ipv6 $host *" >> $DHCP_LEASES +X fi +fi +X +#edit hosts file as well +if [ $ipv4 ] +then +X sed -i /"$ipv4 "/d $HOSTS +fi +if [ $ipv6 ] +then +X sed -i /"$ipv6 "/d $HOSTS +fi +sed -i /" $host$"/d $HOSTS +if [ $ipv4 ] +then +X echo "$ipv4 $host" >> $HOSTS +fi +if [ $ipv6 ] +then +X echo "$ipv6 $host" >> $HOSTS +fi +X +if [ "$dflt" != "" -a "$ipv4" != "" ] +then +X #make sure dnsmasq looks into options file +X sed -i /dhcp-optsfile/d /etc/dnsmasq.conf +X echo "dhcp-optsfile=$DHCP_OPTS" >> /etc/dnsmasq.conf +X +X tag=$(echo $ipv4 | tr '.' '_') +X sed -i /$tag,/d $DHCP_OPTS +X if [ "$dflt" == "0.0.0.0" ] +X then +X logger -t cloud "$0: unset default router for $ipv4" +X logger -t cloud "$0: unset dns server for $ipv4" +X echo "$tag,3" >> $DHCP_OPTS +X echo "$tag,6" >> $DHCP_OPTS +X echo "$tag,15" >> $DHCP_OPTS +X fi +X [ "$routes" != "" ] && echo "$tag,121,$routes" >> $DHCP_OPTS +X #delete entry we just put in because we need a tag +X sed -i /$ipv4,/d $DHCP_HOSTS +X #put it back with a tag +X echo "$mac,set:$tag,$ipv4,$host,infinite" >>$DHCP_HOSTS +fi +X +# make dnsmasq re-read files +pid=$(pidof dnsmasq) +if [ "$pid" != "" ] +then +X # use SIGHUP to avoid service outage if dhcp_release is available. +X if [ $dnsmasq_managed_lease ] +X then +X kill -HUP $pid +X else +X systemctl restart dnsmasq +X fi +else +X if [ $no_redundant -eq 1 ] +X then +X wait_for_dnsmasq +X else +X logger -t cloud "edithosts: skip wait dnsmasq due to redundant virtual router" +X fi +fi +X +ret=$? +unlock_exit $ret $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/edithosts.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/edithosts.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/edithosts.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/edithosts.sh': 'MD5 check failed' + ) << \SHAR_EOF +68e47d6a7efaacefbbaebf8b4e7408c3 cloud_scripts/opt/cloud/bin/edithosts.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/edithosts.sh'` -ne 5502 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/edithosts.sh' is not 5502" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/diagnostics.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/diagnostics.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/diagnostics.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/diagnostics.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/diagnostics.py' && +#!/usr/bin/env python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import shlex +import subprocess +import sys +X +X +def run_cmd(command): +X if command is not None: +X try: +X p = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE) +X stdout, stderr = p.communicate() +X return_code = p.returncode +X +X except OSError as e: +X stdout = "Check your command type" +X stderr = "Exception occurred: %s" % e +X return_code = 1 +X +X finally: +X print('%s&&' % stdout.strip()) +X print('%s&&' % stderr.strip()) +X print('%s' % return_code) +X +X +def get_command(): +X arguments = sys.argv +X cmd = " ".join(arguments[1:]) +X cmd_type = sys.argv[1] +X +X if cmd_type == 'ping': +X if '-c' in arguments: +X return cmd +X else: +X return cmd + " -c 4" +X +X elif cmd_type == 'traceroute': +X if '-m' in arguments: +X return cmd +X else: +X return cmd + " -m 20" +X +X elif cmd_type == 'arping': +X if '-c' in arguments: +X return cmd +X else: +X return cmd + " -c 4" +X +X else: +X return None +X +X +if __name__ == "__main__": +X command = get_command() +X run_cmd(command) +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/diagnostics.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/diagnostics.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/diagnostics.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/diagnostics.py': 'MD5 check failed' + ) << \SHAR_EOF +91a837e5bcafee663cbfb8532574405a cloud_scripts/opt/cloud/bin/diagnostics.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/diagnostics.py'` -ne 2012 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/diagnostics.py' is not 2012" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_monitorservice.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_monitorservice.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_monitorservice.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_monitorservice.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py': 'MD5 check failed' + ) << \SHAR_EOF +1121a063f2dbcfc1bdc426ceba249184 cloud_scripts/opt/cloud/bin/cs_monitorservice.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py'` -ne 1541 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py' is not 1541" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpn_l2tp.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpn_l2tp.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpn_l2tp.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +X +X +#set -x +usage() { +X printf "Usage:\n" +X printf "Create VPN : %s -c -r -l -p -s -i \n" $(basename $0) +X printf "Delete VPN : %s -d -l -s -D -C < local cidr> \n" $(basename $0) +X printf "Add VPN User : %s -u \n" $(basename $0) +X printf "Remote VPN User: %s -U /dev/null +X then +X is_vpc=true +X fi +X +X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 500 -j ACCEPT +X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 4500 -j ACCEPT +X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 1701 -j ACCEPT +X sudo iptables $op INPUT -i $dev -p ah -j ACCEPT +X sudo iptables $op INPUT -i $dev -p esp -j ACCEPT +X if $is_vpc +X then +X # Need to apply the following ACL rules as well. +X if sudo iptables -N VPN_FORWARD &> /dev/null +X then +X sudo iptables -I FORWARD -i ppp+ -j VPN_FORWARD +X sudo iptables -I FORWARD -o ppp+ -j VPN_FORWARD +X sudo iptables -A VPN_FORWARD -j DROP +X fi +X sudo iptables $op VPN_FORWARD -i ppp+ -o ppp+ -j RETURN +X sudo iptables $op VPN_FORWARD -i ppp+ -d $cidr -j RETURN +X sudo iptables $op VPN_FORWARD -s $cidr -o ppp+ -j RETURN +X else +X sudo iptables $op FORWARD -i ppp+ -d $cidr -j ACCEPT +X sudo iptables $op FORWARD -s $cidr -o ppp+ -j ACCEPT +X sudo iptables $op FORWARD -i ppp+ -o ppp+ -j ACCEPT +X fi +X sudo iptables $op INPUT -i ppp+ -m udp -p udp --dport 53 -j ACCEPT +X sudo iptables $op INPUT -i ppp+ -m tcp -p tcp --dport 53 -j ACCEPT +X sudo iptables -t nat $op PREROUTING -i ppp+ -p tcp -m tcp --dport 53 -j DNAT --to-destination $local_ip +X sudo iptables -t nat $op PREROUTING -i ppp+ -p udp -m udp --dport 53 -j DNAT --to-destination $local_ip +X +X if $is_vpc +X then +X return +X fi +X +X if sudo iptables -t mangle -N VPN_$public_ip &> /dev/null +X then +X logger -t cloud "$(basename $0): created VPN chain in PREROUTING mangle" +X sudo iptables -t mangle -I PREROUTING -d $public_ip -j VPN_$public_ip +X sudo iptables -t mangle -A VPN_$public_ip -j RETURN +X fi +X op2="-D" +X [ "$op" == "-A" ] && op2="-I" +X sudo iptables -t mangle $op VPN_$public_ip -p ah -j ACCEPT +X sudo iptables -t mangle $op VPN_$public_ip -p esp -j ACCEPT +} +X +start_ipsec() { +X systemctl is-active ipsec > /dev/null +X if [ $? -ne 0 ] +X then +X systemctl start ipsec > /dev/null +X #Wait until ipsec started, 5 seconds at most +X for i in {1..5} +X do +X logger -t cloud "$(basename $0): waiting ipsec start..." +X systemctl is-active ipsec > /dev/null +X result=$? +X if [ $result -eq 0 ] +X then +X break +X fi +X sleep 1 +X done +X fi +X systemctl is-active ipsec > /dev/null +X return $? +} +X +ipsec_server() { +X local op=$1 +X case $op in +X "start") start_ipsec +X sudo systemctl start xl2tpd +X ;; +X "stop") sudo systemctl stop xl2tpd +X ;; +X "restart") start_ipsec +X sudo ipsec auto --rereadall +X systemctl stop xl2tpd +X systemctl start xl2tpd +X ;; +X esac +} +X +create_l2tp_ipsec_vpn_server() { +X local ipsec_psk=$1 +X local public_ip=$2 +X local client_range=$3 +X local local_ip=$4 +X +X sed -i -e "s/left=.*$/left=$public_ip/" /etc/ipsec.d/l2tp.conf +X echo "$public_ip %any : PSK \"$ipsec_psk\"" > /etc/ipsec.d/ipsec.any.secrets +X sed -i -e "s/^ip range = .*$/ip range = $client_range/" /etc/xl2tpd/xl2tpd.conf +X sed -i -e "s/^local ip = .*$/local ip = $local_ip/" /etc/xl2tpd/xl2tpd.conf +X +X sed -i -e "s/^ms-dns.*$/ms-dns $local_ip/" /etc/ppp/options.xl2tpd +X +X iptables_ "-D" $public_ip +X iptables_ "-I" $public_ip +X +X ipsec_server "restart" +X +X ipsec auto --rereadsecrets +X ipsec auto --replace L2TP-PSK +} +X +destroy_l2tp_ipsec_vpn_server() { +X local public_ip=$1 +X +X ipsec auto --down L2TP-PSK +X +X iptables_ "-D" $public_ip +X +X ipsec_server "stop" +} +X +remove_l2tp_ipsec_user() { +X local u=$1 +X sed -i -e "/^$u .*$/d" /etc/ppp/chap-secrets +X if [ -x /usr/bin/tdbdump ]; then +X pid=$(tdbdump /var/run/pppd2.tdb | grep -w $u | awk -F';' '{print $4}' | awk -F= '{print $2}') +X [ "$pid" != "" ] && kill -9 $pid +X fi +X return 0 +} +X +add_l2tp_ipsec_user() { +X local u=$1 +X local passwd=$2 +X +X uptodate=$(grep "^$u \* \"$passwd\" \*$" /etc/ppp/chap-secrets) +X if [ "$uptodate" == "" ] +X then +X remove_l2tp_ipsec_user $u +X echo "$u * \"$passwd\" *" >> /etc/ppp/chap-secrets +X fi +} +X +rflag= +pflag= +lflag= +sflag= +create= +destroy= +useradd= +userdel= +dev= +cidr= +X +while getopts 'cdl:p:r:s:u:U:i:C:' OPTION +do +X case $OPTION in +X c) create=1 +X ;; +X d) destroy=1 +X ;; +X u) useradd=1 +X user_pwd="$OPTARG" +X ;; +X U) userdel=1 +X user="$OPTARG" +X ;; +X r) rflag=1 +X client_range="$OPTARG" +X ;; +X p) pflag=1 +X ipsec_psk="$OPTARG" +X ;; +X l) lflag=1 +X local_ip="$OPTARG" +X ;; +X s) sflag=1 +X server_ip="$OPTARG" +X ;; +X i) dev="$OPTARG" +X ;; +X C) cidr="$OPTARG" +X ;; +X ?) usage +X exit 2 +X ;; +X esac +done +X +if [ "$dev" == "" ] +then +X dev="eth2" +fi +X +if [ "$cidr" == "" ] +then +X cidr=$(get_intf_ip "eth0") +fi +X +[ "$create$destroy" == "11" ] || [ "$create$destroy$useradd$userdel" == "" ] && usage && exit 2 +[ "$create" == "1" ] && [ "$lflag$pflag$rflag$sflag" != "1111" ] && usage && exit 2 +X +if [ "$create" == "1" ]; then +X create_l2tp_ipsec_vpn_server $ipsec_psk $server_ip $client_range $local_ip +X exit $? +fi +X +if [ "$destroy" == "1" ]; then +X destroy_l2tp_ipsec_vpn_server $server_ip +X exit $? +fi +X +if [ "$useradd" == "1" ]; then +X u=$(echo $user_pwd | awk -F',' '{print $1}') +X pwd=$(echo $user_pwd | awk -F',' '{print $2}') +X add_l2tp_ipsec_user $u $pwd +X exit $? +fi +if [ "$userdel" == "1" ]; then +X remove_l2tp_ipsec_user $user +X exit $? +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpn_l2tp.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh': 'MD5 check failed' + ) << \SHAR_EOF +79e41044b43cc49c6b11859534bc454d cloud_scripts/opt/cloud/bin/vpn_l2tp.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh'` -ne 6986 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' is not 6986" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_guestnetwork.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_guestnetwork.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_guestnetwork.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +keys = ['eth1', 'eth2', 'eth3', 'eth4', 'eth5', 'eth6', 'eth7', 'eth8', 'eth9'] +X +X +def merge(dbag, gn): +X device = gn['device'] +X +X if not gn['add'] and device in dbag: +X +X if dbag[device]: +X device_to_die = dbag[device][0] +X try: +X dbag[device].remove(device_to_die) +X except ValueError, e: +X print "[WARN] cs_guestnetwork.py :: Error occurred removing item from databag. => %s" % device_to_die +X del(dbag[device]) +X else: +X del(dbag[device]) +X +X else: +X dbag.setdefault(device, []).append(gn) +X +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_guestnetwork.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py': 'MD5 check failed' + ) << \SHAR_EOF +599105da1bdfaced1f2c8078d3fbed19 cloud_scripts/opt/cloud/bin/cs_guestnetwork.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py'` -ne 1401 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' is not 1401" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_vmdata.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vmdata.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vmdata.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, metadata): +X dbag[metadata["vm_ip_address"]] = metadata["vm_metadata"] +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_vmdata.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vmdata.py': 'MD5 check failed' + ) << \SHAR_EOF +3ee2451cb48927d361f05bb5fe3df4ce cloud_scripts/opt/cloud/bin/cs_vmdata.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vmdata.py'` -ne 892 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' is not 892" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/dnsmasq.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/dnsmasq.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/dnsmasq.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +usage() { +X printf "Usage: %s: \n" $(basename $0) >&2 +} +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +#set -x +#backup the old config file +DHCP_CONFIG=/etc/dnsmasq.d/multiple_ranges.conf +DHCP_CONFIG_BAK=/etc/dnsmasq.d/multiple_ranges.conf.bak +DHCP_CONFIG_MAIN=/etc/dnsmasq.conf +DHCP_CONFIG_MAIN_BAK=/etc/dnsmasq.conf.bak +DHCP_FAILURE_CONFIG=/etc/multiple_ranges.conf.failure +DHCP_FAILURE_CONFIG_MAIN=/etc/dnsmasq.conf.failure +CMDLINE=$(cat /var/cache/cloud/cmdline | tr '\n' ' ') +X +#take a backup copy of the dnsmasq file. +cp "$DHCP_CONFIG_MAIN" "$DHCP_CONFIG_MAIN_BAK" +cp "$DHCP_CONFIG" "$DHCP_CONFIG_BAK" +X +#empty the config file +echo > $DHCP_CONFIG +X +var="$1" +dhcp_range="" +dhcp_gateway="" +dhcp_netmask="" +dns_option="" +dns_servers="" +count=0 +X +X +# fetching the dns Ips from the command line. +dns1=$(echo "$CMDLINE" | grep -o " dns1=[[:digit:]].* " | sed -e 's/dns1=//' | awk '{print $1}') +dns2=$(echo "$CMDLINE" | grep -o " dns2=[[:digit:]].* " | sed -e 's/dns2=//' | awk '{print $1}') +X +dns_servers="${dns1}" +if [ -n "$dns2" ] +then +dns_servers="${dns1},${dns2}" +fi +X +X +# check if useextdns is true +use_ext_dns=$(echo "$CMDLINE" | grep -o "useextdns=true") +while [ -n "$var" ] +do +X var1=$(echo $var | cut -f1 -d "-") +X routerip=$( echo $var1 | cut -f1 -d ":" ) +X gateway=$(echo $var1 | cut -f2 -d ":") +X netmask=$(echo $var1 | cut -f3 -d ":") +X start_ip_of_subnet=$(echo $var1 | cut -f4 -d ":") +X dhcp_range="${dhcp_range}"'dhcp-range=set:range'$count","$start_ip_of_subnet",static \n" +X dhcp_gateway="${dhcp_gateway}"'dhcp-option=tag:range'$count",3,"$gateway" \n" +X dhcp_netmask="${dhcp_netmask}"'dhcp-option=tag:range'$count",1,"$netmask" \n" +X if [ -n "$use_ext_dns" ] +X then +X dns_option="${dns_option}"'dhcp-option=tag:range'$count",6,"$dns_servers" \n" +X else +X dns_option="${dns_option}"'dhcp-option=tag:range'$count",6,$routerip"","$dns_servers" \n" +X fi +X var=$( echo $var | sed "s/${var1}-//" ) +X count=$[$count+1] +done +X +#logging the configuration being removed. +log="" +log="${log}"`grep "^dhcp-option=6" "$DHCP_CONFIG_MAIN"`"\n" +log="${log}"`grep "^dhcp-option=option:router" "$DHCP_CONFIG_MAIN"`"\n" +log="${log}"`grep "^dhcp-range=" "$DHCP_CONFIG_MAIN"`"\n" +X +if [ "$log" != '\n\n\n' ] +then +X #Cleaning the existing dhcp confgiuration +X logger -t cloud "dnsmasq.sh: remvoing the primaryip confg from dnsmasq.conf and adding it to /etc/dnsmaq.d/multiple_ranges.conf" +X logger -t cloud "dnsmasq.sh: config removed from dnsmasq.conf is $log" +X sed -i -e '/dhcp-option=6/d' "$DHCP_CONFIG_MAIN" +X sed -i -e '/dhcp-option=option:router/d' "$DHCP_CONFIG_MAIN" +X sed -i -e '/^dhcp-range=/d' "$DHCP_CONFIG_MAIN" +fi +X +#wrting the new config into the config file. +echo -e "$dhcp_range" >> "$DHCP_CONFIG" +echo -e "$dhcp_gateway" >> "$DHCP_CONFIG" +echo -e "$dhcp_netmask" >> "$DHCP_CONFIG" +echo -e "$dns_option" >> "$DHCP_CONFIG" +X +X +#restart the dnsmasq +systemctl restart dnsmasq +result=$? +if [ "$result" -ne "0" ] +then +X logger -t cloud "dnsmasq.sh: could not configure dnsmasq" +X logger -t cloud "dnsmasq.sh: reverting to the old config" +X logger -t cloud "dnsmasq.sh: copying the failure config to `$DHCP_FAILURE_CONFIG` and `$DHCP_FAILURE_CONFIG_MAIN`" +X cp "$DHCP_CONFIG" "$DHCP_FAILURE_CONFIG" +X cp "$DHCP_CONFIG_MAIN" "$DHCP_FAILURE_CONFIG_MAIN" +X cp "$DHCP_CONFIG_BAK" "$DHCP_CONFIG" +X cp "$DHCP_CONFIG_MAIN_BAK" "$DHCP_CONFIG_MAIN" +X systemctl restart dnsmasq +X unlock_exit $result $lock $locked +fi +rm "$DHCP_CONFIG_BAK" +rm "$DHCP_CONFIG_MAIN_BAK" +unlock_exit $result $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/dnsmasq.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/dnsmasq.sh': 'MD5 check failed' + ) << \SHAR_EOF +d603da3043a61bea911e21fb4da8ded0 cloud_scripts/opt/cloud/bin/dnsmasq.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/dnsmasq.sh'` -ne 4359 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' is not 4359" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_dhcp.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_dhcp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_dhcp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_dhcp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_dhcp.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2P@96YT2!N;W0@ +M:6X@7,Z"B`@("`@("`@("`@(')E;6]V95]K97ES+F%D9"AK +M97DI"@H@("`@("`@(&9O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_dhcp.py': 'MD5 check failed' + ) << \SHAR_EOF +9b17e95a8fcb1cf185c9e74cc6ddecca cloud_scripts/opt/cloud/bin/cs_dhcp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_dhcp.py'` -ne 1533 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_dhcp.py' is not 1533" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_cmdline.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_cmdline.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_cmdline.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, cmdline): +X if 'redundant_router' in cmdline['cmd_line']: +X cmdline['cmd_line']['redundant_router'] = "true" +X else: +X cmdline['cmd_line']['redundant_router'] = "false" +X dbag['config'] = cmdline['cmd_line'] +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_cmdline.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_cmdline.py': 'MD5 check failed' + ) << \SHAR_EOF +a6290582c86832c4c94985580ceda8e5 cloud_scripts/opt/cloud/bin/cs_cmdline.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_cmdline.py'` -ne 1045 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' is not 1045" + fi +fi +# ============= cloud_scripts/root/reconfigLB.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/reconfigLB.sh' +then +${echo} "x - SKIPPING cloud_scripts/root/reconfigLB.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/reconfigLB.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/reconfigLB.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +ret=0 +X +new_config=$1 +X +# save previous state +X mv /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy.cfg.old +X +X mv $new_config /etc/haproxy/haproxy.cfg +X if haproxy -p /var/run/haproxy.pid -f /etc/haproxy/haproxy.cfg -sf $(cat /var/run/haproxy.pid); then +X logger -t cloud "New haproxy instance successfully loaded, stopping previous one." +X ret=0 +X else +X logger -t cloud "New instance failed to start, resuming previous one." +X mv /etc/haproxy/haproxy.cfg $new_config +X mv /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg +X haproxy -p /var/run/haproxy.pid -f /etc/haproxy/haproxy.cfg -sf $(cat /var/run/haproxy.pid) +X ret=1 +X fi +X +exit $ret +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/reconfigLB.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/root/reconfigLB.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/reconfigLB.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/reconfigLB.sh': 'MD5 check failed' + ) << \SHAR_EOF +d73e1491560b810ac47d1aaeb2b466ba cloud_scripts/root/reconfigLB.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/reconfigLB.sh'` -ne 1454 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/reconfigLB.sh' is not 1454" + fi +fi +# ============= cloud_scripts/root/monitorServices.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/monitorServices.py' +then +${echo} "x - SKIPPING cloud_scripts/root/monitorServices.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/monitorServices.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/monitorServices.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,L('!A=&@*9G)O;2!H96%L=&A?8VAE +M8VMS+G5T:6QI='D@:6UP;W)T(&=E=$AE86QT:$-H96-KWT* +M("`@('!A2`K)UTG*R(@(B`K +M("=;)RMP2LG72<@*R`B("(@*R!M +M2!O;F4@<&ED(&]R +M(&YO=`H@("`@:68@97AI=%-T871U6EN9R!F97<@;6]R92!T:6UEPH@("`@("`@("`@("`@("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EWT@(U-K:7`@WT*("`@(&9A:6QI;F=#:&5C:W,@/2!;70H@ +M("`@:68@8VAE8VM4>7!E(#T](")B87-I8R(Z"B`@("`@("`@;6]N:71297-U +M;'0L(&9A:6QI;F=#:&5C:W,@/2!M;VYI=%!R;V-E&-L=61E(#T@ +M:&-?9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K&-L=61E +M9%]H96%L=&A?8VAE8VMS(B!I;B!H8U]D871A(&5L7!E*0H@("`@("`@("`@("`@("`@:68@;&5N*')E="D@/3T@,#H*("`@("`@ +M("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@("`@("`@:68@(G-U +M8V-E7,N87)G=BD@/3T@,CH*("`@("`@("!I9B!S>7,N87)G=ELQ72`]/2`B +M861V86YC960B.@H@("`@("`@("`@("!M86EN*")A9'9A;F-E9"(I"B`@("`@ +M("`@96QI9B!S>7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@("`@("!M +M86EN*")B87-I8R(I"B`@("`@("`@96QS93H*("`@("`@("`@("`@<')I;G1D +M*")%7!E(&]F('1E7,N87)G=BD* +M("`@(&5L/dev/null 2>&1 || ${echo} 'cloud_scripts/root/monitorServices.py': 'MD5 check failed' + ) << \SHAR_EOF +d46009a10f68b7f2c57e43e215cba41c cloud_scripts/root/monitorServices.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/monitorServices.py'` -ne 12747 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/monitorServices.py' is not 12747" + fi +fi +# ============= cloud_scripts/root/health_checks/iptables_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/iptables_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/iptables_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/iptables_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/iptables_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W'!E8W1E9"`](%M="B`@("`@("`@9&5S=$EP(#T@<&]R=$9O'0L('-R8U!O2!I;B!I<%1A8FQE4QI'!E8W1E9#H*("`@("`@("`@("`@("`@("`@ +M("!I9B!I<%1A8FQE16YT'!E8W1E9$5N=')Y*2`]/2`M,3H* +M("`@("`@("`@("`@("`@("`@("`@("`@9F]U;F1!;&P@/2!&86QS90H@("`@ +M("`@("`@("`@("`@("`@("`@("!B4QI +M/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/iptables_check.py': 'MD5 check failed' + ) << \SHAR_EOF +36d30e9b9ff7842db6472b1f063bb076 cloud_scripts/root/health_checks/iptables_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/iptables_check.py'` -ne 3349 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/iptables_check.py' is not 3349" + fi +fi +# ============= cloud_scripts/root/health_checks/memory_usage_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/memory_usage_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/memory_usage_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/memory_usage_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/memory_usage_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W$UE;6]R>55S86=E(ETI"B`@("!C;60@/2`B9G)E92!\(&%W:R`G1DY2(#T] +M(#(@>R!P2!5$UE;6]R>55S86=E*2`K("(E(@H@("`@("`@("`@("!E>&ET*#$I"B`@ +M("`@("`@<')I;G0@(DUE;6]R>2!5/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/memory_usage_check.py': 'MD5 check failed' + ) << \SHAR_EOF +1d0f74928584f4e36af8d1d726fac4a4 cloud_scripts/root/health_checks/memory_usage_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/memory_usage_check.py'` -ne 1966 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/memory_usage_check.py' is not 1966" + fi +fi +# ============= cloud_scripts/root/health_checks/haproxy_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/haproxy_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/haproxy_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/haproxy_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/haproxy_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&-O;FXH +M:&%P41A=&$L(&AA0V9G4V5C=&EO;G,I.@H@("`@:68@(FUA>&-O;FXB +M(&EN(&AA<')O>'E$871A(&%N9"`B;6%X8V]N;B(@:6X@:&%#9F=396-T:6]N +M41A=&%;(FUA>&-O;FXB +M72`A/2!H84-F9U-E8W1I;VYS6R)G;&]B86PB75LB;6%X8V]N;B)=6S!=+G-T +M'E$871A +M+"!H84-F9U-E8W1I;VYS*3H*("`@(&-O41A=&$Z"B`@("`@("`@'!E8W1E9"`Z("(@*R!L8E-E8ULB86QG +M;W)I=&AM(ET@*R!<"B`@("`@("`@("`@("`@("`@("`@("`@("`@(B!B=70@ +M9F]U;F0@(B`K(&-F9U-E8W1I;VY;(F)A;&%N8V4B75LP72`K(")<;B(*("`@ +M("`@("`@("`@("`@("`@("!C;W)R96-T(#T@1F%L'!E8W1E9%-E'!E8W1E9%-E"!C;VX@86YD(&5A8V@@;&]A +M9"!B86QA;F-I;F<@41A=&$@/2!G971(96%L=&A#:&5C:W-$ +M871A*")H87!R;WAY1&%T82(I"B`@("!I9B!H87!R;WAY1&%T82!I'DN8V9G +M(BP@)W(G*2!A2]H87!R +M;WAY+F-F9R(*("`@("`@("!E>&ET*#$I"@H@("`@:&%#9F=396-T:6]NWT*("`@("`@("`@("`@8V]N=&EN=64*"B`@("`@("`@ +M:68@8W5R$-O;FX@ +M/2!C:&5C:TUA>&-O;FXH:&%P41A=&%;,%TL(&AA0V9G4V5C=&EO;G,I +M"B`@("!C:&5C:TQB4G5L97,@/2!C:&5C:TQO861"86QA;F-E*&AA<')O>'E$ +M871A+"!H84-F9U-E8W1I;VYS*0H*("`@(&EF(&-H96-K36%X0V]N;B!A;F0@ +M8VAE8VM,8E)U;&5S.@H@("`@("`@('!R:6YT(")!;&P@8VAE8VMS('!A&ET*#$I"@H* +M:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH*("`@(&EF(&QE;BAS>7,N87)G +M=BD@/3T@,B!A;F0@/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/haproxy_check.py': 'MD5 check failed' + ) << \SHAR_EOF +a6a55e4accdf61929c52391235dea744 cloud_scripts/root/health_checks/haproxy_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/haproxy_check.py'` -ne 5274 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/haproxy_check.py' is not 5274" + fi +fi +# ============= cloud_scripts/root/health_checks/router_version_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/router_version_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/router_version_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/router_version_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/router_version_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O +M'!E8W1E9#H@(B`K(%P*("`@("`@ +M("`@("`@("`@("`@97AP96-T960@*R`B+"!F;W5N9#H@(B`K(&9O=6YD"B`@ +M("`@("`@("`@('1E;7!L871E5F5R'!E8W1E +M9"`](&1A=&%;(G-C'!E8W1E9#H@(B`K(%P*("`@("`@ +M("`@("`@("`@("`@97AP96-T960@*R`B+"!F;W5N9#H@(B`K(&9O=6YD"B`@ +M("`@("`@("`@('-C/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/router_version_check.py': 'MD5 check failed' + ) << \SHAR_EOF +408778f28fd8559df294e18256af1f0b cloud_scripts/root/health_checks/router_version_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/router_version_check.py'` -ne 2773 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/router_version_check.py' is not 2773" + fi +fi +# ============= cloud_scripts/root/health_checks/utility/sharedFunctions.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/utility/sharedFunctions.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/utility/sharedFunctions.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import json +X +X +def getHealthChecksData(additionalDataKey=None): +X with open('/root/health_checks_data.json', 'r') as hc_data_file: +X hc_data = json.load(hc_data_file) +X +X # If no specific key is requested return all the data as JSON +X if additionalDataKey is None: +X return hc_data +X +X if additionalDataKey not in hc_data["health_checks_config"]: +X return None +X +X data = hc_data["health_checks_config"][additionalDataKey].strip().split(";") +X addData = [] +X for line in data: +X line = line.strip() +X if len(line) == 0: +X continue +X entries = line.split(',') +X d = {} +X for entry in entries: +X entry = entry.strip() +X if len(entry) == 0: +X continue +X keyVal = entry.split("=") +X if len(keyVal) == 2: +X d[keyVal[0].strip()] = keyVal[1].strip() +X if len(d) > 0: +X addData.append(d) +X +X return addData +X +X +def formatPort(portStart, portEnd, delim="-"): +X return portStart if portStart == portEnd else portStart + delim + portEnd +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/health_checks/utility/sharedFunctions.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/utility/sharedFunctions.py': 'MD5 check failed' + ) << \SHAR_EOF +4fa10a419db9715b34c7037bce5e6fe8 cloud_scripts/root/health_checks/utility/sharedFunctions.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/utility/sharedFunctions.py'` -ne 1865 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' is not 1865" + fi +fi +# ============= cloud_scripts/root/health_checks/utility/__init__.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/utility/__init__.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/utility/__init__.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/utility/__init__.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/utility/__init__.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/utility/__init__.py': 'MD5 check failed' + ) << \SHAR_EOF +ea0b11e040da094dd4f5628b467d5d88 cloud_scripts/root/health_checks/utility/__init__.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/utility/__init__.py'` -ne 864 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/utility/__init__.py' is not 864" + fi +fi +# ============= cloud_scripts/root/health_checks/disk_space_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/disk_space_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/disk_space_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/disk_space_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/disk_space_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O +MWT*("`@(&EF(&5N=')I97,@:7,@;F]T($YO;F4@86YD +M(&QE;BAE;G1R:65S*2`]/2`Q.@H@("`@("`@(&1A=&$@/2!E;G1R:65S6S!= +M"@H@("`@:68@(FUI;D1I/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/disk_space_check.py': 'MD5 check failed' + ) << \SHAR_EOF +9bbb07b130e3946c35263c2e970b59ba cloud_scripts/root/health_checks/disk_space_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/disk_space_check.py'` -ne 1626 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/disk_space_check.py' is not 1626" + fi +fi +# ============= cloud_scripts/root/health_checks/gateways_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/gateways_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/gateways_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/gateways_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/gateways_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,B*0H@("`@:68@9W=S(&ES($YO;F4@86YD(&QE;BAG=W,I(#T](#`Z"B`@ +M("`@("`@<')I;G0@(DYO(&=A=&5W87ES(&1A=&$@879A:6QA8FQE+"!S:VEP +M<&EN9R(*("`@("`@("!E>&ET*#`I"@H@("`@=6YR96%C:&%B;&5'871E5V%Y +M7,N87!P +M96YD*&=W*0H*("`@(&EF(&QE;BAU;G)E86-H86)L94=A=&5787ES*2`]/2`P +M.@H@("`@("`@('!R:6YT(")!;&P@(B`K('-T7,* +M("`@("`@("!E>&ET*#$I"@H*:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH* +M("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A;F0@/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/gateways_check.py': 'MD5 check failed' + ) << \SHAR_EOF +d1715f65dfe24b77c489d24fc1717bc9 cloud_scripts/root/health_checks/gateways_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/gateways_check.py'` -ne 1869 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/gateways_check.py' is not 1869" + fi +fi +# ============= cloud_scripts/root/health_checks/__init__.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/__init__.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/__init__.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/__init__.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/health_checks/__init__.py' && +#!/usr/bin/python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# Needed to expose utility as package outside for monitorServices.py. +# This directory should only contain executables for health checks. +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/__init__.py' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/root/health_checks/__init__.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/health_checks/__init__.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/__init__.py': 'MD5 check failed' + ) << \SHAR_EOF +fb151d74c97d6b3926d6b7a48eea3e56 cloud_scripts/root/health_checks/__init__.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/__init__.py'` -ne 942 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/__init__.py' is not 942" + fi +fi +# ============= cloud_scripts/root/health_checks/dns_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/dns_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/dns_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/dns_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/dns_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I"@H@("`@=VET:"!O<&5N*"/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/dns_check.py': 'MD5 check failed' + ) << \SHAR_EOF +b3192e74a4e52893fdeca4850eb096f4 cloud_scripts/root/health_checks/dns_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/dns_check.py'` -ne 1972 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/dns_check.py' is not 1972" + fi +fi +# ============= cloud_scripts/root/health_checks/cpu_usage_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/cpu_usage_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/cpu_usage_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/cpu_usage_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/cpu_usage_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W$-P=55S86=E(ETI"B`@("!C;60@/2`B=&]P("UB +M("UN,B`M<"`Q('P@9F=R97`@7")#<'4H7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@ +((&UA:6XH*0HR +` +end +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/cpu_usage_check.py' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/root/health_checks/cpu_usage_check.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/health_checks/cpu_usage_check.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/cpu_usage_check.py': 'MD5 check failed' + ) << \SHAR_EOF +faa54497a494f763c8f1a5a4d9b49c4f cloud_scripts/root/health_checks/cpu_usage_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/cpu_usage_check.py'` -ne 2078 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/cpu_usage_check.py' is not 2078" + fi +fi +# ============= cloud_scripts/root/health_checks/dhcp_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/dhcp_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/dhcp_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/dhcp_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/dhcp_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I"@H@("`@=VET:"!O<&5N*"'0G+"`G +M2`]($9A;'-E"B`@("`@("`@9F]R(&AO'0B"B`@("`@("`@97AI="@P*0H*"FEF(%]?;F%M +M95]?(#T](")?7VUA:6Y?7R(Z"B`@("!I9B!L96XH/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/dhcp_check.py': 'MD5 check failed' + ) << \SHAR_EOF +20e7a36b29f4160ae3e5814f042a8242 cloud_scripts/root/health_checks/dhcp_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/dhcp_check.py'` -ne 2386 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/dhcp_check.py' is not 2386" + fi +fi +# ============= cloud_scripts/root/func.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/func.sh' +then +${echo} "x - SKIPPING cloud_scripts/root/func.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/func.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/func.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# Only one lock is allowed: biglock +X +# getLockFile() parameters +# $1 lock filename +# $2 timeout seconds +X +#set -x +X +getCurrLock() { +X result=`ls $__LOCKDIR/*-$1.lock 2>/dev/null | head -n1` +X while [ $? -ne 0 ] +X do +X result=`ls $__LOCKDIR/*-$1.lock 2>/dev/null| head -n1` +X done +X echo $result +} +X +getLockFile() { +X lock=$1 +X +X __locked=0 +X __TS=`date +%s%N` +X __LOCKDIR="/tmp" +X __LOCKFILE="$__LOCKDIR/$__TS-$$-$lock.lock" +X +X if [ $2 ] +X then +X __TIMEOUT=$2 +X else +X __TIMEOUT=30 +X fi +X +X if [ -e $__LOCKFILE ] +X then +X logger -t cloud "Process $0 pid $$ want to get ECLUSIVE LOCK $lock RECURSIVELY!" +X psline=`ps u $$` +X logger -t cloud "Failed job detail: $psline" +X echo 0 +X return +X fi +X +X psline=`ps u $$` +X echo $psline > $__LOCKFILE +X if [ ! -e $__LOCKFILE ] +X then +X return +X fi +X +X for i in `seq 1 $(($__TIMEOUT * 10))` +X do +X currlock=$(getCurrLock $lock) +X if [ $currlock -ef $__LOCKFILE ] +X then +X __locked=1 +X break +X fi +X +X sleep 0.1 +X if [ $((i % 10)) -eq 0 ] +X then +X logger -t cloud "Process $0 pid $$ waiting for the lock $lock for another 1 second" +X fi +X done +X if [ $__locked -ne 1 ] +X then +X logger -t cloud "fail to acquire the lock $lock for process $0 pid $$ after $__TIMEOUT seconds time out!" +X cmd=`cat $currlock 2>/dev/null` +X if [ $? -eq 0 ] +X then +X logger -t cloud "waiting for process: $cmd" +X else +X logger -t cloud "didn't get info about process who we're waiting for" +X fi +X psline=`ps u $$` +X logger -t cloud "Failed job detail: $psline" +X rm $__LOCKFILE +X fi +X echo $__locked +} +X +# releaseLockFile() parameters +# $1 lock filename +# $2 locked(1) or not(0) +releaseLockFile() { +X __LOCKDIR="/tmp" +X __LOCKFILE="$__LOCKDIR/*-$$-$1.lock" +X __locked=$2 +X if [ "$__locked" == "1" ] +X then +X rm $__LOCKFILE +X fi +} +X +# releaseLockFile() parameters +# $1 exit value +# $2 lock filename +# $3 locked(1) or not(0) +unlock_exit() { +X releaseLockFile $2 $3 +X exit $1 +} +X +# calcuate the ip & network mask +rangecalc(){ +X local IFS='.' +X local -a oct mask ip +X +X read -ra oct <<<"$1" +X read -ra mask <<<"$2" +X for i in {0..3} +X do +X ip+=( "$(( oct[i] & mask[i] ))" ) +X done +X echo "${ip[*]}" +} +X +#get cidr of the nic +getcidr(){ +X local dev=$1 +X local mask=`ifconfig $dev|grep "Mask"|cut -d ":" -f 4` +X local cidrsize=`ip addr show $dev|grep inet|head -n 1|awk '{print $2}'|cut -d '/' -f 2` +X local ipaddr=`ip addr show $dev|grep inet|head -n 1|awk '{print $2}'|cut -d '/' -f 1` +X local base=$(rangecalc $ipaddr $mask) +X echo $base/$cidrsize +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/func.sh' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/root/func.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/func.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/func.sh': 'MD5 check failed' + ) << \SHAR_EOF +89141bce2eaa74a4a9a9788cae397be4 cloud_scripts/root/func.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/func.sh'` -ne 3567 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/func.sh' is not 3567" + fi +fi +# ============= cloud_scripts/root/clearUsageRules.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/clearUsageRules.sh' +then +${echo} "x - SKIPPING cloud_scripts/root/clearUsageRules.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/clearUsageRules.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/clearUsageRules.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +# clearUsageRules.sh - remove iptable rules for removed public interfaces +# @VERSION@ +X +if [ -f /root/removedVifs ] +then +X var=`cat /root/removedVifs` +X # loop through even vif to be cleared +X for i in $var; do +X # Make sure vif doesn't exist +X if [ ! -f /sys/class/net/$i ] +X then +X # remove rules +X iptables -D NETWORK_STATS -i eth0 -o $i > /dev/null; +X iptables -D NETWORK_STATS -i $i -o eth0 > /dev/null; +X iptables -D NETWORK_STATS -o $i ! -i eth0 -p tcp > /dev/null; +X iptables -D NETWORK_STATS -i $i ! -o eth0 -p tcp > /dev/null; +X fi +X done +rm /root/removedVifs +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/clearUsageRules.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/root/clearUsageRules.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/clearUsageRules.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/clearUsageRules.sh': 'MD5 check failed' + ) << \SHAR_EOF +f176fc60b3a7b07a47482d68528bb460 cloud_scripts/root/clearUsageRules.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/clearUsageRules.sh'` -ne 1461 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/clearUsageRules.sh' is not 1461" + fi +fi +# ============= cloud_scripts/var/www/html/latest/.htaccess ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/latest/.htaccess' +then +${echo} "x - SKIPPING cloud_scripts/var/www/html/latest/.htaccess (file already exists)" + +else +${echo} "x - extracting cloud_scripts/var/www/html/latest/.htaccess (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/latest/.htaccess' && +Options +FollowSymLinks +RewriteEngine On +X +#http:///latest/user-data and .../user-data/ (both yield user-data file) +#http:///latest/meta-data and .../meta-data/ (dir listing of meta-data) +RewriteRule ^user-data/?$ ../userdata/%{REMOTE_ADDR}/user-data [L,NC,QSA] +RewriteRule ^meta-data/?$ ../metadata/%{REMOTE_ADDR}/meta-data [L,NC,QSA] +X +#http:///latest/foo and .../foo/ (yield metadata/$IP/foo) +#are these used? +RewriteRule ^availability-zone/?$ ../metadata/%{REMOTE_ADDR}/availability-zone [L,NC,QSA] +RewriteRule ^cloud-identifier/?$ ../metadata/%{REMOTE_ADDR}/cloud-identifier [L,NC,QSA] +RewriteRule ^instance-id/?$ ../metadata/%{REMOTE_ADDR}/instance-id [L,NC,QSA] +RewriteRule ^local-hostname/?$ ../metadata/%{REMOTE_ADDR}/local-hostname [L,NC,QSA] +RewriteRule ^local-ipv4/?$ ../metadata/%{REMOTE_ADDR}/local-ipv4 [L,NC,QSA] +RewriteRule ^public-hostname/?$ ../metadata/%{REMOTE_ADDR}/public-hostname [L,NC,QSA] +RewriteRule ^public-ipv4/?$ ../metadata/%{REMOTE_ADDR}/public-ipv4 [L,NC,QSA] +RewriteRule ^public-keys/?$ ../metadata/%{REMOTE_ADDR}/public-keys [L,NC,QSA] +RewriteRule ^service-offering/?$ ../metadata/%{REMOTE_ADDR}/service-offering [L,NC,QSA] +RewriteRule ^vm-id/?$ ../metadata/%{REMOTE_ADDR}/vm-id [L,NC,QSA] +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/latest/.htaccess' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/var/www/html/latest/.htaccess' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/var/www/html/latest/.htaccess failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/latest/.htaccess': 'MD5 check failed' + ) << \SHAR_EOF +b20d7331940666e4f160df0a03678813 cloud_scripts/var/www/html/latest/.htaccess +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/latest/.htaccess'` -ne 1425 && \ + ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/latest/.htaccess' is not 1425" + fi +fi +# ============= cloud_scripts/var/www/html/userdata/.htaccess ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/userdata/.htaccess' +then +${echo} "x - SKIPPING cloud_scripts/var/www/html/userdata/.htaccess (file already exists)" + +else +${echo} "x - extracting cloud_scripts/var/www/html/userdata/.htaccess (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/userdata/.htaccess' && +Options -Indexes +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/userdata/.htaccess' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/var/www/html/userdata/.htaccess' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/var/www/html/userdata/.htaccess failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/userdata/.htaccess': 'MD5 check failed' + ) << \SHAR_EOF +7eb825c9c5f32d7efe110c8d7ed402dc cloud_scripts/var/www/html/userdata/.htaccess +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/userdata/.htaccess'` -ne 17 && \ + ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/userdata/.htaccess' is not 17" + fi +fi +# ============= cloud_scripts/etc/ipsec.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/ipsec.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/ipsec.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.conf' && +# ipsec.conf - strongSwan IPsec configuration file +X +config setup +X +include /etc/ipsec.d/*.conf +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/ipsec.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/ipsec.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.conf': 'MD5 check failed' + ) << \SHAR_EOF +da4dd5d331eed3e64a528dc648aa7cae cloud_scripts/etc/ipsec.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.conf'` -ne 94 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.conf' is not 94" + fi +fi +# ============= cloud_scripts/etc/systemd/journald.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/journald.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/journald.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/journald.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/journald.conf' && +[Journal] +Compress=yes +SystemMaxUse=40M +SystemMaxFileSize=10M +RuntimeMaxUse=20M +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/journald.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/journald.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/journald.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/journald.conf': 'MD5 check failed' + ) << \SHAR_EOF +ea3c97c4a558fbfdf53304f77275ef8a cloud_scripts/etc/systemd/journald.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/journald.conf'` -ne 80 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/journald.conf' is not 80" + fi +fi +# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service +M[[N_6U5N:71="D1E/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service': 'MD5 check failed' + ) << \SHAR_EOF +58d4e646ee66ac7c470796bd6ce9e2a6 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service'` -ne 156 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service' is not 156" + fi +fi +# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service +M[[N_6U5N:71="D1E/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service': 'MD5 check failed' + ) << \SHAR_EOF +027a172fad275171647740477b78ca93 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service'` -ne 143 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service' is not 143" + fi +fi +# ============= cloud_scripts/etc/systemd/system/cloud.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud.service' && +[Unit] +Description=CloudStack Agent service +After=cloud-early-config.service network.target cloud-postinit.service local-fs.target +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=simple +WorkingDirectory=/usr/local/cloud/systemvm +ExecStart=/usr/local/cloud/systemvm/_run.sh +Restart=on-failure +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/cloud.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud.service': 'MD5 check failed' + ) << \SHAR_EOF +b7eb67763e7d694ed98758faef961ac6 cloud_scripts/etc/systemd/system/cloud.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud.service'` -ne 298 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud.service' is not 298" + fi +fi +# ============= cloud_scripts/etc/systemd/system/open-vm-tools.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/open-vm-tools.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/open-vm-tools.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/open-vm-tools.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/open-vm-tools.service +M[[N_6U5N:71="D1E&5C4W1A/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/open-vm-tools.service': 'MD5 check failed' + ) << \SHAR_EOF +10af19a17cd3ee299f08c46bace0f56f cloud_scripts/etc/systemd/system/open-vm-tools.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/open-vm-tools.service'` -ne 280 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/open-vm-tools.service' is not 280" + fi +fi +# ============= cloud_scripts/etc/systemd/system/baremetal-vr.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/baremetal-vr.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/baremetal-vr.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/baremetal-vr.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/baremetal-vr.service' && +[Unit] +Description=CloudStack Baremetal VR service +After=network.target local-fs.target +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=simple +WorkingDirectory=/opt/cloud/bin +ExecStart=/usr/bin/python /opt/cloud/bin/baremetal-vr.py +Restart=on-failure +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/baremetal-vr.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/baremetal-vr.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/baremetal-vr.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/baremetal-vr.service': 'MD5 check failed' + ) << \SHAR_EOF +9fc2a325a709e7cf9ae4d4ec8b7e692a cloud_scripts/etc/systemd/system/baremetal-vr.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/baremetal-vr.service'` -ne 257 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/baremetal-vr.service' is not 257" + fi +fi +# ============= cloud_scripts/etc/systemd/system/xe-daemon.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/xe-daemon.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/xe-daemon.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/xe-daemon.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/xe-daemon.service +M[[N_6U5N:71="D1E&5N+FUO=6YT"D)E9F]R93UN971W;W)K+G1A +M2UC;VYF:6&5C +M4W1A&5C4W1A3UM=6QT:2UU/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/xe-daemon.service': 'MD5 check failed' + ) << \SHAR_EOF +51e30000a8c2d2a91ba1a372bc40a628 cloud_scripts/etc/systemd/system/xe-daemon.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/xe-daemon.service'` -ne 398 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/xe-daemon.service' is not 398" + fi +fi +# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service +M[[N_6U5N:71="D1E5]D865M;VX@+6X*"EM);G-T86QL70I786YT961">3UM=6QT:2UU +*/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service': 'MD5 check failed' + ) << \SHAR_EOF +b1d4d295d2f3dff1ed1e13835e365e86 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service'` -ne 190 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service' is not 190" + fi +fi +# ============= cloud_scripts/etc/systemd/system/cloud-early-config.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-early-config.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-early-config.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-early-config.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-early-config.service' && +[Unit] +Description=CloudStack post-boot patching service using cmdline +DefaultDependencies=no +X +Before=network-pre.target +Wants=network-pre.target +X +Requires=local-fs.target +After=local-fs.target +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=oneshot +ExecStart=/opt/cloud/bin/setup/cloud-early-config +RemainAfterExit=true +TimeoutStartSec=5min +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-early-config.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/cloud-early-config.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-early-config.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-early-config.service': 'MD5 check failed' + ) << \SHAR_EOF +60723561261aa16ed4477c5e02c52bcd cloud_scripts/etc/systemd/system/cloud-early-config.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-early-config.service'` -ne 348 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-early-config.service' is not 348" + fi +fi +# ============= cloud_scripts/etc/systemd/system/cloud-password-server@.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-password-server@.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-password-server@.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' && +[Unit] +Description=Cloud password server on %I +After=network.target local-fs.target +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=simple +WorkingDirectory=/opt/cloud/bin +ExecStart=/opt/cloud/bin/passwd_server_ip.py %I +Restart=on-failure +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-password-server@.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-password-server@.service': 'MD5 check failed' + ) << \SHAR_EOF +3edb13a39635749f16f0579b481c5f25 cloud_scripts/etc/systemd/system/cloud-password-server@.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-password-server@.service'` -ne 244 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' is not 244" + fi +fi +# ============= cloud_scripts/etc/systemd/system/cloud-postinit.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-postinit.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-postinit.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-postinit.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-postinit.service' && +[Unit] +Description=CloudStack post-patching init script +After=cloud-early-config.service network.target local-fs.target +Before=ssh.service +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=oneshot +ExecStart=/opt/cloud/bin/setup/postinit.sh +RemainAfterExit=true +TimeoutStartSec=10min +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-postinit.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/cloud-postinit.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-postinit.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-postinit.service': 'MD5 check failed' + ) << \SHAR_EOF +22b48cd2a7478d27cb155d32cc2610cb cloud_scripts/etc/systemd/system/cloud-postinit.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-postinit.service'` -ne 287 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-postinit.service' is not 287" + fi +fi +# ============= cloud_scripts/etc/iptables/rules ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/rules' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/rules (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/rules (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/rules' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT +-A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT +-A INPUT -i eth0 -p tcp -m state --state NEW --dport 8080 -j ACCEPT +-A INPUT -i eth0 -p tcp -m state --state NEW --dport 80 -j ACCEPT +-A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth0 -o eth2 -j ACCEPT +-A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/rules' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/rules' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/rules failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/rules': 'MD5 check failed' + ) << \SHAR_EOF +e2be370a53cd4e436ce4c298b16ead21 cloud_scripts/etc/iptables/rules +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/rules'` -ne 1731 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/rules' is not 1731" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-consoleproxy ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-consoleproxy' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-consoleproxy (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-consoleproxy (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-consoleproxy' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp --icmp-type 13 -j DROP +-A INPUT -p icmp -j ACCEPT +-A INPUT -i eth1 -p tcp -m state --state NEW -m tcp --dport 3922 -j ACCEPT +-A INPUT -i eth0 -p tcp -m state --state NEW -m tcp --dport 8001 -j ACCEPT +-A INPUT -i eth1 -p tcp -m state --state NEW -m tcp --dport 8001 -j ACCEPT +-A INPUT -i eth2 -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT +-A INPUT -i eth2 -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-consoleproxy' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/iptables-consoleproxy' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-consoleproxy failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-consoleproxy': 'MD5 check failed' + ) << \SHAR_EOF +2840365dad7fe832ea35d8f72a3bfdca cloud_scripts/etc/iptables/iptables-consoleproxy +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-consoleproxy'` -ne 1601 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-consoleproxy' is not 1601" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-router ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-router' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-router (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-router (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-router' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +:FW_EGRESS_RULES - [0:0] +:FW_OUTBOUND - [0:0] +-A INPUT -d 224.0.0.18/32 -j ACCEPT +-A INPUT -d 225.0.0.50/32 -j ACCEPT +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT +-A INPUT -i eth1 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp -m state --state NEW --dport 80 -j ACCEPT +-A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth0 -o eth0 -m state --state NEW -j ACCEPT +-A FORWARD -i eth0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth0 -o eth2 -j FW_OUTBOUND +-A FW_EGRESS_RULES -j ACCEPT +-I FW_OUTBOUND -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FW_OUTBOUND -j FW_EGRESS_RULES +COMMIT +*mangle +:PREROUTING ACCEPT [0:0] +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +-A PREROUTING -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark +-A POSTROUTING -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-router' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/iptables-router' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-router failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-router': 'MD5 check failed' + ) << \SHAR_EOF +aeabe6897f9969f64a87b793deee6500 cloud_scripts/etc/iptables/iptables-router +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-router'` -ne 2348 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-router' is not 2348" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-vpcrouter ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-vpcrouter' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-vpcrouter (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-vpcrouter (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-vpcrouter' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -d 224.0.0.18/32 -j ACCEPT +-A INPUT -d 225.0.0.50/32 -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT +-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT +-A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT +COMMIT +*mangle +:PREROUTING ACCEPT [0:0] +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +-A OUTPUT -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-vpcrouter' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/iptables-vpcrouter' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-vpcrouter failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-vpcrouter': 'MD5 check failed' + ) << \SHAR_EOF +f3e4459f3b0eea8f2de2a6f01ef79866 cloud_scripts/etc/iptables/iptables-vpcrouter +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-vpcrouter'` -ne 1465 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-vpcrouter' is not 1465" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-dhcpsrvr ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-dhcpsrvr (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-dhcpsrvr (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +:FW_EGRESS_RULES - [0:0] +:FW_OUTBOUND - [0:0] +-A INPUT -d 224.0.0.18/32 -j ACCEPT +-A INPUT -d 225.0.0.50/32 -j ACCEPT +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT +-A INPUT -i eth1 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp -m state --state NEW --dport 80 -j ACCEPT +-A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth0 -o eth0 -m state --state NEW -j ACCEPT +-A FORWARD -i eth0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth0 -o eth2 -j FW_OUTBOUND +-A FW_EGRESS_RULES -j ACCEPT +-I FW_OUTBOUND -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FW_OUTBOUND -j FW_EGRESS_RULES +COMMIT +*mangle +:PREROUTING ACCEPT [0:0] +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +-A PREROUTING -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark +-A POSTROUTING -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-dhcpsrvr failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-dhcpsrvr': 'MD5 check failed' + ) << \SHAR_EOF +aeabe6897f9969f64a87b793deee6500 cloud_scripts/etc/iptables/iptables-dhcpsrvr +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-dhcpsrvr'` -ne 2348 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' is not 2348" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-elbvm ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-elbvm' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-elbvm (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-elbvm (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-elbvm' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-elbvm' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/iptables/iptables-elbvm' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-elbvm failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-elbvm': 'MD5 check failed' + ) << \SHAR_EOF +7a950ed86376c0166c53943cdf68ccb2 cloud_scripts/etc/iptables/iptables-elbvm +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-elbvm'` -ne 1256 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-elbvm' is not 1256" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-secstorage ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-secstorage' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-secstorage (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-secstorage (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-secstorage' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +:HTTP - [0:0] +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth3 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -p icmp --icmp-type 13 -j DROP +-A INPUT -p icmp -j ACCEPT +-A INPUT -i eth0 -p tcp -m state --state NEW --dport 3922 -j ACCEPT +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-secstorage' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/iptables/iptables-secstorage' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-secstorage failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-secstorage': 'MD5 check failed' + ) << \SHAR_EOF +d031185b81ee7ee008b80d434d44b61d cloud_scripts/etc/iptables/iptables-secstorage +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-secstorage'` -ne 1375 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-secstorage' is not 1375" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-ilbvm ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-ilbvm' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-ilbvm (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-ilbvm (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-ilbvm' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-ilbvm' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/iptables/iptables-ilbvm' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-ilbvm failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-ilbvm': 'MD5 check failed' + ) << \SHAR_EOF +85129e942bc07d1fb67e0e169238c345 cloud_scripts/etc/iptables/iptables-ilbvm +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-ilbvm'` -ne 1192 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-ilbvm' is not 1192" + fi +fi +# ============= cloud_scripts/etc/iptables/rt_tables_init ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/rt_tables_init' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/rt_tables_init (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/rt_tables_init (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/rt_tables_init' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +# +# reserved values +# +255 local +254 main +253 default +0 unspec +# +# local +# +#1 inr.ruhep +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/rt_tables_init' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/rt_tables_init' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/rt_tables_init failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/rt_tables_init': 'MD5 check failed' + ) << \SHAR_EOF +86477f42d18121a176751c7284251089 cloud_scripts/etc/iptables/rt_tables_init +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/rt_tables_init'` -ne 897 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/rt_tables_init' is not 897" + fi +fi +# ============= cloud_scripts/etc/sysctl.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/sysctl.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/sysctl.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/sysctl.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/sysctl.conf' && +# Kernel sysctl configuration file +# +# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and +# sysctl.conf(5) for more details. +# @VERSION@ +X +# Controls IP packet forwarding +net.ipv4.ip_forward = 1 +X +# Controls source route verification +net.ipv4.conf.default.rp_filter = 0 +X +# Do not accept source routing +net.ipv4.conf.default.accept_source_route = 0 +X +# Respect local interface in ARP interactions +net.ipv4.conf.default.arp_announce = 2 +net.ipv4.conf.default.arp_ignore = 2 +net.ipv4.conf.all.arp_announce = 2 +net.ipv4.conf.all.arp_ignore = 2 +X +# IPSec NETKEY -- avoid bogus redirects +net.ipv4.conf.all.accept_redirects = 0 +net.ipv4.conf.default.accept_redirects = 0 +net.ipv4.conf.all.send_redirects = 0 +net.ipv4.conf.default.send_redirects = 0 +net.ipv4.conf.all.secure_redirects = 0 +net.ipv4.conf.default.secure_redirects = 0 +X +# For smooth transition of the vip address in case of a keepalived failover +net.ipv4.ip_nonlocal_bind = 1 +X +# Controls the System Request debugging functionality of the kernel +kernel.sysrq = 0 +X +# Controls whether core dumps will append the PID to the core filename. +# Useful for debugging multi-threaded applications. +kernel.core_uses_pid = 1 +X +# A better way for the instance to die +kernel.panic = 10 +kernel.panic_on_oops = 1 +vm.panic_on_oom = 1 +X +# Controls the use of TCP syncookies +net.ipv4.tcp_syncookies = 1 +X +# disable tcp time stamps +net.ipv4.tcp_timestamps = 0 +X +net.ipv4.tcp_tw_reuse = 1 +net.ipv4.tcp_max_tw_buckets = 1000000 +net.core.somaxconn = 65535 +net.nf_conntrack_max = 1000000 +net.netfilter.nf_conntrack_max = 1000000 +X +# Disable IPv6 +net.ipv6.conf.all.disable_ipv6 = 1 +net.ipv6.conf.all.forwarding = 0 +net.ipv6.conf.all.accept_ra = 0 +net.ipv6.conf.all.accept_redirects = 0 +net.ipv6.conf.all.autoconf = 0 +X +# Minimum swappiness without disabling it +vm.swappiness=1 +X +# make the kernel more aggressive in reclaiming RAM from the disk and swap caches +vm.vfs_cache_pressure = 200 +X +# try to maintain 'free' memory thereby reducing the size of disk cache, hence reducing swapping. +vm.min_free_kbytes = 20480 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/sysctl.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/sysctl.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/sysctl.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/sysctl.conf': 'MD5 check failed' + ) << \SHAR_EOF +f1cef50b7a8a7cc7a7a24ff08cbea1f8 cloud_scripts/etc/sysctl.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/sysctl.conf'` -ne 2049 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/sysctl.conf' is not 2049" + fi +fi +# ============= cloud_scripts/etc/xl2tpd/xl2tpd.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/xl2tpd/xl2tpd.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/xl2tpd/xl2tpd.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' && +[lns default] +ip range = 10.1.9.2-10.1.9.8 +local ip = 10.1.9.1 +require chap = yes +refuse pap = yes +pppoptfile = /etc/ppp/options.xl2tpd +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/xl2tpd/xl2tpd.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/xl2tpd/xl2tpd.conf': 'MD5 check failed' + ) << \SHAR_EOF +060f03388ae34c64f85a45f47c9f6d48 cloud_scripts/etc/xl2tpd/xl2tpd.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/xl2tpd/xl2tpd.conf'` -ne 139 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' is not 139" + fi +fi +# ============= cloud_scripts/etc/dnsmasq.conf.tmpl ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/dnsmasq.conf.tmpl' +then +${echo} "x - SKIPPING cloud_scripts/etc/dnsmasq.conf.tmpl (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/dnsmasq.conf.tmpl (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/dnsmasq.conf.tmpl' && +# Configuration file for dnsmasq. +# +# Format is one option per line, legal options are the same +# as the long options legal on the command line. See +# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. +X +# Listen on this specific port instead of the standard DNS port +# (53). Setting this to zero completely disables DNS function, +# leaving only DHCP and/or TFTP. +#port=5353 +X +# The following two options make you a better netizen, since they +# tell dnsmasq to filter out queries which the public DNS cannot +# answer, and which load the servers (especially the root servers) +# unnecessarily. If you have a dial-on-demand link they also stop +# these requests from bringing up the link unnecessarily. +X +# Never forward plain names (without a dot or domain part) +domain-needed +# Never forward addresses in the non-routed address spaces. +bogus-priv +X +X +# Uncomment this to filter useless windows-originated DNS requests +# which can trigger dial-on-demand links needlessly. +# Note that (amongst other things) this blocks all SRV requests, +# so don't use it if you use eg Kerberos, SIP, XMMP or Google-talk. +# This option only affects forwarding, SRV records originating for +# dnsmasq (via srv-host= lines) are not suppressed by it. +# filterwin2k +X +# Change this line if you want dns to get its upstream servers from +# somewhere other that /etc/resolv.conf +resolv-file=/etc/dnsmasq-resolv.conf +X +# By default, dnsmasq will send queries to any of the upstream +# servers it knows about and tries to favour servers to are known +# to be up. Uncommenting this forces dnsmasq to try each query +# with each server strictly in the order they appear in +# /etc/resolv.conf +#strict-order +X +# If you don't want dnsmasq to read /etc/resolv.conf or any other +# file, getting its servers from this file instead (see below), then +# uncomment this. +#no-resolv +X +# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv +# files for changes and re-read them then uncomment this. +#no-poll +X +# Add other name servers here, with domain specs if they are for +# non-public domains. +#server=/localnet/192.168.0.1 +X +# Example of routing PTR queries to nameservers: this will send all +# address->name queries for 192.168.3/24 to nameserver 10.1.2.3 +#server=/3.168.192.in-addr.arpa/10.1.2.3 +X +# Add local-only domains here, queries in these domains are answered +# from /etc/hosts or DHCP only. +local=/2.vmops-test.vmops.com/ +X +# Add domains which you want to force to an IP address here. +# The example below send any host in double-click.net to a local +# web-server. +#address=/double-click.net/127.0.0.1 +X +# --address (and --server) work with IPv6 addresses too. +#address=/www.thekelleys.org.uk/fe80::20d:60ff:fe36:f83 +X +# You can control how dnsmasq talks to a server: this forces +# queries to 10.1.2.3 to be routed via eth1 +# server=10.1.2.3@eth1 +X +# and this sets the source (ie local) address used to talk to +# 10.1.2.3 to 192.168.1.1 port 55 (there must be a interface with that +# IP on the machine, obviously). +# server=10.1.2.3@192.168.1.1#55 +X +# If you want dnsmasq to change uid and gid to something other +# than the default, edit the following lines. +#user= +#group= +X +# If you want dnsmasq to listen for DHCP and DNS requests only on +# specified interfaces (and the loopback) give the name of the +# interface (eg eth0) here. +# Repeat the line for more than one interface. +#interface=eth0 +# Or you can specify which interface _not_ to listen on +except-interface=eth1 +except-interface=eth2 +except-interface=lo +# Or which to listen on by address (remember to include 127.0.0.1 if +# you use this.) +#listen-address= +# If you want dnsmasq to provide only DNS service on an interface, +# configure it as shown above, and then use the following line to +# disable DHCP and TFTP on it. +no-dhcp-interface=eth1 +no-dhcp-interface=eth2 +X +# On systems which support it, dnsmasq binds the wildcard address, +# even when it is listening on only some interfaces. It then discards +# requests that it shouldn't reply to. This has the advantage of +# working even when interfaces come and go and change address. If you +# want dnsmasq to really bind only the interfaces it is listening on, +# uncomment this option. About the only time you may need this is when +# running another nameserver on the same machine. +#bind-interfaces +X +# If you don't want dnsmasq to read /etc/hosts, uncomment the +# following line. +#no-hosts +# or if you want it to read another file, as well as /etc/hosts, use +# this. +#addn-hosts=/etc/banner_add_hosts +X +# Set this (and domain: see below) if you want to have a domain +# automatically added to simple names in a hosts-file. +expand-hosts +X +# Set the domain for dnsmasq. this is optional, but if it is set, it +# does the following things. +# 1) Allows DHCP hosts to have fully qualified domain names, as long +# as the domain part matches this setting. +# 2) Sets the "domain" DHCP option thereby potentially setting the +# domain of all systems configured by DHCP +# 3) Provides the domain part for "expand-hosts" +domain=2.vmops-test.vmops.com +X +# Set a different domain for a particular subnet +#domain=wireless.thekelleys.org.uk,192.168.2.0/24 +X +# Same idea, but range rather then subnet +#domain=reserved.thekelleys.org.uk,192.68.3.100,192.168.3.200 +X +# Uncomment this to enable the integrated DHCP server, you need +# to supply the range of addresses available for lease and optionally +# a lease time. If you have more than one network, you will need to +# repeat this for each network on which you want to supply DHCP +# service. +dhcp-range_ip4=10.1.1.1,static +dhcp-range_ip6=::1,static +dhcp-hostsfile=/etc/dhcphosts.txt +X +# This is an example of a DHCP range where the netmask is given. This +# is needed for networks we reach the dnsmasq DHCP server via a relay +# agent. If you don't know what a DHCP relay agent is, you probably +# don't need to worry about this. +#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h +X +# This is an example of a DHCP range which sets a tag, so that +# some DHCP options may be set only for this network. +#dhcp-range=set:red,192.168.0.50,192.168.0.150 +X +# Use this DHCP range only when the tag "green" is set. +#dhcp-range=tag:green,192.168.0.50,192.168.0.150,12h +X +# Specify a subnet which can't be used for dynamic address allocation, +# is available for hosts with matching --dhcp-host lines. Note that +# dhcp-host declarations will be ignored unless there is a dhcp-range +# of some type for the subnet in question. +# In this case the netmask is implied (it comes from the network +# configuration on the machine running dnsmasq) it is possible to give +# an explicit netmask instead. +#dhcp-range=192.168.0.0,static +X +# Enable DHCPv6. Note that the prefix-length does not need to be specified +# and defaults to 64 if missing/ +#dhcp-range=1234::2, 1234::500, 64, 12h +X +# Do Router Advertisements, BUT NOT DHCP for this subnet. +#dhcp-range=1234::, ra-only +X +# Do Router Advertisements, BUT NOT DHCP for this subnet, also try and +# add names to the DNS for the IPv6 address of SLAAC-configured dual-stack +# hosts. Use the DHCPv4 lease to derive the name, network segment and +# MAC address and assume that the host will also have an +# IPv6 address calculated using the SLAAC alogrithm. +#dhcp-range=1234::, ra-names +X +# Do Router Advertisements, BUT NOT DHCP for this subnet. +# Set the lifetime to 46 hours. (Note: minimum lifetime is 2 hours.) +#dhcp-range=1234::, ra-only, 48h +X +# Do DHCP and Router Advertisements for this subnet. Set the A bit in the RA +# so that clients can use SLAAC addresses as well as DHCP ones. +#dhcp-range=1234::2, 1234::500, slaac +X +# Do Router Advertisements and stateless DHCP for this subnet. Clients will +# not get addresses from DHCP, but they will get other configuration information. +# They will use SLAAC for addresses. +#dhcp-range=1234::, ra-stateless +X +# Do stateless DHCP, SLAAC, and generate DNS names for SLAAC addresses +# from DHCPv4 leases. +#dhcp-range=1234::, ra-stateless, ra-names +X +# Do router advertisements for all subnets where we're doing DHCPv6 +# Unless overriden by ra-stateless, ra-names, et al, the router +# advertisements will have the M and O bits set, so that the clients +# get addresses and configuration from DHCPv6, and the A bit reset, so the +# clients don't use SLAAC addresses. +#enable-ra +X +# Supply parameters for specified hosts using DHCP. There are lots +# of valid alternatives, so we will give examples of each. Note that +# IP addresses DO NOT have to be in the range given above, they just +# need to be on the same network. The order of the parameters in these +# do not matter, it's permissible to give name, address and MAC in any +# order. +X +# Always allocate the host with Ethernet address 11:22:33:44:55:66 +# The IP address 192.168.0.60 +#dhcp-host=11:22:33:44:55:66,192.168.0.60 +X +# Always set the name of the host with hardware address +# 11:22:33:44:55:66 to be "fred" +#dhcp-host=11:22:33:44:55:66,fred +X +# Always give the host with Ethernet address 11:22:33:44:55:66 +# the name fred and IP address 192.168.0.60 and lease time 45 minutes +#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m +X +# Give a host with Ethernet address 11:22:33:44:55:66 or +# 12:34:56:78:90:12 the IP address 192.168.0.60. Dnsmasq will assume +# that these two Ethernet interfaces will never be in use at the same +# time, and give the IP address to the second, even if it is already +# in use by the first. Useful for laptops with wired and wireless +# addresses. +#dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.60 +X +# Give the machine which says its name is "bert" IP address +# 192.168.0.70 and an infinite lease +#dhcp-host=bert,192.168.0.70,infinite +X +# Always give the host with client identifier 01:02:02:04 +# the IP address 192.168.0.60 +#dhcp-host=id:01:02:02:04,192.168.0.60 +X +# Always give the host with client identifier "marjorie" +# the IP address 192.168.0.60 +#dhcp-host=id:marjorie,192.168.0.60 +X +# Enable the address given for "judge" in /etc/hosts +# to be given to a machine presenting the name "judge" when +# it asks for a DHCP lease. +#dhcp-host=judge +X +# Never offer DHCP service to a machine whose Ethernet +# address is 11:22:33:44:55:66 +#dhcp-host=11:22:33:44:55:66,ignore +X +# Ignore any client-id presented by the machine with Ethernet +# address 11:22:33:44:55:66. This is useful to prevent a machine +# being treated differently when running under different OS's or +# between PXE boot and OS boot. +#dhcp-host=11:22:33:44:55:66,id:* +X +# Send extra options which are tagged as "red" to +# the machine with Ethernet address 11:22:33:44:55:66 +#dhcp-host=11:22:33:44:55:66,set:red +X +# Send extra options which are tagged as "red" to +# any machine with Ethernet address starting 11:22:33: +#dhcp-host=11:22:33:*:*:*,set:red +X +# Give a fixed IPv6 address and name to client with +# DUID 00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2 +# Note the MAC addresses CANNOT be used to identify DHCPv6 clients. +# Note also the they [] around the IPv6 address are obilgatory. +#dhcp-host=id:00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2, fred, [1234::5] +X +# Ignore any clients which are not specified in dhcp-host lines +# or /etc/ethers. Equivalent to ISC "deny unknown-clients". +# This relies on the special "known" tag which is set when +# a host is matched. +# +# When using bridged networks in ACS this prevents ack to DHCPINFORM etc. request +dhcp-ignore=tag:!known +X +# Send extra options which are tagged as "red" to any machine whose +# DHCP vendorclass string includes the substring "Linux" +#dhcp-vendorclass=set:red,Linux +X +# Send extra options which are tagged as "red" to any machine one +# of whose DHCP userclass strings includes the substring "accounts" +#dhcp-userclass=set:red,accounts +X +# Send extra options which are tagged as "red" to any machine whose +# MAC address matches the pattern. +#dhcp-mac=set:red,00:60:8C:*:*:* +X +# If this line is uncommented, dnsmasq will read /etc/ethers and act +# on the ethernet-address/IP pairs found there just as if they had +# been given as --dhcp-host options. Useful if you keep +# MAC-address/host mappings there for other purposes. +#read-ethers +X +# Send options to hosts which ask for a DHCP lease. +# See RFC 2132 for details of available options. +# Common options can be given to dnsmasq by name: +# run "dnsmasq --help dhcp" to get a list. +# Note that all the common settings, such as netmask and +# broadcast address, DNS server and default route, are given +# sane defaults by dnsmasq. You very likely will not need +# any dhcp-options. If you use Windows clients and Samba, there +# are some options which are recommended, they are detailed at the +# end of this section. +X +# Override the default route supplied by dnsmasq, which assumes the +# router is the same machine as the one running dnsmasq. +#dhcp-option=3,1.2.3.4 +X +# Do the same thing, but using the option name +#dhcp-option=option:router,1.2.3.4 +X +# Override the default route supplied by dnsmasq and send no default +# route at all. Note that this only works for the options sent by +# default (1, 3, 6, 12, 28) the same line will send a zero-length option +# for all other option numbers. +#dhcp-option=3 +X +# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 +#dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5 +X +# Send DHCPv6 option. Note [] around IPv6 addresses. +#dhcp-option=option6:dns-server,[1234::77],[1234::88] +X +# Send DHCPv6 option for namservers as the machine running +# dnsmasq and another. +#dhcp-option=option6:dns-server,[::],[1234::88] +X +# Set the NTP time server address to be the same machine as +# is running dnsmasq +#dhcp-option=42,0.0.0.0 +X +# Set the NIS domain name to "welly" +#dhcp-option=40,welly +X +# Set the default time-to-live to 50 +#dhcp-option=23,50 +X +# Set the "all subnets are local" flag +#dhcp-option=27,1 +X +# Set the domain +dhcp-option=15,"2.vmops-test.vmops.com" +X +# Send the etherboot magic flag and then etherboot options (a string). +#dhcp-option=128,e4:45:74:68:00:00 +#dhcp-option=129,NIC=eepro100 +X +# Specify an option which will only be sent to the "red" network +# (see dhcp-range for the declaration of the "red" network) +# Note that the tag: part must precede the option: part. +#dhcp-option = tag:red, option:ntp-server, 192.168.1.1 +X +# The following DHCP options set up dnsmasq in the same way as is specified +# for the ISC dhcpcd in +# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt +# adapted for a typical dnsmasq installation where the host running +# dnsmasq is also the host running samba. +# you may want to uncomment some or all of them if you use +# Windows clients and Samba. +#dhcp-option=19,0 # option ip-forwarding off +#dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) +#dhcp-option=45,0.0.0.0 # netbios datagram distribution server +#dhcp-option=46,8 # netbios node type +X +# Send an empty WPAD option. This may be REQUIRED to get windows 7 to behave. +#dhcp-option=252,"\n" +X +# Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client +# probably doesn't support this...... +#dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com +X +# Send RFC-3442 classless static routes (note the netmask encoding) +#dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8 +X +# Send vendor-class specific options encapsulated in DHCP option 43. +# The meaning of the options is defined by the vendor-class so +# options are sent only when the client supplied vendor class +# matches the class given here. (A substring match is OK, so "MSFT" +# matches "MSFT" and "MSFT 5.0"). This example sets the +# mtftp address to 0.0.0.0 for PXEClients. +#dhcp-option=vendor:PXEClient,1,0.0.0.0 +X +# Send microsoft-specific option to tell windows to release the DHCP lease +# when it shuts down. Note the "i" flag, to tell dnsmasq to send the +# value as a four-byte integer - that's what microsoft wants. See +# http://technet2.microsoft.com/WindowsServer/en/library/a70f1bb7-d2d4-49f0-96d6-4b7414ecfaae1033.mspx?mfr=true +dhcp-option=vendor:MSFT,2,1i +X +# Send the Encapsulated-vendor-class ID needed by some configurations of +# Etherboot to allow is to recognise the DHCP server. +#dhcp-option=vendor:Etherboot,60,"Etherboot" +X +# Send options to PXELinux. Note that we need to send the options even +# though they don't appear in the parameter request list, so we need +# to use dhcp-option-force here. +# See http://syslinux.zytor.com/pxe.php#special for details. +# Magic number - needed before anything else is recognised +#dhcp-option-force=208,f1:00:74:7e +# Configuration file name +#dhcp-option-force=209,configs/common +# Path prefix +#dhcp-option-force=210,/tftpboot/pxelinux/files/ +# Reboot time. (Note 'i' to send 32-bit value) +#dhcp-option-force=211,30i +X +# Set the boot filename for netboot/PXE. You will only need +# this is you want to boot machines over the network and you will need +# a TFTP server; either dnsmasq's built in TFTP server or an +# external one. (See below for how to enable the TFTP server.) +dhcp-boot=pxelinux.0 +X +# The same as above, but use custom tftp-server instead machine running dnsmasq +#dhcp-boot=pxelinux,server.name,192.168.1.100 +X +# Boot for Etherboot gPXE. The idea is to send two different +# filenames, the first loads gPXE, and the second tells gPXE what to +# load. The dhcp-match sets the gpxe tag for requests from gPXE. +#dhcp-match=set:gpxe,175 # gPXE sends a 175 option. +#dhcp-boot=tag:!gpxe,undionly.kpxe +#dhcp-boot=mybootimage +X +# Encapsulated options for Etherboot gPXE. All the options are +# encapsulated within option 175 +#dhcp-option=encap:175, 1, 5b # priority code +#dhcp-option=encap:175, 176, 1b # no-proxydhcp +#dhcp-option=encap:175, 177, string # bus-id +#dhcp-option=encap:175, 189, 1b # BIOS drive code +#dhcp-option=encap:175, 190, user # iSCSI username +#dhcp-option=encap:175, 191, pass # iSCSI password +X +# Test for the architecture of a netboot client. PXE clients are +# supposed to send their architecture as option 93. (See RFC 4578) +#dhcp-match=peecees, option:client-arch, 0 #x86-32 +#dhcp-match=itanics, option:client-arch, 2 #IA64 +#dhcp-match=hammers, option:client-arch, 6 #x86-64 +#dhcp-match=mactels, option:client-arch, 7 #EFI x86-64 +X +# Do real PXE, rather than just booting a single file, this is an +# alternative to dhcp-boot. +#pxe-prompt="What system shall I netboot?" +# or with timeout before first available action is taken: +#pxe-prompt="Press F8 for menu.", 60 +X +# Available boot services. for PXE. +#pxe-service=x86PC, "Boot from local disk" +X +# Loads /pxelinux.0 from dnsmasq TFTP server. +#pxe-service=x86PC, "Install Linux", pxelinux +X +# Loads /pxelinux.0 from TFTP server at 1.2.3.4. +# Beware this fails on old PXE ROMS. +#pxe-service=x86PC, "Install Linux", pxelinux, 1.2.3.4 +X +# Use bootserver on network, found my multicast or broadcast. +#pxe-service=x86PC, "Install windows from RIS server", 1 +X +# Use bootserver at a known IP address. +#pxe-service=x86PC, "Install windows from RIS server", 1, 1.2.3.4 +X +# If you have multicast-FTP available, +# information for that can be passed in a similar way using options 1 +# to 5. See page 19 of +# http://download.intel.com/design/archives/wfm/downloads/pxespec.pdf +X +X +# Enable dnsmasq's built-in TFTP server +enable-tftp +X +# Set the root directory for files available via FTP. +tftp-root=/opt/tftpboot +X +# Make the TFTP server more secure: with this set, only files owned by +# the user dnsmasq is running as will be send over the net. +#tftp-secure +X +# This option stops dnsmasq from negotiating a larger blocksize for TFTP +# transfers. It will slow things down, but may rescue some broken TFTP +# clients. +#tftp-no-blocksize +X +# Set the boot file name only when the "red" tag is set. +#dhcp-boot=net:red,pxelinux.red-net +X +# An example of dhcp-boot with an external TFTP server: the name and IP +# address of the server are given after the filename. +# Can fail with old PXE ROMS. Overridden by --pxe-service. +#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 +X +# If there are multiple external tftp servers having a same name +# (using /etc/hosts) then that name can be specified as the +# tftp_servername (the third option to dhcp-boot) and in that +# case dnsmasq resolves this name and returns the resultant IP +# addresses in round robin fasion. This facility can be used to +# load balance the tftp load among a set of servers. +#dhcp-boot=/var/ftpd/pxelinux.0,boothost,tftp_server_name +X +# Set the limit on DHCP leases, the default is 150 +dhcp-lease-max=2100 +X +# The DHCP server needs somewhere on disk to keep its lease database. +# This defaults to a sane location, but if you want to change it, use +# the line below. +#dhcp-leasefile=/var/lib/misc/dnsmasq.leases +leasefile-ro +X +# Set the DHCP server to authoritative mode. In this mode it will barge in +# and take over the lease for any client which broadcasts on the network, +# whether it has a record of the lease or not. This avoids long timeouts +# when a machine wakes up on a new network. DO NOT enable this if there's +# the slightest chance that you might end up accidentally configuring a DHCP +# server for your campus/company accidentally. The ISC server uses +# the same option, and this URL provides more information: +# http://www.isc.org/files/auth.html +#dhcp-authoritative +X +# Run an executable when a DHCP lease is created or destroyed. +# The arguments sent to the script are "add" or "del", +# then the MAC address, the IP address and finally the hostname +# if there is one. +#dhcp-script=/bin/echo +X +# Set the cachesize here. +#cache-size=150 +X +# If you want to disable negative caching, uncomment this. +#no-negcache +X +# Normally responses which come form /etc/hosts and the DHCP lease +# file have Time-To-Live set as zero, which conventionally means +# do not cache further. If you are happy to trade lower load on the +# server for potentially stale date, you can set a time-to-live (in +# seconds) here. +#local-ttl= +X +# If you want dnsmasq to detect attempts by Verisign to send queries +# to unregistered .com and .net hosts to its sitefinder service and +# have dnsmasq instead return the correct NXDOMAIN response, uncomment +# this line. You can add similar lines to do the same for other +# registries which have implemented wildcard A records. +#bogus-nxdomain=64.94.110.11 +X +# If you want to fix up DNS results from upstream servers, use the +# alias option. This only works for IPv4. +# This alias makes a result of 1.2.3.4 appear as 5.6.7.8 +#alias=1.2.3.4,5.6.7.8 +# and this maps 1.2.3.x to 5.6.7.x +#alias=1.2.3.0,5.6.7.0,255.255.255.0 +# and this maps 192.168.0.10->192.168.0.40 to 10.0.0.10->10.0.0.40 +#alias=192.168.0.10-192.168.0.40,10.0.0.0,255.255.255.0 +X +# Change these lines if you want dnsmasq to serve MX records. +X +# Return an MX record named "maildomain.com" with target +# servermachine.com and preference 50 +#mx-host=maildomain.com,servermachine.com,50 +X +# Set the default target for MX records created using the localmx option. +#mx-target=servermachine.com +X +# Return an MX record pointing to the mx-target for all local +# machines. +#localmx +X +# Return an MX record pointing to itself for all local machines. +#selfmx +X +# Change the following lines if you want dnsmasq to serve SRV +# records. These are useful if you want to serve ldap requests for +# Active Directory and other windows-originated DNS requests. +# See RFC 2782. +# You may add multiple srv-host lines. +# The fields are ,,,, +# If the domain part if missing from the name (so that is just has the +# service and protocol sections) then the domain given by the domain= +# config option is used. (Note that expand-hosts does not need to be +# set for this to work.) +X +# A SRV record sending LDAP for the example.com domain to +# ldapserver.example.com port 389 +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389 +X +# A SRV record sending LDAP for the example.com domain to +# ldapserver.example.com port 389 (using domain=) +#domain=example.com +#srv-host=_ldap._tcp,ldapserver.example.com,389 +X +# Two SRV records for LDAP, each with different priorities +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1 +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2 +X +# A SRV record indicating that there is no LDAP server for the domain +# example.com +#srv-host=_ldap._tcp.example.com +X +# The following line shows how to make dnsmasq serve an arbitrary PTR +# record. This is useful for DNS-SD. (Note that the +# domain-name expansion done for SRV records _does_not +# occur for PTR records.) +#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services" +X +# Change the following lines to enable dnsmasq to serve TXT records. +# These are used for things like SPF and zeroconf. (Note that the +# domain-name expansion done for SRV records _does_not +# occur for TXT records.) +X +#Example SPF. +#txt-record=example.com,"v=spf1 a -all" +X +#Example zeroconf +#txt-record=_http._tcp.example.com,name=value,paper=A4 +X +# Provide an alias for a "local" DNS name. Note that this _only_ works +# for targets which are names from DHCP or /etc/hosts. Give host +# "bert" another name, bertrand +#cname=bertand,bert +X +# For debugging purposes, log each DNS query as it passes through +# dnsmasq. +#log-queries +X +# Log lots of extra information about DHCP transactions. +#log-dhcp +X +log-facility=/var/log/dnsmasq.log +X +# Include a another lot of configuration options. +#conf-file=/etc/dnsmasq.more.conf +conf-dir=/etc/dnsmasq.d +X +dhcp-optsfile=/etc/dhcpopts.txt +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/dnsmasq.conf.tmpl' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/dnsmasq.conf.tmpl' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/dnsmasq.conf.tmpl failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/dnsmasq.conf.tmpl': 'MD5 check failed' + ) << \SHAR_EOF +a0f6d4fbdef769352c0b4c6aee0e5b0b cloud_scripts/etc/dnsmasq.conf.tmpl +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/dnsmasq.conf.tmpl'` -ne 25321 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/dnsmasq.conf.tmpl' is not 25321" + fi +fi +# ============= cloud_scripts/etc/cron.daily/clear_cache ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cron.daily/clear_cache' +then +${echo} "x - SKIPPING cloud_scripts/etc/cron.daily/clear_cache (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/cron.daily/clear_cache (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cron.daily/clear_cache' && +#!/bin/bash +X +# clear memory cache to ultimately reduce swapping +X +sync && echo 1 > /proc/sys/vm/drop_caches +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cron.daily/clear_cache' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/cron.daily/clear_cache' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/cron.daily/clear_cache failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cron.daily/clear_cache': 'MD5 check failed' + ) << \SHAR_EOF +7935ce340439ae62c8f12f337d420207 cloud_scripts/etc/cron.daily/clear_cache +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/cron.daily/clear_cache'` -ne 107 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/cron.daily/clear_cache' is not 107" + fi +fi +# ============= cloud_scripts/etc/vmware-tools/tools.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/vmware-tools/tools.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/vmware-tools/tools.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/vmware-tools/tools.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/vmware-tools/tools.conf' && +[logging] +# Turns on logging globally. It can still be disabled for each domain. +# log = true +X +# Disables core dumps on fatal errors; they're enabled by default. +enableCoreDump = false +X +# Defines the "vmsvc" domain, logging to file +# vmsvc.level = message +vmsvc.handler = file +# Setup file rotation - keep 3 files +vmsvc.maxOldLogFiles = 2 +# Max log file size kept: 1 MB +vmsvc.maxLogSize = 1 +X +# Defines the "vmtoolsd" domain, and disable logging for it. +# vmtoolsd.level = none +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/vmware-tools/tools.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/vmware-tools/tools.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/vmware-tools/tools.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/vmware-tools/tools.conf': 'MD5 check failed' + ) << \SHAR_EOF +4d08804e1a2d4526faeec6404c18fabe cloud_scripts/etc/vmware-tools/tools.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/vmware-tools/tools.conf'` -ne 477 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/vmware-tools/tools.conf' is not 477" + fi +fi +# ============= cloud_scripts/etc/logrotate.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.conf' && +# rotate log files daily +daily +# keep 3 days worth +rotate 3 +# create new (empty) log files after rotating old ones +create +# use date as a suffix of the rotated file +#dateext +# max size 50M +size 50M +compress +# RPM packages drop log rotation information into this directory +include /etc/logrotate.d +# no packages own wtmp and btmp -- we'll rotate them here +/var/log/wtmp { +X monthly +X create 0664 root utmp +X rotate 1 +} +/var/log/btmp { +X missingok +X monthly +X create 0600 root utmp +X rotate 1 +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.conf': 'MD5 check failed' + ) << \SHAR_EOF +2430f483d055288c92deb28733562d8f cloud_scripts/etc/logrotate.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.conf'` -ne 507 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.conf' is not 507" + fi +fi +# ============= cloud_scripts/etc/ssh/sshd_config ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ssh/sshd_config' +then +${echo} "x - SKIPPING cloud_scripts/etc/ssh/sshd_config (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/ssh/sshd_config (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ssh/sshd_config' && +# $OpenBSD: sshd_config,v 1.75 2007/03/19 01:01:29 djm Exp $ +X +# This is the sshd server system-wide configuration file. See +# sshd_config(5) for more information. +X +# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin +X +# The strategy used for options in the default sshd_config shipped with +# OpenSSH is to specify options with their default value where +# possible, but leave them commented. Uncommented options change a +# default value. +X +Port 3922 +#AddressFamily any +#ListenAddress 0.0.0.0 +X +# Disable legacy (protocol version 1) support in the server for new +# installations. In future the default will change to require explicit +# activation of protocol 1 +Protocol 2 +X +# HostKey for protocol version 1 +#HostKey /etc/ssh/ssh_host_key +# HostKeys for protocol version 2 +#HostKey /etc/ssh/ssh_host_rsa_key +#HostKey /etc/ssh/ssh_host_dsa_key +X +# Lifetime and size of ephemeral version 1 server key +#KeyRegenerationInterval 1h +#ServerKeyBits 768 +X +# Logging +# obsoletes QuietMode and FascistLogging +#SyslogFacility AUTH +SyslogFacility AUTHPRIV +#LogLevel INFO +X +# Authentication: +X +#LoginGraceTime 2m +PermitRootLogin yes +#StrictModes yes +#MaxAuthTries 6 +X +#RSAAuthentication yes +PubkeyAuthentication yes +AuthorizedKeysFile .ssh/authorized_keys +X +# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts +#RhostsRSAAuthentication no +# similar for protocol version 2 +#HostbasedAuthentication no +# Change to yes if you don't trust ~/.ssh/known_hosts for +# RhostsRSAAuthentication and HostbasedAuthentication +#IgnoreUserKnownHosts no +# Don't read the user's ~/.rhosts and ~/.shosts files +#IgnoreRhosts yes +X +# To disable tunneled clear text passwords, change to no here! +#PermitEmptyPasswords no +PasswordAuthentication no +X +# Change to no to disable s/key passwords +#ChallengeResponseAuthentication yes +ChallengeResponseAuthentication no +X +# Kerberos options +#KerberosAuthentication no +#KerberosOrLocalPasswd yes +#KerberosTicketCleanup yes +#KerberosGetAFSToken no +X +# GSSAPI options +#GSSAPIAuthentication no +GSSAPIAuthentication no +#GSSAPICleanupCredentials yes +GSSAPICleanupCredentials yes +X +# Set this to 'yes' to enable PAM authentication, account processing, +# and session processing. If this is enabled, PAM authentication will +# be allowed through the ChallengeResponseAuthentication and +# PasswordAuthentication. Depending on your PAM configuration, +# PAM authentication via ChallengeResponseAuthentication may bypass +# the setting of "PermitRootLogin without-password". +# If you just want the PAM account and session checks to run without +# PAM authentication, then enable this but set PasswordAuthentication +# and ChallengeResponseAuthentication to 'no'. +#UsePAM no +UsePAM yes +X +# Accept locale-related environment variables +AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES +AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT +AcceptEnv LC_IDENTIFICATION LC_ALL +#AllowTcpForwarding yes +#GatewayPorts no +#X11Forwarding no +#X11Forwarding yes +#X11DisplayOffset 10 +#X11UseLocalhost yes +#PrintMotd yes +#PrintLastLog yes +TCPKeepAlive yes +#UseLogin no +#UsePrivilegeSeparation yes +#PermitUserEnvironment no +#Compression delayed +#ClientAliveInterval 0 +#ClientAliveCountMax 3 +#ShowPatchLevel no +UseDNS no +#PidFile /var/run/sshd.pid +#PermitTunnel no +X +MaxStartups 1000 +MaxSessions 1000 +X +# no default banner path +#Banner /some/path +X +# override default of no subsystems +Subsystem sftp /usr/lib/openssh/sftp-server +X +# Example of overriding settings on a per-user basis +#Match User anoncvs +# X11Forwarding no +# AllowTcpForwarding no +# ForceCommand cvs server +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ssh/sshd_config' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/ssh/sshd_config' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/ssh/sshd_config failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ssh/sshd_config': 'MD5 check failed' + ) << \SHAR_EOF +842613e1f724e90888a90882ed1a5684 cloud_scripts/etc/ssh/sshd_config +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/ssh/sshd_config'` -ne 3603 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/ssh/sshd_config' is not 3603" + fi +fi +# ============= cloud_scripts/etc/ppp/options.xl2tpd ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ppp/options.xl2tpd' +then +${echo} "x - SKIPPING cloud_scripts/etc/ppp/options.xl2tpd (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/ppp/options.xl2tpd (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ppp/options.xl2tpd' && +proxyarp +ipcp-accept-local +ipcp-accept-remote +noccp +idle 1800 +auth +mtu 1410 +mru 1410 +nodefaultroute +debug +connect-delay 5000 +ms-dns 10.1.1.1 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ppp/options.xl2tpd' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/ppp/options.xl2tpd' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/ppp/options.xl2tpd failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ppp/options.xl2tpd': 'MD5 check failed' + ) << \SHAR_EOF +80ba26ac087aaf7f13cdc1fa8f985d72 cloud_scripts/etc/ppp/options.xl2tpd +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/ppp/options.xl2tpd'` -ne 141 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/ppp/options.xl2tpd' is not 141" + fi +fi +# ============= cloud_scripts/etc/ipsec.d/l2tp.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.d/l2tp.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/ipsec.d/l2tp.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/ipsec.d/l2tp.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.d/l2tp.conf' && +#ipsec remote access vpn configuration +conn L2TP-PSK +X authby=secret +X rekey=no +X keyingtries=3 +X leftfirewall=yes +X type=transport +X # +X # ---------------------------------------------------------- +X # The VPN server. +X # +X # Allow incoming connections on the external network interface. +X # If you want to use a different interface or if there is no +X # defaultroute, you can use: left=your.ip.addr.ess +X # +X left=172.26.0.151 +X # +X leftprotoport=udp/l2tp +X # If you insist on supporting non-updated Windows clients, +X # you can use: leftprotoport=17/%any +X # +X # ---------------------------------------------------------- +X # The remote user(s). +X # +X # Allow incoming connections only from this IP address. +X right=%any +X # If you want to allow multiple connections from any IP address, +X # you can use: right=%any +X # +X rightprotoport=udp/%any +X # +X # ---------------------------------------------------------- +X # Change 'ignore' to 'add' to enable this configuration. +X # +X rightsubnetwithin=0.0.0.0/0 +X auto=route +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.d/l2tp.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/ipsec.d/l2tp.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/ipsec.d/l2tp.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.d/l2tp.conf': 'MD5 check failed' + ) << \SHAR_EOF +8ca6cb315858c9ccf8c91374c4f32def cloud_scripts/etc/ipsec.d/l2tp.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.d/l2tp.conf'` -ne 1234 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.d/l2tp.conf' is not 1234" + fi +fi +# ============= cloud_scripts/etc/rsyslog.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/rsyslog.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/rsyslog.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/rsyslog.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/rsyslog.conf' && +# /etc/rsyslog.conf Configuration file for rsyslog. +# +# For more information see +# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html +X +X +################# +#### MODULES #### +################# +X +$ModLoad imuxsock # provides support for local system logging +$ModLoad imklog # provides kernel logging support (previously done by rklogd) +#$ModLoad immark # provides --MARK-- message capability +X +# provides UDP syslog reception +$ModLoad imudp +$UDPServerRun 3914 +X +# provides TCP syslog reception +#$ModLoad imtcp +#$InputTCPServerRun 514 +X +X +########################### +#### GLOBAL DIRECTIVES #### +########################### +X +# +# Use traditional timestamp format. +# To enable high precision timestamps, comment out the following line. +# +$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat +X +# +# Set the default permissions for all log files. +# +$FileOwner root +$FileGroup adm +$FileCreateMode 0640 +$DirCreateMode 0755 +$Umask 0022 +X +# +# Include all config files in /etc/rsyslog.d/ +# +$IncludeConfig /etc/rsyslog.d/*.conf +X +X +############### +#### RULES #### +############### +X +# +# First some standard log files. Log by facility. +# +auth,authpriv.* /var/log/auth.log +#*.*;auth,authpriv.none -/var/log/syslog +cron.* /var/log/cron.log +daemon.* -/var/log/daemon.log +kern.* -/var/log/kern.log +lpr.* -/var/log/lpr.log +mail.* -/var/log/mail.log +#user.* -/var/log/user.log +X +# +# Logging for the mail system. Split it up so that +# it is easy to write scripts to parse these files. +# +mail.info -/var/log/mail.info +mail.warn -/var/log/mail.warn +mail.err /var/log/mail.err +X +# +# Logging for INN news system. +# +news.crit /var/log/news/news.crit +news.err /var/log/news/news.err +news.notice -/var/log/news/news.notice +X +# +# Some "catch-all" log files. +# +#*.=debug;\ +# auth,authpriv.none;\ +# news.none;mail.none -/var/log/debug +*.=info;*.=notice;*.=warn;\ +X auth,authpriv.none;\ +X cron.none,daemon.none;\ +X local0.none,daemon.none;\ +X mail.none,news.none -/var/log/messages +X +# +# Emergencies are sent to everybody logged in. +# +*.emerg :omusrmsg:* +X +# +# I like to have messages displayed on the console, but only on a virtual +# console I usually leave idle. +# +#daemon,mail.*;\ +# news.=crit;news.=err;news.=notice;\ +# *.=debug;*.=info;\ +# *.=notice;*.=warn /dev/tty8 +X +local0.* -/var/log/haproxy.log +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/rsyslog.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/rsyslog.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/rsyslog.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/rsyslog.conf': 'MD5 check failed' + ) << \SHAR_EOF +1ae97a7bb7bd89a2a7c2e9507bd5c95f cloud_scripts/etc/rsyslog.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/rsyslog.conf'` -ne 2298 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/rsyslog.conf' is not 2298" + fi +fi +# ============= cloud_scripts/etc/modprobe.d/pcspkr.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/modprobe.d/pcspkr.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/modprobe.d/pcspkr.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/modprobe.d/pcspkr.conf (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/modprobe.d/pcspkr.conf +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/modprobe.d/pcspkr.conf': 'MD5 check failed' + ) << \SHAR_EOF +6dc1a7a74dfa22c4f3b37e8700b61658 cloud_scripts/etc/modprobe.d/pcspkr.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/modprobe.d/pcspkr.conf'` -ne 801 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/modprobe.d/pcspkr.conf' is not 801" + fi +fi +# ============= cloud_scripts/etc/modprobe.d/aesni_intel.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/modprobe.d/aesni_intel.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/modprobe.d/aesni_intel.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +blacklist aesni_intel +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/modprobe.d/aesni_intel.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/modprobe.d/aesni_intel.conf': 'MD5 check failed' + ) << \SHAR_EOF +45027ef77fea6dd170da8ea5e1ad1268 cloud_scripts/etc/modprobe.d/aesni_intel.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/modprobe.d/aesni_intel.conf'` -ne 807 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' is not 807" + fi +fi +# ============= cloud_scripts/etc/cron.hourly/clear_cache ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cron.hourly/clear_cache' +then +${echo} "x - SKIPPING cloud_scripts/etc/cron.hourly/clear_cache (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/cron.hourly/clear_cache (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cron.hourly/clear_cache' && +#!/bin/bash +X +# clear memory cache to ultimately reduce swapping +X +phymem=$(free|awk '/^Mem:/{print $2}') +if [ $phymem -lt 513000 ]; then +X sync && echo 1 > /proc/sys/vm/drop_caches +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cron.hourly/clear_cache' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/cron.hourly/clear_cache' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/cron.hourly/clear_cache failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cron.hourly/clear_cache': 'MD5 check failed' + ) << \SHAR_EOF +648c036aba1a5d72010bf11e0ec95147 cloud_scripts/etc/cron.hourly/clear_cache +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/cron.hourly/clear_cache'` -ne 183 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/cron.hourly/clear_cache' is not 183" + fi +fi +# ============= cloud_scripts/etc/apache2/conf-enabled/security.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/security.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/security.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/security.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/security.conf' && +ServerTokens Prod +ServerSignature Off +TraceEnable Off +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/security.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/security.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/security.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/security.conf': 'MD5 check failed' + ) << \SHAR_EOF +73e01a3d1cf4f93cb11afb4eb1a6f252 cloud_scripts/etc/apache2/conf-enabled/security.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/security.conf'` -ne 54 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/security.conf' is not 54" + fi +fi +# ============= cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' && +# event MPM +# StartServers: initial number of server processes to start +# MinSpareThreads: minimum number of worker threads which are kept spare +# MaxSpareThreads: maximum number of worker threads which are kept spare +# ThreadsPerChild: constant number of worker threads in each server process +# MaxRequestWorkers: maximum number of worker threads +# MaxConnectionsPerChild: maximum number of requests a server process serves + +X StartServers 1 +X MinSpareThreads 25 +X MaxSpareThreads 75 +X ThreadLimit 64 +X ThreadsPerChild 25 +X MaxRequestWorkers 30 +X MaxConnectionsPerChild 1000 + +X +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf': 'MD5 check failed' + ) << \SHAR_EOF +b05dce38d6618734e7f49eddcb8ac131 cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf'` -ne 669 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' is not 669" + fi +fi +# ============= cloud_scripts/etc/apache2/httpd.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/httpd.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/apache2/httpd.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/apache2/httpd.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/httpd.conf' && +# Empty +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/httpd.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/apache2/httpd.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/apache2/httpd.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/httpd.conf': 'MD5 check failed' + ) << \SHAR_EOF +2402d4d5cd982d8b74e5c4d62ab0b20b cloud_scripts/etc/apache2/httpd.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/httpd.conf'` -ne 8 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/httpd.conf' is not 8" + fi +fi +# ============= cloud_scripts/etc/apache2/vhost.template ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/vhost.template' +then +${echo} "x - SKIPPING cloud_scripts/etc/apache2/vhost.template (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/apache2/vhost.template (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/apache2/vhost.template +M/%9I3X*"3Q$:7)E8W1O0H)"6%L;&]W(&9R +M;VT@86QL"@D\+T1I3X*"@E38W)I<'1!;&EA0H)"4%L;&]W(&9R;VT@86QL"@D\+T1I3X*"@E%T%004-(15],3T=?1$E2?2]ET%004-(15],3T=?1$E2?2]A8V-E&5S($UU;'1I5FEE=W,@1F]L;&]W4WEM3&EN:W,*("`@("`@("!!;&QO +M=T]V97)R:61E($YO;F4*("`@("`@("!/2!F3X*"CPO5FER='5A +M;$AO2`O/@H)"4]P=&EO;G,@1F]L;&]W +M4WEM3&EN:W,*"0E!;&QO=T]V97)R:61E($YO;F4*"3PO1&ER96-T;W)Y/@H) +M/$1I2`O=F%R+W=W=R]H=&UL/@H)"4]P=&EO;G,@26YD97AE6U,:6YK2`B+W5S&5S($UU;'1I5FEE=W,@1F]L;&]W +M4WEM3&EN:W,*"0E!;&QO=T]V97)R:61E($YO;F4*"0E/2!F3X*"@DC($EN8VQU9&4@0T]2 +M4R!C;VYF:6=U2!A;F0@8V5R=&EF:6-A=&4@87)E('-T;W)E9"!I;B!T:&4@2!A<'!E;F1E9"!T;R!T:&4@2!O;F4*"2,@("!H=6=E(&9I;&4@8V]N=&%I +M;FEN9R!A;&P@;V8@=&AE;2`H9FEL92!M=7-T(&)E(%!%32!E;F-O9&5D*0H) +M(R`@($YO=&4Z($EN2!O;F4@:'5G92!F:6QE(&-O;G1A:6YI +M;F<@86QL"@DC("`@;V8@=&AE;2`H9FEL92!M=7-T(&)E(%!%32!E;F-O9&5D +M*0H)(R`@($YO=&4Z($EN7!E2!T:&4@8V5R=&EF:6-A=&4*"2,@("!I2!A8V-E2!C;VUP;&5X(&)O;VQE86X@97AP"!I*$58 +M4'Q.54Q,*2\@7`H)(R`@("`@("`@("`@(&%N9"`E>U-33%]#3$E%3E1?4U]$ +M3E]/?2!E<2`B4VYA:V4@3VEL+"!,=&0N(B!<"@DC("`@("`@("`@("`@86YD +M("5[4U-,7T-,245.5%]37T1.7T]5?2!I;B![(E-T869F(BP@(D-!(BP@(D1E +M=B)](%P*"2,@("`@("`@("`@("!A;F0@)7M424U%7U=$05E](#X](#$@86YD +M("5[5$E-15]71$%9?2`\/2`U(%P*"2,@("`@("`@("`@("!A;F0@)7M424U% +M7TA/55)](#X](#@@86YD("5[5$E-15](3U52?2`\/2`R,"`@("`@("`I(%P* +M"2,@("`@("`@("`@(&]R("5[4D5-3U1%7T%$1%)](#U^(&TO7C$Y,EPN-S9< +M+C$V,EPN6S`M.5TK)"\*"2,\+TQO8V%T:6]N/@H*"2,@("!34TP@16YG:6YE +M($]P=&EO;G,Z"@DC("`@4V5T('9A2!E;G1R>2!I;B!T:&4@=7-E<@H)(R`@("`@9FEL92!N +M965D'AJ,S%:351:>FM602'!O7,@97AI'!O +M2X*"2,@("!O +M(%-T2!A;GDB('-I='5A=&EO;BP@:2YE +M+B!W:&5N(&ET(&%P<&QI97,@86-C97-S(&ES(&1E;FEE9`H)(R`@("`@86YD +M(&YO(&]T:&5R(&UO9'5L92!C86X@8VAA;F=E(&ET+@H)(R`@(&\@3W!T4F5N +M96=O=&EA=&4Z"@DC("`@("!4:&ES(&5N86)L97,@;W!T:6UI>F5D(%-33"!C +M;VYN96-T:6]N(')E;F5G;W1I871I;VX@:&%N9&QI;F<@=VAE;B!34TP*"2,@ +M("`@(&1I2!C;VYT +M97AT+@H)(U-33$]P=&EO;G,@*T9A:V5"87-I8T%U=&@@*T5X<&]R=$-E2!A;&5R="!B=70@9&]E6]U(&YE +M960@82!D:69F97)E;G0@2P@6]U('5S=6%L;'D@861D:71I;VYA;&QY('=A +M;G0@=&\@9&ES86)L90H)(R`@(&ME97`M86QI=F4@9F]R('1H;W-E(&-L:65N +M=',L('1O;RX@57-E('9A2!-4TE%(&]N(%=I;F1O=W,@6%`N +M"B`@("!,:7-T96X@,3`N,2XQ+C$Z.#0T,PH\+TEF36]D=6QE/@H*/$EF36]D +M=6QE(&UO9%]G;G5T;',N8SX*("`@($QI/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/vhost.template': 'MD5 check failed' + ) << \SHAR_EOF +e42ce7d6f871a7efa7a3c0e164f75dfc cloud_scripts/etc/apache2/vhost.template +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/vhost.template'` -ne 9955 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/vhost.template' is not 9955" + fi +fi +# ============= cloud_scripts/etc/vpcdnsmasq.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/vpcdnsmasq.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/vpcdnsmasq.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/vpcdnsmasq.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/vpcdnsmasq.conf' && +# Configuration file for dnsmasq. +# +# Format is one option per line, legal options are the same +# as the long options legal on the command line. See +# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. +X +# The following two options make you a better netizen, since they +# tell dnsmasq to filter out queries which the public DNS cannot +# answer, and which load the servers (especially the root servers) +# uneccessarily. If you have a dial-on-demand link they also stop +# these requests from bringing up the link uneccessarily. +X +# Never forward plain names (without a dot or domain part) +domain-needed +# Never forward addresses in the non-routed address spaces. +bogus-priv +X +X +# Uncomment this to filter useless windows-originated DNS requests +# which can trigger dial-on-demand links needlessly. +# Note that (amongst other things) this blocks all SRV requests, +# so don't use it if you use eg Kerberos. +# This option only affects forwarding, SRV records originating for +# dnsmasq (via srv-host= lines) are not suppressed by it. +#filterwin2k +X +# Change this line if you want dns to get its upstream servers from +# somewhere other that /etc/resolv.conf +resolv-file=/etc/dnsmasq-resolv.conf +X +# By default, dnsmasq will send queries to any of the upstream +# servers it knows about and tries to favour servers to are known +# to be up. Uncommenting this forces dnsmasq to try each query +# with each server strictly in the order they appear in +# /etc/resolv.conf +#strict-order +X +# If you don't want dnsmasq to read /etc/resolv.conf or any other +# file, getting its servers from this file instead (see below), then +# uncomment this. +#no-resolv +X +# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv +# files for changes and re-read them then uncomment this. +#no-poll +X +# Add other name servers here, with domain specs if they are for +# non-public domains. +#server=/localnet/192.168.0.1 +X +# Example of routing PTR queries to nameservers: this will send all +# address->name queries for 192.168.3/24 to nameserver 10.1.2.3 +#server=/3.168.192.in-addr.arpa/10.1.2.3 +X +# Add local-only domains here, queries in these domains are answered +# from /etc/hosts or DHCP only. +local=/2.vmops-test.vmops.com/ +X +# Add domains which you want to force to an IP address here. +# The example below send any host in doubleclick.net to a local +# webserver. +#address=/doubleclick.net/127.0.0.1 +X +# If you want dnsmasq to change uid and gid to something other +# than the default, edit the following lines. +#user= +#group= +X +# If you want dnsmasq to listen for DHCP and DNS requests only on +# specified interfaces (and the loopback) give the name of the +# interface (eg eth0) here. +# Repeat the line for more than one interface. +#interface=eth0 +X +# Or you can specify which interface _not_ to listen on +except-interface=lo +X +# Or which to listen on by address (remember to include 127.0.0.1 if +# you use this.) +#listen-address= +# If you want dnsmasq to provide only DNS service on an interface, +# configure it as shown above, and then use the following line to +# disable DHCP on it. +#no-dhcp-interface=eth1 +X +# On systems which support it, dnsmasq binds the wildcard address, +# even when it is listening on only some interfaces. It then discards +# requests that it shouldn't reply to. This has the advantage of +# working even when interfaces come and go and change address. If you +# want dnsmasq to really bind only the interfaces it is listening on, +# uncomment this option. About the only time you may need this is when +# running another nameserver on the same machine. +#bind-interfaces +X +# If you don't want dnsmasq to read /etc/hosts, uncomment the +# following line. +#no-hosts +# or if you want it to read another file, as well as /etc/hosts, use +# this. +#addn-hosts=/etc/banner_add_hosts +X +# Set this (and domain: see below) if you want to have a domain +# automatically added to simple names in a hosts-file. +expand-hosts +X +# Set the domain for dnsmasq. this is optional, but if it is set, it +# does the following things. +# 1) Allows DHCP hosts to have fully qualified domain names, as long +# as the domain part matches this setting. +# 2) Sets the "domain" DHCP option thereby potentially setting the +# domain of all systems configured by DHCP +# 3) Provides the domain part for "expand-hosts" +#domain=2.vmops-test.vmops.com +X +# Uncomment this to enable the integrated DHCP server, you need +# to supply the range of addresses available for lease and optionally +# a lease time. If you have more than one network, you will need to +# repeat this for each network on which you want to supply DHCP +# service. +#dhcp-range=10.1.1.1,static +#dhcp-range=10.0.0.1,10.255.255.255 +#dhcp-hostsfile=/etc/dhcphosts.txt +X +# This is an example of a DHCP range where the netmask is given. This +# is needed for networks we reach the dnsmasq DHCP server via a relay +# agent. If you don't know what a DHCP relay agent is, you probably +# don't need to worry about this. +#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h +X +# This is an example of a DHCP range with a network-id, so that +# some DHCP options may be set only for this network. +#dhcp-range=red,192.168.0.50,192.168.0.150 +X +# Supply parameters for specified hosts using DHCP. There are lots +# of valid alternatives, so we will give examples of each. Note that +# IP addresses DO NOT have to be in the range given above, they just +# need to be on the same network. The order of the parameters in these +# do not matter, it's permissble to give name,adddress and MAC in any order +X +# Always allocate the host with ethernet address 11:22:33:44:55:66 +# The IP address 192.168.0.60 +#dhcp-host=11:22:33:44:55:66,192.168.0.60 +X +# Always set the name of the host with hardware address +# 11:22:33:44:55:66 to be "fred" +#dhcp-host=11:22:33:44:55:66,fred +X +# Always give the host with ethernet address 11:22:33:44:55:66 +# the name fred and IP address 192.168.0.60 and lease time 45 minutes +#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m +X +# Give the machine which says it's name is "bert" IP address +# 192.168.0.70 and an infinite lease +#dhcp-host=bert,192.168.0.70,infinite +X +# Always give the host with client identifier 01:02:02:04 +# the IP address 192.168.0.60 +#dhcp-host=id:01:02:02:04,192.168.0.60 +X +# Always give the host with client identifier "marjorie" +# the IP address 192.168.0.60 +#dhcp-host=id:marjorie,192.168.0.60 +X +# Enable the address given for "judge" in /etc/hosts +# to be given to a machine presenting the name "judge" when +# it asks for a DHCP lease. +#dhcp-host=judge +X +# Never offer DHCP service to a machine whose ethernet +# address is 11:22:33:44:55:66 +#dhcp-host=11:22:33:44:55:66,ignore +X +# Ignore any client-id presented by the machine with ethernet +# address 11:22:33:44:55:66. This is useful to prevent a machine +# being treated differently when running under different OS's or +# between PXE boot and OS boot. +#dhcp-host=11:22:33:44:55:66,id:* +X +# Send extra options which are tagged as "red" to +# the machine with ethernet address 11:22:33:44:55:66 +#dhcp-host=11:22:33:44:55:66,net:red +X +# Send extra options which are tagged as "red" to +# any machine with ethernet address starting 11:22:33: +#dhcp-host=11:22:33:*:*:*,net:red +X +# Ignore any clients which are specified in dhcp-host lines +# or /etc/ethers. Equivalent to ISC "deny unkown-clients". +# This relies on the special "known" tag which is set when +# a host is matched. +#dhcp-ignore=#known +X +# Send extra options which are tagged as "red" to any machine whose +# DHCP vendorclass string includes the substring "Linux" +#dhcp-vendorclass=red,Linux +X +# Send extra options which are tagged as "red" to any machine one +# of whose DHCP userclass strings includes the substring "accounts" +#dhcp-userclass=red,accounts +X +# Send extra options which are tagged as "red" to any machine whose +# MAC address matches the pattern. +#dhcp-mac=red,00:60:8C:*:*:* +X +# If this line is uncommented, dnsmasq will read /etc/ethers and act +# on the ethernet-address/IP pairs found there just as if they had +# been given as --dhcp-host options. Useful if you keep +# MAC-address/host mappings there for other purposes. +#read-ethers +X +# Send options to hosts which ask for a DHCP lease. +# See RFC 2132 for details of available options. +# Common options can be given to dnsmasq by name: +# run "dnsmasq --help dhcp" to get a list. +# Note that all the common settings, such as netmask and +# broadcast address, DNS server and default route, are given +# sane defaults by dnsmasq. You very likely will not need +# any dhcp-options. If you use Windows clients and Samba, there +# are some options which are recommended, they are detailed at the +# end of this section. +X +# Override the default route supplied by dnsmasq, which assumes the +# router is the same machine as the one running dnsmasq. +#dhcp-option=3,1.2.3.4 +X +# Do the same thing, but using the option name +#dhcp-option=option:router,1.2.3.4 +X +# Override the default route supplied by dnsmasq and send no default +# route at all. Note that this only works for the options sent by +# default (1, 3, 6, 12, 28) the same line will send a zero-length option +# for all other option numbers. +#dhcp-option=3 +X +# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 +#dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5 +X +# Set the NTP time server address to be the same machine as +# is running dnsmasq +#dhcp-option=42,0.0.0.0 +X +# Set the NIS domain name to "welly" +#dhcp-option=40,welly +X +# Set the default time-to-live to 50 +#dhcp-option=23,50 +X +# Set the "all subnets are local" flag +#dhcp-option=27,1 +X +# Set the domain +dhcp-option=15,"2.vmops-test.vmops.com" +X +# Send the etherboot magic flag and then etherboot options (a string). +#dhcp-option=128,e4:45:74:68:00:00 +#dhcp-option=129,NIC=eepro100 +X +# Specify an option which will only be sent to the "red" network +# (see dhcp-range for the declaration of the "red" network) +# Note that the net: part must precede the option: part. +#dhcp-option = net:red, option:ntp-server, 192.168.1.1 +X +# The following DHCP options set up dnsmasq in the same way as is specified +# for the ISC dhcpcd in +# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt +# adapted for a typical dnsmasq installation where the host running +# dnsmasq is also the host running samba. +# you may want to uncomment them if you use Windows clients and Samba. +#dhcp-option=19,0 # option ip-forwarding off +#dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) +#dhcp-option=45,0.0.0.0 # netbios datagram distribution server +#dhcp-option=46,8 # netbios node type +#dhcp-option=47 # empty netbios scope. +X +# Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client +# probably doesn't support this...... +#dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com +X +# Send RFC-3442 classless static routes (note the netmask encoding) +#dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8 +X +# Send vendor-class specific options encapsulated in DHCP option 43. +# The meaning of the options is defined by the vendor-class so +# options are sent only when the client supplied vendor class +# matches the class given here. (A substring match is OK, so "MSFT" +# matches "MSFT" and "MSFT 5.0"). This example sets the +# mtftp address to 0.0.0.0 for PXEClients. +#dhcp-option=vendor:PXEClient,1,0.0.0.0 +X +# Send microsoft-specific option to tell windows to release the DHCP lease +# when it shuts down. Note the "i" flag, to tell dnsmasq to send the +# value as a four-byte integer - that's what microsoft wants. See +# http://technet2.microsoft.com/WindowsServer/en/library/a70f1bb7-d2d4-49f0-96d6-4b7414ecfaae1033.mspx?mfr=true +dhcp-option=vendor:MSFT,2,1i +X +# Send the Encapsulated-vendor-class ID needed by some configurations of +# Etherboot to allow is to recognise the DHCP server. +#dhcp-option=vendor:Etherboot,60,"Etherboot" +X +# Send options to PXELinux. Note that we need to send the options even +# though they don't appear in the parameter request list, so we need +# to use dhcp-option-force here. +# See http://syslinux.zytor.com/pxe.php#special for details. +# Magic number - needed before anything else is recognised +#dhcp-option-force=208,f1:00:74:7e +# Configuration file name +#dhcp-option-force=209,configs/common +# Path prefix +#dhcp-option-force=210,/tftpboot/pxelinux/files/ +# Reboot time. (Note 'i' to send 32-bit value) +#dhcp-option-force=211,30i +X +# Set the boot filename for BOOTP. You will only need +# this is you want to boot machines over the network and you will need +# a TFTP server; either dnsmasq's built in TFTP server or an +# external one. (See below for how to enable the TFTP server.) +#dhcp-boot=pxelinux.0 +X +# Enable dnsmasq's built-in TFTP server +#enable-tftp +X +# Set the root directory for files availble via FTP. +#tftp-root=/var/ftpd +X +# Make the TFTP server more secure: with this set, only files owned by +# the user dnsmasq is running as will be send over the net. +#tftp-secure +X +# Set the boot file name only when the "red" tag is set. +#dhcp-boot=net:red,pxelinux.red-net +X +# An example of dhcp-boot with an external server: the name and IP +# address of the server are given after the filename. +#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 +X +# Set the limit on DHCP leases, the default is 150 +dhcp-lease-max=2100 +X +# The DHCP server needs somewhere on disk to keep its lease database. +# This defaults to a sane location, but if you want to change it, use +# the line below. +#dhcp-leasefile=/var/lib/misc/dnsmasq.leases +leasefile-ro +X +# Set the DHCP server to authoritative mode. In this mode it will barge in +# and take over the lease for any client which broadcasts on the network, +# whether it has a record of the lease or not. This avoids long timeouts +# when a machine wakes up on a new network. DO NOT enable this if there's +# the slighest chance that you might end up accidentally configuring a DHCP +# server for your campus/company accidentally. The ISC server uses +# the same option, and this URL provides more information: +# http://www.isc.org/index.pl?/sw/dhcp/authoritative.php +#dhcp-authoritative +X +# Run an executable when a DHCP lease is created or destroyed. +# The arguments sent to the script are "add" or "del", +# then the MAC address, the IP address and finally the hostname +# if there is one. +#dhcp-script=/bin/echo +X +# Set the cachesize here. +#cache-size=150 +X +# If you want to disable negative caching, uncomment this. +#no-negcache +X +# Normally responses which come form /etc/hosts and the DHCP lease +# file have Time-To-Live set as zero, which conventionally means +# do not cache further. If you are happy to trade lower load on the +# server for potentially stale date, you can set a time-to-live (in +# seconds) here. +#local-ttl= +X +# If you want dnsmasq to detect attempts by Verisign to send queries +# to unregistered .com and .net hosts to its sitefinder service and +# have dnsmasq instead return the correct NXDOMAIN response, uncomment +# this line. You can add similar lines to do the same for other +# registries which have implemented wildcard A records. +#bogus-nxdomain=64.94.110.11 +X +# If you want to fix up DNS results from upstream servers, use the +# alias option. This only works for IPv4. +# This alias makes a result of 1.2.3.4 appear as 5.6.7.8 +#alias=1.2.3.4,5.6.7.8 +# and this maps 1.2.3.x to 5.6.7.x +#alias=1.2.3.0,5.6.7.0,255.255.255.0 +X +X +# Change these lines if you want dnsmasq to serve MX records. +X +# Return an MX record named "maildomain.com" with target +# servermachine.com and preference 50 +#mx-host=maildomain.com,servermachine.com,50 +X +# Set the default target for MX records created using the localmx option. +#mx-target=servermachine.com +X +# Return an MX record pointing to the mx-target for all local +# machines. +#localmx +X +# Return an MX record pointing to itself for all local machines. +#selfmx +X +# Change the following lines if you want dnsmasq to serve SRV +# records. These are useful if you want to serve ldap requests for +# Active Directory and other windows-originated DNS requests. +# See RFC 2782. +# You may add multiple srv-host lines. +# The fields are ,,,, +# If the domain part if missing from the name (so that is just has the +# service and protocol sections) then the domain given by the domain= +# config option is used. (Note that expand-hosts does not need to be +# set for this to work.) +X +# A SRV record sending LDAP for the example.com domain to +# ldapserver.example.com port 289 +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389 +X +# A SRV record sending LDAP for the example.com domain to +# ldapserver.example.com port 289 (using domain=) +###domain=example.com +#srv-host=_ldap._tcp,ldapserver.example.com,389 +X +# Two SRV records for LDAP, each with different priorities +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1 +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2 +X +# A SRV record indicating that there is no LDAP server for the domain +# example.com +#srv-host=_ldap._tcp.example.com +X +# The following line shows how to make dnsmasq serve an arbitrary PTR +# record. This is useful for DNS-SD. (Note that the +# domain-name expansion done for SRV records _does_not +# occur for PTR records.) +#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services" +X +# Change the following lines to enable dnsmasq to serve TXT records. +# These are used for things like SPF and zeroconf. (Note that the +# domain-name expansion done for SRV records _does_not +# occur for TXT records.) +X +#Example SPF. +#txt-record=example.com,"v=spf1 a -all" +X +#Example zeroconf +#txt-record=_http._tcp.example.com,name=value,paper=A4 +X +X +# For debugging purposes, log each DNS query as it passes through +# dnsmasq. +#log-queries +X +# Log lots of extra information about DHCP transactions. +#log-dhcp +X +log-facility=/var/log/dnsmasq.log +X +# Include a another lot of configuration options. +#conf-file=/etc/dnsmasq.more.conf +conf-dir=/etc/dnsmasq.d +X +dhcp-optsfile=/etc/dhcpopts.txt +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/vpcdnsmasq.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/vpcdnsmasq.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/vpcdnsmasq.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/vpcdnsmasq.conf': 'MD5 check failed' + ) << \SHAR_EOF +0b53d152c88ebce3ee09d8e9c8addd6b cloud_scripts/etc/vpcdnsmasq.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/vpcdnsmasq.conf'` -ne 17942 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/vpcdnsmasq.conf' is not 17942" + fi +fi +# ============= cloud_scripts/etc/ipsec.secrets ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.secrets' +then +${echo} "x - SKIPPING cloud_scripts/etc/ipsec.secrets (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/ipsec.secrets (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.secrets' && +include /var/lib/strongswan/ipsec.conf.inc +include /etc/ipsec.d/ipsec.*.secrets +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.secrets' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/ipsec.secrets' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/ipsec.secrets failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.secrets': 'MD5 check failed' + ) << \SHAR_EOF +7ab0bddd5ec64ebda91cf3c5262fef2d cloud_scripts/etc/ipsec.secrets +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.secrets'` -ne 80 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.secrets' is not 80" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/dnsmasq ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/dnsmasq' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/dnsmasq (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/dnsmasq (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/dnsmasq' && +/var/log/dnsmasq.log { +X maxsize 10M +X missingok +X rotate 5 +X notifempty +X delaycompress +X sharedscripts +X postrotate +X [ ! -f /var/run/dnsmasq/dnsmasq.pid ] || kill -USR2 `cat /var/run/dnsmasq/dnsmasq.pid` +X endscript +X create 0640 dnsmasq root +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/dnsmasq' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/dnsmasq' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/dnsmasq failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/dnsmasq': 'MD5 check failed' + ) << \SHAR_EOF +e42458bd875605d1cd625f0596b38d4c cloud_scripts/etc/logrotate.d/dnsmasq +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/dnsmasq'` -ne 272 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/dnsmasq' is not 272" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/cloud ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/cloud' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/cloud (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/cloud (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/cloud' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +/var/log/cloud.log { +X rotate 10 +X maxsize 10M +X missingok +X notifempty +X compress +X # CLOUDSTACK-9155: We cannot tell the processes that are writing to this +X # file to use the new inode, so instead we copy the original file, truncate +X # it and keep the same inode. +X copytruncate +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/cloud' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/cloud' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/cloud failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/cloud': 'MD5 check failed' + ) << \SHAR_EOF +f83a4d4cf36adb81699ac5892bf6c6f5 cloud_scripts/etc/logrotate.d/cloud +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/cloud'` -ne 1124 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/cloud' is not 1124" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/conntrackd ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/conntrackd' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/conntrackd (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/conntrackd (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/conntrackd' && +/var/log/conntrackd-stats.log { +X maxsize 10M +X rotate 2 +X missingok +X compress +X delaycompress +X +X postrotate +X if [ -e /var/run/conntrackd.sock ]; then +X /usr/sbin/invoke-rc.d conntrackd restart > /dev/null +X fi +X endscript +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/conntrackd' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/conntrackd' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/conntrackd failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/conntrackd': 'MD5 check failed' + ) << \SHAR_EOF +334d9dd543fcb9c8682b4b8fc3987c4c cloud_scripts/etc/logrotate.d/conntrackd +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/conntrackd'` -ne 263 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/conntrackd' is not 263" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/monitor ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/monitor' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/monitor (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/monitor (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/monitor' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +/var/log/monitor.log { +X rotate 5 +X maxsize 10M +X missingok +X notifempty +X compress +X copytruncate +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/monitor' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/monitor' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/monitor failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/monitor': 'MD5 check failed' + ) << \SHAR_EOF +dbf4af64f49d5ffbf4a725cca714ccd0 cloud_scripts/etc/logrotate.d/monitor +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/monitor'` -ne 922 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/monitor' is not 922" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/routerServiceMonitor ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/routerServiceMonitor (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/routerServiceMonitor (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +/var/log/routerServiceMonitor.log { +X rotate 5 +X maxsize 10M +X missingok +X notifempty +X compress +X copytruncate +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/routerServiceMonitor failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/routerServiceMonitor': 'MD5 check failed' + ) << \SHAR_EOF +0f7968ad2bdbb870fa6a7f55565003c1 cloud_scripts/etc/logrotate.d/routerServiceMonitor +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/routerServiceMonitor'` -ne 935 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' is not 935" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/ppp ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/ppp' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/ppp (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/ppp (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/ppp' && +/var/log/ppp-connect-errors { +X maxsize 10M +X rotate 5 +X missingok +X notifempty +X compress +X nocreate +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/ppp' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/ppp' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/ppp failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/ppp': 'MD5 check failed' + ) << \SHAR_EOF +7d16a52cb372773845f812e51f52318f cloud_scripts/etc/logrotate.d/ppp +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/ppp'` -ne 98 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/ppp' is not 98" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/apache2 ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/apache2' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/apache2 (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/apache2 (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/apache2' && +/var/log/apache2/*.log { +X missingok +X copytruncate +X rotate 3 +X compress +X dateext +X maxsize 10M +X notifempty +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/apache2' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/apache2' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/apache2 failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/apache2': 'MD5 check failed' + ) << \SHAR_EOF +eefd54e0be665bd8a76a7aebee89d6d5 cloud_scripts/etc/logrotate.d/apache2 +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/apache2'` -ne 148 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/apache2' is not 148" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/rsyslog ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/rsyslog' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/rsyslog (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/rsyslog (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/rsyslog' && +/var/log/syslog +{ +X rotate 7 +X maxsize 10M +X missingok +X notifempty +X compress +X postrotate +X /usr/sbin/invoke-rc.d rsyslog rotate > /dev/null +X endscript +} +X +/var/log/mail.info +/var/log/mail.warn +/var/log/mail.err +/var/log/mail.log +/var/log/daemon.log +/var/log/kern.log +/var/log/auth.log +/var/log/user.log +/var/log/lpr.log +/var/log/cron.log +/var/log/debug +/var/log/messages +{ +X rotate 10 +X maxsize 10M +X missingok +X notifempty +X compress +X sharedscripts +X postrotate +X /usr/sbin/invoke-rc.d rsyslog rotate > /dev/null +X endscript +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/rsyslog' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/rsyslog' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/rsyslog failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/rsyslog': 'MD5 check failed' + ) << \SHAR_EOF +b4409ff800ad8ac42c79f412d6b90094 cloud_scripts/etc/logrotate.d/rsyslog +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/rsyslog'` -ne 517 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/rsyslog' is not 517" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/haproxy ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/haproxy' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/haproxy (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/haproxy (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/haproxy' && +/var/log/haproxy.log { +X rotate 5 +X missingok +X notifempty +X maxsize 10M +X postrotate +X /bin/kill -HUP `cat /var/run/rsyslog.pid 2> /dev/null` 2> /dev/null || true +X endscript +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/haproxy' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/haproxy' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/haproxy failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/haproxy': 'MD5 check failed' + ) << \SHAR_EOF +e584fdf0d2a25578f651fccce265ff09 cloud_scripts/etc/logrotate.d/haproxy +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/haproxy'` -ne 194 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/haproxy' is not 194" + fi +fi +# ============= cloud_scripts/etc/profile.d/cloud.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/profile.d/cloud.sh' +then +${echo} "x - SKIPPING cloud_scripts/etc/profile.d/cloud.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/profile.d/cloud.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/profile.d/cloud.sh' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +if [ "`id -u`" -eq 0 ]; then +X PATH=${PATH}:/opt/cloud/bin +fi +export PATH +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/profile.d/cloud.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/profile.d/cloud.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/profile.d/cloud.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/profile.d/cloud.sh': 'MD5 check failed' + ) << \SHAR_EOF +78e5d1f4d852b0af96f8b2efa5245c86 cloud_scripts/etc/profile.d/cloud.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/profile.d/cloud.sh'` -ne 861 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/profile.d/cloud.sh' is not 861" + fi +fi +# ============= cloud_scripts/etc/cloud-nic.rules ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cloud-nic.rules' +then +${echo} "x - SKIPPING cloud_scripts/etc/cloud-nic.rules (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/cloud-nic.rules (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cloud-nic.rules' && +SUBSYSTEM=="net" KERNEL=="eth*" RUN+="/opt/cloud/bin/cloud-nic.sh $env{ACTION} %k" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cloud-nic.rules' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/cloud-nic.rules' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/cloud-nic.rules failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cloud-nic.rules': 'MD5 check failed' + ) << \SHAR_EOF +4ffd506afaa6a69a55ba9ab6bbf706f5 cloud_scripts/etc/cloud-nic.rules +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/cloud-nic.rules'` -ne 83 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/cloud-nic.rules' is not 83" + fi +fi +# ============= cloud_scripts/etc/haproxy/haproxy.cfg ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/haproxy/haproxy.cfg' +then +${echo} "x - SKIPPING cloud_scripts/etc/haproxy/haproxy.cfg (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/haproxy/haproxy.cfg (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/haproxy/haproxy.cfg' && +global +X log 127.0.0.1:3914 local0 info +X chroot /var/lib/haproxy +X user haproxy +X group haproxy +X daemon +X +defaults +X log global +X mode tcp +X option dontlognull +X retries 3 +X option redispatch +X option forwardfor +X stats enable +X stats uri /admin?stats +X stats realm Haproxy\ Statistics +X stats auth admin1:AdMiN123 +X option forceclose +X timeout connect 5000 +X timeout client 50000 +X timeout server 50000 +X +X +listen cloud-default +X bind 0.0.0.0:35999 +X option transparent +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/haproxy/haproxy.cfg' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/haproxy/haproxy.cfg' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/haproxy/haproxy.cfg failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/haproxy/haproxy.cfg': 'MD5 check failed' + ) << \SHAR_EOF +a554fcecbaff9747723f9cd3aedf1ffd cloud_scripts/etc/haproxy/haproxy.cfg +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/haproxy/haproxy.cfg'` -ne 483 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/haproxy/haproxy.cfg' is not 483" + fi +fi +# ============= cloud_scripts/usr/share/cloud/cloud-scripts.tar ============== +if test ! -d 'cloud_scripts/usr/share/cloud'; then + mkdir 'cloud_scripts/usr/share/cloud' +if test $? -eq 0 +then ${echo} "x - created directory cloud_scripts/usr/share/cloud." +else ${echo} "x - failed to create directory cloud_scripts/usr/share/cloud." + exit 1 +fi +fi +if test -n "${keep_file}" && test -f 'cloud_scripts/usr/share/cloud/cloud-scripts.tar' +then +${echo} "x - SKIPPING cloud_scripts/usr/share/cloud/cloud-scripts.tar (file already exists)" + +else +${echo} "x - extracting cloud_scripts/usr/share/cloud/cloud-scripts.tar (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/usr/share/cloud/cloud-scripts.tar +M971C+P`````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````#`P,#`W-34`,#`P,37-T96U-87A& +M:6QE4VEZ93TQ,$T*4G5N=&EM94UA>%5S93TR,$T*```````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````971C+W-Y7-T +M96TO:'EP97)V+61A96UO;G,N:'8M=G-S+61A96UO;BYS97)V:6-E```````` +M````````````````````````````````````````````````````,#`P,#8T +M-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,S0`,3,V,C4Q-3`S,30`,#(S +M,37!E2!S97)V:6-E("A64U,I(&1A96UO;@H*6U-E&5C4W1A3UM=6QT:2UU7-T96UD+W-Y2UC;VYF +M:63TO=7-R+VQO8V%L+V-L;W5D+W-Y7-T96TO;W!E;BUV;2UT;V]L3UM=6QT:2UU3UM=6QT:2UU7-T96UD+W-Y&5N+FUO=6YT"D)E9F]R93UN971W;W)K+G1A2UC;VYF:6&5C4W1A&5C4W1A3UM=6QT:2UU7-T96TO:'EP97)V+61A96UO;G,N:'8M +M9F-O<'DM9&%E;6]N+G-E7!E2!S97)V:6-E("A&0T]062D@9&%E;6]N"D-O +M;F1I=&EO;E!A=&A%>&ES=',]+V1E=B]V;6)U0H*6U-E3UM=6QT:2UU7-T96TO8VQO=60M +M<&]S=&EN:70N2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N0`````````````````````````````````````````````` +M`````````````````````````````````````````#`P,#`V-#0`,#`P,36]U(&UA>2!N;W0@=7-E +M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI +M8V5N7!E(#$S("UJ($123U`*+4$@24Y0550@+7`@:6-M<"`M:B!!0T-%4%0* +M+4$@24Y0550@+6D@971H,2`M<"!T8W`@+6T@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* +M(R`@(&AT='`Z+R]W=W7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E +M<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H +M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N +M2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H +M92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R +M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T +M"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7-C=&P@8V]N9FEG=7)A +M=&EO;B!F:6QE"B,*(R!&;W(@8FEN87)Y('9A;'5E7-C=&PN +M8V]N9B@U*2!F;W(@;6]R92!D971A:6QS+@HC($!615)324].0`H*(R!#;VYT +M2!T:&5R +M96)Y(')E9'5C:6YG('1H92!S:7IE(&]F(&1I&PR='!D+WAL +M,G1P9"YC;VYF```````````````````````````````````````````````` +M````````````````````````````````````````````````````````,#`P +M,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,3,`,3,U-C$W,C4Q-3(` +M,#$T-#4U`"`P```````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````'5S=&%R("``9&%R65S"G!P<&]P=&9I;&4@/2`@("`O971C+W!P<"]O<'1I;VYS +M+GAL,G1P9`H````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````971C+V1N2!D:7-A8FQE +MF5N+"!S:6YC92!T:&5Y"B,@=&5L;"!D +M;G-M87-Q('1O(&9I;'1E2X@268@>6]U(&AA=F4@82!D:6%L+6]N+61E;6%N9"!L:6YK('1H97D@ +M86QS;R!S=&]P"B,@=&AE6]U('=A;G0@9&YS('1O(&=E="!I=',@=7!S=')E86T@2`@(&%P<&5A2!O=&AE<@HC(&9I +M;&4L(&=E='1I;F<@:71S('-E2!O;@HC('-P96-I9FEE9"!I;G1E +M&-E<'0M:6YT97)F86-E/65T:#$*97AC97!T+6EN +M=&5R9F%C93UE=&@R"F5X8V5P="UI;G1E6]U('=A;G0@9&YS;6%S<2!T;R!P6]U"B,@=V%N="!D;G-M +M87-Q('1O(')E86QL>2!B:6YD(&]N;'D@=&AE(&EN=&5R9F%C97,@:70@:7,@ +M;&ES=&5N:6YG(&]N+`HC('5N8V]M;65N="!T:&ES(&]P=&EO;BX@06)O=70@ +M=&AE(&]N;'D@=&EM92!Y;W4@;6%Y(&YE960@=&AI6]U('=A;G0@=&\@ +M:&%V92!A(&1O;6%I;@HC(&%U=&]M871I8V%L;'D@861D960@=&\@2!Q=6%L:69I +M960@9&]M86EN(&YA;65S+"!A7-T96US(&-O;F9I9W5R960@8GD@ +M1$A#4`HC(#,I(%!R;W9I9&5S('1H92!D;VUA:6X@<&%R="!F;W(@(F5X<&%N +M9"UH;W-T7,N;W)G+G5K+#$Y,BXQ-C@N,BXP +M+S(T"@HC(%-A;64@:61E82P@8G5T(')A;F=E(')A=&AE7,N;W)G+G5K+#$Y,BXV."XS +M+C$P,"PQ.3(N,38X+C,N,C`P"@HC(%5N8V]M;65N="!T:&ES('1O(&5N86)L +M92!T:&4@:6YT96=R871E9"!$2$-0('-E6]U(&YE960*(R!T;R!S +M=7!P;'D@=&AE(')A;F=E(&]F(&%D9')E2!$2$-0"B,@2!B92!S970@;VYL>2!F;W(@=&AI2!W:&5N('1H92!T86<@(F=R965N +M(B!I2!A('-U8FYE="!W:&EC:"!C +M86XG="!B92!U6YA;6EC(&%D9')E2!A;F0*(R!A9&0@;F%M97,@=&\@=&AE($1.4R!F;W(@=&AE($E0 +M=C8@861D2P@-#AH"@HC($1O($1(0U`@86YD(%)O=71E2!W:6QL('5S +M92!33$%!0R!F;W(@861D2!R82US=&%T96QE2!J +M=7-T"B,@;F5E9"!T;R!B92!O;B!T:&4@7,@9VEV92!T:&4@:&]S="!W:71H($5T +M:&5R;F5T(&%D9')E7,@9VEV92!T:&4@:&]S="!W +M:71H(&-L:65N="!I9&5N=&EF:65R(#`Q.C`R.C`R.C`T"B,@=&AE($E0(&%D +M9')E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ +M(G)E9"(@=&\*(R!T:&4@;6%C:&EN92!W:71H($5T:&5R;F5T(&%D9')E&5D($E0=C8@861D2!;72!A2X*(V1H8W`M:&]S=#UI9#HP,#HP,3HP +M,#HP,3HQ-CID,CHX,SIF8SHY,CID-#HQ.3IE,CID.#IB,BP@9G)E9"P@6S$R +M,S0Z.C5="@HC($EG;F]R92!A;GD@8VQI96YT2!M86-H:6YE('=H;W-E"B,@1$A#4"!V96YD;W)C;&%S +M'1R82!O<'1I +M;VYS('=H:6-H(&%R92!T86=G960@87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@ +M;VYE"B,@;V8@=VAO'1R82!O<'1I;VYS('=H:6-H(&%R +M92!T86=G960@87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO2!D;G-M +M87-Q(&%N9"!S96YD(&YO(&1E9F%U;'0*(R!R;W5T92!A="!A;&PN($YO=&4@ +M=&AA="!T:&ES(&]N;'D@=V]R:W,@9F]R('1H92!O<'1I;VYS('-E;G0@8GD* +M(R!D969A=6QT("@Q+"`S+"`V+"`Q,BP@,C@I('1H92!S86UE(&QI;F4@=VEL +M;"!S96YD(&$@>F5R;RUL96YG=&@@;W!T:6]N"B,@9F]R(&%L;"!O=&AE0H*(R!3970@=&AE(&1E9F%U;'0@=&EM92UT;RUL:79E +M('1O(#4P"B-D:&-P+6]P=&EO;CTR,RPU,`H*(R!3970@=&AE(")A;&P@2!A;B!O<'1I;VX@=VAI8V@@=VEL;"!O;FQY +M(&)E('-E;G0@=&\@=&AE(")R960B(&YE='=O2!A6]U +M(&UA>2!W86YT('1O('5N8V]M;65N="!S;VUE(&]R(&%L;"!O9B!T:&5M(&EF +M('EO=2!U7!E"@HC(%-E;F0@86X@96UP='D@5U!! +M1"!O<'1I;VXN(%1H:7,@;6%Y(&)E(%)%455)4D5$('1O(&=E="!W:6YD;W=S +M(#<@=&\@8F5H879E+@HC9&AC<"UO<'1I;VX],C4R+")<;B(*"B,@4V5N9"!2 +M1D,M,S,Y-R!$3E,@9&]M86EN('-E87)C:"!$2$-0(&]P=&EO;BX@5T%23DE. +M1SH@66]U71H:6YG(&5L&4@=&%G(&9O2YK<'AE"B-D:&-P+6)O;W0];7EB;V]T:6UA9V4*"B,@16YC87!S +M=6QA=&5D(&]P=&EO;G,@9F]R($5T:&5R8F]O="!G4%A%+B!!;&P@=&AE(&]P +M=&EO;G,@87)E"B,@96YC87!S=6QA=&5D('=I=&AI;B!O<'1I;VX@,32!C;V1E"B-D:&-P+6]P=&EO;CUE;F-A<#HQ-S4L(#$W-BP@,6(@("`@("`@ +M(R!N;RUP61H8W`*(V1H8W`M;W!T:6]N/65N8V%P.C$W-2P@,3#@V+3,R"B-D:&-P+6UA=&-H/6ET86YI8W,L(&]P=&EO;CIC;&EE;G0M87)C +M:"P@,B`C24$V-`HC9&AC<"UM871C:#UH86UM97)S+"!O<'1I;VXZ8VQI96YT +M+6%R8V@L(#8@(W@X-BTV-`HC9&AC<"UM871C:#UM86-T96QS+"!O<'1I;VXZ +M8VQI96YT+6%R8V@L(#<@(T5&22!X.#8M-C0*"B,@1&\@&4M<')O;7!T/2)0#@V4$,L("));G-T86QL($QI;G5X(BP@<'AE;&EN=7@*"B,@3&]A +M9',@/'1F='`M#@V4$,L("));G-T86QL($QI;G5X(BP@<'AE;&EN +M=7@L(#$N,BXS+C0*"B,@57-E(&)O;W1S97)V97(@;VX@;F5T=V]R:RP@9F]U +M;F0@;7D@;75L=&EC87-T(&]R(&)R;V%D8V%S="X*(W!X92US97)V:6-E/7@X +M-E!#+"`B26YS=&%L;"!W:6YD;W=S(&9R;VT@4DE3('-E#@V4$,L("));G-T86QL('=I;F1O=W,@9G)O;2!225,@2!F:6QE0HC('1H92!U&%M<&QE(&]F(&1H8W`M8F]O="!W:71H(&%N(&5X=&5R;F%L(%1& +M5%`@2`M+7!X92US97)V +M:6-E+@HC9&AC<"UB;V]T/2]V87(O9G1P9"]P>&5L:6YU>"XP+&)O;W1H;W-T +M+#$Y,BXQ-C@N,"XS"@HC($EF('1H97)E(&%R92!M=6QT:7!L92!E>'1E#TR,3`P"@HC(%1H92!$2$-0('-E6]U(&UI9VAT(&5N9"!U<"!A8V-I9&5N=&%L +M;'D@8V]N9FEG=7)I;F<@82!$2$-0"B,@2X@5&AE($E30R!S97)V97(@=7-E&5C=71A8FQE +M('=H96X@82!$2$-0(&QE87-E(&ES(&-R96%T960@;W(@9&5S=')O>65D+@HC +M(%1H92!A`HC86QI87,],2XR+C,N +M,"PU+C8N-RXP+#(U-2XR-34N,C4U+C`*(R!A;F0@=&AI"UT87)G970@9F]R(&%L;"!L;V-A;`HC(&UA8VAI;F5S+@HC;&]C86QM>`H* +M(R!2971U6]U('=A;G0@=&\@ +M3XL/'=E:6=H=#X*(R!)9B!T:&4@9&]M86EN('!A&%M<&QE+F-O;2!D;VUA:6X@=&\* +M(R!L9&%P&%M +M<&QE+F-O;2!D;VUA:6X@=&\*(R!L9&%P&%M<&QE+F-O;2PS +M.#DL,@H*(R!!(%-25B!R96-O'!A;G-I;VX@ +M9&]N92!F;W(@4U)6(')E8V]R9',@7V1O97-?;F]T"B,@;V-C=7(@9F]R(%!4 +M4B!R96-O'!A;G-I;VX@9&]N92!F;W(@4U)6 +M(')E8V]R9',@7V1O97-?;F]T"B,@;V-C=7(@9F]R(%185"!R96-O&%M<&QE(%-01BX*(W1X="UR96-O5\@=V]R:W,*(R!F;W(@=&%R9V5T3TO=F%R +M+VQO9R]D;G-M87-Q+FQO9PH*(R!);F-L=61E(&$@86YO=&AE'0*```````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````971C+V-R;VXN9&%I +M;'DO```````````````````````````````````````````````````````` +M`````````````````````````````````````````````````````````#`P +M,#`W-34`,#`P,32]C;&5A2!C86-H92!T;R!U;'1I;6%T96QY(')E9'5C92!S=V%P<&EN9PH*7,O=FTO9')O<%]C86-H97,*```````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````````````971C+W9M +M=V%R92UT;V]LF4@:V5P=#H@,2!-0@IV;7-V8RYM +M87A,;V=3:7IE(#T@,0H*(R!$969I;F5S('1H92`B=FUT;V]L"!S:7IE(#4P30IS:7IE(#4P30IC;VUP0HC3&ES=&5N061D7,@9F]R('!R;W1O8V]L('9E2`O971C+W-S:"]SF4@;V8@97!H +M96UE7-L;V=& +M86-I;&ET>2!!551("E-Y65S"D%U=&AO7,@:6X@+V5T8R]S65S(&EF('EO=2!D;VXG="!T'0@<&%S65S"D=34T%024-L96%N=7!#65S"@HC($%C8V5P="!L;V-A;&4M4]F9G-E="`Q,`HC6#$Q57-E3&]C86QH;W-T +M('EE65S"B-5&PR='!D```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````,#`P,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,34`,3,U +M-C$W,C4Q-3(`,#$T-C`W`"`P```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````'5S=&%R("``9&%R6]U('=A;G0@=&\@=7-E(&$@9&EF9F5R +M96YT(&EN=&5R9F%C92!O6]U(&EN2!F2!)4"!A9&1R97-S+`H@("`@("`@(",@>6]U(&-A;B!U7-L;V'-O8VL@(R!P7-T96T@;&]G9VEN9PHD36]D3&]A9"!I;6ML;V<@ +M("`C('!R;W9I9&5S(&ME2!R:VQO9V0I"B,D36]D3&]A9"!I;6UA7-L;V<@7-T96TN("!3<&QI="!I="!U<"!S;R!T:&%T"B,@:70@:7,@96%S>2!T +M;R!W2YL;V<* +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````````````&5T8R]M;V1P +M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@ +M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2!C86-H92!T +M;R!U;'1I;6%T96QY(')E9'5C92!S=V%P<&EN9PH*<&AY;65M/20H9G)E97QA +M=VL@)R]>365M.B][<')I;G0@)#)])RD*:68@6R`D<&AY;65M("UL="`U,3,P +M,#`@73L@=&AE;@H@('-Y;F,@)B8@96-H;R`Q(#X@+W!R;V,O2YC;VYF```````````````````````````````````````````````` +M```````````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P +M,3$-O;FYE8W1I +M;VYS4&5R0VAI;&0@("`),3`P,`H\+TEF36]D=6QE/@H*(R!V:6TZ('-Y;G1A +M>#UA<&%C:&4@=',]-"!S=STT('-T6U,:6YK&5S($9O;&QO=U-Y;4QI;FMS($UU;'1I5FEE=W,*"0E!;&QO=T]V97)R:61E +M($%L;`H)"4]R9&5R(&%L;&]W+&1E;GD*"0EA;&QO=R!F&5C0T=)("U-=6QT:59I97=S +M("M3>6U,:6YK2QA;&QO=PH@("`@("`@($1E;GD@9G)O +M;2!A;&P*("`@("`@("!!;&QO=R!F3X*"3Q$:7)E8W1O0H)"6%L;&]W(&9R;VT@86QL"@D\+T1I3X*"@E38W)I +M<'1!;&EA0H)"4%L;&]W(&9R;VT@86QL"@D\ +M+T1I3X*"@E%T%004-(15],3T=?1$E2?2]ET%004-(15],3T=?1$E2 +M?2]S2QA;&QO=PH)"41E;GD@ +M9G)O;2!A;&P*"0E!;&QO=R!F2!T +M:&4*"2,@("!34TQ#97)T:69I8V%T949I;&4@9&ER96-T:79E(&ES(&YE961E +M9"X*"5-33$-E0H*"2,@("!397)V +M97(@0V5R=&EF:6-A=&4@0VAA:6XZ"@DC("`@4&]I;G0@4U-,0V5R=&EF:6-A +M=&5#:&%I;D9I;&4@870@82!F:6QE(&-O;G1A:6YI;F<@=&AE"@DC("`@8V]N +M8V%T96YA=&EO;B!O9B!014T@96YC;V1E9"!#02!C97)T:69I8V%T97,@=VAI +M8V@@9F]R;2!T:&4*"2,@("!C97)T:69I8V%T92!C:&%I;B!F;W(@=&AE('-E +M0H)(R`@('1H92!R969E +M2`H0T$I.@H)(R`@(%-E="!T:&4@0T$@8V5R=&EF:6-A +M=&4@=F5R:69I8V%T:6]N('!A=&@@=VAE6]U(&YE960@:&%S:"!S>6UL +M:6YK6UL:6YK7!E*3H* +M"2,@("!#;&EE;G0@8V5R=&EF:6-A=&4@=F5R:69I8V%T:6]N('1Y<&4@86YD +M(&1E<'1H+B`@5'EP97,@87)E"@DC("`@;F]N92P@;W!T:6]N86PL(')E<75I +M2!T;R!V97)I9GD@=&AE(&-E +M4-L:65N +M="!R97%U:7)E"@DC4U-,5F5R:69Y1&5P=&@@(#$P"@H)(R`@($%C8V5S6YT87@@:7,@80H)(R`@(&UI>'1UU-33%]#25!(15)]("%^(&TO7BA%6%!\3E5,3"DO(%P* +M"2,@("`@("`@("`@("!A;F0@)7M34TQ?0TQ)14Y47U-?1$Y?3WT@97$@(E-N +M86ME($]I;"P@3'1D+B(@7`H)(R`@("`@("`@("`@(&%N9"`E>U-33%]#3$E% +M3E1?4U]$3E]/57T@:6X@>R)3=&%F9B(L(")#02(L(")$978B?2!<"@DC("`@ +M("`@("`@("`@86YD("5[5$E-15]71$%9?2`^/2`Q(&%N9"`E>U1)345?5T1! +M67T@/#T@-2!<"@DC("`@("`@("`@("`@86YD("5[5$E-15](3U52?2`^/2`X +M(&%N9"`E>U1)345?2$]54GT@/#T@,C`@("`@("`@*2!<"@DC("`@("`@("`@ +M("!OU)%34]415]!1$12?2`]?B!M+UXQ.3)<+C2!E>&ES=&EN9R!W:&5N(&-L +M:65N=`H)(R`@("`@875T:&5N=&EC871I;VX@:7,@=7-E9"DN(%1H:7,@8V%N +M(&)E('5S960@=&\@:6UP;W)T('1H92!C97)T:69I8V%T97,*"2,@("`@(&EN +M=&\@0T=)('-C'!O'!E;G-I=F4@;W!E2!E;F%B;&5S('1H90H)(R`@("`@97AP;W)T871I;VX@9F]R +M($-'22!A;F0@4U-)(')E<75E'!O2`O=7-R+VQI8B]C9VDM8FEN/@H)"5-33$]P=&EO;G,@*U-T +M9$5N=E9A6]U(&-A;B!U6]U(')E8V5I=F4@ +M22]/(&5R2!A;&5R="!I2!F;W(@8G)O=W-E6]U(&MN;W<@=&AA="!T:&5I2X*"2,@("!. +M;W1I8V4Z($UO2!W86YT('1O(&1I2P@;VYE(&AA6]U(&IU2!A;'-O"B,@:&%V92!T;R!C +M:&%N9V4@=&AE(%9I6]U(&AA=F4@=7!GB!A;F0*(R!214%$ +M344N1&5B:6%N+F=Z"@I,:7-T96X@,3`N,2XQ+C$Z.#$X,`H*/$EF36]D=6QE +M(&UO9%]S0HC('1E;&P@ +M9&YS;6%S<2!T;R!F:6QT97(@;W5T('%U97)I97,@=VAI8V@@=&AE('!U8FQI +M8R!$3E,@8V%N;F]T"B,@86YS=V5R+"!A;F0@=VAI8V@@;&]A9"!T:&4@2!T:&4@2X*"B,@3F5V97(@9F]R=V%R9"!P;&%I +M;B!N86UE2X*(R!.;W1E('1H870@*&%M;VYG2!O9B!T:&4@=7!S=')E86T*(R!S97)V97)S(&ET(&MN +M;W=S(&%B;W5T(&%N9"!T2!E86-H('%U97)Y"B,@=VET:"`@96%C:"`@2`@:6X@('1H92`@;W)D97(@('1H97D@("!A<'!E87(@ +M("!I;@HC("]E=&,O2!A&%M<&QE(&]F(')O=71I;F<@4%12('%U97)I97,@=&\@ +M;F%M97-E2!D;VUA:6YS(&AE6]U('=A;G0@=&\@9F]R8V4@=&\@86X@ +M25`@861D&%M<&QE(&)E;&]W('-E;F0@86YY +M(&AO6]U('=A;G0@ +M9&YS;6%S<2!T;R!L:7-T96X@9F]R($1(0U`@86YD($1.4R!R97%U97-T&-E<'0M +M:6YT97)F86-E/6QO"@HC($]R('=H:6-H('1O(&QI2!A9&1R +M97-S("AR96UE;6)E2!$3E,@7-T96US('=H:6-H +M('-U<'!O6]U(&UA>2!N965D('1H:7,@:7,@=VAE;@HC(')U;FYI;F<@ +M86YO=&AE6]U(&1O;B=T('=A;G0@9&YS;6%S<2!T;R!R +M96%D("]E=&,O:&]S=',L('5N8V]M;65N="!T:&4*(R!F;VQL;W=I;F<@;&EN +M92X*(VYO+6AO6]U('=A;G0@:70@=&\@2!P;W1E;G1I86QL>2!S971T:6YG('1H90HC +M("`@(&1O;6%I;B!O9B!A;&P@'!A;F0M:&]S +M=',B"B-D;VUA:6X],BYV;6]P0HC(&$@;&5A6]U(&AA=F4@;6]R92!T:&%N(&]N92!N971W;W)K+"!Y;W4@ +M=VEL;"!N965D('1O"B,@2!P87)A;65T97)S(&9O&%M<&QE +M7,@7,@:70G +M2!T +M:&4@;6%C:&EN92!W:71H(&5T:&5R;F5T"B,@861D'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ +M(G)E9"(@=&\*(R!A;GD@;6%C:&EN92!W:71H(&5T:&5R;F5T(&%D9')E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ +M(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO"(*(V1H8W`M +M=F5N9&]R8VQA2!M86-H:6YE(&]N90HC +M(&]F('=H;W-E($1(0U`@=7-E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@ +M87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO2!N86UE.@HC(')U;B`B9&YS;6%S<2`M+6AE;'`@9&AC<"(@=&\@9V5T +M(&$@;&ES="X*(R!.;W1E('1H870@86QL('1H92!C;VUM;VX@2!D;G-M87-Q+B!9;W4@=F5R>2!L:6ME;'D@=VEL;"!N;W0@ +M;F5E9`HC(&%N>2!D:&-P+6]P=&EO;G,N($EF('EO=2!U2!A2!W;W)K0HC(&1E9F%U;'0@*#$L +M(#,L(#8L(#$R+"`R."D@=&AE('-A;64@;&EN92!W:6QL('-E;F0@82!Z97)O +M+6QE;F=T:"!O<'1I;VX*(R!F;W(@86QL(&]T:&5R(&]P=&EO;B!N=6UB97)S +M+@HC9&AC<"UO<'1I;VX],PH*(R!3970@=&AE($Y44"!T:6UE('-E0H*(R!3970@=&AE(&1E +M9F%U;'0@=&EM92UT;RUL:79E('1O(#4P"B-D:&-P+6]P=&EO;CTR,RPU,`H* +M(R!3970@=&AE(")A;&P@2!A;B!O<'1I +M;VX@=VAI8V@@=VEL;"!O;FQY(&)E('-E;G0@=&\@=&AE(")R960B(&YE='=O +M2!A6]U(&UA>2!W86YT('1O('5N8V]M;65N="!T:&5M +M(&EF('EO=2!U2!N971B:6]S('-C;W!E+@H*(R!396YD(%)&0RTS +M,SDW($1.4R!D;VUA:6X@2!W:&5N('1H92!C;&EE;G0@71E(&EN=&5G97(@+2!T:&%T)W,@=VAA="!M:6-R;W-O9G0@=V%N +M=',N(%-E90HC(&AT='`Z+R]T96-H;F5T,BYM:6-R;W-O9G0N8V]M+U=I;F1O +M=W-397)V97(O96XO;&EB2]A-S!F,6)B-RUD,F0T+30Y9C`M.39D-BTT +M8C2!S;VUE(&-O;F9I9W5R871I;VYS(&]F"B,@ +M171H97)B;V]T('1O(&%L;&]W(&ES('1O(')E8V]G;FES92!T:&4@1$A#4"!S +M97)V97(N"B-D:&-P+6]P=&EO;CUV96YD;W(Z171H97)B;V]T+#8P+")%=&AE +M"X@3F]T92!T:&%T +M('=E(&YE960@=&\@2!N965D"B,@=&AI2!F:6QE0HC('1H92!U&5L:6YU>"YR +M960M;F5T"@HC($%N(&5X86UP;&4@;V8@9&AC<"UB;V]T('=I=&@@86X@97AT +M97)N86P@2!C;&EE +M;G0@=VAI8V@@8G)O861C87-T6]U(&UI9VAT(&5N9"!U +M<"!A8V-I9&5N=&%L;'D@8V]N9FEG=7)I;F<@82!$2$-0"B,@2X@5&AE($E30R!S +M97)V97(@=7-E2!T:&4@:&]S=&YA;64*(R!I9B!T:&5R92!IF4@:&5R92X*(V-A8VAE +M+7-I>F4],34P"@HC($EF('EO=2!W86YT('1O(&1I2!R97-P;VYS97,@=VAI8V@@8V]M92!F;W)M("]E=&,O:&]S=',@86YD +M('1H92!$2$-0(&QE87-E"B,@9FEL92!H879E(%1I;64M5&\M3&EV92!S970@ +M87,@>F5R;RP@=VAI8V@@8V]N=F5N=&EO;F%L;'D@;65A;G,*(R!D;R!N;W0@ +M8V%C:&4@9G5R=&AE6]U(&%R92!H87!P>2!T;R!T6]U(&-A;B!S970@82!T:6UE+71O+6QI=F4@*&EN"B,@6]U('=A;G0@9&YS;6%S<2!T +M;R!D971E8W0@871T96UP=',@8GD@5F5R:7-I9VX@=&\@"!U<"!$ +M3E,@2!W;W)K"!T;R`U+C8N-RYX"B-A;&EA"UT87)G970@9F]R(&%L;"!L;V-A;`HC(&UA8VAI;F5S+@HC;&]C86QM>`H* +M(R!2971U6]U('=A;G0@=&\@ +M3XL/'=E:6=H=#X*(R!)9B!T:&4@9&]M86EN('!A&%M<&QE+F-O;2!D;VUA:6X@=&\* +M(R!L9&%P&%M +M<&QE+F-O;2!D;VUA:6X@=&\*(R!L9&%P&%M<&QE+F-O;2PS +M.#D*"B,@5'=O(%-25B!R96-O&%M<&QE+F-O;2PS.#DL,0HC&%M<&QE+F-O;2QL9&%P&%M<&QE+F-O +M;0HC&%M<&QE+F-O;0H*(R!4:&4@9F]L +M;&]W:6YG(&QI;F4@65E(%!A9V4N7VAT='`N7W1C<"YD;G,M'0M3TO=F%R+VQO9R]D +M;G-M87-Q+FQO9PH*(R!);F-L=61E(&$@86YO=&AE'0*```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````&5T8R]I<'-E8RYS96-R971S```````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P,3PH@("`@;6%X2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P +M.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N +M71R=6YC871E"GT*```````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````&5T8R]L;V=R;W1A=&4N +M9"]C;VYN=')A8VMD```````````````````````````````````````````` +M```````````````````````````````````````````````````````P,#`P +M-C0T`#`P,#$W-3``,#`P,3PH@("`@;6%X6-O;7!R97-S"@H@("`@<&]S=')O=&%T90H@("`@("`@(&EF +M(%L@+64@+W9A2!O9B!T:&4@3&EC96YS92!A +M=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O +M'!R97-S(&]R(&EM<&QI960N("!3 +M964@=&AE($QI8V5NPH@("`@("`@(')O +M=&%T92`U"B`@("`@("`@;6%X2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N'-I>F4@,3!- +M"B`@("`@("`@;6ES0H@("`@("`@ +M(&-O;7!R97-S"B`@("`@("`@8V]P>71R=6YC871E"GT*```````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````!E=&,O;&]G0H)8V]M<')E71R=6YC871E"B`@("`@("!R;W1A=&4@,PH@("`@("`@8V]M<')E'0*("`@("`@(&UA>'-I>F4@,3!-"B`@("`@("!N;W1I9F5M +M<'1Y"GT*```````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````&5T8R]L;V=R;W1A=&4N9"]R0H)8V]M<')E +M2YL;V<@>PH@("`@0H@("`@;6%X7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ +M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E +M(&%T"B,*(R`@(&AT='`Z+R]W=W2\````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````,#`P,#'DN8V9G```````````````````````````````````````````` +M```````````````````````````````````````````````````````````P +M,#`P-C0T`#`P,#$W-3``,#`P,3'D*"75S97(@:&%P0H)9W)O +M=7`@:&%P0H)9&%E;6]N"@ID969A=6QT7!E(CHB9W5E2(Z(C$W,BXQ-BXQ+C$B+`H)(F1E9F%U +M;'1?96YT2(*?0H````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````;W!T+V-L;W5D+W1E7!E(CH@(FEC;7`B"B`@("`@("`@("`@('TL"B`@("`@("`@("`@ +M('L*("`@("`@("`@("`@("`@(")A;&QO=V5D(CH@=')U92P*("`@("`@("`@ +M("`@("`@(")C:61R(CH@(C$P+C`N,BXP+S@B+`H@("`@("`@("`@("`@("`@ +M(F9I7!E(CH@(G5D<"(*("`@("`@("`@ +M("`@?2P*("`@("`@("`@("`@>PH@("`@("`@("`@("`@("`@(F%L;&]W960B +M.B!T7!E(CH@(FYE='=OR)P=6)L:6-?:7`B.B(Q +M,"XP+C(N,3`R(BP*(G-O=7)C95]N870B.G1R=64L"B)A9&0B.G1R=64L"B)O +M;F5?=&]?;VYE7VYA="(Z9F%L2(Z(C$P+C`N,BXQ(BP*(FYE=&UA2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H +M92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2!C;61?;&EN92YJ2!I<',P,#`Q+FIS;VX*+V]P="]C;&]U9"]B:6XO +M=7!D871E7V-O;F9I9RYP>2!I<',P,#`R+FIS;VX*+V]P="]C;&]U9"]B:6XO +M=7!D871E7V-O;F9I9RYP>2!I<',P,#`S+FIS;VX*```````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````;W!T+V-L;W5D+W1ER)P +M=6)L:6-?:7`B.B(Q,"XP+C(N,3`S(BP*(G-O=7)C95]N870B.G1R=64L"B)A +M9&0B.G1R=64L"B)O;F5?=&]?;VYE7VYA="(Z9F%L2(Z(C$P+C`N,BXQ(BP*(FYE=&UAPH)(FQO8V%L7W!U8FQI8U]I<"(Z(C$W,BXQ-BXQ +M+C$B+`H)(FQO8V%L7V=U97-T7V-I9'(B.B(Q-S(N,38N,2XP+S(T(BP*"2)L +M;V-A;%]P=6)L:6-?9V%T97=A>2(Z(C$W,BXQ-BXQ+C$B+`H)(G!E97)?9V%T +M97=A>5]I<"(Z(C$P+C(P,"XR,#`N,2(L"@DB<&5E2(Z(C-D97,M;60U(BP* +M"2)I:V5?<&]L:6-Y(CHB,V1E7)I9VAT(&]W +M;F5R6]U +M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O +M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W +M=W2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NW!R:6YT("0Y.WTG*0H):68@ +M6R`D4D]55$527U-4051%(#T@(E50(B!="@ET:&5N"@D@("`@4U1!5%53/4U! +M4U1%4@H)96QI9B!;("123U5415)?4U1!5$4@/2`B1$]73B(@70H)=&AE;@H) +M("`@(%-405154SU"04-+55`*"69I"F9I"@IE8VAO(")3=&%T=7,Z("1[4U1! +M5%53?2(*```````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````!O<'0O8VQO=60O=&5M<&QA=&5S+VAE87)T8F5A="YS:"YT96UP;``` +M```````````````````````````````````````````````````````````` +M````````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC +M"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ +M=&AE($QI8V5N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H +M='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI +M8V5NPH@("`@36]D +M92!&5$97('L*("`@("`@("`C"B`@("`@("`@(R!3:7IE(&]F('1H92!R97-E +M;F0@<75E=64@*&EN(&]B:F5C=',I+B!4:&ES(&ES('1H92!M87AI;75M"B`@ +M("`@("`@(R!N=6UB97(@;V8@;V)J96-T2!T;R!S=&]R92!D96%D(&]B:F5C=',N"B`@("`@("`@(R!$969A +M=6QT(&ES(#$S,3`W,B!O8FIE8W1S+@H@("`@("`@(",*("`@("`@("`C(%)E +M6]U('-E="!A(&QO=R!V86QU92P@5$-0(&5N +M=')I97,@:6X*("`@("`@("`C($5S=&%B;&ES:&5D('-T871E&%M<&QE+`H@("`@("`@(",@86X@ +M4U-((&-O;FYE8W1I;VX@=VET:&]U="!+965P06QI=F4@96YA8FQE9"X@268@ +M;F]T('-E="P*("`@("`@("`C('1H92!D865M;VX@=7-E6]U(&1E +M8W)E87-E('1H:7,*("`@("`@("`C('9A;'5E+"!T:&4@;G5M8F5R(&]F(&%C +M:VYO=VQE9V1M96YT6]U"B`@("`@("`@(R!I;F-R96%S +M92!T:&ES('9A;'5E+"!T:&4@'!E6-L97,@6]U('1O(&1I +M'1E'1E +MF%T:6]N +M(&UE2!O9B!Y;W5R(&5X:7-T:6YG(&EN=&5R9F%C97,N($EF +M(&%N>2!D;W5B="P*("`@("`@("`C(&1O(&YO="!M;V1I9GD@=&AI0H@("`@("`@(",@9&]U +M8G0L(&1O(&YO="!M;V1I9GD@=&AIF%T:6]N(&UEF%T:6]N(&UE6]U"B`@("`@ +M("`@(R!N;W1I8V4@6]U(&UA>2!W86YT('1O +M(&EN8W)E87-E('1H92!S:7IE"B`@("`@("`@(R!O9B!T:&4@2!T;R!A8VAI979E(&9A=6QT+71O;&5R86YC92X@26X@ +M8V%S92!O9B!D;W5B="P@9&\*("`@("`@("`C(&YO="!M;V1I9GD@=&AI6]U(&-A;B!O;FQY('-E;&5C="!O;F4N"B`@("`C"B`@("`C(%5$4"![ +M"B`@("`@("`@(PH@("`@("`@(",@5410(&%D9')E6]U(&%R92!G;VEN9R!T;R!UF4*("`@("`@("`C"B`@("`@("`@ +M(R!28W93;V-K971"=69F97(@,3(T.3(X,`H*("`@("`@("`C"B`@("`@("`@ +M(R!%;F%B;&4O1&ES86)L92!M97-S86=E(&-H96-KPH@("`@(PH@("`@(R!3970@=&AE +M(&YI8V4@=F%L=64@;V8@=&AE(&1A96UO;BP@=&AI6]U(&-A;B!S96QE8W0@8F5T=V5E +M;@H@("`@(R!24B!A;F0@1DE&3R!A;F0@=&AE('!R;V-EPH@("`@(R`@(%1Y<&4@1DE&3PH@("`@(R`@(%!R:6]R:71Y +M(#DY"B`@("`C('T*"B`@("`C"B`@("`C($YU;6)E2X*("`@(",@4F5A9"!S;VUE(&1O8W5M96YT +M2!K965P +M('-O;64@9&5A9"!E;G1R:65S(&-A8VAE9"!F;W(@<&]S7-L;V2!N86UE +M("AD865M;VX@*&1E9F%U;'0I(&]R(&QO8V%L,"XN-RD*("`@(",@1&5F875L +M=#H@;V9F"B`@("`C"B`@("!3>7-L;V<@;VX*"B`@("`C"B`@("`C($QO8VMF +M:6QE"B`@("`C"B`@("!,;V-K1FEL92`O=F%R+VQO8VLO8V]N;G1R86-K9"YL +M;V-K"@H@("`@(PH@("`@(R!5;FEX('-O8VME="!C;VYF:6=UF5-87A'&%M<&QE(&-O;F9I9W5R +M871I;VX@9FEL92!S971S('1H90H@("`@(R!S:7IE('1O(#(@34)Y=&5S('1O +M(&%V;VED('1H:7,@F4*("`@(",@:68@:70@9&5T96-T&EM=6T@8G5F9F5R('-I>F4@9W)O=W1H('1H870@8V%N(&)E(')E86-H +M960N(%1H:7,@97AA;7!L92!F:6QE"B`@("`C('-E=',@=&AE('-I>F4@=&\@ +M."!-0GET97,N"B`@("`C"B`@("!.971L:6YK0G5F9F5R4VEZ94UA>$=R;W=T +M:"`X,S@X-C`X"@H@("`@(PH@("`@(R!)9B!T:&4@9&%E;6]N(&1E=&5C=',@ +M=&AA="!.971L:6YK(&ES(&1R;W!P:6YG('-T871E+6-H86YG92!E=F5N=',L +M"B`@("`C(&ET(&%U=&]M871I8V%L;'D@6YC:')O +M;FEZ871I;VX@86=A:6YS="!T:&4@2V5R;F5L"B`@("`C(&%F=&5R(#,P('-E +M8V]N9',@*&1E9F%U;'0@=F%L=64I+B!297-Y;F-H6]U('=A;G0@6YC+B!4:&ES(&]P=&EO;B!I"!K97)N96P@/CT@ +M,BXV+C,Q+@H@("`@(PH@("`@(R!.971L:6YK179E;G1S4F5L:6%B;&4@3V9F +M"@H@("`@(PH@("`@(R!">2!D969A=6QT+"!T:&4@9&%E;6]N(')E8V5I=F5S +M('-T871E('5P9&%T97,@9F]L;&]W:6YG(&%N"B`@("`C(&5V96YT+61R:79E +M;B!M;V1E;"X@66]U(&-A;B!M;V1I9GD@=&AIF%T:6]N(&UO +M9&4L('1H92!P;VQL:6YG(&UO9&4@8V%N(&]N;'D@9W5AF5S('1H92!H86YD;&EN9R!O9B!S +M=&%T92UC:&%N9V4@979E;G1S(&-O;6EN9PH@("`@(R!F2`H:6X@ +M=&5R;7,@;V8*("`@(",@2!T:')E92!F:6QT97(M6]U(&-A;B!D969I;F4@=&AE(&5V +M96YT(&9I;'1E2!A=F]I +M9&EN9R!T:&4@8V]P>2!O9B!T:&4@979E;G0@;65S6]U(')E<75I"!K97)N96P@/CT@,BXV+C(Y('1O"B`@("`C +M(&9I;'1E6]U('=A;G0@=&\@PH@ +M("`@("`@(",*("`@("`@("`C($%C8V5P="!O;FQY(&-E65R(#0@<')O +M=&]C;VPN"B`@("`@("`@(PH@("`@("`@(%!R;W1O8V]L($%C8V5P="!["B`@ +M("`@("`@("`@(%1#4`H@("`@("`@("`@("!30U10"B`@("`@("`@("`@($1# +M0U`*("`@("`@("`@("`@5410"B`@("`@("`@("`@($E#35`@(R!4:&ES(')E +M<75I2!A;&P@=&AE"B`@("`@("`@(R!)4"!A +MPH@("`@("`@("`@ +M("!)4'8T7V%D9')E2!A;B!)4'8V(&%D9')E2!F;&]W('-T871E+@H@("`@("`@(",@5&AI +M2!B86-K=7`*("`@("`@("`C(&9I +M7!E/6YO=&EF>0H@("`@4WES=&5M9"!O;@I]"@`````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````!O<'0O8VQO=60O=&5M +M<&QA=&5S+V-H96-K7VAE87)T8F5A="YS:"YT96UP;``````````````````` +M````````````````````````````````````````````````````````,#`P +M,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7-T96UC=&P@2`M+69A=6QT"@H@("`@<&MI;&P@+3D@:V5E<&%L:79E9"`^/B`D4D]55$52 +M7TQ/1R`R/B8Q('Q\('1R=64*("`@('!K:6QL("TY(&-O;FYT&ET"F9I"@``````````````;W!T+V-L;W5D+W1E;7!L871E +M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI +M86YC90HC('=I=&@@=&AE($QI8V5N6]U +M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HA +M('=I=&@@=&AE($QI8V5NPH@("`@PH@("`@("`@(&AE87)T +M8F5A=`H@("`@?0H*("`@(&YO=&EF>5]B86-K=7`@(B]O<'0O8VQO=60O8FEN +M+VUA2`M+6)A8VMU<"(*("`@(&YO=&EF>5]M87-T97(@(B]O<'0O +M8VQO=60O8FEN+VUA2`M+6UA5]F875L +M="`B+V]P="]C;&]U9"]B:6XO;6%S=&5R+G!Y("TM9F%U;'0B"GT*```````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````!O<'0O8VQO=60O8FEN+P`````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````,#`P,#&4N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&ET(#$*?0H*&5?8V9G7V9I;&5N86UE(#P\14]&"D1%1D%53%0@ +M9&5F875L=`I04D]-4%0@,0I424U%3U54(#(V"D1)4U!,05D@8F]O="YMF4]-C8P,#`@:6YI=')D/21I;FET0`````````````````````````````````````````` +M````````````````````````````````````````````,#`P,#2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA +M=R!O'!R97-S(&]R(&EM<&QI960N +M("!3964@=&AE($QI8V5N7!E(ET@/3T@(G-T871I8VYA +M=')U;&5S(CH*("`@("`@("`@("`@;F5W7!E(ET@/3T@(F9O"`](&1B86=;"AF;W)W87)D*0H@("`@("`@("`@("`@("`@("`@(&EF(&YO +M="!I;F1E>"`]/2`M,3H*("`@("`@("`@("`@("`@("`@("`@("`@9&)A9UMS +M;W5R8V5?:7!=6VEN9&5X72`](&YE=W)U;&4*("`@("`@("`@("`@("`@("`@ +M("!E;'-E.@H@("`@("`@("`@("`@("`@("`@("`@("!D8F%G6W-O=7)C95]I +M<%TN87!P96YD*&YE=W)U;&4I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@ +M("`@("`@("`@("`@("`@(&1B86=;7!E(ET@/3T@ +M(G-T871I8VYA=')U;&5S(CH*("`@("`@("`@("`@("`@(&EF('-O=7)C95]I +M<"!I;B!D8F%G+FME>7,H*3H*("`@("`@("`@("`@("`@("`@("!D96P@9&)A +M9UMS;W5R8V5?:7!="B`@("`@("`@("`@(&5L:68@7,H*3H*("`@("`@("`@("`@("`@("`@("!I;F1E>"`] +M("TQ"B`@("`@("`@("`@("`@("`@("`@9F]R(&9O%T*"B`@("!R971U2!T:&4@<'5B;&EC('-I9&4L +M('1H;W-E(&UU7!E(ET@/3T@7!E(ET@/3T@(G-T871I +M8VYA="(Z"B`@("`@("`@2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET(#$*9FD*"G5S86=E*"D@ +M>PH@('!R:6YT9B`B57-A9V4Z("5S("U;8WQG?')\;GQD72!;+6P@/'!U8FQI +M8R!G871E=V%Y/ET@6RUV(#QV<&,@8VED&ET(#(@)&QO8VL@)&QO8VME9`H).SL*("!E +M&ET("0_("1L;V-K("1L;V-K960*9FD*"FEF +M(%L@(B1N9FQA9R(@/3T@(C$B(%T*=&AE;@H@("-G971?=G!N7W5S86=E"B`@ +M=6YL;V-K7V5X:70@)#\@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)&1F;&%G +M(B`]/2`B,2(@70IT:&5N"B`@(W)E;6]V95]U&ET(#`@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)')F;&%G(B`]/2`B +M,2(@70IT:&5N"B`@71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A +M=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&-E +M<'0@24]%2@I"B`@("`@("`@("`@ +M("`@("`@("`@9W5E22R)$;VU57U)E<75E&-E<'0@17AC97!T:6]N(&%S(&4Z +M"B`@("`@("`@("`@("`@("`@("`@;&]G9VEN9RYE7!E)UT@/3T@)V%L;"<@86YD(&]B:ELG +M7!E(#T@(F%N>2(*("`@("`@("`@("`@:68@(FEC +M;7!?='EP92(@:6X@7,H*2!A;F0@7!E)UT*("`@("`@("`@("`@:68@(FEC;7!? +M8V]D92(@:6X@7,H*2!A;F0@7!E)UTL('-E;&8N7!E("5S("UJ("5S(B`E("AI8VUP7W1Y<&4L('-E;&8N&5C=71E*&1S=$EP2==.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5; +M)V%C=&EO;B==(#T@(D%#0T505"(*("`@("`@("`@("`@("`@("`@("!E;'-E +M.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5;)V%C=&EO;B== +M(#T@(D123U`B"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ +M("`@("`@(",@1F]R(&]T:&5R(')U;&5S(&%D9&5D+"!I9B!D969A=6QT7V5G +M7!E("5S(B`E(&EC;7!?='EP90H@("`@("`@("`@("`@ +M("`@96QI9B!R=6QE6R=P7!E +M+B!3;RP@:71S(&9W(&%T=')I8G5T92!I7!E(#T@ +M(F%N>2(*("`@("`@("`@("`@("`@('-E;&8N<')O=&]C;VP@/2!S96QF+G1Y +M<&4*("`@("`@("`@("`@("`@(&EF(")I8VUP7W1Y<&4B(&EN(')U;&4N:V5Y +M7!E +M+"!R=6QE6R=I8VUP7V-O9&4G72D*("`@("`@("`@("`@("`@(&EF('-E;&8N +M='EP92`]/2`B<')O=&]C;VPB.@H@("`@("`@("`@("`@("`@("`@(&EF(')U +M;&5;)W!R;W1O8V]L)UT@/3T@-#$Z"B`@("`@("`@("`@("`@("`@("`@("`@ +M(')U;&5;)W!R;W1O8V]L)UT@/2`B:7!V-B(*("`@("`@("`@("`@("`@("`@ +M("!S96QF+G!R;W1O8V]L(#T@&5C=71E*")I<'1A +M8FQE+4$O:7!T86)L97,@+70@9FEL=&5R("U$+V&5C=71E*")I +M<'-E="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP +M&5C=71E*")I<'-E="`M +M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP2!V +M86QI9"!D871A"B`@("`@("`@("`@("`@("!I9B!F;VQD97(@(3T@(G5S97)D +M871A(B!A;F0@9F]L9&5R("$](")M971A9&%T82(Z"B`@("`@("`@("`@("`@ +M("`@("`@8V]N=&EN=64*"B`@("`@("`@("`@("`@("!I9B!F:6QE(#T]("(B +M.@H@("`@("`@("`@("`@("`@("`@(&-O;G1I;G5E"@H@("`@("`@("`@("`@ +M("`@7,N97AI="@Q*0H@("`@("`@("`@("!I9B!O2Q!;&QO=UQN1&5N>2!F2!E>&ES=',L('=E(&1O(&ET('1H:7,@ +M=V%Y(&9O7,N97AI="@Q +M*0H*("`@("`@("!F:"`](&]P96XH:'1A8V-E2`](")2 +M97=R:71E4G5L92!>;65T82UD871A+R@N*RDD("`N+B\B("L@9F]L9&5R("L@ +M(B\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%=(@H@("`@("`@("`@("!H +M=&%C8V5S7,N97AI="@Q*2`@ +M(R!&25A-10H@("`@("`@(')E='5R;B!4&ET*#$I("`C($9)6$U%"B`@("`@("`@:7!S96,N=G!N+2@N*BDN8V]N9B(L(&9I;&4I"B`@("`@ +M("`@("`@(&EF(&TZ"B`@("`@("`@("`@("`@("!S96QF+F-O;F9I<',N87!P +M96YD*&TN9W)O=7`H,2DI"@H@("`@("`@(&9O&5C=71E*")I<'-E +M8R!R96QO860B*0H*("`@(&1E9B!C;VYF:6=U#4R-2`M:B!!0T-%4%0B("4@9&5V72D*("`@ +M("`@("!F;W(@;F5T(&EN(&]B:ELG<&5E&UA&UA5]I<"=="B`@("`@("`@<&5E7!E/71U;FYE;"(I"B`@ +M("`@("`@9FEL92YA9&1E<2@B(&%U=&AB>3US96-R970B*0H@("`@("`@(&9I +M;&4N861D97$H(B!K97EE>&-H86YG93UI:V4B*0H@("`@("`@(&9I;&4N861D +M97$H(B!I:V4])7,B("4@:6ME<&]L:6-Y*0H@("`@("`@(&9I;&4N861D97$H +M(B!I:V5L:69E=&EM93TE3TS,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1T:6UE;W5T/3$R +M,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1A8W1I;VX]')A;F=E*#,I.@H@("`@("`@("`@("!R +M97-U;'0@/2!#&5C=71E*"=I<'-E8R!S=&%T=7,@=G!N+25S +M('P@9W)E<"`B)7,B)R`E("AR:6=H='!E97(L('!E97)L:7-T+G-P;&ET*"(L +M(BP@,2E;,%TI*0H@("`@("`@("`@("!I9B!L96XH2P@)R,G*0H@("`@("`@(&EF(&YO="!U&5C +M=71E*")T9&)D=6UP("]V87(O&5C=71E*"=K:6QL("TY("5S)R`E('!I9"D*"@IC;&%S&5C=71E*")S>7-T96UC=&P@2YS96-R971S(B`E("AS96QF+E903D-/3D9$25(I"B`@("`@ +M("`@>&PR='!D8V]N9F9I;&4@/2`B+V5T8R]X;#)T<&0O>&PR='!D+F-O;F8B +M"B`@("`@("`@>&PR='!O<'1I;VYS9FEL92`]("(O971C+W!P<"]O<'1I;VYS +M+GAL,G1P9"(*"B`@("`@("`@;&]C86QI<"`](&]B:ELG;&]C86Q?:7`G70H@ +M("`@("`@(&QO8V%L8VED2`Z(%!32R!<(B5S7"(B("4@*&QE9G0L('!S:RDI"B`@("`@ +M("`@&PR='!D8V]N9F9I;&4I"B`@("`@("`@>&PR='!D8V]N9BYA9&1E<2@B +M:7`@&PR='!O<'1I;VYS+F-O;6UI="@I"@H@("`@9&5F(')E;6]T96%C8V5S4EP*'-E;&8L(&EP82DZ"B`@("`@("`@9F]R(&EN +M=&5R9F%C92!I;B!S96QF+F-O;F9I9RYA9&1R97-S*"DN9V5T7VEN=&5R9F%C +M97,H*3H*("`@("`@("`@("`@:68@:6YT97)F86-E+FEP7VEN7W-U8FYE="AI +M<&$I.@H@("`@("`@("`@("`@("`@2@I"B`@("`@("`@4EP*')U +M;&5;)W!U8FQI8U]I<"==*0H@("`@("`@(&EN=&5R;F%L7V9W:6YT97)F86-E +M(#T@4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI"B`@ +M("`@("`@<'5B;&EC7V9W<&]R=',@/2!S96QF+G!O4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI+`H@ +M("`@("`@("`@("`@("`@&UA2(Z"B`@("`@("`@("`@(&9W7W!R97)O=71?2(Z"B`@("`@("`@ +M("`@(&9W7W!O2(Z"B`@("`@("`@("`@ +M(&9W7W!O2(Z"B`@("`@("`@ +M("`@(&9W7V]U='!U=%]R=6QE("L]("(@+2UD<&]R="`E2(Z"B`@("`@("`@("`@(&9W +M7V]U='!U=%]R=6QE("L]("(Z(B`K('-E;&8N<&]R='-4;U-T4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI +M+`H@("`@("`@("`@("`@("`@&9F9F9F9F9F("TM +M8W1M87-K(#!X9F9F9F9F9F8B("4*("`@("`@("`@("`@("`@("`@("`@("`@ +M4EP*')U;&5;(FEN=&5R;F%L7VEP +M(ETI+"!S96QF+F=E=$=U97-T27`H*2E=*0H*"F-L87-S($EP5&%B;&5S17AE +M8W5T;W(Z"@H@("`@8V]N9FEG(#T@3F]N90H*("`@(&1E9B!?7VEN:71?7RAS +M96QF+"!C;VYF:62!PR)P&5C=71OR)P&5C +M=71OR)P +M&5C=71O7!E.B`E&5C27!T86)L97,H8V]N9FEG*3H* +M("`@("`@("!L;V=G:6YG+F1E8G5G*")0&5C=71O7,H*3H*("`@("`@("`@("`@ +M97AE8T1A=&%B86&5C27!T +M86)L97,H8V]N9FEG*0H@("`@96QI9B!J&5C27!T86)L97,H +M8V]N9FEG*0H@("`@96QS93H*("`@("`@("!L;V=G:6YG+G=A7!E/25S(B`E("AP6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7)I9VAT(&]W;F5R6]U('5N9&5R('1H +M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C +M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7)I +M9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT +M='`Z+R]W=W&5C=71I;F'!O2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&QO9V=E +M&ET(#(@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)$%F;&%G(B`] +M/2`B,2(@70IT:&5N"B`@861D7W-N870@("1P=6)L:6-)<`H@('5N;&]C:U]E +M>&ET("0_("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1$9FQA9R(@/3T@(C$B +M(%T*=&AE;@H@(')E;6]V95]S870@("1P=6)L:6-)<`H@('5N;&]C:U]E>&ET +M("0_("1L;V-K("1L;V-K960*9FD*"G5N;&]C:U]E>&ET(#$@)&QO8VL@)&QO +M8VME9`H````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````````````;W!T+V-L +M;W5D+V)I;B]V<&-?2!O9B!T:&4@3&EC96YS92!A=`HC"B,@ +M("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE +M($QI8V5N5]T86)L92@I('L*("!L;V-A;"!F5]T86)L92`B +MPH@(&QO8V%L(')U +M;&4])#$*("!L;V-A;"!I<#TD*&5C:&\@)')U;&4@?"!C=70@+60Z("UF,2D* +M("!I9B!;("1I<"`]/2`B4F5V;VME(B!="B`@=&AE;@H@("`@3TD9V%T97=A>2!C:61R/21C +M:61R(@H@(&QO8V%L(&1E=CTD*&=E=$5T:$)Y27`@)&EP*0H@(&EF(%L@)#\@ +M+6=T(#`@70H@('1H96X*("`@(')E='5R;B`Q"B`@9FD*("!S=61O(&EP(')O +M=71E(&%D9"`D8VED3TD9V%T97=A>2!C:61R/21C:61R(@H@ +M(')E='5R;B`D&ET(#(@)&QO8VL@)&QO8VME +M9`H@("`@("`@(#L["B`@97-A8PID;VYE"@II9B!;("UN("(D6EN9R!F=R!R=6QE +M&ET("1S=6-C97-S("1L;V-K("1L;V-K960*```````` +M``````````````````````````````!O<'0O8VQO=60O8FEN+V)A0`````````````````````````````````````````````````` +M````````````````````````````````````````````,#`P,#7)I9VAT(&]W;F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* +M(R`@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI +M8V5N&5C=71A8FQE/2&-E<'1I;VX@86YD('-E;&8N<')O8V5S&5C=71E('-H96QL(&-O;6UA;F0Z("5S +M)R`E('-E;&8N8VUD*0H@("`@("`@("`@("!E2<@:6X@<#H*("`@ +M("`@("`@("`@("`@("`@("`@("`@&-E<'1I;VXH)V-A;FYO="!F:6YD(&)A2!I;B`E&-E<'1I;VXH)V-A;FYO="!F:6YD +M(&AO2P@PH@("`@("`@("`@("`B87!I2V5Y(CH@87!I:V5Y+`H@ +M("`@("`@("`@("`B8V]M;6%N9"(Z("=N;W1I9GE"87)E;65T86Q07,H*2P@4)A3TE2P@5]P2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ +M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&EP=&%B;&5S +M+7-A=F5\9W)E<"`B24Y0550@+6H@3D545T]22U]35$%44R(@/B`O9&5V+VYU +M;&P*("!I9B!;("0_("UE<2`P(%T*("!T:&5N"B`@("`@(')E='5R;B`D/PH@ +M(&9I"B`@:7!T86)L97,@+4X@3D545T]22U]35$%44R`^("]D978O;G5L;`H@ +M(&EP=&%B;&5S("U)($9/4E=!4D0@+6H@3D545T]22U]35$%44R`^("]D978O +M;G5L;`H@(&EP=&%B;&5S("U)($E.4%54("UJ($Y%5%=/4DM?4U1!5%,@/B`O +M9&5V+VYU;&P*("!I<'1A8FQEPH@(&EP=&%B +M;&5S("U,($Y%5%=/4DM?4U1!5%,@+6X@+78@+7@@?"!A=VL@)R0Q('X@+UY; +M,"TY72LD+R![('!R:6YT9B`B)7,Z(BP@)#)])SL@/B`O9&5V+VYU;&P*("!I +M9B!;("UF("]R;V]T+W)E;6]V9616:69S(%T@.R!T:&5N(&EP=&%B;&5S("U: +M($Y%5%=/4DM?4U1!5%,@.R!F:3L@/B`O9&5V+VYU;&P*("`O&ET("0_("1L;V-K("1L +M;V-K960*9FD*"FEF(%L@(B1A9FQA9R(@/3T@(C$B(%T*=&AE;@H@("-A9&1? +M<'5B;&EC7VEN=&5R9F%C92`D<'5B;&EC268*("!U;FQO8VM?97AI="`D/R`D +M;&]C:R`D;&]C:V5D"F9I"@II9B!;("(D9&9L867)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&ET(#$*9FD*"G-E="`M>`IU2(*"FEF(%L@)#\@+65Q(#`@70IT:&5N +M"B`@("!T/6!D871E("LE2(*:68@6R`D/R`M;F4@ +M,"!="B`@('1H96X*("`@("`@*&-R;VYT86(@+6P@.V5C:&\@+64@(B-M;VYI +M=&]R:6YG0V]N9FEG7&Y32$5,3#TO8FEN+V)A2(I('P@8W)O;G1A8B`M"B`@("`@(&QO9V=E2!F;W(@;6]N:71O6]U(&UA>2!N;W0@=7-E('1H:7,@ +M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NWT*("`@(&9OF4G72`]('-T&QE;BD*("`@(&EF("=N=U]T>7!E)R!N;W0@:6X@:7`N:V5Y7!E)UT@/2`G<'5B;&EC)PH@("`@96QS93H* +M("`@("`@("!I<%LG;G=?='EP92==(#T@:7!;)VYW7W1Y<&4G72YL;W=E7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C +M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F +M('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5LP77T*"B`@("`@("`@("`@ +M("`@("!T;T1A=&5686P])"AD871E("UD("(D9&%T979A;"(@(BLE7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z +M+R]W=W0IE:F5C +M="!\?"!T0IS>7-T96UC=&P@7-T96UD+6IO=7)N +M86QD"@I465!%/20H9W)E<"`M4&\@)W1Y<&4]7$M;82UZ02U:72HG("]V87(O +M8V%C:&4O8VQO=60O8VUD;&EN92D*:68@6R`B)%194$4B(#T](")R;W5T97(B +M(%T@?'P@6R`B)%194$4B(#T](")V<&-R;W5T97(B(%T@?'P@6R`B)%194$4B +M(#T](")D:&-P"`O;W!T+V-L;W5D+V)I +M;B]U<&1A=&5?8V]N9FEG+G!Y(%T*("!T:&5N"B`@("`O;W!T+V-L;W5D+V)I +M;B]U<&1A=&5?8V]N9FEG+G!Y(&-M9%]L:6YE+FIS;VX@?'P@=')U90H@(&9I +M"F9I"@I;("$@+68@+W9A7-T96UD+W-S:&0@;65M;W)Y(&QE86L@+2!H='1P7-T96UD+VES7-T +M96UD+75S97(*"B,@16YA8FQE(&%N9"!3=&%R="!34T@*7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R +M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T +M"B,*(R`@(&AT='`Z+R]W=W2!S=&]R86=E('-Y7`])$A94$525DE33U(*("!I9B!; +M("(D:'EP(B`]/2`B=FUW87)E(B!=('Q\(%L@(B1H>7`B(#T](")H>7!E5]H='1P"B`@83)E;FUO9"!H96%D97)S"@H@(&-A="`^+V5T8R]A +M<&%C:&4R+V-OTA45%!3?2`];VX*4F5W7,@"UR97%U97-T960M=VET:"P@0V]N=&5N="U4 +M>7!E+"!O6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I +M="`B4V5T=&EN9R!U<"!);G1E&5C=71E(&EL8G9M('-V8W,B"B`@97AI="`Q"F9I"G-E +M='5P7VEL8G9M"@`````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````!O<'0O8VQO=60O8FEN+W-E='5P+W9P8W)O=71E2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N7-T96T@=FTB"@H@(&EF(%L@+68@ +M+V5T8R]H;W-TB`D1$]-04E.(%T@)B8@ +M1$]-04E./2)C;&]U9&YI;F4N:6YT97)N86PB"B`@(T1.4R!S97)V97(@=VEL +M;"!A<'!E;F0@)$1/34%)3B!T;R!L;V-A;"!Q=65R:65S"B`@6R-=*FQO8V%L/2XJ)"]L;V-A;#U<+R1$3TU!24Y< +M+R\B("]E=&,O9&YS;6%S<2YC;VYF"@H@(&-O;6UA;F0@+78@9&AC<%]R96QE +M87-E(#X@+V1E=B]N=6QL(#(^)C$*("!N;U]D:&-P7W)E;&5A&ET(#$*9FD*2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&EF(%L@(B1(65!%4E9)4T]2(B`A/2`B=FUW87)E(B!=.R!T:&5N +M"B`@("!R971U6YC"B`@2]L;V=R;W1A=&4@+V5T8R]C2`R/B8Q"B`@9FD*?0H*6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ +M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I="`B +M4V5T=&EN9R!U<"!%;&%S=&EC($QO860@0F%L86YC97(@7)I9VAT(&]W;F5R6]U('5N9&5R('1H +M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C +M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7!EPH@(&EF(%L@+60@+W!R;V,O>&5N(%T[('1H96X*("`@ +M(&UO=6YT("UT('AE;F9S(&YO;F4@+W!R;V,O>&5N"B`@("`D*&1M97-G('P@ +M9W)E<"`M<2`B6&5N($A632(I"B`@("!I9B!;("0_("UE<2`P(%T[('1H96X@ +M(",@,3U05BPP/4A630H@("`@("!E8VAO(")X96XM:'9M(B`F)B!R971UF5D(&%S($AY +M<&5R=B!W:&5N(%9IPH@(%L@(2`M9"`O<')O +M8R]X96X@72`F)B!S960@+6D@)W,O7G9C+R-V8R\G("]E=&,O:6YI='1A8B`F +M)B!T96QI;FET('$*("!;("UD("]P +M(W9C+W9C+R<@+V5T8R]I;FET=&%B("8F('1E;&EN:70@<0H*("!S>7-T96UC +M=&P@9&%E;6]N+7)E;&]A9`H*("!C87-E("1(65!%4E9)4T]2(&EN"B`@("`@ +M>&5N+7!V?'AE;BUD;VU5*0H@("`@("`@("`@7-T +M96UC=&P@7-T96UC=&P@9&ES86)L92!N +M='!D"B`@("`@("`@("!S>7-T96UC=&P@96YA8FQE('AE+61A96UO;@H@("`@ +M("`@("`@&5N=&]O;',@;F]T(&EN7Q#3TY&24=? +M2$]44$Q51U]00TE?04-023UY)R`O8F]O="]C;VYF:62`M +M3"`Q,34R,#`@='1Y4S`@=G0Q,#(B("]E=&,O:6YI='1A8@H@("`@("`@("`@ +M7-T96UC=&P@2!C;61L +M:6YE(&9I;&4@9G)O;2!Q96UU+6=U97-T+6%G96YT(@H@("`@("`@("`@("`@ +M(&)R96%K"B`@("`@("`@("`@(&9I"B`@("`@("`@("`@('-L965P(#$*("`@ +M("`@("`@(&1O;F4*("`@("`@("`@(&EF(%L@(2`M7-T96T@=&EM92!S>6YC)V0@=VET:"!H;W-T('9I82!V;7=AF5D +M(&%S('9I7!E7!E +M65S+"!H86-K>2$I"B`@("`@ +M("`@("!D;6ED96-O9&4@?"!G2(*("`@("`@("`@(&9I"B`@("`@("`@("`[.PH@(&5S86,*"B`@ +M(R!&:6YD(&%N9"!E>'!O7-T96UV;2@I('L*("!L;V-A;"!P871C:&9I;&4])#$*("!L;V-A;"!B +M86-K=7!F;VQD97(](B]T;7`O+F-O;F8N8F%C:W5P(@H@(&QO8V%L(&QO9V9I +M;&4](B]V87(O;&]G+W!A=&-H7-T96UV;2]C;VYF+V-L;W5D+FIK7-T96UV;2]C +M;VYF+RH@)&)A8VMU<&9O;&1E7-T96UV;0H@(&5C:&\@(D%L;"(@?"!U;GII<"`D<&%T8VAF:6QE("UD("]U +M&%R +M9W,@8VAM;V0@-34U"B`@:68@6R`M9B`D8F%C:W5P9F]L9&5R+V-L;W5D+FIK +M7-T96UV;2]C;VYF+PH@("`@96-H;R`B4F5S=&]R960@:V5Y +M7-T;W)E"B`@ +M:V5Y=&]O;"`M:6UP;W)T:V5Y7-T;W)E("]E=&,O7-T;W)E("]UU!!5$-(7TU/54Y4?2]A9V5N="YZ:7`@72`F)B!; +M("UF("]V87(O8V%C:&4O8VQO=60O<&%T8V@N7!E/21465!%(B`^/B`D +M;&]G9FEL90H@("`@<&%T8VA?FEP"B`@("!I9B!;("0_("UG="`P(%T*("`@('1H96X*("`@("`@96-H +M;R`B1F%I;&5D('1O(&%P<&QY('!A=&-H('-Y7-T +M96UD+W-Y365M.B][<')I;G0@)#)])RD*("!I9B!;("0H*'!H>7-M +M96TI*2`M;'0@-#`Y-C`P(%T[('1H96X*("`@("`@6YC"B`@'!O7!E&ET(#$P"B`@;&]G7VET(")3=&%R=&EN9R!G=65S="!S97)V:6-E2YS:``````````` +M```````````````````````````````````````````````````````````` +M````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@ +M("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE +M($QI8V5NPH@(&QO9U]I="`B4V5T=&EN9R!U<"!C;VYS +M;VQE('!R;WAY('-Y'D@+V5T8R]I<'1A8FQE'D*```````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````````````````;W!T +M+V-L;W5D+V)I;B]S971U<"]C;VUM;VXN6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5]M86-S*"D@>PH@("`@;6%CS,Z+2(O971C+W5D978OV%D9')E5]M86-S("(D +M3DE#7TU!0U,B"B`@9FD*?0H*PH@(&QO8V%L +M(&EN=&9N=6T])#$*("!L;V-A;"!I<#TD,@H@(&QO8V%L(&UAVEN=&9N=6U]"B`@;&]C86P@8F]O='!R;W1O/2)S=&%T:6,B"@H@(&EF(%L@ +M(B1"3T]44%)/5$\B(#T](")D:&-P(B!="B`@=&AE;@H@("`@:68@6R`B)&EN +M=&9N=6TB("$]("(P(B!="B`@("!T:&5N"B`@("`@("!B;V]T<')O=&\](F1H +M8W`B"B`@("!F:0H@(&9I"@H@(&EF(%L@(B1I<"(@(3T@(C`N,"XP+C`B("UA +M("(D:7`B("$]("(B("UO("(D9F]R8V4B(#T](")F;W)C92(@70H@('1H96X* +M("`@("!E8VAO(")I9F%C92`@)&EN=&8@:6YE="`D8F]O='!R;W1O(B`^/B`O +M971C+VYE='=O7-C=&P@;F5T+FEP +M=C8N8V]N9BYA;&PN9&ES86)L95]I<'8V/3`*("!S>7-C=&P@;F5T+FEP=C8N +M8V]N9BYA;&PN9F]R=V%R9&EN9STQ"B`@7,O;F5T+VEP=C0O:7!?9F]R=V%R9`H@(%L@+68@+V5T +M8R]I<'1A8FQE7,O;F5T+VEP=C0O8V]N9B]D969A=6QT+W)P7V9I;'1E +M<@H@("`@("!F;W(@=FEF(&EN("16249?3$E35#L@9&\*("`@("`@("`@;&]G +M7VET(")C;&]U9#H@9&ES86)L92!R<%]F:6QT97(@;VX@<'5B;&EC(&EN=&5R +M9F%C93H@)'9I9B(*("`@("`@("`@7,O;F5T +M+VEP=C0O8V]N9B]L;R]R<%]F:6QT97(*?0H*96YA8FQE7VER<6)A;&%N8V4H +M*2!["B`@;&]C86P@96YA8FQE9#TD,0H@(&QO8V%L('!R;V,],`H*("!PPH@ +M(&QO8V%L(&5N86)L93TD,0H*("!I9B!;("1E;F%B;&4@+65Q(#`@70H@('1H +M96X*("`@("`@96-H;R`P(#X@+V5T8R]R<'-R9G-E;F%B;&4*("`@("`@#TD*'!R:6YT9B`B)7A<;B(@)&YU;2D*("!E8VAO("1H97@["B`@(V5N +M86)L92!R<',*("!E8VAO("1H97@@/B`O"TP+W)P7,O;F5T+V-OPH@(&EN:71?:6YT97)F86-EB`B)&=W9&5V +M(B!="B`@("!T:&5N"B`@("`@(&=W9&5V/2)E=&@P(@H@("`@9FD*"B`@("!I +M<"!R;W5T92!A9&0@9&5F875L="!V:6$@)$=7(&1E=B`D9W=D978*("!F:0H* +M("`C(%=OW!R:6YT("0Q(BXB)#(B+B(D,R(N,2)])RD*("`@("`@=&EM +M96]U="`S('!I;F<@+6X@+6,@,R`D34=-5%]'5R`F"B`@9FD*"B`@:68@6R`B +M)$A94$525DE33U(B(#T](")V;7=A6YC +M(&5N86)L90H@(&9I"GT*"G-E='5P7V1NB`D1$]-04E.(%T@)B8@1$]-04E./2)C +M;&]U9&YI;F4N:6YT97)N86PB"B`@(W)E;6]V:6YG('1H92!D;G-M87-Q(&UU +M;'1I<&QE(')A;F=E6R-=*FQO8V%L/2XJ +M)"]L;V-A;#U<+R1$3TU!24Y<+R\B("]E=&,O9&YS;6%S<2YC;VYF"B`@9FD* +M"B`@:68@6R`M;B`@(B1$3E-?4T5!4D-(7T]21$52(B!="B`@=&AE;@H@("`@ +M("!S960@+6D@+64@(B]>6R-=*F1H8W`M;W!T:6]N+BH],3$Y+BHD+V0B("]E +M=&,O9&YS;6%S<2YC;VYF"B`@("`@(&5C:&\@(F1H8W`M;W!T:6]N+69O9&AC<"UR86YG95]I<#0]+BHD+V1H8W`M9&AC<"UR86YG95]I<#8]+BHD+V1H8W`M +M6R-=*F1H8W`M;W!T:6]N/6]P=&EO;CIR;W5T97(N*B0O +M9"(@+V5T8R]D;G-M87-Q+F-O;F8*("!;("1$149!54Q47T=7(%T@)B8@96-H +M;R`B9&AC<"UO<'1I;VX];W!T:6]N.G)O=71E6R-=*F1H8W`M;W!T:6]N/6]P=&EO +M;C8Z9&YS+7-EB`B)$542#!?25`V(B!="B`@=&AE;@H@ +M("`@("!E8VAO(#$@/B`O=F%R+V-A8VAE+V-L;W5D+V1N;&5A7-T96UC=&P@9&ES86)L92!A<&%C:&4R"B`@8VQE86Y?:7!A;&EA +M&%M<&QE+F-O;F8*("!R +M;2`M9B`O971C+V%P86-H93(O26YC;'5D92!P;W)T2!0 +M>71H;VX@0W-!<'`@8V]N9FEG7&XC26YC;'5D92!P;W)T&5S +M($UU;'1I5FEE=W,B+R)/<'1I;VYS("U);F1E>&5S($UU;'1I5FEE=W,B+R`O +M971C+V%P86-H93(O;6]D&5S(B`^("]V87(O=W=W+VAT;6PO+FAT86-C97-S +M"GT*"G-E='5P7V%P86-H93(H*2!["B`@;&]G7VET(")3971T:6YG('5P(&%P +M86-H92!W96(@2!A;F0@;F]T('=OPH@('!U8FQI8U]I<#TD151(,E])4`H@(%L@(B1%5$@R7TE0(B`] +M/2`B,"XP+C`N,"(@72`F)B!P=6)L:6-?:7`])$542#%?25`*("!E8VAO("1P +M=6)L:6-?:7`*?0H*PH@("`@;&]G7VET(")3971T:6YG +M('5P($Y44"(*("`@($Y44%]#3TY&7T9)3$4](B]E=&,O;G1P+F-O;F8B"B`@ +M("!I9B!;("UF("1.5%!?0T].1E]&24Q%(%T*("`@('1H96X*("`@("`@("!) +M1E,])RPG(')E860@+6$@R-S97)V97)?;&ES=%M` +M77TM,2`[(&ET97)A=&]R/CTP(#L@:71E2!A<&%C:&4R +M(B`^("]V87(O8V%C:&4O8VQO=60O96YA8FQE9%]S=F-S"B`@(&5C:&\@(F-L +M;W5D(&YFT-(149?5$U0 +M7T9)3$5]"B`@("`@($-/34U!/2(L7&Y<="(*("`@("`@8V%S92`D2T59(&EN +M"B`@("`@("`@9&ES86)L95]R<%]F:6QT97(I"B`@("`@("`@("`@(&5X<&]R +M="!$25-!0DQ%7U)07T9)3%1%4CTD5D%,544*("`@("`@("`@("`@.SL*("`@ +M("`@("!E=&@P:7`I"B`@("`@("`@("`@(&5X<&]R="!%5$@P7TE0/21604Q5 +M10H@("`@("`@("`@("`[.PH@("`@("`@(&5T:#%I<"D*("`@("`@("`@("`@ +M97AP;W)T($542#%?25`])%9!3%5%"B`@("`@("`@("`@(#L["B`@("`@("`@ +M971H,FEP*0H@("`@("`@("`@("!E>'!O'!O'!O'!O'!O'!O'!O'!O +M'!O'!O'!O +MF4I"B`@("`@("`@("`@(&5X<&]R="!'54535%]#24127U-) +M6D4])%9!3%5%"B`@("`@("`@("`@(#L["B`@("`@("`@'!O'!O +M'!O'!OF4@8VQO=60@<&%S2!S"(B(%T*("!T:&5N"B`@("!E8VAO(")R;V]T.B1635]005-35T]21"(@?"!C +M:'!A6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I="`B4V5T=&EN9R!U<"!D:&-P('-E7-T96T@ +M=FTB"B`@2!A;&QO=R!$3E,@&5C=71E(&1H8W!S7)I9VAT(&]W +M;F5R6]U +M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O +M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W +M=WPH@ +M(&5C:&\@(B0H9&%T92D@)$`B(#X^("]V87(O;&]G+V-L;W5D+FQO9PH@(&QO +M9U]A8W1I;VY?;7-G("(D0"(*?0H*<&%T8V@H*2!["B`@;&]C86P@4$%40TA? +M34]53E0]+VUE9&EA+V-D@H@(&QO8V%L('!R:79K97D])%!!5$-( +M7TU/54Y4+V%U=&AOVUD-69I;&5]*0H@("`@;&]C +M86P@;F5W;60U/0H@("`@6R`M9B`D>W!A=&-H9FEL97T@72`F)B!N97=M9#4] +M)"AM9#5S=6T@)'MP871C:&9I;&5]('P@87=K("=[<')I;G0@)#%])RD*"B`@ +M("!L;V=?:70@(E-CW!A=&-H9FEL97T@72`F)B!;("(D;F5W +M;60U(B`A/2`B(B!="B`@("!T:&5N"B`@("`@('1AF8@)'!A=&-H9FEL +M92`M0R`O"B`@("`@(&5C:&\@)'MN97=M9#5](#X@)'MM9#5F:6QE?0H@("`@ +M("!L;V=?:70@(E!A=&-H960@2`OF5D7VME>7,*("`@(&9I"B`@9FD*"B`@&5C=71I;F<@8VQO=60M96%R +M;'DM8V]N9FEG(@H*("`C($-L96%R("]T;7`@9F]R(&9I;&4@;&]C:PH@(')M +M("UF("]T;7`O*BYL;V-K"B`@6]U +M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC +M('=I=&@@=&AE($QI8V5N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&5N2!T;R!E;G-U'D@:6X@=&AE(')O +M=71I;F<@9&]M86EN"G)E8V]N9FEG7VQB*"D@>PH@(&QO9V=E'D@=&\@<')E=FEO=7,@ +M'DN8V9G+F]L9"`O971C+VAA<')O>'DO:&%P +M2YC9F'DN8V9G+FYE=PH@(&9I"GT*"F=E=%]V +M:69?;&ES="@I('L*("!L;V-A;"!V:69?;&ES=#TB(@H@(&9O7,O8VQA7!E(&]R('!A7!E(&]R('!A2!R96-E +M:79E2!F:7)E=V%L;"!R=6QE2!C;VYF:67!E(&]R('!A2!O +M9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI +M8V5N0H*"F1E9B!M +M97)G92AD8F%G+"!D871A*3H*("`@(&1B86=C(#T@8V]P>2YD965P8V]P>2AD +M8F%G*0H*("`@('!R:6YT(&1B86<*("`@('!R:6YT(&1A=&$*("`@(&EF(")V +M<&Y?=7-E7,H*3H*("`@("`@("!I +M9B!U7,H*2!A;F0@;F]T +M(&%D9#H*("`@("`@("`@("`@9&)A9V-;=7-E6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2D*("`@("`@("`@("`@9&%T82YU +M<&1A=&4H>R)I9"(Z('-E;&8N:V5Y?2D*("`@("`@("!F:6YA;&QY.@H@("`@ +M("`@("`@("!S96QF+F1B86<@/2!D871A"@H@("`@9&5F('-A=F4H2D* +M("`@("`@("`@("`@("`@(&IS;VXN9'5M<"@*("`@("`@("`@("`@("`@("`@ +M("!D8F%G+"!?9F@L"B`@("`@("`@("`@("`@("`@("`@&-E<'0@24]%2`](&ME>0H*"F-L87-S('5P9&%T941A=&%"867!E(#T]("=M;VYI=&]R22AS96QF +M+F1B+F=E=$1A=&%"867!E(#T]("=V<&YU7!E(#T]("=I<&%L:6%S +M97,G.@H@("`@("`@("`@("!S96QF+F1B+G-E=$ME>2@G:7!S)RD*("`@("`@ +M("`@("`@7!E*0H@("`@("`@("`@("!R971U +M2=="B`@ +M("`@("`@9'!;)VYI8U]D979?:60G72`](&1;)V1E=FEC92==6S,Z70H@("`@ +M("`@(&1P6R=N=U]T>7!E)UT@/2`G9W5E4AA8VLN=7!D871E7VYE='=OR=I<%]A9&1R97-S)SH@6V1P72P@)W1Y<&4G.B`G +M:7!S)WTI"B`@("`@("`@:68@)V1O;6%I;E]N86UE)R!N;W0@:6X@9"YK97ES +M*"D@;W(@9%LG9&]M86EN7VYA;64G72`]/2`G)SH*("`@("`@("`@("`@9%LG +M9&]M86EN7VYA;64G72`](")C;&]U9&YI;F4N:6YT97)N86PB"@H@("`@("`@ +M(&0@/2!04AA8VLN=7!D871E7VYE='=O2AS96QF+"!D8F%G*3H*("`@("`@("!R971U2`]("=E=&@G("L@;G5M("L@)VEP)PH@("`@("`@(&1P(#T@>WT*("`@("`@ +M("!I9BAK97D@:6X@5T*("`@("`@("`@("`@9'!;)VYE=&UA7!E(#T] +M(")P=6)L:6,B.@H@("`@("`@("`@("`@("`@9'!;)V=A=&5W87DG72`]('-E +M;&8N<49I;&4N9&%T85LG8VUD7VQI;F4G75LG9V%T97=A>2=="B`@("`@("`@ +M("`@(&5L2==(#T@7!E)SH@)VEP +M2!T;R!D96%L('=I=&@@=&AIPH@("`@("`@("`@("`@("`@ +M)V%D9"7!E(#T@7!E(ET*("`@("`@("`@("`@=7!D871E1&%T84)A9RAS96QF*0H@ +M("`@("`@("`@("!R971U&-E<'1I;VX@97)R;W(@)WMEV9I;&5N86UE?22!B965N(&UO=F5D+B(N9F]R;6%T*&5RV9I;&5N86UE?27!E"@H@("`@9&5F(&=E=$1A=&$HB(*("`@("`@("!W:71H(&]P96XH +M;W)I9U!A=&@L("=R8B7,H*2!E;'-E(&1A +M=&%;)W!U8FQI8U]I<"=="@H@("`@("`@(&EN:71I86Q?9&%T82`](&-L5]I<"AI<"P@:6YI=&EA;%]D871A6R=C;VYF +M:62<@:6X@9&)A9ULG8V]N9FEG)UTN +M:V5Y5]I<"AC;',L(&EP+"!P5]I +M<"`]($9A;'-E"B`@("`@("`@:68@:7`@/3T@<')I=F%T95]G871E=V%Y7VEP +M.@H@("`@("`@("`@("!N97=?:7!?;6%T8VAE5]I<`H*("`@($!C;&%S0`````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````,#`P,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL +M92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2!S=&%T=7,*"F9R;VT@8W,N0W-#;VYF:6<@:6UP;W)T($-S +M0V]N9FEG"F9R;VT@;W!T<&%R7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R +M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T +M"B,*(R`@(&AT='`Z+R]W=WB`D,2!="G1H96X*("`@(&5C:&\@(D9A:6P@ +M=&\@9FEN9"!64$X@<&5E7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2`]('9P;ELG=G!N7W-E2!I;B!D +M8F%G+FME>7,H*2!A;F0@;F]T(&]P.@H@("`@("`@(&1E;"AD8F%G6VME>5TI +M"B`@("!E;'-E.@H@("`@("`@(&1B86=;:V5Y72`]('9P;@H@("`@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H +M='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI +M8V5N2`] +M(')O=71E6R=N971W;W)K)UT*("`@("`@("!D8F%G6VME>5T@/2!R;W5T90H@ +M("`@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R +M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T +M"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ +M=&AE($QI8V5N2`]('9P +M;ELG<&5E71H;VX*(R!, +M:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%3 +M1BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS +M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E +M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!F$EN"@H*<&%S&ES=',H9V5T5&]K96Y&:6QE*"DI.@H@("`@("`@('=I=&@@;W!E +M;BAG9714;VME;D9I;&4H*2P@)W(G*2!A2P@=F%L +M=64@/2!L:6YE+G-T7!E(#T@ +M7!E(#T]("=S96YD7VUY7W!A7-L;V7-L;V7-L;V7-L;V2!I +M<"]P87-S=V]R9%LE7-L;V7-L;V&-E<'0@2V5Y8F]A&-E<'1I +M;VXL(&4Z"B`@("`@("`@0`````````````````````````````````` +M`````````````````````````````````````````````````````````#`P +M,#`W-34`,#`P,36]U +M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC +M('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E +M<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NFEP7V9I;&4B"B`@("!E +M8VAO(")$96QE=&EN9R!D:6%G;F]S=&ECFEP7V9I;&4B +M"F5L6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ +M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N0H*"F1E9B!M97)G92AD8F%G+"!D871A*3H*("`@("(B(B!3:6UP;'D@ +M;W9E&ES='-I;F<@8F%G(&%S+"!T:&4@=VAO;&4@8V]N +M9FEG=7)A=&EO;B!I2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N4EP("@I +M>PH@(&QO8V%L(&EP/20Q"B`@9F]R(&1E=B!I;B!@;',@+3$@+W-Y6]U(&UA>2!N;W0@=7-E('1H +M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N +MWT*("`@("`@("!S96QF+F-H86YG960@/2!;70H@("`@("`@('-E +M;&8N9&5V:6YF;R`]($-S2&5L<&5R+F=E=%]D979I8V5?:6YF;R@I"B`@("`@ +M("`@2@I"B`@("`@("`@("`@(&5L2=="B`@("`@ +M("`@("`@('-L:6YE(#T@(F1H8W`M"P@:7`I"B`@("`@("`@("`@('-E;&8N +M8V]N9BYS96%R8V@H2D*("`@("`@("`@("`@ +M96QS93H*("`@("`@("`@("`@("`@(&QI&-E +M<'0@17AC97!T:6]N(&%S(&4Z"B`@("`@("`@("`@(&QO9V=I;F2!C;VYT2!R96-E:79E($1(0U!.04LN"B`@("`@ +M("`@(R!7:&5N(%9-(&ES(&5X<'5N9V5D+"!I=',@86-T:79E(&QE87-E(&%N +M9"!$2$-0+T1.4R!C;VYF:6<@:7,@<')O<&5R;'D@5LG;6%C7V%D9')E5LG9&5F875L=%]G871E=V%Y +M)UT*"B`@("!D968@861D7VAO6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7!E2`]($9A;'-E"B`@("`@("`@ +M9&5V(#T@)R<*("`@("`@("!F;W(@:6YT97)F86-E(&EN(&EN=&5R9F%C97,Z +M"B`@("`@("`@("`@(&EF(&1E=B`]/2!I;G1E&5C=71E*&-O;6UA;F0I"B`@("`@("`@("`@("`@("!I9B!D9795<#H*("`@ +M("`@("`@("`@("`@("`@("!L;V=G:6YG+FEN9F\H(D1E=FEC92`E65T+"!L970G +M5]I9E]N965D960H"B`@ +M("`@("`@("`@("`@("`B)7,O)7,B("4@*'-E;&8N0U-?5$5-4$Q!5$537T1) +M4BP@5]I9E]N965D960H"B`@("`@("`@("`@("(E +M&5C("1$045-3TX[+RTM97AE8R`D1$%%34].("TM("TM=G)R<#LO9R(@+V5T +M8R]I;FET+F0O:V5E<&%L:79E9"R(L(")] +M(BP@R(L(")](BP@6PH@("`@("`@("`@("`@("`@("`@ +M("`@(DE0=C1?861D&5C=71E*")R;2`M2`S,"!S96-O;F1S"B`@("`@("`@:&5A&ET:6YG +M(B`E("AE&5C=71E +M*"(E&PR='!D +M(BP@(G-T;W`B*0H@("`@("`@($-S2&5L<&5R+G-E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I +M<"@I*2YS=&]P*"D*"B`@("`@("`@&5C=71E*&-M9#(I"B`@("`@("`@("`@(&1E=B`] +M(&EN=&5R9F%C92YG971?9&5V:6-E*"D*"B`@("`@("`@8VUD(#T@(B5S("U# +M("5S(B`E("AS96QF+D-/3DY44D%#2T1?0DE.+"!S96QF+D-/3DY44D%#2T1? +M0T].1BD*("`@("`@("!#&5C=71E*"(E&PR='!D(BP@(G-T;W`B*0H*("`@ +M("`@("!I;G1E&5C=71E*&-M9"D*("`@("`@("`@("`@("`@(&QO9V=I +M;F2D*("`@("`@("`@ +M("`@("`@(&5X8V5P="!%>&-E<'1I;VXZ"B`@("`@("`@("`@("`@("`@("`@ +M;&]G9VEN9RYE&5C=71E*"(E&5C=71E*"(E&PR='!D(BP@(G)E +M2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@("`@ +M("`@("!I9B!G871E=V%Y.@H@("`@("`@("`@("`@("`@("`@(')O=71E+F%D +M9%]R;W5T92AD978L(&=A=&5W87DI"@H@("`@("`@("`@("`C(%1H92!F:7)S +M="!P=6)L:6,@:6YT97)F86-E(&AA&5C=71E +M*")A2!C;VYN=')A8VMD"B`@("`@("`@(B(B"B`@("`@("`@ +M;&EN97,@/2!;70H@("`@("`@(&QI;F5S+F%P<&5N9"@B7'1<=%QT25!V-%]A +M9&1R97-S("5S7&XB("4@(C$R-RXP+C`N,2(I"B`@("`@("`@;&EN97,N87!P +M96YD*")<=%QT7'1)4'8T7V%D9')E7!E(&%N9"!D96-I9&5S(&EF(&ET(&ES(&%N(&EN=&5R +M;F%L(&%D9')E0H@("`@("`@(%1H92!N97<@8V]D92!A +M;'-O(&=I=F5S('1H92!P;W-S:6)I;&ET>2!T;R!C;&]U9'-T86-K('1O(&AA +M=F4@82!H>6)R:60@9&5V:6-E"B`@("`@("`@=&AA="!C;W5L9"!F=6YC=&EO +M;B!A2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N +M;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B971H,2)]"@I3 +M5$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S:"`M8R`@)VEF +M(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@96QS92!E8VAO +M(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@(")V<&-R;W5T +M97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@6R`D,"`]/2!< +M(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ"B`@("`@("`@ +M("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@("`@("`@(&-M +M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U +M8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@("`@("`@;&]G +M9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S(B`E('-T871E +M7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X96-U=&4H7!E*"E=(&%N9"!S=&%T92`]/2`B +M34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE8W5T92AC;60I +M"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@("`@("`@(&5X +M96-U=&4H8VUD*0H*"F1E9B!I&5C=71E*")M;W5N="!T +M;7!F6XH=F%L*3H*("`@(&EF('9A;#H*("`@("`@("!R +M971U&5C=71E*")I<"!A9&1R('-H;W<@?&=R97`@+78@ +MWT*("`@("`@("`@("`@=&];)VEP)UT@ +M/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A;'-;+3%="B`@ +M("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@("(B(@H@("`@ +M9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G*")3879I;F<@ +M:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C=71E*")S>7-T +M96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I;F7-T96UC=&P@&5C=71E*")K:6QL("U(55`@)7,B +M("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D;G-M87-Q(BP@ +M(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O0`````````````````````````````````````````````` +M`````````````````````````````````````````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E +M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI +M8V5N'1D;G,H*3H*("`@("`@("`@("`@9&YS+F%P<&5N9"AS +M96QF+F1A=&%;)W)O=71E2==(#T@=F%L"@H@("`@9&5F(&=E=%]N971M87-K*'-E;&8I.@H@ +M("`@("`@(",@5V4@;F5E9"!T;R!F:7@@:70@<')O<&5R;'DN($D@:G5S="!A +M9&1E9"!T:&4@:68L(&%S($EA;B!D:60@:6X@&-E<'1I;VXN"B`@("`@("`@:68@)W)O=71E6]U +M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC +M('=I=&@@=&AE($QI8V5N"YS=')I +M<"@I(&9O2!A +M9'9A;F-E9"(L("TQ*0H@("`@("`@(&-R;VXN8V]M;6ET*"D*"B`@("!D968@ +M&-L=61E9%]H96%L=&A?8VAE8VMS(ET*("`@("`@("`@("`@:&-? +M9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K0`````````` +M```````````````````````````````````````````````````````````` +M`````````````````````#`P,#`W-34`,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N7,H*3H*("`@("`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@ +M("`@(R!P2!P&ES=',Z(')U;&4])7,@=&%B;&4])7,B+"!F=ULR72P@;F5W7W)U;&4N +M9V5T7W1A8FQE*"DI"B`@("`@("`@("`@(&5L2`](&9W6S)="B`@("`@("`@("`@("`@("!I9B!F=ULQ72`]/2`B9G)O;G0B +M.@H@("`@("`@("`@("`@("`@("`@(&-P>2`](&-P>2YR97!L86-E*"2DI"B`@("`@("`@("`@("`@("`C(%1H97)E(&%R92!S;VUE +M(&ES3H*("`@("`@("`@ +M("`@=&%B;&4@/2`G)PH@("`@("`@("`@("!F;W(@:2!I;B!O<&5N*"(O971C +M+VEP=&%B;&5S+VEP=&%B;&5S+25S(B`E('1Y<&4I.@H@("`@("`@("`@("`@ +M("`@:68@:2YS=&%R='-W:71H*""`]/2!R=6QE70H* +M"F-L87-S($-S3F5T9FEL=&5R*&]B:F5C="DZ"@H@("`@9&5F(%]?:6YI=%]? +M*'-E;&8I.@H@("`@("`@('-E;&8N7!E)RP@)RTM0`````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```P,#`P-S4U`#`P,#$W-3``,#`P,32!O9B!T:&4@3&EC96YS92!A=`HC"B,@ +M:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&ES=',L(&5L5]P87)A;2D*("`@("`@("!E;'-E +M.@H@("`@("`@("`@("!L;V=G:6YG+FEN9F\H(D%D9&EN9R!R;W5T93H@9&5V +M("(@*R!D978@*R`B('1A8FQE.B`B("L*("`@("`@("`@("`@("`@("`@("`@ +M("`@('1A8FQE("L@(B!N971W;W)K.B`B("L@861D2!P87)A;65T97(@5]P87)A;2D*("`@("`@("!E;'-E.@H@("`@("`@ +M("`@("!L;V=G:6YG+FEN9F\H(D%D9&EN9R!R;W5T93H@9&5V("(@*R!D978@ +M*R`B('1A8FQE.B`B("L*("`@("`@("`@("`@("`@("`@("`@("`@('1A8FQE +M("L@(B!N971W;W)K.B`B("L@861D2DZ"B`@("`@("`@(B(B("!!9&0@82!D969A=6QT(')O=71E"B`@("`@("`@ +M.G!A&-E<'1I;VXH(D=A=&5W87D@8V%N;F]T(&)E($YO;F4N(BD*"B`@ +M("`@("`@:68@0H@("`@("`@("`@("!L;V=G +M:6YG+FEN9F\H(D%D9&EN9R!D969A=6QT(')O=71E(BD*("`@("`@("`@("`@ +M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI +M86YC90HC('=I=&@@=&AE($QI8V5N0`````````````````````` +M```````````````````````````````````````````````````````````` +M`````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI +M86YC90HC('=I=&@@=&AE($QI8V5N'DO:&%P2YC9F'DO:&%P2YC9F2@I"B`@("`@("`@9F]R('@@:6X@8V]N9FEG.@H@("`@("`@("`@("!; +M9FEL93$N87!P96YD*'2A(05!23UA97T-/ +M3D9?5"P@2$%04D]865]#3TY&7U`I"@H@("`@("`@("`@("!P2!O9B!T:&4@3&EC96YS92!A=`HC +M"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG +M971?='EP92@I"B`@("`@("`@5]I9E]N965D960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L +M"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE +M,B]S:71E2DI"B`@("`@("`@("`@(&9I;&4N&5C=71E,B@B7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2AS96QF*3H*("`@("`@("!S96QF+F-O;F9I9R`](%M="B`@("`@("`@ +M"P@;&EN +M92!I;B!E;G5M97)A=&4H%T@/2!R97!L86-E("L@ +M(EQN(@H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!S96%R8V@H"P@;&EN92!I;B!E;G5M97)A=&4H +M"P@;&EN92!I;B!E;G5M97)A=&4H +M2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N0`````````````````````````````````````` +M````````````````````````````````````````````````````````,#`P +M,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N"`](&EN="@G)RYJ;VEN*%MD:6=I="!F;W(@9&EG:70@:6X@9&5V:6-E(&EF +M(&1I9VET+FES9&EG:70H*5TI*0H@("`@("`@("`@("`@("`@:68@9&5V:6-E +M7W-U9F9I>"`\(&QO=V5S=%]D979I8V4Z"B`@("`@("`@("`@("`@("`@("`@ +M;&]W97-T7V1E=FEC92`](&1E=FEC95]S=69F:7@*("`@("`@("`@("`@("`@ +M("`@("!G=65S=%]I;G1E5]C:61R*'-E;&8I.@H@("`@("`@ +M(')E='5R;B`B)7,O)7,B("4@*'-E;&8N9V5T7V=A=&5W87DH*2P@F4@:6X@8FETF4B +M*0H*("`@(&1E9B!G971?9&5V:6-E*'-E;&8I.@H@("`@("`@(')E='5R;B!S +M96QF+F=E=%]A='1R*")D979I8V4B*0H*("`@(&1E9B!G971?8VED7!E)UT@:6X@5E)24%]465!% +M4SH*("`@("`@("`@("`@7!E)UT@:6X@6R=G=65S="==.@H@("`@("`@("`@ +M("!R971U7!E)UT@:6X@6R=P=6)L +M:6,G73H*("`@("`@("`@("`@7-T +M96T*("`@("`@("`B(B(*("`@("`@("!S96QF+F1E=FQIWT*("`@("`@("!S96QF+F%D +M9')E7!E*"D@ +M:6X@6R)P=6)L:6,B72!A;F0@861D2)= +M*0H@("`@("`@("`@("`@("`@&UA7!E)UT*("`@("`@("!R971U&9F9F9F9F9F(ETI"@H@("`@("`@('-E;&8N9G7!E*"D@ +M:6X@6R)P=6)L:6,B73H*("`@("`@("`@("`@7!E*"D@:6X@ +M6R)P=6)L:6,B73H*("`@("`@("`@("`@#4R-"\P>&9F +M9F9F9F9F(B`E("AS96QF+F1E=BP@2)=(&%N9"!S96QF+F%D9')E2)=(&%N9"!S96QF+F%D9')E7!E*"D@:6X@6R)P +M=6)L:6,B72!A;F0@*&YO="!S96QF+F-O;F9I9RYI2!T +M:&4@;6%S=&5R(&)A8VMU<"!F=6YC=&EO;G,*("`@("`@("`@("`@("`@(&EF +M(&YO="!C;61L:6YE+FES7W)E9'5N9&%N="@I.@H@("`@("`@("`@("`@("`@ +M("`@(&EF(&UE=&AO9"`]/2`B861D(CH*("`@("`@("`@("`@("`@("`@("`@ +M("`@0W-087-S=V13=F,HWT*("`@("`@("!C +M;60@/2`H(FEP(&%D9'(@2!K965P86QI +M=F5D(&]R(&YO=`H@("`@("`@("(B(@H@("`@("`@(&EF(")N=U]T>7!E(B!I +M;B!S96QF+F%D9')E2==*0H@ +M("`@("`@(&EF(&YO="!S96QF+F-L+FES7W)E9'5N9&%N="@I(&%N9"`H;F]T +M('-E;&8N861D2==(&]R('-E;&8N861D2==(#T](").;VYE(BDZ"B`@("`@("`@("`@(&-M9"`](")A2!H87!P96X@8G5T(&1I9"`Z*0H@("`@ +M("`@(",@270@;65A;G,@86X@87!A8VAE(&9I;&4@9V]T(&]R<&AA;F5D(&%F +M=&5R(&$@9W5E2@I"@H@("`@9&5F +M(&ES7V=U97-T7V=A=&5W87DH7,O;F5T+V-O7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ +M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E +M(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O +M'!R97-S(&]R(&EM<&QI960N("!3 +M964@=&AE($QI8V5N"(I.@H@("`@("`@("`@("!I=&5M&5C +M=71E*")K:6QL("TY("5S(B`E('!I9"D*"B`@("!D968@9W)E<"AS96QF+"!S +M='(I.@H@("`@("`@(&9O"(I.@H@("`@("`@("`@("!I9B!I+F9I;F0H7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C +M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F +M('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L +M:6-A8FQE(&QA=R!O'!R97-S(&]R +M(&EM<&QI960N("!3964@=&AE($QI8V5N2!O +M9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI +M8V5NWT*("`@("`@("!S96QF+F1B(#T@1&%T +M84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF+F1B+G-A=F4HWT*("`@("`@ +M("!R971U&1I9V5S="@I"@H@("`@9&5F(&=E=%]G871E=V%Y +M*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I;B!S96QF+FED871A*"DZ +M"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A*"E;)V=A=&5W87DG70H@ +M("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G971?=7-E7V5X=%]D;G,H +M'1D;G,G +M70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G971?861V97)T7VEN +M="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN="<@:6X@0`````````````````````````````````````````````````````````` +M````````````````````````````````````````,#`P,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7!E&5C=71E*&-M9"D*("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")! +M9&1E9"!R=6QE("5S(&9O0`````````````````````````````````````````````` +M````````````````````````````````````````````````````````,#`P +M,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET*#(I +M"B`@("!F;W(@;W!T+"!A7,N97AI +M="@R*0H*("`@(&9O&ES=',H9&%T869I;&4I.@H@("`@("`@(&]S +M+G)E;6]V92AD871A9FEL92D*"@ID968@8W)E871E9FEL92AI<"P@9F]L9&5R +M+"!F:6QE+"!D871A*3H*("`@(&1E3H* +M("`@("`@("`@("`@;W,N;6%K961I2!E>&ES=',L('=E(&1O(&ET('1H:7,@=V%Y +M(&9O0H@("`@("`@("`@("!I9B!E+F5R&ET*#$I"B`@("`@("`@ +M:68@;W,N<&%T:"YE>&ES=',H;65T86UA;FEF97-T*3H*("`@("`@("`@("`@ +M9F@@/2!O<&5N*&UE=&%M86YI9F5S="P@(G(K82(I"B`@("`@("`@("`@(&5X +M9FQO8VLH9F@I"B`@("`@("`@("`@(&EF(&9I;&4@;F]T(&EN(&9H+G)E860H +M*3H*("`@("`@("`@("`@("`@(&9H+G=R:71E*&9I;&4@*R`G7&XG*0H@("`@ +M("`@("`@("!U;F9L;V-K*&9H*0H@("`@("`@("`@("!F:"YC;&]S92@I"B`@ +M("`@("`@96QS93H*("`@("`@("`@("`@9F@@/2!O<&5N*&UE=&%M86YI9F5S +M="P@(G&9L;V-K*&9H*0H@("`@("`@("`@("!F +M:"YW&9L;V-K*&9H*0H@("`@9F@N +M=W)I=&4H96YT3H*("`@("`@("!F +M;&]C:RAF:6QE+"!,3T-+7T58*0H@("`@97AC97!T($E/17)R;W(@87,@93H* +M("`@("`@("!P71H;VX*(R!,:6-E;G-E9"!T +M;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@ +M;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* +M(R`@(&AT='`Z+R]W=WFEP9FEL90H*"B,@0W)E871E('II<"!A +MFEP +M7V9I;&5S*&9I;&5S*3H*("`@(&9,:7-T(#T@9FEL97,*("`@(&-O;7!R97-S +M:6]N(#T@>FEP9FEL92Y:25!?1$5&3$%4140*("`@('1I;65?&5C=71E7W-H96QL7W-C3H*("`@("`@("`@ +M("`@("`@("`@("!Z9BYW3H*("`@("`@("!C;&5A;G5P*&9I;&5S7V9R;VU?F8N8VQO&5C=71E7W-H96QL +M7W-C&-E<'0@3U-%#H*("`@("`@("`@("`@9&5L971E7W1M<%]F:6QE7V-M9"`]("=R +M;2`M9B`E3H*("`@("`@("`@("`@9BYC;&]S92@I"B`@("!R971U"YS<&QI +M="AC;60I+"!S=&1E&-E<'0@3U-%&5C=71E(&)A'0H +M>FEP7V9I;&4L(&9I;&5S7V9O=6YD+"!F:6QE"YS<&QI="AC;&5A;G5P7V-M9"DI"@H* +M:68@7U]N86UE7U\@/3T@)U]?;6%I;E]?)SH*("`@(&9I;&5,:7-T(#T@7)I9VAT(&]W +M;F5R6]U +M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O +M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W +M=WW!R +M:6YT("0R.WTG('P@6]U(&UA>2!N +M;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@ +M=&AE($QI8V5N2!T;R!E;G-U2!T;R!I=',@<')E=FEO +M=7,@'D@=&\@<')E=FEO=7,@'DN8V9G+F]L9"`O971C+VAA<')O>'DO:&%P2YC9F'DN8V9G+FYE=PH@(&9I"GT*"@IL;V=G97(@+70@8VQO=60@(B0H8F%S +M96YA;64@)#`I.B!%;G1E'D*'D@2P@8V]N9FEG=7)I +M;F<@9FER97=A;&PB"@HC(&EP=&%B;&5S(&5N=')Y('1O(&5N'D@2`D861D961)<',@ +M)')E;6]V961)<',@)'-T871S27`*"FEF(%L@)#\@+6=T(#`@70IT:&5N"B`@ +M;&]G9V5R("UT(&-L;W5D(")&86EL960@=&\@87!P;'D@9FER97=A;&P@'D@8V]N9FEG(@H@(",@4F5S=&]R92!T:&4@3$(*("!R97-T;W)E7VQB +M"@H@(&QO9V=E&ET(#$@)&QO8VL@)&QO8VME +M9`IE;'-E"B`@(R!296UO=F4@8F%C:V5D=7`@:7!T86)L92!R=6QE6]U(&UA>2!N;W0@=7-E('1H:7,@ +M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E +M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI +M8V5N7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z +M+R]W=WPH@('-U9&\@:7!T86)L97,@+70@;6%N9VQE("U$(%!215)/ +M551)3D<@+6D@)&1E=B`M;2!S=&%T92`M+7-T871E($Y%5R`M:B!#3TY.34%2 +M2R`M+7-E="UM87)K("1T86)L94YO(#(^+V1E=B]N=6QL"@H@('-U9&\@:7`@ +MV1E=CHS?2DI"G1A8FQE3F%M93TB5&%B +M;&5?)&1E=B(*"FEF(%L@)&%C=&EO;B`]/2`G861D)R!="G1H96X*("!P;'5G +M7VYI8PIE;'-E"B`@=6YP;'5G7VYI8PIF:0H````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````&]P="]C;&]U9"]B:6XO:7!S96-T=6YN96PN6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC +M90HC('=I=&@@=&AE($QI8V5N#4R-2(*=G!N:6YM87)K/2(P>#4R-"(*"G5S86=E*"D@>PH@("`@<')I;G1F +M(")5'0@ +M:&]P/B`M3X@+6D@/&EK92!P;VQI +M8WD^("UT(#QI:V4@;&EF971I;64^("U4(#QEPH@('-U9&\@:7!T86)L97,MPH@(&1I2!<"B`@("!P:&%S93(@<&]L:6-Y +M/21ER1R:6=H=&YE='-](B`^/B`D=G!N8V]N +M9F9I;&4@)B8*("!S=61O(&5C:&\@(B`@='EP93UT=6YN96PB(#X^("1V<&YC +M;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!A=71H8GD]VEK96QI9F5T:6UE?7,B(#X^("1V<&YC;VYF9FEL92`F)@H@ +M('-U9&\@96-H;R`B("!E2(@/CX@)'9P;F-O;F9F:6QE +M("8F"B`@2!F;W(@'1H;W`](B1/4%1!4D&ET("1R970*```````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````;W!T+V-L;W5D+V)I;B]I<&%S2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&QO8V%L('!U8DEP +M/20H96-H;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?22!E>&ES +M=',B"GT*"F%D9%]V<&Y?8VAA:6Y?9F]R7VEP("@I('L*("!L;V-A;"!P=6)) +M<#TD*&5C:&\@)#$@?"!A=VL@+48G+R<@)WMPPH@(&QO8V%L('!U8DEP/20H96-H;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?2PH@(&QO8V%L +M('!U8DEP/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R +M:6YT("0Q?2W!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)A +MW!R:6YT("0R?2W!R:6YT("0R +M?25]R;W5T97-?9G)O;5]M86EN("1T86)L94YA;64*(R!.3U1%.B!T:&ES +M("!E;G1R>2!W:6QL(&)E(&1E;&5T960@:68@=&AE(&EN=&5R9F%C92!IW!R:6YT +M("0Q?2PH@(&EF(%L@(B1S9FQA9R(@/3T@(C`B +M(%T*("!T:&5N"B`@("!R971UW!R +M:6YT("0Q?2W!R:6YT("0R?22!I<"!I;F9O(&EN=&\@9FEL92P@ +M=7-E9"!O;B!R961U;F1A;G0@W!R:6YT("0Q?2&ES +M=&EN9TEP36%S:STD*'-U9&\@:7`@861DPH@(&QO8V%L('!U8DEP/20Q +M"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP +M/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)A&ES=&EN9TEP36%S:STD*'-U9&\@:7`@861DPH@("`@(V5N86)L92!R<',@ +M86YD(')F%QN(B`D;G5M*0H@("`@("`@("`@96-H +M;R`D:&5X.PH@("`@("`@("`@(V5N86)L92!R<',*("`@("`@("`@(&5C:&\@ +M)&AE>"`^("]S>7,O8VQA&ET +M("0_("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1!9FQA9R(@/3T@(C$B(%T* +M=&AE;@H@(&%D9%]A;E]I<"`@)'!U8FQI8TEP("`F)@H@(&%D9%]F=U]C:&%I +M;E]F;W)?:7`@)'!U8FQI8TEP"B`@=6YL;V-K7V5X:70@)#\@)&QO8VL@)&QO +M8VME9`IF:0H*:68@6R`B)&9F;&%G(B`]/2`B,2(@72`F)B!;("(D1&9L86&ET("0_("1L;V-K("1L;V-K960* +M9FD*"G5N;&]C:U]E>&ET(#`@)&QO8VL@)&QO8VME9`H````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````!O<'0O8VQO=60O8FEN+VQI;F5?961I="YP>0`````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````,#`P,#2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2UL:6YE(&5D:71I;F<@;V8@8V]N9FEG=7)A=&EO;B!F +M:6QE&%M<&QE('1H97)E)W,@82!D;W5B;&4@97-C87!E(&]F('1H92!B86-K2!M +M871C:&5D(&%L;"!F:6QE3H* +M("`@("XN+B`@(&]S+G5N;&EN:R@G9&]C=&5S="UV:&]S=',N8V]N9B55N=7-E9$QO8V%L"B`@ +M("`@("`@("`@('-T870@/2!.;VYE"B`@("`@("`@("`@('=I=&@@;W!E;BAS +M96QF+F9I;&5N86UE+"`G&-E<'1I;VXH +M(DUA9&4@=&]O(&UA;GD@961I=',B*0H@("`@("`@("`@("`@("`@("`@("`@ +M("`@("`@96QI9B!R96UA:6YI;F=?8V]U;G0@/3T@,#H*("`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@("`@("`@ +M("`@("`@("!C:&%N9V5D7VQI;F4L('-U8G,@/2!E9&ET+G!A='1E2AS96QF+F9I;&5N86UE+"!B86-K=7!?9FEL96YA;64I"B`@("`@("`@("`@ +M("`@("!O3H*("`@("`@("`@("`@:68@8VAA;F=E +M9%]F:6QE(&ES(&YO="!.;VYE.B`@("`@("`@("`@("`@("`@("`@("`@("`@ +M("`@("`C(&9A:6QE9"P@8VQE86X@=7`*("`@("`@("`@("`@("`@(&-H86YG +M961?9FEL92YC;&]S92@I"B`@("`@("`@("`@("`@("!O6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC +M90HC('=I=&@@=&AE($QI8V5N2!R=6QE2!O9B!T:&4@3&EC96YS92!A +M=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O +M'!R97-S(&]R(&EM<&QI960N("!3 +M964@=&AE($QI8V5N7,I.@H*("`@(&5X:7-T:6YG7VME>7,@/2!;70H@ +M("`@;F5W7V5T:%]K97D@/2!.;VYE"@H@("`@9F]R(&LQ+"!V,2!I;B!G=65S +M=&YE=%]D:6-T+FET97)I=&5M7,@ +M86YD(&QE;BAV,2D@/B`P.@H@("`@("`@("`@("!E>&ES=&EN9U]K97ES+F%P +M<&5N9"AK,2D*"B`@("!I9B!N;W0@97AI2`Z.B!296UO=FEN9R!G=65S="!N971W;W)K +M+BXN(BD*("`@("`@("!R971U2!T;R!B92!S +M971U<`H@("`@)R2!C;VYF:6=U&ES=',@/2!&86QS90H*("`@(&9O2!P2!C;VYF:6=U2`Z.B!02`Z.B!.;R!'=65S=$YE='=O7,N87)G +M=ELQ72D*("`@('!R;V-E7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=WPH@(&QO8V%L(%]P +M:60])"AP:61O9B!D;G-M87-Q*0H@(&9OW!R:6YT("0R?20H@(&EF(%L@)&EP +M=C0@70H@('1H96X*("`@(&5C:&\@(C`@)&UA8R`D:7!V-"`D:&]S="`J(B`^ +M/B`D1$A#4%],14%315,*("!F:0H@(&EF(%L@)&EP=C8@70H@('1H96X*("`@ +M(&5C:&\@(C`@)&1U:60@)&EP=C8@)&AO6]U(&UA>2!N +M;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@ +M=&AE($QI8V5N&-E<'0@3U-%6]U&-E<'1I;VX@;V-C=7)R960Z("5S(B`E(&4*("`@("`@("`@ +M("`@7!E(#T]("=T0`````````````` +M```````````````````````````````````````````````````````````` +M`````````````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ +M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&-L=61E9%]H96%L=&A?8VAE +M8VMS(ET@/2!D871A6R)E>&-L=61E9%]H96%L=&A?8VAE8VMS(ET*("`@(&EF +M(")H96%L=&A?8VAE8VMS7V-O;F9I9R(@:6X@9&%T83H*("`@("`@("!D8F%G +M6R)H96%L=&A?8VAE8VMS7V-O;F9I9R)=(#T@9&%T85LB:&5A;'1H7V-H96-K +M7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z +M+R]W=WW!R:6YT("0Q?2<*?0H* +M:7!T86)L97-?*"D@>PH@("!L;V-A;"!O<#TD,0H@("!L;V-A;"!P=6)L:6-? +M:7`])#(*("`@;&]C86P@:7-?=G!C/69A;'-E"B`@(&QO8V%L(&9O7-T96UC=&P@:7,M86-T +M:79E(&EPS$N+C5]"B`@("!D;PH@("`@("!L;V=G97(@+70@8VQO +M=60@(B0H8F%S96YA;64@)#`I.B!W86ET:6YG(&EP7-T96UC=&P@:7,M86-T:79E(&EP7-T96UC=&P@:7,M86-T:79E(&EP7-T96UC=&P@&PR='!D"B`@("`@("`@("`@("`@("`@("`@2`Z(%!32R!<(B1I<'-E8U]P +M&PR +M='!D"@H@("!I<'1A8FQEPH@("!L;V-A;"!P=6)L:6-?:7`])#$*"B`@(&EPPH@("!L;V-A;"!U/20Q"B`@(&QO +M8V%L('!A)'4@7"H@7"(D +M<&%S&ET(#(*"0D[.PH@(&5S86,*9&]N90H*:68@6R`B)&1E +M=B(@/3T@(B(@70IT:&5N"B`@("!D978](F5T:#(B"F9I"@II9B!;("(D8VED +M&ET(#(*6R`B)&-R96%T92(@/3T@(C$B(%T@)B8@6R`B)&QF;&%G +M)'!F;&%G)')F;&%G)'-F;&%G(B`A/2`B,3$Q,2(@72`F)B!U&ET(#(*"FEF(%L@(B1CW!R:6YT("0Q?27)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS +M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E +M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,@/2!;)V5T:#$G+"`G971H,B6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2!O9B!T:&4@ +M3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A +M8FQE(&QA=R!O2!O9B!T:&4@9&YS;6%S<2!F:6QE+@IC<"`B)$1( +M0U!?0T].1DE'7TU!24XB("`B)$1(0U!?0T].1DE'7TU!24Y?0D%+(@IC<"`B +M)$1(0U!?0T].1DE'(B`B)$1(0U!?0T].1DE'7T)!2R(*"B-E;7!T>2!T:&4@ +M8V]N9FEG(&9I;&4*96-H;R`^("1$2$-07T-/3D9)1PH*=F%R/2(D,2(*9&AC +M<%]R86YG93TB(@ID:&-P7V=A=&5W87D](B(*9&AC<%]N971M87-K/2(B"F1N +M'1?9&YS/20H96-H +M;R`B)$--1$Q)3D4B('P@9W)E<"`M;R`B=7-E97AT9&YS/71R=64B*0IW:&EL +M92!;("UN("(D=F%R(B!="F1O"B!V87(Q/20H96-H;R`D=F%R('P@8W5T("UF +M,2`M9"`B+2(I"B!R;W5T97)I<#TD*"!E8VAO("1V87(Q('P@8W5T("UF,2`M +M9"`B.B(@*0H@9V%T97=A>3TD*&5C:&\@)'9AV1H8W!?V1H8W!?;F5T;6%S:WTB)V1H8W`M;W!T:6]N/71A9SIR86YG +M92W9A +MVQO9WTB8&=R97`@(EYD:&-P+6]P=&EO;CTV(B`B)$1(0U!?0T].1DE'7TU! +M24XB8")<;B(*;&]G/2(D>VQO9WTB8&=R97`@(EYD:&-P+6]P=&EO;CUO<'1I +M;VXZVQO +M9WTB8&=R97`@(EYD:&-P+7)A;F=E/2(@(B1$2$-07T-/3D9)1U]-04E.(F`B +M7&XB"@II9B!;("(D;&]G(B`A/2`G7&Y<;EQN)R!="G1H96X*("-#;&5A;FEN +M9R!T:&4@97AI9&AC<"UR86YG93TO9"<@(B1$2$-07T-/3D9)1U]-04E.(@IF:0H*(W=R +M=&EN9R!T:&4@;F5W(&-O;F9I9R!I;G1O('1H92!C;VYF:6<@9FEL92X*96-H +M;R`M92`B)&1H8W!?&ET("1R +M97-U;'0@)&QO8VL@)&QO8VME9`H````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````````````````````!O +M<'0O8VQO=60O8FEN+V-S7V1H8W`N<'D````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7,@/2!S970H*0H@("`@("`@(&9O2`A/2`G +M:60G(&%N9"!E;G1R>5LG;6%C7V%D9')E7,N861D*&ME>2D* +M("`@("`@("`@("`@("`@(&)R96%K"@H@("`@("`@(&EF(&1A=&%;)W)E;6]V +M92==(&%N9"!K97D@;F]T(&EN(')E;6]V95]K97ES.@H@("`@("`@("`@("!R +M96UO=F5?:V5Y2!I +M;B!R96UO=F5?:V5Y5TI"@H@("`@("`@(&1B86=;9&%T85LG:7!V-%]A9&1R97-S)UU=(#T@9&%T +M80H*("`@(')E='5R;B!D8F%G"@```&]P="]C;&]U9"]B:6XO8W-?8VUD;&EN +M92YP>0`````````````````````````````````````````````````````` +M```````````````````````````````````````````P,#`P-S4U`#`P,#$W +M-3``,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ +M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E +M(&%T"B,*(R`@(&AT='`Z+R]W=W2!O9B!T:&4@ +M3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A +M8FQE(&QA=R!O'!R97-S(&]R(&EM +M<&QI960N("!3964@=&AE($QI8V5N'DN8V9G("]E=&,O:&%P2]H87!R;WAY+F-F9RYO;&0*"B`@;78@)&YE +M=U]C;VYF:6<@+V5T8R]H87!R;WAY+VAA<')O>'DN8V9G"B`@:68@:&%P2`M<"`O=F%R+W)U;B]H87!R;WAY+G!I9"`M9B`O971C+VAA<')O>'DO:&%P +M2YC9F<@+7-F("0H8V%T("]V87(O'DN<&ED*3L@=&AE +M;@H@("`@;&]G9V5R("UT(&-L;W5D(").97<@:&%P2!I;G-T86YC92!S +M=6-C97-S9G5L;'D@;&]A9&5D+"!S=&]P<&EN9R!P'DO:&%P2YC9F<@)&YE=U]C;VYF:6<* +M("`@(&UV("]E=&,O:&%P2]H87!R;WAY+F-F9RYO;&0@+V5T8R]H87!R +M;WAY+VAA<')O>'DN8V9G"B`@("!H87!R;WAY("UP("]V87(O'DN<&ED("UF("]E=&,O:&%P2]H87!R;WAY+F-F9R`M2YP:60I"B`@("!R970],0H@(&9I"@IE>&ET("1R +M970*```````````````````````````````````````````````````````` +M`````````````````````````````````````````````````````')O;W0O +M;6]N:71O71H;VX*(R!,:6-E;G-E9"!T;R!T +M:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE +M"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@ +M(&AT='`Z+R]W=WWT*("`@('!A2`K)UTG*R(@(B`K("=;)RMP2LG +M72<@*R`B("(@*R!M2!O;F4@<&ED(&]R(&YO=`H@("`@:68@97AI=%-T871U6EN9R!F97<@;6]R92!T:6UEWT*("`@(&9A:6QI +M;F=?PH@("`@("`@("`@("`@("`@ +M(G-U8V-EPH@("`@("`@("`@("`@ +M("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EWT@(U-K:7`@WT*("`@(&9A:6QI;F=# +M:&5C:W,@/2!;70H@("`@:68@8VAE8VM4>7!E(#T](")B87-I8R(Z"B`@("`@ +M("`@;6]N:71297-U;'0L(&9A:6QI;F=#:&5C:W,@/2!M;VYI=%!R;V-E&-L=61E(#T@:&-?9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!H8U]D871A(&5L7!E*0H@("`@("`@("`@("`@("`@:68@;&5N*')E="D@ +M/3T@,#H*("`@("`@("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@ +M("`@("`@:68@(G-U8V-E7,N87)G=BD@/3T@,CH*("`@("`@("!I9B!S>7,N +M87)G=ELQ72`]/2`B861V86YC960B.@H@("`@("`@("`@("!M86EN*")A9'9A +M;F-E9"(I"B`@("`@("`@96QI9B!S>7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@ +M("`@("`@("`@("!M86EN*")B87-I8R(I"B`@("`@("`@96QS93H*("`@("`@ +M("`@("`@<')I;G1D*")%7!E(&]F('1E7,N87)G=BD*("`@(&5L0`````` +M```````````````````````````````````````````````````````````` +M```````````````````P,#`P-C0T`#`P,#$W-3``,#`P,371H;VX*(R!,:6-E +M;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@ +M=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ +M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E +M(&%T"B,*(R`@(&AT='`Z+R]W=W'!E8W1E9"`](%M="B`@("`@("`@ +M9&5S=$EP(#T@<&]R=$9O'0L('-R8U!O2!I +M;B!I<%1A8FQE4QI'!E8W1E +M9#H*("`@("`@("`@("`@("`@("`@("!I9B!I<%1A8FQE16YT'!E8W1E9$5N=')Y*2`]/2`M,3H*("`@("`@("`@("`@("`@("`@("`@("`@ +M9F]U;F1!;&P@/2!&86QS90H@("`@("`@("`@("`@("`@("`@("`@("!B4QI2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA +M=R!O'!R97-S(&]R(&EM<&QI960N +M("!3964@=&AE($QI8V5N$UE;6]R>55S86=E(&EN(&AE86QT:%]C +M:&5C:W-?9&%T82`B("L@7`H@("`@("`@("`@("`@(")S>7-T96U4:')E&ET*#`I"@H@("`@;6%X365M;W)Y +M57-A9V4@/2!F;&]A="AD871A6R)M87A-96UO7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@ +M(&UA:6XH*0H````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M'E?8VAE8VLN<'D````````````` +M```````````````````````````````````````````````````````````` +M`````````````#`P,#`V-#0`,#`P,36]U(&UA>2!N;W0@=7-E('1H +M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N +M41A=&$@86YD(")M87AC;VYN +M(B!I;B!H84-F9U-E8W1I;VYS6R)G;&]B86PB73H*("`@("`@("!I9B!H87!R +M;WAY1&%T85LB;6%X8V]N;B)=("$](&AA0V9G4V5C=&EO;G-;(F=L;V)A;")= +M6R)M87AC;VYN(EU;,%TN'E$871A(BD*("`@(&EF(&AA +M<')O>'E$871A(&ES($YO;F4@;W(@;&5N*&AA<')O>'E$871A*2`]/2`P.@H@ +M("`@("`@('!R:6YT(").;R!D871A('!R;W9I9&5D('1O(&-H96-K+"!S:VEP +M<&EN9R(*("`@("`@("!E>&ET*#`I"@H@("`@=VET:"!O<&5N*"(O971C+VAA +M<')O>'DO:&%P2YC9FWT*("`@(&-UWT*("`@(&9O41A=&$L(&AA0V9G4V5C=&EO;G,I"@H@("`@:68@ +M8VAE8VM-87A#;VYN(&%N9"!C:&5C:TQB4G5L97,Z"B`@("`@("`@<')I;G0@ +M(D%L;"!C:&5C:W,@<&%S&ET*#`I"B`@("!E;'-E.@H@ +M("`@("`@(&5X:70H,2D*"@II9B!?7VYA;65?7R`]/2`B7U]M86EN7U\B.@H@ +M("`@:68@;&5N*'-Y7,N87)G=ELQ72`]/2`B +M861V86YC960B.@H@("`@("`@(&UA:6XH*0H````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&ET*#`I"@H@("`@=&5M<&QA=&5697)S:6]N36%T8VAE +M65T('-E='5P(&%T("(@*R!R96QE87-E1FEL92`K7`H@ +M("`@("`@("`@("`@("`@("`B+"!S:VEP<&EN9RXB"B`@("`@("`@96QI9B!E +M>'!E8W1E9"`A/2!F;W5N9#H*("`@("`@("`@("`@<')I;G0@(E1E;7!L871E +M(%9E'!E8W1E9"`K("(L(&9O=6YD.B`B("L@9F]U;F0*("`@("`@ +M("`@("`@=&5M<&QA=&5697)S:6]N36%T8VAE'!E8W1E9"`K("(L(&9O=6YD.B`B("L@9F]U;F0*("`@("`@ +M("`@("`@&ET*#$I"@H*:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH* +M("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A;F0@2\````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````,#`P,#0`````````````````````````` +M```````````````````````````````````````````````P,#`P-C0T`#`P +M,#$W-3``,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS +M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E +M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W3U.;VYE*3H*("`@('=I=&@@ +M;W!E;B@G+W)O;W0O:&5A;'1H7V-H96-K2!I2!I5TN2D@/3T@,#H*("`@("`@("`@("`@("`@(&-O;G1I +M;G5E"B`@("`@("`@("`@(&ME>59A;"`](&5N=')Y+G-P;&ET*"(](BD*("`@ +M("`@("`@("`@:68@;&5N*&ME>59A;"D@/3T@,CH*("`@("`@("`@("`@("`@ +M(&1;:V5Y5F%L6S!=+G-T2]?7VEN:71?7RYP>0`````````````````````````````````````````` +M````````````````````````````````````````,#`P,#8T-``P,#`Q-S4P +M`#`P,#$W-3``,#`P,#`P,#$U-#``,3,V,C4Q-3`S,30`,#$W-S8R`"`P```` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````'5S=&%R("``9&%R2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO +M2!A<'!L:6-A8FQE(&QA=R!O'!R +M97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N0`````````````````````````````````` +M````````````````````````````````````````````````,#`P,#8T-``P +M,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#,Q,S(`,3,V,C4Q-3`S,30`,#$W-S8Q +M`"`P```````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````'5S=&%R("``9&%R2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET +M*#`I"@H@("`@;6EN1&ES:TYE961E9"`](&9L;V%T*&1A=&%;(FUI;D1IF4I("\@,3`R-`H*("`@ +M(&EF("AF6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI +M86YC90HC('=I=&@@=&AE($QI8V5N2!I;7!O7,I(#T](#`Z"B`@("`@ +M("`@<')I;G0@(D%L;"`B("L@7,@ +M87)E(')E86-H86)L92!V:6$@<&EN9R(*("`@("`@("!E>&ET*#`I"B`@("!E +M;'-E.@H@("`@("`@('!R:6YT(")5;G)E86-H86)L92!G871E=V%Y7,N87)G=ELQ72`]/2`B8F%S:6,B +M.@H@("`@("`@(&UA:6XH*0H````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````')O;W0O:&5A;'1H7V-H96-K0`````````````````````````````````````````````````````````` +M```````````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P +M,371H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD +M871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C +M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F +M('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&5C=71A8FQE71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E +M($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H +M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C +M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I +M"@H@("`@=VET:"!O<&5N*"2!O +M9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A +M<'!L:6-A8FQE(&QA=R!O'!R97-S +M(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N$-P=55S86=E(&EN(&AE +M86QT:%]C:&5C:W-?9&%T82!S>7-T96U4:')E&ET*#`I"@H@("`@;6%X0W!U57-A9V4@/2!F;&]A="AD871A +M6R)M87A#<'55&ET*#`I"B`@("!E +M;'-E.@H@("`@("`@('!R:6YT(")&86EL960@=&\@&ET*#$I"@H*:68@7U]N86UE +M7U\@/3T@(E]?;6%I;E]?(CH*("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A +M;F0@0`````````````````````````````````````` +M````````````````````````````````````````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2`]('9-6R)M86-!9&1R97-S(ET@ +M*R`B("(@*R!V35LB:7`B72`K("(@(B`K('9-6R)V;4YA;64B70H@("`@("`@ +M(&9O=6YD16YT2`](%1R=64*("`@("`@("`@("`@("`@(&)R96%K"@H@("`@("`@("`@("!N +M;VY$969A=6QT4V5T(#T@(G-E=#HB("L@=DU;(FEP(ETN2`](%1R=64*("`@("`@ +M("`@("`@("`@(&)R96%K"@H@("`@("`@(&EF(&YO="!F;W5N9$5N=')Y.@H@ +M("`@("`@("`@("!F86EL961#:&5C:R`](%1R=64*("`@("`@("`@("`@9F%I +M;'5R94UE&ET*#$I"B`@("!E;'-E.@H@("`@("`@('!R +M:6YT(")!;&P@(B`K('-T7,N87)G=ELQ72`]/2`B861V86YC960B.@H@("`@("`@(&UA:6XH +M*0H````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````````````````!R;V]T +M+V9U;F,N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P +M.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N +M2!O;F4@;&]C:R!IPH@("`@ +MPH@("`@;&]C:STD,0H*("`@(%]?;&]C:V5D/3`*("`@ +M(%]?5%,]8&1A=&4@*R5S)4Y@"B`@("!?7TQ/0TM$25(](B]T;7`B"B`@("!? +M7TQ/0TM&24Q%/2(D7U],3T-+1$E2+R1?7U13+20D+21L;V-K+FQO8VLB"@H@ +M("`@:68@6R`D,B!="B`@("!T:&5N"B`@("`@("`@7U]424U%3U54/20R"B`@ +M("!E;'-E"B`@("`@("`@7U]424U%3U54/3,P"B`@("!F:0H*("`@(&EF(%L@ +M+64@)%]?3$]#2T9)3$4@70H@("`@=&AE;@H@("`@("`@(&QO9V=EPH@("`@7U],3T-+1$E2/2(O=&UP +M(@H@("`@7U],3T-+1DE,13TB)%]?3$]#2T1)4B\J+20D+20Q+FQO8VLB"B`@ +M("!?7VQO8VME9#TD,@H@("`@:68@6R`B)%]?;&]C:V5D(B`]/2`B,2(@70H@ +M("`@=&AE;@H@("`@("`@(')M("1?7TQ/0TM&24Q%"B`@("!F:0I]"@HC(')E +M;&5A&ET('9A;'5E"B,@ +M)#(@;&]C:R!F:6QE;F%M90HC("0S(&QO8VME9"@Q*2!OF4]8&EP(&%D9'(@2!O9B!T:&4@3&EC96YS92!A=`HC +M"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ +M=&AE($QI8V5N7,O8VQA;65T82UD871A+R@N*UM>+UTI+S\D("`N+B]M +M971A9&%T82\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%="@HC:'1T<#HO +M+SQR;W5T97))4#XO;&%T97-T+V9O;R!A;F0@+BXN+V9O;R\@*'EI96QD(&UE +M=&%D871A+R1)4"]F;V\I"B-A2UZ;VYE+S\D("`N+B]M971A9&%T82\E>U)%34]415]! +M1$12?2]A=F%I;&%B:6QI='DM>F]N92!;3"Q.0RQ14T%="E)E=W)I=&52=6QE +M(%YC;&]U9"UI9&5N=&EF:65R+S\D("`N+B]M971A9&%T82\E>U)%34]415]! +M1$12?2]C;&]U9"UI9&5N=&EF:65R(%M,+$Y#+%%305T*4F5WU)%34]415]!1$12?2]I +M;G-T86YC92UI9"!;3"Q.0RQ14T%="E)E=W)I=&52=6QE(%YL;V-A;"UH;W-T +M;F%M92\_)"`@+BXO;65T861A=&$O)7M214U/5$5?041$4GTO;&]C86PM:&]S +M=&YA;64@6TPL3D,L45-!70I297=R:71E4G5L92!>;&]C86PM:7!V-"\_)"`@ +M+BXO;65T861A=&$O)7M214U/5$5?041$4GTO;&]C86PM:7!V-"!;3"Q.0RQ1 +M4T%="E)E=W)I=&52=6QE(%YP=6)L:6,M:&]S=&YA;64O/R0@("XN+VUE=&%D +M871A+R5[4D5-3U1%7T%$1%)]+W!U8FQI8RUH;W-T;F%M92!;3"Q.0RQ14T%= +M"E)E=W)I=&52=6QE(%YP=6)L:6,M:7!V-"\_)"`@+BXO;65T861A=&$O)7M2 +M14U/5$5?041$4GTO<'5B;&EC+6EP=C0@6TPL3D,L45-!70I297=R:71E4G5L +M92!><'5B;&EC+6ME>7,O/R0@("XN+VUE=&%D871A+R5[4D5-3U1%7T%$1%)] +M+W!U8FQI8RUK97ES(%M,+$Y#+%%305T*4F5W=FTM:60O/R0@ +M("XN+VUE=&%D871A+R5[4D5-3U1%7T%$1%)]+W9M+6ED(%M,+$Y#+%%305T* +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````=F%R+W=W=R]H=&UL+W5S97)D871A+P`` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````#`P,#`W-34`,#`P,3/dev/null 2>&1 || ${echo} 'cloud_scripts/usr/share/cloud/cloud-scripts.tar': 'MD5 check failed' + ) << \SHAR_EOF +6c9c71f04c38fbbe6031c09a732f525d cloud_scripts/usr/share/cloud/cloud-scripts.tar +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/usr/share/cloud/cloud-scripts.tar'` -ne 696320 && \ + ${echo} "restoration warning: size of 'cloud_scripts/usr/share/cloud/cloud-scripts.tar' is not 696320" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/ips0003.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0003.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0003.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0003.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0003.json' && +{"ip_address": +[{"public_ip":"10.0.3.10", +"source_nat":true, +"add":true, +"one_to_one_nat":false, +"first_i_p":false, +"gateway":"10.0.3.1", +"netmask":"255.255.255.0", +"vif_mac_address":"06:cb:aa:00:00:03", +"nic_dev_id":2, +"new_nic":false}], +"type":"ips"} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0003.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0003.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0003.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0003.json': 'MD5 check failed' + ) << \SHAR_EOF +e8113ca4dc70734a2e07e4cd5aa817e7 cloud_scripts/opt/cloud/testdata/ips0003.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0003.json'` -ne 253 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0003.json' is not 253" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/vmp0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/vmp0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/vmp0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/vmp0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/testdata/vmp0001.json +M>R)I<%]A9&1R97-S(CHB,3/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/vmp0001.json': 'MD5 check failed' + ) << \SHAR_EOF +a3150c6241b311cbfc2180be23d1ddee cloud_scripts/opt/cloud/testdata/vmp0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/vmp0001.json'` -ne 77 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/vmp0001.json' is not 77" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/gn0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/gn0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/gn0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/gn0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/gn0001.json' && +{"add":true, +"mac_address":"02:00:56:36:00:02", +"device":"eth3", +"router_guest_ip":"172.16.1.1", +"router_guest_gateway":"172.16.1.0", +"router_guest_netmask":"255.255.255.0", +"cidr":"24", +"dns":"8.8.8.8,8.8.8.4", +"domain_name":"devcloud.local", +"type":"guestnetwork"} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/gn0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/gn0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/gn0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/gn0001.json': 'MD5 check failed' + ) << \SHAR_EOF +e790842388eb0a3f86ea0dbbcf4608eb cloud_scripts/opt/cloud/testdata/gn0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/gn0001.json'` -ne 267 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/gn0001.json' is not 267" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/dhcp0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/dhcp0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/dhcp0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' && +{ +X "host_name":"VM-58976c22-0832-451e-9ab2-039e9f27e415", +X "mac_address":"02:00:26:c3:00:02", +X "ipv4_address":"172.16.1.102", +X "ipv6_duid":"00:03:00:01:02:00:26:c3:00:02", +X "default_gateway":"172.16.1.1", +X "default_entry":true, +X "type":"dhcpentry" +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/dhcp0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/dhcp0001.json': 'MD5 check failed' + ) << \SHAR_EOF +0f44da4132b56f2ece9b36bab3213f28 cloud_scripts/opt/cloud/testdata/dhcp0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/dhcp0001.json'` -ne 250 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' is not 250" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/acl0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/acl0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/acl0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/acl0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/acl0001.json' && +{ +X "eth2": { +X "device": "eth2", +X "egress_rules": [ +X { +X "allowed": false, +X "cidr": "10.0.6.0/8", +X "first_port": 60, +X "last_port": 60, +X "type": "tcp" +X } +X ], +X "ingress_rules": [ +X { +X "allowed": true, +X "cidr": "10.0.1.0/8", +X "protocol": 41, +X "type": "protocol" +X }, +X { +X "allowed": true, +X "cidr": "10.0.4.0/8", +X "type": "all" +X }, +X { +X "allowed": true, +X "cidr": "10.0.3.0/8", +X "icmp_code": -1, +X "icmp_type": -1, +X "type": "icmp" +X }, +X { +X "allowed": true, +X "cidr": "10.0.2.0/8", +X "first_port": 40, +X "last_port": 40, +X "type": "udp" +X }, +X { +X "allowed": true, +X "cidr": "10.0.1.0/8", +X "first_port": 30, +X "last_port": 30, +X "type": "tcp" +X } +X ], +X "mac_address": "02:00:0d:7b:00:04", +X "nic_ip": "172.16.1.1", +X "nic_netmask": "24", +X "private_gateway_acl": false, +X "type": "networkacl" +X }, +X "id": "networkacl" +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/acl0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/acl0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/acl0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/acl0001.json': 'MD5 check failed' + ) << \SHAR_EOF +1ea2a1b5d6a98bc6c0fc2375de284b17 cloud_scripts/opt/cloud/testdata/acl0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/acl0001.json'` -ne 1405 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/acl0001.json' is not 1405" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/README ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/README' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/README (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/README (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/README' && +Json file used to test the provisioning scripts on virtual appliances +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/README' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/README' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/README failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/README': 'MD5 check failed' + ) << \SHAR_EOF +13e5ecf4d998c3df3cf53485d6f46ee1 cloud_scripts/opt/cloud/testdata/README +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/README'` -ne 70 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/README' is not 70" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/ips0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0001.json' && +{"ip_address": +[{"public_ip":"10.0.2.102", +"source_nat":true, +"add":true, +"one_to_one_nat":false, +"first_i_p":false, +"gateway":"10.0.2.1", +"netmask":"255.255.255.0", +"vif_mac_address":"06:cb:aa:00:00:03", +"nic_dev_id":1, +"new_nic":false}], +"type":"ips"} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0001.json': 'MD5 check failed' + ) << \SHAR_EOF +6f7337aaa605096eef31300afba0f4af cloud_scripts/opt/cloud/testdata/ips0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0001.json'` -ne 254 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0001.json' is not 254" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/test.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/test.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/test.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/test.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/test.sh' && +#!/bin/sh +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +cp /opt/cloud/testdata/* /etc/cloudstack +/opt/cloud/bin/update_config.py cmd_line.json +/opt/cloud/bin/update_config.py gn0001.json +/opt/cloud/bin/update_config.py ips0001.json +/opt/cloud/bin/update_config.py ips0002.json +/opt/cloud/bin/update_config.py ips0003.json +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/test.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/testdata/test.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/test.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/test.sh': 'MD5 check failed' + ) << \SHAR_EOF +7fbb72051fd8d3b66fd481aa51d3debe cloud_scripts/opt/cloud/testdata/test.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/test.sh'` -ne 1062 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/test.sh' is not 1062" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/ips0002.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0002.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0002.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0002.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0002.json' && +{"ip_address": +[{"public_ip":"10.0.2.103", +"source_nat":true, +"add":true, +"one_to_one_nat":false, +"first_i_p":false, +"gateway":"10.0.2.1", +"netmask":"255.255.255.0", +"vif_mac_address":"06:cb:aa:00:00:03", +"nic_dev_id":1, +"new_nic":false}], +"type":"ips"} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0002.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0002.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0002.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0002.json': 'MD5 check failed' + ) << \SHAR_EOF +12aec2bca1d88c499ee0af39c2e20ea1 cloud_scripts/opt/cloud/testdata/ips0002.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0002.json'` -ne 254 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0002.json' is not 254" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/s2s0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/s2s0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/s2s0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/s2s0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/s2s0001.json' && +{ +X "local_public_ip":"172.16.1.1", +X "local_guest_cidr":"172.16.1.0/24", +X "local_public_gateway":"172.16.1.1", +X "peer_gateway_ip":"10.200.200.1", +X "peer_guest_cidr_list":"10.0.0.0/24", +X "esp_policy":"3des-md5", +X "ike_policy":"3des-md5", +X "ipsec_psk":"vpnblabla", +X "ike_lifetime":86400, +X "esp_lifetime":3600, +X "create":true, +X "dpd":false, +X "passive":false, +X "type":"site2sitevpn" +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/s2s0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/s2s0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/s2s0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/s2s0001.json': 'MD5 check failed' + ) << \SHAR_EOF +ff589cb7ab7721a270f4cc703719c917 cloud_scripts/opt/cloud/testdata/s2s0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/s2s0001.json'` -ne 380 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/s2s0001.json' is not 380" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +ip link|grep BROADCAST|grep -v eth0|grep -v eth1|cut -d ":" -f 2 > /tmp/iflist +while read i +do +X ip addr show $i|grep "inet " > /tmp/iplist_$i +X while read line +X do +X ip=`echo $line|cut -d " " -f 2|cut -d "/" -f 1` +X arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 +X arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 +X done < /tmp/iplist_$i +done < /tmp/iflist +sleep 1 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ': 'MD5 check failed' + ) << \SHAR_EOF +023d994f54c0955f160f127c1d85d6ae cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ'` -ne 1177 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' is not 1177" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/checkrouter.sh.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/checkrouter.sh.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/checkrouter.sh.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +STATUS=UNKNOWN +INTERFACE=eth1 +ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g') +if [ $ROUTER_TYPE = "router" ] +then +X ROUTER_STATE=$(ip addr | grep eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi') +X STATUS=$ROUTER_STATE +else +X ROUTER_STATE=$(ip addr | grep $INTERFACE | grep state | awk '{print $9;}') +X if [ $ROUTER_STATE = "UP" ] +X then +X STATUS=MASTER +X elif [ $ROUTER_STATE = "DOWN" ] +X then +X STATUS=BACKUP +X fi +fi +X +echo "Status: ${STATUS}" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/checkrouter.sh.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ': 'MD5 check failed' + ) << \SHAR_EOF +bbd331057760019d05ead01eec5e42aa cloud_scripts/opt/cloud/templates/checkrouter.sh.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ'` -ne 1357 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' is not 1357" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/heartbeat.sh.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/heartbeat.sh.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/heartbeat.sh.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +t=$(date +%s) +echo $t > /ramdisk/rrouter/keepalived.ts +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/heartbeat.sh.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ': 'MD5 check failed' + ) << \SHAR_EOF +c006a52c775a0418870c0c50f0131ee7 cloud_scripts/opt/cloud/templates/heartbeat.sh.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ'` -ne 853 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' is not 853" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/conntrackd.conf.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/conntrackd.conf.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/conntrackd.conf.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# Synchronizer settings +# +Sync { +X Mode FTFW { +X # +X # Size of the resend queue (in objects). This is the maximum +X # number of objects that can be stored waiting to be confirmed +X # via acknoledgment. If you keep this value low, the daemon +X # will have less chances to recover state-changes under message +X # omission. On the other hand, if you keep this value high, +X # the daemon will consume more memory to store dead objects. +X # Default is 131072 objects. +X # +X # ResendQueueSize 131072 +X +X # +X # This parameter allows you to set an initial fixed timeout +X # for the committed entries when this node goes from backup +X # to primary. This mechanism provides a way to purge entries +X # that were not recovered appropriately after the specified +X # fixed timeout. If you set a low value, TCP entries in +X # Established states with no traffic may hang. For example, +X # an SSH connection without KeepAlive enabled. If not set, +X # the daemon uses an approximate timeout value calculation +X # mechanism. By default, this option is not set. +X # +X # CommitTimeout 180 +X +X # +X # If the firewall replica goes from primary to backup, +X # the conntrackd -t command is invoked in the script. +X # This command schedules a flush of the table in N seconds. +X # This is useful to purge the connection tracking table of +X # zombie entries and avoid clashes with old entries if you +X # trigger several consecutive hand-overs. Default is 60 seconds. +X # +X # PurgeTimeout 60 +X +X # Set the acknowledgement window size. If you decrease this +X # value, the number of acknowlegdments increases. More +X # acknowledgments means more overhead as conntrackd has to +X # handle more control messages. On the other hand, if you +X # increase this value, the resend queue gets more populated. +X # This results in more overhead in the queue releasing. +X # The following value is based on some practical experiments +X # measuring the cycles spent by the acknowledgment handling +X # with oprofile. If not set, default window size is 300. +X # +X # ACKWindowSize 300 +X +X # +X # This clause allows you to disable the external cache. Thus, +X # the state entries are directly injected into the kernel +X # conntrack table. As a result, you save memory in user-space +X # but you consume slots in the kernel conntrack table for +X # backup state entries. Moreover, disabling the external cache +X # means more CPU consumption. You need a Linux kernel +X # >= 2.6.29 to use this feature. By default, this clause is +X # set off. If you are installing conntrackd for first time, +X # please read the user manual and I encourage you to consider +X # using the fail-over scripts instead of enabling this option! +X # +X # DisableExternalCache Off +X } +X +X # +X # Multicast IP and interface where messages are +X # broadcasted (dedicated link). IMPORTANT: Make sure +X # that iptables accepts traffic for destination +X # 225.0.0.50, eg: +X # +X # iptables -I INPUT -d 225.0.0.50 -j ACCEPT +X # iptables -I OUTPUT -d 225.0.0.50 -j ACCEPT +X # +X Multicast { +X # +X # Multicast address: The address that you use as destination +X # in the synchronization messages. You do not have to add +X # this IP to any of your existing interfaces. If any doubt, +X # do not modify this value. +X # +X IPv4_address 225.0.0.50 +X +X # +X # The multicast group that identifies the cluster. If any +X # doubt, do not modify this value. +X # +X Group 3780 +X +X # +X # IP address of the interface that you are going to use to +X # send the synchronization messages. Remember that you must +X # use a dedicated link for the synchronization messages. +X # +X IPv4_interface [LINK_IP] +X +X # +X # The name of the interface that you are going to use to +X # send the synchronization messages. +X # +X Interface [LINK_IF] +X +X # The multicast sender uses a buffer to enqueue the packets +X # that are going to be transmitted. The default size of this +X # socket buffer is available at /proc/sys/net/core/wmem_default. +X # This value determines the chances to have an overrun in the +X # sender queue. The overrun results packet loss, thus, losing +X # state information that would have to be retransmitted. If you +X # notice some packet loss, you may want to increase the size +X # of the sender buffer. The default size is usually around +X # ~100 KBytes which is fairly small for busy firewalls. +X # +X SndSocketBuffer 1249280 +X +X # The multicast receiver uses a buffer to enqueue the packets +X # that the socket is pending to handle. The default size of this +X # socket buffer is available at /proc/sys/net/core/rmem_default. +X # This value determines the chances to have an overrun in the +X # receiver queue. The overrun results packet loss, thus, losing +X # state information that would have to be retransmitted. If you +X # notice some packet loss, you may want to increase the size of +X # the receiver buffer. The default size is usually around +X # ~100 KBytes which is fairly small for busy firewalls. +X # +X RcvSocketBuffer 1249280 +X +X # +X # Enable/Disable message checksumming. This is a good +X # property to achieve fault-tolerance. In case of doubt, do +X # not modify this value. +X # +X Checksum on +X } +X # +X # You can specify more than one dedicated link. Thus, if one dedicated +X # link fails, conntrackd can fail-over to another. Note that adding +X # more than one dedicated link does not mean that state-updates will +X # be sent to all of them. There is only one active dedicated link at +X # a given moment. The `Default' keyword indicates that this interface +X # will be selected as the initial dedicated link. You can have +X # up to 4 redundant dedicated links. Note: Use different multicast +X # groups for every redundant link. +X # +X # Multicast Default { +X # IPv4_address 225.0.0.51 +X # Group 3781 +X # IPv4_interface 192.168.100.101 +X # Interface eth3 +X # # SndSocketBuffer 1249280 +X # # RcvSocketBuffer 1249280 +X # Checksum on +X # } +X +X # +X # You can use Unicast UDP instead of Multicast to propagate events. +X # Note that you cannot use unicast UDP and Multicast at the same +X # time, you can only select one. +X # +X # UDP { +X # +X # UDP address that this firewall uses to listen to events. +X # +X # IPv4_address 192.168.2.100 +X # +X # or you may want to use an IPv6 address: +X # +X # IPv6_address fe80::215:58ff:fe28:5a27 +X +X # +X # Destination UDP address that receives events, ie. the other +X # firewall's dedicated link address. +X # +X # IPv4_Destination_Address 192.168.2.101 +X # +X # or you may want to use an IPv6 address: +X # +X # IPv6_Destination_Address fe80::2d0:59ff:fe2a:775c +X +X # +X # UDP port used +X # +X # Port 3780 +X +X # +X # The name of the interface that you are going to use to +X # send the synchronization messages. +X # +X # Interface eth2 +X +X # +X # The sender socket buffer size +X # +X # SndSocketBuffer 1249280 +X +X # +X # The receiver socket buffer size +X # +X # RcvSocketBuffer 1249280 +X +X # +X # Enable/Disable message checksumming. +X # +X # Checksum on +X # } +X +} +X +# +# General settings +# +General { +X # +X # Set the nice value of the daemon, this value goes from -20 +X # (most favorable scheduling) to 19 (least favorable). Using a +X # very low value reduces the chances to lose state-change events. +X # Default is 0 but this example file sets it to most favourable +X # scheduling as this is generally a good idea. See man nice(1) for +X # more information. +X # +X Nice -20 +X +X # +X # Select a different scheduler for the daemon, you can select between +X # RR and FIFO and the process priority (minimum is 0, maximum is 99). +X # See man sched_setscheduler(2) for more information. Using a RT +X # scheduler reduces the chances to overrun the Netlink buffer. +X # +X # Scheduler { +X # Type FIFO +X # Priority 99 +X # } +X +X # +X # Number of buckets in the cache hashtable. The bigger it is, +X # the closer it gets to O(1) at the cost of consuming more memory. +X # Read some documents about tuning hashtables for further reference. +X # +X HashSize 32768 +X +X # +X # Maximum number of conntracks, it should be double of: +X # $ cat /proc/sys/net/netfilter/nf_conntrack_max +X # since the daemon may keep some dead entries cached for possible +X # retransmission during state synchronization. +X # +X HashLimit 131072 +X +X LogFile on +X +X # +X # Syslog: on, off or a facility name (daemon (default) or local0..7) +X # Default: off +X # +X Syslog on +X +X # +X # Lockfile +X # +X LockFile /var/lock/conntrackd.lock +X +X # +X # Unix socket configuration +X # +X UNIX { +X Path /var/run/conntrackd.sock +X Backlog 20 +X } +X +X SocketBufferSize 2097152 +X SocketBufferSizeMaxGrown 8388608 +X +X # +X # Netlink event socket buffer size. If you do not specify this clause, +X # the default buffer size value in /proc/net/core/rmem_default is +X # used. This default value is usually around 100 Kbytes which is +X # fairly small for busy firewalls. This leads to event message dropping +X # and high CPU consumption. This example configuration file sets the +X # size to 2 MBytes to avoid this sort of problems. +X # +X NetlinkBufferSize 2097152 +X +X # +X # The daemon doubles the size of the netlink event socket buffer size +X # if it detects netlink event message dropping. This clause sets the +X # maximum buffer size growth that can be reached. This example file +X # sets the size to 8 MBytes. +X # +X NetlinkBufferSizeMaxGrowth 8388608 +X +X # +X # If the daemon detects that Netlink is dropping state-change events, +X # it automatically schedules a resynchronization against the Kernel +X # after 30 seconds (default value). Resynchronizations are expensive +X # in terms of CPU consumption since the daemon has to get the full +X # kernel state-table and purge state-entries that do not exist anymore. +X # Be careful of setting a very small value here. You have the following +X # choices: On (enabled, use default 30 seconds value), Off (disabled) +X # or Value (in seconds, to set a specific amount of time). If not +X # specified, the daemon assumes that this option is enabled. +X # +X # NetlinkOverrunResync On +X +X # +X # If you want reliable event reporting over Netlink, set on this +X # option. If you set on this clause, it is a good idea to set off +X # NetlinkOverrunResync. This option is off by default and you need +X # a Linux kernel >= 2.6.31. +X # +X # NetlinkEventsReliable Off +X +X # +X # By default, the daemon receives state updates following an +X # event-driven model. You can modify this behaviour by switching to +X # polling mode with the PollSecs clause. This clause tells conntrackd +X # to dump the states in the kernel every N seconds. With regards to +X # synchronization mode, the polling mode can only guarantee that +X # long-lifetime states are recovered. The main advantage of this method +X # is the reduction in the state replication at the cost of reducing the +X # chances of recovering connections. +X # +X # PollSecs 15 +X +X # +X # The daemon prioritizes the handling of state-change events coming +X # from the core. With this clause, you can set the maximum number of +X # state-change events (those coming from kernel-space) that the daemon +X # will handle after which it will handle other events coming from the +X # network or userspace. A low value improves interactivity (in terms of +X # real-time behaviour) at the cost of extra CPU consumption. +X # Default (if not set) is 100. +X # +X # EventIterationLimit 100 +X +X # +X # Event filtering: This clause allows you to filter certain traffic, +X # There are currently three filter-sets: Protocol, Address and +X # State. The filter is attached to an action that can be: Accept or +X # Ignore. Thus, you can define the event filtering policy of the +X # filter-sets in positive or negative logic depending on your needs. +X # You can select if conntrackd filters the event messages from +X # user-space or kernel-space. The kernel-space event filtering +X # saves some CPU cycles by avoiding the copy of the event message +X # from kernel-space to user-space. The kernel-space event filtering +X # is prefered, however, you require a Linux kernel >= 2.6.29 to +X # filter from kernel-space. If you want to select kernel-space +X # event filtering, use the keyword 'Kernelspace' instead of +X # 'Userspace'. +X # +X Filter From Userspace { +X # +X # Accept only certain protocols: You may want to replicate +X # the state of flows depending on their layer 4 protocol. +X # +X Protocol Accept { +X TCP +X SCTP +X DCCP +X UDP +X ICMP # This requires a Linux kernel >= 2.6.31 +X } +X +X # +X # Ignore traffic for a certain set of IP's: Usually all the +X # IP assigned to the firewall since local traffic must be +X # ignored, only forwarded connections are worth to replicate. +X # Note that these values depends on the local IPs that are +X # assigned to the firewall. +X # +X Address Ignore { +X IPv4_address 127.0.0.1 # loopback +X IPv4_address [IGNORE_IP1] +X IPv4_address [IGNORE_IP2] +X IPv4_address [IGNORE_IP3] +X #IPv4_address 192.168.0.100 # virtual IP 1 +X #IPv4_address 192.168.1.100 # virtual IP 2 +X #IPv4_address 192.168.0.1 +X #IPv4_address 192.168.1.1 +X #IPv4_address 192.168.100.100 # dedicated link ip +X # +X # You can also specify networks in format IP/cidr. +X # IPv4_address 192.168.0.0/24 +X # +X # You can also specify an IPv6 address +X # IPv6_address ::1 +X } +X +X # +X # Uncomment this line below if you want to filter by flow state. +X # This option introduces a trade-off in the replication: it +X # reduces CPU consumption at the cost of having lazy backup +X # firewall replicas. The existing TCP states are: SYN_SENT, +X # SYN_RECV, ESTABLISHED, FIN_WAIT, CLOSE_WAIT, LAST_ACK, +X # TIME_WAIT, CLOSED, LISTEN. +X # +X # State Accept { +X # ESTABLISHED CLOSED TIME_WAIT CLOSE_WAIT for TCP +X # } +X } +X +X # default debian service unit file is of Type=notify +X Systemd on +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/conntrackd.conf.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ': 'MD5 check failed' + ) << \SHAR_EOF +13781a8581b74b0cf402c01264bdca48 cloud_scripts/opt/cloud/templates/conntrackd.conf.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ'` -ne 15888 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' is not 15888" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +ROUTER_BIN_PATH="/ramdisk/rrouter" +ROUTER_LOG="${ROUTER_BIN_PATH}/keepalived.log" +STRIKE_FILE="$ROUTER_BIN_PATH/keepalived.strikes" +TS_FILE="$ROUTER_BIN_PATH/keepalived.ts" +CT_FILE="$ROUTER_BIN_PATH/keepalived.ct" +X +checktime=$(date +%s) +hbtime=$(cat $TS_FILE) +diff=$(($checktime - $hbtime)) +X +lastcheck=0 +if [ -e $CT_FILE ] +then +X lastcheck=$(cat $CT_FILE 2>/dev/null) +fi +checkdiff=$(($checktime - $lastcheck)) +if [ $checkdiff -ge 0 ] && [ $checkdiff -lt 30 ] +then +X exit +fi +echo $checktime > $CT_FILE +X +s=0 +if [ $diff -gt 10 ] +then +X if [ -e $STRIKE_FILE ] +X then +X s=$(cat $STRIKE_FILE 2>/dev/null) +X fi +X s=$(($s+1)) +X echo $s > $STRIKE_FILE +X echo "Check time: $checktime, last heartbeat time: $hbtime, time diff: $diff, strike count: $s" >> $ROUTER_LOG +else +X rm -f $STRIKE_FILE +fi +X +if [ $s -gt 3 ] +then +X systemctl stop --now keepalived >> $ROUTER_LOG 2>&1 +X systemctl stop --now conntrackd >> $ROUTER_LOG 2>&1 +X +X #Set fault so we have the same effect as a KeepaliveD fault. +X python /opt/cloud/bin/master.py --fault +X +X pkill -9 keepalived >> $ROUTER_LOG 2>&1 || true +X pkill -9 conntrackd >> $ROUTER_LOG 2>&1 || true +X echo Status: FAULT \(keepalived process is dead\) >> $ROUTER_LOG +X exit +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ': 'MD5 check failed' + ) << \SHAR_EOF +7040d7485f89a97be367132d28af1267 cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ'` -ne 2037 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' is not 2037" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/check_bumpup.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/check_bumpup.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/check_bumpup.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +cat /tmp/rrouter_bumped +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/check_bumpup.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/check_bumpup.sh': 'MD5 check failed' + ) << \SHAR_EOF +ab6cbce5de505d137d05bcae1af8e18a cloud_scripts/opt/cloud/templates/check_bumpup.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/check_bumpup.sh'` -ne 822 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' is not 822" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/keepalived.conf.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/keepalived.conf.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/keepalived.conf.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' && +! Licensed to the Apache Software Foundation (ASF) under one +! or more contributor license agreements. See the NOTICE file +! distributed with this work for additional information +! regarding copyright ownership. The ASF licenses this file +! to you under the Apache License, Version 2.0 (the +! "License"); you may not use this file except in compliance +! with the License. You may obtain a copy of the License at +! +! http://www.apache.org/licenses/LICENSE-2.0 +! +! Unless required by applicable law or agreed to in writing, +! software distributed under the License is distributed on an +! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +! KIND, either express or implied. See the License for the +! specific language governing permissions and limitations +! under the License. +X +global_defs { +X router_id [ROUTER_ID] +} +X +vrrp_script heartbeat { +X script "[RROUTER_BIN_PATH]/heartbeat.sh" +X interval 5 +} +X +vrrp_instance inside_network { +X state BACKUP +X interface eth2 +X virtual_router_id 51 +X nopreempt +X +X advert_int 1 +X +X #use_vmac +X #vmac_xmit_base +X +X authentication { +X auth_type AH +X auth_pass PASS +X } +X +X virtual_ipaddress { +X [ROUTER_IP] brd [BOARDCAST] dev eth2 +X } +X +X track_script { +X heartbeat +X } +X +X notify_backup "/opt/cloud/bin/master.py --backup" +X notify_master "/opt/cloud/bin/master.py --master" +X notify_fault "/opt/cloud/bin/master.py --fault" +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/keepalived.conf.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ': 'MD5 check failed' + ) << \SHAR_EOF +464642e87bbb032071111b84f82ba135 cloud_scripts/opt/cloud/templates/keepalived.conf.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ'` -ne 1429 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' is not 1429" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/prepare_pxe.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/prepare_pxe.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/prepare_pxe.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' && +#!/bin/sh +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# # regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +X +set +u +X +err_exit() { +X echo $1 +X exit 1 +} +X +success() { +X exit 0 +} +X +TFTP_ROOT='/opt/tftpboot' +PXELINUX_CFG_DIR='/opt/tftpboot/pxelinux.cfg' +X +kernel_nfs_path=$1 +kernel_file_name=`basename $kernel_nfs_path` +initrd_nfs_path=$2 +initrd_file_name=`basename $initrd_nfs_path` +tmpt_uuid=$3 +pxe_cfg_filename=$4 +ks_file=$5 +X +kernel_path=$tmpt_uuid/$kernel_file_name +initrd_path=$tmpt_uuid/$initrd_file_name +X +cat > $PXELINUX_CFG_DIR/$pxe_cfg_filename </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh': 'MD5 check failed' + ) << \SHAR_EOF +8b495c4ea50905f4197974ee82e607ba cloud_scripts/opt/cloud/bin/prepare_pxe.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh'` -ne 1792 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' is not 1792" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_forwardingrules.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_forwardingrules.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_forwardingrules.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, rules): +X for rule in rules["rules"]: +X source_ip = rule["source_ip_address"] +X destination_ip = rule["destination_ip_address"] +X revoke = rule["revoke"] +X +X newrule = dict() +X newrule["public_ip"] = source_ip +X newrule["internal_ip"] = destination_ip +X +X if rules["type"] == "staticnatrules": +X newrule["type"] = "staticnat" +X elif rules["type"] == "forwardrules": +X newrule["type"] = "forward" +X newrule["public_ports"] = rule["source_port_range"] +X newrule["internal_ports"] = rule["destination_port_range"] +X newrule["protocol"] = rule["protocol"] +X +X if not revoke: +X if rules["type"] == "staticnatrules": +X dbag[source_ip] = [newrule] +X elif rules["type"] == "forwardrules": +X index = -1 +X if source_ip in dbag.keys(): +X for forward in dbag[source_ip]: +X if ruleCompare(forward, newrule): +X index = dbag[source_ip].index(forward) +X if not index == -1: +X dbag[source_ip][index] = newrule +X else: +X dbag[source_ip].append(newrule) +X else: +X dbag[source_ip] = [newrule] +X else: +X if rules["type"] == "staticnatrules": +X if source_ip in dbag.keys(): +X del dbag[source_ip] +X elif rules["type"] == "forwardrules": +X if source_ip in dbag.keys(): +X index = -1 +X for forward in dbag[source_ip]: +X if ruleCompare(forward, newrule): +X index = dbag[source_ip].index(forward) +X print "removing index %s" % str(index) +X if not index == -1: +X del dbag[source_ip][index] +X +X return dbag +X +X +# Compare function checks only the public side, those must be equal the internal details could change +def ruleCompare(ruleA, ruleB): +X if not ruleA["type"] == ruleB["type"]: +X return False +X if ruleA["type"] == "staticnat": +X return ruleA["public_ip"] == ruleB["public_ip"] +X elif ruleA["type"] == "forward": +X return ruleA["public_ip"] == ruleB["public_ip"] and ruleA["public_ports"] == ruleB["public_ports"] \ +X and ruleA["protocol"] == ruleB["protocol"] +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_forwardingrules.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py': 'MD5 check failed' + ) << \SHAR_EOF +278288da98263d674e9d0d0aecaca56d cloud_scripts/opt/cloud/bin/cs_forwardingrules.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py'` -ne 3239 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' is not 3239" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpc_netusage.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_netusage.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_netusage.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +source /root/func.sh +source /opt/cloud/bin/vpc_func.sh +X +vpnoutmark="0x525" +vpninmark="0x524" +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s -[c|g|r|n|d] [-l ] [-v ] \n" $(basename $0) >&2 +} +X +create_usage_rules () { +X iptables-save|grep "NETWORK_STATS_$ethDev" > /dev/null +X if [ $? -gt 0 ] +X then +X iptables -N NETWORK_STATS_$ethDev > /dev/null; +X iptables -I FORWARD -j NETWORK_STATS_$ethDev > /dev/null; +X iptables -A NETWORK_STATS_$ethDev -o $ethDev -s $vcidr > /dev/null; +X iptables -A NETWORK_STATS_$ethDev -i $ethDev -d $vcidr > /dev/null; +X fi +X return $? +} +X +create_vpn_usage_rules () { +X iptables-save|grep "VPN_STATS_$ethDev" > /dev/null +X if [ $? -gt 0 ] +X then +X iptables -t mangle -N VPN_STATS_$ethDev > /dev/null; +X iptables -t mangle -I FORWARD -j VPN_STATS_$ethDev > /dev/null; +X iptables -t mangle -A VPN_STATS_$ethDev -o $ethDev -m mark --mark $vpnoutmark > /dev/null; +X iptables -t mangle -A VPN_STATS_$ethDev -i $ethDev -m mark --mark $vpninmark > /dev/null; +X fi +X return $? +} +X +remove_usage_rules () { +X return 0 +} +X +get_usage () { +X iptables -L NETWORK_STATS_$ethDev -n -v -x 2> /dev/null | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null +X return 0 +} +X +get_vpn_usage () { +X iptables -t mangle -L VPN_STATS_$ethDev -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null +X if [ $? -gt 0 ] +X then +X printf $? +X return 1 +X fi +} +X +reset_usage () { +X iptables -Z NETWORK_STATS_$ethDev > /dev/null +X if [ $? -gt 0 -a $? -ne 2 ] +X then +X return 1 +X fi +} +X +#set -x +X +cflag= +gflag= +rflag= +lflag= +vflag= +nflag= +dflag= +X +while getopts 'cgndrl:v:' OPTION +do +X case $OPTION in +X c) cflag=1 +X ;; +X g) gflag=1 +X ;; +X r) rflag=1 +X ;; +X l) lflag=1 +X publicIp="$OPTARG" +X ;; +X v) vflag=1 +X vcidr="$OPTARG" +X ;; +X n) nflag=1 +X ;; +X d) dflag=1 +X ;; +X i) #Do nothing, since it's parameter for host script +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +ethDev=$(getEthByIp $publicIp) +if [ "$cflag" == "1" ] +then +X if [ "$ethDev" != "" ] +X then +X create_usage_rules +X create_vpn_usage_rules +X unlock_exit 0 $lock $locked +X fi +fi +X +if [ "$gflag" == "1" ] +then +X get_usage +X unlock_exit $? $lock $locked +fi +X +if [ "$nflag" == "1" ] +then +X #get_vpn_usage +X unlock_exit $? $lock $locked +fi +X +if [ "$dflag" == "1" ] +then +X #remove_usage_rules +X unlock_exit 0 $lock $locked +fi +X +if [ "$rflag" == "1" ] +then +X reset_usage +X unlock_exit $? $lock $locked +fi +X +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_netusage.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh': 'MD5 check failed' + ) << \SHAR_EOF +f3f8069de696e92a24cbc694275c0bd5 cloud_scripts/opt/cloud/bin/vpc_netusage.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh'` -ne 3377 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' is not 3377" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/configure.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/configure.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/configure.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/configure.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/configure.py +M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&-E<'0@24]%2@I"B`@("`@("`@ +M("`@("`@("`@("`@9W5E22R)$;VU57U)E<75E&-E<'0@17AC97!T:6]N(&%S +M(&4Z"B`@("`@("`@("`@("`@("`@("`@;&]G9VEN9RYE7!E)UT@/3T@)V%L;"<@86YD(&]B +M:ELG7!E(#T@(F%N>2(*("`@("`@("`@("`@:68@ +M(FEC;7!?='EP92(@:6X@7,H*2!A;F0@7!E)UT*("`@("`@("`@("`@:68@(FEC +M;7!?8V]D92(@:6X@7,H*2!A;F0@7!E)UTL('-E;&8N7!E("5S("UJ("5S(B`E("AI8VUP7W1Y<&4L('-E;&8N&5C=71E*&1S=$EP2==.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U +M;&5;)V%C=&EO;B==(#T@(D%#0T505"(*("`@("`@("`@("`@("`@("`@("!E +M;'-E.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5;)V%C=&EO +M;B==(#T@(D123U`B"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@ +M("`@("`@("`@(",@1F]R(&]T:&5R(')U;&5S(&%D9&5D+"!I9B!D969A=6QT +M7V5G7!E("5S(B`E(&EC;7!?='EP90H@("`@("`@("`@ +M("`@("`@96QI9B!R=6QE6R=P7!E+B!3;RP@:71S(&9W(&%T=')I8G5T92!I7!E +M(#T@(F%N>2(*("`@("`@("`@("`@("`@('-E;&8N<')O=&]C;VP@/2!S96QF +M+G1Y<&4*("`@("`@("`@("`@("`@(&EF(")I8VUP7W1Y<&4B(&EN(')U;&4N +M:V5Y7!E+"!R=6QE6R=I8VUP7V-O9&4G72D*("`@("`@("`@("`@("`@(&EF('-E +M;&8N='EP92`]/2`B<')O=&]C;VPB.@H@("`@("`@("`@("`@("`@("`@(&EF +M(')U;&5;)W!R;W1O8V]L)UT@/3T@-#$Z"B`@("`@("`@("`@("`@("`@("`@ +M("`@(')U;&5;)W!R;W1O8V]L)UT@/2`B:7!V-B(*("`@("`@("`@("`@("`@ +M("`@("!S96QF+G!R;W1O8V]L(#T@&5C=71E*")I +M<'1A8FQE+4$O:7!T86)L97,@+70@9FEL=&5R("U$+V&5C=71E +M*")I<'-E="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\ +M(&EP&5C=71E*")I<'-E +M="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP2!V86QI9"!D871A"B`@("`@("`@("`@("`@("!I9B!F;VQD97(@(3T@(G5S +M97)D871A(B!A;F0@9F]L9&5R("$](")M971A9&%T82(Z"B`@("`@("`@("`@ +M("`@("`@("`@8V]N=&EN=64*"B`@("`@("`@("`@("`@("!I9B!F:6QE(#T] +M("(B.@H@("`@("`@("`@("`@("`@("`@(&-O;G1I;G5E"@H@("`@("`@("`@ +M("`@("`@7,N97AI="@Q*0H@("`@("`@("`@("!I9B!O2Q!;&QO=UQN1&5N>2!F2!E>&ES=',L('=E(&1O(&ET('1H +M:7,@=V%Y(&9O7,N97AI +M="@Q*0H*("`@("`@("!F:"`](&]P96XH:'1A8V-E2`] +M(")297=R:71E4G5L92!>;65T82UD871A+R@N*RDD("`N+B\B("L@9F]L9&5R +M("L@(B\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%=(@H@("`@("`@("`@ +M("!H=&%C8V5S7,N97AI="@Q +M*2`@(R!&25A-10H@("`@("`@(')E='5R;B!4&ET*#$I("`C($9)6$U%"B`@("`@("`@:7!S96,N=G!N+2@N*BDN8V]N9B(L(&9I;&4I"B`@ +M("`@("`@("`@(&EF(&TZ"B`@("`@("`@("`@("`@("!S96QF+F-O;F9I<',N +M87!P96YD*&TN9W)O=7`H,2DI"@H@("`@("`@(&9O&5C=71E*")I +M<'-E8R!R96QO860B*0H*("`@(&1E9B!C;VYF:6=U#4R-2`M:B!!0T-%4%0B("4@9&5V72D* +M("`@("`@("!F;W(@;F5T(&EN(&]B:ELG<&5E&UA&UA5]I<"=="B`@("`@("`@<&5E7!E/71U;FYE;"(I +M"B`@("`@("`@9FEL92YA9&1E<2@B(&%U=&AB>3US96-R970B*0H@("`@("`@ +M(&9I;&4N861D97$H(B!K97EE>&-H86YG93UI:V4B*0H@("`@("`@(&9I;&4N +M861D97$H(B!I:V4])7,B("4@:6ME<&]L:6-Y*0H@("`@("`@(&9I;&4N861D +M97$H(B!I:V5L:69E=&EM93TE3TS,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1T:6UE;W5T +M/3$R,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1A8W1I;VX]')A;F=E*#,I.@H@("`@("`@("`@ +M("!R97-U;'0@/2!#&5C=71E*"=I<'-E8R!S=&%T=7,@=G!N +M+25S('P@9W)E<"`B)7,B)R`E("AR:6=H='!E97(L('!E97)L:7-T+G-P;&ET +M*"(L(BP@,2E;,%TI*0H@("`@("`@("`@("!I9B!L96XH2P@)R,G*0H@("`@("`@(&EF(&YO="!U&5C=71E*")T9&)D=6UP("]V87(O&5C=71E*"=K:6QL("TY("5S)R`E('!I9"D*"@IC;&%S +M&5C=71E*")S>7-T96UC=&P@2YS96-R971S(B`E("AS96QF+E903D-/3D9$25(I"B`@ +M("`@("`@>&PR='!D8V]N9F9I;&4@/2`B+V5T8R]X;#)T<&0O>&PR='!D+F-O +M;F8B"B`@("`@("`@>&PR='!O<'1I;VYS9FEL92`]("(O971C+W!P<"]O<'1I +M;VYS+GAL,G1P9"(*"B`@("`@("`@;&]C86QI<"`](&]B:ELG;&]C86Q?:7`G +M70H@("`@("`@(&QO8V%L8VED2`Z(%!32R!<(B5S7"(B("4@*&QE9G0L('!S:RDI"B`@ +M("`@("`@&PR='!D8V]N9F9I;&4I"B`@("`@("`@>&PR='!D8V]N9BYA9&1E +M<2@B:7`@&PR='!O<'1I;VYS+F-O;6UI="@I"@H@("`@9&5F(')E;6]T96%C8V5S +M2@I"B`@("`@("`@4EP +M*')U;&5;)W!U8FQI8U]I<"==*0H@("`@("`@(&EN=&5R;F%L7V9W:6YT97)F +M86-E(#T@4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI +M"B`@("`@("`@<'5B;&EC7V9W<&]R=',@/2!S96QF+G!O4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI +M+`H@("`@("`@("`@("`@("`@&UA2(Z"B`@("`@("`@("`@(&9W7W!R97)O=71? +M2(Z"B`@("`@ +M("`@("`@(&9W7W!O2(Z"B`@("`@("`@ +M("`@(&9W7W!O2(Z"B`@("`@ +M("`@("`@(&9W7V]U='!U=%]R=6QE("L]("(@+2UD<&]R="`E2(Z"B`@("`@("`@("`@ +M(&9W7V]U='!U=%]R=6QE("L]("(Z(B`K('-E;&8N<&]R='-4;U-T4EP*')U;&5;)VEN=&5R;F%L7VEP +M)UTI+`H@("`@("`@("`@("`@("`@&9F9F9F9F9F +M("TM8W1M87-K(#!X9F9F9F9F9F8B("4*("`@("`@("`@("`@("`@("`@("`@ +M("`@4EP*')U;&5;(FEN=&5R;F%L +M7VEP(ETI+"!S96QF+F=E=$=U97-T27`H*2E=*0H*"F-L87-S($EP5&%B;&5S +M17AE8W5T;W(Z"@H@("`@8V]N9FEG(#T@3F]N90H*("`@(&1E9B!?7VEN:71? +M7RAS96QF+"!C;VYF:62!PR)P&5C=71OR)P&5C=71OR)P&5C=71O7!E.B`E&5C27!T86)L97,H8V]N9FEG +M*3H*("`@("`@("!L;V=G:6YG+F1E8G5G*")0&5C=71O7,H*3H*("`@("`@("`@ +M("`@97AE8T1A=&%B86&5C +M27!T86)L97,H8V]N9FEG*0H@("`@96QI9B!J&5C27!T86)L +M97,H8V]N9FEG*0H@("`@96QS93H*("`@("`@("!L;V=G:6YG+G=A7!E/25S(B`E("AP/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/configure.py': 'MD5 check failed' + ) << \SHAR_EOF +8987217852a386250687dfce6d0b10be cloud_scripts/opt/cloud/bin/configure.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/configure.py'` -ne 45920 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/configure.py' is not 45920" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_vmp.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vmp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vmp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vmp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_vmp.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=WWT*("`@(')C6R=I9"==(#T@)W9M<&%S/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vmp.py': 'MD5 check failed' + ) << \SHAR_EOF +3e1ea6831cb27eedc825e25bf817cb9c cloud_scripts/opt/cloud/bin/cs_vmp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vmp.py'` -ne 1126 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vmp.py' is not 1126" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# getRouterMonitorResults.sh --- Send the monitor results to Management Server +X +if [ "$1" == "true" ] +then +X python /root/monitorServices.py > /dev/null +fi +X +printf "FAILING CHECKS:\n" +X +if [ -f /root/basic_failing_health_checks ] +then +X echo `cat /root/basic_failing_health_checks` +fi +X +if [ -f /root/advanced_failing_health_checks ] +then +X echo `cat /root/advanced_failing_health_checks` +fi +X +printf "MONITOR RESULTS:\n" +X +echo "{\"basic\":" +if [ -f /root/basic_monitor_results.json ] +then +X echo `cat /root/basic_monitor_results.json` +else +X echo "{}" +fi +echo ",\"advanced\":" +if [ -f /root/advanced_monitor_results.json ] +then +X echo `cat /root/advanced_monitor_results.json` +else +X echo "{}" +fi +X +echo "}" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh': 'MD5 check failed' + ) << \SHAR_EOF +35649a8a1a8339aaa42a311826699849 cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh'` -ne 1526 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' is not 1526" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vr_cfg.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vr_cfg.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vr_cfg.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +#set -x +X +cfg= +version= +log=/var/log/cloud.log +X +log_it() { +X logger -t cloud "$*" +X echo "$(date) : $*" >> $log +} +X +while getopts 'c:' OPTION; do +X case $OPTION in +X c) cfg="$OPTARG" ;; +esac; done +X +export DEFER_CONFIG=true +while read line; do +X #comment +X if [[ $line == \#* ]]; then +X continue +X +X elif [ "$line" == "" ]; then +X read line +X version=$line +X log_it "VR config: configuation format version $version" +X #skip +X read line +X +X elif [ "$line" == " +X read line +X log_it "VR config: execution success " +X +X elif [ "$line" == "" ]; then +X read line +X file=$line +X log_it "VR config: creating file: $file" +X rm -f $file +X while read -r line; do +X if [ "$line" == "" ]; then +X break +X fi +X echo $line >> $file +X done +X log_it "VR config: create file success" +X +X fi +X +done < $cfg +X +# archive the configuration file +mv $cfg /var/cache/cloud/processed/ +X +unset DEFER_CONFIG +# trigger finish_config() +if [ -f /etc/cloudstack/dhcpentry.json ]; then +X /opt/cloud/bin/configure.py vm_dhcp_entry.json +fi +if [ -f /etc/cloudstack/vmdata.json ]; then +X /opt/cloud/bin/configure.py vm_metadata.json +fi +X +# Flush kernel conntrack table +log_it "VR config: Flushing conntrack table" +conntrackd -d 2> /dev/null +if [ $? -eq 0 ]; then +X conntrackd -F +X conntrackd -k +else +X conntrackd -F +fi +log_it "VR config: Flushing conntrack table completed" +X +Xexit 0 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vr_cfg.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vr_cfg.sh': 'MD5 check failed' + ) << \SHAR_EOF +da02bd413616a9cc131fd039e627eb3e cloud_scripts/opt/cloud/bin/vr_cfg.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vr_cfg.sh'` -ne 2725 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' is not 2725" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpc_snat.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_snat.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_snat.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# @VERSION@ +X +source /root/func.sh +source /opt/cloud/bin/vpc_func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage:\n %s -A -l \n" $(basename $0) >&2 +X printf " %s -D -l \n" $(basename $0) >&2 +} +X +X +add_snat() { +X logger -t cloud "$(basename $0):Added SourceNAT $pubIp on interface $ethDev" +X vpccidr=$(getVPCcidr) +X sudo iptables -D FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT +X sudo iptables -A FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT +X sudo iptables -t nat -D POSTROUTING -j SNAT -o $ethDev --to-source $pubIp +X sudo iptables -t nat -A POSTROUTING -j SNAT -o $ethDev --to-source $pubIp +X return $? +} +remove_snat() { +X logger -t cloud "$(basename $0):Removing SourceNAT $pubIp on interface $ethDev" +X sudo iptables -t nat -D POSTROUTING -j SNAT -o $ethDev --to-source $pubIp +X return $? +} +X +#set -x +lflag=0 +cflag=0 +op="" +X +while getopts 'ADl:c:' OPTION +do +X case $OPTION in +X A) Aflag=1 +X op="-A" +X ;; +X D) Dflag=1 +X op="-D" +X ;; +X l) lflag=1 +X pubIp="$OPTARG" +X ;; +X c) cflag=1 +X ethDev="$OPTARG" +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [ "$Aflag$Dflag" != "1" ] +then +X usage +X unlock_exit 2 $lock $locked +fi +X +if [ "$lflag$cflag" != "11" ] +then +X usage +X unlock_exit 2 $lock $locked +fi +X +if [ "$Aflag" == "1" ] +then +X add_snat $publicIp +X unlock_exit $? $lock $locked +fi +X +if [ "$Dflag" == "1" ] +then +X remove_sat $publicIp +X unlock_exit $? $lock $locked +fi +X +unlock_exit 1 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_snat.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_snat.sh': 'MD5 check failed' + ) << \SHAR_EOF +23502a2ce3829fb787464124f13b9141 cloud_scripts/opt/cloud/bin/vpc_snat.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_snat.sh'` -ne 2346 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' is not 2346" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpc_staticroute.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_staticroute.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_staticroute.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# @VERSION@ +X +source /root/func.sh +source /opt/cloud/bin/vpc_func.sh +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s: -a < routes > \n" $(basename $0) >&2 +} +X +#set -x +X +flush_table_backup() { +X flush_table "static_route_back" +} +X +flush_table() { +X local tab=$1 +X sudo ip route flush table $tab +} +X +copy_table() { +X local from=$1 +X local to=$2 +X sudo ip route show table $from | while read route +X do +X sudo ip route add table $to $route +X done +} +X +backup_table() { +X flush_table "static_route_back" +X copy_table "static_route" "static_route_back" +X flush_table "static_route" +} +X +restore_table() { +X flush_table "static_route" +X copy_table "static_route_back" "static_route" +X flush_table "static_route_back" +} +X +static_route() { +X local rule=$1 +X local ip=$(echo $rule | cut -d: -f1) +X if [ $ip == "Revoke" ] +X then +X return 0 +X fi +X local gateway=$(echo $rule | cut -d: -f2) +X local cidr=$(echo $rule | cut -d: -f3) +X logger -t cloud "$(basename $0): static route: public ip=$ip \ +X gateway=$gateway cidr=$cidr" +X local dev=$(getEthByIp $ip) +X if [ $? -gt 0 ] +X then +X return 1 +X fi +X sudo ip route add $cidr dev $dev via $gateway table static_route &>/dev/null +X result=$? +X logger -t cloud "$(basename $0): done static route: public ip=$ip \ +X gateway=$gateway cidr=$cidr" +X return $result +} +X +gflag= +aflag= +while getopts 'a:' OPTION +X +do +X case $OPTION in +X a) aflag=1 +X rules="$OPTARG" +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [ -n "$rules" ] +then +X rules_list=$(echo $rules | cut -d, -f1- --output-delimiter=" ") +fi +X +success=0 +X +backup_table +X +for r in $rules_list +do +X static_route $r +X success=$? +X if [ $success -gt 0 ] +X then +X logger -t cloud "$(basename $0): failure to apply fw rules for guest network: $gcidr" +X break +X else +X logger -t cloud "$(basename $0): successful in applying fw rules for guest network: $gcidr" +X fi +done +X +if [ $success -gt 0 ] +then +X logger -t cloud "$(basename $0): restoring from backup for guest network: $gcidr" +X restore_table +else +X logger -t cloud "$(basename $0): deleting backup for guest network: $gcidr" +X flush_table_backup +fi +unlock_exit $success $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_staticroute.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh': 'MD5 check failed' + ) << \SHAR_EOF +4080c04ff7600874ef4a4364aefc4d18 cloud_scripts/opt/cloud/bin/vpc_staticroute.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh'` -ne 3043 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' is not 3043" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/baremetal-vr.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/baremetal-vr.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/baremetal-vr.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/baremetal-vr.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/baremetal-vr.py +M(TQI8V5N6ME>2<@:6X@<#H*("`@("`@("`@("`@("`@("`@("`@("`@ +M2`]('`N6ME>2!I;B`E0H*("`@(&1E +M9B!?9V5T7VUG;71?:7`H4)AFEP*')E<7,N:V5Y2P@:&%S:%-T5]P/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/baremetal-vr.py': 'MD5 check failed' + ) << \SHAR_EOF +f87e8890aa7ad3cc522c5c5ceb2fbf69 cloud_scripts/opt/cloud/bin/baremetal-vr.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/baremetal-vr.py'` -ne 5587 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/baremetal-vr.py' is not 5587" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_firewallrules.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_firewallrules.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_firewallrules.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import copy +X +X +def merge(dbag, data): +X dbagc = copy.deepcopy(dbag) +X if "rules" not in data: +X return dbagc +X for rule in data['rules']: +X id = str(rule['id']) +X if rule['revoked']: +X if id in dbagc.keys(): +X del(dbagc[id]) +X elif id not in dbagc.keys(): +X dbagc[id] = rule +X return dbagc +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_firewallrules.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py': 'MD5 check failed' + ) << \SHAR_EOF +6d3faf49679b84bf9a098eee6b630f69 cloud_scripts/opt/cloud/bin/cs_firewallrules.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py'` -ne 1141 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' is not 1141" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/netusage.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/netusage.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/netusage.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/netusage.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/netusage.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +X +# netusage.sh -- create iptable rules to gather network stats, running within DomR +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s -[c|g|r] [-[a|d] ]\n" $(basename $0) >&2 +} +X +create_usage_rules () { +X iptables-save|grep "INPUT -j NETWORK_STATS" > /dev/null +X if [ $? -eq 0 ] +X then +X return $? +X fi +X iptables -N NETWORK_STATS > /dev/null +X iptables -I FORWARD -j NETWORK_STATS > /dev/null +X iptables -I INPUT -j NETWORK_STATS > /dev/null +X iptables -I OUTPUT -j NETWORK_STATS > /dev/null +X iptables -A NETWORK_STATS -i eth0 -o eth2 > /dev/null +X iptables -A NETWORK_STATS -i eth2 -o eth0 > /dev/null +X iptables -A NETWORK_STATS -o eth2 ! -i eth0 -p tcp > /dev/null +X iptables -A NETWORK_STATS -i eth2 ! -o eth0 -p tcp > /dev/null +X return $? +} +X +add_public_interface () { +X local pubIf=$1 +X iptables-save|grep "NETWORK_STATS -i eth0 -o $pubIf" > /dev/null +X if [ $? -eq 0 ] +X then +X return $? +X fi +X iptables -A NETWORK_STATS -i eth0 -o $pubIf > /dev/null +X iptables -A NETWORK_STATS -i $pubIf -o eth0 > /dev/null +X iptables -A NETWORK_STATS -o $pubIf ! -i eth0 -p tcp > /dev/null +X iptables -A NETWORK_STATS -i $pubIf ! -o eth0 -p tcp > /dev/null +X return $? +} +X +delete_public_interface () { +X local pubIf=$1 +X echo $pubIf >> /root/removedVifs +X return $? +} +X +get_usage () { +X iptables -L NETWORK_STATS -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null +X if [ -f /root/removedVifs ] ; then iptables -Z NETWORK_STATS ; fi; > /dev/null +X /root/clearUsageRules.sh > /dev/null +X if [ $? -gt 0 -a $? -ne 2 ] +X then +X printf $? +X return 1 +X fi +} +X +reset_usage () { +X iptables -Z NETWORK_STATS > /dev/null +X if [ $? -gt 0 -a $? -ne 2 ] +X then +X return 1 +X fi +} +X +#set -x +X +cflag= +gflag= +rflag= +iflag= +aflag= +dflag= +X +while getopts 'cgria:d:' OPTION +do +X case $OPTION in +X c) cflag=1 +X ;; +X g) gflag=1 +X ;; +X r) rflag=1 +X ;; +X a) aflag=1 +X publicIf="$OPTARG" +X ;; +X d) dflag=1 +X publicIf="$OPTARG" +X ;; +X i) #Do nothing, since it's parameter for host script +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [ "$cflag" == "1" ] +then +X #create_usage_rules +X unlock_exit $? $lock $locked +fi +X +if [ "$gflag" == "1" ] +then +X get_usage +X unlock_exit $? $lock $locked +fi +X +if [ "$rflag" == "1" ] +then +X reset_usage +X unlock_exit $? $lock $locked +fi +X +if [ "$aflag" == "1" ] +then +X #add_public_interface $publicIf +X unlock_exit $? $lock $locked +fi +X +if [ "$dflag" == "1" ] +then +X #delete_public_interface $publicIf +X unlock_exit $? $lock $locked +fi +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/netusage.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/netusage.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/netusage.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/netusage.sh': 'MD5 check failed' + ) << \SHAR_EOF +2966c6cafee62e66ff903e53367b498b cloud_scripts/opt/cloud/bin/netusage.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/netusage.sh'` -ne 3478 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/netusage.sh' is not 3478" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/monitor_service.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/monitor_service.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/monitor_service.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/monitor_service.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/monitor_service.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +set -x +usage() { +X printf "Usage: %s: -c config string \n" $(basename $0) >&2 +} +X +configFile='/etc/monitor.conf' +X +create_config() { +services=$1; +services_list=$(echo $services | cut -d, -f1- --output-delimiter=" "); +X +echo "#Monitor services config" >$configFile +X +for s in $services_list +do +service=$(echo $s | cut -d: -f1); +processname=$(echo $s | cut -d: -f2); +service_name=$(echo $s | cut -d: -f3); +pidfile=$(echo $s | cut -d: -f4); +X +echo "$service" >> $configFile; +echo $processname >> $configFile +echo $service_name >> $configFile +echo $pidfile >> $configFile +X +done +X +} +X +config=$2 +if [ -n "$3" ] +then +X +#delete cron job before updating config file +crontab -l|grep "monitorServices.py" +X +if [ $? -eq 0 ] +then +X t=`date +%s`; +X touch /tmp/monitor-$t.txt; +X conf=/tmp/monitor-$t.txt +X crontab -l >$conf +X sed -i /#monitoringConfig/,+3d $conf +X crontab $conf +X rm $conf +fi +X +X +logger -t cloud "deleted crontab entry for monitoring services" +unlock_exit 0 $lock $locked +fi +X +create_config $config +X +#add cron job +crontab -l|grep "monitorServices.py" +if [ $? -ne 0 ] +X then +X (crontab -l ;echo -e "#monitoringConfig\nSHELL=/bin/bash\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n */3 * * * * /usr/bin/python /root/monitorServices.py") | crontab - +X logger -t cloud "added crontab entry for monitoring services" +fi +X +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/monitor_service.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/monitor_service.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/monitor_service.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/monitor_service.sh': 'MD5 check failed' + ) << \SHAR_EOF +3419e7baf45ac36d3d69ca71ef7ab978 cloud_scripts/opt/cloud/bin/monitor_service.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/monitor_service.sh'` -ne 2294 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/monitor_service.sh' is not 2294" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_ip.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_ip.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_ip.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_ip.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_ip.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N7!E)UT@/2!I<%LG;G=?='EP92==+FQO=V5R*"D*("`@(&EF(&EP +M6R=N=U]T>7!E)UT@/3T@)V-O;G1R;VPG.@H@("`@("`@(&1B86=;:7!;)V1E +M=FEC92==72`](%MI<%T*("`@(&5L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_ip.py': 'MD5 check failed' + ) << \SHAR_EOF +856c6261f2876c280c49fa486f4f7408 cloud_scripts/opt/cloud/bin/cs_ip.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_ip.py'` -ne 2581 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_ip.py' is not 2581" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/bumpup_priority.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/bumpup_priority.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/bumpup_priority.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +touch /tmp/rrouter_bumped +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/bumpup_priority.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh': 'MD5 check failed' + ) << \SHAR_EOF +35091259ed848a9f7270aca1a90e95af cloud_scripts/opt/cloud/bin/bumpup_priority.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh'` -ne 824 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' is not 824" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/getRouterAlerts.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/getRouterAlerts.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/getRouterAlerts.sh (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/getRouterAlerts.sh +M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5LP77T*"B`@("`@("`@("`@ +M("`@("!T;T1A=&5686P])"AD871E("UD("(D9&%T979A;"(@(BLE/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh': 'MD5 check failed' + ) << \SHAR_EOF +6c3803100b0923fd3f9017a0e09d6fd5 cloud_scripts/opt/cloud/bin/getRouterAlerts.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh'` -ne 1706 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh' is not 1706" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/postinit.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/postinit.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/postinit.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# This scripts before ssh.service but after cloud-early-config +X +# Eject cdrom if any +eject || true +X +# Restart journald for setting changes to apply +systemctl restart systemd-journald +X +TYPE=$(grep -Po 'type=\K[a-zA-Z]*' /var/cache/cloud/cmdline) +if [ "$TYPE" == "router" ] || [ "$TYPE" == "vpcrouter" ] || [ "$TYPE" == "dhcpsrvr" ] +then +X if [ -x /opt/cloud/bin/update_config.py ] +X then +X /opt/cloud/bin/update_config.py cmd_line.json || true +X fi +fi +X +[ ! -f /var/cache/cloud/enabled_svcs ] && touch /var/cache/cloud/enabled_svcs +for svc in $(cat /var/cache/cloud/enabled_svcs) +do +X systemctl enable --now --no-block $svc +done +X +[ ! -f /var/cache/cloud/disabled_svcs ] && touch /var/cache/cloud/disabled_svcs +for svc in $(cat /var/cache/cloud/disabled_svcs) +do +X systemctl disable --now --no-block $svc +done +X +# Restore the persistent iptables nat, rules and filters for IPv4 and IPv6 if they exist +ipv4="/etc/iptables/rules.v4" +if [ -e $ipv4 ] +then +X iptables-restore < $ipv4 +fi +X +ipv6="/etc/iptables/rules.v6" +if [ -e $ipv6 ] +then +X ip6tables-restore < $ipv6 +fi +X +# Patch known systemd/sshd memory leak - https://github.com/systemd/systemd/issues/8015#issuecomment-476160981 +echo '@include null' >> /etc/pam.d/systemd-user +X +# Enable and Start SSH +systemctl enable --now --no-block ssh +X +date > /var/cache/cloud/boot_up_done +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/postinit.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/postinit.sh': 'MD5 check failed' + ) << \SHAR_EOF +170afadf6f130e9cb697dca65a87aacb cloud_scripts/opt/cloud/bin/setup/postinit.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/postinit.sh'` -ne 2122 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' is not 2122" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/secstorage.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/secstorage.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/secstorage.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_secstorage() { +X log_it "Setting up secondary storage system vm" +X +X echo "cloud apache2 nfs-common portmap" > /var/cache/cloud/enabled_svcs +X echo "conntrackd keepalived haproxy dnsmasq" > /var/cache/cloud/disabled_svcs +X mkdir -p /var/log/cloud +X +X setup_common eth0 eth1 eth2 +X setup_storage_network +X setup_system_rfc1918_internal +X +X log_it "Setting up entry in hosts" +X sed -i /$NAME/d /etc/hosts +X public_ip=`getPublicIp` +X echo "$public_ip $NAME" >> /etc/hosts +X +X log_it "Applying iptables rules" +X cp /etc/iptables/iptables-secstorage /etc/iptables/rules.v4 +X +X log_it "Configuring sshd" +X local hyp=$HYPERVISOR +X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then +X setup_sshd $ETH1_IP "eth1" +X else +X setup_sshd $ETH0_IP "eth0" +X fi +X +X log_it "Configuring apache2" +X setup_apache2 $ETH2_IP +X +X # Deprecated, should move to Cs Python all of it +X sed -e "s///" \ +X -e "s///" \ +X -e "s/Listen .*:8180/Listen $ETH2_IP:80/g" \ +X -e "s/Listen .*:8443/Listen $ETH2_IP:443/g" /etc/apache2/vhost.template > /etc/apache2/sites-enabled/vhost-${ETH2_IP}.conf +X +X log_it "Setting up apache2 for post upload of volume/template" +X a2enmod proxy +X a2enmod proxy_http +X a2enmod headers +X +X cat >/etc/apache2/cors.conf </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh': 'MD5 check failed' + ) << \SHAR_EOF +14aea171a5e0fdfd3069bb96bde91e0b cloud_scripts/opt/cloud/bin/setup/secstorage.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh'` -ne 2720 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' is not 2720" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/ilbvm.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +ilbvm_svcs() { +X echo "haproxy" > /var/cache/cloud/enabled_svcs +X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs +} +X +setup_ilbvm() { +X log_it "Setting up Internal Load Balancer system vm" +X setup_common eth0 eth1 +X #eth0 = guest network, eth1=control network +X +X sed -i /$NAME/d /etc/hosts +X echo "$ETH0_IP $NAME" >> /etc/hosts +X +X cp /etc/iptables/iptables-ilbvm /etc/iptables/rules.v4 +X setup_sshd $ETH1_IP "eth1" +X +X enable_fwding 0 +X enable_irqbalance 1 +} +X +ilbvm_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute ilbvm svcs" +X exit 1 +fi +setup_ilbvm +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/ilbvm.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh': 'MD5 check failed' + ) << \SHAR_EOF +87c70bdf6c0d4d41f0ff87475494188f cloud_scripts/opt/cloud/bin/setup/ilbvm.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh'` -ne 1442 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' is not 1442" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_vpcrouter() { +X log_it "Setting up VPC virtual router system vm" +X +X if [ -f /etc/hosts ]; then +X grep -q $NAME /etc/hosts || echo "127.0.0.1 $NAME" >> /etc/hosts; +X fi +X +X cat > /etc/network/interfaces << EOF +auto lo eth0 +iface lo inet loopback +EOF +X setup_interface "0" $ETH0_IP $ETH0_MASK $GW +X +X echo $NAME > /etc/hostname +X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon +X hostnamectl set-hostname $NAME +X +X #Nameserver +X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries +X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries +X if [ -n "$internalNS1" ] +X then +X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS1" > /etc/resolv.conf +X fi +X +X if [ -n "$internalNS2" ] +X then +X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS2" >> /etc/resolv.conf +X fi +X if [ -n "$NS1" ] +X then +X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS1" >> /etc/resolv.conf +X fi +X +X if [ -n "$NS2" ] +X then +X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS2" >> /etc/resolv.conf +X fi +X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] +X then +X if [ "$HYPERVISOR" == "vmware" ] || [ "$HYPERVISOR" == "hyperv" ]; +X then +X ip route add $MGMTNET via $LOCAL_GW dev eth0 +X # workaround to activate vSwitch under VMware +X timeout 3 ping -n -c 3 $LOCAL_GW || true +X fi +X fi +X +X ip route delete default +X # create route table for static route +X +X sudo echo "252 static_route" >> /etc/iproute2/rt_tables 2>/dev/null +X sudo echo "251 static_route_back" >> /etc/iproute2/rt_tables 2>/dev/null +X sudo ip rule add from $VPCCIDR table static_route 2>/dev/null +X sudo ip rule add from $VPCCIDR table static_route_back 2>/dev/null +X +X setup_vpc_apache2 +X +X enable_irqbalance 1 +X enable_vpc_rpsrfs 1 +X disable_rpfilter +X enable_fwding 1 +X enable_passive_ftp 1 +X cp /etc/iptables/iptables-vpcrouter /etc/iptables/rules.v4 +X setup_sshd $ETH0_IP "eth0" +X cp /etc/vpcdnsmasq.conf /etc/dnsmasq.conf +X cp /etc/cloud-nic.rules /etc/udev/rules.d/cloud-nic.rules +X echo "" > /etc/dnsmasq.d/dhcphosts.txt +X echo "dhcp-hostsfile=/etc/dhcphosts.txt" > /etc/dnsmasq.d/cloud.conf +X +X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" +X #DNS server will append $DOMAIN to local queries +X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf +X #answer all local domain queries +X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf +X +X command -v dhcp_release > /dev/null 2>&1 +X no_dhcp_release=$? +X if [ $no_dhcp_release -eq 0 ] +X then +X echo 1 > /var/cache/cloud/dnsmasq_managed_lease +X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf +X else +X echo 0 > /var/cache/cloud/dnsmasq_managed_lease +X fi +X +X # Setup hourly logrotate +X if [ -f /etc/cron.daily/logrotate ]; then +X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 +X fi +} +X +routing_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute routing_svcs" +X exit 1 +fi +setup_vpcrouter +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh': 'MD5 check failed' + ) << \SHAR_EOF +811420d11f97b1d7237b964e8bbbdf5d cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh'` -ne 3885 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' is not 3885" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/router.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/router.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/router.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/router.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/router.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +check_reboot_vmware() { +X if [ "$HYPERVISOR" != "vmware" ]; then +X return +X fi +X +X if [ -n "$MGMTNET" ]; then +X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') +X if ping -n -c 1 -W 3 $MGMT_GW &> /dev/null; then +X log_it "Management gateway pingable, skipping VR reboot" +X return +X fi +X fi +X +X log_it "Management gateway not pingable, rebooting VR" +X sync +X reboot +} +X +setup_router() { +X # To save router public interface and gw ip information +X touch /var/cache/cloud/ifaceGwIp +X +X oldmd5= +X [ -f "/etc/udev/rules.d/70-persistent-net.rules" ] && oldmd5=$(md5sum "/etc/udev/rules.d/70-persistent-net.rules" | awk '{print $1}') +X +X if [ -n "$ETH2_IP" ]; then +X setup_common eth0 eth1 eth2 +X +X if [ -n "$EXTRA_PUBNICS" ]; then +X for ((i = 3; i < 3 + $EXTRA_PUBNICS; i++)); do +X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" +X done +X fi +X else +X setup_common eth0 eth1 +X if [ -n "$EXTRA_PUBNICS" ]; then +X for ((i = 2; i < 2 + $EXTRA_PUBNICS; i++)); do +X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" +X done +X fi +X fi +X +X log_it "Checking udev NIC assignment order changes" +X if [ "$NIC_MACS" != "" ] +X then +X init_interfaces_orderby_macs "$NIC_MACS" "/tmp/interfaces" "/tmp/udev-rules" +X newmd5=$(md5sum "/tmp/udev-rules" | awk '{print $1}') +X rm /tmp/interfaces +X rm /tmp/udev-rules +X +X if [ "$oldmd5" != "$newmd5" ] +X then +X log_it "Reloading udev for new udev NIC assignment" +X udevadm control --reload-rules && udevadm trigger +X check_reboot_vmware +X fi +X fi +X +X setup_aesni +X setup_dnsmasq +X setup_apache2 $ETH0_IP +X +X sed -i /$NAME/d /etc/hosts +X echo "$ETH0_IP $NAME" >> /etc/hosts +X +X enable_irqbalance 1 +X disable_rpfilter_domR +X enable_fwding 1 +X enable_rpsrfs 1 +X enable_passive_ftp 1 +X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 +X setup_sshd $ETH1_IP "eth1" +X +X # Only allow DNS service for current network +X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X +X # Setup hourly logrotate +X if [ -f /etc/cron.daily/logrotate ]; then +X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 +X fi +} +X +routing_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute routing_svcs" +X exit 1 +fi +setup_router +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/router.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/router.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/router.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/router.sh': 'MD5 check failed' + ) << \SHAR_EOF +2ae62d5d44c716730231c9d77618fe91 cloud_scripts/opt/cloud/bin/setup/router.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/router.sh'` -ne 3355 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/router.sh' is not 3355" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/elbvm.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/elbvm.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/elbvm.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +elbvm_svcs() { +X echo "haproxy" > /var/cache/cloud/enabled_svcs +X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs +} +X +setup_elbvm() { +X log_it "Setting up Elastic Load Balancer system vm" +X setup_common eth0 eth1 +X sed -i /$NAME/d /etc/hosts +X public_ip=$ETH2_IP +X [ "$ETH2_IP" == "0.0.0.0" ] || [ "$ETH2_IP" == "" ] && public_ip=$ETH0_IP +X echo "$public_ip $NAME" >> /etc/hosts +X +X cp /etc/iptables/iptables-elbvm /etc/iptables/rules.v4 +X if [ "$SSHONGUEST" == "true" ] +X then +X setup_sshd $ETH0_IP "eth0" +X else +X setup_sshd $ETH1_IP "eth1" +X fi +X +X enable_fwding 0 +X enable_irqbalance 0 +} +X +elbvm_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute elbvm svcs" +X exit 1 +fi +setup_elbvm +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/elbvm.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh': 'MD5 check failed' + ) << \SHAR_EOF +2d34615f1d40f6125a2205e6118ba07f cloud_scripts/opt/cloud/bin/setup/elbvm.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh'` -ne 1578 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' is not 1578" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/bootstrap.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" +CMDLINE=/var/cache/cloud/cmdline +X +rm -f /var/cache/cloud/enabled_svcs +rm -f /var/cache/cloud/disabled_svcs +X +X. /lib/lsb/init-functions +X +log_it() { +X echo "$(date) $@" >> /var/log/cloud.log +X log_action_msg "$@" +} +X +hypervisor() { +X if [ -d /proc/xen ]; then +X mount -t xenfs none /proc/xen +X $(dmesg | grep -q "Xen HVM") +X if [ $? -eq 0 ]; then # 1=PV,0=HVM +X echo "xen-hvm" && return 0 +X else +X echo "xen-pv" && return 0 +X fi +X fi +X +X [ -x /usr/sbin/virt-what ] && local facts=( $(virt-what) ) +X if [ "$facts" != "" ]; then +X # Xen HVM is recognized as Hyperv when Viridian extensions are enabled +X if [ "${facts[-1]}" == "xen-domU" ] && [ "${facts[0]}" == "hyperv" ]; then +X echo "xen-hvm" && return 0 +X else +X echo ${facts[-1]} && return 0 +X fi +X fi +X +X grep -q QEMU /proc/cpuinfo && echo "kvm" && return 0 +X grep -q QEMU /var/log/messages && echo "kvm" && return 0 +X +X vmware-checkvm &> /dev/null && echo "vmware" && return 0 +X +X echo "unknown" && return 1 +} +X +config_guest() { +X [ ! -d /proc/xen ] && sed -i 's/^vc/#vc/' /etc/inittab && telinit q +X [ -d /proc/xen ] && sed -i 's/^#vc/vc/' /etc/inittab && telinit q +X +X systemctl daemon-reload +X +X case $HYPERVISOR in +X xen-pv|xen-domU) +X systemctl stop ntpd +X systemctl disable ntpd +X systemctl enable xe-daemon +X systemctl start xe-daemon +X +X cat /proc/cmdline > $CMDLINE +X sed -i "s/%/ /g" $CMDLINE +X ;; +X xen-hvm) +X systemctl stop ntpd +X systemctl disable ntpd +X systemctl enable xe-daemon +X systemctl start xe-daemon +X +X if [ ! -f /usr/bin/xenstore-read ]; then +X log_it "ERROR: xentools not installed, cannot found xenstore-read" && exit 5 +X fi +X /usr/bin/xenstore-read vm-data/cloudstack/init > $CMDLINE +X sed -i "s/%/ /g" $CMDLINE +X ;; +X kvm) +X # Configure kvm hotplug support +X if grep -E 'CONFIG_HOTPLUG_PCI=y|CONFIG_HOTPLUG_PCI_ACPI=y' /boot/config-`uname -r`; then +X log_it "acpiphp and pci_hotplug module already compiled in" +X else +X modprobe acpiphp 2> /dev/null && log_it "acpiphp module loaded" || true +X modprobe pci_hotplug 2> /dev/null && log_it "pci_hotplug module loaded" || true +X fi +X +X sed -i -e "/^s0:2345:respawn.*/d" /etc/inittab +X sed -i -e "/6:23:respawn/a\s0:2345:respawn:/sbin/getty -L 115200 ttyS0 vt102" /etc/inittab +X systemctl enable qemu-guest-agent +X systemctl start qemu-guest-agent +X +X # Wait for $CMDLINE file to be written by the qemu-guest-agent +X for i in {1..60}; do +X if [ -s $CMDLINE ]; then +X log_it "Received a new non-empty cmdline file from qemu-guest-agent" +X break +X fi +X sleep 1 +X done +X if [ ! -s $CMDLINE ]; then +X log_it "Failed to receive the cmdline file via the qemu-guest-agent" +X fi +X ;; +X vmware) +X # system time sync'd with host via vmware tools +X systemctl stop ntpd +X systemctl disable ntpd +X systemctl enable open-vm-tools +X systemctl start open-vm-tools +X +X vmtoolsd --cmd 'machine.id.get' > $CMDLINE +X ;; +X virtualpc|hyperv) +X # Hyper-V is recognized as virtualpc hypervisor type. Boot args are passed using KVP Daemon +X systemctl enable hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service +X systemctl start hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service +X sleep 5 +X cp -f /var/opt/hyperv/.kvp_pool_0 $CMDLINE +X cat /dev/null > /var/opt/hyperv/.kvp_pool_0 +X ;; +X virtualbox) +X # Virtualbox is used to test the virtual router +X # get the commandline from a dmistring (yes, hacky!) +X dmidecode | grep cmdline | sed 's/^.*cmdline://' > $CMDLINE +X RV=$? +X if [ $RV -ne 0 ] ; then +X log_it "Failed to get cmdline from a virtualbox dmi property" +X fi +X ;; +X esac +X +X # Find and export guest type +X export TYPE=$(grep -Po 'type=\K[a-zA-Z]*' $CMDLINE) +} +X +patch_systemvm() { +X local patchfile=$1 +X local backupfolder="/tmp/.conf.backup" +X local logfile="/var/log/patchsystemvm.log" +X if [ -f /usr/local/cloud/systemvm/conf/cloud.jks ]; then +X rm -fr $backupfolder +X mkdir -p $backupfolder +X cp -r /usr/local/cloud/systemvm/conf/* $backupfolder/ +X fi +X rm /usr/local/cloud/systemvm -rf +X mkdir -p /usr/local/cloud/systemvm +X echo "All" | unzip $patchfile -d /usr/local/cloud/systemvm >$logfile 2>&1 +X find /usr/local/cloud/systemvm/ -name \*.sh | xargs chmod 555 +X if [ -f $backupfolder/cloud.jks ]; then +X cp -r $backupfolder/* /usr/local/cloud/systemvm/conf/ +X echo "Restored keystore file and certs using backup" >> $logfile +X fi +X rm -fr $backupfolder +X # Import global cacerts into 'cloud' service's keystore +X keytool -importkeystore -srckeystore /etc/ssl/certs/java/cacerts -destkeystore /usr/local/cloud/systemvm/certs/realhostip.keystore -srcstorepass changeit -deststorepass vmops.com -noprompt || true +X return 0 +} +X +patch() { +X local PATCH_MOUNT=/media/cdrom +X local logfile="/var/log/patchsystemvm.log" +X if [ "$TYPE" == "consoleproxy" ] || [ "$TYPE" == "secstorage" ] && [ -f ${PATCH_MOUNT}/agent.zip ] && [ -f /var/cache/cloud/patch.required ] +X then +X echo "Patching systemvm for cloud service with mount=$PATCH_MOUNT for type=$TYPE" >> $logfile +X patch_systemvm ${PATCH_MOUNT}/agent.zip +X if [ $? -gt 0 ] +X then +X echo "Failed to apply patch systemvm\n" >> $logfile +X exit 1 +X fi +X fi +X +X rm -f /var/cache/cloud/patch.required +X chmod -x /etc/systemd/system/cloud*.service +X systemctl daemon-reload +X umount $PATCH_MOUNT || true +X +X if [ -f /mnt/cmdline ]; then +X cat /mnt/cmdline > $CMDLINE +X fi +X return 0 +} +X +config_sysctl() { +X # When there is more memory reset the cache back pressure to default 100 +X physmem=$(free|awk '/^Mem:/{print $2}') +X if [ $((physmem)) -lt 409600 ]; then +X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 200" /etc/sysctl.conf +X else +X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 100" /etc/sysctl.conf +X fi +X +X sync +X sysctl -p +} +X +bootstrap() { +X log_it "Bootstrapping systemvm appliance" +X +X export HYPERVISOR=$(hypervisor) +X [ $? -ne 0 ] && log_it "Failed to detect hypervisor type, bailing out" && exit 10 +X log_it "Starting guest services for $HYPERVISOR" +X +X config_guest +X patch +X config_sysctl +X +X log_it "Configuring systemvm type=$TYPE" +X if [ -f "/opt/cloud/bin/setup/$TYPE.sh" ]; then +X /opt/cloud/bin/setup/$TYPE.sh +X else +X /opt/cloud/bin/setup/default.sh +X fi +X +X log_it "Finished setting up systemvm" +X exit 0 +} +X +bootstrap +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/bootstrap.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh': 'MD5 check failed' + ) << \SHAR_EOF +722a9c6abfff147c7727fdcd85c96767 cloud_scripts/opt/cloud/bin/setup/bootstrap.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh'` -ne 7721 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' is not 7721" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_console_proxy() { +X log_it "Setting up console proxy system vm" +X +X echo "cloud" > /var/cache/cloud/enabled_svcs +X echo "haproxy dnsmasq apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs +X mkdir -p /var/log/cloud +X +X setup_common eth0 eth1 eth2 +X setup_system_rfc1918_internal +X +X log_it "Setting up entry in hosts" +X sed -i /$NAME/d /etc/hosts +X public_ip=`getPublicIp` +X echo "$public_ip $NAME" >> /etc/hosts +X +X log_it "Applying iptables rules" +X cp /etc/iptables/iptables-consoleproxy /etc/iptables/rules.v4 +X +X log_it "Configuring sshd" +X local hyp=$HYPERVISOR +X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then +X setup_sshd $ETH1_IP "eth1" +X else +X setup_sshd $ETH0_IP "eth0" +X fi +X +X disable_rpfilter +X enable_fwding 0 +X enable_irqbalance 0 +X rm -f /etc/logrotate.d/cloud +} +X +setup_console_proxy +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh': 'MD5 check failed' + ) << \SHAR_EOF +44adac9bf5e54d4791da00e3d1bdaf46 cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh'` -ne 1658 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' is not 1658" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/common.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/common.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/common.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/common.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/common.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" +X +X. /lib/lsb/init-functions +X +log_it() { +X echo "$(date) $@" >> /var/log/cloud.log +X log_action_msg "$@" +} +X +init_interfaces_orderby_macs() { +X macs=( $(echo $1 | sed "s/|/ /g") ) +X total_nics=${#macs[@]} +X interface_file=${2:-"/etc/network/interfaces"} +X rule_file=${3:-"/etc/udev/rules.d/70-persistent-net.rules"} +X +X echo -n "auto lo" > $interface_file +X for((i=0; i> $interface_file +X fi +X done +X +X cat >> $interface_file << EOF +X +iface lo inet loopback +X +EOF +X +X echo "" > $rule_file +X for((i=0; i < ${#macs[@]}; i++)) +X do +X echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${macs[$i]}\", NAME=\"eth$i\"" >> $rule_file +X done +} +X +init_interfaces() { +X if [ "$NIC_MACS" == "" ] +X then +X cat > /etc/network/interfaces << EOF +auto lo $1 $2 $3 +iface lo inet loopback +X +EOF +X else +X init_interfaces_orderby_macs "$NIC_MACS" +X fi +} +X +setup_interface() { +X local intfnum=$1 +X local ip=$2 +X local mask=$3 +X local gw=$4 +X local force=$5 +X local intf=eth${intfnum} +X local bootproto="static" +X +X if [ "$BOOTPROTO" == "dhcp" ] +X then +X if [ "$intfnum" != "0" ] +X then +X bootproto="dhcp" +X fi +X fi +X +X if [ "$ip" != "0.0.0.0" -a "$ip" != "" -o "$force" == "force" ] +X then +X echo "iface $intf inet $bootproto" >> /etc/network/interfaces +X if [ "$bootproto" == "static" ] +X then +X echo " address $ip " >> /etc/network/interfaces +X echo " netmask $mask" >> /etc/network/interfaces +X fi +X fi +X +X if [ "$ip" == "0.0.0.0" -o "$ip" == "" ] +X then +X ifconfig $intf down +X fi +X +X if [ "$force" == "force" ] +X then +X ifdown $intf +X else +X ifdown $intf +X if [ "$RROUTER" != "1" -o "$1" != "2" ] +X then +X ifup $intf +X fi +X fi +} +X +setup_interface_ipv6() { +X sysctl net.ipv6.conf.all.disable_ipv6=0 +X sysctl net.ipv6.conf.all.forwarding=1 +X sysctl net.ipv6.conf.all.accept_ra=1 +X +X sed -i "s/net.ipv6.conf.all.disable_ipv6 =.*$/net.ipv6.conf.all.disable_ipv6 = 0/" /etc/sysctl.conf +X sed -i "s/net.ipv6.conf.all.forwarding =.*$/net.ipv6.conf.all.forwarding = 1/" /etc/sysctl.conf +X sed -i "s/net.ipv6.conf.all.accept_ra =.*$/net.ipv6.conf.all.accept_ra = 1/" /etc/sysctl.conf +X +X local intfnum=$1 +X local ipv6="$2" +X local prelen="$3" +X local intf=eth${intfnum} +X +X echo "iface $intf inet6 static" >> /etc/network/interfaces +X echo " address $ipv6 " >> /etc/network/interfaces +X echo " netmask $prelen" >> /etc/network/interfaces +X echo " accept_ra 1" >> /etc/network/interfaces +X ifdown $intf +X ifup $intf +} +X +X +enable_fwding() { +X local enabled=$1 +X log_it "cloud: enable_fwding = $1" +X log_it "enable_fwding = $1" +X echo "$1" > /proc/sys/net/ipv4/ip_forward +X [ -f /etc/iptables/iptables.conf ] && sed -i "s/ENABLE_ROUTING=.*$/ENABLE_ROUTING=$enabled/" /etc/iptables/iptables.conf && return +} +X +enable_passive_ftp() { +X log_it "cloud: enabling passive FTP for guest VMs" +X echo "$1" > /proc/sys/net/netfilter/nf_conntrack_helper +} +X +disable_rpfilter() { +X log_it "cloud: disable rp_filter" +X log_it "disable rpfilter" +X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf +} +X +get_public_vif_list() { +X local vif_list="" +X for i in /sys/class/net/eth*; do +X vif=$(basename $i); +X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] +X then +X vif_list="$vif_list $vif"; +X fi +X done +X +X echo $vif_list +} +X +disable_rpfilter_domR() { +X log_it "cloud: Tuning rp_filter on public interfaces" +X +X VIF_LIST=$(get_public_vif_list) +X log_it "rpfilter public interfaces : $VIF_LIST" +X if [ "$DISABLE_RP_FILTER" == "true" ] +X then +X log_it "cloud: disable rp_filter on public interfaces" +X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf +X echo "0" > /proc/sys/net/ipv4/conf/default/rp_filter +X for vif in $VIF_LIST; do +X log_it "cloud: disable rp_filter on public interface: $vif" +X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 0/" /etc/sysctl.conf +X echo "0" > /proc/sys/net/ipv4/conf/$vif/rp_filter +X done +X else +X log_it "cloud: enable rp_filter on public interfaces" +X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 1/" /etc/sysctl.conf +X echo "1" > /proc/sys/net/ipv4/conf/default/rp_filter +X for vif in $VIF_LIST; do +X log_it "cloud: enable rp_filter on public interface: $vif" +X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 1/" /etc/sysctl.conf +X echo "1" > /proc/sys/net/ipv4/conf/$vif/rp_filter +X done +X fi +X log_it "cloud: Enabling rp_filter on Non-public interfaces(eth0,eth1,lo)" +X echo "1" > /proc/sys/net/ipv4/conf/eth0/rp_filter +X echo "1" > /proc/sys/net/ipv4/conf/eth1/rp_filter +X echo "1" > /proc/sys/net/ipv4/conf/lo/rp_filter +} +X +enable_irqbalance() { +X local enabled=$1 +X local proc=0 +X +X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) +X if [ $proc -le 1 ] && [ $enabled -eq 1 ] +X then +X enabled=0 +X fi +X +X log_it "Processors = $proc Enable service ${svc} = $enabled" +X local cfg=/etc/default/irqbalance +X [ -f $cfg ] && sed -i "s/ENABLED=.*$/ENABLED=$enabled/" $cfg && return +} +X +enable_vpc_rpsrfs() { +X local enable=$1 +X if [ $enable -eq 0 ] +X then +X echo 0 > /etc/rpsrfsenable +X else +X echo 1 > /etc/rpsrfsenable +X fi +X +X return 0 +} +X +enable_rpsrfs() { +X local enable=$1 +X +X if [ $enable -eq 0 ] +X then +X echo 0 > /etc/rpsrfsenable +X return 0 +X fi +X +X if [ ! -f /sys/class/net/eth0/queues/rx-0/rps_cpus ] +X then +X echo "rps is not enabled in the kernel" +X echo 0 > /etc/rpsrfsenable +X return 0 +X fi +X +X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) +X if [ $proc -le 1 ] +X then +X echo 0 > /etc/rpsrfsenable +X return 0; +X fi +X +X echo 1 > /etc/rpsrfsenable +X num=1 +X num=$(($num<<$proc)) +X num=$(($num-1)); +X echo $num; +X hex=$(printf "%x\n" $num) +X echo $hex; +X #enable rps +X echo $hex > /sys/class/net/eth0/queues/rx-0/rps_cpus +X echo $hex > /sys/class/net/eth2/queues/rx-0/rps_cpus +X +X #enble rfs +X echo 256 > /proc/sys/net/core/rps_sock_flow_entries +X echo 256 > /sys/class/net/eth0/queues/rx-0/rps_flow_cnt +X echo 256 > /sys/class/net/eth2/queues/rx-0/rps_flow_cnt +} +X +setup_common() { +X init_interfaces $1 $2 $3 +X if [ -n "$ETH0_IP" ] +X then +X setup_interface "0" $ETH0_IP $ETH0_MASK $GW +X fi +X if [ -n "$ETH0_IP6" ] +X then +X setup_interface_ipv6 "0" $ETH0_IP6 $ETH0_IP6_PRELEN +X fi +X setup_interface "1" $ETH1_IP $ETH1_MASK $GW +X if [ -n "$ETH2_IP" ] +X then +X setup_interface "2" $ETH2_IP $ETH2_MASK $GW +X fi +X +X echo $NAME > /etc/hostname +X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon +X hostnamectl set-hostname $NAME +X +X #Nameserver +X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries +X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries +X if [ -n "$internalNS1" ] +X then +X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS1" > /etc/resolv.conf +X fi +X +X if [ -n "$internalNS2" ] +X then +X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS2" >> /etc/resolv.conf +X fi +X if [ -n "$NS1" ] +X then +X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS1" >> /etc/resolv.conf +X fi +X +X if [ -n "$NS2" ] +X then +X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS2" >> /etc/resolv.conf +X fi +X +X if [ -n "$IP6_NS1" ] +X then +X echo "nameserver $IP6_NS1" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $IP6_NS1" >> /etc/resolv.conf +X fi +X if [ -n "$IP6_NS2" ] +X then +X echo "nameserver $IP6_NS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $IP6_NS2" >> /etc/resolv.conf +X fi +X +X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] +X then +X ip route add $MGMTNET via $LOCAL_GW dev eth1 +X fi +X +X ip route delete default +X if [ "$RROUTER" != "1" ] +X then +X gwdev=$3 +X if [ -z "$gwdev" ] +X then +X gwdev="eth0" +X fi +X +X ip route add default via $GW dev $gwdev +X fi +X +X # Workaround to activate vSwitch under VMware +X timeout 3 ping -n -c 3 $GW & +X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] +X then +X timeout 3 ping -n -c 3 $LOCAL_GW & +X #This code is added to address ARP issue by pinging MGMT_GW +X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') +X timeout 3 ping -n -c 3 $MGMT_GW & +X fi +X +X if [ "$HYPERVISOR" == "vmware" ]; then +X ntpq -p &> /dev/null || vmware-toolbox-cmd timesync enable +X fi +} +X +setup_dnsmasq() { +X log_it "Setting up dnsmasq" +X +X touch /etc/dhcpopts.txt +X +X [ -z $DHCP_RANGE ] && [ $ETH0_IP ] && DHCP_RANGE=$ETH0_IP +X [ $ETH0_IP6 ] && DHCP_RANGE_IP6=$ETH0_IP6 +X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" +X #removing the dnsmasq multiple ranges config file. +X rm /etc/dnsmasq.d/multiple_ranges.conf +X +X #get the template +X cp /etc/dnsmasq.conf.tmpl /etc/dnsmasq.conf +X +X if [ -n "$DOMAIN" ] +X then +X #send domain name to dhcp clients +X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\"$DOMAIN\"/ /etc/dnsmasq.conf +X #DNS server will append $DOMAIN to local queries +X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf +X #answer all local domain queries +X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf +X fi +X +X if [ -n "$DNS_SEARCH_ORDER" ] +X then +X sed -i -e "/^[#]*dhcp-option.*=119.*$/d" /etc/dnsmasq.conf +X echo "dhcp-option-force=119,$DNS_SEARCH_ORDER" >> /etc/dnsmasq.conf +X # set the domain search order as a space seprated list for option 15 +X DNS_SEARCH_ORDER=$(echo $DNS_SEARCH_ORDER | sed 's/,/ /g') +X #send domain name to dhcp clients +X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\""$DNS_SEARCH_ORDER"\"/ /etc/dnsmasq.conf +X fi +X +X if [ $DHCP_RANGE ] +X then +X sed -i -e "s/^dhcp-range_ip4=.*$/dhcp-range=$DHCP_RANGE,static/" /etc/dnsmasq.conf +X else +X sed -i -e "s/^dhcp-range_ip4=.*$//" /etc/dnsmasq.conf +X fi +X if [ $DHCP_RANGE_IP6 ] +X then +X sed -i -e "s/^dhcp-range_ip6=.*$/dhcp-range=$DHCP_RANGE_IP6,static/" /etc/dnsmasq.conf +X # For nondefault6 tagged host, don't send dns-server information +X sed -i /nondefault6/d /etc/dnsmasq.conf +X echo "dhcp-option=nondefault6,option6:dns-server" >> /etc/dnsmasq.conf +X else +X sed -i -e "s/^dhcp-range_ip6=.*$//" /etc/dnsmasq.conf +X fi +X +X if [ "$RROUTER" == "1" ] +X then +X DEFAULT_GW=$GUEST_GW +X INTERNAL_DNS=$GUEST_GW +X else +X if [ "$TYPE" == "dhcpsrvr" ] +X then +X DEFAULT_GW=$GW +X else +X DEFAULT_GW=$ETH0_IP +X fi +X INTERNAL_DNS=$ETH0_IP +X fi +X sed -i -e "/^[#]*dhcp-option=option:router.*$/d" /etc/dnsmasq.conf +X [ $DEFAULT_GW ] && echo "dhcp-option=option:router,$DEFAULT_GW" >> /etc/dnsmasq.conf +X +X [ $ETH0_IP ] && [ $NS1 ] && NS="$NS1," +X [ $ETH0_IP ] && [ $NS2 ] && NS="$NS$NS2," +X [ $ETH0_IP6 ] && [ $IP6_NS1 ] && NS6="[$IP6_NS1]," +X [ $ETH0_IP6 ] && [ $IP6_NS2 ] && NS6="$NS6[$IP6_NS2]," +X #for now set up ourself as the dns server as well +X sed -i -e "/^[#]*dhcp-option=6,.*$/d" /etc/dnsmasq.conf +X sed -i -e "/^[#]*dhcp-option=option6:dns-server,.*$/d" /etc/dnsmasq.conf +X if [ "$USE_EXTERNAL_DNS" != "true" ] +X then +X [ $ETH0_IP ] && NS="$INTERNAL_DNS,$NS" +X [ $ETH0_IP6 ] && NS6="[::],$NS6" +X # enable dns +X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf +X else +X # disable dns +X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf +X echo "port=0" >> /etc/dnsmasq.conf +X fi +X NS=${NS%?} +X NS6=${NS6%?} +X [ $ETH0_IP ] && echo "dhcp-option=6,$NS" >> /etc/dnsmasq.conf +X [ $ETH0_IP6 ] && echo "dhcp-option=option6:dns-server,$NS6" >> /etc/dnsmasq.conf +X #adding the name data-server to the /etc/hosts for allowing the access to user-data service and ssh-key reset in every subnet. +X #removing the existing entires to avoid duplicates on restarts. +X sed -i '/data-server/d' /etc/hosts +X if [ -n "$ETH0_IP" ] +X then +X echo "$ETH0_IP data-server" >> /etc/hosts +X fi +X if [ -n "$ETH0_IP6" ] +X then +X echo "$ETH0_IP6 data-server" >> /etc/hosts +X fi +X #add the dhcp-client-update only if dnsmasq version is 2.6 and above +X dnsmasqVersion=$(dnsmasq -v | grep version -m 1 | grep -o "[[:digit:]]\.[[:digit:]]") +X major=$(echo "$dnsmasqVersion" | cut -d '.' -f 1) +X minor=$(echo "$dnsmasqVersion" | cut -d '.' -f 2) +X if [ "$major" -eq '2' -a "$minor" -ge '6' ] || [ "$major" -gt '2' ] +X then +X sed -i -e "/^dhcp-client-update/d" /etc/dnsmasq.conf +X echo 'dhcp-client-update' >> /etc/dnsmasq.conf +X fi +X +X command -v dhcp_release > /dev/null 2>&1 +X no_dhcp_release=$? +X if [ $no_dhcp_release -eq 0 -a -z "$ETH0_IP6" ] +X then +X echo 1 > /var/cache/cloud/dnsmasq_managed_lease +X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf +X else +X echo 0 > /var/cache/cloud/dnsmasq_managed_lease +X fi +} +X +setup_sshd(){ +X local ip=$1 +X local eth=$2 +X [ -f /etc/ssh/sshd_config ] && sed -i -e "s/^[#]*ListenAddress.*$/ListenAddress $ip/" /etc/ssh/sshd_config +X sed -i "/3922/s/eth./$eth/" /etc/iptables/rules.v4 +} +X +setup_vpc_apache2() { +X log_it "Setting up apache web server for VPC" +X systemctl disable apache2 +X clean_ipalias_config +X setup_apache2_common +} +X +clean_ipalias_config() { +X rm -f /etc/apache2/conf.d/ports.*.meta-data.conf +X rm -f /etc/apache2/sites-available/ipAlias* +X rm -f /etc/apache2/sites-enabled/ipAlias* +X rm -f /etc/apache2/conf.d/vhost*.conf +X rm -f /etc/apache2/ports.conf +X rm -f /etc/apache2/vhostexample.conf +X rm -f /etc/apache2/sites-available/* +X rm -f /etc/apache2/sites-enabled/* +X +X rm -rf /etc/failure_config +} +X +setup_apache2_common() { +X sed -i 's/^Include ports.conf.*/# CS: Done by Python CsApp config\n#Include ports.conf/g' /etc/apache2/apache2.conf +X # Disable listing of http://SSVM-IP/icons folder for security issue. see article http://www.i-lateral.com/tutorials/disabling-the-icons-folder-on-an-ubuntu-web-server/ +X [ -f /etc/apache2/mods-available/alias.conf ] && sed -i s/"Options Indexes MultiViews"/"Options -Indexes MultiViews"/ /etc/apache2/mods-available/alias.conf +X +X echo "Options -Indexes" > /var/www/html/.htaccess +} +X +setup_apache2() { +X log_it "Setting up apache web server" +X mkdir -p /var/www +X chown www-data:www-data -R /var/www +X clean_ipalias_config +X setup_apache2_common +X local ip=$1 +} +X +setup_aesni() { +X if [ `grep aes /proc/cpuinfo | wc -l` -gt 0 ] +X then +X modprobe aesni_intel +X fi +} +X +setup_storage_network() { +X if [ x"$STORAGE_IP" == "x" -o x"$STORAGE_NETMASK" == "x" ] +X then +X log_it "Incompleted parameters STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR. Cannot setup storage network" +X return +X fi +X +X echo "" >> /etc/network/interfaces +X echo "auto eth3" >> /etc/network/interfaces +X +X setup_interface "3" "$STORAGE_IP" "$STORAGE_NETMASK" +X [ -n "$MTU" ] && ifconfig eth3 mtu $MTU && echo " mtu $MTU" >> /etc/network/interfaces +X #ip route add "$STORAGE_CIDR" via "$STORAGE_IP" +X log_it "Successfully setup storage network with STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR" +} +X +setup_system_rfc1918_internal() { +X public_ip=`getPublicIp` +X echo "$public_ip" | grep -E "^((127\.)|(10\.)|(172\.1[6-9]\.)|(172\.2[0-9]\.)|(172\.3[0-1]\.)|(192\.168\.))" +X if [ "$?" == "0" ]; then +X log_it "Not setting up route of RFC1918 space to $LOCAL_GW befause $public_ip is RFC1918." +X else +X log_it "Setting up route of RFC1918 space to $LOCAL_GW" +X # Setup general route for RFC 1918 space, as otherwise it will be sent to +X # the public gateway and not work +X # More specific routes that may be set have preference over this generic route. +X ip route add 10.0.0.0/8 via $LOCAL_GW +X ip route add 172.16.0.0/12 via $LOCAL_GW +X ip route add 192.168.0.0/16 via $LOCAL_GW +X fi +} +X +getPublicIp() { +X public_ip=$ETH2_IP +X [ "$ETH2_IP" == "0.0.0.0" ] && public_ip=$ETH1_IP +X echo $public_ip +} +X +setup_ntp() { +X log_it "Setting up NTP" +X NTP_CONF_FILE="/etc/ntp.conf" +X if [ -f $NTP_CONF_FILE ] +X then +X IFS=',' read -a server_list <<< "$NTP_SERVER_LIST" +X for (( iterator=${#server_list[@]}-1 ; iterator>=0 ; iterator-- )) +X do +X server=$(echo ${server_list[iterator]} | tr -d '\r') +X PATTERN="server $server" +X if grep -q "^$PATTERN$" $NTP_CONF_FILE ; then +X sed -i "/^$PATTERN$/d" $NTP_CONF_FILE +X fi +X sed -i "0,/^server/s//$PATTERN\nserver/" $NTP_CONF_FILE +X done +X systemctl enable ntp +X else +X log_it "NTP configuration file not found" +X fi +} +X +routing_svcs() { +X echo "haproxy apache2" > /var/cache/cloud/enabled_svcs +X echo "cloud nfs-common portmap" > /var/cache/cloud/disabled_svcs +X if [ "$RROUTER" -eq "1" ] +X then +X echo "keepalived conntrackd" >> /var/cache/cloud/enabled_svcs +X echo "dnsmasq" >> /var/cache/cloud/disabled_svcs +X else +X echo "dnsmasq" >> /var/cache/cloud/enabled_svcs +X echo "keepalived conntrackd " >> /var/cache/cloud/disabled_svcs +X fi +} +X +parse_cmd_line() { +X CMDLINE=$(cat /var/cache/cloud/cmdline) +X TYPE="unknown" +X BOOTPROTO="static" +X DISABLE_RP_FILTER="false" +X STORAGE_IP="" +X STORAGE_NETMASK="" +X STORAGE_CIDR="" +X VM_PASSWORD="" +X +X CHEF_TMP_FILE=/tmp/cmdline.json +X COMMA="\t" +X echo -e "{\n\"type\": \"cmdline\"," > ${CHEF_TMP_FILE} +X echo -e "\"cmd_line\": {" >> ${CHEF_TMP_FILE} +X +X for i in $CMDLINE +X do +X # search for foo=bar pattern and cut out foo +X KEY=$(echo $i | cut -d= -f1) +X VALUE=$(echo $i | cut -d= -f2) +X echo -en ${COMMA} >> ${CHEF_TMP_FILE} +X # Two lines so values do not accidently interpretted as escapes!! +X echo -n \"${KEY}\"': '\"${VALUE}\" >> ${CHEF_TMP_FILE} +X COMMA=",\n\t" +X case $KEY in +X disable_rp_filter) +X export DISABLE_RP_FILTER=$VALUE +X ;; +X eth0ip) +X export ETH0_IP=$VALUE +X ;; +X eth1ip) +X export ETH1_IP=$VALUE +X ;; +X eth2ip) +X export ETH2_IP=$VALUE +X ;; +X host) +X export MGMT_HOST=$VALUE +X ;; +X gateway) +X export GW=$VALUE +X ;; +X ip6gateway) +X export IP6GW=$VALUE +X ;; +X eth0mask) +X export ETH0_MASK=$VALUE +X ;; +X eth1mask) +X export ETH1_MASK=$VALUE +X ;; +X eth2mask) +X export ETH2_MASK=$VALUE +X ;; +X eth0ip6) +X export ETH0_IP6=$VALUE +X ;; +X eth0ip6prelen) +X export ETH0_IP6_PRELEN=$VALUE +X ;; +X internaldns1) +X export internalNS1=$VALUE +X ;; +X internaldns2) +X export internalNS2=$VALUE +X ;; +X dns1) +X export NS1=$VALUE +X ;; +X dns2) +X export NS2=$VALUE +X ;; +X ip6dns1) +X export IP6_NS1=$VALUE +X ;; +X ip6dns2) +X export IP6_NS2=$VALUE +X ;; +X domain) +X export DOMAIN=$VALUE +X ;; +X dnssearchorder) +X export DNS_SEARCH_ORDER=$VALUE +X ;; +X useextdns) +X export USE_EXTERNAL_DNS=$VALUE +X ;; +X mgmtcidr) +X export MGMTNET=$VALUE +X ;; +X localgw) +X export LOCAL_GW=$VALUE +X ;; +X template) +X export TEMPLATE=$VALUE +X ;; +X sshonguest) +X export SSHONGUEST=$VALUE +X ;; +X name) +X export NAME=$VALUE +X ;; +X dhcprange) +X export DHCP_RANGE=$(echo $VALUE | tr ':' ',') +X ;; +X bootproto) +X export BOOTPROTO=$VALUE +X ;; +X type) +X export TYPE=$VALUE +X ;; +X defaultroute) +X export DEFAULTROUTE=$VALUE +X ;; +X redundant_router) +X export RROUTER=$VALUE +X ;; +X redundant_state) +X export RROUTER_STATE=$VALUE +X ;; +X guestgw) +X export GUEST_GW=$VALUE +X ;; +X guestbrd) +X export GUEST_BRD=$VALUE +X ;; +X guestcidrsize) +X export GUEST_CIDR_SIZE=$VALUE +X ;; +X router_pr) +X export ROUTER_PR=$VALUE +X ;; +X extra_pubnics) +X export EXTRA_PUBNICS=$VALUE +X ;; +X nic_macs) +X export NIC_MACS=$VALUE +X ;; +X mtu) +X export MTU=$VALUE +X ;; +X storageip) +X export STORAGE_IP=$VALUE +X ;; +X storagenetmask) +X export STORAGE_NETMASK=$VALUE +X ;; +X storagecidr) +X export STORAGE_CIDR=$VALUE +X ;; +X vmpassword) +X export VM_PASSWORD=$VALUE +X ;; +X vpccidr) +X export VPCCIDR=$VALUE +X ;; +X cidrsize) +X export CIDR_SIZE=$VALUE +X ;; +X advert_int) +X export ADVERT_INT=$VALUE +X ;; +X ntpserverlist) +X export NTP_SERVER_LIST=$VALUE +X ;; +X esac +X done +X echo -e "\n\t}\n}" >> ${CHEF_TMP_FILE} +X if [ "$TYPE" != "unknown" ] +X then +X mv ${CHEF_TMP_FILE} /var/cache/cloud/cmd_line.json +X fi +X +X [ $ETH0_IP ] && export LOCAL_ADDRS=$ETH0_IP +X [ $ETH0_IP6 ] && export LOCAL_ADDRS=$ETH0_IP6 +X [ $ETH0_IP ] && [ $ETH0_IP6 ] && export LOCAL_ADDRS="$ETH0_IP,$ETH0_IP6" +X +X # Randomize cloud password so only ssh login is allowed +X echo "cloud:`openssl rand -base64 32`" | chpasswd +X +X if [ x"$VM_PASSWORD" != x"" ] +X then +X echo "root:$VM_PASSWORD" | chpasswd +X fi +} +X +parse_cmd_line +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/common.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/common.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/common.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/common.sh': 'MD5 check failed' + ) << \SHAR_EOF +8754c81bacd82458e4ce221b476505ea cloud_scripts/opt/cloud/bin/setup/common.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/common.sh'` -ne 22472 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/common.sh' is not 22472" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +dhcpsrvr_svcs() { +X echo "dnsmasq apache2" > /var/cache/cloud/enabled_svcs +X echo "cloud nfs-common conntrackd keepalived haproxy portmap" > /var/cache/cloud/disabled_svcs +} +X +setup_dhcpsrvr() { +X log_it "Setting up dhcp server system vm" +X setup_common eth0 eth1 +X setup_dnsmasq +X setup_apache2 $ETH0_IP +X +X sed -i /$NAME/d /etc/hosts +X [ $ETH0_IP ] && echo "$ETH0_IP $NAME" >> /etc/hosts +X [ $ETH0_IP6 ] && echo "$ETH0_IP6 $NAME" >> /etc/hosts +X +X enable_irqbalance 0 +X enable_fwding 0 +X +X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 +X +X #Only allow DNS service for current network +X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X +X if [ "$SSHONGUEST" == "true" ] +X then +X setup_sshd $ETH0_IP "eth0" +X else +X setup_sshd $ETH1_IP "eth1" +X fi +} +X +dhcpsrvr_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute dhcpsrvr_svcs" +X exit 1 +fi +setup_dhcpsrvr +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh': 'MD5 check failed' + ) << \SHAR_EOF +08afc46420e5e388ba6be68cfdbd4a59 cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh'` -ne 1985 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' is not 1985" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/cloud-early-config ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/cloud-early-config (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/cloud-early-config (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" +X +# Clear boot up flag, it would be created by rc.local after boot up done +mkdir -p /var/cache/cloud +rm -f /var/cache/cloud/boot_up_done +X +[ -x /sbin/ifup ] || exit 0 +X +X. /lib/lsb/init-functions +X +log_it() { +X echo "$(date) $@" >> /var/log/cloud.log +X log_action_msg "$@" +} +X +patch() { +X local PATCH_MOUNT=/media/cdrom +X local patchfile=$PATCH_MOUNT/cloud-scripts.tgz +X local privkey=$PATCH_MOUNT/authorized_keys +X local md5file=/var/cache/cloud/cloud-scripts-signature +X local cdrom_dev= +X mkdir -p $PATCH_MOUNT +X +X if [ -e /dev/xvdd ]; then +X cdrom_dev=/dev/xvdd +X elif [ -e /dev/cdrom ]; then +X cdrom_dev=/dev/cdrom +X elif [ -e /dev/cdrom1 ]; then +X cdrom_dev=/dev/cdrom1 +X elif [ -e /dev/cdrom2 ]; then +X cdrom_dev=/dev/cdrom2 +X elif [ -e /dev/cdrom3 ]; then +X cdrom_dev=/dev/cdrom3 +X fi +X +X if [ -f /var/cache/cloud/authorized_keys ]; then +X privkey=/var/cache/cloud/authorized_keys +X fi +X +X if [ -n "$cdrom_dev" ]; then +X mount -o ro $cdrom_dev $PATCH_MOUNT +X local oldmd5= +X [ -f ${md5file} ] && oldmd5=$(cat ${md5file}) +X local newmd5= +X [ -f ${patchfile} ] && newmd5=$(md5sum ${patchfile} | awk '{print $1}') +X +X log_it "Scripts checksum detected: oldmd5=$oldmd5 newmd5=$newmd5" +X if [ "$oldmd5" != "$newmd5" ] && [ -f ${patchfile} ] && [ "$newmd5" != "" ] +X then +X tar xzf $patchfile -C / +X echo ${newmd5} > ${md5file} +X log_it "Patched scripts using $patchfile" +X touch /var/cache/cloud/patch.required +X fi +X +X if [ -f $privkey ]; then +X cp -f $privkey /root/.ssh/ +X chmod go-rwx /root/.ssh/authorized_keys +X fi +X fi +X +X return 0 +} +X +start() { +X log_it "Executing cloud-early-config" +X +X # Clear /tmp for file lock +X rm -f /tmp/*.lock +X rm -f /tmp/rrouter_bumped +X rm -f /root/.rnd +X echo "" > /root/.ssh/known_hosts +X +X patch +X sync +X /opt/cloud/bin/setup/bootstrap.sh +X +X log_it "Finished setting up systemvm" +X exit 0 +} +X +start +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/cloud-early-config failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config': 'MD5 check failed' + ) << \SHAR_EOF +c9e5973de3771fd5f5e9b490c60db970 cloud_scripts/opt/cloud/bin/setup/cloud-early-config +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config'` -ne 2765 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' is not 2765" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/default.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/default.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/default.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/default.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/default.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_default() { +X cat > /etc/network/interfaces << EOF +auto lo +iface lo inet loopback +EOF +X cp -f /etc/iptables/rt_tables_init /etc/iproute2/rt_tables +} +X +setup_default +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/default.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/default.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/default.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/default.sh': 'MD5 check failed' + ) << \SHAR_EOF +20e3a01cb77930eba6438de6d9a3f193 cloud_scripts/opt/cloud/bin/setup/default.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/default.sh'` -ne 1002 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/default.sh' is not 1002" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/loadbalancer.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/loadbalancer.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/loadbalancer.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +X +# $Id: loadbalancer.sh 9947 2010-06-25 19:34:24Z manuel $ $HeadURL: svn://svn.lab.vmops.com/repos/vmdev/java/patches/xenserver/root/loadbalancer.sh $ +# loadbalancer.sh -- reconfigure loadbalancer rules +# @VERSION@ +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s: -i -a -d -f -s \n" $(basename $0) >&2 +} +X +# set -x +X +# ensure that the nic has the public ip we are load balancing on +ip_entry() { +X local added=$1 +X local removed=$2 +X +X if [ "$added" == "none" ] +X then +X added="" +X fi +X +X if [ "$removed" == "none" ] +X then +X removed="" +X fi +X +X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") +X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") +X +X for i in $a +X do +X local pubIp=$(echo $i | cut -d: -f1) +X logger -t cloud "Adding public ip $pubIp for load balancing" +X for vif in $VIF_LIST; do +X sudo ip addr add dev $vif $pubIp/32 +X #ignore error since it is because the ip is already there +X done +X done +X +X for i in $r +X do +X logger -t cloud "Removing public ips for deleted loadbalancers" +X local pubIp=$(echo $i | cut -d: -f1) +X logger -t cloud "Removing public ip $pubIp for deleted loadbalancers" +X for vif in $VIF_LIST; do +X sudo ip addr del $pubIp/32 dev $vif +X done +X done +X +X return 0 +} +get_lb_vif_list() { +# add eth0 to the VIF_LIST if it is not there, this allows guest VMs to use the LB service. +X local lb_list="$VIF_LIST eth0"; +X lb_list=$(echo $lb_list | tr " " "\n" | sort | uniq | tr "\n" " ") +X echo $lb_list +} +fw_remove_backup() { +X local lb_vif_list=$(get_lb_vif_list) +X for vif in $lb_vif_list; do +X sudo iptables -F back_load_balancer_$vif 2> /dev/null +X sudo iptables -D INPUT -i $vif -p tcp -j back_load_balancer_$vif 2> /dev/null +X sudo iptables -X back_load_balancer_$vif 2> /dev/null +X done +X sudo iptables -F back_lb_stats 2> /dev/null +X sudo iptables -D INPUT -p tcp -j back_lb_stats 2> /dev/null +X sudo iptables -X back_lb_stats 2> /dev/null +} +fw_restore() { +X local lb_vif_list=$(get_lb_vif_list) +X for vif in $lb_vif_list; do +X sudo iptables -F load_balancer_$vif 2> /dev/null +X sudo iptables -D INPUT -i $vif -p tcp -j load_balancer_$vif 2> /dev/null +X sudo iptables -X load_balancer_$vif 2> /dev/null +X sudo iptables -E back_load_balancer_$vif load_balancer_$vif 2> /dev/null +X done +X sudo iptables -F lb_stats 2> /dev/null +X sudo iptables -D INPUT -p tcp -j lb_stats 2> /dev/null +X sudo iptables -X lb_stats 2> /dev/null +X sudo iptables -E back_lb_stats lb_stats 2> /dev/null +} +# firewall entry to ensure that haproxy can receive on specified port +fw_entry() { +X local added=$1 +X local removed=$2 +X local stats=$3 +X +X if [ "$added" == "none" ] +X then +X added="" +X fi +X +X if [ "$removed" == "none" ] +X then +X removed="" +X fi +X +X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") +X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") +X +# back up the iptable rules by renaming before creating new. +X local lb_vif_list=$(get_lb_vif_list) +X for vif in $lb_vif_list; do +X sudo iptables -E load_balancer_$vif back_load_balancer_$vif 2> /dev/null +X sudo iptables -N load_balancer_$vif 2> /dev/null +X sudo iptables -A INPUT -i $vif -p tcp -j load_balancer_$vif +X done +X sudo iptables -E lb_stats back_lb_stats 2> /dev/null +X sudo iptables -N lb_stats 2> /dev/null +X sudo iptables -A INPUT -p tcp -j lb_stats +X +X for i in $a +X do +X local pubIp=$(echo $i | cut -d: -f1) +X local dport=$(echo $i | cut -d: -f2) +X local lb_vif_list=$(get_lb_vif_list) +X for vif in $lb_vif_list; do +X +#TODO : The below delete will be used only when we upgrade the from older verion to the newer one , the below delete become obsolute in the future. +X sudo iptables -D INPUT -i $vif -p tcp -d $pubIp --dport $dport -j ACCEPT 2> /dev/null +X +X sudo iptables -A load_balancer_$vif -p tcp -d $pubIp --dport $dport -j ACCEPT +X +X if [ $? -gt 0 ] +X then +X return 1 +X fi +X done +X done +X local pubIp=$(echo $stats | cut -d: -f1) +X local dport=$(echo $stats | cut -d: -f2) +X local cidrs=$(echo $stats | cut -d: -f3 | sed 's/-/,/') +X sudo iptables -A lb_stats -s $cidrs -p tcp -m state --state NEW -d $pubIp --dport $dport -j ACCEPT +X +X +#TODO : The below delete in the for-loop will be used only when we upgrade the from older verion to the newer one , the below delete become obsolute in the future. +X for i in $r +X do +X local pubIp=$(echo $i | cut -d: -f1) +X local dport=$(echo $i | cut -d: -f2) +X +X for vif in $VIF_LIST; do +X sudo iptables -D INPUT -i $vif -p tcp -d $pubIp --dport $dport -j ACCEPT 2> /dev/null +X done +X done +X +X return 0 +} +X +#Hot reconfigure HA Proxy in the routing domain +reconfig_lb() { +X logger -t cloud "Reconfiguring loadbalancer using $1" +X /root/reconfigLB.sh $1 +X return $? +} +X +# Restore the HA Proxy to its previous state, and revert iptables rules on DomR +restore_lb() { +X logger -t cloud "Restoring HA Proxy to previous state" +X # Copy the old version of haproxy.cfg into the file that reconfigLB.sh uses +X cp /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg.new +X +X if [ $? -eq 0 ] +X then +X # Run reconfigLB.sh again +X /root/reconfigLB.sh /etc/haproxy/haproxy.cfg.new +X fi +} +X +get_vif_list() { +X local vif_list="" +X for i in /sys/class/net/eth*; do +X vif=$(basename $i); +X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] +X then +X vif_list="$vif_list $vif"; +X fi +X done +X if [ "$vif_list" == "" ] +X then +X vif_list="eth0" +X fi +X +X logger -t cloud "Loadbalancer public interfaces = $vif_list" +X echo $vif_list +} +X +mflag= +iflag= +aflag= +dflag= +fflag= +sflag= +X +while getopts 'i:a:d:f:s:' OPTION +do +X case $OPTION in +X i) iflag=1 +X domRIp="$OPTARG" +X ;; +X a) aflag=1 +X addedIps="$OPTARG" +X ;; +X d) dflag=1 +X removedIps="$OPTARG" +X ;; +X f) fflag=1 +X cfgfile="$OPTARG" +X ;; +X s) sflag=1 +X statsIp="$OPTARG" +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [ "$addedIps" == "" ] +then +X addedIps="none" +fi +X +X +if [ "$removedIps" == "" ] +then +X removedIps="none" +fi +X +VIF_LIST=$(get_vif_list) +X +X +if [ "$addedIps" == "" ] +then +X addedIps="none" +fi +X +if [ "$removedIps" == "" ] +then +X removedIps="none" +fi +X +#FIXME: make this explicit via check on vm type or passed in flag +if [ "$VIF_LIST" == "eth0" ] +then +X ip_entry $addedIps $removedIps +fi +X +# hot reconfigure haproxy +reconfig_lb $cfgfile +X +if [ $? -gt 0 ] +then +X logger -t cloud "Reconfiguring loadbalancer failed" +X #FIXME: make this explicit via check on vm type or passed in flag +X if [ "$VIF_LIST" == "eth0" ] +X then +X ip_entry $removedIps $addedIps +X fi +X unlock_exit 1 $lock $locked +fi +X +# iptables entry to ensure that haproxy receives traffic +fw_entry $addedIps $removedIps $statsIp +X +if [ $? -gt 0 ] +then +X logger -t cloud "Failed to apply firewall rules for load balancing, reverting HA Proxy config" +X # Restore the LB +X restore_lb +X +X logger -t cloud "Reverting firewall config" +X # Revert iptables rules on DomR +X fw_restore +X +X #FIXME: make this explicit via check on vm type or passed in flag +X if [ "$VIF_LIST" == "eth0" ] +X then +X logger -t cloud "Reverting ip address changes to eth0" +X ip_entry $removedIps $addedIps +X fi +X +X unlock_exit 1 $lock $locked +else +X # Remove backedup iptable rules +X fw_remove_backup +fi +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/loadbalancer.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/loadbalancer.sh': 'MD5 check failed' + ) << \SHAR_EOF +6da53e4d9dd0b11f6fa334c6f583f8cd cloud_scripts/opt/cloud/bin/loadbalancer.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/loadbalancer.sh'` -ne 8234 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' is not 8234" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/baremetal_snat.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/baremetal_snat.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/baremetal_snat.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' && +#!/bin/bash +X +#Licensed to the Apache Software Foundation (ASF) under one +#or more contributor license agreements. See the NOTICE file +#distributed with this work for additional information +#regarding copyright ownership. The ASF licenses this file +#to you under the Apache License, Version 2.0 (the +#"License"); you may not use this file except in compliance +#with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +#Unless required by applicable law or agreed to in writing, +#software distributed under the License is distributed on an +#"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +#KIND, either express or implied. See the License for the +#specific language governing permissions and limitations +#under the License. +X +set +u +X +mgmt_nic_ip=$1 +internal_server_ip=$2 +gateway_ip=$3 +X +ip route | grep "$internal_server_ip" > /dev/null +X +if [ $? -ne 0 ]; then +X ip route add $internal_server_ip via $gateway_ip +fi +X +iptables-save | grep -- "-A POSTROUTING -d $internal_server_ip" > /dev/null +X +if [ $? -ne 0 ]; then +X iptables -t nat -A POSTROUTING -d $internal_server_ip -j SNAT --to-source $mgmt_nic_ip +fi +X +X +iptables-save | grep -- "-A INPUT -i eth0 -p udp -m udp --dport 69 -j ACCEPT" > /dev/null +if [ $? -ne 0 ]; then +X iptables -I INPUT -i eth0 -p udp -m udp --dport 69 -j ACCEPT +fi +X +iptables-save | grep -- "-A FORWARD -i eth1 -o eth0 -j ACCEPT" > /dev/null +if [ $? -ne 0 ]; then +X iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT +fi +X +rule="-A FORWARD -d $internal_server_ip/32 -i eth0 -o eth1 -j ACCEPT" +iptables-save | grep -- "$rule" > /dev/null +if [ $? -ne 0 ]; then +X iptables -I FORWARD -d $internal_server_ip/32 -i eth0 -o eth1 -j ACCEPT +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/baremetal_snat.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh': 'MD5 check failed' + ) << \SHAR_EOF +acab3e2b25ee898e7dd05c4e77b15569 cloud_scripts/opt/cloud/bin/baremetal_snat.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh'` -ne 1717 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' is not 1717" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_vpnusers.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vpnusers.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vpnusers.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import copy +X +X +def merge(dbag, data): +X dbagc = copy.deepcopy(dbag) +X +X print dbag +X print data +X if "vpn_users" not in data: +X return dbagc +X +X # remove previously deleted user from the dict +X for user in dbagc.keys(): +X if user == 'id': +X continue +X userrec = dbagc[user] +X add = userrec['add'] +X if not add: +X del(dbagc[user]) +X +X for user in data['vpn_users']: +X username = user['user'] +X add = user['add'] +X if username not in dbagc.keys(): +X dbagc[username] = user +X elif username in dbagc.keys() and not add: +X dbagc[username] = user +X +X return dbagc +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_vpnusers.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py': 'MD5 check failed' + ) << \SHAR_EOF +d54ff81fd9901ecc0bfbe9528343e238 cloud_scripts/opt/cloud/bin/cs_vpnusers.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py'` -ne 1469 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' is not 1469" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/merge.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/merge.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/merge.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/merge.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/merge.py' && +#!/usr/bin/python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import json +import os +import uuid +import logging +import gzip +import shutil +import cs_ip +import cs_guestnetwork +import cs_cmdline +import cs_vmp +import cs_network_acl +import cs_firewallrules +import cs_loadbalancer +import cs_monitorservice +import cs_vmdata +import cs_dhcp +import cs_forwardingrules +import cs_site2sitevpn +import cs_remoteaccessvpn +import cs_vpnusers +import cs_staticroutes +X +X +class DataBag: +X +X DPATH = "/etc/cloudstack" +X +X def __init__(self): +X self.bdata = {} +X +X def load(self): +X data = self.bdata +X if not os.path.exists(self.DPATH): +X os.makedirs(self.DPATH) +X self.fpath = os.path.join(self.DPATH, self.key + '.json') +X +X try: +X with open(self.fpath, 'r') as _fh: +X logging.debug("Loading data bag type %s", self.key) +X data = json.load(_fh) +X except (IOError, ValueError): +X logging.debug("Caught load error, creating empty data bag type %s", self.key) +X data.update({"id": self.key}) +X finally: +X self.dbag = data +X +X def save(self, dbag): +X try: +X with open(self.fpath, 'w') as _fh: +X logging.debug("Writing data bag type %s", self.key) +X json.dump( +X dbag, _fh, +X sort_keys=True, +X indent=2 +X ) +X except IOError: +X logging.error("Could not write data bag %s", self.key) +X +X def getDataBag(self): +X return self.dbag +X +X def setKey(self, key): +X self.key = key +X +X +class updateDataBag: +X +X DPATH = "/etc/cloudstack" +X +X def __init__(self, qFile): +X self.qFile = qFile +X self.fpath = '' +X self.bdata = {} +X self.process() +X +X def process(self): +X self.db = DataBag() +X if (self.qFile.type == "staticnatrules" or self.qFile.type == "forwardrules"): +X self.db.setKey("forwardingrules") +X else: +X self.db.setKey(self.qFile.type) +X dbag = self.db.load() +X logging.info("Command of type %s received", self.qFile.type) +X +X if self.qFile.type == 'ips': +X dbag = self.processIP(self.db.getDataBag()) +X elif self.qFile.type == 'guestnetwork': +X dbag = self.processGuestNetwork(self.db.getDataBag()) +X elif self.qFile.type == 'cmdline': +X dbag = self.processCL(self.db.getDataBag()) +X elif self.qFile.type == 'vmpassword': +X dbag = self.processVMpassword(self.db.getDataBag()) +X elif self.qFile.type == 'networkacl': +X dbag = self.process_network_acl(self.db.getDataBag()) +X elif self.qFile.type == 'firewallrules': +X dbag = self.process_firewallrules(self.db.getDataBag()) +X elif self.qFile.type == 'loadbalancer': +X dbag = self.process_loadbalancer(self.db.getDataBag()) +X elif self.qFile.type == 'monitorservice': +X dbag = self.process_monitorservice(self.db.getDataBag()) +X elif self.qFile.type == 'vmdata': +X dbag = self.processVmData(self.db.getDataBag()) +X elif self.qFile.type == 'dhcpentry': +X dbag = self.process_dhcp_entry(self.db.getDataBag()) +X elif self.qFile.type == 'staticnatrules' or self.qFile.type == 'forwardrules': +X dbag = self.processForwardingRules(self.db.getDataBag()) +X elif self.qFile.type == 'site2sitevpn': +X dbag = self.process_site2sitevpn(self.db.getDataBag()) +X elif self.qFile.type == 'remoteaccessvpn': +X dbag = self.process_remoteaccessvpn(self.db.getDataBag()) +X elif self.qFile.type == 'vpnuserlist': +X dbag = self.process_vpnusers(self.db.getDataBag()) +X elif self.qFile.type == 'staticroutes': +X dbag = self.process_staticroutes(self.db.getDataBag()) +X elif self.qFile.type == 'ipaliases': +X self.db.setKey('ips') +X self.db.load() +X dbag = self.process_ipaliases(self.db.getDataBag()) +X elif self.qFile.type == 'dhcpconfig': +X logging.error("I don't think I need %s anymore", self.qFile.type) +X return +X else: +X logging.error("Error I do not know what to do with file of type %s", self.qFile.type) +X return +X self.db.save(dbag) +X +X def processGuestNetwork(self, dbag): +X d = self.qFile.data +X dp = {} +X dp['public_ip'] = d['router_guest_ip'] +X dp['netmask'] = d['router_guest_netmask'] +X dp['source_nat'] = False +X dp['add'] = d['add'] +X dp['one_to_one_nat'] = False +X dp['gateway'] = d['router_guest_gateway'] +X dp['nic_dev_id'] = d['device'][3:] +X dp['nw_type'] = 'guest' +X dp = PrivateGatewayHack.update_network_type_for_privategateway(dbag, dp) +X qf = QueueFile() +X qf.load({'ip_address': [dp], 'type': 'ips'}) +X if 'domain_name' not in d.keys() or d['domain_name'] == '': +X d['domain_name'] = "cloudnine.internal" +X +X d = PrivateGatewayHack.update_network_type_for_privategateway(dbag, d) +X return cs_guestnetwork.merge(dbag, d) +X +X def process_dhcp_entry(self, dbag): +X return cs_dhcp.merge(dbag, self.qFile.data) +X +X def process_site2sitevpn(self, dbag): +X return cs_site2sitevpn.merge(dbag, self.qFile.data) +X +X def process_remoteaccessvpn(self, dbag): +X return cs_remoteaccessvpn.merge(dbag, self.qFile.data) +X +X def process_vpnusers(self, dbag): +X return cs_vpnusers.merge(dbag, self.qFile.data) +X +X def process_network_acl(self, dbag): +X return cs_network_acl.merge(dbag, self.qFile.data) +X +X def process_firewallrules(self, dbag): +X return cs_firewallrules.merge(dbag, self.qFile.data) +X +X def process_loadbalancer(self, dbag): +X return cs_loadbalancer.merge(dbag, self.qFile.data) +X +X def process_monitorservice(self, dbag): +X return cs_monitorservice.merge(dbag, self.qFile.data) +X +X def process_staticroutes(self, dbag): +X return cs_staticroutes.merge(dbag, self.qFile.data) +X +X def processVMpassword(self, dbag): +X return cs_vmp.merge(dbag, self.qFile.data) +X +X def processForwardingRules(self, dbag): +X # to be used by both staticnat and portforwarding +X return cs_forwardingrules.merge(dbag, self.qFile.data) +X +X def processIP(self, dbag): +X for ip in self.qFile.data["ip_address"]: +X dbag = cs_ip.merge(dbag, ip) +X return dbag +X +X def processCL(self, dbag): +X # Convert the ip stuff to an ip object and pass that into cs_ip_merge +X # "eth0ip": "192.168.56.32", +X # "eth0mask": "255.255.255.0", +X self.newData = [] +X if (self.qFile.data['cmd_line']['type'] == "router"): +X self.processCLItem('0', "guest") +X self.processCLItem('1', "control") +X self.processCLItem('2', "public") +X elif (self.qFile.data['cmd_line']['type'] == "vpcrouter"): +X self.processCLItem('0', "control") +X elif (self.qFile.data['cmd_line']['type'] == "dhcpsrvr"): +X self.processCLItem('0', "guest") +X self.processCLItem('1', "control") +X elif (self.qFile.data['cmd_line']['type'] == "ilbvm"): +X self.processCLItem('0', "guest") +X self.processCLItem('1', "control") +X +X return cs_cmdline.merge(dbag, self.qFile.data) +X +X def processCLItem(self, num, nw_type): +X key = 'eth' + num + 'ip' +X dp = {} +X if(key in self.qFile.data['cmd_line']): +X dp['public_ip'] = self.qFile.data['cmd_line'][key] +X dp['netmask'] = self.qFile.data['cmd_line']['eth' + num + 'mask'] +X dp['source_nat'] = False +X dp['add'] = True +X dp['one_to_one_nat'] = False +X if nw_type == "public": +X dp['gateway'] = self.qFile.data['cmd_line']['gateway'] +X else: +X if('localgw' in self.qFile.data['cmd_line']): +X dp['gateway'] = self.qFile.data['cmd_line']['localgw'] +X else: +X dp['gateway'] = '' +X dp['nic_dev_id'] = num +X dp['nw_type'] = nw_type +X qf = QueueFile() +X qf.load({'ip_address': [dp], 'type': 'ips'}) +X +X def processVmData(self, dbag): +X cs_vmdata.merge(dbag, self.qFile.data) +X return dbag +X +X def process_ipaliases(self, dbag): +X nic_dev = None +X # Should be a way to deal with this better +X for intf, data in dbag.items(): +X if intf == 'id': +X continue +X elif any([net['nw_type'] == 'guest' for net in data]): +X nic_dev = intf +X break +X +X assert nic_dev is not None, 'Unable to determine Guest interface' +X +X nic_dev_id = nic_dev[3:] +X +X for alias in self.qFile.data['aliases']: +X ip = { +X 'add': not alias['revoke'], +X 'nw_type': 'guest', +X 'public_ip': alias['ip_address'], +X 'netmask': alias['netmask'], +X 'nic_dev_id': nic_dev_id +X } +X dbag = cs_ip.merge(dbag, ip) +X return dbag +X +X +class QueueFile: +X +X fileName = '' +X configCache = "/var/cache/cloud" +X keep = True +X data = {} +X +X def load(self, data): +X if data is not None: +X self.data = data +X self.type = self.data["type"] +X updateDataBag(self) +X return +X filename = '{cache_location}/{json_file}'.format(cache_location=self.configCache, json_file=self.fileName) +X try: +X handle = open(filename) +X except IOError as exception: +X error_message = ("Exception occurred with the following exception error '{error}'. Could not open '{filename}'. " +X "It seems that the file has already been moved.".format(error=exception, filename=filename)) +X logging.error(error_message) +X else: +X logging.info("Continuing with the processing of file '{filename}'".format(filename=filename)) +X +X self.data = json.load(handle) +X self.type = self.data["type"] +X handle.close() +X if self.keep: +X self.__moveFile(filename, self.configCache + "/processed") +X else: +X logging.debug("Processed file deleted: %s and not kept in /processed", filename) +X os.remove(filename) +X updateDataBag(self) +X +X def setFile(self, name): +X self.fileName = name +X +X def getType(self): +X return self.type +X +X def getData(self): +X return self.data +X +X def setPath(self, path): +X self.configCache = path +X +X def __moveFile(self, origPath, path): +X if not os.path.exists(path): +X os.makedirs(path) +X originalName = os.path.basename(origPath) +X if originalName.count(".") == 1: +X originalName += "." + str(uuid.uuid4()) +X zipped_file_name = path + "/" + originalName + ".gz" +X with open(origPath, 'rb') as f_in, gzip.open(zipped_file_name, 'wb') as f_out: +X shutil.copyfileobj(f_in, f_out) +X os.remove(origPath) +X +X logging.debug("Processed file written to %s", zipped_file_name) +X +X +class PrivateGatewayHack: +X +X @classmethod +X def update_network_type_for_privategateway(cls, dbag, data): +X ip = data['router_guest_ip'] if 'router_guest_ip' in data.keys() else data['public_ip'] +X +X initial_data = cls.load_inital_data() +X has_private_gw_ip = cls.if_config_has_privategateway(initial_data) +X private_gw_matches = 'privategateway' in initial_data['config'] and cls.ip_matches_private_gateway_ip(ip, initial_data['config']['privategateway']) +X +X if has_private_gw_ip and private_gw_matches: +X data['nw_type'] = "public" +X logging.debug("Updating nw_type for ip %s" % ip) +X else: +X logging.debug("Not updating nw_type for ip %s because has_private_gw_ip = %s and private_gw_matches = %s " % (ip, has_private_gw_ip, private_gw_matches)) +X return data +X +X @classmethod +X def if_config_has_privategateway(cls, dbag): +X return 'privategateway' in dbag['config'].keys() and dbag['config']['privategateway'] != "None" +X +X @classmethod +X def ip_matches_private_gateway_ip(cls, ip, private_gateway_ip): +X new_ip_matches_private_gateway_ip = False +X if ip == private_gateway_ip: +X new_ip_matches_private_gateway_ip = True +X return new_ip_matches_private_gateway_ip +X +X @classmethod +X def load_inital_data(cls): +X initial_data_bag = DataBag() +X initial_data_bag.setKey('cmdline') +X initial_data_bag.load() +X initial_data = initial_data_bag.getDataBag() +X logging.debug("Initial data = %s" % initial_data) +X +X return initial_data +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/merge.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/merge.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/merge.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/merge.py': 'MD5 check failed' + ) << \SHAR_EOF +dc7c85d58b4e5f38ae61c82679523884 cloud_scripts/opt/cloud/bin/merge.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/merge.py'` -ne 13492 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/merge.py' is not 13492" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/master.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/master.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/master.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/master.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/master.py +M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2!&875L="(I"BAO<'1I +M;VYS+"!A/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/master.py': 'MD5 check failed' + ) << \SHAR_EOF +602ac6725c182da5ffa17760b2fe3ba5 cloud_scripts/opt/cloud/bin/master.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/master.py'` -ne 2040 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/master.py' is not 2040" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/set_redundant.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/set_redundant.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/set_redundant.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/set_redundant.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/set_redundant.py +M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/set_redundant.py': 'MD5 check failed' + ) << \SHAR_EOF +648b240f11d938ebd185d0e2a75004b8 cloud_scripts/opt/cloud/bin/set_redundant.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/set_redundant.py'` -ne 1663 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/set_redundant.py' is not 1663" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/checks2svpn.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checks2svpn.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/checks2svpn.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +if [ -z $1 ] +then +X echo "Fail to find VPN peer address!" +X exit 1 +fi +X +ipsec status vpn-$1 > /tmp/vpn-$1.status +X +cat /tmp/vpn-$1.status | grep "ESTABLISHED" > /dev/null +ipsecok=$? +if [ $ipsecok -ne 0 ] +then +X echo -n "IPsec SA not found;" +X echo "Site-to-site VPN have not connected" +X exit 11 +fi +echo -n "IPsec SA found;" +echo "Site-to-site VPN have connected" +Xexit 0 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/checks2svpn.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checks2svpn.sh': 'MD5 check failed' + ) << \SHAR_EOF +8aed94140f491ae027b3b55e9b1535bb cloud_scripts/opt/cloud/bin/checks2svpn.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checks2svpn.sh'` -ne 1178 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' is not 1178" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, vpn): +X key = vpn['vpn_server_ip'] +X op = vpn['create'] +X if key in dbag.keys() and not op: +X del(dbag[key]) +X else: +X dbag[key] = vpn +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py': 'MD5 check failed' + ) << \SHAR_EOF +9945565c7eb92c9fd9aa85648f8c4352 cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py'` -ne 994 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' is not 994" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_staticroutes.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_staticroutes.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_staticroutes.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, staticroutes): +X for route in staticroutes['routes']: +X key = route['network'] +X dbag[key] = route +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_staticroutes.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py': 'MD5 check failed' + ) << \SHAR_EOF +c89832deefffed1dcc12b367d9f9062e cloud_scripts/opt/cloud/bin/cs_staticroutes.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py'` -ne 952 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' is not 952" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, vpn): +X key = vpn['peer_gateway_ip'] +X op = vpn['create'] +X if key in dbag.keys() and not op: +X del(dbag[key]) +X else: +X dbag[key] = vpn +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py': 'MD5 check failed' + ) << \SHAR_EOF +37138a9d2b00c0cd0488f03f0b1e1c34 cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py'` -ne 996 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' is not 996" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/passwd_server_ip.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/passwd_server_ip.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/passwd_server_ip.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/passwd_server_ip.py +M(R$O=7-R+V)I;B]E;G8@<'ET:&]N"B,@3&EC96YS960@=&\@=&AE($%P86-H +M92!3;V9T=V%R92!&;W5N9&%T:6]N("A!4T8I('5N9&5R(&]N90HC(&]R(&UO +M2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N5]P87-S=V]R9"<@/')O=71E$EN(",L +M($9O2AO3H*("`@("`@("!W:71H(&9I;&4H9V5T4&%S +M&-E<'0@24]%3H* +M("`@("`@("`@("`@=VET:"!F:6QE*&=E=%!A&-E +M<'0@24]%"<*("`@(&1E9B!D;U]'150H5]P87-S=V]R9"7!E(#T]("=S879E9%]P87-S=V]R9"7-L;VR=215%515-47TU%5$A/1"7!E)UTL"B`@("`@("`@("`@("`@ +M("`@("`@?2D*("`@("`@("!S96QF+G-E;F1?7-L;V6EN9R!T;R!S879E('!A7-L;V6EN9R!T;R!S879E('!A7-L +M;V7-L;V7-L;V7,N87)G=BD@/B`Q +M.@H@("`@("`@(&%D9')E7-L +M;V6)O87)D26YT97)R +M=7!T.@H@("`@("`@('-Y7-L;V&-E<'0@17AC97!T:6]N+"!E.@H@("`@("`@('-Y7-L;V&-E<'1I;VX@)7,@+2T@ +M9&EE9"<@)2!E*0H@("`@("`@('!A/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py': 'MD5 check failed' + ) << \SHAR_EOF +1d63c1d8b2e5a6a48d48d76228964aee cloud_scripts/opt/cloud/bin/passwd_server_ip.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py'` -ne 7020 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py' is not 7020" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_network_acl.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_network_acl.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_network_acl.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_network_acl.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_network_acl.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_network_acl.py': 'MD5 check failed' + ) << \SHAR_EOF +79760ec4739cb68a9a8bf86319a2dd65 cloud_scripts/opt/cloud/bin/cs_network_acl.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_network_acl.py'` -ne 881 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_network_acl.py' is not 881" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cleanup.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cleanup.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cleanup.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cleanup.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cleanup.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +#rm -rf $@ && echo $? +X +zip_file=$1 +if [ -e "$zip_file" ]; +then +X rm -rf "$zip_file" +X echo "Deleting diagnostics zip file $zip_file" +else +X echo "File $zip_file not found in vm " +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cleanup.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cleanup.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cleanup.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cleanup.sh': 'MD5 check failed' + ) << \SHAR_EOF +63ca1758ffda6344d2622a21f5fc15b9 cloud_scripts/opt/cloud/bin/cleanup.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cleanup.sh'` -ne 986 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cleanup.sh' is not 986" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_loadbalancer.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_loadbalancer.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_loadbalancer.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import copy +X +X +def merge(dbag, data): +X """ Simply overwrite the existsing bag as, the whole configuration is sent every time """ +X if "rules" not in data: +X return dbag +X dbag['config'] = data['rules'] +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_loadbalancer.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py': 'MD5 check failed' + ) << \SHAR_EOF +667380d51eaa9aade2317d66a11529aa cloud_scripts/opt/cloud/bin/cs_loadbalancer.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py'` -ne 1016 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' is not 1016" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpc_func.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_func.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_func.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_func.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_func.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# @VERSION@ +X +getEthByIp (){ +X local ip=$1 +X for dev in `ls -1 /sys/class/net | grep eth` +X do +X sudo ip addr show dev $dev | grep $ip\/ > /dev/null +X if [ $? -eq 0 ] +X then +X echo $dev +X return 0 +X fi +X done +X return 1 +} +X +getVPCcidr () { +X CMDLINE=$(cat /var/cache/cloud/cmdline) +X for i in $CMDLINE +X do +X # search for foo=bar pattern and cut out foo +X KEY=$(echo $i | cut -d= -f1) +X VALUE=$(echo $i | cut -d= -f2) +X if [ "$KEY" == "vpccidr" ] +X then +X echo "$VALUE" +X return 0 +X fi +X done +X return 1 +} +X +removeRulesForIp() { +X local ip=$1 +X iptables-save -t mangle | grep $ip | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t mangle $rule +X done +X iptables-save -t nat | grep $ip | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t nat $rule +X done +X iptables-save -t filter | grep $ip | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t filter $rule +X done +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_func.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_func.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_func.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_func.sh': 'MD5 check failed' + ) << \SHAR_EOF +bc1b0432818cc40ea79df6720e16ecad cloud_scripts/opt/cloud/bin/vpc_func.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_func.sh'` -ne 1849 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_func.sh' is not 1849" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsDhcp.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsDhcp.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N'0B"D1(0U!?3U!44R`]("(O971C+V1H8W!O<'1S +M+G1X="(*0TQ/541?0T].1B`]("(O971C+V1N"`](#`*("`@("`@("!L:7-T96Y?861D0H@("`@("`@("`@("!G871E=V%Y(#T@ +M)R<*("`@("`@("`@("`@:68@2`](&E;)V=A=&5W +M87DG70H@("`@("`@("`@("!S;&EN92`](")D:&-P+7)A;F=E/7-E=#II;G1E +M"P@9V%T97=A>2D*("`@("`@("`@("`@96QS93H*("`@ +M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UR86YG93US970Z:6YT97)F86-E +M+25S+25S+"5S+'-T871I8R(@)2`H9&5V:6-E+"!I9'@L(&EP*0H@("`@("`@ +M("`@("!S96QF+F-O;F8N"D*("`@("`@("`@("`@;&EN92`](")D:&-P+6]P +M=&EO;CUT86"P@9VXN9V5T7V1O;6%I;B@I*0H@("`@("`@("`@("!S96QF+F-O;F8N"!F;W(@>"!I;B!G;BYG971?9&YS*"D@:68@>%T*("`@ +M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C +M92TE"P@)RPG+FIO:6XH9&YS7VQI +M2`A/2`G,"XP+C`N,""D*("`@("`@("`@("`@("`@ +M(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C92TE"P@9V%T97=A>2D*("`@("`@("`@("`@("`@('-E +M;&8N8V]N9BYS96%R8V@H"P@;F5T;6%S:RD*("`@("`@("`@("`@"`K/2`Q"@H@("`@("`@(",@ +M3&ES=&5N($%D9')E3H*("`@ +M("`@("`@("`@;&]G9VEN9RYI;F9O*")!='1E;7!T:6YG('1O(&1E;&5T92!E +M;G1R:65S(&9R;VT@9&YS;6%S<2YL96%S97,@9FEL92!F;W(@5DUS('=H:6-H +M(&%R92!N;W0@;VX@9&AC<&AOW!R:6YT("0S?22DZ"B`@("`@("`@5LG:7!V-%]A +M9&1R97-S)UTL(&5N=')Y6R=H;W-T7VYA;64G72D*("`@("`@("`C($QE87-E +M('1I;64@'!U;F=E9"P@:71S(&%C=&EV +M92!L96%S92!A;F0@1$A#4"]$3E,@8V]N9FEG(&ES('!R;W!E2!I2!R=6YN:6YG(&EN('!R;V1U8W1I;VYS +M('-Y5LG:7!V-%]A9&1R +M97-S)UTL"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@ +M("`@("`@("`@("`@("!E;G1R>5LG:&]S=%]N86UE)UTL"B`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!L96%S +M92DI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L)7,B("4@ +M*'1A9RP@,RDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L +M)7,B("4@*'1A9RP@-BDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D +M9"@B)7,L)7,B("4@*'1A9RP@,34I*0H*("`@("`@("!I(#T@25!!9&1R97-S +M*&5N=')Y6R=I<'8T7V%D9')E2==(#T@96YT2=="@H@("`@9&5F(&%D9%]H;W-T*'-E;&8L(&EP+"!H;W-T +M/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py': 'MD5 check failed' + ) << \SHAR_EOF +bcf1831b38d86bf041523540fa8f821e cloud_scripts/opt/cloud/bin/cs/CsDhcp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py'` -ne 8809 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' is not 8809" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsRedundant.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsRedundant.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N7,N2`](%1R=64*"B`@ +M("`@("`@:68@;F]T(&ES1&5V:6-E4F5A9'DZ"B`@("`@("`@("`@(&QO9V=I +M;F5]I9E]N965D960H"B`@("`@("`@("`@("(E&5C("1$045-3TX@+2T@+2UVR(L(")](BP@6PH@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("`@("(@("`@("`@(&%U=&A?='EP92!!2"!< +M;B(L("(@("`@("`@(&%U=&A?<&%S2AC;VYN=')A8VMD7W1E;7!L871E7V-O;F8L(&-O;FYT0H@("`@("`@("(B(@H@("`@("`@(&ET97)A=&EO;G,@ +M/2`Q,`H@("`@("`@('1I;65?8F5T=V5E;B`](#$*"B`@("`@("`@9F]R(&ET +M97(@:6X@3H* +M("`@("`@("`@("`@("`@(',@/2!S;V-K970N2!R=6YN:6YG("@E9#HE2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I<"@I*2YS=&]P*"D* +M"B`@("`@("`@0W-(96QP97(N2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@ +M("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")!9&1I;F<@9V%T97=A>2`]/3X@ +M)7,@=&\@9&5V:6-E(#T]/B`E2P@9&5V*2D*("`@("`@ +M("`@("`@("`@("`@("!I9B!D978@/3T@0W-(96QP97(N4%5"3$E#7TE.5$52 +M1D%#15-;&5C +M=71E*"(E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I +M<"@I*2YR97-T87)T*"D*"B`@("`@("`@0W-(96QP97(N2D*"B`@("`@("`@("`@(",@5&AE(&9I +M2!I;G1E2!V'1E2!E=F5R(&)E(&]N92!A9&1R97-S(&EN +M(&$@5E!#('1H97)E(&-A;B!B92!M86YY"B`@("`@("`@5&AE(&YE=R!C;V1E +M(&%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py': 'MD5 check failed' + ) << \SHAR_EOF +6936e38f53736f7c5a04b255800a242d cloud_scripts/opt/cloud/bin/cs/CsRedundant.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py'` -ne 16789 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' is not 16789" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsHelper.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsHelper.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsHelper.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsHelper.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B +M971H,2)]"@I35$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S +M:"`M8R`@)VEF(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@ +M96QS92!E8VAO(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@ +M(")V<&-R;W5T97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@ +M6R`D,"`]/2!<(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ +M"B`@("`@("`@("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@ +M("`@("`@(&-M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@ +M("`@("`@;&]G9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S +M(B`E('-T871E7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X +M96-U=&4H7!E*"E=(&%N9"!S +M=&%T92`]/2`B34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE +M8W5T92AC;60I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ +M("`@("`@(&5X96-U=&4H8VUD*0H*"F1E9B!I&5C=71E +M*")M;W5N="!T;7!F6XH=F%L*3H*("`@(&EF('9A;#H* +M("`@("`@("!R971U&5C=71E*")I<"!A9&1R('-H;W<@ +M?&=R97`@+78@WT*("`@("`@("`@("`@ +M=&];)VEP)UT@/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A +M;'-;+3%="B`@("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@ +M("(B(@H@("`@9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G +M*")3879I;F<@:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C +M=71E*")S>7-T96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I +M;F7-T96UC=&P@&5C=71E*")K:6QL +M("U(55`@)7,B("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D +M;G-M87-Q(BP@(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py': 'MD5 check failed' + ) << \SHAR_EOF +9bdd1fdfea8177d3e408b2cc87e5d503 cloud_scripts/opt/cloud/bin/cs/CsHelper.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py'` -ne 7644 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' is not 7644" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5NWT*("`@("`@("!S96QF+F=U97-T(#T@5')U90H@("`@("`@ +M(&1B(#T@1&%T84)A9R@I"B`@("`@("`@9&(N7,H*2!A;F0@;&5N*&1B86=;9&5V:6-E +M72D@(3T@,#H*("`@("`@("`@("`@2==*0H*("`@ +M("`@("!I9B`G9&YS)R!I;B!S96QF+F1A=&$Z"B`@("`@("`@("`@(&1N'1E;F0H&-E<'1I;VXN"B`@("`@("`@:68@)W)O +M=71E"!I="!P2X@22!J=7-T(&%D +M9&5D('1H92!I9BP@87,@26%N(&1I9"!I;B!S;VUE(&]T:&5R(&9I;&5S+"!T +M;R!A=F]I9"!T:&4@97AC97!T:6]N+@H@("`@("`@(&EF("=R;W5T97)?9W5E +M2<@:6X@2=="B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py': 'MD5 check failed' + ) << \SHAR_EOF +98c84f4067412f263891f8293f185243 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py'` -ne 2545 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' is not 2545" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsMonitor.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N"!I;B!S96QF+F1B86=;)V-O;F9I9R==+G-P;&ET*"WT*("`@("`@("!H8U]D871A6R)H96%L=&A?8VAE8VMS7V)A&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!S96QF+F1B +M86&-L=61E9%]H96%L=&A?8VAE8VMS(ET@/2!;70H* +M("`@("`@("!I9B`B:&5A;'1H7V-H96-K/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py': 'MD5 check failed' + ) << \SHAR_EOF +d8f5dcf496dbc6d8508e40b906f48245 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py'` -ne 3681 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' is not 3681" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@ +M("`@("!S96QF+FQA2!E>&ES=',Z(')U;&4] +M)7,@=&%B;&4])7,@8VAA:6X])7,B+"!N97=?2`](&-P>2YR97!L86-E*"(M02`E&5C=71E,B@B:7!T86)L97,@+70@)7,@ +M)7,B("4@*&YE=U]R=6QE+F=E=%]T86)L92@I+"!C<'DI*0H@("`@("`@("`@ +M("`@("`@(R!4:&5R92!A"!I;B!T:&4@ +M9G)A;65W;W)K+@H@("`@("`@("`@("`@("`@:68@&5C=71E*")I<'1A8FQE7!E(#T@0W-#;61,:6YE*")C;61L:6YE(BDN9V5T7W1Y<&4H*0H* +M("`@("`@("!T7!E*3H*("`@("`@("`@("`@("`@(&EF(&DNFEP*&)I='-;,#HZ,ETL(&)I='-;,3HZ,ETI*0H@("`@("`@(&EF +M("(M02(@:6X@2!C;W)R96-T(&EP=&%B;&5S(&-O;6UA +M;F0@(B(B"B`@("`@("`@(R!/7,H*3H*("`@("`@("`@("`@("`@('!R:6YT86)L92`] +M(&LN=7)N($9A;'-E"B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py': 'MD5 check failed' + ) << \SHAR_EOF +7456b53eba9f115f9ad344bc1c01611d cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py'` -ne 11100 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' is not 11100" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsRoute.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRoute.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRoute.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import CsHelper +import logging +X +X +class CsRoute: +X +X """ Manage routes """ +X +X def __init__(self): +X self.table_prefix = "Table_" +X +X def get_tablename(self, name): +X return self.table_prefix + name +X +X def add_table(self, devicename): +X tablenumber = 100 + int(devicename[3:]) +X tablename = self.get_tablename(devicename) +X str = "%s %s" % (tablenumber, tablename) +X filename = "/etc/iproute2/rt_tables" +X logging.info("Adding route table: " + str + " to " + filename + " if not present ") +X if not CsHelper.definedinfile(filename, str): +X CsHelper.execute("sudo echo " + str + " >> /etc/iproute2/rt_tables") +X # remove "from all table tablename" if exists, else it will interfer with +X # routing of unintended traffic +X if self.findRule("from all lookup " + tablename): +X CsHelper.execute("sudo ip rule delete from all table " + tablename) +X +X def flush_table(self, tablename): +X CsHelper.execute("ip route flush table %s" % (tablename)) +X CsHelper.execute("ip route flush cache") +X +X def add_route(self, dev, address): +X """ Wrapper method that adds table name and device to route statement """ +X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 +X table = self.get_tablename(dev) +X +X if not table or not address: +X empty_param = "table" if not table else "address" +X logging.info("Empty parameter received %s while trying to add route, skipping" % empty_param) +X else: +X logging.info("Adding route: dev " + dev + " table: " + +X table + " network: " + address + " if not present") +X cmd = "default via %s table %s proto static" % (address, table) +X self.set_route(cmd) +X +X def add_network_route(self, dev, address): +X """ Wrapper method that adds table name and device to route statement """ +X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 +X table = self.get_tablename(dev) +X +X if not table or not address: +X empty_param = "table" if not table else "address" +X logging.info("Empty parameter received %s while trying to add network route, skipping" % empty_param) +X else: +X logging.info("Adding route: dev " + dev + " table: " + +X table + " network: " + address + " if not present") +X cmd = "throw %s table %s proto static" % (address, table) +X self.set_route(cmd) +X +X def set_route(self, cmd, method="add"): +X """ Add a route if it is not already defined """ +X found = False +X search = cmd +X if "throw" in search: +X search = search.replace("throw", "") +X for i in CsHelper.execute("ip route show " + search): +X found = True +X if not found and method == "add": +X logging.info("Add " + cmd) +X cmd = "ip route add " + cmd +X elif found and method == "delete": +X logging.info("Delete " + cmd) +X cmd = "ip route delete " + cmd +X else: +X return +X CsHelper.execute(cmd) +X +X def add_defaultroute(self, gateway): +X """ Add a default route +X :param str gateway +X :return: bool +X """ +X if not gateway: +X raise Exception("Gateway cannot be None.") +X +X if self.defaultroute_exists(): +X return False +X else: +X cmd = "default via " + gateway +X logging.info("Adding default route") +X self.set_route(cmd) +X return True +X +X def defaultroute_exists(self): +X """ Return True if a default route is present +X :return: bool +X """ +X logging.info("Checking if default ipv4 route is present") +X route_found = CsHelper.execute("ip -4 route list 0/0") +X +X if len(route_found) > 0: +X logging.info("Default route found: " + route_found[0]) +X return True +X else: +X logging.warn("No default route found!") +X return False +X +X def findRule(self, rule): +X for i in CsHelper.execute("ip rule show"): +X if rule in i.strip(): +X return True +X return False +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRoute.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py': 'MD5 check failed' + ) << \SHAR_EOF +4f2109aa1d89157e14817f90c676c2d3 cloud_scripts/opt/cloud/bin/cs/CsRoute.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py'` -ne 4989 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' is not 4989" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py +M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2==*0H@("`@("`@("`@ +M("!#&5C=71E*&-O;6UA;F0I"B`@("`@("`@96QS93H*("`@ +M("`@("`@("`@8V]M;6%N9"`](")I<"!R;W5T92!S:&]W('P@9W)E<"`EW!R:6YT("0Q+"`D,WTG(B`E(')O=71E6R=N971W;W)K)UT*("`@ +M("`@("`@("`@2==*0H@("`@("`@("`@("`@ +C("`@0W-(96QP97(N97AE8W5T92AR;W5T95]C;VUM86YD*0H@ +` +end +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py': 'MD5 check failed' + ) << \SHAR_EOF +f9f9db3a4543397153d69a62551a6c8c cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py'` -ne 1655 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' is not 1655" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N7,H*3H* +M("`@("`@("`@("`@"YS<&QI="@G7&XG*5T*"B`@("`@("`@9FEL +M93$N8V]M;6ET*"D*("`@("`@("!F:6QE,B`]($-S1FEL92A(05!23UA97T-/ +M3D9?4"D*("`@("`@("!I9B!N;W0@9FEL93(N8V]M<&%R92AF:6QE,2DZ"B`@ +M("`@("`@("`@($-S2&5L<&5R+F-O<'DH2$%04D]865]#3TY&7U0L($A!4%)/ +M6%E?0T].1E]0*0H*("`@("`@("`@("`@<')O8R`]($-S4')O8V5S2YP:60G72D*("`@("`@("`@("`@:68@;F]T('!R;V,N9FEN +M9"@I.@H@("`@("`@("`@("`@("`@;&]G9VEN9RYD96)U9R@B0W-,;V%D0F%L +M86YC97(Z.B!W:6QL(')E2$B*0H@("`@("`@("`@("`@ +M("`@0W-(96QP97(N2(L(")R97-T87)T(BD*("`@ +M("`@("`@("`@96QS93H*("`@("`@("`@("`@("`@(&QO9V=I;F2$B*0H@("`@ +M("`@("`@("`@("`@0W-(96QP97(N2(L(")R96QO +M860B*0H*("`@("`@("!A9&1?/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py': 'MD5 check failed' + ) << \SHAR_EOF +8f93571ff9b8f21c947e90193c3efa38 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py'` -ne 3393 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' is not 3393" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsApp.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsApp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsApp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsApp.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G +M871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG971?='EP92@I"B`@ +M("`@("`@5]I9E]N965D +M960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L"B`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE,B]S:71E2DI"B`@("`@("`@ +M("`@(&9I;&4N&5C=71E,B@B/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsApp.py': 'MD5 check failed' + ) << \SHAR_EOF +fa071a9d58a918b6a9d5e09ae10e3e11 cloud_scripts/opt/cloud/bin/cs/CsApp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsApp.py'` -ne 4159 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' is not 4159" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsFile.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsFile.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsFile.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import logging +import re +import copy +X +X +class CsFile: +X """ File editors """ +X +X def __init__(self, filename): +X self.filename = filename +X self.load() +X +X def load(self): +X self.new_config = [] +X self.config = [] +X try: +X for line in open(self.filename): +X self.new_config.append(line) +X except IOError: +X logging.debug("File %s does not exist" % self.filename) +X else: +X logging.debug("Reading file %s" % self.filename) +X self.config = list(self.new_config) +X +X def is_changed(self): +X if set(self.config) != set(self.new_config): +X return True +X else: +X return False +X +X def __len__(self): +X return len(self.config) +X +X def empty(self): +X self.config = [] +X self.new_config = [] +X +X def repopulate(self): +X self.new_config = [] +X +X def commit(self): +X if not self.is_changed(): +X logging.info("Nothing to commit. The %s file did not change" % self.filename) +X return False +X handle = open(self.filename, "w+") +X for line in self.new_config: +X handle.write(line) +X handle.close() +X logging.info("Wrote edited file %s" % self.filename) +X self.config = list(self.new_config) +X logging.info("Updated file in-cache configuration") +X return True +X +X def dump(self): +X for line in self.new_config: +X print line +X +X def addeq(self, string): +X """ Update a line in a file of the form token=something +X match on token= and replace something if needed +X Add line if token is not present +X """ +X token = string.split('=')[0] + '=' +X self.search(token, string) +X +X def append(self, string, where=-1): +X if where == -1: +X self.new_config.append("%s\n" % string) +X else: +X self.new_config.insert(where, "%s\n" % string) +X +X def add(self, string, where=-1): +X for index, line in enumerate(self.new_config): +X if line.strip() == string: +X return False +X if where == -1: +X self.new_config.append("%s\n" % string) +X else: +X self.new_config.insert(where, "%s\n" % string) +X return True +X +X def section(self, start, end, content): +X sind = -1 +X eind = -1 +X found = False +X for index, line in enumerate(self.new_config): +X if found and line.strip() == end: +X eind = index +X found = False +X if line.strip() == start: +X sind = index + 1 +X found = True +X if sind == -1: +X content.insert(0, start + "\n") +X content.append(end + "\n") +X self.new_config[sind:eind] = content +X +X def greplace(self, search, replace): +X logging.debug("Searching for %s and replacing with %s" % (search, replace)) +X self.new_config = [w.replace(search, replace) for w in self.new_config] +X +X def replaceIfFound(self, search, replace): +X found = False +X replace_filtered = replace +X if re.search("PSK \"", replace): +X replace_filtered = re.sub(r'".*"', '"****"', replace) +X logging.debug("Searching for %s and replacing with %s if found" % (search, replace_filtered)) +X for index, line in enumerate(self.new_config): +X if line.lstrip().startswith("#"): +X continue +X if re.search(search, line): +X if replace not in line: +X self.new_config[index] = replace + "\n" +X return False +X +X def search(self, search, replace): +X found = False +X replace_filtered = replace +X if re.search("PSK \"", replace): +X replace_filtered = re.sub(r'".*"', '"****"', replace) +X logging.debug("Searching for %s and replacing with %s" % (search, replace_filtered)) +X for index, line in enumerate(self.new_config): +X if line.lstrip().startswith("#"): +X continue +X if re.search(search, line): +X found = True +X if replace not in line: +X self.new_config[index] = replace + "\n" +X if not found: +X self.new_config.append(replace + "\n") +X return True +X return False +X +X def searchString(self, search, ignoreLinesStartWith): +X found = False +X logging.debug("Searching for %s string " % search) +X +X for index, line in enumerate(self.new_config): +X print ' line = ' + line +X if line.lstrip().startswith(ignoreLinesStartWith): +X continue +X if search in line: +X found = True +X break +X +X return found +X +X def deleteLine(self, search): +X found = False +X logging.debug("Searching for %s to remove the line " % search) +X temp_config = [] +X for index, line in enumerate(self.new_config): +X if line.lstrip().startswith("#"): +X continue +X if search not in line: +X temp_config.append(line) +X +X self.new_config = list(temp_config) +X +X def compare(self, o): +X result = (isinstance(o, self.__class__) and set(self.config) == set(o.config)) +X logging.debug("Comparison of CsFiles content is ==> %s" % result) +X return result +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsFile.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsFile.py': 'MD5 check failed' + ) << \SHAR_EOF +81531ddee205a5eb66bb44f400ab222c cloud_scripts/opt/cloud/bin/cs/CsFile.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsFile.py'` -ne 6133 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' is not 6133" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/__init__.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/__init__.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/__init__.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/__init__.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/__init__.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/__init__.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/__init__.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/__init__.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/__init__.py': 'MD5 check failed' + ) << \SHAR_EOF +33215d440d5ba5fa95b1ffa035d769e2 cloud_scripts/opt/cloud/bin/cs/__init__.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/__init__.py'` -ne 785 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/__init__.py' is not 785" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsAddress.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsAddress.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsAddress.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsAddress.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N`H@("`@("`@("`@("`@("`@("`@ +M(&=U97-T7VEN=&5R9F%C92`](&EN=&5R9F%C90H@("`@("`@("`@("`@("`@ +M("`@(&QO9V=I;F2!C;VYF:6=U2AS96QF*3H*("`@("`@("!I +M9B!S96QF+F-O;F9I9RYI2(I +M"B`@("`@("`@96QS93H*("`@("`@("`@("`@2@I+"!S96QF+F=E=%]S +M:7IE*"DI"@H@("`@9&5F(&=E=%]S:7IE*'-E;&8I.@H@("`@("`@("(B(B!2 +M971U7!E +M(B!I;B!S96QF+F%D9')E"@Q,#`@*R!I;G0H9&5V6S,Z72DI +M"B`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@("`@97AC97!T($5X8V5P=&EO;B!A +M&-E<'1I;VX@ +M;V-C=7)R960@/3T^("5S(B`E(&4I"@H@("`@("`@("`@("!S96QF+G!O7!E*"D@:6X@6R)C;VYT7!E*"D@:6X@ +M6R=P=6)L:6,G73H*("`@("`@("`@("`@("`@('-E;&8N7!E*"E=.@H@("`@("`@ +M("`@("`@("`@9V%T97=A>2`]('-T2@I*3H* +M("`@("`@("`@("`@("`@(')O=71E+F%D9%]D969A=6QT2@I*0H*("`@(&1E9B!S971?;6%R:RAS96QF*3H*("`@ +M("`@("!C;60@/2`B+4$@4%)%4D]55$E.1R`M:2`E7!E(&]F('1H92!)4`H@("`@("`@(&=U97-T"B`@("`@("`@8V]N +M=')O;`H@("`@("`@('!U8FQI8PH@("`@("`@("(B(@H@("`@("`@(&EF(")N +M=U]T>7!E(B!I;B!S96QF+F%D9')E&9F9F9F9F9F +M("TM8W1M87-K(#!X9F9F9F9F9F8B72D*"B`@("`@("`@&UA7!E*"D@:6X@6R)G=65S=")=.@H@("`@("`@("`@("!G=65S +M=$YE='=O&9F9F9F9F9F(ETI"B`@ +M("`@("`@("`@(&=U97-T3F5T=V]R:T-I9'(@/2!S96QF+F%D9')E#4R-2\P>&9F9F9F9F9F(B`E +M("AS96QF+F1E=BP@2)=("$](").;VYE(CH* +M("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@("`@("`@:68@ +M(FYE='=O7!E*"D@:6X@6R)P=6)L:6,B +M72!A;F0@(F=A=&5W87DB(&EN('-E;&8N861D2)=("$] +M(").;VYE(CH*("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@ +M("`@("`@("`@(&9O7!E(B!I;B!A9&1R97-S(&%N9"!A +M9&1R97-S6R)N=U]T>7!E(ET@/3T@(F=U97-T(CH*("`@("`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("!R;W5T92YA9&1?;F5T=V]R:U]R;W5T92AS96QF +M+F1E=BP@&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A8VAE(BD*"B`@("`@("`@ +M96QI9B!M971H;V0@/3T@(F1E;&5T92(Z"B`@("`@("`@("`@(",@=')E870@ +M=&AE(&QA&5C=71E*")S=61O(&EP(')U;&4@9&5L971E('1A8FQE("(@*R!T86)L94YA +M;64I"B`@("`@("`@("`@("`@("!#&5C=71E*")S=61O(&EP +M(')O=71E(&9L=7-H('1A8FQE("(@*R!T86)L94YA;64I"B`@("`@("`@("`@ +M("`@("!#&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A +M8VAE(BD*("`@("`@("`@("`@("`@($-S4G5L92AS96QF+F1E=BDN9&5L36%R +M:R@I"@H@("`@("`@('-E;&8N9G=?7!E('=I;&P@ +M;F\@;&]N9V5R(&)E(&MN;W=N"B`@("`@("`@:68@7!E*"D@/3T@(G!U8FQI8R(@86YD('-E;&8N8V]N9FEG+FES7W9P8R@I +M(&%N9"!M971H;V0@/3T@(F%D9"(Z"B`@("`@("`@("`@(&EF('-E;&8N861D +M7,H*3H*("`@("`@("`@ +M("`@7!E)UT@:6X@5E)2 +M4%]465!%4SH*("`@("`@("`@("`@7!E(B!I;B!S96QF+F%D9')E&5C=71E,BAC;60L($9A +M;'-E*0H*("`@(",@1&5L971E(&%N>2!I<',@=&AA="!A7,H*2!O2AS96QF+"!B862!F;W(@ +M7,O8VQA"TP+W)P&-E<'0@24]%/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py': 'MD5 check failed' + ) << \SHAR_EOF +5cebbbd106abd3eba7ee0e4d23277dda cloud_scripts/opt/cloud/bin/cs/CsAddress.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py'` -ne 29236 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' is not 29236" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsProcess.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsProcess.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsProcess.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import os +import re +import CsHelper +import logging +X +X +class CsProcess(object): +X """ Manipulate processes """ +X +X def __init__(self, search): +X self.search = search +X +X def start(self, thru, background=''): +X # if(background): +X # cmd = cmd + " &" +X logging.info("Started %s", " ".join(self.search)) +X os.system("%s %s %s" % (thru, " ".join(self.search), background)) +X +X def kill_all(self): +X pids = self.find_pid() +X for p in pids: +X CsHelper.execute("kill -9 %s" % p) +X +X def find_pid(self): +X self.pid = [] +X for i in CsHelper.execute("ps aux"): +X items = len(self.search) +X proc = re.split(r"\s+", i)[items*-1:] +X matches = len([m for m in proc if m in self.search]) +X if matches == items: +X self.pid.append(re.split(r"\s+", i)[1]) +X +X logging.debug("CsProcess:: Searching for process ==> %s and found PIDs ==> %s", self.search, self.pid) +X return self.pid +X +X def find(self): +X has_pid = len(self.find_pid()) > 0 +X return has_pid +X +X def kill(self, pid): +X if pid > 1: +X CsHelper.execute("kill -9 %s" % pid) +X +X def grep(self, str): +X for i in CsHelper.execute("ps aux"): +X if i.find(str) != -1: +X return re.split(r"\s+", i)[1] +X return -1 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsProcess.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py': 'MD5 check failed' + ) << \SHAR_EOF +75a4650fe1e521049e80d32a022d8689 cloud_scripts/opt/cloud/bin/cs/CsProcess.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py'` -ne 2156 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' is not 2156" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsConfig.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsConfig.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsConfig.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsConfig.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N7!E*"D@/3T@)W9P8W)O=71E'1D;G,H'1D;G,G+"`G9F%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py': 'MD5 check failed' + ) << \SHAR_EOF +836541a5b9cb1b2f9df5dad6bb806745 cloud_scripts/opt/cloud/bin/cs/CsConfig.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py'` -ne 3179 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' is not 3179" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsDatabag.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@("`@ +M("!S96QF+F1B(#T@1&%T84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF +M+F1B+G-A=F4HWT*("`@("`@("!R971U&1I9V5S="@I"@H@("`@ +M9&5F(&=E=%]G871E=V%Y*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I +M;B!S96QF+FED871A*"DZ"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A +M*"E;)V=A=&5W87DG70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G +M971?=7-E7V5X=%]D;G,H'1D;G,G70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E +M9B!G971?861V97)T7VEN="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN +M="<@:6X@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py': 'MD5 check failed' + ) << \SHAR_EOF +9e4de6e0a115a5e806e80dc151769b21 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py'` -ne 4808 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' is not 4808" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsRule.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRule.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRule.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import CsHelper +import logging +X +X +class CsRule: +X """ Manage iprules +X Supported Types: +X fwmark +X """ +X +X def __init__(self, dev): +X self.dev = dev +X self.tableNo = 100 + int(dev[3:]) +X self.table = "Table_%s" % (dev) +X +X def addRule(self, rule): +X if not self.findRule(rule + " lookup " + self.table): +X cmd = "ip rule add " + rule + " table " + self.table +X CsHelper.execute(cmd) +X logging.info("Added rule %s for %s" % (cmd, self.table)) +X +X def findRule(self, rule): +X for i in CsHelper.execute("ip rule show"): +X if rule in i.strip(): +X return True +X return False +X +X def addMark(self): +X if not self.findMark(): +X cmd = "ip rule add fwmark %s table %s" % (self.tableNo, self.table) +X CsHelper.execute(cmd) +X logging.info("Added fwmark rule for %s" % (self.table)) +X +X def delMark(self): +X if self.findMark(): +X cmd = "ip rule delete fwmark %s table %s" % (self.tableNo, self.table) +X CsHelper.execute(cmd) +X logging.info("Deleting fwmark rule for %s" % (self.table)) +X +X def findMark(self): +X srch = "from all fwmark %s lookup %s" % (hex(self.tableNo), self.table) +X for i in CsHelper.execute("ip rule show"): +X if srch in i.strip(): +X return True +X return False +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRule.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRule.py': 'MD5 check failed' + ) << \SHAR_EOF +78748432f1ac57194339aef8bdb7c9f8 cloud_scripts/opt/cloud/bin/cs/CsRule.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRule.py'` -ne 2192 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' is not 2192" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vmdata.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vmdata.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vmdata.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vmdata.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/vmdata.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&ET*#(I +M"@H@("`@9F]R(&EP(&EN(&IS;VY?9&%T83H*("`@("`@("!F;W(@:71E;2!I +M;B!J2!V86QI9"!D +M871A"B`@("`@("`@("`@(&EF(&9O;&1E&ES=',H;65T +M86UA;FEF97-T*3H*("`@("`@("!O2Q!;&QO=UQN1&5N +M>2!F&-E<'0@3U-%2!E>&ES=',L('=E(&1O(&ET('1H:7,@=V%Y(&9O +M7,N97AI="@Q*0H*("`@(&9H(#T@;W!E;BAH +M=&%C8V5S2`K("=<;B&9L;V-K*&9I;&4I.@H@("`@=')Y.@H@("`@("`@(&9L;V-K +M*&9I;&4L($Q/0TM?15@I"B`@("!E>&-E<'0@24]%7,N97AI="@Q +M*0H@("`@3H*("`@("`@("!F;&]C:RAF:6QE+"!,3T-+7U5.*0H@("`@97AC97!T($E/ +M17)R;W(@87,@93H*("`@("`@("!P7,N97AI="@Q*0H@("`@7,N87)G=ELQ.ETI"FYA +` +end +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vmdata.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vmdata.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vmdata.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vmdata.py': 'MD5 check failed' + ) << \SHAR_EOF +f585277ddefb989a0662db609bc199c7 cloud_scripts/opt/cloud/bin/vmdata.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vmdata.py'` -ne 4723 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vmdata.py' is not 4723" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/get_diagnostics_files.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/get_diagnostics_files.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/get_diagnostics_files.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' && +#!/usr/bin/env python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import logging +import os +import re +import shlex +import subprocess as sp +import sys +import time +import zipfile +X +X +# Create zip archive and append files for retrieval +def zip_files(files): +X fList = files +X compression = zipfile.ZIP_DEFLATED +X time_str = time.strftime("%Y%m%d-%H%M%S") +X zf_name = '/root/diagnostics_files_' + time_str + '.zip' +X zf = zipfile.ZipFile(zf_name, 'w', compression) +X +X ''' +X Initialize 3 empty arrays to collect found files, non-existent files +X and last one to collect temp files to be cleaned up when script exits +X ''' +X files_found_list = [] +X files_not_found_list = [] +X files_from_shell_commands = [] +X +X try: +X for f in fList: +X f = f.strip() +X +X if f in ('iptables', 'ipaddr', 'iprule', 'iproute'): +X f = execute_shell_script(f) +X files_from_shell_commands.append(f) +X +X if len(f) > 3 and f.startswith('[') and f.endswith(']'): +X f = execute_shell_script(f[1:-1]) +X files_from_shell_commands.append(f) +X +X if os.path.isfile(f): +X try: +X zf.write(f, f[f.rfind('/') + 1:]) +X except OSError or RuntimeError as e: +X files_not_found_list.append(f) +X else: +X files_found_list.append(f) +X finally: +X cleanup(files_from_shell_commands) +X generate_retrieved_files_txt(zf, files_found_list, files_not_found_list) +X zf.close() +X print zf_name +X +X +def get_cmd(script): +X if script is None or len(script) == 0: +X return None +X +X cmd = None +X if script == 'iptables': +X cmd = 'iptables-save' +X elif script == 'ipaddr': +X cmd = 'ip address' +X elif script == 'iprule': +X cmd = 'ip rule list' +X elif script == 'iproute': +X cmd = 'ip route show table all' +X else: +X cmd = '/opt/cloud/bin/' + script +X if not os.path.isfile(cmd.split(' ')[0]): +X cmd = None +X +X return cmd +X +X +def execute_shell_script(script): +X script = script.strip() +X outputfile = script + '.log' +X +X with open(outputfile, 'wb', 0) as f: +X try: +X cmd = get_cmd(script) +X if cmd is None: +X f.write('Unable to generate command for ' + script + ', perhaps missing file') +X else: +X p = sp.Popen(cmd, shell=True, stdout=sp.PIPE, stderr=sp.PIPE) +X stdout, stderr = p.communicate() +X return_code = p.returncode +X if return_code is 0: +X f.write(stdout) +X else: +X f.write(stderr) +X except OSError as ex: +X delete_tmp_file_cmd = 'rm -f %s' % outputfile +X sp.check_call(shlex.split(delete_tmp_file_cmd)) +X finally: +X f.close() +X return outputfile +X +X +def cleanup(file_list): +X files = ' '.join(file_list) +X cmd = 'rm -f %s' % files +X try: +X p = sp.Popen(shlex.split(cmd), stderr=sp.PIPE, stdout=sp.PIPE) +X p.communicate() +X except OSError as e: +X logging.debug("Failed to execute bash command") +X +X +def generate_retrieved_files_txt(zip_file, files_found, files_not_found): +X output_file = 'fileinfo.txt' +X try: +X with open(output_file, 'wb', 0) as man: +X for i in files_found: +X man.write(i + '\n') +X for j in files_not_found: +X man.write(j + 'File Not Found!!\n') +X zip_file.write(output_file, output_file) +X finally: +X cleanup_cmd = "rm -f %s" % output_file +X sp.check_call(shlex.split(cleanup_cmd)) +X +X +if __name__ == '__main__': +X fileList = sys.argv[1:] +X zip_files(fileList) +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/get_diagnostics_files.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py': 'MD5 check failed' + ) << \SHAR_EOF +f8b91c14af848f14696aa2c1193b0907 cloud_scripts/opt/cloud/bin/get_diagnostics_files.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py'` -ne 4478 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' is not 4478" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/checkrouter.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checkrouter.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checkrouter.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/checkrouter.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checkrouter.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +STATUS=UNKNOWN +X +if [ "$(systemctl is-active keepalived)" != "active" ] +then +X echo "Status: FAULT" +X exit +fi +X +ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g') +if [ "$ROUTER_TYPE" = "router" ] +then +X ROUTER_STATE=$(ip addr show dev eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi') +X STATUS=$ROUTER_STATE +else +X ROUTER_STATE=$(ip addr show dev eth1 | grep state | awk '{print $9;}') +X if [ "$ROUTER_STATE" = "UP" ] +X then +X STATUS=MASTER +X elif [ "$ROUTER_STATE" = "DOWN" ] +X then +X STATUS=BACKUP +X fi +fi +X +echo "Status: ${STATUS}" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checkrouter.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/checkrouter.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/checkrouter.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checkrouter.sh': 'MD5 check failed' + ) << \SHAR_EOF +b107b37bc85a7036ef9f4e81cf4ae8b2 cloud_scripts/opt/cloud/bin/checkrouter.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checkrouter.sh'` -ne 1445 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checkrouter.sh' is not 1445" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/ilb.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ilb.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ilb.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/ilb.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/ilb.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s: -a -d -f -s \n" $(basename $0) >&2 +} +X +#set -x +X +fw_remove_backup() { +X logger -t cloud "$(basename $0): Entering fw_remove_backup" +X local lb_vif_list=eth0 +X for vif in $lb_vif_list; do +X sudo iptables -F back_load_balancer_$vif 2> /dev/null +X sudo iptables -D INPUT -i $vif -p tcp -j back_load_balancer_$vif 2> /dev/null +X sudo iptables -X back_load_balancer_$vif 2> /dev/null +X done +X sudo iptables -F back_lb_stats 2> /dev/null +X sudo iptables -D INPUT -p tcp -j back_lb_stats 2> /dev/null +X sudo iptables -X back_lb_stats 2> /dev/null +} +X +fw_restore() { +X logger -t cloud "$(basename $0): Entering fw_restore" +X local lb_vif_list="eth0" +X for vif in $lb_vif_list; do +X sudo iptables -F load_balancer_$vif 2> /dev/null +X sudo iptables -D INPUT -i $vif -p tcp -j load_balancer_$vif 2> /dev/null +X sudo iptables -X load_balancer_$vif 2> /dev/null +X sudo iptables -E back_load_balancer_$vif load_balancer_$vif 2> /dev/null +X done +X sudo iptables -F lb_stats 2> /dev/null +X sudo iptables -D INPUT -p tcp -j lb_stats 2> /dev/null +X sudo iptables -X lb_stats 2> /dev/null +X sudo iptables -E back_lb_stats lb_stats 2> /dev/null +} +X +# firewall entry to ensure that haproxy can receive on specified port +fw_entry() { +X logger -t cloud "$(basename $0): Entering fw_entry" +X local added=$1 +X local removed=$2 +X local stats=$3 +X +X if [ "$added" == "none" ] +X then +X added="" +X fi +X +X if [ "$removed" == "none" ] +X then +X removed="" +X fi +X +X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") +X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") +X +# back up the iptable rules by renaming before creating new. +X local lb_vif_list=eth0 +X for vif in $lb_vif_list; do +X sudo iptables -E load_balancer_$vif back_load_balancer_$vif 2> /dev/null +X sudo iptables -N load_balancer_$vif 2> /dev/null +X sudo iptables -A INPUT -i $vif -p tcp -j load_balancer_$vif +X done +X sudo iptables -E lb_stats back_lb_stats 2> /dev/null +X sudo iptables -N lb_stats 2> /dev/null +X sudo iptables -A INPUT -p tcp -j lb_stats +X +X for i in $a +X do +X local pubIp=$(echo $i | cut -d: -f1) +X local dport=$(echo $i | cut -d: -f2) +X local lb_vif_list="eth0" +X for vif in $lb_vif_list; do +X sudo iptables -A load_balancer_$vif -p tcp -d $pubIp --dport $dport -j ACCEPT +X if [ $? -gt 0 ] +X then +X return 1 +X fi +X done +X done +X local pubIp=$(echo $stats | cut -d: -f1) +X local dport=$(echo $stats | cut -d: -f2) +X local cidrs=$(echo $stats | cut -d: -f3 | sed 's/-/,/') +X sudo iptables -A lb_stats -s $cidrs -p tcp -m state --state NEW -d $pubIp --dport $dport -j ACCEPT +X +X return 0 +} +X +#Hot reconfigure HA Proxy in the routing domain +reconfig_lb() { +X logger -t cloud "Reconfiguring ilb using $1" +X /root/reconfigLB.sh $1 +X return $? +} +X +# Restore the HA Proxy to its previous state, and revert iptables rules on loadbalancer +restore_lb() { +X logger -t cloud "Restoring HA Proxy to previous state" +X # Copy the old version of haproxy.cfg into the file that reconfigLB.sh uses +X cp /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg.new +X +X if [ $? -eq 0 ] +X then +X # Run reconfigLB.sh again +X /root/reconfigLB.sh /etc/haproxy/haproxy.cfg.new +X fi +} +X +X +logger -t cloud "$(basename $0): Entering $(dirname $0)/$(basename $0)" +X +iflag= +aflag= +dflag= +fflag= +sflag= +X +while getopts 'i:a:d:f:s:' OPTION +do +X case $OPTION in +X i) iflag=1 +X domRIp="$OPTARG" #unused but passed in +X ;; +X a) aflag=1 +X addedIps="$OPTARG" +X ;; +X d) dflag=1 +X removedIps="$OPTARG" +X ;; +X f) fflag=1 +X cfgfile="$OPTARG" +X ;; +X s) sflag=1 +X statsIp="$OPTARG" +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [[ "$aflag$dflag" != "1" && "$aflag$dflag" != "11" ]] +then +X usage +X unlock_exit 2 $lock $locked +fi +X +if [ "$addedIps" == "" ] +then +X addedIps="none" +fi +X +X +if [ "$removedIps" == "" ] +then +X removedIps="none" +fi +X +X +# hot reconfigure haproxy +reconfig_lb $cfgfile +X +if [ $? -gt 0 ] +then +X logger -t cloud "Reconfiguring ilb failed" +X unlock_exit 1 $lock $locked +fi +X +logger -t cloud "HAProxy reconfigured successfully, configuring firewall" +X +# iptables entry to ensure that haproxy receives traffic +fw_entry $addedIps $removedIps $statsIp +X +if [ $? -gt 0 ] +then +X logger -t cloud "Failed to apply firewall rules for internal load balancing, reverting HA Proxy config" +X # Restore the LB +X restore_lb +X +X logger -t cloud "Reverting firewall config" +X fw_restore +X +X unlock_exit 1 $lock $locked +else +X # Remove backedup iptable rules +X logger -t cloud "Firewall configured successfully, deleting backup firewall config" +X fw_remove_backup +fi +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/ilb.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/ilb.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/ilb.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ilb.sh': 'MD5 check failed' + ) << \SHAR_EOF +8b7374975ee7d7a5d73da78b60bd508c cloud_scripts/opt/cloud/bin/ilb.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ilb.sh'` -ne 5644 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ilb.sh' is not 5644" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +for i in $* +do +X info=`/opt/cloud/bin/checks2svpn.sh $i` +X ret=$? +X batchInfo+="$i:$ret:$info&" +done +echo -n $batchInfo +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh': 'MD5 check failed' + ) << \SHAR_EOF +36a25911b669737ea678011f72a6f3f9 cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh'` -ne 924 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' is not 924" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/savepassword.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/savepassword.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/savepassword.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/savepassword.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/savepassword.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# Usage +# save_password -v -p +X +while getopts 'v:p:' OPTION +do +X case $OPTION in +X v) VM_IP="$OPTARG" +X ;; +X p) PASSWORD="$OPTARG" +X ;; +X ?) echo "Incorrect usage" +X ;; +X esac +done +TOKEN_FILE="/tmp/passwdsrvrtoken" +TOKEN="" +if [ -f $TOKEN_FILE ]; then +X TOKEN=$(cat $TOKEN_FILE) +fi +ps aux | grep passwd_server_ip.py |grep -v grep 2>&1 > /dev/null +if [ $? -eq 0 ] +then +X ips=$(ip addr show | grep inet | awk '{print $2}') +X for ip in $ips; do +X server_ip=$(echo $ip | awk -F'/' '{print $1}') +X curl --header "DomU_Request: save_password" "http://$server_ip:8080/" -F "ip=$VM_IP" -F "password=$PASSWORD" -F "token=$TOKEN" >/dev/null 2>/dev/null & +X done +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/savepassword.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/savepassword.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/savepassword.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/savepassword.sh': 'MD5 check failed' + ) << \SHAR_EOF +edebd2c25984e1ed00b36e4f8d360a63 cloud_scripts/opt/cloud/bin/savepassword.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/savepassword.sh'` -ne 1525 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/savepassword.sh' is not 1525" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cloud-nic.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cloud-nic.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cloud-nic.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +plug_nic() { +X sudo echo "$tableNo $tableName" >> /etc/iproute2/rt_tables 2>/dev/null +X sudo ip rule add fwmark $tableNo table $tableName 2>/dev/null +X sudo ip route flush table $tableName +X sudo ip route flush cache +} +X +X +unplug_nic() { +X sudo iptables -t mangle -D PREROUTING -i $dev -m state --state NEW -j CONNMARK --set-mark $tableNo 2>/dev/null +X +X sudo ip rule del fwmark $tableNo 2>/dev/null +X sudo ip route flush table $tableName +X sudo sed -i /"$tableNo $tableName"/d /etc/iproute2/rt_tables 2>/dev/null +X sudo ip route flush cache +X # remove network usage rules +X sudo iptables -F NETWORK_STATS_$dev 2>/dev/null +X iptables-save | grep NETWORK_STATS_$dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables $rule +X done +X sudo iptables -X NETWORK_STATS_$dev 2>/dev/null +X # remove vpn network usage rules +X sudo iptables -t mangle -F VPN_STATS_$dev 2>/dev/null +X iptables-save -t mangle | grep VPN_STATS_$dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t mangle $rule +X done +X sudo iptables -t mangle -X VPN_STATS_$dev 2>/dev/null +X # remove rules on this dev +X iptables-save -t mangle | grep $dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t mangle $rule +X done +X iptables-save -t nat | grep $dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t nat $rule +X done +X iptables-save | grep $dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables $rule +X done +X # remove apache config for this eth +X rm -f /etc/apache2/conf.d/vhost$dev.conf +} +X +action=$1 +dev=$2 +tableNo=$((100+${dev:3})) +tableName="Table_$dev" +X +if [ $action == 'add' ] +then +X plug_nic +else +X unplug_nic +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cloud-nic.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cloud-nic.sh': 'MD5 check failed' + ) << \SHAR_EOF +6afed00cefb1dc06b8b4969c2c26933e cloud_scripts/opt/cloud/bin/cloud-nic.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cloud-nic.sh'` -ne 2632 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' is not 2632" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/ipsectunnel.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ipsectunnel.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/ipsectunnel.sh (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/ipsectunnel.sh +M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N#4R-2(*=G!N:6YM87)K/2(P>#4R-"(*"G5S86=E*"D@ +M>PH@("`@<')I;G1F(")5PH@('-U9&\@:7!T86)L +M97,MPH@(&1I2!<"B`@("!P +M:&%S93(@<&]L:6-Y/21ER1R:6=H=&YE='-] +M(B`^/B`D=G!N8V]N9F9I;&4@)B8*("!S=61O(&5C:&\@(B`@='EP93UT=6YN +M96PB(#X^("1V<&YC;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!A=71H8GD] +MVEK96QI9F5T:6UE?7,B(#X^("1V<&YC +M;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!E2(@/CX@ +M)'9P;F-O;F9F:6QE("8F"B`@2!F +M;W(@'1H;W`](B1/4%1!4D&ET("1R970* +` +end +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/ipsectunnel.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh': 'MD5 check failed' + ) << \SHAR_EOF +097a970ec94a68d965ffd7f446e3862d cloud_scripts/opt/cloud/bin/ipsectunnel.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh'` -ne 8769 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' is not 8769" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/ipassoc.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ipassoc.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ipassoc.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/ipassoc.sh (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/ipassoc.sh +M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N"`D("1(96%D55),.B!S=FXZ+R]S=FXN;&%B+G9M;W!S+F-O;2]R97!O2!E>&ES=',B"GT* +M"F1E;%]F=U]C:&%I;E]F;W)?:7`@*"D@>PH@(&QO8V%L('!U8DEP/20H96-H +M;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?2W!R:6YT("0R?2W!R:6YT("0R?2W!R:6YT("0Q?2PH@(&QO +M8V%L(&1E=CTB)#$B"B`@;&]C86P@:7`](B0R(@H@('-U9&\@:7`@861DW!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP/20Q +M"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0Q?22!F;W(@:7`@)'!U8DEP(&]N(&EN=&5R9F%C92`D971H1&5V(@H@("`@ +M(')E='5R;B`Q"B`@9FD*"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0R?2<@('P@9W)E<"`M=R`D +M:7!.;TUAW!R +M:6YT("0R?2#TD*'!R:6YT9B`B)7A<;B(@)&YU;2D*("`@("`@("`@ +M(&5C:&\@)&AE>#L*("`@("`@("`@("-E;F%B;&4@`IS +M9FQA9STP"FQF;&%G/0IF9FQA9ST*8V9L86<]"FYF;&%G/0IO<#TB(@H*:7-? +M;6%S=&5R/3`*:7-?&ET(#(@)&QO8VL@)&QO8VME9`H)"3L["B`@ +M97-A8PID;VYE"@H*:68@6R`B)$%F;&%G)$1F;&%G(B`A/2`B,2(@70IT:&5N +M"B`@("!U&ET("0_("1L;V-K +M("1L;V-K960*9FD*"FEF(%L@(B1F9FQA9R(@/3T@(C$B(%T@)B8@6R`B)$1F +M;&%G(B`]/2`B,2(@70IT:&5N"B`@&ET("0_ +M("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1$9FQA9R(@/3T@(C$B(%T*=&AE +M;@H@(')E;6]V95]A;E]I<"`@)'!U8FQI8TEP("8F"B`@9&5L7V9W7V-H86EN +M7V9O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ipassoc.sh': 'MD5 check failed' + ) << \SHAR_EOF +ad068a0cc84ded8f79c63ce3aced4586 cloud_scripts/opt/cloud/bin/ipassoc.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ipassoc.sh'` -ne 13401 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ipassoc.sh' is not 13401" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/line_edit.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/line_edit.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/line_edit.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/line_edit.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/line_edit.py' && +#!/usr/bin/python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import logging +import re +import shutil +import os +X +X +class LineEdit(object): +X """Helper for LineEditingFile that keeps track of one edit.""" +X def __init__(self, search, sub, *sub_args, **kwargs): +X if len(sub_args) > 0: +X sub = sub % sub_args +X flags = kwargs.get('flags', 0) +X self.pattern = re.compile(search, flags=flags) +X self.sub = sub +X self.count = kwargs.get('count', 0) # max subs to make +X self.subs = 0 # subs made so far +X +X +class LineEditingFile(object): +X """ +X Atomic, conservative, by-line editing of configuration files. +X +X Will not touch the file if there are no changes to do. +X Reasonably efficient for large files, though files with a long time +X before their first match will use memory. +X +X +X Given a vhosts file such as: +X >>> with open('doctest-vhosts.conf', 'w') as f: +X ... f.write(''' +X ... Listen foo:80 +X ... +X ... DocRoot /var/www +X ... +X ... +X ... Listen other:80 +X ... +X ... DocRoot /var/www +X ... +X ... ''') +X ... +X +X To replace the hostname for the first virtualhost entry: +X >>> new_hostname = 'fooooo' +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... f.replace(r'', '', new_hostname, count=1, flags=re.I) +X ... f.replace(r'Listen .*?:80', 'Listen %s:80', new_hostname, count=1, flags=re.I) +X ... +X +X Be careful with the matches! +X A second invocation of the same rule will edit the second vhost: +X >>> new_hostname = 'fooooo' +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... f.replace(r'', '', new_hostname, count=1, flags=re.I) +X ... +X +X To move all hosts from port 80 to port 8080: +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... f.replace(r'', '', flags=re.I) +X ... f.replace(r'Listen (.*?):80', 'Listen \\\\1:80', flags=re.I) +X ... +X +X (please note in this example there's a double escape of the backreference +X \\\\1, to make the example work with doctest) +X +X Since this example already matched all files, a second invocation does nothing: +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... f.replace(r'', '', flags=re.I) +X ... +X +X It's also acceptable to not make any edits at all: +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... pass +X ... +X +X You don't _have_ to use a with statement: +X >>> f = LineEditingFile('doctest-vhosts.conf') +X >>> f.replace(r'DocRoot /var/www', 'DocRoot /var/www/html', flags=re.I) +X >>> changes = f.commit() +X >>> print changes +X 2 +X >>> +X +X Cleanup of the example vhosts.conf: +X >>> # noinspection PyBroadException +X >>> try: +X ... os.unlink('doctest-vhosts.conf') +X ... os.unlink('doctest-vhosts.conf.bak') +X ... os.unlink('doctest-vhosts.conf.new') +X ... except: +X ... pass +X ... +X """ +X +X def __init__(self, filename): +X self.filename = filename +X self.changed = False +X self.edits = [] +X +X def __enter__(self): +X return self +X +X def replace(self, search, sub, *sub_args, **kwargs): +X edit = LineEdit(search, sub, *sub_args, **kwargs) +X self.edits.append(edit) +X +X # noinspection PyUnusedLocal +X def __exit__(self, exc, value, traceback): +X if exc is not None: +X return False # return false results in re-raise +X +X self.commit() +X +X def commit(self): +X changes = 0 +X changed_file = None +X changed_filename = self.filename + '.new' +X try: +X lines = [] +X backup_filename = self.filename + '.bak' +X # noinspection PyUnusedLocal +X stat = None +X with open(self.filename, 'r') as orig: +X stat = os.fstat(orig.fileno()) +X for line in orig: +X changed_line = line +X for edit in self.edits: +X remaining_count = 0 +X if edit.count != 0: +X remaining_count = edit.count - edit.subs +X if remaining_count < 0: +X raise Exception("Made too many edits") +X elif remaining_count == 0: +X continue +X changed_line, subs = edit.pattern.subn( +X edit.sub, line, remaining_count) +X if changed_line != line: +X if changed_file is None: +X logging.debug("Editing file %s" % self.filename) +X logging.debug(" - %s" % line[:-1]) +X logging.debug(" + %s" % changed_line[:-1]) +X changes += subs +X edit.subs += subs +X if changes == 0: # buffer until we find a change +X lines.append(changed_line) +X elif changed_file is None: # found first change, flush buffer +X changed_file = open(changed_filename, 'w') +X if hasattr(os, 'fchmod'): +X os.fchmod(changed_file.fileno(), # can cause OSError which aborts +X stat.st_mode) +X if hasattr(os, 'fchown'): +X os.fchown(changed_file.fileno(), # can cause OSError which aborts +X stat.st_uid, stat.st_gid) +X changed_file.writelines(lines) +X changed_file.write(changed_line) +X del lines # reclaim buffer memory +X else: # already flushed, just write +X changed_file.write(changed_line) +X +X if changes == 0: +X logging.info("No edits need for file %s" % +X self.filename) +X else: +X changed_file.close() +X changed_file = None +X if os.path.exists(backup_filename): # back up the original +X os.unlink(backup_filename) +X shutil.copy(self.filename, backup_filename) +X os.rename(changed_filename, self.filename) # the swap +X logging.info("Edited file %s (%d changes)" % +X (self.filename, changes)) +X finally: +X if changed_file is not None: # failed, clean up +X changed_file.close() +X os.unlink(changed_filename) +X return changes +X +X +if __name__ == "__main__": +X logging.basicConfig(level=logging.DEBUG) +X import doctest +X doctest.testmod() +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/line_edit.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/line_edit.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/line_edit.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/line_edit.py': 'MD5 check failed' + ) << \SHAR_EOF +4d05b8a011ff9c6132a3ca4ff477a161 cloud_scripts/opt/cloud/bin/line_edit.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/line_edit.py'` -ne 7961 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/line_edit.py' is not 7961" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/get_template_version.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/get_template_version.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/get_template_version.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/get_template_version.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/get_template_version.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# As the last command send to router before any rules operation, wait until boot up done +X +__TIMEOUT=240 +__FLAGFILE=/var/cache/cloud/boot_up_done +done=0 +for i in `seq 1 $(($__TIMEOUT * 10))` +do +X if [ -e $__FLAGFILE ] +X then +X done=1 +X break +X fi +X sleep 0.1 +X if [ $((i % 10)) -eq 0 ] +X then +X logger -t cloud "Waiting for VM boot up done for one second" +X fi +done +X +if [ -z $done ] +then +X # declare we failed booting process +X echo "Waited 60 seconds but boot up haven't been completed" +X exit +fi +X +release=`cat /etc/cloudstack-release` +sig=`cat /var/cache/cloud/cloud-scripts-signature` +echo "${release}&${sig}" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/get_template_version.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/get_template_version.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/get_template_version.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/get_template_version.sh': 'MD5 check failed' + ) << \SHAR_EOF +2234ad00c02a6be63cb0f4f876b8960b cloud_scripts/opt/cloud/bin/get_template_version.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/get_template_version.sh'` -ne 1449 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/get_template_version.sh' is not 1449" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/update_config.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/update_config.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/update_config.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/update_config.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/update_config.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,N87)G=BD*:68@87)G8R`A/2`R(&%N9"!A7,N97AI="@Q*0H*(R!&25A- +M12!W92!S:&]U;&0@9V5T('1H:7,@;&]C871I;VX@9G)O;2!A(&-O;F9I9W5R +M871I;VX@8VQA7,N97AI="AR971U +M2!S<&5E9&EN9R!U<"!L;V%D:6YG('1I;65S +M"B`@("!I9B!N;W0@*&]S+F5N=FER;VXN9V5T*"=$149%4E]#3TY&242YJ7,N87)G=ELQ +M72!O2`]($YO +M;F4*"B`@("!F;W(@:S$L('8Q(&EN(&=U97-T;F5T7V1I8W0N:71E7,N87!P96YD*&LQ*0H*("`@(&EF(&YO +M="!E>&ES=&EN9U]K97ES.@H@("`@("`@("2`Z +M.B!296-O;F9I9W5R:6YG(&=U97-T(&YE='=O&ES=&EN9U]K97ES.@H@("`@("`@("2!I;B!E>&ES=&EN9U]K97ES.@H@("`@("`@(&9O&ES=',@/2!4&ES=',Z"B`@("`@("`@("`@(&)R96%K +M"@H@("`@B(I*3H* +M("`@("`@("!S>7,N97AI="@P*0H@("`@;&]G9VEN9RYE2`Z.B!5;F%B;&4@=&\@7,N97AI="@Q +M*0H*(R!)9B!T:&4@9W5E2`Z.B!.;R!N965D('1O('!R;V-E/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/update_config.py': 'MD5 check failed' + ) << \SHAR_EOF +a2062b2b010940ea783d8256b807c488 cloud_scripts/opt/cloud/bin/update_config.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/update_config.py'` -ne 5136 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/update_config.py' is not 5136" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/edithosts.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/edithosts.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/edithosts.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/edithosts.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/edithosts.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +X +# edithosts.sh -- edit the dhcphosts file on the routing domain +X +usage() { +X printf "Usage: %s: -m -4 -6 -h -d -n -s -u [-N]\n" $(basename $0) >&2 +} +X +mac= +ipv4= +ipv6= +host= +dflt= +dns= +routes= +duid= +nondefault= +X +while getopts 'm:4:h:d:n:s:6:u:N' OPTION +do +X case $OPTION in +X m) mac="$OPTARG" +X ;; +X 4) ipv4="$OPTARG" +X ;; +X 6) ipv6="$OPTARG" +X ;; +X u) duid="$OPTARG" +X ;; +X h) host="$OPTARG" +X ;; +X d) dflt="$OPTARG" +X ;; +X n) dns="$OPTARG" +X ;; +X s) routes="$OPTARG" +X ;; +X N) nondefault=1 +X ;; +X ?) usage +X exit 2 +X ;; +X esac +done +X +DHCP_HOSTS=/etc/dhcphosts.txt +DHCP_OPTS=/etc/dhcpopts.txt +DHCP_LEASES=/var/lib/misc/dnsmasq.leases +HOSTS=/etc/hosts +X +source /root/func.sh +X +lock="biglock" +#default timeout value is 30 mins as DhcpEntryCommand is not synchronized on agent side any more, +#and multiple commands can be sent to the same VR at a time +locked=$(getLockFile $lock 1800) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +grep "redundant_router=1" /var/cache/cloud/cmdline > /dev/null +no_redundant=$? +X +dnsmasq_managed_lease=`cat /var/cache/cloud/dnsmasq_managed_lease` +X +wait_for_dnsmasq () { +X local _pid=$(pidof dnsmasq) +X for i in 0 1 2 3 4 5 6 7 8 9 10 +X do +X sleep 1 +X _pid=$(pidof dnsmasq) +X [ "$_pid" != "" ] && break; +X done +X [ "$_pid" != "" ] && return 0; +X logger -t cloud "edithosts: timed out waiting for dnsmasq to start" +X return 1 +} +X +if [ $dnsmasq_managed_lease ] +then +X #release previous dhcp lease if present +X logger -t cloud "edithosts: releasing $ipv4" +X dhcp_release $(ip route get "$ipv4/32" | grep " dev " | sed -e "s/^.* dev \([^ ]*\) .*$/\1/g") $ipv4 $(grep "$ipv4 " $DHCP_LEASES | awk '{print $2}') > /dev/null 2>&1 +X logger -t cloud "edithosts: released $ipv4" +fi +X +logger -t cloud "edithosts: update $mac $ipv4 $ipv6 $host to hosts" +X +[ ! -f $DHCP_HOSTS ] && touch $DHCP_HOSTS +[ ! -f $DHCP_OPTS ] && touch $DHCP_OPTS +[ ! -f $DHCP_LEASES ] && touch $DHCP_LEASES +X +#delete any previous entries from the dhcp hosts file +sed -i /$mac/d $DHCP_HOSTS +if [ $ipv4 ] +then +X sed -i /$ipv4,/d $DHCP_HOSTS +fi +if [ $ipv6 ] +then +X #searching with [$ipv6], matching other ip so using $ipv6], +X sed -i /$ipv6],/d $DHCP_HOSTS +fi +# don't want to do this in the future, we can have same VM with multiple nics/entries +sed -i /$host,/d $DHCP_HOSTS +X +#put in the new entry +if [ $ipv4 ] +then +X echo "$mac,$ipv4,$host,infinite" >>$DHCP_HOSTS +fi +if [ $ipv6 ] +then +X if [ $nondefault ] +X then +X echo "id:$duid,set:nondefault6,[$ipv6],$host,infinite" >>$DHCP_HOSTS +X else +X echo "id:$duid,[$ipv6],$host,infinite" >>$DHCP_HOSTS +X fi +fi +X +if [ $dnsmasq_managed_lease -eq 0 ] +then +X #delete leases to supplied mac and ip addresses +X if [ $ipv4 ] +X then +X sed -i /$mac/d $DHCP_LEASES +X sed -i /"$ipv4 "/d $DHCP_LEASES +X fi +X if [ $ipv6 ] +X then +X sed -i /$duid/d $DHCP_LEASES +X sed -i /"$ipv6 "/d $DHCP_LEASES +X fi +X sed -i /"$host "/d $DHCP_LEASES +X +X #put in the new entry +X if [ $ipv4 ] +X then +X echo "0 $mac $ipv4 $host *" >> $DHCP_LEASES +X fi +X if [ $ipv6 ] +X then +X echo "0 $duid $ipv6 $host *" >> $DHCP_LEASES +X fi +fi +X +#edit hosts file as well +if [ $ipv4 ] +then +X sed -i /"$ipv4 "/d $HOSTS +fi +if [ $ipv6 ] +then +X sed -i /"$ipv6 "/d $HOSTS +fi +sed -i /" $host$"/d $HOSTS +if [ $ipv4 ] +then +X echo "$ipv4 $host" >> $HOSTS +fi +if [ $ipv6 ] +then +X echo "$ipv6 $host" >> $HOSTS +fi +X +if [ "$dflt" != "" -a "$ipv4" != "" ] +then +X #make sure dnsmasq looks into options file +X sed -i /dhcp-optsfile/d /etc/dnsmasq.conf +X echo "dhcp-optsfile=$DHCP_OPTS" >> /etc/dnsmasq.conf +X +X tag=$(echo $ipv4 | tr '.' '_') +X sed -i /$tag,/d $DHCP_OPTS +X if [ "$dflt" == "0.0.0.0" ] +X then +X logger -t cloud "$0: unset default router for $ipv4" +X logger -t cloud "$0: unset dns server for $ipv4" +X echo "$tag,3" >> $DHCP_OPTS +X echo "$tag,6" >> $DHCP_OPTS +X echo "$tag,15" >> $DHCP_OPTS +X fi +X [ "$routes" != "" ] && echo "$tag,121,$routes" >> $DHCP_OPTS +X #delete entry we just put in because we need a tag +X sed -i /$ipv4,/d $DHCP_HOSTS +X #put it back with a tag +X echo "$mac,set:$tag,$ipv4,$host,infinite" >>$DHCP_HOSTS +fi +X +# make dnsmasq re-read files +pid=$(pidof dnsmasq) +if [ "$pid" != "" ] +then +X # use SIGHUP to avoid service outage if dhcp_release is available. +X if [ $dnsmasq_managed_lease ] +X then +X kill -HUP $pid +X else +X systemctl restart dnsmasq +X fi +else +X if [ $no_redundant -eq 1 ] +X then +X wait_for_dnsmasq +X else +X logger -t cloud "edithosts: skip wait dnsmasq due to redundant virtual router" +X fi +fi +X +ret=$? +unlock_exit $ret $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/edithosts.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/edithosts.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/edithosts.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/edithosts.sh': 'MD5 check failed' + ) << \SHAR_EOF +68e47d6a7efaacefbbaebf8b4e7408c3 cloud_scripts/opt/cloud/bin/edithosts.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/edithosts.sh'` -ne 5502 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/edithosts.sh' is not 5502" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/diagnostics.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/diagnostics.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/diagnostics.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/diagnostics.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/diagnostics.py' && +#!/usr/bin/env python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import shlex +import subprocess +import sys +X +X +def run_cmd(command): +X if command is not None: +X try: +X p = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE) +X stdout, stderr = p.communicate() +X return_code = p.returncode +X +X except OSError as e: +X stdout = "Check your command type" +X stderr = "Exception occurred: %s" % e +X return_code = 1 +X +X finally: +X print('%s&&' % stdout.strip()) +X print('%s&&' % stderr.strip()) +X print('%s' % return_code) +X +X +def get_command(): +X arguments = sys.argv +X cmd = " ".join(arguments[1:]) +X cmd_type = sys.argv[1] +X +X if cmd_type == 'ping': +X if '-c' in arguments: +X return cmd +X else: +X return cmd + " -c 4" +X +X elif cmd_type == 'traceroute': +X if '-m' in arguments: +X return cmd +X else: +X return cmd + " -m 20" +X +X elif cmd_type == 'arping': +X if '-c' in arguments: +X return cmd +X else: +X return cmd + " -c 4" +X +X else: +X return None +X +X +if __name__ == "__main__": +X command = get_command() +X run_cmd(command) +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/diagnostics.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/diagnostics.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/diagnostics.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/diagnostics.py': 'MD5 check failed' + ) << \SHAR_EOF +91a837e5bcafee663cbfb8532574405a cloud_scripts/opt/cloud/bin/diagnostics.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/diagnostics.py'` -ne 2012 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/diagnostics.py' is not 2012" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_monitorservice.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_monitorservice.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_monitorservice.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_monitorservice.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py': 'MD5 check failed' + ) << \SHAR_EOF +1121a063f2dbcfc1bdc426ceba249184 cloud_scripts/opt/cloud/bin/cs_monitorservice.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py'` -ne 1541 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py' is not 1541" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpn_l2tp.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpn_l2tp.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpn_l2tp.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +X +X +#set -x +usage() { +X printf "Usage:\n" +X printf "Create VPN : %s -c -r -l -p -s -i \n" $(basename $0) +X printf "Delete VPN : %s -d -l -s -D -C < local cidr> \n" $(basename $0) +X printf "Add VPN User : %s -u \n" $(basename $0) +X printf "Remote VPN User: %s -U /dev/null +X then +X is_vpc=true +X fi +X +X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 500 -j ACCEPT +X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 4500 -j ACCEPT +X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 1701 -j ACCEPT +X sudo iptables $op INPUT -i $dev -p ah -j ACCEPT +X sudo iptables $op INPUT -i $dev -p esp -j ACCEPT +X if $is_vpc +X then +X # Need to apply the following ACL rules as well. +X if sudo iptables -N VPN_FORWARD &> /dev/null +X then +X sudo iptables -I FORWARD -i ppp+ -j VPN_FORWARD +X sudo iptables -I FORWARD -o ppp+ -j VPN_FORWARD +X sudo iptables -A VPN_FORWARD -j DROP +X fi +X sudo iptables $op VPN_FORWARD -i ppp+ -o ppp+ -j RETURN +X sudo iptables $op VPN_FORWARD -i ppp+ -d $cidr -j RETURN +X sudo iptables $op VPN_FORWARD -s $cidr -o ppp+ -j RETURN +X else +X sudo iptables $op FORWARD -i ppp+ -d $cidr -j ACCEPT +X sudo iptables $op FORWARD -s $cidr -o ppp+ -j ACCEPT +X sudo iptables $op FORWARD -i ppp+ -o ppp+ -j ACCEPT +X fi +X sudo iptables $op INPUT -i ppp+ -m udp -p udp --dport 53 -j ACCEPT +X sudo iptables $op INPUT -i ppp+ -m tcp -p tcp --dport 53 -j ACCEPT +X sudo iptables -t nat $op PREROUTING -i ppp+ -p tcp -m tcp --dport 53 -j DNAT --to-destination $local_ip +X sudo iptables -t nat $op PREROUTING -i ppp+ -p udp -m udp --dport 53 -j DNAT --to-destination $local_ip +X +X if $is_vpc +X then +X return +X fi +X +X if sudo iptables -t mangle -N VPN_$public_ip &> /dev/null +X then +X logger -t cloud "$(basename $0): created VPN chain in PREROUTING mangle" +X sudo iptables -t mangle -I PREROUTING -d $public_ip -j VPN_$public_ip +X sudo iptables -t mangle -A VPN_$public_ip -j RETURN +X fi +X op2="-D" +X [ "$op" == "-A" ] && op2="-I" +X sudo iptables -t mangle $op VPN_$public_ip -p ah -j ACCEPT +X sudo iptables -t mangle $op VPN_$public_ip -p esp -j ACCEPT +} +X +start_ipsec() { +X systemctl is-active ipsec > /dev/null +X if [ $? -ne 0 ] +X then +X systemctl start ipsec > /dev/null +X #Wait until ipsec started, 5 seconds at most +X for i in {1..5} +X do +X logger -t cloud "$(basename $0): waiting ipsec start..." +X systemctl is-active ipsec > /dev/null +X result=$? +X if [ $result -eq 0 ] +X then +X break +X fi +X sleep 1 +X done +X fi +X systemctl is-active ipsec > /dev/null +X return $? +} +X +ipsec_server() { +X local op=$1 +X case $op in +X "start") start_ipsec +X sudo systemctl start xl2tpd +X ;; +X "stop") sudo systemctl stop xl2tpd +X ;; +X "restart") start_ipsec +X sudo ipsec auto --rereadall +X systemctl stop xl2tpd +X systemctl start xl2tpd +X ;; +X esac +} +X +create_l2tp_ipsec_vpn_server() { +X local ipsec_psk=$1 +X local public_ip=$2 +X local client_range=$3 +X local local_ip=$4 +X +X sed -i -e "s/left=.*$/left=$public_ip/" /etc/ipsec.d/l2tp.conf +X echo "$public_ip %any : PSK \"$ipsec_psk\"" > /etc/ipsec.d/ipsec.any.secrets +X sed -i -e "s/^ip range = .*$/ip range = $client_range/" /etc/xl2tpd/xl2tpd.conf +X sed -i -e "s/^local ip = .*$/local ip = $local_ip/" /etc/xl2tpd/xl2tpd.conf +X +X sed -i -e "s/^ms-dns.*$/ms-dns $local_ip/" /etc/ppp/options.xl2tpd +X +X iptables_ "-D" $public_ip +X iptables_ "-I" $public_ip +X +X ipsec_server "restart" +X +X ipsec auto --rereadsecrets +X ipsec auto --replace L2TP-PSK +} +X +destroy_l2tp_ipsec_vpn_server() { +X local public_ip=$1 +X +X ipsec auto --down L2TP-PSK +X +X iptables_ "-D" $public_ip +X +X ipsec_server "stop" +} +X +remove_l2tp_ipsec_user() { +X local u=$1 +X sed -i -e "/^$u .*$/d" /etc/ppp/chap-secrets +X if [ -x /usr/bin/tdbdump ]; then +X pid=$(tdbdump /var/run/pppd2.tdb | grep -w $u | awk -F';' '{print $4}' | awk -F= '{print $2}') +X [ "$pid" != "" ] && kill -9 $pid +X fi +X return 0 +} +X +add_l2tp_ipsec_user() { +X local u=$1 +X local passwd=$2 +X +X uptodate=$(grep "^$u \* \"$passwd\" \*$" /etc/ppp/chap-secrets) +X if [ "$uptodate" == "" ] +X then +X remove_l2tp_ipsec_user $u +X echo "$u * \"$passwd\" *" >> /etc/ppp/chap-secrets +X fi +} +X +rflag= +pflag= +lflag= +sflag= +create= +destroy= +useradd= +userdel= +dev= +cidr= +X +while getopts 'cdl:p:r:s:u:U:i:C:' OPTION +do +X case $OPTION in +X c) create=1 +X ;; +X d) destroy=1 +X ;; +X u) useradd=1 +X user_pwd="$OPTARG" +X ;; +X U) userdel=1 +X user="$OPTARG" +X ;; +X r) rflag=1 +X client_range="$OPTARG" +X ;; +X p) pflag=1 +X ipsec_psk="$OPTARG" +X ;; +X l) lflag=1 +X local_ip="$OPTARG" +X ;; +X s) sflag=1 +X server_ip="$OPTARG" +X ;; +X i) dev="$OPTARG" +X ;; +X C) cidr="$OPTARG" +X ;; +X ?) usage +X exit 2 +X ;; +X esac +done +X +if [ "$dev" == "" ] +then +X dev="eth2" +fi +X +if [ "$cidr" == "" ] +then +X cidr=$(get_intf_ip "eth0") +fi +X +[ "$create$destroy" == "11" ] || [ "$create$destroy$useradd$userdel" == "" ] && usage && exit 2 +[ "$create" == "1" ] && [ "$lflag$pflag$rflag$sflag" != "1111" ] && usage && exit 2 +X +if [ "$create" == "1" ]; then +X create_l2tp_ipsec_vpn_server $ipsec_psk $server_ip $client_range $local_ip +X exit $? +fi +X +if [ "$destroy" == "1" ]; then +X destroy_l2tp_ipsec_vpn_server $server_ip +X exit $? +fi +X +if [ "$useradd" == "1" ]; then +X u=$(echo $user_pwd | awk -F',' '{print $1}') +X pwd=$(echo $user_pwd | awk -F',' '{print $2}') +X add_l2tp_ipsec_user $u $pwd +X exit $? +fi +if [ "$userdel" == "1" ]; then +X remove_l2tp_ipsec_user $user +X exit $? +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpn_l2tp.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh': 'MD5 check failed' + ) << \SHAR_EOF +79e41044b43cc49c6b11859534bc454d cloud_scripts/opt/cloud/bin/vpn_l2tp.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh'` -ne 6986 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' is not 6986" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_guestnetwork.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_guestnetwork.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_guestnetwork.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +keys = ['eth1', 'eth2', 'eth3', 'eth4', 'eth5', 'eth6', 'eth7', 'eth8', 'eth9'] +X +X +def merge(dbag, gn): +X device = gn['device'] +X +X if not gn['add'] and device in dbag: +X +X if dbag[device]: +X device_to_die = dbag[device][0] +X try: +X dbag[device].remove(device_to_die) +X except ValueError, e: +X print "[WARN] cs_guestnetwork.py :: Error occurred removing item from databag. => %s" % device_to_die +X del(dbag[device]) +X else: +X del(dbag[device]) +X +X else: +X dbag.setdefault(device, []).append(gn) +X +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_guestnetwork.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py': 'MD5 check failed' + ) << \SHAR_EOF +599105da1bdfaced1f2c8078d3fbed19 cloud_scripts/opt/cloud/bin/cs_guestnetwork.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py'` -ne 1401 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' is not 1401" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_vmdata.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vmdata.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vmdata.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, metadata): +X dbag[metadata["vm_ip_address"]] = metadata["vm_metadata"] +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_vmdata.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vmdata.py': 'MD5 check failed' + ) << \SHAR_EOF +3ee2451cb48927d361f05bb5fe3df4ce cloud_scripts/opt/cloud/bin/cs_vmdata.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vmdata.py'` -ne 892 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' is not 892" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/dnsmasq.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/dnsmasq.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/dnsmasq.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +usage() { +X printf "Usage: %s: \n" $(basename $0) >&2 +} +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +#set -x +#backup the old config file +DHCP_CONFIG=/etc/dnsmasq.d/multiple_ranges.conf +DHCP_CONFIG_BAK=/etc/dnsmasq.d/multiple_ranges.conf.bak +DHCP_CONFIG_MAIN=/etc/dnsmasq.conf +DHCP_CONFIG_MAIN_BAK=/etc/dnsmasq.conf.bak +DHCP_FAILURE_CONFIG=/etc/multiple_ranges.conf.failure +DHCP_FAILURE_CONFIG_MAIN=/etc/dnsmasq.conf.failure +CMDLINE=$(cat /var/cache/cloud/cmdline | tr '\n' ' ') +X +#take a backup copy of the dnsmasq file. +cp "$DHCP_CONFIG_MAIN" "$DHCP_CONFIG_MAIN_BAK" +cp "$DHCP_CONFIG" "$DHCP_CONFIG_BAK" +X +#empty the config file +echo > $DHCP_CONFIG +X +var="$1" +dhcp_range="" +dhcp_gateway="" +dhcp_netmask="" +dns_option="" +dns_servers="" +count=0 +X +X +# fetching the dns Ips from the command line. +dns1=$(echo "$CMDLINE" | grep -o " dns1=[[:digit:]].* " | sed -e 's/dns1=//' | awk '{print $1}') +dns2=$(echo "$CMDLINE" | grep -o " dns2=[[:digit:]].* " | sed -e 's/dns2=//' | awk '{print $1}') +X +dns_servers="${dns1}" +if [ -n "$dns2" ] +then +dns_servers="${dns1},${dns2}" +fi +X +X +# check if useextdns is true +use_ext_dns=$(echo "$CMDLINE" | grep -o "useextdns=true") +while [ -n "$var" ] +do +X var1=$(echo $var | cut -f1 -d "-") +X routerip=$( echo $var1 | cut -f1 -d ":" ) +X gateway=$(echo $var1 | cut -f2 -d ":") +X netmask=$(echo $var1 | cut -f3 -d ":") +X start_ip_of_subnet=$(echo $var1 | cut -f4 -d ":") +X dhcp_range="${dhcp_range}"'dhcp-range=set:range'$count","$start_ip_of_subnet",static \n" +X dhcp_gateway="${dhcp_gateway}"'dhcp-option=tag:range'$count",3,"$gateway" \n" +X dhcp_netmask="${dhcp_netmask}"'dhcp-option=tag:range'$count",1,"$netmask" \n" +X if [ -n "$use_ext_dns" ] +X then +X dns_option="${dns_option}"'dhcp-option=tag:range'$count",6,"$dns_servers" \n" +X else +X dns_option="${dns_option}"'dhcp-option=tag:range'$count",6,$routerip"","$dns_servers" \n" +X fi +X var=$( echo $var | sed "s/${var1}-//" ) +X count=$[$count+1] +done +X +#logging the configuration being removed. +log="" +log="${log}"`grep "^dhcp-option=6" "$DHCP_CONFIG_MAIN"`"\n" +log="${log}"`grep "^dhcp-option=option:router" "$DHCP_CONFIG_MAIN"`"\n" +log="${log}"`grep "^dhcp-range=" "$DHCP_CONFIG_MAIN"`"\n" +X +if [ "$log" != '\n\n\n' ] +then +X #Cleaning the existing dhcp confgiuration +X logger -t cloud "dnsmasq.sh: remvoing the primaryip confg from dnsmasq.conf and adding it to /etc/dnsmaq.d/multiple_ranges.conf" +X logger -t cloud "dnsmasq.sh: config removed from dnsmasq.conf is $log" +X sed -i -e '/dhcp-option=6/d' "$DHCP_CONFIG_MAIN" +X sed -i -e '/dhcp-option=option:router/d' "$DHCP_CONFIG_MAIN" +X sed -i -e '/^dhcp-range=/d' "$DHCP_CONFIG_MAIN" +fi +X +#wrting the new config into the config file. +echo -e "$dhcp_range" >> "$DHCP_CONFIG" +echo -e "$dhcp_gateway" >> "$DHCP_CONFIG" +echo -e "$dhcp_netmask" >> "$DHCP_CONFIG" +echo -e "$dns_option" >> "$DHCP_CONFIG" +X +X +#restart the dnsmasq +systemctl restart dnsmasq +result=$? +if [ "$result" -ne "0" ] +then +X logger -t cloud "dnsmasq.sh: could not configure dnsmasq" +X logger -t cloud "dnsmasq.sh: reverting to the old config" +X logger -t cloud "dnsmasq.sh: copying the failure config to `$DHCP_FAILURE_CONFIG` and `$DHCP_FAILURE_CONFIG_MAIN`" +X cp "$DHCP_CONFIG" "$DHCP_FAILURE_CONFIG" +X cp "$DHCP_CONFIG_MAIN" "$DHCP_FAILURE_CONFIG_MAIN" +X cp "$DHCP_CONFIG_BAK" "$DHCP_CONFIG" +X cp "$DHCP_CONFIG_MAIN_BAK" "$DHCP_CONFIG_MAIN" +X systemctl restart dnsmasq +X unlock_exit $result $lock $locked +fi +rm "$DHCP_CONFIG_BAK" +rm "$DHCP_CONFIG_MAIN_BAK" +unlock_exit $result $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/dnsmasq.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/dnsmasq.sh': 'MD5 check failed' + ) << \SHAR_EOF +d603da3043a61bea911e21fb4da8ded0 cloud_scripts/opt/cloud/bin/dnsmasq.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/dnsmasq.sh'` -ne 4359 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' is not 4359" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_dhcp.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_dhcp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_dhcp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_dhcp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_dhcp.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2P@96YT2!N;W0@ +M:6X@7,Z"B`@("`@("`@("`@(')E;6]V95]K97ES+F%D9"AK +M97DI"@H@("`@("`@(&9O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_dhcp.py': 'MD5 check failed' + ) << \SHAR_EOF +9b17e95a8fcb1cf185c9e74cc6ddecca cloud_scripts/opt/cloud/bin/cs_dhcp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_dhcp.py'` -ne 1533 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_dhcp.py' is not 1533" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_cmdline.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_cmdline.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_cmdline.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, cmdline): +X if 'redundant_router' in cmdline['cmd_line']: +X cmdline['cmd_line']['redundant_router'] = "true" +X else: +X cmdline['cmd_line']['redundant_router'] = "false" +X dbag['config'] = cmdline['cmd_line'] +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_cmdline.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_cmdline.py': 'MD5 check failed' + ) << \SHAR_EOF +a6290582c86832c4c94985580ceda8e5 cloud_scripts/opt/cloud/bin/cs_cmdline.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_cmdline.py'` -ne 1045 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' is not 1045" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/ips0003.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0003.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0003.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0003.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0003.json' && +{"ip_address": +[{"public_ip":"10.0.3.10", +"source_nat":true, +"add":true, +"one_to_one_nat":false, +"first_i_p":false, +"gateway":"10.0.3.1", +"netmask":"255.255.255.0", +"vif_mac_address":"06:cb:aa:00:00:03", +"nic_dev_id":2, +"new_nic":false}], +"type":"ips"} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0003.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0003.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0003.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0003.json': 'MD5 check failed' + ) << \SHAR_EOF +e8113ca4dc70734a2e07e4cd5aa817e7 cloud_scripts/opt/cloud/testdata/ips0003.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0003.json'` -ne 253 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0003.json' is not 253" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/vmp0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/vmp0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/vmp0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/vmp0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/testdata/vmp0001.json +M>R)I<%]A9&1R97-S(CHB,3/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/vmp0001.json': 'MD5 check failed' + ) << \SHAR_EOF +a3150c6241b311cbfc2180be23d1ddee cloud_scripts/opt/cloud/testdata/vmp0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/vmp0001.json'` -ne 77 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/vmp0001.json' is not 77" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/gn0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/gn0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/gn0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/gn0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/gn0001.json' && +{"add":true, +"mac_address":"02:00:56:36:00:02", +"device":"eth3", +"router_guest_ip":"172.16.1.1", +"router_guest_gateway":"172.16.1.0", +"router_guest_netmask":"255.255.255.0", +"cidr":"24", +"dns":"8.8.8.8,8.8.8.4", +"domain_name":"devcloud.local", +"type":"guestnetwork"} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/gn0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/gn0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/gn0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/gn0001.json': 'MD5 check failed' + ) << \SHAR_EOF +e790842388eb0a3f86ea0dbbcf4608eb cloud_scripts/opt/cloud/testdata/gn0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/gn0001.json'` -ne 267 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/gn0001.json' is not 267" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/dhcp0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/dhcp0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/dhcp0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' && +{ +X "host_name":"VM-58976c22-0832-451e-9ab2-039e9f27e415", +X "mac_address":"02:00:26:c3:00:02", +X "ipv4_address":"172.16.1.102", +X "ipv6_duid":"00:03:00:01:02:00:26:c3:00:02", +X "default_gateway":"172.16.1.1", +X "default_entry":true, +X "type":"dhcpentry" +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/dhcp0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/dhcp0001.json': 'MD5 check failed' + ) << \SHAR_EOF +0f44da4132b56f2ece9b36bab3213f28 cloud_scripts/opt/cloud/testdata/dhcp0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/dhcp0001.json'` -ne 250 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' is not 250" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/acl0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/acl0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/acl0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/acl0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/acl0001.json' && +{ +X "eth2": { +X "device": "eth2", +X "egress_rules": [ +X { +X "allowed": false, +X "cidr": "10.0.6.0/8", +X "first_port": 60, +X "last_port": 60, +X "type": "tcp" +X } +X ], +X "ingress_rules": [ +X { +X "allowed": true, +X "cidr": "10.0.1.0/8", +X "protocol": 41, +X "type": "protocol" +X }, +X { +X "allowed": true, +X "cidr": "10.0.4.0/8", +X "type": "all" +X }, +X { +X "allowed": true, +X "cidr": "10.0.3.0/8", +X "icmp_code": -1, +X "icmp_type": -1, +X "type": "icmp" +X }, +X { +X "allowed": true, +X "cidr": "10.0.2.0/8", +X "first_port": 40, +X "last_port": 40, +X "type": "udp" +X }, +X { +X "allowed": true, +X "cidr": "10.0.1.0/8", +X "first_port": 30, +X "last_port": 30, +X "type": "tcp" +X } +X ], +X "mac_address": "02:00:0d:7b:00:04", +X "nic_ip": "172.16.1.1", +X "nic_netmask": "24", +X "private_gateway_acl": false, +X "type": "networkacl" +X }, +X "id": "networkacl" +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/acl0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/acl0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/acl0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/acl0001.json': 'MD5 check failed' + ) << \SHAR_EOF +1ea2a1b5d6a98bc6c0fc2375de284b17 cloud_scripts/opt/cloud/testdata/acl0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/acl0001.json'` -ne 1405 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/acl0001.json' is not 1405" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/README ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/README' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/README (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/README (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/README' && +Json file used to test the provisioning scripts on virtual appliances +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/README' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/README' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/README failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/README': 'MD5 check failed' + ) << \SHAR_EOF +13e5ecf4d998c3df3cf53485d6f46ee1 cloud_scripts/opt/cloud/testdata/README +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/README'` -ne 70 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/README' is not 70" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/ips0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0001.json' && +{"ip_address": +[{"public_ip":"10.0.2.102", +"source_nat":true, +"add":true, +"one_to_one_nat":false, +"first_i_p":false, +"gateway":"10.0.2.1", +"netmask":"255.255.255.0", +"vif_mac_address":"06:cb:aa:00:00:03", +"nic_dev_id":1, +"new_nic":false}], +"type":"ips"} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0001.json': 'MD5 check failed' + ) << \SHAR_EOF +6f7337aaa605096eef31300afba0f4af cloud_scripts/opt/cloud/testdata/ips0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0001.json'` -ne 254 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0001.json' is not 254" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/test.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/test.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/test.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/test.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/test.sh' && +#!/bin/sh +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +cp /opt/cloud/testdata/* /etc/cloudstack +/opt/cloud/bin/update_config.py cmd_line.json +/opt/cloud/bin/update_config.py gn0001.json +/opt/cloud/bin/update_config.py ips0001.json +/opt/cloud/bin/update_config.py ips0002.json +/opt/cloud/bin/update_config.py ips0003.json +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/test.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/testdata/test.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/test.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/test.sh': 'MD5 check failed' + ) << \SHAR_EOF +7fbb72051fd8d3b66fd481aa51d3debe cloud_scripts/opt/cloud/testdata/test.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/test.sh'` -ne 1062 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/test.sh' is not 1062" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/ips0002.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0002.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0002.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0002.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0002.json' && +{"ip_address": +[{"public_ip":"10.0.2.103", +"source_nat":true, +"add":true, +"one_to_one_nat":false, +"first_i_p":false, +"gateway":"10.0.2.1", +"netmask":"255.255.255.0", +"vif_mac_address":"06:cb:aa:00:00:03", +"nic_dev_id":1, +"new_nic":false}], +"type":"ips"} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0002.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0002.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0002.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0002.json': 'MD5 check failed' + ) << \SHAR_EOF +12aec2bca1d88c499ee0af39c2e20ea1 cloud_scripts/opt/cloud/testdata/ips0002.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0002.json'` -ne 254 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0002.json' is not 254" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/s2s0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/s2s0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/s2s0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/s2s0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/s2s0001.json' && +{ +X "local_public_ip":"172.16.1.1", +X "local_guest_cidr":"172.16.1.0/24", +X "local_public_gateway":"172.16.1.1", +X "peer_gateway_ip":"10.200.200.1", +X "peer_guest_cidr_list":"10.0.0.0/24", +X "esp_policy":"3des-md5", +X "ike_policy":"3des-md5", +X "ipsec_psk":"vpnblabla", +X "ike_lifetime":86400, +X "esp_lifetime":3600, +X "create":true, +X "dpd":false, +X "passive":false, +X "type":"site2sitevpn" +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/s2s0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/s2s0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/s2s0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/s2s0001.json': 'MD5 check failed' + ) << \SHAR_EOF +ff589cb7ab7721a270f4cc703719c917 cloud_scripts/opt/cloud/testdata/s2s0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/s2s0001.json'` -ne 380 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/s2s0001.json' is not 380" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +ip link|grep BROADCAST|grep -v eth0|grep -v eth1|cut -d ":" -f 2 > /tmp/iflist +while read i +do +X ip addr show $i|grep "inet " > /tmp/iplist_$i +X while read line +X do +X ip=`echo $line|cut -d " " -f 2|cut -d "/" -f 1` +X arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 +X arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 +X done < /tmp/iplist_$i +done < /tmp/iflist +sleep 1 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ': 'MD5 check failed' + ) << \SHAR_EOF +023d994f54c0955f160f127c1d85d6ae cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ'` -ne 1177 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' is not 1177" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/checkrouter.sh.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/checkrouter.sh.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/checkrouter.sh.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +STATUS=UNKNOWN +INTERFACE=eth1 +ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g') +if [ $ROUTER_TYPE = "router" ] +then +X ROUTER_STATE=$(ip addr | grep eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi') +X STATUS=$ROUTER_STATE +else +X ROUTER_STATE=$(ip addr | grep $INTERFACE | grep state | awk '{print $9;}') +X if [ $ROUTER_STATE = "UP" ] +X then +X STATUS=MASTER +X elif [ $ROUTER_STATE = "DOWN" ] +X then +X STATUS=BACKUP +X fi +fi +X +echo "Status: ${STATUS}" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/checkrouter.sh.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ': 'MD5 check failed' + ) << \SHAR_EOF +bbd331057760019d05ead01eec5e42aa cloud_scripts/opt/cloud/templates/checkrouter.sh.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ'` -ne 1357 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' is not 1357" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/heartbeat.sh.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/heartbeat.sh.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/heartbeat.sh.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +t=$(date +%s) +echo $t > /ramdisk/rrouter/keepalived.ts +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/heartbeat.sh.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ': 'MD5 check failed' + ) << \SHAR_EOF +c006a52c775a0418870c0c50f0131ee7 cloud_scripts/opt/cloud/templates/heartbeat.sh.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ'` -ne 853 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' is not 853" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/conntrackd.conf.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/conntrackd.conf.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/conntrackd.conf.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# Synchronizer settings +# +Sync { +X Mode FTFW { +X # +X # Size of the resend queue (in objects). This is the maximum +X # number of objects that can be stored waiting to be confirmed +X # via acknoledgment. If you keep this value low, the daemon +X # will have less chances to recover state-changes under message +X # omission. On the other hand, if you keep this value high, +X # the daemon will consume more memory to store dead objects. +X # Default is 131072 objects. +X # +X # ResendQueueSize 131072 +X +X # +X # This parameter allows you to set an initial fixed timeout +X # for the committed entries when this node goes from backup +X # to primary. This mechanism provides a way to purge entries +X # that were not recovered appropriately after the specified +X # fixed timeout. If you set a low value, TCP entries in +X # Established states with no traffic may hang. For example, +X # an SSH connection without KeepAlive enabled. If not set, +X # the daemon uses an approximate timeout value calculation +X # mechanism. By default, this option is not set. +X # +X # CommitTimeout 180 +X +X # +X # If the firewall replica goes from primary to backup, +X # the conntrackd -t command is invoked in the script. +X # This command schedules a flush of the table in N seconds. +X # This is useful to purge the connection tracking table of +X # zombie entries and avoid clashes with old entries if you +X # trigger several consecutive hand-overs. Default is 60 seconds. +X # +X # PurgeTimeout 60 +X +X # Set the acknowledgement window size. If you decrease this +X # value, the number of acknowlegdments increases. More +X # acknowledgments means more overhead as conntrackd has to +X # handle more control messages. On the other hand, if you +X # increase this value, the resend queue gets more populated. +X # This results in more overhead in the queue releasing. +X # The following value is based on some practical experiments +X # measuring the cycles spent by the acknowledgment handling +X # with oprofile. If not set, default window size is 300. +X # +X # ACKWindowSize 300 +X +X # +X # This clause allows you to disable the external cache. Thus, +X # the state entries are directly injected into the kernel +X # conntrack table. As a result, you save memory in user-space +X # but you consume slots in the kernel conntrack table for +X # backup state entries. Moreover, disabling the external cache +X # means more CPU consumption. You need a Linux kernel +X # >= 2.6.29 to use this feature. By default, this clause is +X # set off. If you are installing conntrackd for first time, +X # please read the user manual and I encourage you to consider +X # using the fail-over scripts instead of enabling this option! +X # +X # DisableExternalCache Off +X } +X +X # +X # Multicast IP and interface where messages are +X # broadcasted (dedicated link). IMPORTANT: Make sure +X # that iptables accepts traffic for destination +X # 225.0.0.50, eg: +X # +X # iptables -I INPUT -d 225.0.0.50 -j ACCEPT +X # iptables -I OUTPUT -d 225.0.0.50 -j ACCEPT +X # +X Multicast { +X # +X # Multicast address: The address that you use as destination +X # in the synchronization messages. You do not have to add +X # this IP to any of your existing interfaces. If any doubt, +X # do not modify this value. +X # +X IPv4_address 225.0.0.50 +X +X # +X # The multicast group that identifies the cluster. If any +X # doubt, do not modify this value. +X # +X Group 3780 +X +X # +X # IP address of the interface that you are going to use to +X # send the synchronization messages. Remember that you must +X # use a dedicated link for the synchronization messages. +X # +X IPv4_interface [LINK_IP] +X +X # +X # The name of the interface that you are going to use to +X # send the synchronization messages. +X # +X Interface [LINK_IF] +X +X # The multicast sender uses a buffer to enqueue the packets +X # that are going to be transmitted. The default size of this +X # socket buffer is available at /proc/sys/net/core/wmem_default. +X # This value determines the chances to have an overrun in the +X # sender queue. The overrun results packet loss, thus, losing +X # state information that would have to be retransmitted. If you +X # notice some packet loss, you may want to increase the size +X # of the sender buffer. The default size is usually around +X # ~100 KBytes which is fairly small for busy firewalls. +X # +X SndSocketBuffer 1249280 +X +X # The multicast receiver uses a buffer to enqueue the packets +X # that the socket is pending to handle. The default size of this +X # socket buffer is available at /proc/sys/net/core/rmem_default. +X # This value determines the chances to have an overrun in the +X # receiver queue. The overrun results packet loss, thus, losing +X # state information that would have to be retransmitted. If you +X # notice some packet loss, you may want to increase the size of +X # the receiver buffer. The default size is usually around +X # ~100 KBytes which is fairly small for busy firewalls. +X # +X RcvSocketBuffer 1249280 +X +X # +X # Enable/Disable message checksumming. This is a good +X # property to achieve fault-tolerance. In case of doubt, do +X # not modify this value. +X # +X Checksum on +X } +X # +X # You can specify more than one dedicated link. Thus, if one dedicated +X # link fails, conntrackd can fail-over to another. Note that adding +X # more than one dedicated link does not mean that state-updates will +X # be sent to all of them. There is only one active dedicated link at +X # a given moment. The `Default' keyword indicates that this interface +X # will be selected as the initial dedicated link. You can have +X # up to 4 redundant dedicated links. Note: Use different multicast +X # groups for every redundant link. +X # +X # Multicast Default { +X # IPv4_address 225.0.0.51 +X # Group 3781 +X # IPv4_interface 192.168.100.101 +X # Interface eth3 +X # # SndSocketBuffer 1249280 +X # # RcvSocketBuffer 1249280 +X # Checksum on +X # } +X +X # +X # You can use Unicast UDP instead of Multicast to propagate events. +X # Note that you cannot use unicast UDP and Multicast at the same +X # time, you can only select one. +X # +X # UDP { +X # +X # UDP address that this firewall uses to listen to events. +X # +X # IPv4_address 192.168.2.100 +X # +X # or you may want to use an IPv6 address: +X # +X # IPv6_address fe80::215:58ff:fe28:5a27 +X +X # +X # Destination UDP address that receives events, ie. the other +X # firewall's dedicated link address. +X # +X # IPv4_Destination_Address 192.168.2.101 +X # +X # or you may want to use an IPv6 address: +X # +X # IPv6_Destination_Address fe80::2d0:59ff:fe2a:775c +X +X # +X # UDP port used +X # +X # Port 3780 +X +X # +X # The name of the interface that you are going to use to +X # send the synchronization messages. +X # +X # Interface eth2 +X +X # +X # The sender socket buffer size +X # +X # SndSocketBuffer 1249280 +X +X # +X # The receiver socket buffer size +X # +X # RcvSocketBuffer 1249280 +X +X # +X # Enable/Disable message checksumming. +X # +X # Checksum on +X # } +X +} +X +# +# General settings +# +General { +X # +X # Set the nice value of the daemon, this value goes from -20 +X # (most favorable scheduling) to 19 (least favorable). Using a +X # very low value reduces the chances to lose state-change events. +X # Default is 0 but this example file sets it to most favourable +X # scheduling as this is generally a good idea. See man nice(1) for +X # more information. +X # +X Nice -20 +X +X # +X # Select a different scheduler for the daemon, you can select between +X # RR and FIFO and the process priority (minimum is 0, maximum is 99). +X # See man sched_setscheduler(2) for more information. Using a RT +X # scheduler reduces the chances to overrun the Netlink buffer. +X # +X # Scheduler { +X # Type FIFO +X # Priority 99 +X # } +X +X # +X # Number of buckets in the cache hashtable. The bigger it is, +X # the closer it gets to O(1) at the cost of consuming more memory. +X # Read some documents about tuning hashtables for further reference. +X # +X HashSize 32768 +X +X # +X # Maximum number of conntracks, it should be double of: +X # $ cat /proc/sys/net/netfilter/nf_conntrack_max +X # since the daemon may keep some dead entries cached for possible +X # retransmission during state synchronization. +X # +X HashLimit 131072 +X +X LogFile on +X +X # +X # Syslog: on, off or a facility name (daemon (default) or local0..7) +X # Default: off +X # +X Syslog on +X +X # +X # Lockfile +X # +X LockFile /var/lock/conntrackd.lock +X +X # +X # Unix socket configuration +X # +X UNIX { +X Path /var/run/conntrackd.sock +X Backlog 20 +X } +X +X SocketBufferSize 2097152 +X SocketBufferSizeMaxGrown 8388608 +X +X # +X # Netlink event socket buffer size. If you do not specify this clause, +X # the default buffer size value in /proc/net/core/rmem_default is +X # used. This default value is usually around 100 Kbytes which is +X # fairly small for busy firewalls. This leads to event message dropping +X # and high CPU consumption. This example configuration file sets the +X # size to 2 MBytes to avoid this sort of problems. +X # +X NetlinkBufferSize 2097152 +X +X # +X # The daemon doubles the size of the netlink event socket buffer size +X # if it detects netlink event message dropping. This clause sets the +X # maximum buffer size growth that can be reached. This example file +X # sets the size to 8 MBytes. +X # +X NetlinkBufferSizeMaxGrowth 8388608 +X +X # +X # If the daemon detects that Netlink is dropping state-change events, +X # it automatically schedules a resynchronization against the Kernel +X # after 30 seconds (default value). Resynchronizations are expensive +X # in terms of CPU consumption since the daemon has to get the full +X # kernel state-table and purge state-entries that do not exist anymore. +X # Be careful of setting a very small value here. You have the following +X # choices: On (enabled, use default 30 seconds value), Off (disabled) +X # or Value (in seconds, to set a specific amount of time). If not +X # specified, the daemon assumes that this option is enabled. +X # +X # NetlinkOverrunResync On +X +X # +X # If you want reliable event reporting over Netlink, set on this +X # option. If you set on this clause, it is a good idea to set off +X # NetlinkOverrunResync. This option is off by default and you need +X # a Linux kernel >= 2.6.31. +X # +X # NetlinkEventsReliable Off +X +X # +X # By default, the daemon receives state updates following an +X # event-driven model. You can modify this behaviour by switching to +X # polling mode with the PollSecs clause. This clause tells conntrackd +X # to dump the states in the kernel every N seconds. With regards to +X # synchronization mode, the polling mode can only guarantee that +X # long-lifetime states are recovered. The main advantage of this method +X # is the reduction in the state replication at the cost of reducing the +X # chances of recovering connections. +X # +X # PollSecs 15 +X +X # +X # The daemon prioritizes the handling of state-change events coming +X # from the core. With this clause, you can set the maximum number of +X # state-change events (those coming from kernel-space) that the daemon +X # will handle after which it will handle other events coming from the +X # network or userspace. A low value improves interactivity (in terms of +X # real-time behaviour) at the cost of extra CPU consumption. +X # Default (if not set) is 100. +X # +X # EventIterationLimit 100 +X +X # +X # Event filtering: This clause allows you to filter certain traffic, +X # There are currently three filter-sets: Protocol, Address and +X # State. The filter is attached to an action that can be: Accept or +X # Ignore. Thus, you can define the event filtering policy of the +X # filter-sets in positive or negative logic depending on your needs. +X # You can select if conntrackd filters the event messages from +X # user-space or kernel-space. The kernel-space event filtering +X # saves some CPU cycles by avoiding the copy of the event message +X # from kernel-space to user-space. The kernel-space event filtering +X # is prefered, however, you require a Linux kernel >= 2.6.29 to +X # filter from kernel-space. If you want to select kernel-space +X # event filtering, use the keyword 'Kernelspace' instead of +X # 'Userspace'. +X # +X Filter From Userspace { +X # +X # Accept only certain protocols: You may want to replicate +X # the state of flows depending on their layer 4 protocol. +X # +X Protocol Accept { +X TCP +X SCTP +X DCCP +X UDP +X ICMP # This requires a Linux kernel >= 2.6.31 +X } +X +X # +X # Ignore traffic for a certain set of IP's: Usually all the +X # IP assigned to the firewall since local traffic must be +X # ignored, only forwarded connections are worth to replicate. +X # Note that these values depends on the local IPs that are +X # assigned to the firewall. +X # +X Address Ignore { +X IPv4_address 127.0.0.1 # loopback +X IPv4_address [IGNORE_IP1] +X IPv4_address [IGNORE_IP2] +X IPv4_address [IGNORE_IP3] +X #IPv4_address 192.168.0.100 # virtual IP 1 +X #IPv4_address 192.168.1.100 # virtual IP 2 +X #IPv4_address 192.168.0.1 +X #IPv4_address 192.168.1.1 +X #IPv4_address 192.168.100.100 # dedicated link ip +X # +X # You can also specify networks in format IP/cidr. +X # IPv4_address 192.168.0.0/24 +X # +X # You can also specify an IPv6 address +X # IPv6_address ::1 +X } +X +X # +X # Uncomment this line below if you want to filter by flow state. +X # This option introduces a trade-off in the replication: it +X # reduces CPU consumption at the cost of having lazy backup +X # firewall replicas. The existing TCP states are: SYN_SENT, +X # SYN_RECV, ESTABLISHED, FIN_WAIT, CLOSE_WAIT, LAST_ACK, +X # TIME_WAIT, CLOSED, LISTEN. +X # +X # State Accept { +X # ESTABLISHED CLOSED TIME_WAIT CLOSE_WAIT for TCP +X # } +X } +X +X # default debian service unit file is of Type=notify +X Systemd on +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/conntrackd.conf.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ': 'MD5 check failed' + ) << \SHAR_EOF +13781a8581b74b0cf402c01264bdca48 cloud_scripts/opt/cloud/templates/conntrackd.conf.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ'` -ne 15888 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' is not 15888" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +ROUTER_BIN_PATH="/ramdisk/rrouter" +ROUTER_LOG="${ROUTER_BIN_PATH}/keepalived.log" +STRIKE_FILE="$ROUTER_BIN_PATH/keepalived.strikes" +TS_FILE="$ROUTER_BIN_PATH/keepalived.ts" +CT_FILE="$ROUTER_BIN_PATH/keepalived.ct" +X +checktime=$(date +%s) +hbtime=$(cat $TS_FILE) +diff=$(($checktime - $hbtime)) +X +lastcheck=0 +if [ -e $CT_FILE ] +then +X lastcheck=$(cat $CT_FILE 2>/dev/null) +fi +checkdiff=$(($checktime - $lastcheck)) +if [ $checkdiff -ge 0 ] && [ $checkdiff -lt 30 ] +then +X exit +fi +echo $checktime > $CT_FILE +X +s=0 +if [ $diff -gt 10 ] +then +X if [ -e $STRIKE_FILE ] +X then +X s=$(cat $STRIKE_FILE 2>/dev/null) +X fi +X s=$(($s+1)) +X echo $s > $STRIKE_FILE +X echo "Check time: $checktime, last heartbeat time: $hbtime, time diff: $diff, strike count: $s" >> $ROUTER_LOG +else +X rm -f $STRIKE_FILE +fi +X +if [ $s -gt 3 ] +then +X systemctl stop --now keepalived >> $ROUTER_LOG 2>&1 +X systemctl stop --now conntrackd >> $ROUTER_LOG 2>&1 +X +X #Set fault so we have the same effect as a KeepaliveD fault. +X python /opt/cloud/bin/master.py --fault +X +X pkill -9 keepalived >> $ROUTER_LOG 2>&1 || true +X pkill -9 conntrackd >> $ROUTER_LOG 2>&1 || true +X echo Status: FAULT \(keepalived process is dead\) >> $ROUTER_LOG +X exit +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ': 'MD5 check failed' + ) << \SHAR_EOF +7040d7485f89a97be367132d28af1267 cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ'` -ne 2037 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' is not 2037" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/check_bumpup.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/check_bumpup.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/check_bumpup.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +cat /tmp/rrouter_bumped +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/check_bumpup.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/check_bumpup.sh': 'MD5 check failed' + ) << \SHAR_EOF +ab6cbce5de505d137d05bcae1af8e18a cloud_scripts/opt/cloud/templates/check_bumpup.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/check_bumpup.sh'` -ne 822 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' is not 822" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/keepalived.conf.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/keepalived.conf.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/keepalived.conf.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' && +! Licensed to the Apache Software Foundation (ASF) under one +! or more contributor license agreements. See the NOTICE file +! distributed with this work for additional information +! regarding copyright ownership. The ASF licenses this file +! to you under the Apache License, Version 2.0 (the +! "License"); you may not use this file except in compliance +! with the License. You may obtain a copy of the License at +! +! http://www.apache.org/licenses/LICENSE-2.0 +! +! Unless required by applicable law or agreed to in writing, +! software distributed under the License is distributed on an +! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +! KIND, either express or implied. See the License for the +! specific language governing permissions and limitations +! under the License. +X +global_defs { +X router_id [ROUTER_ID] +} +X +vrrp_script heartbeat { +X script "[RROUTER_BIN_PATH]/heartbeat.sh" +X interval 5 +} +X +vrrp_instance inside_network { +X state BACKUP +X interface eth2 +X virtual_router_id 51 +X nopreempt +X +X advert_int 1 +X +X #use_vmac +X #vmac_xmit_base +X +X authentication { +X auth_type AH +X auth_pass PASS +X } +X +X virtual_ipaddress { +X [ROUTER_IP] brd [BOARDCAST] dev eth2 +X } +X +X track_script { +X heartbeat +X } +X +X notify_backup "/opt/cloud/bin/master.py --backup" +X notify_master "/opt/cloud/bin/master.py --master" +X notify_fault "/opt/cloud/bin/master.py --fault" +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/keepalived.conf.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ': 'MD5 check failed' + ) << \SHAR_EOF +464642e87bbb032071111b84f82ba135 cloud_scripts/opt/cloud/templates/keepalived.conf.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ'` -ne 1429 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' is not 1429" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/prepare_pxe.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/prepare_pxe.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/prepare_pxe.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' && +#!/bin/sh +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# # regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +X +set +u +X +err_exit() { +X echo $1 +X exit 1 +} +X +success() { +X exit 0 +} +X +TFTP_ROOT='/opt/tftpboot' +PXELINUX_CFG_DIR='/opt/tftpboot/pxelinux.cfg' +X +kernel_nfs_path=$1 +kernel_file_name=`basename $kernel_nfs_path` +initrd_nfs_path=$2 +initrd_file_name=`basename $initrd_nfs_path` +tmpt_uuid=$3 +pxe_cfg_filename=$4 +ks_file=$5 +X +kernel_path=$tmpt_uuid/$kernel_file_name +initrd_path=$tmpt_uuid/$initrd_file_name +X +cat > $PXELINUX_CFG_DIR/$pxe_cfg_filename </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh': 'MD5 check failed' + ) << \SHAR_EOF +8b495c4ea50905f4197974ee82e607ba cloud_scripts/opt/cloud/bin/prepare_pxe.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh'` -ne 1792 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' is not 1792" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_forwardingrules.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_forwardingrules.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_forwardingrules.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, rules): +X for rule in rules["rules"]: +X source_ip = rule["source_ip_address"] +X destination_ip = rule["destination_ip_address"] +X revoke = rule["revoke"] +X +X newrule = dict() +X newrule["public_ip"] = source_ip +X newrule["internal_ip"] = destination_ip +X +X if rules["type"] == "staticnatrules": +X newrule["type"] = "staticnat" +X elif rules["type"] == "forwardrules": +X newrule["type"] = "forward" +X newrule["public_ports"] = rule["source_port_range"] +X newrule["internal_ports"] = rule["destination_port_range"] +X newrule["protocol"] = rule["protocol"] +X +X if not revoke: +X if rules["type"] == "staticnatrules": +X dbag[source_ip] = [newrule] +X elif rules["type"] == "forwardrules": +X index = -1 +X if source_ip in dbag.keys(): +X for forward in dbag[source_ip]: +X if ruleCompare(forward, newrule): +X index = dbag[source_ip].index(forward) +X if not index == -1: +X dbag[source_ip][index] = newrule +X else: +X dbag[source_ip].append(newrule) +X else: +X dbag[source_ip] = [newrule] +X else: +X if rules["type"] == "staticnatrules": +X if source_ip in dbag.keys(): +X del dbag[source_ip] +X elif rules["type"] == "forwardrules": +X if source_ip in dbag.keys(): +X index = -1 +X for forward in dbag[source_ip]: +X if ruleCompare(forward, newrule): +X index = dbag[source_ip].index(forward) +X print "removing index %s" % str(index) +X if not index == -1: +X del dbag[source_ip][index] +X +X return dbag +X +X +# Compare function checks only the public side, those must be equal the internal details could change +def ruleCompare(ruleA, ruleB): +X if not ruleA["type"] == ruleB["type"]: +X return False +X if ruleA["type"] == "staticnat": +X return ruleA["public_ip"] == ruleB["public_ip"] +X elif ruleA["type"] == "forward": +X return ruleA["public_ip"] == ruleB["public_ip"] and ruleA["public_ports"] == ruleB["public_ports"] \ +X and ruleA["protocol"] == ruleB["protocol"] +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_forwardingrules.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py': 'MD5 check failed' + ) << \SHAR_EOF +278288da98263d674e9d0d0aecaca56d cloud_scripts/opt/cloud/bin/cs_forwardingrules.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py'` -ne 3239 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' is not 3239" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpc_netusage.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_netusage.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_netusage.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +source /root/func.sh +source /opt/cloud/bin/vpc_func.sh +X +vpnoutmark="0x525" +vpninmark="0x524" +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s -[c|g|r|n|d] [-l ] [-v ] \n" $(basename $0) >&2 +} +X +create_usage_rules () { +X iptables-save|grep "NETWORK_STATS_$ethDev" > /dev/null +X if [ $? -gt 0 ] +X then +X iptables -N NETWORK_STATS_$ethDev > /dev/null; +X iptables -I FORWARD -j NETWORK_STATS_$ethDev > /dev/null; +X iptables -A NETWORK_STATS_$ethDev -o $ethDev -s $vcidr > /dev/null; +X iptables -A NETWORK_STATS_$ethDev -i $ethDev -d $vcidr > /dev/null; +X fi +X return $? +} +X +create_vpn_usage_rules () { +X iptables-save|grep "VPN_STATS_$ethDev" > /dev/null +X if [ $? -gt 0 ] +X then +X iptables -t mangle -N VPN_STATS_$ethDev > /dev/null; +X iptables -t mangle -I FORWARD -j VPN_STATS_$ethDev > /dev/null; +X iptables -t mangle -A VPN_STATS_$ethDev -o $ethDev -m mark --mark $vpnoutmark > /dev/null; +X iptables -t mangle -A VPN_STATS_$ethDev -i $ethDev -m mark --mark $vpninmark > /dev/null; +X fi +X return $? +} +X +remove_usage_rules () { +X return 0 +} +X +get_usage () { +X iptables -L NETWORK_STATS_$ethDev -n -v -x 2> /dev/null | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null +X return 0 +} +X +get_vpn_usage () { +X iptables -t mangle -L VPN_STATS_$ethDev -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null +X if [ $? -gt 0 ] +X then +X printf $? +X return 1 +X fi +} +X +reset_usage () { +X iptables -Z NETWORK_STATS_$ethDev > /dev/null +X if [ $? -gt 0 -a $? -ne 2 ] +X then +X return 1 +X fi +} +X +#set -x +X +cflag= +gflag= +rflag= +lflag= +vflag= +nflag= +dflag= +X +while getopts 'cgndrl:v:' OPTION +do +X case $OPTION in +X c) cflag=1 +X ;; +X g) gflag=1 +X ;; +X r) rflag=1 +X ;; +X l) lflag=1 +X publicIp="$OPTARG" +X ;; +X v) vflag=1 +X vcidr="$OPTARG" +X ;; +X n) nflag=1 +X ;; +X d) dflag=1 +X ;; +X i) #Do nothing, since it's parameter for host script +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +ethDev=$(getEthByIp $publicIp) +if [ "$cflag" == "1" ] +then +X if [ "$ethDev" != "" ] +X then +X create_usage_rules +X create_vpn_usage_rules +X unlock_exit 0 $lock $locked +X fi +fi +X +if [ "$gflag" == "1" ] +then +X get_usage +X unlock_exit $? $lock $locked +fi +X +if [ "$nflag" == "1" ] +then +X #get_vpn_usage +X unlock_exit $? $lock $locked +fi +X +if [ "$dflag" == "1" ] +then +X #remove_usage_rules +X unlock_exit 0 $lock $locked +fi +X +if [ "$rflag" == "1" ] +then +X reset_usage +X unlock_exit $? $lock $locked +fi +X +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_netusage.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh': 'MD5 check failed' + ) << \SHAR_EOF +f3f8069de696e92a24cbc694275c0bd5 cloud_scripts/opt/cloud/bin/vpc_netusage.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh'` -ne 3377 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' is not 3377" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/configure.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/configure.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/configure.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/configure.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/configure.py +M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&-E<'0@24]%2@I"B`@("`@("`@ +M("`@("`@("`@("`@9W5E22R)$;VU57U)E<75E&-E<'0@17AC97!T:6]N(&%S +M(&4Z"B`@("`@("`@("`@("`@("`@("`@;&]G9VEN9RYE7!E)UT@/3T@)V%L;"<@86YD(&]B +M:ELG7!E(#T@(F%N>2(*("`@("`@("`@("`@:68@ +M(FEC;7!?='EP92(@:6X@7,H*2!A;F0@7!E)UT*("`@("`@("`@("`@:68@(FEC +M;7!?8V]D92(@:6X@7,H*2!A;F0@7!E)UTL('-E;&8N7!E("5S("UJ("5S(B`E("AI8VUP7W1Y<&4L('-E;&8N&5C=71E*&1S=$EP2==.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U +M;&5;)V%C=&EO;B==(#T@(D%#0T505"(*("`@("`@("`@("`@("`@("`@("!E +M;'-E.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5;)V%C=&EO +M;B==(#T@(D123U`B"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@ +M("`@("`@("`@(",@1F]R(&]T:&5R(')U;&5S(&%D9&5D+"!I9B!D969A=6QT +M7V5G7!E("5S(B`E(&EC;7!?='EP90H@("`@("`@("`@ +M("`@("`@96QI9B!R=6QE6R=P7!E+B!3;RP@:71S(&9W(&%T=')I8G5T92!I7!E +M(#T@(F%N>2(*("`@("`@("`@("`@("`@('-E;&8N<')O=&]C;VP@/2!S96QF +M+G1Y<&4*("`@("`@("`@("`@("`@(&EF(")I8VUP7W1Y<&4B(&EN(')U;&4N +M:V5Y7!E+"!R=6QE6R=I8VUP7V-O9&4G72D*("`@("`@("`@("`@("`@(&EF('-E +M;&8N='EP92`]/2`B<')O=&]C;VPB.@H@("`@("`@("`@("`@("`@("`@(&EF +M(')U;&5;)W!R;W1O8V]L)UT@/3T@-#$Z"B`@("`@("`@("`@("`@("`@("`@ +M("`@(')U;&5;)W!R;W1O8V]L)UT@/2`B:7!V-B(*("`@("`@("`@("`@("`@ +M("`@("!S96QF+G!R;W1O8V]L(#T@&5C=71E*")I +M<'1A8FQE+4$O:7!T86)L97,@+70@9FEL=&5R("U$+V&5C=71E +M*")I<'-E="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\ +M(&EP&5C=71E*")I<'-E +M="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP2!V86QI9"!D871A"B`@("`@("`@("`@("`@("!I9B!F;VQD97(@(3T@(G5S +M97)D871A(B!A;F0@9F]L9&5R("$](")M971A9&%T82(Z"B`@("`@("`@("`@ +M("`@("`@("`@8V]N=&EN=64*"B`@("`@("`@("`@("`@("!I9B!F:6QE(#T] +M("(B.@H@("`@("`@("`@("`@("`@("`@(&-O;G1I;G5E"@H@("`@("`@("`@ +M("`@("`@7,N97AI="@Q*0H@("`@("`@("`@("!I9B!O2Q!;&QO=UQN1&5N>2!F2!E>&ES=',L('=E(&1O(&ET('1H +M:7,@=V%Y(&9O7,N97AI +M="@Q*0H*("`@("`@("!F:"`](&]P96XH:'1A8V-E2`] +M(")297=R:71E4G5L92!>;65T82UD871A+R@N*RDD("`N+B\B("L@9F]L9&5R +M("L@(B\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%=(@H@("`@("`@("`@ +M("!H=&%C8V5S7,N97AI="@Q +M*2`@(R!&25A-10H@("`@("`@(')E='5R;B!4&ET*#$I("`C($9)6$U%"B`@("`@("`@:7!S96,N=G!N+2@N*BDN8V]N9B(L(&9I;&4I"B`@ +M("`@("`@("`@(&EF(&TZ"B`@("`@("`@("`@("`@("!S96QF+F-O;F9I<',N +M87!P96YD*&TN9W)O=7`H,2DI"@H@("`@("`@(&9O&5C=71E*")I +M<'-E8R!R96QO860B*0H*("`@(&1E9B!C;VYF:6=U#4R-2`M:B!!0T-%4%0B("4@9&5V72D* +M("`@("`@("!F;W(@;F5T(&EN(&]B:ELG<&5E&UA&UA5]I<"=="B`@("`@("`@<&5E7!E/71U;FYE;"(I +M"B`@("`@("`@9FEL92YA9&1E<2@B(&%U=&AB>3US96-R970B*0H@("`@("`@ +M(&9I;&4N861D97$H(B!K97EE>&-H86YG93UI:V4B*0H@("`@("`@(&9I;&4N +M861D97$H(B!I:V4])7,B("4@:6ME<&]L:6-Y*0H@("`@("`@(&9I;&4N861D +M97$H(B!I:V5L:69E=&EM93TE3TS,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1T:6UE;W5T +M/3$R,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1A8W1I;VX]')A;F=E*#,I.@H@("`@("`@("`@ +M("!R97-U;'0@/2!#&5C=71E*"=I<'-E8R!S=&%T=7,@=G!N +M+25S('P@9W)E<"`B)7,B)R`E("AR:6=H='!E97(L('!E97)L:7-T+G-P;&ET +M*"(L(BP@,2E;,%TI*0H@("`@("`@("`@("!I9B!L96XH2P@)R,G*0H@("`@("`@(&EF(&YO="!U&5C=71E*")T9&)D=6UP("]V87(O&5C=71E*"=K:6QL("TY("5S)R`E('!I9"D*"@IC;&%S +M&5C=71E*")S>7-T96UC=&P@2YS96-R971S(B`E("AS96QF+E903D-/3D9$25(I"B`@ +M("`@("`@>&PR='!D8V]N9F9I;&4@/2`B+V5T8R]X;#)T<&0O>&PR='!D+F-O +M;F8B"B`@("`@("`@>&PR='!O<'1I;VYS9FEL92`]("(O971C+W!P<"]O<'1I +M;VYS+GAL,G1P9"(*"B`@("`@("`@;&]C86QI<"`](&]B:ELG;&]C86Q?:7`G +M70H@("`@("`@(&QO8V%L8VED2`Z(%!32R!<(B5S7"(B("4@*&QE9G0L('!S:RDI"B`@ +M("`@("`@&PR='!D8V]N9F9I;&4I"B`@("`@("`@>&PR='!D8V]N9BYA9&1E +M<2@B:7`@&PR='!O<'1I;VYS+F-O;6UI="@I"@H@("`@9&5F(')E;6]T96%C8V5S +M2@I"B`@("`@("`@4EP +M*')U;&5;)W!U8FQI8U]I<"==*0H@("`@("`@(&EN=&5R;F%L7V9W:6YT97)F +M86-E(#T@4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI +M"B`@("`@("`@<'5B;&EC7V9W<&]R=',@/2!S96QF+G!O4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI +M+`H@("`@("`@("`@("`@("`@&UA2(Z"B`@("`@("`@("`@(&9W7W!R97)O=71? +M2(Z"B`@("`@ +M("`@("`@(&9W7W!O2(Z"B`@("`@("`@ +M("`@(&9W7W!O2(Z"B`@("`@ +M("`@("`@(&9W7V]U='!U=%]R=6QE("L]("(@+2UD<&]R="`E2(Z"B`@("`@("`@("`@ +M(&9W7V]U='!U=%]R=6QE("L]("(Z(B`K('-E;&8N<&]R='-4;U-T4EP*')U;&5;)VEN=&5R;F%L7VEP +M)UTI+`H@("`@("`@("`@("`@("`@&9F9F9F9F9F +M("TM8W1M87-K(#!X9F9F9F9F9F8B("4*("`@("`@("`@("`@("`@("`@("`@ +M("`@4EP*')U;&5;(FEN=&5R;F%L +M7VEP(ETI+"!S96QF+F=E=$=U97-T27`H*2E=*0H*"F-L87-S($EP5&%B;&5S +M17AE8W5T;W(Z"@H@("`@8V]N9FEG(#T@3F]N90H*("`@(&1E9B!?7VEN:71? +M7RAS96QF+"!C;VYF:62!PR)P&5C=71OR)P&5C=71OR)P&5C=71O7!E.B`E&5C27!T86)L97,H8V]N9FEG +M*3H*("`@("`@("!L;V=G:6YG+F1E8G5G*")0&5C=71O7,H*3H*("`@("`@("`@ +M("`@97AE8T1A=&%B86&5C +M27!T86)L97,H8V]N9FEG*0H@("`@96QI9B!J&5C27!T86)L +M97,H8V]N9FEG*0H@("`@96QS93H*("`@("`@("!L;V=G:6YG+G=A7!E/25S(B`E("AP/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/configure.py': 'MD5 check failed' + ) << \SHAR_EOF +8987217852a386250687dfce6d0b10be cloud_scripts/opt/cloud/bin/configure.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/configure.py'` -ne 45920 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/configure.py' is not 45920" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_vmp.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vmp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vmp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vmp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_vmp.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=WWT*("`@(')C6R=I9"==(#T@)W9M<&%S/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vmp.py': 'MD5 check failed' + ) << \SHAR_EOF +3e1ea6831cb27eedc825e25bf817cb9c cloud_scripts/opt/cloud/bin/cs_vmp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vmp.py'` -ne 1126 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vmp.py' is not 1126" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# getRouterMonitorResults.sh --- Send the monitor results to Management Server +X +if [ "$1" == "true" ] +then +X python /root/monitorServices.py > /dev/null +fi +X +printf "FAILING CHECKS:\n" +X +if [ -f /root/basic_failing_health_checks ] +then +X echo `cat /root/basic_failing_health_checks` +fi +X +if [ -f /root/advanced_failing_health_checks ] +then +X echo `cat /root/advanced_failing_health_checks` +fi +X +printf "MONITOR RESULTS:\n" +X +echo "{\"basic\":" +if [ -f /root/basic_monitor_results.json ] +then +X echo `cat /root/basic_monitor_results.json` +else +X echo "{}" +fi +echo ",\"advanced\":" +if [ -f /root/advanced_monitor_results.json ] +then +X echo `cat /root/advanced_monitor_results.json` +else +X echo "{}" +fi +X +echo "}" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh': 'MD5 check failed' + ) << \SHAR_EOF +35649a8a1a8339aaa42a311826699849 cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh'` -ne 1526 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' is not 1526" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vr_cfg.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vr_cfg.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vr_cfg.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +#set -x +X +cfg= +version= +log=/var/log/cloud.log +X +log_it() { +X logger -t cloud "$*" +X echo "$(date) : $*" >> $log +} +X +while getopts 'c:' OPTION; do +X case $OPTION in +X c) cfg="$OPTARG" ;; +esac; done +X +export DEFER_CONFIG=true +while read line; do +X #comment +X if [[ $line == \#* ]]; then +X continue +X +X elif [ "$line" == "" ]; then +X read line +X version=$line +X log_it "VR config: configuation format version $version" +X #skip +X read line +X +X elif [ "$line" == " +X read line +X log_it "VR config: execution success " +X +X elif [ "$line" == "" ]; then +X read line +X file=$line +X log_it "VR config: creating file: $file" +X rm -f $file +X while read -r line; do +X if [ "$line" == "" ]; then +X break +X fi +X echo $line >> $file +X done +X log_it "VR config: create file success" +X +X fi +X +done < $cfg +X +# archive the configuration file +mv $cfg /var/cache/cloud/processed/ +X +unset DEFER_CONFIG +# trigger finish_config() +if [ -f /etc/cloudstack/dhcpentry.json ]; then +X /opt/cloud/bin/configure.py vm_dhcp_entry.json +fi +if [ -f /etc/cloudstack/vmdata.json ]; then +X /opt/cloud/bin/configure.py vm_metadata.json +fi +X +# Flush kernel conntrack table +log_it "VR config: Flushing conntrack table" +conntrackd -d 2> /dev/null +if [ $? -eq 0 ]; then +X conntrackd -F +X conntrackd -k +else +X conntrackd -F +fi +log_it "VR config: Flushing conntrack table completed" +X +Xexit 0 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vr_cfg.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vr_cfg.sh': 'MD5 check failed' + ) << \SHAR_EOF +da02bd413616a9cc131fd039e627eb3e cloud_scripts/opt/cloud/bin/vr_cfg.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vr_cfg.sh'` -ne 2725 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' is not 2725" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpc_snat.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_snat.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_snat.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# @VERSION@ +X +source /root/func.sh +source /opt/cloud/bin/vpc_func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage:\n %s -A -l \n" $(basename $0) >&2 +X printf " %s -D -l \n" $(basename $0) >&2 +} +X +X +add_snat() { +X logger -t cloud "$(basename $0):Added SourceNAT $pubIp on interface $ethDev" +X vpccidr=$(getVPCcidr) +X sudo iptables -D FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT +X sudo iptables -A FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT +X sudo iptables -t nat -D POSTROUTING -j SNAT -o $ethDev --to-source $pubIp +X sudo iptables -t nat -A POSTROUTING -j SNAT -o $ethDev --to-source $pubIp +X return $? +} +remove_snat() { +X logger -t cloud "$(basename $0):Removing SourceNAT $pubIp on interface $ethDev" +X sudo iptables -t nat -D POSTROUTING -j SNAT -o $ethDev --to-source $pubIp +X return $? +} +X +#set -x +lflag=0 +cflag=0 +op="" +X +while getopts 'ADl:c:' OPTION +do +X case $OPTION in +X A) Aflag=1 +X op="-A" +X ;; +X D) Dflag=1 +X op="-D" +X ;; +X l) lflag=1 +X pubIp="$OPTARG" +X ;; +X c) cflag=1 +X ethDev="$OPTARG" +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [ "$Aflag$Dflag" != "1" ] +then +X usage +X unlock_exit 2 $lock $locked +fi +X +if [ "$lflag$cflag" != "11" ] +then +X usage +X unlock_exit 2 $lock $locked +fi +X +if [ "$Aflag" == "1" ] +then +X add_snat $publicIp +X unlock_exit $? $lock $locked +fi +X +if [ "$Dflag" == "1" ] +then +X remove_sat $publicIp +X unlock_exit $? $lock $locked +fi +X +unlock_exit 1 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_snat.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_snat.sh': 'MD5 check failed' + ) << \SHAR_EOF +23502a2ce3829fb787464124f13b9141 cloud_scripts/opt/cloud/bin/vpc_snat.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_snat.sh'` -ne 2346 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' is not 2346" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpc_staticroute.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_staticroute.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_staticroute.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# @VERSION@ +X +source /root/func.sh +source /opt/cloud/bin/vpc_func.sh +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s: -a < routes > \n" $(basename $0) >&2 +} +X +#set -x +X +flush_table_backup() { +X flush_table "static_route_back" +} +X +flush_table() { +X local tab=$1 +X sudo ip route flush table $tab +} +X +copy_table() { +X local from=$1 +X local to=$2 +X sudo ip route show table $from | while read route +X do +X sudo ip route add table $to $route +X done +} +X +backup_table() { +X flush_table "static_route_back" +X copy_table "static_route" "static_route_back" +X flush_table "static_route" +} +X +restore_table() { +X flush_table "static_route" +X copy_table "static_route_back" "static_route" +X flush_table "static_route_back" +} +X +static_route() { +X local rule=$1 +X local ip=$(echo $rule | cut -d: -f1) +X if [ $ip == "Revoke" ] +X then +X return 0 +X fi +X local gateway=$(echo $rule | cut -d: -f2) +X local cidr=$(echo $rule | cut -d: -f3) +X logger -t cloud "$(basename $0): static route: public ip=$ip \ +X gateway=$gateway cidr=$cidr" +X local dev=$(getEthByIp $ip) +X if [ $? -gt 0 ] +X then +X return 1 +X fi +X sudo ip route add $cidr dev $dev via $gateway table static_route &>/dev/null +X result=$? +X logger -t cloud "$(basename $0): done static route: public ip=$ip \ +X gateway=$gateway cidr=$cidr" +X return $result +} +X +gflag= +aflag= +while getopts 'a:' OPTION +X +do +X case $OPTION in +X a) aflag=1 +X rules="$OPTARG" +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [ -n "$rules" ] +then +X rules_list=$(echo $rules | cut -d, -f1- --output-delimiter=" ") +fi +X +success=0 +X +backup_table +X +for r in $rules_list +do +X static_route $r +X success=$? +X if [ $success -gt 0 ] +X then +X logger -t cloud "$(basename $0): failure to apply fw rules for guest network: $gcidr" +X break +X else +X logger -t cloud "$(basename $0): successful in applying fw rules for guest network: $gcidr" +X fi +done +X +if [ $success -gt 0 ] +then +X logger -t cloud "$(basename $0): restoring from backup for guest network: $gcidr" +X restore_table +else +X logger -t cloud "$(basename $0): deleting backup for guest network: $gcidr" +X flush_table_backup +fi +unlock_exit $success $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_staticroute.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh': 'MD5 check failed' + ) << \SHAR_EOF +4080c04ff7600874ef4a4364aefc4d18 cloud_scripts/opt/cloud/bin/vpc_staticroute.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh'` -ne 3043 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' is not 3043" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/baremetal-vr.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/baremetal-vr.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/baremetal-vr.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/baremetal-vr.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/baremetal-vr.py +M(TQI8V5N6ME>2<@:6X@<#H*("`@("`@("`@("`@("`@("`@("`@("`@ +M2`]('`N6ME>2!I;B`E0H*("`@(&1E +M9B!?9V5T7VUG;71?:7`H4)AFEP*')E<7,N:V5Y2P@:&%S:%-T5]P/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/baremetal-vr.py': 'MD5 check failed' + ) << \SHAR_EOF +f87e8890aa7ad3cc522c5c5ceb2fbf69 cloud_scripts/opt/cloud/bin/baremetal-vr.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/baremetal-vr.py'` -ne 5587 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/baremetal-vr.py' is not 5587" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_firewallrules.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_firewallrules.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_firewallrules.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import copy +X +X +def merge(dbag, data): +X dbagc = copy.deepcopy(dbag) +X if "rules" not in data: +X return dbagc +X for rule in data['rules']: +X id = str(rule['id']) +X if rule['revoked']: +X if id in dbagc.keys(): +X del(dbagc[id]) +X elif id not in dbagc.keys(): +X dbagc[id] = rule +X return dbagc +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_firewallrules.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py': 'MD5 check failed' + ) << \SHAR_EOF +6d3faf49679b84bf9a098eee6b630f69 cloud_scripts/opt/cloud/bin/cs_firewallrules.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py'` -ne 1141 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' is not 1141" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/netusage.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/netusage.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/netusage.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/netusage.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/netusage.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +X +# netusage.sh -- create iptable rules to gather network stats, running within DomR +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s -[c|g|r] [-[a|d] ]\n" $(basename $0) >&2 +} +X +create_usage_rules () { +X iptables-save|grep "INPUT -j NETWORK_STATS" > /dev/null +X if [ $? -eq 0 ] +X then +X return $? +X fi +X iptables -N NETWORK_STATS > /dev/null +X iptables -I FORWARD -j NETWORK_STATS > /dev/null +X iptables -I INPUT -j NETWORK_STATS > /dev/null +X iptables -I OUTPUT -j NETWORK_STATS > /dev/null +X iptables -A NETWORK_STATS -i eth0 -o eth2 > /dev/null +X iptables -A NETWORK_STATS -i eth2 -o eth0 > /dev/null +X iptables -A NETWORK_STATS -o eth2 ! -i eth0 -p tcp > /dev/null +X iptables -A NETWORK_STATS -i eth2 ! -o eth0 -p tcp > /dev/null +X return $? +} +X +add_public_interface () { +X local pubIf=$1 +X iptables-save|grep "NETWORK_STATS -i eth0 -o $pubIf" > /dev/null +X if [ $? -eq 0 ] +X then +X return $? +X fi +X iptables -A NETWORK_STATS -i eth0 -o $pubIf > /dev/null +X iptables -A NETWORK_STATS -i $pubIf -o eth0 > /dev/null +X iptables -A NETWORK_STATS -o $pubIf ! -i eth0 -p tcp > /dev/null +X iptables -A NETWORK_STATS -i $pubIf ! -o eth0 -p tcp > /dev/null +X return $? +} +X +delete_public_interface () { +X local pubIf=$1 +X echo $pubIf >> /root/removedVifs +X return $? +} +X +get_usage () { +X iptables -L NETWORK_STATS -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null +X if [ -f /root/removedVifs ] ; then iptables -Z NETWORK_STATS ; fi; > /dev/null +X /root/clearUsageRules.sh > /dev/null +X if [ $? -gt 0 -a $? -ne 2 ] +X then +X printf $? +X return 1 +X fi +} +X +reset_usage () { +X iptables -Z NETWORK_STATS > /dev/null +X if [ $? -gt 0 -a $? -ne 2 ] +X then +X return 1 +X fi +} +X +#set -x +X +cflag= +gflag= +rflag= +iflag= +aflag= +dflag= +X +while getopts 'cgria:d:' OPTION +do +X case $OPTION in +X c) cflag=1 +X ;; +X g) gflag=1 +X ;; +X r) rflag=1 +X ;; +X a) aflag=1 +X publicIf="$OPTARG" +X ;; +X d) dflag=1 +X publicIf="$OPTARG" +X ;; +X i) #Do nothing, since it's parameter for host script +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [ "$cflag" == "1" ] +then +X #create_usage_rules +X unlock_exit $? $lock $locked +fi +X +if [ "$gflag" == "1" ] +then +X get_usage +X unlock_exit $? $lock $locked +fi +X +if [ "$rflag" == "1" ] +then +X reset_usage +X unlock_exit $? $lock $locked +fi +X +if [ "$aflag" == "1" ] +then +X #add_public_interface $publicIf +X unlock_exit $? $lock $locked +fi +X +if [ "$dflag" == "1" ] +then +X #delete_public_interface $publicIf +X unlock_exit $? $lock $locked +fi +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/netusage.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/netusage.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/netusage.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/netusage.sh': 'MD5 check failed' + ) << \SHAR_EOF +2966c6cafee62e66ff903e53367b498b cloud_scripts/opt/cloud/bin/netusage.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/netusage.sh'` -ne 3478 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/netusage.sh' is not 3478" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/monitor_service.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/monitor_service.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/monitor_service.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/monitor_service.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/monitor_service.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +set -x +usage() { +X printf "Usage: %s: -c config string \n" $(basename $0) >&2 +} +X +configFile='/etc/monitor.conf' +X +create_config() { +services=$1; +services_list=$(echo $services | cut -d, -f1- --output-delimiter=" "); +X +echo "#Monitor services config" >$configFile +X +for s in $services_list +do +service=$(echo $s | cut -d: -f1); +processname=$(echo $s | cut -d: -f2); +service_name=$(echo $s | cut -d: -f3); +pidfile=$(echo $s | cut -d: -f4); +X +echo "$service" >> $configFile; +echo $processname >> $configFile +echo $service_name >> $configFile +echo $pidfile >> $configFile +X +done +X +} +X +config=$2 +if [ -n "$3" ] +then +X +#delete cron job before updating config file +crontab -l|grep "monitorServices.py" +X +if [ $? -eq 0 ] +then +X t=`date +%s`; +X touch /tmp/monitor-$t.txt; +X conf=/tmp/monitor-$t.txt +X crontab -l >$conf +X sed -i /#monitoringConfig/,+3d $conf +X crontab $conf +X rm $conf +fi +X +X +logger -t cloud "deleted crontab entry for monitoring services" +unlock_exit 0 $lock $locked +fi +X +create_config $config +X +#add cron job +crontab -l|grep "monitorServices.py" +if [ $? -ne 0 ] +X then +X (crontab -l ;echo -e "#monitoringConfig\nSHELL=/bin/bash\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n */3 * * * * /usr/bin/python /root/monitorServices.py") | crontab - +X logger -t cloud "added crontab entry for monitoring services" +fi +X +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/monitor_service.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/monitor_service.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/monitor_service.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/monitor_service.sh': 'MD5 check failed' + ) << \SHAR_EOF +3419e7baf45ac36d3d69ca71ef7ab978 cloud_scripts/opt/cloud/bin/monitor_service.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/monitor_service.sh'` -ne 2294 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/monitor_service.sh' is not 2294" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_ip.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_ip.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_ip.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_ip.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_ip.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N7!E)UT@/2!I<%LG;G=?='EP92==+FQO=V5R*"D*("`@(&EF(&EP +M6R=N=U]T>7!E)UT@/3T@)V-O;G1R;VPG.@H@("`@("`@(&1B86=;:7!;)V1E +M=FEC92==72`](%MI<%T*("`@(&5L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_ip.py': 'MD5 check failed' + ) << \SHAR_EOF +856c6261f2876c280c49fa486f4f7408 cloud_scripts/opt/cloud/bin/cs_ip.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_ip.py'` -ne 2581 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_ip.py' is not 2581" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/bumpup_priority.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/bumpup_priority.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/bumpup_priority.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +touch /tmp/rrouter_bumped +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/bumpup_priority.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh': 'MD5 check failed' + ) << \SHAR_EOF +35091259ed848a9f7270aca1a90e95af cloud_scripts/opt/cloud/bin/bumpup_priority.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh'` -ne 824 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' is not 824" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/getRouterAlerts.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/getRouterAlerts.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/getRouterAlerts.sh (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/getRouterAlerts.sh +M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5LP77T*"B`@("`@("`@("`@ +M("`@("!T;T1A=&5686P])"AD871E("UD("(D9&%T979A;"(@(BLE/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh': 'MD5 check failed' + ) << \SHAR_EOF +6c3803100b0923fd3f9017a0e09d6fd5 cloud_scripts/opt/cloud/bin/getRouterAlerts.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh'` -ne 1706 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh' is not 1706" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/postinit.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/postinit.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/postinit.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# This scripts before ssh.service but after cloud-early-config +X +# Eject cdrom if any +eject || true +X +# Restart journald for setting changes to apply +systemctl restart systemd-journald +X +TYPE=$(grep -Po 'type=\K[a-zA-Z]*' /var/cache/cloud/cmdline) +if [ "$TYPE" == "router" ] || [ "$TYPE" == "vpcrouter" ] || [ "$TYPE" == "dhcpsrvr" ] +then +X if [ -x /opt/cloud/bin/update_config.py ] +X then +X /opt/cloud/bin/update_config.py cmd_line.json || true +X fi +fi +X +[ ! -f /var/cache/cloud/enabled_svcs ] && touch /var/cache/cloud/enabled_svcs +for svc in $(cat /var/cache/cloud/enabled_svcs) +do +X systemctl enable --now --no-block $svc +done +X +[ ! -f /var/cache/cloud/disabled_svcs ] && touch /var/cache/cloud/disabled_svcs +for svc in $(cat /var/cache/cloud/disabled_svcs) +do +X systemctl disable --now --no-block $svc +done +X +# Restore the persistent iptables nat, rules and filters for IPv4 and IPv6 if they exist +ipv4="/etc/iptables/rules.v4" +if [ -e $ipv4 ] +then +X iptables-restore < $ipv4 +fi +X +ipv6="/etc/iptables/rules.v6" +if [ -e $ipv6 ] +then +X ip6tables-restore < $ipv6 +fi +X +# Patch known systemd/sshd memory leak - https://github.com/systemd/systemd/issues/8015#issuecomment-476160981 +echo '@include null' >> /etc/pam.d/systemd-user +X +# Enable and Start SSH +systemctl enable --now --no-block ssh +X +date > /var/cache/cloud/boot_up_done +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/postinit.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/postinit.sh': 'MD5 check failed' + ) << \SHAR_EOF +170afadf6f130e9cb697dca65a87aacb cloud_scripts/opt/cloud/bin/setup/postinit.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/postinit.sh'` -ne 2122 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' is not 2122" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/secstorage.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/secstorage.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/secstorage.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_secstorage() { +X log_it "Setting up secondary storage system vm" +X +X echo "cloud apache2 nfs-common portmap" > /var/cache/cloud/enabled_svcs +X echo "conntrackd keepalived haproxy dnsmasq" > /var/cache/cloud/disabled_svcs +X mkdir -p /var/log/cloud +X +X setup_common eth0 eth1 eth2 +X setup_storage_network +X setup_system_rfc1918_internal +X +X log_it "Setting up entry in hosts" +X sed -i /$NAME/d /etc/hosts +X public_ip=`getPublicIp` +X echo "$public_ip $NAME" >> /etc/hosts +X +X log_it "Applying iptables rules" +X cp /etc/iptables/iptables-secstorage /etc/iptables/rules.v4 +X +X log_it "Configuring sshd" +X local hyp=$HYPERVISOR +X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then +X setup_sshd $ETH1_IP "eth1" +X else +X setup_sshd $ETH0_IP "eth0" +X fi +X +X log_it "Configuring apache2" +X setup_apache2 $ETH2_IP +X +X # Deprecated, should move to Cs Python all of it +X sed -e "s///" \ +X -e "s///" \ +X -e "s/Listen .*:8180/Listen $ETH2_IP:80/g" \ +X -e "s/Listen .*:8443/Listen $ETH2_IP:443/g" /etc/apache2/vhost.template > /etc/apache2/sites-enabled/vhost-${ETH2_IP}.conf +X +X log_it "Setting up apache2 for post upload of volume/template" +X a2enmod proxy +X a2enmod proxy_http +X a2enmod headers +X +X cat >/etc/apache2/cors.conf </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh': 'MD5 check failed' + ) << \SHAR_EOF +14aea171a5e0fdfd3069bb96bde91e0b cloud_scripts/opt/cloud/bin/setup/secstorage.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh'` -ne 2720 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' is not 2720" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/ilbvm.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +ilbvm_svcs() { +X echo "haproxy" > /var/cache/cloud/enabled_svcs +X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs +} +X +setup_ilbvm() { +X log_it "Setting up Internal Load Balancer system vm" +X setup_common eth0 eth1 +X #eth0 = guest network, eth1=control network +X +X sed -i /$NAME/d /etc/hosts +X echo "$ETH0_IP $NAME" >> /etc/hosts +X +X cp /etc/iptables/iptables-ilbvm /etc/iptables/rules.v4 +X setup_sshd $ETH1_IP "eth1" +X +X enable_fwding 0 +X enable_irqbalance 1 +} +X +ilbvm_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute ilbvm svcs" +X exit 1 +fi +setup_ilbvm +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/ilbvm.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh': 'MD5 check failed' + ) << \SHAR_EOF +87c70bdf6c0d4d41f0ff87475494188f cloud_scripts/opt/cloud/bin/setup/ilbvm.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh'` -ne 1442 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' is not 1442" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_vpcrouter() { +X log_it "Setting up VPC virtual router system vm" +X +X if [ -f /etc/hosts ]; then +X grep -q $NAME /etc/hosts || echo "127.0.0.1 $NAME" >> /etc/hosts; +X fi +X +X cat > /etc/network/interfaces << EOF +auto lo eth0 +iface lo inet loopback +EOF +X setup_interface "0" $ETH0_IP $ETH0_MASK $GW +X +X echo $NAME > /etc/hostname +X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon +X hostnamectl set-hostname $NAME +X +X #Nameserver +X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries +X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries +X if [ -n "$internalNS1" ] +X then +X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS1" > /etc/resolv.conf +X fi +X +X if [ -n "$internalNS2" ] +X then +X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS2" >> /etc/resolv.conf +X fi +X if [ -n "$NS1" ] +X then +X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS1" >> /etc/resolv.conf +X fi +X +X if [ -n "$NS2" ] +X then +X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS2" >> /etc/resolv.conf +X fi +X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] +X then +X if [ "$HYPERVISOR" == "vmware" ] || [ "$HYPERVISOR" == "hyperv" ]; +X then +X ip route add $MGMTNET via $LOCAL_GW dev eth0 +X # workaround to activate vSwitch under VMware +X timeout 3 ping -n -c 3 $LOCAL_GW || true +X fi +X fi +X +X ip route delete default +X # create route table for static route +X +X sudo echo "252 static_route" >> /etc/iproute2/rt_tables 2>/dev/null +X sudo echo "251 static_route_back" >> /etc/iproute2/rt_tables 2>/dev/null +X sudo ip rule add from $VPCCIDR table static_route 2>/dev/null +X sudo ip rule add from $VPCCIDR table static_route_back 2>/dev/null +X +X setup_vpc_apache2 +X +X enable_irqbalance 1 +X enable_vpc_rpsrfs 1 +X disable_rpfilter +X enable_fwding 1 +X enable_passive_ftp 1 +X cp /etc/iptables/iptables-vpcrouter /etc/iptables/rules.v4 +X setup_sshd $ETH0_IP "eth0" +X cp /etc/vpcdnsmasq.conf /etc/dnsmasq.conf +X cp /etc/cloud-nic.rules /etc/udev/rules.d/cloud-nic.rules +X echo "" > /etc/dnsmasq.d/dhcphosts.txt +X echo "dhcp-hostsfile=/etc/dhcphosts.txt" > /etc/dnsmasq.d/cloud.conf +X +X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" +X #DNS server will append $DOMAIN to local queries +X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf +X #answer all local domain queries +X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf +X +X command -v dhcp_release > /dev/null 2>&1 +X no_dhcp_release=$? +X if [ $no_dhcp_release -eq 0 ] +X then +X echo 1 > /var/cache/cloud/dnsmasq_managed_lease +X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf +X else +X echo 0 > /var/cache/cloud/dnsmasq_managed_lease +X fi +X +X # Setup hourly logrotate +X if [ -f /etc/cron.daily/logrotate ]; then +X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 +X fi +} +X +routing_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute routing_svcs" +X exit 1 +fi +setup_vpcrouter +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh': 'MD5 check failed' + ) << \SHAR_EOF +811420d11f97b1d7237b964e8bbbdf5d cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh'` -ne 3885 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' is not 3885" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/router.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/router.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/router.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/router.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/router.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +check_reboot_vmware() { +X if [ "$HYPERVISOR" != "vmware" ]; then +X return +X fi +X +X if [ -n "$MGMTNET" ]; then +X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') +X if ping -n -c 1 -W 3 $MGMT_GW &> /dev/null; then +X log_it "Management gateway pingable, skipping VR reboot" +X return +X fi +X fi +X +X log_it "Management gateway not pingable, rebooting VR" +X sync +X reboot +} +X +setup_router() { +X # To save router public interface and gw ip information +X touch /var/cache/cloud/ifaceGwIp +X +X oldmd5= +X [ -f "/etc/udev/rules.d/70-persistent-net.rules" ] && oldmd5=$(md5sum "/etc/udev/rules.d/70-persistent-net.rules" | awk '{print $1}') +X +X if [ -n "$ETH2_IP" ]; then +X setup_common eth0 eth1 eth2 +X +X if [ -n "$EXTRA_PUBNICS" ]; then +X for ((i = 3; i < 3 + $EXTRA_PUBNICS; i++)); do +X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" +X done +X fi +X else +X setup_common eth0 eth1 +X if [ -n "$EXTRA_PUBNICS" ]; then +X for ((i = 2; i < 2 + $EXTRA_PUBNICS; i++)); do +X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" +X done +X fi +X fi +X +X log_it "Checking udev NIC assignment order changes" +X if [ "$NIC_MACS" != "" ] +X then +X init_interfaces_orderby_macs "$NIC_MACS" "/tmp/interfaces" "/tmp/udev-rules" +X newmd5=$(md5sum "/tmp/udev-rules" | awk '{print $1}') +X rm /tmp/interfaces +X rm /tmp/udev-rules +X +X if [ "$oldmd5" != "$newmd5" ] +X then +X log_it "Reloading udev for new udev NIC assignment" +X udevadm control --reload-rules && udevadm trigger +X check_reboot_vmware +X fi +X fi +X +X setup_aesni +X setup_dnsmasq +X setup_apache2 $ETH0_IP +X +X sed -i /$NAME/d /etc/hosts +X echo "$ETH0_IP $NAME" >> /etc/hosts +X +X enable_irqbalance 1 +X disable_rpfilter_domR +X enable_fwding 1 +X enable_rpsrfs 1 +X enable_passive_ftp 1 +X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 +X setup_sshd $ETH1_IP "eth1" +X +X # Only allow DNS service for current network +X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X +X # Setup hourly logrotate +X if [ -f /etc/cron.daily/logrotate ]; then +X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 +X fi +} +X +routing_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute routing_svcs" +X exit 1 +fi +setup_router +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/router.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/router.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/router.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/router.sh': 'MD5 check failed' + ) << \SHAR_EOF +2ae62d5d44c716730231c9d77618fe91 cloud_scripts/opt/cloud/bin/setup/router.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/router.sh'` -ne 3355 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/router.sh' is not 3355" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/elbvm.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/elbvm.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/elbvm.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +elbvm_svcs() { +X echo "haproxy" > /var/cache/cloud/enabled_svcs +X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs +} +X +setup_elbvm() { +X log_it "Setting up Elastic Load Balancer system vm" +X setup_common eth0 eth1 +X sed -i /$NAME/d /etc/hosts +X public_ip=$ETH2_IP +X [ "$ETH2_IP" == "0.0.0.0" ] || [ "$ETH2_IP" == "" ] && public_ip=$ETH0_IP +X echo "$public_ip $NAME" >> /etc/hosts +X +X cp /etc/iptables/iptables-elbvm /etc/iptables/rules.v4 +X if [ "$SSHONGUEST" == "true" ] +X then +X setup_sshd $ETH0_IP "eth0" +X else +X setup_sshd $ETH1_IP "eth1" +X fi +X +X enable_fwding 0 +X enable_irqbalance 0 +} +X +elbvm_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute elbvm svcs" +X exit 1 +fi +setup_elbvm +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/elbvm.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh': 'MD5 check failed' + ) << \SHAR_EOF +2d34615f1d40f6125a2205e6118ba07f cloud_scripts/opt/cloud/bin/setup/elbvm.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh'` -ne 1578 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' is not 1578" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/bootstrap.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" +CMDLINE=/var/cache/cloud/cmdline +X +rm -f /var/cache/cloud/enabled_svcs +rm -f /var/cache/cloud/disabled_svcs +X +X. /lib/lsb/init-functions +X +log_it() { +X echo "$(date) $@" >> /var/log/cloud.log +X log_action_msg "$@" +} +X +hypervisor() { +X if [ -d /proc/xen ]; then +X mount -t xenfs none /proc/xen +X $(dmesg | grep -q "Xen HVM") +X if [ $? -eq 0 ]; then # 1=PV,0=HVM +X echo "xen-hvm" && return 0 +X else +X echo "xen-pv" && return 0 +X fi +X fi +X +X [ -x /usr/sbin/virt-what ] && local facts=( $(virt-what) ) +X if [ "$facts" != "" ]; then +X # Xen HVM is recognized as Hyperv when Viridian extensions are enabled +X if [ "${facts[-1]}" == "xen-domU" ] && [ "${facts[0]}" == "hyperv" ]; then +X echo "xen-hvm" && return 0 +X else +X echo ${facts[-1]} && return 0 +X fi +X fi +X +X grep -q QEMU /proc/cpuinfo && echo "kvm" && return 0 +X grep -q QEMU /var/log/messages && echo "kvm" && return 0 +X +X vmware-checkvm &> /dev/null && echo "vmware" && return 0 +X +X echo "unknown" && return 1 +} +X +config_guest() { +X [ ! -d /proc/xen ] && sed -i 's/^vc/#vc/' /etc/inittab && telinit q +X [ -d /proc/xen ] && sed -i 's/^#vc/vc/' /etc/inittab && telinit q +X +X systemctl daemon-reload +X +X case $HYPERVISOR in +X xen-pv|xen-domU) +X systemctl stop ntpd +X systemctl disable ntpd +X systemctl enable xe-daemon +X systemctl start xe-daemon +X +X cat /proc/cmdline > $CMDLINE +X sed -i "s/%/ /g" $CMDLINE +X ;; +X xen-hvm) +X systemctl stop ntpd +X systemctl disable ntpd +X systemctl enable xe-daemon +X systemctl start xe-daemon +X +X if [ ! -f /usr/bin/xenstore-read ]; then +X log_it "ERROR: xentools not installed, cannot found xenstore-read" && exit 5 +X fi +X /usr/bin/xenstore-read vm-data/cloudstack/init > $CMDLINE +X sed -i "s/%/ /g" $CMDLINE +X ;; +X kvm) +X # Configure kvm hotplug support +X if grep -E 'CONFIG_HOTPLUG_PCI=y|CONFIG_HOTPLUG_PCI_ACPI=y' /boot/config-`uname -r`; then +X log_it "acpiphp and pci_hotplug module already compiled in" +X else +X modprobe acpiphp 2> /dev/null && log_it "acpiphp module loaded" || true +X modprobe pci_hotplug 2> /dev/null && log_it "pci_hotplug module loaded" || true +X fi +X +X sed -i -e "/^s0:2345:respawn.*/d" /etc/inittab +X sed -i -e "/6:23:respawn/a\s0:2345:respawn:/sbin/getty -L 115200 ttyS0 vt102" /etc/inittab +X systemctl enable qemu-guest-agent +X systemctl start qemu-guest-agent +X +X # Wait for $CMDLINE file to be written by the qemu-guest-agent +X for i in {1..60}; do +X if [ -s $CMDLINE ]; then +X log_it "Received a new non-empty cmdline file from qemu-guest-agent" +X break +X fi +X sleep 1 +X done +X if [ ! -s $CMDLINE ]; then +X log_it "Failed to receive the cmdline file via the qemu-guest-agent" +X fi +X ;; +X vmware) +X # system time sync'd with host via vmware tools +X systemctl stop ntpd +X systemctl disable ntpd +X systemctl enable open-vm-tools +X systemctl start open-vm-tools +X +X vmtoolsd --cmd 'machine.id.get' > $CMDLINE +X ;; +X virtualpc|hyperv) +X # Hyper-V is recognized as virtualpc hypervisor type. Boot args are passed using KVP Daemon +X systemctl enable hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service +X systemctl start hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service +X sleep 5 +X cp -f /var/opt/hyperv/.kvp_pool_0 $CMDLINE +X cat /dev/null > /var/opt/hyperv/.kvp_pool_0 +X ;; +X virtualbox) +X # Virtualbox is used to test the virtual router +X # get the commandline from a dmistring (yes, hacky!) +X dmidecode | grep cmdline | sed 's/^.*cmdline://' > $CMDLINE +X RV=$? +X if [ $RV -ne 0 ] ; then +X log_it "Failed to get cmdline from a virtualbox dmi property" +X fi +X ;; +X esac +X +X # Find and export guest type +X export TYPE=$(grep -Po 'type=\K[a-zA-Z]*' $CMDLINE) +} +X +patch_systemvm() { +X local patchfile=$1 +X local backupfolder="/tmp/.conf.backup" +X local logfile="/var/log/patchsystemvm.log" +X if [ -f /usr/local/cloud/systemvm/conf/cloud.jks ]; then +X rm -fr $backupfolder +X mkdir -p $backupfolder +X cp -r /usr/local/cloud/systemvm/conf/* $backupfolder/ +X fi +X rm /usr/local/cloud/systemvm -rf +X mkdir -p /usr/local/cloud/systemvm +X echo "All" | unzip $patchfile -d /usr/local/cloud/systemvm >$logfile 2>&1 +X find /usr/local/cloud/systemvm/ -name \*.sh | xargs chmod 555 +X if [ -f $backupfolder/cloud.jks ]; then +X cp -r $backupfolder/* /usr/local/cloud/systemvm/conf/ +X echo "Restored keystore file and certs using backup" >> $logfile +X fi +X rm -fr $backupfolder +X # Import global cacerts into 'cloud' service's keystore +X keytool -importkeystore -srckeystore /etc/ssl/certs/java/cacerts -destkeystore /usr/local/cloud/systemvm/certs/realhostip.keystore -srcstorepass changeit -deststorepass vmops.com -noprompt || true +X return 0 +} +X +patch() { +X local PATCH_MOUNT=/media/cdrom +X local logfile="/var/log/patchsystemvm.log" +X if [ "$TYPE" == "consoleproxy" ] || [ "$TYPE" == "secstorage" ] && [ -f ${PATCH_MOUNT}/agent.zip ] && [ -f /var/cache/cloud/patch.required ] +X then +X echo "Patching systemvm for cloud service with mount=$PATCH_MOUNT for type=$TYPE" >> $logfile +X patch_systemvm ${PATCH_MOUNT}/agent.zip +X if [ $? -gt 0 ] +X then +X echo "Failed to apply patch systemvm\n" >> $logfile +X exit 1 +X fi +X fi +X +X rm -f /var/cache/cloud/patch.required +X chmod -x /etc/systemd/system/cloud*.service +X systemctl daemon-reload +X umount $PATCH_MOUNT || true +X +X if [ -f /mnt/cmdline ]; then +X cat /mnt/cmdline > $CMDLINE +X fi +X return 0 +} +X +config_sysctl() { +X # When there is more memory reset the cache back pressure to default 100 +X physmem=$(free|awk '/^Mem:/{print $2}') +X if [ $((physmem)) -lt 409600 ]; then +X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 200" /etc/sysctl.conf +X else +X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 100" /etc/sysctl.conf +X fi +X +X sync +X sysctl -p +} +X +bootstrap() { +X log_it "Bootstrapping systemvm appliance" +X +X export HYPERVISOR=$(hypervisor) +X [ $? -ne 0 ] && log_it "Failed to detect hypervisor type, bailing out" && exit 10 +X log_it "Starting guest services for $HYPERVISOR" +X +X config_guest +X patch +X config_sysctl +X +X log_it "Configuring systemvm type=$TYPE" +X if [ -f "/opt/cloud/bin/setup/$TYPE.sh" ]; then +X /opt/cloud/bin/setup/$TYPE.sh +X else +X /opt/cloud/bin/setup/default.sh +X fi +X +X log_it "Finished setting up systemvm" +X exit 0 +} +X +bootstrap +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/bootstrap.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh': 'MD5 check failed' + ) << \SHAR_EOF +722a9c6abfff147c7727fdcd85c96767 cloud_scripts/opt/cloud/bin/setup/bootstrap.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh'` -ne 7721 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' is not 7721" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_console_proxy() { +X log_it "Setting up console proxy system vm" +X +X echo "cloud" > /var/cache/cloud/enabled_svcs +X echo "haproxy dnsmasq apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs +X mkdir -p /var/log/cloud +X +X setup_common eth0 eth1 eth2 +X setup_system_rfc1918_internal +X +X log_it "Setting up entry in hosts" +X sed -i /$NAME/d /etc/hosts +X public_ip=`getPublicIp` +X echo "$public_ip $NAME" >> /etc/hosts +X +X log_it "Applying iptables rules" +X cp /etc/iptables/iptables-consoleproxy /etc/iptables/rules.v4 +X +X log_it "Configuring sshd" +X local hyp=$HYPERVISOR +X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then +X setup_sshd $ETH1_IP "eth1" +X else +X setup_sshd $ETH0_IP "eth0" +X fi +X +X disable_rpfilter +X enable_fwding 0 +X enable_irqbalance 0 +X rm -f /etc/logrotate.d/cloud +} +X +setup_console_proxy +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh': 'MD5 check failed' + ) << \SHAR_EOF +44adac9bf5e54d4791da00e3d1bdaf46 cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh'` -ne 1658 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' is not 1658" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/common.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/common.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/common.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/common.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/common.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" +X +X. /lib/lsb/init-functions +X +log_it() { +X echo "$(date) $@" >> /var/log/cloud.log +X log_action_msg "$@" +} +X +init_interfaces_orderby_macs() { +X macs=( $(echo $1 | sed "s/|/ /g") ) +X total_nics=${#macs[@]} +X interface_file=${2:-"/etc/network/interfaces"} +X rule_file=${3:-"/etc/udev/rules.d/70-persistent-net.rules"} +X +X echo -n "auto lo" > $interface_file +X for((i=0; i> $interface_file +X fi +X done +X +X cat >> $interface_file << EOF +X +iface lo inet loopback +X +EOF +X +X echo "" > $rule_file +X for((i=0; i < ${#macs[@]}; i++)) +X do +X echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${macs[$i]}\", NAME=\"eth$i\"" >> $rule_file +X done +} +X +init_interfaces() { +X if [ "$NIC_MACS" == "" ] +X then +X cat > /etc/network/interfaces << EOF +auto lo $1 $2 $3 +iface lo inet loopback +X +EOF +X else +X init_interfaces_orderby_macs "$NIC_MACS" +X fi +} +X +setup_interface() { +X local intfnum=$1 +X local ip=$2 +X local mask=$3 +X local gw=$4 +X local force=$5 +X local intf=eth${intfnum} +X local bootproto="static" +X +X if [ "$BOOTPROTO" == "dhcp" ] +X then +X if [ "$intfnum" != "0" ] +X then +X bootproto="dhcp" +X fi +X fi +X +X if [ "$ip" != "0.0.0.0" -a "$ip" != "" -o "$force" == "force" ] +X then +X echo "iface $intf inet $bootproto" >> /etc/network/interfaces +X if [ "$bootproto" == "static" ] +X then +X echo " address $ip " >> /etc/network/interfaces +X echo " netmask $mask" >> /etc/network/interfaces +X fi +X fi +X +X if [ "$ip" == "0.0.0.0" -o "$ip" == "" ] +X then +X ifconfig $intf down +X fi +X +X if [ "$force" == "force" ] +X then +X ifdown $intf +X else +X ifdown $intf +X if [ "$RROUTER" != "1" -o "$1" != "2" ] +X then +X ifup $intf +X fi +X fi +} +X +setup_interface_ipv6() { +X sysctl net.ipv6.conf.all.disable_ipv6=0 +X sysctl net.ipv6.conf.all.forwarding=1 +X sysctl net.ipv6.conf.all.accept_ra=1 +X +X sed -i "s/net.ipv6.conf.all.disable_ipv6 =.*$/net.ipv6.conf.all.disable_ipv6 = 0/" /etc/sysctl.conf +X sed -i "s/net.ipv6.conf.all.forwarding =.*$/net.ipv6.conf.all.forwarding = 1/" /etc/sysctl.conf +X sed -i "s/net.ipv6.conf.all.accept_ra =.*$/net.ipv6.conf.all.accept_ra = 1/" /etc/sysctl.conf +X +X local intfnum=$1 +X local ipv6="$2" +X local prelen="$3" +X local intf=eth${intfnum} +X +X echo "iface $intf inet6 static" >> /etc/network/interfaces +X echo " address $ipv6 " >> /etc/network/interfaces +X echo " netmask $prelen" >> /etc/network/interfaces +X echo " accept_ra 1" >> /etc/network/interfaces +X ifdown $intf +X ifup $intf +} +X +X +enable_fwding() { +X local enabled=$1 +X log_it "cloud: enable_fwding = $1" +X log_it "enable_fwding = $1" +X echo "$1" > /proc/sys/net/ipv4/ip_forward +X [ -f /etc/iptables/iptables.conf ] && sed -i "s/ENABLE_ROUTING=.*$/ENABLE_ROUTING=$enabled/" /etc/iptables/iptables.conf && return +} +X +enable_passive_ftp() { +X log_it "cloud: enabling passive FTP for guest VMs" +X echo "$1" > /proc/sys/net/netfilter/nf_conntrack_helper +} +X +disable_rpfilter() { +X log_it "cloud: disable rp_filter" +X log_it "disable rpfilter" +X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf +} +X +get_public_vif_list() { +X local vif_list="" +X for i in /sys/class/net/eth*; do +X vif=$(basename $i); +X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] +X then +X vif_list="$vif_list $vif"; +X fi +X done +X +X echo $vif_list +} +X +disable_rpfilter_domR() { +X log_it "cloud: Tuning rp_filter on public interfaces" +X +X VIF_LIST=$(get_public_vif_list) +X log_it "rpfilter public interfaces : $VIF_LIST" +X if [ "$DISABLE_RP_FILTER" == "true" ] +X then +X log_it "cloud: disable rp_filter on public interfaces" +X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf +X echo "0" > /proc/sys/net/ipv4/conf/default/rp_filter +X for vif in $VIF_LIST; do +X log_it "cloud: disable rp_filter on public interface: $vif" +X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 0/" /etc/sysctl.conf +X echo "0" > /proc/sys/net/ipv4/conf/$vif/rp_filter +X done +X else +X log_it "cloud: enable rp_filter on public interfaces" +X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 1/" /etc/sysctl.conf +X echo "1" > /proc/sys/net/ipv4/conf/default/rp_filter +X for vif in $VIF_LIST; do +X log_it "cloud: enable rp_filter on public interface: $vif" +X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 1/" /etc/sysctl.conf +X echo "1" > /proc/sys/net/ipv4/conf/$vif/rp_filter +X done +X fi +X log_it "cloud: Enabling rp_filter on Non-public interfaces(eth0,eth1,lo)" +X echo "1" > /proc/sys/net/ipv4/conf/eth0/rp_filter +X echo "1" > /proc/sys/net/ipv4/conf/eth1/rp_filter +X echo "1" > /proc/sys/net/ipv4/conf/lo/rp_filter +} +X +enable_irqbalance() { +X local enabled=$1 +X local proc=0 +X +X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) +X if [ $proc -le 1 ] && [ $enabled -eq 1 ] +X then +X enabled=0 +X fi +X +X log_it "Processors = $proc Enable service ${svc} = $enabled" +X local cfg=/etc/default/irqbalance +X [ -f $cfg ] && sed -i "s/ENABLED=.*$/ENABLED=$enabled/" $cfg && return +} +X +enable_vpc_rpsrfs() { +X local enable=$1 +X if [ $enable -eq 0 ] +X then +X echo 0 > /etc/rpsrfsenable +X else +X echo 1 > /etc/rpsrfsenable +X fi +X +X return 0 +} +X +enable_rpsrfs() { +X local enable=$1 +X +X if [ $enable -eq 0 ] +X then +X echo 0 > /etc/rpsrfsenable +X return 0 +X fi +X +X if [ ! -f /sys/class/net/eth0/queues/rx-0/rps_cpus ] +X then +X echo "rps is not enabled in the kernel" +X echo 0 > /etc/rpsrfsenable +X return 0 +X fi +X +X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) +X if [ $proc -le 1 ] +X then +X echo 0 > /etc/rpsrfsenable +X return 0; +X fi +X +X echo 1 > /etc/rpsrfsenable +X num=1 +X num=$(($num<<$proc)) +X num=$(($num-1)); +X echo $num; +X hex=$(printf "%x\n" $num) +X echo $hex; +X #enable rps +X echo $hex > /sys/class/net/eth0/queues/rx-0/rps_cpus +X echo $hex > /sys/class/net/eth2/queues/rx-0/rps_cpus +X +X #enble rfs +X echo 256 > /proc/sys/net/core/rps_sock_flow_entries +X echo 256 > /sys/class/net/eth0/queues/rx-0/rps_flow_cnt +X echo 256 > /sys/class/net/eth2/queues/rx-0/rps_flow_cnt +} +X +setup_common() { +X init_interfaces $1 $2 $3 +X if [ -n "$ETH0_IP" ] +X then +X setup_interface "0" $ETH0_IP $ETH0_MASK $GW +X fi +X if [ -n "$ETH0_IP6" ] +X then +X setup_interface_ipv6 "0" $ETH0_IP6 $ETH0_IP6_PRELEN +X fi +X setup_interface "1" $ETH1_IP $ETH1_MASK $GW +X if [ -n "$ETH2_IP" ] +X then +X setup_interface "2" $ETH2_IP $ETH2_MASK $GW +X fi +X +X echo $NAME > /etc/hostname +X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon +X hostnamectl set-hostname $NAME +X +X #Nameserver +X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries +X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries +X if [ -n "$internalNS1" ] +X then +X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS1" > /etc/resolv.conf +X fi +X +X if [ -n "$internalNS2" ] +X then +X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS2" >> /etc/resolv.conf +X fi +X if [ -n "$NS1" ] +X then +X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS1" >> /etc/resolv.conf +X fi +X +X if [ -n "$NS2" ] +X then +X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS2" >> /etc/resolv.conf +X fi +X +X if [ -n "$IP6_NS1" ] +X then +X echo "nameserver $IP6_NS1" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $IP6_NS1" >> /etc/resolv.conf +X fi +X if [ -n "$IP6_NS2" ] +X then +X echo "nameserver $IP6_NS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $IP6_NS2" >> /etc/resolv.conf +X fi +X +X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] +X then +X ip route add $MGMTNET via $LOCAL_GW dev eth1 +X fi +X +X ip route delete default +X if [ "$RROUTER" != "1" ] +X then +X gwdev=$3 +X if [ -z "$gwdev" ] +X then +X gwdev="eth0" +X fi +X +X ip route add default via $GW dev $gwdev +X fi +X +X # Workaround to activate vSwitch under VMware +X timeout 3 ping -n -c 3 $GW & +X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] +X then +X timeout 3 ping -n -c 3 $LOCAL_GW & +X #This code is added to address ARP issue by pinging MGMT_GW +X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') +X timeout 3 ping -n -c 3 $MGMT_GW & +X fi +X +X if [ "$HYPERVISOR" == "vmware" ]; then +X ntpq -p &> /dev/null || vmware-toolbox-cmd timesync enable +X fi +} +X +setup_dnsmasq() { +X log_it "Setting up dnsmasq" +X +X touch /etc/dhcpopts.txt +X +X [ -z $DHCP_RANGE ] && [ $ETH0_IP ] && DHCP_RANGE=$ETH0_IP +X [ $ETH0_IP6 ] && DHCP_RANGE_IP6=$ETH0_IP6 +X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" +X #removing the dnsmasq multiple ranges config file. +X rm /etc/dnsmasq.d/multiple_ranges.conf +X +X #get the template +X cp /etc/dnsmasq.conf.tmpl /etc/dnsmasq.conf +X +X if [ -n "$DOMAIN" ] +X then +X #send domain name to dhcp clients +X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\"$DOMAIN\"/ /etc/dnsmasq.conf +X #DNS server will append $DOMAIN to local queries +X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf +X #answer all local domain queries +X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf +X fi +X +X if [ -n "$DNS_SEARCH_ORDER" ] +X then +X sed -i -e "/^[#]*dhcp-option.*=119.*$/d" /etc/dnsmasq.conf +X echo "dhcp-option-force=119,$DNS_SEARCH_ORDER" >> /etc/dnsmasq.conf +X # set the domain search order as a space seprated list for option 15 +X DNS_SEARCH_ORDER=$(echo $DNS_SEARCH_ORDER | sed 's/,/ /g') +X #send domain name to dhcp clients +X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\""$DNS_SEARCH_ORDER"\"/ /etc/dnsmasq.conf +X fi +X +X if [ $DHCP_RANGE ] +X then +X sed -i -e "s/^dhcp-range_ip4=.*$/dhcp-range=$DHCP_RANGE,static/" /etc/dnsmasq.conf +X else +X sed -i -e "s/^dhcp-range_ip4=.*$//" /etc/dnsmasq.conf +X fi +X if [ $DHCP_RANGE_IP6 ] +X then +X sed -i -e "s/^dhcp-range_ip6=.*$/dhcp-range=$DHCP_RANGE_IP6,static/" /etc/dnsmasq.conf +X # For nondefault6 tagged host, don't send dns-server information +X sed -i /nondefault6/d /etc/dnsmasq.conf +X echo "dhcp-option=nondefault6,option6:dns-server" >> /etc/dnsmasq.conf +X else +X sed -i -e "s/^dhcp-range_ip6=.*$//" /etc/dnsmasq.conf +X fi +X +X if [ "$RROUTER" == "1" ] +X then +X DEFAULT_GW=$GUEST_GW +X INTERNAL_DNS=$GUEST_GW +X else +X if [ "$TYPE" == "dhcpsrvr" ] +X then +X DEFAULT_GW=$GW +X else +X DEFAULT_GW=$ETH0_IP +X fi +X INTERNAL_DNS=$ETH0_IP +X fi +X sed -i -e "/^[#]*dhcp-option=option:router.*$/d" /etc/dnsmasq.conf +X [ $DEFAULT_GW ] && echo "dhcp-option=option:router,$DEFAULT_GW" >> /etc/dnsmasq.conf +X +X [ $ETH0_IP ] && [ $NS1 ] && NS="$NS1," +X [ $ETH0_IP ] && [ $NS2 ] && NS="$NS$NS2," +X [ $ETH0_IP6 ] && [ $IP6_NS1 ] && NS6="[$IP6_NS1]," +X [ $ETH0_IP6 ] && [ $IP6_NS2 ] && NS6="$NS6[$IP6_NS2]," +X #for now set up ourself as the dns server as well +X sed -i -e "/^[#]*dhcp-option=6,.*$/d" /etc/dnsmasq.conf +X sed -i -e "/^[#]*dhcp-option=option6:dns-server,.*$/d" /etc/dnsmasq.conf +X if [ "$USE_EXTERNAL_DNS" != "true" ] +X then +X [ $ETH0_IP ] && NS="$INTERNAL_DNS,$NS" +X [ $ETH0_IP6 ] && NS6="[::],$NS6" +X # enable dns +X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf +X else +X # disable dns +X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf +X echo "port=0" >> /etc/dnsmasq.conf +X fi +X NS=${NS%?} +X NS6=${NS6%?} +X [ $ETH0_IP ] && echo "dhcp-option=6,$NS" >> /etc/dnsmasq.conf +X [ $ETH0_IP6 ] && echo "dhcp-option=option6:dns-server,$NS6" >> /etc/dnsmasq.conf +X #adding the name data-server to the /etc/hosts for allowing the access to user-data service and ssh-key reset in every subnet. +X #removing the existing entires to avoid duplicates on restarts. +X sed -i '/data-server/d' /etc/hosts +X if [ -n "$ETH0_IP" ] +X then +X echo "$ETH0_IP data-server" >> /etc/hosts +X fi +X if [ -n "$ETH0_IP6" ] +X then +X echo "$ETH0_IP6 data-server" >> /etc/hosts +X fi +X #add the dhcp-client-update only if dnsmasq version is 2.6 and above +X dnsmasqVersion=$(dnsmasq -v | grep version -m 1 | grep -o "[[:digit:]]\.[[:digit:]]") +X major=$(echo "$dnsmasqVersion" | cut -d '.' -f 1) +X minor=$(echo "$dnsmasqVersion" | cut -d '.' -f 2) +X if [ "$major" -eq '2' -a "$minor" -ge '6' ] || [ "$major" -gt '2' ] +X then +X sed -i -e "/^dhcp-client-update/d" /etc/dnsmasq.conf +X echo 'dhcp-client-update' >> /etc/dnsmasq.conf +X fi +X +X command -v dhcp_release > /dev/null 2>&1 +X no_dhcp_release=$? +X if [ $no_dhcp_release -eq 0 -a -z "$ETH0_IP6" ] +X then +X echo 1 > /var/cache/cloud/dnsmasq_managed_lease +X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf +X else +X echo 0 > /var/cache/cloud/dnsmasq_managed_lease +X fi +} +X +setup_sshd(){ +X local ip=$1 +X local eth=$2 +X [ -f /etc/ssh/sshd_config ] && sed -i -e "s/^[#]*ListenAddress.*$/ListenAddress $ip/" /etc/ssh/sshd_config +X sed -i "/3922/s/eth./$eth/" /etc/iptables/rules.v4 +} +X +setup_vpc_apache2() { +X log_it "Setting up apache web server for VPC" +X systemctl disable apache2 +X clean_ipalias_config +X setup_apache2_common +} +X +clean_ipalias_config() { +X rm -f /etc/apache2/conf.d/ports.*.meta-data.conf +X rm -f /etc/apache2/sites-available/ipAlias* +X rm -f /etc/apache2/sites-enabled/ipAlias* +X rm -f /etc/apache2/conf.d/vhost*.conf +X rm -f /etc/apache2/ports.conf +X rm -f /etc/apache2/vhostexample.conf +X rm -f /etc/apache2/sites-available/* +X rm -f /etc/apache2/sites-enabled/* +X +X rm -rf /etc/failure_config +} +X +setup_apache2_common() { +X sed -i 's/^Include ports.conf.*/# CS: Done by Python CsApp config\n#Include ports.conf/g' /etc/apache2/apache2.conf +X # Disable listing of http://SSVM-IP/icons folder for security issue. see article http://www.i-lateral.com/tutorials/disabling-the-icons-folder-on-an-ubuntu-web-server/ +X [ -f /etc/apache2/mods-available/alias.conf ] && sed -i s/"Options Indexes MultiViews"/"Options -Indexes MultiViews"/ /etc/apache2/mods-available/alias.conf +X +X echo "Options -Indexes" > /var/www/html/.htaccess +} +X +setup_apache2() { +X log_it "Setting up apache web server" +X mkdir -p /var/www +X chown www-data:www-data -R /var/www +X clean_ipalias_config +X setup_apache2_common +X local ip=$1 +} +X +setup_aesni() { +X if [ `grep aes /proc/cpuinfo | wc -l` -gt 0 ] +X then +X modprobe aesni_intel +X fi +} +X +setup_storage_network() { +X if [ x"$STORAGE_IP" == "x" -o x"$STORAGE_NETMASK" == "x" ] +X then +X log_it "Incompleted parameters STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR. Cannot setup storage network" +X return +X fi +X +X echo "" >> /etc/network/interfaces +X echo "auto eth3" >> /etc/network/interfaces +X +X setup_interface "3" "$STORAGE_IP" "$STORAGE_NETMASK" +X [ -n "$MTU" ] && ifconfig eth3 mtu $MTU && echo " mtu $MTU" >> /etc/network/interfaces +X #ip route add "$STORAGE_CIDR" via "$STORAGE_IP" +X log_it "Successfully setup storage network with STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR" +} +X +setup_system_rfc1918_internal() { +X public_ip=`getPublicIp` +X echo "$public_ip" | grep -E "^((127\.)|(10\.)|(172\.1[6-9]\.)|(172\.2[0-9]\.)|(172\.3[0-1]\.)|(192\.168\.))" +X if [ "$?" == "0" ]; then +X log_it "Not setting up route of RFC1918 space to $LOCAL_GW befause $public_ip is RFC1918." +X else +X log_it "Setting up route of RFC1918 space to $LOCAL_GW" +X # Setup general route for RFC 1918 space, as otherwise it will be sent to +X # the public gateway and not work +X # More specific routes that may be set have preference over this generic route. +X ip route add 10.0.0.0/8 via $LOCAL_GW +X ip route add 172.16.0.0/12 via $LOCAL_GW +X ip route add 192.168.0.0/16 via $LOCAL_GW +X fi +} +X +getPublicIp() { +X public_ip=$ETH2_IP +X [ "$ETH2_IP" == "0.0.0.0" ] && public_ip=$ETH1_IP +X echo $public_ip +} +X +setup_ntp() { +X log_it "Setting up NTP" +X NTP_CONF_FILE="/etc/ntp.conf" +X if [ -f $NTP_CONF_FILE ] +X then +X IFS=',' read -a server_list <<< "$NTP_SERVER_LIST" +X for (( iterator=${#server_list[@]}-1 ; iterator>=0 ; iterator-- )) +X do +X server=$(echo ${server_list[iterator]} | tr -d '\r') +X PATTERN="server $server" +X if grep -q "^$PATTERN$" $NTP_CONF_FILE ; then +X sed -i "/^$PATTERN$/d" $NTP_CONF_FILE +X fi +X sed -i "0,/^server/s//$PATTERN\nserver/" $NTP_CONF_FILE +X done +X systemctl enable ntp +X else +X log_it "NTP configuration file not found" +X fi +} +X +routing_svcs() { +X echo "haproxy apache2" > /var/cache/cloud/enabled_svcs +X echo "cloud nfs-common portmap" > /var/cache/cloud/disabled_svcs +X if [ "$RROUTER" -eq "1" ] +X then +X echo "keepalived conntrackd" >> /var/cache/cloud/enabled_svcs +X echo "dnsmasq" >> /var/cache/cloud/disabled_svcs +X else +X echo "dnsmasq" >> /var/cache/cloud/enabled_svcs +X echo "keepalived conntrackd " >> /var/cache/cloud/disabled_svcs +X fi +} +X +parse_cmd_line() { +X CMDLINE=$(cat /var/cache/cloud/cmdline) +X TYPE="unknown" +X BOOTPROTO="static" +X DISABLE_RP_FILTER="false" +X STORAGE_IP="" +X STORAGE_NETMASK="" +X STORAGE_CIDR="" +X VM_PASSWORD="" +X +X CHEF_TMP_FILE=/tmp/cmdline.json +X COMMA="\t" +X echo -e "{\n\"type\": \"cmdline\"," > ${CHEF_TMP_FILE} +X echo -e "\"cmd_line\": {" >> ${CHEF_TMP_FILE} +X +X for i in $CMDLINE +X do +X # search for foo=bar pattern and cut out foo +X KEY=$(echo $i | cut -d= -f1) +X VALUE=$(echo $i | cut -d= -f2) +X echo -en ${COMMA} >> ${CHEF_TMP_FILE} +X # Two lines so values do not accidently interpretted as escapes!! +X echo -n \"${KEY}\"': '\"${VALUE}\" >> ${CHEF_TMP_FILE} +X COMMA=",\n\t" +X case $KEY in +X disable_rp_filter) +X export DISABLE_RP_FILTER=$VALUE +X ;; +X eth0ip) +X export ETH0_IP=$VALUE +X ;; +X eth1ip) +X export ETH1_IP=$VALUE +X ;; +X eth2ip) +X export ETH2_IP=$VALUE +X ;; +X host) +X export MGMT_HOST=$VALUE +X ;; +X gateway) +X export GW=$VALUE +X ;; +X ip6gateway) +X export IP6GW=$VALUE +X ;; +X eth0mask) +X export ETH0_MASK=$VALUE +X ;; +X eth1mask) +X export ETH1_MASK=$VALUE +X ;; +X eth2mask) +X export ETH2_MASK=$VALUE +X ;; +X eth0ip6) +X export ETH0_IP6=$VALUE +X ;; +X eth0ip6prelen) +X export ETH0_IP6_PRELEN=$VALUE +X ;; +X internaldns1) +X export internalNS1=$VALUE +X ;; +X internaldns2) +X export internalNS2=$VALUE +X ;; +X dns1) +X export NS1=$VALUE +X ;; +X dns2) +X export NS2=$VALUE +X ;; +X ip6dns1) +X export IP6_NS1=$VALUE +X ;; +X ip6dns2) +X export IP6_NS2=$VALUE +X ;; +X domain) +X export DOMAIN=$VALUE +X ;; +X dnssearchorder) +X export DNS_SEARCH_ORDER=$VALUE +X ;; +X useextdns) +X export USE_EXTERNAL_DNS=$VALUE +X ;; +X mgmtcidr) +X export MGMTNET=$VALUE +X ;; +X localgw) +X export LOCAL_GW=$VALUE +X ;; +X template) +X export TEMPLATE=$VALUE +X ;; +X sshonguest) +X export SSHONGUEST=$VALUE +X ;; +X name) +X export NAME=$VALUE +X ;; +X dhcprange) +X export DHCP_RANGE=$(echo $VALUE | tr ':' ',') +X ;; +X bootproto) +X export BOOTPROTO=$VALUE +X ;; +X type) +X export TYPE=$VALUE +X ;; +X defaultroute) +X export DEFAULTROUTE=$VALUE +X ;; +X redundant_router) +X export RROUTER=$VALUE +X ;; +X redundant_state) +X export RROUTER_STATE=$VALUE +X ;; +X guestgw) +X export GUEST_GW=$VALUE +X ;; +X guestbrd) +X export GUEST_BRD=$VALUE +X ;; +X guestcidrsize) +X export GUEST_CIDR_SIZE=$VALUE +X ;; +X router_pr) +X export ROUTER_PR=$VALUE +X ;; +X extra_pubnics) +X export EXTRA_PUBNICS=$VALUE +X ;; +X nic_macs) +X export NIC_MACS=$VALUE +X ;; +X mtu) +X export MTU=$VALUE +X ;; +X storageip) +X export STORAGE_IP=$VALUE +X ;; +X storagenetmask) +X export STORAGE_NETMASK=$VALUE +X ;; +X storagecidr) +X export STORAGE_CIDR=$VALUE +X ;; +X vmpassword) +X export VM_PASSWORD=$VALUE +X ;; +X vpccidr) +X export VPCCIDR=$VALUE +X ;; +X cidrsize) +X export CIDR_SIZE=$VALUE +X ;; +X advert_int) +X export ADVERT_INT=$VALUE +X ;; +X ntpserverlist) +X export NTP_SERVER_LIST=$VALUE +X ;; +X esac +X done +X echo -e "\n\t}\n}" >> ${CHEF_TMP_FILE} +X if [ "$TYPE" != "unknown" ] +X then +X mv ${CHEF_TMP_FILE} /var/cache/cloud/cmd_line.json +X fi +X +X [ $ETH0_IP ] && export LOCAL_ADDRS=$ETH0_IP +X [ $ETH0_IP6 ] && export LOCAL_ADDRS=$ETH0_IP6 +X [ $ETH0_IP ] && [ $ETH0_IP6 ] && export LOCAL_ADDRS="$ETH0_IP,$ETH0_IP6" +X +X # Randomize cloud password so only ssh login is allowed +X echo "cloud:`openssl rand -base64 32`" | chpasswd +X +X if [ x"$VM_PASSWORD" != x"" ] +X then +X echo "root:$VM_PASSWORD" | chpasswd +X fi +} +X +parse_cmd_line +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/common.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/common.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/common.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/common.sh': 'MD5 check failed' + ) << \SHAR_EOF +8754c81bacd82458e4ce221b476505ea cloud_scripts/opt/cloud/bin/setup/common.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/common.sh'` -ne 22472 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/common.sh' is not 22472" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +dhcpsrvr_svcs() { +X echo "dnsmasq apache2" > /var/cache/cloud/enabled_svcs +X echo "cloud nfs-common conntrackd keepalived haproxy portmap" > /var/cache/cloud/disabled_svcs +} +X +setup_dhcpsrvr() { +X log_it "Setting up dhcp server system vm" +X setup_common eth0 eth1 +X setup_dnsmasq +X setup_apache2 $ETH0_IP +X +X sed -i /$NAME/d /etc/hosts +X [ $ETH0_IP ] && echo "$ETH0_IP $NAME" >> /etc/hosts +X [ $ETH0_IP6 ] && echo "$ETH0_IP6 $NAME" >> /etc/hosts +X +X enable_irqbalance 0 +X enable_fwding 0 +X +X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 +X +X #Only allow DNS service for current network +X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X +X if [ "$SSHONGUEST" == "true" ] +X then +X setup_sshd $ETH0_IP "eth0" +X else +X setup_sshd $ETH1_IP "eth1" +X fi +} +X +dhcpsrvr_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute dhcpsrvr_svcs" +X exit 1 +fi +setup_dhcpsrvr +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh': 'MD5 check failed' + ) << \SHAR_EOF +08afc46420e5e388ba6be68cfdbd4a59 cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh'` -ne 1985 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' is not 1985" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/cloud-early-config ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/cloud-early-config (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/cloud-early-config (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" +X +# Clear boot up flag, it would be created by rc.local after boot up done +mkdir -p /var/cache/cloud +rm -f /var/cache/cloud/boot_up_done +X +[ -x /sbin/ifup ] || exit 0 +X +X. /lib/lsb/init-functions +X +log_it() { +X echo "$(date) $@" >> /var/log/cloud.log +X log_action_msg "$@" +} +X +patch() { +X local PATCH_MOUNT=/media/cdrom +X local patchfile=$PATCH_MOUNT/cloud-scripts.tgz +X local privkey=$PATCH_MOUNT/authorized_keys +X local md5file=/var/cache/cloud/cloud-scripts-signature +X local cdrom_dev= +X mkdir -p $PATCH_MOUNT +X +X if [ -e /dev/xvdd ]; then +X cdrom_dev=/dev/xvdd +X elif [ -e /dev/cdrom ]; then +X cdrom_dev=/dev/cdrom +X elif [ -e /dev/cdrom1 ]; then +X cdrom_dev=/dev/cdrom1 +X elif [ -e /dev/cdrom2 ]; then +X cdrom_dev=/dev/cdrom2 +X elif [ -e /dev/cdrom3 ]; then +X cdrom_dev=/dev/cdrom3 +X fi +X +X if [ -f /var/cache/cloud/authorized_keys ]; then +X privkey=/var/cache/cloud/authorized_keys +X fi +X +X if [ -n "$cdrom_dev" ]; then +X mount -o ro $cdrom_dev $PATCH_MOUNT +X local oldmd5= +X [ -f ${md5file} ] && oldmd5=$(cat ${md5file}) +X local newmd5= +X [ -f ${patchfile} ] && newmd5=$(md5sum ${patchfile} | awk '{print $1}') +X +X log_it "Scripts checksum detected: oldmd5=$oldmd5 newmd5=$newmd5" +X if [ "$oldmd5" != "$newmd5" ] && [ -f ${patchfile} ] && [ "$newmd5" != "" ] +X then +X tar xzf $patchfile -C / +X echo ${newmd5} > ${md5file} +X log_it "Patched scripts using $patchfile" +X touch /var/cache/cloud/patch.required +X fi +X +X if [ -f $privkey ]; then +X cp -f $privkey /root/.ssh/ +X chmod go-rwx /root/.ssh/authorized_keys +X fi +X fi +X +X return 0 +} +X +start() { +X log_it "Executing cloud-early-config" +X +X # Clear /tmp for file lock +X rm -f /tmp/*.lock +X rm -f /tmp/rrouter_bumped +X rm -f /root/.rnd +X echo "" > /root/.ssh/known_hosts +X +X patch +X sync +X /opt/cloud/bin/setup/bootstrap.sh +X +X log_it "Finished setting up systemvm" +X exit 0 +} +X +start +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/cloud-early-config failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config': 'MD5 check failed' + ) << \SHAR_EOF +c9e5973de3771fd5f5e9b490c60db970 cloud_scripts/opt/cloud/bin/setup/cloud-early-config +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config'` -ne 2765 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' is not 2765" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/default.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/default.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/default.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/default.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/default.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_default() { +X cat > /etc/network/interfaces << EOF +auto lo +iface lo inet loopback +EOF +X cp -f /etc/iptables/rt_tables_init /etc/iproute2/rt_tables +} +X +setup_default +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/default.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/default.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/default.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/default.sh': 'MD5 check failed' + ) << \SHAR_EOF +20e3a01cb77930eba6438de6d9a3f193 cloud_scripts/opt/cloud/bin/setup/default.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/default.sh'` -ne 1002 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/default.sh' is not 1002" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/loadbalancer.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/loadbalancer.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/loadbalancer.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +X +# $Id: loadbalancer.sh 9947 2010-06-25 19:34:24Z manuel $ $HeadURL: svn://svn.lab.vmops.com/repos/vmdev/java/patches/xenserver/root/loadbalancer.sh $ +# loadbalancer.sh -- reconfigure loadbalancer rules +# @VERSION@ +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s: -i -a -d -f -s \n" $(basename $0) >&2 +} +X +# set -x +X +# ensure that the nic has the public ip we are load balancing on +ip_entry() { +X local added=$1 +X local removed=$2 +X +X if [ "$added" == "none" ] +X then +X added="" +X fi +X +X if [ "$removed" == "none" ] +X then +X removed="" +X fi +X +X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") +X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") +X +X for i in $a +X do +X local pubIp=$(echo $i | cut -d: -f1) +X logger -t cloud "Adding public ip $pubIp for load balancing" +X for vif in $VIF_LIST; do +X sudo ip addr add dev $vif $pubIp/32 +X #ignore error since it is because the ip is already there +X done +X done +X +X for i in $r +X do +X logger -t cloud "Removing public ips for deleted loadbalancers" +X local pubIp=$(echo $i | cut -d: -f1) +X logger -t cloud "Removing public ip $pubIp for deleted loadbalancers" +X for vif in $VIF_LIST; do +X sudo ip addr del $pubIp/32 dev $vif +X done +X done +X +X return 0 +} +get_lb_vif_list() { +# add eth0 to the VIF_LIST if it is not there, this allows guest VMs to use the LB service. +X local lb_list="$VIF_LIST eth0"; +X lb_list=$(echo $lb_list | tr " " "\n" | sort | uniq | tr "\n" " ") +X echo $lb_list +} +fw_remove_backup() { +X local lb_vif_list=$(get_lb_vif_list) +X for vif in $lb_vif_list; do +X sudo iptables -F back_load_balancer_$vif 2> /dev/null +X sudo iptables -D INPUT -i $vif -p tcp -j back_load_balancer_$vif 2> /dev/null +X sudo iptables -X back_load_balancer_$vif 2> /dev/null +X done +X sudo iptables -F back_lb_stats 2> /dev/null +X sudo iptables -D INPUT -p tcp -j back_lb_stats 2> /dev/null +X sudo iptables -X back_lb_stats 2> /dev/null +} +fw_restore() { +X local lb_vif_list=$(get_lb_vif_list) +X for vif in $lb_vif_list; do +X sudo iptables -F load_balancer_$vif 2> /dev/null +X sudo iptables -D INPUT -i $vif -p tcp -j load_balancer_$vif 2> /dev/null +X sudo iptables -X load_balancer_$vif 2> /dev/null +X sudo iptables -E back_load_balancer_$vif load_balancer_$vif 2> /dev/null +X done +X sudo iptables -F lb_stats 2> /dev/null +X sudo iptables -D INPUT -p tcp -j lb_stats 2> /dev/null +X sudo iptables -X lb_stats 2> /dev/null +X sudo iptables -E back_lb_stats lb_stats 2> /dev/null +} +# firewall entry to ensure that haproxy can receive on specified port +fw_entry() { +X local added=$1 +X local removed=$2 +X local stats=$3 +X +X if [ "$added" == "none" ] +X then +X added="" +X fi +X +X if [ "$removed" == "none" ] +X then +X removed="" +X fi +X +X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") +X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") +X +# back up the iptable rules by renaming before creating new. +X local lb_vif_list=$(get_lb_vif_list) +X for vif in $lb_vif_list; do +X sudo iptables -E load_balancer_$vif back_load_balancer_$vif 2> /dev/null +X sudo iptables -N load_balancer_$vif 2> /dev/null +X sudo iptables -A INPUT -i $vif -p tcp -j load_balancer_$vif +X done +X sudo iptables -E lb_stats back_lb_stats 2> /dev/null +X sudo iptables -N lb_stats 2> /dev/null +X sudo iptables -A INPUT -p tcp -j lb_stats +X +X for i in $a +X do +X local pubIp=$(echo $i | cut -d: -f1) +X local dport=$(echo $i | cut -d: -f2) +X local lb_vif_list=$(get_lb_vif_list) +X for vif in $lb_vif_list; do +X +#TODO : The below delete will be used only when we upgrade the from older verion to the newer one , the below delete become obsolute in the future. +X sudo iptables -D INPUT -i $vif -p tcp -d $pubIp --dport $dport -j ACCEPT 2> /dev/null +X +X sudo iptables -A load_balancer_$vif -p tcp -d $pubIp --dport $dport -j ACCEPT +X +X if [ $? -gt 0 ] +X then +X return 1 +X fi +X done +X done +X local pubIp=$(echo $stats | cut -d: -f1) +X local dport=$(echo $stats | cut -d: -f2) +X local cidrs=$(echo $stats | cut -d: -f3 | sed 's/-/,/') +X sudo iptables -A lb_stats -s $cidrs -p tcp -m state --state NEW -d $pubIp --dport $dport -j ACCEPT +X +X +#TODO : The below delete in the for-loop will be used only when we upgrade the from older verion to the newer one , the below delete become obsolute in the future. +X for i in $r +X do +X local pubIp=$(echo $i | cut -d: -f1) +X local dport=$(echo $i | cut -d: -f2) +X +X for vif in $VIF_LIST; do +X sudo iptables -D INPUT -i $vif -p tcp -d $pubIp --dport $dport -j ACCEPT 2> /dev/null +X done +X done +X +X return 0 +} +X +#Hot reconfigure HA Proxy in the routing domain +reconfig_lb() { +X logger -t cloud "Reconfiguring loadbalancer using $1" +X /root/reconfigLB.sh $1 +X return $? +} +X +# Restore the HA Proxy to its previous state, and revert iptables rules on DomR +restore_lb() { +X logger -t cloud "Restoring HA Proxy to previous state" +X # Copy the old version of haproxy.cfg into the file that reconfigLB.sh uses +X cp /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg.new +X +X if [ $? -eq 0 ] +X then +X # Run reconfigLB.sh again +X /root/reconfigLB.sh /etc/haproxy/haproxy.cfg.new +X fi +} +X +get_vif_list() { +X local vif_list="" +X for i in /sys/class/net/eth*; do +X vif=$(basename $i); +X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] +X then +X vif_list="$vif_list $vif"; +X fi +X done +X if [ "$vif_list" == "" ] +X then +X vif_list="eth0" +X fi +X +X logger -t cloud "Loadbalancer public interfaces = $vif_list" +X echo $vif_list +} +X +mflag= +iflag= +aflag= +dflag= +fflag= +sflag= +X +while getopts 'i:a:d:f:s:' OPTION +do +X case $OPTION in +X i) iflag=1 +X domRIp="$OPTARG" +X ;; +X a) aflag=1 +X addedIps="$OPTARG" +X ;; +X d) dflag=1 +X removedIps="$OPTARG" +X ;; +X f) fflag=1 +X cfgfile="$OPTARG" +X ;; +X s) sflag=1 +X statsIp="$OPTARG" +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [ "$addedIps" == "" ] +then +X addedIps="none" +fi +X +X +if [ "$removedIps" == "" ] +then +X removedIps="none" +fi +X +VIF_LIST=$(get_vif_list) +X +X +if [ "$addedIps" == "" ] +then +X addedIps="none" +fi +X +if [ "$removedIps" == "" ] +then +X removedIps="none" +fi +X +#FIXME: make this explicit via check on vm type or passed in flag +if [ "$VIF_LIST" == "eth0" ] +then +X ip_entry $addedIps $removedIps +fi +X +# hot reconfigure haproxy +reconfig_lb $cfgfile +X +if [ $? -gt 0 ] +then +X logger -t cloud "Reconfiguring loadbalancer failed" +X #FIXME: make this explicit via check on vm type or passed in flag +X if [ "$VIF_LIST" == "eth0" ] +X then +X ip_entry $removedIps $addedIps +X fi +X unlock_exit 1 $lock $locked +fi +X +# iptables entry to ensure that haproxy receives traffic +fw_entry $addedIps $removedIps $statsIp +X +if [ $? -gt 0 ] +then +X logger -t cloud "Failed to apply firewall rules for load balancing, reverting HA Proxy config" +X # Restore the LB +X restore_lb +X +X logger -t cloud "Reverting firewall config" +X # Revert iptables rules on DomR +X fw_restore +X +X #FIXME: make this explicit via check on vm type or passed in flag +X if [ "$VIF_LIST" == "eth0" ] +X then +X logger -t cloud "Reverting ip address changes to eth0" +X ip_entry $removedIps $addedIps +X fi +X +X unlock_exit 1 $lock $locked +else +X # Remove backedup iptable rules +X fw_remove_backup +fi +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/loadbalancer.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/loadbalancer.sh': 'MD5 check failed' + ) << \SHAR_EOF +6da53e4d9dd0b11f6fa334c6f583f8cd cloud_scripts/opt/cloud/bin/loadbalancer.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/loadbalancer.sh'` -ne 8234 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' is not 8234" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/baremetal_snat.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/baremetal_snat.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/baremetal_snat.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' && +#!/bin/bash +X +#Licensed to the Apache Software Foundation (ASF) under one +#or more contributor license agreements. See the NOTICE file +#distributed with this work for additional information +#regarding copyright ownership. The ASF licenses this file +#to you under the Apache License, Version 2.0 (the +#"License"); you may not use this file except in compliance +#with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +#Unless required by applicable law or agreed to in writing, +#software distributed under the License is distributed on an +#"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +#KIND, either express or implied. See the License for the +#specific language governing permissions and limitations +#under the License. +X +set +u +X +mgmt_nic_ip=$1 +internal_server_ip=$2 +gateway_ip=$3 +X +ip route | grep "$internal_server_ip" > /dev/null +X +if [ $? -ne 0 ]; then +X ip route add $internal_server_ip via $gateway_ip +fi +X +iptables-save | grep -- "-A POSTROUTING -d $internal_server_ip" > /dev/null +X +if [ $? -ne 0 ]; then +X iptables -t nat -A POSTROUTING -d $internal_server_ip -j SNAT --to-source $mgmt_nic_ip +fi +X +X +iptables-save | grep -- "-A INPUT -i eth0 -p udp -m udp --dport 69 -j ACCEPT" > /dev/null +if [ $? -ne 0 ]; then +X iptables -I INPUT -i eth0 -p udp -m udp --dport 69 -j ACCEPT +fi +X +iptables-save | grep -- "-A FORWARD -i eth1 -o eth0 -j ACCEPT" > /dev/null +if [ $? -ne 0 ]; then +X iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT +fi +X +rule="-A FORWARD -d $internal_server_ip/32 -i eth0 -o eth1 -j ACCEPT" +iptables-save | grep -- "$rule" > /dev/null +if [ $? -ne 0 ]; then +X iptables -I FORWARD -d $internal_server_ip/32 -i eth0 -o eth1 -j ACCEPT +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/baremetal_snat.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh': 'MD5 check failed' + ) << \SHAR_EOF +acab3e2b25ee898e7dd05c4e77b15569 cloud_scripts/opt/cloud/bin/baremetal_snat.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh'` -ne 1717 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' is not 1717" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_vpnusers.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vpnusers.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vpnusers.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import copy +X +X +def merge(dbag, data): +X dbagc = copy.deepcopy(dbag) +X +X print dbag +X print data +X if "vpn_users" not in data: +X return dbagc +X +X # remove previously deleted user from the dict +X for user in dbagc.keys(): +X if user == 'id': +X continue +X userrec = dbagc[user] +X add = userrec['add'] +X if not add: +X del(dbagc[user]) +X +X for user in data['vpn_users']: +X username = user['user'] +X add = user['add'] +X if username not in dbagc.keys(): +X dbagc[username] = user +X elif username in dbagc.keys() and not add: +X dbagc[username] = user +X +X return dbagc +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_vpnusers.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py': 'MD5 check failed' + ) << \SHAR_EOF +d54ff81fd9901ecc0bfbe9528343e238 cloud_scripts/opt/cloud/bin/cs_vpnusers.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py'` -ne 1469 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' is not 1469" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/merge.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/merge.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/merge.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/merge.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/merge.py' && +#!/usr/bin/python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import json +import os +import uuid +import logging +import gzip +import shutil +import cs_ip +import cs_guestnetwork +import cs_cmdline +import cs_vmp +import cs_network_acl +import cs_firewallrules +import cs_loadbalancer +import cs_monitorservice +import cs_vmdata +import cs_dhcp +import cs_forwardingrules +import cs_site2sitevpn +import cs_remoteaccessvpn +import cs_vpnusers +import cs_staticroutes +X +X +class DataBag: +X +X DPATH = "/etc/cloudstack" +X +X def __init__(self): +X self.bdata = {} +X +X def load(self): +X data = self.bdata +X if not os.path.exists(self.DPATH): +X os.makedirs(self.DPATH) +X self.fpath = os.path.join(self.DPATH, self.key + '.json') +X +X try: +X with open(self.fpath, 'r') as _fh: +X logging.debug("Loading data bag type %s", self.key) +X data = json.load(_fh) +X except (IOError, ValueError): +X logging.debug("Caught load error, creating empty data bag type %s", self.key) +X data.update({"id": self.key}) +X finally: +X self.dbag = data +X +X def save(self, dbag): +X try: +X with open(self.fpath, 'w') as _fh: +X logging.debug("Writing data bag type %s", self.key) +X json.dump( +X dbag, _fh, +X sort_keys=True, +X indent=2 +X ) +X except IOError: +X logging.error("Could not write data bag %s", self.key) +X +X def getDataBag(self): +X return self.dbag +X +X def setKey(self, key): +X self.key = key +X +X +class updateDataBag: +X +X DPATH = "/etc/cloudstack" +X +X def __init__(self, qFile): +X self.qFile = qFile +X self.fpath = '' +X self.bdata = {} +X self.process() +X +X def process(self): +X self.db = DataBag() +X if (self.qFile.type == "staticnatrules" or self.qFile.type == "forwardrules"): +X self.db.setKey("forwardingrules") +X else: +X self.db.setKey(self.qFile.type) +X dbag = self.db.load() +X logging.info("Command of type %s received", self.qFile.type) +X +X if self.qFile.type == 'ips': +X dbag = self.processIP(self.db.getDataBag()) +X elif self.qFile.type == 'guestnetwork': +X dbag = self.processGuestNetwork(self.db.getDataBag()) +X elif self.qFile.type == 'cmdline': +X dbag = self.processCL(self.db.getDataBag()) +X elif self.qFile.type == 'vmpassword': +X dbag = self.processVMpassword(self.db.getDataBag()) +X elif self.qFile.type == 'networkacl': +X dbag = self.process_network_acl(self.db.getDataBag()) +X elif self.qFile.type == 'firewallrules': +X dbag = self.process_firewallrules(self.db.getDataBag()) +X elif self.qFile.type == 'loadbalancer': +X dbag = self.process_loadbalancer(self.db.getDataBag()) +X elif self.qFile.type == 'monitorservice': +X dbag = self.process_monitorservice(self.db.getDataBag()) +X elif self.qFile.type == 'vmdata': +X dbag = self.processVmData(self.db.getDataBag()) +X elif self.qFile.type == 'dhcpentry': +X dbag = self.process_dhcp_entry(self.db.getDataBag()) +X elif self.qFile.type == 'staticnatrules' or self.qFile.type == 'forwardrules': +X dbag = self.processForwardingRules(self.db.getDataBag()) +X elif self.qFile.type == 'site2sitevpn': +X dbag = self.process_site2sitevpn(self.db.getDataBag()) +X elif self.qFile.type == 'remoteaccessvpn': +X dbag = self.process_remoteaccessvpn(self.db.getDataBag()) +X elif self.qFile.type == 'vpnuserlist': +X dbag = self.process_vpnusers(self.db.getDataBag()) +X elif self.qFile.type == 'staticroutes': +X dbag = self.process_staticroutes(self.db.getDataBag()) +X elif self.qFile.type == 'ipaliases': +X self.db.setKey('ips') +X self.db.load() +X dbag = self.process_ipaliases(self.db.getDataBag()) +X elif self.qFile.type == 'dhcpconfig': +X logging.error("I don't think I need %s anymore", self.qFile.type) +X return +X else: +X logging.error("Error I do not know what to do with file of type %s", self.qFile.type) +X return +X self.db.save(dbag) +X +X def processGuestNetwork(self, dbag): +X d = self.qFile.data +X dp = {} +X dp['public_ip'] = d['router_guest_ip'] +X dp['netmask'] = d['router_guest_netmask'] +X dp['source_nat'] = False +X dp['add'] = d['add'] +X dp['one_to_one_nat'] = False +X dp['gateway'] = d['router_guest_gateway'] +X dp['nic_dev_id'] = d['device'][3:] +X dp['nw_type'] = 'guest' +X dp = PrivateGatewayHack.update_network_type_for_privategateway(dbag, dp) +X qf = QueueFile() +X qf.load({'ip_address': [dp], 'type': 'ips'}) +X if 'domain_name' not in d.keys() or d['domain_name'] == '': +X d['domain_name'] = "cloudnine.internal" +X +X d = PrivateGatewayHack.update_network_type_for_privategateway(dbag, d) +X return cs_guestnetwork.merge(dbag, d) +X +X def process_dhcp_entry(self, dbag): +X return cs_dhcp.merge(dbag, self.qFile.data) +X +X def process_site2sitevpn(self, dbag): +X return cs_site2sitevpn.merge(dbag, self.qFile.data) +X +X def process_remoteaccessvpn(self, dbag): +X return cs_remoteaccessvpn.merge(dbag, self.qFile.data) +X +X def process_vpnusers(self, dbag): +X return cs_vpnusers.merge(dbag, self.qFile.data) +X +X def process_network_acl(self, dbag): +X return cs_network_acl.merge(dbag, self.qFile.data) +X +X def process_firewallrules(self, dbag): +X return cs_firewallrules.merge(dbag, self.qFile.data) +X +X def process_loadbalancer(self, dbag): +X return cs_loadbalancer.merge(dbag, self.qFile.data) +X +X def process_monitorservice(self, dbag): +X return cs_monitorservice.merge(dbag, self.qFile.data) +X +X def process_staticroutes(self, dbag): +X return cs_staticroutes.merge(dbag, self.qFile.data) +X +X def processVMpassword(self, dbag): +X return cs_vmp.merge(dbag, self.qFile.data) +X +X def processForwardingRules(self, dbag): +X # to be used by both staticnat and portforwarding +X return cs_forwardingrules.merge(dbag, self.qFile.data) +X +X def processIP(self, dbag): +X for ip in self.qFile.data["ip_address"]: +X dbag = cs_ip.merge(dbag, ip) +X return dbag +X +X def processCL(self, dbag): +X # Convert the ip stuff to an ip object and pass that into cs_ip_merge +X # "eth0ip": "192.168.56.32", +X # "eth0mask": "255.255.255.0", +X self.newData = [] +X if (self.qFile.data['cmd_line']['type'] == "router"): +X self.processCLItem('0', "guest") +X self.processCLItem('1', "control") +X self.processCLItem('2', "public") +X elif (self.qFile.data['cmd_line']['type'] == "vpcrouter"): +X self.processCLItem('0', "control") +X elif (self.qFile.data['cmd_line']['type'] == "dhcpsrvr"): +X self.processCLItem('0', "guest") +X self.processCLItem('1', "control") +X elif (self.qFile.data['cmd_line']['type'] == "ilbvm"): +X self.processCLItem('0', "guest") +X self.processCLItem('1', "control") +X +X return cs_cmdline.merge(dbag, self.qFile.data) +X +X def processCLItem(self, num, nw_type): +X key = 'eth' + num + 'ip' +X dp = {} +X if(key in self.qFile.data['cmd_line']): +X dp['public_ip'] = self.qFile.data['cmd_line'][key] +X dp['netmask'] = self.qFile.data['cmd_line']['eth' + num + 'mask'] +X dp['source_nat'] = False +X dp['add'] = True +X dp['one_to_one_nat'] = False +X if nw_type == "public": +X dp['gateway'] = self.qFile.data['cmd_line']['gateway'] +X else: +X if('localgw' in self.qFile.data['cmd_line']): +X dp['gateway'] = self.qFile.data['cmd_line']['localgw'] +X else: +X dp['gateway'] = '' +X dp['nic_dev_id'] = num +X dp['nw_type'] = nw_type +X qf = QueueFile() +X qf.load({'ip_address': [dp], 'type': 'ips'}) +X +X def processVmData(self, dbag): +X cs_vmdata.merge(dbag, self.qFile.data) +X return dbag +X +X def process_ipaliases(self, dbag): +X nic_dev = None +X # Should be a way to deal with this better +X for intf, data in dbag.items(): +X if intf == 'id': +X continue +X elif any([net['nw_type'] == 'guest' for net in data]): +X nic_dev = intf +X break +X +X assert nic_dev is not None, 'Unable to determine Guest interface' +X +X nic_dev_id = nic_dev[3:] +X +X for alias in self.qFile.data['aliases']: +X ip = { +X 'add': not alias['revoke'], +X 'nw_type': 'guest', +X 'public_ip': alias['ip_address'], +X 'netmask': alias['netmask'], +X 'nic_dev_id': nic_dev_id +X } +X dbag = cs_ip.merge(dbag, ip) +X return dbag +X +X +class QueueFile: +X +X fileName = '' +X configCache = "/var/cache/cloud" +X keep = True +X data = {} +X +X def load(self, data): +X if data is not None: +X self.data = data +X self.type = self.data["type"] +X updateDataBag(self) +X return +X filename = '{cache_location}/{json_file}'.format(cache_location=self.configCache, json_file=self.fileName) +X try: +X handle = open(filename) +X except IOError as exception: +X error_message = ("Exception occurred with the following exception error '{error}'. Could not open '{filename}'. " +X "It seems that the file has already been moved.".format(error=exception, filename=filename)) +X logging.error(error_message) +X else: +X logging.info("Continuing with the processing of file '{filename}'".format(filename=filename)) +X +X self.data = json.load(handle) +X self.type = self.data["type"] +X handle.close() +X if self.keep: +X self.__moveFile(filename, self.configCache + "/processed") +X else: +X logging.debug("Processed file deleted: %s and not kept in /processed", filename) +X os.remove(filename) +X updateDataBag(self) +X +X def setFile(self, name): +X self.fileName = name +X +X def getType(self): +X return self.type +X +X def getData(self): +X return self.data +X +X def setPath(self, path): +X self.configCache = path +X +X def __moveFile(self, origPath, path): +X if not os.path.exists(path): +X os.makedirs(path) +X originalName = os.path.basename(origPath) +X if originalName.count(".") == 1: +X originalName += "." + str(uuid.uuid4()) +X zipped_file_name = path + "/" + originalName + ".gz" +X with open(origPath, 'rb') as f_in, gzip.open(zipped_file_name, 'wb') as f_out: +X shutil.copyfileobj(f_in, f_out) +X os.remove(origPath) +X +X logging.debug("Processed file written to %s", zipped_file_name) +X +X +class PrivateGatewayHack: +X +X @classmethod +X def update_network_type_for_privategateway(cls, dbag, data): +X ip = data['router_guest_ip'] if 'router_guest_ip' in data.keys() else data['public_ip'] +X +X initial_data = cls.load_inital_data() +X has_private_gw_ip = cls.if_config_has_privategateway(initial_data) +X private_gw_matches = 'privategateway' in initial_data['config'] and cls.ip_matches_private_gateway_ip(ip, initial_data['config']['privategateway']) +X +X if has_private_gw_ip and private_gw_matches: +X data['nw_type'] = "public" +X logging.debug("Updating nw_type for ip %s" % ip) +X else: +X logging.debug("Not updating nw_type for ip %s because has_private_gw_ip = %s and private_gw_matches = %s " % (ip, has_private_gw_ip, private_gw_matches)) +X return data +X +X @classmethod +X def if_config_has_privategateway(cls, dbag): +X return 'privategateway' in dbag['config'].keys() and dbag['config']['privategateway'] != "None" +X +X @classmethod +X def ip_matches_private_gateway_ip(cls, ip, private_gateway_ip): +X new_ip_matches_private_gateway_ip = False +X if ip == private_gateway_ip: +X new_ip_matches_private_gateway_ip = True +X return new_ip_matches_private_gateway_ip +X +X @classmethod +X def load_inital_data(cls): +X initial_data_bag = DataBag() +X initial_data_bag.setKey('cmdline') +X initial_data_bag.load() +X initial_data = initial_data_bag.getDataBag() +X logging.debug("Initial data = %s" % initial_data) +X +X return initial_data +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/merge.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/merge.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/merge.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/merge.py': 'MD5 check failed' + ) << \SHAR_EOF +dc7c85d58b4e5f38ae61c82679523884 cloud_scripts/opt/cloud/bin/merge.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/merge.py'` -ne 13492 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/merge.py' is not 13492" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/master.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/master.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/master.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/master.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/master.py +M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2!&875L="(I"BAO<'1I +M;VYS+"!A/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/master.py': 'MD5 check failed' + ) << \SHAR_EOF +602ac6725c182da5ffa17760b2fe3ba5 cloud_scripts/opt/cloud/bin/master.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/master.py'` -ne 2040 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/master.py' is not 2040" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/set_redundant.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/set_redundant.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/set_redundant.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/set_redundant.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/set_redundant.py +M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/set_redundant.py': 'MD5 check failed' + ) << \SHAR_EOF +648b240f11d938ebd185d0e2a75004b8 cloud_scripts/opt/cloud/bin/set_redundant.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/set_redundant.py'` -ne 1663 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/set_redundant.py' is not 1663" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/checks2svpn.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checks2svpn.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/checks2svpn.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +if [ -z $1 ] +then +X echo "Fail to find VPN peer address!" +X exit 1 +fi +X +ipsec status vpn-$1 > /tmp/vpn-$1.status +X +cat /tmp/vpn-$1.status | grep "ESTABLISHED" > /dev/null +ipsecok=$? +if [ $ipsecok -ne 0 ] +then +X echo -n "IPsec SA not found;" +X echo "Site-to-site VPN have not connected" +X exit 11 +fi +echo -n "IPsec SA found;" +echo "Site-to-site VPN have connected" +Xexit 0 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/checks2svpn.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checks2svpn.sh': 'MD5 check failed' + ) << \SHAR_EOF +8aed94140f491ae027b3b55e9b1535bb cloud_scripts/opt/cloud/bin/checks2svpn.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checks2svpn.sh'` -ne 1178 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' is not 1178" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, vpn): +X key = vpn['vpn_server_ip'] +X op = vpn['create'] +X if key in dbag.keys() and not op: +X del(dbag[key]) +X else: +X dbag[key] = vpn +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py': 'MD5 check failed' + ) << \SHAR_EOF +9945565c7eb92c9fd9aa85648f8c4352 cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py'` -ne 994 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' is not 994" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_staticroutes.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_staticroutes.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_staticroutes.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, staticroutes): +X for route in staticroutes['routes']: +X key = route['network'] +X dbag[key] = route +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_staticroutes.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py': 'MD5 check failed' + ) << \SHAR_EOF +c89832deefffed1dcc12b367d9f9062e cloud_scripts/opt/cloud/bin/cs_staticroutes.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py'` -ne 952 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' is not 952" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, vpn): +X key = vpn['peer_gateway_ip'] +X op = vpn['create'] +X if key in dbag.keys() and not op: +X del(dbag[key]) +X else: +X dbag[key] = vpn +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py': 'MD5 check failed' + ) << \SHAR_EOF +37138a9d2b00c0cd0488f03f0b1e1c34 cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py'` -ne 996 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' is not 996" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/passwd_server_ip.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/passwd_server_ip.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/passwd_server_ip.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/passwd_server_ip.py +M(R$O=7-R+V)I;B]E;G8@<'ET:&]N"B,@3&EC96YS960@=&\@=&AE($%P86-H +M92!3;V9T=V%R92!&;W5N9&%T:6]N("A!4T8I('5N9&5R(&]N90HC(&]R(&UO +M2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N5]P87-S=V]R9"<@/')O=71E$EN(",L +M($9O2AO3H*("`@("`@("!W:71H(&9I;&4H9V5T4&%S +M&-E<'0@24]%3H* +M("`@("`@("`@("`@=VET:"!F:6QE*&=E=%!A&-E +M<'0@24]%"<*("`@(&1E9B!D;U]'150H5]P87-S=V]R9"7!E(#T]("=S879E9%]P87-S=V]R9"7-L;VR=215%515-47TU%5$A/1"7!E)UTL"B`@("`@("`@("`@("`@ +M("`@("`@?2D*("`@("`@("!S96QF+G-E;F1?7-L;V6EN9R!T;R!S879E('!A7-L;V6EN9R!T;R!S879E('!A7-L +M;V7-L;V7-L;V7,N87)G=BD@/B`Q +M.@H@("`@("`@(&%D9')E7-L +M;V6)O87)D26YT97)R +M=7!T.@H@("`@("`@('-Y7-L;V&-E<'0@17AC97!T:6]N+"!E.@H@("`@("`@('-Y7-L;V&-E<'1I;VX@)7,@+2T@ +M9&EE9"<@)2!E*0H@("`@("`@('!A/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py': 'MD5 check failed' + ) << \SHAR_EOF +1d63c1d8b2e5a6a48d48d76228964aee cloud_scripts/opt/cloud/bin/passwd_server_ip.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py'` -ne 7020 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py' is not 7020" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_network_acl.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_network_acl.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_network_acl.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_network_acl.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_network_acl.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_network_acl.py': 'MD5 check failed' + ) << \SHAR_EOF +79760ec4739cb68a9a8bf86319a2dd65 cloud_scripts/opt/cloud/bin/cs_network_acl.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_network_acl.py'` -ne 881 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_network_acl.py' is not 881" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cleanup.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cleanup.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cleanup.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cleanup.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cleanup.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +#rm -rf $@ && echo $? +X +zip_file=$1 +if [ -e "$zip_file" ]; +then +X rm -rf "$zip_file" +X echo "Deleting diagnostics zip file $zip_file" +else +X echo "File $zip_file not found in vm " +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cleanup.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cleanup.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cleanup.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cleanup.sh': 'MD5 check failed' + ) << \SHAR_EOF +63ca1758ffda6344d2622a21f5fc15b9 cloud_scripts/opt/cloud/bin/cleanup.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cleanup.sh'` -ne 986 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cleanup.sh' is not 986" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_loadbalancer.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_loadbalancer.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_loadbalancer.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import copy +X +X +def merge(dbag, data): +X """ Simply overwrite the existsing bag as, the whole configuration is sent every time """ +X if "rules" not in data: +X return dbag +X dbag['config'] = data['rules'] +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_loadbalancer.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py': 'MD5 check failed' + ) << \SHAR_EOF +667380d51eaa9aade2317d66a11529aa cloud_scripts/opt/cloud/bin/cs_loadbalancer.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py'` -ne 1016 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' is not 1016" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpc_func.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_func.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_func.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_func.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_func.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# @VERSION@ +X +getEthByIp (){ +X local ip=$1 +X for dev in `ls -1 /sys/class/net | grep eth` +X do +X sudo ip addr show dev $dev | grep $ip\/ > /dev/null +X if [ $? -eq 0 ] +X then +X echo $dev +X return 0 +X fi +X done +X return 1 +} +X +getVPCcidr () { +X CMDLINE=$(cat /var/cache/cloud/cmdline) +X for i in $CMDLINE +X do +X # search for foo=bar pattern and cut out foo +X KEY=$(echo $i | cut -d= -f1) +X VALUE=$(echo $i | cut -d= -f2) +X if [ "$KEY" == "vpccidr" ] +X then +X echo "$VALUE" +X return 0 +X fi +X done +X return 1 +} +X +removeRulesForIp() { +X local ip=$1 +X iptables-save -t mangle | grep $ip | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t mangle $rule +X done +X iptables-save -t nat | grep $ip | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t nat $rule +X done +X iptables-save -t filter | grep $ip | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t filter $rule +X done +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_func.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_func.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_func.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_func.sh': 'MD5 check failed' + ) << \SHAR_EOF +bc1b0432818cc40ea79df6720e16ecad cloud_scripts/opt/cloud/bin/vpc_func.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_func.sh'` -ne 1849 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_func.sh' is not 1849" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsDhcp.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsDhcp.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N'0B"D1(0U!?3U!44R`]("(O971C+V1H8W!O<'1S +M+G1X="(*0TQ/541?0T].1B`]("(O971C+V1N"`](#`*("`@("`@("!L:7-T96Y?861D0H@("`@("`@("`@("!G871E=V%Y(#T@ +M)R<*("`@("`@("`@("`@:68@2`](&E;)V=A=&5W +M87DG70H@("`@("`@("`@("!S;&EN92`](")D:&-P+7)A;F=E/7-E=#II;G1E +M"P@9V%T97=A>2D*("`@("`@("`@("`@96QS93H*("`@ +M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UR86YG93US970Z:6YT97)F86-E +M+25S+25S+"5S+'-T871I8R(@)2`H9&5V:6-E+"!I9'@L(&EP*0H@("`@("`@ +M("`@("!S96QF+F-O;F8N"D*("`@("`@("`@("`@;&EN92`](")D:&-P+6]P +M=&EO;CUT86"P@9VXN9V5T7V1O;6%I;B@I*0H@("`@("`@("`@("!S96QF+F-O;F8N"!F;W(@>"!I;B!G;BYG971?9&YS*"D@:68@>%T*("`@ +M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C +M92TE"P@)RPG+FIO:6XH9&YS7VQI +M2`A/2`G,"XP+C`N,""D*("`@("`@("`@("`@("`@ +M(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C92TE"P@9V%T97=A>2D*("`@("`@("`@("`@("`@('-E +M;&8N8V]N9BYS96%R8V@H"P@;F5T;6%S:RD*("`@("`@("`@("`@"`K/2`Q"@H@("`@("`@(",@ +M3&ES=&5N($%D9')E3H*("`@ +M("`@("`@("`@;&]G9VEN9RYI;F9O*")!='1E;7!T:6YG('1O(&1E;&5T92!E +M;G1R:65S(&9R;VT@9&YS;6%S<2YL96%S97,@9FEL92!F;W(@5DUS('=H:6-H +M(&%R92!N;W0@;VX@9&AC<&AOW!R:6YT("0S?22DZ"B`@("`@("`@5LG:7!V-%]A +M9&1R97-S)UTL(&5N=')Y6R=H;W-T7VYA;64G72D*("`@("`@("`C($QE87-E +M('1I;64@'!U;F=E9"P@:71S(&%C=&EV +M92!L96%S92!A;F0@1$A#4"]$3E,@8V]N9FEG(&ES('!R;W!E2!I2!R=6YN:6YG(&EN('!R;V1U8W1I;VYS +M('-Y5LG:7!V-%]A9&1R +M97-S)UTL"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@ +M("`@("`@("`@("`@("!E;G1R>5LG:&]S=%]N86UE)UTL"B`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!L96%S +M92DI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L)7,B("4@ +M*'1A9RP@,RDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L +M)7,B("4@*'1A9RP@-BDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D +M9"@B)7,L)7,B("4@*'1A9RP@,34I*0H*("`@("`@("!I(#T@25!!9&1R97-S +M*&5N=')Y6R=I<'8T7V%D9')E2==(#T@96YT2=="@H@("`@9&5F(&%D9%]H;W-T*'-E;&8L(&EP+"!H;W-T +M/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py': 'MD5 check failed' + ) << \SHAR_EOF +bcf1831b38d86bf041523540fa8f821e cloud_scripts/opt/cloud/bin/cs/CsDhcp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py'` -ne 8809 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' is not 8809" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsRedundant.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsRedundant.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N7,N2`](%1R=64*"B`@ +M("`@("`@:68@;F]T(&ES1&5V:6-E4F5A9'DZ"B`@("`@("`@("`@(&QO9V=I +M;F5]I9E]N965D960H"B`@("`@("`@("`@("(E&5C("1$045-3TX@+2T@+2UVR(L(")](BP@6PH@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("`@("(@("`@("`@(&%U=&A?='EP92!!2"!< +M;B(L("(@("`@("`@(&%U=&A?<&%S2AC;VYN=')A8VMD7W1E;7!L871E7V-O;F8L(&-O;FYT0H@("`@("`@("(B(@H@("`@("`@(&ET97)A=&EO;G,@ +M/2`Q,`H@("`@("`@('1I;65?8F5T=V5E;B`](#$*"B`@("`@("`@9F]R(&ET +M97(@:6X@3H* +M("`@("`@("`@("`@("`@(',@/2!S;V-K970N2!R=6YN:6YG("@E9#HE2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I<"@I*2YS=&]P*"D* +M"B`@("`@("`@0W-(96QP97(N2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@ +M("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")!9&1I;F<@9V%T97=A>2`]/3X@ +M)7,@=&\@9&5V:6-E(#T]/B`E2P@9&5V*2D*("`@("`@ +M("`@("`@("`@("`@("!I9B!D978@/3T@0W-(96QP97(N4%5"3$E#7TE.5$52 +M1D%#15-;&5C +M=71E*"(E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I +M<"@I*2YR97-T87)T*"D*"B`@("`@("`@0W-(96QP97(N2D*"B`@("`@("`@("`@(",@5&AE(&9I +M2!I;G1E2!V'1E2!E=F5R(&)E(&]N92!A9&1R97-S(&EN +M(&$@5E!#('1H97)E(&-A;B!B92!M86YY"B`@("`@("`@5&AE(&YE=R!C;V1E +M(&%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py': 'MD5 check failed' + ) << \SHAR_EOF +6936e38f53736f7c5a04b255800a242d cloud_scripts/opt/cloud/bin/cs/CsRedundant.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py'` -ne 16789 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' is not 16789" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsHelper.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsHelper.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsHelper.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsHelper.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B +M971H,2)]"@I35$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S +M:"`M8R`@)VEF(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@ +M96QS92!E8VAO(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@ +M(")V<&-R;W5T97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@ +M6R`D,"`]/2!<(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ +M"B`@("`@("`@("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@ +M("`@("`@(&-M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@ +M("`@("`@;&]G9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S +M(B`E('-T871E7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X +M96-U=&4H7!E*"E=(&%N9"!S +M=&%T92`]/2`B34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE +M8W5T92AC;60I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ +M("`@("`@(&5X96-U=&4H8VUD*0H*"F1E9B!I&5C=71E +M*")M;W5N="!T;7!F6XH=F%L*3H*("`@(&EF('9A;#H* +M("`@("`@("!R971U&5C=71E*")I<"!A9&1R('-H;W<@ +M?&=R97`@+78@WT*("`@("`@("`@("`@ +M=&];)VEP)UT@/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A +M;'-;+3%="B`@("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@ +M("(B(@H@("`@9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G +M*")3879I;F<@:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C +M=71E*")S>7-T96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I +M;F7-T96UC=&P@&5C=71E*")K:6QL +M("U(55`@)7,B("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D +M;G-M87-Q(BP@(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py': 'MD5 check failed' + ) << \SHAR_EOF +9bdd1fdfea8177d3e408b2cc87e5d503 cloud_scripts/opt/cloud/bin/cs/CsHelper.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py'` -ne 7644 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' is not 7644" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5NWT*("`@("`@("!S96QF+F=U97-T(#T@5')U90H@("`@("`@ +M(&1B(#T@1&%T84)A9R@I"B`@("`@("`@9&(N7,H*2!A;F0@;&5N*&1B86=;9&5V:6-E +M72D@(3T@,#H*("`@("`@("`@("`@2==*0H*("`@ +M("`@("!I9B`G9&YS)R!I;B!S96QF+F1A=&$Z"B`@("`@("`@("`@(&1N'1E;F0H&-E<'1I;VXN"B`@("`@("`@:68@)W)O +M=71E"!I="!P2X@22!J=7-T(&%D +M9&5D('1H92!I9BP@87,@26%N(&1I9"!I;B!S;VUE(&]T:&5R(&9I;&5S+"!T +M;R!A=F]I9"!T:&4@97AC97!T:6]N+@H@("`@("`@(&EF("=R;W5T97)?9W5E +M2<@:6X@2=="B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py': 'MD5 check failed' + ) << \SHAR_EOF +98c84f4067412f263891f8293f185243 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py'` -ne 2545 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' is not 2545" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsMonitor.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N"!I;B!S96QF+F1B86=;)V-O;F9I9R==+G-P;&ET*"WT*("`@("`@("!H8U]D871A6R)H96%L=&A?8VAE8VMS7V)A&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!S96QF+F1B +M86&-L=61E9%]H96%L=&A?8VAE8VMS(ET@/2!;70H* +M("`@("`@("!I9B`B:&5A;'1H7V-H96-K/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py': 'MD5 check failed' + ) << \SHAR_EOF +d8f5dcf496dbc6d8508e40b906f48245 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py'` -ne 3681 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' is not 3681" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@ +M("`@("!S96QF+FQA2!E>&ES=',Z(')U;&4] +M)7,@=&%B;&4])7,@8VAA:6X])7,B+"!N97=?2`](&-P>2YR97!L86-E*"(M02`E&5C=71E,B@B:7!T86)L97,@+70@)7,@ +M)7,B("4@*&YE=U]R=6QE+F=E=%]T86)L92@I+"!C<'DI*0H@("`@("`@("`@ +M("`@("`@(R!4:&5R92!A"!I;B!T:&4@ +M9G)A;65W;W)K+@H@("`@("`@("`@("`@("`@:68@&5C=71E*")I<'1A8FQE7!E(#T@0W-#;61,:6YE*")C;61L:6YE(BDN9V5T7W1Y<&4H*0H* +M("`@("`@("!T7!E*3H*("`@("`@("`@("`@("`@(&EF(&DNFEP*&)I='-;,#HZ,ETL(&)I='-;,3HZ,ETI*0H@("`@("`@(&EF +M("(M02(@:6X@2!C;W)R96-T(&EP=&%B;&5S(&-O;6UA +M;F0@(B(B"B`@("`@("`@(R!/7,H*3H*("`@("`@("`@("`@("`@('!R:6YT86)L92`] +M(&LN=7)N($9A;'-E"B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py': 'MD5 check failed' + ) << \SHAR_EOF +7456b53eba9f115f9ad344bc1c01611d cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py'` -ne 11100 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' is not 11100" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsRoute.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRoute.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRoute.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import CsHelper +import logging +X +X +class CsRoute: +X +X """ Manage routes """ +X +X def __init__(self): +X self.table_prefix = "Table_" +X +X def get_tablename(self, name): +X return self.table_prefix + name +X +X def add_table(self, devicename): +X tablenumber = 100 + int(devicename[3:]) +X tablename = self.get_tablename(devicename) +X str = "%s %s" % (tablenumber, tablename) +X filename = "/etc/iproute2/rt_tables" +X logging.info("Adding route table: " + str + " to " + filename + " if not present ") +X if not CsHelper.definedinfile(filename, str): +X CsHelper.execute("sudo echo " + str + " >> /etc/iproute2/rt_tables") +X # remove "from all table tablename" if exists, else it will interfer with +X # routing of unintended traffic +X if self.findRule("from all lookup " + tablename): +X CsHelper.execute("sudo ip rule delete from all table " + tablename) +X +X def flush_table(self, tablename): +X CsHelper.execute("ip route flush table %s" % (tablename)) +X CsHelper.execute("ip route flush cache") +X +X def add_route(self, dev, address): +X """ Wrapper method that adds table name and device to route statement """ +X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 +X table = self.get_tablename(dev) +X +X if not table or not address: +X empty_param = "table" if not table else "address" +X logging.info("Empty parameter received %s while trying to add route, skipping" % empty_param) +X else: +X logging.info("Adding route: dev " + dev + " table: " + +X table + " network: " + address + " if not present") +X cmd = "default via %s table %s proto static" % (address, table) +X self.set_route(cmd) +X +X def add_network_route(self, dev, address): +X """ Wrapper method that adds table name and device to route statement """ +X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 +X table = self.get_tablename(dev) +X +X if not table or not address: +X empty_param = "table" if not table else "address" +X logging.info("Empty parameter received %s while trying to add network route, skipping" % empty_param) +X else: +X logging.info("Adding route: dev " + dev + " table: " + +X table + " network: " + address + " if not present") +X cmd = "throw %s table %s proto static" % (address, table) +X self.set_route(cmd) +X +X def set_route(self, cmd, method="add"): +X """ Add a route if it is not already defined """ +X found = False +X search = cmd +X if "throw" in search: +X search = search.replace("throw", "") +X for i in CsHelper.execute("ip route show " + search): +X found = True +X if not found and method == "add": +X logging.info("Add " + cmd) +X cmd = "ip route add " + cmd +X elif found and method == "delete": +X logging.info("Delete " + cmd) +X cmd = "ip route delete " + cmd +X else: +X return +X CsHelper.execute(cmd) +X +X def add_defaultroute(self, gateway): +X """ Add a default route +X :param str gateway +X :return: bool +X """ +X if not gateway: +X raise Exception("Gateway cannot be None.") +X +X if self.defaultroute_exists(): +X return False +X else: +X cmd = "default via " + gateway +X logging.info("Adding default route") +X self.set_route(cmd) +X return True +X +X def defaultroute_exists(self): +X """ Return True if a default route is present +X :return: bool +X """ +X logging.info("Checking if default ipv4 route is present") +X route_found = CsHelper.execute("ip -4 route list 0/0") +X +X if len(route_found) > 0: +X logging.info("Default route found: " + route_found[0]) +X return True +X else: +X logging.warn("No default route found!") +X return False +X +X def findRule(self, rule): +X for i in CsHelper.execute("ip rule show"): +X if rule in i.strip(): +X return True +X return False +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRoute.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py': 'MD5 check failed' + ) << \SHAR_EOF +4f2109aa1d89157e14817f90c676c2d3 cloud_scripts/opt/cloud/bin/cs/CsRoute.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py'` -ne 4989 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' is not 4989" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py +M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2==*0H@("`@("`@("`@ +M("!#&5C=71E*&-O;6UA;F0I"B`@("`@("`@96QS93H*("`@ +M("`@("`@("`@8V]M;6%N9"`](")I<"!R;W5T92!S:&]W('P@9W)E<"`EW!R:6YT("0Q+"`D,WTG(B`E(')O=71E6R=N971W;W)K)UT*("`@ +M("`@("`@("`@2==*0H@("`@("`@("`@("`@ +C("`@0W-(96QP97(N97AE8W5T92AR;W5T95]C;VUM86YD*0H@ +` +end +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py': 'MD5 check failed' + ) << \SHAR_EOF +f9f9db3a4543397153d69a62551a6c8c cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py'` -ne 1655 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' is not 1655" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N7,H*3H* +M("`@("`@("`@("`@"YS<&QI="@G7&XG*5T*"B`@("`@("`@9FEL +M93$N8V]M;6ET*"D*("`@("`@("!F:6QE,B`]($-S1FEL92A(05!23UA97T-/ +M3D9?4"D*("`@("`@("!I9B!N;W0@9FEL93(N8V]M<&%R92AF:6QE,2DZ"B`@ +M("`@("`@("`@($-S2&5L<&5R+F-O<'DH2$%04D]865]#3TY&7U0L($A!4%)/ +M6%E?0T].1E]0*0H*("`@("`@("`@("`@<')O8R`]($-S4')O8V5S2YP:60G72D*("`@("`@("`@("`@:68@;F]T('!R;V,N9FEN +M9"@I.@H@("`@("`@("`@("`@("`@;&]G9VEN9RYD96)U9R@B0W-,;V%D0F%L +M86YC97(Z.B!W:6QL(')E2$B*0H@("`@("`@("`@("`@ +M("`@0W-(96QP97(N2(L(")R97-T87)T(BD*("`@ +M("`@("`@("`@96QS93H*("`@("`@("`@("`@("`@(&QO9V=I;F2$B*0H@("`@ +M("`@("`@("`@("`@0W-(96QP97(N2(L(")R96QO +M860B*0H*("`@("`@("!A9&1?/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py': 'MD5 check failed' + ) << \SHAR_EOF +8f93571ff9b8f21c947e90193c3efa38 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py'` -ne 3393 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' is not 3393" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsApp.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsApp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsApp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsApp.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G +M871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG971?='EP92@I"B`@ +M("`@("`@5]I9E]N965D +M960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L"B`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE,B]S:71E2DI"B`@("`@("`@ +M("`@(&9I;&4N&5C=71E,B@B/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsApp.py': 'MD5 check failed' + ) << \SHAR_EOF +fa071a9d58a918b6a9d5e09ae10e3e11 cloud_scripts/opt/cloud/bin/cs/CsApp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsApp.py'` -ne 4159 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' is not 4159" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsFile.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsFile.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsFile.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import logging +import re +import copy +X +X +class CsFile: +X """ File editors """ +X +X def __init__(self, filename): +X self.filename = filename +X self.load() +X +X def load(self): +X self.new_config = [] +X self.config = [] +X try: +X for line in open(self.filename): +X self.new_config.append(line) +X except IOError: +X logging.debug("File %s does not exist" % self.filename) +X else: +X logging.debug("Reading file %s" % self.filename) +X self.config = list(self.new_config) +X +X def is_changed(self): +X if set(self.config) != set(self.new_config): +X return True +X else: +X return False +X +X def __len__(self): +X return len(self.config) +X +X def empty(self): +X self.config = [] +X self.new_config = [] +X +X def repopulate(self): +X self.new_config = [] +X +X def commit(self): +X if not self.is_changed(): +X logging.info("Nothing to commit. The %s file did not change" % self.filename) +X return False +X handle = open(self.filename, "w+") +X for line in self.new_config: +X handle.write(line) +X handle.close() +X logging.info("Wrote edited file %s" % self.filename) +X self.config = list(self.new_config) +X logging.info("Updated file in-cache configuration") +X return True +X +X def dump(self): +X for line in self.new_config: +X print line +X +X def addeq(self, string): +X """ Update a line in a file of the form token=something +X match on token= and replace something if needed +X Add line if token is not present +X """ +X token = string.split('=')[0] + '=' +X self.search(token, string) +X +X def append(self, string, where=-1): +X if where == -1: +X self.new_config.append("%s\n" % string) +X else: +X self.new_config.insert(where, "%s\n" % string) +X +X def add(self, string, where=-1): +X for index, line in enumerate(self.new_config): +X if line.strip() == string: +X return False +X if where == -1: +X self.new_config.append("%s\n" % string) +X else: +X self.new_config.insert(where, "%s\n" % string) +X return True +X +X def section(self, start, end, content): +X sind = -1 +X eind = -1 +X found = False +X for index, line in enumerate(self.new_config): +X if found and line.strip() == end: +X eind = index +X found = False +X if line.strip() == start: +X sind = index + 1 +X found = True +X if sind == -1: +X content.insert(0, start + "\n") +X content.append(end + "\n") +X self.new_config[sind:eind] = content +X +X def greplace(self, search, replace): +X logging.debug("Searching for %s and replacing with %s" % (search, replace)) +X self.new_config = [w.replace(search, replace) for w in self.new_config] +X +X def replaceIfFound(self, search, replace): +X found = False +X replace_filtered = replace +X if re.search("PSK \"", replace): +X replace_filtered = re.sub(r'".*"', '"****"', replace) +X logging.debug("Searching for %s and replacing with %s if found" % (search, replace_filtered)) +X for index, line in enumerate(self.new_config): +X if line.lstrip().startswith("#"): +X continue +X if re.search(search, line): +X if replace not in line: +X self.new_config[index] = replace + "\n" +X return False +X +X def search(self, search, replace): +X found = False +X replace_filtered = replace +X if re.search("PSK \"", replace): +X replace_filtered = re.sub(r'".*"', '"****"', replace) +X logging.debug("Searching for %s and replacing with %s" % (search, replace_filtered)) +X for index, line in enumerate(self.new_config): +X if line.lstrip().startswith("#"): +X continue +X if re.search(search, line): +X found = True +X if replace not in line: +X self.new_config[index] = replace + "\n" +X if not found: +X self.new_config.append(replace + "\n") +X return True +X return False +X +X def searchString(self, search, ignoreLinesStartWith): +X found = False +X logging.debug("Searching for %s string " % search) +X +X for index, line in enumerate(self.new_config): +X print ' line = ' + line +X if line.lstrip().startswith(ignoreLinesStartWith): +X continue +X if search in line: +X found = True +X break +X +X return found +X +X def deleteLine(self, search): +X found = False +X logging.debug("Searching for %s to remove the line " % search) +X temp_config = [] +X for index, line in enumerate(self.new_config): +X if line.lstrip().startswith("#"): +X continue +X if search not in line: +X temp_config.append(line) +X +X self.new_config = list(temp_config) +X +X def compare(self, o): +X result = (isinstance(o, self.__class__) and set(self.config) == set(o.config)) +X logging.debug("Comparison of CsFiles content is ==> %s" % result) +X return result +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsFile.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsFile.py': 'MD5 check failed' + ) << \SHAR_EOF +81531ddee205a5eb66bb44f400ab222c cloud_scripts/opt/cloud/bin/cs/CsFile.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsFile.py'` -ne 6133 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' is not 6133" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/__init__.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/__init__.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/__init__.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/__init__.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/__init__.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/__init__.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/__init__.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/__init__.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/__init__.py': 'MD5 check failed' + ) << \SHAR_EOF +33215d440d5ba5fa95b1ffa035d769e2 cloud_scripts/opt/cloud/bin/cs/__init__.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/__init__.py'` -ne 785 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/__init__.py' is not 785" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsAddress.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsAddress.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsAddress.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsAddress.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N`H@("`@("`@("`@("`@("`@("`@ +M(&=U97-T7VEN=&5R9F%C92`](&EN=&5R9F%C90H@("`@("`@("`@("`@("`@ +M("`@(&QO9V=I;F2!C;VYF:6=U2AS96QF*3H*("`@("`@("!I +M9B!S96QF+F-O;F9I9RYI2(I +M"B`@("`@("`@96QS93H*("`@("`@("`@("`@2@I+"!S96QF+F=E=%]S +M:7IE*"DI"@H@("`@9&5F(&=E=%]S:7IE*'-E;&8I.@H@("`@("`@("(B(B!2 +M971U7!E +M(B!I;B!S96QF+F%D9')E"@Q,#`@*R!I;G0H9&5V6S,Z72DI +M"B`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@("`@97AC97!T($5X8V5P=&EO;B!A +M&-E<'1I;VX@ +M;V-C=7)R960@/3T^("5S(B`E(&4I"@H@("`@("`@("`@("!S96QF+G!O7!E*"D@:6X@6R)C;VYT7!E*"D@:6X@ +M6R=P=6)L:6,G73H*("`@("`@("`@("`@("`@('-E;&8N7!E*"E=.@H@("`@("`@ +M("`@("`@("`@9V%T97=A>2`]('-T2@I*3H* +M("`@("`@("`@("`@("`@(')O=71E+F%D9%]D969A=6QT2@I*0H*("`@(&1E9B!S971?;6%R:RAS96QF*3H*("`@ +M("`@("!C;60@/2`B+4$@4%)%4D]55$E.1R`M:2`E7!E(&]F('1H92!)4`H@("`@("`@(&=U97-T"B`@("`@("`@8V]N +M=')O;`H@("`@("`@('!U8FQI8PH@("`@("`@("(B(@H@("`@("`@(&EF(")N +M=U]T>7!E(B!I;B!S96QF+F%D9')E&9F9F9F9F9F +M("TM8W1M87-K(#!X9F9F9F9F9F8B72D*"B`@("`@("`@&UA7!E*"D@:6X@6R)G=65S=")=.@H@("`@("`@("`@("!G=65S +M=$YE='=O&9F9F9F9F9F(ETI"B`@ +M("`@("`@("`@(&=U97-T3F5T=V]R:T-I9'(@/2!S96QF+F%D9')E#4R-2\P>&9F9F9F9F9F(B`E +M("AS96QF+F1E=BP@2)=("$](").;VYE(CH* +M("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@("`@("`@:68@ +M(FYE='=O7!E*"D@:6X@6R)P=6)L:6,B +M72!A;F0@(F=A=&5W87DB(&EN('-E;&8N861D2)=("$] +M(").;VYE(CH*("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@ +M("`@("`@("`@(&9O7!E(B!I;B!A9&1R97-S(&%N9"!A +M9&1R97-S6R)N=U]T>7!E(ET@/3T@(F=U97-T(CH*("`@("`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("!R;W5T92YA9&1?;F5T=V]R:U]R;W5T92AS96QF +M+F1E=BP@&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A8VAE(BD*"B`@("`@("`@ +M96QI9B!M971H;V0@/3T@(F1E;&5T92(Z"B`@("`@("`@("`@(",@=')E870@ +M=&AE(&QA&5C=71E*")S=61O(&EP(')U;&4@9&5L971E('1A8FQE("(@*R!T86)L94YA +M;64I"B`@("`@("`@("`@("`@("!#&5C=71E*")S=61O(&EP +M(')O=71E(&9L=7-H('1A8FQE("(@*R!T86)L94YA;64I"B`@("`@("`@("`@ +M("`@("!#&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A +M8VAE(BD*("`@("`@("`@("`@("`@($-S4G5L92AS96QF+F1E=BDN9&5L36%R +M:R@I"@H@("`@("`@('-E;&8N9G=?7!E('=I;&P@ +M;F\@;&]N9V5R(&)E(&MN;W=N"B`@("`@("`@:68@7!E*"D@/3T@(G!U8FQI8R(@86YD('-E;&8N8V]N9FEG+FES7W9P8R@I +M(&%N9"!M971H;V0@/3T@(F%D9"(Z"B`@("`@("`@("`@(&EF('-E;&8N861D +M7,H*3H*("`@("`@("`@ +M("`@7!E)UT@:6X@5E)2 +M4%]465!%4SH*("`@("`@("`@("`@7!E(B!I;B!S96QF+F%D9')E&5C=71E,BAC;60L($9A +M;'-E*0H*("`@(",@1&5L971E(&%N>2!I<',@=&AA="!A7,H*2!O2AS96QF+"!B862!F;W(@ +M7,O8VQA"TP+W)P&-E<'0@24]%/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py': 'MD5 check failed' + ) << \SHAR_EOF +5cebbbd106abd3eba7ee0e4d23277dda cloud_scripts/opt/cloud/bin/cs/CsAddress.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py'` -ne 29236 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' is not 29236" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsProcess.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsProcess.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsProcess.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import os +import re +import CsHelper +import logging +X +X +class CsProcess(object): +X """ Manipulate processes """ +X +X def __init__(self, search): +X self.search = search +X +X def start(self, thru, background=''): +X # if(background): +X # cmd = cmd + " &" +X logging.info("Started %s", " ".join(self.search)) +X os.system("%s %s %s" % (thru, " ".join(self.search), background)) +X +X def kill_all(self): +X pids = self.find_pid() +X for p in pids: +X CsHelper.execute("kill -9 %s" % p) +X +X def find_pid(self): +X self.pid = [] +X for i in CsHelper.execute("ps aux"): +X items = len(self.search) +X proc = re.split(r"\s+", i)[items*-1:] +X matches = len([m for m in proc if m in self.search]) +X if matches == items: +X self.pid.append(re.split(r"\s+", i)[1]) +X +X logging.debug("CsProcess:: Searching for process ==> %s and found PIDs ==> %s", self.search, self.pid) +X return self.pid +X +X def find(self): +X has_pid = len(self.find_pid()) > 0 +X return has_pid +X +X def kill(self, pid): +X if pid > 1: +X CsHelper.execute("kill -9 %s" % pid) +X +X def grep(self, str): +X for i in CsHelper.execute("ps aux"): +X if i.find(str) != -1: +X return re.split(r"\s+", i)[1] +X return -1 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsProcess.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py': 'MD5 check failed' + ) << \SHAR_EOF +75a4650fe1e521049e80d32a022d8689 cloud_scripts/opt/cloud/bin/cs/CsProcess.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py'` -ne 2156 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' is not 2156" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsConfig.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsConfig.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsConfig.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsConfig.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N7!E*"D@/3T@)W9P8W)O=71E'1D;G,H'1D;G,G+"`G9F%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py': 'MD5 check failed' + ) << \SHAR_EOF +836541a5b9cb1b2f9df5dad6bb806745 cloud_scripts/opt/cloud/bin/cs/CsConfig.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py'` -ne 3179 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' is not 3179" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsDatabag.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@("`@ +M("!S96QF+F1B(#T@1&%T84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF +M+F1B+G-A=F4HWT*("`@("`@("!R971U&1I9V5S="@I"@H@("`@ +M9&5F(&=E=%]G871E=V%Y*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I +M;B!S96QF+FED871A*"DZ"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A +M*"E;)V=A=&5W87DG70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G +M971?=7-E7V5X=%]D;G,H'1D;G,G70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E +M9B!G971?861V97)T7VEN="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN +M="<@:6X@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py': 'MD5 check failed' + ) << \SHAR_EOF +9e4de6e0a115a5e806e80dc151769b21 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py'` -ne 4808 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' is not 4808" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsRule.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRule.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRule.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import CsHelper +import logging +X +X +class CsRule: +X """ Manage iprules +X Supported Types: +X fwmark +X """ +X +X def __init__(self, dev): +X self.dev = dev +X self.tableNo = 100 + int(dev[3:]) +X self.table = "Table_%s" % (dev) +X +X def addRule(self, rule): +X if not self.findRule(rule + " lookup " + self.table): +X cmd = "ip rule add " + rule + " table " + self.table +X CsHelper.execute(cmd) +X logging.info("Added rule %s for %s" % (cmd, self.table)) +X +X def findRule(self, rule): +X for i in CsHelper.execute("ip rule show"): +X if rule in i.strip(): +X return True +X return False +X +X def addMark(self): +X if not self.findMark(): +X cmd = "ip rule add fwmark %s table %s" % (self.tableNo, self.table) +X CsHelper.execute(cmd) +X logging.info("Added fwmark rule for %s" % (self.table)) +X +X def delMark(self): +X if self.findMark(): +X cmd = "ip rule delete fwmark %s table %s" % (self.tableNo, self.table) +X CsHelper.execute(cmd) +X logging.info("Deleting fwmark rule for %s" % (self.table)) +X +X def findMark(self): +X srch = "from all fwmark %s lookup %s" % (hex(self.tableNo), self.table) +X for i in CsHelper.execute("ip rule show"): +X if srch in i.strip(): +X return True +X return False +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRule.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRule.py': 'MD5 check failed' + ) << \SHAR_EOF +78748432f1ac57194339aef8bdb7c9f8 cloud_scripts/opt/cloud/bin/cs/CsRule.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRule.py'` -ne 2192 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' is not 2192" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vmdata.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vmdata.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vmdata.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vmdata.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/vmdata.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&ET*#(I +M"@H@("`@9F]R(&EP(&EN(&IS;VY?9&%T83H*("`@("`@("!F;W(@:71E;2!I +M;B!J2!V86QI9"!D +M871A"B`@("`@("`@("`@(&EF(&9O;&1E&ES=',H;65T +M86UA;FEF97-T*3H*("`@("`@("!O2Q!;&QO=UQN1&5N +M>2!F&-E<'0@3U-%2!E>&ES=',L('=E(&1O(&ET('1H:7,@=V%Y(&9O +M7,N97AI="@Q*0H*("`@(&9H(#T@;W!E;BAH +M=&%C8V5S2`K("=<;B&9L;V-K*&9I;&4I.@H@("`@=')Y.@H@("`@("`@(&9L;V-K +M*&9I;&4L($Q/0TM?15@I"B`@("!E>&-E<'0@24]%7,N97AI="@Q +M*0H@("`@3H*("`@("`@("!F;&]C:RAF:6QE+"!,3T-+7U5.*0H@("`@97AC97!T($E/ +M17)R;W(@87,@93H*("`@("`@("!P7,N97AI="@Q*0H@("`@7,N87)G=ELQ.ETI"FYA +` +end +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vmdata.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vmdata.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vmdata.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vmdata.py': 'MD5 check failed' + ) << \SHAR_EOF +f585277ddefb989a0662db609bc199c7 cloud_scripts/opt/cloud/bin/vmdata.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vmdata.py'` -ne 4723 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vmdata.py' is not 4723" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/get_diagnostics_files.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/get_diagnostics_files.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/get_diagnostics_files.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' && +#!/usr/bin/env python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import logging +import os +import re +import shlex +import subprocess as sp +import sys +import time +import zipfile +X +X +# Create zip archive and append files for retrieval +def zip_files(files): +X fList = files +X compression = zipfile.ZIP_DEFLATED +X time_str = time.strftime("%Y%m%d-%H%M%S") +X zf_name = '/root/diagnostics_files_' + time_str + '.zip' +X zf = zipfile.ZipFile(zf_name, 'w', compression) +X +X ''' +X Initialize 3 empty arrays to collect found files, non-existent files +X and last one to collect temp files to be cleaned up when script exits +X ''' +X files_found_list = [] +X files_not_found_list = [] +X files_from_shell_commands = [] +X +X try: +X for f in fList: +X f = f.strip() +X +X if f in ('iptables', 'ipaddr', 'iprule', 'iproute'): +X f = execute_shell_script(f) +X files_from_shell_commands.append(f) +X +X if len(f) > 3 and f.startswith('[') and f.endswith(']'): +X f = execute_shell_script(f[1:-1]) +X files_from_shell_commands.append(f) +X +X if os.path.isfile(f): +X try: +X zf.write(f, f[f.rfind('/') + 1:]) +X except OSError or RuntimeError as e: +X files_not_found_list.append(f) +X else: +X files_found_list.append(f) +X finally: +X cleanup(files_from_shell_commands) +X generate_retrieved_files_txt(zf, files_found_list, files_not_found_list) +X zf.close() +X print zf_name +X +X +def get_cmd(script): +X if script is None or len(script) == 0: +X return None +X +X cmd = None +X if script == 'iptables': +X cmd = 'iptables-save' +X elif script == 'ipaddr': +X cmd = 'ip address' +X elif script == 'iprule': +X cmd = 'ip rule list' +X elif script == 'iproute': +X cmd = 'ip route show table all' +X else: +X cmd = '/opt/cloud/bin/' + script +X if not os.path.isfile(cmd.split(' ')[0]): +X cmd = None +X +X return cmd +X +X +def execute_shell_script(script): +X script = script.strip() +X outputfile = script + '.log' +X +X with open(outputfile, 'wb', 0) as f: +X try: +X cmd = get_cmd(script) +X if cmd is None: +X f.write('Unable to generate command for ' + script + ', perhaps missing file') +X else: +X p = sp.Popen(cmd, shell=True, stdout=sp.PIPE, stderr=sp.PIPE) +X stdout, stderr = p.communicate() +X return_code = p.returncode +X if return_code is 0: +X f.write(stdout) +X else: +X f.write(stderr) +X except OSError as ex: +X delete_tmp_file_cmd = 'rm -f %s' % outputfile +X sp.check_call(shlex.split(delete_tmp_file_cmd)) +X finally: +X f.close() +X return outputfile +X +X +def cleanup(file_list): +X files = ' '.join(file_list) +X cmd = 'rm -f %s' % files +X try: +X p = sp.Popen(shlex.split(cmd), stderr=sp.PIPE, stdout=sp.PIPE) +X p.communicate() +X except OSError as e: +X logging.debug("Failed to execute bash command") +X +X +def generate_retrieved_files_txt(zip_file, files_found, files_not_found): +X output_file = 'fileinfo.txt' +X try: +X with open(output_file, 'wb', 0) as man: +X for i in files_found: +X man.write(i + '\n') +X for j in files_not_found: +X man.write(j + 'File Not Found!!\n') +X zip_file.write(output_file, output_file) +X finally: +X cleanup_cmd = "rm -f %s" % output_file +X sp.check_call(shlex.split(cleanup_cmd)) +X +X +if __name__ == '__main__': +X fileList = sys.argv[1:] +X zip_files(fileList) +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/get_diagnostics_files.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py': 'MD5 check failed' + ) << \SHAR_EOF +f8b91c14af848f14696aa2c1193b0907 cloud_scripts/opt/cloud/bin/get_diagnostics_files.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py'` -ne 4478 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' is not 4478" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/checkrouter.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checkrouter.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checkrouter.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/checkrouter.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checkrouter.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +STATUS=UNKNOWN +X +if [ "$(systemctl is-active keepalived)" != "active" ] +then +X echo "Status: FAULT" +X exit +fi +X +ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g') +if [ "$ROUTER_TYPE" = "router" ] +then +X ROUTER_STATE=$(ip addr show dev eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi') +X STATUS=$ROUTER_STATE +else +X ROUTER_STATE=$(ip addr show dev eth1 | grep state | awk '{print $9;}') +X if [ "$ROUTER_STATE" = "UP" ] +X then +X STATUS=MASTER +X elif [ "$ROUTER_STATE" = "DOWN" ] +X then +X STATUS=BACKUP +X fi +fi +X +echo "Status: ${STATUS}" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checkrouter.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/checkrouter.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/checkrouter.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checkrouter.sh': 'MD5 check failed' + ) << \SHAR_EOF +b107b37bc85a7036ef9f4e81cf4ae8b2 cloud_scripts/opt/cloud/bin/checkrouter.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checkrouter.sh'` -ne 1445 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checkrouter.sh' is not 1445" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/ilb.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ilb.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ilb.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/ilb.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/ilb.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s: -a -d -f -s \n" $(basename $0) >&2 +} +X +#set -x +X +fw_remove_backup() { +X logger -t cloud "$(basename $0): Entering fw_remove_backup" +X local lb_vif_list=eth0 +X for vif in $lb_vif_list; do +X sudo iptables -F back_load_balancer_$vif 2> /dev/null +X sudo iptables -D INPUT -i $vif -p tcp -j back_load_balancer_$vif 2> /dev/null +X sudo iptables -X back_load_balancer_$vif 2> /dev/null +X done +X sudo iptables -F back_lb_stats 2> /dev/null +X sudo iptables -D INPUT -p tcp -j back_lb_stats 2> /dev/null +X sudo iptables -X back_lb_stats 2> /dev/null +} +X +fw_restore() { +X logger -t cloud "$(basename $0): Entering fw_restore" +X local lb_vif_list="eth0" +X for vif in $lb_vif_list; do +X sudo iptables -F load_balancer_$vif 2> /dev/null +X sudo iptables -D INPUT -i $vif -p tcp -j load_balancer_$vif 2> /dev/null +X sudo iptables -X load_balancer_$vif 2> /dev/null +X sudo iptables -E back_load_balancer_$vif load_balancer_$vif 2> /dev/null +X done +X sudo iptables -F lb_stats 2> /dev/null +X sudo iptables -D INPUT -p tcp -j lb_stats 2> /dev/null +X sudo iptables -X lb_stats 2> /dev/null +X sudo iptables -E back_lb_stats lb_stats 2> /dev/null +} +X +# firewall entry to ensure that haproxy can receive on specified port +fw_entry() { +X logger -t cloud "$(basename $0): Entering fw_entry" +X local added=$1 +X local removed=$2 +X local stats=$3 +X +X if [ "$added" == "none" ] +X then +X added="" +X fi +X +X if [ "$removed" == "none" ] +X then +X removed="" +X fi +X +X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") +X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") +X +# back up the iptable rules by renaming before creating new. +X local lb_vif_list=eth0 +X for vif in $lb_vif_list; do +X sudo iptables -E load_balancer_$vif back_load_balancer_$vif 2> /dev/null +X sudo iptables -N load_balancer_$vif 2> /dev/null +X sudo iptables -A INPUT -i $vif -p tcp -j load_balancer_$vif +X done +X sudo iptables -E lb_stats back_lb_stats 2> /dev/null +X sudo iptables -N lb_stats 2> /dev/null +X sudo iptables -A INPUT -p tcp -j lb_stats +X +X for i in $a +X do +X local pubIp=$(echo $i | cut -d: -f1) +X local dport=$(echo $i | cut -d: -f2) +X local lb_vif_list="eth0" +X for vif in $lb_vif_list; do +X sudo iptables -A load_balancer_$vif -p tcp -d $pubIp --dport $dport -j ACCEPT +X if [ $? -gt 0 ] +X then +X return 1 +X fi +X done +X done +X local pubIp=$(echo $stats | cut -d: -f1) +X local dport=$(echo $stats | cut -d: -f2) +X local cidrs=$(echo $stats | cut -d: -f3 | sed 's/-/,/') +X sudo iptables -A lb_stats -s $cidrs -p tcp -m state --state NEW -d $pubIp --dport $dport -j ACCEPT +X +X return 0 +} +X +#Hot reconfigure HA Proxy in the routing domain +reconfig_lb() { +X logger -t cloud "Reconfiguring ilb using $1" +X /root/reconfigLB.sh $1 +X return $? +} +X +# Restore the HA Proxy to its previous state, and revert iptables rules on loadbalancer +restore_lb() { +X logger -t cloud "Restoring HA Proxy to previous state" +X # Copy the old version of haproxy.cfg into the file that reconfigLB.sh uses +X cp /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg.new +X +X if [ $? -eq 0 ] +X then +X # Run reconfigLB.sh again +X /root/reconfigLB.sh /etc/haproxy/haproxy.cfg.new +X fi +} +X +X +logger -t cloud "$(basename $0): Entering $(dirname $0)/$(basename $0)" +X +iflag= +aflag= +dflag= +fflag= +sflag= +X +while getopts 'i:a:d:f:s:' OPTION +do +X case $OPTION in +X i) iflag=1 +X domRIp="$OPTARG" #unused but passed in +X ;; +X a) aflag=1 +X addedIps="$OPTARG" +X ;; +X d) dflag=1 +X removedIps="$OPTARG" +X ;; +X f) fflag=1 +X cfgfile="$OPTARG" +X ;; +X s) sflag=1 +X statsIp="$OPTARG" +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [[ "$aflag$dflag" != "1" && "$aflag$dflag" != "11" ]] +then +X usage +X unlock_exit 2 $lock $locked +fi +X +if [ "$addedIps" == "" ] +then +X addedIps="none" +fi +X +X +if [ "$removedIps" == "" ] +then +X removedIps="none" +fi +X +X +# hot reconfigure haproxy +reconfig_lb $cfgfile +X +if [ $? -gt 0 ] +then +X logger -t cloud "Reconfiguring ilb failed" +X unlock_exit 1 $lock $locked +fi +X +logger -t cloud "HAProxy reconfigured successfully, configuring firewall" +X +# iptables entry to ensure that haproxy receives traffic +fw_entry $addedIps $removedIps $statsIp +X +if [ $? -gt 0 ] +then +X logger -t cloud "Failed to apply firewall rules for internal load balancing, reverting HA Proxy config" +X # Restore the LB +X restore_lb +X +X logger -t cloud "Reverting firewall config" +X fw_restore +X +X unlock_exit 1 $lock $locked +else +X # Remove backedup iptable rules +X logger -t cloud "Firewall configured successfully, deleting backup firewall config" +X fw_remove_backup +fi +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/ilb.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/ilb.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/ilb.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ilb.sh': 'MD5 check failed' + ) << \SHAR_EOF +8b7374975ee7d7a5d73da78b60bd508c cloud_scripts/opt/cloud/bin/ilb.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ilb.sh'` -ne 5644 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ilb.sh' is not 5644" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +for i in $* +do +X info=`/opt/cloud/bin/checks2svpn.sh $i` +X ret=$? +X batchInfo+="$i:$ret:$info&" +done +echo -n $batchInfo +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh': 'MD5 check failed' + ) << \SHAR_EOF +36a25911b669737ea678011f72a6f3f9 cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh'` -ne 924 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' is not 924" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/savepassword.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/savepassword.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/savepassword.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/savepassword.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/savepassword.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# Usage +# save_password -v -p +X +while getopts 'v:p:' OPTION +do +X case $OPTION in +X v) VM_IP="$OPTARG" +X ;; +X p) PASSWORD="$OPTARG" +X ;; +X ?) echo "Incorrect usage" +X ;; +X esac +done +TOKEN_FILE="/tmp/passwdsrvrtoken" +TOKEN="" +if [ -f $TOKEN_FILE ]; then +X TOKEN=$(cat $TOKEN_FILE) +fi +ps aux | grep passwd_server_ip.py |grep -v grep 2>&1 > /dev/null +if [ $? -eq 0 ] +then +X ips=$(ip addr show | grep inet | awk '{print $2}') +X for ip in $ips; do +X server_ip=$(echo $ip | awk -F'/' '{print $1}') +X curl --header "DomU_Request: save_password" "http://$server_ip:8080/" -F "ip=$VM_IP" -F "password=$PASSWORD" -F "token=$TOKEN" >/dev/null 2>/dev/null & +X done +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/savepassword.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/savepassword.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/savepassword.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/savepassword.sh': 'MD5 check failed' + ) << \SHAR_EOF +edebd2c25984e1ed00b36e4f8d360a63 cloud_scripts/opt/cloud/bin/savepassword.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/savepassword.sh'` -ne 1525 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/savepassword.sh' is not 1525" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cloud-nic.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cloud-nic.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cloud-nic.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +plug_nic() { +X sudo echo "$tableNo $tableName" >> /etc/iproute2/rt_tables 2>/dev/null +X sudo ip rule add fwmark $tableNo table $tableName 2>/dev/null +X sudo ip route flush table $tableName +X sudo ip route flush cache +} +X +X +unplug_nic() { +X sudo iptables -t mangle -D PREROUTING -i $dev -m state --state NEW -j CONNMARK --set-mark $tableNo 2>/dev/null +X +X sudo ip rule del fwmark $tableNo 2>/dev/null +X sudo ip route flush table $tableName +X sudo sed -i /"$tableNo $tableName"/d /etc/iproute2/rt_tables 2>/dev/null +X sudo ip route flush cache +X # remove network usage rules +X sudo iptables -F NETWORK_STATS_$dev 2>/dev/null +X iptables-save | grep NETWORK_STATS_$dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables $rule +X done +X sudo iptables -X NETWORK_STATS_$dev 2>/dev/null +X # remove vpn network usage rules +X sudo iptables -t mangle -F VPN_STATS_$dev 2>/dev/null +X iptables-save -t mangle | grep VPN_STATS_$dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t mangle $rule +X done +X sudo iptables -t mangle -X VPN_STATS_$dev 2>/dev/null +X # remove rules on this dev +X iptables-save -t mangle | grep $dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t mangle $rule +X done +X iptables-save -t nat | grep $dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t nat $rule +X done +X iptables-save | grep $dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables $rule +X done +X # remove apache config for this eth +X rm -f /etc/apache2/conf.d/vhost$dev.conf +} +X +action=$1 +dev=$2 +tableNo=$((100+${dev:3})) +tableName="Table_$dev" +X +if [ $action == 'add' ] +then +X plug_nic +else +X unplug_nic +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cloud-nic.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cloud-nic.sh': 'MD5 check failed' + ) << \SHAR_EOF +6afed00cefb1dc06b8b4969c2c26933e cloud_scripts/opt/cloud/bin/cloud-nic.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cloud-nic.sh'` -ne 2632 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' is not 2632" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/ipsectunnel.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ipsectunnel.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/ipsectunnel.sh (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/ipsectunnel.sh +M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N#4R-2(*=G!N:6YM87)K/2(P>#4R-"(*"G5S86=E*"D@ +M>PH@("`@<')I;G1F(")5PH@('-U9&\@:7!T86)L +M97,MPH@(&1I2!<"B`@("!P +M:&%S93(@<&]L:6-Y/21ER1R:6=H=&YE='-] +M(B`^/B`D=G!N8V]N9F9I;&4@)B8*("!S=61O(&5C:&\@(B`@='EP93UT=6YN +M96PB(#X^("1V<&YC;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!A=71H8GD] +MVEK96QI9F5T:6UE?7,B(#X^("1V<&YC +M;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!E2(@/CX@ +M)'9P;F-O;F9F:6QE("8F"B`@2!F +M;W(@'1H;W`](B1/4%1!4D&ET("1R970* +` +end +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/ipsectunnel.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh': 'MD5 check failed' + ) << \SHAR_EOF +097a970ec94a68d965ffd7f446e3862d cloud_scripts/opt/cloud/bin/ipsectunnel.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh'` -ne 8769 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' is not 8769" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/ipassoc.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ipassoc.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ipassoc.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/ipassoc.sh (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/ipassoc.sh +M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N"`D("1(96%D55),.B!S=FXZ+R]S=FXN;&%B+G9M;W!S+F-O;2]R97!O2!E>&ES=',B"GT* +M"F1E;%]F=U]C:&%I;E]F;W)?:7`@*"D@>PH@(&QO8V%L('!U8DEP/20H96-H +M;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?2W!R:6YT("0R?2W!R:6YT("0R?2W!R:6YT("0Q?2PH@(&QO +M8V%L(&1E=CTB)#$B"B`@;&]C86P@:7`](B0R(@H@('-U9&\@:7`@861DW!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP/20Q +M"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0Q?22!F;W(@:7`@)'!U8DEP(&]N(&EN=&5R9F%C92`D971H1&5V(@H@("`@ +M(')E='5R;B`Q"B`@9FD*"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0R?2<@('P@9W)E<"`M=R`D +M:7!.;TUAW!R +M:6YT("0R?2#TD*'!R:6YT9B`B)7A<;B(@)&YU;2D*("`@("`@("`@ +M(&5C:&\@)&AE>#L*("`@("`@("`@("-E;F%B;&4@`IS +M9FQA9STP"FQF;&%G/0IF9FQA9ST*8V9L86<]"FYF;&%G/0IO<#TB(@H*:7-? +M;6%S=&5R/3`*:7-?&ET(#(@)&QO8VL@)&QO8VME9`H)"3L["B`@ +M97-A8PID;VYE"@H*:68@6R`B)$%F;&%G)$1F;&%G(B`A/2`B,2(@70IT:&5N +M"B`@("!U&ET("0_("1L;V-K +M("1L;V-K960*9FD*"FEF(%L@(B1F9FQA9R(@/3T@(C$B(%T@)B8@6R`B)$1F +M;&%G(B`]/2`B,2(@70IT:&5N"B`@&ET("0_ +M("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1$9FQA9R(@/3T@(C$B(%T*=&AE +M;@H@(')E;6]V95]A;E]I<"`@)'!U8FQI8TEP("8F"B`@9&5L7V9W7V-H86EN +M7V9O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ipassoc.sh': 'MD5 check failed' + ) << \SHAR_EOF +ad068a0cc84ded8f79c63ce3aced4586 cloud_scripts/opt/cloud/bin/ipassoc.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ipassoc.sh'` -ne 13401 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ipassoc.sh' is not 13401" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/line_edit.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/line_edit.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/line_edit.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/line_edit.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/line_edit.py' && +#!/usr/bin/python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import logging +import re +import shutil +import os +X +X +class LineEdit(object): +X """Helper for LineEditingFile that keeps track of one edit.""" +X def __init__(self, search, sub, *sub_args, **kwargs): +X if len(sub_args) > 0: +X sub = sub % sub_args +X flags = kwargs.get('flags', 0) +X self.pattern = re.compile(search, flags=flags) +X self.sub = sub +X self.count = kwargs.get('count', 0) # max subs to make +X self.subs = 0 # subs made so far +X +X +class LineEditingFile(object): +X """ +X Atomic, conservative, by-line editing of configuration files. +X +X Will not touch the file if there are no changes to do. +X Reasonably efficient for large files, though files with a long time +X before their first match will use memory. +X +X +X Given a vhosts file such as: +X >>> with open('doctest-vhosts.conf', 'w') as f: +X ... f.write(''' +X ... Listen foo:80 +X ... +X ... DocRoot /var/www +X ... +X ... +X ... Listen other:80 +X ... +X ... DocRoot /var/www +X ... +X ... ''') +X ... +X +X To replace the hostname for the first virtualhost entry: +X >>> new_hostname = 'fooooo' +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... f.replace(r'', '', new_hostname, count=1, flags=re.I) +X ... f.replace(r'Listen .*?:80', 'Listen %s:80', new_hostname, count=1, flags=re.I) +X ... +X +X Be careful with the matches! +X A second invocation of the same rule will edit the second vhost: +X >>> new_hostname = 'fooooo' +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... f.replace(r'', '', new_hostname, count=1, flags=re.I) +X ... +X +X To move all hosts from port 80 to port 8080: +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... f.replace(r'', '', flags=re.I) +X ... f.replace(r'Listen (.*?):80', 'Listen \\\\1:80', flags=re.I) +X ... +X +X (please note in this example there's a double escape of the backreference +X \\\\1, to make the example work with doctest) +X +X Since this example already matched all files, a second invocation does nothing: +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... f.replace(r'', '', flags=re.I) +X ... +X +X It's also acceptable to not make any edits at all: +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... pass +X ... +X +X You don't _have_ to use a with statement: +X >>> f = LineEditingFile('doctest-vhosts.conf') +X >>> f.replace(r'DocRoot /var/www', 'DocRoot /var/www/html', flags=re.I) +X >>> changes = f.commit() +X >>> print changes +X 2 +X >>> +X +X Cleanup of the example vhosts.conf: +X >>> # noinspection PyBroadException +X >>> try: +X ... os.unlink('doctest-vhosts.conf') +X ... os.unlink('doctest-vhosts.conf.bak') +X ... os.unlink('doctest-vhosts.conf.new') +X ... except: +X ... pass +X ... +X """ +X +X def __init__(self, filename): +X self.filename = filename +X self.changed = False +X self.edits = [] +X +X def __enter__(self): +X return self +X +X def replace(self, search, sub, *sub_args, **kwargs): +X edit = LineEdit(search, sub, *sub_args, **kwargs) +X self.edits.append(edit) +X +X # noinspection PyUnusedLocal +X def __exit__(self, exc, value, traceback): +X if exc is not None: +X return False # return false results in re-raise +X +X self.commit() +X +X def commit(self): +X changes = 0 +X changed_file = None +X changed_filename = self.filename + '.new' +X try: +X lines = [] +X backup_filename = self.filename + '.bak' +X # noinspection PyUnusedLocal +X stat = None +X with open(self.filename, 'r') as orig: +X stat = os.fstat(orig.fileno()) +X for line in orig: +X changed_line = line +X for edit in self.edits: +X remaining_count = 0 +X if edit.count != 0: +X remaining_count = edit.count - edit.subs +X if remaining_count < 0: +X raise Exception("Made too many edits") +X elif remaining_count == 0: +X continue +X changed_line, subs = edit.pattern.subn( +X edit.sub, line, remaining_count) +X if changed_line != line: +X if changed_file is None: +X logging.debug("Editing file %s" % self.filename) +X logging.debug(" - %s" % line[:-1]) +X logging.debug(" + %s" % changed_line[:-1]) +X changes += subs +X edit.subs += subs +X if changes == 0: # buffer until we find a change +X lines.append(changed_line) +X elif changed_file is None: # found first change, flush buffer +X changed_file = open(changed_filename, 'w') +X if hasattr(os, 'fchmod'): +X os.fchmod(changed_file.fileno(), # can cause OSError which aborts +X stat.st_mode) +X if hasattr(os, 'fchown'): +X os.fchown(changed_file.fileno(), # can cause OSError which aborts +X stat.st_uid, stat.st_gid) +X changed_file.writelines(lines) +X changed_file.write(changed_line) +X del lines # reclaim buffer memory +X else: # already flushed, just write +X changed_file.write(changed_line) +X +X if changes == 0: +X logging.info("No edits need for file %s" % +X self.filename) +X else: +X changed_file.close() +X changed_file = None +X if os.path.exists(backup_filename): # back up the original +X os.unlink(backup_filename) +X shutil.copy(self.filename, backup_filename) +X os.rename(changed_filename, self.filename) # the swap +X logging.info("Edited file %s (%d changes)" % +X (self.filename, changes)) +X finally: +X if changed_file is not None: # failed, clean up +X changed_file.close() +X os.unlink(changed_filename) +X return changes +X +X +if __name__ == "__main__": +X logging.basicConfig(level=logging.DEBUG) +X import doctest +X doctest.testmod() +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/line_edit.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/line_edit.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/line_edit.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/line_edit.py': 'MD5 check failed' + ) << \SHAR_EOF +4d05b8a011ff9c6132a3ca4ff477a161 cloud_scripts/opt/cloud/bin/line_edit.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/line_edit.py'` -ne 7961 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/line_edit.py' is not 7961" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/get_template_version.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/get_template_version.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/get_template_version.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/get_template_version.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/get_template_version.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# As the last command send to router before any rules operation, wait until boot up done +X +__TIMEOUT=240 +__FLAGFILE=/var/cache/cloud/boot_up_done +done=0 +for i in `seq 1 $(($__TIMEOUT * 10))` +do +X if [ -e $__FLAGFILE ] +X then +X done=1 +X break +X fi +X sleep 0.1 +X if [ $((i % 10)) -eq 0 ] +X then +X logger -t cloud "Waiting for VM boot up done for one second" +X fi +done +X +if [ -z $done ] +then +X # declare we failed booting process +X echo "Waited 60 seconds but boot up haven't been completed" +X exit +fi +X +release=`cat /etc/cloudstack-release` +sig=`cat /var/cache/cloud/cloud-scripts-signature` +echo "${release}&${sig}" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/get_template_version.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/get_template_version.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/get_template_version.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/get_template_version.sh': 'MD5 check failed' + ) << \SHAR_EOF +2234ad00c02a6be63cb0f4f876b8960b cloud_scripts/opt/cloud/bin/get_template_version.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/get_template_version.sh'` -ne 1449 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/get_template_version.sh' is not 1449" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/update_config.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/update_config.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/update_config.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/update_config.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/update_config.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,N87)G=BD*:68@87)G8R`A/2`R(&%N9"!A7,N97AI="@Q*0H*(R!&25A- +M12!W92!S:&]U;&0@9V5T('1H:7,@;&]C871I;VX@9G)O;2!A(&-O;F9I9W5R +M871I;VX@8VQA7,N97AI="AR971U +M2!S<&5E9&EN9R!U<"!L;V%D:6YG('1I;65S +M"B`@("!I9B!N;W0@*&]S+F5N=FER;VXN9V5T*"=$149%4E]#3TY&242YJ7,N87)G=ELQ +M72!O2`]($YO +M;F4*"B`@("!F;W(@:S$L('8Q(&EN(&=U97-T;F5T7V1I8W0N:71E7,N87!P96YD*&LQ*0H*("`@(&EF(&YO +M="!E>&ES=&EN9U]K97ES.@H@("`@("`@("2`Z +M.B!296-O;F9I9W5R:6YG(&=U97-T(&YE='=O&ES=&EN9U]K97ES.@H@("`@("`@("2!I;B!E>&ES=&EN9U]K97ES.@H@("`@("`@(&9O&ES=',@/2!4&ES=',Z"B`@("`@("`@("`@(&)R96%K +M"@H@("`@B(I*3H* +M("`@("`@("!S>7,N97AI="@P*0H@("`@;&]G9VEN9RYE2`Z.B!5;F%B;&4@=&\@7,N97AI="@Q +M*0H*(R!)9B!T:&4@9W5E2`Z.B!.;R!N965D('1O('!R;V-E/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/update_config.py': 'MD5 check failed' + ) << \SHAR_EOF +a2062b2b010940ea783d8256b807c488 cloud_scripts/opt/cloud/bin/update_config.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/update_config.py'` -ne 5136 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/update_config.py' is not 5136" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/edithosts.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/edithosts.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/edithosts.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/edithosts.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/edithosts.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +X +# edithosts.sh -- edit the dhcphosts file on the routing domain +X +usage() { +X printf "Usage: %s: -m -4 -6 -h -d -n -s -u [-N]\n" $(basename $0) >&2 +} +X +mac= +ipv4= +ipv6= +host= +dflt= +dns= +routes= +duid= +nondefault= +X +while getopts 'm:4:h:d:n:s:6:u:N' OPTION +do +X case $OPTION in +X m) mac="$OPTARG" +X ;; +X 4) ipv4="$OPTARG" +X ;; +X 6) ipv6="$OPTARG" +X ;; +X u) duid="$OPTARG" +X ;; +X h) host="$OPTARG" +X ;; +X d) dflt="$OPTARG" +X ;; +X n) dns="$OPTARG" +X ;; +X s) routes="$OPTARG" +X ;; +X N) nondefault=1 +X ;; +X ?) usage +X exit 2 +X ;; +X esac +done +X +DHCP_HOSTS=/etc/dhcphosts.txt +DHCP_OPTS=/etc/dhcpopts.txt +DHCP_LEASES=/var/lib/misc/dnsmasq.leases +HOSTS=/etc/hosts +X +source /root/func.sh +X +lock="biglock" +#default timeout value is 30 mins as DhcpEntryCommand is not synchronized on agent side any more, +#and multiple commands can be sent to the same VR at a time +locked=$(getLockFile $lock 1800) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +grep "redundant_router=1" /var/cache/cloud/cmdline > /dev/null +no_redundant=$? +X +dnsmasq_managed_lease=`cat /var/cache/cloud/dnsmasq_managed_lease` +X +wait_for_dnsmasq () { +X local _pid=$(pidof dnsmasq) +X for i in 0 1 2 3 4 5 6 7 8 9 10 +X do +X sleep 1 +X _pid=$(pidof dnsmasq) +X [ "$_pid" != "" ] && break; +X done +X [ "$_pid" != "" ] && return 0; +X logger -t cloud "edithosts: timed out waiting for dnsmasq to start" +X return 1 +} +X +if [ $dnsmasq_managed_lease ] +then +X #release previous dhcp lease if present +X logger -t cloud "edithosts: releasing $ipv4" +X dhcp_release $(ip route get "$ipv4/32" | grep " dev " | sed -e "s/^.* dev \([^ ]*\) .*$/\1/g") $ipv4 $(grep "$ipv4 " $DHCP_LEASES | awk '{print $2}') > /dev/null 2>&1 +X logger -t cloud "edithosts: released $ipv4" +fi +X +logger -t cloud "edithosts: update $mac $ipv4 $ipv6 $host to hosts" +X +[ ! -f $DHCP_HOSTS ] && touch $DHCP_HOSTS +[ ! -f $DHCP_OPTS ] && touch $DHCP_OPTS +[ ! -f $DHCP_LEASES ] && touch $DHCP_LEASES +X +#delete any previous entries from the dhcp hosts file +sed -i /$mac/d $DHCP_HOSTS +if [ $ipv4 ] +then +X sed -i /$ipv4,/d $DHCP_HOSTS +fi +if [ $ipv6 ] +then +X #searching with [$ipv6], matching other ip so using $ipv6], +X sed -i /$ipv6],/d $DHCP_HOSTS +fi +# don't want to do this in the future, we can have same VM with multiple nics/entries +sed -i /$host,/d $DHCP_HOSTS +X +#put in the new entry +if [ $ipv4 ] +then +X echo "$mac,$ipv4,$host,infinite" >>$DHCP_HOSTS +fi +if [ $ipv6 ] +then +X if [ $nondefault ] +X then +X echo "id:$duid,set:nondefault6,[$ipv6],$host,infinite" >>$DHCP_HOSTS +X else +X echo "id:$duid,[$ipv6],$host,infinite" >>$DHCP_HOSTS +X fi +fi +X +if [ $dnsmasq_managed_lease -eq 0 ] +then +X #delete leases to supplied mac and ip addresses +X if [ $ipv4 ] +X then +X sed -i /$mac/d $DHCP_LEASES +X sed -i /"$ipv4 "/d $DHCP_LEASES +X fi +X if [ $ipv6 ] +X then +X sed -i /$duid/d $DHCP_LEASES +X sed -i /"$ipv6 "/d $DHCP_LEASES +X fi +X sed -i /"$host "/d $DHCP_LEASES +X +X #put in the new entry +X if [ $ipv4 ] +X then +X echo "0 $mac $ipv4 $host *" >> $DHCP_LEASES +X fi +X if [ $ipv6 ] +X then +X echo "0 $duid $ipv6 $host *" >> $DHCP_LEASES +X fi +fi +X +#edit hosts file as well +if [ $ipv4 ] +then +X sed -i /"$ipv4 "/d $HOSTS +fi +if [ $ipv6 ] +then +X sed -i /"$ipv6 "/d $HOSTS +fi +sed -i /" $host$"/d $HOSTS +if [ $ipv4 ] +then +X echo "$ipv4 $host" >> $HOSTS +fi +if [ $ipv6 ] +then +X echo "$ipv6 $host" >> $HOSTS +fi +X +if [ "$dflt" != "" -a "$ipv4" != "" ] +then +X #make sure dnsmasq looks into options file +X sed -i /dhcp-optsfile/d /etc/dnsmasq.conf +X echo "dhcp-optsfile=$DHCP_OPTS" >> /etc/dnsmasq.conf +X +X tag=$(echo $ipv4 | tr '.' '_') +X sed -i /$tag,/d $DHCP_OPTS +X if [ "$dflt" == "0.0.0.0" ] +X then +X logger -t cloud "$0: unset default router for $ipv4" +X logger -t cloud "$0: unset dns server for $ipv4" +X echo "$tag,3" >> $DHCP_OPTS +X echo "$tag,6" >> $DHCP_OPTS +X echo "$tag,15" >> $DHCP_OPTS +X fi +X [ "$routes" != "" ] && echo "$tag,121,$routes" >> $DHCP_OPTS +X #delete entry we just put in because we need a tag +X sed -i /$ipv4,/d $DHCP_HOSTS +X #put it back with a tag +X echo "$mac,set:$tag,$ipv4,$host,infinite" >>$DHCP_HOSTS +fi +X +# make dnsmasq re-read files +pid=$(pidof dnsmasq) +if [ "$pid" != "" ] +then +X # use SIGHUP to avoid service outage if dhcp_release is available. +X if [ $dnsmasq_managed_lease ] +X then +X kill -HUP $pid +X else +X systemctl restart dnsmasq +X fi +else +X if [ $no_redundant -eq 1 ] +X then +X wait_for_dnsmasq +X else +X logger -t cloud "edithosts: skip wait dnsmasq due to redundant virtual router" +X fi +fi +X +ret=$? +unlock_exit $ret $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/edithosts.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/edithosts.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/edithosts.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/edithosts.sh': 'MD5 check failed' + ) << \SHAR_EOF +68e47d6a7efaacefbbaebf8b4e7408c3 cloud_scripts/opt/cloud/bin/edithosts.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/edithosts.sh'` -ne 5502 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/edithosts.sh' is not 5502" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/diagnostics.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/diagnostics.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/diagnostics.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/diagnostics.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/diagnostics.py' && +#!/usr/bin/env python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import shlex +import subprocess +import sys +X +X +def run_cmd(command): +X if command is not None: +X try: +X p = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE) +X stdout, stderr = p.communicate() +X return_code = p.returncode +X +X except OSError as e: +X stdout = "Check your command type" +X stderr = "Exception occurred: %s" % e +X return_code = 1 +X +X finally: +X print('%s&&' % stdout.strip()) +X print('%s&&' % stderr.strip()) +X print('%s' % return_code) +X +X +def get_command(): +X arguments = sys.argv +X cmd = " ".join(arguments[1:]) +X cmd_type = sys.argv[1] +X +X if cmd_type == 'ping': +X if '-c' in arguments: +X return cmd +X else: +X return cmd + " -c 4" +X +X elif cmd_type == 'traceroute': +X if '-m' in arguments: +X return cmd +X else: +X return cmd + " -m 20" +X +X elif cmd_type == 'arping': +X if '-c' in arguments: +X return cmd +X else: +X return cmd + " -c 4" +X +X else: +X return None +X +X +if __name__ == "__main__": +X command = get_command() +X run_cmd(command) +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/diagnostics.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/diagnostics.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/diagnostics.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/diagnostics.py': 'MD5 check failed' + ) << \SHAR_EOF +91a837e5bcafee663cbfb8532574405a cloud_scripts/opt/cloud/bin/diagnostics.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/diagnostics.py'` -ne 2012 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/diagnostics.py' is not 2012" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_monitorservice.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_monitorservice.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_monitorservice.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_monitorservice.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py': 'MD5 check failed' + ) << \SHAR_EOF +1121a063f2dbcfc1bdc426ceba249184 cloud_scripts/opt/cloud/bin/cs_monitorservice.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py'` -ne 1541 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py' is not 1541" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpn_l2tp.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpn_l2tp.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpn_l2tp.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +X +X +#set -x +usage() { +X printf "Usage:\n" +X printf "Create VPN : %s -c -r -l -p -s -i \n" $(basename $0) +X printf "Delete VPN : %s -d -l -s -D -C < local cidr> \n" $(basename $0) +X printf "Add VPN User : %s -u \n" $(basename $0) +X printf "Remote VPN User: %s -U /dev/null +X then +X is_vpc=true +X fi +X +X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 500 -j ACCEPT +X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 4500 -j ACCEPT +X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 1701 -j ACCEPT +X sudo iptables $op INPUT -i $dev -p ah -j ACCEPT +X sudo iptables $op INPUT -i $dev -p esp -j ACCEPT +X if $is_vpc +X then +X # Need to apply the following ACL rules as well. +X if sudo iptables -N VPN_FORWARD &> /dev/null +X then +X sudo iptables -I FORWARD -i ppp+ -j VPN_FORWARD +X sudo iptables -I FORWARD -o ppp+ -j VPN_FORWARD +X sudo iptables -A VPN_FORWARD -j DROP +X fi +X sudo iptables $op VPN_FORWARD -i ppp+ -o ppp+ -j RETURN +X sudo iptables $op VPN_FORWARD -i ppp+ -d $cidr -j RETURN +X sudo iptables $op VPN_FORWARD -s $cidr -o ppp+ -j RETURN +X else +X sudo iptables $op FORWARD -i ppp+ -d $cidr -j ACCEPT +X sudo iptables $op FORWARD -s $cidr -o ppp+ -j ACCEPT +X sudo iptables $op FORWARD -i ppp+ -o ppp+ -j ACCEPT +X fi +X sudo iptables $op INPUT -i ppp+ -m udp -p udp --dport 53 -j ACCEPT +X sudo iptables $op INPUT -i ppp+ -m tcp -p tcp --dport 53 -j ACCEPT +X sudo iptables -t nat $op PREROUTING -i ppp+ -p tcp -m tcp --dport 53 -j DNAT --to-destination $local_ip +X sudo iptables -t nat $op PREROUTING -i ppp+ -p udp -m udp --dport 53 -j DNAT --to-destination $local_ip +X +X if $is_vpc +X then +X return +X fi +X +X if sudo iptables -t mangle -N VPN_$public_ip &> /dev/null +X then +X logger -t cloud "$(basename $0): created VPN chain in PREROUTING mangle" +X sudo iptables -t mangle -I PREROUTING -d $public_ip -j VPN_$public_ip +X sudo iptables -t mangle -A VPN_$public_ip -j RETURN +X fi +X op2="-D" +X [ "$op" == "-A" ] && op2="-I" +X sudo iptables -t mangle $op VPN_$public_ip -p ah -j ACCEPT +X sudo iptables -t mangle $op VPN_$public_ip -p esp -j ACCEPT +} +X +start_ipsec() { +X systemctl is-active ipsec > /dev/null +X if [ $? -ne 0 ] +X then +X systemctl start ipsec > /dev/null +X #Wait until ipsec started, 5 seconds at most +X for i in {1..5} +X do +X logger -t cloud "$(basename $0): waiting ipsec start..." +X systemctl is-active ipsec > /dev/null +X result=$? +X if [ $result -eq 0 ] +X then +X break +X fi +X sleep 1 +X done +X fi +X systemctl is-active ipsec > /dev/null +X return $? +} +X +ipsec_server() { +X local op=$1 +X case $op in +X "start") start_ipsec +X sudo systemctl start xl2tpd +X ;; +X "stop") sudo systemctl stop xl2tpd +X ;; +X "restart") start_ipsec +X sudo ipsec auto --rereadall +X systemctl stop xl2tpd +X systemctl start xl2tpd +X ;; +X esac +} +X +create_l2tp_ipsec_vpn_server() { +X local ipsec_psk=$1 +X local public_ip=$2 +X local client_range=$3 +X local local_ip=$4 +X +X sed -i -e "s/left=.*$/left=$public_ip/" /etc/ipsec.d/l2tp.conf +X echo "$public_ip %any : PSK \"$ipsec_psk\"" > /etc/ipsec.d/ipsec.any.secrets +X sed -i -e "s/^ip range = .*$/ip range = $client_range/" /etc/xl2tpd/xl2tpd.conf +X sed -i -e "s/^local ip = .*$/local ip = $local_ip/" /etc/xl2tpd/xl2tpd.conf +X +X sed -i -e "s/^ms-dns.*$/ms-dns $local_ip/" /etc/ppp/options.xl2tpd +X +X iptables_ "-D" $public_ip +X iptables_ "-I" $public_ip +X +X ipsec_server "restart" +X +X ipsec auto --rereadsecrets +X ipsec auto --replace L2TP-PSK +} +X +destroy_l2tp_ipsec_vpn_server() { +X local public_ip=$1 +X +X ipsec auto --down L2TP-PSK +X +X iptables_ "-D" $public_ip +X +X ipsec_server "stop" +} +X +remove_l2tp_ipsec_user() { +X local u=$1 +X sed -i -e "/^$u .*$/d" /etc/ppp/chap-secrets +X if [ -x /usr/bin/tdbdump ]; then +X pid=$(tdbdump /var/run/pppd2.tdb | grep -w $u | awk -F';' '{print $4}' | awk -F= '{print $2}') +X [ "$pid" != "" ] && kill -9 $pid +X fi +X return 0 +} +X +add_l2tp_ipsec_user() { +X local u=$1 +X local passwd=$2 +X +X uptodate=$(grep "^$u \* \"$passwd\" \*$" /etc/ppp/chap-secrets) +X if [ "$uptodate" == "" ] +X then +X remove_l2tp_ipsec_user $u +X echo "$u * \"$passwd\" *" >> /etc/ppp/chap-secrets +X fi +} +X +rflag= +pflag= +lflag= +sflag= +create= +destroy= +useradd= +userdel= +dev= +cidr= +X +while getopts 'cdl:p:r:s:u:U:i:C:' OPTION +do +X case $OPTION in +X c) create=1 +X ;; +X d) destroy=1 +X ;; +X u) useradd=1 +X user_pwd="$OPTARG" +X ;; +X U) userdel=1 +X user="$OPTARG" +X ;; +X r) rflag=1 +X client_range="$OPTARG" +X ;; +X p) pflag=1 +X ipsec_psk="$OPTARG" +X ;; +X l) lflag=1 +X local_ip="$OPTARG" +X ;; +X s) sflag=1 +X server_ip="$OPTARG" +X ;; +X i) dev="$OPTARG" +X ;; +X C) cidr="$OPTARG" +X ;; +X ?) usage +X exit 2 +X ;; +X esac +done +X +if [ "$dev" == "" ] +then +X dev="eth2" +fi +X +if [ "$cidr" == "" ] +then +X cidr=$(get_intf_ip "eth0") +fi +X +[ "$create$destroy" == "11" ] || [ "$create$destroy$useradd$userdel" == "" ] && usage && exit 2 +[ "$create" == "1" ] && [ "$lflag$pflag$rflag$sflag" != "1111" ] && usage && exit 2 +X +if [ "$create" == "1" ]; then +X create_l2tp_ipsec_vpn_server $ipsec_psk $server_ip $client_range $local_ip +X exit $? +fi +X +if [ "$destroy" == "1" ]; then +X destroy_l2tp_ipsec_vpn_server $server_ip +X exit $? +fi +X +if [ "$useradd" == "1" ]; then +X u=$(echo $user_pwd | awk -F',' '{print $1}') +X pwd=$(echo $user_pwd | awk -F',' '{print $2}') +X add_l2tp_ipsec_user $u $pwd +X exit $? +fi +if [ "$userdel" == "1" ]; then +X remove_l2tp_ipsec_user $user +X exit $? +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpn_l2tp.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh': 'MD5 check failed' + ) << \SHAR_EOF +79e41044b43cc49c6b11859534bc454d cloud_scripts/opt/cloud/bin/vpn_l2tp.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh'` -ne 6986 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' is not 6986" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_guestnetwork.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_guestnetwork.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_guestnetwork.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +keys = ['eth1', 'eth2', 'eth3', 'eth4', 'eth5', 'eth6', 'eth7', 'eth8', 'eth9'] +X +X +def merge(dbag, gn): +X device = gn['device'] +X +X if not gn['add'] and device in dbag: +X +X if dbag[device]: +X device_to_die = dbag[device][0] +X try: +X dbag[device].remove(device_to_die) +X except ValueError, e: +X print "[WARN] cs_guestnetwork.py :: Error occurred removing item from databag. => %s" % device_to_die +X del(dbag[device]) +X else: +X del(dbag[device]) +X +X else: +X dbag.setdefault(device, []).append(gn) +X +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_guestnetwork.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py': 'MD5 check failed' + ) << \SHAR_EOF +599105da1bdfaced1f2c8078d3fbed19 cloud_scripts/opt/cloud/bin/cs_guestnetwork.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py'` -ne 1401 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' is not 1401" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_vmdata.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vmdata.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vmdata.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, metadata): +X dbag[metadata["vm_ip_address"]] = metadata["vm_metadata"] +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_vmdata.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vmdata.py': 'MD5 check failed' + ) << \SHAR_EOF +3ee2451cb48927d361f05bb5fe3df4ce cloud_scripts/opt/cloud/bin/cs_vmdata.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vmdata.py'` -ne 892 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' is not 892" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/dnsmasq.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/dnsmasq.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/dnsmasq.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +usage() { +X printf "Usage: %s: \n" $(basename $0) >&2 +} +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +#set -x +#backup the old config file +DHCP_CONFIG=/etc/dnsmasq.d/multiple_ranges.conf +DHCP_CONFIG_BAK=/etc/dnsmasq.d/multiple_ranges.conf.bak +DHCP_CONFIG_MAIN=/etc/dnsmasq.conf +DHCP_CONFIG_MAIN_BAK=/etc/dnsmasq.conf.bak +DHCP_FAILURE_CONFIG=/etc/multiple_ranges.conf.failure +DHCP_FAILURE_CONFIG_MAIN=/etc/dnsmasq.conf.failure +CMDLINE=$(cat /var/cache/cloud/cmdline | tr '\n' ' ') +X +#take a backup copy of the dnsmasq file. +cp "$DHCP_CONFIG_MAIN" "$DHCP_CONFIG_MAIN_BAK" +cp "$DHCP_CONFIG" "$DHCP_CONFIG_BAK" +X +#empty the config file +echo > $DHCP_CONFIG +X +var="$1" +dhcp_range="" +dhcp_gateway="" +dhcp_netmask="" +dns_option="" +dns_servers="" +count=0 +X +X +# fetching the dns Ips from the command line. +dns1=$(echo "$CMDLINE" | grep -o " dns1=[[:digit:]].* " | sed -e 's/dns1=//' | awk '{print $1}') +dns2=$(echo "$CMDLINE" | grep -o " dns2=[[:digit:]].* " | sed -e 's/dns2=//' | awk '{print $1}') +X +dns_servers="${dns1}" +if [ -n "$dns2" ] +then +dns_servers="${dns1},${dns2}" +fi +X +X +# check if useextdns is true +use_ext_dns=$(echo "$CMDLINE" | grep -o "useextdns=true") +while [ -n "$var" ] +do +X var1=$(echo $var | cut -f1 -d "-") +X routerip=$( echo $var1 | cut -f1 -d ":" ) +X gateway=$(echo $var1 | cut -f2 -d ":") +X netmask=$(echo $var1 | cut -f3 -d ":") +X start_ip_of_subnet=$(echo $var1 | cut -f4 -d ":") +X dhcp_range="${dhcp_range}"'dhcp-range=set:range'$count","$start_ip_of_subnet",static \n" +X dhcp_gateway="${dhcp_gateway}"'dhcp-option=tag:range'$count",3,"$gateway" \n" +X dhcp_netmask="${dhcp_netmask}"'dhcp-option=tag:range'$count",1,"$netmask" \n" +X if [ -n "$use_ext_dns" ] +X then +X dns_option="${dns_option}"'dhcp-option=tag:range'$count",6,"$dns_servers" \n" +X else +X dns_option="${dns_option}"'dhcp-option=tag:range'$count",6,$routerip"","$dns_servers" \n" +X fi +X var=$( echo $var | sed "s/${var1}-//" ) +X count=$[$count+1] +done +X +#logging the configuration being removed. +log="" +log="${log}"`grep "^dhcp-option=6" "$DHCP_CONFIG_MAIN"`"\n" +log="${log}"`grep "^dhcp-option=option:router" "$DHCP_CONFIG_MAIN"`"\n" +log="${log}"`grep "^dhcp-range=" "$DHCP_CONFIG_MAIN"`"\n" +X +if [ "$log" != '\n\n\n' ] +then +X #Cleaning the existing dhcp confgiuration +X logger -t cloud "dnsmasq.sh: remvoing the primaryip confg from dnsmasq.conf and adding it to /etc/dnsmaq.d/multiple_ranges.conf" +X logger -t cloud "dnsmasq.sh: config removed from dnsmasq.conf is $log" +X sed -i -e '/dhcp-option=6/d' "$DHCP_CONFIG_MAIN" +X sed -i -e '/dhcp-option=option:router/d' "$DHCP_CONFIG_MAIN" +X sed -i -e '/^dhcp-range=/d' "$DHCP_CONFIG_MAIN" +fi +X +#wrting the new config into the config file. +echo -e "$dhcp_range" >> "$DHCP_CONFIG" +echo -e "$dhcp_gateway" >> "$DHCP_CONFIG" +echo -e "$dhcp_netmask" >> "$DHCP_CONFIG" +echo -e "$dns_option" >> "$DHCP_CONFIG" +X +X +#restart the dnsmasq +systemctl restart dnsmasq +result=$? +if [ "$result" -ne "0" ] +then +X logger -t cloud "dnsmasq.sh: could not configure dnsmasq" +X logger -t cloud "dnsmasq.sh: reverting to the old config" +X logger -t cloud "dnsmasq.sh: copying the failure config to `$DHCP_FAILURE_CONFIG` and `$DHCP_FAILURE_CONFIG_MAIN`" +X cp "$DHCP_CONFIG" "$DHCP_FAILURE_CONFIG" +X cp "$DHCP_CONFIG_MAIN" "$DHCP_FAILURE_CONFIG_MAIN" +X cp "$DHCP_CONFIG_BAK" "$DHCP_CONFIG" +X cp "$DHCP_CONFIG_MAIN_BAK" "$DHCP_CONFIG_MAIN" +X systemctl restart dnsmasq +X unlock_exit $result $lock $locked +fi +rm "$DHCP_CONFIG_BAK" +rm "$DHCP_CONFIG_MAIN_BAK" +unlock_exit $result $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/dnsmasq.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/dnsmasq.sh': 'MD5 check failed' + ) << \SHAR_EOF +d603da3043a61bea911e21fb4da8ded0 cloud_scripts/opt/cloud/bin/dnsmasq.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/dnsmasq.sh'` -ne 4359 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' is not 4359" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_dhcp.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_dhcp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_dhcp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_dhcp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_dhcp.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2P@96YT2!N;W0@ +M:6X@7,Z"B`@("`@("`@("`@(')E;6]V95]K97ES+F%D9"AK +M97DI"@H@("`@("`@(&9O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_dhcp.py': 'MD5 check failed' + ) << \SHAR_EOF +9b17e95a8fcb1cf185c9e74cc6ddecca cloud_scripts/opt/cloud/bin/cs_dhcp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_dhcp.py'` -ne 1533 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_dhcp.py' is not 1533" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_cmdline.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_cmdline.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_cmdline.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, cmdline): +X if 'redundant_router' in cmdline['cmd_line']: +X cmdline['cmd_line']['redundant_router'] = "true" +X else: +X cmdline['cmd_line']['redundant_router'] = "false" +X dbag['config'] = cmdline['cmd_line'] +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_cmdline.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_cmdline.py': 'MD5 check failed' + ) << \SHAR_EOF +a6290582c86832c4c94985580ceda8e5 cloud_scripts/opt/cloud/bin/cs_cmdline.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_cmdline.py'` -ne 1045 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' is not 1045" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/ips0003.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0003.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0003.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0003.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0003.json' && +{"ip_address": +[{"public_ip":"10.0.3.10", +"source_nat":true, +"add":true, +"one_to_one_nat":false, +"first_i_p":false, +"gateway":"10.0.3.1", +"netmask":"255.255.255.0", +"vif_mac_address":"06:cb:aa:00:00:03", +"nic_dev_id":2, +"new_nic":false}], +"type":"ips"} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0003.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0003.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0003.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0003.json': 'MD5 check failed' + ) << \SHAR_EOF +e8113ca4dc70734a2e07e4cd5aa817e7 cloud_scripts/opt/cloud/testdata/ips0003.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0003.json'` -ne 253 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0003.json' is not 253" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/vmp0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/vmp0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/vmp0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/vmp0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/testdata/vmp0001.json +M>R)I<%]A9&1R97-S(CHB,3/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/vmp0001.json': 'MD5 check failed' + ) << \SHAR_EOF +a3150c6241b311cbfc2180be23d1ddee cloud_scripts/opt/cloud/testdata/vmp0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/vmp0001.json'` -ne 77 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/vmp0001.json' is not 77" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/gn0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/gn0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/gn0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/gn0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/gn0001.json' && +{"add":true, +"mac_address":"02:00:56:36:00:02", +"device":"eth3", +"router_guest_ip":"172.16.1.1", +"router_guest_gateway":"172.16.1.0", +"router_guest_netmask":"255.255.255.0", +"cidr":"24", +"dns":"8.8.8.8,8.8.8.4", +"domain_name":"devcloud.local", +"type":"guestnetwork"} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/gn0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/gn0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/gn0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/gn0001.json': 'MD5 check failed' + ) << \SHAR_EOF +e790842388eb0a3f86ea0dbbcf4608eb cloud_scripts/opt/cloud/testdata/gn0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/gn0001.json'` -ne 267 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/gn0001.json' is not 267" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/dhcp0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/dhcp0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/dhcp0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' && +{ +X "host_name":"VM-58976c22-0832-451e-9ab2-039e9f27e415", +X "mac_address":"02:00:26:c3:00:02", +X "ipv4_address":"172.16.1.102", +X "ipv6_duid":"00:03:00:01:02:00:26:c3:00:02", +X "default_gateway":"172.16.1.1", +X "default_entry":true, +X "type":"dhcpentry" +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/dhcp0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/dhcp0001.json': 'MD5 check failed' + ) << \SHAR_EOF +0f44da4132b56f2ece9b36bab3213f28 cloud_scripts/opt/cloud/testdata/dhcp0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/dhcp0001.json'` -ne 250 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' is not 250" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/acl0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/acl0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/acl0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/acl0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/acl0001.json' && +{ +X "eth2": { +X "device": "eth2", +X "egress_rules": [ +X { +X "allowed": false, +X "cidr": "10.0.6.0/8", +X "first_port": 60, +X "last_port": 60, +X "type": "tcp" +X } +X ], +X "ingress_rules": [ +X { +X "allowed": true, +X "cidr": "10.0.1.0/8", +X "protocol": 41, +X "type": "protocol" +X }, +X { +X "allowed": true, +X "cidr": "10.0.4.0/8", +X "type": "all" +X }, +X { +X "allowed": true, +X "cidr": "10.0.3.0/8", +X "icmp_code": -1, +X "icmp_type": -1, +X "type": "icmp" +X }, +X { +X "allowed": true, +X "cidr": "10.0.2.0/8", +X "first_port": 40, +X "last_port": 40, +X "type": "udp" +X }, +X { +X "allowed": true, +X "cidr": "10.0.1.0/8", +X "first_port": 30, +X "last_port": 30, +X "type": "tcp" +X } +X ], +X "mac_address": "02:00:0d:7b:00:04", +X "nic_ip": "172.16.1.1", +X "nic_netmask": "24", +X "private_gateway_acl": false, +X "type": "networkacl" +X }, +X "id": "networkacl" +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/acl0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/acl0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/acl0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/acl0001.json': 'MD5 check failed' + ) << \SHAR_EOF +1ea2a1b5d6a98bc6c0fc2375de284b17 cloud_scripts/opt/cloud/testdata/acl0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/acl0001.json'` -ne 1405 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/acl0001.json' is not 1405" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/README ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/README' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/README (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/README (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/README' && +Json file used to test the provisioning scripts on virtual appliances +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/README' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/README' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/README failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/README': 'MD5 check failed' + ) << \SHAR_EOF +13e5ecf4d998c3df3cf53485d6f46ee1 cloud_scripts/opt/cloud/testdata/README +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/README'` -ne 70 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/README' is not 70" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/ips0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0001.json' && +{"ip_address": +[{"public_ip":"10.0.2.102", +"source_nat":true, +"add":true, +"one_to_one_nat":false, +"first_i_p":false, +"gateway":"10.0.2.1", +"netmask":"255.255.255.0", +"vif_mac_address":"06:cb:aa:00:00:03", +"nic_dev_id":1, +"new_nic":false}], +"type":"ips"} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0001.json': 'MD5 check failed' + ) << \SHAR_EOF +6f7337aaa605096eef31300afba0f4af cloud_scripts/opt/cloud/testdata/ips0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0001.json'` -ne 254 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0001.json' is not 254" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/test.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/test.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/test.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/test.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/test.sh' && +#!/bin/sh +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +cp /opt/cloud/testdata/* /etc/cloudstack +/opt/cloud/bin/update_config.py cmd_line.json +/opt/cloud/bin/update_config.py gn0001.json +/opt/cloud/bin/update_config.py ips0001.json +/opt/cloud/bin/update_config.py ips0002.json +/opt/cloud/bin/update_config.py ips0003.json +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/test.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/testdata/test.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/test.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/test.sh': 'MD5 check failed' + ) << \SHAR_EOF +7fbb72051fd8d3b66fd481aa51d3debe cloud_scripts/opt/cloud/testdata/test.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/test.sh'` -ne 1062 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/test.sh' is not 1062" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/ips0002.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0002.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0002.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0002.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0002.json' && +{"ip_address": +[{"public_ip":"10.0.2.103", +"source_nat":true, +"add":true, +"one_to_one_nat":false, +"first_i_p":false, +"gateway":"10.0.2.1", +"netmask":"255.255.255.0", +"vif_mac_address":"06:cb:aa:00:00:03", +"nic_dev_id":1, +"new_nic":false}], +"type":"ips"} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0002.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0002.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0002.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0002.json': 'MD5 check failed' + ) << \SHAR_EOF +12aec2bca1d88c499ee0af39c2e20ea1 cloud_scripts/opt/cloud/testdata/ips0002.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0002.json'` -ne 254 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0002.json' is not 254" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/s2s0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/s2s0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/s2s0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/s2s0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/s2s0001.json' && +{ +X "local_public_ip":"172.16.1.1", +X "local_guest_cidr":"172.16.1.0/24", +X "local_public_gateway":"172.16.1.1", +X "peer_gateway_ip":"10.200.200.1", +X "peer_guest_cidr_list":"10.0.0.0/24", +X "esp_policy":"3des-md5", +X "ike_policy":"3des-md5", +X "ipsec_psk":"vpnblabla", +X "ike_lifetime":86400, +X "esp_lifetime":3600, +X "create":true, +X "dpd":false, +X "passive":false, +X "type":"site2sitevpn" +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/s2s0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/s2s0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/s2s0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/s2s0001.json': 'MD5 check failed' + ) << \SHAR_EOF +ff589cb7ab7721a270f4cc703719c917 cloud_scripts/opt/cloud/testdata/s2s0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/s2s0001.json'` -ne 380 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/s2s0001.json' is not 380" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/ips0003.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0003.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0003.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0003.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0003.json' && +{"ip_address": +[{"public_ip":"10.0.3.10", +"source_nat":true, +"add":true, +"one_to_one_nat":false, +"first_i_p":false, +"gateway":"10.0.3.1", +"netmask":"255.255.255.0", +"vif_mac_address":"06:cb:aa:00:00:03", +"nic_dev_id":2, +"new_nic":false}], +"type":"ips"} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0003.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0003.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0003.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0003.json': 'MD5 check failed' + ) << \SHAR_EOF +e8113ca4dc70734a2e07e4cd5aa817e7 cloud_scripts/opt/cloud/testdata/ips0003.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0003.json'` -ne 253 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0003.json' is not 253" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/vmp0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/vmp0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/vmp0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/vmp0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/testdata/vmp0001.json +M>R)I<%]A9&1R97-S(CHB,3/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/vmp0001.json': 'MD5 check failed' + ) << \SHAR_EOF +a3150c6241b311cbfc2180be23d1ddee cloud_scripts/opt/cloud/testdata/vmp0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/vmp0001.json'` -ne 77 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/vmp0001.json' is not 77" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/gn0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/gn0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/gn0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/gn0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/gn0001.json' && +{"add":true, +"mac_address":"02:00:56:36:00:02", +"device":"eth3", +"router_guest_ip":"172.16.1.1", +"router_guest_gateway":"172.16.1.0", +"router_guest_netmask":"255.255.255.0", +"cidr":"24", +"dns":"8.8.8.8,8.8.8.4", +"domain_name":"devcloud.local", +"type":"guestnetwork"} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/gn0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/gn0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/gn0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/gn0001.json': 'MD5 check failed' + ) << \SHAR_EOF +e790842388eb0a3f86ea0dbbcf4608eb cloud_scripts/opt/cloud/testdata/gn0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/gn0001.json'` -ne 267 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/gn0001.json' is not 267" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/dhcp0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/dhcp0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/dhcp0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' && +{ +X "host_name":"VM-58976c22-0832-451e-9ab2-039e9f27e415", +X "mac_address":"02:00:26:c3:00:02", +X "ipv4_address":"172.16.1.102", +X "ipv6_duid":"00:03:00:01:02:00:26:c3:00:02", +X "default_gateway":"172.16.1.1", +X "default_entry":true, +X "type":"dhcpentry" +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/dhcp0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/dhcp0001.json': 'MD5 check failed' + ) << \SHAR_EOF +0f44da4132b56f2ece9b36bab3213f28 cloud_scripts/opt/cloud/testdata/dhcp0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/dhcp0001.json'` -ne 250 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' is not 250" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/acl0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/acl0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/acl0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/acl0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/acl0001.json' && +{ +X "eth2": { +X "device": "eth2", +X "egress_rules": [ +X { +X "allowed": false, +X "cidr": "10.0.6.0/8", +X "first_port": 60, +X "last_port": 60, +X "type": "tcp" +X } +X ], +X "ingress_rules": [ +X { +X "allowed": true, +X "cidr": "10.0.1.0/8", +X "protocol": 41, +X "type": "protocol" +X }, +X { +X "allowed": true, +X "cidr": "10.0.4.0/8", +X "type": "all" +X }, +X { +X "allowed": true, +X "cidr": "10.0.3.0/8", +X "icmp_code": -1, +X "icmp_type": -1, +X "type": "icmp" +X }, +X { +X "allowed": true, +X "cidr": "10.0.2.0/8", +X "first_port": 40, +X "last_port": 40, +X "type": "udp" +X }, +X { +X "allowed": true, +X "cidr": "10.0.1.0/8", +X "first_port": 30, +X "last_port": 30, +X "type": "tcp" +X } +X ], +X "mac_address": "02:00:0d:7b:00:04", +X "nic_ip": "172.16.1.1", +X "nic_netmask": "24", +X "private_gateway_acl": false, +X "type": "networkacl" +X }, +X "id": "networkacl" +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/acl0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/acl0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/acl0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/acl0001.json': 'MD5 check failed' + ) << \SHAR_EOF +1ea2a1b5d6a98bc6c0fc2375de284b17 cloud_scripts/opt/cloud/testdata/acl0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/acl0001.json'` -ne 1405 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/acl0001.json' is not 1405" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/README ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/README' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/README (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/README (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/README' && +Json file used to test the provisioning scripts on virtual appliances +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/README' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/README' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/README failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/README': 'MD5 check failed' + ) << \SHAR_EOF +13e5ecf4d998c3df3cf53485d6f46ee1 cloud_scripts/opt/cloud/testdata/README +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/README'` -ne 70 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/README' is not 70" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/ips0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0001.json' && +{"ip_address": +[{"public_ip":"10.0.2.102", +"source_nat":true, +"add":true, +"one_to_one_nat":false, +"first_i_p":false, +"gateway":"10.0.2.1", +"netmask":"255.255.255.0", +"vif_mac_address":"06:cb:aa:00:00:03", +"nic_dev_id":1, +"new_nic":false}], +"type":"ips"} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0001.json': 'MD5 check failed' + ) << \SHAR_EOF +6f7337aaa605096eef31300afba0f4af cloud_scripts/opt/cloud/testdata/ips0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0001.json'` -ne 254 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0001.json' is not 254" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/test.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/test.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/test.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/test.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/test.sh' && +#!/bin/sh +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +cp /opt/cloud/testdata/* /etc/cloudstack +/opt/cloud/bin/update_config.py cmd_line.json +/opt/cloud/bin/update_config.py gn0001.json +/opt/cloud/bin/update_config.py ips0001.json +/opt/cloud/bin/update_config.py ips0002.json +/opt/cloud/bin/update_config.py ips0003.json +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/test.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/testdata/test.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/test.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/test.sh': 'MD5 check failed' + ) << \SHAR_EOF +7fbb72051fd8d3b66fd481aa51d3debe cloud_scripts/opt/cloud/testdata/test.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/test.sh'` -ne 1062 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/test.sh' is not 1062" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/ips0002.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0002.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0002.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0002.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0002.json' && +{"ip_address": +[{"public_ip":"10.0.2.103", +"source_nat":true, +"add":true, +"one_to_one_nat":false, +"first_i_p":false, +"gateway":"10.0.2.1", +"netmask":"255.255.255.0", +"vif_mac_address":"06:cb:aa:00:00:03", +"nic_dev_id":1, +"new_nic":false}], +"type":"ips"} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0002.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0002.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0002.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0002.json': 'MD5 check failed' + ) << \SHAR_EOF +12aec2bca1d88c499ee0af39c2e20ea1 cloud_scripts/opt/cloud/testdata/ips0002.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0002.json'` -ne 254 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0002.json' is not 254" + fi +fi +# ============= cloud_scripts/opt/cloud/testdata/s2s0001.json ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/s2s0001.json' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/s2s0001.json (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/testdata/s2s0001.json (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/s2s0001.json' && +{ +X "local_public_ip":"172.16.1.1", +X "local_guest_cidr":"172.16.1.0/24", +X "local_public_gateway":"172.16.1.1", +X "peer_gateway_ip":"10.200.200.1", +X "peer_guest_cidr_list":"10.0.0.0/24", +X "esp_policy":"3des-md5", +X "ike_policy":"3des-md5", +X "ipsec_psk":"vpnblabla", +X "ike_lifetime":86400, +X "esp_lifetime":3600, +X "create":true, +X "dpd":false, +X "passive":false, +X "type":"site2sitevpn" +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/s2s0001.json' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/testdata/s2s0001.json' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/testdata/s2s0001.json failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/s2s0001.json': 'MD5 check failed' + ) << \SHAR_EOF +ff589cb7ab7721a270f4cc703719c917 cloud_scripts/opt/cloud/testdata/s2s0001.json +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/s2s0001.json'` -ne 380 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/s2s0001.json' is not 380" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +ip link|grep BROADCAST|grep -v eth0|grep -v eth1|cut -d ":" -f 2 > /tmp/iflist +while read i +do +X ip addr show $i|grep "inet " > /tmp/iplist_$i +X while read line +X do +X ip=`echo $line|cut -d " " -f 2|cut -d "/" -f 1` +X arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 +X arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 +X done < /tmp/iplist_$i +done < /tmp/iflist +sleep 1 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ': 'MD5 check failed' + ) << \SHAR_EOF +023d994f54c0955f160f127c1d85d6ae cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ'` -ne 1177 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' is not 1177" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/checkrouter.sh.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/checkrouter.sh.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/checkrouter.sh.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +STATUS=UNKNOWN +INTERFACE=eth1 +ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g') +if [ $ROUTER_TYPE = "router" ] +then +X ROUTER_STATE=$(ip addr | grep eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi') +X STATUS=$ROUTER_STATE +else +X ROUTER_STATE=$(ip addr | grep $INTERFACE | grep state | awk '{print $9;}') +X if [ $ROUTER_STATE = "UP" ] +X then +X STATUS=MASTER +X elif [ $ROUTER_STATE = "DOWN" ] +X then +X STATUS=BACKUP +X fi +fi +X +echo "Status: ${STATUS}" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/checkrouter.sh.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ': 'MD5 check failed' + ) << \SHAR_EOF +bbd331057760019d05ead01eec5e42aa cloud_scripts/opt/cloud/templates/checkrouter.sh.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ'` -ne 1357 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' is not 1357" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/heartbeat.sh.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/heartbeat.sh.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/heartbeat.sh.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +t=$(date +%s) +echo $t > /ramdisk/rrouter/keepalived.ts +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/heartbeat.sh.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ': 'MD5 check failed' + ) << \SHAR_EOF +c006a52c775a0418870c0c50f0131ee7 cloud_scripts/opt/cloud/templates/heartbeat.sh.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ'` -ne 853 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' is not 853" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/conntrackd.conf.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/conntrackd.conf.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/conntrackd.conf.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# Synchronizer settings +# +Sync { +X Mode FTFW { +X # +X # Size of the resend queue (in objects). This is the maximum +X # number of objects that can be stored waiting to be confirmed +X # via acknoledgment. If you keep this value low, the daemon +X # will have less chances to recover state-changes under message +X # omission. On the other hand, if you keep this value high, +X # the daemon will consume more memory to store dead objects. +X # Default is 131072 objects. +X # +X # ResendQueueSize 131072 +X +X # +X # This parameter allows you to set an initial fixed timeout +X # for the committed entries when this node goes from backup +X # to primary. This mechanism provides a way to purge entries +X # that were not recovered appropriately after the specified +X # fixed timeout. If you set a low value, TCP entries in +X # Established states with no traffic may hang. For example, +X # an SSH connection without KeepAlive enabled. If not set, +X # the daemon uses an approximate timeout value calculation +X # mechanism. By default, this option is not set. +X # +X # CommitTimeout 180 +X +X # +X # If the firewall replica goes from primary to backup, +X # the conntrackd -t command is invoked in the script. +X # This command schedules a flush of the table in N seconds. +X # This is useful to purge the connection tracking table of +X # zombie entries and avoid clashes with old entries if you +X # trigger several consecutive hand-overs. Default is 60 seconds. +X # +X # PurgeTimeout 60 +X +X # Set the acknowledgement window size. If you decrease this +X # value, the number of acknowlegdments increases. More +X # acknowledgments means more overhead as conntrackd has to +X # handle more control messages. On the other hand, if you +X # increase this value, the resend queue gets more populated. +X # This results in more overhead in the queue releasing. +X # The following value is based on some practical experiments +X # measuring the cycles spent by the acknowledgment handling +X # with oprofile. If not set, default window size is 300. +X # +X # ACKWindowSize 300 +X +X # +X # This clause allows you to disable the external cache. Thus, +X # the state entries are directly injected into the kernel +X # conntrack table. As a result, you save memory in user-space +X # but you consume slots in the kernel conntrack table for +X # backup state entries. Moreover, disabling the external cache +X # means more CPU consumption. You need a Linux kernel +X # >= 2.6.29 to use this feature. By default, this clause is +X # set off. If you are installing conntrackd for first time, +X # please read the user manual and I encourage you to consider +X # using the fail-over scripts instead of enabling this option! +X # +X # DisableExternalCache Off +X } +X +X # +X # Multicast IP and interface where messages are +X # broadcasted (dedicated link). IMPORTANT: Make sure +X # that iptables accepts traffic for destination +X # 225.0.0.50, eg: +X # +X # iptables -I INPUT -d 225.0.0.50 -j ACCEPT +X # iptables -I OUTPUT -d 225.0.0.50 -j ACCEPT +X # +X Multicast { +X # +X # Multicast address: The address that you use as destination +X # in the synchronization messages. You do not have to add +X # this IP to any of your existing interfaces. If any doubt, +X # do not modify this value. +X # +X IPv4_address 225.0.0.50 +X +X # +X # The multicast group that identifies the cluster. If any +X # doubt, do not modify this value. +X # +X Group 3780 +X +X # +X # IP address of the interface that you are going to use to +X # send the synchronization messages. Remember that you must +X # use a dedicated link for the synchronization messages. +X # +X IPv4_interface [LINK_IP] +X +X # +X # The name of the interface that you are going to use to +X # send the synchronization messages. +X # +X Interface [LINK_IF] +X +X # The multicast sender uses a buffer to enqueue the packets +X # that are going to be transmitted. The default size of this +X # socket buffer is available at /proc/sys/net/core/wmem_default. +X # This value determines the chances to have an overrun in the +X # sender queue. The overrun results packet loss, thus, losing +X # state information that would have to be retransmitted. If you +X # notice some packet loss, you may want to increase the size +X # of the sender buffer. The default size is usually around +X # ~100 KBytes which is fairly small for busy firewalls. +X # +X SndSocketBuffer 1249280 +X +X # The multicast receiver uses a buffer to enqueue the packets +X # that the socket is pending to handle. The default size of this +X # socket buffer is available at /proc/sys/net/core/rmem_default. +X # This value determines the chances to have an overrun in the +X # receiver queue. The overrun results packet loss, thus, losing +X # state information that would have to be retransmitted. If you +X # notice some packet loss, you may want to increase the size of +X # the receiver buffer. The default size is usually around +X # ~100 KBytes which is fairly small for busy firewalls. +X # +X RcvSocketBuffer 1249280 +X +X # +X # Enable/Disable message checksumming. This is a good +X # property to achieve fault-tolerance. In case of doubt, do +X # not modify this value. +X # +X Checksum on +X } +X # +X # You can specify more than one dedicated link. Thus, if one dedicated +X # link fails, conntrackd can fail-over to another. Note that adding +X # more than one dedicated link does not mean that state-updates will +X # be sent to all of them. There is only one active dedicated link at +X # a given moment. The `Default' keyword indicates that this interface +X # will be selected as the initial dedicated link. You can have +X # up to 4 redundant dedicated links. Note: Use different multicast +X # groups for every redundant link. +X # +X # Multicast Default { +X # IPv4_address 225.0.0.51 +X # Group 3781 +X # IPv4_interface 192.168.100.101 +X # Interface eth3 +X # # SndSocketBuffer 1249280 +X # # RcvSocketBuffer 1249280 +X # Checksum on +X # } +X +X # +X # You can use Unicast UDP instead of Multicast to propagate events. +X # Note that you cannot use unicast UDP and Multicast at the same +X # time, you can only select one. +X # +X # UDP { +X # +X # UDP address that this firewall uses to listen to events. +X # +X # IPv4_address 192.168.2.100 +X # +X # or you may want to use an IPv6 address: +X # +X # IPv6_address fe80::215:58ff:fe28:5a27 +X +X # +X # Destination UDP address that receives events, ie. the other +X # firewall's dedicated link address. +X # +X # IPv4_Destination_Address 192.168.2.101 +X # +X # or you may want to use an IPv6 address: +X # +X # IPv6_Destination_Address fe80::2d0:59ff:fe2a:775c +X +X # +X # UDP port used +X # +X # Port 3780 +X +X # +X # The name of the interface that you are going to use to +X # send the synchronization messages. +X # +X # Interface eth2 +X +X # +X # The sender socket buffer size +X # +X # SndSocketBuffer 1249280 +X +X # +X # The receiver socket buffer size +X # +X # RcvSocketBuffer 1249280 +X +X # +X # Enable/Disable message checksumming. +X # +X # Checksum on +X # } +X +} +X +# +# General settings +# +General { +X # +X # Set the nice value of the daemon, this value goes from -20 +X # (most favorable scheduling) to 19 (least favorable). Using a +X # very low value reduces the chances to lose state-change events. +X # Default is 0 but this example file sets it to most favourable +X # scheduling as this is generally a good idea. See man nice(1) for +X # more information. +X # +X Nice -20 +X +X # +X # Select a different scheduler for the daemon, you can select between +X # RR and FIFO and the process priority (minimum is 0, maximum is 99). +X # See man sched_setscheduler(2) for more information. Using a RT +X # scheduler reduces the chances to overrun the Netlink buffer. +X # +X # Scheduler { +X # Type FIFO +X # Priority 99 +X # } +X +X # +X # Number of buckets in the cache hashtable. The bigger it is, +X # the closer it gets to O(1) at the cost of consuming more memory. +X # Read some documents about tuning hashtables for further reference. +X # +X HashSize 32768 +X +X # +X # Maximum number of conntracks, it should be double of: +X # $ cat /proc/sys/net/netfilter/nf_conntrack_max +X # since the daemon may keep some dead entries cached for possible +X # retransmission during state synchronization. +X # +X HashLimit 131072 +X +X LogFile on +X +X # +X # Syslog: on, off or a facility name (daemon (default) or local0..7) +X # Default: off +X # +X Syslog on +X +X # +X # Lockfile +X # +X LockFile /var/lock/conntrackd.lock +X +X # +X # Unix socket configuration +X # +X UNIX { +X Path /var/run/conntrackd.sock +X Backlog 20 +X } +X +X SocketBufferSize 2097152 +X SocketBufferSizeMaxGrown 8388608 +X +X # +X # Netlink event socket buffer size. If you do not specify this clause, +X # the default buffer size value in /proc/net/core/rmem_default is +X # used. This default value is usually around 100 Kbytes which is +X # fairly small for busy firewalls. This leads to event message dropping +X # and high CPU consumption. This example configuration file sets the +X # size to 2 MBytes to avoid this sort of problems. +X # +X NetlinkBufferSize 2097152 +X +X # +X # The daemon doubles the size of the netlink event socket buffer size +X # if it detects netlink event message dropping. This clause sets the +X # maximum buffer size growth that can be reached. This example file +X # sets the size to 8 MBytes. +X # +X NetlinkBufferSizeMaxGrowth 8388608 +X +X # +X # If the daemon detects that Netlink is dropping state-change events, +X # it automatically schedules a resynchronization against the Kernel +X # after 30 seconds (default value). Resynchronizations are expensive +X # in terms of CPU consumption since the daemon has to get the full +X # kernel state-table and purge state-entries that do not exist anymore. +X # Be careful of setting a very small value here. You have the following +X # choices: On (enabled, use default 30 seconds value), Off (disabled) +X # or Value (in seconds, to set a specific amount of time). If not +X # specified, the daemon assumes that this option is enabled. +X # +X # NetlinkOverrunResync On +X +X # +X # If you want reliable event reporting over Netlink, set on this +X # option. If you set on this clause, it is a good idea to set off +X # NetlinkOverrunResync. This option is off by default and you need +X # a Linux kernel >= 2.6.31. +X # +X # NetlinkEventsReliable Off +X +X # +X # By default, the daemon receives state updates following an +X # event-driven model. You can modify this behaviour by switching to +X # polling mode with the PollSecs clause. This clause tells conntrackd +X # to dump the states in the kernel every N seconds. With regards to +X # synchronization mode, the polling mode can only guarantee that +X # long-lifetime states are recovered. The main advantage of this method +X # is the reduction in the state replication at the cost of reducing the +X # chances of recovering connections. +X # +X # PollSecs 15 +X +X # +X # The daemon prioritizes the handling of state-change events coming +X # from the core. With this clause, you can set the maximum number of +X # state-change events (those coming from kernel-space) that the daemon +X # will handle after which it will handle other events coming from the +X # network or userspace. A low value improves interactivity (in terms of +X # real-time behaviour) at the cost of extra CPU consumption. +X # Default (if not set) is 100. +X # +X # EventIterationLimit 100 +X +X # +X # Event filtering: This clause allows you to filter certain traffic, +X # There are currently three filter-sets: Protocol, Address and +X # State. The filter is attached to an action that can be: Accept or +X # Ignore. Thus, you can define the event filtering policy of the +X # filter-sets in positive or negative logic depending on your needs. +X # You can select if conntrackd filters the event messages from +X # user-space or kernel-space. The kernel-space event filtering +X # saves some CPU cycles by avoiding the copy of the event message +X # from kernel-space to user-space. The kernel-space event filtering +X # is prefered, however, you require a Linux kernel >= 2.6.29 to +X # filter from kernel-space. If you want to select kernel-space +X # event filtering, use the keyword 'Kernelspace' instead of +X # 'Userspace'. +X # +X Filter From Userspace { +X # +X # Accept only certain protocols: You may want to replicate +X # the state of flows depending on their layer 4 protocol. +X # +X Protocol Accept { +X TCP +X SCTP +X DCCP +X UDP +X ICMP # This requires a Linux kernel >= 2.6.31 +X } +X +X # +X # Ignore traffic for a certain set of IP's: Usually all the +X # IP assigned to the firewall since local traffic must be +X # ignored, only forwarded connections are worth to replicate. +X # Note that these values depends on the local IPs that are +X # assigned to the firewall. +X # +X Address Ignore { +X IPv4_address 127.0.0.1 # loopback +X IPv4_address [IGNORE_IP1] +X IPv4_address [IGNORE_IP2] +X IPv4_address [IGNORE_IP3] +X #IPv4_address 192.168.0.100 # virtual IP 1 +X #IPv4_address 192.168.1.100 # virtual IP 2 +X #IPv4_address 192.168.0.1 +X #IPv4_address 192.168.1.1 +X #IPv4_address 192.168.100.100 # dedicated link ip +X # +X # You can also specify networks in format IP/cidr. +X # IPv4_address 192.168.0.0/24 +X # +X # You can also specify an IPv6 address +X # IPv6_address ::1 +X } +X +X # +X # Uncomment this line below if you want to filter by flow state. +X # This option introduces a trade-off in the replication: it +X # reduces CPU consumption at the cost of having lazy backup +X # firewall replicas. The existing TCP states are: SYN_SENT, +X # SYN_RECV, ESTABLISHED, FIN_WAIT, CLOSE_WAIT, LAST_ACK, +X # TIME_WAIT, CLOSED, LISTEN. +X # +X # State Accept { +X # ESTABLISHED CLOSED TIME_WAIT CLOSE_WAIT for TCP +X # } +X } +X +X # default debian service unit file is of Type=notify +X Systemd on +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/conntrackd.conf.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ': 'MD5 check failed' + ) << \SHAR_EOF +13781a8581b74b0cf402c01264bdca48 cloud_scripts/opt/cloud/templates/conntrackd.conf.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ'` -ne 15888 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' is not 15888" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +ROUTER_BIN_PATH="/ramdisk/rrouter" +ROUTER_LOG="${ROUTER_BIN_PATH}/keepalived.log" +STRIKE_FILE="$ROUTER_BIN_PATH/keepalived.strikes" +TS_FILE="$ROUTER_BIN_PATH/keepalived.ts" +CT_FILE="$ROUTER_BIN_PATH/keepalived.ct" +X +checktime=$(date +%s) +hbtime=$(cat $TS_FILE) +diff=$(($checktime - $hbtime)) +X +lastcheck=0 +if [ -e $CT_FILE ] +then +X lastcheck=$(cat $CT_FILE 2>/dev/null) +fi +checkdiff=$(($checktime - $lastcheck)) +if [ $checkdiff -ge 0 ] && [ $checkdiff -lt 30 ] +then +X exit +fi +echo $checktime > $CT_FILE +X +s=0 +if [ $diff -gt 10 ] +then +X if [ -e $STRIKE_FILE ] +X then +X s=$(cat $STRIKE_FILE 2>/dev/null) +X fi +X s=$(($s+1)) +X echo $s > $STRIKE_FILE +X echo "Check time: $checktime, last heartbeat time: $hbtime, time diff: $diff, strike count: $s" >> $ROUTER_LOG +else +X rm -f $STRIKE_FILE +fi +X +if [ $s -gt 3 ] +then +X systemctl stop --now keepalived >> $ROUTER_LOG 2>&1 +X systemctl stop --now conntrackd >> $ROUTER_LOG 2>&1 +X +X #Set fault so we have the same effect as a KeepaliveD fault. +X python /opt/cloud/bin/master.py --fault +X +X pkill -9 keepalived >> $ROUTER_LOG 2>&1 || true +X pkill -9 conntrackd >> $ROUTER_LOG 2>&1 || true +X echo Status: FAULT \(keepalived process is dead\) >> $ROUTER_LOG +X exit +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ': 'MD5 check failed' + ) << \SHAR_EOF +7040d7485f89a97be367132d28af1267 cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ'` -ne 2037 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' is not 2037" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/check_bumpup.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/check_bumpup.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/check_bumpup.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +cat /tmp/rrouter_bumped +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/check_bumpup.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/check_bumpup.sh': 'MD5 check failed' + ) << \SHAR_EOF +ab6cbce5de505d137d05bcae1af8e18a cloud_scripts/opt/cloud/templates/check_bumpup.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/check_bumpup.sh'` -ne 822 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' is not 822" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/keepalived.conf.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/keepalived.conf.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/keepalived.conf.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' && +! Licensed to the Apache Software Foundation (ASF) under one +! or more contributor license agreements. See the NOTICE file +! distributed with this work for additional information +! regarding copyright ownership. The ASF licenses this file +! to you under the Apache License, Version 2.0 (the +! "License"); you may not use this file except in compliance +! with the License. You may obtain a copy of the License at +! +! http://www.apache.org/licenses/LICENSE-2.0 +! +! Unless required by applicable law or agreed to in writing, +! software distributed under the License is distributed on an +! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +! KIND, either express or implied. See the License for the +! specific language governing permissions and limitations +! under the License. +X +global_defs { +X router_id [ROUTER_ID] +} +X +vrrp_script heartbeat { +X script "[RROUTER_BIN_PATH]/heartbeat.sh" +X interval 5 +} +X +vrrp_instance inside_network { +X state BACKUP +X interface eth2 +X virtual_router_id 51 +X nopreempt +X +X advert_int 1 +X +X #use_vmac +X #vmac_xmit_base +X +X authentication { +X auth_type AH +X auth_pass PASS +X } +X +X virtual_ipaddress { +X [ROUTER_IP] brd [BOARDCAST] dev eth2 +X } +X +X track_script { +X heartbeat +X } +X +X notify_backup "/opt/cloud/bin/master.py --backup" +X notify_master "/opt/cloud/bin/master.py --master" +X notify_fault "/opt/cloud/bin/master.py --fault" +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/keepalived.conf.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ': 'MD5 check failed' + ) << \SHAR_EOF +464642e87bbb032071111b84f82ba135 cloud_scripts/opt/cloud/templates/keepalived.conf.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ'` -ne 1429 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' is not 1429" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +ip link|grep BROADCAST|grep -v eth0|grep -v eth1|cut -d ":" -f 2 > /tmp/iflist +while read i +do +X ip addr show $i|grep "inet " > /tmp/iplist_$i +X while read line +X do +X ip=`echo $line|cut -d " " -f 2|cut -d "/" -f 1` +X arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 +X arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 +X done < /tmp/iplist_$i +done < /tmp/iflist +sleep 1 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ': 'MD5 check failed' + ) << \SHAR_EOF +023d994f54c0955f160f127c1d85d6ae cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ'` -ne 1177 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' is not 1177" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/checkrouter.sh.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/checkrouter.sh.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/checkrouter.sh.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +STATUS=UNKNOWN +INTERFACE=eth1 +ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g') +if [ $ROUTER_TYPE = "router" ] +then +X ROUTER_STATE=$(ip addr | grep eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi') +X STATUS=$ROUTER_STATE +else +X ROUTER_STATE=$(ip addr | grep $INTERFACE | grep state | awk '{print $9;}') +X if [ $ROUTER_STATE = "UP" ] +X then +X STATUS=MASTER +X elif [ $ROUTER_STATE = "DOWN" ] +X then +X STATUS=BACKUP +X fi +fi +X +echo "Status: ${STATUS}" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/checkrouter.sh.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ': 'MD5 check failed' + ) << \SHAR_EOF +bbd331057760019d05ead01eec5e42aa cloud_scripts/opt/cloud/templates/checkrouter.sh.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ'` -ne 1357 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' is not 1357" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/heartbeat.sh.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/heartbeat.sh.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/heartbeat.sh.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +t=$(date +%s) +echo $t > /ramdisk/rrouter/keepalived.ts +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/heartbeat.sh.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ': 'MD5 check failed' + ) << \SHAR_EOF +c006a52c775a0418870c0c50f0131ee7 cloud_scripts/opt/cloud/templates/heartbeat.sh.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ'` -ne 853 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' is not 853" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/conntrackd.conf.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/conntrackd.conf.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/conntrackd.conf.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# Synchronizer settings +# +Sync { +X Mode FTFW { +X # +X # Size of the resend queue (in objects). This is the maximum +X # number of objects that can be stored waiting to be confirmed +X # via acknoledgment. If you keep this value low, the daemon +X # will have less chances to recover state-changes under message +X # omission. On the other hand, if you keep this value high, +X # the daemon will consume more memory to store dead objects. +X # Default is 131072 objects. +X # +X # ResendQueueSize 131072 +X +X # +X # This parameter allows you to set an initial fixed timeout +X # for the committed entries when this node goes from backup +X # to primary. This mechanism provides a way to purge entries +X # that were not recovered appropriately after the specified +X # fixed timeout. If you set a low value, TCP entries in +X # Established states with no traffic may hang. For example, +X # an SSH connection without KeepAlive enabled. If not set, +X # the daemon uses an approximate timeout value calculation +X # mechanism. By default, this option is not set. +X # +X # CommitTimeout 180 +X +X # +X # If the firewall replica goes from primary to backup, +X # the conntrackd -t command is invoked in the script. +X # This command schedules a flush of the table in N seconds. +X # This is useful to purge the connection tracking table of +X # zombie entries and avoid clashes with old entries if you +X # trigger several consecutive hand-overs. Default is 60 seconds. +X # +X # PurgeTimeout 60 +X +X # Set the acknowledgement window size. If you decrease this +X # value, the number of acknowlegdments increases. More +X # acknowledgments means more overhead as conntrackd has to +X # handle more control messages. On the other hand, if you +X # increase this value, the resend queue gets more populated. +X # This results in more overhead in the queue releasing. +X # The following value is based on some practical experiments +X # measuring the cycles spent by the acknowledgment handling +X # with oprofile. If not set, default window size is 300. +X # +X # ACKWindowSize 300 +X +X # +X # This clause allows you to disable the external cache. Thus, +X # the state entries are directly injected into the kernel +X # conntrack table. As a result, you save memory in user-space +X # but you consume slots in the kernel conntrack table for +X # backup state entries. Moreover, disabling the external cache +X # means more CPU consumption. You need a Linux kernel +X # >= 2.6.29 to use this feature. By default, this clause is +X # set off. If you are installing conntrackd for first time, +X # please read the user manual and I encourage you to consider +X # using the fail-over scripts instead of enabling this option! +X # +X # DisableExternalCache Off +X } +X +X # +X # Multicast IP and interface where messages are +X # broadcasted (dedicated link). IMPORTANT: Make sure +X # that iptables accepts traffic for destination +X # 225.0.0.50, eg: +X # +X # iptables -I INPUT -d 225.0.0.50 -j ACCEPT +X # iptables -I OUTPUT -d 225.0.0.50 -j ACCEPT +X # +X Multicast { +X # +X # Multicast address: The address that you use as destination +X # in the synchronization messages. You do not have to add +X # this IP to any of your existing interfaces. If any doubt, +X # do not modify this value. +X # +X IPv4_address 225.0.0.50 +X +X # +X # The multicast group that identifies the cluster. If any +X # doubt, do not modify this value. +X # +X Group 3780 +X +X # +X # IP address of the interface that you are going to use to +X # send the synchronization messages. Remember that you must +X # use a dedicated link for the synchronization messages. +X # +X IPv4_interface [LINK_IP] +X +X # +X # The name of the interface that you are going to use to +X # send the synchronization messages. +X # +X Interface [LINK_IF] +X +X # The multicast sender uses a buffer to enqueue the packets +X # that are going to be transmitted. The default size of this +X # socket buffer is available at /proc/sys/net/core/wmem_default. +X # This value determines the chances to have an overrun in the +X # sender queue. The overrun results packet loss, thus, losing +X # state information that would have to be retransmitted. If you +X # notice some packet loss, you may want to increase the size +X # of the sender buffer. The default size is usually around +X # ~100 KBytes which is fairly small for busy firewalls. +X # +X SndSocketBuffer 1249280 +X +X # The multicast receiver uses a buffer to enqueue the packets +X # that the socket is pending to handle. The default size of this +X # socket buffer is available at /proc/sys/net/core/rmem_default. +X # This value determines the chances to have an overrun in the +X # receiver queue. The overrun results packet loss, thus, losing +X # state information that would have to be retransmitted. If you +X # notice some packet loss, you may want to increase the size of +X # the receiver buffer. The default size is usually around +X # ~100 KBytes which is fairly small for busy firewalls. +X # +X RcvSocketBuffer 1249280 +X +X # +X # Enable/Disable message checksumming. This is a good +X # property to achieve fault-tolerance. In case of doubt, do +X # not modify this value. +X # +X Checksum on +X } +X # +X # You can specify more than one dedicated link. Thus, if one dedicated +X # link fails, conntrackd can fail-over to another. Note that adding +X # more than one dedicated link does not mean that state-updates will +X # be sent to all of them. There is only one active dedicated link at +X # a given moment. The `Default' keyword indicates that this interface +X # will be selected as the initial dedicated link. You can have +X # up to 4 redundant dedicated links. Note: Use different multicast +X # groups for every redundant link. +X # +X # Multicast Default { +X # IPv4_address 225.0.0.51 +X # Group 3781 +X # IPv4_interface 192.168.100.101 +X # Interface eth3 +X # # SndSocketBuffer 1249280 +X # # RcvSocketBuffer 1249280 +X # Checksum on +X # } +X +X # +X # You can use Unicast UDP instead of Multicast to propagate events. +X # Note that you cannot use unicast UDP and Multicast at the same +X # time, you can only select one. +X # +X # UDP { +X # +X # UDP address that this firewall uses to listen to events. +X # +X # IPv4_address 192.168.2.100 +X # +X # or you may want to use an IPv6 address: +X # +X # IPv6_address fe80::215:58ff:fe28:5a27 +X +X # +X # Destination UDP address that receives events, ie. the other +X # firewall's dedicated link address. +X # +X # IPv4_Destination_Address 192.168.2.101 +X # +X # or you may want to use an IPv6 address: +X # +X # IPv6_Destination_Address fe80::2d0:59ff:fe2a:775c +X +X # +X # UDP port used +X # +X # Port 3780 +X +X # +X # The name of the interface that you are going to use to +X # send the synchronization messages. +X # +X # Interface eth2 +X +X # +X # The sender socket buffer size +X # +X # SndSocketBuffer 1249280 +X +X # +X # The receiver socket buffer size +X # +X # RcvSocketBuffer 1249280 +X +X # +X # Enable/Disable message checksumming. +X # +X # Checksum on +X # } +X +} +X +# +# General settings +# +General { +X # +X # Set the nice value of the daemon, this value goes from -20 +X # (most favorable scheduling) to 19 (least favorable). Using a +X # very low value reduces the chances to lose state-change events. +X # Default is 0 but this example file sets it to most favourable +X # scheduling as this is generally a good idea. See man nice(1) for +X # more information. +X # +X Nice -20 +X +X # +X # Select a different scheduler for the daemon, you can select between +X # RR and FIFO and the process priority (minimum is 0, maximum is 99). +X # See man sched_setscheduler(2) for more information. Using a RT +X # scheduler reduces the chances to overrun the Netlink buffer. +X # +X # Scheduler { +X # Type FIFO +X # Priority 99 +X # } +X +X # +X # Number of buckets in the cache hashtable. The bigger it is, +X # the closer it gets to O(1) at the cost of consuming more memory. +X # Read some documents about tuning hashtables for further reference. +X # +X HashSize 32768 +X +X # +X # Maximum number of conntracks, it should be double of: +X # $ cat /proc/sys/net/netfilter/nf_conntrack_max +X # since the daemon may keep some dead entries cached for possible +X # retransmission during state synchronization. +X # +X HashLimit 131072 +X +X LogFile on +X +X # +X # Syslog: on, off or a facility name (daemon (default) or local0..7) +X # Default: off +X # +X Syslog on +X +X # +X # Lockfile +X # +X LockFile /var/lock/conntrackd.lock +X +X # +X # Unix socket configuration +X # +X UNIX { +X Path /var/run/conntrackd.sock +X Backlog 20 +X } +X +X SocketBufferSize 2097152 +X SocketBufferSizeMaxGrown 8388608 +X +X # +X # Netlink event socket buffer size. If you do not specify this clause, +X # the default buffer size value in /proc/net/core/rmem_default is +X # used. This default value is usually around 100 Kbytes which is +X # fairly small for busy firewalls. This leads to event message dropping +X # and high CPU consumption. This example configuration file sets the +X # size to 2 MBytes to avoid this sort of problems. +X # +X NetlinkBufferSize 2097152 +X +X # +X # The daemon doubles the size of the netlink event socket buffer size +X # if it detects netlink event message dropping. This clause sets the +X # maximum buffer size growth that can be reached. This example file +X # sets the size to 8 MBytes. +X # +X NetlinkBufferSizeMaxGrowth 8388608 +X +X # +X # If the daemon detects that Netlink is dropping state-change events, +X # it automatically schedules a resynchronization against the Kernel +X # after 30 seconds (default value). Resynchronizations are expensive +X # in terms of CPU consumption since the daemon has to get the full +X # kernel state-table and purge state-entries that do not exist anymore. +X # Be careful of setting a very small value here. You have the following +X # choices: On (enabled, use default 30 seconds value), Off (disabled) +X # or Value (in seconds, to set a specific amount of time). If not +X # specified, the daemon assumes that this option is enabled. +X # +X # NetlinkOverrunResync On +X +X # +X # If you want reliable event reporting over Netlink, set on this +X # option. If you set on this clause, it is a good idea to set off +X # NetlinkOverrunResync. This option is off by default and you need +X # a Linux kernel >= 2.6.31. +X # +X # NetlinkEventsReliable Off +X +X # +X # By default, the daemon receives state updates following an +X # event-driven model. You can modify this behaviour by switching to +X # polling mode with the PollSecs clause. This clause tells conntrackd +X # to dump the states in the kernel every N seconds. With regards to +X # synchronization mode, the polling mode can only guarantee that +X # long-lifetime states are recovered. The main advantage of this method +X # is the reduction in the state replication at the cost of reducing the +X # chances of recovering connections. +X # +X # PollSecs 15 +X +X # +X # The daemon prioritizes the handling of state-change events coming +X # from the core. With this clause, you can set the maximum number of +X # state-change events (those coming from kernel-space) that the daemon +X # will handle after which it will handle other events coming from the +X # network or userspace. A low value improves interactivity (in terms of +X # real-time behaviour) at the cost of extra CPU consumption. +X # Default (if not set) is 100. +X # +X # EventIterationLimit 100 +X +X # +X # Event filtering: This clause allows you to filter certain traffic, +X # There are currently three filter-sets: Protocol, Address and +X # State. The filter is attached to an action that can be: Accept or +X # Ignore. Thus, you can define the event filtering policy of the +X # filter-sets in positive or negative logic depending on your needs. +X # You can select if conntrackd filters the event messages from +X # user-space or kernel-space. The kernel-space event filtering +X # saves some CPU cycles by avoiding the copy of the event message +X # from kernel-space to user-space. The kernel-space event filtering +X # is prefered, however, you require a Linux kernel >= 2.6.29 to +X # filter from kernel-space. If you want to select kernel-space +X # event filtering, use the keyword 'Kernelspace' instead of +X # 'Userspace'. +X # +X Filter From Userspace { +X # +X # Accept only certain protocols: You may want to replicate +X # the state of flows depending on their layer 4 protocol. +X # +X Protocol Accept { +X TCP +X SCTP +X DCCP +X UDP +X ICMP # This requires a Linux kernel >= 2.6.31 +X } +X +X # +X # Ignore traffic for a certain set of IP's: Usually all the +X # IP assigned to the firewall since local traffic must be +X # ignored, only forwarded connections are worth to replicate. +X # Note that these values depends on the local IPs that are +X # assigned to the firewall. +X # +X Address Ignore { +X IPv4_address 127.0.0.1 # loopback +X IPv4_address [IGNORE_IP1] +X IPv4_address [IGNORE_IP2] +X IPv4_address [IGNORE_IP3] +X #IPv4_address 192.168.0.100 # virtual IP 1 +X #IPv4_address 192.168.1.100 # virtual IP 2 +X #IPv4_address 192.168.0.1 +X #IPv4_address 192.168.1.1 +X #IPv4_address 192.168.100.100 # dedicated link ip +X # +X # You can also specify networks in format IP/cidr. +X # IPv4_address 192.168.0.0/24 +X # +X # You can also specify an IPv6 address +X # IPv6_address ::1 +X } +X +X # +X # Uncomment this line below if you want to filter by flow state. +X # This option introduces a trade-off in the replication: it +X # reduces CPU consumption at the cost of having lazy backup +X # firewall replicas. The existing TCP states are: SYN_SENT, +X # SYN_RECV, ESTABLISHED, FIN_WAIT, CLOSE_WAIT, LAST_ACK, +X # TIME_WAIT, CLOSED, LISTEN. +X # +X # State Accept { +X # ESTABLISHED CLOSED TIME_WAIT CLOSE_WAIT for TCP +X # } +X } +X +X # default debian service unit file is of Type=notify +X Systemd on +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/conntrackd.conf.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ': 'MD5 check failed' + ) << \SHAR_EOF +13781a8581b74b0cf402c01264bdca48 cloud_scripts/opt/cloud/templates/conntrackd.conf.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ'` -ne 15888 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' is not 15888" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +ROUTER_BIN_PATH="/ramdisk/rrouter" +ROUTER_LOG="${ROUTER_BIN_PATH}/keepalived.log" +STRIKE_FILE="$ROUTER_BIN_PATH/keepalived.strikes" +TS_FILE="$ROUTER_BIN_PATH/keepalived.ts" +CT_FILE="$ROUTER_BIN_PATH/keepalived.ct" +X +checktime=$(date +%s) +hbtime=$(cat $TS_FILE) +diff=$(($checktime - $hbtime)) +X +lastcheck=0 +if [ -e $CT_FILE ] +then +X lastcheck=$(cat $CT_FILE 2>/dev/null) +fi +checkdiff=$(($checktime - $lastcheck)) +if [ $checkdiff -ge 0 ] && [ $checkdiff -lt 30 ] +then +X exit +fi +echo $checktime > $CT_FILE +X +s=0 +if [ $diff -gt 10 ] +then +X if [ -e $STRIKE_FILE ] +X then +X s=$(cat $STRIKE_FILE 2>/dev/null) +X fi +X s=$(($s+1)) +X echo $s > $STRIKE_FILE +X echo "Check time: $checktime, last heartbeat time: $hbtime, time diff: $diff, strike count: $s" >> $ROUTER_LOG +else +X rm -f $STRIKE_FILE +fi +X +if [ $s -gt 3 ] +then +X systemctl stop --now keepalived >> $ROUTER_LOG 2>&1 +X systemctl stop --now conntrackd >> $ROUTER_LOG 2>&1 +X +X #Set fault so we have the same effect as a KeepaliveD fault. +X python /opt/cloud/bin/master.py --fault +X +X pkill -9 keepalived >> $ROUTER_LOG 2>&1 || true +X pkill -9 conntrackd >> $ROUTER_LOG 2>&1 || true +X echo Status: FAULT \(keepalived process is dead\) >> $ROUTER_LOG +X exit +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ': 'MD5 check failed' + ) << \SHAR_EOF +7040d7485f89a97be367132d28af1267 cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ'` -ne 2037 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' is not 2037" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/check_bumpup.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/check_bumpup.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/check_bumpup.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +cat /tmp/rrouter_bumped +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/check_bumpup.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/check_bumpup.sh': 'MD5 check failed' + ) << \SHAR_EOF +ab6cbce5de505d137d05bcae1af8e18a cloud_scripts/opt/cloud/templates/check_bumpup.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/check_bumpup.sh'` -ne 822 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' is not 822" + fi +fi +# ============= cloud_scripts/opt/cloud/templates/keepalived.conf.templ ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/keepalived.conf.templ (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/templates/keepalived.conf.templ (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' && +! Licensed to the Apache Software Foundation (ASF) under one +! or more contributor license agreements. See the NOTICE file +! distributed with this work for additional information +! regarding copyright ownership. The ASF licenses this file +! to you under the Apache License, Version 2.0 (the +! "License"); you may not use this file except in compliance +! with the License. You may obtain a copy of the License at +! +! http://www.apache.org/licenses/LICENSE-2.0 +! +! Unless required by applicable law or agreed to in writing, +! software distributed under the License is distributed on an +! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +! KIND, either express or implied. See the License for the +! specific language governing permissions and limitations +! under the License. +X +global_defs { +X router_id [ROUTER_ID] +} +X +vrrp_script heartbeat { +X script "[RROUTER_BIN_PATH]/heartbeat.sh" +X interval 5 +} +X +vrrp_instance inside_network { +X state BACKUP +X interface eth2 +X virtual_router_id 51 +X nopreempt +X +X advert_int 1 +X +X #use_vmac +X #vmac_xmit_base +X +X authentication { +X auth_type AH +X auth_pass PASS +X } +X +X virtual_ipaddress { +X [ROUTER_IP] brd [BOARDCAST] dev eth2 +X } +X +X track_script { +X heartbeat +X } +X +X notify_backup "/opt/cloud/bin/master.py --backup" +X notify_master "/opt/cloud/bin/master.py --master" +X notify_fault "/opt/cloud/bin/master.py --fault" +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/templates/keepalived.conf.templ failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ': 'MD5 check failed' + ) << \SHAR_EOF +464642e87bbb032071111b84f82ba135 cloud_scripts/opt/cloud/templates/keepalived.conf.templ +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ'` -ne 1429 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' is not 1429" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/prepare_pxe.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/prepare_pxe.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/prepare_pxe.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' && +#!/bin/sh +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# # regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +X +set +u +X +err_exit() { +X echo $1 +X exit 1 +} +X +success() { +X exit 0 +} +X +TFTP_ROOT='/opt/tftpboot' +PXELINUX_CFG_DIR='/opt/tftpboot/pxelinux.cfg' +X +kernel_nfs_path=$1 +kernel_file_name=`basename $kernel_nfs_path` +initrd_nfs_path=$2 +initrd_file_name=`basename $initrd_nfs_path` +tmpt_uuid=$3 +pxe_cfg_filename=$4 +ks_file=$5 +X +kernel_path=$tmpt_uuid/$kernel_file_name +initrd_path=$tmpt_uuid/$initrd_file_name +X +cat > $PXELINUX_CFG_DIR/$pxe_cfg_filename </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh': 'MD5 check failed' + ) << \SHAR_EOF +8b495c4ea50905f4197974ee82e607ba cloud_scripts/opt/cloud/bin/prepare_pxe.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh'` -ne 1792 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' is not 1792" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_forwardingrules.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_forwardingrules.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_forwardingrules.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, rules): +X for rule in rules["rules"]: +X source_ip = rule["source_ip_address"] +X destination_ip = rule["destination_ip_address"] +X revoke = rule["revoke"] +X +X newrule = dict() +X newrule["public_ip"] = source_ip +X newrule["internal_ip"] = destination_ip +X +X if rules["type"] == "staticnatrules": +X newrule["type"] = "staticnat" +X elif rules["type"] == "forwardrules": +X newrule["type"] = "forward" +X newrule["public_ports"] = rule["source_port_range"] +X newrule["internal_ports"] = rule["destination_port_range"] +X newrule["protocol"] = rule["protocol"] +X +X if not revoke: +X if rules["type"] == "staticnatrules": +X dbag[source_ip] = [newrule] +X elif rules["type"] == "forwardrules": +X index = -1 +X if source_ip in dbag.keys(): +X for forward in dbag[source_ip]: +X if ruleCompare(forward, newrule): +X index = dbag[source_ip].index(forward) +X if not index == -1: +X dbag[source_ip][index] = newrule +X else: +X dbag[source_ip].append(newrule) +X else: +X dbag[source_ip] = [newrule] +X else: +X if rules["type"] == "staticnatrules": +X if source_ip in dbag.keys(): +X del dbag[source_ip] +X elif rules["type"] == "forwardrules": +X if source_ip in dbag.keys(): +X index = -1 +X for forward in dbag[source_ip]: +X if ruleCompare(forward, newrule): +X index = dbag[source_ip].index(forward) +X print "removing index %s" % str(index) +X if not index == -1: +X del dbag[source_ip][index] +X +X return dbag +X +X +# Compare function checks only the public side, those must be equal the internal details could change +def ruleCompare(ruleA, ruleB): +X if not ruleA["type"] == ruleB["type"]: +X return False +X if ruleA["type"] == "staticnat": +X return ruleA["public_ip"] == ruleB["public_ip"] +X elif ruleA["type"] == "forward": +X return ruleA["public_ip"] == ruleB["public_ip"] and ruleA["public_ports"] == ruleB["public_ports"] \ +X and ruleA["protocol"] == ruleB["protocol"] +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_forwardingrules.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py': 'MD5 check failed' + ) << \SHAR_EOF +278288da98263d674e9d0d0aecaca56d cloud_scripts/opt/cloud/bin/cs_forwardingrules.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py'` -ne 3239 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' is not 3239" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpc_netusage.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_netusage.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_netusage.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +source /root/func.sh +source /opt/cloud/bin/vpc_func.sh +X +vpnoutmark="0x525" +vpninmark="0x524" +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s -[c|g|r|n|d] [-l ] [-v ] \n" $(basename $0) >&2 +} +X +create_usage_rules () { +X iptables-save|grep "NETWORK_STATS_$ethDev" > /dev/null +X if [ $? -gt 0 ] +X then +X iptables -N NETWORK_STATS_$ethDev > /dev/null; +X iptables -I FORWARD -j NETWORK_STATS_$ethDev > /dev/null; +X iptables -A NETWORK_STATS_$ethDev -o $ethDev -s $vcidr > /dev/null; +X iptables -A NETWORK_STATS_$ethDev -i $ethDev -d $vcidr > /dev/null; +X fi +X return $? +} +X +create_vpn_usage_rules () { +X iptables-save|grep "VPN_STATS_$ethDev" > /dev/null +X if [ $? -gt 0 ] +X then +X iptables -t mangle -N VPN_STATS_$ethDev > /dev/null; +X iptables -t mangle -I FORWARD -j VPN_STATS_$ethDev > /dev/null; +X iptables -t mangle -A VPN_STATS_$ethDev -o $ethDev -m mark --mark $vpnoutmark > /dev/null; +X iptables -t mangle -A VPN_STATS_$ethDev -i $ethDev -m mark --mark $vpninmark > /dev/null; +X fi +X return $? +} +X +remove_usage_rules () { +X return 0 +} +X +get_usage () { +X iptables -L NETWORK_STATS_$ethDev -n -v -x 2> /dev/null | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null +X return 0 +} +X +get_vpn_usage () { +X iptables -t mangle -L VPN_STATS_$ethDev -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null +X if [ $? -gt 0 ] +X then +X printf $? +X return 1 +X fi +} +X +reset_usage () { +X iptables -Z NETWORK_STATS_$ethDev > /dev/null +X if [ $? -gt 0 -a $? -ne 2 ] +X then +X return 1 +X fi +} +X +#set -x +X +cflag= +gflag= +rflag= +lflag= +vflag= +nflag= +dflag= +X +while getopts 'cgndrl:v:' OPTION +do +X case $OPTION in +X c) cflag=1 +X ;; +X g) gflag=1 +X ;; +X r) rflag=1 +X ;; +X l) lflag=1 +X publicIp="$OPTARG" +X ;; +X v) vflag=1 +X vcidr="$OPTARG" +X ;; +X n) nflag=1 +X ;; +X d) dflag=1 +X ;; +X i) #Do nothing, since it's parameter for host script +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +ethDev=$(getEthByIp $publicIp) +if [ "$cflag" == "1" ] +then +X if [ "$ethDev" != "" ] +X then +X create_usage_rules +X create_vpn_usage_rules +X unlock_exit 0 $lock $locked +X fi +fi +X +if [ "$gflag" == "1" ] +then +X get_usage +X unlock_exit $? $lock $locked +fi +X +if [ "$nflag" == "1" ] +then +X #get_vpn_usage +X unlock_exit $? $lock $locked +fi +X +if [ "$dflag" == "1" ] +then +X #remove_usage_rules +X unlock_exit 0 $lock $locked +fi +X +if [ "$rflag" == "1" ] +then +X reset_usage +X unlock_exit $? $lock $locked +fi +X +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_netusage.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh': 'MD5 check failed' + ) << \SHAR_EOF +f3f8069de696e92a24cbc694275c0bd5 cloud_scripts/opt/cloud/bin/vpc_netusage.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh'` -ne 3377 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' is not 3377" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/configure.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/configure.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/configure.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/configure.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/configure.py +M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&-E<'0@24]%2@I"B`@("`@("`@ +M("`@("`@("`@("`@9W5E22R)$;VU57U)E<75E&-E<'0@17AC97!T:6]N(&%S +M(&4Z"B`@("`@("`@("`@("`@("`@("`@;&]G9VEN9RYE7!E)UT@/3T@)V%L;"<@86YD(&]B +M:ELG7!E(#T@(F%N>2(*("`@("`@("`@("`@:68@ +M(FEC;7!?='EP92(@:6X@7,H*2!A;F0@7!E)UT*("`@("`@("`@("`@:68@(FEC +M;7!?8V]D92(@:6X@7,H*2!A;F0@7!E)UTL('-E;&8N7!E("5S("UJ("5S(B`E("AI8VUP7W1Y<&4L('-E;&8N&5C=71E*&1S=$EP2==.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U +M;&5;)V%C=&EO;B==(#T@(D%#0T505"(*("`@("`@("`@("`@("`@("`@("!E +M;'-E.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5;)V%C=&EO +M;B==(#T@(D123U`B"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@ +M("`@("`@("`@(",@1F]R(&]T:&5R(')U;&5S(&%D9&5D+"!I9B!D969A=6QT +M7V5G7!E("5S(B`E(&EC;7!?='EP90H@("`@("`@("`@ +M("`@("`@96QI9B!R=6QE6R=P7!E+B!3;RP@:71S(&9W(&%T=')I8G5T92!I7!E +M(#T@(F%N>2(*("`@("`@("`@("`@("`@('-E;&8N<')O=&]C;VP@/2!S96QF +M+G1Y<&4*("`@("`@("`@("`@("`@(&EF(")I8VUP7W1Y<&4B(&EN(')U;&4N +M:V5Y7!E+"!R=6QE6R=I8VUP7V-O9&4G72D*("`@("`@("`@("`@("`@(&EF('-E +M;&8N='EP92`]/2`B<')O=&]C;VPB.@H@("`@("`@("`@("`@("`@("`@(&EF +M(')U;&5;)W!R;W1O8V]L)UT@/3T@-#$Z"B`@("`@("`@("`@("`@("`@("`@ +M("`@(')U;&5;)W!R;W1O8V]L)UT@/2`B:7!V-B(*("`@("`@("`@("`@("`@ +M("`@("!S96QF+G!R;W1O8V]L(#T@&5C=71E*")I +M<'1A8FQE+4$O:7!T86)L97,@+70@9FEL=&5R("U$+V&5C=71E +M*")I<'-E="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\ +M(&EP&5C=71E*")I<'-E +M="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP2!V86QI9"!D871A"B`@("`@("`@("`@("`@("!I9B!F;VQD97(@(3T@(G5S +M97)D871A(B!A;F0@9F]L9&5R("$](")M971A9&%T82(Z"B`@("`@("`@("`@ +M("`@("`@("`@8V]N=&EN=64*"B`@("`@("`@("`@("`@("!I9B!F:6QE(#T] +M("(B.@H@("`@("`@("`@("`@("`@("`@(&-O;G1I;G5E"@H@("`@("`@("`@ +M("`@("`@7,N97AI="@Q*0H@("`@("`@("`@("!I9B!O2Q!;&QO=UQN1&5N>2!F2!E>&ES=',L('=E(&1O(&ET('1H +M:7,@=V%Y(&9O7,N97AI +M="@Q*0H*("`@("`@("!F:"`](&]P96XH:'1A8V-E2`] +M(")297=R:71E4G5L92!>;65T82UD871A+R@N*RDD("`N+B\B("L@9F]L9&5R +M("L@(B\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%=(@H@("`@("`@("`@ +M("!H=&%C8V5S7,N97AI="@Q +M*2`@(R!&25A-10H@("`@("`@(')E='5R;B!4&ET*#$I("`C($9)6$U%"B`@("`@("`@:7!S96,N=G!N+2@N*BDN8V]N9B(L(&9I;&4I"B`@ +M("`@("`@("`@(&EF(&TZ"B`@("`@("`@("`@("`@("!S96QF+F-O;F9I<',N +M87!P96YD*&TN9W)O=7`H,2DI"@H@("`@("`@(&9O&5C=71E*")I +M<'-E8R!R96QO860B*0H*("`@(&1E9B!C;VYF:6=U#4R-2`M:B!!0T-%4%0B("4@9&5V72D* +M("`@("`@("!F;W(@;F5T(&EN(&]B:ELG<&5E&UA&UA5]I<"=="B`@("`@("`@<&5E7!E/71U;FYE;"(I +M"B`@("`@("`@9FEL92YA9&1E<2@B(&%U=&AB>3US96-R970B*0H@("`@("`@ +M(&9I;&4N861D97$H(B!K97EE>&-H86YG93UI:V4B*0H@("`@("`@(&9I;&4N +M861D97$H(B!I:V4])7,B("4@:6ME<&]L:6-Y*0H@("`@("`@(&9I;&4N861D +M97$H(B!I:V5L:69E=&EM93TE3TS,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1T:6UE;W5T +M/3$R,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1A8W1I;VX]')A;F=E*#,I.@H@("`@("`@("`@ +M("!R97-U;'0@/2!#&5C=71E*"=I<'-E8R!S=&%T=7,@=G!N +M+25S('P@9W)E<"`B)7,B)R`E("AR:6=H='!E97(L('!E97)L:7-T+G-P;&ET +M*"(L(BP@,2E;,%TI*0H@("`@("`@("`@("!I9B!L96XH2P@)R,G*0H@("`@("`@(&EF(&YO="!U&5C=71E*")T9&)D=6UP("]V87(O&5C=71E*"=K:6QL("TY("5S)R`E('!I9"D*"@IC;&%S +M&5C=71E*")S>7-T96UC=&P@2YS96-R971S(B`E("AS96QF+E903D-/3D9$25(I"B`@ +M("`@("`@>&PR='!D8V]N9F9I;&4@/2`B+V5T8R]X;#)T<&0O>&PR='!D+F-O +M;F8B"B`@("`@("`@>&PR='!O<'1I;VYS9FEL92`]("(O971C+W!P<"]O<'1I +M;VYS+GAL,G1P9"(*"B`@("`@("`@;&]C86QI<"`](&]B:ELG;&]C86Q?:7`G +M70H@("`@("`@(&QO8V%L8VED2`Z(%!32R!<(B5S7"(B("4@*&QE9G0L('!S:RDI"B`@ +M("`@("`@&PR='!D8V]N9F9I;&4I"B`@("`@("`@>&PR='!D8V]N9BYA9&1E +M<2@B:7`@&PR='!O<'1I;VYS+F-O;6UI="@I"@H@("`@9&5F(')E;6]T96%C8V5S +M2@I"B`@("`@("`@4EP +M*')U;&5;)W!U8FQI8U]I<"==*0H@("`@("`@(&EN=&5R;F%L7V9W:6YT97)F +M86-E(#T@4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI +M"B`@("`@("`@<'5B;&EC7V9W<&]R=',@/2!S96QF+G!O4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI +M+`H@("`@("`@("`@("`@("`@&UA2(Z"B`@("`@("`@("`@(&9W7W!R97)O=71? +M2(Z"B`@("`@ +M("`@("`@(&9W7W!O2(Z"B`@("`@("`@ +M("`@(&9W7W!O2(Z"B`@("`@ +M("`@("`@(&9W7V]U='!U=%]R=6QE("L]("(@+2UD<&]R="`E2(Z"B`@("`@("`@("`@ +M(&9W7V]U='!U=%]R=6QE("L]("(Z(B`K('-E;&8N<&]R='-4;U-T4EP*')U;&5;)VEN=&5R;F%L7VEP +M)UTI+`H@("`@("`@("`@("`@("`@&9F9F9F9F9F +M("TM8W1M87-K(#!X9F9F9F9F9F8B("4*("`@("`@("`@("`@("`@("`@("`@ +M("`@4EP*')U;&5;(FEN=&5R;F%L +M7VEP(ETI+"!S96QF+F=E=$=U97-T27`H*2E=*0H*"F-L87-S($EP5&%B;&5S +M17AE8W5T;W(Z"@H@("`@8V]N9FEG(#T@3F]N90H*("`@(&1E9B!?7VEN:71? +M7RAS96QF+"!C;VYF:62!PR)P&5C=71OR)P&5C=71OR)P&5C=71O7!E.B`E&5C27!T86)L97,H8V]N9FEG +M*3H*("`@("`@("!L;V=G:6YG+F1E8G5G*")0&5C=71O7,H*3H*("`@("`@("`@ +M("`@97AE8T1A=&%B86&5C +M27!T86)L97,H8V]N9FEG*0H@("`@96QI9B!J&5C27!T86)L +M97,H8V]N9FEG*0H@("`@96QS93H*("`@("`@("!L;V=G:6YG+G=A7!E/25S(B`E("AP/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/configure.py': 'MD5 check failed' + ) << \SHAR_EOF +8987217852a386250687dfce6d0b10be cloud_scripts/opt/cloud/bin/configure.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/configure.py'` -ne 45920 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/configure.py' is not 45920" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_vmp.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vmp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vmp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vmp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_vmp.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=WWT*("`@(')C6R=I9"==(#T@)W9M<&%S/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vmp.py': 'MD5 check failed' + ) << \SHAR_EOF +3e1ea6831cb27eedc825e25bf817cb9c cloud_scripts/opt/cloud/bin/cs_vmp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vmp.py'` -ne 1126 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vmp.py' is not 1126" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# getRouterMonitorResults.sh --- Send the monitor results to Management Server +X +if [ "$1" == "true" ] +then +X python /root/monitorServices.py > /dev/null +fi +X +printf "FAILING CHECKS:\n" +X +if [ -f /root/basic_failing_health_checks ] +then +X echo `cat /root/basic_failing_health_checks` +fi +X +if [ -f /root/advanced_failing_health_checks ] +then +X echo `cat /root/advanced_failing_health_checks` +fi +X +printf "MONITOR RESULTS:\n" +X +echo "{\"basic\":" +if [ -f /root/basic_monitor_results.json ] +then +X echo `cat /root/basic_monitor_results.json` +else +X echo "{}" +fi +echo ",\"advanced\":" +if [ -f /root/advanced_monitor_results.json ] +then +X echo `cat /root/advanced_monitor_results.json` +else +X echo "{}" +fi +X +echo "}" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh': 'MD5 check failed' + ) << \SHAR_EOF +35649a8a1a8339aaa42a311826699849 cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh'` -ne 1526 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' is not 1526" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vr_cfg.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vr_cfg.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vr_cfg.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +#set -x +X +cfg= +version= +log=/var/log/cloud.log +X +log_it() { +X logger -t cloud "$*" +X echo "$(date) : $*" >> $log +} +X +while getopts 'c:' OPTION; do +X case $OPTION in +X c) cfg="$OPTARG" ;; +esac; done +X +export DEFER_CONFIG=true +while read line; do +X #comment +X if [[ $line == \#* ]]; then +X continue +X +X elif [ "$line" == "" ]; then +X read line +X version=$line +X log_it "VR config: configuation format version $version" +X #skip +X read line +X +X elif [ "$line" == " +X read line +X log_it "VR config: execution success " +X +X elif [ "$line" == "" ]; then +X read line +X file=$line +X log_it "VR config: creating file: $file" +X rm -f $file +X while read -r line; do +X if [ "$line" == "" ]; then +X break +X fi +X echo $line >> $file +X done +X log_it "VR config: create file success" +X +X fi +X +done < $cfg +X +# archive the configuration file +mv $cfg /var/cache/cloud/processed/ +X +unset DEFER_CONFIG +# trigger finish_config() +if [ -f /etc/cloudstack/dhcpentry.json ]; then +X /opt/cloud/bin/configure.py vm_dhcp_entry.json +fi +if [ -f /etc/cloudstack/vmdata.json ]; then +X /opt/cloud/bin/configure.py vm_metadata.json +fi +X +# Flush kernel conntrack table +log_it "VR config: Flushing conntrack table" +conntrackd -d 2> /dev/null +if [ $? -eq 0 ]; then +X conntrackd -F +X conntrackd -k +else +X conntrackd -F +fi +log_it "VR config: Flushing conntrack table completed" +X +Xexit 0 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vr_cfg.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vr_cfg.sh': 'MD5 check failed' + ) << \SHAR_EOF +da02bd413616a9cc131fd039e627eb3e cloud_scripts/opt/cloud/bin/vr_cfg.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vr_cfg.sh'` -ne 2725 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' is not 2725" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpc_snat.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_snat.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_snat.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# @VERSION@ +X +source /root/func.sh +source /opt/cloud/bin/vpc_func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage:\n %s -A -l \n" $(basename $0) >&2 +X printf " %s -D -l \n" $(basename $0) >&2 +} +X +X +add_snat() { +X logger -t cloud "$(basename $0):Added SourceNAT $pubIp on interface $ethDev" +X vpccidr=$(getVPCcidr) +X sudo iptables -D FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT +X sudo iptables -A FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT +X sudo iptables -t nat -D POSTROUTING -j SNAT -o $ethDev --to-source $pubIp +X sudo iptables -t nat -A POSTROUTING -j SNAT -o $ethDev --to-source $pubIp +X return $? +} +remove_snat() { +X logger -t cloud "$(basename $0):Removing SourceNAT $pubIp on interface $ethDev" +X sudo iptables -t nat -D POSTROUTING -j SNAT -o $ethDev --to-source $pubIp +X return $? +} +X +#set -x +lflag=0 +cflag=0 +op="" +X +while getopts 'ADl:c:' OPTION +do +X case $OPTION in +X A) Aflag=1 +X op="-A" +X ;; +X D) Dflag=1 +X op="-D" +X ;; +X l) lflag=1 +X pubIp="$OPTARG" +X ;; +X c) cflag=1 +X ethDev="$OPTARG" +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [ "$Aflag$Dflag" != "1" ] +then +X usage +X unlock_exit 2 $lock $locked +fi +X +if [ "$lflag$cflag" != "11" ] +then +X usage +X unlock_exit 2 $lock $locked +fi +X +if [ "$Aflag" == "1" ] +then +X add_snat $publicIp +X unlock_exit $? $lock $locked +fi +X +if [ "$Dflag" == "1" ] +then +X remove_sat $publicIp +X unlock_exit $? $lock $locked +fi +X +unlock_exit 1 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_snat.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_snat.sh': 'MD5 check failed' + ) << \SHAR_EOF +23502a2ce3829fb787464124f13b9141 cloud_scripts/opt/cloud/bin/vpc_snat.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_snat.sh'` -ne 2346 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' is not 2346" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpc_staticroute.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_staticroute.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_staticroute.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# @VERSION@ +X +source /root/func.sh +source /opt/cloud/bin/vpc_func.sh +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s: -a < routes > \n" $(basename $0) >&2 +} +X +#set -x +X +flush_table_backup() { +X flush_table "static_route_back" +} +X +flush_table() { +X local tab=$1 +X sudo ip route flush table $tab +} +X +copy_table() { +X local from=$1 +X local to=$2 +X sudo ip route show table $from | while read route +X do +X sudo ip route add table $to $route +X done +} +X +backup_table() { +X flush_table "static_route_back" +X copy_table "static_route" "static_route_back" +X flush_table "static_route" +} +X +restore_table() { +X flush_table "static_route" +X copy_table "static_route_back" "static_route" +X flush_table "static_route_back" +} +X +static_route() { +X local rule=$1 +X local ip=$(echo $rule | cut -d: -f1) +X if [ $ip == "Revoke" ] +X then +X return 0 +X fi +X local gateway=$(echo $rule | cut -d: -f2) +X local cidr=$(echo $rule | cut -d: -f3) +X logger -t cloud "$(basename $0): static route: public ip=$ip \ +X gateway=$gateway cidr=$cidr" +X local dev=$(getEthByIp $ip) +X if [ $? -gt 0 ] +X then +X return 1 +X fi +X sudo ip route add $cidr dev $dev via $gateway table static_route &>/dev/null +X result=$? +X logger -t cloud "$(basename $0): done static route: public ip=$ip \ +X gateway=$gateway cidr=$cidr" +X return $result +} +X +gflag= +aflag= +while getopts 'a:' OPTION +X +do +X case $OPTION in +X a) aflag=1 +X rules="$OPTARG" +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [ -n "$rules" ] +then +X rules_list=$(echo $rules | cut -d, -f1- --output-delimiter=" ") +fi +X +success=0 +X +backup_table +X +for r in $rules_list +do +X static_route $r +X success=$? +X if [ $success -gt 0 ] +X then +X logger -t cloud "$(basename $0): failure to apply fw rules for guest network: $gcidr" +X break +X else +X logger -t cloud "$(basename $0): successful in applying fw rules for guest network: $gcidr" +X fi +done +X +if [ $success -gt 0 ] +then +X logger -t cloud "$(basename $0): restoring from backup for guest network: $gcidr" +X restore_table +else +X logger -t cloud "$(basename $0): deleting backup for guest network: $gcidr" +X flush_table_backup +fi +unlock_exit $success $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_staticroute.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh': 'MD5 check failed' + ) << \SHAR_EOF +4080c04ff7600874ef4a4364aefc4d18 cloud_scripts/opt/cloud/bin/vpc_staticroute.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh'` -ne 3043 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' is not 3043" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/baremetal-vr.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/baremetal-vr.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/baremetal-vr.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/baremetal-vr.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/baremetal-vr.py +M(TQI8V5N6ME>2<@:6X@<#H*("`@("`@("`@("`@("`@("`@("`@("`@ +M2`]('`N6ME>2!I;B`E0H*("`@(&1E +M9B!?9V5T7VUG;71?:7`H4)AFEP*')E<7,N:V5Y2P@:&%S:%-T5]P/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/baremetal-vr.py': 'MD5 check failed' + ) << \SHAR_EOF +f87e8890aa7ad3cc522c5c5ceb2fbf69 cloud_scripts/opt/cloud/bin/baremetal-vr.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/baremetal-vr.py'` -ne 5587 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/baremetal-vr.py' is not 5587" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_firewallrules.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_firewallrules.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_firewallrules.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import copy +X +X +def merge(dbag, data): +X dbagc = copy.deepcopy(dbag) +X if "rules" not in data: +X return dbagc +X for rule in data['rules']: +X id = str(rule['id']) +X if rule['revoked']: +X if id in dbagc.keys(): +X del(dbagc[id]) +X elif id not in dbagc.keys(): +X dbagc[id] = rule +X return dbagc +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_firewallrules.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py': 'MD5 check failed' + ) << \SHAR_EOF +6d3faf49679b84bf9a098eee6b630f69 cloud_scripts/opt/cloud/bin/cs_firewallrules.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py'` -ne 1141 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' is not 1141" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/netusage.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/netusage.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/netusage.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/netusage.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/netusage.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +X +# netusage.sh -- create iptable rules to gather network stats, running within DomR +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s -[c|g|r] [-[a|d] ]\n" $(basename $0) >&2 +} +X +create_usage_rules () { +X iptables-save|grep "INPUT -j NETWORK_STATS" > /dev/null +X if [ $? -eq 0 ] +X then +X return $? +X fi +X iptables -N NETWORK_STATS > /dev/null +X iptables -I FORWARD -j NETWORK_STATS > /dev/null +X iptables -I INPUT -j NETWORK_STATS > /dev/null +X iptables -I OUTPUT -j NETWORK_STATS > /dev/null +X iptables -A NETWORK_STATS -i eth0 -o eth2 > /dev/null +X iptables -A NETWORK_STATS -i eth2 -o eth0 > /dev/null +X iptables -A NETWORK_STATS -o eth2 ! -i eth0 -p tcp > /dev/null +X iptables -A NETWORK_STATS -i eth2 ! -o eth0 -p tcp > /dev/null +X return $? +} +X +add_public_interface () { +X local pubIf=$1 +X iptables-save|grep "NETWORK_STATS -i eth0 -o $pubIf" > /dev/null +X if [ $? -eq 0 ] +X then +X return $? +X fi +X iptables -A NETWORK_STATS -i eth0 -o $pubIf > /dev/null +X iptables -A NETWORK_STATS -i $pubIf -o eth0 > /dev/null +X iptables -A NETWORK_STATS -o $pubIf ! -i eth0 -p tcp > /dev/null +X iptables -A NETWORK_STATS -i $pubIf ! -o eth0 -p tcp > /dev/null +X return $? +} +X +delete_public_interface () { +X local pubIf=$1 +X echo $pubIf >> /root/removedVifs +X return $? +} +X +get_usage () { +X iptables -L NETWORK_STATS -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null +X if [ -f /root/removedVifs ] ; then iptables -Z NETWORK_STATS ; fi; > /dev/null +X /root/clearUsageRules.sh > /dev/null +X if [ $? -gt 0 -a $? -ne 2 ] +X then +X printf $? +X return 1 +X fi +} +X +reset_usage () { +X iptables -Z NETWORK_STATS > /dev/null +X if [ $? -gt 0 -a $? -ne 2 ] +X then +X return 1 +X fi +} +X +#set -x +X +cflag= +gflag= +rflag= +iflag= +aflag= +dflag= +X +while getopts 'cgria:d:' OPTION +do +X case $OPTION in +X c) cflag=1 +X ;; +X g) gflag=1 +X ;; +X r) rflag=1 +X ;; +X a) aflag=1 +X publicIf="$OPTARG" +X ;; +X d) dflag=1 +X publicIf="$OPTARG" +X ;; +X i) #Do nothing, since it's parameter for host script +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [ "$cflag" == "1" ] +then +X #create_usage_rules +X unlock_exit $? $lock $locked +fi +X +if [ "$gflag" == "1" ] +then +X get_usage +X unlock_exit $? $lock $locked +fi +X +if [ "$rflag" == "1" ] +then +X reset_usage +X unlock_exit $? $lock $locked +fi +X +if [ "$aflag" == "1" ] +then +X #add_public_interface $publicIf +X unlock_exit $? $lock $locked +fi +X +if [ "$dflag" == "1" ] +then +X #delete_public_interface $publicIf +X unlock_exit $? $lock $locked +fi +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/netusage.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/netusage.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/netusage.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/netusage.sh': 'MD5 check failed' + ) << \SHAR_EOF +2966c6cafee62e66ff903e53367b498b cloud_scripts/opt/cloud/bin/netusage.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/netusage.sh'` -ne 3478 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/netusage.sh' is not 3478" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/monitor_service.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/monitor_service.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/monitor_service.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/monitor_service.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/monitor_service.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +set -x +usage() { +X printf "Usage: %s: -c config string \n" $(basename $0) >&2 +} +X +configFile='/etc/monitor.conf' +X +create_config() { +services=$1; +services_list=$(echo $services | cut -d, -f1- --output-delimiter=" "); +X +echo "#Monitor services config" >$configFile +X +for s in $services_list +do +service=$(echo $s | cut -d: -f1); +processname=$(echo $s | cut -d: -f2); +service_name=$(echo $s | cut -d: -f3); +pidfile=$(echo $s | cut -d: -f4); +X +echo "$service" >> $configFile; +echo $processname >> $configFile +echo $service_name >> $configFile +echo $pidfile >> $configFile +X +done +X +} +X +config=$2 +if [ -n "$3" ] +then +X +#delete cron job before updating config file +crontab -l|grep "monitorServices.py" +X +if [ $? -eq 0 ] +then +X t=`date +%s`; +X touch /tmp/monitor-$t.txt; +X conf=/tmp/monitor-$t.txt +X crontab -l >$conf +X sed -i /#monitoringConfig/,+3d $conf +X crontab $conf +X rm $conf +fi +X +X +logger -t cloud "deleted crontab entry for monitoring services" +unlock_exit 0 $lock $locked +fi +X +create_config $config +X +#add cron job +crontab -l|grep "monitorServices.py" +if [ $? -ne 0 ] +X then +X (crontab -l ;echo -e "#monitoringConfig\nSHELL=/bin/bash\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n */3 * * * * /usr/bin/python /root/monitorServices.py") | crontab - +X logger -t cloud "added crontab entry for monitoring services" +fi +X +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/monitor_service.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/monitor_service.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/monitor_service.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/monitor_service.sh': 'MD5 check failed' + ) << \SHAR_EOF +3419e7baf45ac36d3d69ca71ef7ab978 cloud_scripts/opt/cloud/bin/monitor_service.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/monitor_service.sh'` -ne 2294 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/monitor_service.sh' is not 2294" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_ip.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_ip.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_ip.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_ip.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_ip.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N7!E)UT@/2!I<%LG;G=?='EP92==+FQO=V5R*"D*("`@(&EF(&EP +M6R=N=U]T>7!E)UT@/3T@)V-O;G1R;VPG.@H@("`@("`@(&1B86=;:7!;)V1E +M=FEC92==72`](%MI<%T*("`@(&5L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_ip.py': 'MD5 check failed' + ) << \SHAR_EOF +856c6261f2876c280c49fa486f4f7408 cloud_scripts/opt/cloud/bin/cs_ip.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_ip.py'` -ne 2581 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_ip.py' is not 2581" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/bumpup_priority.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/bumpup_priority.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/bumpup_priority.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +touch /tmp/rrouter_bumped +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/bumpup_priority.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh': 'MD5 check failed' + ) << \SHAR_EOF +35091259ed848a9f7270aca1a90e95af cloud_scripts/opt/cloud/bin/bumpup_priority.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh'` -ne 824 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' is not 824" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/getRouterAlerts.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/getRouterAlerts.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/getRouterAlerts.sh (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/getRouterAlerts.sh +M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5LP77T*"B`@("`@("`@("`@ +M("`@("!T;T1A=&5686P])"AD871E("UD("(D9&%T979A;"(@(BLE/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh': 'MD5 check failed' + ) << \SHAR_EOF +6c3803100b0923fd3f9017a0e09d6fd5 cloud_scripts/opt/cloud/bin/getRouterAlerts.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh'` -ne 1706 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh' is not 1706" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/postinit.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/postinit.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/postinit.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# This scripts before ssh.service but after cloud-early-config +X +# Eject cdrom if any +eject || true +X +# Restart journald for setting changes to apply +systemctl restart systemd-journald +X +TYPE=$(grep -Po 'type=\K[a-zA-Z]*' /var/cache/cloud/cmdline) +if [ "$TYPE" == "router" ] || [ "$TYPE" == "vpcrouter" ] || [ "$TYPE" == "dhcpsrvr" ] +then +X if [ -x /opt/cloud/bin/update_config.py ] +X then +X /opt/cloud/bin/update_config.py cmd_line.json || true +X fi +fi +X +[ ! -f /var/cache/cloud/enabled_svcs ] && touch /var/cache/cloud/enabled_svcs +for svc in $(cat /var/cache/cloud/enabled_svcs) +do +X systemctl enable --now --no-block $svc +done +X +[ ! -f /var/cache/cloud/disabled_svcs ] && touch /var/cache/cloud/disabled_svcs +for svc in $(cat /var/cache/cloud/disabled_svcs) +do +X systemctl disable --now --no-block $svc +done +X +# Restore the persistent iptables nat, rules and filters for IPv4 and IPv6 if they exist +ipv4="/etc/iptables/rules.v4" +if [ -e $ipv4 ] +then +X iptables-restore < $ipv4 +fi +X +ipv6="/etc/iptables/rules.v6" +if [ -e $ipv6 ] +then +X ip6tables-restore < $ipv6 +fi +X +# Patch known systemd/sshd memory leak - https://github.com/systemd/systemd/issues/8015#issuecomment-476160981 +echo '@include null' >> /etc/pam.d/systemd-user +X +# Enable and Start SSH +systemctl enable --now --no-block ssh +X +date > /var/cache/cloud/boot_up_done +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/postinit.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/postinit.sh': 'MD5 check failed' + ) << \SHAR_EOF +170afadf6f130e9cb697dca65a87aacb cloud_scripts/opt/cloud/bin/setup/postinit.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/postinit.sh'` -ne 2122 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' is not 2122" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/secstorage.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/secstorage.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/secstorage.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_secstorage() { +X log_it "Setting up secondary storage system vm" +X +X echo "cloud apache2 nfs-common portmap" > /var/cache/cloud/enabled_svcs +X echo "conntrackd keepalived haproxy dnsmasq" > /var/cache/cloud/disabled_svcs +X mkdir -p /var/log/cloud +X +X setup_common eth0 eth1 eth2 +X setup_storage_network +X setup_system_rfc1918_internal +X +X log_it "Setting up entry in hosts" +X sed -i /$NAME/d /etc/hosts +X public_ip=`getPublicIp` +X echo "$public_ip $NAME" >> /etc/hosts +X +X log_it "Applying iptables rules" +X cp /etc/iptables/iptables-secstorage /etc/iptables/rules.v4 +X +X log_it "Configuring sshd" +X local hyp=$HYPERVISOR +X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then +X setup_sshd $ETH1_IP "eth1" +X else +X setup_sshd $ETH0_IP "eth0" +X fi +X +X log_it "Configuring apache2" +X setup_apache2 $ETH2_IP +X +X # Deprecated, should move to Cs Python all of it +X sed -e "s///" \ +X -e "s///" \ +X -e "s/Listen .*:8180/Listen $ETH2_IP:80/g" \ +X -e "s/Listen .*:8443/Listen $ETH2_IP:443/g" /etc/apache2/vhost.template > /etc/apache2/sites-enabled/vhost-${ETH2_IP}.conf +X +X log_it "Setting up apache2 for post upload of volume/template" +X a2enmod proxy +X a2enmod proxy_http +X a2enmod headers +X +X cat >/etc/apache2/cors.conf </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh': 'MD5 check failed' + ) << \SHAR_EOF +14aea171a5e0fdfd3069bb96bde91e0b cloud_scripts/opt/cloud/bin/setup/secstorage.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh'` -ne 2720 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' is not 2720" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/ilbvm.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +ilbvm_svcs() { +X echo "haproxy" > /var/cache/cloud/enabled_svcs +X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs +} +X +setup_ilbvm() { +X log_it "Setting up Internal Load Balancer system vm" +X setup_common eth0 eth1 +X #eth0 = guest network, eth1=control network +X +X sed -i /$NAME/d /etc/hosts +X echo "$ETH0_IP $NAME" >> /etc/hosts +X +X cp /etc/iptables/iptables-ilbvm /etc/iptables/rules.v4 +X setup_sshd $ETH1_IP "eth1" +X +X enable_fwding 0 +X enable_irqbalance 1 +} +X +ilbvm_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute ilbvm svcs" +X exit 1 +fi +setup_ilbvm +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/ilbvm.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh': 'MD5 check failed' + ) << \SHAR_EOF +87c70bdf6c0d4d41f0ff87475494188f cloud_scripts/opt/cloud/bin/setup/ilbvm.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh'` -ne 1442 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' is not 1442" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_vpcrouter() { +X log_it "Setting up VPC virtual router system vm" +X +X if [ -f /etc/hosts ]; then +X grep -q $NAME /etc/hosts || echo "127.0.0.1 $NAME" >> /etc/hosts; +X fi +X +X cat > /etc/network/interfaces << EOF +auto lo eth0 +iface lo inet loopback +EOF +X setup_interface "0" $ETH0_IP $ETH0_MASK $GW +X +X echo $NAME > /etc/hostname +X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon +X hostnamectl set-hostname $NAME +X +X #Nameserver +X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries +X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries +X if [ -n "$internalNS1" ] +X then +X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS1" > /etc/resolv.conf +X fi +X +X if [ -n "$internalNS2" ] +X then +X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS2" >> /etc/resolv.conf +X fi +X if [ -n "$NS1" ] +X then +X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS1" >> /etc/resolv.conf +X fi +X +X if [ -n "$NS2" ] +X then +X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS2" >> /etc/resolv.conf +X fi +X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] +X then +X if [ "$HYPERVISOR" == "vmware" ] || [ "$HYPERVISOR" == "hyperv" ]; +X then +X ip route add $MGMTNET via $LOCAL_GW dev eth0 +X # workaround to activate vSwitch under VMware +X timeout 3 ping -n -c 3 $LOCAL_GW || true +X fi +X fi +X +X ip route delete default +X # create route table for static route +X +X sudo echo "252 static_route" >> /etc/iproute2/rt_tables 2>/dev/null +X sudo echo "251 static_route_back" >> /etc/iproute2/rt_tables 2>/dev/null +X sudo ip rule add from $VPCCIDR table static_route 2>/dev/null +X sudo ip rule add from $VPCCIDR table static_route_back 2>/dev/null +X +X setup_vpc_apache2 +X +X enable_irqbalance 1 +X enable_vpc_rpsrfs 1 +X disable_rpfilter +X enable_fwding 1 +X enable_passive_ftp 1 +X cp /etc/iptables/iptables-vpcrouter /etc/iptables/rules.v4 +X setup_sshd $ETH0_IP "eth0" +X cp /etc/vpcdnsmasq.conf /etc/dnsmasq.conf +X cp /etc/cloud-nic.rules /etc/udev/rules.d/cloud-nic.rules +X echo "" > /etc/dnsmasq.d/dhcphosts.txt +X echo "dhcp-hostsfile=/etc/dhcphosts.txt" > /etc/dnsmasq.d/cloud.conf +X +X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" +X #DNS server will append $DOMAIN to local queries +X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf +X #answer all local domain queries +X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf +X +X command -v dhcp_release > /dev/null 2>&1 +X no_dhcp_release=$? +X if [ $no_dhcp_release -eq 0 ] +X then +X echo 1 > /var/cache/cloud/dnsmasq_managed_lease +X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf +X else +X echo 0 > /var/cache/cloud/dnsmasq_managed_lease +X fi +X +X # Setup hourly logrotate +X if [ -f /etc/cron.daily/logrotate ]; then +X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 +X fi +} +X +routing_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute routing_svcs" +X exit 1 +fi +setup_vpcrouter +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh': 'MD5 check failed' + ) << \SHAR_EOF +811420d11f97b1d7237b964e8bbbdf5d cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh'` -ne 3885 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' is not 3885" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/router.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/router.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/router.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/router.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/router.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +check_reboot_vmware() { +X if [ "$HYPERVISOR" != "vmware" ]; then +X return +X fi +X +X if [ -n "$MGMTNET" ]; then +X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') +X if ping -n -c 1 -W 3 $MGMT_GW &> /dev/null; then +X log_it "Management gateway pingable, skipping VR reboot" +X return +X fi +X fi +X +X log_it "Management gateway not pingable, rebooting VR" +X sync +X reboot +} +X +setup_router() { +X # To save router public interface and gw ip information +X touch /var/cache/cloud/ifaceGwIp +X +X oldmd5= +X [ -f "/etc/udev/rules.d/70-persistent-net.rules" ] && oldmd5=$(md5sum "/etc/udev/rules.d/70-persistent-net.rules" | awk '{print $1}') +X +X if [ -n "$ETH2_IP" ]; then +X setup_common eth0 eth1 eth2 +X +X if [ -n "$EXTRA_PUBNICS" ]; then +X for ((i = 3; i < 3 + $EXTRA_PUBNICS; i++)); do +X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" +X done +X fi +X else +X setup_common eth0 eth1 +X if [ -n "$EXTRA_PUBNICS" ]; then +X for ((i = 2; i < 2 + $EXTRA_PUBNICS; i++)); do +X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" +X done +X fi +X fi +X +X log_it "Checking udev NIC assignment order changes" +X if [ "$NIC_MACS" != "" ] +X then +X init_interfaces_orderby_macs "$NIC_MACS" "/tmp/interfaces" "/tmp/udev-rules" +X newmd5=$(md5sum "/tmp/udev-rules" | awk '{print $1}') +X rm /tmp/interfaces +X rm /tmp/udev-rules +X +X if [ "$oldmd5" != "$newmd5" ] +X then +X log_it "Reloading udev for new udev NIC assignment" +X udevadm control --reload-rules && udevadm trigger +X check_reboot_vmware +X fi +X fi +X +X setup_aesni +X setup_dnsmasq +X setup_apache2 $ETH0_IP +X +X sed -i /$NAME/d /etc/hosts +X echo "$ETH0_IP $NAME" >> /etc/hosts +X +X enable_irqbalance 1 +X disable_rpfilter_domR +X enable_fwding 1 +X enable_rpsrfs 1 +X enable_passive_ftp 1 +X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 +X setup_sshd $ETH1_IP "eth1" +X +X # Only allow DNS service for current network +X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X +X # Setup hourly logrotate +X if [ -f /etc/cron.daily/logrotate ]; then +X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 +X fi +} +X +routing_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute routing_svcs" +X exit 1 +fi +setup_router +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/router.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/router.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/router.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/router.sh': 'MD5 check failed' + ) << \SHAR_EOF +2ae62d5d44c716730231c9d77618fe91 cloud_scripts/opt/cloud/bin/setup/router.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/router.sh'` -ne 3355 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/router.sh' is not 3355" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/elbvm.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/elbvm.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/elbvm.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +elbvm_svcs() { +X echo "haproxy" > /var/cache/cloud/enabled_svcs +X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs +} +X +setup_elbvm() { +X log_it "Setting up Elastic Load Balancer system vm" +X setup_common eth0 eth1 +X sed -i /$NAME/d /etc/hosts +X public_ip=$ETH2_IP +X [ "$ETH2_IP" == "0.0.0.0" ] || [ "$ETH2_IP" == "" ] && public_ip=$ETH0_IP +X echo "$public_ip $NAME" >> /etc/hosts +X +X cp /etc/iptables/iptables-elbvm /etc/iptables/rules.v4 +X if [ "$SSHONGUEST" == "true" ] +X then +X setup_sshd $ETH0_IP "eth0" +X else +X setup_sshd $ETH1_IP "eth1" +X fi +X +X enable_fwding 0 +X enable_irqbalance 0 +} +X +elbvm_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute elbvm svcs" +X exit 1 +fi +setup_elbvm +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/elbvm.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh': 'MD5 check failed' + ) << \SHAR_EOF +2d34615f1d40f6125a2205e6118ba07f cloud_scripts/opt/cloud/bin/setup/elbvm.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh'` -ne 1578 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' is not 1578" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/bootstrap.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" +CMDLINE=/var/cache/cloud/cmdline +X +rm -f /var/cache/cloud/enabled_svcs +rm -f /var/cache/cloud/disabled_svcs +X +X. /lib/lsb/init-functions +X +log_it() { +X echo "$(date) $@" >> /var/log/cloud.log +X log_action_msg "$@" +} +X +hypervisor() { +X if [ -d /proc/xen ]; then +X mount -t xenfs none /proc/xen +X $(dmesg | grep -q "Xen HVM") +X if [ $? -eq 0 ]; then # 1=PV,0=HVM +X echo "xen-hvm" && return 0 +X else +X echo "xen-pv" && return 0 +X fi +X fi +X +X [ -x /usr/sbin/virt-what ] && local facts=( $(virt-what) ) +X if [ "$facts" != "" ]; then +X # Xen HVM is recognized as Hyperv when Viridian extensions are enabled +X if [ "${facts[-1]}" == "xen-domU" ] && [ "${facts[0]}" == "hyperv" ]; then +X echo "xen-hvm" && return 0 +X else +X echo ${facts[-1]} && return 0 +X fi +X fi +X +X grep -q QEMU /proc/cpuinfo && echo "kvm" && return 0 +X grep -q QEMU /var/log/messages && echo "kvm" && return 0 +X +X vmware-checkvm &> /dev/null && echo "vmware" && return 0 +X +X echo "unknown" && return 1 +} +X +config_guest() { +X [ ! -d /proc/xen ] && sed -i 's/^vc/#vc/' /etc/inittab && telinit q +X [ -d /proc/xen ] && sed -i 's/^#vc/vc/' /etc/inittab && telinit q +X +X systemctl daemon-reload +X +X case $HYPERVISOR in +X xen-pv|xen-domU) +X systemctl stop ntpd +X systemctl disable ntpd +X systemctl enable xe-daemon +X systemctl start xe-daemon +X +X cat /proc/cmdline > $CMDLINE +X sed -i "s/%/ /g" $CMDLINE +X ;; +X xen-hvm) +X systemctl stop ntpd +X systemctl disable ntpd +X systemctl enable xe-daemon +X systemctl start xe-daemon +X +X if [ ! -f /usr/bin/xenstore-read ]; then +X log_it "ERROR: xentools not installed, cannot found xenstore-read" && exit 5 +X fi +X /usr/bin/xenstore-read vm-data/cloudstack/init > $CMDLINE +X sed -i "s/%/ /g" $CMDLINE +X ;; +X kvm) +X # Configure kvm hotplug support +X if grep -E 'CONFIG_HOTPLUG_PCI=y|CONFIG_HOTPLUG_PCI_ACPI=y' /boot/config-`uname -r`; then +X log_it "acpiphp and pci_hotplug module already compiled in" +X else +X modprobe acpiphp 2> /dev/null && log_it "acpiphp module loaded" || true +X modprobe pci_hotplug 2> /dev/null && log_it "pci_hotplug module loaded" || true +X fi +X +X sed -i -e "/^s0:2345:respawn.*/d" /etc/inittab +X sed -i -e "/6:23:respawn/a\s0:2345:respawn:/sbin/getty -L 115200 ttyS0 vt102" /etc/inittab +X systemctl enable qemu-guest-agent +X systemctl start qemu-guest-agent +X +X # Wait for $CMDLINE file to be written by the qemu-guest-agent +X for i in {1..60}; do +X if [ -s $CMDLINE ]; then +X log_it "Received a new non-empty cmdline file from qemu-guest-agent" +X break +X fi +X sleep 1 +X done +X if [ ! -s $CMDLINE ]; then +X log_it "Failed to receive the cmdline file via the qemu-guest-agent" +X fi +X ;; +X vmware) +X # system time sync'd with host via vmware tools +X systemctl stop ntpd +X systemctl disable ntpd +X systemctl enable open-vm-tools +X systemctl start open-vm-tools +X +X vmtoolsd --cmd 'machine.id.get' > $CMDLINE +X ;; +X virtualpc|hyperv) +X # Hyper-V is recognized as virtualpc hypervisor type. Boot args are passed using KVP Daemon +X systemctl enable hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service +X systemctl start hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service +X sleep 5 +X cp -f /var/opt/hyperv/.kvp_pool_0 $CMDLINE +X cat /dev/null > /var/opt/hyperv/.kvp_pool_0 +X ;; +X virtualbox) +X # Virtualbox is used to test the virtual router +X # get the commandline from a dmistring (yes, hacky!) +X dmidecode | grep cmdline | sed 's/^.*cmdline://' > $CMDLINE +X RV=$? +X if [ $RV -ne 0 ] ; then +X log_it "Failed to get cmdline from a virtualbox dmi property" +X fi +X ;; +X esac +X +X # Find and export guest type +X export TYPE=$(grep -Po 'type=\K[a-zA-Z]*' $CMDLINE) +} +X +patch_systemvm() { +X local patchfile=$1 +X local backupfolder="/tmp/.conf.backup" +X local logfile="/var/log/patchsystemvm.log" +X if [ -f /usr/local/cloud/systemvm/conf/cloud.jks ]; then +X rm -fr $backupfolder +X mkdir -p $backupfolder +X cp -r /usr/local/cloud/systemvm/conf/* $backupfolder/ +X fi +X rm /usr/local/cloud/systemvm -rf +X mkdir -p /usr/local/cloud/systemvm +X echo "All" | unzip $patchfile -d /usr/local/cloud/systemvm >$logfile 2>&1 +X find /usr/local/cloud/systemvm/ -name \*.sh | xargs chmod 555 +X if [ -f $backupfolder/cloud.jks ]; then +X cp -r $backupfolder/* /usr/local/cloud/systemvm/conf/ +X echo "Restored keystore file and certs using backup" >> $logfile +X fi +X rm -fr $backupfolder +X # Import global cacerts into 'cloud' service's keystore +X keytool -importkeystore -srckeystore /etc/ssl/certs/java/cacerts -destkeystore /usr/local/cloud/systemvm/certs/realhostip.keystore -srcstorepass changeit -deststorepass vmops.com -noprompt || true +X return 0 +} +X +patch() { +X local PATCH_MOUNT=/media/cdrom +X local logfile="/var/log/patchsystemvm.log" +X if [ "$TYPE" == "consoleproxy" ] || [ "$TYPE" == "secstorage" ] && [ -f ${PATCH_MOUNT}/agent.zip ] && [ -f /var/cache/cloud/patch.required ] +X then +X echo "Patching systemvm for cloud service with mount=$PATCH_MOUNT for type=$TYPE" >> $logfile +X patch_systemvm ${PATCH_MOUNT}/agent.zip +X if [ $? -gt 0 ] +X then +X echo "Failed to apply patch systemvm\n" >> $logfile +X exit 1 +X fi +X fi +X +X rm -f /var/cache/cloud/patch.required +X chmod -x /etc/systemd/system/cloud*.service +X systemctl daemon-reload +X umount $PATCH_MOUNT || true +X +X if [ -f /mnt/cmdline ]; then +X cat /mnt/cmdline > $CMDLINE +X fi +X return 0 +} +X +config_sysctl() { +X # When there is more memory reset the cache back pressure to default 100 +X physmem=$(free|awk '/^Mem:/{print $2}') +X if [ $((physmem)) -lt 409600 ]; then +X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 200" /etc/sysctl.conf +X else +X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 100" /etc/sysctl.conf +X fi +X +X sync +X sysctl -p +} +X +bootstrap() { +X log_it "Bootstrapping systemvm appliance" +X +X export HYPERVISOR=$(hypervisor) +X [ $? -ne 0 ] && log_it "Failed to detect hypervisor type, bailing out" && exit 10 +X log_it "Starting guest services for $HYPERVISOR" +X +X config_guest +X patch +X config_sysctl +X +X log_it "Configuring systemvm type=$TYPE" +X if [ -f "/opt/cloud/bin/setup/$TYPE.sh" ]; then +X /opt/cloud/bin/setup/$TYPE.sh +X else +X /opt/cloud/bin/setup/default.sh +X fi +X +X log_it "Finished setting up systemvm" +X exit 0 +} +X +bootstrap +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/bootstrap.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh': 'MD5 check failed' + ) << \SHAR_EOF +722a9c6abfff147c7727fdcd85c96767 cloud_scripts/opt/cloud/bin/setup/bootstrap.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh'` -ne 7721 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' is not 7721" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_console_proxy() { +X log_it "Setting up console proxy system vm" +X +X echo "cloud" > /var/cache/cloud/enabled_svcs +X echo "haproxy dnsmasq apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs +X mkdir -p /var/log/cloud +X +X setup_common eth0 eth1 eth2 +X setup_system_rfc1918_internal +X +X log_it "Setting up entry in hosts" +X sed -i /$NAME/d /etc/hosts +X public_ip=`getPublicIp` +X echo "$public_ip $NAME" >> /etc/hosts +X +X log_it "Applying iptables rules" +X cp /etc/iptables/iptables-consoleproxy /etc/iptables/rules.v4 +X +X log_it "Configuring sshd" +X local hyp=$HYPERVISOR +X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then +X setup_sshd $ETH1_IP "eth1" +X else +X setup_sshd $ETH0_IP "eth0" +X fi +X +X disable_rpfilter +X enable_fwding 0 +X enable_irqbalance 0 +X rm -f /etc/logrotate.d/cloud +} +X +setup_console_proxy +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh': 'MD5 check failed' + ) << \SHAR_EOF +44adac9bf5e54d4791da00e3d1bdaf46 cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh'` -ne 1658 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' is not 1658" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/common.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/common.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/common.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/common.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/common.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" +X +X. /lib/lsb/init-functions +X +log_it() { +X echo "$(date) $@" >> /var/log/cloud.log +X log_action_msg "$@" +} +X +init_interfaces_orderby_macs() { +X macs=( $(echo $1 | sed "s/|/ /g") ) +X total_nics=${#macs[@]} +X interface_file=${2:-"/etc/network/interfaces"} +X rule_file=${3:-"/etc/udev/rules.d/70-persistent-net.rules"} +X +X echo -n "auto lo" > $interface_file +X for((i=0; i> $interface_file +X fi +X done +X +X cat >> $interface_file << EOF +X +iface lo inet loopback +X +EOF +X +X echo "" > $rule_file +X for((i=0; i < ${#macs[@]}; i++)) +X do +X echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${macs[$i]}\", NAME=\"eth$i\"" >> $rule_file +X done +} +X +init_interfaces() { +X if [ "$NIC_MACS" == "" ] +X then +X cat > /etc/network/interfaces << EOF +auto lo $1 $2 $3 +iface lo inet loopback +X +EOF +X else +X init_interfaces_orderby_macs "$NIC_MACS" +X fi +} +X +setup_interface() { +X local intfnum=$1 +X local ip=$2 +X local mask=$3 +X local gw=$4 +X local force=$5 +X local intf=eth${intfnum} +X local bootproto="static" +X +X if [ "$BOOTPROTO" == "dhcp" ] +X then +X if [ "$intfnum" != "0" ] +X then +X bootproto="dhcp" +X fi +X fi +X +X if [ "$ip" != "0.0.0.0" -a "$ip" != "" -o "$force" == "force" ] +X then +X echo "iface $intf inet $bootproto" >> /etc/network/interfaces +X if [ "$bootproto" == "static" ] +X then +X echo " address $ip " >> /etc/network/interfaces +X echo " netmask $mask" >> /etc/network/interfaces +X fi +X fi +X +X if [ "$ip" == "0.0.0.0" -o "$ip" == "" ] +X then +X ifconfig $intf down +X fi +X +X if [ "$force" == "force" ] +X then +X ifdown $intf +X else +X ifdown $intf +X if [ "$RROUTER" != "1" -o "$1" != "2" ] +X then +X ifup $intf +X fi +X fi +} +X +setup_interface_ipv6() { +X sysctl net.ipv6.conf.all.disable_ipv6=0 +X sysctl net.ipv6.conf.all.forwarding=1 +X sysctl net.ipv6.conf.all.accept_ra=1 +X +X sed -i "s/net.ipv6.conf.all.disable_ipv6 =.*$/net.ipv6.conf.all.disable_ipv6 = 0/" /etc/sysctl.conf +X sed -i "s/net.ipv6.conf.all.forwarding =.*$/net.ipv6.conf.all.forwarding = 1/" /etc/sysctl.conf +X sed -i "s/net.ipv6.conf.all.accept_ra =.*$/net.ipv6.conf.all.accept_ra = 1/" /etc/sysctl.conf +X +X local intfnum=$1 +X local ipv6="$2" +X local prelen="$3" +X local intf=eth${intfnum} +X +X echo "iface $intf inet6 static" >> /etc/network/interfaces +X echo " address $ipv6 " >> /etc/network/interfaces +X echo " netmask $prelen" >> /etc/network/interfaces +X echo " accept_ra 1" >> /etc/network/interfaces +X ifdown $intf +X ifup $intf +} +X +X +enable_fwding() { +X local enabled=$1 +X log_it "cloud: enable_fwding = $1" +X log_it "enable_fwding = $1" +X echo "$1" > /proc/sys/net/ipv4/ip_forward +X [ -f /etc/iptables/iptables.conf ] && sed -i "s/ENABLE_ROUTING=.*$/ENABLE_ROUTING=$enabled/" /etc/iptables/iptables.conf && return +} +X +enable_passive_ftp() { +X log_it "cloud: enabling passive FTP for guest VMs" +X echo "$1" > /proc/sys/net/netfilter/nf_conntrack_helper +} +X +disable_rpfilter() { +X log_it "cloud: disable rp_filter" +X log_it "disable rpfilter" +X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf +} +X +get_public_vif_list() { +X local vif_list="" +X for i in /sys/class/net/eth*; do +X vif=$(basename $i); +X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] +X then +X vif_list="$vif_list $vif"; +X fi +X done +X +X echo $vif_list +} +X +disable_rpfilter_domR() { +X log_it "cloud: Tuning rp_filter on public interfaces" +X +X VIF_LIST=$(get_public_vif_list) +X log_it "rpfilter public interfaces : $VIF_LIST" +X if [ "$DISABLE_RP_FILTER" == "true" ] +X then +X log_it "cloud: disable rp_filter on public interfaces" +X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf +X echo "0" > /proc/sys/net/ipv4/conf/default/rp_filter +X for vif in $VIF_LIST; do +X log_it "cloud: disable rp_filter on public interface: $vif" +X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 0/" /etc/sysctl.conf +X echo "0" > /proc/sys/net/ipv4/conf/$vif/rp_filter +X done +X else +X log_it "cloud: enable rp_filter on public interfaces" +X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 1/" /etc/sysctl.conf +X echo "1" > /proc/sys/net/ipv4/conf/default/rp_filter +X for vif in $VIF_LIST; do +X log_it "cloud: enable rp_filter on public interface: $vif" +X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 1/" /etc/sysctl.conf +X echo "1" > /proc/sys/net/ipv4/conf/$vif/rp_filter +X done +X fi +X log_it "cloud: Enabling rp_filter on Non-public interfaces(eth0,eth1,lo)" +X echo "1" > /proc/sys/net/ipv4/conf/eth0/rp_filter +X echo "1" > /proc/sys/net/ipv4/conf/eth1/rp_filter +X echo "1" > /proc/sys/net/ipv4/conf/lo/rp_filter +} +X +enable_irqbalance() { +X local enabled=$1 +X local proc=0 +X +X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) +X if [ $proc -le 1 ] && [ $enabled -eq 1 ] +X then +X enabled=0 +X fi +X +X log_it "Processors = $proc Enable service ${svc} = $enabled" +X local cfg=/etc/default/irqbalance +X [ -f $cfg ] && sed -i "s/ENABLED=.*$/ENABLED=$enabled/" $cfg && return +} +X +enable_vpc_rpsrfs() { +X local enable=$1 +X if [ $enable -eq 0 ] +X then +X echo 0 > /etc/rpsrfsenable +X else +X echo 1 > /etc/rpsrfsenable +X fi +X +X return 0 +} +X +enable_rpsrfs() { +X local enable=$1 +X +X if [ $enable -eq 0 ] +X then +X echo 0 > /etc/rpsrfsenable +X return 0 +X fi +X +X if [ ! -f /sys/class/net/eth0/queues/rx-0/rps_cpus ] +X then +X echo "rps is not enabled in the kernel" +X echo 0 > /etc/rpsrfsenable +X return 0 +X fi +X +X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) +X if [ $proc -le 1 ] +X then +X echo 0 > /etc/rpsrfsenable +X return 0; +X fi +X +X echo 1 > /etc/rpsrfsenable +X num=1 +X num=$(($num<<$proc)) +X num=$(($num-1)); +X echo $num; +X hex=$(printf "%x\n" $num) +X echo $hex; +X #enable rps +X echo $hex > /sys/class/net/eth0/queues/rx-0/rps_cpus +X echo $hex > /sys/class/net/eth2/queues/rx-0/rps_cpus +X +X #enble rfs +X echo 256 > /proc/sys/net/core/rps_sock_flow_entries +X echo 256 > /sys/class/net/eth0/queues/rx-0/rps_flow_cnt +X echo 256 > /sys/class/net/eth2/queues/rx-0/rps_flow_cnt +} +X +setup_common() { +X init_interfaces $1 $2 $3 +X if [ -n "$ETH0_IP" ] +X then +X setup_interface "0" $ETH0_IP $ETH0_MASK $GW +X fi +X if [ -n "$ETH0_IP6" ] +X then +X setup_interface_ipv6 "0" $ETH0_IP6 $ETH0_IP6_PRELEN +X fi +X setup_interface "1" $ETH1_IP $ETH1_MASK $GW +X if [ -n "$ETH2_IP" ] +X then +X setup_interface "2" $ETH2_IP $ETH2_MASK $GW +X fi +X +X echo $NAME > /etc/hostname +X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon +X hostnamectl set-hostname $NAME +X +X #Nameserver +X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries +X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries +X if [ -n "$internalNS1" ] +X then +X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS1" > /etc/resolv.conf +X fi +X +X if [ -n "$internalNS2" ] +X then +X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS2" >> /etc/resolv.conf +X fi +X if [ -n "$NS1" ] +X then +X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS1" >> /etc/resolv.conf +X fi +X +X if [ -n "$NS2" ] +X then +X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS2" >> /etc/resolv.conf +X fi +X +X if [ -n "$IP6_NS1" ] +X then +X echo "nameserver $IP6_NS1" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $IP6_NS1" >> /etc/resolv.conf +X fi +X if [ -n "$IP6_NS2" ] +X then +X echo "nameserver $IP6_NS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $IP6_NS2" >> /etc/resolv.conf +X fi +X +X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] +X then +X ip route add $MGMTNET via $LOCAL_GW dev eth1 +X fi +X +X ip route delete default +X if [ "$RROUTER" != "1" ] +X then +X gwdev=$3 +X if [ -z "$gwdev" ] +X then +X gwdev="eth0" +X fi +X +X ip route add default via $GW dev $gwdev +X fi +X +X # Workaround to activate vSwitch under VMware +X timeout 3 ping -n -c 3 $GW & +X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] +X then +X timeout 3 ping -n -c 3 $LOCAL_GW & +X #This code is added to address ARP issue by pinging MGMT_GW +X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') +X timeout 3 ping -n -c 3 $MGMT_GW & +X fi +X +X if [ "$HYPERVISOR" == "vmware" ]; then +X ntpq -p &> /dev/null || vmware-toolbox-cmd timesync enable +X fi +} +X +setup_dnsmasq() { +X log_it "Setting up dnsmasq" +X +X touch /etc/dhcpopts.txt +X +X [ -z $DHCP_RANGE ] && [ $ETH0_IP ] && DHCP_RANGE=$ETH0_IP +X [ $ETH0_IP6 ] && DHCP_RANGE_IP6=$ETH0_IP6 +X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" +X #removing the dnsmasq multiple ranges config file. +X rm /etc/dnsmasq.d/multiple_ranges.conf +X +X #get the template +X cp /etc/dnsmasq.conf.tmpl /etc/dnsmasq.conf +X +X if [ -n "$DOMAIN" ] +X then +X #send domain name to dhcp clients +X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\"$DOMAIN\"/ /etc/dnsmasq.conf +X #DNS server will append $DOMAIN to local queries +X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf +X #answer all local domain queries +X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf +X fi +X +X if [ -n "$DNS_SEARCH_ORDER" ] +X then +X sed -i -e "/^[#]*dhcp-option.*=119.*$/d" /etc/dnsmasq.conf +X echo "dhcp-option-force=119,$DNS_SEARCH_ORDER" >> /etc/dnsmasq.conf +X # set the domain search order as a space seprated list for option 15 +X DNS_SEARCH_ORDER=$(echo $DNS_SEARCH_ORDER | sed 's/,/ /g') +X #send domain name to dhcp clients +X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\""$DNS_SEARCH_ORDER"\"/ /etc/dnsmasq.conf +X fi +X +X if [ $DHCP_RANGE ] +X then +X sed -i -e "s/^dhcp-range_ip4=.*$/dhcp-range=$DHCP_RANGE,static/" /etc/dnsmasq.conf +X else +X sed -i -e "s/^dhcp-range_ip4=.*$//" /etc/dnsmasq.conf +X fi +X if [ $DHCP_RANGE_IP6 ] +X then +X sed -i -e "s/^dhcp-range_ip6=.*$/dhcp-range=$DHCP_RANGE_IP6,static/" /etc/dnsmasq.conf +X # For nondefault6 tagged host, don't send dns-server information +X sed -i /nondefault6/d /etc/dnsmasq.conf +X echo "dhcp-option=nondefault6,option6:dns-server" >> /etc/dnsmasq.conf +X else +X sed -i -e "s/^dhcp-range_ip6=.*$//" /etc/dnsmasq.conf +X fi +X +X if [ "$RROUTER" == "1" ] +X then +X DEFAULT_GW=$GUEST_GW +X INTERNAL_DNS=$GUEST_GW +X else +X if [ "$TYPE" == "dhcpsrvr" ] +X then +X DEFAULT_GW=$GW +X else +X DEFAULT_GW=$ETH0_IP +X fi +X INTERNAL_DNS=$ETH0_IP +X fi +X sed -i -e "/^[#]*dhcp-option=option:router.*$/d" /etc/dnsmasq.conf +X [ $DEFAULT_GW ] && echo "dhcp-option=option:router,$DEFAULT_GW" >> /etc/dnsmasq.conf +X +X [ $ETH0_IP ] && [ $NS1 ] && NS="$NS1," +X [ $ETH0_IP ] && [ $NS2 ] && NS="$NS$NS2," +X [ $ETH0_IP6 ] && [ $IP6_NS1 ] && NS6="[$IP6_NS1]," +X [ $ETH0_IP6 ] && [ $IP6_NS2 ] && NS6="$NS6[$IP6_NS2]," +X #for now set up ourself as the dns server as well +X sed -i -e "/^[#]*dhcp-option=6,.*$/d" /etc/dnsmasq.conf +X sed -i -e "/^[#]*dhcp-option=option6:dns-server,.*$/d" /etc/dnsmasq.conf +X if [ "$USE_EXTERNAL_DNS" != "true" ] +X then +X [ $ETH0_IP ] && NS="$INTERNAL_DNS,$NS" +X [ $ETH0_IP6 ] && NS6="[::],$NS6" +X # enable dns +X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf +X else +X # disable dns +X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf +X echo "port=0" >> /etc/dnsmasq.conf +X fi +X NS=${NS%?} +X NS6=${NS6%?} +X [ $ETH0_IP ] && echo "dhcp-option=6,$NS" >> /etc/dnsmasq.conf +X [ $ETH0_IP6 ] && echo "dhcp-option=option6:dns-server,$NS6" >> /etc/dnsmasq.conf +X #adding the name data-server to the /etc/hosts for allowing the access to user-data service and ssh-key reset in every subnet. +X #removing the existing entires to avoid duplicates on restarts. +X sed -i '/data-server/d' /etc/hosts +X if [ -n "$ETH0_IP" ] +X then +X echo "$ETH0_IP data-server" >> /etc/hosts +X fi +X if [ -n "$ETH0_IP6" ] +X then +X echo "$ETH0_IP6 data-server" >> /etc/hosts +X fi +X #add the dhcp-client-update only if dnsmasq version is 2.6 and above +X dnsmasqVersion=$(dnsmasq -v | grep version -m 1 | grep -o "[[:digit:]]\.[[:digit:]]") +X major=$(echo "$dnsmasqVersion" | cut -d '.' -f 1) +X minor=$(echo "$dnsmasqVersion" | cut -d '.' -f 2) +X if [ "$major" -eq '2' -a "$minor" -ge '6' ] || [ "$major" -gt '2' ] +X then +X sed -i -e "/^dhcp-client-update/d" /etc/dnsmasq.conf +X echo 'dhcp-client-update' >> /etc/dnsmasq.conf +X fi +X +X command -v dhcp_release > /dev/null 2>&1 +X no_dhcp_release=$? +X if [ $no_dhcp_release -eq 0 -a -z "$ETH0_IP6" ] +X then +X echo 1 > /var/cache/cloud/dnsmasq_managed_lease +X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf +X else +X echo 0 > /var/cache/cloud/dnsmasq_managed_lease +X fi +} +X +setup_sshd(){ +X local ip=$1 +X local eth=$2 +X [ -f /etc/ssh/sshd_config ] && sed -i -e "s/^[#]*ListenAddress.*$/ListenAddress $ip/" /etc/ssh/sshd_config +X sed -i "/3922/s/eth./$eth/" /etc/iptables/rules.v4 +} +X +setup_vpc_apache2() { +X log_it "Setting up apache web server for VPC" +X systemctl disable apache2 +X clean_ipalias_config +X setup_apache2_common +} +X +clean_ipalias_config() { +X rm -f /etc/apache2/conf.d/ports.*.meta-data.conf +X rm -f /etc/apache2/sites-available/ipAlias* +X rm -f /etc/apache2/sites-enabled/ipAlias* +X rm -f /etc/apache2/conf.d/vhost*.conf +X rm -f /etc/apache2/ports.conf +X rm -f /etc/apache2/vhostexample.conf +X rm -f /etc/apache2/sites-available/* +X rm -f /etc/apache2/sites-enabled/* +X +X rm -rf /etc/failure_config +} +X +setup_apache2_common() { +X sed -i 's/^Include ports.conf.*/# CS: Done by Python CsApp config\n#Include ports.conf/g' /etc/apache2/apache2.conf +X # Disable listing of http://SSVM-IP/icons folder for security issue. see article http://www.i-lateral.com/tutorials/disabling-the-icons-folder-on-an-ubuntu-web-server/ +X [ -f /etc/apache2/mods-available/alias.conf ] && sed -i s/"Options Indexes MultiViews"/"Options -Indexes MultiViews"/ /etc/apache2/mods-available/alias.conf +X +X echo "Options -Indexes" > /var/www/html/.htaccess +} +X +setup_apache2() { +X log_it "Setting up apache web server" +X mkdir -p /var/www +X chown www-data:www-data -R /var/www +X clean_ipalias_config +X setup_apache2_common +X local ip=$1 +} +X +setup_aesni() { +X if [ `grep aes /proc/cpuinfo | wc -l` -gt 0 ] +X then +X modprobe aesni_intel +X fi +} +X +setup_storage_network() { +X if [ x"$STORAGE_IP" == "x" -o x"$STORAGE_NETMASK" == "x" ] +X then +X log_it "Incompleted parameters STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR. Cannot setup storage network" +X return +X fi +X +X echo "" >> /etc/network/interfaces +X echo "auto eth3" >> /etc/network/interfaces +X +X setup_interface "3" "$STORAGE_IP" "$STORAGE_NETMASK" +X [ -n "$MTU" ] && ifconfig eth3 mtu $MTU && echo " mtu $MTU" >> /etc/network/interfaces +X #ip route add "$STORAGE_CIDR" via "$STORAGE_IP" +X log_it "Successfully setup storage network with STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR" +} +X +setup_system_rfc1918_internal() { +X public_ip=`getPublicIp` +X echo "$public_ip" | grep -E "^((127\.)|(10\.)|(172\.1[6-9]\.)|(172\.2[0-9]\.)|(172\.3[0-1]\.)|(192\.168\.))" +X if [ "$?" == "0" ]; then +X log_it "Not setting up route of RFC1918 space to $LOCAL_GW befause $public_ip is RFC1918." +X else +X log_it "Setting up route of RFC1918 space to $LOCAL_GW" +X # Setup general route for RFC 1918 space, as otherwise it will be sent to +X # the public gateway and not work +X # More specific routes that may be set have preference over this generic route. +X ip route add 10.0.0.0/8 via $LOCAL_GW +X ip route add 172.16.0.0/12 via $LOCAL_GW +X ip route add 192.168.0.0/16 via $LOCAL_GW +X fi +} +X +getPublicIp() { +X public_ip=$ETH2_IP +X [ "$ETH2_IP" == "0.0.0.0" ] && public_ip=$ETH1_IP +X echo $public_ip +} +X +setup_ntp() { +X log_it "Setting up NTP" +X NTP_CONF_FILE="/etc/ntp.conf" +X if [ -f $NTP_CONF_FILE ] +X then +X IFS=',' read -a server_list <<< "$NTP_SERVER_LIST" +X for (( iterator=${#server_list[@]}-1 ; iterator>=0 ; iterator-- )) +X do +X server=$(echo ${server_list[iterator]} | tr -d '\r') +X PATTERN="server $server" +X if grep -q "^$PATTERN$" $NTP_CONF_FILE ; then +X sed -i "/^$PATTERN$/d" $NTP_CONF_FILE +X fi +X sed -i "0,/^server/s//$PATTERN\nserver/" $NTP_CONF_FILE +X done +X systemctl enable ntp +X else +X log_it "NTP configuration file not found" +X fi +} +X +routing_svcs() { +X echo "haproxy apache2" > /var/cache/cloud/enabled_svcs +X echo "cloud nfs-common portmap" > /var/cache/cloud/disabled_svcs +X if [ "$RROUTER" -eq "1" ] +X then +X echo "keepalived conntrackd" >> /var/cache/cloud/enabled_svcs +X echo "dnsmasq" >> /var/cache/cloud/disabled_svcs +X else +X echo "dnsmasq" >> /var/cache/cloud/enabled_svcs +X echo "keepalived conntrackd " >> /var/cache/cloud/disabled_svcs +X fi +} +X +parse_cmd_line() { +X CMDLINE=$(cat /var/cache/cloud/cmdline) +X TYPE="unknown" +X BOOTPROTO="static" +X DISABLE_RP_FILTER="false" +X STORAGE_IP="" +X STORAGE_NETMASK="" +X STORAGE_CIDR="" +X VM_PASSWORD="" +X +X CHEF_TMP_FILE=/tmp/cmdline.json +X COMMA="\t" +X echo -e "{\n\"type\": \"cmdline\"," > ${CHEF_TMP_FILE} +X echo -e "\"cmd_line\": {" >> ${CHEF_TMP_FILE} +X +X for i in $CMDLINE +X do +X # search for foo=bar pattern and cut out foo +X KEY=$(echo $i | cut -d= -f1) +X VALUE=$(echo $i | cut -d= -f2) +X echo -en ${COMMA} >> ${CHEF_TMP_FILE} +X # Two lines so values do not accidently interpretted as escapes!! +X echo -n \"${KEY}\"': '\"${VALUE}\" >> ${CHEF_TMP_FILE} +X COMMA=",\n\t" +X case $KEY in +X disable_rp_filter) +X export DISABLE_RP_FILTER=$VALUE +X ;; +X eth0ip) +X export ETH0_IP=$VALUE +X ;; +X eth1ip) +X export ETH1_IP=$VALUE +X ;; +X eth2ip) +X export ETH2_IP=$VALUE +X ;; +X host) +X export MGMT_HOST=$VALUE +X ;; +X gateway) +X export GW=$VALUE +X ;; +X ip6gateway) +X export IP6GW=$VALUE +X ;; +X eth0mask) +X export ETH0_MASK=$VALUE +X ;; +X eth1mask) +X export ETH1_MASK=$VALUE +X ;; +X eth2mask) +X export ETH2_MASK=$VALUE +X ;; +X eth0ip6) +X export ETH0_IP6=$VALUE +X ;; +X eth0ip6prelen) +X export ETH0_IP6_PRELEN=$VALUE +X ;; +X internaldns1) +X export internalNS1=$VALUE +X ;; +X internaldns2) +X export internalNS2=$VALUE +X ;; +X dns1) +X export NS1=$VALUE +X ;; +X dns2) +X export NS2=$VALUE +X ;; +X ip6dns1) +X export IP6_NS1=$VALUE +X ;; +X ip6dns2) +X export IP6_NS2=$VALUE +X ;; +X domain) +X export DOMAIN=$VALUE +X ;; +X dnssearchorder) +X export DNS_SEARCH_ORDER=$VALUE +X ;; +X useextdns) +X export USE_EXTERNAL_DNS=$VALUE +X ;; +X mgmtcidr) +X export MGMTNET=$VALUE +X ;; +X localgw) +X export LOCAL_GW=$VALUE +X ;; +X template) +X export TEMPLATE=$VALUE +X ;; +X sshonguest) +X export SSHONGUEST=$VALUE +X ;; +X name) +X export NAME=$VALUE +X ;; +X dhcprange) +X export DHCP_RANGE=$(echo $VALUE | tr ':' ',') +X ;; +X bootproto) +X export BOOTPROTO=$VALUE +X ;; +X type) +X export TYPE=$VALUE +X ;; +X defaultroute) +X export DEFAULTROUTE=$VALUE +X ;; +X redundant_router) +X export RROUTER=$VALUE +X ;; +X redundant_state) +X export RROUTER_STATE=$VALUE +X ;; +X guestgw) +X export GUEST_GW=$VALUE +X ;; +X guestbrd) +X export GUEST_BRD=$VALUE +X ;; +X guestcidrsize) +X export GUEST_CIDR_SIZE=$VALUE +X ;; +X router_pr) +X export ROUTER_PR=$VALUE +X ;; +X extra_pubnics) +X export EXTRA_PUBNICS=$VALUE +X ;; +X nic_macs) +X export NIC_MACS=$VALUE +X ;; +X mtu) +X export MTU=$VALUE +X ;; +X storageip) +X export STORAGE_IP=$VALUE +X ;; +X storagenetmask) +X export STORAGE_NETMASK=$VALUE +X ;; +X storagecidr) +X export STORAGE_CIDR=$VALUE +X ;; +X vmpassword) +X export VM_PASSWORD=$VALUE +X ;; +X vpccidr) +X export VPCCIDR=$VALUE +X ;; +X cidrsize) +X export CIDR_SIZE=$VALUE +X ;; +X advert_int) +X export ADVERT_INT=$VALUE +X ;; +X ntpserverlist) +X export NTP_SERVER_LIST=$VALUE +X ;; +X esac +X done +X echo -e "\n\t}\n}" >> ${CHEF_TMP_FILE} +X if [ "$TYPE" != "unknown" ] +X then +X mv ${CHEF_TMP_FILE} /var/cache/cloud/cmd_line.json +X fi +X +X [ $ETH0_IP ] && export LOCAL_ADDRS=$ETH0_IP +X [ $ETH0_IP6 ] && export LOCAL_ADDRS=$ETH0_IP6 +X [ $ETH0_IP ] && [ $ETH0_IP6 ] && export LOCAL_ADDRS="$ETH0_IP,$ETH0_IP6" +X +X # Randomize cloud password so only ssh login is allowed +X echo "cloud:`openssl rand -base64 32`" | chpasswd +X +X if [ x"$VM_PASSWORD" != x"" ] +X then +X echo "root:$VM_PASSWORD" | chpasswd +X fi +} +X +parse_cmd_line +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/common.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/common.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/common.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/common.sh': 'MD5 check failed' + ) << \SHAR_EOF +8754c81bacd82458e4ce221b476505ea cloud_scripts/opt/cloud/bin/setup/common.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/common.sh'` -ne 22472 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/common.sh' is not 22472" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +dhcpsrvr_svcs() { +X echo "dnsmasq apache2" > /var/cache/cloud/enabled_svcs +X echo "cloud nfs-common conntrackd keepalived haproxy portmap" > /var/cache/cloud/disabled_svcs +} +X +setup_dhcpsrvr() { +X log_it "Setting up dhcp server system vm" +X setup_common eth0 eth1 +X setup_dnsmasq +X setup_apache2 $ETH0_IP +X +X sed -i /$NAME/d /etc/hosts +X [ $ETH0_IP ] && echo "$ETH0_IP $NAME" >> /etc/hosts +X [ $ETH0_IP6 ] && echo "$ETH0_IP6 $NAME" >> /etc/hosts +X +X enable_irqbalance 0 +X enable_fwding 0 +X +X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 +X +X #Only allow DNS service for current network +X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X +X if [ "$SSHONGUEST" == "true" ] +X then +X setup_sshd $ETH0_IP "eth0" +X else +X setup_sshd $ETH1_IP "eth1" +X fi +} +X +dhcpsrvr_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute dhcpsrvr_svcs" +X exit 1 +fi +setup_dhcpsrvr +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh': 'MD5 check failed' + ) << \SHAR_EOF +08afc46420e5e388ba6be68cfdbd4a59 cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh'` -ne 1985 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' is not 1985" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/cloud-early-config ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/cloud-early-config (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/cloud-early-config (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" +X +# Clear boot up flag, it would be created by rc.local after boot up done +mkdir -p /var/cache/cloud +rm -f /var/cache/cloud/boot_up_done +X +[ -x /sbin/ifup ] || exit 0 +X +X. /lib/lsb/init-functions +X +log_it() { +X echo "$(date) $@" >> /var/log/cloud.log +X log_action_msg "$@" +} +X +patch() { +X local PATCH_MOUNT=/media/cdrom +X local patchfile=$PATCH_MOUNT/cloud-scripts.tgz +X local privkey=$PATCH_MOUNT/authorized_keys +X local md5file=/var/cache/cloud/cloud-scripts-signature +X local cdrom_dev= +X mkdir -p $PATCH_MOUNT +X +X if [ -e /dev/xvdd ]; then +X cdrom_dev=/dev/xvdd +X elif [ -e /dev/cdrom ]; then +X cdrom_dev=/dev/cdrom +X elif [ -e /dev/cdrom1 ]; then +X cdrom_dev=/dev/cdrom1 +X elif [ -e /dev/cdrom2 ]; then +X cdrom_dev=/dev/cdrom2 +X elif [ -e /dev/cdrom3 ]; then +X cdrom_dev=/dev/cdrom3 +X fi +X +X if [ -f /var/cache/cloud/authorized_keys ]; then +X privkey=/var/cache/cloud/authorized_keys +X fi +X +X if [ -n "$cdrom_dev" ]; then +X mount -o ro $cdrom_dev $PATCH_MOUNT +X local oldmd5= +X [ -f ${md5file} ] && oldmd5=$(cat ${md5file}) +X local newmd5= +X [ -f ${patchfile} ] && newmd5=$(md5sum ${patchfile} | awk '{print $1}') +X +X log_it "Scripts checksum detected: oldmd5=$oldmd5 newmd5=$newmd5" +X if [ "$oldmd5" != "$newmd5" ] && [ -f ${patchfile} ] && [ "$newmd5" != "" ] +X then +X tar xzf $patchfile -C / +X echo ${newmd5} > ${md5file} +X log_it "Patched scripts using $patchfile" +X touch /var/cache/cloud/patch.required +X fi +X +X if [ -f $privkey ]; then +X cp -f $privkey /root/.ssh/ +X chmod go-rwx /root/.ssh/authorized_keys +X fi +X fi +X +X return 0 +} +X +start() { +X log_it "Executing cloud-early-config" +X +X # Clear /tmp for file lock +X rm -f /tmp/*.lock +X rm -f /tmp/rrouter_bumped +X rm -f /root/.rnd +X echo "" > /root/.ssh/known_hosts +X +X patch +X sync +X /opt/cloud/bin/setup/bootstrap.sh +X +X log_it "Finished setting up systemvm" +X exit 0 +} +X +start +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/cloud-early-config failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config': 'MD5 check failed' + ) << \SHAR_EOF +c9e5973de3771fd5f5e9b490c60db970 cloud_scripts/opt/cloud/bin/setup/cloud-early-config +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config'` -ne 2765 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' is not 2765" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/default.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/default.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/default.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/default.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/default.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_default() { +X cat > /etc/network/interfaces << EOF +auto lo +iface lo inet loopback +EOF +X cp -f /etc/iptables/rt_tables_init /etc/iproute2/rt_tables +} +X +setup_default +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/default.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/default.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/default.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/default.sh': 'MD5 check failed' + ) << \SHAR_EOF +20e3a01cb77930eba6438de6d9a3f193 cloud_scripts/opt/cloud/bin/setup/default.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/default.sh'` -ne 1002 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/default.sh' is not 1002" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/loadbalancer.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/loadbalancer.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/loadbalancer.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +X +# $Id: loadbalancer.sh 9947 2010-06-25 19:34:24Z manuel $ $HeadURL: svn://svn.lab.vmops.com/repos/vmdev/java/patches/xenserver/root/loadbalancer.sh $ +# loadbalancer.sh -- reconfigure loadbalancer rules +# @VERSION@ +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s: -i -a -d -f -s \n" $(basename $0) >&2 +} +X +# set -x +X +# ensure that the nic has the public ip we are load balancing on +ip_entry() { +X local added=$1 +X local removed=$2 +X +X if [ "$added" == "none" ] +X then +X added="" +X fi +X +X if [ "$removed" == "none" ] +X then +X removed="" +X fi +X +X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") +X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") +X +X for i in $a +X do +X local pubIp=$(echo $i | cut -d: -f1) +X logger -t cloud "Adding public ip $pubIp for load balancing" +X for vif in $VIF_LIST; do +X sudo ip addr add dev $vif $pubIp/32 +X #ignore error since it is because the ip is already there +X done +X done +X +X for i in $r +X do +X logger -t cloud "Removing public ips for deleted loadbalancers" +X local pubIp=$(echo $i | cut -d: -f1) +X logger -t cloud "Removing public ip $pubIp for deleted loadbalancers" +X for vif in $VIF_LIST; do +X sudo ip addr del $pubIp/32 dev $vif +X done +X done +X +X return 0 +} +get_lb_vif_list() { +# add eth0 to the VIF_LIST if it is not there, this allows guest VMs to use the LB service. +X local lb_list="$VIF_LIST eth0"; +X lb_list=$(echo $lb_list | tr " " "\n" | sort | uniq | tr "\n" " ") +X echo $lb_list +} +fw_remove_backup() { +X local lb_vif_list=$(get_lb_vif_list) +X for vif in $lb_vif_list; do +X sudo iptables -F back_load_balancer_$vif 2> /dev/null +X sudo iptables -D INPUT -i $vif -p tcp -j back_load_balancer_$vif 2> /dev/null +X sudo iptables -X back_load_balancer_$vif 2> /dev/null +X done +X sudo iptables -F back_lb_stats 2> /dev/null +X sudo iptables -D INPUT -p tcp -j back_lb_stats 2> /dev/null +X sudo iptables -X back_lb_stats 2> /dev/null +} +fw_restore() { +X local lb_vif_list=$(get_lb_vif_list) +X for vif in $lb_vif_list; do +X sudo iptables -F load_balancer_$vif 2> /dev/null +X sudo iptables -D INPUT -i $vif -p tcp -j load_balancer_$vif 2> /dev/null +X sudo iptables -X load_balancer_$vif 2> /dev/null +X sudo iptables -E back_load_balancer_$vif load_balancer_$vif 2> /dev/null +X done +X sudo iptables -F lb_stats 2> /dev/null +X sudo iptables -D INPUT -p tcp -j lb_stats 2> /dev/null +X sudo iptables -X lb_stats 2> /dev/null +X sudo iptables -E back_lb_stats lb_stats 2> /dev/null +} +# firewall entry to ensure that haproxy can receive on specified port +fw_entry() { +X local added=$1 +X local removed=$2 +X local stats=$3 +X +X if [ "$added" == "none" ] +X then +X added="" +X fi +X +X if [ "$removed" == "none" ] +X then +X removed="" +X fi +X +X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") +X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") +X +# back up the iptable rules by renaming before creating new. +X local lb_vif_list=$(get_lb_vif_list) +X for vif in $lb_vif_list; do +X sudo iptables -E load_balancer_$vif back_load_balancer_$vif 2> /dev/null +X sudo iptables -N load_balancer_$vif 2> /dev/null +X sudo iptables -A INPUT -i $vif -p tcp -j load_balancer_$vif +X done +X sudo iptables -E lb_stats back_lb_stats 2> /dev/null +X sudo iptables -N lb_stats 2> /dev/null +X sudo iptables -A INPUT -p tcp -j lb_stats +X +X for i in $a +X do +X local pubIp=$(echo $i | cut -d: -f1) +X local dport=$(echo $i | cut -d: -f2) +X local lb_vif_list=$(get_lb_vif_list) +X for vif in $lb_vif_list; do +X +#TODO : The below delete will be used only when we upgrade the from older verion to the newer one , the below delete become obsolute in the future. +X sudo iptables -D INPUT -i $vif -p tcp -d $pubIp --dport $dport -j ACCEPT 2> /dev/null +X +X sudo iptables -A load_balancer_$vif -p tcp -d $pubIp --dport $dport -j ACCEPT +X +X if [ $? -gt 0 ] +X then +X return 1 +X fi +X done +X done +X local pubIp=$(echo $stats | cut -d: -f1) +X local dport=$(echo $stats | cut -d: -f2) +X local cidrs=$(echo $stats | cut -d: -f3 | sed 's/-/,/') +X sudo iptables -A lb_stats -s $cidrs -p tcp -m state --state NEW -d $pubIp --dport $dport -j ACCEPT +X +X +#TODO : The below delete in the for-loop will be used only when we upgrade the from older verion to the newer one , the below delete become obsolute in the future. +X for i in $r +X do +X local pubIp=$(echo $i | cut -d: -f1) +X local dport=$(echo $i | cut -d: -f2) +X +X for vif in $VIF_LIST; do +X sudo iptables -D INPUT -i $vif -p tcp -d $pubIp --dport $dport -j ACCEPT 2> /dev/null +X done +X done +X +X return 0 +} +X +#Hot reconfigure HA Proxy in the routing domain +reconfig_lb() { +X logger -t cloud "Reconfiguring loadbalancer using $1" +X /root/reconfigLB.sh $1 +X return $? +} +X +# Restore the HA Proxy to its previous state, and revert iptables rules on DomR +restore_lb() { +X logger -t cloud "Restoring HA Proxy to previous state" +X # Copy the old version of haproxy.cfg into the file that reconfigLB.sh uses +X cp /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg.new +X +X if [ $? -eq 0 ] +X then +X # Run reconfigLB.sh again +X /root/reconfigLB.sh /etc/haproxy/haproxy.cfg.new +X fi +} +X +get_vif_list() { +X local vif_list="" +X for i in /sys/class/net/eth*; do +X vif=$(basename $i); +X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] +X then +X vif_list="$vif_list $vif"; +X fi +X done +X if [ "$vif_list" == "" ] +X then +X vif_list="eth0" +X fi +X +X logger -t cloud "Loadbalancer public interfaces = $vif_list" +X echo $vif_list +} +X +mflag= +iflag= +aflag= +dflag= +fflag= +sflag= +X +while getopts 'i:a:d:f:s:' OPTION +do +X case $OPTION in +X i) iflag=1 +X domRIp="$OPTARG" +X ;; +X a) aflag=1 +X addedIps="$OPTARG" +X ;; +X d) dflag=1 +X removedIps="$OPTARG" +X ;; +X f) fflag=1 +X cfgfile="$OPTARG" +X ;; +X s) sflag=1 +X statsIp="$OPTARG" +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [ "$addedIps" == "" ] +then +X addedIps="none" +fi +X +X +if [ "$removedIps" == "" ] +then +X removedIps="none" +fi +X +VIF_LIST=$(get_vif_list) +X +X +if [ "$addedIps" == "" ] +then +X addedIps="none" +fi +X +if [ "$removedIps" == "" ] +then +X removedIps="none" +fi +X +#FIXME: make this explicit via check on vm type or passed in flag +if [ "$VIF_LIST" == "eth0" ] +then +X ip_entry $addedIps $removedIps +fi +X +# hot reconfigure haproxy +reconfig_lb $cfgfile +X +if [ $? -gt 0 ] +then +X logger -t cloud "Reconfiguring loadbalancer failed" +X #FIXME: make this explicit via check on vm type or passed in flag +X if [ "$VIF_LIST" == "eth0" ] +X then +X ip_entry $removedIps $addedIps +X fi +X unlock_exit 1 $lock $locked +fi +X +# iptables entry to ensure that haproxy receives traffic +fw_entry $addedIps $removedIps $statsIp +X +if [ $? -gt 0 ] +then +X logger -t cloud "Failed to apply firewall rules for load balancing, reverting HA Proxy config" +X # Restore the LB +X restore_lb +X +X logger -t cloud "Reverting firewall config" +X # Revert iptables rules on DomR +X fw_restore +X +X #FIXME: make this explicit via check on vm type or passed in flag +X if [ "$VIF_LIST" == "eth0" ] +X then +X logger -t cloud "Reverting ip address changes to eth0" +X ip_entry $removedIps $addedIps +X fi +X +X unlock_exit 1 $lock $locked +else +X # Remove backedup iptable rules +X fw_remove_backup +fi +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/loadbalancer.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/loadbalancer.sh': 'MD5 check failed' + ) << \SHAR_EOF +6da53e4d9dd0b11f6fa334c6f583f8cd cloud_scripts/opt/cloud/bin/loadbalancer.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/loadbalancer.sh'` -ne 8234 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' is not 8234" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/baremetal_snat.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/baremetal_snat.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/baremetal_snat.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' && +#!/bin/bash +X +#Licensed to the Apache Software Foundation (ASF) under one +#or more contributor license agreements. See the NOTICE file +#distributed with this work for additional information +#regarding copyright ownership. The ASF licenses this file +#to you under the Apache License, Version 2.0 (the +#"License"); you may not use this file except in compliance +#with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +#Unless required by applicable law or agreed to in writing, +#software distributed under the License is distributed on an +#"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +#KIND, either express or implied. See the License for the +#specific language governing permissions and limitations +#under the License. +X +set +u +X +mgmt_nic_ip=$1 +internal_server_ip=$2 +gateway_ip=$3 +X +ip route | grep "$internal_server_ip" > /dev/null +X +if [ $? -ne 0 ]; then +X ip route add $internal_server_ip via $gateway_ip +fi +X +iptables-save | grep -- "-A POSTROUTING -d $internal_server_ip" > /dev/null +X +if [ $? -ne 0 ]; then +X iptables -t nat -A POSTROUTING -d $internal_server_ip -j SNAT --to-source $mgmt_nic_ip +fi +X +X +iptables-save | grep -- "-A INPUT -i eth0 -p udp -m udp --dport 69 -j ACCEPT" > /dev/null +if [ $? -ne 0 ]; then +X iptables -I INPUT -i eth0 -p udp -m udp --dport 69 -j ACCEPT +fi +X +iptables-save | grep -- "-A FORWARD -i eth1 -o eth0 -j ACCEPT" > /dev/null +if [ $? -ne 0 ]; then +X iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT +fi +X +rule="-A FORWARD -d $internal_server_ip/32 -i eth0 -o eth1 -j ACCEPT" +iptables-save | grep -- "$rule" > /dev/null +if [ $? -ne 0 ]; then +X iptables -I FORWARD -d $internal_server_ip/32 -i eth0 -o eth1 -j ACCEPT +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/baremetal_snat.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh': 'MD5 check failed' + ) << \SHAR_EOF +acab3e2b25ee898e7dd05c4e77b15569 cloud_scripts/opt/cloud/bin/baremetal_snat.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh'` -ne 1717 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' is not 1717" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_vpnusers.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vpnusers.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vpnusers.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import copy +X +X +def merge(dbag, data): +X dbagc = copy.deepcopy(dbag) +X +X print dbag +X print data +X if "vpn_users" not in data: +X return dbagc +X +X # remove previously deleted user from the dict +X for user in dbagc.keys(): +X if user == 'id': +X continue +X userrec = dbagc[user] +X add = userrec['add'] +X if not add: +X del(dbagc[user]) +X +X for user in data['vpn_users']: +X username = user['user'] +X add = user['add'] +X if username not in dbagc.keys(): +X dbagc[username] = user +X elif username in dbagc.keys() and not add: +X dbagc[username] = user +X +X return dbagc +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_vpnusers.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py': 'MD5 check failed' + ) << \SHAR_EOF +d54ff81fd9901ecc0bfbe9528343e238 cloud_scripts/opt/cloud/bin/cs_vpnusers.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py'` -ne 1469 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' is not 1469" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/merge.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/merge.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/merge.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/merge.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/merge.py' && +#!/usr/bin/python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import json +import os +import uuid +import logging +import gzip +import shutil +import cs_ip +import cs_guestnetwork +import cs_cmdline +import cs_vmp +import cs_network_acl +import cs_firewallrules +import cs_loadbalancer +import cs_monitorservice +import cs_vmdata +import cs_dhcp +import cs_forwardingrules +import cs_site2sitevpn +import cs_remoteaccessvpn +import cs_vpnusers +import cs_staticroutes +X +X +class DataBag: +X +X DPATH = "/etc/cloudstack" +X +X def __init__(self): +X self.bdata = {} +X +X def load(self): +X data = self.bdata +X if not os.path.exists(self.DPATH): +X os.makedirs(self.DPATH) +X self.fpath = os.path.join(self.DPATH, self.key + '.json') +X +X try: +X with open(self.fpath, 'r') as _fh: +X logging.debug("Loading data bag type %s", self.key) +X data = json.load(_fh) +X except (IOError, ValueError): +X logging.debug("Caught load error, creating empty data bag type %s", self.key) +X data.update({"id": self.key}) +X finally: +X self.dbag = data +X +X def save(self, dbag): +X try: +X with open(self.fpath, 'w') as _fh: +X logging.debug("Writing data bag type %s", self.key) +X json.dump( +X dbag, _fh, +X sort_keys=True, +X indent=2 +X ) +X except IOError: +X logging.error("Could not write data bag %s", self.key) +X +X def getDataBag(self): +X return self.dbag +X +X def setKey(self, key): +X self.key = key +X +X +class updateDataBag: +X +X DPATH = "/etc/cloudstack" +X +X def __init__(self, qFile): +X self.qFile = qFile +X self.fpath = '' +X self.bdata = {} +X self.process() +X +X def process(self): +X self.db = DataBag() +X if (self.qFile.type == "staticnatrules" or self.qFile.type == "forwardrules"): +X self.db.setKey("forwardingrules") +X else: +X self.db.setKey(self.qFile.type) +X dbag = self.db.load() +X logging.info("Command of type %s received", self.qFile.type) +X +X if self.qFile.type == 'ips': +X dbag = self.processIP(self.db.getDataBag()) +X elif self.qFile.type == 'guestnetwork': +X dbag = self.processGuestNetwork(self.db.getDataBag()) +X elif self.qFile.type == 'cmdline': +X dbag = self.processCL(self.db.getDataBag()) +X elif self.qFile.type == 'vmpassword': +X dbag = self.processVMpassword(self.db.getDataBag()) +X elif self.qFile.type == 'networkacl': +X dbag = self.process_network_acl(self.db.getDataBag()) +X elif self.qFile.type == 'firewallrules': +X dbag = self.process_firewallrules(self.db.getDataBag()) +X elif self.qFile.type == 'loadbalancer': +X dbag = self.process_loadbalancer(self.db.getDataBag()) +X elif self.qFile.type == 'monitorservice': +X dbag = self.process_monitorservice(self.db.getDataBag()) +X elif self.qFile.type == 'vmdata': +X dbag = self.processVmData(self.db.getDataBag()) +X elif self.qFile.type == 'dhcpentry': +X dbag = self.process_dhcp_entry(self.db.getDataBag()) +X elif self.qFile.type == 'staticnatrules' or self.qFile.type == 'forwardrules': +X dbag = self.processForwardingRules(self.db.getDataBag()) +X elif self.qFile.type == 'site2sitevpn': +X dbag = self.process_site2sitevpn(self.db.getDataBag()) +X elif self.qFile.type == 'remoteaccessvpn': +X dbag = self.process_remoteaccessvpn(self.db.getDataBag()) +X elif self.qFile.type == 'vpnuserlist': +X dbag = self.process_vpnusers(self.db.getDataBag()) +X elif self.qFile.type == 'staticroutes': +X dbag = self.process_staticroutes(self.db.getDataBag()) +X elif self.qFile.type == 'ipaliases': +X self.db.setKey('ips') +X self.db.load() +X dbag = self.process_ipaliases(self.db.getDataBag()) +X elif self.qFile.type == 'dhcpconfig': +X logging.error("I don't think I need %s anymore", self.qFile.type) +X return +X else: +X logging.error("Error I do not know what to do with file of type %s", self.qFile.type) +X return +X self.db.save(dbag) +X +X def processGuestNetwork(self, dbag): +X d = self.qFile.data +X dp = {} +X dp['public_ip'] = d['router_guest_ip'] +X dp['netmask'] = d['router_guest_netmask'] +X dp['source_nat'] = False +X dp['add'] = d['add'] +X dp['one_to_one_nat'] = False +X dp['gateway'] = d['router_guest_gateway'] +X dp['nic_dev_id'] = d['device'][3:] +X dp['nw_type'] = 'guest' +X dp = PrivateGatewayHack.update_network_type_for_privategateway(dbag, dp) +X qf = QueueFile() +X qf.load({'ip_address': [dp], 'type': 'ips'}) +X if 'domain_name' not in d.keys() or d['domain_name'] == '': +X d['domain_name'] = "cloudnine.internal" +X +X d = PrivateGatewayHack.update_network_type_for_privategateway(dbag, d) +X return cs_guestnetwork.merge(dbag, d) +X +X def process_dhcp_entry(self, dbag): +X return cs_dhcp.merge(dbag, self.qFile.data) +X +X def process_site2sitevpn(self, dbag): +X return cs_site2sitevpn.merge(dbag, self.qFile.data) +X +X def process_remoteaccessvpn(self, dbag): +X return cs_remoteaccessvpn.merge(dbag, self.qFile.data) +X +X def process_vpnusers(self, dbag): +X return cs_vpnusers.merge(dbag, self.qFile.data) +X +X def process_network_acl(self, dbag): +X return cs_network_acl.merge(dbag, self.qFile.data) +X +X def process_firewallrules(self, dbag): +X return cs_firewallrules.merge(dbag, self.qFile.data) +X +X def process_loadbalancer(self, dbag): +X return cs_loadbalancer.merge(dbag, self.qFile.data) +X +X def process_monitorservice(self, dbag): +X return cs_monitorservice.merge(dbag, self.qFile.data) +X +X def process_staticroutes(self, dbag): +X return cs_staticroutes.merge(dbag, self.qFile.data) +X +X def processVMpassword(self, dbag): +X return cs_vmp.merge(dbag, self.qFile.data) +X +X def processForwardingRules(self, dbag): +X # to be used by both staticnat and portforwarding +X return cs_forwardingrules.merge(dbag, self.qFile.data) +X +X def processIP(self, dbag): +X for ip in self.qFile.data["ip_address"]: +X dbag = cs_ip.merge(dbag, ip) +X return dbag +X +X def processCL(self, dbag): +X # Convert the ip stuff to an ip object and pass that into cs_ip_merge +X # "eth0ip": "192.168.56.32", +X # "eth0mask": "255.255.255.0", +X self.newData = [] +X if (self.qFile.data['cmd_line']['type'] == "router"): +X self.processCLItem('0', "guest") +X self.processCLItem('1', "control") +X self.processCLItem('2', "public") +X elif (self.qFile.data['cmd_line']['type'] == "vpcrouter"): +X self.processCLItem('0', "control") +X elif (self.qFile.data['cmd_line']['type'] == "dhcpsrvr"): +X self.processCLItem('0', "guest") +X self.processCLItem('1', "control") +X elif (self.qFile.data['cmd_line']['type'] == "ilbvm"): +X self.processCLItem('0', "guest") +X self.processCLItem('1', "control") +X +X return cs_cmdline.merge(dbag, self.qFile.data) +X +X def processCLItem(self, num, nw_type): +X key = 'eth' + num + 'ip' +X dp = {} +X if(key in self.qFile.data['cmd_line']): +X dp['public_ip'] = self.qFile.data['cmd_line'][key] +X dp['netmask'] = self.qFile.data['cmd_line']['eth' + num + 'mask'] +X dp['source_nat'] = False +X dp['add'] = True +X dp['one_to_one_nat'] = False +X if nw_type == "public": +X dp['gateway'] = self.qFile.data['cmd_line']['gateway'] +X else: +X if('localgw' in self.qFile.data['cmd_line']): +X dp['gateway'] = self.qFile.data['cmd_line']['localgw'] +X else: +X dp['gateway'] = '' +X dp['nic_dev_id'] = num +X dp['nw_type'] = nw_type +X qf = QueueFile() +X qf.load({'ip_address': [dp], 'type': 'ips'}) +X +X def processVmData(self, dbag): +X cs_vmdata.merge(dbag, self.qFile.data) +X return dbag +X +X def process_ipaliases(self, dbag): +X nic_dev = None +X # Should be a way to deal with this better +X for intf, data in dbag.items(): +X if intf == 'id': +X continue +X elif any([net['nw_type'] == 'guest' for net in data]): +X nic_dev = intf +X break +X +X assert nic_dev is not None, 'Unable to determine Guest interface' +X +X nic_dev_id = nic_dev[3:] +X +X for alias in self.qFile.data['aliases']: +X ip = { +X 'add': not alias['revoke'], +X 'nw_type': 'guest', +X 'public_ip': alias['ip_address'], +X 'netmask': alias['netmask'], +X 'nic_dev_id': nic_dev_id +X } +X dbag = cs_ip.merge(dbag, ip) +X return dbag +X +X +class QueueFile: +X +X fileName = '' +X configCache = "/var/cache/cloud" +X keep = True +X data = {} +X +X def load(self, data): +X if data is not None: +X self.data = data +X self.type = self.data["type"] +X updateDataBag(self) +X return +X filename = '{cache_location}/{json_file}'.format(cache_location=self.configCache, json_file=self.fileName) +X try: +X handle = open(filename) +X except IOError as exception: +X error_message = ("Exception occurred with the following exception error '{error}'. Could not open '{filename}'. " +X "It seems that the file has already been moved.".format(error=exception, filename=filename)) +X logging.error(error_message) +X else: +X logging.info("Continuing with the processing of file '{filename}'".format(filename=filename)) +X +X self.data = json.load(handle) +X self.type = self.data["type"] +X handle.close() +X if self.keep: +X self.__moveFile(filename, self.configCache + "/processed") +X else: +X logging.debug("Processed file deleted: %s and not kept in /processed", filename) +X os.remove(filename) +X updateDataBag(self) +X +X def setFile(self, name): +X self.fileName = name +X +X def getType(self): +X return self.type +X +X def getData(self): +X return self.data +X +X def setPath(self, path): +X self.configCache = path +X +X def __moveFile(self, origPath, path): +X if not os.path.exists(path): +X os.makedirs(path) +X originalName = os.path.basename(origPath) +X if originalName.count(".") == 1: +X originalName += "." + str(uuid.uuid4()) +X zipped_file_name = path + "/" + originalName + ".gz" +X with open(origPath, 'rb') as f_in, gzip.open(zipped_file_name, 'wb') as f_out: +X shutil.copyfileobj(f_in, f_out) +X os.remove(origPath) +X +X logging.debug("Processed file written to %s", zipped_file_name) +X +X +class PrivateGatewayHack: +X +X @classmethod +X def update_network_type_for_privategateway(cls, dbag, data): +X ip = data['router_guest_ip'] if 'router_guest_ip' in data.keys() else data['public_ip'] +X +X initial_data = cls.load_inital_data() +X has_private_gw_ip = cls.if_config_has_privategateway(initial_data) +X private_gw_matches = 'privategateway' in initial_data['config'] and cls.ip_matches_private_gateway_ip(ip, initial_data['config']['privategateway']) +X +X if has_private_gw_ip and private_gw_matches: +X data['nw_type'] = "public" +X logging.debug("Updating nw_type for ip %s" % ip) +X else: +X logging.debug("Not updating nw_type for ip %s because has_private_gw_ip = %s and private_gw_matches = %s " % (ip, has_private_gw_ip, private_gw_matches)) +X return data +X +X @classmethod +X def if_config_has_privategateway(cls, dbag): +X return 'privategateway' in dbag['config'].keys() and dbag['config']['privategateway'] != "None" +X +X @classmethod +X def ip_matches_private_gateway_ip(cls, ip, private_gateway_ip): +X new_ip_matches_private_gateway_ip = False +X if ip == private_gateway_ip: +X new_ip_matches_private_gateway_ip = True +X return new_ip_matches_private_gateway_ip +X +X @classmethod +X def load_inital_data(cls): +X initial_data_bag = DataBag() +X initial_data_bag.setKey('cmdline') +X initial_data_bag.load() +X initial_data = initial_data_bag.getDataBag() +X logging.debug("Initial data = %s" % initial_data) +X +X return initial_data +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/merge.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/merge.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/merge.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/merge.py': 'MD5 check failed' + ) << \SHAR_EOF +dc7c85d58b4e5f38ae61c82679523884 cloud_scripts/opt/cloud/bin/merge.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/merge.py'` -ne 13492 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/merge.py' is not 13492" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/master.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/master.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/master.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/master.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/master.py +M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2!&875L="(I"BAO<'1I +M;VYS+"!A/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/master.py': 'MD5 check failed' + ) << \SHAR_EOF +602ac6725c182da5ffa17760b2fe3ba5 cloud_scripts/opt/cloud/bin/master.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/master.py'` -ne 2040 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/master.py' is not 2040" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/set_redundant.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/set_redundant.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/set_redundant.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/set_redundant.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/set_redundant.py +M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/set_redundant.py': 'MD5 check failed' + ) << \SHAR_EOF +648b240f11d938ebd185d0e2a75004b8 cloud_scripts/opt/cloud/bin/set_redundant.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/set_redundant.py'` -ne 1663 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/set_redundant.py' is not 1663" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/checks2svpn.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checks2svpn.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/checks2svpn.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +if [ -z $1 ] +then +X echo "Fail to find VPN peer address!" +X exit 1 +fi +X +ipsec status vpn-$1 > /tmp/vpn-$1.status +X +cat /tmp/vpn-$1.status | grep "ESTABLISHED" > /dev/null +ipsecok=$? +if [ $ipsecok -ne 0 ] +then +X echo -n "IPsec SA not found;" +X echo "Site-to-site VPN have not connected" +X exit 11 +fi +echo -n "IPsec SA found;" +echo "Site-to-site VPN have connected" +Xexit 0 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/checks2svpn.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checks2svpn.sh': 'MD5 check failed' + ) << \SHAR_EOF +8aed94140f491ae027b3b55e9b1535bb cloud_scripts/opt/cloud/bin/checks2svpn.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checks2svpn.sh'` -ne 1178 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' is not 1178" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, vpn): +X key = vpn['vpn_server_ip'] +X op = vpn['create'] +X if key in dbag.keys() and not op: +X del(dbag[key]) +X else: +X dbag[key] = vpn +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py': 'MD5 check failed' + ) << \SHAR_EOF +9945565c7eb92c9fd9aa85648f8c4352 cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py'` -ne 994 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' is not 994" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_staticroutes.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_staticroutes.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_staticroutes.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, staticroutes): +X for route in staticroutes['routes']: +X key = route['network'] +X dbag[key] = route +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_staticroutes.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py': 'MD5 check failed' + ) << \SHAR_EOF +c89832deefffed1dcc12b367d9f9062e cloud_scripts/opt/cloud/bin/cs_staticroutes.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py'` -ne 952 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' is not 952" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, vpn): +X key = vpn['peer_gateway_ip'] +X op = vpn['create'] +X if key in dbag.keys() and not op: +X del(dbag[key]) +X else: +X dbag[key] = vpn +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py': 'MD5 check failed' + ) << \SHAR_EOF +37138a9d2b00c0cd0488f03f0b1e1c34 cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py'` -ne 996 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' is not 996" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/passwd_server_ip.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/passwd_server_ip.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/passwd_server_ip.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/passwd_server_ip.py +M(R$O=7-R+V)I;B]E;G8@<'ET:&]N"B,@3&EC96YS960@=&\@=&AE($%P86-H +M92!3;V9T=V%R92!&;W5N9&%T:6]N("A!4T8I('5N9&5R(&]N90HC(&]R(&UO +M2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N5]P87-S=V]R9"<@/')O=71E$EN(",L +M($9O2AO3H*("`@("`@("!W:71H(&9I;&4H9V5T4&%S +M&-E<'0@24]%3H* +M("`@("`@("`@("`@=VET:"!F:6QE*&=E=%!A&-E +M<'0@24]%"<*("`@(&1E9B!D;U]'150H5]P87-S=V]R9"7!E(#T]("=S879E9%]P87-S=V]R9"7-L;VR=215%515-47TU%5$A/1"7!E)UTL"B`@("`@("`@("`@("`@ +M("`@("`@?2D*("`@("`@("!S96QF+G-E;F1?7-L;V6EN9R!T;R!S879E('!A7-L;V6EN9R!T;R!S879E('!A7-L +M;V7-L;V7-L;V7,N87)G=BD@/B`Q +M.@H@("`@("`@(&%D9')E7-L +M;V6)O87)D26YT97)R +M=7!T.@H@("`@("`@('-Y7-L;V&-E<'0@17AC97!T:6]N+"!E.@H@("`@("`@('-Y7-L;V&-E<'1I;VX@)7,@+2T@ +M9&EE9"<@)2!E*0H@("`@("`@('!A/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py': 'MD5 check failed' + ) << \SHAR_EOF +1d63c1d8b2e5a6a48d48d76228964aee cloud_scripts/opt/cloud/bin/passwd_server_ip.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py'` -ne 7020 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py' is not 7020" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_network_acl.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_network_acl.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_network_acl.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_network_acl.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_network_acl.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_network_acl.py': 'MD5 check failed' + ) << \SHAR_EOF +79760ec4739cb68a9a8bf86319a2dd65 cloud_scripts/opt/cloud/bin/cs_network_acl.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_network_acl.py'` -ne 881 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_network_acl.py' is not 881" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cleanup.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cleanup.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cleanup.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cleanup.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cleanup.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +#rm -rf $@ && echo $? +X +zip_file=$1 +if [ -e "$zip_file" ]; +then +X rm -rf "$zip_file" +X echo "Deleting diagnostics zip file $zip_file" +else +X echo "File $zip_file not found in vm " +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cleanup.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cleanup.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cleanup.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cleanup.sh': 'MD5 check failed' + ) << \SHAR_EOF +63ca1758ffda6344d2622a21f5fc15b9 cloud_scripts/opt/cloud/bin/cleanup.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cleanup.sh'` -ne 986 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cleanup.sh' is not 986" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_loadbalancer.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_loadbalancer.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_loadbalancer.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import copy +X +X +def merge(dbag, data): +X """ Simply overwrite the existsing bag as, the whole configuration is sent every time """ +X if "rules" not in data: +X return dbag +X dbag['config'] = data['rules'] +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_loadbalancer.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py': 'MD5 check failed' + ) << \SHAR_EOF +667380d51eaa9aade2317d66a11529aa cloud_scripts/opt/cloud/bin/cs_loadbalancer.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py'` -ne 1016 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' is not 1016" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpc_func.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_func.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_func.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_func.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_func.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# @VERSION@ +X +getEthByIp (){ +X local ip=$1 +X for dev in `ls -1 /sys/class/net | grep eth` +X do +X sudo ip addr show dev $dev | grep $ip\/ > /dev/null +X if [ $? -eq 0 ] +X then +X echo $dev +X return 0 +X fi +X done +X return 1 +} +X +getVPCcidr () { +X CMDLINE=$(cat /var/cache/cloud/cmdline) +X for i in $CMDLINE +X do +X # search for foo=bar pattern and cut out foo +X KEY=$(echo $i | cut -d= -f1) +X VALUE=$(echo $i | cut -d= -f2) +X if [ "$KEY" == "vpccidr" ] +X then +X echo "$VALUE" +X return 0 +X fi +X done +X return 1 +} +X +removeRulesForIp() { +X local ip=$1 +X iptables-save -t mangle | grep $ip | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t mangle $rule +X done +X iptables-save -t nat | grep $ip | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t nat $rule +X done +X iptables-save -t filter | grep $ip | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t filter $rule +X done +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_func.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_func.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_func.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_func.sh': 'MD5 check failed' + ) << \SHAR_EOF +bc1b0432818cc40ea79df6720e16ecad cloud_scripts/opt/cloud/bin/vpc_func.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_func.sh'` -ne 1849 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_func.sh' is not 1849" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsDhcp.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsDhcp.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N'0B"D1(0U!?3U!44R`]("(O971C+V1H8W!O<'1S +M+G1X="(*0TQ/541?0T].1B`]("(O971C+V1N"`](#`*("`@("`@("!L:7-T96Y?861D0H@("`@("`@("`@("!G871E=V%Y(#T@ +M)R<*("`@("`@("`@("`@:68@2`](&E;)V=A=&5W +M87DG70H@("`@("`@("`@("!S;&EN92`](")D:&-P+7)A;F=E/7-E=#II;G1E +M"P@9V%T97=A>2D*("`@("`@("`@("`@96QS93H*("`@ +M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UR86YG93US970Z:6YT97)F86-E +M+25S+25S+"5S+'-T871I8R(@)2`H9&5V:6-E+"!I9'@L(&EP*0H@("`@("`@ +M("`@("!S96QF+F-O;F8N"D*("`@("`@("`@("`@;&EN92`](")D:&-P+6]P +M=&EO;CUT86"P@9VXN9V5T7V1O;6%I;B@I*0H@("`@("`@("`@("!S96QF+F-O;F8N"!F;W(@>"!I;B!G;BYG971?9&YS*"D@:68@>%T*("`@ +M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C +M92TE"P@)RPG+FIO:6XH9&YS7VQI +M2`A/2`G,"XP+C`N,""D*("`@("`@("`@("`@("`@ +M(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C92TE"P@9V%T97=A>2D*("`@("`@("`@("`@("`@('-E +M;&8N8V]N9BYS96%R8V@H"P@;F5T;6%S:RD*("`@("`@("`@("`@"`K/2`Q"@H@("`@("`@(",@ +M3&ES=&5N($%D9')E3H*("`@ +M("`@("`@("`@;&]G9VEN9RYI;F9O*")!='1E;7!T:6YG('1O(&1E;&5T92!E +M;G1R:65S(&9R;VT@9&YS;6%S<2YL96%S97,@9FEL92!F;W(@5DUS('=H:6-H +M(&%R92!N;W0@;VX@9&AC<&AOW!R:6YT("0S?22DZ"B`@("`@("`@5LG:7!V-%]A +M9&1R97-S)UTL(&5N=')Y6R=H;W-T7VYA;64G72D*("`@("`@("`C($QE87-E +M('1I;64@'!U;F=E9"P@:71S(&%C=&EV +M92!L96%S92!A;F0@1$A#4"]$3E,@8V]N9FEG(&ES('!R;W!E2!I2!R=6YN:6YG(&EN('!R;V1U8W1I;VYS +M('-Y5LG:7!V-%]A9&1R +M97-S)UTL"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@ +M("`@("`@("`@("`@("!E;G1R>5LG:&]S=%]N86UE)UTL"B`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!L96%S +M92DI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L)7,B("4@ +M*'1A9RP@,RDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L +M)7,B("4@*'1A9RP@-BDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D +M9"@B)7,L)7,B("4@*'1A9RP@,34I*0H*("`@("`@("!I(#T@25!!9&1R97-S +M*&5N=')Y6R=I<'8T7V%D9')E2==(#T@96YT2=="@H@("`@9&5F(&%D9%]H;W-T*'-E;&8L(&EP+"!H;W-T +M/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py': 'MD5 check failed' + ) << \SHAR_EOF +bcf1831b38d86bf041523540fa8f821e cloud_scripts/opt/cloud/bin/cs/CsDhcp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py'` -ne 8809 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' is not 8809" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsRedundant.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsRedundant.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N7,N2`](%1R=64*"B`@ +M("`@("`@:68@;F]T(&ES1&5V:6-E4F5A9'DZ"B`@("`@("`@("`@(&QO9V=I +M;F5]I9E]N965D960H"B`@("`@("`@("`@("(E&5C("1$045-3TX@+2T@+2UVR(L(")](BP@6PH@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("`@("(@("`@("`@(&%U=&A?='EP92!!2"!< +M;B(L("(@("`@("`@(&%U=&A?<&%S2AC;VYN=')A8VMD7W1E;7!L871E7V-O;F8L(&-O;FYT0H@("`@("`@("(B(@H@("`@("`@(&ET97)A=&EO;G,@ +M/2`Q,`H@("`@("`@('1I;65?8F5T=V5E;B`](#$*"B`@("`@("`@9F]R(&ET +M97(@:6X@3H* +M("`@("`@("`@("`@("`@(',@/2!S;V-K970N2!R=6YN:6YG("@E9#HE2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I<"@I*2YS=&]P*"D* +M"B`@("`@("`@0W-(96QP97(N2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@ +M("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")!9&1I;F<@9V%T97=A>2`]/3X@ +M)7,@=&\@9&5V:6-E(#T]/B`E2P@9&5V*2D*("`@("`@ +M("`@("`@("`@("`@("!I9B!D978@/3T@0W-(96QP97(N4%5"3$E#7TE.5$52 +M1D%#15-;&5C +M=71E*"(E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I +M<"@I*2YR97-T87)T*"D*"B`@("`@("`@0W-(96QP97(N2D*"B`@("`@("`@("`@(",@5&AE(&9I +M2!I;G1E2!V'1E2!E=F5R(&)E(&]N92!A9&1R97-S(&EN +M(&$@5E!#('1H97)E(&-A;B!B92!M86YY"B`@("`@("`@5&AE(&YE=R!C;V1E +M(&%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py': 'MD5 check failed' + ) << \SHAR_EOF +6936e38f53736f7c5a04b255800a242d cloud_scripts/opt/cloud/bin/cs/CsRedundant.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py'` -ne 16789 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' is not 16789" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsHelper.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsHelper.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsHelper.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsHelper.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B +M971H,2)]"@I35$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S +M:"`M8R`@)VEF(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@ +M96QS92!E8VAO(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@ +M(")V<&-R;W5T97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@ +M6R`D,"`]/2!<(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ +M"B`@("`@("`@("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@ +M("`@("`@(&-M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@ +M("`@("`@;&]G9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S +M(B`E('-T871E7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X +M96-U=&4H7!E*"E=(&%N9"!S +M=&%T92`]/2`B34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE +M8W5T92AC;60I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ +M("`@("`@(&5X96-U=&4H8VUD*0H*"F1E9B!I&5C=71E +M*")M;W5N="!T;7!F6XH=F%L*3H*("`@(&EF('9A;#H* +M("`@("`@("!R971U&5C=71E*")I<"!A9&1R('-H;W<@ +M?&=R97`@+78@WT*("`@("`@("`@("`@ +M=&];)VEP)UT@/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A +M;'-;+3%="B`@("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@ +M("(B(@H@("`@9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G +M*")3879I;F<@:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C +M=71E*")S>7-T96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I +M;F7-T96UC=&P@&5C=71E*")K:6QL +M("U(55`@)7,B("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D +M;G-M87-Q(BP@(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py': 'MD5 check failed' + ) << \SHAR_EOF +9bdd1fdfea8177d3e408b2cc87e5d503 cloud_scripts/opt/cloud/bin/cs/CsHelper.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py'` -ne 7644 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' is not 7644" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5NWT*("`@("`@("!S96QF+F=U97-T(#T@5')U90H@("`@("`@ +M(&1B(#T@1&%T84)A9R@I"B`@("`@("`@9&(N7,H*2!A;F0@;&5N*&1B86=;9&5V:6-E +M72D@(3T@,#H*("`@("`@("`@("`@2==*0H*("`@ +M("`@("!I9B`G9&YS)R!I;B!S96QF+F1A=&$Z"B`@("`@("`@("`@(&1N'1E;F0H&-E<'1I;VXN"B`@("`@("`@:68@)W)O +M=71E"!I="!P2X@22!J=7-T(&%D +M9&5D('1H92!I9BP@87,@26%N(&1I9"!I;B!S;VUE(&]T:&5R(&9I;&5S+"!T +M;R!A=F]I9"!T:&4@97AC97!T:6]N+@H@("`@("`@(&EF("=R;W5T97)?9W5E +M2<@:6X@2=="B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py': 'MD5 check failed' + ) << \SHAR_EOF +98c84f4067412f263891f8293f185243 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py'` -ne 2545 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' is not 2545" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsMonitor.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N"!I;B!S96QF+F1B86=;)V-O;F9I9R==+G-P;&ET*"WT*("`@("`@("!H8U]D871A6R)H96%L=&A?8VAE8VMS7V)A&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!S96QF+F1B +M86&-L=61E9%]H96%L=&A?8VAE8VMS(ET@/2!;70H* +M("`@("`@("!I9B`B:&5A;'1H7V-H96-K/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py': 'MD5 check failed' + ) << \SHAR_EOF +d8f5dcf496dbc6d8508e40b906f48245 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py'` -ne 3681 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' is not 3681" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@ +M("`@("!S96QF+FQA2!E>&ES=',Z(')U;&4] +M)7,@=&%B;&4])7,@8VAA:6X])7,B+"!N97=?2`](&-P>2YR97!L86-E*"(M02`E&5C=71E,B@B:7!T86)L97,@+70@)7,@ +M)7,B("4@*&YE=U]R=6QE+F=E=%]T86)L92@I+"!C<'DI*0H@("`@("`@("`@ +M("`@("`@(R!4:&5R92!A"!I;B!T:&4@ +M9G)A;65W;W)K+@H@("`@("`@("`@("`@("`@:68@&5C=71E*")I<'1A8FQE7!E(#T@0W-#;61,:6YE*")C;61L:6YE(BDN9V5T7W1Y<&4H*0H* +M("`@("`@("!T7!E*3H*("`@("`@("`@("`@("`@(&EF(&DNFEP*&)I='-;,#HZ,ETL(&)I='-;,3HZ,ETI*0H@("`@("`@(&EF +M("(M02(@:6X@2!C;W)R96-T(&EP=&%B;&5S(&-O;6UA +M;F0@(B(B"B`@("`@("`@(R!/7,H*3H*("`@("`@("`@("`@("`@('!R:6YT86)L92`] +M(&LN=7)N($9A;'-E"B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py': 'MD5 check failed' + ) << \SHAR_EOF +7456b53eba9f115f9ad344bc1c01611d cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py'` -ne 11100 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' is not 11100" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsRoute.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRoute.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRoute.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import CsHelper +import logging +X +X +class CsRoute: +X +X """ Manage routes """ +X +X def __init__(self): +X self.table_prefix = "Table_" +X +X def get_tablename(self, name): +X return self.table_prefix + name +X +X def add_table(self, devicename): +X tablenumber = 100 + int(devicename[3:]) +X tablename = self.get_tablename(devicename) +X str = "%s %s" % (tablenumber, tablename) +X filename = "/etc/iproute2/rt_tables" +X logging.info("Adding route table: " + str + " to " + filename + " if not present ") +X if not CsHelper.definedinfile(filename, str): +X CsHelper.execute("sudo echo " + str + " >> /etc/iproute2/rt_tables") +X # remove "from all table tablename" if exists, else it will interfer with +X # routing of unintended traffic +X if self.findRule("from all lookup " + tablename): +X CsHelper.execute("sudo ip rule delete from all table " + tablename) +X +X def flush_table(self, tablename): +X CsHelper.execute("ip route flush table %s" % (tablename)) +X CsHelper.execute("ip route flush cache") +X +X def add_route(self, dev, address): +X """ Wrapper method that adds table name and device to route statement """ +X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 +X table = self.get_tablename(dev) +X +X if not table or not address: +X empty_param = "table" if not table else "address" +X logging.info("Empty parameter received %s while trying to add route, skipping" % empty_param) +X else: +X logging.info("Adding route: dev " + dev + " table: " + +X table + " network: " + address + " if not present") +X cmd = "default via %s table %s proto static" % (address, table) +X self.set_route(cmd) +X +X def add_network_route(self, dev, address): +X """ Wrapper method that adds table name and device to route statement """ +X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 +X table = self.get_tablename(dev) +X +X if not table or not address: +X empty_param = "table" if not table else "address" +X logging.info("Empty parameter received %s while trying to add network route, skipping" % empty_param) +X else: +X logging.info("Adding route: dev " + dev + " table: " + +X table + " network: " + address + " if not present") +X cmd = "throw %s table %s proto static" % (address, table) +X self.set_route(cmd) +X +X def set_route(self, cmd, method="add"): +X """ Add a route if it is not already defined """ +X found = False +X search = cmd +X if "throw" in search: +X search = search.replace("throw", "") +X for i in CsHelper.execute("ip route show " + search): +X found = True +X if not found and method == "add": +X logging.info("Add " + cmd) +X cmd = "ip route add " + cmd +X elif found and method == "delete": +X logging.info("Delete " + cmd) +X cmd = "ip route delete " + cmd +X else: +X return +X CsHelper.execute(cmd) +X +X def add_defaultroute(self, gateway): +X """ Add a default route +X :param str gateway +X :return: bool +X """ +X if not gateway: +X raise Exception("Gateway cannot be None.") +X +X if self.defaultroute_exists(): +X return False +X else: +X cmd = "default via " + gateway +X logging.info("Adding default route") +X self.set_route(cmd) +X return True +X +X def defaultroute_exists(self): +X """ Return True if a default route is present +X :return: bool +X """ +X logging.info("Checking if default ipv4 route is present") +X route_found = CsHelper.execute("ip -4 route list 0/0") +X +X if len(route_found) > 0: +X logging.info("Default route found: " + route_found[0]) +X return True +X else: +X logging.warn("No default route found!") +X return False +X +X def findRule(self, rule): +X for i in CsHelper.execute("ip rule show"): +X if rule in i.strip(): +X return True +X return False +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRoute.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py': 'MD5 check failed' + ) << \SHAR_EOF +4f2109aa1d89157e14817f90c676c2d3 cloud_scripts/opt/cloud/bin/cs/CsRoute.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py'` -ne 4989 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' is not 4989" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py +M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2==*0H@("`@("`@("`@ +M("!#&5C=71E*&-O;6UA;F0I"B`@("`@("`@96QS93H*("`@ +M("`@("`@("`@8V]M;6%N9"`](")I<"!R;W5T92!S:&]W('P@9W)E<"`EW!R:6YT("0Q+"`D,WTG(B`E(')O=71E6R=N971W;W)K)UT*("`@ +M("`@("`@("`@2==*0H@("`@("`@("`@("`@ +C("`@0W-(96QP97(N97AE8W5T92AR;W5T95]C;VUM86YD*0H@ +` +end +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py': 'MD5 check failed' + ) << \SHAR_EOF +f9f9db3a4543397153d69a62551a6c8c cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py'` -ne 1655 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' is not 1655" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N7,H*3H* +M("`@("`@("`@("`@"YS<&QI="@G7&XG*5T*"B`@("`@("`@9FEL +M93$N8V]M;6ET*"D*("`@("`@("!F:6QE,B`]($-S1FEL92A(05!23UA97T-/ +M3D9?4"D*("`@("`@("!I9B!N;W0@9FEL93(N8V]M<&%R92AF:6QE,2DZ"B`@ +M("`@("`@("`@($-S2&5L<&5R+F-O<'DH2$%04D]865]#3TY&7U0L($A!4%)/ +M6%E?0T].1E]0*0H*("`@("`@("`@("`@<')O8R`]($-S4')O8V5S2YP:60G72D*("`@("`@("`@("`@:68@;F]T('!R;V,N9FEN +M9"@I.@H@("`@("`@("`@("`@("`@;&]G9VEN9RYD96)U9R@B0W-,;V%D0F%L +M86YC97(Z.B!W:6QL(')E2$B*0H@("`@("`@("`@("`@ +M("`@0W-(96QP97(N2(L(")R97-T87)T(BD*("`@ +M("`@("`@("`@96QS93H*("`@("`@("`@("`@("`@(&QO9V=I;F2$B*0H@("`@ +M("`@("`@("`@("`@0W-(96QP97(N2(L(")R96QO +M860B*0H*("`@("`@("!A9&1?/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py': 'MD5 check failed' + ) << \SHAR_EOF +8f93571ff9b8f21c947e90193c3efa38 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py'` -ne 3393 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' is not 3393" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsApp.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsApp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsApp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsApp.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G +M871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG971?='EP92@I"B`@ +M("`@("`@5]I9E]N965D +M960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L"B`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE,B]S:71E2DI"B`@("`@("`@ +M("`@(&9I;&4N&5C=71E,B@B/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsApp.py': 'MD5 check failed' + ) << \SHAR_EOF +fa071a9d58a918b6a9d5e09ae10e3e11 cloud_scripts/opt/cloud/bin/cs/CsApp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsApp.py'` -ne 4159 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' is not 4159" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsFile.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsFile.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsFile.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import logging +import re +import copy +X +X +class CsFile: +X """ File editors """ +X +X def __init__(self, filename): +X self.filename = filename +X self.load() +X +X def load(self): +X self.new_config = [] +X self.config = [] +X try: +X for line in open(self.filename): +X self.new_config.append(line) +X except IOError: +X logging.debug("File %s does not exist" % self.filename) +X else: +X logging.debug("Reading file %s" % self.filename) +X self.config = list(self.new_config) +X +X def is_changed(self): +X if set(self.config) != set(self.new_config): +X return True +X else: +X return False +X +X def __len__(self): +X return len(self.config) +X +X def empty(self): +X self.config = [] +X self.new_config = [] +X +X def repopulate(self): +X self.new_config = [] +X +X def commit(self): +X if not self.is_changed(): +X logging.info("Nothing to commit. The %s file did not change" % self.filename) +X return False +X handle = open(self.filename, "w+") +X for line in self.new_config: +X handle.write(line) +X handle.close() +X logging.info("Wrote edited file %s" % self.filename) +X self.config = list(self.new_config) +X logging.info("Updated file in-cache configuration") +X return True +X +X def dump(self): +X for line in self.new_config: +X print line +X +X def addeq(self, string): +X """ Update a line in a file of the form token=something +X match on token= and replace something if needed +X Add line if token is not present +X """ +X token = string.split('=')[0] + '=' +X self.search(token, string) +X +X def append(self, string, where=-1): +X if where == -1: +X self.new_config.append("%s\n" % string) +X else: +X self.new_config.insert(where, "%s\n" % string) +X +X def add(self, string, where=-1): +X for index, line in enumerate(self.new_config): +X if line.strip() == string: +X return False +X if where == -1: +X self.new_config.append("%s\n" % string) +X else: +X self.new_config.insert(where, "%s\n" % string) +X return True +X +X def section(self, start, end, content): +X sind = -1 +X eind = -1 +X found = False +X for index, line in enumerate(self.new_config): +X if found and line.strip() == end: +X eind = index +X found = False +X if line.strip() == start: +X sind = index + 1 +X found = True +X if sind == -1: +X content.insert(0, start + "\n") +X content.append(end + "\n") +X self.new_config[sind:eind] = content +X +X def greplace(self, search, replace): +X logging.debug("Searching for %s and replacing with %s" % (search, replace)) +X self.new_config = [w.replace(search, replace) for w in self.new_config] +X +X def replaceIfFound(self, search, replace): +X found = False +X replace_filtered = replace +X if re.search("PSK \"", replace): +X replace_filtered = re.sub(r'".*"', '"****"', replace) +X logging.debug("Searching for %s and replacing with %s if found" % (search, replace_filtered)) +X for index, line in enumerate(self.new_config): +X if line.lstrip().startswith("#"): +X continue +X if re.search(search, line): +X if replace not in line: +X self.new_config[index] = replace + "\n" +X return False +X +X def search(self, search, replace): +X found = False +X replace_filtered = replace +X if re.search("PSK \"", replace): +X replace_filtered = re.sub(r'".*"', '"****"', replace) +X logging.debug("Searching for %s and replacing with %s" % (search, replace_filtered)) +X for index, line in enumerate(self.new_config): +X if line.lstrip().startswith("#"): +X continue +X if re.search(search, line): +X found = True +X if replace not in line: +X self.new_config[index] = replace + "\n" +X if not found: +X self.new_config.append(replace + "\n") +X return True +X return False +X +X def searchString(self, search, ignoreLinesStartWith): +X found = False +X logging.debug("Searching for %s string " % search) +X +X for index, line in enumerate(self.new_config): +X print ' line = ' + line +X if line.lstrip().startswith(ignoreLinesStartWith): +X continue +X if search in line: +X found = True +X break +X +X return found +X +X def deleteLine(self, search): +X found = False +X logging.debug("Searching for %s to remove the line " % search) +X temp_config = [] +X for index, line in enumerate(self.new_config): +X if line.lstrip().startswith("#"): +X continue +X if search not in line: +X temp_config.append(line) +X +X self.new_config = list(temp_config) +X +X def compare(self, o): +X result = (isinstance(o, self.__class__) and set(self.config) == set(o.config)) +X logging.debug("Comparison of CsFiles content is ==> %s" % result) +X return result +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsFile.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsFile.py': 'MD5 check failed' + ) << \SHAR_EOF +81531ddee205a5eb66bb44f400ab222c cloud_scripts/opt/cloud/bin/cs/CsFile.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsFile.py'` -ne 6133 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' is not 6133" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/__init__.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/__init__.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/__init__.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/__init__.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/__init__.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/__init__.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/__init__.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/__init__.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/__init__.py': 'MD5 check failed' + ) << \SHAR_EOF +33215d440d5ba5fa95b1ffa035d769e2 cloud_scripts/opt/cloud/bin/cs/__init__.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/__init__.py'` -ne 785 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/__init__.py' is not 785" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsAddress.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsAddress.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsAddress.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsAddress.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N`H@("`@("`@("`@("`@("`@("`@ +M(&=U97-T7VEN=&5R9F%C92`](&EN=&5R9F%C90H@("`@("`@("`@("`@("`@ +M("`@(&QO9V=I;F2!C;VYF:6=U2AS96QF*3H*("`@("`@("!I +M9B!S96QF+F-O;F9I9RYI2(I +M"B`@("`@("`@96QS93H*("`@("`@("`@("`@2@I+"!S96QF+F=E=%]S +M:7IE*"DI"@H@("`@9&5F(&=E=%]S:7IE*'-E;&8I.@H@("`@("`@("(B(B!2 +M971U7!E +M(B!I;B!S96QF+F%D9')E"@Q,#`@*R!I;G0H9&5V6S,Z72DI +M"B`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@("`@97AC97!T($5X8V5P=&EO;B!A +M&-E<'1I;VX@ +M;V-C=7)R960@/3T^("5S(B`E(&4I"@H@("`@("`@("`@("!S96QF+G!O7!E*"D@:6X@6R)C;VYT7!E*"D@:6X@ +M6R=P=6)L:6,G73H*("`@("`@("`@("`@("`@('-E;&8N7!E*"E=.@H@("`@("`@ +M("`@("`@("`@9V%T97=A>2`]('-T2@I*3H* +M("`@("`@("`@("`@("`@(')O=71E+F%D9%]D969A=6QT2@I*0H*("`@(&1E9B!S971?;6%R:RAS96QF*3H*("`@ +M("`@("!C;60@/2`B+4$@4%)%4D]55$E.1R`M:2`E7!E(&]F('1H92!)4`H@("`@("`@(&=U97-T"B`@("`@("`@8V]N +M=')O;`H@("`@("`@('!U8FQI8PH@("`@("`@("(B(@H@("`@("`@(&EF(")N +M=U]T>7!E(B!I;B!S96QF+F%D9')E&9F9F9F9F9F +M("TM8W1M87-K(#!X9F9F9F9F9F8B72D*"B`@("`@("`@&UA7!E*"D@:6X@6R)G=65S=")=.@H@("`@("`@("`@("!G=65S +M=$YE='=O&9F9F9F9F9F(ETI"B`@ +M("`@("`@("`@(&=U97-T3F5T=V]R:T-I9'(@/2!S96QF+F%D9')E#4R-2\P>&9F9F9F9F9F(B`E +M("AS96QF+F1E=BP@2)=("$](").;VYE(CH* +M("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@("`@("`@:68@ +M(FYE='=O7!E*"D@:6X@6R)P=6)L:6,B +M72!A;F0@(F=A=&5W87DB(&EN('-E;&8N861D2)=("$] +M(").;VYE(CH*("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@ +M("`@("`@("`@(&9O7!E(B!I;B!A9&1R97-S(&%N9"!A +M9&1R97-S6R)N=U]T>7!E(ET@/3T@(F=U97-T(CH*("`@("`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("!R;W5T92YA9&1?;F5T=V]R:U]R;W5T92AS96QF +M+F1E=BP@&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A8VAE(BD*"B`@("`@("`@ +M96QI9B!M971H;V0@/3T@(F1E;&5T92(Z"B`@("`@("`@("`@(",@=')E870@ +M=&AE(&QA&5C=71E*")S=61O(&EP(')U;&4@9&5L971E('1A8FQE("(@*R!T86)L94YA +M;64I"B`@("`@("`@("`@("`@("!#&5C=71E*")S=61O(&EP +M(')O=71E(&9L=7-H('1A8FQE("(@*R!T86)L94YA;64I"B`@("`@("`@("`@ +M("`@("!#&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A +M8VAE(BD*("`@("`@("`@("`@("`@($-S4G5L92AS96QF+F1E=BDN9&5L36%R +M:R@I"@H@("`@("`@('-E;&8N9G=?7!E('=I;&P@ +M;F\@;&]N9V5R(&)E(&MN;W=N"B`@("`@("`@:68@7!E*"D@/3T@(G!U8FQI8R(@86YD('-E;&8N8V]N9FEG+FES7W9P8R@I +M(&%N9"!M971H;V0@/3T@(F%D9"(Z"B`@("`@("`@("`@(&EF('-E;&8N861D +M7,H*3H*("`@("`@("`@ +M("`@7!E)UT@:6X@5E)2 +M4%]465!%4SH*("`@("`@("`@("`@7!E(B!I;B!S96QF+F%D9')E&5C=71E,BAC;60L($9A +M;'-E*0H*("`@(",@1&5L971E(&%N>2!I<',@=&AA="!A7,H*2!O2AS96QF+"!B862!F;W(@ +M7,O8VQA"TP+W)P&-E<'0@24]%/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py': 'MD5 check failed' + ) << \SHAR_EOF +5cebbbd106abd3eba7ee0e4d23277dda cloud_scripts/opt/cloud/bin/cs/CsAddress.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py'` -ne 29236 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' is not 29236" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsProcess.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsProcess.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsProcess.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import os +import re +import CsHelper +import logging +X +X +class CsProcess(object): +X """ Manipulate processes """ +X +X def __init__(self, search): +X self.search = search +X +X def start(self, thru, background=''): +X # if(background): +X # cmd = cmd + " &" +X logging.info("Started %s", " ".join(self.search)) +X os.system("%s %s %s" % (thru, " ".join(self.search), background)) +X +X def kill_all(self): +X pids = self.find_pid() +X for p in pids: +X CsHelper.execute("kill -9 %s" % p) +X +X def find_pid(self): +X self.pid = [] +X for i in CsHelper.execute("ps aux"): +X items = len(self.search) +X proc = re.split(r"\s+", i)[items*-1:] +X matches = len([m for m in proc if m in self.search]) +X if matches == items: +X self.pid.append(re.split(r"\s+", i)[1]) +X +X logging.debug("CsProcess:: Searching for process ==> %s and found PIDs ==> %s", self.search, self.pid) +X return self.pid +X +X def find(self): +X has_pid = len(self.find_pid()) > 0 +X return has_pid +X +X def kill(self, pid): +X if pid > 1: +X CsHelper.execute("kill -9 %s" % pid) +X +X def grep(self, str): +X for i in CsHelper.execute("ps aux"): +X if i.find(str) != -1: +X return re.split(r"\s+", i)[1] +X return -1 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsProcess.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py': 'MD5 check failed' + ) << \SHAR_EOF +75a4650fe1e521049e80d32a022d8689 cloud_scripts/opt/cloud/bin/cs/CsProcess.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py'` -ne 2156 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' is not 2156" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsConfig.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsConfig.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsConfig.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsConfig.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N7!E*"D@/3T@)W9P8W)O=71E'1D;G,H'1D;G,G+"`G9F%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py': 'MD5 check failed' + ) << \SHAR_EOF +836541a5b9cb1b2f9df5dad6bb806745 cloud_scripts/opt/cloud/bin/cs/CsConfig.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py'` -ne 3179 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' is not 3179" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsDatabag.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@("`@ +M("!S96QF+F1B(#T@1&%T84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF +M+F1B+G-A=F4HWT*("`@("`@("!R971U&1I9V5S="@I"@H@("`@ +M9&5F(&=E=%]G871E=V%Y*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I +M;B!S96QF+FED871A*"DZ"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A +M*"E;)V=A=&5W87DG70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G +M971?=7-E7V5X=%]D;G,H'1D;G,G70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E +M9B!G971?861V97)T7VEN="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN +M="<@:6X@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py': 'MD5 check failed' + ) << \SHAR_EOF +9e4de6e0a115a5e806e80dc151769b21 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py'` -ne 4808 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' is not 4808" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsRule.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRule.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRule.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import CsHelper +import logging +X +X +class CsRule: +X """ Manage iprules +X Supported Types: +X fwmark +X """ +X +X def __init__(self, dev): +X self.dev = dev +X self.tableNo = 100 + int(dev[3:]) +X self.table = "Table_%s" % (dev) +X +X def addRule(self, rule): +X if not self.findRule(rule + " lookup " + self.table): +X cmd = "ip rule add " + rule + " table " + self.table +X CsHelper.execute(cmd) +X logging.info("Added rule %s for %s" % (cmd, self.table)) +X +X def findRule(self, rule): +X for i in CsHelper.execute("ip rule show"): +X if rule in i.strip(): +X return True +X return False +X +X def addMark(self): +X if not self.findMark(): +X cmd = "ip rule add fwmark %s table %s" % (self.tableNo, self.table) +X CsHelper.execute(cmd) +X logging.info("Added fwmark rule for %s" % (self.table)) +X +X def delMark(self): +X if self.findMark(): +X cmd = "ip rule delete fwmark %s table %s" % (self.tableNo, self.table) +X CsHelper.execute(cmd) +X logging.info("Deleting fwmark rule for %s" % (self.table)) +X +X def findMark(self): +X srch = "from all fwmark %s lookup %s" % (hex(self.tableNo), self.table) +X for i in CsHelper.execute("ip rule show"): +X if srch in i.strip(): +X return True +X return False +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRule.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRule.py': 'MD5 check failed' + ) << \SHAR_EOF +78748432f1ac57194339aef8bdb7c9f8 cloud_scripts/opt/cloud/bin/cs/CsRule.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRule.py'` -ne 2192 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' is not 2192" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vmdata.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vmdata.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vmdata.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vmdata.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/vmdata.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&ET*#(I +M"@H@("`@9F]R(&EP(&EN(&IS;VY?9&%T83H*("`@("`@("!F;W(@:71E;2!I +M;B!J2!V86QI9"!D +M871A"B`@("`@("`@("`@(&EF(&9O;&1E&ES=',H;65T +M86UA;FEF97-T*3H*("`@("`@("!O2Q!;&QO=UQN1&5N +M>2!F&-E<'0@3U-%2!E>&ES=',L('=E(&1O(&ET('1H:7,@=V%Y(&9O +M7,N97AI="@Q*0H*("`@(&9H(#T@;W!E;BAH +M=&%C8V5S2`K("=<;B&9L;V-K*&9I;&4I.@H@("`@=')Y.@H@("`@("`@(&9L;V-K +M*&9I;&4L($Q/0TM?15@I"B`@("!E>&-E<'0@24]%7,N97AI="@Q +M*0H@("`@3H*("`@("`@("!F;&]C:RAF:6QE+"!,3T-+7U5.*0H@("`@97AC97!T($E/ +M17)R;W(@87,@93H*("`@("`@("!P7,N97AI="@Q*0H@("`@7,N87)G=ELQ.ETI"FYA +` +end +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vmdata.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vmdata.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vmdata.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vmdata.py': 'MD5 check failed' + ) << \SHAR_EOF +f585277ddefb989a0662db609bc199c7 cloud_scripts/opt/cloud/bin/vmdata.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vmdata.py'` -ne 4723 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vmdata.py' is not 4723" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/get_diagnostics_files.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/get_diagnostics_files.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/get_diagnostics_files.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' && +#!/usr/bin/env python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import logging +import os +import re +import shlex +import subprocess as sp +import sys +import time +import zipfile +X +X +# Create zip archive and append files for retrieval +def zip_files(files): +X fList = files +X compression = zipfile.ZIP_DEFLATED +X time_str = time.strftime("%Y%m%d-%H%M%S") +X zf_name = '/root/diagnostics_files_' + time_str + '.zip' +X zf = zipfile.ZipFile(zf_name, 'w', compression) +X +X ''' +X Initialize 3 empty arrays to collect found files, non-existent files +X and last one to collect temp files to be cleaned up when script exits +X ''' +X files_found_list = [] +X files_not_found_list = [] +X files_from_shell_commands = [] +X +X try: +X for f in fList: +X f = f.strip() +X +X if f in ('iptables', 'ipaddr', 'iprule', 'iproute'): +X f = execute_shell_script(f) +X files_from_shell_commands.append(f) +X +X if len(f) > 3 and f.startswith('[') and f.endswith(']'): +X f = execute_shell_script(f[1:-1]) +X files_from_shell_commands.append(f) +X +X if os.path.isfile(f): +X try: +X zf.write(f, f[f.rfind('/') + 1:]) +X except OSError or RuntimeError as e: +X files_not_found_list.append(f) +X else: +X files_found_list.append(f) +X finally: +X cleanup(files_from_shell_commands) +X generate_retrieved_files_txt(zf, files_found_list, files_not_found_list) +X zf.close() +X print zf_name +X +X +def get_cmd(script): +X if script is None or len(script) == 0: +X return None +X +X cmd = None +X if script == 'iptables': +X cmd = 'iptables-save' +X elif script == 'ipaddr': +X cmd = 'ip address' +X elif script == 'iprule': +X cmd = 'ip rule list' +X elif script == 'iproute': +X cmd = 'ip route show table all' +X else: +X cmd = '/opt/cloud/bin/' + script +X if not os.path.isfile(cmd.split(' ')[0]): +X cmd = None +X +X return cmd +X +X +def execute_shell_script(script): +X script = script.strip() +X outputfile = script + '.log' +X +X with open(outputfile, 'wb', 0) as f: +X try: +X cmd = get_cmd(script) +X if cmd is None: +X f.write('Unable to generate command for ' + script + ', perhaps missing file') +X else: +X p = sp.Popen(cmd, shell=True, stdout=sp.PIPE, stderr=sp.PIPE) +X stdout, stderr = p.communicate() +X return_code = p.returncode +X if return_code is 0: +X f.write(stdout) +X else: +X f.write(stderr) +X except OSError as ex: +X delete_tmp_file_cmd = 'rm -f %s' % outputfile +X sp.check_call(shlex.split(delete_tmp_file_cmd)) +X finally: +X f.close() +X return outputfile +X +X +def cleanup(file_list): +X files = ' '.join(file_list) +X cmd = 'rm -f %s' % files +X try: +X p = sp.Popen(shlex.split(cmd), stderr=sp.PIPE, stdout=sp.PIPE) +X p.communicate() +X except OSError as e: +X logging.debug("Failed to execute bash command") +X +X +def generate_retrieved_files_txt(zip_file, files_found, files_not_found): +X output_file = 'fileinfo.txt' +X try: +X with open(output_file, 'wb', 0) as man: +X for i in files_found: +X man.write(i + '\n') +X for j in files_not_found: +X man.write(j + 'File Not Found!!\n') +X zip_file.write(output_file, output_file) +X finally: +X cleanup_cmd = "rm -f %s" % output_file +X sp.check_call(shlex.split(cleanup_cmd)) +X +X +if __name__ == '__main__': +X fileList = sys.argv[1:] +X zip_files(fileList) +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/get_diagnostics_files.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py': 'MD5 check failed' + ) << \SHAR_EOF +f8b91c14af848f14696aa2c1193b0907 cloud_scripts/opt/cloud/bin/get_diagnostics_files.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py'` -ne 4478 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' is not 4478" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/checkrouter.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checkrouter.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checkrouter.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/checkrouter.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checkrouter.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +STATUS=UNKNOWN +X +if [ "$(systemctl is-active keepalived)" != "active" ] +then +X echo "Status: FAULT" +X exit +fi +X +ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g') +if [ "$ROUTER_TYPE" = "router" ] +then +X ROUTER_STATE=$(ip addr show dev eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi') +X STATUS=$ROUTER_STATE +else +X ROUTER_STATE=$(ip addr show dev eth1 | grep state | awk '{print $9;}') +X if [ "$ROUTER_STATE" = "UP" ] +X then +X STATUS=MASTER +X elif [ "$ROUTER_STATE" = "DOWN" ] +X then +X STATUS=BACKUP +X fi +fi +X +echo "Status: ${STATUS}" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checkrouter.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/checkrouter.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/checkrouter.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checkrouter.sh': 'MD5 check failed' + ) << \SHAR_EOF +b107b37bc85a7036ef9f4e81cf4ae8b2 cloud_scripts/opt/cloud/bin/checkrouter.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checkrouter.sh'` -ne 1445 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checkrouter.sh' is not 1445" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/ilb.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ilb.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ilb.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/ilb.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/ilb.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s: -a -d -f -s \n" $(basename $0) >&2 +} +X +#set -x +X +fw_remove_backup() { +X logger -t cloud "$(basename $0): Entering fw_remove_backup" +X local lb_vif_list=eth0 +X for vif in $lb_vif_list; do +X sudo iptables -F back_load_balancer_$vif 2> /dev/null +X sudo iptables -D INPUT -i $vif -p tcp -j back_load_balancer_$vif 2> /dev/null +X sudo iptables -X back_load_balancer_$vif 2> /dev/null +X done +X sudo iptables -F back_lb_stats 2> /dev/null +X sudo iptables -D INPUT -p tcp -j back_lb_stats 2> /dev/null +X sudo iptables -X back_lb_stats 2> /dev/null +} +X +fw_restore() { +X logger -t cloud "$(basename $0): Entering fw_restore" +X local lb_vif_list="eth0" +X for vif in $lb_vif_list; do +X sudo iptables -F load_balancer_$vif 2> /dev/null +X sudo iptables -D INPUT -i $vif -p tcp -j load_balancer_$vif 2> /dev/null +X sudo iptables -X load_balancer_$vif 2> /dev/null +X sudo iptables -E back_load_balancer_$vif load_balancer_$vif 2> /dev/null +X done +X sudo iptables -F lb_stats 2> /dev/null +X sudo iptables -D INPUT -p tcp -j lb_stats 2> /dev/null +X sudo iptables -X lb_stats 2> /dev/null +X sudo iptables -E back_lb_stats lb_stats 2> /dev/null +} +X +# firewall entry to ensure that haproxy can receive on specified port +fw_entry() { +X logger -t cloud "$(basename $0): Entering fw_entry" +X local added=$1 +X local removed=$2 +X local stats=$3 +X +X if [ "$added" == "none" ] +X then +X added="" +X fi +X +X if [ "$removed" == "none" ] +X then +X removed="" +X fi +X +X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") +X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") +X +# back up the iptable rules by renaming before creating new. +X local lb_vif_list=eth0 +X for vif in $lb_vif_list; do +X sudo iptables -E load_balancer_$vif back_load_balancer_$vif 2> /dev/null +X sudo iptables -N load_balancer_$vif 2> /dev/null +X sudo iptables -A INPUT -i $vif -p tcp -j load_balancer_$vif +X done +X sudo iptables -E lb_stats back_lb_stats 2> /dev/null +X sudo iptables -N lb_stats 2> /dev/null +X sudo iptables -A INPUT -p tcp -j lb_stats +X +X for i in $a +X do +X local pubIp=$(echo $i | cut -d: -f1) +X local dport=$(echo $i | cut -d: -f2) +X local lb_vif_list="eth0" +X for vif in $lb_vif_list; do +X sudo iptables -A load_balancer_$vif -p tcp -d $pubIp --dport $dport -j ACCEPT +X if [ $? -gt 0 ] +X then +X return 1 +X fi +X done +X done +X local pubIp=$(echo $stats | cut -d: -f1) +X local dport=$(echo $stats | cut -d: -f2) +X local cidrs=$(echo $stats | cut -d: -f3 | sed 's/-/,/') +X sudo iptables -A lb_stats -s $cidrs -p tcp -m state --state NEW -d $pubIp --dport $dport -j ACCEPT +X +X return 0 +} +X +#Hot reconfigure HA Proxy in the routing domain +reconfig_lb() { +X logger -t cloud "Reconfiguring ilb using $1" +X /root/reconfigLB.sh $1 +X return $? +} +X +# Restore the HA Proxy to its previous state, and revert iptables rules on loadbalancer +restore_lb() { +X logger -t cloud "Restoring HA Proxy to previous state" +X # Copy the old version of haproxy.cfg into the file that reconfigLB.sh uses +X cp /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg.new +X +X if [ $? -eq 0 ] +X then +X # Run reconfigLB.sh again +X /root/reconfigLB.sh /etc/haproxy/haproxy.cfg.new +X fi +} +X +X +logger -t cloud "$(basename $0): Entering $(dirname $0)/$(basename $0)" +X +iflag= +aflag= +dflag= +fflag= +sflag= +X +while getopts 'i:a:d:f:s:' OPTION +do +X case $OPTION in +X i) iflag=1 +X domRIp="$OPTARG" #unused but passed in +X ;; +X a) aflag=1 +X addedIps="$OPTARG" +X ;; +X d) dflag=1 +X removedIps="$OPTARG" +X ;; +X f) fflag=1 +X cfgfile="$OPTARG" +X ;; +X s) sflag=1 +X statsIp="$OPTARG" +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [[ "$aflag$dflag" != "1" && "$aflag$dflag" != "11" ]] +then +X usage +X unlock_exit 2 $lock $locked +fi +X +if [ "$addedIps" == "" ] +then +X addedIps="none" +fi +X +X +if [ "$removedIps" == "" ] +then +X removedIps="none" +fi +X +X +# hot reconfigure haproxy +reconfig_lb $cfgfile +X +if [ $? -gt 0 ] +then +X logger -t cloud "Reconfiguring ilb failed" +X unlock_exit 1 $lock $locked +fi +X +logger -t cloud "HAProxy reconfigured successfully, configuring firewall" +X +# iptables entry to ensure that haproxy receives traffic +fw_entry $addedIps $removedIps $statsIp +X +if [ $? -gt 0 ] +then +X logger -t cloud "Failed to apply firewall rules for internal load balancing, reverting HA Proxy config" +X # Restore the LB +X restore_lb +X +X logger -t cloud "Reverting firewall config" +X fw_restore +X +X unlock_exit 1 $lock $locked +else +X # Remove backedup iptable rules +X logger -t cloud "Firewall configured successfully, deleting backup firewall config" +X fw_remove_backup +fi +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/ilb.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/ilb.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/ilb.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ilb.sh': 'MD5 check failed' + ) << \SHAR_EOF +8b7374975ee7d7a5d73da78b60bd508c cloud_scripts/opt/cloud/bin/ilb.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ilb.sh'` -ne 5644 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ilb.sh' is not 5644" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +for i in $* +do +X info=`/opt/cloud/bin/checks2svpn.sh $i` +X ret=$? +X batchInfo+="$i:$ret:$info&" +done +echo -n $batchInfo +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh': 'MD5 check failed' + ) << \SHAR_EOF +36a25911b669737ea678011f72a6f3f9 cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh'` -ne 924 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' is not 924" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/savepassword.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/savepassword.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/savepassword.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/savepassword.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/savepassword.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# Usage +# save_password -v -p +X +while getopts 'v:p:' OPTION +do +X case $OPTION in +X v) VM_IP="$OPTARG" +X ;; +X p) PASSWORD="$OPTARG" +X ;; +X ?) echo "Incorrect usage" +X ;; +X esac +done +TOKEN_FILE="/tmp/passwdsrvrtoken" +TOKEN="" +if [ -f $TOKEN_FILE ]; then +X TOKEN=$(cat $TOKEN_FILE) +fi +ps aux | grep passwd_server_ip.py |grep -v grep 2>&1 > /dev/null +if [ $? -eq 0 ] +then +X ips=$(ip addr show | grep inet | awk '{print $2}') +X for ip in $ips; do +X server_ip=$(echo $ip | awk -F'/' '{print $1}') +X curl --header "DomU_Request: save_password" "http://$server_ip:8080/" -F "ip=$VM_IP" -F "password=$PASSWORD" -F "token=$TOKEN" >/dev/null 2>/dev/null & +X done +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/savepassword.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/savepassword.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/savepassword.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/savepassword.sh': 'MD5 check failed' + ) << \SHAR_EOF +edebd2c25984e1ed00b36e4f8d360a63 cloud_scripts/opt/cloud/bin/savepassword.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/savepassword.sh'` -ne 1525 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/savepassword.sh' is not 1525" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cloud-nic.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cloud-nic.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cloud-nic.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +plug_nic() { +X sudo echo "$tableNo $tableName" >> /etc/iproute2/rt_tables 2>/dev/null +X sudo ip rule add fwmark $tableNo table $tableName 2>/dev/null +X sudo ip route flush table $tableName +X sudo ip route flush cache +} +X +X +unplug_nic() { +X sudo iptables -t mangle -D PREROUTING -i $dev -m state --state NEW -j CONNMARK --set-mark $tableNo 2>/dev/null +X +X sudo ip rule del fwmark $tableNo 2>/dev/null +X sudo ip route flush table $tableName +X sudo sed -i /"$tableNo $tableName"/d /etc/iproute2/rt_tables 2>/dev/null +X sudo ip route flush cache +X # remove network usage rules +X sudo iptables -F NETWORK_STATS_$dev 2>/dev/null +X iptables-save | grep NETWORK_STATS_$dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables $rule +X done +X sudo iptables -X NETWORK_STATS_$dev 2>/dev/null +X # remove vpn network usage rules +X sudo iptables -t mangle -F VPN_STATS_$dev 2>/dev/null +X iptables-save -t mangle | grep VPN_STATS_$dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t mangle $rule +X done +X sudo iptables -t mangle -X VPN_STATS_$dev 2>/dev/null +X # remove rules on this dev +X iptables-save -t mangle | grep $dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t mangle $rule +X done +X iptables-save -t nat | grep $dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t nat $rule +X done +X iptables-save | grep $dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables $rule +X done +X # remove apache config for this eth +X rm -f /etc/apache2/conf.d/vhost$dev.conf +} +X +action=$1 +dev=$2 +tableNo=$((100+${dev:3})) +tableName="Table_$dev" +X +if [ $action == 'add' ] +then +X plug_nic +else +X unplug_nic +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cloud-nic.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cloud-nic.sh': 'MD5 check failed' + ) << \SHAR_EOF +6afed00cefb1dc06b8b4969c2c26933e cloud_scripts/opt/cloud/bin/cloud-nic.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cloud-nic.sh'` -ne 2632 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' is not 2632" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/ipsectunnel.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ipsectunnel.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/ipsectunnel.sh (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/ipsectunnel.sh +M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N#4R-2(*=G!N:6YM87)K/2(P>#4R-"(*"G5S86=E*"D@ +M>PH@("`@<')I;G1F(")5PH@('-U9&\@:7!T86)L +M97,MPH@(&1I2!<"B`@("!P +M:&%S93(@<&]L:6-Y/21ER1R:6=H=&YE='-] +M(B`^/B`D=G!N8V]N9F9I;&4@)B8*("!S=61O(&5C:&\@(B`@='EP93UT=6YN +M96PB(#X^("1V<&YC;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!A=71H8GD] +MVEK96QI9F5T:6UE?7,B(#X^("1V<&YC +M;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!E2(@/CX@ +M)'9P;F-O;F9F:6QE("8F"B`@2!F +M;W(@'1H;W`](B1/4%1!4D&ET("1R970* +` +end +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/ipsectunnel.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh': 'MD5 check failed' + ) << \SHAR_EOF +097a970ec94a68d965ffd7f446e3862d cloud_scripts/opt/cloud/bin/ipsectunnel.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh'` -ne 8769 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' is not 8769" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/ipassoc.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ipassoc.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ipassoc.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/ipassoc.sh (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/ipassoc.sh +M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N"`D("1(96%D55),.B!S=FXZ+R]S=FXN;&%B+G9M;W!S+F-O;2]R97!O2!E>&ES=',B"GT* +M"F1E;%]F=U]C:&%I;E]F;W)?:7`@*"D@>PH@(&QO8V%L('!U8DEP/20H96-H +M;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?2W!R:6YT("0R?2W!R:6YT("0R?2W!R:6YT("0Q?2PH@(&QO +M8V%L(&1E=CTB)#$B"B`@;&]C86P@:7`](B0R(@H@('-U9&\@:7`@861DW!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP/20Q +M"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0Q?22!F;W(@:7`@)'!U8DEP(&]N(&EN=&5R9F%C92`D971H1&5V(@H@("`@ +M(')E='5R;B`Q"B`@9FD*"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0R?2<@('P@9W)E<"`M=R`D +M:7!.;TUAW!R +M:6YT("0R?2#TD*'!R:6YT9B`B)7A<;B(@)&YU;2D*("`@("`@("`@ +M(&5C:&\@)&AE>#L*("`@("`@("`@("-E;F%B;&4@`IS +M9FQA9STP"FQF;&%G/0IF9FQA9ST*8V9L86<]"FYF;&%G/0IO<#TB(@H*:7-? +M;6%S=&5R/3`*:7-?&ET(#(@)&QO8VL@)&QO8VME9`H)"3L["B`@ +M97-A8PID;VYE"@H*:68@6R`B)$%F;&%G)$1F;&%G(B`A/2`B,2(@70IT:&5N +M"B`@("!U&ET("0_("1L;V-K +M("1L;V-K960*9FD*"FEF(%L@(B1F9FQA9R(@/3T@(C$B(%T@)B8@6R`B)$1F +M;&%G(B`]/2`B,2(@70IT:&5N"B`@&ET("0_ +M("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1$9FQA9R(@/3T@(C$B(%T*=&AE +M;@H@(')E;6]V95]A;E]I<"`@)'!U8FQI8TEP("8F"B`@9&5L7V9W7V-H86EN +M7V9O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ipassoc.sh': 'MD5 check failed' + ) << \SHAR_EOF +ad068a0cc84ded8f79c63ce3aced4586 cloud_scripts/opt/cloud/bin/ipassoc.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ipassoc.sh'` -ne 13401 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ipassoc.sh' is not 13401" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/line_edit.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/line_edit.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/line_edit.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/line_edit.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/line_edit.py' && +#!/usr/bin/python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import logging +import re +import shutil +import os +X +X +class LineEdit(object): +X """Helper for LineEditingFile that keeps track of one edit.""" +X def __init__(self, search, sub, *sub_args, **kwargs): +X if len(sub_args) > 0: +X sub = sub % sub_args +X flags = kwargs.get('flags', 0) +X self.pattern = re.compile(search, flags=flags) +X self.sub = sub +X self.count = kwargs.get('count', 0) # max subs to make +X self.subs = 0 # subs made so far +X +X +class LineEditingFile(object): +X """ +X Atomic, conservative, by-line editing of configuration files. +X +X Will not touch the file if there are no changes to do. +X Reasonably efficient for large files, though files with a long time +X before their first match will use memory. +X +X +X Given a vhosts file such as: +X >>> with open('doctest-vhosts.conf', 'w') as f: +X ... f.write(''' +X ... Listen foo:80 +X ... +X ... DocRoot /var/www +X ... +X ... +X ... Listen other:80 +X ... +X ... DocRoot /var/www +X ... +X ... ''') +X ... +X +X To replace the hostname for the first virtualhost entry: +X >>> new_hostname = 'fooooo' +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... f.replace(r'', '', new_hostname, count=1, flags=re.I) +X ... f.replace(r'Listen .*?:80', 'Listen %s:80', new_hostname, count=1, flags=re.I) +X ... +X +X Be careful with the matches! +X A second invocation of the same rule will edit the second vhost: +X >>> new_hostname = 'fooooo' +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... f.replace(r'', '', new_hostname, count=1, flags=re.I) +X ... +X +X To move all hosts from port 80 to port 8080: +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... f.replace(r'', '', flags=re.I) +X ... f.replace(r'Listen (.*?):80', 'Listen \\\\1:80', flags=re.I) +X ... +X +X (please note in this example there's a double escape of the backreference +X \\\\1, to make the example work with doctest) +X +X Since this example already matched all files, a second invocation does nothing: +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... f.replace(r'', '', flags=re.I) +X ... +X +X It's also acceptable to not make any edits at all: +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... pass +X ... +X +X You don't _have_ to use a with statement: +X >>> f = LineEditingFile('doctest-vhosts.conf') +X >>> f.replace(r'DocRoot /var/www', 'DocRoot /var/www/html', flags=re.I) +X >>> changes = f.commit() +X >>> print changes +X 2 +X >>> +X +X Cleanup of the example vhosts.conf: +X >>> # noinspection PyBroadException +X >>> try: +X ... os.unlink('doctest-vhosts.conf') +X ... os.unlink('doctest-vhosts.conf.bak') +X ... os.unlink('doctest-vhosts.conf.new') +X ... except: +X ... pass +X ... +X """ +X +X def __init__(self, filename): +X self.filename = filename +X self.changed = False +X self.edits = [] +X +X def __enter__(self): +X return self +X +X def replace(self, search, sub, *sub_args, **kwargs): +X edit = LineEdit(search, sub, *sub_args, **kwargs) +X self.edits.append(edit) +X +X # noinspection PyUnusedLocal +X def __exit__(self, exc, value, traceback): +X if exc is not None: +X return False # return false results in re-raise +X +X self.commit() +X +X def commit(self): +X changes = 0 +X changed_file = None +X changed_filename = self.filename + '.new' +X try: +X lines = [] +X backup_filename = self.filename + '.bak' +X # noinspection PyUnusedLocal +X stat = None +X with open(self.filename, 'r') as orig: +X stat = os.fstat(orig.fileno()) +X for line in orig: +X changed_line = line +X for edit in self.edits: +X remaining_count = 0 +X if edit.count != 0: +X remaining_count = edit.count - edit.subs +X if remaining_count < 0: +X raise Exception("Made too many edits") +X elif remaining_count == 0: +X continue +X changed_line, subs = edit.pattern.subn( +X edit.sub, line, remaining_count) +X if changed_line != line: +X if changed_file is None: +X logging.debug("Editing file %s" % self.filename) +X logging.debug(" - %s" % line[:-1]) +X logging.debug(" + %s" % changed_line[:-1]) +X changes += subs +X edit.subs += subs +X if changes == 0: # buffer until we find a change +X lines.append(changed_line) +X elif changed_file is None: # found first change, flush buffer +X changed_file = open(changed_filename, 'w') +X if hasattr(os, 'fchmod'): +X os.fchmod(changed_file.fileno(), # can cause OSError which aborts +X stat.st_mode) +X if hasattr(os, 'fchown'): +X os.fchown(changed_file.fileno(), # can cause OSError which aborts +X stat.st_uid, stat.st_gid) +X changed_file.writelines(lines) +X changed_file.write(changed_line) +X del lines # reclaim buffer memory +X else: # already flushed, just write +X changed_file.write(changed_line) +X +X if changes == 0: +X logging.info("No edits need for file %s" % +X self.filename) +X else: +X changed_file.close() +X changed_file = None +X if os.path.exists(backup_filename): # back up the original +X os.unlink(backup_filename) +X shutil.copy(self.filename, backup_filename) +X os.rename(changed_filename, self.filename) # the swap +X logging.info("Edited file %s (%d changes)" % +X (self.filename, changes)) +X finally: +X if changed_file is not None: # failed, clean up +X changed_file.close() +X os.unlink(changed_filename) +X return changes +X +X +if __name__ == "__main__": +X logging.basicConfig(level=logging.DEBUG) +X import doctest +X doctest.testmod() +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/line_edit.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/line_edit.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/line_edit.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/line_edit.py': 'MD5 check failed' + ) << \SHAR_EOF +4d05b8a011ff9c6132a3ca4ff477a161 cloud_scripts/opt/cloud/bin/line_edit.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/line_edit.py'` -ne 7961 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/line_edit.py' is not 7961" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/get_template_version.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/get_template_version.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/get_template_version.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/get_template_version.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/get_template_version.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# As the last command send to router before any rules operation, wait until boot up done +X +__TIMEOUT=240 +__FLAGFILE=/var/cache/cloud/boot_up_done +done=0 +for i in `seq 1 $(($__TIMEOUT * 10))` +do +X if [ -e $__FLAGFILE ] +X then +X done=1 +X break +X fi +X sleep 0.1 +X if [ $((i % 10)) -eq 0 ] +X then +X logger -t cloud "Waiting for VM boot up done for one second" +X fi +done +X +if [ -z $done ] +then +X # declare we failed booting process +X echo "Waited 60 seconds but boot up haven't been completed" +X exit +fi +X +release=`cat /etc/cloudstack-release` +sig=`cat /var/cache/cloud/cloud-scripts-signature` +echo "${release}&${sig}" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/get_template_version.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/get_template_version.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/get_template_version.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/get_template_version.sh': 'MD5 check failed' + ) << \SHAR_EOF +2234ad00c02a6be63cb0f4f876b8960b cloud_scripts/opt/cloud/bin/get_template_version.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/get_template_version.sh'` -ne 1449 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/get_template_version.sh' is not 1449" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/update_config.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/update_config.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/update_config.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/update_config.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/update_config.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,N87)G=BD*:68@87)G8R`A/2`R(&%N9"!A7,N97AI="@Q*0H*(R!&25A- +M12!W92!S:&]U;&0@9V5T('1H:7,@;&]C871I;VX@9G)O;2!A(&-O;F9I9W5R +M871I;VX@8VQA7,N97AI="AR971U +M2!S<&5E9&EN9R!U<"!L;V%D:6YG('1I;65S +M"B`@("!I9B!N;W0@*&]S+F5N=FER;VXN9V5T*"=$149%4E]#3TY&242YJ7,N87)G=ELQ +M72!O2`]($YO +M;F4*"B`@("!F;W(@:S$L('8Q(&EN(&=U97-T;F5T7V1I8W0N:71E7,N87!P96YD*&LQ*0H*("`@(&EF(&YO +M="!E>&ES=&EN9U]K97ES.@H@("`@("`@("2`Z +M.B!296-O;F9I9W5R:6YG(&=U97-T(&YE='=O&ES=&EN9U]K97ES.@H@("`@("`@("2!I;B!E>&ES=&EN9U]K97ES.@H@("`@("`@(&9O&ES=',@/2!4&ES=',Z"B`@("`@("`@("`@(&)R96%K +M"@H@("`@B(I*3H* +M("`@("`@("!S>7,N97AI="@P*0H@("`@;&]G9VEN9RYE2`Z.B!5;F%B;&4@=&\@7,N97AI="@Q +M*0H*(R!)9B!T:&4@9W5E2`Z.B!.;R!N965D('1O('!R;V-E/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/update_config.py': 'MD5 check failed' + ) << \SHAR_EOF +a2062b2b010940ea783d8256b807c488 cloud_scripts/opt/cloud/bin/update_config.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/update_config.py'` -ne 5136 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/update_config.py' is not 5136" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/edithosts.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/edithosts.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/edithosts.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/edithosts.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/edithosts.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +X +# edithosts.sh -- edit the dhcphosts file on the routing domain +X +usage() { +X printf "Usage: %s: -m -4 -6 -h -d -n -s -u [-N]\n" $(basename $0) >&2 +} +X +mac= +ipv4= +ipv6= +host= +dflt= +dns= +routes= +duid= +nondefault= +X +while getopts 'm:4:h:d:n:s:6:u:N' OPTION +do +X case $OPTION in +X m) mac="$OPTARG" +X ;; +X 4) ipv4="$OPTARG" +X ;; +X 6) ipv6="$OPTARG" +X ;; +X u) duid="$OPTARG" +X ;; +X h) host="$OPTARG" +X ;; +X d) dflt="$OPTARG" +X ;; +X n) dns="$OPTARG" +X ;; +X s) routes="$OPTARG" +X ;; +X N) nondefault=1 +X ;; +X ?) usage +X exit 2 +X ;; +X esac +done +X +DHCP_HOSTS=/etc/dhcphosts.txt +DHCP_OPTS=/etc/dhcpopts.txt +DHCP_LEASES=/var/lib/misc/dnsmasq.leases +HOSTS=/etc/hosts +X +source /root/func.sh +X +lock="biglock" +#default timeout value is 30 mins as DhcpEntryCommand is not synchronized on agent side any more, +#and multiple commands can be sent to the same VR at a time +locked=$(getLockFile $lock 1800) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +grep "redundant_router=1" /var/cache/cloud/cmdline > /dev/null +no_redundant=$? +X +dnsmasq_managed_lease=`cat /var/cache/cloud/dnsmasq_managed_lease` +X +wait_for_dnsmasq () { +X local _pid=$(pidof dnsmasq) +X for i in 0 1 2 3 4 5 6 7 8 9 10 +X do +X sleep 1 +X _pid=$(pidof dnsmasq) +X [ "$_pid" != "" ] && break; +X done +X [ "$_pid" != "" ] && return 0; +X logger -t cloud "edithosts: timed out waiting for dnsmasq to start" +X return 1 +} +X +if [ $dnsmasq_managed_lease ] +then +X #release previous dhcp lease if present +X logger -t cloud "edithosts: releasing $ipv4" +X dhcp_release $(ip route get "$ipv4/32" | grep " dev " | sed -e "s/^.* dev \([^ ]*\) .*$/\1/g") $ipv4 $(grep "$ipv4 " $DHCP_LEASES | awk '{print $2}') > /dev/null 2>&1 +X logger -t cloud "edithosts: released $ipv4" +fi +X +logger -t cloud "edithosts: update $mac $ipv4 $ipv6 $host to hosts" +X +[ ! -f $DHCP_HOSTS ] && touch $DHCP_HOSTS +[ ! -f $DHCP_OPTS ] && touch $DHCP_OPTS +[ ! -f $DHCP_LEASES ] && touch $DHCP_LEASES +X +#delete any previous entries from the dhcp hosts file +sed -i /$mac/d $DHCP_HOSTS +if [ $ipv4 ] +then +X sed -i /$ipv4,/d $DHCP_HOSTS +fi +if [ $ipv6 ] +then +X #searching with [$ipv6], matching other ip so using $ipv6], +X sed -i /$ipv6],/d $DHCP_HOSTS +fi +# don't want to do this in the future, we can have same VM with multiple nics/entries +sed -i /$host,/d $DHCP_HOSTS +X +#put in the new entry +if [ $ipv4 ] +then +X echo "$mac,$ipv4,$host,infinite" >>$DHCP_HOSTS +fi +if [ $ipv6 ] +then +X if [ $nondefault ] +X then +X echo "id:$duid,set:nondefault6,[$ipv6],$host,infinite" >>$DHCP_HOSTS +X else +X echo "id:$duid,[$ipv6],$host,infinite" >>$DHCP_HOSTS +X fi +fi +X +if [ $dnsmasq_managed_lease -eq 0 ] +then +X #delete leases to supplied mac and ip addresses +X if [ $ipv4 ] +X then +X sed -i /$mac/d $DHCP_LEASES +X sed -i /"$ipv4 "/d $DHCP_LEASES +X fi +X if [ $ipv6 ] +X then +X sed -i /$duid/d $DHCP_LEASES +X sed -i /"$ipv6 "/d $DHCP_LEASES +X fi +X sed -i /"$host "/d $DHCP_LEASES +X +X #put in the new entry +X if [ $ipv4 ] +X then +X echo "0 $mac $ipv4 $host *" >> $DHCP_LEASES +X fi +X if [ $ipv6 ] +X then +X echo "0 $duid $ipv6 $host *" >> $DHCP_LEASES +X fi +fi +X +#edit hosts file as well +if [ $ipv4 ] +then +X sed -i /"$ipv4 "/d $HOSTS +fi +if [ $ipv6 ] +then +X sed -i /"$ipv6 "/d $HOSTS +fi +sed -i /" $host$"/d $HOSTS +if [ $ipv4 ] +then +X echo "$ipv4 $host" >> $HOSTS +fi +if [ $ipv6 ] +then +X echo "$ipv6 $host" >> $HOSTS +fi +X +if [ "$dflt" != "" -a "$ipv4" != "" ] +then +X #make sure dnsmasq looks into options file +X sed -i /dhcp-optsfile/d /etc/dnsmasq.conf +X echo "dhcp-optsfile=$DHCP_OPTS" >> /etc/dnsmasq.conf +X +X tag=$(echo $ipv4 | tr '.' '_') +X sed -i /$tag,/d $DHCP_OPTS +X if [ "$dflt" == "0.0.0.0" ] +X then +X logger -t cloud "$0: unset default router for $ipv4" +X logger -t cloud "$0: unset dns server for $ipv4" +X echo "$tag,3" >> $DHCP_OPTS +X echo "$tag,6" >> $DHCP_OPTS +X echo "$tag,15" >> $DHCP_OPTS +X fi +X [ "$routes" != "" ] && echo "$tag,121,$routes" >> $DHCP_OPTS +X #delete entry we just put in because we need a tag +X sed -i /$ipv4,/d $DHCP_HOSTS +X #put it back with a tag +X echo "$mac,set:$tag,$ipv4,$host,infinite" >>$DHCP_HOSTS +fi +X +# make dnsmasq re-read files +pid=$(pidof dnsmasq) +if [ "$pid" != "" ] +then +X # use SIGHUP to avoid service outage if dhcp_release is available. +X if [ $dnsmasq_managed_lease ] +X then +X kill -HUP $pid +X else +X systemctl restart dnsmasq +X fi +else +X if [ $no_redundant -eq 1 ] +X then +X wait_for_dnsmasq +X else +X logger -t cloud "edithosts: skip wait dnsmasq due to redundant virtual router" +X fi +fi +X +ret=$? +unlock_exit $ret $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/edithosts.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/edithosts.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/edithosts.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/edithosts.sh': 'MD5 check failed' + ) << \SHAR_EOF +68e47d6a7efaacefbbaebf8b4e7408c3 cloud_scripts/opt/cloud/bin/edithosts.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/edithosts.sh'` -ne 5502 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/edithosts.sh' is not 5502" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/diagnostics.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/diagnostics.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/diagnostics.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/diagnostics.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/diagnostics.py' && +#!/usr/bin/env python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import shlex +import subprocess +import sys +X +X +def run_cmd(command): +X if command is not None: +X try: +X p = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE) +X stdout, stderr = p.communicate() +X return_code = p.returncode +X +X except OSError as e: +X stdout = "Check your command type" +X stderr = "Exception occurred: %s" % e +X return_code = 1 +X +X finally: +X print('%s&&' % stdout.strip()) +X print('%s&&' % stderr.strip()) +X print('%s' % return_code) +X +X +def get_command(): +X arguments = sys.argv +X cmd = " ".join(arguments[1:]) +X cmd_type = sys.argv[1] +X +X if cmd_type == 'ping': +X if '-c' in arguments: +X return cmd +X else: +X return cmd + " -c 4" +X +X elif cmd_type == 'traceroute': +X if '-m' in arguments: +X return cmd +X else: +X return cmd + " -m 20" +X +X elif cmd_type == 'arping': +X if '-c' in arguments: +X return cmd +X else: +X return cmd + " -c 4" +X +X else: +X return None +X +X +if __name__ == "__main__": +X command = get_command() +X run_cmd(command) +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/diagnostics.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/diagnostics.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/diagnostics.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/diagnostics.py': 'MD5 check failed' + ) << \SHAR_EOF +91a837e5bcafee663cbfb8532574405a cloud_scripts/opt/cloud/bin/diagnostics.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/diagnostics.py'` -ne 2012 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/diagnostics.py' is not 2012" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_monitorservice.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_monitorservice.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_monitorservice.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_monitorservice.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py': 'MD5 check failed' + ) << \SHAR_EOF +1121a063f2dbcfc1bdc426ceba249184 cloud_scripts/opt/cloud/bin/cs_monitorservice.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py'` -ne 1541 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py' is not 1541" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpn_l2tp.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpn_l2tp.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpn_l2tp.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +X +X +#set -x +usage() { +X printf "Usage:\n" +X printf "Create VPN : %s -c -r -l -p -s -i \n" $(basename $0) +X printf "Delete VPN : %s -d -l -s -D -C < local cidr> \n" $(basename $0) +X printf "Add VPN User : %s -u \n" $(basename $0) +X printf "Remote VPN User: %s -U /dev/null +X then +X is_vpc=true +X fi +X +X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 500 -j ACCEPT +X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 4500 -j ACCEPT +X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 1701 -j ACCEPT +X sudo iptables $op INPUT -i $dev -p ah -j ACCEPT +X sudo iptables $op INPUT -i $dev -p esp -j ACCEPT +X if $is_vpc +X then +X # Need to apply the following ACL rules as well. +X if sudo iptables -N VPN_FORWARD &> /dev/null +X then +X sudo iptables -I FORWARD -i ppp+ -j VPN_FORWARD +X sudo iptables -I FORWARD -o ppp+ -j VPN_FORWARD +X sudo iptables -A VPN_FORWARD -j DROP +X fi +X sudo iptables $op VPN_FORWARD -i ppp+ -o ppp+ -j RETURN +X sudo iptables $op VPN_FORWARD -i ppp+ -d $cidr -j RETURN +X sudo iptables $op VPN_FORWARD -s $cidr -o ppp+ -j RETURN +X else +X sudo iptables $op FORWARD -i ppp+ -d $cidr -j ACCEPT +X sudo iptables $op FORWARD -s $cidr -o ppp+ -j ACCEPT +X sudo iptables $op FORWARD -i ppp+ -o ppp+ -j ACCEPT +X fi +X sudo iptables $op INPUT -i ppp+ -m udp -p udp --dport 53 -j ACCEPT +X sudo iptables $op INPUT -i ppp+ -m tcp -p tcp --dport 53 -j ACCEPT +X sudo iptables -t nat $op PREROUTING -i ppp+ -p tcp -m tcp --dport 53 -j DNAT --to-destination $local_ip +X sudo iptables -t nat $op PREROUTING -i ppp+ -p udp -m udp --dport 53 -j DNAT --to-destination $local_ip +X +X if $is_vpc +X then +X return +X fi +X +X if sudo iptables -t mangle -N VPN_$public_ip &> /dev/null +X then +X logger -t cloud "$(basename $0): created VPN chain in PREROUTING mangle" +X sudo iptables -t mangle -I PREROUTING -d $public_ip -j VPN_$public_ip +X sudo iptables -t mangle -A VPN_$public_ip -j RETURN +X fi +X op2="-D" +X [ "$op" == "-A" ] && op2="-I" +X sudo iptables -t mangle $op VPN_$public_ip -p ah -j ACCEPT +X sudo iptables -t mangle $op VPN_$public_ip -p esp -j ACCEPT +} +X +start_ipsec() { +X systemctl is-active ipsec > /dev/null +X if [ $? -ne 0 ] +X then +X systemctl start ipsec > /dev/null +X #Wait until ipsec started, 5 seconds at most +X for i in {1..5} +X do +X logger -t cloud "$(basename $0): waiting ipsec start..." +X systemctl is-active ipsec > /dev/null +X result=$? +X if [ $result -eq 0 ] +X then +X break +X fi +X sleep 1 +X done +X fi +X systemctl is-active ipsec > /dev/null +X return $? +} +X +ipsec_server() { +X local op=$1 +X case $op in +X "start") start_ipsec +X sudo systemctl start xl2tpd +X ;; +X "stop") sudo systemctl stop xl2tpd +X ;; +X "restart") start_ipsec +X sudo ipsec auto --rereadall +X systemctl stop xl2tpd +X systemctl start xl2tpd +X ;; +X esac +} +X +create_l2tp_ipsec_vpn_server() { +X local ipsec_psk=$1 +X local public_ip=$2 +X local client_range=$3 +X local local_ip=$4 +X +X sed -i -e "s/left=.*$/left=$public_ip/" /etc/ipsec.d/l2tp.conf +X echo "$public_ip %any : PSK \"$ipsec_psk\"" > /etc/ipsec.d/ipsec.any.secrets +X sed -i -e "s/^ip range = .*$/ip range = $client_range/" /etc/xl2tpd/xl2tpd.conf +X sed -i -e "s/^local ip = .*$/local ip = $local_ip/" /etc/xl2tpd/xl2tpd.conf +X +X sed -i -e "s/^ms-dns.*$/ms-dns $local_ip/" /etc/ppp/options.xl2tpd +X +X iptables_ "-D" $public_ip +X iptables_ "-I" $public_ip +X +X ipsec_server "restart" +X +X ipsec auto --rereadsecrets +X ipsec auto --replace L2TP-PSK +} +X +destroy_l2tp_ipsec_vpn_server() { +X local public_ip=$1 +X +X ipsec auto --down L2TP-PSK +X +X iptables_ "-D" $public_ip +X +X ipsec_server "stop" +} +X +remove_l2tp_ipsec_user() { +X local u=$1 +X sed -i -e "/^$u .*$/d" /etc/ppp/chap-secrets +X if [ -x /usr/bin/tdbdump ]; then +X pid=$(tdbdump /var/run/pppd2.tdb | grep -w $u | awk -F';' '{print $4}' | awk -F= '{print $2}') +X [ "$pid" != "" ] && kill -9 $pid +X fi +X return 0 +} +X +add_l2tp_ipsec_user() { +X local u=$1 +X local passwd=$2 +X +X uptodate=$(grep "^$u \* \"$passwd\" \*$" /etc/ppp/chap-secrets) +X if [ "$uptodate" == "" ] +X then +X remove_l2tp_ipsec_user $u +X echo "$u * \"$passwd\" *" >> /etc/ppp/chap-secrets +X fi +} +X +rflag= +pflag= +lflag= +sflag= +create= +destroy= +useradd= +userdel= +dev= +cidr= +X +while getopts 'cdl:p:r:s:u:U:i:C:' OPTION +do +X case $OPTION in +X c) create=1 +X ;; +X d) destroy=1 +X ;; +X u) useradd=1 +X user_pwd="$OPTARG" +X ;; +X U) userdel=1 +X user="$OPTARG" +X ;; +X r) rflag=1 +X client_range="$OPTARG" +X ;; +X p) pflag=1 +X ipsec_psk="$OPTARG" +X ;; +X l) lflag=1 +X local_ip="$OPTARG" +X ;; +X s) sflag=1 +X server_ip="$OPTARG" +X ;; +X i) dev="$OPTARG" +X ;; +X C) cidr="$OPTARG" +X ;; +X ?) usage +X exit 2 +X ;; +X esac +done +X +if [ "$dev" == "" ] +then +X dev="eth2" +fi +X +if [ "$cidr" == "" ] +then +X cidr=$(get_intf_ip "eth0") +fi +X +[ "$create$destroy" == "11" ] || [ "$create$destroy$useradd$userdel" == "" ] && usage && exit 2 +[ "$create" == "1" ] && [ "$lflag$pflag$rflag$sflag" != "1111" ] && usage && exit 2 +X +if [ "$create" == "1" ]; then +X create_l2tp_ipsec_vpn_server $ipsec_psk $server_ip $client_range $local_ip +X exit $? +fi +X +if [ "$destroy" == "1" ]; then +X destroy_l2tp_ipsec_vpn_server $server_ip +X exit $? +fi +X +if [ "$useradd" == "1" ]; then +X u=$(echo $user_pwd | awk -F',' '{print $1}') +X pwd=$(echo $user_pwd | awk -F',' '{print $2}') +X add_l2tp_ipsec_user $u $pwd +X exit $? +fi +if [ "$userdel" == "1" ]; then +X remove_l2tp_ipsec_user $user +X exit $? +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpn_l2tp.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh': 'MD5 check failed' + ) << \SHAR_EOF +79e41044b43cc49c6b11859534bc454d cloud_scripts/opt/cloud/bin/vpn_l2tp.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh'` -ne 6986 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' is not 6986" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_guestnetwork.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_guestnetwork.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_guestnetwork.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +keys = ['eth1', 'eth2', 'eth3', 'eth4', 'eth5', 'eth6', 'eth7', 'eth8', 'eth9'] +X +X +def merge(dbag, gn): +X device = gn['device'] +X +X if not gn['add'] and device in dbag: +X +X if dbag[device]: +X device_to_die = dbag[device][0] +X try: +X dbag[device].remove(device_to_die) +X except ValueError, e: +X print "[WARN] cs_guestnetwork.py :: Error occurred removing item from databag. => %s" % device_to_die +X del(dbag[device]) +X else: +X del(dbag[device]) +X +X else: +X dbag.setdefault(device, []).append(gn) +X +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_guestnetwork.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py': 'MD5 check failed' + ) << \SHAR_EOF +599105da1bdfaced1f2c8078d3fbed19 cloud_scripts/opt/cloud/bin/cs_guestnetwork.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py'` -ne 1401 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' is not 1401" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_vmdata.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vmdata.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vmdata.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, metadata): +X dbag[metadata["vm_ip_address"]] = metadata["vm_metadata"] +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_vmdata.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vmdata.py': 'MD5 check failed' + ) << \SHAR_EOF +3ee2451cb48927d361f05bb5fe3df4ce cloud_scripts/opt/cloud/bin/cs_vmdata.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vmdata.py'` -ne 892 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' is not 892" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/dnsmasq.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/dnsmasq.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/dnsmasq.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +usage() { +X printf "Usage: %s: \n" $(basename $0) >&2 +} +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +#set -x +#backup the old config file +DHCP_CONFIG=/etc/dnsmasq.d/multiple_ranges.conf +DHCP_CONFIG_BAK=/etc/dnsmasq.d/multiple_ranges.conf.bak +DHCP_CONFIG_MAIN=/etc/dnsmasq.conf +DHCP_CONFIG_MAIN_BAK=/etc/dnsmasq.conf.bak +DHCP_FAILURE_CONFIG=/etc/multiple_ranges.conf.failure +DHCP_FAILURE_CONFIG_MAIN=/etc/dnsmasq.conf.failure +CMDLINE=$(cat /var/cache/cloud/cmdline | tr '\n' ' ') +X +#take a backup copy of the dnsmasq file. +cp "$DHCP_CONFIG_MAIN" "$DHCP_CONFIG_MAIN_BAK" +cp "$DHCP_CONFIG" "$DHCP_CONFIG_BAK" +X +#empty the config file +echo > $DHCP_CONFIG +X +var="$1" +dhcp_range="" +dhcp_gateway="" +dhcp_netmask="" +dns_option="" +dns_servers="" +count=0 +X +X +# fetching the dns Ips from the command line. +dns1=$(echo "$CMDLINE" | grep -o " dns1=[[:digit:]].* " | sed -e 's/dns1=//' | awk '{print $1}') +dns2=$(echo "$CMDLINE" | grep -o " dns2=[[:digit:]].* " | sed -e 's/dns2=//' | awk '{print $1}') +X +dns_servers="${dns1}" +if [ -n "$dns2" ] +then +dns_servers="${dns1},${dns2}" +fi +X +X +# check if useextdns is true +use_ext_dns=$(echo "$CMDLINE" | grep -o "useextdns=true") +while [ -n "$var" ] +do +X var1=$(echo $var | cut -f1 -d "-") +X routerip=$( echo $var1 | cut -f1 -d ":" ) +X gateway=$(echo $var1 | cut -f2 -d ":") +X netmask=$(echo $var1 | cut -f3 -d ":") +X start_ip_of_subnet=$(echo $var1 | cut -f4 -d ":") +X dhcp_range="${dhcp_range}"'dhcp-range=set:range'$count","$start_ip_of_subnet",static \n" +X dhcp_gateway="${dhcp_gateway}"'dhcp-option=tag:range'$count",3,"$gateway" \n" +X dhcp_netmask="${dhcp_netmask}"'dhcp-option=tag:range'$count",1,"$netmask" \n" +X if [ -n "$use_ext_dns" ] +X then +X dns_option="${dns_option}"'dhcp-option=tag:range'$count",6,"$dns_servers" \n" +X else +X dns_option="${dns_option}"'dhcp-option=tag:range'$count",6,$routerip"","$dns_servers" \n" +X fi +X var=$( echo $var | sed "s/${var1}-//" ) +X count=$[$count+1] +done +X +#logging the configuration being removed. +log="" +log="${log}"`grep "^dhcp-option=6" "$DHCP_CONFIG_MAIN"`"\n" +log="${log}"`grep "^dhcp-option=option:router" "$DHCP_CONFIG_MAIN"`"\n" +log="${log}"`grep "^dhcp-range=" "$DHCP_CONFIG_MAIN"`"\n" +X +if [ "$log" != '\n\n\n' ] +then +X #Cleaning the existing dhcp confgiuration +X logger -t cloud "dnsmasq.sh: remvoing the primaryip confg from dnsmasq.conf and adding it to /etc/dnsmaq.d/multiple_ranges.conf" +X logger -t cloud "dnsmasq.sh: config removed from dnsmasq.conf is $log" +X sed -i -e '/dhcp-option=6/d' "$DHCP_CONFIG_MAIN" +X sed -i -e '/dhcp-option=option:router/d' "$DHCP_CONFIG_MAIN" +X sed -i -e '/^dhcp-range=/d' "$DHCP_CONFIG_MAIN" +fi +X +#wrting the new config into the config file. +echo -e "$dhcp_range" >> "$DHCP_CONFIG" +echo -e "$dhcp_gateway" >> "$DHCP_CONFIG" +echo -e "$dhcp_netmask" >> "$DHCP_CONFIG" +echo -e "$dns_option" >> "$DHCP_CONFIG" +X +X +#restart the dnsmasq +systemctl restart dnsmasq +result=$? +if [ "$result" -ne "0" ] +then +X logger -t cloud "dnsmasq.sh: could not configure dnsmasq" +X logger -t cloud "dnsmasq.sh: reverting to the old config" +X logger -t cloud "dnsmasq.sh: copying the failure config to `$DHCP_FAILURE_CONFIG` and `$DHCP_FAILURE_CONFIG_MAIN`" +X cp "$DHCP_CONFIG" "$DHCP_FAILURE_CONFIG" +X cp "$DHCP_CONFIG_MAIN" "$DHCP_FAILURE_CONFIG_MAIN" +X cp "$DHCP_CONFIG_BAK" "$DHCP_CONFIG" +X cp "$DHCP_CONFIG_MAIN_BAK" "$DHCP_CONFIG_MAIN" +X systemctl restart dnsmasq +X unlock_exit $result $lock $locked +fi +rm "$DHCP_CONFIG_BAK" +rm "$DHCP_CONFIG_MAIN_BAK" +unlock_exit $result $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/dnsmasq.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/dnsmasq.sh': 'MD5 check failed' + ) << \SHAR_EOF +d603da3043a61bea911e21fb4da8ded0 cloud_scripts/opt/cloud/bin/dnsmasq.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/dnsmasq.sh'` -ne 4359 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' is not 4359" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_dhcp.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_dhcp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_dhcp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_dhcp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_dhcp.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2P@96YT2!N;W0@ +M:6X@7,Z"B`@("`@("`@("`@(')E;6]V95]K97ES+F%D9"AK +M97DI"@H@("`@("`@(&9O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_dhcp.py': 'MD5 check failed' + ) << \SHAR_EOF +9b17e95a8fcb1cf185c9e74cc6ddecca cloud_scripts/opt/cloud/bin/cs_dhcp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_dhcp.py'` -ne 1533 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_dhcp.py' is not 1533" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_cmdline.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_cmdline.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_cmdline.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, cmdline): +X if 'redundant_router' in cmdline['cmd_line']: +X cmdline['cmd_line']['redundant_router'] = "true" +X else: +X cmdline['cmd_line']['redundant_router'] = "false" +X dbag['config'] = cmdline['cmd_line'] +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_cmdline.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_cmdline.py': 'MD5 check failed' + ) << \SHAR_EOF +a6290582c86832c4c94985580ceda8e5 cloud_scripts/opt/cloud/bin/cs_cmdline.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_cmdline.py'` -ne 1045 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' is not 1045" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/prepare_pxe.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/prepare_pxe.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/prepare_pxe.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' && +#!/bin/sh +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# # regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +X +set +u +X +err_exit() { +X echo $1 +X exit 1 +} +X +success() { +X exit 0 +} +X +TFTP_ROOT='/opt/tftpboot' +PXELINUX_CFG_DIR='/opt/tftpboot/pxelinux.cfg' +X +kernel_nfs_path=$1 +kernel_file_name=`basename $kernel_nfs_path` +initrd_nfs_path=$2 +initrd_file_name=`basename $initrd_nfs_path` +tmpt_uuid=$3 +pxe_cfg_filename=$4 +ks_file=$5 +X +kernel_path=$tmpt_uuid/$kernel_file_name +initrd_path=$tmpt_uuid/$initrd_file_name +X +cat > $PXELINUX_CFG_DIR/$pxe_cfg_filename </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh': 'MD5 check failed' + ) << \SHAR_EOF +8b495c4ea50905f4197974ee82e607ba cloud_scripts/opt/cloud/bin/prepare_pxe.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh'` -ne 1792 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' is not 1792" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_forwardingrules.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_forwardingrules.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_forwardingrules.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, rules): +X for rule in rules["rules"]: +X source_ip = rule["source_ip_address"] +X destination_ip = rule["destination_ip_address"] +X revoke = rule["revoke"] +X +X newrule = dict() +X newrule["public_ip"] = source_ip +X newrule["internal_ip"] = destination_ip +X +X if rules["type"] == "staticnatrules": +X newrule["type"] = "staticnat" +X elif rules["type"] == "forwardrules": +X newrule["type"] = "forward" +X newrule["public_ports"] = rule["source_port_range"] +X newrule["internal_ports"] = rule["destination_port_range"] +X newrule["protocol"] = rule["protocol"] +X +X if not revoke: +X if rules["type"] == "staticnatrules": +X dbag[source_ip] = [newrule] +X elif rules["type"] == "forwardrules": +X index = -1 +X if source_ip in dbag.keys(): +X for forward in dbag[source_ip]: +X if ruleCompare(forward, newrule): +X index = dbag[source_ip].index(forward) +X if not index == -1: +X dbag[source_ip][index] = newrule +X else: +X dbag[source_ip].append(newrule) +X else: +X dbag[source_ip] = [newrule] +X else: +X if rules["type"] == "staticnatrules": +X if source_ip in dbag.keys(): +X del dbag[source_ip] +X elif rules["type"] == "forwardrules": +X if source_ip in dbag.keys(): +X index = -1 +X for forward in dbag[source_ip]: +X if ruleCompare(forward, newrule): +X index = dbag[source_ip].index(forward) +X print "removing index %s" % str(index) +X if not index == -1: +X del dbag[source_ip][index] +X +X return dbag +X +X +# Compare function checks only the public side, those must be equal the internal details could change +def ruleCompare(ruleA, ruleB): +X if not ruleA["type"] == ruleB["type"]: +X return False +X if ruleA["type"] == "staticnat": +X return ruleA["public_ip"] == ruleB["public_ip"] +X elif ruleA["type"] == "forward": +X return ruleA["public_ip"] == ruleB["public_ip"] and ruleA["public_ports"] == ruleB["public_ports"] \ +X and ruleA["protocol"] == ruleB["protocol"] +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_forwardingrules.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py': 'MD5 check failed' + ) << \SHAR_EOF +278288da98263d674e9d0d0aecaca56d cloud_scripts/opt/cloud/bin/cs_forwardingrules.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py'` -ne 3239 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' is not 3239" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpc_netusage.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_netusage.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_netusage.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +source /root/func.sh +source /opt/cloud/bin/vpc_func.sh +X +vpnoutmark="0x525" +vpninmark="0x524" +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s -[c|g|r|n|d] [-l ] [-v ] \n" $(basename $0) >&2 +} +X +create_usage_rules () { +X iptables-save|grep "NETWORK_STATS_$ethDev" > /dev/null +X if [ $? -gt 0 ] +X then +X iptables -N NETWORK_STATS_$ethDev > /dev/null; +X iptables -I FORWARD -j NETWORK_STATS_$ethDev > /dev/null; +X iptables -A NETWORK_STATS_$ethDev -o $ethDev -s $vcidr > /dev/null; +X iptables -A NETWORK_STATS_$ethDev -i $ethDev -d $vcidr > /dev/null; +X fi +X return $? +} +X +create_vpn_usage_rules () { +X iptables-save|grep "VPN_STATS_$ethDev" > /dev/null +X if [ $? -gt 0 ] +X then +X iptables -t mangle -N VPN_STATS_$ethDev > /dev/null; +X iptables -t mangle -I FORWARD -j VPN_STATS_$ethDev > /dev/null; +X iptables -t mangle -A VPN_STATS_$ethDev -o $ethDev -m mark --mark $vpnoutmark > /dev/null; +X iptables -t mangle -A VPN_STATS_$ethDev -i $ethDev -m mark --mark $vpninmark > /dev/null; +X fi +X return $? +} +X +remove_usage_rules () { +X return 0 +} +X +get_usage () { +X iptables -L NETWORK_STATS_$ethDev -n -v -x 2> /dev/null | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null +X return 0 +} +X +get_vpn_usage () { +X iptables -t mangle -L VPN_STATS_$ethDev -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null +X if [ $? -gt 0 ] +X then +X printf $? +X return 1 +X fi +} +X +reset_usage () { +X iptables -Z NETWORK_STATS_$ethDev > /dev/null +X if [ $? -gt 0 -a $? -ne 2 ] +X then +X return 1 +X fi +} +X +#set -x +X +cflag= +gflag= +rflag= +lflag= +vflag= +nflag= +dflag= +X +while getopts 'cgndrl:v:' OPTION +do +X case $OPTION in +X c) cflag=1 +X ;; +X g) gflag=1 +X ;; +X r) rflag=1 +X ;; +X l) lflag=1 +X publicIp="$OPTARG" +X ;; +X v) vflag=1 +X vcidr="$OPTARG" +X ;; +X n) nflag=1 +X ;; +X d) dflag=1 +X ;; +X i) #Do nothing, since it's parameter for host script +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +ethDev=$(getEthByIp $publicIp) +if [ "$cflag" == "1" ] +then +X if [ "$ethDev" != "" ] +X then +X create_usage_rules +X create_vpn_usage_rules +X unlock_exit 0 $lock $locked +X fi +fi +X +if [ "$gflag" == "1" ] +then +X get_usage +X unlock_exit $? $lock $locked +fi +X +if [ "$nflag" == "1" ] +then +X #get_vpn_usage +X unlock_exit $? $lock $locked +fi +X +if [ "$dflag" == "1" ] +then +X #remove_usage_rules +X unlock_exit 0 $lock $locked +fi +X +if [ "$rflag" == "1" ] +then +X reset_usage +X unlock_exit $? $lock $locked +fi +X +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_netusage.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh': 'MD5 check failed' + ) << \SHAR_EOF +f3f8069de696e92a24cbc694275c0bd5 cloud_scripts/opt/cloud/bin/vpc_netusage.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh'` -ne 3377 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' is not 3377" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/configure.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/configure.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/configure.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/configure.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/configure.py +M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&-E<'0@24]%2@I"B`@("`@("`@ +M("`@("`@("`@("`@9W5E22R)$;VU57U)E<75E&-E<'0@17AC97!T:6]N(&%S +M(&4Z"B`@("`@("`@("`@("`@("`@("`@;&]G9VEN9RYE7!E)UT@/3T@)V%L;"<@86YD(&]B +M:ELG7!E(#T@(F%N>2(*("`@("`@("`@("`@:68@ +M(FEC;7!?='EP92(@:6X@7,H*2!A;F0@7!E)UT*("`@("`@("`@("`@:68@(FEC +M;7!?8V]D92(@:6X@7,H*2!A;F0@7!E)UTL('-E;&8N7!E("5S("UJ("5S(B`E("AI8VUP7W1Y<&4L('-E;&8N&5C=71E*&1S=$EP2==.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U +M;&5;)V%C=&EO;B==(#T@(D%#0T505"(*("`@("`@("`@("`@("`@("`@("!E +M;'-E.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5;)V%C=&EO +M;B==(#T@(D123U`B"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@ +M("`@("`@("`@(",@1F]R(&]T:&5R(')U;&5S(&%D9&5D+"!I9B!D969A=6QT +M7V5G7!E("5S(B`E(&EC;7!?='EP90H@("`@("`@("`@ +M("`@("`@96QI9B!R=6QE6R=P7!E+B!3;RP@:71S(&9W(&%T=')I8G5T92!I7!E +M(#T@(F%N>2(*("`@("`@("`@("`@("`@('-E;&8N<')O=&]C;VP@/2!S96QF +M+G1Y<&4*("`@("`@("`@("`@("`@(&EF(")I8VUP7W1Y<&4B(&EN(')U;&4N +M:V5Y7!E+"!R=6QE6R=I8VUP7V-O9&4G72D*("`@("`@("`@("`@("`@(&EF('-E +M;&8N='EP92`]/2`B<')O=&]C;VPB.@H@("`@("`@("`@("`@("`@("`@(&EF +M(')U;&5;)W!R;W1O8V]L)UT@/3T@-#$Z"B`@("`@("`@("`@("`@("`@("`@ +M("`@(')U;&5;)W!R;W1O8V]L)UT@/2`B:7!V-B(*("`@("`@("`@("`@("`@ +M("`@("!S96QF+G!R;W1O8V]L(#T@&5C=71E*")I +M<'1A8FQE+4$O:7!T86)L97,@+70@9FEL=&5R("U$+V&5C=71E +M*")I<'-E="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\ +M(&EP&5C=71E*")I<'-E +M="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP2!V86QI9"!D871A"B`@("`@("`@("`@("`@("!I9B!F;VQD97(@(3T@(G5S +M97)D871A(B!A;F0@9F]L9&5R("$](")M971A9&%T82(Z"B`@("`@("`@("`@ +M("`@("`@("`@8V]N=&EN=64*"B`@("`@("`@("`@("`@("!I9B!F:6QE(#T] +M("(B.@H@("`@("`@("`@("`@("`@("`@(&-O;G1I;G5E"@H@("`@("`@("`@ +M("`@("`@7,N97AI="@Q*0H@("`@("`@("`@("!I9B!O2Q!;&QO=UQN1&5N>2!F2!E>&ES=',L('=E(&1O(&ET('1H +M:7,@=V%Y(&9O7,N97AI +M="@Q*0H*("`@("`@("!F:"`](&]P96XH:'1A8V-E2`] +M(")297=R:71E4G5L92!>;65T82UD871A+R@N*RDD("`N+B\B("L@9F]L9&5R +M("L@(B\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%=(@H@("`@("`@("`@ +M("!H=&%C8V5S7,N97AI="@Q +M*2`@(R!&25A-10H@("`@("`@(')E='5R;B!4&ET*#$I("`C($9)6$U%"B`@("`@("`@:7!S96,N=G!N+2@N*BDN8V]N9B(L(&9I;&4I"B`@ +M("`@("`@("`@(&EF(&TZ"B`@("`@("`@("`@("`@("!S96QF+F-O;F9I<',N +M87!P96YD*&TN9W)O=7`H,2DI"@H@("`@("`@(&9O&5C=71E*")I +M<'-E8R!R96QO860B*0H*("`@(&1E9B!C;VYF:6=U#4R-2`M:B!!0T-%4%0B("4@9&5V72D* +M("`@("`@("!F;W(@;F5T(&EN(&]B:ELG<&5E&UA&UA5]I<"=="B`@("`@("`@<&5E7!E/71U;FYE;"(I +M"B`@("`@("`@9FEL92YA9&1E<2@B(&%U=&AB>3US96-R970B*0H@("`@("`@ +M(&9I;&4N861D97$H(B!K97EE>&-H86YG93UI:V4B*0H@("`@("`@(&9I;&4N +M861D97$H(B!I:V4])7,B("4@:6ME<&]L:6-Y*0H@("`@("`@(&9I;&4N861D +M97$H(B!I:V5L:69E=&EM93TE3TS,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1T:6UE;W5T +M/3$R,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1A8W1I;VX]')A;F=E*#,I.@H@("`@("`@("`@ +M("!R97-U;'0@/2!#&5C=71E*"=I<'-E8R!S=&%T=7,@=G!N +M+25S('P@9W)E<"`B)7,B)R`E("AR:6=H='!E97(L('!E97)L:7-T+G-P;&ET +M*"(L(BP@,2E;,%TI*0H@("`@("`@("`@("!I9B!L96XH2P@)R,G*0H@("`@("`@(&EF(&YO="!U&5C=71E*")T9&)D=6UP("]V87(O&5C=71E*"=K:6QL("TY("5S)R`E('!I9"D*"@IC;&%S +M&5C=71E*")S>7-T96UC=&P@2YS96-R971S(B`E("AS96QF+E903D-/3D9$25(I"B`@ +M("`@("`@>&PR='!D8V]N9F9I;&4@/2`B+V5T8R]X;#)T<&0O>&PR='!D+F-O +M;F8B"B`@("`@("`@>&PR='!O<'1I;VYS9FEL92`]("(O971C+W!P<"]O<'1I +M;VYS+GAL,G1P9"(*"B`@("`@("`@;&]C86QI<"`](&]B:ELG;&]C86Q?:7`G +M70H@("`@("`@(&QO8V%L8VED2`Z(%!32R!<(B5S7"(B("4@*&QE9G0L('!S:RDI"B`@ +M("`@("`@&PR='!D8V]N9F9I;&4I"B`@("`@("`@>&PR='!D8V]N9BYA9&1E +M<2@B:7`@&PR='!O<'1I;VYS+F-O;6UI="@I"@H@("`@9&5F(')E;6]T96%C8V5S +M2@I"B`@("`@("`@4EP +M*')U;&5;)W!U8FQI8U]I<"==*0H@("`@("`@(&EN=&5R;F%L7V9W:6YT97)F +M86-E(#T@4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI +M"B`@("`@("`@<'5B;&EC7V9W<&]R=',@/2!S96QF+G!O4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI +M+`H@("`@("`@("`@("`@("`@&UA2(Z"B`@("`@("`@("`@(&9W7W!R97)O=71? +M2(Z"B`@("`@ +M("`@("`@(&9W7W!O2(Z"B`@("`@("`@ +M("`@(&9W7W!O2(Z"B`@("`@ +M("`@("`@(&9W7V]U='!U=%]R=6QE("L]("(@+2UD<&]R="`E2(Z"B`@("`@("`@("`@ +M(&9W7V]U='!U=%]R=6QE("L]("(Z(B`K('-E;&8N<&]R='-4;U-T4EP*')U;&5;)VEN=&5R;F%L7VEP +M)UTI+`H@("`@("`@("`@("`@("`@&9F9F9F9F9F +M("TM8W1M87-K(#!X9F9F9F9F9F8B("4*("`@("`@("`@("`@("`@("`@("`@ +M("`@4EP*')U;&5;(FEN=&5R;F%L +M7VEP(ETI+"!S96QF+F=E=$=U97-T27`H*2E=*0H*"F-L87-S($EP5&%B;&5S +M17AE8W5T;W(Z"@H@("`@8V]N9FEG(#T@3F]N90H*("`@(&1E9B!?7VEN:71? +M7RAS96QF+"!C;VYF:62!PR)P&5C=71OR)P&5C=71OR)P&5C=71O7!E.B`E&5C27!T86)L97,H8V]N9FEG +M*3H*("`@("`@("!L;V=G:6YG+F1E8G5G*")0&5C=71O7,H*3H*("`@("`@("`@ +M("`@97AE8T1A=&%B86&5C +M27!T86)L97,H8V]N9FEG*0H@("`@96QI9B!J&5C27!T86)L +M97,H8V]N9FEG*0H@("`@96QS93H*("`@("`@("!L;V=G:6YG+G=A7!E/25S(B`E("AP/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/configure.py': 'MD5 check failed' + ) << \SHAR_EOF +8987217852a386250687dfce6d0b10be cloud_scripts/opt/cloud/bin/configure.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/configure.py'` -ne 45920 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/configure.py' is not 45920" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_vmp.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vmp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vmp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vmp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_vmp.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=WWT*("`@(')C6R=I9"==(#T@)W9M<&%S/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vmp.py': 'MD5 check failed' + ) << \SHAR_EOF +3e1ea6831cb27eedc825e25bf817cb9c cloud_scripts/opt/cloud/bin/cs_vmp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vmp.py'` -ne 1126 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vmp.py' is not 1126" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# getRouterMonitorResults.sh --- Send the monitor results to Management Server +X +if [ "$1" == "true" ] +then +X python /root/monitorServices.py > /dev/null +fi +X +printf "FAILING CHECKS:\n" +X +if [ -f /root/basic_failing_health_checks ] +then +X echo `cat /root/basic_failing_health_checks` +fi +X +if [ -f /root/advanced_failing_health_checks ] +then +X echo `cat /root/advanced_failing_health_checks` +fi +X +printf "MONITOR RESULTS:\n" +X +echo "{\"basic\":" +if [ -f /root/basic_monitor_results.json ] +then +X echo `cat /root/basic_monitor_results.json` +else +X echo "{}" +fi +echo ",\"advanced\":" +if [ -f /root/advanced_monitor_results.json ] +then +X echo `cat /root/advanced_monitor_results.json` +else +X echo "{}" +fi +X +echo "}" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh': 'MD5 check failed' + ) << \SHAR_EOF +35649a8a1a8339aaa42a311826699849 cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh'` -ne 1526 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' is not 1526" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vr_cfg.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vr_cfg.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vr_cfg.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +#set -x +X +cfg= +version= +log=/var/log/cloud.log +X +log_it() { +X logger -t cloud "$*" +X echo "$(date) : $*" >> $log +} +X +while getopts 'c:' OPTION; do +X case $OPTION in +X c) cfg="$OPTARG" ;; +esac; done +X +export DEFER_CONFIG=true +while read line; do +X #comment +X if [[ $line == \#* ]]; then +X continue +X +X elif [ "$line" == "" ]; then +X read line +X version=$line +X log_it "VR config: configuation format version $version" +X #skip +X read line +X +X elif [ "$line" == " +X read line +X log_it "VR config: execution success " +X +X elif [ "$line" == "" ]; then +X read line +X file=$line +X log_it "VR config: creating file: $file" +X rm -f $file +X while read -r line; do +X if [ "$line" == "" ]; then +X break +X fi +X echo $line >> $file +X done +X log_it "VR config: create file success" +X +X fi +X +done < $cfg +X +# archive the configuration file +mv $cfg /var/cache/cloud/processed/ +X +unset DEFER_CONFIG +# trigger finish_config() +if [ -f /etc/cloudstack/dhcpentry.json ]; then +X /opt/cloud/bin/configure.py vm_dhcp_entry.json +fi +if [ -f /etc/cloudstack/vmdata.json ]; then +X /opt/cloud/bin/configure.py vm_metadata.json +fi +X +# Flush kernel conntrack table +log_it "VR config: Flushing conntrack table" +conntrackd -d 2> /dev/null +if [ $? -eq 0 ]; then +X conntrackd -F +X conntrackd -k +else +X conntrackd -F +fi +log_it "VR config: Flushing conntrack table completed" +X +Xexit 0 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vr_cfg.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vr_cfg.sh': 'MD5 check failed' + ) << \SHAR_EOF +da02bd413616a9cc131fd039e627eb3e cloud_scripts/opt/cloud/bin/vr_cfg.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vr_cfg.sh'` -ne 2725 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' is not 2725" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpc_snat.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_snat.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_snat.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# @VERSION@ +X +source /root/func.sh +source /opt/cloud/bin/vpc_func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage:\n %s -A -l \n" $(basename $0) >&2 +X printf " %s -D -l \n" $(basename $0) >&2 +} +X +X +add_snat() { +X logger -t cloud "$(basename $0):Added SourceNAT $pubIp on interface $ethDev" +X vpccidr=$(getVPCcidr) +X sudo iptables -D FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT +X sudo iptables -A FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT +X sudo iptables -t nat -D POSTROUTING -j SNAT -o $ethDev --to-source $pubIp +X sudo iptables -t nat -A POSTROUTING -j SNAT -o $ethDev --to-source $pubIp +X return $? +} +remove_snat() { +X logger -t cloud "$(basename $0):Removing SourceNAT $pubIp on interface $ethDev" +X sudo iptables -t nat -D POSTROUTING -j SNAT -o $ethDev --to-source $pubIp +X return $? +} +X +#set -x +lflag=0 +cflag=0 +op="" +X +while getopts 'ADl:c:' OPTION +do +X case $OPTION in +X A) Aflag=1 +X op="-A" +X ;; +X D) Dflag=1 +X op="-D" +X ;; +X l) lflag=1 +X pubIp="$OPTARG" +X ;; +X c) cflag=1 +X ethDev="$OPTARG" +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [ "$Aflag$Dflag" != "1" ] +then +X usage +X unlock_exit 2 $lock $locked +fi +X +if [ "$lflag$cflag" != "11" ] +then +X usage +X unlock_exit 2 $lock $locked +fi +X +if [ "$Aflag" == "1" ] +then +X add_snat $publicIp +X unlock_exit $? $lock $locked +fi +X +if [ "$Dflag" == "1" ] +then +X remove_sat $publicIp +X unlock_exit $? $lock $locked +fi +X +unlock_exit 1 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_snat.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_snat.sh': 'MD5 check failed' + ) << \SHAR_EOF +23502a2ce3829fb787464124f13b9141 cloud_scripts/opt/cloud/bin/vpc_snat.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_snat.sh'` -ne 2346 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' is not 2346" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpc_staticroute.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_staticroute.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_staticroute.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# @VERSION@ +X +source /root/func.sh +source /opt/cloud/bin/vpc_func.sh +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s: -a < routes > \n" $(basename $0) >&2 +} +X +#set -x +X +flush_table_backup() { +X flush_table "static_route_back" +} +X +flush_table() { +X local tab=$1 +X sudo ip route flush table $tab +} +X +copy_table() { +X local from=$1 +X local to=$2 +X sudo ip route show table $from | while read route +X do +X sudo ip route add table $to $route +X done +} +X +backup_table() { +X flush_table "static_route_back" +X copy_table "static_route" "static_route_back" +X flush_table "static_route" +} +X +restore_table() { +X flush_table "static_route" +X copy_table "static_route_back" "static_route" +X flush_table "static_route_back" +} +X +static_route() { +X local rule=$1 +X local ip=$(echo $rule | cut -d: -f1) +X if [ $ip == "Revoke" ] +X then +X return 0 +X fi +X local gateway=$(echo $rule | cut -d: -f2) +X local cidr=$(echo $rule | cut -d: -f3) +X logger -t cloud "$(basename $0): static route: public ip=$ip \ +X gateway=$gateway cidr=$cidr" +X local dev=$(getEthByIp $ip) +X if [ $? -gt 0 ] +X then +X return 1 +X fi +X sudo ip route add $cidr dev $dev via $gateway table static_route &>/dev/null +X result=$? +X logger -t cloud "$(basename $0): done static route: public ip=$ip \ +X gateway=$gateway cidr=$cidr" +X return $result +} +X +gflag= +aflag= +while getopts 'a:' OPTION +X +do +X case $OPTION in +X a) aflag=1 +X rules="$OPTARG" +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [ -n "$rules" ] +then +X rules_list=$(echo $rules | cut -d, -f1- --output-delimiter=" ") +fi +X +success=0 +X +backup_table +X +for r in $rules_list +do +X static_route $r +X success=$? +X if [ $success -gt 0 ] +X then +X logger -t cloud "$(basename $0): failure to apply fw rules for guest network: $gcidr" +X break +X else +X logger -t cloud "$(basename $0): successful in applying fw rules for guest network: $gcidr" +X fi +done +X +if [ $success -gt 0 ] +then +X logger -t cloud "$(basename $0): restoring from backup for guest network: $gcidr" +X restore_table +else +X logger -t cloud "$(basename $0): deleting backup for guest network: $gcidr" +X flush_table_backup +fi +unlock_exit $success $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_staticroute.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh': 'MD5 check failed' + ) << \SHAR_EOF +4080c04ff7600874ef4a4364aefc4d18 cloud_scripts/opt/cloud/bin/vpc_staticroute.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh'` -ne 3043 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' is not 3043" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/baremetal-vr.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/baremetal-vr.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/baremetal-vr.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/baremetal-vr.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/baremetal-vr.py +M(TQI8V5N6ME>2<@:6X@<#H*("`@("`@("`@("`@("`@("`@("`@("`@ +M2`]('`N6ME>2!I;B`E0H*("`@(&1E +M9B!?9V5T7VUG;71?:7`H4)AFEP*')E<7,N:V5Y2P@:&%S:%-T5]P/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/baremetal-vr.py': 'MD5 check failed' + ) << \SHAR_EOF +f87e8890aa7ad3cc522c5c5ceb2fbf69 cloud_scripts/opt/cloud/bin/baremetal-vr.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/baremetal-vr.py'` -ne 5587 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/baremetal-vr.py' is not 5587" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_firewallrules.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_firewallrules.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_firewallrules.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import copy +X +X +def merge(dbag, data): +X dbagc = copy.deepcopy(dbag) +X if "rules" not in data: +X return dbagc +X for rule in data['rules']: +X id = str(rule['id']) +X if rule['revoked']: +X if id in dbagc.keys(): +X del(dbagc[id]) +X elif id not in dbagc.keys(): +X dbagc[id] = rule +X return dbagc +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_firewallrules.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py': 'MD5 check failed' + ) << \SHAR_EOF +6d3faf49679b84bf9a098eee6b630f69 cloud_scripts/opt/cloud/bin/cs_firewallrules.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py'` -ne 1141 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' is not 1141" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/netusage.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/netusage.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/netusage.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/netusage.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/netusage.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +X +# netusage.sh -- create iptable rules to gather network stats, running within DomR +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s -[c|g|r] [-[a|d] ]\n" $(basename $0) >&2 +} +X +create_usage_rules () { +X iptables-save|grep "INPUT -j NETWORK_STATS" > /dev/null +X if [ $? -eq 0 ] +X then +X return $? +X fi +X iptables -N NETWORK_STATS > /dev/null +X iptables -I FORWARD -j NETWORK_STATS > /dev/null +X iptables -I INPUT -j NETWORK_STATS > /dev/null +X iptables -I OUTPUT -j NETWORK_STATS > /dev/null +X iptables -A NETWORK_STATS -i eth0 -o eth2 > /dev/null +X iptables -A NETWORK_STATS -i eth2 -o eth0 > /dev/null +X iptables -A NETWORK_STATS -o eth2 ! -i eth0 -p tcp > /dev/null +X iptables -A NETWORK_STATS -i eth2 ! -o eth0 -p tcp > /dev/null +X return $? +} +X +add_public_interface () { +X local pubIf=$1 +X iptables-save|grep "NETWORK_STATS -i eth0 -o $pubIf" > /dev/null +X if [ $? -eq 0 ] +X then +X return $? +X fi +X iptables -A NETWORK_STATS -i eth0 -o $pubIf > /dev/null +X iptables -A NETWORK_STATS -i $pubIf -o eth0 > /dev/null +X iptables -A NETWORK_STATS -o $pubIf ! -i eth0 -p tcp > /dev/null +X iptables -A NETWORK_STATS -i $pubIf ! -o eth0 -p tcp > /dev/null +X return $? +} +X +delete_public_interface () { +X local pubIf=$1 +X echo $pubIf >> /root/removedVifs +X return $? +} +X +get_usage () { +X iptables -L NETWORK_STATS -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null +X if [ -f /root/removedVifs ] ; then iptables -Z NETWORK_STATS ; fi; > /dev/null +X /root/clearUsageRules.sh > /dev/null +X if [ $? -gt 0 -a $? -ne 2 ] +X then +X printf $? +X return 1 +X fi +} +X +reset_usage () { +X iptables -Z NETWORK_STATS > /dev/null +X if [ $? -gt 0 -a $? -ne 2 ] +X then +X return 1 +X fi +} +X +#set -x +X +cflag= +gflag= +rflag= +iflag= +aflag= +dflag= +X +while getopts 'cgria:d:' OPTION +do +X case $OPTION in +X c) cflag=1 +X ;; +X g) gflag=1 +X ;; +X r) rflag=1 +X ;; +X a) aflag=1 +X publicIf="$OPTARG" +X ;; +X d) dflag=1 +X publicIf="$OPTARG" +X ;; +X i) #Do nothing, since it's parameter for host script +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [ "$cflag" == "1" ] +then +X #create_usage_rules +X unlock_exit $? $lock $locked +fi +X +if [ "$gflag" == "1" ] +then +X get_usage +X unlock_exit $? $lock $locked +fi +X +if [ "$rflag" == "1" ] +then +X reset_usage +X unlock_exit $? $lock $locked +fi +X +if [ "$aflag" == "1" ] +then +X #add_public_interface $publicIf +X unlock_exit $? $lock $locked +fi +X +if [ "$dflag" == "1" ] +then +X #delete_public_interface $publicIf +X unlock_exit $? $lock $locked +fi +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/netusage.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/netusage.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/netusage.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/netusage.sh': 'MD5 check failed' + ) << \SHAR_EOF +2966c6cafee62e66ff903e53367b498b cloud_scripts/opt/cloud/bin/netusage.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/netusage.sh'` -ne 3478 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/netusage.sh' is not 3478" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/monitor_service.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/monitor_service.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/monitor_service.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/monitor_service.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/monitor_service.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +set -x +usage() { +X printf "Usage: %s: -c config string \n" $(basename $0) >&2 +} +X +configFile='/etc/monitor.conf' +X +create_config() { +services=$1; +services_list=$(echo $services | cut -d, -f1- --output-delimiter=" "); +X +echo "#Monitor services config" >$configFile +X +for s in $services_list +do +service=$(echo $s | cut -d: -f1); +processname=$(echo $s | cut -d: -f2); +service_name=$(echo $s | cut -d: -f3); +pidfile=$(echo $s | cut -d: -f4); +X +echo "$service" >> $configFile; +echo $processname >> $configFile +echo $service_name >> $configFile +echo $pidfile >> $configFile +X +done +X +} +X +config=$2 +if [ -n "$3" ] +then +X +#delete cron job before updating config file +crontab -l|grep "monitorServices.py" +X +if [ $? -eq 0 ] +then +X t=`date +%s`; +X touch /tmp/monitor-$t.txt; +X conf=/tmp/monitor-$t.txt +X crontab -l >$conf +X sed -i /#monitoringConfig/,+3d $conf +X crontab $conf +X rm $conf +fi +X +X +logger -t cloud "deleted crontab entry for monitoring services" +unlock_exit 0 $lock $locked +fi +X +create_config $config +X +#add cron job +crontab -l|grep "monitorServices.py" +if [ $? -ne 0 ] +X then +X (crontab -l ;echo -e "#monitoringConfig\nSHELL=/bin/bash\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n */3 * * * * /usr/bin/python /root/monitorServices.py") | crontab - +X logger -t cloud "added crontab entry for monitoring services" +fi +X +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/monitor_service.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/monitor_service.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/monitor_service.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/monitor_service.sh': 'MD5 check failed' + ) << \SHAR_EOF +3419e7baf45ac36d3d69ca71ef7ab978 cloud_scripts/opt/cloud/bin/monitor_service.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/monitor_service.sh'` -ne 2294 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/monitor_service.sh' is not 2294" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_ip.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_ip.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_ip.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_ip.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_ip.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N7!E)UT@/2!I<%LG;G=?='EP92==+FQO=V5R*"D*("`@(&EF(&EP +M6R=N=U]T>7!E)UT@/3T@)V-O;G1R;VPG.@H@("`@("`@(&1B86=;:7!;)V1E +M=FEC92==72`](%MI<%T*("`@(&5L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_ip.py': 'MD5 check failed' + ) << \SHAR_EOF +856c6261f2876c280c49fa486f4f7408 cloud_scripts/opt/cloud/bin/cs_ip.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_ip.py'` -ne 2581 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_ip.py' is not 2581" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/bumpup_priority.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/bumpup_priority.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/bumpup_priority.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +touch /tmp/rrouter_bumped +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/bumpup_priority.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh': 'MD5 check failed' + ) << \SHAR_EOF +35091259ed848a9f7270aca1a90e95af cloud_scripts/opt/cloud/bin/bumpup_priority.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh'` -ne 824 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' is not 824" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/getRouterAlerts.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/getRouterAlerts.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/getRouterAlerts.sh (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/getRouterAlerts.sh +M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5LP77T*"B`@("`@("`@("`@ +M("`@("!T;T1A=&5686P])"AD871E("UD("(D9&%T979A;"(@(BLE/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh': 'MD5 check failed' + ) << \SHAR_EOF +6c3803100b0923fd3f9017a0e09d6fd5 cloud_scripts/opt/cloud/bin/getRouterAlerts.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh'` -ne 1706 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh' is not 1706" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/postinit.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/postinit.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/postinit.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# This scripts before ssh.service but after cloud-early-config +X +# Eject cdrom if any +eject || true +X +# Restart journald for setting changes to apply +systemctl restart systemd-journald +X +TYPE=$(grep -Po 'type=\K[a-zA-Z]*' /var/cache/cloud/cmdline) +if [ "$TYPE" == "router" ] || [ "$TYPE" == "vpcrouter" ] || [ "$TYPE" == "dhcpsrvr" ] +then +X if [ -x /opt/cloud/bin/update_config.py ] +X then +X /opt/cloud/bin/update_config.py cmd_line.json || true +X fi +fi +X +[ ! -f /var/cache/cloud/enabled_svcs ] && touch /var/cache/cloud/enabled_svcs +for svc in $(cat /var/cache/cloud/enabled_svcs) +do +X systemctl enable --now --no-block $svc +done +X +[ ! -f /var/cache/cloud/disabled_svcs ] && touch /var/cache/cloud/disabled_svcs +for svc in $(cat /var/cache/cloud/disabled_svcs) +do +X systemctl disable --now --no-block $svc +done +X +# Restore the persistent iptables nat, rules and filters for IPv4 and IPv6 if they exist +ipv4="/etc/iptables/rules.v4" +if [ -e $ipv4 ] +then +X iptables-restore < $ipv4 +fi +X +ipv6="/etc/iptables/rules.v6" +if [ -e $ipv6 ] +then +X ip6tables-restore < $ipv6 +fi +X +# Patch known systemd/sshd memory leak - https://github.com/systemd/systemd/issues/8015#issuecomment-476160981 +echo '@include null' >> /etc/pam.d/systemd-user +X +# Enable and Start SSH +systemctl enable --now --no-block ssh +X +date > /var/cache/cloud/boot_up_done +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/postinit.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/postinit.sh': 'MD5 check failed' + ) << \SHAR_EOF +170afadf6f130e9cb697dca65a87aacb cloud_scripts/opt/cloud/bin/setup/postinit.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/postinit.sh'` -ne 2122 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' is not 2122" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/secstorage.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/secstorage.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/secstorage.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_secstorage() { +X log_it "Setting up secondary storage system vm" +X +X echo "cloud apache2 nfs-common portmap" > /var/cache/cloud/enabled_svcs +X echo "conntrackd keepalived haproxy dnsmasq" > /var/cache/cloud/disabled_svcs +X mkdir -p /var/log/cloud +X +X setup_common eth0 eth1 eth2 +X setup_storage_network +X setup_system_rfc1918_internal +X +X log_it "Setting up entry in hosts" +X sed -i /$NAME/d /etc/hosts +X public_ip=`getPublicIp` +X echo "$public_ip $NAME" >> /etc/hosts +X +X log_it "Applying iptables rules" +X cp /etc/iptables/iptables-secstorage /etc/iptables/rules.v4 +X +X log_it "Configuring sshd" +X local hyp=$HYPERVISOR +X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then +X setup_sshd $ETH1_IP "eth1" +X else +X setup_sshd $ETH0_IP "eth0" +X fi +X +X log_it "Configuring apache2" +X setup_apache2 $ETH2_IP +X +X # Deprecated, should move to Cs Python all of it +X sed -e "s///" \ +X -e "s///" \ +X -e "s/Listen .*:8180/Listen $ETH2_IP:80/g" \ +X -e "s/Listen .*:8443/Listen $ETH2_IP:443/g" /etc/apache2/vhost.template > /etc/apache2/sites-enabled/vhost-${ETH2_IP}.conf +X +X log_it "Setting up apache2 for post upload of volume/template" +X a2enmod proxy +X a2enmod proxy_http +X a2enmod headers +X +X cat >/etc/apache2/cors.conf </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh': 'MD5 check failed' + ) << \SHAR_EOF +14aea171a5e0fdfd3069bb96bde91e0b cloud_scripts/opt/cloud/bin/setup/secstorage.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh'` -ne 2720 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' is not 2720" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/ilbvm.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +ilbvm_svcs() { +X echo "haproxy" > /var/cache/cloud/enabled_svcs +X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs +} +X +setup_ilbvm() { +X log_it "Setting up Internal Load Balancer system vm" +X setup_common eth0 eth1 +X #eth0 = guest network, eth1=control network +X +X sed -i /$NAME/d /etc/hosts +X echo "$ETH0_IP $NAME" >> /etc/hosts +X +X cp /etc/iptables/iptables-ilbvm /etc/iptables/rules.v4 +X setup_sshd $ETH1_IP "eth1" +X +X enable_fwding 0 +X enable_irqbalance 1 +} +X +ilbvm_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute ilbvm svcs" +X exit 1 +fi +setup_ilbvm +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/ilbvm.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh': 'MD5 check failed' + ) << \SHAR_EOF +87c70bdf6c0d4d41f0ff87475494188f cloud_scripts/opt/cloud/bin/setup/ilbvm.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh'` -ne 1442 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' is not 1442" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_vpcrouter() { +X log_it "Setting up VPC virtual router system vm" +X +X if [ -f /etc/hosts ]; then +X grep -q $NAME /etc/hosts || echo "127.0.0.1 $NAME" >> /etc/hosts; +X fi +X +X cat > /etc/network/interfaces << EOF +auto lo eth0 +iface lo inet loopback +EOF +X setup_interface "0" $ETH0_IP $ETH0_MASK $GW +X +X echo $NAME > /etc/hostname +X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon +X hostnamectl set-hostname $NAME +X +X #Nameserver +X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries +X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries +X if [ -n "$internalNS1" ] +X then +X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS1" > /etc/resolv.conf +X fi +X +X if [ -n "$internalNS2" ] +X then +X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS2" >> /etc/resolv.conf +X fi +X if [ -n "$NS1" ] +X then +X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS1" >> /etc/resolv.conf +X fi +X +X if [ -n "$NS2" ] +X then +X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS2" >> /etc/resolv.conf +X fi +X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] +X then +X if [ "$HYPERVISOR" == "vmware" ] || [ "$HYPERVISOR" == "hyperv" ]; +X then +X ip route add $MGMTNET via $LOCAL_GW dev eth0 +X # workaround to activate vSwitch under VMware +X timeout 3 ping -n -c 3 $LOCAL_GW || true +X fi +X fi +X +X ip route delete default +X # create route table for static route +X +X sudo echo "252 static_route" >> /etc/iproute2/rt_tables 2>/dev/null +X sudo echo "251 static_route_back" >> /etc/iproute2/rt_tables 2>/dev/null +X sudo ip rule add from $VPCCIDR table static_route 2>/dev/null +X sudo ip rule add from $VPCCIDR table static_route_back 2>/dev/null +X +X setup_vpc_apache2 +X +X enable_irqbalance 1 +X enable_vpc_rpsrfs 1 +X disable_rpfilter +X enable_fwding 1 +X enable_passive_ftp 1 +X cp /etc/iptables/iptables-vpcrouter /etc/iptables/rules.v4 +X setup_sshd $ETH0_IP "eth0" +X cp /etc/vpcdnsmasq.conf /etc/dnsmasq.conf +X cp /etc/cloud-nic.rules /etc/udev/rules.d/cloud-nic.rules +X echo "" > /etc/dnsmasq.d/dhcphosts.txt +X echo "dhcp-hostsfile=/etc/dhcphosts.txt" > /etc/dnsmasq.d/cloud.conf +X +X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" +X #DNS server will append $DOMAIN to local queries +X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf +X #answer all local domain queries +X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf +X +X command -v dhcp_release > /dev/null 2>&1 +X no_dhcp_release=$? +X if [ $no_dhcp_release -eq 0 ] +X then +X echo 1 > /var/cache/cloud/dnsmasq_managed_lease +X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf +X else +X echo 0 > /var/cache/cloud/dnsmasq_managed_lease +X fi +X +X # Setup hourly logrotate +X if [ -f /etc/cron.daily/logrotate ]; then +X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 +X fi +} +X +routing_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute routing_svcs" +X exit 1 +fi +setup_vpcrouter +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh': 'MD5 check failed' + ) << \SHAR_EOF +811420d11f97b1d7237b964e8bbbdf5d cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh'` -ne 3885 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' is not 3885" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/router.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/router.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/router.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/router.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/router.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +check_reboot_vmware() { +X if [ "$HYPERVISOR" != "vmware" ]; then +X return +X fi +X +X if [ -n "$MGMTNET" ]; then +X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') +X if ping -n -c 1 -W 3 $MGMT_GW &> /dev/null; then +X log_it "Management gateway pingable, skipping VR reboot" +X return +X fi +X fi +X +X log_it "Management gateway not pingable, rebooting VR" +X sync +X reboot +} +X +setup_router() { +X # To save router public interface and gw ip information +X touch /var/cache/cloud/ifaceGwIp +X +X oldmd5= +X [ -f "/etc/udev/rules.d/70-persistent-net.rules" ] && oldmd5=$(md5sum "/etc/udev/rules.d/70-persistent-net.rules" | awk '{print $1}') +X +X if [ -n "$ETH2_IP" ]; then +X setup_common eth0 eth1 eth2 +X +X if [ -n "$EXTRA_PUBNICS" ]; then +X for ((i = 3; i < 3 + $EXTRA_PUBNICS; i++)); do +X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" +X done +X fi +X else +X setup_common eth0 eth1 +X if [ -n "$EXTRA_PUBNICS" ]; then +X for ((i = 2; i < 2 + $EXTRA_PUBNICS; i++)); do +X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" +X done +X fi +X fi +X +X log_it "Checking udev NIC assignment order changes" +X if [ "$NIC_MACS" != "" ] +X then +X init_interfaces_orderby_macs "$NIC_MACS" "/tmp/interfaces" "/tmp/udev-rules" +X newmd5=$(md5sum "/tmp/udev-rules" | awk '{print $1}') +X rm /tmp/interfaces +X rm /tmp/udev-rules +X +X if [ "$oldmd5" != "$newmd5" ] +X then +X log_it "Reloading udev for new udev NIC assignment" +X udevadm control --reload-rules && udevadm trigger +X check_reboot_vmware +X fi +X fi +X +X setup_aesni +X setup_dnsmasq +X setup_apache2 $ETH0_IP +X +X sed -i /$NAME/d /etc/hosts +X echo "$ETH0_IP $NAME" >> /etc/hosts +X +X enable_irqbalance 1 +X disable_rpfilter_domR +X enable_fwding 1 +X enable_rpsrfs 1 +X enable_passive_ftp 1 +X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 +X setup_sshd $ETH1_IP "eth1" +X +X # Only allow DNS service for current network +X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X +X # Setup hourly logrotate +X if [ -f /etc/cron.daily/logrotate ]; then +X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 +X fi +} +X +routing_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute routing_svcs" +X exit 1 +fi +setup_router +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/router.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/router.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/router.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/router.sh': 'MD5 check failed' + ) << \SHAR_EOF +2ae62d5d44c716730231c9d77618fe91 cloud_scripts/opt/cloud/bin/setup/router.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/router.sh'` -ne 3355 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/router.sh' is not 3355" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/elbvm.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/elbvm.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/elbvm.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +elbvm_svcs() { +X echo "haproxy" > /var/cache/cloud/enabled_svcs +X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs +} +X +setup_elbvm() { +X log_it "Setting up Elastic Load Balancer system vm" +X setup_common eth0 eth1 +X sed -i /$NAME/d /etc/hosts +X public_ip=$ETH2_IP +X [ "$ETH2_IP" == "0.0.0.0" ] || [ "$ETH2_IP" == "" ] && public_ip=$ETH0_IP +X echo "$public_ip $NAME" >> /etc/hosts +X +X cp /etc/iptables/iptables-elbvm /etc/iptables/rules.v4 +X if [ "$SSHONGUEST" == "true" ] +X then +X setup_sshd $ETH0_IP "eth0" +X else +X setup_sshd $ETH1_IP "eth1" +X fi +X +X enable_fwding 0 +X enable_irqbalance 0 +} +X +elbvm_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute elbvm svcs" +X exit 1 +fi +setup_elbvm +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/elbvm.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh': 'MD5 check failed' + ) << \SHAR_EOF +2d34615f1d40f6125a2205e6118ba07f cloud_scripts/opt/cloud/bin/setup/elbvm.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh'` -ne 1578 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' is not 1578" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/bootstrap.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" +CMDLINE=/var/cache/cloud/cmdline +X +rm -f /var/cache/cloud/enabled_svcs +rm -f /var/cache/cloud/disabled_svcs +X +X. /lib/lsb/init-functions +X +log_it() { +X echo "$(date) $@" >> /var/log/cloud.log +X log_action_msg "$@" +} +X +hypervisor() { +X if [ -d /proc/xen ]; then +X mount -t xenfs none /proc/xen +X $(dmesg | grep -q "Xen HVM") +X if [ $? -eq 0 ]; then # 1=PV,0=HVM +X echo "xen-hvm" && return 0 +X else +X echo "xen-pv" && return 0 +X fi +X fi +X +X [ -x /usr/sbin/virt-what ] && local facts=( $(virt-what) ) +X if [ "$facts" != "" ]; then +X # Xen HVM is recognized as Hyperv when Viridian extensions are enabled +X if [ "${facts[-1]}" == "xen-domU" ] && [ "${facts[0]}" == "hyperv" ]; then +X echo "xen-hvm" && return 0 +X else +X echo ${facts[-1]} && return 0 +X fi +X fi +X +X grep -q QEMU /proc/cpuinfo && echo "kvm" && return 0 +X grep -q QEMU /var/log/messages && echo "kvm" && return 0 +X +X vmware-checkvm &> /dev/null && echo "vmware" && return 0 +X +X echo "unknown" && return 1 +} +X +config_guest() { +X [ ! -d /proc/xen ] && sed -i 's/^vc/#vc/' /etc/inittab && telinit q +X [ -d /proc/xen ] && sed -i 's/^#vc/vc/' /etc/inittab && telinit q +X +X systemctl daemon-reload +X +X case $HYPERVISOR in +X xen-pv|xen-domU) +X systemctl stop ntpd +X systemctl disable ntpd +X systemctl enable xe-daemon +X systemctl start xe-daemon +X +X cat /proc/cmdline > $CMDLINE +X sed -i "s/%/ /g" $CMDLINE +X ;; +X xen-hvm) +X systemctl stop ntpd +X systemctl disable ntpd +X systemctl enable xe-daemon +X systemctl start xe-daemon +X +X if [ ! -f /usr/bin/xenstore-read ]; then +X log_it "ERROR: xentools not installed, cannot found xenstore-read" && exit 5 +X fi +X /usr/bin/xenstore-read vm-data/cloudstack/init > $CMDLINE +X sed -i "s/%/ /g" $CMDLINE +X ;; +X kvm) +X # Configure kvm hotplug support +X if grep -E 'CONFIG_HOTPLUG_PCI=y|CONFIG_HOTPLUG_PCI_ACPI=y' /boot/config-`uname -r`; then +X log_it "acpiphp and pci_hotplug module already compiled in" +X else +X modprobe acpiphp 2> /dev/null && log_it "acpiphp module loaded" || true +X modprobe pci_hotplug 2> /dev/null && log_it "pci_hotplug module loaded" || true +X fi +X +X sed -i -e "/^s0:2345:respawn.*/d" /etc/inittab +X sed -i -e "/6:23:respawn/a\s0:2345:respawn:/sbin/getty -L 115200 ttyS0 vt102" /etc/inittab +X systemctl enable qemu-guest-agent +X systemctl start qemu-guest-agent +X +X # Wait for $CMDLINE file to be written by the qemu-guest-agent +X for i in {1..60}; do +X if [ -s $CMDLINE ]; then +X log_it "Received a new non-empty cmdline file from qemu-guest-agent" +X break +X fi +X sleep 1 +X done +X if [ ! -s $CMDLINE ]; then +X log_it "Failed to receive the cmdline file via the qemu-guest-agent" +X fi +X ;; +X vmware) +X # system time sync'd with host via vmware tools +X systemctl stop ntpd +X systemctl disable ntpd +X systemctl enable open-vm-tools +X systemctl start open-vm-tools +X +X vmtoolsd --cmd 'machine.id.get' > $CMDLINE +X ;; +X virtualpc|hyperv) +X # Hyper-V is recognized as virtualpc hypervisor type. Boot args are passed using KVP Daemon +X systemctl enable hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service +X systemctl start hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service +X sleep 5 +X cp -f /var/opt/hyperv/.kvp_pool_0 $CMDLINE +X cat /dev/null > /var/opt/hyperv/.kvp_pool_0 +X ;; +X virtualbox) +X # Virtualbox is used to test the virtual router +X # get the commandline from a dmistring (yes, hacky!) +X dmidecode | grep cmdline | sed 's/^.*cmdline://' > $CMDLINE +X RV=$? +X if [ $RV -ne 0 ] ; then +X log_it "Failed to get cmdline from a virtualbox dmi property" +X fi +X ;; +X esac +X +X # Find and export guest type +X export TYPE=$(grep -Po 'type=\K[a-zA-Z]*' $CMDLINE) +} +X +patch_systemvm() { +X local patchfile=$1 +X local backupfolder="/tmp/.conf.backup" +X local logfile="/var/log/patchsystemvm.log" +X if [ -f /usr/local/cloud/systemvm/conf/cloud.jks ]; then +X rm -fr $backupfolder +X mkdir -p $backupfolder +X cp -r /usr/local/cloud/systemvm/conf/* $backupfolder/ +X fi +X rm /usr/local/cloud/systemvm -rf +X mkdir -p /usr/local/cloud/systemvm +X echo "All" | unzip $patchfile -d /usr/local/cloud/systemvm >$logfile 2>&1 +X find /usr/local/cloud/systemvm/ -name \*.sh | xargs chmod 555 +X if [ -f $backupfolder/cloud.jks ]; then +X cp -r $backupfolder/* /usr/local/cloud/systemvm/conf/ +X echo "Restored keystore file and certs using backup" >> $logfile +X fi +X rm -fr $backupfolder +X # Import global cacerts into 'cloud' service's keystore +X keytool -importkeystore -srckeystore /etc/ssl/certs/java/cacerts -destkeystore /usr/local/cloud/systemvm/certs/realhostip.keystore -srcstorepass changeit -deststorepass vmops.com -noprompt || true +X return 0 +} +X +patch() { +X local PATCH_MOUNT=/media/cdrom +X local logfile="/var/log/patchsystemvm.log" +X if [ "$TYPE" == "consoleproxy" ] || [ "$TYPE" == "secstorage" ] && [ -f ${PATCH_MOUNT}/agent.zip ] && [ -f /var/cache/cloud/patch.required ] +X then +X echo "Patching systemvm for cloud service with mount=$PATCH_MOUNT for type=$TYPE" >> $logfile +X patch_systemvm ${PATCH_MOUNT}/agent.zip +X if [ $? -gt 0 ] +X then +X echo "Failed to apply patch systemvm\n" >> $logfile +X exit 1 +X fi +X fi +X +X rm -f /var/cache/cloud/patch.required +X chmod -x /etc/systemd/system/cloud*.service +X systemctl daemon-reload +X umount $PATCH_MOUNT || true +X +X if [ -f /mnt/cmdline ]; then +X cat /mnt/cmdline > $CMDLINE +X fi +X return 0 +} +X +config_sysctl() { +X # When there is more memory reset the cache back pressure to default 100 +X physmem=$(free|awk '/^Mem:/{print $2}') +X if [ $((physmem)) -lt 409600 ]; then +X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 200" /etc/sysctl.conf +X else +X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 100" /etc/sysctl.conf +X fi +X +X sync +X sysctl -p +} +X +bootstrap() { +X log_it "Bootstrapping systemvm appliance" +X +X export HYPERVISOR=$(hypervisor) +X [ $? -ne 0 ] && log_it "Failed to detect hypervisor type, bailing out" && exit 10 +X log_it "Starting guest services for $HYPERVISOR" +X +X config_guest +X patch +X config_sysctl +X +X log_it "Configuring systemvm type=$TYPE" +X if [ -f "/opt/cloud/bin/setup/$TYPE.sh" ]; then +X /opt/cloud/bin/setup/$TYPE.sh +X else +X /opt/cloud/bin/setup/default.sh +X fi +X +X log_it "Finished setting up systemvm" +X exit 0 +} +X +bootstrap +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/bootstrap.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh': 'MD5 check failed' + ) << \SHAR_EOF +722a9c6abfff147c7727fdcd85c96767 cloud_scripts/opt/cloud/bin/setup/bootstrap.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh'` -ne 7721 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' is not 7721" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_console_proxy() { +X log_it "Setting up console proxy system vm" +X +X echo "cloud" > /var/cache/cloud/enabled_svcs +X echo "haproxy dnsmasq apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs +X mkdir -p /var/log/cloud +X +X setup_common eth0 eth1 eth2 +X setup_system_rfc1918_internal +X +X log_it "Setting up entry in hosts" +X sed -i /$NAME/d /etc/hosts +X public_ip=`getPublicIp` +X echo "$public_ip $NAME" >> /etc/hosts +X +X log_it "Applying iptables rules" +X cp /etc/iptables/iptables-consoleproxy /etc/iptables/rules.v4 +X +X log_it "Configuring sshd" +X local hyp=$HYPERVISOR +X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then +X setup_sshd $ETH1_IP "eth1" +X else +X setup_sshd $ETH0_IP "eth0" +X fi +X +X disable_rpfilter +X enable_fwding 0 +X enable_irqbalance 0 +X rm -f /etc/logrotate.d/cloud +} +X +setup_console_proxy +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh': 'MD5 check failed' + ) << \SHAR_EOF +44adac9bf5e54d4791da00e3d1bdaf46 cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh'` -ne 1658 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' is not 1658" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/common.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/common.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/common.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/common.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/common.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" +X +X. /lib/lsb/init-functions +X +log_it() { +X echo "$(date) $@" >> /var/log/cloud.log +X log_action_msg "$@" +} +X +init_interfaces_orderby_macs() { +X macs=( $(echo $1 | sed "s/|/ /g") ) +X total_nics=${#macs[@]} +X interface_file=${2:-"/etc/network/interfaces"} +X rule_file=${3:-"/etc/udev/rules.d/70-persistent-net.rules"} +X +X echo -n "auto lo" > $interface_file +X for((i=0; i> $interface_file +X fi +X done +X +X cat >> $interface_file << EOF +X +iface lo inet loopback +X +EOF +X +X echo "" > $rule_file +X for((i=0; i < ${#macs[@]}; i++)) +X do +X echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${macs[$i]}\", NAME=\"eth$i\"" >> $rule_file +X done +} +X +init_interfaces() { +X if [ "$NIC_MACS" == "" ] +X then +X cat > /etc/network/interfaces << EOF +auto lo $1 $2 $3 +iface lo inet loopback +X +EOF +X else +X init_interfaces_orderby_macs "$NIC_MACS" +X fi +} +X +setup_interface() { +X local intfnum=$1 +X local ip=$2 +X local mask=$3 +X local gw=$4 +X local force=$5 +X local intf=eth${intfnum} +X local bootproto="static" +X +X if [ "$BOOTPROTO" == "dhcp" ] +X then +X if [ "$intfnum" != "0" ] +X then +X bootproto="dhcp" +X fi +X fi +X +X if [ "$ip" != "0.0.0.0" -a "$ip" != "" -o "$force" == "force" ] +X then +X echo "iface $intf inet $bootproto" >> /etc/network/interfaces +X if [ "$bootproto" == "static" ] +X then +X echo " address $ip " >> /etc/network/interfaces +X echo " netmask $mask" >> /etc/network/interfaces +X fi +X fi +X +X if [ "$ip" == "0.0.0.0" -o "$ip" == "" ] +X then +X ifconfig $intf down +X fi +X +X if [ "$force" == "force" ] +X then +X ifdown $intf +X else +X ifdown $intf +X if [ "$RROUTER" != "1" -o "$1" != "2" ] +X then +X ifup $intf +X fi +X fi +} +X +setup_interface_ipv6() { +X sysctl net.ipv6.conf.all.disable_ipv6=0 +X sysctl net.ipv6.conf.all.forwarding=1 +X sysctl net.ipv6.conf.all.accept_ra=1 +X +X sed -i "s/net.ipv6.conf.all.disable_ipv6 =.*$/net.ipv6.conf.all.disable_ipv6 = 0/" /etc/sysctl.conf +X sed -i "s/net.ipv6.conf.all.forwarding =.*$/net.ipv6.conf.all.forwarding = 1/" /etc/sysctl.conf +X sed -i "s/net.ipv6.conf.all.accept_ra =.*$/net.ipv6.conf.all.accept_ra = 1/" /etc/sysctl.conf +X +X local intfnum=$1 +X local ipv6="$2" +X local prelen="$3" +X local intf=eth${intfnum} +X +X echo "iface $intf inet6 static" >> /etc/network/interfaces +X echo " address $ipv6 " >> /etc/network/interfaces +X echo " netmask $prelen" >> /etc/network/interfaces +X echo " accept_ra 1" >> /etc/network/interfaces +X ifdown $intf +X ifup $intf +} +X +X +enable_fwding() { +X local enabled=$1 +X log_it "cloud: enable_fwding = $1" +X log_it "enable_fwding = $1" +X echo "$1" > /proc/sys/net/ipv4/ip_forward +X [ -f /etc/iptables/iptables.conf ] && sed -i "s/ENABLE_ROUTING=.*$/ENABLE_ROUTING=$enabled/" /etc/iptables/iptables.conf && return +} +X +enable_passive_ftp() { +X log_it "cloud: enabling passive FTP for guest VMs" +X echo "$1" > /proc/sys/net/netfilter/nf_conntrack_helper +} +X +disable_rpfilter() { +X log_it "cloud: disable rp_filter" +X log_it "disable rpfilter" +X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf +} +X +get_public_vif_list() { +X local vif_list="" +X for i in /sys/class/net/eth*; do +X vif=$(basename $i); +X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] +X then +X vif_list="$vif_list $vif"; +X fi +X done +X +X echo $vif_list +} +X +disable_rpfilter_domR() { +X log_it "cloud: Tuning rp_filter on public interfaces" +X +X VIF_LIST=$(get_public_vif_list) +X log_it "rpfilter public interfaces : $VIF_LIST" +X if [ "$DISABLE_RP_FILTER" == "true" ] +X then +X log_it "cloud: disable rp_filter on public interfaces" +X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf +X echo "0" > /proc/sys/net/ipv4/conf/default/rp_filter +X for vif in $VIF_LIST; do +X log_it "cloud: disable rp_filter on public interface: $vif" +X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 0/" /etc/sysctl.conf +X echo "0" > /proc/sys/net/ipv4/conf/$vif/rp_filter +X done +X else +X log_it "cloud: enable rp_filter on public interfaces" +X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 1/" /etc/sysctl.conf +X echo "1" > /proc/sys/net/ipv4/conf/default/rp_filter +X for vif in $VIF_LIST; do +X log_it "cloud: enable rp_filter on public interface: $vif" +X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 1/" /etc/sysctl.conf +X echo "1" > /proc/sys/net/ipv4/conf/$vif/rp_filter +X done +X fi +X log_it "cloud: Enabling rp_filter on Non-public interfaces(eth0,eth1,lo)" +X echo "1" > /proc/sys/net/ipv4/conf/eth0/rp_filter +X echo "1" > /proc/sys/net/ipv4/conf/eth1/rp_filter +X echo "1" > /proc/sys/net/ipv4/conf/lo/rp_filter +} +X +enable_irqbalance() { +X local enabled=$1 +X local proc=0 +X +X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) +X if [ $proc -le 1 ] && [ $enabled -eq 1 ] +X then +X enabled=0 +X fi +X +X log_it "Processors = $proc Enable service ${svc} = $enabled" +X local cfg=/etc/default/irqbalance +X [ -f $cfg ] && sed -i "s/ENABLED=.*$/ENABLED=$enabled/" $cfg && return +} +X +enable_vpc_rpsrfs() { +X local enable=$1 +X if [ $enable -eq 0 ] +X then +X echo 0 > /etc/rpsrfsenable +X else +X echo 1 > /etc/rpsrfsenable +X fi +X +X return 0 +} +X +enable_rpsrfs() { +X local enable=$1 +X +X if [ $enable -eq 0 ] +X then +X echo 0 > /etc/rpsrfsenable +X return 0 +X fi +X +X if [ ! -f /sys/class/net/eth0/queues/rx-0/rps_cpus ] +X then +X echo "rps is not enabled in the kernel" +X echo 0 > /etc/rpsrfsenable +X return 0 +X fi +X +X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) +X if [ $proc -le 1 ] +X then +X echo 0 > /etc/rpsrfsenable +X return 0; +X fi +X +X echo 1 > /etc/rpsrfsenable +X num=1 +X num=$(($num<<$proc)) +X num=$(($num-1)); +X echo $num; +X hex=$(printf "%x\n" $num) +X echo $hex; +X #enable rps +X echo $hex > /sys/class/net/eth0/queues/rx-0/rps_cpus +X echo $hex > /sys/class/net/eth2/queues/rx-0/rps_cpus +X +X #enble rfs +X echo 256 > /proc/sys/net/core/rps_sock_flow_entries +X echo 256 > /sys/class/net/eth0/queues/rx-0/rps_flow_cnt +X echo 256 > /sys/class/net/eth2/queues/rx-0/rps_flow_cnt +} +X +setup_common() { +X init_interfaces $1 $2 $3 +X if [ -n "$ETH0_IP" ] +X then +X setup_interface "0" $ETH0_IP $ETH0_MASK $GW +X fi +X if [ -n "$ETH0_IP6" ] +X then +X setup_interface_ipv6 "0" $ETH0_IP6 $ETH0_IP6_PRELEN +X fi +X setup_interface "1" $ETH1_IP $ETH1_MASK $GW +X if [ -n "$ETH2_IP" ] +X then +X setup_interface "2" $ETH2_IP $ETH2_MASK $GW +X fi +X +X echo $NAME > /etc/hostname +X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon +X hostnamectl set-hostname $NAME +X +X #Nameserver +X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries +X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries +X if [ -n "$internalNS1" ] +X then +X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS1" > /etc/resolv.conf +X fi +X +X if [ -n "$internalNS2" ] +X then +X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS2" >> /etc/resolv.conf +X fi +X if [ -n "$NS1" ] +X then +X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS1" >> /etc/resolv.conf +X fi +X +X if [ -n "$NS2" ] +X then +X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS2" >> /etc/resolv.conf +X fi +X +X if [ -n "$IP6_NS1" ] +X then +X echo "nameserver $IP6_NS1" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $IP6_NS1" >> /etc/resolv.conf +X fi +X if [ -n "$IP6_NS2" ] +X then +X echo "nameserver $IP6_NS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $IP6_NS2" >> /etc/resolv.conf +X fi +X +X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] +X then +X ip route add $MGMTNET via $LOCAL_GW dev eth1 +X fi +X +X ip route delete default +X if [ "$RROUTER" != "1" ] +X then +X gwdev=$3 +X if [ -z "$gwdev" ] +X then +X gwdev="eth0" +X fi +X +X ip route add default via $GW dev $gwdev +X fi +X +X # Workaround to activate vSwitch under VMware +X timeout 3 ping -n -c 3 $GW & +X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] +X then +X timeout 3 ping -n -c 3 $LOCAL_GW & +X #This code is added to address ARP issue by pinging MGMT_GW +X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') +X timeout 3 ping -n -c 3 $MGMT_GW & +X fi +X +X if [ "$HYPERVISOR" == "vmware" ]; then +X ntpq -p &> /dev/null || vmware-toolbox-cmd timesync enable +X fi +} +X +setup_dnsmasq() { +X log_it "Setting up dnsmasq" +X +X touch /etc/dhcpopts.txt +X +X [ -z $DHCP_RANGE ] && [ $ETH0_IP ] && DHCP_RANGE=$ETH0_IP +X [ $ETH0_IP6 ] && DHCP_RANGE_IP6=$ETH0_IP6 +X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" +X #removing the dnsmasq multiple ranges config file. +X rm /etc/dnsmasq.d/multiple_ranges.conf +X +X #get the template +X cp /etc/dnsmasq.conf.tmpl /etc/dnsmasq.conf +X +X if [ -n "$DOMAIN" ] +X then +X #send domain name to dhcp clients +X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\"$DOMAIN\"/ /etc/dnsmasq.conf +X #DNS server will append $DOMAIN to local queries +X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf +X #answer all local domain queries +X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf +X fi +X +X if [ -n "$DNS_SEARCH_ORDER" ] +X then +X sed -i -e "/^[#]*dhcp-option.*=119.*$/d" /etc/dnsmasq.conf +X echo "dhcp-option-force=119,$DNS_SEARCH_ORDER" >> /etc/dnsmasq.conf +X # set the domain search order as a space seprated list for option 15 +X DNS_SEARCH_ORDER=$(echo $DNS_SEARCH_ORDER | sed 's/,/ /g') +X #send domain name to dhcp clients +X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\""$DNS_SEARCH_ORDER"\"/ /etc/dnsmasq.conf +X fi +X +X if [ $DHCP_RANGE ] +X then +X sed -i -e "s/^dhcp-range_ip4=.*$/dhcp-range=$DHCP_RANGE,static/" /etc/dnsmasq.conf +X else +X sed -i -e "s/^dhcp-range_ip4=.*$//" /etc/dnsmasq.conf +X fi +X if [ $DHCP_RANGE_IP6 ] +X then +X sed -i -e "s/^dhcp-range_ip6=.*$/dhcp-range=$DHCP_RANGE_IP6,static/" /etc/dnsmasq.conf +X # For nondefault6 tagged host, don't send dns-server information +X sed -i /nondefault6/d /etc/dnsmasq.conf +X echo "dhcp-option=nondefault6,option6:dns-server" >> /etc/dnsmasq.conf +X else +X sed -i -e "s/^dhcp-range_ip6=.*$//" /etc/dnsmasq.conf +X fi +X +X if [ "$RROUTER" == "1" ] +X then +X DEFAULT_GW=$GUEST_GW +X INTERNAL_DNS=$GUEST_GW +X else +X if [ "$TYPE" == "dhcpsrvr" ] +X then +X DEFAULT_GW=$GW +X else +X DEFAULT_GW=$ETH0_IP +X fi +X INTERNAL_DNS=$ETH0_IP +X fi +X sed -i -e "/^[#]*dhcp-option=option:router.*$/d" /etc/dnsmasq.conf +X [ $DEFAULT_GW ] && echo "dhcp-option=option:router,$DEFAULT_GW" >> /etc/dnsmasq.conf +X +X [ $ETH0_IP ] && [ $NS1 ] && NS="$NS1," +X [ $ETH0_IP ] && [ $NS2 ] && NS="$NS$NS2," +X [ $ETH0_IP6 ] && [ $IP6_NS1 ] && NS6="[$IP6_NS1]," +X [ $ETH0_IP6 ] && [ $IP6_NS2 ] && NS6="$NS6[$IP6_NS2]," +X #for now set up ourself as the dns server as well +X sed -i -e "/^[#]*dhcp-option=6,.*$/d" /etc/dnsmasq.conf +X sed -i -e "/^[#]*dhcp-option=option6:dns-server,.*$/d" /etc/dnsmasq.conf +X if [ "$USE_EXTERNAL_DNS" != "true" ] +X then +X [ $ETH0_IP ] && NS="$INTERNAL_DNS,$NS" +X [ $ETH0_IP6 ] && NS6="[::],$NS6" +X # enable dns +X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf +X else +X # disable dns +X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf +X echo "port=0" >> /etc/dnsmasq.conf +X fi +X NS=${NS%?} +X NS6=${NS6%?} +X [ $ETH0_IP ] && echo "dhcp-option=6,$NS" >> /etc/dnsmasq.conf +X [ $ETH0_IP6 ] && echo "dhcp-option=option6:dns-server,$NS6" >> /etc/dnsmasq.conf +X #adding the name data-server to the /etc/hosts for allowing the access to user-data service and ssh-key reset in every subnet. +X #removing the existing entires to avoid duplicates on restarts. +X sed -i '/data-server/d' /etc/hosts +X if [ -n "$ETH0_IP" ] +X then +X echo "$ETH0_IP data-server" >> /etc/hosts +X fi +X if [ -n "$ETH0_IP6" ] +X then +X echo "$ETH0_IP6 data-server" >> /etc/hosts +X fi +X #add the dhcp-client-update only if dnsmasq version is 2.6 and above +X dnsmasqVersion=$(dnsmasq -v | grep version -m 1 | grep -o "[[:digit:]]\.[[:digit:]]") +X major=$(echo "$dnsmasqVersion" | cut -d '.' -f 1) +X minor=$(echo "$dnsmasqVersion" | cut -d '.' -f 2) +X if [ "$major" -eq '2' -a "$minor" -ge '6' ] || [ "$major" -gt '2' ] +X then +X sed -i -e "/^dhcp-client-update/d" /etc/dnsmasq.conf +X echo 'dhcp-client-update' >> /etc/dnsmasq.conf +X fi +X +X command -v dhcp_release > /dev/null 2>&1 +X no_dhcp_release=$? +X if [ $no_dhcp_release -eq 0 -a -z "$ETH0_IP6" ] +X then +X echo 1 > /var/cache/cloud/dnsmasq_managed_lease +X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf +X else +X echo 0 > /var/cache/cloud/dnsmasq_managed_lease +X fi +} +X +setup_sshd(){ +X local ip=$1 +X local eth=$2 +X [ -f /etc/ssh/sshd_config ] && sed -i -e "s/^[#]*ListenAddress.*$/ListenAddress $ip/" /etc/ssh/sshd_config +X sed -i "/3922/s/eth./$eth/" /etc/iptables/rules.v4 +} +X +setup_vpc_apache2() { +X log_it "Setting up apache web server for VPC" +X systemctl disable apache2 +X clean_ipalias_config +X setup_apache2_common +} +X +clean_ipalias_config() { +X rm -f /etc/apache2/conf.d/ports.*.meta-data.conf +X rm -f /etc/apache2/sites-available/ipAlias* +X rm -f /etc/apache2/sites-enabled/ipAlias* +X rm -f /etc/apache2/conf.d/vhost*.conf +X rm -f /etc/apache2/ports.conf +X rm -f /etc/apache2/vhostexample.conf +X rm -f /etc/apache2/sites-available/* +X rm -f /etc/apache2/sites-enabled/* +X +X rm -rf /etc/failure_config +} +X +setup_apache2_common() { +X sed -i 's/^Include ports.conf.*/# CS: Done by Python CsApp config\n#Include ports.conf/g' /etc/apache2/apache2.conf +X # Disable listing of http://SSVM-IP/icons folder for security issue. see article http://www.i-lateral.com/tutorials/disabling-the-icons-folder-on-an-ubuntu-web-server/ +X [ -f /etc/apache2/mods-available/alias.conf ] && sed -i s/"Options Indexes MultiViews"/"Options -Indexes MultiViews"/ /etc/apache2/mods-available/alias.conf +X +X echo "Options -Indexes" > /var/www/html/.htaccess +} +X +setup_apache2() { +X log_it "Setting up apache web server" +X mkdir -p /var/www +X chown www-data:www-data -R /var/www +X clean_ipalias_config +X setup_apache2_common +X local ip=$1 +} +X +setup_aesni() { +X if [ `grep aes /proc/cpuinfo | wc -l` -gt 0 ] +X then +X modprobe aesni_intel +X fi +} +X +setup_storage_network() { +X if [ x"$STORAGE_IP" == "x" -o x"$STORAGE_NETMASK" == "x" ] +X then +X log_it "Incompleted parameters STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR. Cannot setup storage network" +X return +X fi +X +X echo "" >> /etc/network/interfaces +X echo "auto eth3" >> /etc/network/interfaces +X +X setup_interface "3" "$STORAGE_IP" "$STORAGE_NETMASK" +X [ -n "$MTU" ] && ifconfig eth3 mtu $MTU && echo " mtu $MTU" >> /etc/network/interfaces +X #ip route add "$STORAGE_CIDR" via "$STORAGE_IP" +X log_it "Successfully setup storage network with STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR" +} +X +setup_system_rfc1918_internal() { +X public_ip=`getPublicIp` +X echo "$public_ip" | grep -E "^((127\.)|(10\.)|(172\.1[6-9]\.)|(172\.2[0-9]\.)|(172\.3[0-1]\.)|(192\.168\.))" +X if [ "$?" == "0" ]; then +X log_it "Not setting up route of RFC1918 space to $LOCAL_GW befause $public_ip is RFC1918." +X else +X log_it "Setting up route of RFC1918 space to $LOCAL_GW" +X # Setup general route for RFC 1918 space, as otherwise it will be sent to +X # the public gateway and not work +X # More specific routes that may be set have preference over this generic route. +X ip route add 10.0.0.0/8 via $LOCAL_GW +X ip route add 172.16.0.0/12 via $LOCAL_GW +X ip route add 192.168.0.0/16 via $LOCAL_GW +X fi +} +X +getPublicIp() { +X public_ip=$ETH2_IP +X [ "$ETH2_IP" == "0.0.0.0" ] && public_ip=$ETH1_IP +X echo $public_ip +} +X +setup_ntp() { +X log_it "Setting up NTP" +X NTP_CONF_FILE="/etc/ntp.conf" +X if [ -f $NTP_CONF_FILE ] +X then +X IFS=',' read -a server_list <<< "$NTP_SERVER_LIST" +X for (( iterator=${#server_list[@]}-1 ; iterator>=0 ; iterator-- )) +X do +X server=$(echo ${server_list[iterator]} | tr -d '\r') +X PATTERN="server $server" +X if grep -q "^$PATTERN$" $NTP_CONF_FILE ; then +X sed -i "/^$PATTERN$/d" $NTP_CONF_FILE +X fi +X sed -i "0,/^server/s//$PATTERN\nserver/" $NTP_CONF_FILE +X done +X systemctl enable ntp +X else +X log_it "NTP configuration file not found" +X fi +} +X +routing_svcs() { +X echo "haproxy apache2" > /var/cache/cloud/enabled_svcs +X echo "cloud nfs-common portmap" > /var/cache/cloud/disabled_svcs +X if [ "$RROUTER" -eq "1" ] +X then +X echo "keepalived conntrackd" >> /var/cache/cloud/enabled_svcs +X echo "dnsmasq" >> /var/cache/cloud/disabled_svcs +X else +X echo "dnsmasq" >> /var/cache/cloud/enabled_svcs +X echo "keepalived conntrackd " >> /var/cache/cloud/disabled_svcs +X fi +} +X +parse_cmd_line() { +X CMDLINE=$(cat /var/cache/cloud/cmdline) +X TYPE="unknown" +X BOOTPROTO="static" +X DISABLE_RP_FILTER="false" +X STORAGE_IP="" +X STORAGE_NETMASK="" +X STORAGE_CIDR="" +X VM_PASSWORD="" +X +X CHEF_TMP_FILE=/tmp/cmdline.json +X COMMA="\t" +X echo -e "{\n\"type\": \"cmdline\"," > ${CHEF_TMP_FILE} +X echo -e "\"cmd_line\": {" >> ${CHEF_TMP_FILE} +X +X for i in $CMDLINE +X do +X # search for foo=bar pattern and cut out foo +X KEY=$(echo $i | cut -d= -f1) +X VALUE=$(echo $i | cut -d= -f2) +X echo -en ${COMMA} >> ${CHEF_TMP_FILE} +X # Two lines so values do not accidently interpretted as escapes!! +X echo -n \"${KEY}\"': '\"${VALUE}\" >> ${CHEF_TMP_FILE} +X COMMA=",\n\t" +X case $KEY in +X disable_rp_filter) +X export DISABLE_RP_FILTER=$VALUE +X ;; +X eth0ip) +X export ETH0_IP=$VALUE +X ;; +X eth1ip) +X export ETH1_IP=$VALUE +X ;; +X eth2ip) +X export ETH2_IP=$VALUE +X ;; +X host) +X export MGMT_HOST=$VALUE +X ;; +X gateway) +X export GW=$VALUE +X ;; +X ip6gateway) +X export IP6GW=$VALUE +X ;; +X eth0mask) +X export ETH0_MASK=$VALUE +X ;; +X eth1mask) +X export ETH1_MASK=$VALUE +X ;; +X eth2mask) +X export ETH2_MASK=$VALUE +X ;; +X eth0ip6) +X export ETH0_IP6=$VALUE +X ;; +X eth0ip6prelen) +X export ETH0_IP6_PRELEN=$VALUE +X ;; +X internaldns1) +X export internalNS1=$VALUE +X ;; +X internaldns2) +X export internalNS2=$VALUE +X ;; +X dns1) +X export NS1=$VALUE +X ;; +X dns2) +X export NS2=$VALUE +X ;; +X ip6dns1) +X export IP6_NS1=$VALUE +X ;; +X ip6dns2) +X export IP6_NS2=$VALUE +X ;; +X domain) +X export DOMAIN=$VALUE +X ;; +X dnssearchorder) +X export DNS_SEARCH_ORDER=$VALUE +X ;; +X useextdns) +X export USE_EXTERNAL_DNS=$VALUE +X ;; +X mgmtcidr) +X export MGMTNET=$VALUE +X ;; +X localgw) +X export LOCAL_GW=$VALUE +X ;; +X template) +X export TEMPLATE=$VALUE +X ;; +X sshonguest) +X export SSHONGUEST=$VALUE +X ;; +X name) +X export NAME=$VALUE +X ;; +X dhcprange) +X export DHCP_RANGE=$(echo $VALUE | tr ':' ',') +X ;; +X bootproto) +X export BOOTPROTO=$VALUE +X ;; +X type) +X export TYPE=$VALUE +X ;; +X defaultroute) +X export DEFAULTROUTE=$VALUE +X ;; +X redundant_router) +X export RROUTER=$VALUE +X ;; +X redundant_state) +X export RROUTER_STATE=$VALUE +X ;; +X guestgw) +X export GUEST_GW=$VALUE +X ;; +X guestbrd) +X export GUEST_BRD=$VALUE +X ;; +X guestcidrsize) +X export GUEST_CIDR_SIZE=$VALUE +X ;; +X router_pr) +X export ROUTER_PR=$VALUE +X ;; +X extra_pubnics) +X export EXTRA_PUBNICS=$VALUE +X ;; +X nic_macs) +X export NIC_MACS=$VALUE +X ;; +X mtu) +X export MTU=$VALUE +X ;; +X storageip) +X export STORAGE_IP=$VALUE +X ;; +X storagenetmask) +X export STORAGE_NETMASK=$VALUE +X ;; +X storagecidr) +X export STORAGE_CIDR=$VALUE +X ;; +X vmpassword) +X export VM_PASSWORD=$VALUE +X ;; +X vpccidr) +X export VPCCIDR=$VALUE +X ;; +X cidrsize) +X export CIDR_SIZE=$VALUE +X ;; +X advert_int) +X export ADVERT_INT=$VALUE +X ;; +X ntpserverlist) +X export NTP_SERVER_LIST=$VALUE +X ;; +X esac +X done +X echo -e "\n\t}\n}" >> ${CHEF_TMP_FILE} +X if [ "$TYPE" != "unknown" ] +X then +X mv ${CHEF_TMP_FILE} /var/cache/cloud/cmd_line.json +X fi +X +X [ $ETH0_IP ] && export LOCAL_ADDRS=$ETH0_IP +X [ $ETH0_IP6 ] && export LOCAL_ADDRS=$ETH0_IP6 +X [ $ETH0_IP ] && [ $ETH0_IP6 ] && export LOCAL_ADDRS="$ETH0_IP,$ETH0_IP6" +X +X # Randomize cloud password so only ssh login is allowed +X echo "cloud:`openssl rand -base64 32`" | chpasswd +X +X if [ x"$VM_PASSWORD" != x"" ] +X then +X echo "root:$VM_PASSWORD" | chpasswd +X fi +} +X +parse_cmd_line +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/common.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/common.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/common.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/common.sh': 'MD5 check failed' + ) << \SHAR_EOF +8754c81bacd82458e4ce221b476505ea cloud_scripts/opt/cloud/bin/setup/common.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/common.sh'` -ne 22472 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/common.sh' is not 22472" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +dhcpsrvr_svcs() { +X echo "dnsmasq apache2" > /var/cache/cloud/enabled_svcs +X echo "cloud nfs-common conntrackd keepalived haproxy portmap" > /var/cache/cloud/disabled_svcs +} +X +setup_dhcpsrvr() { +X log_it "Setting up dhcp server system vm" +X setup_common eth0 eth1 +X setup_dnsmasq +X setup_apache2 $ETH0_IP +X +X sed -i /$NAME/d /etc/hosts +X [ $ETH0_IP ] && echo "$ETH0_IP $NAME" >> /etc/hosts +X [ $ETH0_IP6 ] && echo "$ETH0_IP6 $NAME" >> /etc/hosts +X +X enable_irqbalance 0 +X enable_fwding 0 +X +X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 +X +X #Only allow DNS service for current network +X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X +X if [ "$SSHONGUEST" == "true" ] +X then +X setup_sshd $ETH0_IP "eth0" +X else +X setup_sshd $ETH1_IP "eth1" +X fi +} +X +dhcpsrvr_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute dhcpsrvr_svcs" +X exit 1 +fi +setup_dhcpsrvr +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh': 'MD5 check failed' + ) << \SHAR_EOF +08afc46420e5e388ba6be68cfdbd4a59 cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh'` -ne 1985 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' is not 1985" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/cloud-early-config ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/cloud-early-config (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/cloud-early-config (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" +X +# Clear boot up flag, it would be created by rc.local after boot up done +mkdir -p /var/cache/cloud +rm -f /var/cache/cloud/boot_up_done +X +[ -x /sbin/ifup ] || exit 0 +X +X. /lib/lsb/init-functions +X +log_it() { +X echo "$(date) $@" >> /var/log/cloud.log +X log_action_msg "$@" +} +X +patch() { +X local PATCH_MOUNT=/media/cdrom +X local patchfile=$PATCH_MOUNT/cloud-scripts.tgz +X local privkey=$PATCH_MOUNT/authorized_keys +X local md5file=/var/cache/cloud/cloud-scripts-signature +X local cdrom_dev= +X mkdir -p $PATCH_MOUNT +X +X if [ -e /dev/xvdd ]; then +X cdrom_dev=/dev/xvdd +X elif [ -e /dev/cdrom ]; then +X cdrom_dev=/dev/cdrom +X elif [ -e /dev/cdrom1 ]; then +X cdrom_dev=/dev/cdrom1 +X elif [ -e /dev/cdrom2 ]; then +X cdrom_dev=/dev/cdrom2 +X elif [ -e /dev/cdrom3 ]; then +X cdrom_dev=/dev/cdrom3 +X fi +X +X if [ -f /var/cache/cloud/authorized_keys ]; then +X privkey=/var/cache/cloud/authorized_keys +X fi +X +X if [ -n "$cdrom_dev" ]; then +X mount -o ro $cdrom_dev $PATCH_MOUNT +X local oldmd5= +X [ -f ${md5file} ] && oldmd5=$(cat ${md5file}) +X local newmd5= +X [ -f ${patchfile} ] && newmd5=$(md5sum ${patchfile} | awk '{print $1}') +X +X log_it "Scripts checksum detected: oldmd5=$oldmd5 newmd5=$newmd5" +X if [ "$oldmd5" != "$newmd5" ] && [ -f ${patchfile} ] && [ "$newmd5" != "" ] +X then +X tar xzf $patchfile -C / +X echo ${newmd5} > ${md5file} +X log_it "Patched scripts using $patchfile" +X touch /var/cache/cloud/patch.required +X fi +X +X if [ -f $privkey ]; then +X cp -f $privkey /root/.ssh/ +X chmod go-rwx /root/.ssh/authorized_keys +X fi +X fi +X +X return 0 +} +X +start() { +X log_it "Executing cloud-early-config" +X +X # Clear /tmp for file lock +X rm -f /tmp/*.lock +X rm -f /tmp/rrouter_bumped +X rm -f /root/.rnd +X echo "" > /root/.ssh/known_hosts +X +X patch +X sync +X /opt/cloud/bin/setup/bootstrap.sh +X +X log_it "Finished setting up systemvm" +X exit 0 +} +X +start +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/cloud-early-config failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config': 'MD5 check failed' + ) << \SHAR_EOF +c9e5973de3771fd5f5e9b490c60db970 cloud_scripts/opt/cloud/bin/setup/cloud-early-config +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config'` -ne 2765 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' is not 2765" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/default.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/default.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/default.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/default.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/default.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_default() { +X cat > /etc/network/interfaces << EOF +auto lo +iface lo inet loopback +EOF +X cp -f /etc/iptables/rt_tables_init /etc/iproute2/rt_tables +} +X +setup_default +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/default.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/default.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/default.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/default.sh': 'MD5 check failed' + ) << \SHAR_EOF +20e3a01cb77930eba6438de6d9a3f193 cloud_scripts/opt/cloud/bin/setup/default.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/default.sh'` -ne 1002 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/default.sh' is not 1002" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/postinit.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/postinit.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/postinit.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# This scripts before ssh.service but after cloud-early-config +X +# Eject cdrom if any +eject || true +X +# Restart journald for setting changes to apply +systemctl restart systemd-journald +X +TYPE=$(grep -Po 'type=\K[a-zA-Z]*' /var/cache/cloud/cmdline) +if [ "$TYPE" == "router" ] || [ "$TYPE" == "vpcrouter" ] || [ "$TYPE" == "dhcpsrvr" ] +then +X if [ -x /opt/cloud/bin/update_config.py ] +X then +X /opt/cloud/bin/update_config.py cmd_line.json || true +X fi +fi +X +[ ! -f /var/cache/cloud/enabled_svcs ] && touch /var/cache/cloud/enabled_svcs +for svc in $(cat /var/cache/cloud/enabled_svcs) +do +X systemctl enable --now --no-block $svc +done +X +[ ! -f /var/cache/cloud/disabled_svcs ] && touch /var/cache/cloud/disabled_svcs +for svc in $(cat /var/cache/cloud/disabled_svcs) +do +X systemctl disable --now --no-block $svc +done +X +# Restore the persistent iptables nat, rules and filters for IPv4 and IPv6 if they exist +ipv4="/etc/iptables/rules.v4" +if [ -e $ipv4 ] +then +X iptables-restore < $ipv4 +fi +X +ipv6="/etc/iptables/rules.v6" +if [ -e $ipv6 ] +then +X ip6tables-restore < $ipv6 +fi +X +# Patch known systemd/sshd memory leak - https://github.com/systemd/systemd/issues/8015#issuecomment-476160981 +echo '@include null' >> /etc/pam.d/systemd-user +X +# Enable and Start SSH +systemctl enable --now --no-block ssh +X +date > /var/cache/cloud/boot_up_done +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/postinit.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/postinit.sh': 'MD5 check failed' + ) << \SHAR_EOF +170afadf6f130e9cb697dca65a87aacb cloud_scripts/opt/cloud/bin/setup/postinit.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/postinit.sh'` -ne 2122 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' is not 2122" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/secstorage.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/secstorage.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/secstorage.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_secstorage() { +X log_it "Setting up secondary storage system vm" +X +X echo "cloud apache2 nfs-common portmap" > /var/cache/cloud/enabled_svcs +X echo "conntrackd keepalived haproxy dnsmasq" > /var/cache/cloud/disabled_svcs +X mkdir -p /var/log/cloud +X +X setup_common eth0 eth1 eth2 +X setup_storage_network +X setup_system_rfc1918_internal +X +X log_it "Setting up entry in hosts" +X sed -i /$NAME/d /etc/hosts +X public_ip=`getPublicIp` +X echo "$public_ip $NAME" >> /etc/hosts +X +X log_it "Applying iptables rules" +X cp /etc/iptables/iptables-secstorage /etc/iptables/rules.v4 +X +X log_it "Configuring sshd" +X local hyp=$HYPERVISOR +X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then +X setup_sshd $ETH1_IP "eth1" +X else +X setup_sshd $ETH0_IP "eth0" +X fi +X +X log_it "Configuring apache2" +X setup_apache2 $ETH2_IP +X +X # Deprecated, should move to Cs Python all of it +X sed -e "s///" \ +X -e "s///" \ +X -e "s/Listen .*:8180/Listen $ETH2_IP:80/g" \ +X -e "s/Listen .*:8443/Listen $ETH2_IP:443/g" /etc/apache2/vhost.template > /etc/apache2/sites-enabled/vhost-${ETH2_IP}.conf +X +X log_it "Setting up apache2 for post upload of volume/template" +X a2enmod proxy +X a2enmod proxy_http +X a2enmod headers +X +X cat >/etc/apache2/cors.conf </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh': 'MD5 check failed' + ) << \SHAR_EOF +14aea171a5e0fdfd3069bb96bde91e0b cloud_scripts/opt/cloud/bin/setup/secstorage.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh'` -ne 2720 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' is not 2720" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/ilbvm.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +ilbvm_svcs() { +X echo "haproxy" > /var/cache/cloud/enabled_svcs +X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs +} +X +setup_ilbvm() { +X log_it "Setting up Internal Load Balancer system vm" +X setup_common eth0 eth1 +X #eth0 = guest network, eth1=control network +X +X sed -i /$NAME/d /etc/hosts +X echo "$ETH0_IP $NAME" >> /etc/hosts +X +X cp /etc/iptables/iptables-ilbvm /etc/iptables/rules.v4 +X setup_sshd $ETH1_IP "eth1" +X +X enable_fwding 0 +X enable_irqbalance 1 +} +X +ilbvm_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute ilbvm svcs" +X exit 1 +fi +setup_ilbvm +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/ilbvm.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh': 'MD5 check failed' + ) << \SHAR_EOF +87c70bdf6c0d4d41f0ff87475494188f cloud_scripts/opt/cloud/bin/setup/ilbvm.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh'` -ne 1442 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' is not 1442" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_vpcrouter() { +X log_it "Setting up VPC virtual router system vm" +X +X if [ -f /etc/hosts ]; then +X grep -q $NAME /etc/hosts || echo "127.0.0.1 $NAME" >> /etc/hosts; +X fi +X +X cat > /etc/network/interfaces << EOF +auto lo eth0 +iface lo inet loopback +EOF +X setup_interface "0" $ETH0_IP $ETH0_MASK $GW +X +X echo $NAME > /etc/hostname +X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon +X hostnamectl set-hostname $NAME +X +X #Nameserver +X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries +X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries +X if [ -n "$internalNS1" ] +X then +X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS1" > /etc/resolv.conf +X fi +X +X if [ -n "$internalNS2" ] +X then +X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS2" >> /etc/resolv.conf +X fi +X if [ -n "$NS1" ] +X then +X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS1" >> /etc/resolv.conf +X fi +X +X if [ -n "$NS2" ] +X then +X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS2" >> /etc/resolv.conf +X fi +X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] +X then +X if [ "$HYPERVISOR" == "vmware" ] || [ "$HYPERVISOR" == "hyperv" ]; +X then +X ip route add $MGMTNET via $LOCAL_GW dev eth0 +X # workaround to activate vSwitch under VMware +X timeout 3 ping -n -c 3 $LOCAL_GW || true +X fi +X fi +X +X ip route delete default +X # create route table for static route +X +X sudo echo "252 static_route" >> /etc/iproute2/rt_tables 2>/dev/null +X sudo echo "251 static_route_back" >> /etc/iproute2/rt_tables 2>/dev/null +X sudo ip rule add from $VPCCIDR table static_route 2>/dev/null +X sudo ip rule add from $VPCCIDR table static_route_back 2>/dev/null +X +X setup_vpc_apache2 +X +X enable_irqbalance 1 +X enable_vpc_rpsrfs 1 +X disable_rpfilter +X enable_fwding 1 +X enable_passive_ftp 1 +X cp /etc/iptables/iptables-vpcrouter /etc/iptables/rules.v4 +X setup_sshd $ETH0_IP "eth0" +X cp /etc/vpcdnsmasq.conf /etc/dnsmasq.conf +X cp /etc/cloud-nic.rules /etc/udev/rules.d/cloud-nic.rules +X echo "" > /etc/dnsmasq.d/dhcphosts.txt +X echo "dhcp-hostsfile=/etc/dhcphosts.txt" > /etc/dnsmasq.d/cloud.conf +X +X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" +X #DNS server will append $DOMAIN to local queries +X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf +X #answer all local domain queries +X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf +X +X command -v dhcp_release > /dev/null 2>&1 +X no_dhcp_release=$? +X if [ $no_dhcp_release -eq 0 ] +X then +X echo 1 > /var/cache/cloud/dnsmasq_managed_lease +X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf +X else +X echo 0 > /var/cache/cloud/dnsmasq_managed_lease +X fi +X +X # Setup hourly logrotate +X if [ -f /etc/cron.daily/logrotate ]; then +X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 +X fi +} +X +routing_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute routing_svcs" +X exit 1 +fi +setup_vpcrouter +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh': 'MD5 check failed' + ) << \SHAR_EOF +811420d11f97b1d7237b964e8bbbdf5d cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh'` -ne 3885 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' is not 3885" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/router.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/router.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/router.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/router.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/router.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +check_reboot_vmware() { +X if [ "$HYPERVISOR" != "vmware" ]; then +X return +X fi +X +X if [ -n "$MGMTNET" ]; then +X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') +X if ping -n -c 1 -W 3 $MGMT_GW &> /dev/null; then +X log_it "Management gateway pingable, skipping VR reboot" +X return +X fi +X fi +X +X log_it "Management gateway not pingable, rebooting VR" +X sync +X reboot +} +X +setup_router() { +X # To save router public interface and gw ip information +X touch /var/cache/cloud/ifaceGwIp +X +X oldmd5= +X [ -f "/etc/udev/rules.d/70-persistent-net.rules" ] && oldmd5=$(md5sum "/etc/udev/rules.d/70-persistent-net.rules" | awk '{print $1}') +X +X if [ -n "$ETH2_IP" ]; then +X setup_common eth0 eth1 eth2 +X +X if [ -n "$EXTRA_PUBNICS" ]; then +X for ((i = 3; i < 3 + $EXTRA_PUBNICS; i++)); do +X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" +X done +X fi +X else +X setup_common eth0 eth1 +X if [ -n "$EXTRA_PUBNICS" ]; then +X for ((i = 2; i < 2 + $EXTRA_PUBNICS; i++)); do +X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" +X done +X fi +X fi +X +X log_it "Checking udev NIC assignment order changes" +X if [ "$NIC_MACS" != "" ] +X then +X init_interfaces_orderby_macs "$NIC_MACS" "/tmp/interfaces" "/tmp/udev-rules" +X newmd5=$(md5sum "/tmp/udev-rules" | awk '{print $1}') +X rm /tmp/interfaces +X rm /tmp/udev-rules +X +X if [ "$oldmd5" != "$newmd5" ] +X then +X log_it "Reloading udev for new udev NIC assignment" +X udevadm control --reload-rules && udevadm trigger +X check_reboot_vmware +X fi +X fi +X +X setup_aesni +X setup_dnsmasq +X setup_apache2 $ETH0_IP +X +X sed -i /$NAME/d /etc/hosts +X echo "$ETH0_IP $NAME" >> /etc/hosts +X +X enable_irqbalance 1 +X disable_rpfilter_domR +X enable_fwding 1 +X enable_rpsrfs 1 +X enable_passive_ftp 1 +X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 +X setup_sshd $ETH1_IP "eth1" +X +X # Only allow DNS service for current network +X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X +X # Setup hourly logrotate +X if [ -f /etc/cron.daily/logrotate ]; then +X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 +X fi +} +X +routing_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute routing_svcs" +X exit 1 +fi +setup_router +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/router.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/router.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/router.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/router.sh': 'MD5 check failed' + ) << \SHAR_EOF +2ae62d5d44c716730231c9d77618fe91 cloud_scripts/opt/cloud/bin/setup/router.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/router.sh'` -ne 3355 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/router.sh' is not 3355" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/elbvm.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/elbvm.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/elbvm.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +elbvm_svcs() { +X echo "haproxy" > /var/cache/cloud/enabled_svcs +X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs +} +X +setup_elbvm() { +X log_it "Setting up Elastic Load Balancer system vm" +X setup_common eth0 eth1 +X sed -i /$NAME/d /etc/hosts +X public_ip=$ETH2_IP +X [ "$ETH2_IP" == "0.0.0.0" ] || [ "$ETH2_IP" == "" ] && public_ip=$ETH0_IP +X echo "$public_ip $NAME" >> /etc/hosts +X +X cp /etc/iptables/iptables-elbvm /etc/iptables/rules.v4 +X if [ "$SSHONGUEST" == "true" ] +X then +X setup_sshd $ETH0_IP "eth0" +X else +X setup_sshd $ETH1_IP "eth1" +X fi +X +X enable_fwding 0 +X enable_irqbalance 0 +} +X +elbvm_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute elbvm svcs" +X exit 1 +fi +setup_elbvm +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/elbvm.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh': 'MD5 check failed' + ) << \SHAR_EOF +2d34615f1d40f6125a2205e6118ba07f cloud_scripts/opt/cloud/bin/setup/elbvm.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh'` -ne 1578 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' is not 1578" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/bootstrap.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" +CMDLINE=/var/cache/cloud/cmdline +X +rm -f /var/cache/cloud/enabled_svcs +rm -f /var/cache/cloud/disabled_svcs +X +X. /lib/lsb/init-functions +X +log_it() { +X echo "$(date) $@" >> /var/log/cloud.log +X log_action_msg "$@" +} +X +hypervisor() { +X if [ -d /proc/xen ]; then +X mount -t xenfs none /proc/xen +X $(dmesg | grep -q "Xen HVM") +X if [ $? -eq 0 ]; then # 1=PV,0=HVM +X echo "xen-hvm" && return 0 +X else +X echo "xen-pv" && return 0 +X fi +X fi +X +X [ -x /usr/sbin/virt-what ] && local facts=( $(virt-what) ) +X if [ "$facts" != "" ]; then +X # Xen HVM is recognized as Hyperv when Viridian extensions are enabled +X if [ "${facts[-1]}" == "xen-domU" ] && [ "${facts[0]}" == "hyperv" ]; then +X echo "xen-hvm" && return 0 +X else +X echo ${facts[-1]} && return 0 +X fi +X fi +X +X grep -q QEMU /proc/cpuinfo && echo "kvm" && return 0 +X grep -q QEMU /var/log/messages && echo "kvm" && return 0 +X +X vmware-checkvm &> /dev/null && echo "vmware" && return 0 +X +X echo "unknown" && return 1 +} +X +config_guest() { +X [ ! -d /proc/xen ] && sed -i 's/^vc/#vc/' /etc/inittab && telinit q +X [ -d /proc/xen ] && sed -i 's/^#vc/vc/' /etc/inittab && telinit q +X +X systemctl daemon-reload +X +X case $HYPERVISOR in +X xen-pv|xen-domU) +X systemctl stop ntpd +X systemctl disable ntpd +X systemctl enable xe-daemon +X systemctl start xe-daemon +X +X cat /proc/cmdline > $CMDLINE +X sed -i "s/%/ /g" $CMDLINE +X ;; +X xen-hvm) +X systemctl stop ntpd +X systemctl disable ntpd +X systemctl enable xe-daemon +X systemctl start xe-daemon +X +X if [ ! -f /usr/bin/xenstore-read ]; then +X log_it "ERROR: xentools not installed, cannot found xenstore-read" && exit 5 +X fi +X /usr/bin/xenstore-read vm-data/cloudstack/init > $CMDLINE +X sed -i "s/%/ /g" $CMDLINE +X ;; +X kvm) +X # Configure kvm hotplug support +X if grep -E 'CONFIG_HOTPLUG_PCI=y|CONFIG_HOTPLUG_PCI_ACPI=y' /boot/config-`uname -r`; then +X log_it "acpiphp and pci_hotplug module already compiled in" +X else +X modprobe acpiphp 2> /dev/null && log_it "acpiphp module loaded" || true +X modprobe pci_hotplug 2> /dev/null && log_it "pci_hotplug module loaded" || true +X fi +X +X sed -i -e "/^s0:2345:respawn.*/d" /etc/inittab +X sed -i -e "/6:23:respawn/a\s0:2345:respawn:/sbin/getty -L 115200 ttyS0 vt102" /etc/inittab +X systemctl enable qemu-guest-agent +X systemctl start qemu-guest-agent +X +X # Wait for $CMDLINE file to be written by the qemu-guest-agent +X for i in {1..60}; do +X if [ -s $CMDLINE ]; then +X log_it "Received a new non-empty cmdline file from qemu-guest-agent" +X break +X fi +X sleep 1 +X done +X if [ ! -s $CMDLINE ]; then +X log_it "Failed to receive the cmdline file via the qemu-guest-agent" +X fi +X ;; +X vmware) +X # system time sync'd with host via vmware tools +X systemctl stop ntpd +X systemctl disable ntpd +X systemctl enable open-vm-tools +X systemctl start open-vm-tools +X +X vmtoolsd --cmd 'machine.id.get' > $CMDLINE +X ;; +X virtualpc|hyperv) +X # Hyper-V is recognized as virtualpc hypervisor type. Boot args are passed using KVP Daemon +X systemctl enable hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service +X systemctl start hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service +X sleep 5 +X cp -f /var/opt/hyperv/.kvp_pool_0 $CMDLINE +X cat /dev/null > /var/opt/hyperv/.kvp_pool_0 +X ;; +X virtualbox) +X # Virtualbox is used to test the virtual router +X # get the commandline from a dmistring (yes, hacky!) +X dmidecode | grep cmdline | sed 's/^.*cmdline://' > $CMDLINE +X RV=$? +X if [ $RV -ne 0 ] ; then +X log_it "Failed to get cmdline from a virtualbox dmi property" +X fi +X ;; +X esac +X +X # Find and export guest type +X export TYPE=$(grep -Po 'type=\K[a-zA-Z]*' $CMDLINE) +} +X +patch_systemvm() { +X local patchfile=$1 +X local backupfolder="/tmp/.conf.backup" +X local logfile="/var/log/patchsystemvm.log" +X if [ -f /usr/local/cloud/systemvm/conf/cloud.jks ]; then +X rm -fr $backupfolder +X mkdir -p $backupfolder +X cp -r /usr/local/cloud/systemvm/conf/* $backupfolder/ +X fi +X rm /usr/local/cloud/systemvm -rf +X mkdir -p /usr/local/cloud/systemvm +X echo "All" | unzip $patchfile -d /usr/local/cloud/systemvm >$logfile 2>&1 +X find /usr/local/cloud/systemvm/ -name \*.sh | xargs chmod 555 +X if [ -f $backupfolder/cloud.jks ]; then +X cp -r $backupfolder/* /usr/local/cloud/systemvm/conf/ +X echo "Restored keystore file and certs using backup" >> $logfile +X fi +X rm -fr $backupfolder +X # Import global cacerts into 'cloud' service's keystore +X keytool -importkeystore -srckeystore /etc/ssl/certs/java/cacerts -destkeystore /usr/local/cloud/systemvm/certs/realhostip.keystore -srcstorepass changeit -deststorepass vmops.com -noprompt || true +X return 0 +} +X +patch() { +X local PATCH_MOUNT=/media/cdrom +X local logfile="/var/log/patchsystemvm.log" +X if [ "$TYPE" == "consoleproxy" ] || [ "$TYPE" == "secstorage" ] && [ -f ${PATCH_MOUNT}/agent.zip ] && [ -f /var/cache/cloud/patch.required ] +X then +X echo "Patching systemvm for cloud service with mount=$PATCH_MOUNT for type=$TYPE" >> $logfile +X patch_systemvm ${PATCH_MOUNT}/agent.zip +X if [ $? -gt 0 ] +X then +X echo "Failed to apply patch systemvm\n" >> $logfile +X exit 1 +X fi +X fi +X +X rm -f /var/cache/cloud/patch.required +X chmod -x /etc/systemd/system/cloud*.service +X systemctl daemon-reload +X umount $PATCH_MOUNT || true +X +X if [ -f /mnt/cmdline ]; then +X cat /mnt/cmdline > $CMDLINE +X fi +X return 0 +} +X +config_sysctl() { +X # When there is more memory reset the cache back pressure to default 100 +X physmem=$(free|awk '/^Mem:/{print $2}') +X if [ $((physmem)) -lt 409600 ]; then +X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 200" /etc/sysctl.conf +X else +X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 100" /etc/sysctl.conf +X fi +X +X sync +X sysctl -p +} +X +bootstrap() { +X log_it "Bootstrapping systemvm appliance" +X +X export HYPERVISOR=$(hypervisor) +X [ $? -ne 0 ] && log_it "Failed to detect hypervisor type, bailing out" && exit 10 +X log_it "Starting guest services for $HYPERVISOR" +X +X config_guest +X patch +X config_sysctl +X +X log_it "Configuring systemvm type=$TYPE" +X if [ -f "/opt/cloud/bin/setup/$TYPE.sh" ]; then +X /opt/cloud/bin/setup/$TYPE.sh +X else +X /opt/cloud/bin/setup/default.sh +X fi +X +X log_it "Finished setting up systemvm" +X exit 0 +} +X +bootstrap +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/bootstrap.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh': 'MD5 check failed' + ) << \SHAR_EOF +722a9c6abfff147c7727fdcd85c96767 cloud_scripts/opt/cloud/bin/setup/bootstrap.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh'` -ne 7721 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' is not 7721" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_console_proxy() { +X log_it "Setting up console proxy system vm" +X +X echo "cloud" > /var/cache/cloud/enabled_svcs +X echo "haproxy dnsmasq apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs +X mkdir -p /var/log/cloud +X +X setup_common eth0 eth1 eth2 +X setup_system_rfc1918_internal +X +X log_it "Setting up entry in hosts" +X sed -i /$NAME/d /etc/hosts +X public_ip=`getPublicIp` +X echo "$public_ip $NAME" >> /etc/hosts +X +X log_it "Applying iptables rules" +X cp /etc/iptables/iptables-consoleproxy /etc/iptables/rules.v4 +X +X log_it "Configuring sshd" +X local hyp=$HYPERVISOR +X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then +X setup_sshd $ETH1_IP "eth1" +X else +X setup_sshd $ETH0_IP "eth0" +X fi +X +X disable_rpfilter +X enable_fwding 0 +X enable_irqbalance 0 +X rm -f /etc/logrotate.d/cloud +} +X +setup_console_proxy +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh': 'MD5 check failed' + ) << \SHAR_EOF +44adac9bf5e54d4791da00e3d1bdaf46 cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh'` -ne 1658 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' is not 1658" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/common.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/common.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/common.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/common.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/common.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" +X +X. /lib/lsb/init-functions +X +log_it() { +X echo "$(date) $@" >> /var/log/cloud.log +X log_action_msg "$@" +} +X +init_interfaces_orderby_macs() { +X macs=( $(echo $1 | sed "s/|/ /g") ) +X total_nics=${#macs[@]} +X interface_file=${2:-"/etc/network/interfaces"} +X rule_file=${3:-"/etc/udev/rules.d/70-persistent-net.rules"} +X +X echo -n "auto lo" > $interface_file +X for((i=0; i> $interface_file +X fi +X done +X +X cat >> $interface_file << EOF +X +iface lo inet loopback +X +EOF +X +X echo "" > $rule_file +X for((i=0; i < ${#macs[@]}; i++)) +X do +X echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${macs[$i]}\", NAME=\"eth$i\"" >> $rule_file +X done +} +X +init_interfaces() { +X if [ "$NIC_MACS" == "" ] +X then +X cat > /etc/network/interfaces << EOF +auto lo $1 $2 $3 +iface lo inet loopback +X +EOF +X else +X init_interfaces_orderby_macs "$NIC_MACS" +X fi +} +X +setup_interface() { +X local intfnum=$1 +X local ip=$2 +X local mask=$3 +X local gw=$4 +X local force=$5 +X local intf=eth${intfnum} +X local bootproto="static" +X +X if [ "$BOOTPROTO" == "dhcp" ] +X then +X if [ "$intfnum" != "0" ] +X then +X bootproto="dhcp" +X fi +X fi +X +X if [ "$ip" != "0.0.0.0" -a "$ip" != "" -o "$force" == "force" ] +X then +X echo "iface $intf inet $bootproto" >> /etc/network/interfaces +X if [ "$bootproto" == "static" ] +X then +X echo " address $ip " >> /etc/network/interfaces +X echo " netmask $mask" >> /etc/network/interfaces +X fi +X fi +X +X if [ "$ip" == "0.0.0.0" -o "$ip" == "" ] +X then +X ifconfig $intf down +X fi +X +X if [ "$force" == "force" ] +X then +X ifdown $intf +X else +X ifdown $intf +X if [ "$RROUTER" != "1" -o "$1" != "2" ] +X then +X ifup $intf +X fi +X fi +} +X +setup_interface_ipv6() { +X sysctl net.ipv6.conf.all.disable_ipv6=0 +X sysctl net.ipv6.conf.all.forwarding=1 +X sysctl net.ipv6.conf.all.accept_ra=1 +X +X sed -i "s/net.ipv6.conf.all.disable_ipv6 =.*$/net.ipv6.conf.all.disable_ipv6 = 0/" /etc/sysctl.conf +X sed -i "s/net.ipv6.conf.all.forwarding =.*$/net.ipv6.conf.all.forwarding = 1/" /etc/sysctl.conf +X sed -i "s/net.ipv6.conf.all.accept_ra =.*$/net.ipv6.conf.all.accept_ra = 1/" /etc/sysctl.conf +X +X local intfnum=$1 +X local ipv6="$2" +X local prelen="$3" +X local intf=eth${intfnum} +X +X echo "iface $intf inet6 static" >> /etc/network/interfaces +X echo " address $ipv6 " >> /etc/network/interfaces +X echo " netmask $prelen" >> /etc/network/interfaces +X echo " accept_ra 1" >> /etc/network/interfaces +X ifdown $intf +X ifup $intf +} +X +X +enable_fwding() { +X local enabled=$1 +X log_it "cloud: enable_fwding = $1" +X log_it "enable_fwding = $1" +X echo "$1" > /proc/sys/net/ipv4/ip_forward +X [ -f /etc/iptables/iptables.conf ] && sed -i "s/ENABLE_ROUTING=.*$/ENABLE_ROUTING=$enabled/" /etc/iptables/iptables.conf && return +} +X +enable_passive_ftp() { +X log_it "cloud: enabling passive FTP for guest VMs" +X echo "$1" > /proc/sys/net/netfilter/nf_conntrack_helper +} +X +disable_rpfilter() { +X log_it "cloud: disable rp_filter" +X log_it "disable rpfilter" +X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf +} +X +get_public_vif_list() { +X local vif_list="" +X for i in /sys/class/net/eth*; do +X vif=$(basename $i); +X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] +X then +X vif_list="$vif_list $vif"; +X fi +X done +X +X echo $vif_list +} +X +disable_rpfilter_domR() { +X log_it "cloud: Tuning rp_filter on public interfaces" +X +X VIF_LIST=$(get_public_vif_list) +X log_it "rpfilter public interfaces : $VIF_LIST" +X if [ "$DISABLE_RP_FILTER" == "true" ] +X then +X log_it "cloud: disable rp_filter on public interfaces" +X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf +X echo "0" > /proc/sys/net/ipv4/conf/default/rp_filter +X for vif in $VIF_LIST; do +X log_it "cloud: disable rp_filter on public interface: $vif" +X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 0/" /etc/sysctl.conf +X echo "0" > /proc/sys/net/ipv4/conf/$vif/rp_filter +X done +X else +X log_it "cloud: enable rp_filter on public interfaces" +X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 1/" /etc/sysctl.conf +X echo "1" > /proc/sys/net/ipv4/conf/default/rp_filter +X for vif in $VIF_LIST; do +X log_it "cloud: enable rp_filter on public interface: $vif" +X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 1/" /etc/sysctl.conf +X echo "1" > /proc/sys/net/ipv4/conf/$vif/rp_filter +X done +X fi +X log_it "cloud: Enabling rp_filter on Non-public interfaces(eth0,eth1,lo)" +X echo "1" > /proc/sys/net/ipv4/conf/eth0/rp_filter +X echo "1" > /proc/sys/net/ipv4/conf/eth1/rp_filter +X echo "1" > /proc/sys/net/ipv4/conf/lo/rp_filter +} +X +enable_irqbalance() { +X local enabled=$1 +X local proc=0 +X +X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) +X if [ $proc -le 1 ] && [ $enabled -eq 1 ] +X then +X enabled=0 +X fi +X +X log_it "Processors = $proc Enable service ${svc} = $enabled" +X local cfg=/etc/default/irqbalance +X [ -f $cfg ] && sed -i "s/ENABLED=.*$/ENABLED=$enabled/" $cfg && return +} +X +enable_vpc_rpsrfs() { +X local enable=$1 +X if [ $enable -eq 0 ] +X then +X echo 0 > /etc/rpsrfsenable +X else +X echo 1 > /etc/rpsrfsenable +X fi +X +X return 0 +} +X +enable_rpsrfs() { +X local enable=$1 +X +X if [ $enable -eq 0 ] +X then +X echo 0 > /etc/rpsrfsenable +X return 0 +X fi +X +X if [ ! -f /sys/class/net/eth0/queues/rx-0/rps_cpus ] +X then +X echo "rps is not enabled in the kernel" +X echo 0 > /etc/rpsrfsenable +X return 0 +X fi +X +X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) +X if [ $proc -le 1 ] +X then +X echo 0 > /etc/rpsrfsenable +X return 0; +X fi +X +X echo 1 > /etc/rpsrfsenable +X num=1 +X num=$(($num<<$proc)) +X num=$(($num-1)); +X echo $num; +X hex=$(printf "%x\n" $num) +X echo $hex; +X #enable rps +X echo $hex > /sys/class/net/eth0/queues/rx-0/rps_cpus +X echo $hex > /sys/class/net/eth2/queues/rx-0/rps_cpus +X +X #enble rfs +X echo 256 > /proc/sys/net/core/rps_sock_flow_entries +X echo 256 > /sys/class/net/eth0/queues/rx-0/rps_flow_cnt +X echo 256 > /sys/class/net/eth2/queues/rx-0/rps_flow_cnt +} +X +setup_common() { +X init_interfaces $1 $2 $3 +X if [ -n "$ETH0_IP" ] +X then +X setup_interface "0" $ETH0_IP $ETH0_MASK $GW +X fi +X if [ -n "$ETH0_IP6" ] +X then +X setup_interface_ipv6 "0" $ETH0_IP6 $ETH0_IP6_PRELEN +X fi +X setup_interface "1" $ETH1_IP $ETH1_MASK $GW +X if [ -n "$ETH2_IP" ] +X then +X setup_interface "2" $ETH2_IP $ETH2_MASK $GW +X fi +X +X echo $NAME > /etc/hostname +X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon +X hostnamectl set-hostname $NAME +X +X #Nameserver +X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries +X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries +X if [ -n "$internalNS1" ] +X then +X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS1" > /etc/resolv.conf +X fi +X +X if [ -n "$internalNS2" ] +X then +X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $internalNS2" >> /etc/resolv.conf +X fi +X if [ -n "$NS1" ] +X then +X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS1" >> /etc/resolv.conf +X fi +X +X if [ -n "$NS2" ] +X then +X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $NS2" >> /etc/resolv.conf +X fi +X +X if [ -n "$IP6_NS1" ] +X then +X echo "nameserver $IP6_NS1" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $IP6_NS1" >> /etc/resolv.conf +X fi +X if [ -n "$IP6_NS2" ] +X then +X echo "nameserver $IP6_NS2" >> /etc/dnsmasq-resolv.conf +X echo "nameserver $IP6_NS2" >> /etc/resolv.conf +X fi +X +X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] +X then +X ip route add $MGMTNET via $LOCAL_GW dev eth1 +X fi +X +X ip route delete default +X if [ "$RROUTER" != "1" ] +X then +X gwdev=$3 +X if [ -z "$gwdev" ] +X then +X gwdev="eth0" +X fi +X +X ip route add default via $GW dev $gwdev +X fi +X +X # Workaround to activate vSwitch under VMware +X timeout 3 ping -n -c 3 $GW & +X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] +X then +X timeout 3 ping -n -c 3 $LOCAL_GW & +X #This code is added to address ARP issue by pinging MGMT_GW +X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') +X timeout 3 ping -n -c 3 $MGMT_GW & +X fi +X +X if [ "$HYPERVISOR" == "vmware" ]; then +X ntpq -p &> /dev/null || vmware-toolbox-cmd timesync enable +X fi +} +X +setup_dnsmasq() { +X log_it "Setting up dnsmasq" +X +X touch /etc/dhcpopts.txt +X +X [ -z $DHCP_RANGE ] && [ $ETH0_IP ] && DHCP_RANGE=$ETH0_IP +X [ $ETH0_IP6 ] && DHCP_RANGE_IP6=$ETH0_IP6 +X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" +X #removing the dnsmasq multiple ranges config file. +X rm /etc/dnsmasq.d/multiple_ranges.conf +X +X #get the template +X cp /etc/dnsmasq.conf.tmpl /etc/dnsmasq.conf +X +X if [ -n "$DOMAIN" ] +X then +X #send domain name to dhcp clients +X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\"$DOMAIN\"/ /etc/dnsmasq.conf +X #DNS server will append $DOMAIN to local queries +X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf +X #answer all local domain queries +X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf +X fi +X +X if [ -n "$DNS_SEARCH_ORDER" ] +X then +X sed -i -e "/^[#]*dhcp-option.*=119.*$/d" /etc/dnsmasq.conf +X echo "dhcp-option-force=119,$DNS_SEARCH_ORDER" >> /etc/dnsmasq.conf +X # set the domain search order as a space seprated list for option 15 +X DNS_SEARCH_ORDER=$(echo $DNS_SEARCH_ORDER | sed 's/,/ /g') +X #send domain name to dhcp clients +X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\""$DNS_SEARCH_ORDER"\"/ /etc/dnsmasq.conf +X fi +X +X if [ $DHCP_RANGE ] +X then +X sed -i -e "s/^dhcp-range_ip4=.*$/dhcp-range=$DHCP_RANGE,static/" /etc/dnsmasq.conf +X else +X sed -i -e "s/^dhcp-range_ip4=.*$//" /etc/dnsmasq.conf +X fi +X if [ $DHCP_RANGE_IP6 ] +X then +X sed -i -e "s/^dhcp-range_ip6=.*$/dhcp-range=$DHCP_RANGE_IP6,static/" /etc/dnsmasq.conf +X # For nondefault6 tagged host, don't send dns-server information +X sed -i /nondefault6/d /etc/dnsmasq.conf +X echo "dhcp-option=nondefault6,option6:dns-server" >> /etc/dnsmasq.conf +X else +X sed -i -e "s/^dhcp-range_ip6=.*$//" /etc/dnsmasq.conf +X fi +X +X if [ "$RROUTER" == "1" ] +X then +X DEFAULT_GW=$GUEST_GW +X INTERNAL_DNS=$GUEST_GW +X else +X if [ "$TYPE" == "dhcpsrvr" ] +X then +X DEFAULT_GW=$GW +X else +X DEFAULT_GW=$ETH0_IP +X fi +X INTERNAL_DNS=$ETH0_IP +X fi +X sed -i -e "/^[#]*dhcp-option=option:router.*$/d" /etc/dnsmasq.conf +X [ $DEFAULT_GW ] && echo "dhcp-option=option:router,$DEFAULT_GW" >> /etc/dnsmasq.conf +X +X [ $ETH0_IP ] && [ $NS1 ] && NS="$NS1," +X [ $ETH0_IP ] && [ $NS2 ] && NS="$NS$NS2," +X [ $ETH0_IP6 ] && [ $IP6_NS1 ] && NS6="[$IP6_NS1]," +X [ $ETH0_IP6 ] && [ $IP6_NS2 ] && NS6="$NS6[$IP6_NS2]," +X #for now set up ourself as the dns server as well +X sed -i -e "/^[#]*dhcp-option=6,.*$/d" /etc/dnsmasq.conf +X sed -i -e "/^[#]*dhcp-option=option6:dns-server,.*$/d" /etc/dnsmasq.conf +X if [ "$USE_EXTERNAL_DNS" != "true" ] +X then +X [ $ETH0_IP ] && NS="$INTERNAL_DNS,$NS" +X [ $ETH0_IP6 ] && NS6="[::],$NS6" +X # enable dns +X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf +X else +X # disable dns +X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf +X echo "port=0" >> /etc/dnsmasq.conf +X fi +X NS=${NS%?} +X NS6=${NS6%?} +X [ $ETH0_IP ] && echo "dhcp-option=6,$NS" >> /etc/dnsmasq.conf +X [ $ETH0_IP6 ] && echo "dhcp-option=option6:dns-server,$NS6" >> /etc/dnsmasq.conf +X #adding the name data-server to the /etc/hosts for allowing the access to user-data service and ssh-key reset in every subnet. +X #removing the existing entires to avoid duplicates on restarts. +X sed -i '/data-server/d' /etc/hosts +X if [ -n "$ETH0_IP" ] +X then +X echo "$ETH0_IP data-server" >> /etc/hosts +X fi +X if [ -n "$ETH0_IP6" ] +X then +X echo "$ETH0_IP6 data-server" >> /etc/hosts +X fi +X #add the dhcp-client-update only if dnsmasq version is 2.6 and above +X dnsmasqVersion=$(dnsmasq -v | grep version -m 1 | grep -o "[[:digit:]]\.[[:digit:]]") +X major=$(echo "$dnsmasqVersion" | cut -d '.' -f 1) +X minor=$(echo "$dnsmasqVersion" | cut -d '.' -f 2) +X if [ "$major" -eq '2' -a "$minor" -ge '6' ] || [ "$major" -gt '2' ] +X then +X sed -i -e "/^dhcp-client-update/d" /etc/dnsmasq.conf +X echo 'dhcp-client-update' >> /etc/dnsmasq.conf +X fi +X +X command -v dhcp_release > /dev/null 2>&1 +X no_dhcp_release=$? +X if [ $no_dhcp_release -eq 0 -a -z "$ETH0_IP6" ] +X then +X echo 1 > /var/cache/cloud/dnsmasq_managed_lease +X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf +X else +X echo 0 > /var/cache/cloud/dnsmasq_managed_lease +X fi +} +X +setup_sshd(){ +X local ip=$1 +X local eth=$2 +X [ -f /etc/ssh/sshd_config ] && sed -i -e "s/^[#]*ListenAddress.*$/ListenAddress $ip/" /etc/ssh/sshd_config +X sed -i "/3922/s/eth./$eth/" /etc/iptables/rules.v4 +} +X +setup_vpc_apache2() { +X log_it "Setting up apache web server for VPC" +X systemctl disable apache2 +X clean_ipalias_config +X setup_apache2_common +} +X +clean_ipalias_config() { +X rm -f /etc/apache2/conf.d/ports.*.meta-data.conf +X rm -f /etc/apache2/sites-available/ipAlias* +X rm -f /etc/apache2/sites-enabled/ipAlias* +X rm -f /etc/apache2/conf.d/vhost*.conf +X rm -f /etc/apache2/ports.conf +X rm -f /etc/apache2/vhostexample.conf +X rm -f /etc/apache2/sites-available/* +X rm -f /etc/apache2/sites-enabled/* +X +X rm -rf /etc/failure_config +} +X +setup_apache2_common() { +X sed -i 's/^Include ports.conf.*/# CS: Done by Python CsApp config\n#Include ports.conf/g' /etc/apache2/apache2.conf +X # Disable listing of http://SSVM-IP/icons folder for security issue. see article http://www.i-lateral.com/tutorials/disabling-the-icons-folder-on-an-ubuntu-web-server/ +X [ -f /etc/apache2/mods-available/alias.conf ] && sed -i s/"Options Indexes MultiViews"/"Options -Indexes MultiViews"/ /etc/apache2/mods-available/alias.conf +X +X echo "Options -Indexes" > /var/www/html/.htaccess +} +X +setup_apache2() { +X log_it "Setting up apache web server" +X mkdir -p /var/www +X chown www-data:www-data -R /var/www +X clean_ipalias_config +X setup_apache2_common +X local ip=$1 +} +X +setup_aesni() { +X if [ `grep aes /proc/cpuinfo | wc -l` -gt 0 ] +X then +X modprobe aesni_intel +X fi +} +X +setup_storage_network() { +X if [ x"$STORAGE_IP" == "x" -o x"$STORAGE_NETMASK" == "x" ] +X then +X log_it "Incompleted parameters STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR. Cannot setup storage network" +X return +X fi +X +X echo "" >> /etc/network/interfaces +X echo "auto eth3" >> /etc/network/interfaces +X +X setup_interface "3" "$STORAGE_IP" "$STORAGE_NETMASK" +X [ -n "$MTU" ] && ifconfig eth3 mtu $MTU && echo " mtu $MTU" >> /etc/network/interfaces +X #ip route add "$STORAGE_CIDR" via "$STORAGE_IP" +X log_it "Successfully setup storage network with STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR" +} +X +setup_system_rfc1918_internal() { +X public_ip=`getPublicIp` +X echo "$public_ip" | grep -E "^((127\.)|(10\.)|(172\.1[6-9]\.)|(172\.2[0-9]\.)|(172\.3[0-1]\.)|(192\.168\.))" +X if [ "$?" == "0" ]; then +X log_it "Not setting up route of RFC1918 space to $LOCAL_GW befause $public_ip is RFC1918." +X else +X log_it "Setting up route of RFC1918 space to $LOCAL_GW" +X # Setup general route for RFC 1918 space, as otherwise it will be sent to +X # the public gateway and not work +X # More specific routes that may be set have preference over this generic route. +X ip route add 10.0.0.0/8 via $LOCAL_GW +X ip route add 172.16.0.0/12 via $LOCAL_GW +X ip route add 192.168.0.0/16 via $LOCAL_GW +X fi +} +X +getPublicIp() { +X public_ip=$ETH2_IP +X [ "$ETH2_IP" == "0.0.0.0" ] && public_ip=$ETH1_IP +X echo $public_ip +} +X +setup_ntp() { +X log_it "Setting up NTP" +X NTP_CONF_FILE="/etc/ntp.conf" +X if [ -f $NTP_CONF_FILE ] +X then +X IFS=',' read -a server_list <<< "$NTP_SERVER_LIST" +X for (( iterator=${#server_list[@]}-1 ; iterator>=0 ; iterator-- )) +X do +X server=$(echo ${server_list[iterator]} | tr -d '\r') +X PATTERN="server $server" +X if grep -q "^$PATTERN$" $NTP_CONF_FILE ; then +X sed -i "/^$PATTERN$/d" $NTP_CONF_FILE +X fi +X sed -i "0,/^server/s//$PATTERN\nserver/" $NTP_CONF_FILE +X done +X systemctl enable ntp +X else +X log_it "NTP configuration file not found" +X fi +} +X +routing_svcs() { +X echo "haproxy apache2" > /var/cache/cloud/enabled_svcs +X echo "cloud nfs-common portmap" > /var/cache/cloud/disabled_svcs +X if [ "$RROUTER" -eq "1" ] +X then +X echo "keepalived conntrackd" >> /var/cache/cloud/enabled_svcs +X echo "dnsmasq" >> /var/cache/cloud/disabled_svcs +X else +X echo "dnsmasq" >> /var/cache/cloud/enabled_svcs +X echo "keepalived conntrackd " >> /var/cache/cloud/disabled_svcs +X fi +} +X +parse_cmd_line() { +X CMDLINE=$(cat /var/cache/cloud/cmdline) +X TYPE="unknown" +X BOOTPROTO="static" +X DISABLE_RP_FILTER="false" +X STORAGE_IP="" +X STORAGE_NETMASK="" +X STORAGE_CIDR="" +X VM_PASSWORD="" +X +X CHEF_TMP_FILE=/tmp/cmdline.json +X COMMA="\t" +X echo -e "{\n\"type\": \"cmdline\"," > ${CHEF_TMP_FILE} +X echo -e "\"cmd_line\": {" >> ${CHEF_TMP_FILE} +X +X for i in $CMDLINE +X do +X # search for foo=bar pattern and cut out foo +X KEY=$(echo $i | cut -d= -f1) +X VALUE=$(echo $i | cut -d= -f2) +X echo -en ${COMMA} >> ${CHEF_TMP_FILE} +X # Two lines so values do not accidently interpretted as escapes!! +X echo -n \"${KEY}\"': '\"${VALUE}\" >> ${CHEF_TMP_FILE} +X COMMA=",\n\t" +X case $KEY in +X disable_rp_filter) +X export DISABLE_RP_FILTER=$VALUE +X ;; +X eth0ip) +X export ETH0_IP=$VALUE +X ;; +X eth1ip) +X export ETH1_IP=$VALUE +X ;; +X eth2ip) +X export ETH2_IP=$VALUE +X ;; +X host) +X export MGMT_HOST=$VALUE +X ;; +X gateway) +X export GW=$VALUE +X ;; +X ip6gateway) +X export IP6GW=$VALUE +X ;; +X eth0mask) +X export ETH0_MASK=$VALUE +X ;; +X eth1mask) +X export ETH1_MASK=$VALUE +X ;; +X eth2mask) +X export ETH2_MASK=$VALUE +X ;; +X eth0ip6) +X export ETH0_IP6=$VALUE +X ;; +X eth0ip6prelen) +X export ETH0_IP6_PRELEN=$VALUE +X ;; +X internaldns1) +X export internalNS1=$VALUE +X ;; +X internaldns2) +X export internalNS2=$VALUE +X ;; +X dns1) +X export NS1=$VALUE +X ;; +X dns2) +X export NS2=$VALUE +X ;; +X ip6dns1) +X export IP6_NS1=$VALUE +X ;; +X ip6dns2) +X export IP6_NS2=$VALUE +X ;; +X domain) +X export DOMAIN=$VALUE +X ;; +X dnssearchorder) +X export DNS_SEARCH_ORDER=$VALUE +X ;; +X useextdns) +X export USE_EXTERNAL_DNS=$VALUE +X ;; +X mgmtcidr) +X export MGMTNET=$VALUE +X ;; +X localgw) +X export LOCAL_GW=$VALUE +X ;; +X template) +X export TEMPLATE=$VALUE +X ;; +X sshonguest) +X export SSHONGUEST=$VALUE +X ;; +X name) +X export NAME=$VALUE +X ;; +X dhcprange) +X export DHCP_RANGE=$(echo $VALUE | tr ':' ',') +X ;; +X bootproto) +X export BOOTPROTO=$VALUE +X ;; +X type) +X export TYPE=$VALUE +X ;; +X defaultroute) +X export DEFAULTROUTE=$VALUE +X ;; +X redundant_router) +X export RROUTER=$VALUE +X ;; +X redundant_state) +X export RROUTER_STATE=$VALUE +X ;; +X guestgw) +X export GUEST_GW=$VALUE +X ;; +X guestbrd) +X export GUEST_BRD=$VALUE +X ;; +X guestcidrsize) +X export GUEST_CIDR_SIZE=$VALUE +X ;; +X router_pr) +X export ROUTER_PR=$VALUE +X ;; +X extra_pubnics) +X export EXTRA_PUBNICS=$VALUE +X ;; +X nic_macs) +X export NIC_MACS=$VALUE +X ;; +X mtu) +X export MTU=$VALUE +X ;; +X storageip) +X export STORAGE_IP=$VALUE +X ;; +X storagenetmask) +X export STORAGE_NETMASK=$VALUE +X ;; +X storagecidr) +X export STORAGE_CIDR=$VALUE +X ;; +X vmpassword) +X export VM_PASSWORD=$VALUE +X ;; +X vpccidr) +X export VPCCIDR=$VALUE +X ;; +X cidrsize) +X export CIDR_SIZE=$VALUE +X ;; +X advert_int) +X export ADVERT_INT=$VALUE +X ;; +X ntpserverlist) +X export NTP_SERVER_LIST=$VALUE +X ;; +X esac +X done +X echo -e "\n\t}\n}" >> ${CHEF_TMP_FILE} +X if [ "$TYPE" != "unknown" ] +X then +X mv ${CHEF_TMP_FILE} /var/cache/cloud/cmd_line.json +X fi +X +X [ $ETH0_IP ] && export LOCAL_ADDRS=$ETH0_IP +X [ $ETH0_IP6 ] && export LOCAL_ADDRS=$ETH0_IP6 +X [ $ETH0_IP ] && [ $ETH0_IP6 ] && export LOCAL_ADDRS="$ETH0_IP,$ETH0_IP6" +X +X # Randomize cloud password so only ssh login is allowed +X echo "cloud:`openssl rand -base64 32`" | chpasswd +X +X if [ x"$VM_PASSWORD" != x"" ] +X then +X echo "root:$VM_PASSWORD" | chpasswd +X fi +} +X +parse_cmd_line +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/common.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/common.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/common.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/common.sh': 'MD5 check failed' + ) << \SHAR_EOF +8754c81bacd82458e4ce221b476505ea cloud_scripts/opt/cloud/bin/setup/common.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/common.sh'` -ne 22472 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/common.sh' is not 22472" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +dhcpsrvr_svcs() { +X echo "dnsmasq apache2" > /var/cache/cloud/enabled_svcs +X echo "cloud nfs-common conntrackd keepalived haproxy portmap" > /var/cache/cloud/disabled_svcs +} +X +setup_dhcpsrvr() { +X log_it "Setting up dhcp server system vm" +X setup_common eth0 eth1 +X setup_dnsmasq +X setup_apache2 $ETH0_IP +X +X sed -i /$NAME/d /etc/hosts +X [ $ETH0_IP ] && echo "$ETH0_IP $NAME" >> /etc/hosts +X [ $ETH0_IP6 ] && echo "$ETH0_IP6 $NAME" >> /etc/hosts +X +X enable_irqbalance 0 +X enable_fwding 0 +X +X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 +X +X #Only allow DNS service for current network +X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 +X +X if [ "$SSHONGUEST" == "true" ] +X then +X setup_sshd $ETH0_IP "eth0" +X else +X setup_sshd $ETH1_IP "eth1" +X fi +} +X +dhcpsrvr_svcs +if [ $? -gt 0 ] +then +X log_it "Failed to execute dhcpsrvr_svcs" +X exit 1 +fi +setup_dhcpsrvr +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh': 'MD5 check failed' + ) << \SHAR_EOF +08afc46420e5e388ba6be68cfdbd4a59 cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh'` -ne 1985 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' is not 1985" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/cloud-early-config ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/cloud-early-config (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/cloud-early-config (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" +X +# Clear boot up flag, it would be created by rc.local after boot up done +mkdir -p /var/cache/cloud +rm -f /var/cache/cloud/boot_up_done +X +[ -x /sbin/ifup ] || exit 0 +X +X. /lib/lsb/init-functions +X +log_it() { +X echo "$(date) $@" >> /var/log/cloud.log +X log_action_msg "$@" +} +X +patch() { +X local PATCH_MOUNT=/media/cdrom +X local patchfile=$PATCH_MOUNT/cloud-scripts.tgz +X local privkey=$PATCH_MOUNT/authorized_keys +X local md5file=/var/cache/cloud/cloud-scripts-signature +X local cdrom_dev= +X mkdir -p $PATCH_MOUNT +X +X if [ -e /dev/xvdd ]; then +X cdrom_dev=/dev/xvdd +X elif [ -e /dev/cdrom ]; then +X cdrom_dev=/dev/cdrom +X elif [ -e /dev/cdrom1 ]; then +X cdrom_dev=/dev/cdrom1 +X elif [ -e /dev/cdrom2 ]; then +X cdrom_dev=/dev/cdrom2 +X elif [ -e /dev/cdrom3 ]; then +X cdrom_dev=/dev/cdrom3 +X fi +X +X if [ -f /var/cache/cloud/authorized_keys ]; then +X privkey=/var/cache/cloud/authorized_keys +X fi +X +X if [ -n "$cdrom_dev" ]; then +X mount -o ro $cdrom_dev $PATCH_MOUNT +X local oldmd5= +X [ -f ${md5file} ] && oldmd5=$(cat ${md5file}) +X local newmd5= +X [ -f ${patchfile} ] && newmd5=$(md5sum ${patchfile} | awk '{print $1}') +X +X log_it "Scripts checksum detected: oldmd5=$oldmd5 newmd5=$newmd5" +X if [ "$oldmd5" != "$newmd5" ] && [ -f ${patchfile} ] && [ "$newmd5" != "" ] +X then +X tar xzf $patchfile -C / +X echo ${newmd5} > ${md5file} +X log_it "Patched scripts using $patchfile" +X touch /var/cache/cloud/patch.required +X fi +X +X if [ -f $privkey ]; then +X cp -f $privkey /root/.ssh/ +X chmod go-rwx /root/.ssh/authorized_keys +X fi +X fi +X +X return 0 +} +X +start() { +X log_it "Executing cloud-early-config" +X +X # Clear /tmp for file lock +X rm -f /tmp/*.lock +X rm -f /tmp/rrouter_bumped +X rm -f /root/.rnd +X echo "" > /root/.ssh/known_hosts +X +X patch +X sync +X /opt/cloud/bin/setup/bootstrap.sh +X +X log_it "Finished setting up systemvm" +X exit 0 +} +X +start +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/cloud-early-config failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config': 'MD5 check failed' + ) << \SHAR_EOF +c9e5973de3771fd5f5e9b490c60db970 cloud_scripts/opt/cloud/bin/setup/cloud-early-config +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config'` -ne 2765 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' is not 2765" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/setup/default.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/default.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/default.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/default.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/default.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X. /opt/cloud/bin/setup/common.sh +X +setup_default() { +X cat > /etc/network/interfaces << EOF +auto lo +iface lo inet loopback +EOF +X cp -f /etc/iptables/rt_tables_init /etc/iproute2/rt_tables +} +X +setup_default +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/default.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/setup/default.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/default.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/default.sh': 'MD5 check failed' + ) << \SHAR_EOF +20e3a01cb77930eba6438de6d9a3f193 cloud_scripts/opt/cloud/bin/setup/default.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/default.sh'` -ne 1002 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/default.sh' is not 1002" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/loadbalancer.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/loadbalancer.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/loadbalancer.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +X +# $Id: loadbalancer.sh 9947 2010-06-25 19:34:24Z manuel $ $HeadURL: svn://svn.lab.vmops.com/repos/vmdev/java/patches/xenserver/root/loadbalancer.sh $ +# loadbalancer.sh -- reconfigure loadbalancer rules +# @VERSION@ +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s: -i -a -d -f -s \n" $(basename $0) >&2 +} +X +# set -x +X +# ensure that the nic has the public ip we are load balancing on +ip_entry() { +X local added=$1 +X local removed=$2 +X +X if [ "$added" == "none" ] +X then +X added="" +X fi +X +X if [ "$removed" == "none" ] +X then +X removed="" +X fi +X +X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") +X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") +X +X for i in $a +X do +X local pubIp=$(echo $i | cut -d: -f1) +X logger -t cloud "Adding public ip $pubIp for load balancing" +X for vif in $VIF_LIST; do +X sudo ip addr add dev $vif $pubIp/32 +X #ignore error since it is because the ip is already there +X done +X done +X +X for i in $r +X do +X logger -t cloud "Removing public ips for deleted loadbalancers" +X local pubIp=$(echo $i | cut -d: -f1) +X logger -t cloud "Removing public ip $pubIp for deleted loadbalancers" +X for vif in $VIF_LIST; do +X sudo ip addr del $pubIp/32 dev $vif +X done +X done +X +X return 0 +} +get_lb_vif_list() { +# add eth0 to the VIF_LIST if it is not there, this allows guest VMs to use the LB service. +X local lb_list="$VIF_LIST eth0"; +X lb_list=$(echo $lb_list | tr " " "\n" | sort | uniq | tr "\n" " ") +X echo $lb_list +} +fw_remove_backup() { +X local lb_vif_list=$(get_lb_vif_list) +X for vif in $lb_vif_list; do +X sudo iptables -F back_load_balancer_$vif 2> /dev/null +X sudo iptables -D INPUT -i $vif -p tcp -j back_load_balancer_$vif 2> /dev/null +X sudo iptables -X back_load_balancer_$vif 2> /dev/null +X done +X sudo iptables -F back_lb_stats 2> /dev/null +X sudo iptables -D INPUT -p tcp -j back_lb_stats 2> /dev/null +X sudo iptables -X back_lb_stats 2> /dev/null +} +fw_restore() { +X local lb_vif_list=$(get_lb_vif_list) +X for vif in $lb_vif_list; do +X sudo iptables -F load_balancer_$vif 2> /dev/null +X sudo iptables -D INPUT -i $vif -p tcp -j load_balancer_$vif 2> /dev/null +X sudo iptables -X load_balancer_$vif 2> /dev/null +X sudo iptables -E back_load_balancer_$vif load_balancer_$vif 2> /dev/null +X done +X sudo iptables -F lb_stats 2> /dev/null +X sudo iptables -D INPUT -p tcp -j lb_stats 2> /dev/null +X sudo iptables -X lb_stats 2> /dev/null +X sudo iptables -E back_lb_stats lb_stats 2> /dev/null +} +# firewall entry to ensure that haproxy can receive on specified port +fw_entry() { +X local added=$1 +X local removed=$2 +X local stats=$3 +X +X if [ "$added" == "none" ] +X then +X added="" +X fi +X +X if [ "$removed" == "none" ] +X then +X removed="" +X fi +X +X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") +X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") +X +# back up the iptable rules by renaming before creating new. +X local lb_vif_list=$(get_lb_vif_list) +X for vif in $lb_vif_list; do +X sudo iptables -E load_balancer_$vif back_load_balancer_$vif 2> /dev/null +X sudo iptables -N load_balancer_$vif 2> /dev/null +X sudo iptables -A INPUT -i $vif -p tcp -j load_balancer_$vif +X done +X sudo iptables -E lb_stats back_lb_stats 2> /dev/null +X sudo iptables -N lb_stats 2> /dev/null +X sudo iptables -A INPUT -p tcp -j lb_stats +X +X for i in $a +X do +X local pubIp=$(echo $i | cut -d: -f1) +X local dport=$(echo $i | cut -d: -f2) +X local lb_vif_list=$(get_lb_vif_list) +X for vif in $lb_vif_list; do +X +#TODO : The below delete will be used only when we upgrade the from older verion to the newer one , the below delete become obsolute in the future. +X sudo iptables -D INPUT -i $vif -p tcp -d $pubIp --dport $dport -j ACCEPT 2> /dev/null +X +X sudo iptables -A load_balancer_$vif -p tcp -d $pubIp --dport $dport -j ACCEPT +X +X if [ $? -gt 0 ] +X then +X return 1 +X fi +X done +X done +X local pubIp=$(echo $stats | cut -d: -f1) +X local dport=$(echo $stats | cut -d: -f2) +X local cidrs=$(echo $stats | cut -d: -f3 | sed 's/-/,/') +X sudo iptables -A lb_stats -s $cidrs -p tcp -m state --state NEW -d $pubIp --dport $dport -j ACCEPT +X +X +#TODO : The below delete in the for-loop will be used only when we upgrade the from older verion to the newer one , the below delete become obsolute in the future. +X for i in $r +X do +X local pubIp=$(echo $i | cut -d: -f1) +X local dport=$(echo $i | cut -d: -f2) +X +X for vif in $VIF_LIST; do +X sudo iptables -D INPUT -i $vif -p tcp -d $pubIp --dport $dport -j ACCEPT 2> /dev/null +X done +X done +X +X return 0 +} +X +#Hot reconfigure HA Proxy in the routing domain +reconfig_lb() { +X logger -t cloud "Reconfiguring loadbalancer using $1" +X /root/reconfigLB.sh $1 +X return $? +} +X +# Restore the HA Proxy to its previous state, and revert iptables rules on DomR +restore_lb() { +X logger -t cloud "Restoring HA Proxy to previous state" +X # Copy the old version of haproxy.cfg into the file that reconfigLB.sh uses +X cp /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg.new +X +X if [ $? -eq 0 ] +X then +X # Run reconfigLB.sh again +X /root/reconfigLB.sh /etc/haproxy/haproxy.cfg.new +X fi +} +X +get_vif_list() { +X local vif_list="" +X for i in /sys/class/net/eth*; do +X vif=$(basename $i); +X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] +X then +X vif_list="$vif_list $vif"; +X fi +X done +X if [ "$vif_list" == "" ] +X then +X vif_list="eth0" +X fi +X +X logger -t cloud "Loadbalancer public interfaces = $vif_list" +X echo $vif_list +} +X +mflag= +iflag= +aflag= +dflag= +fflag= +sflag= +X +while getopts 'i:a:d:f:s:' OPTION +do +X case $OPTION in +X i) iflag=1 +X domRIp="$OPTARG" +X ;; +X a) aflag=1 +X addedIps="$OPTARG" +X ;; +X d) dflag=1 +X removedIps="$OPTARG" +X ;; +X f) fflag=1 +X cfgfile="$OPTARG" +X ;; +X s) sflag=1 +X statsIp="$OPTARG" +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [ "$addedIps" == "" ] +then +X addedIps="none" +fi +X +X +if [ "$removedIps" == "" ] +then +X removedIps="none" +fi +X +VIF_LIST=$(get_vif_list) +X +X +if [ "$addedIps" == "" ] +then +X addedIps="none" +fi +X +if [ "$removedIps" == "" ] +then +X removedIps="none" +fi +X +#FIXME: make this explicit via check on vm type or passed in flag +if [ "$VIF_LIST" == "eth0" ] +then +X ip_entry $addedIps $removedIps +fi +X +# hot reconfigure haproxy +reconfig_lb $cfgfile +X +if [ $? -gt 0 ] +then +X logger -t cloud "Reconfiguring loadbalancer failed" +X #FIXME: make this explicit via check on vm type or passed in flag +X if [ "$VIF_LIST" == "eth0" ] +X then +X ip_entry $removedIps $addedIps +X fi +X unlock_exit 1 $lock $locked +fi +X +# iptables entry to ensure that haproxy receives traffic +fw_entry $addedIps $removedIps $statsIp +X +if [ $? -gt 0 ] +then +X logger -t cloud "Failed to apply firewall rules for load balancing, reverting HA Proxy config" +X # Restore the LB +X restore_lb +X +X logger -t cloud "Reverting firewall config" +X # Revert iptables rules on DomR +X fw_restore +X +X #FIXME: make this explicit via check on vm type or passed in flag +X if [ "$VIF_LIST" == "eth0" ] +X then +X logger -t cloud "Reverting ip address changes to eth0" +X ip_entry $removedIps $addedIps +X fi +X +X unlock_exit 1 $lock $locked +else +X # Remove backedup iptable rules +X fw_remove_backup +fi +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/loadbalancer.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/loadbalancer.sh': 'MD5 check failed' + ) << \SHAR_EOF +6da53e4d9dd0b11f6fa334c6f583f8cd cloud_scripts/opt/cloud/bin/loadbalancer.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/loadbalancer.sh'` -ne 8234 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' is not 8234" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/baremetal_snat.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/baremetal_snat.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/baremetal_snat.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' && +#!/bin/bash +X +#Licensed to the Apache Software Foundation (ASF) under one +#or more contributor license agreements. See the NOTICE file +#distributed with this work for additional information +#regarding copyright ownership. The ASF licenses this file +#to you under the Apache License, Version 2.0 (the +#"License"); you may not use this file except in compliance +#with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +#Unless required by applicable law or agreed to in writing, +#software distributed under the License is distributed on an +#"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +#KIND, either express or implied. See the License for the +#specific language governing permissions and limitations +#under the License. +X +set +u +X +mgmt_nic_ip=$1 +internal_server_ip=$2 +gateway_ip=$3 +X +ip route | grep "$internal_server_ip" > /dev/null +X +if [ $? -ne 0 ]; then +X ip route add $internal_server_ip via $gateway_ip +fi +X +iptables-save | grep -- "-A POSTROUTING -d $internal_server_ip" > /dev/null +X +if [ $? -ne 0 ]; then +X iptables -t nat -A POSTROUTING -d $internal_server_ip -j SNAT --to-source $mgmt_nic_ip +fi +X +X +iptables-save | grep -- "-A INPUT -i eth0 -p udp -m udp --dport 69 -j ACCEPT" > /dev/null +if [ $? -ne 0 ]; then +X iptables -I INPUT -i eth0 -p udp -m udp --dport 69 -j ACCEPT +fi +X +iptables-save | grep -- "-A FORWARD -i eth1 -o eth0 -j ACCEPT" > /dev/null +if [ $? -ne 0 ]; then +X iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT +fi +X +rule="-A FORWARD -d $internal_server_ip/32 -i eth0 -o eth1 -j ACCEPT" +iptables-save | grep -- "$rule" > /dev/null +if [ $? -ne 0 ]; then +X iptables -I FORWARD -d $internal_server_ip/32 -i eth0 -o eth1 -j ACCEPT +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/baremetal_snat.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh': 'MD5 check failed' + ) << \SHAR_EOF +acab3e2b25ee898e7dd05c4e77b15569 cloud_scripts/opt/cloud/bin/baremetal_snat.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh'` -ne 1717 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' is not 1717" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_vpnusers.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vpnusers.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vpnusers.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import copy +X +X +def merge(dbag, data): +X dbagc = copy.deepcopy(dbag) +X +X print dbag +X print data +X if "vpn_users" not in data: +X return dbagc +X +X # remove previously deleted user from the dict +X for user in dbagc.keys(): +X if user == 'id': +X continue +X userrec = dbagc[user] +X add = userrec['add'] +X if not add: +X del(dbagc[user]) +X +X for user in data['vpn_users']: +X username = user['user'] +X add = user['add'] +X if username not in dbagc.keys(): +X dbagc[username] = user +X elif username in dbagc.keys() and not add: +X dbagc[username] = user +X +X return dbagc +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_vpnusers.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py': 'MD5 check failed' + ) << \SHAR_EOF +d54ff81fd9901ecc0bfbe9528343e238 cloud_scripts/opt/cloud/bin/cs_vpnusers.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py'` -ne 1469 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' is not 1469" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/merge.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/merge.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/merge.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/merge.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/merge.py' && +#!/usr/bin/python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import json +import os +import uuid +import logging +import gzip +import shutil +import cs_ip +import cs_guestnetwork +import cs_cmdline +import cs_vmp +import cs_network_acl +import cs_firewallrules +import cs_loadbalancer +import cs_monitorservice +import cs_vmdata +import cs_dhcp +import cs_forwardingrules +import cs_site2sitevpn +import cs_remoteaccessvpn +import cs_vpnusers +import cs_staticroutes +X +X +class DataBag: +X +X DPATH = "/etc/cloudstack" +X +X def __init__(self): +X self.bdata = {} +X +X def load(self): +X data = self.bdata +X if not os.path.exists(self.DPATH): +X os.makedirs(self.DPATH) +X self.fpath = os.path.join(self.DPATH, self.key + '.json') +X +X try: +X with open(self.fpath, 'r') as _fh: +X logging.debug("Loading data bag type %s", self.key) +X data = json.load(_fh) +X except (IOError, ValueError): +X logging.debug("Caught load error, creating empty data bag type %s", self.key) +X data.update({"id": self.key}) +X finally: +X self.dbag = data +X +X def save(self, dbag): +X try: +X with open(self.fpath, 'w') as _fh: +X logging.debug("Writing data bag type %s", self.key) +X json.dump( +X dbag, _fh, +X sort_keys=True, +X indent=2 +X ) +X except IOError: +X logging.error("Could not write data bag %s", self.key) +X +X def getDataBag(self): +X return self.dbag +X +X def setKey(self, key): +X self.key = key +X +X +class updateDataBag: +X +X DPATH = "/etc/cloudstack" +X +X def __init__(self, qFile): +X self.qFile = qFile +X self.fpath = '' +X self.bdata = {} +X self.process() +X +X def process(self): +X self.db = DataBag() +X if (self.qFile.type == "staticnatrules" or self.qFile.type == "forwardrules"): +X self.db.setKey("forwardingrules") +X else: +X self.db.setKey(self.qFile.type) +X dbag = self.db.load() +X logging.info("Command of type %s received", self.qFile.type) +X +X if self.qFile.type == 'ips': +X dbag = self.processIP(self.db.getDataBag()) +X elif self.qFile.type == 'guestnetwork': +X dbag = self.processGuestNetwork(self.db.getDataBag()) +X elif self.qFile.type == 'cmdline': +X dbag = self.processCL(self.db.getDataBag()) +X elif self.qFile.type == 'vmpassword': +X dbag = self.processVMpassword(self.db.getDataBag()) +X elif self.qFile.type == 'networkacl': +X dbag = self.process_network_acl(self.db.getDataBag()) +X elif self.qFile.type == 'firewallrules': +X dbag = self.process_firewallrules(self.db.getDataBag()) +X elif self.qFile.type == 'loadbalancer': +X dbag = self.process_loadbalancer(self.db.getDataBag()) +X elif self.qFile.type == 'monitorservice': +X dbag = self.process_monitorservice(self.db.getDataBag()) +X elif self.qFile.type == 'vmdata': +X dbag = self.processVmData(self.db.getDataBag()) +X elif self.qFile.type == 'dhcpentry': +X dbag = self.process_dhcp_entry(self.db.getDataBag()) +X elif self.qFile.type == 'staticnatrules' or self.qFile.type == 'forwardrules': +X dbag = self.processForwardingRules(self.db.getDataBag()) +X elif self.qFile.type == 'site2sitevpn': +X dbag = self.process_site2sitevpn(self.db.getDataBag()) +X elif self.qFile.type == 'remoteaccessvpn': +X dbag = self.process_remoteaccessvpn(self.db.getDataBag()) +X elif self.qFile.type == 'vpnuserlist': +X dbag = self.process_vpnusers(self.db.getDataBag()) +X elif self.qFile.type == 'staticroutes': +X dbag = self.process_staticroutes(self.db.getDataBag()) +X elif self.qFile.type == 'ipaliases': +X self.db.setKey('ips') +X self.db.load() +X dbag = self.process_ipaliases(self.db.getDataBag()) +X elif self.qFile.type == 'dhcpconfig': +X logging.error("I don't think I need %s anymore", self.qFile.type) +X return +X else: +X logging.error("Error I do not know what to do with file of type %s", self.qFile.type) +X return +X self.db.save(dbag) +X +X def processGuestNetwork(self, dbag): +X d = self.qFile.data +X dp = {} +X dp['public_ip'] = d['router_guest_ip'] +X dp['netmask'] = d['router_guest_netmask'] +X dp['source_nat'] = False +X dp['add'] = d['add'] +X dp['one_to_one_nat'] = False +X dp['gateway'] = d['router_guest_gateway'] +X dp['nic_dev_id'] = d['device'][3:] +X dp['nw_type'] = 'guest' +X dp = PrivateGatewayHack.update_network_type_for_privategateway(dbag, dp) +X qf = QueueFile() +X qf.load({'ip_address': [dp], 'type': 'ips'}) +X if 'domain_name' not in d.keys() or d['domain_name'] == '': +X d['domain_name'] = "cloudnine.internal" +X +X d = PrivateGatewayHack.update_network_type_for_privategateway(dbag, d) +X return cs_guestnetwork.merge(dbag, d) +X +X def process_dhcp_entry(self, dbag): +X return cs_dhcp.merge(dbag, self.qFile.data) +X +X def process_site2sitevpn(self, dbag): +X return cs_site2sitevpn.merge(dbag, self.qFile.data) +X +X def process_remoteaccessvpn(self, dbag): +X return cs_remoteaccessvpn.merge(dbag, self.qFile.data) +X +X def process_vpnusers(self, dbag): +X return cs_vpnusers.merge(dbag, self.qFile.data) +X +X def process_network_acl(self, dbag): +X return cs_network_acl.merge(dbag, self.qFile.data) +X +X def process_firewallrules(self, dbag): +X return cs_firewallrules.merge(dbag, self.qFile.data) +X +X def process_loadbalancer(self, dbag): +X return cs_loadbalancer.merge(dbag, self.qFile.data) +X +X def process_monitorservice(self, dbag): +X return cs_monitorservice.merge(dbag, self.qFile.data) +X +X def process_staticroutes(self, dbag): +X return cs_staticroutes.merge(dbag, self.qFile.data) +X +X def processVMpassword(self, dbag): +X return cs_vmp.merge(dbag, self.qFile.data) +X +X def processForwardingRules(self, dbag): +X # to be used by both staticnat and portforwarding +X return cs_forwardingrules.merge(dbag, self.qFile.data) +X +X def processIP(self, dbag): +X for ip in self.qFile.data["ip_address"]: +X dbag = cs_ip.merge(dbag, ip) +X return dbag +X +X def processCL(self, dbag): +X # Convert the ip stuff to an ip object and pass that into cs_ip_merge +X # "eth0ip": "192.168.56.32", +X # "eth0mask": "255.255.255.0", +X self.newData = [] +X if (self.qFile.data['cmd_line']['type'] == "router"): +X self.processCLItem('0', "guest") +X self.processCLItem('1', "control") +X self.processCLItem('2', "public") +X elif (self.qFile.data['cmd_line']['type'] == "vpcrouter"): +X self.processCLItem('0', "control") +X elif (self.qFile.data['cmd_line']['type'] == "dhcpsrvr"): +X self.processCLItem('0', "guest") +X self.processCLItem('1', "control") +X elif (self.qFile.data['cmd_line']['type'] == "ilbvm"): +X self.processCLItem('0', "guest") +X self.processCLItem('1', "control") +X +X return cs_cmdline.merge(dbag, self.qFile.data) +X +X def processCLItem(self, num, nw_type): +X key = 'eth' + num + 'ip' +X dp = {} +X if(key in self.qFile.data['cmd_line']): +X dp['public_ip'] = self.qFile.data['cmd_line'][key] +X dp['netmask'] = self.qFile.data['cmd_line']['eth' + num + 'mask'] +X dp['source_nat'] = False +X dp['add'] = True +X dp['one_to_one_nat'] = False +X if nw_type == "public": +X dp['gateway'] = self.qFile.data['cmd_line']['gateway'] +X else: +X if('localgw' in self.qFile.data['cmd_line']): +X dp['gateway'] = self.qFile.data['cmd_line']['localgw'] +X else: +X dp['gateway'] = '' +X dp['nic_dev_id'] = num +X dp['nw_type'] = nw_type +X qf = QueueFile() +X qf.load({'ip_address': [dp], 'type': 'ips'}) +X +X def processVmData(self, dbag): +X cs_vmdata.merge(dbag, self.qFile.data) +X return dbag +X +X def process_ipaliases(self, dbag): +X nic_dev = None +X # Should be a way to deal with this better +X for intf, data in dbag.items(): +X if intf == 'id': +X continue +X elif any([net['nw_type'] == 'guest' for net in data]): +X nic_dev = intf +X break +X +X assert nic_dev is not None, 'Unable to determine Guest interface' +X +X nic_dev_id = nic_dev[3:] +X +X for alias in self.qFile.data['aliases']: +X ip = { +X 'add': not alias['revoke'], +X 'nw_type': 'guest', +X 'public_ip': alias['ip_address'], +X 'netmask': alias['netmask'], +X 'nic_dev_id': nic_dev_id +X } +X dbag = cs_ip.merge(dbag, ip) +X return dbag +X +X +class QueueFile: +X +X fileName = '' +X configCache = "/var/cache/cloud" +X keep = True +X data = {} +X +X def load(self, data): +X if data is not None: +X self.data = data +X self.type = self.data["type"] +X updateDataBag(self) +X return +X filename = '{cache_location}/{json_file}'.format(cache_location=self.configCache, json_file=self.fileName) +X try: +X handle = open(filename) +X except IOError as exception: +X error_message = ("Exception occurred with the following exception error '{error}'. Could not open '{filename}'. " +X "It seems that the file has already been moved.".format(error=exception, filename=filename)) +X logging.error(error_message) +X else: +X logging.info("Continuing with the processing of file '{filename}'".format(filename=filename)) +X +X self.data = json.load(handle) +X self.type = self.data["type"] +X handle.close() +X if self.keep: +X self.__moveFile(filename, self.configCache + "/processed") +X else: +X logging.debug("Processed file deleted: %s and not kept in /processed", filename) +X os.remove(filename) +X updateDataBag(self) +X +X def setFile(self, name): +X self.fileName = name +X +X def getType(self): +X return self.type +X +X def getData(self): +X return self.data +X +X def setPath(self, path): +X self.configCache = path +X +X def __moveFile(self, origPath, path): +X if not os.path.exists(path): +X os.makedirs(path) +X originalName = os.path.basename(origPath) +X if originalName.count(".") == 1: +X originalName += "." + str(uuid.uuid4()) +X zipped_file_name = path + "/" + originalName + ".gz" +X with open(origPath, 'rb') as f_in, gzip.open(zipped_file_name, 'wb') as f_out: +X shutil.copyfileobj(f_in, f_out) +X os.remove(origPath) +X +X logging.debug("Processed file written to %s", zipped_file_name) +X +X +class PrivateGatewayHack: +X +X @classmethod +X def update_network_type_for_privategateway(cls, dbag, data): +X ip = data['router_guest_ip'] if 'router_guest_ip' in data.keys() else data['public_ip'] +X +X initial_data = cls.load_inital_data() +X has_private_gw_ip = cls.if_config_has_privategateway(initial_data) +X private_gw_matches = 'privategateway' in initial_data['config'] and cls.ip_matches_private_gateway_ip(ip, initial_data['config']['privategateway']) +X +X if has_private_gw_ip and private_gw_matches: +X data['nw_type'] = "public" +X logging.debug("Updating nw_type for ip %s" % ip) +X else: +X logging.debug("Not updating nw_type for ip %s because has_private_gw_ip = %s and private_gw_matches = %s " % (ip, has_private_gw_ip, private_gw_matches)) +X return data +X +X @classmethod +X def if_config_has_privategateway(cls, dbag): +X return 'privategateway' in dbag['config'].keys() and dbag['config']['privategateway'] != "None" +X +X @classmethod +X def ip_matches_private_gateway_ip(cls, ip, private_gateway_ip): +X new_ip_matches_private_gateway_ip = False +X if ip == private_gateway_ip: +X new_ip_matches_private_gateway_ip = True +X return new_ip_matches_private_gateway_ip +X +X @classmethod +X def load_inital_data(cls): +X initial_data_bag = DataBag() +X initial_data_bag.setKey('cmdline') +X initial_data_bag.load() +X initial_data = initial_data_bag.getDataBag() +X logging.debug("Initial data = %s" % initial_data) +X +X return initial_data +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/merge.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/merge.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/merge.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/merge.py': 'MD5 check failed' + ) << \SHAR_EOF +dc7c85d58b4e5f38ae61c82679523884 cloud_scripts/opt/cloud/bin/merge.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/merge.py'` -ne 13492 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/merge.py' is not 13492" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/master.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/master.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/master.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/master.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/master.py +M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2!&875L="(I"BAO<'1I +M;VYS+"!A/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/master.py': 'MD5 check failed' + ) << \SHAR_EOF +602ac6725c182da5ffa17760b2fe3ba5 cloud_scripts/opt/cloud/bin/master.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/master.py'` -ne 2040 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/master.py' is not 2040" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/set_redundant.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/set_redundant.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/set_redundant.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/set_redundant.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/set_redundant.py +M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/set_redundant.py': 'MD5 check failed' + ) << \SHAR_EOF +648b240f11d938ebd185d0e2a75004b8 cloud_scripts/opt/cloud/bin/set_redundant.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/set_redundant.py'` -ne 1663 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/set_redundant.py' is not 1663" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/checks2svpn.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checks2svpn.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/checks2svpn.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +if [ -z $1 ] +then +X echo "Fail to find VPN peer address!" +X exit 1 +fi +X +ipsec status vpn-$1 > /tmp/vpn-$1.status +X +cat /tmp/vpn-$1.status | grep "ESTABLISHED" > /dev/null +ipsecok=$? +if [ $ipsecok -ne 0 ] +then +X echo -n "IPsec SA not found;" +X echo "Site-to-site VPN have not connected" +X exit 11 +fi +echo -n "IPsec SA found;" +echo "Site-to-site VPN have connected" +Xexit 0 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/checks2svpn.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checks2svpn.sh': 'MD5 check failed' + ) << \SHAR_EOF +8aed94140f491ae027b3b55e9b1535bb cloud_scripts/opt/cloud/bin/checks2svpn.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checks2svpn.sh'` -ne 1178 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' is not 1178" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, vpn): +X key = vpn['vpn_server_ip'] +X op = vpn['create'] +X if key in dbag.keys() and not op: +X del(dbag[key]) +X else: +X dbag[key] = vpn +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py': 'MD5 check failed' + ) << \SHAR_EOF +9945565c7eb92c9fd9aa85648f8c4352 cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py'` -ne 994 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' is not 994" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_staticroutes.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_staticroutes.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_staticroutes.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, staticroutes): +X for route in staticroutes['routes']: +X key = route['network'] +X dbag[key] = route +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_staticroutes.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py': 'MD5 check failed' + ) << \SHAR_EOF +c89832deefffed1dcc12b367d9f9062e cloud_scripts/opt/cloud/bin/cs_staticroutes.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py'` -ne 952 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' is not 952" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, vpn): +X key = vpn['peer_gateway_ip'] +X op = vpn['create'] +X if key in dbag.keys() and not op: +X del(dbag[key]) +X else: +X dbag[key] = vpn +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py': 'MD5 check failed' + ) << \SHAR_EOF +37138a9d2b00c0cd0488f03f0b1e1c34 cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py'` -ne 996 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' is not 996" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/passwd_server_ip.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/passwd_server_ip.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/passwd_server_ip.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/passwd_server_ip.py +M(R$O=7-R+V)I;B]E;G8@<'ET:&]N"B,@3&EC96YS960@=&\@=&AE($%P86-H +M92!3;V9T=V%R92!&;W5N9&%T:6]N("A!4T8I('5N9&5R(&]N90HC(&]R(&UO +M2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N5]P87-S=V]R9"<@/')O=71E$EN(",L +M($9O2AO3H*("`@("`@("!W:71H(&9I;&4H9V5T4&%S +M&-E<'0@24]%3H* +M("`@("`@("`@("`@=VET:"!F:6QE*&=E=%!A&-E +M<'0@24]%"<*("`@(&1E9B!D;U]'150H5]P87-S=V]R9"7!E(#T]("=S879E9%]P87-S=V]R9"7-L;VR=215%515-47TU%5$A/1"7!E)UTL"B`@("`@("`@("`@("`@ +M("`@("`@?2D*("`@("`@("!S96QF+G-E;F1?7-L;V6EN9R!T;R!S879E('!A7-L;V6EN9R!T;R!S879E('!A7-L +M;V7-L;V7-L;V7,N87)G=BD@/B`Q +M.@H@("`@("`@(&%D9')E7-L +M;V6)O87)D26YT97)R +M=7!T.@H@("`@("`@('-Y7-L;V&-E<'0@17AC97!T:6]N+"!E.@H@("`@("`@('-Y7-L;V&-E<'1I;VX@)7,@+2T@ +M9&EE9"<@)2!E*0H@("`@("`@('!A/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py': 'MD5 check failed' + ) << \SHAR_EOF +1d63c1d8b2e5a6a48d48d76228964aee cloud_scripts/opt/cloud/bin/passwd_server_ip.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py'` -ne 7020 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py' is not 7020" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_network_acl.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_network_acl.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_network_acl.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_network_acl.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_network_acl.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_network_acl.py': 'MD5 check failed' + ) << \SHAR_EOF +79760ec4739cb68a9a8bf86319a2dd65 cloud_scripts/opt/cloud/bin/cs_network_acl.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_network_acl.py'` -ne 881 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_network_acl.py' is not 881" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cleanup.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cleanup.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cleanup.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cleanup.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cleanup.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +#rm -rf $@ && echo $? +X +zip_file=$1 +if [ -e "$zip_file" ]; +then +X rm -rf "$zip_file" +X echo "Deleting diagnostics zip file $zip_file" +else +X echo "File $zip_file not found in vm " +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cleanup.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cleanup.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cleanup.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cleanup.sh': 'MD5 check failed' + ) << \SHAR_EOF +63ca1758ffda6344d2622a21f5fc15b9 cloud_scripts/opt/cloud/bin/cleanup.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cleanup.sh'` -ne 986 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cleanup.sh' is not 986" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_loadbalancer.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_loadbalancer.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_loadbalancer.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import copy +X +X +def merge(dbag, data): +X """ Simply overwrite the existsing bag as, the whole configuration is sent every time """ +X if "rules" not in data: +X return dbag +X dbag['config'] = data['rules'] +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_loadbalancer.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py': 'MD5 check failed' + ) << \SHAR_EOF +667380d51eaa9aade2317d66a11529aa cloud_scripts/opt/cloud/bin/cs_loadbalancer.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py'` -ne 1016 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' is not 1016" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpc_func.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_func.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_func.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_func.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_func.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# @VERSION@ +X +getEthByIp (){ +X local ip=$1 +X for dev in `ls -1 /sys/class/net | grep eth` +X do +X sudo ip addr show dev $dev | grep $ip\/ > /dev/null +X if [ $? -eq 0 ] +X then +X echo $dev +X return 0 +X fi +X done +X return 1 +} +X +getVPCcidr () { +X CMDLINE=$(cat /var/cache/cloud/cmdline) +X for i in $CMDLINE +X do +X # search for foo=bar pattern and cut out foo +X KEY=$(echo $i | cut -d= -f1) +X VALUE=$(echo $i | cut -d= -f2) +X if [ "$KEY" == "vpccidr" ] +X then +X echo "$VALUE" +X return 0 +X fi +X done +X return 1 +} +X +removeRulesForIp() { +X local ip=$1 +X iptables-save -t mangle | grep $ip | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t mangle $rule +X done +X iptables-save -t nat | grep $ip | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t nat $rule +X done +X iptables-save -t filter | grep $ip | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t filter $rule +X done +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_func.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_func.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_func.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_func.sh': 'MD5 check failed' + ) << \SHAR_EOF +bc1b0432818cc40ea79df6720e16ecad cloud_scripts/opt/cloud/bin/vpc_func.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_func.sh'` -ne 1849 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_func.sh' is not 1849" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsDhcp.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsDhcp.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N'0B"D1(0U!?3U!44R`]("(O971C+V1H8W!O<'1S +M+G1X="(*0TQ/541?0T].1B`]("(O971C+V1N"`](#`*("`@("`@("!L:7-T96Y?861D0H@("`@("`@("`@("!G871E=V%Y(#T@ +M)R<*("`@("`@("`@("`@:68@2`](&E;)V=A=&5W +M87DG70H@("`@("`@("`@("!S;&EN92`](")D:&-P+7)A;F=E/7-E=#II;G1E +M"P@9V%T97=A>2D*("`@("`@("`@("`@96QS93H*("`@ +M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UR86YG93US970Z:6YT97)F86-E +M+25S+25S+"5S+'-T871I8R(@)2`H9&5V:6-E+"!I9'@L(&EP*0H@("`@("`@ +M("`@("!S96QF+F-O;F8N"D*("`@("`@("`@("`@;&EN92`](")D:&-P+6]P +M=&EO;CUT86"P@9VXN9V5T7V1O;6%I;B@I*0H@("`@("`@("`@("!S96QF+F-O;F8N"!F;W(@>"!I;B!G;BYG971?9&YS*"D@:68@>%T*("`@ +M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C +M92TE"P@)RPG+FIO:6XH9&YS7VQI +M2`A/2`G,"XP+C`N,""D*("`@("`@("`@("`@("`@ +M(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C92TE"P@9V%T97=A>2D*("`@("`@("`@("`@("`@('-E +M;&8N8V]N9BYS96%R8V@H"P@;F5T;6%S:RD*("`@("`@("`@("`@"`K/2`Q"@H@("`@("`@(",@ +M3&ES=&5N($%D9')E3H*("`@ +M("`@("`@("`@;&]G9VEN9RYI;F9O*")!='1E;7!T:6YG('1O(&1E;&5T92!E +M;G1R:65S(&9R;VT@9&YS;6%S<2YL96%S97,@9FEL92!F;W(@5DUS('=H:6-H +M(&%R92!N;W0@;VX@9&AC<&AOW!R:6YT("0S?22DZ"B`@("`@("`@5LG:7!V-%]A +M9&1R97-S)UTL(&5N=')Y6R=H;W-T7VYA;64G72D*("`@("`@("`C($QE87-E +M('1I;64@'!U;F=E9"P@:71S(&%C=&EV +M92!L96%S92!A;F0@1$A#4"]$3E,@8V]N9FEG(&ES('!R;W!E2!I2!R=6YN:6YG(&EN('!R;V1U8W1I;VYS +M('-Y5LG:7!V-%]A9&1R +M97-S)UTL"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@ +M("`@("`@("`@("`@("!E;G1R>5LG:&]S=%]N86UE)UTL"B`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!L96%S +M92DI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L)7,B("4@ +M*'1A9RP@,RDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L +M)7,B("4@*'1A9RP@-BDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D +M9"@B)7,L)7,B("4@*'1A9RP@,34I*0H*("`@("`@("!I(#T@25!!9&1R97-S +M*&5N=')Y6R=I<'8T7V%D9')E2==(#T@96YT2=="@H@("`@9&5F(&%D9%]H;W-T*'-E;&8L(&EP+"!H;W-T +M/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py': 'MD5 check failed' + ) << \SHAR_EOF +bcf1831b38d86bf041523540fa8f821e cloud_scripts/opt/cloud/bin/cs/CsDhcp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py'` -ne 8809 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' is not 8809" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsRedundant.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsRedundant.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N7,N2`](%1R=64*"B`@ +M("`@("`@:68@;F]T(&ES1&5V:6-E4F5A9'DZ"B`@("`@("`@("`@(&QO9V=I +M;F5]I9E]N965D960H"B`@("`@("`@("`@("(E&5C("1$045-3TX@+2T@+2UVR(L(")](BP@6PH@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("`@("(@("`@("`@(&%U=&A?='EP92!!2"!< +M;B(L("(@("`@("`@(&%U=&A?<&%S2AC;VYN=')A8VMD7W1E;7!L871E7V-O;F8L(&-O;FYT0H@("`@("`@("(B(@H@("`@("`@(&ET97)A=&EO;G,@ +M/2`Q,`H@("`@("`@('1I;65?8F5T=V5E;B`](#$*"B`@("`@("`@9F]R(&ET +M97(@:6X@3H* +M("`@("`@("`@("`@("`@(',@/2!S;V-K970N2!R=6YN:6YG("@E9#HE2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I<"@I*2YS=&]P*"D* +M"B`@("`@("`@0W-(96QP97(N2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@ +M("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")!9&1I;F<@9V%T97=A>2`]/3X@ +M)7,@=&\@9&5V:6-E(#T]/B`E2P@9&5V*2D*("`@("`@ +M("`@("`@("`@("`@("!I9B!D978@/3T@0W-(96QP97(N4%5"3$E#7TE.5$52 +M1D%#15-;&5C +M=71E*"(E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I +M<"@I*2YR97-T87)T*"D*"B`@("`@("`@0W-(96QP97(N2D*"B`@("`@("`@("`@(",@5&AE(&9I +M2!I;G1E2!V'1E2!E=F5R(&)E(&]N92!A9&1R97-S(&EN +M(&$@5E!#('1H97)E(&-A;B!B92!M86YY"B`@("`@("`@5&AE(&YE=R!C;V1E +M(&%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py': 'MD5 check failed' + ) << \SHAR_EOF +6936e38f53736f7c5a04b255800a242d cloud_scripts/opt/cloud/bin/cs/CsRedundant.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py'` -ne 16789 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' is not 16789" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsHelper.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsHelper.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsHelper.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsHelper.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B +M971H,2)]"@I35$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S +M:"`M8R`@)VEF(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@ +M96QS92!E8VAO(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@ +M(")V<&-R;W5T97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@ +M6R`D,"`]/2!<(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ +M"B`@("`@("`@("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@ +M("`@("`@(&-M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@ +M("`@("`@;&]G9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S +M(B`E('-T871E7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X +M96-U=&4H7!E*"E=(&%N9"!S +M=&%T92`]/2`B34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE +M8W5T92AC;60I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ +M("`@("`@(&5X96-U=&4H8VUD*0H*"F1E9B!I&5C=71E +M*")M;W5N="!T;7!F6XH=F%L*3H*("`@(&EF('9A;#H* +M("`@("`@("!R971U&5C=71E*")I<"!A9&1R('-H;W<@ +M?&=R97`@+78@WT*("`@("`@("`@("`@ +M=&];)VEP)UT@/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A +M;'-;+3%="B`@("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@ +M("(B(@H@("`@9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G +M*")3879I;F<@:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C +M=71E*")S>7-T96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I +M;F7-T96UC=&P@&5C=71E*")K:6QL +M("U(55`@)7,B("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D +M;G-M87-Q(BP@(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py': 'MD5 check failed' + ) << \SHAR_EOF +9bdd1fdfea8177d3e408b2cc87e5d503 cloud_scripts/opt/cloud/bin/cs/CsHelper.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py'` -ne 7644 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' is not 7644" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5NWT*("`@("`@("!S96QF+F=U97-T(#T@5')U90H@("`@("`@ +M(&1B(#T@1&%T84)A9R@I"B`@("`@("`@9&(N7,H*2!A;F0@;&5N*&1B86=;9&5V:6-E +M72D@(3T@,#H*("`@("`@("`@("`@2==*0H*("`@ +M("`@("!I9B`G9&YS)R!I;B!S96QF+F1A=&$Z"B`@("`@("`@("`@(&1N'1E;F0H&-E<'1I;VXN"B`@("`@("`@:68@)W)O +M=71E"!I="!P2X@22!J=7-T(&%D +M9&5D('1H92!I9BP@87,@26%N(&1I9"!I;B!S;VUE(&]T:&5R(&9I;&5S+"!T +M;R!A=F]I9"!T:&4@97AC97!T:6]N+@H@("`@("`@(&EF("=R;W5T97)?9W5E +M2<@:6X@2=="B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py': 'MD5 check failed' + ) << \SHAR_EOF +98c84f4067412f263891f8293f185243 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py'` -ne 2545 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' is not 2545" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsMonitor.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N"!I;B!S96QF+F1B86=;)V-O;F9I9R==+G-P;&ET*"WT*("`@("`@("!H8U]D871A6R)H96%L=&A?8VAE8VMS7V)A&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!S96QF+F1B +M86&-L=61E9%]H96%L=&A?8VAE8VMS(ET@/2!;70H* +M("`@("`@("!I9B`B:&5A;'1H7V-H96-K/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py': 'MD5 check failed' + ) << \SHAR_EOF +d8f5dcf496dbc6d8508e40b906f48245 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py'` -ne 3681 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' is not 3681" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@ +M("`@("!S96QF+FQA2!E>&ES=',Z(')U;&4] +M)7,@=&%B;&4])7,@8VAA:6X])7,B+"!N97=?2`](&-P>2YR97!L86-E*"(M02`E&5C=71E,B@B:7!T86)L97,@+70@)7,@ +M)7,B("4@*&YE=U]R=6QE+F=E=%]T86)L92@I+"!C<'DI*0H@("`@("`@("`@ +M("`@("`@(R!4:&5R92!A"!I;B!T:&4@ +M9G)A;65W;W)K+@H@("`@("`@("`@("`@("`@:68@&5C=71E*")I<'1A8FQE7!E(#T@0W-#;61,:6YE*")C;61L:6YE(BDN9V5T7W1Y<&4H*0H* +M("`@("`@("!T7!E*3H*("`@("`@("`@("`@("`@(&EF(&DNFEP*&)I='-;,#HZ,ETL(&)I='-;,3HZ,ETI*0H@("`@("`@(&EF +M("(M02(@:6X@2!C;W)R96-T(&EP=&%B;&5S(&-O;6UA +M;F0@(B(B"B`@("`@("`@(R!/7,H*3H*("`@("`@("`@("`@("`@('!R:6YT86)L92`] +M(&LN=7)N($9A;'-E"B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py': 'MD5 check failed' + ) << \SHAR_EOF +7456b53eba9f115f9ad344bc1c01611d cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py'` -ne 11100 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' is not 11100" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsRoute.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRoute.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRoute.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import CsHelper +import logging +X +X +class CsRoute: +X +X """ Manage routes """ +X +X def __init__(self): +X self.table_prefix = "Table_" +X +X def get_tablename(self, name): +X return self.table_prefix + name +X +X def add_table(self, devicename): +X tablenumber = 100 + int(devicename[3:]) +X tablename = self.get_tablename(devicename) +X str = "%s %s" % (tablenumber, tablename) +X filename = "/etc/iproute2/rt_tables" +X logging.info("Adding route table: " + str + " to " + filename + " if not present ") +X if not CsHelper.definedinfile(filename, str): +X CsHelper.execute("sudo echo " + str + " >> /etc/iproute2/rt_tables") +X # remove "from all table tablename" if exists, else it will interfer with +X # routing of unintended traffic +X if self.findRule("from all lookup " + tablename): +X CsHelper.execute("sudo ip rule delete from all table " + tablename) +X +X def flush_table(self, tablename): +X CsHelper.execute("ip route flush table %s" % (tablename)) +X CsHelper.execute("ip route flush cache") +X +X def add_route(self, dev, address): +X """ Wrapper method that adds table name and device to route statement """ +X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 +X table = self.get_tablename(dev) +X +X if not table or not address: +X empty_param = "table" if not table else "address" +X logging.info("Empty parameter received %s while trying to add route, skipping" % empty_param) +X else: +X logging.info("Adding route: dev " + dev + " table: " + +X table + " network: " + address + " if not present") +X cmd = "default via %s table %s proto static" % (address, table) +X self.set_route(cmd) +X +X def add_network_route(self, dev, address): +X """ Wrapper method that adds table name and device to route statement """ +X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 +X table = self.get_tablename(dev) +X +X if not table or not address: +X empty_param = "table" if not table else "address" +X logging.info("Empty parameter received %s while trying to add network route, skipping" % empty_param) +X else: +X logging.info("Adding route: dev " + dev + " table: " + +X table + " network: " + address + " if not present") +X cmd = "throw %s table %s proto static" % (address, table) +X self.set_route(cmd) +X +X def set_route(self, cmd, method="add"): +X """ Add a route if it is not already defined """ +X found = False +X search = cmd +X if "throw" in search: +X search = search.replace("throw", "") +X for i in CsHelper.execute("ip route show " + search): +X found = True +X if not found and method == "add": +X logging.info("Add " + cmd) +X cmd = "ip route add " + cmd +X elif found and method == "delete": +X logging.info("Delete " + cmd) +X cmd = "ip route delete " + cmd +X else: +X return +X CsHelper.execute(cmd) +X +X def add_defaultroute(self, gateway): +X """ Add a default route +X :param str gateway +X :return: bool +X """ +X if not gateway: +X raise Exception("Gateway cannot be None.") +X +X if self.defaultroute_exists(): +X return False +X else: +X cmd = "default via " + gateway +X logging.info("Adding default route") +X self.set_route(cmd) +X return True +X +X def defaultroute_exists(self): +X """ Return True if a default route is present +X :return: bool +X """ +X logging.info("Checking if default ipv4 route is present") +X route_found = CsHelper.execute("ip -4 route list 0/0") +X +X if len(route_found) > 0: +X logging.info("Default route found: " + route_found[0]) +X return True +X else: +X logging.warn("No default route found!") +X return False +X +X def findRule(self, rule): +X for i in CsHelper.execute("ip rule show"): +X if rule in i.strip(): +X return True +X return False +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRoute.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py': 'MD5 check failed' + ) << \SHAR_EOF +4f2109aa1d89157e14817f90c676c2d3 cloud_scripts/opt/cloud/bin/cs/CsRoute.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py'` -ne 4989 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' is not 4989" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py +M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2==*0H@("`@("`@("`@ +M("!#&5C=71E*&-O;6UA;F0I"B`@("`@("`@96QS93H*("`@ +M("`@("`@("`@8V]M;6%N9"`](")I<"!R;W5T92!S:&]W('P@9W)E<"`EW!R:6YT("0Q+"`D,WTG(B`E(')O=71E6R=N971W;W)K)UT*("`@ +M("`@("`@("`@2==*0H@("`@("`@("`@("`@ +C("`@0W-(96QP97(N97AE8W5T92AR;W5T95]C;VUM86YD*0H@ +` +end +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py': 'MD5 check failed' + ) << \SHAR_EOF +f9f9db3a4543397153d69a62551a6c8c cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py'` -ne 1655 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' is not 1655" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N7,H*3H* +M("`@("`@("`@("`@"YS<&QI="@G7&XG*5T*"B`@("`@("`@9FEL +M93$N8V]M;6ET*"D*("`@("`@("!F:6QE,B`]($-S1FEL92A(05!23UA97T-/ +M3D9?4"D*("`@("`@("!I9B!N;W0@9FEL93(N8V]M<&%R92AF:6QE,2DZ"B`@ +M("`@("`@("`@($-S2&5L<&5R+F-O<'DH2$%04D]865]#3TY&7U0L($A!4%)/ +M6%E?0T].1E]0*0H*("`@("`@("`@("`@<')O8R`]($-S4')O8V5S2YP:60G72D*("`@("`@("`@("`@:68@;F]T('!R;V,N9FEN +M9"@I.@H@("`@("`@("`@("`@("`@;&]G9VEN9RYD96)U9R@B0W-,;V%D0F%L +M86YC97(Z.B!W:6QL(')E2$B*0H@("`@("`@("`@("`@ +M("`@0W-(96QP97(N2(L(")R97-T87)T(BD*("`@ +M("`@("`@("`@96QS93H*("`@("`@("`@("`@("`@(&QO9V=I;F2$B*0H@("`@ +M("`@("`@("`@("`@0W-(96QP97(N2(L(")R96QO +M860B*0H*("`@("`@("!A9&1?/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py': 'MD5 check failed' + ) << \SHAR_EOF +8f93571ff9b8f21c947e90193c3efa38 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py'` -ne 3393 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' is not 3393" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsApp.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsApp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsApp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsApp.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G +M871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG971?='EP92@I"B`@ +M("`@("`@5]I9E]N965D +M960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L"B`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE,B]S:71E2DI"B`@("`@("`@ +M("`@(&9I;&4N&5C=71E,B@B/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsApp.py': 'MD5 check failed' + ) << \SHAR_EOF +fa071a9d58a918b6a9d5e09ae10e3e11 cloud_scripts/opt/cloud/bin/cs/CsApp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsApp.py'` -ne 4159 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' is not 4159" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsFile.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsFile.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsFile.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import logging +import re +import copy +X +X +class CsFile: +X """ File editors """ +X +X def __init__(self, filename): +X self.filename = filename +X self.load() +X +X def load(self): +X self.new_config = [] +X self.config = [] +X try: +X for line in open(self.filename): +X self.new_config.append(line) +X except IOError: +X logging.debug("File %s does not exist" % self.filename) +X else: +X logging.debug("Reading file %s" % self.filename) +X self.config = list(self.new_config) +X +X def is_changed(self): +X if set(self.config) != set(self.new_config): +X return True +X else: +X return False +X +X def __len__(self): +X return len(self.config) +X +X def empty(self): +X self.config = [] +X self.new_config = [] +X +X def repopulate(self): +X self.new_config = [] +X +X def commit(self): +X if not self.is_changed(): +X logging.info("Nothing to commit. The %s file did not change" % self.filename) +X return False +X handle = open(self.filename, "w+") +X for line in self.new_config: +X handle.write(line) +X handle.close() +X logging.info("Wrote edited file %s" % self.filename) +X self.config = list(self.new_config) +X logging.info("Updated file in-cache configuration") +X return True +X +X def dump(self): +X for line in self.new_config: +X print line +X +X def addeq(self, string): +X """ Update a line in a file of the form token=something +X match on token= and replace something if needed +X Add line if token is not present +X """ +X token = string.split('=')[0] + '=' +X self.search(token, string) +X +X def append(self, string, where=-1): +X if where == -1: +X self.new_config.append("%s\n" % string) +X else: +X self.new_config.insert(where, "%s\n" % string) +X +X def add(self, string, where=-1): +X for index, line in enumerate(self.new_config): +X if line.strip() == string: +X return False +X if where == -1: +X self.new_config.append("%s\n" % string) +X else: +X self.new_config.insert(where, "%s\n" % string) +X return True +X +X def section(self, start, end, content): +X sind = -1 +X eind = -1 +X found = False +X for index, line in enumerate(self.new_config): +X if found and line.strip() == end: +X eind = index +X found = False +X if line.strip() == start: +X sind = index + 1 +X found = True +X if sind == -1: +X content.insert(0, start + "\n") +X content.append(end + "\n") +X self.new_config[sind:eind] = content +X +X def greplace(self, search, replace): +X logging.debug("Searching for %s and replacing with %s" % (search, replace)) +X self.new_config = [w.replace(search, replace) for w in self.new_config] +X +X def replaceIfFound(self, search, replace): +X found = False +X replace_filtered = replace +X if re.search("PSK \"", replace): +X replace_filtered = re.sub(r'".*"', '"****"', replace) +X logging.debug("Searching for %s and replacing with %s if found" % (search, replace_filtered)) +X for index, line in enumerate(self.new_config): +X if line.lstrip().startswith("#"): +X continue +X if re.search(search, line): +X if replace not in line: +X self.new_config[index] = replace + "\n" +X return False +X +X def search(self, search, replace): +X found = False +X replace_filtered = replace +X if re.search("PSK \"", replace): +X replace_filtered = re.sub(r'".*"', '"****"', replace) +X logging.debug("Searching for %s and replacing with %s" % (search, replace_filtered)) +X for index, line in enumerate(self.new_config): +X if line.lstrip().startswith("#"): +X continue +X if re.search(search, line): +X found = True +X if replace not in line: +X self.new_config[index] = replace + "\n" +X if not found: +X self.new_config.append(replace + "\n") +X return True +X return False +X +X def searchString(self, search, ignoreLinesStartWith): +X found = False +X logging.debug("Searching for %s string " % search) +X +X for index, line in enumerate(self.new_config): +X print ' line = ' + line +X if line.lstrip().startswith(ignoreLinesStartWith): +X continue +X if search in line: +X found = True +X break +X +X return found +X +X def deleteLine(self, search): +X found = False +X logging.debug("Searching for %s to remove the line " % search) +X temp_config = [] +X for index, line in enumerate(self.new_config): +X if line.lstrip().startswith("#"): +X continue +X if search not in line: +X temp_config.append(line) +X +X self.new_config = list(temp_config) +X +X def compare(self, o): +X result = (isinstance(o, self.__class__) and set(self.config) == set(o.config)) +X logging.debug("Comparison of CsFiles content is ==> %s" % result) +X return result +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsFile.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsFile.py': 'MD5 check failed' + ) << \SHAR_EOF +81531ddee205a5eb66bb44f400ab222c cloud_scripts/opt/cloud/bin/cs/CsFile.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsFile.py'` -ne 6133 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' is not 6133" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/__init__.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/__init__.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/__init__.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/__init__.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/__init__.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/__init__.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/__init__.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/__init__.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/__init__.py': 'MD5 check failed' + ) << \SHAR_EOF +33215d440d5ba5fa95b1ffa035d769e2 cloud_scripts/opt/cloud/bin/cs/__init__.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/__init__.py'` -ne 785 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/__init__.py' is not 785" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsAddress.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsAddress.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsAddress.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsAddress.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N`H@("`@("`@("`@("`@("`@("`@ +M(&=U97-T7VEN=&5R9F%C92`](&EN=&5R9F%C90H@("`@("`@("`@("`@("`@ +M("`@(&QO9V=I;F2!C;VYF:6=U2AS96QF*3H*("`@("`@("!I +M9B!S96QF+F-O;F9I9RYI2(I +M"B`@("`@("`@96QS93H*("`@("`@("`@("`@2@I+"!S96QF+F=E=%]S +M:7IE*"DI"@H@("`@9&5F(&=E=%]S:7IE*'-E;&8I.@H@("`@("`@("(B(B!2 +M971U7!E +M(B!I;B!S96QF+F%D9')E"@Q,#`@*R!I;G0H9&5V6S,Z72DI +M"B`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@("`@97AC97!T($5X8V5P=&EO;B!A +M&-E<'1I;VX@ +M;V-C=7)R960@/3T^("5S(B`E(&4I"@H@("`@("`@("`@("!S96QF+G!O7!E*"D@:6X@6R)C;VYT7!E*"D@:6X@ +M6R=P=6)L:6,G73H*("`@("`@("`@("`@("`@('-E;&8N7!E*"E=.@H@("`@("`@ +M("`@("`@("`@9V%T97=A>2`]('-T2@I*3H* +M("`@("`@("`@("`@("`@(')O=71E+F%D9%]D969A=6QT2@I*0H*("`@(&1E9B!S971?;6%R:RAS96QF*3H*("`@ +M("`@("!C;60@/2`B+4$@4%)%4D]55$E.1R`M:2`E7!E(&]F('1H92!)4`H@("`@("`@(&=U97-T"B`@("`@("`@8V]N +M=')O;`H@("`@("`@('!U8FQI8PH@("`@("`@("(B(@H@("`@("`@(&EF(")N +M=U]T>7!E(B!I;B!S96QF+F%D9')E&9F9F9F9F9F +M("TM8W1M87-K(#!X9F9F9F9F9F8B72D*"B`@("`@("`@&UA7!E*"D@:6X@6R)G=65S=")=.@H@("`@("`@("`@("!G=65S +M=$YE='=O&9F9F9F9F9F(ETI"B`@ +M("`@("`@("`@(&=U97-T3F5T=V]R:T-I9'(@/2!S96QF+F%D9')E#4R-2\P>&9F9F9F9F9F(B`E +M("AS96QF+F1E=BP@2)=("$](").;VYE(CH* +M("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@("`@("`@:68@ +M(FYE='=O7!E*"D@:6X@6R)P=6)L:6,B +M72!A;F0@(F=A=&5W87DB(&EN('-E;&8N861D2)=("$] +M(").;VYE(CH*("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@ +M("`@("`@("`@(&9O7!E(B!I;B!A9&1R97-S(&%N9"!A +M9&1R97-S6R)N=U]T>7!E(ET@/3T@(F=U97-T(CH*("`@("`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("!R;W5T92YA9&1?;F5T=V]R:U]R;W5T92AS96QF +M+F1E=BP@&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A8VAE(BD*"B`@("`@("`@ +M96QI9B!M971H;V0@/3T@(F1E;&5T92(Z"B`@("`@("`@("`@(",@=')E870@ +M=&AE(&QA&5C=71E*")S=61O(&EP(')U;&4@9&5L971E('1A8FQE("(@*R!T86)L94YA +M;64I"B`@("`@("`@("`@("`@("!#&5C=71E*")S=61O(&EP +M(')O=71E(&9L=7-H('1A8FQE("(@*R!T86)L94YA;64I"B`@("`@("`@("`@ +M("`@("!#&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A +M8VAE(BD*("`@("`@("`@("`@("`@($-S4G5L92AS96QF+F1E=BDN9&5L36%R +M:R@I"@H@("`@("`@('-E;&8N9G=?7!E('=I;&P@ +M;F\@;&]N9V5R(&)E(&MN;W=N"B`@("`@("`@:68@7!E*"D@/3T@(G!U8FQI8R(@86YD('-E;&8N8V]N9FEG+FES7W9P8R@I +M(&%N9"!M971H;V0@/3T@(F%D9"(Z"B`@("`@("`@("`@(&EF('-E;&8N861D +M7,H*3H*("`@("`@("`@ +M("`@7!E)UT@:6X@5E)2 +M4%]465!%4SH*("`@("`@("`@("`@7!E(B!I;B!S96QF+F%D9')E&5C=71E,BAC;60L($9A +M;'-E*0H*("`@(",@1&5L971E(&%N>2!I<',@=&AA="!A7,H*2!O2AS96QF+"!B862!F;W(@ +M7,O8VQA"TP+W)P&-E<'0@24]%/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py': 'MD5 check failed' + ) << \SHAR_EOF +5cebbbd106abd3eba7ee0e4d23277dda cloud_scripts/opt/cloud/bin/cs/CsAddress.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py'` -ne 29236 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' is not 29236" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsProcess.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsProcess.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsProcess.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import os +import re +import CsHelper +import logging +X +X +class CsProcess(object): +X """ Manipulate processes """ +X +X def __init__(self, search): +X self.search = search +X +X def start(self, thru, background=''): +X # if(background): +X # cmd = cmd + " &" +X logging.info("Started %s", " ".join(self.search)) +X os.system("%s %s %s" % (thru, " ".join(self.search), background)) +X +X def kill_all(self): +X pids = self.find_pid() +X for p in pids: +X CsHelper.execute("kill -9 %s" % p) +X +X def find_pid(self): +X self.pid = [] +X for i in CsHelper.execute("ps aux"): +X items = len(self.search) +X proc = re.split(r"\s+", i)[items*-1:] +X matches = len([m for m in proc if m in self.search]) +X if matches == items: +X self.pid.append(re.split(r"\s+", i)[1]) +X +X logging.debug("CsProcess:: Searching for process ==> %s and found PIDs ==> %s", self.search, self.pid) +X return self.pid +X +X def find(self): +X has_pid = len(self.find_pid()) > 0 +X return has_pid +X +X def kill(self, pid): +X if pid > 1: +X CsHelper.execute("kill -9 %s" % pid) +X +X def grep(self, str): +X for i in CsHelper.execute("ps aux"): +X if i.find(str) != -1: +X return re.split(r"\s+", i)[1] +X return -1 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsProcess.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py': 'MD5 check failed' + ) << \SHAR_EOF +75a4650fe1e521049e80d32a022d8689 cloud_scripts/opt/cloud/bin/cs/CsProcess.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py'` -ne 2156 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' is not 2156" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsConfig.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsConfig.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsConfig.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsConfig.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N7!E*"D@/3T@)W9P8W)O=71E'1D;G,H'1D;G,G+"`G9F%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py': 'MD5 check failed' + ) << \SHAR_EOF +836541a5b9cb1b2f9df5dad6bb806745 cloud_scripts/opt/cloud/bin/cs/CsConfig.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py'` -ne 3179 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' is not 3179" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsDatabag.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@("`@ +M("!S96QF+F1B(#T@1&%T84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF +M+F1B+G-A=F4HWT*("`@("`@("!R971U&1I9V5S="@I"@H@("`@ +M9&5F(&=E=%]G871E=V%Y*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I +M;B!S96QF+FED871A*"DZ"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A +M*"E;)V=A=&5W87DG70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G +M971?=7-E7V5X=%]D;G,H'1D;G,G70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E +M9B!G971?861V97)T7VEN="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN +M="<@:6X@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py': 'MD5 check failed' + ) << \SHAR_EOF +9e4de6e0a115a5e806e80dc151769b21 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py'` -ne 4808 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' is not 4808" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsRule.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRule.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRule.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import CsHelper +import logging +X +X +class CsRule: +X """ Manage iprules +X Supported Types: +X fwmark +X """ +X +X def __init__(self, dev): +X self.dev = dev +X self.tableNo = 100 + int(dev[3:]) +X self.table = "Table_%s" % (dev) +X +X def addRule(self, rule): +X if not self.findRule(rule + " lookup " + self.table): +X cmd = "ip rule add " + rule + " table " + self.table +X CsHelper.execute(cmd) +X logging.info("Added rule %s for %s" % (cmd, self.table)) +X +X def findRule(self, rule): +X for i in CsHelper.execute("ip rule show"): +X if rule in i.strip(): +X return True +X return False +X +X def addMark(self): +X if not self.findMark(): +X cmd = "ip rule add fwmark %s table %s" % (self.tableNo, self.table) +X CsHelper.execute(cmd) +X logging.info("Added fwmark rule for %s" % (self.table)) +X +X def delMark(self): +X if self.findMark(): +X cmd = "ip rule delete fwmark %s table %s" % (self.tableNo, self.table) +X CsHelper.execute(cmd) +X logging.info("Deleting fwmark rule for %s" % (self.table)) +X +X def findMark(self): +X srch = "from all fwmark %s lookup %s" % (hex(self.tableNo), self.table) +X for i in CsHelper.execute("ip rule show"): +X if srch in i.strip(): +X return True +X return False +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRule.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRule.py': 'MD5 check failed' + ) << \SHAR_EOF +78748432f1ac57194339aef8bdb7c9f8 cloud_scripts/opt/cloud/bin/cs/CsRule.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRule.py'` -ne 2192 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' is not 2192" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsDhcp.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsDhcp.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N'0B"D1(0U!?3U!44R`]("(O971C+V1H8W!O<'1S +M+G1X="(*0TQ/541?0T].1B`]("(O971C+V1N"`](#`*("`@("`@("!L:7-T96Y?861D0H@("`@("`@("`@("!G871E=V%Y(#T@ +M)R<*("`@("`@("`@("`@:68@2`](&E;)V=A=&5W +M87DG70H@("`@("`@("`@("!S;&EN92`](")D:&-P+7)A;F=E/7-E=#II;G1E +M"P@9V%T97=A>2D*("`@("`@("`@("`@96QS93H*("`@ +M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UR86YG93US970Z:6YT97)F86-E +M+25S+25S+"5S+'-T871I8R(@)2`H9&5V:6-E+"!I9'@L(&EP*0H@("`@("`@ +M("`@("!S96QF+F-O;F8N"D*("`@("`@("`@("`@;&EN92`](")D:&-P+6]P +M=&EO;CUT86"P@9VXN9V5T7V1O;6%I;B@I*0H@("`@("`@("`@("!S96QF+F-O;F8N"!F;W(@>"!I;B!G;BYG971?9&YS*"D@:68@>%T*("`@ +M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C +M92TE"P@)RPG+FIO:6XH9&YS7VQI +M2`A/2`G,"XP+C`N,""D*("`@("`@("`@("`@("`@ +M(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C92TE"P@9V%T97=A>2D*("`@("`@("`@("`@("`@('-E +M;&8N8V]N9BYS96%R8V@H"P@;F5T;6%S:RD*("`@("`@("`@("`@"`K/2`Q"@H@("`@("`@(",@ +M3&ES=&5N($%D9')E3H*("`@ +M("`@("`@("`@;&]G9VEN9RYI;F9O*")!='1E;7!T:6YG('1O(&1E;&5T92!E +M;G1R:65S(&9R;VT@9&YS;6%S<2YL96%S97,@9FEL92!F;W(@5DUS('=H:6-H +M(&%R92!N;W0@;VX@9&AC<&AOW!R:6YT("0S?22DZ"B`@("`@("`@5LG:7!V-%]A +M9&1R97-S)UTL(&5N=')Y6R=H;W-T7VYA;64G72D*("`@("`@("`C($QE87-E +M('1I;64@'!U;F=E9"P@:71S(&%C=&EV +M92!L96%S92!A;F0@1$A#4"]$3E,@8V]N9FEG(&ES('!R;W!E2!I2!R=6YN:6YG(&EN('!R;V1U8W1I;VYS +M('-Y5LG:7!V-%]A9&1R +M97-S)UTL"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@ +M("`@("`@("`@("`@("!E;G1R>5LG:&]S=%]N86UE)UTL"B`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!L96%S +M92DI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L)7,B("4@ +M*'1A9RP@,RDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L +M)7,B("4@*'1A9RP@-BDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D +M9"@B)7,L)7,B("4@*'1A9RP@,34I*0H*("`@("`@("!I(#T@25!!9&1R97-S +M*&5N=')Y6R=I<'8T7V%D9')E2==(#T@96YT2=="@H@("`@9&5F(&%D9%]H;W-T*'-E;&8L(&EP+"!H;W-T +M/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py': 'MD5 check failed' + ) << \SHAR_EOF +bcf1831b38d86bf041523540fa8f821e cloud_scripts/opt/cloud/bin/cs/CsDhcp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py'` -ne 8809 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' is not 8809" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsRedundant.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsRedundant.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N7,N2`](%1R=64*"B`@ +M("`@("`@:68@;F]T(&ES1&5V:6-E4F5A9'DZ"B`@("`@("`@("`@(&QO9V=I +M;F5]I9E]N965D960H"B`@("`@("`@("`@("(E&5C("1$045-3TX@+2T@+2UVR(L(")](BP@6PH@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("`@("(@("`@("`@(&%U=&A?='EP92!!2"!< +M;B(L("(@("`@("`@(&%U=&A?<&%S2AC;VYN=')A8VMD7W1E;7!L871E7V-O;F8L(&-O;FYT0H@("`@("`@("(B(@H@("`@("`@(&ET97)A=&EO;G,@ +M/2`Q,`H@("`@("`@('1I;65?8F5T=V5E;B`](#$*"B`@("`@("`@9F]R(&ET +M97(@:6X@3H* +M("`@("`@("`@("`@("`@(',@/2!S;V-K970N2!R=6YN:6YG("@E9#HE2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I<"@I*2YS=&]P*"D* +M"B`@("`@("`@0W-(96QP97(N2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@ +M("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")!9&1I;F<@9V%T97=A>2`]/3X@ +M)7,@=&\@9&5V:6-E(#T]/B`E2P@9&5V*2D*("`@("`@ +M("`@("`@("`@("`@("!I9B!D978@/3T@0W-(96QP97(N4%5"3$E#7TE.5$52 +M1D%#15-;&5C +M=71E*"(E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I +M<"@I*2YR97-T87)T*"D*"B`@("`@("`@0W-(96QP97(N2D*"B`@("`@("`@("`@(",@5&AE(&9I +M2!I;G1E2!V'1E2!E=F5R(&)E(&]N92!A9&1R97-S(&EN +M(&$@5E!#('1H97)E(&-A;B!B92!M86YY"B`@("`@("`@5&AE(&YE=R!C;V1E +M(&%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py': 'MD5 check failed' + ) << \SHAR_EOF +6936e38f53736f7c5a04b255800a242d cloud_scripts/opt/cloud/bin/cs/CsRedundant.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py'` -ne 16789 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' is not 16789" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsHelper.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsHelper.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsHelper.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsHelper.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B +M971H,2)]"@I35$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S +M:"`M8R`@)VEF(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@ +M96QS92!E8VAO(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@ +M(")V<&-R;W5T97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@ +M6R`D,"`]/2!<(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ +M"B`@("`@("`@("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@ +M("`@("`@(&-M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@ +M("`@("`@;&]G9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S +M(B`E('-T871E7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X +M96-U=&4H7!E*"E=(&%N9"!S +M=&%T92`]/2`B34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE +M8W5T92AC;60I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ +M("`@("`@(&5X96-U=&4H8VUD*0H*"F1E9B!I&5C=71E +M*")M;W5N="!T;7!F6XH=F%L*3H*("`@(&EF('9A;#H* +M("`@("`@("!R971U&5C=71E*")I<"!A9&1R('-H;W<@ +M?&=R97`@+78@WT*("`@("`@("`@("`@ +M=&];)VEP)UT@/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A +M;'-;+3%="B`@("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@ +M("(B(@H@("`@9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G +M*")3879I;F<@:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C +M=71E*")S>7-T96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I +M;F7-T96UC=&P@&5C=71E*")K:6QL +M("U(55`@)7,B("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D +M;G-M87-Q(BP@(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py': 'MD5 check failed' + ) << \SHAR_EOF +9bdd1fdfea8177d3e408b2cc87e5d503 cloud_scripts/opt/cloud/bin/cs/CsHelper.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py'` -ne 7644 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' is not 7644" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5NWT*("`@("`@("!S96QF+F=U97-T(#T@5')U90H@("`@("`@ +M(&1B(#T@1&%T84)A9R@I"B`@("`@("`@9&(N7,H*2!A;F0@;&5N*&1B86=;9&5V:6-E +M72D@(3T@,#H*("`@("`@("`@("`@2==*0H*("`@ +M("`@("!I9B`G9&YS)R!I;B!S96QF+F1A=&$Z"B`@("`@("`@("`@(&1N'1E;F0H&-E<'1I;VXN"B`@("`@("`@:68@)W)O +M=71E"!I="!P2X@22!J=7-T(&%D +M9&5D('1H92!I9BP@87,@26%N(&1I9"!I;B!S;VUE(&]T:&5R(&9I;&5S+"!T +M;R!A=F]I9"!T:&4@97AC97!T:6]N+@H@("`@("`@(&EF("=R;W5T97)?9W5E +M2<@:6X@2=="B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py': 'MD5 check failed' + ) << \SHAR_EOF +98c84f4067412f263891f8293f185243 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py'` -ne 2545 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' is not 2545" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsMonitor.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N"!I;B!S96QF+F1B86=;)V-O;F9I9R==+G-P;&ET*"WT*("`@("`@("!H8U]D871A6R)H96%L=&A?8VAE8VMS7V)A&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!S96QF+F1B +M86&-L=61E9%]H96%L=&A?8VAE8VMS(ET@/2!;70H* +M("`@("`@("!I9B`B:&5A;'1H7V-H96-K/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py': 'MD5 check failed' + ) << \SHAR_EOF +d8f5dcf496dbc6d8508e40b906f48245 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py'` -ne 3681 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' is not 3681" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@ +M("`@("!S96QF+FQA2!E>&ES=',Z(')U;&4] +M)7,@=&%B;&4])7,@8VAA:6X])7,B+"!N97=?2`](&-P>2YR97!L86-E*"(M02`E&5C=71E,B@B:7!T86)L97,@+70@)7,@ +M)7,B("4@*&YE=U]R=6QE+F=E=%]T86)L92@I+"!C<'DI*0H@("`@("`@("`@ +M("`@("`@(R!4:&5R92!A"!I;B!T:&4@ +M9G)A;65W;W)K+@H@("`@("`@("`@("`@("`@:68@&5C=71E*")I<'1A8FQE7!E(#T@0W-#;61,:6YE*")C;61L:6YE(BDN9V5T7W1Y<&4H*0H* +M("`@("`@("!T7!E*3H*("`@("`@("`@("`@("`@(&EF(&DNFEP*&)I='-;,#HZ,ETL(&)I='-;,3HZ,ETI*0H@("`@("`@(&EF +M("(M02(@:6X@2!C;W)R96-T(&EP=&%B;&5S(&-O;6UA +M;F0@(B(B"B`@("`@("`@(R!/7,H*3H*("`@("`@("`@("`@("`@('!R:6YT86)L92`] +M(&LN=7)N($9A;'-E"B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py': 'MD5 check failed' + ) << \SHAR_EOF +7456b53eba9f115f9ad344bc1c01611d cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py'` -ne 11100 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' is not 11100" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsRoute.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRoute.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRoute.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import CsHelper +import logging +X +X +class CsRoute: +X +X """ Manage routes """ +X +X def __init__(self): +X self.table_prefix = "Table_" +X +X def get_tablename(self, name): +X return self.table_prefix + name +X +X def add_table(self, devicename): +X tablenumber = 100 + int(devicename[3:]) +X tablename = self.get_tablename(devicename) +X str = "%s %s" % (tablenumber, tablename) +X filename = "/etc/iproute2/rt_tables" +X logging.info("Adding route table: " + str + " to " + filename + " if not present ") +X if not CsHelper.definedinfile(filename, str): +X CsHelper.execute("sudo echo " + str + " >> /etc/iproute2/rt_tables") +X # remove "from all table tablename" if exists, else it will interfer with +X # routing of unintended traffic +X if self.findRule("from all lookup " + tablename): +X CsHelper.execute("sudo ip rule delete from all table " + tablename) +X +X def flush_table(self, tablename): +X CsHelper.execute("ip route flush table %s" % (tablename)) +X CsHelper.execute("ip route flush cache") +X +X def add_route(self, dev, address): +X """ Wrapper method that adds table name and device to route statement """ +X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 +X table = self.get_tablename(dev) +X +X if not table or not address: +X empty_param = "table" if not table else "address" +X logging.info("Empty parameter received %s while trying to add route, skipping" % empty_param) +X else: +X logging.info("Adding route: dev " + dev + " table: " + +X table + " network: " + address + " if not present") +X cmd = "default via %s table %s proto static" % (address, table) +X self.set_route(cmd) +X +X def add_network_route(self, dev, address): +X """ Wrapper method that adds table name and device to route statement """ +X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 +X table = self.get_tablename(dev) +X +X if not table or not address: +X empty_param = "table" if not table else "address" +X logging.info("Empty parameter received %s while trying to add network route, skipping" % empty_param) +X else: +X logging.info("Adding route: dev " + dev + " table: " + +X table + " network: " + address + " if not present") +X cmd = "throw %s table %s proto static" % (address, table) +X self.set_route(cmd) +X +X def set_route(self, cmd, method="add"): +X """ Add a route if it is not already defined """ +X found = False +X search = cmd +X if "throw" in search: +X search = search.replace("throw", "") +X for i in CsHelper.execute("ip route show " + search): +X found = True +X if not found and method == "add": +X logging.info("Add " + cmd) +X cmd = "ip route add " + cmd +X elif found and method == "delete": +X logging.info("Delete " + cmd) +X cmd = "ip route delete " + cmd +X else: +X return +X CsHelper.execute(cmd) +X +X def add_defaultroute(self, gateway): +X """ Add a default route +X :param str gateway +X :return: bool +X """ +X if not gateway: +X raise Exception("Gateway cannot be None.") +X +X if self.defaultroute_exists(): +X return False +X else: +X cmd = "default via " + gateway +X logging.info("Adding default route") +X self.set_route(cmd) +X return True +X +X def defaultroute_exists(self): +X """ Return True if a default route is present +X :return: bool +X """ +X logging.info("Checking if default ipv4 route is present") +X route_found = CsHelper.execute("ip -4 route list 0/0") +X +X if len(route_found) > 0: +X logging.info("Default route found: " + route_found[0]) +X return True +X else: +X logging.warn("No default route found!") +X return False +X +X def findRule(self, rule): +X for i in CsHelper.execute("ip rule show"): +X if rule in i.strip(): +X return True +X return False +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRoute.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py': 'MD5 check failed' + ) << \SHAR_EOF +4f2109aa1d89157e14817f90c676c2d3 cloud_scripts/opt/cloud/bin/cs/CsRoute.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py'` -ne 4989 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' is not 4989" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py +M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2==*0H@("`@("`@("`@ +M("!#&5C=71E*&-O;6UA;F0I"B`@("`@("`@96QS93H*("`@ +M("`@("`@("`@8V]M;6%N9"`](")I<"!R;W5T92!S:&]W('P@9W)E<"`EW!R:6YT("0Q+"`D,WTG(B`E(')O=71E6R=N971W;W)K)UT*("`@ +M("`@("`@("`@2==*0H@("`@("`@("`@("`@ +C("`@0W-(96QP97(N97AE8W5T92AR;W5T95]C;VUM86YD*0H@ +` +end +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py': 'MD5 check failed' + ) << \SHAR_EOF +f9f9db3a4543397153d69a62551a6c8c cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py'` -ne 1655 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' is not 1655" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N7,H*3H* +M("`@("`@("`@("`@"YS<&QI="@G7&XG*5T*"B`@("`@("`@9FEL +M93$N8V]M;6ET*"D*("`@("`@("!F:6QE,B`]($-S1FEL92A(05!23UA97T-/ +M3D9?4"D*("`@("`@("!I9B!N;W0@9FEL93(N8V]M<&%R92AF:6QE,2DZ"B`@ +M("`@("`@("`@($-S2&5L<&5R+F-O<'DH2$%04D]865]#3TY&7U0L($A!4%)/ +M6%E?0T].1E]0*0H*("`@("`@("`@("`@<')O8R`]($-S4')O8V5S2YP:60G72D*("`@("`@("`@("`@:68@;F]T('!R;V,N9FEN +M9"@I.@H@("`@("`@("`@("`@("`@;&]G9VEN9RYD96)U9R@B0W-,;V%D0F%L +M86YC97(Z.B!W:6QL(')E2$B*0H@("`@("`@("`@("`@ +M("`@0W-(96QP97(N2(L(")R97-T87)T(BD*("`@ +M("`@("`@("`@96QS93H*("`@("`@("`@("`@("`@(&QO9V=I;F2$B*0H@("`@ +M("`@("`@("`@("`@0W-(96QP97(N2(L(")R96QO +M860B*0H*("`@("`@("!A9&1?/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py': 'MD5 check failed' + ) << \SHAR_EOF +8f93571ff9b8f21c947e90193c3efa38 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py'` -ne 3393 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' is not 3393" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsApp.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsApp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsApp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsApp.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G +M871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG971?='EP92@I"B`@ +M("`@("`@5]I9E]N965D +M960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L"B`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE,B]S:71E2DI"B`@("`@("`@ +M("`@(&9I;&4N&5C=71E,B@B/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsApp.py': 'MD5 check failed' + ) << \SHAR_EOF +fa071a9d58a918b6a9d5e09ae10e3e11 cloud_scripts/opt/cloud/bin/cs/CsApp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsApp.py'` -ne 4159 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' is not 4159" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsFile.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsFile.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsFile.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import logging +import re +import copy +X +X +class CsFile: +X """ File editors """ +X +X def __init__(self, filename): +X self.filename = filename +X self.load() +X +X def load(self): +X self.new_config = [] +X self.config = [] +X try: +X for line in open(self.filename): +X self.new_config.append(line) +X except IOError: +X logging.debug("File %s does not exist" % self.filename) +X else: +X logging.debug("Reading file %s" % self.filename) +X self.config = list(self.new_config) +X +X def is_changed(self): +X if set(self.config) != set(self.new_config): +X return True +X else: +X return False +X +X def __len__(self): +X return len(self.config) +X +X def empty(self): +X self.config = [] +X self.new_config = [] +X +X def repopulate(self): +X self.new_config = [] +X +X def commit(self): +X if not self.is_changed(): +X logging.info("Nothing to commit. The %s file did not change" % self.filename) +X return False +X handle = open(self.filename, "w+") +X for line in self.new_config: +X handle.write(line) +X handle.close() +X logging.info("Wrote edited file %s" % self.filename) +X self.config = list(self.new_config) +X logging.info("Updated file in-cache configuration") +X return True +X +X def dump(self): +X for line in self.new_config: +X print line +X +X def addeq(self, string): +X """ Update a line in a file of the form token=something +X match on token= and replace something if needed +X Add line if token is not present +X """ +X token = string.split('=')[0] + '=' +X self.search(token, string) +X +X def append(self, string, where=-1): +X if where == -1: +X self.new_config.append("%s\n" % string) +X else: +X self.new_config.insert(where, "%s\n" % string) +X +X def add(self, string, where=-1): +X for index, line in enumerate(self.new_config): +X if line.strip() == string: +X return False +X if where == -1: +X self.new_config.append("%s\n" % string) +X else: +X self.new_config.insert(where, "%s\n" % string) +X return True +X +X def section(self, start, end, content): +X sind = -1 +X eind = -1 +X found = False +X for index, line in enumerate(self.new_config): +X if found and line.strip() == end: +X eind = index +X found = False +X if line.strip() == start: +X sind = index + 1 +X found = True +X if sind == -1: +X content.insert(0, start + "\n") +X content.append(end + "\n") +X self.new_config[sind:eind] = content +X +X def greplace(self, search, replace): +X logging.debug("Searching for %s and replacing with %s" % (search, replace)) +X self.new_config = [w.replace(search, replace) for w in self.new_config] +X +X def replaceIfFound(self, search, replace): +X found = False +X replace_filtered = replace +X if re.search("PSK \"", replace): +X replace_filtered = re.sub(r'".*"', '"****"', replace) +X logging.debug("Searching for %s and replacing with %s if found" % (search, replace_filtered)) +X for index, line in enumerate(self.new_config): +X if line.lstrip().startswith("#"): +X continue +X if re.search(search, line): +X if replace not in line: +X self.new_config[index] = replace + "\n" +X return False +X +X def search(self, search, replace): +X found = False +X replace_filtered = replace +X if re.search("PSK \"", replace): +X replace_filtered = re.sub(r'".*"', '"****"', replace) +X logging.debug("Searching for %s and replacing with %s" % (search, replace_filtered)) +X for index, line in enumerate(self.new_config): +X if line.lstrip().startswith("#"): +X continue +X if re.search(search, line): +X found = True +X if replace not in line: +X self.new_config[index] = replace + "\n" +X if not found: +X self.new_config.append(replace + "\n") +X return True +X return False +X +X def searchString(self, search, ignoreLinesStartWith): +X found = False +X logging.debug("Searching for %s string " % search) +X +X for index, line in enumerate(self.new_config): +X print ' line = ' + line +X if line.lstrip().startswith(ignoreLinesStartWith): +X continue +X if search in line: +X found = True +X break +X +X return found +X +X def deleteLine(self, search): +X found = False +X logging.debug("Searching for %s to remove the line " % search) +X temp_config = [] +X for index, line in enumerate(self.new_config): +X if line.lstrip().startswith("#"): +X continue +X if search not in line: +X temp_config.append(line) +X +X self.new_config = list(temp_config) +X +X def compare(self, o): +X result = (isinstance(o, self.__class__) and set(self.config) == set(o.config)) +X logging.debug("Comparison of CsFiles content is ==> %s" % result) +X return result +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsFile.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsFile.py': 'MD5 check failed' + ) << \SHAR_EOF +81531ddee205a5eb66bb44f400ab222c cloud_scripts/opt/cloud/bin/cs/CsFile.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsFile.py'` -ne 6133 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' is not 6133" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/__init__.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/__init__.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/__init__.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/__init__.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/__init__.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/__init__.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/__init__.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/__init__.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/__init__.py': 'MD5 check failed' + ) << \SHAR_EOF +33215d440d5ba5fa95b1ffa035d769e2 cloud_scripts/opt/cloud/bin/cs/__init__.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/__init__.py'` -ne 785 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/__init__.py' is not 785" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsAddress.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsAddress.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsAddress.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsAddress.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N`H@("`@("`@("`@("`@("`@("`@ +M(&=U97-T7VEN=&5R9F%C92`](&EN=&5R9F%C90H@("`@("`@("`@("`@("`@ +M("`@(&QO9V=I;F2!C;VYF:6=U2AS96QF*3H*("`@("`@("!I +M9B!S96QF+F-O;F9I9RYI2(I +M"B`@("`@("`@96QS93H*("`@("`@("`@("`@2@I+"!S96QF+F=E=%]S +M:7IE*"DI"@H@("`@9&5F(&=E=%]S:7IE*'-E;&8I.@H@("`@("`@("(B(B!2 +M971U7!E +M(B!I;B!S96QF+F%D9')E"@Q,#`@*R!I;G0H9&5V6S,Z72DI +M"B`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@("`@97AC97!T($5X8V5P=&EO;B!A +M&-E<'1I;VX@ +M;V-C=7)R960@/3T^("5S(B`E(&4I"@H@("`@("`@("`@("!S96QF+G!O7!E*"D@:6X@6R)C;VYT7!E*"D@:6X@ +M6R=P=6)L:6,G73H*("`@("`@("`@("`@("`@('-E;&8N7!E*"E=.@H@("`@("`@ +M("`@("`@("`@9V%T97=A>2`]('-T2@I*3H* +M("`@("`@("`@("`@("`@(')O=71E+F%D9%]D969A=6QT2@I*0H*("`@(&1E9B!S971?;6%R:RAS96QF*3H*("`@ +M("`@("!C;60@/2`B+4$@4%)%4D]55$E.1R`M:2`E7!E(&]F('1H92!)4`H@("`@("`@(&=U97-T"B`@("`@("`@8V]N +M=')O;`H@("`@("`@('!U8FQI8PH@("`@("`@("(B(@H@("`@("`@(&EF(")N +M=U]T>7!E(B!I;B!S96QF+F%D9')E&9F9F9F9F9F +M("TM8W1M87-K(#!X9F9F9F9F9F8B72D*"B`@("`@("`@&UA7!E*"D@:6X@6R)G=65S=")=.@H@("`@("`@("`@("!G=65S +M=$YE='=O&9F9F9F9F9F(ETI"B`@ +M("`@("`@("`@(&=U97-T3F5T=V]R:T-I9'(@/2!S96QF+F%D9')E#4R-2\P>&9F9F9F9F9F(B`E +M("AS96QF+F1E=BP@2)=("$](").;VYE(CH* +M("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@("`@("`@:68@ +M(FYE='=O7!E*"D@:6X@6R)P=6)L:6,B +M72!A;F0@(F=A=&5W87DB(&EN('-E;&8N861D2)=("$] +M(").;VYE(CH*("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@ +M("`@("`@("`@(&9O7!E(B!I;B!A9&1R97-S(&%N9"!A +M9&1R97-S6R)N=U]T>7!E(ET@/3T@(F=U97-T(CH*("`@("`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("!R;W5T92YA9&1?;F5T=V]R:U]R;W5T92AS96QF +M+F1E=BP@&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A8VAE(BD*"B`@("`@("`@ +M96QI9B!M971H;V0@/3T@(F1E;&5T92(Z"B`@("`@("`@("`@(",@=')E870@ +M=&AE(&QA&5C=71E*")S=61O(&EP(')U;&4@9&5L971E('1A8FQE("(@*R!T86)L94YA +M;64I"B`@("`@("`@("`@("`@("!#&5C=71E*")S=61O(&EP +M(')O=71E(&9L=7-H('1A8FQE("(@*R!T86)L94YA;64I"B`@("`@("`@("`@ +M("`@("!#&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A +M8VAE(BD*("`@("`@("`@("`@("`@($-S4G5L92AS96QF+F1E=BDN9&5L36%R +M:R@I"@H@("`@("`@('-E;&8N9G=?7!E('=I;&P@ +M;F\@;&]N9V5R(&)E(&MN;W=N"B`@("`@("`@:68@7!E*"D@/3T@(G!U8FQI8R(@86YD('-E;&8N8V]N9FEG+FES7W9P8R@I +M(&%N9"!M971H;V0@/3T@(F%D9"(Z"B`@("`@("`@("`@(&EF('-E;&8N861D +M7,H*3H*("`@("`@("`@ +M("`@7!E)UT@:6X@5E)2 +M4%]465!%4SH*("`@("`@("`@("`@7!E(B!I;B!S96QF+F%D9')E&5C=71E,BAC;60L($9A +M;'-E*0H*("`@(",@1&5L971E(&%N>2!I<',@=&AA="!A7,H*2!O2AS96QF+"!B862!F;W(@ +M7,O8VQA"TP+W)P&-E<'0@24]%/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py': 'MD5 check failed' + ) << \SHAR_EOF +5cebbbd106abd3eba7ee0e4d23277dda cloud_scripts/opt/cloud/bin/cs/CsAddress.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py'` -ne 29236 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' is not 29236" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsProcess.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsProcess.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsProcess.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import os +import re +import CsHelper +import logging +X +X +class CsProcess(object): +X """ Manipulate processes """ +X +X def __init__(self, search): +X self.search = search +X +X def start(self, thru, background=''): +X # if(background): +X # cmd = cmd + " &" +X logging.info("Started %s", " ".join(self.search)) +X os.system("%s %s %s" % (thru, " ".join(self.search), background)) +X +X def kill_all(self): +X pids = self.find_pid() +X for p in pids: +X CsHelper.execute("kill -9 %s" % p) +X +X def find_pid(self): +X self.pid = [] +X for i in CsHelper.execute("ps aux"): +X items = len(self.search) +X proc = re.split(r"\s+", i)[items*-1:] +X matches = len([m for m in proc if m in self.search]) +X if matches == items: +X self.pid.append(re.split(r"\s+", i)[1]) +X +X logging.debug("CsProcess:: Searching for process ==> %s and found PIDs ==> %s", self.search, self.pid) +X return self.pid +X +X def find(self): +X has_pid = len(self.find_pid()) > 0 +X return has_pid +X +X def kill(self, pid): +X if pid > 1: +X CsHelper.execute("kill -9 %s" % pid) +X +X def grep(self, str): +X for i in CsHelper.execute("ps aux"): +X if i.find(str) != -1: +X return re.split(r"\s+", i)[1] +X return -1 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsProcess.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py': 'MD5 check failed' + ) << \SHAR_EOF +75a4650fe1e521049e80d32a022d8689 cloud_scripts/opt/cloud/bin/cs/CsProcess.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py'` -ne 2156 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' is not 2156" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsConfig.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsConfig.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsConfig.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsConfig.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5N7!E*"D@/3T@)W9P8W)O=71E'1D;G,H'1D;G,G+"`G9F%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py': 'MD5 check failed' + ) << \SHAR_EOF +836541a5b9cb1b2f9df5dad6bb806745 cloud_scripts/opt/cloud/bin/cs/CsConfig.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py'` -ne 3179 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' is not 3179" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsDatabag.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py +M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W +M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@("`@ +M("!S96QF+F1B(#T@1&%T84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF +M+F1B+G-A=F4HWT*("`@("`@("!R971U&1I9V5S="@I"@H@("`@ +M9&5F(&=E=%]G871E=V%Y*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I +M;B!S96QF+FED871A*"DZ"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A +M*"E;)V=A=&5W87DG70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G +M971?=7-E7V5X=%]D;G,H'1D;G,G70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E +M9B!G971?861V97)T7VEN="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN +M="<@:6X@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py': 'MD5 check failed' + ) << \SHAR_EOF +9e4de6e0a115a5e806e80dc151769b21 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py'` -ne 4808 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' is not 4808" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs/CsRule.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRule.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRule.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' && +# -- coding: utf-8 -- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import CsHelper +import logging +X +X +class CsRule: +X """ Manage iprules +X Supported Types: +X fwmark +X """ +X +X def __init__(self, dev): +X self.dev = dev +X self.tableNo = 100 + int(dev[3:]) +X self.table = "Table_%s" % (dev) +X +X def addRule(self, rule): +X if not self.findRule(rule + " lookup " + self.table): +X cmd = "ip rule add " + rule + " table " + self.table +X CsHelper.execute(cmd) +X logging.info("Added rule %s for %s" % (cmd, self.table)) +X +X def findRule(self, rule): +X for i in CsHelper.execute("ip rule show"): +X if rule in i.strip(): +X return True +X return False +X +X def addMark(self): +X if not self.findMark(): +X cmd = "ip rule add fwmark %s table %s" % (self.tableNo, self.table) +X CsHelper.execute(cmd) +X logging.info("Added fwmark rule for %s" % (self.table)) +X +X def delMark(self): +X if self.findMark(): +X cmd = "ip rule delete fwmark %s table %s" % (self.tableNo, self.table) +X CsHelper.execute(cmd) +X logging.info("Deleting fwmark rule for %s" % (self.table)) +X +X def findMark(self): +X srch = "from all fwmark %s lookup %s" % (hex(self.tableNo), self.table) +X for i in CsHelper.execute("ip rule show"): +X if srch in i.strip(): +X return True +X return False +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRule.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRule.py': 'MD5 check failed' + ) << \SHAR_EOF +78748432f1ac57194339aef8bdb7c9f8 cloud_scripts/opt/cloud/bin/cs/CsRule.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRule.py'` -ne 2192 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' is not 2192" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vmdata.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vmdata.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vmdata.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vmdata.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/vmdata.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&ET*#(I +M"@H@("`@9F]R(&EP(&EN(&IS;VY?9&%T83H*("`@("`@("!F;W(@:71E;2!I +M;B!J2!V86QI9"!D +M871A"B`@("`@("`@("`@(&EF(&9O;&1E&ES=',H;65T +M86UA;FEF97-T*3H*("`@("`@("!O2Q!;&QO=UQN1&5N +M>2!F&-E<'0@3U-%2!E>&ES=',L('=E(&1O(&ET('1H:7,@=V%Y(&9O +M7,N97AI="@Q*0H*("`@(&9H(#T@;W!E;BAH +M=&%C8V5S2`K("=<;B&9L;V-K*&9I;&4I.@H@("`@=')Y.@H@("`@("`@(&9L;V-K +M*&9I;&4L($Q/0TM?15@I"B`@("!E>&-E<'0@24]%7,N97AI="@Q +M*0H@("`@3H*("`@("`@("!F;&]C:RAF:6QE+"!,3T-+7U5.*0H@("`@97AC97!T($E/ +M17)R;W(@87,@93H*("`@("`@("!P7,N97AI="@Q*0H@("`@7,N87)G=ELQ.ETI"FYA +` +end +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vmdata.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vmdata.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vmdata.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vmdata.py': 'MD5 check failed' + ) << \SHAR_EOF +f585277ddefb989a0662db609bc199c7 cloud_scripts/opt/cloud/bin/vmdata.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vmdata.py'` -ne 4723 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vmdata.py' is not 4723" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/get_diagnostics_files.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/get_diagnostics_files.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/get_diagnostics_files.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' && +#!/usr/bin/env python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import logging +import os +import re +import shlex +import subprocess as sp +import sys +import time +import zipfile +X +X +# Create zip archive and append files for retrieval +def zip_files(files): +X fList = files +X compression = zipfile.ZIP_DEFLATED +X time_str = time.strftime("%Y%m%d-%H%M%S") +X zf_name = '/root/diagnostics_files_' + time_str + '.zip' +X zf = zipfile.ZipFile(zf_name, 'w', compression) +X +X ''' +X Initialize 3 empty arrays to collect found files, non-existent files +X and last one to collect temp files to be cleaned up when script exits +X ''' +X files_found_list = [] +X files_not_found_list = [] +X files_from_shell_commands = [] +X +X try: +X for f in fList: +X f = f.strip() +X +X if f in ('iptables', 'ipaddr', 'iprule', 'iproute'): +X f = execute_shell_script(f) +X files_from_shell_commands.append(f) +X +X if len(f) > 3 and f.startswith('[') and f.endswith(']'): +X f = execute_shell_script(f[1:-1]) +X files_from_shell_commands.append(f) +X +X if os.path.isfile(f): +X try: +X zf.write(f, f[f.rfind('/') + 1:]) +X except OSError or RuntimeError as e: +X files_not_found_list.append(f) +X else: +X files_found_list.append(f) +X finally: +X cleanup(files_from_shell_commands) +X generate_retrieved_files_txt(zf, files_found_list, files_not_found_list) +X zf.close() +X print zf_name +X +X +def get_cmd(script): +X if script is None or len(script) == 0: +X return None +X +X cmd = None +X if script == 'iptables': +X cmd = 'iptables-save' +X elif script == 'ipaddr': +X cmd = 'ip address' +X elif script == 'iprule': +X cmd = 'ip rule list' +X elif script == 'iproute': +X cmd = 'ip route show table all' +X else: +X cmd = '/opt/cloud/bin/' + script +X if not os.path.isfile(cmd.split(' ')[0]): +X cmd = None +X +X return cmd +X +X +def execute_shell_script(script): +X script = script.strip() +X outputfile = script + '.log' +X +X with open(outputfile, 'wb', 0) as f: +X try: +X cmd = get_cmd(script) +X if cmd is None: +X f.write('Unable to generate command for ' + script + ', perhaps missing file') +X else: +X p = sp.Popen(cmd, shell=True, stdout=sp.PIPE, stderr=sp.PIPE) +X stdout, stderr = p.communicate() +X return_code = p.returncode +X if return_code is 0: +X f.write(stdout) +X else: +X f.write(stderr) +X except OSError as ex: +X delete_tmp_file_cmd = 'rm -f %s' % outputfile +X sp.check_call(shlex.split(delete_tmp_file_cmd)) +X finally: +X f.close() +X return outputfile +X +X +def cleanup(file_list): +X files = ' '.join(file_list) +X cmd = 'rm -f %s' % files +X try: +X p = sp.Popen(shlex.split(cmd), stderr=sp.PIPE, stdout=sp.PIPE) +X p.communicate() +X except OSError as e: +X logging.debug("Failed to execute bash command") +X +X +def generate_retrieved_files_txt(zip_file, files_found, files_not_found): +X output_file = 'fileinfo.txt' +X try: +X with open(output_file, 'wb', 0) as man: +X for i in files_found: +X man.write(i + '\n') +X for j in files_not_found: +X man.write(j + 'File Not Found!!\n') +X zip_file.write(output_file, output_file) +X finally: +X cleanup_cmd = "rm -f %s" % output_file +X sp.check_call(shlex.split(cleanup_cmd)) +X +X +if __name__ == '__main__': +X fileList = sys.argv[1:] +X zip_files(fileList) +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/get_diagnostics_files.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py': 'MD5 check failed' + ) << \SHAR_EOF +f8b91c14af848f14696aa2c1193b0907 cloud_scripts/opt/cloud/bin/get_diagnostics_files.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py'` -ne 4478 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' is not 4478" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/checkrouter.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checkrouter.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checkrouter.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/checkrouter.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checkrouter.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +STATUS=UNKNOWN +X +if [ "$(systemctl is-active keepalived)" != "active" ] +then +X echo "Status: FAULT" +X exit +fi +X +ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g') +if [ "$ROUTER_TYPE" = "router" ] +then +X ROUTER_STATE=$(ip addr show dev eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi') +X STATUS=$ROUTER_STATE +else +X ROUTER_STATE=$(ip addr show dev eth1 | grep state | awk '{print $9;}') +X if [ "$ROUTER_STATE" = "UP" ] +X then +X STATUS=MASTER +X elif [ "$ROUTER_STATE" = "DOWN" ] +X then +X STATUS=BACKUP +X fi +fi +X +echo "Status: ${STATUS}" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checkrouter.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/checkrouter.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/checkrouter.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checkrouter.sh': 'MD5 check failed' + ) << \SHAR_EOF +b107b37bc85a7036ef9f4e81cf4ae8b2 cloud_scripts/opt/cloud/bin/checkrouter.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checkrouter.sh'` -ne 1445 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checkrouter.sh' is not 1445" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/ilb.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ilb.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ilb.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/ilb.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/ilb.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +usage() { +X printf "Usage: %s: -a -d -f -s \n" $(basename $0) >&2 +} +X +#set -x +X +fw_remove_backup() { +X logger -t cloud "$(basename $0): Entering fw_remove_backup" +X local lb_vif_list=eth0 +X for vif in $lb_vif_list; do +X sudo iptables -F back_load_balancer_$vif 2> /dev/null +X sudo iptables -D INPUT -i $vif -p tcp -j back_load_balancer_$vif 2> /dev/null +X sudo iptables -X back_load_balancer_$vif 2> /dev/null +X done +X sudo iptables -F back_lb_stats 2> /dev/null +X sudo iptables -D INPUT -p tcp -j back_lb_stats 2> /dev/null +X sudo iptables -X back_lb_stats 2> /dev/null +} +X +fw_restore() { +X logger -t cloud "$(basename $0): Entering fw_restore" +X local lb_vif_list="eth0" +X for vif in $lb_vif_list; do +X sudo iptables -F load_balancer_$vif 2> /dev/null +X sudo iptables -D INPUT -i $vif -p tcp -j load_balancer_$vif 2> /dev/null +X sudo iptables -X load_balancer_$vif 2> /dev/null +X sudo iptables -E back_load_balancer_$vif load_balancer_$vif 2> /dev/null +X done +X sudo iptables -F lb_stats 2> /dev/null +X sudo iptables -D INPUT -p tcp -j lb_stats 2> /dev/null +X sudo iptables -X lb_stats 2> /dev/null +X sudo iptables -E back_lb_stats lb_stats 2> /dev/null +} +X +# firewall entry to ensure that haproxy can receive on specified port +fw_entry() { +X logger -t cloud "$(basename $0): Entering fw_entry" +X local added=$1 +X local removed=$2 +X local stats=$3 +X +X if [ "$added" == "none" ] +X then +X added="" +X fi +X +X if [ "$removed" == "none" ] +X then +X removed="" +X fi +X +X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") +X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") +X +# back up the iptable rules by renaming before creating new. +X local lb_vif_list=eth0 +X for vif in $lb_vif_list; do +X sudo iptables -E load_balancer_$vif back_load_balancer_$vif 2> /dev/null +X sudo iptables -N load_balancer_$vif 2> /dev/null +X sudo iptables -A INPUT -i $vif -p tcp -j load_balancer_$vif +X done +X sudo iptables -E lb_stats back_lb_stats 2> /dev/null +X sudo iptables -N lb_stats 2> /dev/null +X sudo iptables -A INPUT -p tcp -j lb_stats +X +X for i in $a +X do +X local pubIp=$(echo $i | cut -d: -f1) +X local dport=$(echo $i | cut -d: -f2) +X local lb_vif_list="eth0" +X for vif in $lb_vif_list; do +X sudo iptables -A load_balancer_$vif -p tcp -d $pubIp --dport $dport -j ACCEPT +X if [ $? -gt 0 ] +X then +X return 1 +X fi +X done +X done +X local pubIp=$(echo $stats | cut -d: -f1) +X local dport=$(echo $stats | cut -d: -f2) +X local cidrs=$(echo $stats | cut -d: -f3 | sed 's/-/,/') +X sudo iptables -A lb_stats -s $cidrs -p tcp -m state --state NEW -d $pubIp --dport $dport -j ACCEPT +X +X return 0 +} +X +#Hot reconfigure HA Proxy in the routing domain +reconfig_lb() { +X logger -t cloud "Reconfiguring ilb using $1" +X /root/reconfigLB.sh $1 +X return $? +} +X +# Restore the HA Proxy to its previous state, and revert iptables rules on loadbalancer +restore_lb() { +X logger -t cloud "Restoring HA Proxy to previous state" +X # Copy the old version of haproxy.cfg into the file that reconfigLB.sh uses +X cp /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg.new +X +X if [ $? -eq 0 ] +X then +X # Run reconfigLB.sh again +X /root/reconfigLB.sh /etc/haproxy/haproxy.cfg.new +X fi +} +X +X +logger -t cloud "$(basename $0): Entering $(dirname $0)/$(basename $0)" +X +iflag= +aflag= +dflag= +fflag= +sflag= +X +while getopts 'i:a:d:f:s:' OPTION +do +X case $OPTION in +X i) iflag=1 +X domRIp="$OPTARG" #unused but passed in +X ;; +X a) aflag=1 +X addedIps="$OPTARG" +X ;; +X d) dflag=1 +X removedIps="$OPTARG" +X ;; +X f) fflag=1 +X cfgfile="$OPTARG" +X ;; +X s) sflag=1 +X statsIp="$OPTARG" +X ;; +X ?) usage +X unlock_exit 2 $lock $locked +X ;; +X esac +done +X +if [[ "$aflag$dflag" != "1" && "$aflag$dflag" != "11" ]] +then +X usage +X unlock_exit 2 $lock $locked +fi +X +if [ "$addedIps" == "" ] +then +X addedIps="none" +fi +X +X +if [ "$removedIps" == "" ] +then +X removedIps="none" +fi +X +X +# hot reconfigure haproxy +reconfig_lb $cfgfile +X +if [ $? -gt 0 ] +then +X logger -t cloud "Reconfiguring ilb failed" +X unlock_exit 1 $lock $locked +fi +X +logger -t cloud "HAProxy reconfigured successfully, configuring firewall" +X +# iptables entry to ensure that haproxy receives traffic +fw_entry $addedIps $removedIps $statsIp +X +if [ $? -gt 0 ] +then +X logger -t cloud "Failed to apply firewall rules for internal load balancing, reverting HA Proxy config" +X # Restore the LB +X restore_lb +X +X logger -t cloud "Reverting firewall config" +X fw_restore +X +X unlock_exit 1 $lock $locked +else +X # Remove backedup iptable rules +X logger -t cloud "Firewall configured successfully, deleting backup firewall config" +X fw_remove_backup +fi +X +unlock_exit 0 $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/ilb.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/ilb.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/ilb.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ilb.sh': 'MD5 check failed' + ) << \SHAR_EOF +8b7374975ee7d7a5d73da78b60bd508c cloud_scripts/opt/cloud/bin/ilb.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ilb.sh'` -ne 5644 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ilb.sh' is not 5644" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +for i in $* +do +X info=`/opt/cloud/bin/checks2svpn.sh $i` +X ret=$? +X batchInfo+="$i:$ret:$info&" +done +echo -n $batchInfo +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh': 'MD5 check failed' + ) << \SHAR_EOF +36a25911b669737ea678011f72a6f3f9 cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh'` -ne 924 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' is not 924" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/savepassword.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/savepassword.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/savepassword.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/savepassword.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/savepassword.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# Usage +# save_password -v -p +X +while getopts 'v:p:' OPTION +do +X case $OPTION in +X v) VM_IP="$OPTARG" +X ;; +X p) PASSWORD="$OPTARG" +X ;; +X ?) echo "Incorrect usage" +X ;; +X esac +done +TOKEN_FILE="/tmp/passwdsrvrtoken" +TOKEN="" +if [ -f $TOKEN_FILE ]; then +X TOKEN=$(cat $TOKEN_FILE) +fi +ps aux | grep passwd_server_ip.py |grep -v grep 2>&1 > /dev/null +if [ $? -eq 0 ] +then +X ips=$(ip addr show | grep inet | awk '{print $2}') +X for ip in $ips; do +X server_ip=$(echo $ip | awk -F'/' '{print $1}') +X curl --header "DomU_Request: save_password" "http://$server_ip:8080/" -F "ip=$VM_IP" -F "password=$PASSWORD" -F "token=$TOKEN" >/dev/null 2>/dev/null & +X done +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/savepassword.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/savepassword.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/savepassword.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/savepassword.sh': 'MD5 check failed' + ) << \SHAR_EOF +edebd2c25984e1ed00b36e4f8d360a63 cloud_scripts/opt/cloud/bin/savepassword.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/savepassword.sh'` -ne 1525 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/savepassword.sh' is not 1525" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cloud-nic.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cloud-nic.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cloud-nic.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +plug_nic() { +X sudo echo "$tableNo $tableName" >> /etc/iproute2/rt_tables 2>/dev/null +X sudo ip rule add fwmark $tableNo table $tableName 2>/dev/null +X sudo ip route flush table $tableName +X sudo ip route flush cache +} +X +X +unplug_nic() { +X sudo iptables -t mangle -D PREROUTING -i $dev -m state --state NEW -j CONNMARK --set-mark $tableNo 2>/dev/null +X +X sudo ip rule del fwmark $tableNo 2>/dev/null +X sudo ip route flush table $tableName +X sudo sed -i /"$tableNo $tableName"/d /etc/iproute2/rt_tables 2>/dev/null +X sudo ip route flush cache +X # remove network usage rules +X sudo iptables -F NETWORK_STATS_$dev 2>/dev/null +X iptables-save | grep NETWORK_STATS_$dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables $rule +X done +X sudo iptables -X NETWORK_STATS_$dev 2>/dev/null +X # remove vpn network usage rules +X sudo iptables -t mangle -F VPN_STATS_$dev 2>/dev/null +X iptables-save -t mangle | grep VPN_STATS_$dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t mangle $rule +X done +X sudo iptables -t mangle -X VPN_STATS_$dev 2>/dev/null +X # remove rules on this dev +X iptables-save -t mangle | grep $dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t mangle $rule +X done +X iptables-save -t nat | grep $dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables -t nat $rule +X done +X iptables-save | grep $dev | grep "\-A" | while read rule +X do +X rule=$(echo $rule | sed 's/\-A/\-D/') +X sudo iptables $rule +X done +X # remove apache config for this eth +X rm -f /etc/apache2/conf.d/vhost$dev.conf +} +X +action=$1 +dev=$2 +tableNo=$((100+${dev:3})) +tableName="Table_$dev" +X +if [ $action == 'add' ] +then +X plug_nic +else +X unplug_nic +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cloud-nic.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cloud-nic.sh': 'MD5 check failed' + ) << \SHAR_EOF +6afed00cefb1dc06b8b4969c2c26933e cloud_scripts/opt/cloud/bin/cloud-nic.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cloud-nic.sh'` -ne 2632 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' is not 2632" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/ipsectunnel.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ipsectunnel.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/ipsectunnel.sh (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/ipsectunnel.sh +M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N#4R-2(*=G!N:6YM87)K/2(P>#4R-"(*"G5S86=E*"D@ +M>PH@("`@<')I;G1F(")5PH@('-U9&\@:7!T86)L +M97,MPH@(&1I2!<"B`@("!P +M:&%S93(@<&]L:6-Y/21ER1R:6=H=&YE='-] +M(B`^/B`D=G!N8V]N9F9I;&4@)B8*("!S=61O(&5C:&\@(B`@='EP93UT=6YN +M96PB(#X^("1V<&YC;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!A=71H8GD] +MVEK96QI9F5T:6UE?7,B(#X^("1V<&YC +M;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!E2(@/CX@ +M)'9P;F-O;F9F:6QE("8F"B`@2!F +M;W(@'1H;W`](B1/4%1!4D&ET("1R970* +` +end +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/ipsectunnel.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh': 'MD5 check failed' + ) << \SHAR_EOF +097a970ec94a68d965ffd7f446e3862d cloud_scripts/opt/cloud/bin/ipsectunnel.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh'` -ne 8769 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' is not 8769" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/ipassoc.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ipassoc.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ipassoc.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/ipassoc.sh (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/ipassoc.sh +M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N"`D("1(96%D55),.B!S=FXZ+R]S=FXN;&%B+G9M;W!S+F-O;2]R97!O2!E>&ES=',B"GT* +M"F1E;%]F=U]C:&%I;E]F;W)?:7`@*"D@>PH@(&QO8V%L('!U8DEP/20H96-H +M;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?2W!R:6YT("0R?2W!R:6YT("0R?2W!R:6YT("0Q?2PH@(&QO +M8V%L(&1E=CTB)#$B"B`@;&]C86P@:7`](B0R(@H@('-U9&\@:7`@861DW!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP/20Q +M"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0Q?22!F;W(@:7`@)'!U8DEP(&]N(&EN=&5R9F%C92`D971H1&5V(@H@("`@ +M(')E='5R;B`Q"B`@9FD*"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0R?2<@('P@9W)E<"`M=R`D +M:7!.;TUAW!R +M:6YT("0R?2#TD*'!R:6YT9B`B)7A<;B(@)&YU;2D*("`@("`@("`@ +M(&5C:&\@)&AE>#L*("`@("`@("`@("-E;F%B;&4@`IS +M9FQA9STP"FQF;&%G/0IF9FQA9ST*8V9L86<]"FYF;&%G/0IO<#TB(@H*:7-? +M;6%S=&5R/3`*:7-?&ET(#(@)&QO8VL@)&QO8VME9`H)"3L["B`@ +M97-A8PID;VYE"@H*:68@6R`B)$%F;&%G)$1F;&%G(B`A/2`B,2(@70IT:&5N +M"B`@("!U&ET("0_("1L;V-K +M("1L;V-K960*9FD*"FEF(%L@(B1F9FQA9R(@/3T@(C$B(%T@)B8@6R`B)$1F +M;&%G(B`]/2`B,2(@70IT:&5N"B`@&ET("0_ +M("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1$9FQA9R(@/3T@(C$B(%T*=&AE +M;@H@(')E;6]V95]A;E]I<"`@)'!U8FQI8TEP("8F"B`@9&5L7V9W7V-H86EN +M7V9O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ipassoc.sh': 'MD5 check failed' + ) << \SHAR_EOF +ad068a0cc84ded8f79c63ce3aced4586 cloud_scripts/opt/cloud/bin/ipassoc.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ipassoc.sh'` -ne 13401 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ipassoc.sh' is not 13401" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/line_edit.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/line_edit.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/line_edit.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/line_edit.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/line_edit.py' && +#!/usr/bin/python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import logging +import re +import shutil +import os +X +X +class LineEdit(object): +X """Helper for LineEditingFile that keeps track of one edit.""" +X def __init__(self, search, sub, *sub_args, **kwargs): +X if len(sub_args) > 0: +X sub = sub % sub_args +X flags = kwargs.get('flags', 0) +X self.pattern = re.compile(search, flags=flags) +X self.sub = sub +X self.count = kwargs.get('count', 0) # max subs to make +X self.subs = 0 # subs made so far +X +X +class LineEditingFile(object): +X """ +X Atomic, conservative, by-line editing of configuration files. +X +X Will not touch the file if there are no changes to do. +X Reasonably efficient for large files, though files with a long time +X before their first match will use memory. +X +X +X Given a vhosts file such as: +X >>> with open('doctest-vhosts.conf', 'w') as f: +X ... f.write(''' +X ... Listen foo:80 +X ... +X ... DocRoot /var/www +X ... +X ... +X ... Listen other:80 +X ... +X ... DocRoot /var/www +X ... +X ... ''') +X ... +X +X To replace the hostname for the first virtualhost entry: +X >>> new_hostname = 'fooooo' +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... f.replace(r'', '', new_hostname, count=1, flags=re.I) +X ... f.replace(r'Listen .*?:80', 'Listen %s:80', new_hostname, count=1, flags=re.I) +X ... +X +X Be careful with the matches! +X A second invocation of the same rule will edit the second vhost: +X >>> new_hostname = 'fooooo' +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... f.replace(r'', '', new_hostname, count=1, flags=re.I) +X ... +X +X To move all hosts from port 80 to port 8080: +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... f.replace(r'', '', flags=re.I) +X ... f.replace(r'Listen (.*?):80', 'Listen \\\\1:80', flags=re.I) +X ... +X +X (please note in this example there's a double escape of the backreference +X \\\\1, to make the example work with doctest) +X +X Since this example already matched all files, a second invocation does nothing: +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... f.replace(r'', '', flags=re.I) +X ... +X +X It's also acceptable to not make any edits at all: +X >>> with LineEditingFile('doctest-vhosts.conf') as f: +X ... pass +X ... +X +X You don't _have_ to use a with statement: +X >>> f = LineEditingFile('doctest-vhosts.conf') +X >>> f.replace(r'DocRoot /var/www', 'DocRoot /var/www/html', flags=re.I) +X >>> changes = f.commit() +X >>> print changes +X 2 +X >>> +X +X Cleanup of the example vhosts.conf: +X >>> # noinspection PyBroadException +X >>> try: +X ... os.unlink('doctest-vhosts.conf') +X ... os.unlink('doctest-vhosts.conf.bak') +X ... os.unlink('doctest-vhosts.conf.new') +X ... except: +X ... pass +X ... +X """ +X +X def __init__(self, filename): +X self.filename = filename +X self.changed = False +X self.edits = [] +X +X def __enter__(self): +X return self +X +X def replace(self, search, sub, *sub_args, **kwargs): +X edit = LineEdit(search, sub, *sub_args, **kwargs) +X self.edits.append(edit) +X +X # noinspection PyUnusedLocal +X def __exit__(self, exc, value, traceback): +X if exc is not None: +X return False # return false results in re-raise +X +X self.commit() +X +X def commit(self): +X changes = 0 +X changed_file = None +X changed_filename = self.filename + '.new' +X try: +X lines = [] +X backup_filename = self.filename + '.bak' +X # noinspection PyUnusedLocal +X stat = None +X with open(self.filename, 'r') as orig: +X stat = os.fstat(orig.fileno()) +X for line in orig: +X changed_line = line +X for edit in self.edits: +X remaining_count = 0 +X if edit.count != 0: +X remaining_count = edit.count - edit.subs +X if remaining_count < 0: +X raise Exception("Made too many edits") +X elif remaining_count == 0: +X continue +X changed_line, subs = edit.pattern.subn( +X edit.sub, line, remaining_count) +X if changed_line != line: +X if changed_file is None: +X logging.debug("Editing file %s" % self.filename) +X logging.debug(" - %s" % line[:-1]) +X logging.debug(" + %s" % changed_line[:-1]) +X changes += subs +X edit.subs += subs +X if changes == 0: # buffer until we find a change +X lines.append(changed_line) +X elif changed_file is None: # found first change, flush buffer +X changed_file = open(changed_filename, 'w') +X if hasattr(os, 'fchmod'): +X os.fchmod(changed_file.fileno(), # can cause OSError which aborts +X stat.st_mode) +X if hasattr(os, 'fchown'): +X os.fchown(changed_file.fileno(), # can cause OSError which aborts +X stat.st_uid, stat.st_gid) +X changed_file.writelines(lines) +X changed_file.write(changed_line) +X del lines # reclaim buffer memory +X else: # already flushed, just write +X changed_file.write(changed_line) +X +X if changes == 0: +X logging.info("No edits need for file %s" % +X self.filename) +X else: +X changed_file.close() +X changed_file = None +X if os.path.exists(backup_filename): # back up the original +X os.unlink(backup_filename) +X shutil.copy(self.filename, backup_filename) +X os.rename(changed_filename, self.filename) # the swap +X logging.info("Edited file %s (%d changes)" % +X (self.filename, changes)) +X finally: +X if changed_file is not None: # failed, clean up +X changed_file.close() +X os.unlink(changed_filename) +X return changes +X +X +if __name__ == "__main__": +X logging.basicConfig(level=logging.DEBUG) +X import doctest +X doctest.testmod() +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/line_edit.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/line_edit.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/line_edit.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/line_edit.py': 'MD5 check failed' + ) << \SHAR_EOF +4d05b8a011ff9c6132a3ca4ff477a161 cloud_scripts/opt/cloud/bin/line_edit.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/line_edit.py'` -ne 7961 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/line_edit.py' is not 7961" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/get_template_version.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/get_template_version.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/get_template_version.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/get_template_version.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/get_template_version.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# As the last command send to router before any rules operation, wait until boot up done +X +__TIMEOUT=240 +__FLAGFILE=/var/cache/cloud/boot_up_done +done=0 +for i in `seq 1 $(($__TIMEOUT * 10))` +do +X if [ -e $__FLAGFILE ] +X then +X done=1 +X break +X fi +X sleep 0.1 +X if [ $((i % 10)) -eq 0 ] +X then +X logger -t cloud "Waiting for VM boot up done for one second" +X fi +done +X +if [ -z $done ] +then +X # declare we failed booting process +X echo "Waited 60 seconds but boot up haven't been completed" +X exit +fi +X +release=`cat /etc/cloudstack-release` +sig=`cat /var/cache/cloud/cloud-scripts-signature` +echo "${release}&${sig}" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/get_template_version.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/get_template_version.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/get_template_version.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/get_template_version.sh': 'MD5 check failed' + ) << \SHAR_EOF +2234ad00c02a6be63cb0f4f876b8960b cloud_scripts/opt/cloud/bin/get_template_version.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/get_template_version.sh'` -ne 1449 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/get_template_version.sh' is not 1449" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/update_config.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/update_config.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/update_config.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/update_config.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/update_config.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,N87)G=BD*:68@87)G8R`A/2`R(&%N9"!A7,N97AI="@Q*0H*(R!&25A- +M12!W92!S:&]U;&0@9V5T('1H:7,@;&]C871I;VX@9G)O;2!A(&-O;F9I9W5R +M871I;VX@8VQA7,N97AI="AR971U +M2!S<&5E9&EN9R!U<"!L;V%D:6YG('1I;65S +M"B`@("!I9B!N;W0@*&]S+F5N=FER;VXN9V5T*"=$149%4E]#3TY&242YJ7,N87)G=ELQ +M72!O2`]($YO +M;F4*"B`@("!F;W(@:S$L('8Q(&EN(&=U97-T;F5T7V1I8W0N:71E7,N87!P96YD*&LQ*0H*("`@(&EF(&YO +M="!E>&ES=&EN9U]K97ES.@H@("`@("`@("2`Z +M.B!296-O;F9I9W5R:6YG(&=U97-T(&YE='=O&ES=&EN9U]K97ES.@H@("`@("`@("2!I;B!E>&ES=&EN9U]K97ES.@H@("`@("`@(&9O&ES=',@/2!4&ES=',Z"B`@("`@("`@("`@(&)R96%K +M"@H@("`@B(I*3H* +M("`@("`@("!S>7,N97AI="@P*0H@("`@;&]G9VEN9RYE2`Z.B!5;F%B;&4@=&\@7,N97AI="@Q +M*0H*(R!)9B!T:&4@9W5E2`Z.B!.;R!N965D('1O('!R;V-E/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/update_config.py': 'MD5 check failed' + ) << \SHAR_EOF +a2062b2b010940ea783d8256b807c488 cloud_scripts/opt/cloud/bin/update_config.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/update_config.py'` -ne 5136 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/update_config.py' is not 5136" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/edithosts.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/edithosts.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/edithosts.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/edithosts.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/edithosts.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +X +# edithosts.sh -- edit the dhcphosts file on the routing domain +X +usage() { +X printf "Usage: %s: -m -4 -6 -h -d -n -s -u [-N]\n" $(basename $0) >&2 +} +X +mac= +ipv4= +ipv6= +host= +dflt= +dns= +routes= +duid= +nondefault= +X +while getopts 'm:4:h:d:n:s:6:u:N' OPTION +do +X case $OPTION in +X m) mac="$OPTARG" +X ;; +X 4) ipv4="$OPTARG" +X ;; +X 6) ipv6="$OPTARG" +X ;; +X u) duid="$OPTARG" +X ;; +X h) host="$OPTARG" +X ;; +X d) dflt="$OPTARG" +X ;; +X n) dns="$OPTARG" +X ;; +X s) routes="$OPTARG" +X ;; +X N) nondefault=1 +X ;; +X ?) usage +X exit 2 +X ;; +X esac +done +X +DHCP_HOSTS=/etc/dhcphosts.txt +DHCP_OPTS=/etc/dhcpopts.txt +DHCP_LEASES=/var/lib/misc/dnsmasq.leases +HOSTS=/etc/hosts +X +source /root/func.sh +X +lock="biglock" +#default timeout value is 30 mins as DhcpEntryCommand is not synchronized on agent side any more, +#and multiple commands can be sent to the same VR at a time +locked=$(getLockFile $lock 1800) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +grep "redundant_router=1" /var/cache/cloud/cmdline > /dev/null +no_redundant=$? +X +dnsmasq_managed_lease=`cat /var/cache/cloud/dnsmasq_managed_lease` +X +wait_for_dnsmasq () { +X local _pid=$(pidof dnsmasq) +X for i in 0 1 2 3 4 5 6 7 8 9 10 +X do +X sleep 1 +X _pid=$(pidof dnsmasq) +X [ "$_pid" != "" ] && break; +X done +X [ "$_pid" != "" ] && return 0; +X logger -t cloud "edithosts: timed out waiting for dnsmasq to start" +X return 1 +} +X +if [ $dnsmasq_managed_lease ] +then +X #release previous dhcp lease if present +X logger -t cloud "edithosts: releasing $ipv4" +X dhcp_release $(ip route get "$ipv4/32" | grep " dev " | sed -e "s/^.* dev \([^ ]*\) .*$/\1/g") $ipv4 $(grep "$ipv4 " $DHCP_LEASES | awk '{print $2}') > /dev/null 2>&1 +X logger -t cloud "edithosts: released $ipv4" +fi +X +logger -t cloud "edithosts: update $mac $ipv4 $ipv6 $host to hosts" +X +[ ! -f $DHCP_HOSTS ] && touch $DHCP_HOSTS +[ ! -f $DHCP_OPTS ] && touch $DHCP_OPTS +[ ! -f $DHCP_LEASES ] && touch $DHCP_LEASES +X +#delete any previous entries from the dhcp hosts file +sed -i /$mac/d $DHCP_HOSTS +if [ $ipv4 ] +then +X sed -i /$ipv4,/d $DHCP_HOSTS +fi +if [ $ipv6 ] +then +X #searching with [$ipv6], matching other ip so using $ipv6], +X sed -i /$ipv6],/d $DHCP_HOSTS +fi +# don't want to do this in the future, we can have same VM with multiple nics/entries +sed -i /$host,/d $DHCP_HOSTS +X +#put in the new entry +if [ $ipv4 ] +then +X echo "$mac,$ipv4,$host,infinite" >>$DHCP_HOSTS +fi +if [ $ipv6 ] +then +X if [ $nondefault ] +X then +X echo "id:$duid,set:nondefault6,[$ipv6],$host,infinite" >>$DHCP_HOSTS +X else +X echo "id:$duid,[$ipv6],$host,infinite" >>$DHCP_HOSTS +X fi +fi +X +if [ $dnsmasq_managed_lease -eq 0 ] +then +X #delete leases to supplied mac and ip addresses +X if [ $ipv4 ] +X then +X sed -i /$mac/d $DHCP_LEASES +X sed -i /"$ipv4 "/d $DHCP_LEASES +X fi +X if [ $ipv6 ] +X then +X sed -i /$duid/d $DHCP_LEASES +X sed -i /"$ipv6 "/d $DHCP_LEASES +X fi +X sed -i /"$host "/d $DHCP_LEASES +X +X #put in the new entry +X if [ $ipv4 ] +X then +X echo "0 $mac $ipv4 $host *" >> $DHCP_LEASES +X fi +X if [ $ipv6 ] +X then +X echo "0 $duid $ipv6 $host *" >> $DHCP_LEASES +X fi +fi +X +#edit hosts file as well +if [ $ipv4 ] +then +X sed -i /"$ipv4 "/d $HOSTS +fi +if [ $ipv6 ] +then +X sed -i /"$ipv6 "/d $HOSTS +fi +sed -i /" $host$"/d $HOSTS +if [ $ipv4 ] +then +X echo "$ipv4 $host" >> $HOSTS +fi +if [ $ipv6 ] +then +X echo "$ipv6 $host" >> $HOSTS +fi +X +if [ "$dflt" != "" -a "$ipv4" != "" ] +then +X #make sure dnsmasq looks into options file +X sed -i /dhcp-optsfile/d /etc/dnsmasq.conf +X echo "dhcp-optsfile=$DHCP_OPTS" >> /etc/dnsmasq.conf +X +X tag=$(echo $ipv4 | tr '.' '_') +X sed -i /$tag,/d $DHCP_OPTS +X if [ "$dflt" == "0.0.0.0" ] +X then +X logger -t cloud "$0: unset default router for $ipv4" +X logger -t cloud "$0: unset dns server for $ipv4" +X echo "$tag,3" >> $DHCP_OPTS +X echo "$tag,6" >> $DHCP_OPTS +X echo "$tag,15" >> $DHCP_OPTS +X fi +X [ "$routes" != "" ] && echo "$tag,121,$routes" >> $DHCP_OPTS +X #delete entry we just put in because we need a tag +X sed -i /$ipv4,/d $DHCP_HOSTS +X #put it back with a tag +X echo "$mac,set:$tag,$ipv4,$host,infinite" >>$DHCP_HOSTS +fi +X +# make dnsmasq re-read files +pid=$(pidof dnsmasq) +if [ "$pid" != "" ] +then +X # use SIGHUP to avoid service outage if dhcp_release is available. +X if [ $dnsmasq_managed_lease ] +X then +X kill -HUP $pid +X else +X systemctl restart dnsmasq +X fi +else +X if [ $no_redundant -eq 1 ] +X then +X wait_for_dnsmasq +X else +X logger -t cloud "edithosts: skip wait dnsmasq due to redundant virtual router" +X fi +fi +X +ret=$? +unlock_exit $ret $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/edithosts.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/edithosts.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/edithosts.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/edithosts.sh': 'MD5 check failed' + ) << \SHAR_EOF +68e47d6a7efaacefbbaebf8b4e7408c3 cloud_scripts/opt/cloud/bin/edithosts.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/edithosts.sh'` -ne 5502 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/edithosts.sh' is not 5502" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/diagnostics.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/diagnostics.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/diagnostics.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/diagnostics.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/diagnostics.py' && +#!/usr/bin/env python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import shlex +import subprocess +import sys +X +X +def run_cmd(command): +X if command is not None: +X try: +X p = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE) +X stdout, stderr = p.communicate() +X return_code = p.returncode +X +X except OSError as e: +X stdout = "Check your command type" +X stderr = "Exception occurred: %s" % e +X return_code = 1 +X +X finally: +X print('%s&&' % stdout.strip()) +X print('%s&&' % stderr.strip()) +X print('%s' % return_code) +X +X +def get_command(): +X arguments = sys.argv +X cmd = " ".join(arguments[1:]) +X cmd_type = sys.argv[1] +X +X if cmd_type == 'ping': +X if '-c' in arguments: +X return cmd +X else: +X return cmd + " -c 4" +X +X elif cmd_type == 'traceroute': +X if '-m' in arguments: +X return cmd +X else: +X return cmd + " -m 20" +X +X elif cmd_type == 'arping': +X if '-c' in arguments: +X return cmd +X else: +X return cmd + " -c 4" +X +X else: +X return None +X +X +if __name__ == "__main__": +X command = get_command() +X run_cmd(command) +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/diagnostics.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/diagnostics.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/diagnostics.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/diagnostics.py': 'MD5 check failed' + ) << \SHAR_EOF +91a837e5bcafee663cbfb8532574405a cloud_scripts/opt/cloud/bin/diagnostics.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/diagnostics.py'` -ne 2012 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/diagnostics.py' is not 2012" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_monitorservice.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_monitorservice.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_monitorservice.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_monitorservice.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py': 'MD5 check failed' + ) << \SHAR_EOF +1121a063f2dbcfc1bdc426ceba249184 cloud_scripts/opt/cloud/bin/cs_monitorservice.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py'` -ne 1541 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py' is not 1541" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/vpn_l2tp.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpn_l2tp.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpn_l2tp.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +X +X +#set -x +usage() { +X printf "Usage:\n" +X printf "Create VPN : %s -c -r -l -p -s -i \n" $(basename $0) +X printf "Delete VPN : %s -d -l -s -D -C < local cidr> \n" $(basename $0) +X printf "Add VPN User : %s -u \n" $(basename $0) +X printf "Remote VPN User: %s -U /dev/null +X then +X is_vpc=true +X fi +X +X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 500 -j ACCEPT +X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 4500 -j ACCEPT +X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 1701 -j ACCEPT +X sudo iptables $op INPUT -i $dev -p ah -j ACCEPT +X sudo iptables $op INPUT -i $dev -p esp -j ACCEPT +X if $is_vpc +X then +X # Need to apply the following ACL rules as well. +X if sudo iptables -N VPN_FORWARD &> /dev/null +X then +X sudo iptables -I FORWARD -i ppp+ -j VPN_FORWARD +X sudo iptables -I FORWARD -o ppp+ -j VPN_FORWARD +X sudo iptables -A VPN_FORWARD -j DROP +X fi +X sudo iptables $op VPN_FORWARD -i ppp+ -o ppp+ -j RETURN +X sudo iptables $op VPN_FORWARD -i ppp+ -d $cidr -j RETURN +X sudo iptables $op VPN_FORWARD -s $cidr -o ppp+ -j RETURN +X else +X sudo iptables $op FORWARD -i ppp+ -d $cidr -j ACCEPT +X sudo iptables $op FORWARD -s $cidr -o ppp+ -j ACCEPT +X sudo iptables $op FORWARD -i ppp+ -o ppp+ -j ACCEPT +X fi +X sudo iptables $op INPUT -i ppp+ -m udp -p udp --dport 53 -j ACCEPT +X sudo iptables $op INPUT -i ppp+ -m tcp -p tcp --dport 53 -j ACCEPT +X sudo iptables -t nat $op PREROUTING -i ppp+ -p tcp -m tcp --dport 53 -j DNAT --to-destination $local_ip +X sudo iptables -t nat $op PREROUTING -i ppp+ -p udp -m udp --dport 53 -j DNAT --to-destination $local_ip +X +X if $is_vpc +X then +X return +X fi +X +X if sudo iptables -t mangle -N VPN_$public_ip &> /dev/null +X then +X logger -t cloud "$(basename $0): created VPN chain in PREROUTING mangle" +X sudo iptables -t mangle -I PREROUTING -d $public_ip -j VPN_$public_ip +X sudo iptables -t mangle -A VPN_$public_ip -j RETURN +X fi +X op2="-D" +X [ "$op" == "-A" ] && op2="-I" +X sudo iptables -t mangle $op VPN_$public_ip -p ah -j ACCEPT +X sudo iptables -t mangle $op VPN_$public_ip -p esp -j ACCEPT +} +X +start_ipsec() { +X systemctl is-active ipsec > /dev/null +X if [ $? -ne 0 ] +X then +X systemctl start ipsec > /dev/null +X #Wait until ipsec started, 5 seconds at most +X for i in {1..5} +X do +X logger -t cloud "$(basename $0): waiting ipsec start..." +X systemctl is-active ipsec > /dev/null +X result=$? +X if [ $result -eq 0 ] +X then +X break +X fi +X sleep 1 +X done +X fi +X systemctl is-active ipsec > /dev/null +X return $? +} +X +ipsec_server() { +X local op=$1 +X case $op in +X "start") start_ipsec +X sudo systemctl start xl2tpd +X ;; +X "stop") sudo systemctl stop xl2tpd +X ;; +X "restart") start_ipsec +X sudo ipsec auto --rereadall +X systemctl stop xl2tpd +X systemctl start xl2tpd +X ;; +X esac +} +X +create_l2tp_ipsec_vpn_server() { +X local ipsec_psk=$1 +X local public_ip=$2 +X local client_range=$3 +X local local_ip=$4 +X +X sed -i -e "s/left=.*$/left=$public_ip/" /etc/ipsec.d/l2tp.conf +X echo "$public_ip %any : PSK \"$ipsec_psk\"" > /etc/ipsec.d/ipsec.any.secrets +X sed -i -e "s/^ip range = .*$/ip range = $client_range/" /etc/xl2tpd/xl2tpd.conf +X sed -i -e "s/^local ip = .*$/local ip = $local_ip/" /etc/xl2tpd/xl2tpd.conf +X +X sed -i -e "s/^ms-dns.*$/ms-dns $local_ip/" /etc/ppp/options.xl2tpd +X +X iptables_ "-D" $public_ip +X iptables_ "-I" $public_ip +X +X ipsec_server "restart" +X +X ipsec auto --rereadsecrets +X ipsec auto --replace L2TP-PSK +} +X +destroy_l2tp_ipsec_vpn_server() { +X local public_ip=$1 +X +X ipsec auto --down L2TP-PSK +X +X iptables_ "-D" $public_ip +X +X ipsec_server "stop" +} +X +remove_l2tp_ipsec_user() { +X local u=$1 +X sed -i -e "/^$u .*$/d" /etc/ppp/chap-secrets +X if [ -x /usr/bin/tdbdump ]; then +X pid=$(tdbdump /var/run/pppd2.tdb | grep -w $u | awk -F';' '{print $4}' | awk -F= '{print $2}') +X [ "$pid" != "" ] && kill -9 $pid +X fi +X return 0 +} +X +add_l2tp_ipsec_user() { +X local u=$1 +X local passwd=$2 +X +X uptodate=$(grep "^$u \* \"$passwd\" \*$" /etc/ppp/chap-secrets) +X if [ "$uptodate" == "" ] +X then +X remove_l2tp_ipsec_user $u +X echo "$u * \"$passwd\" *" >> /etc/ppp/chap-secrets +X fi +} +X +rflag= +pflag= +lflag= +sflag= +create= +destroy= +useradd= +userdel= +dev= +cidr= +X +while getopts 'cdl:p:r:s:u:U:i:C:' OPTION +do +X case $OPTION in +X c) create=1 +X ;; +X d) destroy=1 +X ;; +X u) useradd=1 +X user_pwd="$OPTARG" +X ;; +X U) userdel=1 +X user="$OPTARG" +X ;; +X r) rflag=1 +X client_range="$OPTARG" +X ;; +X p) pflag=1 +X ipsec_psk="$OPTARG" +X ;; +X l) lflag=1 +X local_ip="$OPTARG" +X ;; +X s) sflag=1 +X server_ip="$OPTARG" +X ;; +X i) dev="$OPTARG" +X ;; +X C) cidr="$OPTARG" +X ;; +X ?) usage +X exit 2 +X ;; +X esac +done +X +if [ "$dev" == "" ] +then +X dev="eth2" +fi +X +if [ "$cidr" == "" ] +then +X cidr=$(get_intf_ip "eth0") +fi +X +[ "$create$destroy" == "11" ] || [ "$create$destroy$useradd$userdel" == "" ] && usage && exit 2 +[ "$create" == "1" ] && [ "$lflag$pflag$rflag$sflag" != "1111" ] && usage && exit 2 +X +if [ "$create" == "1" ]; then +X create_l2tp_ipsec_vpn_server $ipsec_psk $server_ip $client_range $local_ip +X exit $? +fi +X +if [ "$destroy" == "1" ]; then +X destroy_l2tp_ipsec_vpn_server $server_ip +X exit $? +fi +X +if [ "$useradd" == "1" ]; then +X u=$(echo $user_pwd | awk -F',' '{print $1}') +X pwd=$(echo $user_pwd | awk -F',' '{print $2}') +X add_l2tp_ipsec_user $u $pwd +X exit $? +fi +if [ "$userdel" == "1" ]; then +X remove_l2tp_ipsec_user $user +X exit $? +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpn_l2tp.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh': 'MD5 check failed' + ) << \SHAR_EOF +79e41044b43cc49c6b11859534bc454d cloud_scripts/opt/cloud/bin/vpn_l2tp.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh'` -ne 6986 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' is not 6986" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_guestnetwork.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_guestnetwork.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_guestnetwork.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +keys = ['eth1', 'eth2', 'eth3', 'eth4', 'eth5', 'eth6', 'eth7', 'eth8', 'eth9'] +X +X +def merge(dbag, gn): +X device = gn['device'] +X +X if not gn['add'] and device in dbag: +X +X if dbag[device]: +X device_to_die = dbag[device][0] +X try: +X dbag[device].remove(device_to_die) +X except ValueError, e: +X print "[WARN] cs_guestnetwork.py :: Error occurred removing item from databag. => %s" % device_to_die +X del(dbag[device]) +X else: +X del(dbag[device]) +X +X else: +X dbag.setdefault(device, []).append(gn) +X +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_guestnetwork.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py': 'MD5 check failed' + ) << \SHAR_EOF +599105da1bdfaced1f2c8078d3fbed19 cloud_scripts/opt/cloud/bin/cs_guestnetwork.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py'` -ne 1401 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' is not 1401" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_vmdata.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vmdata.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vmdata.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, metadata): +X dbag[metadata["vm_ip_address"]] = metadata["vm_metadata"] +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_vmdata.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vmdata.py': 'MD5 check failed' + ) << \SHAR_EOF +3ee2451cb48927d361f05bb5fe3df4ce cloud_scripts/opt/cloud/bin/cs_vmdata.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vmdata.py'` -ne 892 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' is not 892" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/dnsmasq.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/dnsmasq.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/dnsmasq.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +usage() { +X printf "Usage: %s: \n" $(basename $0) >&2 +} +X +source /root/func.sh +X +lock="biglock" +locked=$(getLockFile $lock) +if [ "$locked" != "1" ] +then +X exit 1 +fi +X +#set -x +#backup the old config file +DHCP_CONFIG=/etc/dnsmasq.d/multiple_ranges.conf +DHCP_CONFIG_BAK=/etc/dnsmasq.d/multiple_ranges.conf.bak +DHCP_CONFIG_MAIN=/etc/dnsmasq.conf +DHCP_CONFIG_MAIN_BAK=/etc/dnsmasq.conf.bak +DHCP_FAILURE_CONFIG=/etc/multiple_ranges.conf.failure +DHCP_FAILURE_CONFIG_MAIN=/etc/dnsmasq.conf.failure +CMDLINE=$(cat /var/cache/cloud/cmdline | tr '\n' ' ') +X +#take a backup copy of the dnsmasq file. +cp "$DHCP_CONFIG_MAIN" "$DHCP_CONFIG_MAIN_BAK" +cp "$DHCP_CONFIG" "$DHCP_CONFIG_BAK" +X +#empty the config file +echo > $DHCP_CONFIG +X +var="$1" +dhcp_range="" +dhcp_gateway="" +dhcp_netmask="" +dns_option="" +dns_servers="" +count=0 +X +X +# fetching the dns Ips from the command line. +dns1=$(echo "$CMDLINE" | grep -o " dns1=[[:digit:]].* " | sed -e 's/dns1=//' | awk '{print $1}') +dns2=$(echo "$CMDLINE" | grep -o " dns2=[[:digit:]].* " | sed -e 's/dns2=//' | awk '{print $1}') +X +dns_servers="${dns1}" +if [ -n "$dns2" ] +then +dns_servers="${dns1},${dns2}" +fi +X +X +# check if useextdns is true +use_ext_dns=$(echo "$CMDLINE" | grep -o "useextdns=true") +while [ -n "$var" ] +do +X var1=$(echo $var | cut -f1 -d "-") +X routerip=$( echo $var1 | cut -f1 -d ":" ) +X gateway=$(echo $var1 | cut -f2 -d ":") +X netmask=$(echo $var1 | cut -f3 -d ":") +X start_ip_of_subnet=$(echo $var1 | cut -f4 -d ":") +X dhcp_range="${dhcp_range}"'dhcp-range=set:range'$count","$start_ip_of_subnet",static \n" +X dhcp_gateway="${dhcp_gateway}"'dhcp-option=tag:range'$count",3,"$gateway" \n" +X dhcp_netmask="${dhcp_netmask}"'dhcp-option=tag:range'$count",1,"$netmask" \n" +X if [ -n "$use_ext_dns" ] +X then +X dns_option="${dns_option}"'dhcp-option=tag:range'$count",6,"$dns_servers" \n" +X else +X dns_option="${dns_option}"'dhcp-option=tag:range'$count",6,$routerip"","$dns_servers" \n" +X fi +X var=$( echo $var | sed "s/${var1}-//" ) +X count=$[$count+1] +done +X +#logging the configuration being removed. +log="" +log="${log}"`grep "^dhcp-option=6" "$DHCP_CONFIG_MAIN"`"\n" +log="${log}"`grep "^dhcp-option=option:router" "$DHCP_CONFIG_MAIN"`"\n" +log="${log}"`grep "^dhcp-range=" "$DHCP_CONFIG_MAIN"`"\n" +X +if [ "$log" != '\n\n\n' ] +then +X #Cleaning the existing dhcp confgiuration +X logger -t cloud "dnsmasq.sh: remvoing the primaryip confg from dnsmasq.conf and adding it to /etc/dnsmaq.d/multiple_ranges.conf" +X logger -t cloud "dnsmasq.sh: config removed from dnsmasq.conf is $log" +X sed -i -e '/dhcp-option=6/d' "$DHCP_CONFIG_MAIN" +X sed -i -e '/dhcp-option=option:router/d' "$DHCP_CONFIG_MAIN" +X sed -i -e '/^dhcp-range=/d' "$DHCP_CONFIG_MAIN" +fi +X +#wrting the new config into the config file. +echo -e "$dhcp_range" >> "$DHCP_CONFIG" +echo -e "$dhcp_gateway" >> "$DHCP_CONFIG" +echo -e "$dhcp_netmask" >> "$DHCP_CONFIG" +echo -e "$dns_option" >> "$DHCP_CONFIG" +X +X +#restart the dnsmasq +systemctl restart dnsmasq +result=$? +if [ "$result" -ne "0" ] +then +X logger -t cloud "dnsmasq.sh: could not configure dnsmasq" +X logger -t cloud "dnsmasq.sh: reverting to the old config" +X logger -t cloud "dnsmasq.sh: copying the failure config to `$DHCP_FAILURE_CONFIG` and `$DHCP_FAILURE_CONFIG_MAIN`" +X cp "$DHCP_CONFIG" "$DHCP_FAILURE_CONFIG" +X cp "$DHCP_CONFIG_MAIN" "$DHCP_FAILURE_CONFIG_MAIN" +X cp "$DHCP_CONFIG_BAK" "$DHCP_CONFIG" +X cp "$DHCP_CONFIG_MAIN_BAK" "$DHCP_CONFIG_MAIN" +X systemctl restart dnsmasq +X unlock_exit $result $lock $locked +fi +rm "$DHCP_CONFIG_BAK" +rm "$DHCP_CONFIG_MAIN_BAK" +unlock_exit $result $lock $locked +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/dnsmasq.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/dnsmasq.sh': 'MD5 check failed' + ) << \SHAR_EOF +d603da3043a61bea911e21fb4da8ded0 cloud_scripts/opt/cloud/bin/dnsmasq.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/dnsmasq.sh'` -ne 4359 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' is not 4359" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_dhcp.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_dhcp.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_dhcp.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_dhcp.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/opt/cloud/bin/cs_dhcp.py +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2P@96YT2!N;W0@ +M:6X@7,Z"B`@("`@("`@("`@(')E;6]V95]K97ES+F%D9"AK +M97DI"@H@("`@("`@(&9O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_dhcp.py': 'MD5 check failed' + ) << \SHAR_EOF +9b17e95a8fcb1cf185c9e74cc6ddecca cloud_scripts/opt/cloud/bin/cs_dhcp.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_dhcp.py'` -ne 1533 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_dhcp.py' is not 1533" + fi +fi +# ============= cloud_scripts/opt/cloud/bin/cs_cmdline.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' +then +${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_cmdline.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_cmdline.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +def merge(dbag, cmdline): +X if 'redundant_router' in cmdline['cmd_line']: +X cmdline['cmd_line']['redundant_router'] = "true" +X else: +X cmdline['cmd_line']['redundant_router'] = "false" +X dbag['config'] = cmdline['cmd_line'] +X return dbag +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_cmdline.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_cmdline.py': 'MD5 check failed' + ) << \SHAR_EOF +a6290582c86832c4c94985580ceda8e5 cloud_scripts/opt/cloud/bin/cs_cmdline.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_cmdline.py'` -ne 1045 && \ + ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' is not 1045" + fi +fi +# ============= cloud_scripts/root/reconfigLB.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/reconfigLB.sh' +then +${echo} "x - SKIPPING cloud_scripts/root/reconfigLB.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/reconfigLB.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/reconfigLB.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +ret=0 +X +new_config=$1 +X +# save previous state +X mv /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy.cfg.old +X +X mv $new_config /etc/haproxy/haproxy.cfg +X if haproxy -p /var/run/haproxy.pid -f /etc/haproxy/haproxy.cfg -sf $(cat /var/run/haproxy.pid); then +X logger -t cloud "New haproxy instance successfully loaded, stopping previous one." +X ret=0 +X else +X logger -t cloud "New instance failed to start, resuming previous one." +X mv /etc/haproxy/haproxy.cfg $new_config +X mv /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg +X haproxy -p /var/run/haproxy.pid -f /etc/haproxy/haproxy.cfg -sf $(cat /var/run/haproxy.pid) +X ret=1 +X fi +X +exit $ret +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/reconfigLB.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/root/reconfigLB.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/reconfigLB.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/reconfigLB.sh': 'MD5 check failed' + ) << \SHAR_EOF +d73e1491560b810ac47d1aaeb2b466ba cloud_scripts/root/reconfigLB.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/reconfigLB.sh'` -ne 1454 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/reconfigLB.sh' is not 1454" + fi +fi +# ============= cloud_scripts/root/monitorServices.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/monitorServices.py' +then +${echo} "x - SKIPPING cloud_scripts/root/monitorServices.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/monitorServices.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/monitorServices.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,L('!A=&@*9G)O;2!H96%L=&A?8VAE +M8VMS+G5T:6QI='D@:6UP;W)T(&=E=$AE86QT:$-H96-KWT* +M("`@('!A2`K)UTG*R(@(B`K +M("=;)RMP2LG72<@*R`B("(@*R!M +M2!O;F4@<&ED(&]R +M(&YO=`H@("`@:68@97AI=%-T871U6EN9R!F97<@;6]R92!T:6UEPH@("`@("`@("`@("`@("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EWT@(U-K:7`@WT*("`@(&9A:6QI;F=#:&5C:W,@/2!;70H@ +M("`@:68@8VAE8VM4>7!E(#T](")B87-I8R(Z"B`@("`@("`@;6]N:71297-U +M;'0L(&9A:6QI;F=#:&5C:W,@/2!M;VYI=%!R;V-E&-L=61E(#T@ +M:&-?9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K&-L=61E +M9%]H96%L=&A?8VAE8VMS(B!I;B!H8U]D871A(&5L7!E*0H@("`@("`@("`@("`@("`@:68@;&5N*')E="D@/3T@,#H*("`@("`@ +M("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@("`@("`@:68@(G-U +M8V-E7,N87)G=BD@/3T@,CH*("`@("`@("!I9B!S>7,N87)G=ELQ72`]/2`B +M861V86YC960B.@H@("`@("`@("`@("!M86EN*")A9'9A;F-E9"(I"B`@("`@ +M("`@96QI9B!S>7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@("`@("!M +M86EN*")B87-I8R(I"B`@("`@("`@96QS93H*("`@("`@("`@("`@<')I;G1D +M*")%7!E(&]F('1E7,N87)G=BD* +M("`@(&5L/dev/null 2>&1 || ${echo} 'cloud_scripts/root/monitorServices.py': 'MD5 check failed' + ) << \SHAR_EOF +d46009a10f68b7f2c57e43e215cba41c cloud_scripts/root/monitorServices.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/monitorServices.py'` -ne 12747 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/monitorServices.py' is not 12747" + fi +fi +# ============= cloud_scripts/root/health_checks/iptables_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/iptables_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/iptables_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/iptables_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/iptables_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W'!E8W1E9"`](%M="B`@("`@("`@9&5S=$EP(#T@<&]R=$9O'0L('-R8U!O2!I;B!I<%1A8FQE4QI'!E8W1E9#H*("`@("`@("`@("`@("`@("`@ +M("!I9B!I<%1A8FQE16YT'!E8W1E9$5N=')Y*2`]/2`M,3H* +M("`@("`@("`@("`@("`@("`@("`@("`@9F]U;F1!;&P@/2!&86QS90H@("`@ +M("`@("`@("`@("`@("`@("`@("!B4QI +M/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/iptables_check.py': 'MD5 check failed' + ) << \SHAR_EOF +36d30e9b9ff7842db6472b1f063bb076 cloud_scripts/root/health_checks/iptables_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/iptables_check.py'` -ne 3349 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/iptables_check.py' is not 3349" + fi +fi +# ============= cloud_scripts/root/health_checks/memory_usage_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/memory_usage_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/memory_usage_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/memory_usage_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/memory_usage_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W$UE;6]R>55S86=E(ETI"B`@("!C;60@/2`B9G)E92!\(&%W:R`G1DY2(#T] +M(#(@>R!P2!5$UE;6]R>55S86=E*2`K("(E(@H@("`@("`@("`@("!E>&ET*#$I"B`@ +M("`@("`@<')I;G0@(DUE;6]R>2!5/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/memory_usage_check.py': 'MD5 check failed' + ) << \SHAR_EOF +1d0f74928584f4e36af8d1d726fac4a4 cloud_scripts/root/health_checks/memory_usage_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/memory_usage_check.py'` -ne 1966 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/memory_usage_check.py' is not 1966" + fi +fi +# ============= cloud_scripts/root/health_checks/haproxy_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/haproxy_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/haproxy_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/haproxy_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/haproxy_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&-O;FXH +M:&%P41A=&$L(&AA0V9G4V5C=&EO;G,I.@H@("`@:68@(FUA>&-O;FXB +M(&EN(&AA<')O>'E$871A(&%N9"`B;6%X8V]N;B(@:6X@:&%#9F=396-T:6]N +M41A=&%;(FUA>&-O;FXB +M72`A/2!H84-F9U-E8W1I;VYS6R)G;&]B86PB75LB;6%X8V]N;B)=6S!=+G-T +M'E$871A +M+"!H84-F9U-E8W1I;VYS*3H*("`@(&-O41A=&$Z"B`@("`@("`@'!E8W1E9"`Z("(@*R!L8E-E8ULB86QG +M;W)I=&AM(ET@*R!<"B`@("`@("`@("`@("`@("`@("`@("`@("`@(B!B=70@ +M9F]U;F0@(B`K(&-F9U-E8W1I;VY;(F)A;&%N8V4B75LP72`K(")<;B(*("`@ +M("`@("`@("`@("`@("`@("!C;W)R96-T(#T@1F%L'!E8W1E9%-E'!E8W1E9%-E"!C;VX@86YD(&5A8V@@;&]A +M9"!B86QA;F-I;F<@41A=&$@/2!G971(96%L=&A#:&5C:W-$ +M871A*")H87!R;WAY1&%T82(I"B`@("!I9B!H87!R;WAY1&%T82!I'DN8V9G +M(BP@)W(G*2!A2]H87!R +M;WAY+F-F9R(*("`@("`@("!E>&ET*#$I"@H@("`@:&%#9F=396-T:6]NWT*("`@("`@("`@("`@8V]N=&EN=64*"B`@("`@("`@ +M:68@8W5R$-O;FX@ +M/2!C:&5C:TUA>&-O;FXH:&%P41A=&%;,%TL(&AA0V9G4V5C=&EO;G,I +M"B`@("!C:&5C:TQB4G5L97,@/2!C:&5C:TQO861"86QA;F-E*&AA<')O>'E$ +M871A+"!H84-F9U-E8W1I;VYS*0H*("`@(&EF(&-H96-K36%X0V]N;B!A;F0@ +M8VAE8VM,8E)U;&5S.@H@("`@("`@('!R:6YT(")!;&P@8VAE8VMS('!A&ET*#$I"@H* +M:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH*("`@(&EF(&QE;BAS>7,N87)G +M=BD@/3T@,B!A;F0@/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/haproxy_check.py': 'MD5 check failed' + ) << \SHAR_EOF +a6a55e4accdf61929c52391235dea744 cloud_scripts/root/health_checks/haproxy_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/haproxy_check.py'` -ne 5274 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/haproxy_check.py' is not 5274" + fi +fi +# ============= cloud_scripts/root/health_checks/router_version_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/router_version_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/router_version_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/router_version_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/router_version_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O +M'!E8W1E9#H@(B`K(%P*("`@("`@ +M("`@("`@("`@("`@97AP96-T960@*R`B+"!F;W5N9#H@(B`K(&9O=6YD"B`@ +M("`@("`@("`@('1E;7!L871E5F5R'!E8W1E +M9"`](&1A=&%;(G-C'!E8W1E9#H@(B`K(%P*("`@("`@ +M("`@("`@("`@("`@97AP96-T960@*R`B+"!F;W5N9#H@(B`K(&9O=6YD"B`@ +M("`@("`@("`@('-C/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/router_version_check.py': 'MD5 check failed' + ) << \SHAR_EOF +408778f28fd8559df294e18256af1f0b cloud_scripts/root/health_checks/router_version_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/router_version_check.py'` -ne 2773 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/router_version_check.py' is not 2773" + fi +fi +# ============= cloud_scripts/root/health_checks/utility/sharedFunctions.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/utility/sharedFunctions.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/utility/sharedFunctions.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import json +X +X +def getHealthChecksData(additionalDataKey=None): +X with open('/root/health_checks_data.json', 'r') as hc_data_file: +X hc_data = json.load(hc_data_file) +X +X # If no specific key is requested return all the data as JSON +X if additionalDataKey is None: +X return hc_data +X +X if additionalDataKey not in hc_data["health_checks_config"]: +X return None +X +X data = hc_data["health_checks_config"][additionalDataKey].strip().split(";") +X addData = [] +X for line in data: +X line = line.strip() +X if len(line) == 0: +X continue +X entries = line.split(',') +X d = {} +X for entry in entries: +X entry = entry.strip() +X if len(entry) == 0: +X continue +X keyVal = entry.split("=") +X if len(keyVal) == 2: +X d[keyVal[0].strip()] = keyVal[1].strip() +X if len(d) > 0: +X addData.append(d) +X +X return addData +X +X +def formatPort(portStart, portEnd, delim="-"): +X return portStart if portStart == portEnd else portStart + delim + portEnd +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/health_checks/utility/sharedFunctions.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/utility/sharedFunctions.py': 'MD5 check failed' + ) << \SHAR_EOF +4fa10a419db9715b34c7037bce5e6fe8 cloud_scripts/root/health_checks/utility/sharedFunctions.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/utility/sharedFunctions.py'` -ne 1865 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' is not 1865" + fi +fi +# ============= cloud_scripts/root/health_checks/utility/__init__.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/utility/__init__.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/utility/__init__.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/utility/__init__.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/utility/__init__.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/utility/__init__.py': 'MD5 check failed' + ) << \SHAR_EOF +ea0b11e040da094dd4f5628b467d5d88 cloud_scripts/root/health_checks/utility/__init__.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/utility/__init__.py'` -ne 864 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/utility/__init__.py' is not 864" + fi +fi +# ============= cloud_scripts/root/health_checks/disk_space_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/disk_space_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/disk_space_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/disk_space_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/disk_space_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O +MWT*("`@(&EF(&5N=')I97,@:7,@;F]T($YO;F4@86YD +M(&QE;BAE;G1R:65S*2`]/2`Q.@H@("`@("`@(&1A=&$@/2!E;G1R:65S6S!= +M"@H@("`@:68@(FUI;D1I/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/disk_space_check.py': 'MD5 check failed' + ) << \SHAR_EOF +9bbb07b130e3946c35263c2e970b59ba cloud_scripts/root/health_checks/disk_space_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/disk_space_check.py'` -ne 1626 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/disk_space_check.py' is not 1626" + fi +fi +# ============= cloud_scripts/root/health_checks/gateways_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/gateways_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/gateways_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/gateways_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/gateways_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,B*0H@("`@:68@9W=S(&ES($YO;F4@86YD(&QE;BAG=W,I(#T](#`Z"B`@ +M("`@("`@<')I;G0@(DYO(&=A=&5W87ES(&1A=&$@879A:6QA8FQE+"!S:VEP +M<&EN9R(*("`@("`@("!E>&ET*#`I"@H@("`@=6YR96%C:&%B;&5'871E5V%Y +M7,N87!P +M96YD*&=W*0H*("`@(&EF(&QE;BAU;G)E86-H86)L94=A=&5787ES*2`]/2`P +M.@H@("`@("`@('!R:6YT(")!;&P@(B`K('-T7,* +M("`@("`@("!E>&ET*#$I"@H*:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH* +M("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A;F0@/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/gateways_check.py': 'MD5 check failed' + ) << \SHAR_EOF +d1715f65dfe24b77c489d24fc1717bc9 cloud_scripts/root/health_checks/gateways_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/gateways_check.py'` -ne 1869 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/gateways_check.py' is not 1869" + fi +fi +# ============= cloud_scripts/root/health_checks/__init__.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/__init__.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/__init__.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/__init__.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/health_checks/__init__.py' && +#!/usr/bin/python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# Needed to expose utility as package outside for monitorServices.py. +# This directory should only contain executables for health checks. +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/__init__.py' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/root/health_checks/__init__.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/health_checks/__init__.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/__init__.py': 'MD5 check failed' + ) << \SHAR_EOF +fb151d74c97d6b3926d6b7a48eea3e56 cloud_scripts/root/health_checks/__init__.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/__init__.py'` -ne 942 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/__init__.py' is not 942" + fi +fi +# ============= cloud_scripts/root/health_checks/dns_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/dns_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/dns_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/dns_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/dns_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I"@H@("`@=VET:"!O<&5N*"/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/dns_check.py': 'MD5 check failed' + ) << \SHAR_EOF +b3192e74a4e52893fdeca4850eb096f4 cloud_scripts/root/health_checks/dns_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/dns_check.py'` -ne 1972 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/dns_check.py' is not 1972" + fi +fi +# ============= cloud_scripts/root/health_checks/cpu_usage_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/cpu_usage_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/cpu_usage_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/cpu_usage_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/cpu_usage_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W$-P=55S86=E(ETI"B`@("!C;60@/2`B=&]P("UB +M("UN,B`M<"`Q('P@9F=R97`@7")#<'4H7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@ +((&UA:6XH*0HR +` +end +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/cpu_usage_check.py' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/root/health_checks/cpu_usage_check.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/health_checks/cpu_usage_check.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/cpu_usage_check.py': 'MD5 check failed' + ) << \SHAR_EOF +faa54497a494f763c8f1a5a4d9b49c4f cloud_scripts/root/health_checks/cpu_usage_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/cpu_usage_check.py'` -ne 2078 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/cpu_usage_check.py' is not 2078" + fi +fi +# ============= cloud_scripts/root/health_checks/dhcp_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/dhcp_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/dhcp_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/dhcp_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/dhcp_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I"@H@("`@=VET:"!O<&5N*"'0G+"`G +M2`]($9A;'-E"B`@("`@("`@9F]R(&AO'0B"B`@("`@("`@97AI="@P*0H*"FEF(%]?;F%M +M95]?(#T](")?7VUA:6Y?7R(Z"B`@("!I9B!L96XH/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/dhcp_check.py': 'MD5 check failed' + ) << \SHAR_EOF +20e7a36b29f4160ae3e5814f042a8242 cloud_scripts/root/health_checks/dhcp_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/dhcp_check.py'` -ne 2386 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/dhcp_check.py' is not 2386" + fi +fi +# ============= cloud_scripts/root/func.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/func.sh' +then +${echo} "x - SKIPPING cloud_scripts/root/func.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/func.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/func.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# Only one lock is allowed: biglock +X +# getLockFile() parameters +# $1 lock filename +# $2 timeout seconds +X +#set -x +X +getCurrLock() { +X result=`ls $__LOCKDIR/*-$1.lock 2>/dev/null | head -n1` +X while [ $? -ne 0 ] +X do +X result=`ls $__LOCKDIR/*-$1.lock 2>/dev/null| head -n1` +X done +X echo $result +} +X +getLockFile() { +X lock=$1 +X +X __locked=0 +X __TS=`date +%s%N` +X __LOCKDIR="/tmp" +X __LOCKFILE="$__LOCKDIR/$__TS-$$-$lock.lock" +X +X if [ $2 ] +X then +X __TIMEOUT=$2 +X else +X __TIMEOUT=30 +X fi +X +X if [ -e $__LOCKFILE ] +X then +X logger -t cloud "Process $0 pid $$ want to get ECLUSIVE LOCK $lock RECURSIVELY!" +X psline=`ps u $$` +X logger -t cloud "Failed job detail: $psline" +X echo 0 +X return +X fi +X +X psline=`ps u $$` +X echo $psline > $__LOCKFILE +X if [ ! -e $__LOCKFILE ] +X then +X return +X fi +X +X for i in `seq 1 $(($__TIMEOUT * 10))` +X do +X currlock=$(getCurrLock $lock) +X if [ $currlock -ef $__LOCKFILE ] +X then +X __locked=1 +X break +X fi +X +X sleep 0.1 +X if [ $((i % 10)) -eq 0 ] +X then +X logger -t cloud "Process $0 pid $$ waiting for the lock $lock for another 1 second" +X fi +X done +X if [ $__locked -ne 1 ] +X then +X logger -t cloud "fail to acquire the lock $lock for process $0 pid $$ after $__TIMEOUT seconds time out!" +X cmd=`cat $currlock 2>/dev/null` +X if [ $? -eq 0 ] +X then +X logger -t cloud "waiting for process: $cmd" +X else +X logger -t cloud "didn't get info about process who we're waiting for" +X fi +X psline=`ps u $$` +X logger -t cloud "Failed job detail: $psline" +X rm $__LOCKFILE +X fi +X echo $__locked +} +X +# releaseLockFile() parameters +# $1 lock filename +# $2 locked(1) or not(0) +releaseLockFile() { +X __LOCKDIR="/tmp" +X __LOCKFILE="$__LOCKDIR/*-$$-$1.lock" +X __locked=$2 +X if [ "$__locked" == "1" ] +X then +X rm $__LOCKFILE +X fi +} +X +# releaseLockFile() parameters +# $1 exit value +# $2 lock filename +# $3 locked(1) or not(0) +unlock_exit() { +X releaseLockFile $2 $3 +X exit $1 +} +X +# calcuate the ip & network mask +rangecalc(){ +X local IFS='.' +X local -a oct mask ip +X +X read -ra oct <<<"$1" +X read -ra mask <<<"$2" +X for i in {0..3} +X do +X ip+=( "$(( oct[i] & mask[i] ))" ) +X done +X echo "${ip[*]}" +} +X +#get cidr of the nic +getcidr(){ +X local dev=$1 +X local mask=`ifconfig $dev|grep "Mask"|cut -d ":" -f 4` +X local cidrsize=`ip addr show $dev|grep inet|head -n 1|awk '{print $2}'|cut -d '/' -f 2` +X local ipaddr=`ip addr show $dev|grep inet|head -n 1|awk '{print $2}'|cut -d '/' -f 1` +X local base=$(rangecalc $ipaddr $mask) +X echo $base/$cidrsize +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/func.sh' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/root/func.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/func.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/func.sh': 'MD5 check failed' + ) << \SHAR_EOF +89141bce2eaa74a4a9a9788cae397be4 cloud_scripts/root/func.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/func.sh'` -ne 3567 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/func.sh' is not 3567" + fi +fi +# ============= cloud_scripts/root/clearUsageRules.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/clearUsageRules.sh' +then +${echo} "x - SKIPPING cloud_scripts/root/clearUsageRules.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/clearUsageRules.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/clearUsageRules.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +# clearUsageRules.sh - remove iptable rules for removed public interfaces +# @VERSION@ +X +if [ -f /root/removedVifs ] +then +X var=`cat /root/removedVifs` +X # loop through even vif to be cleared +X for i in $var; do +X # Make sure vif doesn't exist +X if [ ! -f /sys/class/net/$i ] +X then +X # remove rules +X iptables -D NETWORK_STATS -i eth0 -o $i > /dev/null; +X iptables -D NETWORK_STATS -i $i -o eth0 > /dev/null; +X iptables -D NETWORK_STATS -o $i ! -i eth0 -p tcp > /dev/null; +X iptables -D NETWORK_STATS -i $i ! -o eth0 -p tcp > /dev/null; +X fi +X done +rm /root/removedVifs +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/clearUsageRules.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/root/clearUsageRules.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/clearUsageRules.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/clearUsageRules.sh': 'MD5 check failed' + ) << \SHAR_EOF +f176fc60b3a7b07a47482d68528bb460 cloud_scripts/root/clearUsageRules.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/clearUsageRules.sh'` -ne 1461 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/clearUsageRules.sh' is not 1461" + fi +fi +# ============= cloud_scripts/root/reconfigLB.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/reconfigLB.sh' +then +${echo} "x - SKIPPING cloud_scripts/root/reconfigLB.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/reconfigLB.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/reconfigLB.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +ret=0 +X +new_config=$1 +X +# save previous state +X mv /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy.cfg.old +X +X mv $new_config /etc/haproxy/haproxy.cfg +X if haproxy -p /var/run/haproxy.pid -f /etc/haproxy/haproxy.cfg -sf $(cat /var/run/haproxy.pid); then +X logger -t cloud "New haproxy instance successfully loaded, stopping previous one." +X ret=0 +X else +X logger -t cloud "New instance failed to start, resuming previous one." +X mv /etc/haproxy/haproxy.cfg $new_config +X mv /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg +X haproxy -p /var/run/haproxy.pid -f /etc/haproxy/haproxy.cfg -sf $(cat /var/run/haproxy.pid) +X ret=1 +X fi +X +exit $ret +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/reconfigLB.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/root/reconfigLB.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/reconfigLB.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/reconfigLB.sh': 'MD5 check failed' + ) << \SHAR_EOF +d73e1491560b810ac47d1aaeb2b466ba cloud_scripts/root/reconfigLB.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/reconfigLB.sh'` -ne 1454 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/reconfigLB.sh' is not 1454" + fi +fi +# ============= cloud_scripts/root/monitorServices.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/monitorServices.py' +then +${echo} "x - SKIPPING cloud_scripts/root/monitorServices.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/monitorServices.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/monitorServices.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,L('!A=&@*9G)O;2!H96%L=&A?8VAE +M8VMS+G5T:6QI='D@:6UP;W)T(&=E=$AE86QT:$-H96-KWT* +M("`@('!A2`K)UTG*R(@(B`K +M("=;)RMP2LG72<@*R`B("(@*R!M +M2!O;F4@<&ED(&]R +M(&YO=`H@("`@:68@97AI=%-T871U6EN9R!F97<@;6]R92!T:6UEPH@("`@("`@("`@("`@("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EWT@(U-K:7`@WT*("`@(&9A:6QI;F=#:&5C:W,@/2!;70H@ +M("`@:68@8VAE8VM4>7!E(#T](")B87-I8R(Z"B`@("`@("`@;6]N:71297-U +M;'0L(&9A:6QI;F=#:&5C:W,@/2!M;VYI=%!R;V-E&-L=61E(#T@ +M:&-?9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K&-L=61E +M9%]H96%L=&A?8VAE8VMS(B!I;B!H8U]D871A(&5L7!E*0H@("`@("`@("`@("`@("`@:68@;&5N*')E="D@/3T@,#H*("`@("`@ +M("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@("`@("`@:68@(G-U +M8V-E7,N87)G=BD@/3T@,CH*("`@("`@("!I9B!S>7,N87)G=ELQ72`]/2`B +M861V86YC960B.@H@("`@("`@("`@("!M86EN*")A9'9A;F-E9"(I"B`@("`@ +M("`@96QI9B!S>7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@("`@("!M +M86EN*")B87-I8R(I"B`@("`@("`@96QS93H*("`@("`@("`@("`@<')I;G1D +M*")%7!E(&]F('1E7,N87)G=BD* +M("`@(&5L/dev/null 2>&1 || ${echo} 'cloud_scripts/root/monitorServices.py': 'MD5 check failed' + ) << \SHAR_EOF +d46009a10f68b7f2c57e43e215cba41c cloud_scripts/root/monitorServices.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/monitorServices.py'` -ne 12747 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/monitorServices.py' is not 12747" + fi +fi +# ============= cloud_scripts/root/health_checks/iptables_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/iptables_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/iptables_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/iptables_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/iptables_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W'!E8W1E9"`](%M="B`@("`@("`@9&5S=$EP(#T@<&]R=$9O'0L('-R8U!O2!I;B!I<%1A8FQE4QI'!E8W1E9#H*("`@("`@("`@("`@("`@("`@ +M("!I9B!I<%1A8FQE16YT'!E8W1E9$5N=')Y*2`]/2`M,3H* +M("`@("`@("`@("`@("`@("`@("`@("`@9F]U;F1!;&P@/2!&86QS90H@("`@ +M("`@("`@("`@("`@("`@("`@("!B4QI +M/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/iptables_check.py': 'MD5 check failed' + ) << \SHAR_EOF +36d30e9b9ff7842db6472b1f063bb076 cloud_scripts/root/health_checks/iptables_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/iptables_check.py'` -ne 3349 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/iptables_check.py' is not 3349" + fi +fi +# ============= cloud_scripts/root/health_checks/memory_usage_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/memory_usage_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/memory_usage_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/memory_usage_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/memory_usage_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W$UE;6]R>55S86=E(ETI"B`@("!C;60@/2`B9G)E92!\(&%W:R`G1DY2(#T] +M(#(@>R!P2!5$UE;6]R>55S86=E*2`K("(E(@H@("`@("`@("`@("!E>&ET*#$I"B`@ +M("`@("`@<')I;G0@(DUE;6]R>2!5/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/memory_usage_check.py': 'MD5 check failed' + ) << \SHAR_EOF +1d0f74928584f4e36af8d1d726fac4a4 cloud_scripts/root/health_checks/memory_usage_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/memory_usage_check.py'` -ne 1966 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/memory_usage_check.py' is not 1966" + fi +fi +# ============= cloud_scripts/root/health_checks/haproxy_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/haproxy_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/haproxy_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/haproxy_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/haproxy_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&-O;FXH +M:&%P41A=&$L(&AA0V9G4V5C=&EO;G,I.@H@("`@:68@(FUA>&-O;FXB +M(&EN(&AA<')O>'E$871A(&%N9"`B;6%X8V]N;B(@:6X@:&%#9F=396-T:6]N +M41A=&%;(FUA>&-O;FXB +M72`A/2!H84-F9U-E8W1I;VYS6R)G;&]B86PB75LB;6%X8V]N;B)=6S!=+G-T +M'E$871A +M+"!H84-F9U-E8W1I;VYS*3H*("`@(&-O41A=&$Z"B`@("`@("`@'!E8W1E9"`Z("(@*R!L8E-E8ULB86QG +M;W)I=&AM(ET@*R!<"B`@("`@("`@("`@("`@("`@("`@("`@("`@(B!B=70@ +M9F]U;F0@(B`K(&-F9U-E8W1I;VY;(F)A;&%N8V4B75LP72`K(")<;B(*("`@ +M("`@("`@("`@("`@("`@("!C;W)R96-T(#T@1F%L'!E8W1E9%-E'!E8W1E9%-E"!C;VX@86YD(&5A8V@@;&]A +M9"!B86QA;F-I;F<@41A=&$@/2!G971(96%L=&A#:&5C:W-$ +M871A*")H87!R;WAY1&%T82(I"B`@("!I9B!H87!R;WAY1&%T82!I'DN8V9G +M(BP@)W(G*2!A2]H87!R +M;WAY+F-F9R(*("`@("`@("!E>&ET*#$I"@H@("`@:&%#9F=396-T:6]NWT*("`@("`@("`@("`@8V]N=&EN=64*"B`@("`@("`@ +M:68@8W5R$-O;FX@ +M/2!C:&5C:TUA>&-O;FXH:&%P41A=&%;,%TL(&AA0V9G4V5C=&EO;G,I +M"B`@("!C:&5C:TQB4G5L97,@/2!C:&5C:TQO861"86QA;F-E*&AA<')O>'E$ +M871A+"!H84-F9U-E8W1I;VYS*0H*("`@(&EF(&-H96-K36%X0V]N;B!A;F0@ +M8VAE8VM,8E)U;&5S.@H@("`@("`@('!R:6YT(")!;&P@8VAE8VMS('!A&ET*#$I"@H* +M:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH*("`@(&EF(&QE;BAS>7,N87)G +M=BD@/3T@,B!A;F0@/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/haproxy_check.py': 'MD5 check failed' + ) << \SHAR_EOF +a6a55e4accdf61929c52391235dea744 cloud_scripts/root/health_checks/haproxy_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/haproxy_check.py'` -ne 5274 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/haproxy_check.py' is not 5274" + fi +fi +# ============= cloud_scripts/root/health_checks/router_version_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/router_version_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/router_version_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/router_version_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/router_version_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O +M'!E8W1E9#H@(B`K(%P*("`@("`@ +M("`@("`@("`@("`@97AP96-T960@*R`B+"!F;W5N9#H@(B`K(&9O=6YD"B`@ +M("`@("`@("`@('1E;7!L871E5F5R'!E8W1E +M9"`](&1A=&%;(G-C'!E8W1E9#H@(B`K(%P*("`@("`@ +M("`@("`@("`@("`@97AP96-T960@*R`B+"!F;W5N9#H@(B`K(&9O=6YD"B`@ +M("`@("`@("`@('-C/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/router_version_check.py': 'MD5 check failed' + ) << \SHAR_EOF +408778f28fd8559df294e18256af1f0b cloud_scripts/root/health_checks/router_version_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/router_version_check.py'` -ne 2773 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/router_version_check.py' is not 2773" + fi +fi +# ============= cloud_scripts/root/health_checks/utility/sharedFunctions.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/utility/sharedFunctions.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/utility/sharedFunctions.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import json +X +X +def getHealthChecksData(additionalDataKey=None): +X with open('/root/health_checks_data.json', 'r') as hc_data_file: +X hc_data = json.load(hc_data_file) +X +X # If no specific key is requested return all the data as JSON +X if additionalDataKey is None: +X return hc_data +X +X if additionalDataKey not in hc_data["health_checks_config"]: +X return None +X +X data = hc_data["health_checks_config"][additionalDataKey].strip().split(";") +X addData = [] +X for line in data: +X line = line.strip() +X if len(line) == 0: +X continue +X entries = line.split(',') +X d = {} +X for entry in entries: +X entry = entry.strip() +X if len(entry) == 0: +X continue +X keyVal = entry.split("=") +X if len(keyVal) == 2: +X d[keyVal[0].strip()] = keyVal[1].strip() +X if len(d) > 0: +X addData.append(d) +X +X return addData +X +X +def formatPort(portStart, portEnd, delim="-"): +X return portStart if portStart == portEnd else portStart + delim + portEnd +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/health_checks/utility/sharedFunctions.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/utility/sharedFunctions.py': 'MD5 check failed' + ) << \SHAR_EOF +4fa10a419db9715b34c7037bce5e6fe8 cloud_scripts/root/health_checks/utility/sharedFunctions.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/utility/sharedFunctions.py'` -ne 1865 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' is not 1865" + fi +fi +# ============= cloud_scripts/root/health_checks/utility/__init__.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/utility/__init__.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/utility/__init__.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/utility/__init__.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/utility/__init__.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/utility/__init__.py': 'MD5 check failed' + ) << \SHAR_EOF +ea0b11e040da094dd4f5628b467d5d88 cloud_scripts/root/health_checks/utility/__init__.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/utility/__init__.py'` -ne 864 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/utility/__init__.py' is not 864" + fi +fi +# ============= cloud_scripts/root/health_checks/disk_space_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/disk_space_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/disk_space_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/disk_space_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/disk_space_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O +MWT*("`@(&EF(&5N=')I97,@:7,@;F]T($YO;F4@86YD +M(&QE;BAE;G1R:65S*2`]/2`Q.@H@("`@("`@(&1A=&$@/2!E;G1R:65S6S!= +M"@H@("`@:68@(FUI;D1I/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/disk_space_check.py': 'MD5 check failed' + ) << \SHAR_EOF +9bbb07b130e3946c35263c2e970b59ba cloud_scripts/root/health_checks/disk_space_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/disk_space_check.py'` -ne 1626 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/disk_space_check.py' is not 1626" + fi +fi +# ============= cloud_scripts/root/health_checks/gateways_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/gateways_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/gateways_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/gateways_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/gateways_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,B*0H@("`@:68@9W=S(&ES($YO;F4@86YD(&QE;BAG=W,I(#T](#`Z"B`@ +M("`@("`@<')I;G0@(DYO(&=A=&5W87ES(&1A=&$@879A:6QA8FQE+"!S:VEP +M<&EN9R(*("`@("`@("!E>&ET*#`I"@H@("`@=6YR96%C:&%B;&5'871E5V%Y +M7,N87!P +M96YD*&=W*0H*("`@(&EF(&QE;BAU;G)E86-H86)L94=A=&5787ES*2`]/2`P +M.@H@("`@("`@('!R:6YT(")!;&P@(B`K('-T7,* +M("`@("`@("!E>&ET*#$I"@H*:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH* +M("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A;F0@/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/gateways_check.py': 'MD5 check failed' + ) << \SHAR_EOF +d1715f65dfe24b77c489d24fc1717bc9 cloud_scripts/root/health_checks/gateways_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/gateways_check.py'` -ne 1869 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/gateways_check.py' is not 1869" + fi +fi +# ============= cloud_scripts/root/health_checks/__init__.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/__init__.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/__init__.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/__init__.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/health_checks/__init__.py' && +#!/usr/bin/python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# Needed to expose utility as package outside for monitorServices.py. +# This directory should only contain executables for health checks. +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/__init__.py' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/root/health_checks/__init__.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/health_checks/__init__.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/__init__.py': 'MD5 check failed' + ) << \SHAR_EOF +fb151d74c97d6b3926d6b7a48eea3e56 cloud_scripts/root/health_checks/__init__.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/__init__.py'` -ne 942 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/__init__.py' is not 942" + fi +fi +# ============= cloud_scripts/root/health_checks/dns_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/dns_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/dns_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/dns_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/dns_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I"@H@("`@=VET:"!O<&5N*"/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/dns_check.py': 'MD5 check failed' + ) << \SHAR_EOF +b3192e74a4e52893fdeca4850eb096f4 cloud_scripts/root/health_checks/dns_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/dns_check.py'` -ne 1972 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/dns_check.py' is not 1972" + fi +fi +# ============= cloud_scripts/root/health_checks/cpu_usage_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/cpu_usage_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/cpu_usage_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/cpu_usage_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/cpu_usage_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W$-P=55S86=E(ETI"B`@("!C;60@/2`B=&]P("UB +M("UN,B`M<"`Q('P@9F=R97`@7")#<'4H7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@ +((&UA:6XH*0HR +` +end +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/cpu_usage_check.py' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/root/health_checks/cpu_usage_check.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/health_checks/cpu_usage_check.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/cpu_usage_check.py': 'MD5 check failed' + ) << \SHAR_EOF +faa54497a494f763c8f1a5a4d9b49c4f cloud_scripts/root/health_checks/cpu_usage_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/cpu_usage_check.py'` -ne 2078 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/cpu_usage_check.py' is not 2078" + fi +fi +# ============= cloud_scripts/root/health_checks/dhcp_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/dhcp_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/dhcp_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/dhcp_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/dhcp_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I"@H@("`@=VET:"!O<&5N*"'0G+"`G +M2`]($9A;'-E"B`@("`@("`@9F]R(&AO'0B"B`@("`@("`@97AI="@P*0H*"FEF(%]?;F%M +M95]?(#T](")?7VUA:6Y?7R(Z"B`@("!I9B!L96XH/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/dhcp_check.py': 'MD5 check failed' + ) << \SHAR_EOF +20e7a36b29f4160ae3e5814f042a8242 cloud_scripts/root/health_checks/dhcp_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/dhcp_check.py'` -ne 2386 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/dhcp_check.py' is not 2386" + fi +fi +# ============= cloud_scripts/root/health_checks/iptables_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/iptables_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/iptables_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/iptables_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/iptables_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W'!E8W1E9"`](%M="B`@("`@("`@9&5S=$EP(#T@<&]R=$9O'0L('-R8U!O2!I;B!I<%1A8FQE4QI'!E8W1E9#H*("`@("`@("`@("`@("`@("`@ +M("!I9B!I<%1A8FQE16YT'!E8W1E9$5N=')Y*2`]/2`M,3H* +M("`@("`@("`@("`@("`@("`@("`@("`@9F]U;F1!;&P@/2!&86QS90H@("`@ +M("`@("`@("`@("`@("`@("`@("!B4QI +M/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/iptables_check.py': 'MD5 check failed' + ) << \SHAR_EOF +36d30e9b9ff7842db6472b1f063bb076 cloud_scripts/root/health_checks/iptables_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/iptables_check.py'` -ne 3349 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/iptables_check.py' is not 3349" + fi +fi +# ============= cloud_scripts/root/health_checks/memory_usage_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/memory_usage_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/memory_usage_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/memory_usage_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/memory_usage_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W$UE;6]R>55S86=E(ETI"B`@("!C;60@/2`B9G)E92!\(&%W:R`G1DY2(#T] +M(#(@>R!P2!5$UE;6]R>55S86=E*2`K("(E(@H@("`@("`@("`@("!E>&ET*#$I"B`@ +M("`@("`@<')I;G0@(DUE;6]R>2!5/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/memory_usage_check.py': 'MD5 check failed' + ) << \SHAR_EOF +1d0f74928584f4e36af8d1d726fac4a4 cloud_scripts/root/health_checks/memory_usage_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/memory_usage_check.py'` -ne 1966 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/memory_usage_check.py' is not 1966" + fi +fi +# ============= cloud_scripts/root/health_checks/haproxy_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/haproxy_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/haproxy_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/haproxy_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/haproxy_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&-O;FXH +M:&%P41A=&$L(&AA0V9G4V5C=&EO;G,I.@H@("`@:68@(FUA>&-O;FXB +M(&EN(&AA<')O>'E$871A(&%N9"`B;6%X8V]N;B(@:6X@:&%#9F=396-T:6]N +M41A=&%;(FUA>&-O;FXB +M72`A/2!H84-F9U-E8W1I;VYS6R)G;&]B86PB75LB;6%X8V]N;B)=6S!=+G-T +M'E$871A +M+"!H84-F9U-E8W1I;VYS*3H*("`@(&-O41A=&$Z"B`@("`@("`@'!E8W1E9"`Z("(@*R!L8E-E8ULB86QG +M;W)I=&AM(ET@*R!<"B`@("`@("`@("`@("`@("`@("`@("`@("`@(B!B=70@ +M9F]U;F0@(B`K(&-F9U-E8W1I;VY;(F)A;&%N8V4B75LP72`K(")<;B(*("`@ +M("`@("`@("`@("`@("`@("!C;W)R96-T(#T@1F%L'!E8W1E9%-E'!E8W1E9%-E"!C;VX@86YD(&5A8V@@;&]A +M9"!B86QA;F-I;F<@41A=&$@/2!G971(96%L=&A#:&5C:W-$ +M871A*")H87!R;WAY1&%T82(I"B`@("!I9B!H87!R;WAY1&%T82!I'DN8V9G +M(BP@)W(G*2!A2]H87!R +M;WAY+F-F9R(*("`@("`@("!E>&ET*#$I"@H@("`@:&%#9F=396-T:6]NWT*("`@("`@("`@("`@8V]N=&EN=64*"B`@("`@("`@ +M:68@8W5R$-O;FX@ +M/2!C:&5C:TUA>&-O;FXH:&%P41A=&%;,%TL(&AA0V9G4V5C=&EO;G,I +M"B`@("!C:&5C:TQB4G5L97,@/2!C:&5C:TQO861"86QA;F-E*&AA<')O>'E$ +M871A+"!H84-F9U-E8W1I;VYS*0H*("`@(&EF(&-H96-K36%X0V]N;B!A;F0@ +M8VAE8VM,8E)U;&5S.@H@("`@("`@('!R:6YT(")!;&P@8VAE8VMS('!A&ET*#$I"@H* +M:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH*("`@(&EF(&QE;BAS>7,N87)G +M=BD@/3T@,B!A;F0@/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/haproxy_check.py': 'MD5 check failed' + ) << \SHAR_EOF +a6a55e4accdf61929c52391235dea744 cloud_scripts/root/health_checks/haproxy_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/haproxy_check.py'` -ne 5274 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/haproxy_check.py' is not 5274" + fi +fi +# ============= cloud_scripts/root/health_checks/router_version_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/router_version_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/router_version_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/router_version_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/router_version_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O +M'!E8W1E9#H@(B`K(%P*("`@("`@ +M("`@("`@("`@("`@97AP96-T960@*R`B+"!F;W5N9#H@(B`K(&9O=6YD"B`@ +M("`@("`@("`@('1E;7!L871E5F5R'!E8W1E +M9"`](&1A=&%;(G-C'!E8W1E9#H@(B`K(%P*("`@("`@ +M("`@("`@("`@("`@97AP96-T960@*R`B+"!F;W5N9#H@(B`K(&9O=6YD"B`@ +M("`@("`@("`@('-C/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/router_version_check.py': 'MD5 check failed' + ) << \SHAR_EOF +408778f28fd8559df294e18256af1f0b cloud_scripts/root/health_checks/router_version_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/router_version_check.py'` -ne 2773 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/router_version_check.py' is not 2773" + fi +fi +# ============= cloud_scripts/root/health_checks/utility/sharedFunctions.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/utility/sharedFunctions.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/utility/sharedFunctions.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import json +X +X +def getHealthChecksData(additionalDataKey=None): +X with open('/root/health_checks_data.json', 'r') as hc_data_file: +X hc_data = json.load(hc_data_file) +X +X # If no specific key is requested return all the data as JSON +X if additionalDataKey is None: +X return hc_data +X +X if additionalDataKey not in hc_data["health_checks_config"]: +X return None +X +X data = hc_data["health_checks_config"][additionalDataKey].strip().split(";") +X addData = [] +X for line in data: +X line = line.strip() +X if len(line) == 0: +X continue +X entries = line.split(',') +X d = {} +X for entry in entries: +X entry = entry.strip() +X if len(entry) == 0: +X continue +X keyVal = entry.split("=") +X if len(keyVal) == 2: +X d[keyVal[0].strip()] = keyVal[1].strip() +X if len(d) > 0: +X addData.append(d) +X +X return addData +X +X +def formatPort(portStart, portEnd, delim="-"): +X return portStart if portStart == portEnd else portStart + delim + portEnd +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/health_checks/utility/sharedFunctions.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/utility/sharedFunctions.py': 'MD5 check failed' + ) << \SHAR_EOF +4fa10a419db9715b34c7037bce5e6fe8 cloud_scripts/root/health_checks/utility/sharedFunctions.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/utility/sharedFunctions.py'` -ne 1865 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' is not 1865" + fi +fi +# ============= cloud_scripts/root/health_checks/utility/__init__.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/utility/__init__.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/utility/__init__.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/utility/__init__.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/utility/__init__.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/utility/__init__.py': 'MD5 check failed' + ) << \SHAR_EOF +ea0b11e040da094dd4f5628b467d5d88 cloud_scripts/root/health_checks/utility/__init__.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/utility/__init__.py'` -ne 864 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/utility/__init__.py' is not 864" + fi +fi +# ============= cloud_scripts/root/health_checks/utility/sharedFunctions.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/utility/sharedFunctions.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/utility/sharedFunctions.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +import json +X +X +def getHealthChecksData(additionalDataKey=None): +X with open('/root/health_checks_data.json', 'r') as hc_data_file: +X hc_data = json.load(hc_data_file) +X +X # If no specific key is requested return all the data as JSON +X if additionalDataKey is None: +X return hc_data +X +X if additionalDataKey not in hc_data["health_checks_config"]: +X return None +X +X data = hc_data["health_checks_config"][additionalDataKey].strip().split(";") +X addData = [] +X for line in data: +X line = line.strip() +X if len(line) == 0: +X continue +X entries = line.split(',') +X d = {} +X for entry in entries: +X entry = entry.strip() +X if len(entry) == 0: +X continue +X keyVal = entry.split("=") +X if len(keyVal) == 2: +X d[keyVal[0].strip()] = keyVal[1].strip() +X if len(d) > 0: +X addData.append(d) +X +X return addData +X +X +def formatPort(portStart, portEnd, delim="-"): +X return portStart if portStart == portEnd else portStart + delim + portEnd +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/health_checks/utility/sharedFunctions.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/utility/sharedFunctions.py': 'MD5 check failed' + ) << \SHAR_EOF +4fa10a419db9715b34c7037bce5e6fe8 cloud_scripts/root/health_checks/utility/sharedFunctions.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/utility/sharedFunctions.py'` -ne 1865 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' is not 1865" + fi +fi +# ============= cloud_scripts/root/health_checks/utility/__init__.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/utility/__init__.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/utility/__init__.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/utility/__init__.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/utility/__init__.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/utility/__init__.py': 'MD5 check failed' + ) << \SHAR_EOF +ea0b11e040da094dd4f5628b467d5d88 cloud_scripts/root/health_checks/utility/__init__.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/utility/__init__.py'` -ne 864 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/utility/__init__.py' is not 864" + fi +fi +# ============= cloud_scripts/root/health_checks/disk_space_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/disk_space_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/disk_space_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/disk_space_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/disk_space_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O +MWT*("`@(&EF(&5N=')I97,@:7,@;F]T($YO;F4@86YD +M(&QE;BAE;G1R:65S*2`]/2`Q.@H@("`@("`@(&1A=&$@/2!E;G1R:65S6S!= +M"@H@("`@:68@(FUI;D1I/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/disk_space_check.py': 'MD5 check failed' + ) << \SHAR_EOF +9bbb07b130e3946c35263c2e970b59ba cloud_scripts/root/health_checks/disk_space_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/disk_space_check.py'` -ne 1626 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/disk_space_check.py' is not 1626" + fi +fi +# ============= cloud_scripts/root/health_checks/gateways_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/gateways_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/gateways_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/gateways_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/gateways_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,B*0H@("`@:68@9W=S(&ES($YO;F4@86YD(&QE;BAG=W,I(#T](#`Z"B`@ +M("`@("`@<')I;G0@(DYO(&=A=&5W87ES(&1A=&$@879A:6QA8FQE+"!S:VEP +M<&EN9R(*("`@("`@("!E>&ET*#`I"@H@("`@=6YR96%C:&%B;&5'871E5V%Y +M7,N87!P +M96YD*&=W*0H*("`@(&EF(&QE;BAU;G)E86-H86)L94=A=&5787ES*2`]/2`P +M.@H@("`@("`@('!R:6YT(")!;&P@(B`K('-T7,* +M("`@("`@("!E>&ET*#$I"@H*:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH* +M("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A;F0@/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/gateways_check.py': 'MD5 check failed' + ) << \SHAR_EOF +d1715f65dfe24b77c489d24fc1717bc9 cloud_scripts/root/health_checks/gateways_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/gateways_check.py'` -ne 1869 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/gateways_check.py' is not 1869" + fi +fi +# ============= cloud_scripts/root/health_checks/__init__.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/__init__.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/__init__.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/__init__.py (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/health_checks/__init__.py' && +#!/usr/bin/python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# Needed to expose utility as package outside for monitorServices.py. +# This directory should only contain executables for health checks. +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/__init__.py' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/root/health_checks/__init__.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/health_checks/__init__.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/__init__.py': 'MD5 check failed' + ) << \SHAR_EOF +fb151d74c97d6b3926d6b7a48eea3e56 cloud_scripts/root/health_checks/__init__.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/__init__.py'` -ne 942 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/__init__.py' is not 942" + fi +fi +# ============= cloud_scripts/root/health_checks/dns_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/dns_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/dns_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/dns_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/dns_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I"@H@("`@=VET:"!O<&5N*"/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/dns_check.py': 'MD5 check failed' + ) << \SHAR_EOF +b3192e74a4e52893fdeca4850eb096f4 cloud_scripts/root/health_checks/dns_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/dns_check.py'` -ne 1972 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/dns_check.py' is not 1972" + fi +fi +# ============= cloud_scripts/root/health_checks/cpu_usage_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/cpu_usage_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/cpu_usage_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/cpu_usage_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/cpu_usage_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W$-P=55S86=E(ETI"B`@("!C;60@/2`B=&]P("UB +M("UN,B`M<"`Q('P@9F=R97`@7")#<'4H7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@ +((&UA:6XH*0HR +` +end +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/cpu_usage_check.py' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/root/health_checks/cpu_usage_check.py' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/health_checks/cpu_usage_check.py failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/cpu_usage_check.py': 'MD5 check failed' + ) << \SHAR_EOF +faa54497a494f763c8f1a5a4d9b49c4f cloud_scripts/root/health_checks/cpu_usage_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/cpu_usage_check.py'` -ne 2078 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/cpu_usage_check.py' is not 2078" + fi +fi +# ============= cloud_scripts/root/health_checks/dhcp_check.py ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/dhcp_check.py' +then +${echo} "x - SKIPPING cloud_scripts/root/health_checks/dhcp_check.py (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/health_checks/dhcp_check.py (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/root/health_checks/dhcp_check.py +M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O +M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C +M;VYT7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I"@H@("`@=VET:"!O<&5N*"'0G+"`G +M2`]($9A;'-E"B`@("`@("`@9F]R(&AO'0B"B`@("`@("`@97AI="@P*0H*"FEF(%]?;F%M +M95]?(#T](")?7VUA:6Y?7R(Z"B`@("!I9B!L96XH/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/dhcp_check.py': 'MD5 check failed' + ) << \SHAR_EOF +20e7a36b29f4160ae3e5814f042a8242 cloud_scripts/root/health_checks/dhcp_check.py +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/dhcp_check.py'` -ne 2386 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/dhcp_check.py' is not 2386" + fi +fi +# ============= cloud_scripts/root/func.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/func.sh' +then +${echo} "x - SKIPPING cloud_scripts/root/func.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/func.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/func.sh' && +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +# Only one lock is allowed: biglock +X +# getLockFile() parameters +# $1 lock filename +# $2 timeout seconds +X +#set -x +X +getCurrLock() { +X result=`ls $__LOCKDIR/*-$1.lock 2>/dev/null | head -n1` +X while [ $? -ne 0 ] +X do +X result=`ls $__LOCKDIR/*-$1.lock 2>/dev/null| head -n1` +X done +X echo $result +} +X +getLockFile() { +X lock=$1 +X +X __locked=0 +X __TS=`date +%s%N` +X __LOCKDIR="/tmp" +X __LOCKFILE="$__LOCKDIR/$__TS-$$-$lock.lock" +X +X if [ $2 ] +X then +X __TIMEOUT=$2 +X else +X __TIMEOUT=30 +X fi +X +X if [ -e $__LOCKFILE ] +X then +X logger -t cloud "Process $0 pid $$ want to get ECLUSIVE LOCK $lock RECURSIVELY!" +X psline=`ps u $$` +X logger -t cloud "Failed job detail: $psline" +X echo 0 +X return +X fi +X +X psline=`ps u $$` +X echo $psline > $__LOCKFILE +X if [ ! -e $__LOCKFILE ] +X then +X return +X fi +X +X for i in `seq 1 $(($__TIMEOUT * 10))` +X do +X currlock=$(getCurrLock $lock) +X if [ $currlock -ef $__LOCKFILE ] +X then +X __locked=1 +X break +X fi +X +X sleep 0.1 +X if [ $((i % 10)) -eq 0 ] +X then +X logger -t cloud "Process $0 pid $$ waiting for the lock $lock for another 1 second" +X fi +X done +X if [ $__locked -ne 1 ] +X then +X logger -t cloud "fail to acquire the lock $lock for process $0 pid $$ after $__TIMEOUT seconds time out!" +X cmd=`cat $currlock 2>/dev/null` +X if [ $? -eq 0 ] +X then +X logger -t cloud "waiting for process: $cmd" +X else +X logger -t cloud "didn't get info about process who we're waiting for" +X fi +X psline=`ps u $$` +X logger -t cloud "Failed job detail: $psline" +X rm $__LOCKFILE +X fi +X echo $__locked +} +X +# releaseLockFile() parameters +# $1 lock filename +# $2 locked(1) or not(0) +releaseLockFile() { +X __LOCKDIR="/tmp" +X __LOCKFILE="$__LOCKDIR/*-$$-$1.lock" +X __locked=$2 +X if [ "$__locked" == "1" ] +X then +X rm $__LOCKFILE +X fi +} +X +# releaseLockFile() parameters +# $1 exit value +# $2 lock filename +# $3 locked(1) or not(0) +unlock_exit() { +X releaseLockFile $2 $3 +X exit $1 +} +X +# calcuate the ip & network mask +rangecalc(){ +X local IFS='.' +X local -a oct mask ip +X +X read -ra oct <<<"$1" +X read -ra mask <<<"$2" +X for i in {0..3} +X do +X ip+=( "$(( oct[i] & mask[i] ))" ) +X done +X echo "${ip[*]}" +} +X +#get cidr of the nic +getcidr(){ +X local dev=$1 +X local mask=`ifconfig $dev|grep "Mask"|cut -d ":" -f 4` +X local cidrsize=`ip addr show $dev|grep inet|head -n 1|awk '{print $2}'|cut -d '/' -f 2` +X local ipaddr=`ip addr show $dev|grep inet|head -n 1|awk '{print $2}'|cut -d '/' -f 1` +X local base=$(rangecalc $ipaddr $mask) +X echo $base/$cidrsize +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/func.sh' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/root/func.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/func.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/func.sh': 'MD5 check failed' + ) << \SHAR_EOF +89141bce2eaa74a4a9a9788cae397be4 cloud_scripts/root/func.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/func.sh'` -ne 3567 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/func.sh' is not 3567" + fi +fi +# ============= cloud_scripts/root/clearUsageRules.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/root/clearUsageRules.sh' +then +${echo} "x - SKIPPING cloud_scripts/root/clearUsageRules.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/root/clearUsageRules.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/clearUsageRules.sh' && +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +# clearUsageRules.sh - remove iptable rules for removed public interfaces +# @VERSION@ +X +if [ -f /root/removedVifs ] +then +X var=`cat /root/removedVifs` +X # loop through even vif to be cleared +X for i in $var; do +X # Make sure vif doesn't exist +X if [ ! -f /sys/class/net/$i ] +X then +X # remove rules +X iptables -D NETWORK_STATS -i eth0 -o $i > /dev/null; +X iptables -D NETWORK_STATS -i $i -o eth0 > /dev/null; +X iptables -D NETWORK_STATS -o $i ! -i eth0 -p tcp > /dev/null; +X iptables -D NETWORK_STATS -i $i ! -o eth0 -p tcp > /dev/null; +X fi +X done +rm /root/removedVifs +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/root/clearUsageRules.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/root/clearUsageRules.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/root/clearUsageRules.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/clearUsageRules.sh': 'MD5 check failed' + ) << \SHAR_EOF +f176fc60b3a7b07a47482d68528bb460 cloud_scripts/root/clearUsageRules.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/root/clearUsageRules.sh'` -ne 1461 && \ + ${echo} "restoration warning: size of 'cloud_scripts/root/clearUsageRules.sh' is not 1461" + fi +fi +# ============= cloud_scripts/var/www/html/latest/.htaccess ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/latest/.htaccess' +then +${echo} "x - SKIPPING cloud_scripts/var/www/html/latest/.htaccess (file already exists)" + +else +${echo} "x - extracting cloud_scripts/var/www/html/latest/.htaccess (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/latest/.htaccess' && +Options +FollowSymLinks +RewriteEngine On +X +#http:///latest/user-data and .../user-data/ (both yield user-data file) +#http:///latest/meta-data and .../meta-data/ (dir listing of meta-data) +RewriteRule ^user-data/?$ ../userdata/%{REMOTE_ADDR}/user-data [L,NC,QSA] +RewriteRule ^meta-data/?$ ../metadata/%{REMOTE_ADDR}/meta-data [L,NC,QSA] +X +#http:///latest/foo and .../foo/ (yield metadata/$IP/foo) +#are these used? +RewriteRule ^availability-zone/?$ ../metadata/%{REMOTE_ADDR}/availability-zone [L,NC,QSA] +RewriteRule ^cloud-identifier/?$ ../metadata/%{REMOTE_ADDR}/cloud-identifier [L,NC,QSA] +RewriteRule ^instance-id/?$ ../metadata/%{REMOTE_ADDR}/instance-id [L,NC,QSA] +RewriteRule ^local-hostname/?$ ../metadata/%{REMOTE_ADDR}/local-hostname [L,NC,QSA] +RewriteRule ^local-ipv4/?$ ../metadata/%{REMOTE_ADDR}/local-ipv4 [L,NC,QSA] +RewriteRule ^public-hostname/?$ ../metadata/%{REMOTE_ADDR}/public-hostname [L,NC,QSA] +RewriteRule ^public-ipv4/?$ ../metadata/%{REMOTE_ADDR}/public-ipv4 [L,NC,QSA] +RewriteRule ^public-keys/?$ ../metadata/%{REMOTE_ADDR}/public-keys [L,NC,QSA] +RewriteRule ^service-offering/?$ ../metadata/%{REMOTE_ADDR}/service-offering [L,NC,QSA] +RewriteRule ^vm-id/?$ ../metadata/%{REMOTE_ADDR}/vm-id [L,NC,QSA] +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/latest/.htaccess' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/var/www/html/latest/.htaccess' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/var/www/html/latest/.htaccess failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/latest/.htaccess': 'MD5 check failed' + ) << \SHAR_EOF +b20d7331940666e4f160df0a03678813 cloud_scripts/var/www/html/latest/.htaccess +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/latest/.htaccess'` -ne 1425 && \ + ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/latest/.htaccess' is not 1425" + fi +fi +# ============= cloud_scripts/var/www/html/userdata/.htaccess ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/userdata/.htaccess' +then +${echo} "x - SKIPPING cloud_scripts/var/www/html/userdata/.htaccess (file already exists)" + +else +${echo} "x - extracting cloud_scripts/var/www/html/userdata/.htaccess (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/userdata/.htaccess' && +Options -Indexes +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/userdata/.htaccess' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/var/www/html/userdata/.htaccess' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/var/www/html/userdata/.htaccess failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/userdata/.htaccess': 'MD5 check failed' + ) << \SHAR_EOF +7eb825c9c5f32d7efe110c8d7ed402dc cloud_scripts/var/www/html/userdata/.htaccess +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/userdata/.htaccess'` -ne 17 && \ + ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/userdata/.htaccess' is not 17" + fi +fi +# ============= cloud_scripts/var/www/html/latest/.htaccess ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/latest/.htaccess' +then +${echo} "x - SKIPPING cloud_scripts/var/www/html/latest/.htaccess (file already exists)" + +else +${echo} "x - extracting cloud_scripts/var/www/html/latest/.htaccess (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/latest/.htaccess' && +Options +FollowSymLinks +RewriteEngine On +X +#http:///latest/user-data and .../user-data/ (both yield user-data file) +#http:///latest/meta-data and .../meta-data/ (dir listing of meta-data) +RewriteRule ^user-data/?$ ../userdata/%{REMOTE_ADDR}/user-data [L,NC,QSA] +RewriteRule ^meta-data/?$ ../metadata/%{REMOTE_ADDR}/meta-data [L,NC,QSA] +X +#http:///latest/foo and .../foo/ (yield metadata/$IP/foo) +#are these used? +RewriteRule ^availability-zone/?$ ../metadata/%{REMOTE_ADDR}/availability-zone [L,NC,QSA] +RewriteRule ^cloud-identifier/?$ ../metadata/%{REMOTE_ADDR}/cloud-identifier [L,NC,QSA] +RewriteRule ^instance-id/?$ ../metadata/%{REMOTE_ADDR}/instance-id [L,NC,QSA] +RewriteRule ^local-hostname/?$ ../metadata/%{REMOTE_ADDR}/local-hostname [L,NC,QSA] +RewriteRule ^local-ipv4/?$ ../metadata/%{REMOTE_ADDR}/local-ipv4 [L,NC,QSA] +RewriteRule ^public-hostname/?$ ../metadata/%{REMOTE_ADDR}/public-hostname [L,NC,QSA] +RewriteRule ^public-ipv4/?$ ../metadata/%{REMOTE_ADDR}/public-ipv4 [L,NC,QSA] +RewriteRule ^public-keys/?$ ../metadata/%{REMOTE_ADDR}/public-keys [L,NC,QSA] +RewriteRule ^service-offering/?$ ../metadata/%{REMOTE_ADDR}/service-offering [L,NC,QSA] +RewriteRule ^vm-id/?$ ../metadata/%{REMOTE_ADDR}/vm-id [L,NC,QSA] +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/latest/.htaccess' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/var/www/html/latest/.htaccess' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/var/www/html/latest/.htaccess failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/latest/.htaccess': 'MD5 check failed' + ) << \SHAR_EOF +b20d7331940666e4f160df0a03678813 cloud_scripts/var/www/html/latest/.htaccess +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/latest/.htaccess'` -ne 1425 && \ + ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/latest/.htaccess' is not 1425" + fi +fi +# ============= cloud_scripts/var/www/html/userdata/.htaccess ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/userdata/.htaccess' +then +${echo} "x - SKIPPING cloud_scripts/var/www/html/userdata/.htaccess (file already exists)" + +else +${echo} "x - extracting cloud_scripts/var/www/html/userdata/.htaccess (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/userdata/.htaccess' && +Options -Indexes +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/userdata/.htaccess' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/var/www/html/userdata/.htaccess' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/var/www/html/userdata/.htaccess failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/userdata/.htaccess': 'MD5 check failed' + ) << \SHAR_EOF +7eb825c9c5f32d7efe110c8d7ed402dc cloud_scripts/var/www/html/userdata/.htaccess +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/userdata/.htaccess'` -ne 17 && \ + ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/userdata/.htaccess' is not 17" + fi +fi +# ============= cloud_scripts/var/www/html/latest/.htaccess ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/latest/.htaccess' +then +${echo} "x - SKIPPING cloud_scripts/var/www/html/latest/.htaccess (file already exists)" + +else +${echo} "x - extracting cloud_scripts/var/www/html/latest/.htaccess (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/latest/.htaccess' && +Options +FollowSymLinks +RewriteEngine On +X +#http:///latest/user-data and .../user-data/ (both yield user-data file) +#http:///latest/meta-data and .../meta-data/ (dir listing of meta-data) +RewriteRule ^user-data/?$ ../userdata/%{REMOTE_ADDR}/user-data [L,NC,QSA] +RewriteRule ^meta-data/?$ ../metadata/%{REMOTE_ADDR}/meta-data [L,NC,QSA] +X +#http:///latest/foo and .../foo/ (yield metadata/$IP/foo) +#are these used? +RewriteRule ^availability-zone/?$ ../metadata/%{REMOTE_ADDR}/availability-zone [L,NC,QSA] +RewriteRule ^cloud-identifier/?$ ../metadata/%{REMOTE_ADDR}/cloud-identifier [L,NC,QSA] +RewriteRule ^instance-id/?$ ../metadata/%{REMOTE_ADDR}/instance-id [L,NC,QSA] +RewriteRule ^local-hostname/?$ ../metadata/%{REMOTE_ADDR}/local-hostname [L,NC,QSA] +RewriteRule ^local-ipv4/?$ ../metadata/%{REMOTE_ADDR}/local-ipv4 [L,NC,QSA] +RewriteRule ^public-hostname/?$ ../metadata/%{REMOTE_ADDR}/public-hostname [L,NC,QSA] +RewriteRule ^public-ipv4/?$ ../metadata/%{REMOTE_ADDR}/public-ipv4 [L,NC,QSA] +RewriteRule ^public-keys/?$ ../metadata/%{REMOTE_ADDR}/public-keys [L,NC,QSA] +RewriteRule ^service-offering/?$ ../metadata/%{REMOTE_ADDR}/service-offering [L,NC,QSA] +RewriteRule ^vm-id/?$ ../metadata/%{REMOTE_ADDR}/vm-id [L,NC,QSA] +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/latest/.htaccess' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/var/www/html/latest/.htaccess' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/var/www/html/latest/.htaccess failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/latest/.htaccess': 'MD5 check failed' + ) << \SHAR_EOF +b20d7331940666e4f160df0a03678813 cloud_scripts/var/www/html/latest/.htaccess +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/latest/.htaccess'` -ne 1425 && \ + ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/latest/.htaccess' is not 1425" + fi +fi +# ============= cloud_scripts/var/www/html/userdata/.htaccess ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/userdata/.htaccess' +then +${echo} "x - SKIPPING cloud_scripts/var/www/html/userdata/.htaccess (file already exists)" + +else +${echo} "x - extracting cloud_scripts/var/www/html/userdata/.htaccess (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/userdata/.htaccess' && +Options -Indexes +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/userdata/.htaccess' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/var/www/html/userdata/.htaccess' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/var/www/html/userdata/.htaccess failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/userdata/.htaccess': 'MD5 check failed' + ) << \SHAR_EOF +7eb825c9c5f32d7efe110c8d7ed402dc cloud_scripts/var/www/html/userdata/.htaccess +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/userdata/.htaccess'` -ne 17 && \ + ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/userdata/.htaccess' is not 17" + fi +fi +# ============= cloud_scripts/var/www/html/latest/.htaccess ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/latest/.htaccess' +then +${echo} "x - SKIPPING cloud_scripts/var/www/html/latest/.htaccess (file already exists)" + +else +${echo} "x - extracting cloud_scripts/var/www/html/latest/.htaccess (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/latest/.htaccess' && +Options +FollowSymLinks +RewriteEngine On +X +#http:///latest/user-data and .../user-data/ (both yield user-data file) +#http:///latest/meta-data and .../meta-data/ (dir listing of meta-data) +RewriteRule ^user-data/?$ ../userdata/%{REMOTE_ADDR}/user-data [L,NC,QSA] +RewriteRule ^meta-data/?$ ../metadata/%{REMOTE_ADDR}/meta-data [L,NC,QSA] +X +#http:///latest/foo and .../foo/ (yield metadata/$IP/foo) +#are these used? +RewriteRule ^availability-zone/?$ ../metadata/%{REMOTE_ADDR}/availability-zone [L,NC,QSA] +RewriteRule ^cloud-identifier/?$ ../metadata/%{REMOTE_ADDR}/cloud-identifier [L,NC,QSA] +RewriteRule ^instance-id/?$ ../metadata/%{REMOTE_ADDR}/instance-id [L,NC,QSA] +RewriteRule ^local-hostname/?$ ../metadata/%{REMOTE_ADDR}/local-hostname [L,NC,QSA] +RewriteRule ^local-ipv4/?$ ../metadata/%{REMOTE_ADDR}/local-ipv4 [L,NC,QSA] +RewriteRule ^public-hostname/?$ ../metadata/%{REMOTE_ADDR}/public-hostname [L,NC,QSA] +RewriteRule ^public-ipv4/?$ ../metadata/%{REMOTE_ADDR}/public-ipv4 [L,NC,QSA] +RewriteRule ^public-keys/?$ ../metadata/%{REMOTE_ADDR}/public-keys [L,NC,QSA] +RewriteRule ^service-offering/?$ ../metadata/%{REMOTE_ADDR}/service-offering [L,NC,QSA] +RewriteRule ^vm-id/?$ ../metadata/%{REMOTE_ADDR}/vm-id [L,NC,QSA] +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/latest/.htaccess' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/var/www/html/latest/.htaccess' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/var/www/html/latest/.htaccess failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/latest/.htaccess': 'MD5 check failed' + ) << \SHAR_EOF +b20d7331940666e4f160df0a03678813 cloud_scripts/var/www/html/latest/.htaccess +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/latest/.htaccess'` -ne 1425 && \ + ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/latest/.htaccess' is not 1425" + fi +fi +# ============= cloud_scripts/var/www/html/latest/.htaccess ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/latest/.htaccess' +then +${echo} "x - SKIPPING cloud_scripts/var/www/html/latest/.htaccess (file already exists)" + +else +${echo} "x - extracting cloud_scripts/var/www/html/latest/.htaccess (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/latest/.htaccess' && +Options +FollowSymLinks +RewriteEngine On +X +#http:///latest/user-data and .../user-data/ (both yield user-data file) +#http:///latest/meta-data and .../meta-data/ (dir listing of meta-data) +RewriteRule ^user-data/?$ ../userdata/%{REMOTE_ADDR}/user-data [L,NC,QSA] +RewriteRule ^meta-data/?$ ../metadata/%{REMOTE_ADDR}/meta-data [L,NC,QSA] +X +#http:///latest/foo and .../foo/ (yield metadata/$IP/foo) +#are these used? +RewriteRule ^availability-zone/?$ ../metadata/%{REMOTE_ADDR}/availability-zone [L,NC,QSA] +RewriteRule ^cloud-identifier/?$ ../metadata/%{REMOTE_ADDR}/cloud-identifier [L,NC,QSA] +RewriteRule ^instance-id/?$ ../metadata/%{REMOTE_ADDR}/instance-id [L,NC,QSA] +RewriteRule ^local-hostname/?$ ../metadata/%{REMOTE_ADDR}/local-hostname [L,NC,QSA] +RewriteRule ^local-ipv4/?$ ../metadata/%{REMOTE_ADDR}/local-ipv4 [L,NC,QSA] +RewriteRule ^public-hostname/?$ ../metadata/%{REMOTE_ADDR}/public-hostname [L,NC,QSA] +RewriteRule ^public-ipv4/?$ ../metadata/%{REMOTE_ADDR}/public-ipv4 [L,NC,QSA] +RewriteRule ^public-keys/?$ ../metadata/%{REMOTE_ADDR}/public-keys [L,NC,QSA] +RewriteRule ^service-offering/?$ ../metadata/%{REMOTE_ADDR}/service-offering [L,NC,QSA] +RewriteRule ^vm-id/?$ ../metadata/%{REMOTE_ADDR}/vm-id [L,NC,QSA] +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/latest/.htaccess' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/var/www/html/latest/.htaccess' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/var/www/html/latest/.htaccess failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/latest/.htaccess': 'MD5 check failed' + ) << \SHAR_EOF +b20d7331940666e4f160df0a03678813 cloud_scripts/var/www/html/latest/.htaccess +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/latest/.htaccess'` -ne 1425 && \ + ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/latest/.htaccess' is not 1425" + fi +fi +# ============= cloud_scripts/var/www/html/userdata/.htaccess ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/userdata/.htaccess' +then +${echo} "x - SKIPPING cloud_scripts/var/www/html/userdata/.htaccess (file already exists)" + +else +${echo} "x - extracting cloud_scripts/var/www/html/userdata/.htaccess (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/userdata/.htaccess' && +Options -Indexes +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/userdata/.htaccess' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/var/www/html/userdata/.htaccess' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/var/www/html/userdata/.htaccess failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/userdata/.htaccess': 'MD5 check failed' + ) << \SHAR_EOF +7eb825c9c5f32d7efe110c8d7ed402dc cloud_scripts/var/www/html/userdata/.htaccess +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/userdata/.htaccess'` -ne 17 && \ + ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/userdata/.htaccess' is not 17" + fi +fi +# ============= cloud_scripts/var/www/html/userdata/.htaccess ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/userdata/.htaccess' +then +${echo} "x - SKIPPING cloud_scripts/var/www/html/userdata/.htaccess (file already exists)" + +else +${echo} "x - extracting cloud_scripts/var/www/html/userdata/.htaccess (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/userdata/.htaccess' && +Options -Indexes +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/userdata/.htaccess' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/var/www/html/userdata/.htaccess' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/var/www/html/userdata/.htaccess failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/userdata/.htaccess': 'MD5 check failed' + ) << \SHAR_EOF +7eb825c9c5f32d7efe110c8d7ed402dc cloud_scripts/var/www/html/userdata/.htaccess +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/userdata/.htaccess'` -ne 17 && \ + ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/userdata/.htaccess' is not 17" + fi +fi +# ============= cloud_scripts/etc/ipsec.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/ipsec.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/ipsec.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.conf' && +# ipsec.conf - strongSwan IPsec configuration file +X +config setup +X +include /etc/ipsec.d/*.conf +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/ipsec.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/ipsec.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.conf': 'MD5 check failed' + ) << \SHAR_EOF +da4dd5d331eed3e64a528dc648aa7cae cloud_scripts/etc/ipsec.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.conf'` -ne 94 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.conf' is not 94" + fi +fi +# ============= cloud_scripts/etc/systemd/journald.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/journald.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/journald.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/journald.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/journald.conf' && +[Journal] +Compress=yes +SystemMaxUse=40M +SystemMaxFileSize=10M +RuntimeMaxUse=20M +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/journald.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/journald.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/journald.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/journald.conf': 'MD5 check failed' + ) << \SHAR_EOF +ea3c97c4a558fbfdf53304f77275ef8a cloud_scripts/etc/systemd/journald.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/journald.conf'` -ne 80 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/journald.conf' is not 80" + fi +fi +# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service +M[[N_6U5N:71="D1E/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service': 'MD5 check failed' + ) << \SHAR_EOF +58d4e646ee66ac7c470796bd6ce9e2a6 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service'` -ne 156 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service' is not 156" + fi +fi +# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service +M[[N_6U5N:71="D1E/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service': 'MD5 check failed' + ) << \SHAR_EOF +027a172fad275171647740477b78ca93 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service'` -ne 143 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service' is not 143" + fi +fi +# ============= cloud_scripts/etc/systemd/system/cloud.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud.service' && +[Unit] +Description=CloudStack Agent service +After=cloud-early-config.service network.target cloud-postinit.service local-fs.target +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=simple +WorkingDirectory=/usr/local/cloud/systemvm +ExecStart=/usr/local/cloud/systemvm/_run.sh +Restart=on-failure +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/cloud.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud.service': 'MD5 check failed' + ) << \SHAR_EOF +b7eb67763e7d694ed98758faef961ac6 cloud_scripts/etc/systemd/system/cloud.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud.service'` -ne 298 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud.service' is not 298" + fi +fi +# ============= cloud_scripts/etc/systemd/system/open-vm-tools.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/open-vm-tools.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/open-vm-tools.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/open-vm-tools.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/open-vm-tools.service +M[[N_6U5N:71="D1E&5C4W1A/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/open-vm-tools.service': 'MD5 check failed' + ) << \SHAR_EOF +10af19a17cd3ee299f08c46bace0f56f cloud_scripts/etc/systemd/system/open-vm-tools.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/open-vm-tools.service'` -ne 280 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/open-vm-tools.service' is not 280" + fi +fi +# ============= cloud_scripts/etc/systemd/system/baremetal-vr.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/baremetal-vr.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/baremetal-vr.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/baremetal-vr.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/baremetal-vr.service' && +[Unit] +Description=CloudStack Baremetal VR service +After=network.target local-fs.target +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=simple +WorkingDirectory=/opt/cloud/bin +ExecStart=/usr/bin/python /opt/cloud/bin/baremetal-vr.py +Restart=on-failure +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/baremetal-vr.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/baremetal-vr.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/baremetal-vr.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/baremetal-vr.service': 'MD5 check failed' + ) << \SHAR_EOF +9fc2a325a709e7cf9ae4d4ec8b7e692a cloud_scripts/etc/systemd/system/baremetal-vr.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/baremetal-vr.service'` -ne 257 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/baremetal-vr.service' is not 257" + fi +fi +# ============= cloud_scripts/etc/systemd/system/xe-daemon.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/xe-daemon.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/xe-daemon.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/xe-daemon.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/xe-daemon.service +M[[N_6U5N:71="D1E&5N+FUO=6YT"D)E9F]R93UN971W;W)K+G1A +M2UC;VYF:6&5C +M4W1A&5C4W1A3UM=6QT:2UU/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/xe-daemon.service': 'MD5 check failed' + ) << \SHAR_EOF +51e30000a8c2d2a91ba1a372bc40a628 cloud_scripts/etc/systemd/system/xe-daemon.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/xe-daemon.service'` -ne 398 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/xe-daemon.service' is not 398" + fi +fi +# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service +M[[N_6U5N:71="D1E5]D865M;VX@+6X*"EM);G-T86QL70I786YT961">3UM=6QT:2UU +*/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service': 'MD5 check failed' + ) << \SHAR_EOF +b1d4d295d2f3dff1ed1e13835e365e86 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service'` -ne 190 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service' is not 190" + fi +fi +# ============= cloud_scripts/etc/systemd/system/cloud-early-config.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-early-config.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-early-config.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-early-config.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-early-config.service' && +[Unit] +Description=CloudStack post-boot patching service using cmdline +DefaultDependencies=no +X +Before=network-pre.target +Wants=network-pre.target +X +Requires=local-fs.target +After=local-fs.target +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=oneshot +ExecStart=/opt/cloud/bin/setup/cloud-early-config +RemainAfterExit=true +TimeoutStartSec=5min +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-early-config.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/cloud-early-config.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-early-config.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-early-config.service': 'MD5 check failed' + ) << \SHAR_EOF +60723561261aa16ed4477c5e02c52bcd cloud_scripts/etc/systemd/system/cloud-early-config.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-early-config.service'` -ne 348 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-early-config.service' is not 348" + fi +fi +# ============= cloud_scripts/etc/systemd/system/cloud-password-server@.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-password-server@.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-password-server@.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' && +[Unit] +Description=Cloud password server on %I +After=network.target local-fs.target +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=simple +WorkingDirectory=/opt/cloud/bin +ExecStart=/opt/cloud/bin/passwd_server_ip.py %I +Restart=on-failure +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-password-server@.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-password-server@.service': 'MD5 check failed' + ) << \SHAR_EOF +3edb13a39635749f16f0579b481c5f25 cloud_scripts/etc/systemd/system/cloud-password-server@.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-password-server@.service'` -ne 244 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' is not 244" + fi +fi +# ============= cloud_scripts/etc/systemd/system/cloud-postinit.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-postinit.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-postinit.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-postinit.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-postinit.service' && +[Unit] +Description=CloudStack post-patching init script +After=cloud-early-config.service network.target local-fs.target +Before=ssh.service +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=oneshot +ExecStart=/opt/cloud/bin/setup/postinit.sh +RemainAfterExit=true +TimeoutStartSec=10min +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-postinit.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/cloud-postinit.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-postinit.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-postinit.service': 'MD5 check failed' + ) << \SHAR_EOF +22b48cd2a7478d27cb155d32cc2610cb cloud_scripts/etc/systemd/system/cloud-postinit.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-postinit.service'` -ne 287 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-postinit.service' is not 287" + fi +fi +# ============= cloud_scripts/etc/iptables/rules ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/rules' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/rules (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/rules (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/rules' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT +-A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT +-A INPUT -i eth0 -p tcp -m state --state NEW --dport 8080 -j ACCEPT +-A INPUT -i eth0 -p tcp -m state --state NEW --dport 80 -j ACCEPT +-A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth0 -o eth2 -j ACCEPT +-A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/rules' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/rules' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/rules failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/rules': 'MD5 check failed' + ) << \SHAR_EOF +e2be370a53cd4e436ce4c298b16ead21 cloud_scripts/etc/iptables/rules +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/rules'` -ne 1731 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/rules' is not 1731" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-consoleproxy ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-consoleproxy' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-consoleproxy (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-consoleproxy (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-consoleproxy' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp --icmp-type 13 -j DROP +-A INPUT -p icmp -j ACCEPT +-A INPUT -i eth1 -p tcp -m state --state NEW -m tcp --dport 3922 -j ACCEPT +-A INPUT -i eth0 -p tcp -m state --state NEW -m tcp --dport 8001 -j ACCEPT +-A INPUT -i eth1 -p tcp -m state --state NEW -m tcp --dport 8001 -j ACCEPT +-A INPUT -i eth2 -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT +-A INPUT -i eth2 -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-consoleproxy' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/iptables-consoleproxy' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-consoleproxy failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-consoleproxy': 'MD5 check failed' + ) << \SHAR_EOF +2840365dad7fe832ea35d8f72a3bfdca cloud_scripts/etc/iptables/iptables-consoleproxy +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-consoleproxy'` -ne 1601 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-consoleproxy' is not 1601" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-router ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-router' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-router (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-router (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-router' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +:FW_EGRESS_RULES - [0:0] +:FW_OUTBOUND - [0:0] +-A INPUT -d 224.0.0.18/32 -j ACCEPT +-A INPUT -d 225.0.0.50/32 -j ACCEPT +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT +-A INPUT -i eth1 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp -m state --state NEW --dport 80 -j ACCEPT +-A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth0 -o eth0 -m state --state NEW -j ACCEPT +-A FORWARD -i eth0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth0 -o eth2 -j FW_OUTBOUND +-A FW_EGRESS_RULES -j ACCEPT +-I FW_OUTBOUND -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FW_OUTBOUND -j FW_EGRESS_RULES +COMMIT +*mangle +:PREROUTING ACCEPT [0:0] +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +-A PREROUTING -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark +-A POSTROUTING -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-router' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/iptables-router' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-router failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-router': 'MD5 check failed' + ) << \SHAR_EOF +aeabe6897f9969f64a87b793deee6500 cloud_scripts/etc/iptables/iptables-router +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-router'` -ne 2348 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-router' is not 2348" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-vpcrouter ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-vpcrouter' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-vpcrouter (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-vpcrouter (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-vpcrouter' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -d 224.0.0.18/32 -j ACCEPT +-A INPUT -d 225.0.0.50/32 -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT +-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT +-A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT +COMMIT +*mangle +:PREROUTING ACCEPT [0:0] +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +-A OUTPUT -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-vpcrouter' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/iptables-vpcrouter' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-vpcrouter failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-vpcrouter': 'MD5 check failed' + ) << \SHAR_EOF +f3e4459f3b0eea8f2de2a6f01ef79866 cloud_scripts/etc/iptables/iptables-vpcrouter +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-vpcrouter'` -ne 1465 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-vpcrouter' is not 1465" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-dhcpsrvr ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-dhcpsrvr (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-dhcpsrvr (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +:FW_EGRESS_RULES - [0:0] +:FW_OUTBOUND - [0:0] +-A INPUT -d 224.0.0.18/32 -j ACCEPT +-A INPUT -d 225.0.0.50/32 -j ACCEPT +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT +-A INPUT -i eth1 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp -m state --state NEW --dport 80 -j ACCEPT +-A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth0 -o eth0 -m state --state NEW -j ACCEPT +-A FORWARD -i eth0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth0 -o eth2 -j FW_OUTBOUND +-A FW_EGRESS_RULES -j ACCEPT +-I FW_OUTBOUND -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FW_OUTBOUND -j FW_EGRESS_RULES +COMMIT +*mangle +:PREROUTING ACCEPT [0:0] +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +-A PREROUTING -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark +-A POSTROUTING -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-dhcpsrvr failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-dhcpsrvr': 'MD5 check failed' + ) << \SHAR_EOF +aeabe6897f9969f64a87b793deee6500 cloud_scripts/etc/iptables/iptables-dhcpsrvr +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-dhcpsrvr'` -ne 2348 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' is not 2348" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-elbvm ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-elbvm' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-elbvm (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-elbvm (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-elbvm' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-elbvm' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/iptables/iptables-elbvm' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-elbvm failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-elbvm': 'MD5 check failed' + ) << \SHAR_EOF +7a950ed86376c0166c53943cdf68ccb2 cloud_scripts/etc/iptables/iptables-elbvm +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-elbvm'` -ne 1256 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-elbvm' is not 1256" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-secstorage ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-secstorage' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-secstorage (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-secstorage (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-secstorage' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +:HTTP - [0:0] +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth3 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -p icmp --icmp-type 13 -j DROP +-A INPUT -p icmp -j ACCEPT +-A INPUT -i eth0 -p tcp -m state --state NEW --dport 3922 -j ACCEPT +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-secstorage' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/iptables/iptables-secstorage' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-secstorage failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-secstorage': 'MD5 check failed' + ) << \SHAR_EOF +d031185b81ee7ee008b80d434d44b61d cloud_scripts/etc/iptables/iptables-secstorage +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-secstorage'` -ne 1375 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-secstorage' is not 1375" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-ilbvm ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-ilbvm' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-ilbvm (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-ilbvm (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-ilbvm' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-ilbvm' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/iptables/iptables-ilbvm' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-ilbvm failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-ilbvm': 'MD5 check failed' + ) << \SHAR_EOF +85129e942bc07d1fb67e0e169238c345 cloud_scripts/etc/iptables/iptables-ilbvm +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-ilbvm'` -ne 1192 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-ilbvm' is not 1192" + fi +fi +# ============= cloud_scripts/etc/iptables/rt_tables_init ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/rt_tables_init' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/rt_tables_init (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/rt_tables_init (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/rt_tables_init' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +# +# reserved values +# +255 local +254 main +253 default +0 unspec +# +# local +# +#1 inr.ruhep +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/rt_tables_init' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/rt_tables_init' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/rt_tables_init failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/rt_tables_init': 'MD5 check failed' + ) << \SHAR_EOF +86477f42d18121a176751c7284251089 cloud_scripts/etc/iptables/rt_tables_init +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/rt_tables_init'` -ne 897 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/rt_tables_init' is not 897" + fi +fi +# ============= cloud_scripts/etc/sysctl.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/sysctl.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/sysctl.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/sysctl.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/sysctl.conf' && +# Kernel sysctl configuration file +# +# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and +# sysctl.conf(5) for more details. +# @VERSION@ +X +# Controls IP packet forwarding +net.ipv4.ip_forward = 1 +X +# Controls source route verification +net.ipv4.conf.default.rp_filter = 0 +X +# Do not accept source routing +net.ipv4.conf.default.accept_source_route = 0 +X +# Respect local interface in ARP interactions +net.ipv4.conf.default.arp_announce = 2 +net.ipv4.conf.default.arp_ignore = 2 +net.ipv4.conf.all.arp_announce = 2 +net.ipv4.conf.all.arp_ignore = 2 +X +# IPSec NETKEY -- avoid bogus redirects +net.ipv4.conf.all.accept_redirects = 0 +net.ipv4.conf.default.accept_redirects = 0 +net.ipv4.conf.all.send_redirects = 0 +net.ipv4.conf.default.send_redirects = 0 +net.ipv4.conf.all.secure_redirects = 0 +net.ipv4.conf.default.secure_redirects = 0 +X +# For smooth transition of the vip address in case of a keepalived failover +net.ipv4.ip_nonlocal_bind = 1 +X +# Controls the System Request debugging functionality of the kernel +kernel.sysrq = 0 +X +# Controls whether core dumps will append the PID to the core filename. +# Useful for debugging multi-threaded applications. +kernel.core_uses_pid = 1 +X +# A better way for the instance to die +kernel.panic = 10 +kernel.panic_on_oops = 1 +vm.panic_on_oom = 1 +X +# Controls the use of TCP syncookies +net.ipv4.tcp_syncookies = 1 +X +# disable tcp time stamps +net.ipv4.tcp_timestamps = 0 +X +net.ipv4.tcp_tw_reuse = 1 +net.ipv4.tcp_max_tw_buckets = 1000000 +net.core.somaxconn = 65535 +net.nf_conntrack_max = 1000000 +net.netfilter.nf_conntrack_max = 1000000 +X +# Disable IPv6 +net.ipv6.conf.all.disable_ipv6 = 1 +net.ipv6.conf.all.forwarding = 0 +net.ipv6.conf.all.accept_ra = 0 +net.ipv6.conf.all.accept_redirects = 0 +net.ipv6.conf.all.autoconf = 0 +X +# Minimum swappiness without disabling it +vm.swappiness=1 +X +# make the kernel more aggressive in reclaiming RAM from the disk and swap caches +vm.vfs_cache_pressure = 200 +X +# try to maintain 'free' memory thereby reducing the size of disk cache, hence reducing swapping. +vm.min_free_kbytes = 20480 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/sysctl.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/sysctl.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/sysctl.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/sysctl.conf': 'MD5 check failed' + ) << \SHAR_EOF +f1cef50b7a8a7cc7a7a24ff08cbea1f8 cloud_scripts/etc/sysctl.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/sysctl.conf'` -ne 2049 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/sysctl.conf' is not 2049" + fi +fi +# ============= cloud_scripts/etc/xl2tpd/xl2tpd.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/xl2tpd/xl2tpd.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/xl2tpd/xl2tpd.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' && +[lns default] +ip range = 10.1.9.2-10.1.9.8 +local ip = 10.1.9.1 +require chap = yes +refuse pap = yes +pppoptfile = /etc/ppp/options.xl2tpd +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/xl2tpd/xl2tpd.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/xl2tpd/xl2tpd.conf': 'MD5 check failed' + ) << \SHAR_EOF +060f03388ae34c64f85a45f47c9f6d48 cloud_scripts/etc/xl2tpd/xl2tpd.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/xl2tpd/xl2tpd.conf'` -ne 139 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' is not 139" + fi +fi +# ============= cloud_scripts/etc/dnsmasq.conf.tmpl ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/dnsmasq.conf.tmpl' +then +${echo} "x - SKIPPING cloud_scripts/etc/dnsmasq.conf.tmpl (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/dnsmasq.conf.tmpl (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/dnsmasq.conf.tmpl' && +# Configuration file for dnsmasq. +# +# Format is one option per line, legal options are the same +# as the long options legal on the command line. See +# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. +X +# Listen on this specific port instead of the standard DNS port +# (53). Setting this to zero completely disables DNS function, +# leaving only DHCP and/or TFTP. +#port=5353 +X +# The following two options make you a better netizen, since they +# tell dnsmasq to filter out queries which the public DNS cannot +# answer, and which load the servers (especially the root servers) +# unnecessarily. If you have a dial-on-demand link they also stop +# these requests from bringing up the link unnecessarily. +X +# Never forward plain names (without a dot or domain part) +domain-needed +# Never forward addresses in the non-routed address spaces. +bogus-priv +X +X +# Uncomment this to filter useless windows-originated DNS requests +# which can trigger dial-on-demand links needlessly. +# Note that (amongst other things) this blocks all SRV requests, +# so don't use it if you use eg Kerberos, SIP, XMMP or Google-talk. +# This option only affects forwarding, SRV records originating for +# dnsmasq (via srv-host= lines) are not suppressed by it. +# filterwin2k +X +# Change this line if you want dns to get its upstream servers from +# somewhere other that /etc/resolv.conf +resolv-file=/etc/dnsmasq-resolv.conf +X +# By default, dnsmasq will send queries to any of the upstream +# servers it knows about and tries to favour servers to are known +# to be up. Uncommenting this forces dnsmasq to try each query +# with each server strictly in the order they appear in +# /etc/resolv.conf +#strict-order +X +# If you don't want dnsmasq to read /etc/resolv.conf or any other +# file, getting its servers from this file instead (see below), then +# uncomment this. +#no-resolv +X +# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv +# files for changes and re-read them then uncomment this. +#no-poll +X +# Add other name servers here, with domain specs if they are for +# non-public domains. +#server=/localnet/192.168.0.1 +X +# Example of routing PTR queries to nameservers: this will send all +# address->name queries for 192.168.3/24 to nameserver 10.1.2.3 +#server=/3.168.192.in-addr.arpa/10.1.2.3 +X +# Add local-only domains here, queries in these domains are answered +# from /etc/hosts or DHCP only. +local=/2.vmops-test.vmops.com/ +X +# Add domains which you want to force to an IP address here. +# The example below send any host in double-click.net to a local +# web-server. +#address=/double-click.net/127.0.0.1 +X +# --address (and --server) work with IPv6 addresses too. +#address=/www.thekelleys.org.uk/fe80::20d:60ff:fe36:f83 +X +# You can control how dnsmasq talks to a server: this forces +# queries to 10.1.2.3 to be routed via eth1 +# server=10.1.2.3@eth1 +X +# and this sets the source (ie local) address used to talk to +# 10.1.2.3 to 192.168.1.1 port 55 (there must be a interface with that +# IP on the machine, obviously). +# server=10.1.2.3@192.168.1.1#55 +X +# If you want dnsmasq to change uid and gid to something other +# than the default, edit the following lines. +#user= +#group= +X +# If you want dnsmasq to listen for DHCP and DNS requests only on +# specified interfaces (and the loopback) give the name of the +# interface (eg eth0) here. +# Repeat the line for more than one interface. +#interface=eth0 +# Or you can specify which interface _not_ to listen on +except-interface=eth1 +except-interface=eth2 +except-interface=lo +# Or which to listen on by address (remember to include 127.0.0.1 if +# you use this.) +#listen-address= +# If you want dnsmasq to provide only DNS service on an interface, +# configure it as shown above, and then use the following line to +# disable DHCP and TFTP on it. +no-dhcp-interface=eth1 +no-dhcp-interface=eth2 +X +# On systems which support it, dnsmasq binds the wildcard address, +# even when it is listening on only some interfaces. It then discards +# requests that it shouldn't reply to. This has the advantage of +# working even when interfaces come and go and change address. If you +# want dnsmasq to really bind only the interfaces it is listening on, +# uncomment this option. About the only time you may need this is when +# running another nameserver on the same machine. +#bind-interfaces +X +# If you don't want dnsmasq to read /etc/hosts, uncomment the +# following line. +#no-hosts +# or if you want it to read another file, as well as /etc/hosts, use +# this. +#addn-hosts=/etc/banner_add_hosts +X +# Set this (and domain: see below) if you want to have a domain +# automatically added to simple names in a hosts-file. +expand-hosts +X +# Set the domain for dnsmasq. this is optional, but if it is set, it +# does the following things. +# 1) Allows DHCP hosts to have fully qualified domain names, as long +# as the domain part matches this setting. +# 2) Sets the "domain" DHCP option thereby potentially setting the +# domain of all systems configured by DHCP +# 3) Provides the domain part for "expand-hosts" +domain=2.vmops-test.vmops.com +X +# Set a different domain for a particular subnet +#domain=wireless.thekelleys.org.uk,192.168.2.0/24 +X +# Same idea, but range rather then subnet +#domain=reserved.thekelleys.org.uk,192.68.3.100,192.168.3.200 +X +# Uncomment this to enable the integrated DHCP server, you need +# to supply the range of addresses available for lease and optionally +# a lease time. If you have more than one network, you will need to +# repeat this for each network on which you want to supply DHCP +# service. +dhcp-range_ip4=10.1.1.1,static +dhcp-range_ip6=::1,static +dhcp-hostsfile=/etc/dhcphosts.txt +X +# This is an example of a DHCP range where the netmask is given. This +# is needed for networks we reach the dnsmasq DHCP server via a relay +# agent. If you don't know what a DHCP relay agent is, you probably +# don't need to worry about this. +#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h +X +# This is an example of a DHCP range which sets a tag, so that +# some DHCP options may be set only for this network. +#dhcp-range=set:red,192.168.0.50,192.168.0.150 +X +# Use this DHCP range only when the tag "green" is set. +#dhcp-range=tag:green,192.168.0.50,192.168.0.150,12h +X +# Specify a subnet which can't be used for dynamic address allocation, +# is available for hosts with matching --dhcp-host lines. Note that +# dhcp-host declarations will be ignored unless there is a dhcp-range +# of some type for the subnet in question. +# In this case the netmask is implied (it comes from the network +# configuration on the machine running dnsmasq) it is possible to give +# an explicit netmask instead. +#dhcp-range=192.168.0.0,static +X +# Enable DHCPv6. Note that the prefix-length does not need to be specified +# and defaults to 64 if missing/ +#dhcp-range=1234::2, 1234::500, 64, 12h +X +# Do Router Advertisements, BUT NOT DHCP for this subnet. +#dhcp-range=1234::, ra-only +X +# Do Router Advertisements, BUT NOT DHCP for this subnet, also try and +# add names to the DNS for the IPv6 address of SLAAC-configured dual-stack +# hosts. Use the DHCPv4 lease to derive the name, network segment and +# MAC address and assume that the host will also have an +# IPv6 address calculated using the SLAAC alogrithm. +#dhcp-range=1234::, ra-names +X +# Do Router Advertisements, BUT NOT DHCP for this subnet. +# Set the lifetime to 46 hours. (Note: minimum lifetime is 2 hours.) +#dhcp-range=1234::, ra-only, 48h +X +# Do DHCP and Router Advertisements for this subnet. Set the A bit in the RA +# so that clients can use SLAAC addresses as well as DHCP ones. +#dhcp-range=1234::2, 1234::500, slaac +X +# Do Router Advertisements and stateless DHCP for this subnet. Clients will +# not get addresses from DHCP, but they will get other configuration information. +# They will use SLAAC for addresses. +#dhcp-range=1234::, ra-stateless +X +# Do stateless DHCP, SLAAC, and generate DNS names for SLAAC addresses +# from DHCPv4 leases. +#dhcp-range=1234::, ra-stateless, ra-names +X +# Do router advertisements for all subnets where we're doing DHCPv6 +# Unless overriden by ra-stateless, ra-names, et al, the router +# advertisements will have the M and O bits set, so that the clients +# get addresses and configuration from DHCPv6, and the A bit reset, so the +# clients don't use SLAAC addresses. +#enable-ra +X +# Supply parameters for specified hosts using DHCP. There are lots +# of valid alternatives, so we will give examples of each. Note that +# IP addresses DO NOT have to be in the range given above, they just +# need to be on the same network. The order of the parameters in these +# do not matter, it's permissible to give name, address and MAC in any +# order. +X +# Always allocate the host with Ethernet address 11:22:33:44:55:66 +# The IP address 192.168.0.60 +#dhcp-host=11:22:33:44:55:66,192.168.0.60 +X +# Always set the name of the host with hardware address +# 11:22:33:44:55:66 to be "fred" +#dhcp-host=11:22:33:44:55:66,fred +X +# Always give the host with Ethernet address 11:22:33:44:55:66 +# the name fred and IP address 192.168.0.60 and lease time 45 minutes +#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m +X +# Give a host with Ethernet address 11:22:33:44:55:66 or +# 12:34:56:78:90:12 the IP address 192.168.0.60. Dnsmasq will assume +# that these two Ethernet interfaces will never be in use at the same +# time, and give the IP address to the second, even if it is already +# in use by the first. Useful for laptops with wired and wireless +# addresses. +#dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.60 +X +# Give the machine which says its name is "bert" IP address +# 192.168.0.70 and an infinite lease +#dhcp-host=bert,192.168.0.70,infinite +X +# Always give the host with client identifier 01:02:02:04 +# the IP address 192.168.0.60 +#dhcp-host=id:01:02:02:04,192.168.0.60 +X +# Always give the host with client identifier "marjorie" +# the IP address 192.168.0.60 +#dhcp-host=id:marjorie,192.168.0.60 +X +# Enable the address given for "judge" in /etc/hosts +# to be given to a machine presenting the name "judge" when +# it asks for a DHCP lease. +#dhcp-host=judge +X +# Never offer DHCP service to a machine whose Ethernet +# address is 11:22:33:44:55:66 +#dhcp-host=11:22:33:44:55:66,ignore +X +# Ignore any client-id presented by the machine with Ethernet +# address 11:22:33:44:55:66. This is useful to prevent a machine +# being treated differently when running under different OS's or +# between PXE boot and OS boot. +#dhcp-host=11:22:33:44:55:66,id:* +X +# Send extra options which are tagged as "red" to +# the machine with Ethernet address 11:22:33:44:55:66 +#dhcp-host=11:22:33:44:55:66,set:red +X +# Send extra options which are tagged as "red" to +# any machine with Ethernet address starting 11:22:33: +#dhcp-host=11:22:33:*:*:*,set:red +X +# Give a fixed IPv6 address and name to client with +# DUID 00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2 +# Note the MAC addresses CANNOT be used to identify DHCPv6 clients. +# Note also the they [] around the IPv6 address are obilgatory. +#dhcp-host=id:00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2, fred, [1234::5] +X +# Ignore any clients which are not specified in dhcp-host lines +# or /etc/ethers. Equivalent to ISC "deny unknown-clients". +# This relies on the special "known" tag which is set when +# a host is matched. +# +# When using bridged networks in ACS this prevents ack to DHCPINFORM etc. request +dhcp-ignore=tag:!known +X +# Send extra options which are tagged as "red" to any machine whose +# DHCP vendorclass string includes the substring "Linux" +#dhcp-vendorclass=set:red,Linux +X +# Send extra options which are tagged as "red" to any machine one +# of whose DHCP userclass strings includes the substring "accounts" +#dhcp-userclass=set:red,accounts +X +# Send extra options which are tagged as "red" to any machine whose +# MAC address matches the pattern. +#dhcp-mac=set:red,00:60:8C:*:*:* +X +# If this line is uncommented, dnsmasq will read /etc/ethers and act +# on the ethernet-address/IP pairs found there just as if they had +# been given as --dhcp-host options. Useful if you keep +# MAC-address/host mappings there for other purposes. +#read-ethers +X +# Send options to hosts which ask for a DHCP lease. +# See RFC 2132 for details of available options. +# Common options can be given to dnsmasq by name: +# run "dnsmasq --help dhcp" to get a list. +# Note that all the common settings, such as netmask and +# broadcast address, DNS server and default route, are given +# sane defaults by dnsmasq. You very likely will not need +# any dhcp-options. If you use Windows clients and Samba, there +# are some options which are recommended, they are detailed at the +# end of this section. +X +# Override the default route supplied by dnsmasq, which assumes the +# router is the same machine as the one running dnsmasq. +#dhcp-option=3,1.2.3.4 +X +# Do the same thing, but using the option name +#dhcp-option=option:router,1.2.3.4 +X +# Override the default route supplied by dnsmasq and send no default +# route at all. Note that this only works for the options sent by +# default (1, 3, 6, 12, 28) the same line will send a zero-length option +# for all other option numbers. +#dhcp-option=3 +X +# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 +#dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5 +X +# Send DHCPv6 option. Note [] around IPv6 addresses. +#dhcp-option=option6:dns-server,[1234::77],[1234::88] +X +# Send DHCPv6 option for namservers as the machine running +# dnsmasq and another. +#dhcp-option=option6:dns-server,[::],[1234::88] +X +# Set the NTP time server address to be the same machine as +# is running dnsmasq +#dhcp-option=42,0.0.0.0 +X +# Set the NIS domain name to "welly" +#dhcp-option=40,welly +X +# Set the default time-to-live to 50 +#dhcp-option=23,50 +X +# Set the "all subnets are local" flag +#dhcp-option=27,1 +X +# Set the domain +dhcp-option=15,"2.vmops-test.vmops.com" +X +# Send the etherboot magic flag and then etherboot options (a string). +#dhcp-option=128,e4:45:74:68:00:00 +#dhcp-option=129,NIC=eepro100 +X +# Specify an option which will only be sent to the "red" network +# (see dhcp-range for the declaration of the "red" network) +# Note that the tag: part must precede the option: part. +#dhcp-option = tag:red, option:ntp-server, 192.168.1.1 +X +# The following DHCP options set up dnsmasq in the same way as is specified +# for the ISC dhcpcd in +# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt +# adapted for a typical dnsmasq installation where the host running +# dnsmasq is also the host running samba. +# you may want to uncomment some or all of them if you use +# Windows clients and Samba. +#dhcp-option=19,0 # option ip-forwarding off +#dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) +#dhcp-option=45,0.0.0.0 # netbios datagram distribution server +#dhcp-option=46,8 # netbios node type +X +# Send an empty WPAD option. This may be REQUIRED to get windows 7 to behave. +#dhcp-option=252,"\n" +X +# Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client +# probably doesn't support this...... +#dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com +X +# Send RFC-3442 classless static routes (note the netmask encoding) +#dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8 +X +# Send vendor-class specific options encapsulated in DHCP option 43. +# The meaning of the options is defined by the vendor-class so +# options are sent only when the client supplied vendor class +# matches the class given here. (A substring match is OK, so "MSFT" +# matches "MSFT" and "MSFT 5.0"). This example sets the +# mtftp address to 0.0.0.0 for PXEClients. +#dhcp-option=vendor:PXEClient,1,0.0.0.0 +X +# Send microsoft-specific option to tell windows to release the DHCP lease +# when it shuts down. Note the "i" flag, to tell dnsmasq to send the +# value as a four-byte integer - that's what microsoft wants. See +# http://technet2.microsoft.com/WindowsServer/en/library/a70f1bb7-d2d4-49f0-96d6-4b7414ecfaae1033.mspx?mfr=true +dhcp-option=vendor:MSFT,2,1i +X +# Send the Encapsulated-vendor-class ID needed by some configurations of +# Etherboot to allow is to recognise the DHCP server. +#dhcp-option=vendor:Etherboot,60,"Etherboot" +X +# Send options to PXELinux. Note that we need to send the options even +# though they don't appear in the parameter request list, so we need +# to use dhcp-option-force here. +# See http://syslinux.zytor.com/pxe.php#special for details. +# Magic number - needed before anything else is recognised +#dhcp-option-force=208,f1:00:74:7e +# Configuration file name +#dhcp-option-force=209,configs/common +# Path prefix +#dhcp-option-force=210,/tftpboot/pxelinux/files/ +# Reboot time. (Note 'i' to send 32-bit value) +#dhcp-option-force=211,30i +X +# Set the boot filename for netboot/PXE. You will only need +# this is you want to boot machines over the network and you will need +# a TFTP server; either dnsmasq's built in TFTP server or an +# external one. (See below for how to enable the TFTP server.) +dhcp-boot=pxelinux.0 +X +# The same as above, but use custom tftp-server instead machine running dnsmasq +#dhcp-boot=pxelinux,server.name,192.168.1.100 +X +# Boot for Etherboot gPXE. The idea is to send two different +# filenames, the first loads gPXE, and the second tells gPXE what to +# load. The dhcp-match sets the gpxe tag for requests from gPXE. +#dhcp-match=set:gpxe,175 # gPXE sends a 175 option. +#dhcp-boot=tag:!gpxe,undionly.kpxe +#dhcp-boot=mybootimage +X +# Encapsulated options for Etherboot gPXE. All the options are +# encapsulated within option 175 +#dhcp-option=encap:175, 1, 5b # priority code +#dhcp-option=encap:175, 176, 1b # no-proxydhcp +#dhcp-option=encap:175, 177, string # bus-id +#dhcp-option=encap:175, 189, 1b # BIOS drive code +#dhcp-option=encap:175, 190, user # iSCSI username +#dhcp-option=encap:175, 191, pass # iSCSI password +X +# Test for the architecture of a netboot client. PXE clients are +# supposed to send their architecture as option 93. (See RFC 4578) +#dhcp-match=peecees, option:client-arch, 0 #x86-32 +#dhcp-match=itanics, option:client-arch, 2 #IA64 +#dhcp-match=hammers, option:client-arch, 6 #x86-64 +#dhcp-match=mactels, option:client-arch, 7 #EFI x86-64 +X +# Do real PXE, rather than just booting a single file, this is an +# alternative to dhcp-boot. +#pxe-prompt="What system shall I netboot?" +# or with timeout before first available action is taken: +#pxe-prompt="Press F8 for menu.", 60 +X +# Available boot services. for PXE. +#pxe-service=x86PC, "Boot from local disk" +X +# Loads /pxelinux.0 from dnsmasq TFTP server. +#pxe-service=x86PC, "Install Linux", pxelinux +X +# Loads /pxelinux.0 from TFTP server at 1.2.3.4. +# Beware this fails on old PXE ROMS. +#pxe-service=x86PC, "Install Linux", pxelinux, 1.2.3.4 +X +# Use bootserver on network, found my multicast or broadcast. +#pxe-service=x86PC, "Install windows from RIS server", 1 +X +# Use bootserver at a known IP address. +#pxe-service=x86PC, "Install windows from RIS server", 1, 1.2.3.4 +X +# If you have multicast-FTP available, +# information for that can be passed in a similar way using options 1 +# to 5. See page 19 of +# http://download.intel.com/design/archives/wfm/downloads/pxespec.pdf +X +X +# Enable dnsmasq's built-in TFTP server +enable-tftp +X +# Set the root directory for files available via FTP. +tftp-root=/opt/tftpboot +X +# Make the TFTP server more secure: with this set, only files owned by +# the user dnsmasq is running as will be send over the net. +#tftp-secure +X +# This option stops dnsmasq from negotiating a larger blocksize for TFTP +# transfers. It will slow things down, but may rescue some broken TFTP +# clients. +#tftp-no-blocksize +X +# Set the boot file name only when the "red" tag is set. +#dhcp-boot=net:red,pxelinux.red-net +X +# An example of dhcp-boot with an external TFTP server: the name and IP +# address of the server are given after the filename. +# Can fail with old PXE ROMS. Overridden by --pxe-service. +#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 +X +# If there are multiple external tftp servers having a same name +# (using /etc/hosts) then that name can be specified as the +# tftp_servername (the third option to dhcp-boot) and in that +# case dnsmasq resolves this name and returns the resultant IP +# addresses in round robin fasion. This facility can be used to +# load balance the tftp load among a set of servers. +#dhcp-boot=/var/ftpd/pxelinux.0,boothost,tftp_server_name +X +# Set the limit on DHCP leases, the default is 150 +dhcp-lease-max=2100 +X +# The DHCP server needs somewhere on disk to keep its lease database. +# This defaults to a sane location, but if you want to change it, use +# the line below. +#dhcp-leasefile=/var/lib/misc/dnsmasq.leases +leasefile-ro +X +# Set the DHCP server to authoritative mode. In this mode it will barge in +# and take over the lease for any client which broadcasts on the network, +# whether it has a record of the lease or not. This avoids long timeouts +# when a machine wakes up on a new network. DO NOT enable this if there's +# the slightest chance that you might end up accidentally configuring a DHCP +# server for your campus/company accidentally. The ISC server uses +# the same option, and this URL provides more information: +# http://www.isc.org/files/auth.html +#dhcp-authoritative +X +# Run an executable when a DHCP lease is created or destroyed. +# The arguments sent to the script are "add" or "del", +# then the MAC address, the IP address and finally the hostname +# if there is one. +#dhcp-script=/bin/echo +X +# Set the cachesize here. +#cache-size=150 +X +# If you want to disable negative caching, uncomment this. +#no-negcache +X +# Normally responses which come form /etc/hosts and the DHCP lease +# file have Time-To-Live set as zero, which conventionally means +# do not cache further. If you are happy to trade lower load on the +# server for potentially stale date, you can set a time-to-live (in +# seconds) here. +#local-ttl= +X +# If you want dnsmasq to detect attempts by Verisign to send queries +# to unregistered .com and .net hosts to its sitefinder service and +# have dnsmasq instead return the correct NXDOMAIN response, uncomment +# this line. You can add similar lines to do the same for other +# registries which have implemented wildcard A records. +#bogus-nxdomain=64.94.110.11 +X +# If you want to fix up DNS results from upstream servers, use the +# alias option. This only works for IPv4. +# This alias makes a result of 1.2.3.4 appear as 5.6.7.8 +#alias=1.2.3.4,5.6.7.8 +# and this maps 1.2.3.x to 5.6.7.x +#alias=1.2.3.0,5.6.7.0,255.255.255.0 +# and this maps 192.168.0.10->192.168.0.40 to 10.0.0.10->10.0.0.40 +#alias=192.168.0.10-192.168.0.40,10.0.0.0,255.255.255.0 +X +# Change these lines if you want dnsmasq to serve MX records. +X +# Return an MX record named "maildomain.com" with target +# servermachine.com and preference 50 +#mx-host=maildomain.com,servermachine.com,50 +X +# Set the default target for MX records created using the localmx option. +#mx-target=servermachine.com +X +# Return an MX record pointing to the mx-target for all local +# machines. +#localmx +X +# Return an MX record pointing to itself for all local machines. +#selfmx +X +# Change the following lines if you want dnsmasq to serve SRV +# records. These are useful if you want to serve ldap requests for +# Active Directory and other windows-originated DNS requests. +# See RFC 2782. +# You may add multiple srv-host lines. +# The fields are ,,,, +# If the domain part if missing from the name (so that is just has the +# service and protocol sections) then the domain given by the domain= +# config option is used. (Note that expand-hosts does not need to be +# set for this to work.) +X +# A SRV record sending LDAP for the example.com domain to +# ldapserver.example.com port 389 +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389 +X +# A SRV record sending LDAP for the example.com domain to +# ldapserver.example.com port 389 (using domain=) +#domain=example.com +#srv-host=_ldap._tcp,ldapserver.example.com,389 +X +# Two SRV records for LDAP, each with different priorities +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1 +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2 +X +# A SRV record indicating that there is no LDAP server for the domain +# example.com +#srv-host=_ldap._tcp.example.com +X +# The following line shows how to make dnsmasq serve an arbitrary PTR +# record. This is useful for DNS-SD. (Note that the +# domain-name expansion done for SRV records _does_not +# occur for PTR records.) +#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services" +X +# Change the following lines to enable dnsmasq to serve TXT records. +# These are used for things like SPF and zeroconf. (Note that the +# domain-name expansion done for SRV records _does_not +# occur for TXT records.) +X +#Example SPF. +#txt-record=example.com,"v=spf1 a -all" +X +#Example zeroconf +#txt-record=_http._tcp.example.com,name=value,paper=A4 +X +# Provide an alias for a "local" DNS name. Note that this _only_ works +# for targets which are names from DHCP or /etc/hosts. Give host +# "bert" another name, bertrand +#cname=bertand,bert +X +# For debugging purposes, log each DNS query as it passes through +# dnsmasq. +#log-queries +X +# Log lots of extra information about DHCP transactions. +#log-dhcp +X +log-facility=/var/log/dnsmasq.log +X +# Include a another lot of configuration options. +#conf-file=/etc/dnsmasq.more.conf +conf-dir=/etc/dnsmasq.d +X +dhcp-optsfile=/etc/dhcpopts.txt +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/dnsmasq.conf.tmpl' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/dnsmasq.conf.tmpl' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/dnsmasq.conf.tmpl failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/dnsmasq.conf.tmpl': 'MD5 check failed' + ) << \SHAR_EOF +a0f6d4fbdef769352c0b4c6aee0e5b0b cloud_scripts/etc/dnsmasq.conf.tmpl +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/dnsmasq.conf.tmpl'` -ne 25321 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/dnsmasq.conf.tmpl' is not 25321" + fi +fi +# ============= cloud_scripts/etc/cron.daily/clear_cache ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cron.daily/clear_cache' +then +${echo} "x - SKIPPING cloud_scripts/etc/cron.daily/clear_cache (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/cron.daily/clear_cache (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cron.daily/clear_cache' && +#!/bin/bash +X +# clear memory cache to ultimately reduce swapping +X +sync && echo 1 > /proc/sys/vm/drop_caches +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cron.daily/clear_cache' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/cron.daily/clear_cache' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/cron.daily/clear_cache failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cron.daily/clear_cache': 'MD5 check failed' + ) << \SHAR_EOF +7935ce340439ae62c8f12f337d420207 cloud_scripts/etc/cron.daily/clear_cache +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/cron.daily/clear_cache'` -ne 107 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/cron.daily/clear_cache' is not 107" + fi +fi +# ============= cloud_scripts/etc/vmware-tools/tools.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/vmware-tools/tools.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/vmware-tools/tools.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/vmware-tools/tools.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/vmware-tools/tools.conf' && +[logging] +# Turns on logging globally. It can still be disabled for each domain. +# log = true +X +# Disables core dumps on fatal errors; they're enabled by default. +enableCoreDump = false +X +# Defines the "vmsvc" domain, logging to file +# vmsvc.level = message +vmsvc.handler = file +# Setup file rotation - keep 3 files +vmsvc.maxOldLogFiles = 2 +# Max log file size kept: 1 MB +vmsvc.maxLogSize = 1 +X +# Defines the "vmtoolsd" domain, and disable logging for it. +# vmtoolsd.level = none +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/vmware-tools/tools.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/vmware-tools/tools.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/vmware-tools/tools.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/vmware-tools/tools.conf': 'MD5 check failed' + ) << \SHAR_EOF +4d08804e1a2d4526faeec6404c18fabe cloud_scripts/etc/vmware-tools/tools.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/vmware-tools/tools.conf'` -ne 477 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/vmware-tools/tools.conf' is not 477" + fi +fi +# ============= cloud_scripts/etc/logrotate.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.conf' && +# rotate log files daily +daily +# keep 3 days worth +rotate 3 +# create new (empty) log files after rotating old ones +create +# use date as a suffix of the rotated file +#dateext +# max size 50M +size 50M +compress +# RPM packages drop log rotation information into this directory +include /etc/logrotate.d +# no packages own wtmp and btmp -- we'll rotate them here +/var/log/wtmp { +X monthly +X create 0664 root utmp +X rotate 1 +} +/var/log/btmp { +X missingok +X monthly +X create 0600 root utmp +X rotate 1 +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.conf': 'MD5 check failed' + ) << \SHAR_EOF +2430f483d055288c92deb28733562d8f cloud_scripts/etc/logrotate.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.conf'` -ne 507 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.conf' is not 507" + fi +fi +# ============= cloud_scripts/etc/ssh/sshd_config ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ssh/sshd_config' +then +${echo} "x - SKIPPING cloud_scripts/etc/ssh/sshd_config (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/ssh/sshd_config (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ssh/sshd_config' && +# $OpenBSD: sshd_config,v 1.75 2007/03/19 01:01:29 djm Exp $ +X +# This is the sshd server system-wide configuration file. See +# sshd_config(5) for more information. +X +# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin +X +# The strategy used for options in the default sshd_config shipped with +# OpenSSH is to specify options with their default value where +# possible, but leave them commented. Uncommented options change a +# default value. +X +Port 3922 +#AddressFamily any +#ListenAddress 0.0.0.0 +X +# Disable legacy (protocol version 1) support in the server for new +# installations. In future the default will change to require explicit +# activation of protocol 1 +Protocol 2 +X +# HostKey for protocol version 1 +#HostKey /etc/ssh/ssh_host_key +# HostKeys for protocol version 2 +#HostKey /etc/ssh/ssh_host_rsa_key +#HostKey /etc/ssh/ssh_host_dsa_key +X +# Lifetime and size of ephemeral version 1 server key +#KeyRegenerationInterval 1h +#ServerKeyBits 768 +X +# Logging +# obsoletes QuietMode and FascistLogging +#SyslogFacility AUTH +SyslogFacility AUTHPRIV +#LogLevel INFO +X +# Authentication: +X +#LoginGraceTime 2m +PermitRootLogin yes +#StrictModes yes +#MaxAuthTries 6 +X +#RSAAuthentication yes +PubkeyAuthentication yes +AuthorizedKeysFile .ssh/authorized_keys +X +# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts +#RhostsRSAAuthentication no +# similar for protocol version 2 +#HostbasedAuthentication no +# Change to yes if you don't trust ~/.ssh/known_hosts for +# RhostsRSAAuthentication and HostbasedAuthentication +#IgnoreUserKnownHosts no +# Don't read the user's ~/.rhosts and ~/.shosts files +#IgnoreRhosts yes +X +# To disable tunneled clear text passwords, change to no here! +#PermitEmptyPasswords no +PasswordAuthentication no +X +# Change to no to disable s/key passwords +#ChallengeResponseAuthentication yes +ChallengeResponseAuthentication no +X +# Kerberos options +#KerberosAuthentication no +#KerberosOrLocalPasswd yes +#KerberosTicketCleanup yes +#KerberosGetAFSToken no +X +# GSSAPI options +#GSSAPIAuthentication no +GSSAPIAuthentication no +#GSSAPICleanupCredentials yes +GSSAPICleanupCredentials yes +X +# Set this to 'yes' to enable PAM authentication, account processing, +# and session processing. If this is enabled, PAM authentication will +# be allowed through the ChallengeResponseAuthentication and +# PasswordAuthentication. Depending on your PAM configuration, +# PAM authentication via ChallengeResponseAuthentication may bypass +# the setting of "PermitRootLogin without-password". +# If you just want the PAM account and session checks to run without +# PAM authentication, then enable this but set PasswordAuthentication +# and ChallengeResponseAuthentication to 'no'. +#UsePAM no +UsePAM yes +X +# Accept locale-related environment variables +AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES +AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT +AcceptEnv LC_IDENTIFICATION LC_ALL +#AllowTcpForwarding yes +#GatewayPorts no +#X11Forwarding no +#X11Forwarding yes +#X11DisplayOffset 10 +#X11UseLocalhost yes +#PrintMotd yes +#PrintLastLog yes +TCPKeepAlive yes +#UseLogin no +#UsePrivilegeSeparation yes +#PermitUserEnvironment no +#Compression delayed +#ClientAliveInterval 0 +#ClientAliveCountMax 3 +#ShowPatchLevel no +UseDNS no +#PidFile /var/run/sshd.pid +#PermitTunnel no +X +MaxStartups 1000 +MaxSessions 1000 +X +# no default banner path +#Banner /some/path +X +# override default of no subsystems +Subsystem sftp /usr/lib/openssh/sftp-server +X +# Example of overriding settings on a per-user basis +#Match User anoncvs +# X11Forwarding no +# AllowTcpForwarding no +# ForceCommand cvs server +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ssh/sshd_config' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/ssh/sshd_config' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/ssh/sshd_config failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ssh/sshd_config': 'MD5 check failed' + ) << \SHAR_EOF +842613e1f724e90888a90882ed1a5684 cloud_scripts/etc/ssh/sshd_config +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/ssh/sshd_config'` -ne 3603 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/ssh/sshd_config' is not 3603" + fi +fi +# ============= cloud_scripts/etc/ppp/options.xl2tpd ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ppp/options.xl2tpd' +then +${echo} "x - SKIPPING cloud_scripts/etc/ppp/options.xl2tpd (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/ppp/options.xl2tpd (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ppp/options.xl2tpd' && +proxyarp +ipcp-accept-local +ipcp-accept-remote +noccp +idle 1800 +auth +mtu 1410 +mru 1410 +nodefaultroute +debug +connect-delay 5000 +ms-dns 10.1.1.1 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ppp/options.xl2tpd' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/ppp/options.xl2tpd' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/ppp/options.xl2tpd failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ppp/options.xl2tpd': 'MD5 check failed' + ) << \SHAR_EOF +80ba26ac087aaf7f13cdc1fa8f985d72 cloud_scripts/etc/ppp/options.xl2tpd +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/ppp/options.xl2tpd'` -ne 141 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/ppp/options.xl2tpd' is not 141" + fi +fi +# ============= cloud_scripts/etc/ipsec.d/l2tp.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.d/l2tp.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/ipsec.d/l2tp.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/ipsec.d/l2tp.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.d/l2tp.conf' && +#ipsec remote access vpn configuration +conn L2TP-PSK +X authby=secret +X rekey=no +X keyingtries=3 +X leftfirewall=yes +X type=transport +X # +X # ---------------------------------------------------------- +X # The VPN server. +X # +X # Allow incoming connections on the external network interface. +X # If you want to use a different interface or if there is no +X # defaultroute, you can use: left=your.ip.addr.ess +X # +X left=172.26.0.151 +X # +X leftprotoport=udp/l2tp +X # If you insist on supporting non-updated Windows clients, +X # you can use: leftprotoport=17/%any +X # +X # ---------------------------------------------------------- +X # The remote user(s). +X # +X # Allow incoming connections only from this IP address. +X right=%any +X # If you want to allow multiple connections from any IP address, +X # you can use: right=%any +X # +X rightprotoport=udp/%any +X # +X # ---------------------------------------------------------- +X # Change 'ignore' to 'add' to enable this configuration. +X # +X rightsubnetwithin=0.0.0.0/0 +X auto=route +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.d/l2tp.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/ipsec.d/l2tp.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/ipsec.d/l2tp.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.d/l2tp.conf': 'MD5 check failed' + ) << \SHAR_EOF +8ca6cb315858c9ccf8c91374c4f32def cloud_scripts/etc/ipsec.d/l2tp.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.d/l2tp.conf'` -ne 1234 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.d/l2tp.conf' is not 1234" + fi +fi +# ============= cloud_scripts/etc/rsyslog.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/rsyslog.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/rsyslog.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/rsyslog.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/rsyslog.conf' && +# /etc/rsyslog.conf Configuration file for rsyslog. +# +# For more information see +# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html +X +X +################# +#### MODULES #### +################# +X +$ModLoad imuxsock # provides support for local system logging +$ModLoad imklog # provides kernel logging support (previously done by rklogd) +#$ModLoad immark # provides --MARK-- message capability +X +# provides UDP syslog reception +$ModLoad imudp +$UDPServerRun 3914 +X +# provides TCP syslog reception +#$ModLoad imtcp +#$InputTCPServerRun 514 +X +X +########################### +#### GLOBAL DIRECTIVES #### +########################### +X +# +# Use traditional timestamp format. +# To enable high precision timestamps, comment out the following line. +# +$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat +X +# +# Set the default permissions for all log files. +# +$FileOwner root +$FileGroup adm +$FileCreateMode 0640 +$DirCreateMode 0755 +$Umask 0022 +X +# +# Include all config files in /etc/rsyslog.d/ +# +$IncludeConfig /etc/rsyslog.d/*.conf +X +X +############### +#### RULES #### +############### +X +# +# First some standard log files. Log by facility. +# +auth,authpriv.* /var/log/auth.log +#*.*;auth,authpriv.none -/var/log/syslog +cron.* /var/log/cron.log +daemon.* -/var/log/daemon.log +kern.* -/var/log/kern.log +lpr.* -/var/log/lpr.log +mail.* -/var/log/mail.log +#user.* -/var/log/user.log +X +# +# Logging for the mail system. Split it up so that +# it is easy to write scripts to parse these files. +# +mail.info -/var/log/mail.info +mail.warn -/var/log/mail.warn +mail.err /var/log/mail.err +X +# +# Logging for INN news system. +# +news.crit /var/log/news/news.crit +news.err /var/log/news/news.err +news.notice -/var/log/news/news.notice +X +# +# Some "catch-all" log files. +# +#*.=debug;\ +# auth,authpriv.none;\ +# news.none;mail.none -/var/log/debug +*.=info;*.=notice;*.=warn;\ +X auth,authpriv.none;\ +X cron.none,daemon.none;\ +X local0.none,daemon.none;\ +X mail.none,news.none -/var/log/messages +X +# +# Emergencies are sent to everybody logged in. +# +*.emerg :omusrmsg:* +X +# +# I like to have messages displayed on the console, but only on a virtual +# console I usually leave idle. +# +#daemon,mail.*;\ +# news.=crit;news.=err;news.=notice;\ +# *.=debug;*.=info;\ +# *.=notice;*.=warn /dev/tty8 +X +local0.* -/var/log/haproxy.log +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/rsyslog.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/rsyslog.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/rsyslog.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/rsyslog.conf': 'MD5 check failed' + ) << \SHAR_EOF +1ae97a7bb7bd89a2a7c2e9507bd5c95f cloud_scripts/etc/rsyslog.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/rsyslog.conf'` -ne 2298 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/rsyslog.conf' is not 2298" + fi +fi +# ============= cloud_scripts/etc/modprobe.d/pcspkr.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/modprobe.d/pcspkr.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/modprobe.d/pcspkr.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/modprobe.d/pcspkr.conf (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/modprobe.d/pcspkr.conf +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/modprobe.d/pcspkr.conf': 'MD5 check failed' + ) << \SHAR_EOF +6dc1a7a74dfa22c4f3b37e8700b61658 cloud_scripts/etc/modprobe.d/pcspkr.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/modprobe.d/pcspkr.conf'` -ne 801 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/modprobe.d/pcspkr.conf' is not 801" + fi +fi +# ============= cloud_scripts/etc/modprobe.d/aesni_intel.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/modprobe.d/aesni_intel.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/modprobe.d/aesni_intel.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +blacklist aesni_intel +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/modprobe.d/aesni_intel.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/modprobe.d/aesni_intel.conf': 'MD5 check failed' + ) << \SHAR_EOF +45027ef77fea6dd170da8ea5e1ad1268 cloud_scripts/etc/modprobe.d/aesni_intel.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/modprobe.d/aesni_intel.conf'` -ne 807 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' is not 807" + fi +fi +# ============= cloud_scripts/etc/cron.hourly/clear_cache ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cron.hourly/clear_cache' +then +${echo} "x - SKIPPING cloud_scripts/etc/cron.hourly/clear_cache (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/cron.hourly/clear_cache (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cron.hourly/clear_cache' && +#!/bin/bash +X +# clear memory cache to ultimately reduce swapping +X +phymem=$(free|awk '/^Mem:/{print $2}') +if [ $phymem -lt 513000 ]; then +X sync && echo 1 > /proc/sys/vm/drop_caches +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cron.hourly/clear_cache' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/cron.hourly/clear_cache' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/cron.hourly/clear_cache failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cron.hourly/clear_cache': 'MD5 check failed' + ) << \SHAR_EOF +648c036aba1a5d72010bf11e0ec95147 cloud_scripts/etc/cron.hourly/clear_cache +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/cron.hourly/clear_cache'` -ne 183 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/cron.hourly/clear_cache' is not 183" + fi +fi +# ============= cloud_scripts/etc/apache2/conf-enabled/security.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/security.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/security.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/security.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/security.conf' && +ServerTokens Prod +ServerSignature Off +TraceEnable Off +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/security.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/security.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/security.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/security.conf': 'MD5 check failed' + ) << \SHAR_EOF +73e01a3d1cf4f93cb11afb4eb1a6f252 cloud_scripts/etc/apache2/conf-enabled/security.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/security.conf'` -ne 54 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/security.conf' is not 54" + fi +fi +# ============= cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' && +# event MPM +# StartServers: initial number of server processes to start +# MinSpareThreads: minimum number of worker threads which are kept spare +# MaxSpareThreads: maximum number of worker threads which are kept spare +# ThreadsPerChild: constant number of worker threads in each server process +# MaxRequestWorkers: maximum number of worker threads +# MaxConnectionsPerChild: maximum number of requests a server process serves + +X StartServers 1 +X MinSpareThreads 25 +X MaxSpareThreads 75 +X ThreadLimit 64 +X ThreadsPerChild 25 +X MaxRequestWorkers 30 +X MaxConnectionsPerChild 1000 + +X +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf': 'MD5 check failed' + ) << \SHAR_EOF +b05dce38d6618734e7f49eddcb8ac131 cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf'` -ne 669 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' is not 669" + fi +fi +# ============= cloud_scripts/etc/apache2/httpd.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/httpd.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/apache2/httpd.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/apache2/httpd.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/httpd.conf' && +# Empty +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/httpd.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/apache2/httpd.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/apache2/httpd.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/httpd.conf': 'MD5 check failed' + ) << \SHAR_EOF +2402d4d5cd982d8b74e5c4d62ab0b20b cloud_scripts/etc/apache2/httpd.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/httpd.conf'` -ne 8 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/httpd.conf' is not 8" + fi +fi +# ============= cloud_scripts/etc/apache2/vhost.template ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/vhost.template' +then +${echo} "x - SKIPPING cloud_scripts/etc/apache2/vhost.template (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/apache2/vhost.template (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/apache2/vhost.template +M/%9I3X*"3Q$:7)E8W1O0H)"6%L;&]W(&9R +M;VT@86QL"@D\+T1I3X*"@E38W)I<'1!;&EA0H)"4%L;&]W(&9R;VT@86QL"@D\+T1I3X*"@E%T%004-(15],3T=?1$E2?2]ET%004-(15],3T=?1$E2?2]A8V-E&5S($UU;'1I5FEE=W,@1F]L;&]W4WEM3&EN:W,*("`@("`@("!!;&QO +M=T]V97)R:61E($YO;F4*("`@("`@("!/2!F3X*"CPO5FER='5A +M;$AO2`O/@H)"4]P=&EO;G,@1F]L;&]W +M4WEM3&EN:W,*"0E!;&QO=T]V97)R:61E($YO;F4*"3PO1&ER96-T;W)Y/@H) +M/$1I2`O=F%R+W=W=R]H=&UL/@H)"4]P=&EO;G,@26YD97AE6U,:6YK2`B+W5S&5S($UU;'1I5FEE=W,@1F]L;&]W +M4WEM3&EN:W,*"0E!;&QO=T]V97)R:61E($YO;F4*"0E/2!F3X*"@DC($EN8VQU9&4@0T]2 +M4R!C;VYF:6=U2!A;F0@8V5R=&EF:6-A=&4@87)E('-T;W)E9"!I;B!T:&4@2!A<'!E;F1E9"!T;R!T:&4@2!O;F4*"2,@("!H=6=E(&9I;&4@8V]N=&%I +M;FEN9R!A;&P@;V8@=&AE;2`H9FEL92!M=7-T(&)E(%!%32!E;F-O9&5D*0H) +M(R`@($YO=&4Z($EN2!O;F4@:'5G92!F:6QE(&-O;G1A:6YI +M;F<@86QL"@DC("`@;V8@=&AE;2`H9FEL92!M=7-T(&)E(%!%32!E;F-O9&5D +M*0H)(R`@($YO=&4Z($EN7!E2!T:&4@8V5R=&EF:6-A=&4*"2,@("!I2!A8V-E2!C;VUP;&5X(&)O;VQE86X@97AP"!I*$58 +M4'Q.54Q,*2\@7`H)(R`@("`@("`@("`@(&%N9"`E>U-33%]#3$E%3E1?4U]$ +M3E]/?2!E<2`B4VYA:V4@3VEL+"!,=&0N(B!<"@DC("`@("`@("`@("`@86YD +M("5[4U-,7T-,245.5%]37T1.7T]5?2!I;B![(E-T869F(BP@(D-!(BP@(D1E +M=B)](%P*"2,@("`@("`@("`@("!A;F0@)7M424U%7U=$05E](#X](#$@86YD +M("5[5$E-15]71$%9?2`\/2`U(%P*"2,@("`@("`@("`@("!A;F0@)7M424U% +M7TA/55)](#X](#@@86YD("5[5$E-15](3U52?2`\/2`R,"`@("`@("`I(%P* +M"2,@("`@("`@("`@(&]R("5[4D5-3U1%7T%$1%)](#U^(&TO7C$Y,EPN-S9< +M+C$V,EPN6S`M.5TK)"\*"2,\+TQO8V%T:6]N/@H*"2,@("!34TP@16YG:6YE +M($]P=&EO;G,Z"@DC("`@4V5T('9A2!E;G1R>2!I;B!T:&4@=7-E<@H)(R`@("`@9FEL92!N +M965D'AJ,S%:351:>FM602'!O7,@97AI'!O +M2X*"2,@("!O +M(%-T2!A;GDB('-I='5A=&EO;BP@:2YE +M+B!W:&5N(&ET(&%P<&QI97,@86-C97-S(&ES(&1E;FEE9`H)(R`@("`@86YD +M(&YO(&]T:&5R(&UO9'5L92!C86X@8VAA;F=E(&ET+@H)(R`@(&\@3W!T4F5N +M96=O=&EA=&4Z"@DC("`@("!4:&ES(&5N86)L97,@;W!T:6UI>F5D(%-33"!C +M;VYN96-T:6]N(')E;F5G;W1I871I;VX@:&%N9&QI;F<@=VAE;B!34TP*"2,@ +M("`@(&1I2!C;VYT +M97AT+@H)(U-33$]P=&EO;G,@*T9A:V5"87-I8T%U=&@@*T5X<&]R=$-E2!A;&5R="!B=70@9&]E6]U(&YE +M960@82!D:69F97)E;G0@2P@6]U('5S=6%L;'D@861D:71I;VYA;&QY('=A +M;G0@=&\@9&ES86)L90H)(R`@(&ME97`M86QI=F4@9F]R('1H;W-E(&-L:65N +M=',L('1O;RX@57-E('9A2!-4TE%(&]N(%=I;F1O=W,@6%`N +M"B`@("!,:7-T96X@,3`N,2XQ+C$Z.#0T,PH\+TEF36]D=6QE/@H*/$EF36]D +M=6QE(&UO9%]G;G5T;',N8SX*("`@($QI/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/vhost.template': 'MD5 check failed' + ) << \SHAR_EOF +e42ce7d6f871a7efa7a3c0e164f75dfc cloud_scripts/etc/apache2/vhost.template +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/vhost.template'` -ne 9955 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/vhost.template' is not 9955" + fi +fi +# ============= cloud_scripts/etc/vpcdnsmasq.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/vpcdnsmasq.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/vpcdnsmasq.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/vpcdnsmasq.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/vpcdnsmasq.conf' && +# Configuration file for dnsmasq. +# +# Format is one option per line, legal options are the same +# as the long options legal on the command line. See +# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. +X +# The following two options make you a better netizen, since they +# tell dnsmasq to filter out queries which the public DNS cannot +# answer, and which load the servers (especially the root servers) +# uneccessarily. If you have a dial-on-demand link they also stop +# these requests from bringing up the link uneccessarily. +X +# Never forward plain names (without a dot or domain part) +domain-needed +# Never forward addresses in the non-routed address spaces. +bogus-priv +X +X +# Uncomment this to filter useless windows-originated DNS requests +# which can trigger dial-on-demand links needlessly. +# Note that (amongst other things) this blocks all SRV requests, +# so don't use it if you use eg Kerberos. +# This option only affects forwarding, SRV records originating for +# dnsmasq (via srv-host= lines) are not suppressed by it. +#filterwin2k +X +# Change this line if you want dns to get its upstream servers from +# somewhere other that /etc/resolv.conf +resolv-file=/etc/dnsmasq-resolv.conf +X +# By default, dnsmasq will send queries to any of the upstream +# servers it knows about and tries to favour servers to are known +# to be up. Uncommenting this forces dnsmasq to try each query +# with each server strictly in the order they appear in +# /etc/resolv.conf +#strict-order +X +# If you don't want dnsmasq to read /etc/resolv.conf or any other +# file, getting its servers from this file instead (see below), then +# uncomment this. +#no-resolv +X +# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv +# files for changes and re-read them then uncomment this. +#no-poll +X +# Add other name servers here, with domain specs if they are for +# non-public domains. +#server=/localnet/192.168.0.1 +X +# Example of routing PTR queries to nameservers: this will send all +# address->name queries for 192.168.3/24 to nameserver 10.1.2.3 +#server=/3.168.192.in-addr.arpa/10.1.2.3 +X +# Add local-only domains here, queries in these domains are answered +# from /etc/hosts or DHCP only. +local=/2.vmops-test.vmops.com/ +X +# Add domains which you want to force to an IP address here. +# The example below send any host in doubleclick.net to a local +# webserver. +#address=/doubleclick.net/127.0.0.1 +X +# If you want dnsmasq to change uid and gid to something other +# than the default, edit the following lines. +#user= +#group= +X +# If you want dnsmasq to listen for DHCP and DNS requests only on +# specified interfaces (and the loopback) give the name of the +# interface (eg eth0) here. +# Repeat the line for more than one interface. +#interface=eth0 +X +# Or you can specify which interface _not_ to listen on +except-interface=lo +X +# Or which to listen on by address (remember to include 127.0.0.1 if +# you use this.) +#listen-address= +# If you want dnsmasq to provide only DNS service on an interface, +# configure it as shown above, and then use the following line to +# disable DHCP on it. +#no-dhcp-interface=eth1 +X +# On systems which support it, dnsmasq binds the wildcard address, +# even when it is listening on only some interfaces. It then discards +# requests that it shouldn't reply to. This has the advantage of +# working even when interfaces come and go and change address. If you +# want dnsmasq to really bind only the interfaces it is listening on, +# uncomment this option. About the only time you may need this is when +# running another nameserver on the same machine. +#bind-interfaces +X +# If you don't want dnsmasq to read /etc/hosts, uncomment the +# following line. +#no-hosts +# or if you want it to read another file, as well as /etc/hosts, use +# this. +#addn-hosts=/etc/banner_add_hosts +X +# Set this (and domain: see below) if you want to have a domain +# automatically added to simple names in a hosts-file. +expand-hosts +X +# Set the domain for dnsmasq. this is optional, but if it is set, it +# does the following things. +# 1) Allows DHCP hosts to have fully qualified domain names, as long +# as the domain part matches this setting. +# 2) Sets the "domain" DHCP option thereby potentially setting the +# domain of all systems configured by DHCP +# 3) Provides the domain part for "expand-hosts" +#domain=2.vmops-test.vmops.com +X +# Uncomment this to enable the integrated DHCP server, you need +# to supply the range of addresses available for lease and optionally +# a lease time. If you have more than one network, you will need to +# repeat this for each network on which you want to supply DHCP +# service. +#dhcp-range=10.1.1.1,static +#dhcp-range=10.0.0.1,10.255.255.255 +#dhcp-hostsfile=/etc/dhcphosts.txt +X +# This is an example of a DHCP range where the netmask is given. This +# is needed for networks we reach the dnsmasq DHCP server via a relay +# agent. If you don't know what a DHCP relay agent is, you probably +# don't need to worry about this. +#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h +X +# This is an example of a DHCP range with a network-id, so that +# some DHCP options may be set only for this network. +#dhcp-range=red,192.168.0.50,192.168.0.150 +X +# Supply parameters for specified hosts using DHCP. There are lots +# of valid alternatives, so we will give examples of each. Note that +# IP addresses DO NOT have to be in the range given above, they just +# need to be on the same network. The order of the parameters in these +# do not matter, it's permissble to give name,adddress and MAC in any order +X +# Always allocate the host with ethernet address 11:22:33:44:55:66 +# The IP address 192.168.0.60 +#dhcp-host=11:22:33:44:55:66,192.168.0.60 +X +# Always set the name of the host with hardware address +# 11:22:33:44:55:66 to be "fred" +#dhcp-host=11:22:33:44:55:66,fred +X +# Always give the host with ethernet address 11:22:33:44:55:66 +# the name fred and IP address 192.168.0.60 and lease time 45 minutes +#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m +X +# Give the machine which says it's name is "bert" IP address +# 192.168.0.70 and an infinite lease +#dhcp-host=bert,192.168.0.70,infinite +X +# Always give the host with client identifier 01:02:02:04 +# the IP address 192.168.0.60 +#dhcp-host=id:01:02:02:04,192.168.0.60 +X +# Always give the host with client identifier "marjorie" +# the IP address 192.168.0.60 +#dhcp-host=id:marjorie,192.168.0.60 +X +# Enable the address given for "judge" in /etc/hosts +# to be given to a machine presenting the name "judge" when +# it asks for a DHCP lease. +#dhcp-host=judge +X +# Never offer DHCP service to a machine whose ethernet +# address is 11:22:33:44:55:66 +#dhcp-host=11:22:33:44:55:66,ignore +X +# Ignore any client-id presented by the machine with ethernet +# address 11:22:33:44:55:66. This is useful to prevent a machine +# being treated differently when running under different OS's or +# between PXE boot and OS boot. +#dhcp-host=11:22:33:44:55:66,id:* +X +# Send extra options which are tagged as "red" to +# the machine with ethernet address 11:22:33:44:55:66 +#dhcp-host=11:22:33:44:55:66,net:red +X +# Send extra options which are tagged as "red" to +# any machine with ethernet address starting 11:22:33: +#dhcp-host=11:22:33:*:*:*,net:red +X +# Ignore any clients which are specified in dhcp-host lines +# or /etc/ethers. Equivalent to ISC "deny unkown-clients". +# This relies on the special "known" tag which is set when +# a host is matched. +#dhcp-ignore=#known +X +# Send extra options which are tagged as "red" to any machine whose +# DHCP vendorclass string includes the substring "Linux" +#dhcp-vendorclass=red,Linux +X +# Send extra options which are tagged as "red" to any machine one +# of whose DHCP userclass strings includes the substring "accounts" +#dhcp-userclass=red,accounts +X +# Send extra options which are tagged as "red" to any machine whose +# MAC address matches the pattern. +#dhcp-mac=red,00:60:8C:*:*:* +X +# If this line is uncommented, dnsmasq will read /etc/ethers and act +# on the ethernet-address/IP pairs found there just as if they had +# been given as --dhcp-host options. Useful if you keep +# MAC-address/host mappings there for other purposes. +#read-ethers +X +# Send options to hosts which ask for a DHCP lease. +# See RFC 2132 for details of available options. +# Common options can be given to dnsmasq by name: +# run "dnsmasq --help dhcp" to get a list. +# Note that all the common settings, such as netmask and +# broadcast address, DNS server and default route, are given +# sane defaults by dnsmasq. You very likely will not need +# any dhcp-options. If you use Windows clients and Samba, there +# are some options which are recommended, they are detailed at the +# end of this section. +X +# Override the default route supplied by dnsmasq, which assumes the +# router is the same machine as the one running dnsmasq. +#dhcp-option=3,1.2.3.4 +X +# Do the same thing, but using the option name +#dhcp-option=option:router,1.2.3.4 +X +# Override the default route supplied by dnsmasq and send no default +# route at all. Note that this only works for the options sent by +# default (1, 3, 6, 12, 28) the same line will send a zero-length option +# for all other option numbers. +#dhcp-option=3 +X +# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 +#dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5 +X +# Set the NTP time server address to be the same machine as +# is running dnsmasq +#dhcp-option=42,0.0.0.0 +X +# Set the NIS domain name to "welly" +#dhcp-option=40,welly +X +# Set the default time-to-live to 50 +#dhcp-option=23,50 +X +# Set the "all subnets are local" flag +#dhcp-option=27,1 +X +# Set the domain +dhcp-option=15,"2.vmops-test.vmops.com" +X +# Send the etherboot magic flag and then etherboot options (a string). +#dhcp-option=128,e4:45:74:68:00:00 +#dhcp-option=129,NIC=eepro100 +X +# Specify an option which will only be sent to the "red" network +# (see dhcp-range for the declaration of the "red" network) +# Note that the net: part must precede the option: part. +#dhcp-option = net:red, option:ntp-server, 192.168.1.1 +X +# The following DHCP options set up dnsmasq in the same way as is specified +# for the ISC dhcpcd in +# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt +# adapted for a typical dnsmasq installation where the host running +# dnsmasq is also the host running samba. +# you may want to uncomment them if you use Windows clients and Samba. +#dhcp-option=19,0 # option ip-forwarding off +#dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) +#dhcp-option=45,0.0.0.0 # netbios datagram distribution server +#dhcp-option=46,8 # netbios node type +#dhcp-option=47 # empty netbios scope. +X +# Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client +# probably doesn't support this...... +#dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com +X +# Send RFC-3442 classless static routes (note the netmask encoding) +#dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8 +X +# Send vendor-class specific options encapsulated in DHCP option 43. +# The meaning of the options is defined by the vendor-class so +# options are sent only when the client supplied vendor class +# matches the class given here. (A substring match is OK, so "MSFT" +# matches "MSFT" and "MSFT 5.0"). This example sets the +# mtftp address to 0.0.0.0 for PXEClients. +#dhcp-option=vendor:PXEClient,1,0.0.0.0 +X +# Send microsoft-specific option to tell windows to release the DHCP lease +# when it shuts down. Note the "i" flag, to tell dnsmasq to send the +# value as a four-byte integer - that's what microsoft wants. See +# http://technet2.microsoft.com/WindowsServer/en/library/a70f1bb7-d2d4-49f0-96d6-4b7414ecfaae1033.mspx?mfr=true +dhcp-option=vendor:MSFT,2,1i +X +# Send the Encapsulated-vendor-class ID needed by some configurations of +# Etherboot to allow is to recognise the DHCP server. +#dhcp-option=vendor:Etherboot,60,"Etherboot" +X +# Send options to PXELinux. Note that we need to send the options even +# though they don't appear in the parameter request list, so we need +# to use dhcp-option-force here. +# See http://syslinux.zytor.com/pxe.php#special for details. +# Magic number - needed before anything else is recognised +#dhcp-option-force=208,f1:00:74:7e +# Configuration file name +#dhcp-option-force=209,configs/common +# Path prefix +#dhcp-option-force=210,/tftpboot/pxelinux/files/ +# Reboot time. (Note 'i' to send 32-bit value) +#dhcp-option-force=211,30i +X +# Set the boot filename for BOOTP. You will only need +# this is you want to boot machines over the network and you will need +# a TFTP server; either dnsmasq's built in TFTP server or an +# external one. (See below for how to enable the TFTP server.) +#dhcp-boot=pxelinux.0 +X +# Enable dnsmasq's built-in TFTP server +#enable-tftp +X +# Set the root directory for files availble via FTP. +#tftp-root=/var/ftpd +X +# Make the TFTP server more secure: with this set, only files owned by +# the user dnsmasq is running as will be send over the net. +#tftp-secure +X +# Set the boot file name only when the "red" tag is set. +#dhcp-boot=net:red,pxelinux.red-net +X +# An example of dhcp-boot with an external server: the name and IP +# address of the server are given after the filename. +#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 +X +# Set the limit on DHCP leases, the default is 150 +dhcp-lease-max=2100 +X +# The DHCP server needs somewhere on disk to keep its lease database. +# This defaults to a sane location, but if you want to change it, use +# the line below. +#dhcp-leasefile=/var/lib/misc/dnsmasq.leases +leasefile-ro +X +# Set the DHCP server to authoritative mode. In this mode it will barge in +# and take over the lease for any client which broadcasts on the network, +# whether it has a record of the lease or not. This avoids long timeouts +# when a machine wakes up on a new network. DO NOT enable this if there's +# the slighest chance that you might end up accidentally configuring a DHCP +# server for your campus/company accidentally. The ISC server uses +# the same option, and this URL provides more information: +# http://www.isc.org/index.pl?/sw/dhcp/authoritative.php +#dhcp-authoritative +X +# Run an executable when a DHCP lease is created or destroyed. +# The arguments sent to the script are "add" or "del", +# then the MAC address, the IP address and finally the hostname +# if there is one. +#dhcp-script=/bin/echo +X +# Set the cachesize here. +#cache-size=150 +X +# If you want to disable negative caching, uncomment this. +#no-negcache +X +# Normally responses which come form /etc/hosts and the DHCP lease +# file have Time-To-Live set as zero, which conventionally means +# do not cache further. If you are happy to trade lower load on the +# server for potentially stale date, you can set a time-to-live (in +# seconds) here. +#local-ttl= +X +# If you want dnsmasq to detect attempts by Verisign to send queries +# to unregistered .com and .net hosts to its sitefinder service and +# have dnsmasq instead return the correct NXDOMAIN response, uncomment +# this line. You can add similar lines to do the same for other +# registries which have implemented wildcard A records. +#bogus-nxdomain=64.94.110.11 +X +# If you want to fix up DNS results from upstream servers, use the +# alias option. This only works for IPv4. +# This alias makes a result of 1.2.3.4 appear as 5.6.7.8 +#alias=1.2.3.4,5.6.7.8 +# and this maps 1.2.3.x to 5.6.7.x +#alias=1.2.3.0,5.6.7.0,255.255.255.0 +X +X +# Change these lines if you want dnsmasq to serve MX records. +X +# Return an MX record named "maildomain.com" with target +# servermachine.com and preference 50 +#mx-host=maildomain.com,servermachine.com,50 +X +# Set the default target for MX records created using the localmx option. +#mx-target=servermachine.com +X +# Return an MX record pointing to the mx-target for all local +# machines. +#localmx +X +# Return an MX record pointing to itself for all local machines. +#selfmx +X +# Change the following lines if you want dnsmasq to serve SRV +# records. These are useful if you want to serve ldap requests for +# Active Directory and other windows-originated DNS requests. +# See RFC 2782. +# You may add multiple srv-host lines. +# The fields are ,,,, +# If the domain part if missing from the name (so that is just has the +# service and protocol sections) then the domain given by the domain= +# config option is used. (Note that expand-hosts does not need to be +# set for this to work.) +X +# A SRV record sending LDAP for the example.com domain to +# ldapserver.example.com port 289 +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389 +X +# A SRV record sending LDAP for the example.com domain to +# ldapserver.example.com port 289 (using domain=) +###domain=example.com +#srv-host=_ldap._tcp,ldapserver.example.com,389 +X +# Two SRV records for LDAP, each with different priorities +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1 +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2 +X +# A SRV record indicating that there is no LDAP server for the domain +# example.com +#srv-host=_ldap._tcp.example.com +X +# The following line shows how to make dnsmasq serve an arbitrary PTR +# record. This is useful for DNS-SD. (Note that the +# domain-name expansion done for SRV records _does_not +# occur for PTR records.) +#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services" +X +# Change the following lines to enable dnsmasq to serve TXT records. +# These are used for things like SPF and zeroconf. (Note that the +# domain-name expansion done for SRV records _does_not +# occur for TXT records.) +X +#Example SPF. +#txt-record=example.com,"v=spf1 a -all" +X +#Example zeroconf +#txt-record=_http._tcp.example.com,name=value,paper=A4 +X +X +# For debugging purposes, log each DNS query as it passes through +# dnsmasq. +#log-queries +X +# Log lots of extra information about DHCP transactions. +#log-dhcp +X +log-facility=/var/log/dnsmasq.log +X +# Include a another lot of configuration options. +#conf-file=/etc/dnsmasq.more.conf +conf-dir=/etc/dnsmasq.d +X +dhcp-optsfile=/etc/dhcpopts.txt +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/vpcdnsmasq.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/vpcdnsmasq.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/vpcdnsmasq.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/vpcdnsmasq.conf': 'MD5 check failed' + ) << \SHAR_EOF +0b53d152c88ebce3ee09d8e9c8addd6b cloud_scripts/etc/vpcdnsmasq.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/vpcdnsmasq.conf'` -ne 17942 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/vpcdnsmasq.conf' is not 17942" + fi +fi +# ============= cloud_scripts/etc/ipsec.secrets ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.secrets' +then +${echo} "x - SKIPPING cloud_scripts/etc/ipsec.secrets (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/ipsec.secrets (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.secrets' && +include /var/lib/strongswan/ipsec.conf.inc +include /etc/ipsec.d/ipsec.*.secrets +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.secrets' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/ipsec.secrets' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/ipsec.secrets failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.secrets': 'MD5 check failed' + ) << \SHAR_EOF +7ab0bddd5ec64ebda91cf3c5262fef2d cloud_scripts/etc/ipsec.secrets +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.secrets'` -ne 80 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.secrets' is not 80" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/dnsmasq ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/dnsmasq' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/dnsmasq (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/dnsmasq (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/dnsmasq' && +/var/log/dnsmasq.log { +X maxsize 10M +X missingok +X rotate 5 +X notifempty +X delaycompress +X sharedscripts +X postrotate +X [ ! -f /var/run/dnsmasq/dnsmasq.pid ] || kill -USR2 `cat /var/run/dnsmasq/dnsmasq.pid` +X endscript +X create 0640 dnsmasq root +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/dnsmasq' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/dnsmasq' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/dnsmasq failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/dnsmasq': 'MD5 check failed' + ) << \SHAR_EOF +e42458bd875605d1cd625f0596b38d4c cloud_scripts/etc/logrotate.d/dnsmasq +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/dnsmasq'` -ne 272 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/dnsmasq' is not 272" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/cloud ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/cloud' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/cloud (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/cloud (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/cloud' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +/var/log/cloud.log { +X rotate 10 +X maxsize 10M +X missingok +X notifempty +X compress +X # CLOUDSTACK-9155: We cannot tell the processes that are writing to this +X # file to use the new inode, so instead we copy the original file, truncate +X # it and keep the same inode. +X copytruncate +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/cloud' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/cloud' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/cloud failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/cloud': 'MD5 check failed' + ) << \SHAR_EOF +f83a4d4cf36adb81699ac5892bf6c6f5 cloud_scripts/etc/logrotate.d/cloud +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/cloud'` -ne 1124 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/cloud' is not 1124" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/conntrackd ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/conntrackd' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/conntrackd (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/conntrackd (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/conntrackd' && +/var/log/conntrackd-stats.log { +X maxsize 10M +X rotate 2 +X missingok +X compress +X delaycompress +X +X postrotate +X if [ -e /var/run/conntrackd.sock ]; then +X /usr/sbin/invoke-rc.d conntrackd restart > /dev/null +X fi +X endscript +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/conntrackd' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/conntrackd' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/conntrackd failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/conntrackd': 'MD5 check failed' + ) << \SHAR_EOF +334d9dd543fcb9c8682b4b8fc3987c4c cloud_scripts/etc/logrotate.d/conntrackd +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/conntrackd'` -ne 263 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/conntrackd' is not 263" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/monitor ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/monitor' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/monitor (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/monitor (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/monitor' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +/var/log/monitor.log { +X rotate 5 +X maxsize 10M +X missingok +X notifempty +X compress +X copytruncate +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/monitor' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/monitor' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/monitor failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/monitor': 'MD5 check failed' + ) << \SHAR_EOF +dbf4af64f49d5ffbf4a725cca714ccd0 cloud_scripts/etc/logrotate.d/monitor +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/monitor'` -ne 922 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/monitor' is not 922" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/routerServiceMonitor ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/routerServiceMonitor (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/routerServiceMonitor (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +/var/log/routerServiceMonitor.log { +X rotate 5 +X maxsize 10M +X missingok +X notifempty +X compress +X copytruncate +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/routerServiceMonitor failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/routerServiceMonitor': 'MD5 check failed' + ) << \SHAR_EOF +0f7968ad2bdbb870fa6a7f55565003c1 cloud_scripts/etc/logrotate.d/routerServiceMonitor +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/routerServiceMonitor'` -ne 935 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' is not 935" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/ppp ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/ppp' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/ppp (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/ppp (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/ppp' && +/var/log/ppp-connect-errors { +X maxsize 10M +X rotate 5 +X missingok +X notifempty +X compress +X nocreate +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/ppp' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/ppp' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/ppp failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/ppp': 'MD5 check failed' + ) << \SHAR_EOF +7d16a52cb372773845f812e51f52318f cloud_scripts/etc/logrotate.d/ppp +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/ppp'` -ne 98 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/ppp' is not 98" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/apache2 ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/apache2' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/apache2 (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/apache2 (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/apache2' && +/var/log/apache2/*.log { +X missingok +X copytruncate +X rotate 3 +X compress +X dateext +X maxsize 10M +X notifempty +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/apache2' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/apache2' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/apache2 failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/apache2': 'MD5 check failed' + ) << \SHAR_EOF +eefd54e0be665bd8a76a7aebee89d6d5 cloud_scripts/etc/logrotate.d/apache2 +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/apache2'` -ne 148 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/apache2' is not 148" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/rsyslog ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/rsyslog' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/rsyslog (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/rsyslog (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/rsyslog' && +/var/log/syslog +{ +X rotate 7 +X maxsize 10M +X missingok +X notifempty +X compress +X postrotate +X /usr/sbin/invoke-rc.d rsyslog rotate > /dev/null +X endscript +} +X +/var/log/mail.info +/var/log/mail.warn +/var/log/mail.err +/var/log/mail.log +/var/log/daemon.log +/var/log/kern.log +/var/log/auth.log +/var/log/user.log +/var/log/lpr.log +/var/log/cron.log +/var/log/debug +/var/log/messages +{ +X rotate 10 +X maxsize 10M +X missingok +X notifempty +X compress +X sharedscripts +X postrotate +X /usr/sbin/invoke-rc.d rsyslog rotate > /dev/null +X endscript +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/rsyslog' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/rsyslog' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/rsyslog failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/rsyslog': 'MD5 check failed' + ) << \SHAR_EOF +b4409ff800ad8ac42c79f412d6b90094 cloud_scripts/etc/logrotate.d/rsyslog +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/rsyslog'` -ne 517 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/rsyslog' is not 517" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/haproxy ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/haproxy' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/haproxy (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/haproxy (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/haproxy' && +/var/log/haproxy.log { +X rotate 5 +X missingok +X notifempty +X maxsize 10M +X postrotate +X /bin/kill -HUP `cat /var/run/rsyslog.pid 2> /dev/null` 2> /dev/null || true +X endscript +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/haproxy' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/haproxy' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/haproxy failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/haproxy': 'MD5 check failed' + ) << \SHAR_EOF +e584fdf0d2a25578f651fccce265ff09 cloud_scripts/etc/logrotate.d/haproxy +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/haproxy'` -ne 194 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/haproxy' is not 194" + fi +fi +# ============= cloud_scripts/etc/profile.d/cloud.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/profile.d/cloud.sh' +then +${echo} "x - SKIPPING cloud_scripts/etc/profile.d/cloud.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/profile.d/cloud.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/profile.d/cloud.sh' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +if [ "`id -u`" -eq 0 ]; then +X PATH=${PATH}:/opt/cloud/bin +fi +export PATH +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/profile.d/cloud.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/profile.d/cloud.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/profile.d/cloud.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/profile.d/cloud.sh': 'MD5 check failed' + ) << \SHAR_EOF +78e5d1f4d852b0af96f8b2efa5245c86 cloud_scripts/etc/profile.d/cloud.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/profile.d/cloud.sh'` -ne 861 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/profile.d/cloud.sh' is not 861" + fi +fi +# ============= cloud_scripts/etc/cloud-nic.rules ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cloud-nic.rules' +then +${echo} "x - SKIPPING cloud_scripts/etc/cloud-nic.rules (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/cloud-nic.rules (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cloud-nic.rules' && +SUBSYSTEM=="net" KERNEL=="eth*" RUN+="/opt/cloud/bin/cloud-nic.sh $env{ACTION} %k" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cloud-nic.rules' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/cloud-nic.rules' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/cloud-nic.rules failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cloud-nic.rules': 'MD5 check failed' + ) << \SHAR_EOF +4ffd506afaa6a69a55ba9ab6bbf706f5 cloud_scripts/etc/cloud-nic.rules +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/cloud-nic.rules'` -ne 83 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/cloud-nic.rules' is not 83" + fi +fi +# ============= cloud_scripts/etc/haproxy/haproxy.cfg ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/haproxy/haproxy.cfg' +then +${echo} "x - SKIPPING cloud_scripts/etc/haproxy/haproxy.cfg (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/haproxy/haproxy.cfg (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/haproxy/haproxy.cfg' && +global +X log 127.0.0.1:3914 local0 info +X chroot /var/lib/haproxy +X user haproxy +X group haproxy +X daemon +X +defaults +X log global +X mode tcp +X option dontlognull +X retries 3 +X option redispatch +X option forwardfor +X stats enable +X stats uri /admin?stats +X stats realm Haproxy\ Statistics +X stats auth admin1:AdMiN123 +X option forceclose +X timeout connect 5000 +X timeout client 50000 +X timeout server 50000 +X +X +listen cloud-default +X bind 0.0.0.0:35999 +X option transparent +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/haproxy/haproxy.cfg' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/haproxy/haproxy.cfg' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/haproxy/haproxy.cfg failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/haproxy/haproxy.cfg': 'MD5 check failed' + ) << \SHAR_EOF +a554fcecbaff9747723f9cd3aedf1ffd cloud_scripts/etc/haproxy/haproxy.cfg +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/haproxy/haproxy.cfg'` -ne 483 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/haproxy/haproxy.cfg' is not 483" + fi +fi +# ============= cloud_scripts/etc/ipsec.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/ipsec.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/ipsec.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.conf' && +# ipsec.conf - strongSwan IPsec configuration file +X +config setup +X +include /etc/ipsec.d/*.conf +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/ipsec.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/ipsec.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.conf': 'MD5 check failed' + ) << \SHAR_EOF +da4dd5d331eed3e64a528dc648aa7cae cloud_scripts/etc/ipsec.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.conf'` -ne 94 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.conf' is not 94" + fi +fi +# ============= cloud_scripts/etc/systemd/journald.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/journald.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/journald.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/journald.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/journald.conf' && +[Journal] +Compress=yes +SystemMaxUse=40M +SystemMaxFileSize=10M +RuntimeMaxUse=20M +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/journald.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/journald.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/journald.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/journald.conf': 'MD5 check failed' + ) << \SHAR_EOF +ea3c97c4a558fbfdf53304f77275ef8a cloud_scripts/etc/systemd/journald.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/journald.conf'` -ne 80 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/journald.conf' is not 80" + fi +fi +# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service +M[[N_6U5N:71="D1E/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service': 'MD5 check failed' + ) << \SHAR_EOF +58d4e646ee66ac7c470796bd6ce9e2a6 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service'` -ne 156 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service' is not 156" + fi +fi +# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service +M[[N_6U5N:71="D1E/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service': 'MD5 check failed' + ) << \SHAR_EOF +027a172fad275171647740477b78ca93 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service'` -ne 143 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service' is not 143" + fi +fi +# ============= cloud_scripts/etc/systemd/system/cloud.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud.service' && +[Unit] +Description=CloudStack Agent service +After=cloud-early-config.service network.target cloud-postinit.service local-fs.target +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=simple +WorkingDirectory=/usr/local/cloud/systemvm +ExecStart=/usr/local/cloud/systemvm/_run.sh +Restart=on-failure +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/cloud.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud.service': 'MD5 check failed' + ) << \SHAR_EOF +b7eb67763e7d694ed98758faef961ac6 cloud_scripts/etc/systemd/system/cloud.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud.service'` -ne 298 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud.service' is not 298" + fi +fi +# ============= cloud_scripts/etc/systemd/system/open-vm-tools.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/open-vm-tools.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/open-vm-tools.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/open-vm-tools.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/open-vm-tools.service +M[[N_6U5N:71="D1E&5C4W1A/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/open-vm-tools.service': 'MD5 check failed' + ) << \SHAR_EOF +10af19a17cd3ee299f08c46bace0f56f cloud_scripts/etc/systemd/system/open-vm-tools.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/open-vm-tools.service'` -ne 280 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/open-vm-tools.service' is not 280" + fi +fi +# ============= cloud_scripts/etc/systemd/system/baremetal-vr.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/baremetal-vr.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/baremetal-vr.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/baremetal-vr.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/baremetal-vr.service' && +[Unit] +Description=CloudStack Baremetal VR service +After=network.target local-fs.target +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=simple +WorkingDirectory=/opt/cloud/bin +ExecStart=/usr/bin/python /opt/cloud/bin/baremetal-vr.py +Restart=on-failure +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/baremetal-vr.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/baremetal-vr.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/baremetal-vr.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/baremetal-vr.service': 'MD5 check failed' + ) << \SHAR_EOF +9fc2a325a709e7cf9ae4d4ec8b7e692a cloud_scripts/etc/systemd/system/baremetal-vr.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/baremetal-vr.service'` -ne 257 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/baremetal-vr.service' is not 257" + fi +fi +# ============= cloud_scripts/etc/systemd/system/xe-daemon.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/xe-daemon.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/xe-daemon.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/xe-daemon.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/xe-daemon.service +M[[N_6U5N:71="D1E&5N+FUO=6YT"D)E9F]R93UN971W;W)K+G1A +M2UC;VYF:6&5C +M4W1A&5C4W1A3UM=6QT:2UU/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/xe-daemon.service': 'MD5 check failed' + ) << \SHAR_EOF +51e30000a8c2d2a91ba1a372bc40a628 cloud_scripts/etc/systemd/system/xe-daemon.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/xe-daemon.service'` -ne 398 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/xe-daemon.service' is not 398" + fi +fi +# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service +M[[N_6U5N:71="D1E5]D865M;VX@+6X*"EM);G-T86QL70I786YT961">3UM=6QT:2UU +*/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service': 'MD5 check failed' + ) << \SHAR_EOF +b1d4d295d2f3dff1ed1e13835e365e86 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service'` -ne 190 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service' is not 190" + fi +fi +# ============= cloud_scripts/etc/systemd/system/cloud-early-config.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-early-config.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-early-config.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-early-config.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-early-config.service' && +[Unit] +Description=CloudStack post-boot patching service using cmdline +DefaultDependencies=no +X +Before=network-pre.target +Wants=network-pre.target +X +Requires=local-fs.target +After=local-fs.target +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=oneshot +ExecStart=/opt/cloud/bin/setup/cloud-early-config +RemainAfterExit=true +TimeoutStartSec=5min +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-early-config.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/cloud-early-config.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-early-config.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-early-config.service': 'MD5 check failed' + ) << \SHAR_EOF +60723561261aa16ed4477c5e02c52bcd cloud_scripts/etc/systemd/system/cloud-early-config.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-early-config.service'` -ne 348 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-early-config.service' is not 348" + fi +fi +# ============= cloud_scripts/etc/systemd/system/cloud-password-server@.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-password-server@.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-password-server@.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' && +[Unit] +Description=Cloud password server on %I +After=network.target local-fs.target +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=simple +WorkingDirectory=/opt/cloud/bin +ExecStart=/opt/cloud/bin/passwd_server_ip.py %I +Restart=on-failure +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-password-server@.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-password-server@.service': 'MD5 check failed' + ) << \SHAR_EOF +3edb13a39635749f16f0579b481c5f25 cloud_scripts/etc/systemd/system/cloud-password-server@.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-password-server@.service'` -ne 244 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' is not 244" + fi +fi +# ============= cloud_scripts/etc/systemd/system/cloud-postinit.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-postinit.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-postinit.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-postinit.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-postinit.service' && +[Unit] +Description=CloudStack post-patching init script +After=cloud-early-config.service network.target local-fs.target +Before=ssh.service +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=oneshot +ExecStart=/opt/cloud/bin/setup/postinit.sh +RemainAfterExit=true +TimeoutStartSec=10min +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-postinit.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/cloud-postinit.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-postinit.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-postinit.service': 'MD5 check failed' + ) << \SHAR_EOF +22b48cd2a7478d27cb155d32cc2610cb cloud_scripts/etc/systemd/system/cloud-postinit.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-postinit.service'` -ne 287 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-postinit.service' is not 287" + fi +fi +# ============= cloud_scripts/etc/systemd/journald.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/journald.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/journald.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/journald.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/journald.conf' && +[Journal] +Compress=yes +SystemMaxUse=40M +SystemMaxFileSize=10M +RuntimeMaxUse=20M +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/journald.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/journald.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/journald.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/journald.conf': 'MD5 check failed' + ) << \SHAR_EOF +ea3c97c4a558fbfdf53304f77275ef8a cloud_scripts/etc/systemd/journald.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/journald.conf'` -ne 80 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/journald.conf' is not 80" + fi +fi +# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service +M[[N_6U5N:71="D1E/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service': 'MD5 check failed' + ) << \SHAR_EOF +58d4e646ee66ac7c470796bd6ce9e2a6 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service'` -ne 156 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service' is not 156" + fi +fi +# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service +M[[N_6U5N:71="D1E/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service': 'MD5 check failed' + ) << \SHAR_EOF +027a172fad275171647740477b78ca93 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service'` -ne 143 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service' is not 143" + fi +fi +# ============= cloud_scripts/etc/systemd/system/cloud.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud.service' && +[Unit] +Description=CloudStack Agent service +After=cloud-early-config.service network.target cloud-postinit.service local-fs.target +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=simple +WorkingDirectory=/usr/local/cloud/systemvm +ExecStart=/usr/local/cloud/systemvm/_run.sh +Restart=on-failure +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/cloud.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud.service': 'MD5 check failed' + ) << \SHAR_EOF +b7eb67763e7d694ed98758faef961ac6 cloud_scripts/etc/systemd/system/cloud.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud.service'` -ne 298 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud.service' is not 298" + fi +fi +# ============= cloud_scripts/etc/systemd/system/open-vm-tools.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/open-vm-tools.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/open-vm-tools.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/open-vm-tools.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/open-vm-tools.service +M[[N_6U5N:71="D1E&5C4W1A/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/open-vm-tools.service': 'MD5 check failed' + ) << \SHAR_EOF +10af19a17cd3ee299f08c46bace0f56f cloud_scripts/etc/systemd/system/open-vm-tools.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/open-vm-tools.service'` -ne 280 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/open-vm-tools.service' is not 280" + fi +fi +# ============= cloud_scripts/etc/systemd/system/baremetal-vr.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/baremetal-vr.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/baremetal-vr.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/baremetal-vr.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/baremetal-vr.service' && +[Unit] +Description=CloudStack Baremetal VR service +After=network.target local-fs.target +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=simple +WorkingDirectory=/opt/cloud/bin +ExecStart=/usr/bin/python /opt/cloud/bin/baremetal-vr.py +Restart=on-failure +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/baremetal-vr.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/baremetal-vr.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/baremetal-vr.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/baremetal-vr.service': 'MD5 check failed' + ) << \SHAR_EOF +9fc2a325a709e7cf9ae4d4ec8b7e692a cloud_scripts/etc/systemd/system/baremetal-vr.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/baremetal-vr.service'` -ne 257 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/baremetal-vr.service' is not 257" + fi +fi +# ============= cloud_scripts/etc/systemd/system/xe-daemon.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/xe-daemon.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/xe-daemon.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/xe-daemon.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/xe-daemon.service +M[[N_6U5N:71="D1E&5N+FUO=6YT"D)E9F]R93UN971W;W)K+G1A +M2UC;VYF:6&5C +M4W1A&5C4W1A3UM=6QT:2UU/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/xe-daemon.service': 'MD5 check failed' + ) << \SHAR_EOF +51e30000a8c2d2a91ba1a372bc40a628 cloud_scripts/etc/systemd/system/xe-daemon.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/xe-daemon.service'` -ne 398 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/xe-daemon.service' is not 398" + fi +fi +# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service +M[[N_6U5N:71="D1E5]D865M;VX@+6X*"EM);G-T86QL70I786YT961">3UM=6QT:2UU +*/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service': 'MD5 check failed' + ) << \SHAR_EOF +b1d4d295d2f3dff1ed1e13835e365e86 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service'` -ne 190 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service' is not 190" + fi +fi +# ============= cloud_scripts/etc/systemd/system/cloud-early-config.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-early-config.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-early-config.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-early-config.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-early-config.service' && +[Unit] +Description=CloudStack post-boot patching service using cmdline +DefaultDependencies=no +X +Before=network-pre.target +Wants=network-pre.target +X +Requires=local-fs.target +After=local-fs.target +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=oneshot +ExecStart=/opt/cloud/bin/setup/cloud-early-config +RemainAfterExit=true +TimeoutStartSec=5min +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-early-config.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/cloud-early-config.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-early-config.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-early-config.service': 'MD5 check failed' + ) << \SHAR_EOF +60723561261aa16ed4477c5e02c52bcd cloud_scripts/etc/systemd/system/cloud-early-config.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-early-config.service'` -ne 348 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-early-config.service' is not 348" + fi +fi +# ============= cloud_scripts/etc/systemd/system/cloud-password-server@.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-password-server@.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-password-server@.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' && +[Unit] +Description=Cloud password server on %I +After=network.target local-fs.target +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=simple +WorkingDirectory=/opt/cloud/bin +ExecStart=/opt/cloud/bin/passwd_server_ip.py %I +Restart=on-failure +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-password-server@.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-password-server@.service': 'MD5 check failed' + ) << \SHAR_EOF +3edb13a39635749f16f0579b481c5f25 cloud_scripts/etc/systemd/system/cloud-password-server@.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-password-server@.service'` -ne 244 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' is not 244" + fi +fi +# ============= cloud_scripts/etc/systemd/system/cloud-postinit.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-postinit.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-postinit.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-postinit.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-postinit.service' && +[Unit] +Description=CloudStack post-patching init script +After=cloud-early-config.service network.target local-fs.target +Before=ssh.service +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=oneshot +ExecStart=/opt/cloud/bin/setup/postinit.sh +RemainAfterExit=true +TimeoutStartSec=10min +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-postinit.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/cloud-postinit.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-postinit.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-postinit.service': 'MD5 check failed' + ) << \SHAR_EOF +22b48cd2a7478d27cb155d32cc2610cb cloud_scripts/etc/systemd/system/cloud-postinit.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-postinit.service'` -ne 287 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-postinit.service' is not 287" + fi +fi +# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service +M[[N_6U5N:71="D1E/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service': 'MD5 check failed' + ) << \SHAR_EOF +58d4e646ee66ac7c470796bd6ce9e2a6 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service'` -ne 156 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service' is not 156" + fi +fi +# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service +M[[N_6U5N:71="D1E/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service': 'MD5 check failed' + ) << \SHAR_EOF +027a172fad275171647740477b78ca93 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service'` -ne 143 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service' is not 143" + fi +fi +# ============= cloud_scripts/etc/systemd/system/cloud.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud.service' && +[Unit] +Description=CloudStack Agent service +After=cloud-early-config.service network.target cloud-postinit.service local-fs.target +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=simple +WorkingDirectory=/usr/local/cloud/systemvm +ExecStart=/usr/local/cloud/systemvm/_run.sh +Restart=on-failure +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/cloud.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud.service': 'MD5 check failed' + ) << \SHAR_EOF +b7eb67763e7d694ed98758faef961ac6 cloud_scripts/etc/systemd/system/cloud.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud.service'` -ne 298 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud.service' is not 298" + fi +fi +# ============= cloud_scripts/etc/systemd/system/open-vm-tools.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/open-vm-tools.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/open-vm-tools.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/open-vm-tools.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/open-vm-tools.service +M[[N_6U5N:71="D1E&5C4W1A/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/open-vm-tools.service': 'MD5 check failed' + ) << \SHAR_EOF +10af19a17cd3ee299f08c46bace0f56f cloud_scripts/etc/systemd/system/open-vm-tools.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/open-vm-tools.service'` -ne 280 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/open-vm-tools.service' is not 280" + fi +fi +# ============= cloud_scripts/etc/systemd/system/baremetal-vr.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/baremetal-vr.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/baremetal-vr.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/baremetal-vr.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/baremetal-vr.service' && +[Unit] +Description=CloudStack Baremetal VR service +After=network.target local-fs.target +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=simple +WorkingDirectory=/opt/cloud/bin +ExecStart=/usr/bin/python /opt/cloud/bin/baremetal-vr.py +Restart=on-failure +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/baremetal-vr.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/baremetal-vr.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/baremetal-vr.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/baremetal-vr.service': 'MD5 check failed' + ) << \SHAR_EOF +9fc2a325a709e7cf9ae4d4ec8b7e692a cloud_scripts/etc/systemd/system/baremetal-vr.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/baremetal-vr.service'` -ne 257 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/baremetal-vr.service' is not 257" + fi +fi +# ============= cloud_scripts/etc/systemd/system/xe-daemon.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/xe-daemon.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/xe-daemon.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/xe-daemon.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/xe-daemon.service +M[[N_6U5N:71="D1E&5N+FUO=6YT"D)E9F]R93UN971W;W)K+G1A +M2UC;VYF:6&5C +M4W1A&5C4W1A3UM=6QT:2UU/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/xe-daemon.service': 'MD5 check failed' + ) << \SHAR_EOF +51e30000a8c2d2a91ba1a372bc40a628 cloud_scripts/etc/systemd/system/xe-daemon.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/xe-daemon.service'` -ne 398 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/xe-daemon.service' is not 398" + fi +fi +# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service +M[[N_6U5N:71="D1E5]D865M;VX@+6X*"EM);G-T86QL70I786YT961">3UM=6QT:2UU +*/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service': 'MD5 check failed' + ) << \SHAR_EOF +b1d4d295d2f3dff1ed1e13835e365e86 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service'` -ne 190 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service' is not 190" + fi +fi +# ============= cloud_scripts/etc/systemd/system/cloud-early-config.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-early-config.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-early-config.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-early-config.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-early-config.service' && +[Unit] +Description=CloudStack post-boot patching service using cmdline +DefaultDependencies=no +X +Before=network-pre.target +Wants=network-pre.target +X +Requires=local-fs.target +After=local-fs.target +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=oneshot +ExecStart=/opt/cloud/bin/setup/cloud-early-config +RemainAfterExit=true +TimeoutStartSec=5min +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-early-config.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/cloud-early-config.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-early-config.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-early-config.service': 'MD5 check failed' + ) << \SHAR_EOF +60723561261aa16ed4477c5e02c52bcd cloud_scripts/etc/systemd/system/cloud-early-config.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-early-config.service'` -ne 348 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-early-config.service' is not 348" + fi +fi +# ============= cloud_scripts/etc/systemd/system/cloud-password-server@.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-password-server@.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-password-server@.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' && +[Unit] +Description=Cloud password server on %I +After=network.target local-fs.target +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=simple +WorkingDirectory=/opt/cloud/bin +ExecStart=/opt/cloud/bin/passwd_server_ip.py %I +Restart=on-failure +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-password-server@.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-password-server@.service': 'MD5 check failed' + ) << \SHAR_EOF +3edb13a39635749f16f0579b481c5f25 cloud_scripts/etc/systemd/system/cloud-password-server@.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-password-server@.service'` -ne 244 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' is not 244" + fi +fi +# ============= cloud_scripts/etc/systemd/system/cloud-postinit.service ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-postinit.service' +then +${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-postinit.service (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-postinit.service (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-postinit.service' && +[Unit] +Description=CloudStack post-patching init script +After=cloud-early-config.service network.target local-fs.target +Before=ssh.service +X +[Install] +WantedBy=multi-user.target +X +[Service] +Type=oneshot +ExecStart=/opt/cloud/bin/setup/postinit.sh +RemainAfterExit=true +TimeoutStartSec=10min +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-postinit.service' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/systemd/system/cloud-postinit.service' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-postinit.service failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-postinit.service': 'MD5 check failed' + ) << \SHAR_EOF +22b48cd2a7478d27cb155d32cc2610cb cloud_scripts/etc/systemd/system/cloud-postinit.service +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-postinit.service'` -ne 287 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-postinit.service' is not 287" + fi +fi +# ============= cloud_scripts/etc/iptables/rules ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/rules' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/rules (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/rules (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/rules' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT +-A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT +-A INPUT -i eth0 -p tcp -m state --state NEW --dport 8080 -j ACCEPT +-A INPUT -i eth0 -p tcp -m state --state NEW --dport 80 -j ACCEPT +-A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth0 -o eth2 -j ACCEPT +-A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/rules' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/rules' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/rules failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/rules': 'MD5 check failed' + ) << \SHAR_EOF +e2be370a53cd4e436ce4c298b16ead21 cloud_scripts/etc/iptables/rules +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/rules'` -ne 1731 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/rules' is not 1731" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-consoleproxy ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-consoleproxy' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-consoleproxy (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-consoleproxy (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-consoleproxy' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp --icmp-type 13 -j DROP +-A INPUT -p icmp -j ACCEPT +-A INPUT -i eth1 -p tcp -m state --state NEW -m tcp --dport 3922 -j ACCEPT +-A INPUT -i eth0 -p tcp -m state --state NEW -m tcp --dport 8001 -j ACCEPT +-A INPUT -i eth1 -p tcp -m state --state NEW -m tcp --dport 8001 -j ACCEPT +-A INPUT -i eth2 -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT +-A INPUT -i eth2 -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-consoleproxy' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/iptables-consoleproxy' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-consoleproxy failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-consoleproxy': 'MD5 check failed' + ) << \SHAR_EOF +2840365dad7fe832ea35d8f72a3bfdca cloud_scripts/etc/iptables/iptables-consoleproxy +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-consoleproxy'` -ne 1601 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-consoleproxy' is not 1601" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-router ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-router' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-router (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-router (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-router' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +:FW_EGRESS_RULES - [0:0] +:FW_OUTBOUND - [0:0] +-A INPUT -d 224.0.0.18/32 -j ACCEPT +-A INPUT -d 225.0.0.50/32 -j ACCEPT +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT +-A INPUT -i eth1 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp -m state --state NEW --dport 80 -j ACCEPT +-A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth0 -o eth0 -m state --state NEW -j ACCEPT +-A FORWARD -i eth0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth0 -o eth2 -j FW_OUTBOUND +-A FW_EGRESS_RULES -j ACCEPT +-I FW_OUTBOUND -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FW_OUTBOUND -j FW_EGRESS_RULES +COMMIT +*mangle +:PREROUTING ACCEPT [0:0] +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +-A PREROUTING -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark +-A POSTROUTING -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-router' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/iptables-router' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-router failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-router': 'MD5 check failed' + ) << \SHAR_EOF +aeabe6897f9969f64a87b793deee6500 cloud_scripts/etc/iptables/iptables-router +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-router'` -ne 2348 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-router' is not 2348" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-vpcrouter ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-vpcrouter' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-vpcrouter (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-vpcrouter (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-vpcrouter' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -d 224.0.0.18/32 -j ACCEPT +-A INPUT -d 225.0.0.50/32 -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT +-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT +-A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT +COMMIT +*mangle +:PREROUTING ACCEPT [0:0] +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +-A OUTPUT -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-vpcrouter' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/iptables-vpcrouter' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-vpcrouter failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-vpcrouter': 'MD5 check failed' + ) << \SHAR_EOF +f3e4459f3b0eea8f2de2a6f01ef79866 cloud_scripts/etc/iptables/iptables-vpcrouter +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-vpcrouter'` -ne 1465 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-vpcrouter' is not 1465" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-dhcpsrvr ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-dhcpsrvr (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-dhcpsrvr (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +:FW_EGRESS_RULES - [0:0] +:FW_OUTBOUND - [0:0] +-A INPUT -d 224.0.0.18/32 -j ACCEPT +-A INPUT -d 225.0.0.50/32 -j ACCEPT +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT +-A INPUT -i eth1 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp -m state --state NEW --dport 80 -j ACCEPT +-A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth0 -o eth0 -m state --state NEW -j ACCEPT +-A FORWARD -i eth0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth0 -o eth2 -j FW_OUTBOUND +-A FW_EGRESS_RULES -j ACCEPT +-I FW_OUTBOUND -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FW_OUTBOUND -j FW_EGRESS_RULES +COMMIT +*mangle +:PREROUTING ACCEPT [0:0] +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +-A PREROUTING -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark +-A POSTROUTING -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-dhcpsrvr failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-dhcpsrvr': 'MD5 check failed' + ) << \SHAR_EOF +aeabe6897f9969f64a87b793deee6500 cloud_scripts/etc/iptables/iptables-dhcpsrvr +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-dhcpsrvr'` -ne 2348 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' is not 2348" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-elbvm ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-elbvm' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-elbvm (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-elbvm (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-elbvm' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-elbvm' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/iptables/iptables-elbvm' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-elbvm failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-elbvm': 'MD5 check failed' + ) << \SHAR_EOF +7a950ed86376c0166c53943cdf68ccb2 cloud_scripts/etc/iptables/iptables-elbvm +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-elbvm'` -ne 1256 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-elbvm' is not 1256" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-secstorage ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-secstorage' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-secstorage (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-secstorage (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-secstorage' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +:HTTP - [0:0] +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth3 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -p icmp --icmp-type 13 -j DROP +-A INPUT -p icmp -j ACCEPT +-A INPUT -i eth0 -p tcp -m state --state NEW --dport 3922 -j ACCEPT +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-secstorage' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/iptables/iptables-secstorage' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-secstorage failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-secstorage': 'MD5 check failed' + ) << \SHAR_EOF +d031185b81ee7ee008b80d434d44b61d cloud_scripts/etc/iptables/iptables-secstorage +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-secstorage'` -ne 1375 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-secstorage' is not 1375" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-ilbvm ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-ilbvm' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-ilbvm (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-ilbvm (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-ilbvm' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-ilbvm' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/iptables/iptables-ilbvm' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-ilbvm failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-ilbvm': 'MD5 check failed' + ) << \SHAR_EOF +85129e942bc07d1fb67e0e169238c345 cloud_scripts/etc/iptables/iptables-ilbvm +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-ilbvm'` -ne 1192 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-ilbvm' is not 1192" + fi +fi +# ============= cloud_scripts/etc/iptables/rt_tables_init ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/rt_tables_init' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/rt_tables_init (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/rt_tables_init (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/rt_tables_init' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +# +# reserved values +# +255 local +254 main +253 default +0 unspec +# +# local +# +#1 inr.ruhep +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/rt_tables_init' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/rt_tables_init' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/rt_tables_init failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/rt_tables_init': 'MD5 check failed' + ) << \SHAR_EOF +86477f42d18121a176751c7284251089 cloud_scripts/etc/iptables/rt_tables_init +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/rt_tables_init'` -ne 897 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/rt_tables_init' is not 897" + fi +fi +# ============= cloud_scripts/etc/iptables/rules ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/rules' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/rules (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/rules (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/rules' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT +-A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT +-A INPUT -i eth0 -p tcp -m state --state NEW --dport 8080 -j ACCEPT +-A INPUT -i eth0 -p tcp -m state --state NEW --dport 80 -j ACCEPT +-A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth0 -o eth2 -j ACCEPT +-A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/rules' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/rules' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/rules failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/rules': 'MD5 check failed' + ) << \SHAR_EOF +e2be370a53cd4e436ce4c298b16ead21 cloud_scripts/etc/iptables/rules +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/rules'` -ne 1731 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/rules' is not 1731" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-consoleproxy ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-consoleproxy' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-consoleproxy (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-consoleproxy (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-consoleproxy' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp --icmp-type 13 -j DROP +-A INPUT -p icmp -j ACCEPT +-A INPUT -i eth1 -p tcp -m state --state NEW -m tcp --dport 3922 -j ACCEPT +-A INPUT -i eth0 -p tcp -m state --state NEW -m tcp --dport 8001 -j ACCEPT +-A INPUT -i eth1 -p tcp -m state --state NEW -m tcp --dport 8001 -j ACCEPT +-A INPUT -i eth2 -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT +-A INPUT -i eth2 -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-consoleproxy' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/iptables-consoleproxy' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-consoleproxy failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-consoleproxy': 'MD5 check failed' + ) << \SHAR_EOF +2840365dad7fe832ea35d8f72a3bfdca cloud_scripts/etc/iptables/iptables-consoleproxy +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-consoleproxy'` -ne 1601 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-consoleproxy' is not 1601" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-router ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-router' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-router (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-router (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-router' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +:FW_EGRESS_RULES - [0:0] +:FW_OUTBOUND - [0:0] +-A INPUT -d 224.0.0.18/32 -j ACCEPT +-A INPUT -d 225.0.0.50/32 -j ACCEPT +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT +-A INPUT -i eth1 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp -m state --state NEW --dport 80 -j ACCEPT +-A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth0 -o eth0 -m state --state NEW -j ACCEPT +-A FORWARD -i eth0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth0 -o eth2 -j FW_OUTBOUND +-A FW_EGRESS_RULES -j ACCEPT +-I FW_OUTBOUND -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FW_OUTBOUND -j FW_EGRESS_RULES +COMMIT +*mangle +:PREROUTING ACCEPT [0:0] +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +-A PREROUTING -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark +-A POSTROUTING -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-router' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/iptables-router' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-router failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-router': 'MD5 check failed' + ) << \SHAR_EOF +aeabe6897f9969f64a87b793deee6500 cloud_scripts/etc/iptables/iptables-router +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-router'` -ne 2348 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-router' is not 2348" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-vpcrouter ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-vpcrouter' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-vpcrouter (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-vpcrouter (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-vpcrouter' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -d 224.0.0.18/32 -j ACCEPT +-A INPUT -d 225.0.0.50/32 -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT +-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT +-A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT +COMMIT +*mangle +:PREROUTING ACCEPT [0:0] +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +-A OUTPUT -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-vpcrouter' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/iptables-vpcrouter' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-vpcrouter failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-vpcrouter': 'MD5 check failed' + ) << \SHAR_EOF +f3e4459f3b0eea8f2de2a6f01ef79866 cloud_scripts/etc/iptables/iptables-vpcrouter +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-vpcrouter'` -ne 1465 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-vpcrouter' is not 1465" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-dhcpsrvr ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-dhcpsrvr (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-dhcpsrvr (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +:FW_EGRESS_RULES - [0:0] +:FW_OUTBOUND - [0:0] +-A INPUT -d 224.0.0.18/32 -j ACCEPT +-A INPUT -d 225.0.0.50/32 -j ACCEPT +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT +-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT +-A INPUT -i eth1 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp -m state --state NEW --dport 80 -j ACCEPT +-A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth0 -o eth0 -m state --state NEW -j ACCEPT +-A FORWARD -i eth0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FORWARD -i eth0 -o eth2 -j FW_OUTBOUND +-A FW_EGRESS_RULES -j ACCEPT +-I FW_OUTBOUND -m state --state RELATED,ESTABLISHED -j ACCEPT +-A FW_OUTBOUND -j FW_EGRESS_RULES +COMMIT +*mangle +:PREROUTING ACCEPT [0:0] +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +-A PREROUTING -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark +-A POSTROUTING -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-dhcpsrvr failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-dhcpsrvr': 'MD5 check failed' + ) << \SHAR_EOF +aeabe6897f9969f64a87b793deee6500 cloud_scripts/etc/iptables/iptables-dhcpsrvr +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-dhcpsrvr'` -ne 2348 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' is not 2348" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-elbvm ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-elbvm' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-elbvm (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-elbvm (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-elbvm' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-elbvm' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/iptables/iptables-elbvm' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-elbvm failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-elbvm': 'MD5 check failed' + ) << \SHAR_EOF +7a950ed86376c0166c53943cdf68ccb2 cloud_scripts/etc/iptables/iptables-elbvm +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-elbvm'` -ne 1256 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-elbvm' is not 1256" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-secstorage ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-secstorage' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-secstorage (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-secstorage (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-secstorage' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +:HTTP - [0:0] +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth3 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -p icmp --icmp-type 13 -j DROP +-A INPUT -p icmp -j ACCEPT +-A INPUT -i eth0 -p tcp -m state --state NEW --dport 3922 -j ACCEPT +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-secstorage' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/iptables/iptables-secstorage' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-secstorage failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-secstorage': 'MD5 check failed' + ) << \SHAR_EOF +d031185b81ee7ee008b80d434d44b61d cloud_scripts/etc/iptables/iptables-secstorage +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-secstorage'` -ne 1375 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-secstorage' is not 1375" + fi +fi +# ============= cloud_scripts/etc/iptables/iptables-ilbvm ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-ilbvm' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-ilbvm (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/iptables-ilbvm (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-ilbvm' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +*nat +:PREROUTING ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT +COMMIT +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-ilbvm' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/iptables/iptables-ilbvm' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/iptables-ilbvm failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-ilbvm': 'MD5 check failed' + ) << \SHAR_EOF +85129e942bc07d1fb67e0e169238c345 cloud_scripts/etc/iptables/iptables-ilbvm +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-ilbvm'` -ne 1192 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-ilbvm' is not 1192" + fi +fi +# ============= cloud_scripts/etc/iptables/rt_tables_init ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/rt_tables_init' +then +${echo} "x - SKIPPING cloud_scripts/etc/iptables/rt_tables_init (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/iptables/rt_tables_init (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/rt_tables_init' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +# +# reserved values +# +255 local +254 main +253 default +0 unspec +# +# local +# +#1 inr.ruhep +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/rt_tables_init' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/iptables/rt_tables_init' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/iptables/rt_tables_init failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/rt_tables_init': 'MD5 check failed' + ) << \SHAR_EOF +86477f42d18121a176751c7284251089 cloud_scripts/etc/iptables/rt_tables_init +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/rt_tables_init'` -ne 897 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/rt_tables_init' is not 897" + fi +fi +# ============= cloud_scripts/etc/sysctl.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/sysctl.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/sysctl.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/sysctl.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/sysctl.conf' && +# Kernel sysctl configuration file +# +# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and +# sysctl.conf(5) for more details. +# @VERSION@ +X +# Controls IP packet forwarding +net.ipv4.ip_forward = 1 +X +# Controls source route verification +net.ipv4.conf.default.rp_filter = 0 +X +# Do not accept source routing +net.ipv4.conf.default.accept_source_route = 0 +X +# Respect local interface in ARP interactions +net.ipv4.conf.default.arp_announce = 2 +net.ipv4.conf.default.arp_ignore = 2 +net.ipv4.conf.all.arp_announce = 2 +net.ipv4.conf.all.arp_ignore = 2 +X +# IPSec NETKEY -- avoid bogus redirects +net.ipv4.conf.all.accept_redirects = 0 +net.ipv4.conf.default.accept_redirects = 0 +net.ipv4.conf.all.send_redirects = 0 +net.ipv4.conf.default.send_redirects = 0 +net.ipv4.conf.all.secure_redirects = 0 +net.ipv4.conf.default.secure_redirects = 0 +X +# For smooth transition of the vip address in case of a keepalived failover +net.ipv4.ip_nonlocal_bind = 1 +X +# Controls the System Request debugging functionality of the kernel +kernel.sysrq = 0 +X +# Controls whether core dumps will append the PID to the core filename. +# Useful for debugging multi-threaded applications. +kernel.core_uses_pid = 1 +X +# A better way for the instance to die +kernel.panic = 10 +kernel.panic_on_oops = 1 +vm.panic_on_oom = 1 +X +# Controls the use of TCP syncookies +net.ipv4.tcp_syncookies = 1 +X +# disable tcp time stamps +net.ipv4.tcp_timestamps = 0 +X +net.ipv4.tcp_tw_reuse = 1 +net.ipv4.tcp_max_tw_buckets = 1000000 +net.core.somaxconn = 65535 +net.nf_conntrack_max = 1000000 +net.netfilter.nf_conntrack_max = 1000000 +X +# Disable IPv6 +net.ipv6.conf.all.disable_ipv6 = 1 +net.ipv6.conf.all.forwarding = 0 +net.ipv6.conf.all.accept_ra = 0 +net.ipv6.conf.all.accept_redirects = 0 +net.ipv6.conf.all.autoconf = 0 +X +# Minimum swappiness without disabling it +vm.swappiness=1 +X +# make the kernel more aggressive in reclaiming RAM from the disk and swap caches +vm.vfs_cache_pressure = 200 +X +# try to maintain 'free' memory thereby reducing the size of disk cache, hence reducing swapping. +vm.min_free_kbytes = 20480 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/sysctl.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/sysctl.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/sysctl.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/sysctl.conf': 'MD5 check failed' + ) << \SHAR_EOF +f1cef50b7a8a7cc7a7a24ff08cbea1f8 cloud_scripts/etc/sysctl.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/sysctl.conf'` -ne 2049 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/sysctl.conf' is not 2049" + fi +fi +# ============= cloud_scripts/etc/xl2tpd/xl2tpd.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/xl2tpd/xl2tpd.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/xl2tpd/xl2tpd.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' && +[lns default] +ip range = 10.1.9.2-10.1.9.8 +local ip = 10.1.9.1 +require chap = yes +refuse pap = yes +pppoptfile = /etc/ppp/options.xl2tpd +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/xl2tpd/xl2tpd.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/xl2tpd/xl2tpd.conf': 'MD5 check failed' + ) << \SHAR_EOF +060f03388ae34c64f85a45f47c9f6d48 cloud_scripts/etc/xl2tpd/xl2tpd.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/xl2tpd/xl2tpd.conf'` -ne 139 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' is not 139" + fi +fi +# ============= cloud_scripts/etc/xl2tpd/xl2tpd.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/xl2tpd/xl2tpd.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/xl2tpd/xl2tpd.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' && +[lns default] +ip range = 10.1.9.2-10.1.9.8 +local ip = 10.1.9.1 +require chap = yes +refuse pap = yes +pppoptfile = /etc/ppp/options.xl2tpd +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/xl2tpd/xl2tpd.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/xl2tpd/xl2tpd.conf': 'MD5 check failed' + ) << \SHAR_EOF +060f03388ae34c64f85a45f47c9f6d48 cloud_scripts/etc/xl2tpd/xl2tpd.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/xl2tpd/xl2tpd.conf'` -ne 139 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' is not 139" + fi +fi +# ============= cloud_scripts/etc/dnsmasq.conf.tmpl ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/dnsmasq.conf.tmpl' +then +${echo} "x - SKIPPING cloud_scripts/etc/dnsmasq.conf.tmpl (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/dnsmasq.conf.tmpl (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/dnsmasq.conf.tmpl' && +# Configuration file for dnsmasq. +# +# Format is one option per line, legal options are the same +# as the long options legal on the command line. See +# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. +X +# Listen on this specific port instead of the standard DNS port +# (53). Setting this to zero completely disables DNS function, +# leaving only DHCP and/or TFTP. +#port=5353 +X +# The following two options make you a better netizen, since they +# tell dnsmasq to filter out queries which the public DNS cannot +# answer, and which load the servers (especially the root servers) +# unnecessarily. If you have a dial-on-demand link they also stop +# these requests from bringing up the link unnecessarily. +X +# Never forward plain names (without a dot or domain part) +domain-needed +# Never forward addresses in the non-routed address spaces. +bogus-priv +X +X +# Uncomment this to filter useless windows-originated DNS requests +# which can trigger dial-on-demand links needlessly. +# Note that (amongst other things) this blocks all SRV requests, +# so don't use it if you use eg Kerberos, SIP, XMMP or Google-talk. +# This option only affects forwarding, SRV records originating for +# dnsmasq (via srv-host= lines) are not suppressed by it. +# filterwin2k +X +# Change this line if you want dns to get its upstream servers from +# somewhere other that /etc/resolv.conf +resolv-file=/etc/dnsmasq-resolv.conf +X +# By default, dnsmasq will send queries to any of the upstream +# servers it knows about and tries to favour servers to are known +# to be up. Uncommenting this forces dnsmasq to try each query +# with each server strictly in the order they appear in +# /etc/resolv.conf +#strict-order +X +# If you don't want dnsmasq to read /etc/resolv.conf or any other +# file, getting its servers from this file instead (see below), then +# uncomment this. +#no-resolv +X +# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv +# files for changes and re-read them then uncomment this. +#no-poll +X +# Add other name servers here, with domain specs if they are for +# non-public domains. +#server=/localnet/192.168.0.1 +X +# Example of routing PTR queries to nameservers: this will send all +# address->name queries for 192.168.3/24 to nameserver 10.1.2.3 +#server=/3.168.192.in-addr.arpa/10.1.2.3 +X +# Add local-only domains here, queries in these domains are answered +# from /etc/hosts or DHCP only. +local=/2.vmops-test.vmops.com/ +X +# Add domains which you want to force to an IP address here. +# The example below send any host in double-click.net to a local +# web-server. +#address=/double-click.net/127.0.0.1 +X +# --address (and --server) work with IPv6 addresses too. +#address=/www.thekelleys.org.uk/fe80::20d:60ff:fe36:f83 +X +# You can control how dnsmasq talks to a server: this forces +# queries to 10.1.2.3 to be routed via eth1 +# server=10.1.2.3@eth1 +X +# and this sets the source (ie local) address used to talk to +# 10.1.2.3 to 192.168.1.1 port 55 (there must be a interface with that +# IP on the machine, obviously). +# server=10.1.2.3@192.168.1.1#55 +X +# If you want dnsmasq to change uid and gid to something other +# than the default, edit the following lines. +#user= +#group= +X +# If you want dnsmasq to listen for DHCP and DNS requests only on +# specified interfaces (and the loopback) give the name of the +# interface (eg eth0) here. +# Repeat the line for more than one interface. +#interface=eth0 +# Or you can specify which interface _not_ to listen on +except-interface=eth1 +except-interface=eth2 +except-interface=lo +# Or which to listen on by address (remember to include 127.0.0.1 if +# you use this.) +#listen-address= +# If you want dnsmasq to provide only DNS service on an interface, +# configure it as shown above, and then use the following line to +# disable DHCP and TFTP on it. +no-dhcp-interface=eth1 +no-dhcp-interface=eth2 +X +# On systems which support it, dnsmasq binds the wildcard address, +# even when it is listening on only some interfaces. It then discards +# requests that it shouldn't reply to. This has the advantage of +# working even when interfaces come and go and change address. If you +# want dnsmasq to really bind only the interfaces it is listening on, +# uncomment this option. About the only time you may need this is when +# running another nameserver on the same machine. +#bind-interfaces +X +# If you don't want dnsmasq to read /etc/hosts, uncomment the +# following line. +#no-hosts +# or if you want it to read another file, as well as /etc/hosts, use +# this. +#addn-hosts=/etc/banner_add_hosts +X +# Set this (and domain: see below) if you want to have a domain +# automatically added to simple names in a hosts-file. +expand-hosts +X +# Set the domain for dnsmasq. this is optional, but if it is set, it +# does the following things. +# 1) Allows DHCP hosts to have fully qualified domain names, as long +# as the domain part matches this setting. +# 2) Sets the "domain" DHCP option thereby potentially setting the +# domain of all systems configured by DHCP +# 3) Provides the domain part for "expand-hosts" +domain=2.vmops-test.vmops.com +X +# Set a different domain for a particular subnet +#domain=wireless.thekelleys.org.uk,192.168.2.0/24 +X +# Same idea, but range rather then subnet +#domain=reserved.thekelleys.org.uk,192.68.3.100,192.168.3.200 +X +# Uncomment this to enable the integrated DHCP server, you need +# to supply the range of addresses available for lease and optionally +# a lease time. If you have more than one network, you will need to +# repeat this for each network on which you want to supply DHCP +# service. +dhcp-range_ip4=10.1.1.1,static +dhcp-range_ip6=::1,static +dhcp-hostsfile=/etc/dhcphosts.txt +X +# This is an example of a DHCP range where the netmask is given. This +# is needed for networks we reach the dnsmasq DHCP server via a relay +# agent. If you don't know what a DHCP relay agent is, you probably +# don't need to worry about this. +#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h +X +# This is an example of a DHCP range which sets a tag, so that +# some DHCP options may be set only for this network. +#dhcp-range=set:red,192.168.0.50,192.168.0.150 +X +# Use this DHCP range only when the tag "green" is set. +#dhcp-range=tag:green,192.168.0.50,192.168.0.150,12h +X +# Specify a subnet which can't be used for dynamic address allocation, +# is available for hosts with matching --dhcp-host lines. Note that +# dhcp-host declarations will be ignored unless there is a dhcp-range +# of some type for the subnet in question. +# In this case the netmask is implied (it comes from the network +# configuration on the machine running dnsmasq) it is possible to give +# an explicit netmask instead. +#dhcp-range=192.168.0.0,static +X +# Enable DHCPv6. Note that the prefix-length does not need to be specified +# and defaults to 64 if missing/ +#dhcp-range=1234::2, 1234::500, 64, 12h +X +# Do Router Advertisements, BUT NOT DHCP for this subnet. +#dhcp-range=1234::, ra-only +X +# Do Router Advertisements, BUT NOT DHCP for this subnet, also try and +# add names to the DNS for the IPv6 address of SLAAC-configured dual-stack +# hosts. Use the DHCPv4 lease to derive the name, network segment and +# MAC address and assume that the host will also have an +# IPv6 address calculated using the SLAAC alogrithm. +#dhcp-range=1234::, ra-names +X +# Do Router Advertisements, BUT NOT DHCP for this subnet. +# Set the lifetime to 46 hours. (Note: minimum lifetime is 2 hours.) +#dhcp-range=1234::, ra-only, 48h +X +# Do DHCP and Router Advertisements for this subnet. Set the A bit in the RA +# so that clients can use SLAAC addresses as well as DHCP ones. +#dhcp-range=1234::2, 1234::500, slaac +X +# Do Router Advertisements and stateless DHCP for this subnet. Clients will +# not get addresses from DHCP, but they will get other configuration information. +# They will use SLAAC for addresses. +#dhcp-range=1234::, ra-stateless +X +# Do stateless DHCP, SLAAC, and generate DNS names for SLAAC addresses +# from DHCPv4 leases. +#dhcp-range=1234::, ra-stateless, ra-names +X +# Do router advertisements for all subnets where we're doing DHCPv6 +# Unless overriden by ra-stateless, ra-names, et al, the router +# advertisements will have the M and O bits set, so that the clients +# get addresses and configuration from DHCPv6, and the A bit reset, so the +# clients don't use SLAAC addresses. +#enable-ra +X +# Supply parameters for specified hosts using DHCP. There are lots +# of valid alternatives, so we will give examples of each. Note that +# IP addresses DO NOT have to be in the range given above, they just +# need to be on the same network. The order of the parameters in these +# do not matter, it's permissible to give name, address and MAC in any +# order. +X +# Always allocate the host with Ethernet address 11:22:33:44:55:66 +# The IP address 192.168.0.60 +#dhcp-host=11:22:33:44:55:66,192.168.0.60 +X +# Always set the name of the host with hardware address +# 11:22:33:44:55:66 to be "fred" +#dhcp-host=11:22:33:44:55:66,fred +X +# Always give the host with Ethernet address 11:22:33:44:55:66 +# the name fred and IP address 192.168.0.60 and lease time 45 minutes +#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m +X +# Give a host with Ethernet address 11:22:33:44:55:66 or +# 12:34:56:78:90:12 the IP address 192.168.0.60. Dnsmasq will assume +# that these two Ethernet interfaces will never be in use at the same +# time, and give the IP address to the second, even if it is already +# in use by the first. Useful for laptops with wired and wireless +# addresses. +#dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.60 +X +# Give the machine which says its name is "bert" IP address +# 192.168.0.70 and an infinite lease +#dhcp-host=bert,192.168.0.70,infinite +X +# Always give the host with client identifier 01:02:02:04 +# the IP address 192.168.0.60 +#dhcp-host=id:01:02:02:04,192.168.0.60 +X +# Always give the host with client identifier "marjorie" +# the IP address 192.168.0.60 +#dhcp-host=id:marjorie,192.168.0.60 +X +# Enable the address given for "judge" in /etc/hosts +# to be given to a machine presenting the name "judge" when +# it asks for a DHCP lease. +#dhcp-host=judge +X +# Never offer DHCP service to a machine whose Ethernet +# address is 11:22:33:44:55:66 +#dhcp-host=11:22:33:44:55:66,ignore +X +# Ignore any client-id presented by the machine with Ethernet +# address 11:22:33:44:55:66. This is useful to prevent a machine +# being treated differently when running under different OS's or +# between PXE boot and OS boot. +#dhcp-host=11:22:33:44:55:66,id:* +X +# Send extra options which are tagged as "red" to +# the machine with Ethernet address 11:22:33:44:55:66 +#dhcp-host=11:22:33:44:55:66,set:red +X +# Send extra options which are tagged as "red" to +# any machine with Ethernet address starting 11:22:33: +#dhcp-host=11:22:33:*:*:*,set:red +X +# Give a fixed IPv6 address and name to client with +# DUID 00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2 +# Note the MAC addresses CANNOT be used to identify DHCPv6 clients. +# Note also the they [] around the IPv6 address are obilgatory. +#dhcp-host=id:00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2, fred, [1234::5] +X +# Ignore any clients which are not specified in dhcp-host lines +# or /etc/ethers. Equivalent to ISC "deny unknown-clients". +# This relies on the special "known" tag which is set when +# a host is matched. +# +# When using bridged networks in ACS this prevents ack to DHCPINFORM etc. request +dhcp-ignore=tag:!known +X +# Send extra options which are tagged as "red" to any machine whose +# DHCP vendorclass string includes the substring "Linux" +#dhcp-vendorclass=set:red,Linux +X +# Send extra options which are tagged as "red" to any machine one +# of whose DHCP userclass strings includes the substring "accounts" +#dhcp-userclass=set:red,accounts +X +# Send extra options which are tagged as "red" to any machine whose +# MAC address matches the pattern. +#dhcp-mac=set:red,00:60:8C:*:*:* +X +# If this line is uncommented, dnsmasq will read /etc/ethers and act +# on the ethernet-address/IP pairs found there just as if they had +# been given as --dhcp-host options. Useful if you keep +# MAC-address/host mappings there for other purposes. +#read-ethers +X +# Send options to hosts which ask for a DHCP lease. +# See RFC 2132 for details of available options. +# Common options can be given to dnsmasq by name: +# run "dnsmasq --help dhcp" to get a list. +# Note that all the common settings, such as netmask and +# broadcast address, DNS server and default route, are given +# sane defaults by dnsmasq. You very likely will not need +# any dhcp-options. If you use Windows clients and Samba, there +# are some options which are recommended, they are detailed at the +# end of this section. +X +# Override the default route supplied by dnsmasq, which assumes the +# router is the same machine as the one running dnsmasq. +#dhcp-option=3,1.2.3.4 +X +# Do the same thing, but using the option name +#dhcp-option=option:router,1.2.3.4 +X +# Override the default route supplied by dnsmasq and send no default +# route at all. Note that this only works for the options sent by +# default (1, 3, 6, 12, 28) the same line will send a zero-length option +# for all other option numbers. +#dhcp-option=3 +X +# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 +#dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5 +X +# Send DHCPv6 option. Note [] around IPv6 addresses. +#dhcp-option=option6:dns-server,[1234::77],[1234::88] +X +# Send DHCPv6 option for namservers as the machine running +# dnsmasq and another. +#dhcp-option=option6:dns-server,[::],[1234::88] +X +# Set the NTP time server address to be the same machine as +# is running dnsmasq +#dhcp-option=42,0.0.0.0 +X +# Set the NIS domain name to "welly" +#dhcp-option=40,welly +X +# Set the default time-to-live to 50 +#dhcp-option=23,50 +X +# Set the "all subnets are local" flag +#dhcp-option=27,1 +X +# Set the domain +dhcp-option=15,"2.vmops-test.vmops.com" +X +# Send the etherboot magic flag and then etherboot options (a string). +#dhcp-option=128,e4:45:74:68:00:00 +#dhcp-option=129,NIC=eepro100 +X +# Specify an option which will only be sent to the "red" network +# (see dhcp-range for the declaration of the "red" network) +# Note that the tag: part must precede the option: part. +#dhcp-option = tag:red, option:ntp-server, 192.168.1.1 +X +# The following DHCP options set up dnsmasq in the same way as is specified +# for the ISC dhcpcd in +# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt +# adapted for a typical dnsmasq installation where the host running +# dnsmasq is also the host running samba. +# you may want to uncomment some or all of them if you use +# Windows clients and Samba. +#dhcp-option=19,0 # option ip-forwarding off +#dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) +#dhcp-option=45,0.0.0.0 # netbios datagram distribution server +#dhcp-option=46,8 # netbios node type +X +# Send an empty WPAD option. This may be REQUIRED to get windows 7 to behave. +#dhcp-option=252,"\n" +X +# Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client +# probably doesn't support this...... +#dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com +X +# Send RFC-3442 classless static routes (note the netmask encoding) +#dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8 +X +# Send vendor-class specific options encapsulated in DHCP option 43. +# The meaning of the options is defined by the vendor-class so +# options are sent only when the client supplied vendor class +# matches the class given here. (A substring match is OK, so "MSFT" +# matches "MSFT" and "MSFT 5.0"). This example sets the +# mtftp address to 0.0.0.0 for PXEClients. +#dhcp-option=vendor:PXEClient,1,0.0.0.0 +X +# Send microsoft-specific option to tell windows to release the DHCP lease +# when it shuts down. Note the "i" flag, to tell dnsmasq to send the +# value as a four-byte integer - that's what microsoft wants. See +# http://technet2.microsoft.com/WindowsServer/en/library/a70f1bb7-d2d4-49f0-96d6-4b7414ecfaae1033.mspx?mfr=true +dhcp-option=vendor:MSFT,2,1i +X +# Send the Encapsulated-vendor-class ID needed by some configurations of +# Etherboot to allow is to recognise the DHCP server. +#dhcp-option=vendor:Etherboot,60,"Etherboot" +X +# Send options to PXELinux. Note that we need to send the options even +# though they don't appear in the parameter request list, so we need +# to use dhcp-option-force here. +# See http://syslinux.zytor.com/pxe.php#special for details. +# Magic number - needed before anything else is recognised +#dhcp-option-force=208,f1:00:74:7e +# Configuration file name +#dhcp-option-force=209,configs/common +# Path prefix +#dhcp-option-force=210,/tftpboot/pxelinux/files/ +# Reboot time. (Note 'i' to send 32-bit value) +#dhcp-option-force=211,30i +X +# Set the boot filename for netboot/PXE. You will only need +# this is you want to boot machines over the network and you will need +# a TFTP server; either dnsmasq's built in TFTP server or an +# external one. (See below for how to enable the TFTP server.) +dhcp-boot=pxelinux.0 +X +# The same as above, but use custom tftp-server instead machine running dnsmasq +#dhcp-boot=pxelinux,server.name,192.168.1.100 +X +# Boot for Etherboot gPXE. The idea is to send two different +# filenames, the first loads gPXE, and the second tells gPXE what to +# load. The dhcp-match sets the gpxe tag for requests from gPXE. +#dhcp-match=set:gpxe,175 # gPXE sends a 175 option. +#dhcp-boot=tag:!gpxe,undionly.kpxe +#dhcp-boot=mybootimage +X +# Encapsulated options for Etherboot gPXE. All the options are +# encapsulated within option 175 +#dhcp-option=encap:175, 1, 5b # priority code +#dhcp-option=encap:175, 176, 1b # no-proxydhcp +#dhcp-option=encap:175, 177, string # bus-id +#dhcp-option=encap:175, 189, 1b # BIOS drive code +#dhcp-option=encap:175, 190, user # iSCSI username +#dhcp-option=encap:175, 191, pass # iSCSI password +X +# Test for the architecture of a netboot client. PXE clients are +# supposed to send their architecture as option 93. (See RFC 4578) +#dhcp-match=peecees, option:client-arch, 0 #x86-32 +#dhcp-match=itanics, option:client-arch, 2 #IA64 +#dhcp-match=hammers, option:client-arch, 6 #x86-64 +#dhcp-match=mactels, option:client-arch, 7 #EFI x86-64 +X +# Do real PXE, rather than just booting a single file, this is an +# alternative to dhcp-boot. +#pxe-prompt="What system shall I netboot?" +# or with timeout before first available action is taken: +#pxe-prompt="Press F8 for menu.", 60 +X +# Available boot services. for PXE. +#pxe-service=x86PC, "Boot from local disk" +X +# Loads /pxelinux.0 from dnsmasq TFTP server. +#pxe-service=x86PC, "Install Linux", pxelinux +X +# Loads /pxelinux.0 from TFTP server at 1.2.3.4. +# Beware this fails on old PXE ROMS. +#pxe-service=x86PC, "Install Linux", pxelinux, 1.2.3.4 +X +# Use bootserver on network, found my multicast or broadcast. +#pxe-service=x86PC, "Install windows from RIS server", 1 +X +# Use bootserver at a known IP address. +#pxe-service=x86PC, "Install windows from RIS server", 1, 1.2.3.4 +X +# If you have multicast-FTP available, +# information for that can be passed in a similar way using options 1 +# to 5. See page 19 of +# http://download.intel.com/design/archives/wfm/downloads/pxespec.pdf +X +X +# Enable dnsmasq's built-in TFTP server +enable-tftp +X +# Set the root directory for files available via FTP. +tftp-root=/opt/tftpboot +X +# Make the TFTP server more secure: with this set, only files owned by +# the user dnsmasq is running as will be send over the net. +#tftp-secure +X +# This option stops dnsmasq from negotiating a larger blocksize for TFTP +# transfers. It will slow things down, but may rescue some broken TFTP +# clients. +#tftp-no-blocksize +X +# Set the boot file name only when the "red" tag is set. +#dhcp-boot=net:red,pxelinux.red-net +X +# An example of dhcp-boot with an external TFTP server: the name and IP +# address of the server are given after the filename. +# Can fail with old PXE ROMS. Overridden by --pxe-service. +#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 +X +# If there are multiple external tftp servers having a same name +# (using /etc/hosts) then that name can be specified as the +# tftp_servername (the third option to dhcp-boot) and in that +# case dnsmasq resolves this name and returns the resultant IP +# addresses in round robin fasion. This facility can be used to +# load balance the tftp load among a set of servers. +#dhcp-boot=/var/ftpd/pxelinux.0,boothost,tftp_server_name +X +# Set the limit on DHCP leases, the default is 150 +dhcp-lease-max=2100 +X +# The DHCP server needs somewhere on disk to keep its lease database. +# This defaults to a sane location, but if you want to change it, use +# the line below. +#dhcp-leasefile=/var/lib/misc/dnsmasq.leases +leasefile-ro +X +# Set the DHCP server to authoritative mode. In this mode it will barge in +# and take over the lease for any client which broadcasts on the network, +# whether it has a record of the lease or not. This avoids long timeouts +# when a machine wakes up on a new network. DO NOT enable this if there's +# the slightest chance that you might end up accidentally configuring a DHCP +# server for your campus/company accidentally. The ISC server uses +# the same option, and this URL provides more information: +# http://www.isc.org/files/auth.html +#dhcp-authoritative +X +# Run an executable when a DHCP lease is created or destroyed. +# The arguments sent to the script are "add" or "del", +# then the MAC address, the IP address and finally the hostname +# if there is one. +#dhcp-script=/bin/echo +X +# Set the cachesize here. +#cache-size=150 +X +# If you want to disable negative caching, uncomment this. +#no-negcache +X +# Normally responses which come form /etc/hosts and the DHCP lease +# file have Time-To-Live set as zero, which conventionally means +# do not cache further. If you are happy to trade lower load on the +# server for potentially stale date, you can set a time-to-live (in +# seconds) here. +#local-ttl= +X +# If you want dnsmasq to detect attempts by Verisign to send queries +# to unregistered .com and .net hosts to its sitefinder service and +# have dnsmasq instead return the correct NXDOMAIN response, uncomment +# this line. You can add similar lines to do the same for other +# registries which have implemented wildcard A records. +#bogus-nxdomain=64.94.110.11 +X +# If you want to fix up DNS results from upstream servers, use the +# alias option. This only works for IPv4. +# This alias makes a result of 1.2.3.4 appear as 5.6.7.8 +#alias=1.2.3.4,5.6.7.8 +# and this maps 1.2.3.x to 5.6.7.x +#alias=1.2.3.0,5.6.7.0,255.255.255.0 +# and this maps 192.168.0.10->192.168.0.40 to 10.0.0.10->10.0.0.40 +#alias=192.168.0.10-192.168.0.40,10.0.0.0,255.255.255.0 +X +# Change these lines if you want dnsmasq to serve MX records. +X +# Return an MX record named "maildomain.com" with target +# servermachine.com and preference 50 +#mx-host=maildomain.com,servermachine.com,50 +X +# Set the default target for MX records created using the localmx option. +#mx-target=servermachine.com +X +# Return an MX record pointing to the mx-target for all local +# machines. +#localmx +X +# Return an MX record pointing to itself for all local machines. +#selfmx +X +# Change the following lines if you want dnsmasq to serve SRV +# records. These are useful if you want to serve ldap requests for +# Active Directory and other windows-originated DNS requests. +# See RFC 2782. +# You may add multiple srv-host lines. +# The fields are ,,,, +# If the domain part if missing from the name (so that is just has the +# service and protocol sections) then the domain given by the domain= +# config option is used. (Note that expand-hosts does not need to be +# set for this to work.) +X +# A SRV record sending LDAP for the example.com domain to +# ldapserver.example.com port 389 +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389 +X +# A SRV record sending LDAP for the example.com domain to +# ldapserver.example.com port 389 (using domain=) +#domain=example.com +#srv-host=_ldap._tcp,ldapserver.example.com,389 +X +# Two SRV records for LDAP, each with different priorities +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1 +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2 +X +# A SRV record indicating that there is no LDAP server for the domain +# example.com +#srv-host=_ldap._tcp.example.com +X +# The following line shows how to make dnsmasq serve an arbitrary PTR +# record. This is useful for DNS-SD. (Note that the +# domain-name expansion done for SRV records _does_not +# occur for PTR records.) +#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services" +X +# Change the following lines to enable dnsmasq to serve TXT records. +# These are used for things like SPF and zeroconf. (Note that the +# domain-name expansion done for SRV records _does_not +# occur for TXT records.) +X +#Example SPF. +#txt-record=example.com,"v=spf1 a -all" +X +#Example zeroconf +#txt-record=_http._tcp.example.com,name=value,paper=A4 +X +# Provide an alias for a "local" DNS name. Note that this _only_ works +# for targets which are names from DHCP or /etc/hosts. Give host +# "bert" another name, bertrand +#cname=bertand,bert +X +# For debugging purposes, log each DNS query as it passes through +# dnsmasq. +#log-queries +X +# Log lots of extra information about DHCP transactions. +#log-dhcp +X +log-facility=/var/log/dnsmasq.log +X +# Include a another lot of configuration options. +#conf-file=/etc/dnsmasq.more.conf +conf-dir=/etc/dnsmasq.d +X +dhcp-optsfile=/etc/dhcpopts.txt +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/dnsmasq.conf.tmpl' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/dnsmasq.conf.tmpl' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/dnsmasq.conf.tmpl failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/dnsmasq.conf.tmpl': 'MD5 check failed' + ) << \SHAR_EOF +a0f6d4fbdef769352c0b4c6aee0e5b0b cloud_scripts/etc/dnsmasq.conf.tmpl +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/dnsmasq.conf.tmpl'` -ne 25321 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/dnsmasq.conf.tmpl' is not 25321" + fi +fi +# ============= cloud_scripts/etc/cron.daily/clear_cache ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cron.daily/clear_cache' +then +${echo} "x - SKIPPING cloud_scripts/etc/cron.daily/clear_cache (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/cron.daily/clear_cache (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cron.daily/clear_cache' && +#!/bin/bash +X +# clear memory cache to ultimately reduce swapping +X +sync && echo 1 > /proc/sys/vm/drop_caches +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cron.daily/clear_cache' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/cron.daily/clear_cache' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/cron.daily/clear_cache failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cron.daily/clear_cache': 'MD5 check failed' + ) << \SHAR_EOF +7935ce340439ae62c8f12f337d420207 cloud_scripts/etc/cron.daily/clear_cache +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/cron.daily/clear_cache'` -ne 107 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/cron.daily/clear_cache' is not 107" + fi +fi +# ============= cloud_scripts/etc/cron.daily/clear_cache ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cron.daily/clear_cache' +then +${echo} "x - SKIPPING cloud_scripts/etc/cron.daily/clear_cache (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/cron.daily/clear_cache (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cron.daily/clear_cache' && +#!/bin/bash +X +# clear memory cache to ultimately reduce swapping +X +sync && echo 1 > /proc/sys/vm/drop_caches +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cron.daily/clear_cache' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/cron.daily/clear_cache' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/cron.daily/clear_cache failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cron.daily/clear_cache': 'MD5 check failed' + ) << \SHAR_EOF +7935ce340439ae62c8f12f337d420207 cloud_scripts/etc/cron.daily/clear_cache +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/cron.daily/clear_cache'` -ne 107 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/cron.daily/clear_cache' is not 107" + fi +fi +# ============= cloud_scripts/etc/vmware-tools/tools.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/vmware-tools/tools.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/vmware-tools/tools.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/vmware-tools/tools.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/vmware-tools/tools.conf' && +[logging] +# Turns on logging globally. It can still be disabled for each domain. +# log = true +X +# Disables core dumps on fatal errors; they're enabled by default. +enableCoreDump = false +X +# Defines the "vmsvc" domain, logging to file +# vmsvc.level = message +vmsvc.handler = file +# Setup file rotation - keep 3 files +vmsvc.maxOldLogFiles = 2 +# Max log file size kept: 1 MB +vmsvc.maxLogSize = 1 +X +# Defines the "vmtoolsd" domain, and disable logging for it. +# vmtoolsd.level = none +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/vmware-tools/tools.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/vmware-tools/tools.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/vmware-tools/tools.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/vmware-tools/tools.conf': 'MD5 check failed' + ) << \SHAR_EOF +4d08804e1a2d4526faeec6404c18fabe cloud_scripts/etc/vmware-tools/tools.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/vmware-tools/tools.conf'` -ne 477 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/vmware-tools/tools.conf' is not 477" + fi +fi +# ============= cloud_scripts/etc/vmware-tools/tools.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/vmware-tools/tools.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/vmware-tools/tools.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/vmware-tools/tools.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/vmware-tools/tools.conf' && +[logging] +# Turns on logging globally. It can still be disabled for each domain. +# log = true +X +# Disables core dumps on fatal errors; they're enabled by default. +enableCoreDump = false +X +# Defines the "vmsvc" domain, logging to file +# vmsvc.level = message +vmsvc.handler = file +# Setup file rotation - keep 3 files +vmsvc.maxOldLogFiles = 2 +# Max log file size kept: 1 MB +vmsvc.maxLogSize = 1 +X +# Defines the "vmtoolsd" domain, and disable logging for it. +# vmtoolsd.level = none +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/vmware-tools/tools.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/vmware-tools/tools.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/vmware-tools/tools.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/vmware-tools/tools.conf': 'MD5 check failed' + ) << \SHAR_EOF +4d08804e1a2d4526faeec6404c18fabe cloud_scripts/etc/vmware-tools/tools.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/vmware-tools/tools.conf'` -ne 477 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/vmware-tools/tools.conf' is not 477" + fi +fi +# ============= cloud_scripts/etc/logrotate.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.conf' && +# rotate log files daily +daily +# keep 3 days worth +rotate 3 +# create new (empty) log files after rotating old ones +create +# use date as a suffix of the rotated file +#dateext +# max size 50M +size 50M +compress +# RPM packages drop log rotation information into this directory +include /etc/logrotate.d +# no packages own wtmp and btmp -- we'll rotate them here +/var/log/wtmp { +X monthly +X create 0664 root utmp +X rotate 1 +} +/var/log/btmp { +X missingok +X monthly +X create 0600 root utmp +X rotate 1 +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.conf': 'MD5 check failed' + ) << \SHAR_EOF +2430f483d055288c92deb28733562d8f cloud_scripts/etc/logrotate.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.conf'` -ne 507 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.conf' is not 507" + fi +fi +# ============= cloud_scripts/etc/ssh/sshd_config ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ssh/sshd_config' +then +${echo} "x - SKIPPING cloud_scripts/etc/ssh/sshd_config (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/ssh/sshd_config (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ssh/sshd_config' && +# $OpenBSD: sshd_config,v 1.75 2007/03/19 01:01:29 djm Exp $ +X +# This is the sshd server system-wide configuration file. See +# sshd_config(5) for more information. +X +# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin +X +# The strategy used for options in the default sshd_config shipped with +# OpenSSH is to specify options with their default value where +# possible, but leave them commented. Uncommented options change a +# default value. +X +Port 3922 +#AddressFamily any +#ListenAddress 0.0.0.0 +X +# Disable legacy (protocol version 1) support in the server for new +# installations. In future the default will change to require explicit +# activation of protocol 1 +Protocol 2 +X +# HostKey for protocol version 1 +#HostKey /etc/ssh/ssh_host_key +# HostKeys for protocol version 2 +#HostKey /etc/ssh/ssh_host_rsa_key +#HostKey /etc/ssh/ssh_host_dsa_key +X +# Lifetime and size of ephemeral version 1 server key +#KeyRegenerationInterval 1h +#ServerKeyBits 768 +X +# Logging +# obsoletes QuietMode and FascistLogging +#SyslogFacility AUTH +SyslogFacility AUTHPRIV +#LogLevel INFO +X +# Authentication: +X +#LoginGraceTime 2m +PermitRootLogin yes +#StrictModes yes +#MaxAuthTries 6 +X +#RSAAuthentication yes +PubkeyAuthentication yes +AuthorizedKeysFile .ssh/authorized_keys +X +# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts +#RhostsRSAAuthentication no +# similar for protocol version 2 +#HostbasedAuthentication no +# Change to yes if you don't trust ~/.ssh/known_hosts for +# RhostsRSAAuthentication and HostbasedAuthentication +#IgnoreUserKnownHosts no +# Don't read the user's ~/.rhosts and ~/.shosts files +#IgnoreRhosts yes +X +# To disable tunneled clear text passwords, change to no here! +#PermitEmptyPasswords no +PasswordAuthentication no +X +# Change to no to disable s/key passwords +#ChallengeResponseAuthentication yes +ChallengeResponseAuthentication no +X +# Kerberos options +#KerberosAuthentication no +#KerberosOrLocalPasswd yes +#KerberosTicketCleanup yes +#KerberosGetAFSToken no +X +# GSSAPI options +#GSSAPIAuthentication no +GSSAPIAuthentication no +#GSSAPICleanupCredentials yes +GSSAPICleanupCredentials yes +X +# Set this to 'yes' to enable PAM authentication, account processing, +# and session processing. If this is enabled, PAM authentication will +# be allowed through the ChallengeResponseAuthentication and +# PasswordAuthentication. Depending on your PAM configuration, +# PAM authentication via ChallengeResponseAuthentication may bypass +# the setting of "PermitRootLogin without-password". +# If you just want the PAM account and session checks to run without +# PAM authentication, then enable this but set PasswordAuthentication +# and ChallengeResponseAuthentication to 'no'. +#UsePAM no +UsePAM yes +X +# Accept locale-related environment variables +AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES +AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT +AcceptEnv LC_IDENTIFICATION LC_ALL +#AllowTcpForwarding yes +#GatewayPorts no +#X11Forwarding no +#X11Forwarding yes +#X11DisplayOffset 10 +#X11UseLocalhost yes +#PrintMotd yes +#PrintLastLog yes +TCPKeepAlive yes +#UseLogin no +#UsePrivilegeSeparation yes +#PermitUserEnvironment no +#Compression delayed +#ClientAliveInterval 0 +#ClientAliveCountMax 3 +#ShowPatchLevel no +UseDNS no +#PidFile /var/run/sshd.pid +#PermitTunnel no +X +MaxStartups 1000 +MaxSessions 1000 +X +# no default banner path +#Banner /some/path +X +# override default of no subsystems +Subsystem sftp /usr/lib/openssh/sftp-server +X +# Example of overriding settings on a per-user basis +#Match User anoncvs +# X11Forwarding no +# AllowTcpForwarding no +# ForceCommand cvs server +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ssh/sshd_config' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/ssh/sshd_config' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/ssh/sshd_config failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ssh/sshd_config': 'MD5 check failed' + ) << \SHAR_EOF +842613e1f724e90888a90882ed1a5684 cloud_scripts/etc/ssh/sshd_config +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/ssh/sshd_config'` -ne 3603 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/ssh/sshd_config' is not 3603" + fi +fi +# ============= cloud_scripts/etc/ssh/sshd_config ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ssh/sshd_config' +then +${echo} "x - SKIPPING cloud_scripts/etc/ssh/sshd_config (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/ssh/sshd_config (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ssh/sshd_config' && +# $OpenBSD: sshd_config,v 1.75 2007/03/19 01:01:29 djm Exp $ +X +# This is the sshd server system-wide configuration file. See +# sshd_config(5) for more information. +X +# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin +X +# The strategy used for options in the default sshd_config shipped with +# OpenSSH is to specify options with their default value where +# possible, but leave them commented. Uncommented options change a +# default value. +X +Port 3922 +#AddressFamily any +#ListenAddress 0.0.0.0 +X +# Disable legacy (protocol version 1) support in the server for new +# installations. In future the default will change to require explicit +# activation of protocol 1 +Protocol 2 +X +# HostKey for protocol version 1 +#HostKey /etc/ssh/ssh_host_key +# HostKeys for protocol version 2 +#HostKey /etc/ssh/ssh_host_rsa_key +#HostKey /etc/ssh/ssh_host_dsa_key +X +# Lifetime and size of ephemeral version 1 server key +#KeyRegenerationInterval 1h +#ServerKeyBits 768 +X +# Logging +# obsoletes QuietMode and FascistLogging +#SyslogFacility AUTH +SyslogFacility AUTHPRIV +#LogLevel INFO +X +# Authentication: +X +#LoginGraceTime 2m +PermitRootLogin yes +#StrictModes yes +#MaxAuthTries 6 +X +#RSAAuthentication yes +PubkeyAuthentication yes +AuthorizedKeysFile .ssh/authorized_keys +X +# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts +#RhostsRSAAuthentication no +# similar for protocol version 2 +#HostbasedAuthentication no +# Change to yes if you don't trust ~/.ssh/known_hosts for +# RhostsRSAAuthentication and HostbasedAuthentication +#IgnoreUserKnownHosts no +# Don't read the user's ~/.rhosts and ~/.shosts files +#IgnoreRhosts yes +X +# To disable tunneled clear text passwords, change to no here! +#PermitEmptyPasswords no +PasswordAuthentication no +X +# Change to no to disable s/key passwords +#ChallengeResponseAuthentication yes +ChallengeResponseAuthentication no +X +# Kerberos options +#KerberosAuthentication no +#KerberosOrLocalPasswd yes +#KerberosTicketCleanup yes +#KerberosGetAFSToken no +X +# GSSAPI options +#GSSAPIAuthentication no +GSSAPIAuthentication no +#GSSAPICleanupCredentials yes +GSSAPICleanupCredentials yes +X +# Set this to 'yes' to enable PAM authentication, account processing, +# and session processing. If this is enabled, PAM authentication will +# be allowed through the ChallengeResponseAuthentication and +# PasswordAuthentication. Depending on your PAM configuration, +# PAM authentication via ChallengeResponseAuthentication may bypass +# the setting of "PermitRootLogin without-password". +# If you just want the PAM account and session checks to run without +# PAM authentication, then enable this but set PasswordAuthentication +# and ChallengeResponseAuthentication to 'no'. +#UsePAM no +UsePAM yes +X +# Accept locale-related environment variables +AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES +AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT +AcceptEnv LC_IDENTIFICATION LC_ALL +#AllowTcpForwarding yes +#GatewayPorts no +#X11Forwarding no +#X11Forwarding yes +#X11DisplayOffset 10 +#X11UseLocalhost yes +#PrintMotd yes +#PrintLastLog yes +TCPKeepAlive yes +#UseLogin no +#UsePrivilegeSeparation yes +#PermitUserEnvironment no +#Compression delayed +#ClientAliveInterval 0 +#ClientAliveCountMax 3 +#ShowPatchLevel no +UseDNS no +#PidFile /var/run/sshd.pid +#PermitTunnel no +X +MaxStartups 1000 +MaxSessions 1000 +X +# no default banner path +#Banner /some/path +X +# override default of no subsystems +Subsystem sftp /usr/lib/openssh/sftp-server +X +# Example of overriding settings on a per-user basis +#Match User anoncvs +# X11Forwarding no +# AllowTcpForwarding no +# ForceCommand cvs server +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ssh/sshd_config' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/ssh/sshd_config' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/ssh/sshd_config failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ssh/sshd_config': 'MD5 check failed' + ) << \SHAR_EOF +842613e1f724e90888a90882ed1a5684 cloud_scripts/etc/ssh/sshd_config +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/ssh/sshd_config'` -ne 3603 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/ssh/sshd_config' is not 3603" + fi +fi +# ============= cloud_scripts/etc/ppp/options.xl2tpd ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ppp/options.xl2tpd' +then +${echo} "x - SKIPPING cloud_scripts/etc/ppp/options.xl2tpd (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/ppp/options.xl2tpd (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ppp/options.xl2tpd' && +proxyarp +ipcp-accept-local +ipcp-accept-remote +noccp +idle 1800 +auth +mtu 1410 +mru 1410 +nodefaultroute +debug +connect-delay 5000 +ms-dns 10.1.1.1 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ppp/options.xl2tpd' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/ppp/options.xl2tpd' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/ppp/options.xl2tpd failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ppp/options.xl2tpd': 'MD5 check failed' + ) << \SHAR_EOF +80ba26ac087aaf7f13cdc1fa8f985d72 cloud_scripts/etc/ppp/options.xl2tpd +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/ppp/options.xl2tpd'` -ne 141 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/ppp/options.xl2tpd' is not 141" + fi +fi +# ============= cloud_scripts/etc/ppp/options.xl2tpd ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ppp/options.xl2tpd' +then +${echo} "x - SKIPPING cloud_scripts/etc/ppp/options.xl2tpd (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/ppp/options.xl2tpd (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ppp/options.xl2tpd' && +proxyarp +ipcp-accept-local +ipcp-accept-remote +noccp +idle 1800 +auth +mtu 1410 +mru 1410 +nodefaultroute +debug +connect-delay 5000 +ms-dns 10.1.1.1 +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ppp/options.xl2tpd' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/ppp/options.xl2tpd' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/ppp/options.xl2tpd failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ppp/options.xl2tpd': 'MD5 check failed' + ) << \SHAR_EOF +80ba26ac087aaf7f13cdc1fa8f985d72 cloud_scripts/etc/ppp/options.xl2tpd +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/ppp/options.xl2tpd'` -ne 141 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/ppp/options.xl2tpd' is not 141" + fi +fi +# ============= cloud_scripts/etc/ipsec.d/l2tp.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.d/l2tp.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/ipsec.d/l2tp.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/ipsec.d/l2tp.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.d/l2tp.conf' && +#ipsec remote access vpn configuration +conn L2TP-PSK +X authby=secret +X rekey=no +X keyingtries=3 +X leftfirewall=yes +X type=transport +X # +X # ---------------------------------------------------------- +X # The VPN server. +X # +X # Allow incoming connections on the external network interface. +X # If you want to use a different interface or if there is no +X # defaultroute, you can use: left=your.ip.addr.ess +X # +X left=172.26.0.151 +X # +X leftprotoport=udp/l2tp +X # If you insist on supporting non-updated Windows clients, +X # you can use: leftprotoport=17/%any +X # +X # ---------------------------------------------------------- +X # The remote user(s). +X # +X # Allow incoming connections only from this IP address. +X right=%any +X # If you want to allow multiple connections from any IP address, +X # you can use: right=%any +X # +X rightprotoport=udp/%any +X # +X # ---------------------------------------------------------- +X # Change 'ignore' to 'add' to enable this configuration. +X # +X rightsubnetwithin=0.0.0.0/0 +X auto=route +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.d/l2tp.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/ipsec.d/l2tp.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/ipsec.d/l2tp.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.d/l2tp.conf': 'MD5 check failed' + ) << \SHAR_EOF +8ca6cb315858c9ccf8c91374c4f32def cloud_scripts/etc/ipsec.d/l2tp.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.d/l2tp.conf'` -ne 1234 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.d/l2tp.conf' is not 1234" + fi +fi +# ============= cloud_scripts/etc/ipsec.d/l2tp.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.d/l2tp.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/ipsec.d/l2tp.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/ipsec.d/l2tp.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.d/l2tp.conf' && +#ipsec remote access vpn configuration +conn L2TP-PSK +X authby=secret +X rekey=no +X keyingtries=3 +X leftfirewall=yes +X type=transport +X # +X # ---------------------------------------------------------- +X # The VPN server. +X # +X # Allow incoming connections on the external network interface. +X # If you want to use a different interface or if there is no +X # defaultroute, you can use: left=your.ip.addr.ess +X # +X left=172.26.0.151 +X # +X leftprotoport=udp/l2tp +X # If you insist on supporting non-updated Windows clients, +X # you can use: leftprotoport=17/%any +X # +X # ---------------------------------------------------------- +X # The remote user(s). +X # +X # Allow incoming connections only from this IP address. +X right=%any +X # If you want to allow multiple connections from any IP address, +X # you can use: right=%any +X # +X rightprotoport=udp/%any +X # +X # ---------------------------------------------------------- +X # Change 'ignore' to 'add' to enable this configuration. +X # +X rightsubnetwithin=0.0.0.0/0 +X auto=route +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.d/l2tp.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/ipsec.d/l2tp.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/ipsec.d/l2tp.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.d/l2tp.conf': 'MD5 check failed' + ) << \SHAR_EOF +8ca6cb315858c9ccf8c91374c4f32def cloud_scripts/etc/ipsec.d/l2tp.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.d/l2tp.conf'` -ne 1234 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.d/l2tp.conf' is not 1234" + fi +fi +# ============= cloud_scripts/etc/rsyslog.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/rsyslog.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/rsyslog.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/rsyslog.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/rsyslog.conf' && +# /etc/rsyslog.conf Configuration file for rsyslog. +# +# For more information see +# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html +X +X +################# +#### MODULES #### +################# +X +$ModLoad imuxsock # provides support for local system logging +$ModLoad imklog # provides kernel logging support (previously done by rklogd) +#$ModLoad immark # provides --MARK-- message capability +X +# provides UDP syslog reception +$ModLoad imudp +$UDPServerRun 3914 +X +# provides TCP syslog reception +#$ModLoad imtcp +#$InputTCPServerRun 514 +X +X +########################### +#### GLOBAL DIRECTIVES #### +########################### +X +# +# Use traditional timestamp format. +# To enable high precision timestamps, comment out the following line. +# +$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat +X +# +# Set the default permissions for all log files. +# +$FileOwner root +$FileGroup adm +$FileCreateMode 0640 +$DirCreateMode 0755 +$Umask 0022 +X +# +# Include all config files in /etc/rsyslog.d/ +# +$IncludeConfig /etc/rsyslog.d/*.conf +X +X +############### +#### RULES #### +############### +X +# +# First some standard log files. Log by facility. +# +auth,authpriv.* /var/log/auth.log +#*.*;auth,authpriv.none -/var/log/syslog +cron.* /var/log/cron.log +daemon.* -/var/log/daemon.log +kern.* -/var/log/kern.log +lpr.* -/var/log/lpr.log +mail.* -/var/log/mail.log +#user.* -/var/log/user.log +X +# +# Logging for the mail system. Split it up so that +# it is easy to write scripts to parse these files. +# +mail.info -/var/log/mail.info +mail.warn -/var/log/mail.warn +mail.err /var/log/mail.err +X +# +# Logging for INN news system. +# +news.crit /var/log/news/news.crit +news.err /var/log/news/news.err +news.notice -/var/log/news/news.notice +X +# +# Some "catch-all" log files. +# +#*.=debug;\ +# auth,authpriv.none;\ +# news.none;mail.none -/var/log/debug +*.=info;*.=notice;*.=warn;\ +X auth,authpriv.none;\ +X cron.none,daemon.none;\ +X local0.none,daemon.none;\ +X mail.none,news.none -/var/log/messages +X +# +# Emergencies are sent to everybody logged in. +# +*.emerg :omusrmsg:* +X +# +# I like to have messages displayed on the console, but only on a virtual +# console I usually leave idle. +# +#daemon,mail.*;\ +# news.=crit;news.=err;news.=notice;\ +# *.=debug;*.=info;\ +# *.=notice;*.=warn /dev/tty8 +X +local0.* -/var/log/haproxy.log +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/rsyslog.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/rsyslog.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/rsyslog.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/rsyslog.conf': 'MD5 check failed' + ) << \SHAR_EOF +1ae97a7bb7bd89a2a7c2e9507bd5c95f cloud_scripts/etc/rsyslog.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/rsyslog.conf'` -ne 2298 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/rsyslog.conf' is not 2298" + fi +fi +# ============= cloud_scripts/etc/modprobe.d/pcspkr.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/modprobe.d/pcspkr.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/modprobe.d/pcspkr.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/modprobe.d/pcspkr.conf (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/modprobe.d/pcspkr.conf +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/modprobe.d/pcspkr.conf': 'MD5 check failed' + ) << \SHAR_EOF +6dc1a7a74dfa22c4f3b37e8700b61658 cloud_scripts/etc/modprobe.d/pcspkr.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/modprobe.d/pcspkr.conf'` -ne 801 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/modprobe.d/pcspkr.conf' is not 801" + fi +fi +# ============= cloud_scripts/etc/modprobe.d/aesni_intel.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/modprobe.d/aesni_intel.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/modprobe.d/aesni_intel.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +blacklist aesni_intel +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/modprobe.d/aesni_intel.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/modprobe.d/aesni_intel.conf': 'MD5 check failed' + ) << \SHAR_EOF +45027ef77fea6dd170da8ea5e1ad1268 cloud_scripts/etc/modprobe.d/aesni_intel.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/modprobe.d/aesni_intel.conf'` -ne 807 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' is not 807" + fi +fi +# ============= cloud_scripts/etc/modprobe.d/pcspkr.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/modprobe.d/pcspkr.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/modprobe.d/pcspkr.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/modprobe.d/pcspkr.conf (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/modprobe.d/pcspkr.conf +M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ +M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/modprobe.d/pcspkr.conf': 'MD5 check failed' + ) << \SHAR_EOF +6dc1a7a74dfa22c4f3b37e8700b61658 cloud_scripts/etc/modprobe.d/pcspkr.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/modprobe.d/pcspkr.conf'` -ne 801 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/modprobe.d/pcspkr.conf' is not 801" + fi +fi +# ============= cloud_scripts/etc/modprobe.d/aesni_intel.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/modprobe.d/aesni_intel.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/modprobe.d/aesni_intel.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +blacklist aesni_intel +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/modprobe.d/aesni_intel.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/modprobe.d/aesni_intel.conf': 'MD5 check failed' + ) << \SHAR_EOF +45027ef77fea6dd170da8ea5e1ad1268 cloud_scripts/etc/modprobe.d/aesni_intel.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/modprobe.d/aesni_intel.conf'` -ne 807 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' is not 807" + fi +fi +# ============= cloud_scripts/etc/cron.hourly/clear_cache ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cron.hourly/clear_cache' +then +${echo} "x - SKIPPING cloud_scripts/etc/cron.hourly/clear_cache (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/cron.hourly/clear_cache (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cron.hourly/clear_cache' && +#!/bin/bash +X +# clear memory cache to ultimately reduce swapping +X +phymem=$(free|awk '/^Mem:/{print $2}') +if [ $phymem -lt 513000 ]; then +X sync && echo 1 > /proc/sys/vm/drop_caches +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cron.hourly/clear_cache' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/cron.hourly/clear_cache' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/cron.hourly/clear_cache failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cron.hourly/clear_cache': 'MD5 check failed' + ) << \SHAR_EOF +648c036aba1a5d72010bf11e0ec95147 cloud_scripts/etc/cron.hourly/clear_cache +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/cron.hourly/clear_cache'` -ne 183 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/cron.hourly/clear_cache' is not 183" + fi +fi +# ============= cloud_scripts/etc/cron.hourly/clear_cache ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cron.hourly/clear_cache' +then +${echo} "x - SKIPPING cloud_scripts/etc/cron.hourly/clear_cache (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/cron.hourly/clear_cache (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cron.hourly/clear_cache' && +#!/bin/bash +X +# clear memory cache to ultimately reduce swapping +X +phymem=$(free|awk '/^Mem:/{print $2}') +if [ $phymem -lt 513000 ]; then +X sync && echo 1 > /proc/sys/vm/drop_caches +fi +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cron.hourly/clear_cache' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/cron.hourly/clear_cache' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/cron.hourly/clear_cache failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cron.hourly/clear_cache': 'MD5 check failed' + ) << \SHAR_EOF +648c036aba1a5d72010bf11e0ec95147 cloud_scripts/etc/cron.hourly/clear_cache +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/cron.hourly/clear_cache'` -ne 183 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/cron.hourly/clear_cache' is not 183" + fi +fi +# ============= cloud_scripts/etc/apache2/conf-enabled/security.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/security.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/security.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/security.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/security.conf' && +ServerTokens Prod +ServerSignature Off +TraceEnable Off +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/security.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/security.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/security.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/security.conf': 'MD5 check failed' + ) << \SHAR_EOF +73e01a3d1cf4f93cb11afb4eb1a6f252 cloud_scripts/etc/apache2/conf-enabled/security.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/security.conf'` -ne 54 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/security.conf' is not 54" + fi +fi +# ============= cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' && +# event MPM +# StartServers: initial number of server processes to start +# MinSpareThreads: minimum number of worker threads which are kept spare +# MaxSpareThreads: maximum number of worker threads which are kept spare +# ThreadsPerChild: constant number of worker threads in each server process +# MaxRequestWorkers: maximum number of worker threads +# MaxConnectionsPerChild: maximum number of requests a server process serves + +X StartServers 1 +X MinSpareThreads 25 +X MaxSpareThreads 75 +X ThreadLimit 64 +X ThreadsPerChild 25 +X MaxRequestWorkers 30 +X MaxConnectionsPerChild 1000 + +X +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf': 'MD5 check failed' + ) << \SHAR_EOF +b05dce38d6618734e7f49eddcb8ac131 cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf'` -ne 669 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' is not 669" + fi +fi +# ============= cloud_scripts/etc/apache2/httpd.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/httpd.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/apache2/httpd.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/apache2/httpd.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/httpd.conf' && +# Empty +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/httpd.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/apache2/httpd.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/apache2/httpd.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/httpd.conf': 'MD5 check failed' + ) << \SHAR_EOF +2402d4d5cd982d8b74e5c4d62ab0b20b cloud_scripts/etc/apache2/httpd.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/httpd.conf'` -ne 8 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/httpd.conf' is not 8" + fi +fi +# ============= cloud_scripts/etc/apache2/vhost.template ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/vhost.template' +then +${echo} "x - SKIPPING cloud_scripts/etc/apache2/vhost.template (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/apache2/vhost.template (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/apache2/vhost.template +M/%9I3X*"3Q$:7)E8W1O0H)"6%L;&]W(&9R +M;VT@86QL"@D\+T1I3X*"@E38W)I<'1!;&EA0H)"4%L;&]W(&9R;VT@86QL"@D\+T1I3X*"@E%T%004-(15],3T=?1$E2?2]ET%004-(15],3T=?1$E2?2]A8V-E&5S($UU;'1I5FEE=W,@1F]L;&]W4WEM3&EN:W,*("`@("`@("!!;&QO +M=T]V97)R:61E($YO;F4*("`@("`@("!/2!F3X*"CPO5FER='5A +M;$AO2`O/@H)"4]P=&EO;G,@1F]L;&]W +M4WEM3&EN:W,*"0E!;&QO=T]V97)R:61E($YO;F4*"3PO1&ER96-T;W)Y/@H) +M/$1I2`O=F%R+W=W=R]H=&UL/@H)"4]P=&EO;G,@26YD97AE6U,:6YK2`B+W5S&5S($UU;'1I5FEE=W,@1F]L;&]W +M4WEM3&EN:W,*"0E!;&QO=T]V97)R:61E($YO;F4*"0E/2!F3X*"@DC($EN8VQU9&4@0T]2 +M4R!C;VYF:6=U2!A;F0@8V5R=&EF:6-A=&4@87)E('-T;W)E9"!I;B!T:&4@2!A<'!E;F1E9"!T;R!T:&4@2!O;F4*"2,@("!H=6=E(&9I;&4@8V]N=&%I +M;FEN9R!A;&P@;V8@=&AE;2`H9FEL92!M=7-T(&)E(%!%32!E;F-O9&5D*0H) +M(R`@($YO=&4Z($EN2!O;F4@:'5G92!F:6QE(&-O;G1A:6YI +M;F<@86QL"@DC("`@;V8@=&AE;2`H9FEL92!M=7-T(&)E(%!%32!E;F-O9&5D +M*0H)(R`@($YO=&4Z($EN7!E2!T:&4@8V5R=&EF:6-A=&4*"2,@("!I2!A8V-E2!C;VUP;&5X(&)O;VQE86X@97AP"!I*$58 +M4'Q.54Q,*2\@7`H)(R`@("`@("`@("`@(&%N9"`E>U-33%]#3$E%3E1?4U]$ +M3E]/?2!E<2`B4VYA:V4@3VEL+"!,=&0N(B!<"@DC("`@("`@("`@("`@86YD +M("5[4U-,7T-,245.5%]37T1.7T]5?2!I;B![(E-T869F(BP@(D-!(BP@(D1E +M=B)](%P*"2,@("`@("`@("`@("!A;F0@)7M424U%7U=$05E](#X](#$@86YD +M("5[5$E-15]71$%9?2`\/2`U(%P*"2,@("`@("`@("`@("!A;F0@)7M424U% +M7TA/55)](#X](#@@86YD("5[5$E-15](3U52?2`\/2`R,"`@("`@("`I(%P* +M"2,@("`@("`@("`@(&]R("5[4D5-3U1%7T%$1%)](#U^(&TO7C$Y,EPN-S9< +M+C$V,EPN6S`M.5TK)"\*"2,\+TQO8V%T:6]N/@H*"2,@("!34TP@16YG:6YE +M($]P=&EO;G,Z"@DC("`@4V5T('9A2!E;G1R>2!I;B!T:&4@=7-E<@H)(R`@("`@9FEL92!N +M965D'AJ,S%:351:>FM602'!O7,@97AI'!O +M2X*"2,@("!O +M(%-T2!A;GDB('-I='5A=&EO;BP@:2YE +M+B!W:&5N(&ET(&%P<&QI97,@86-C97-S(&ES(&1E;FEE9`H)(R`@("`@86YD +M(&YO(&]T:&5R(&UO9'5L92!C86X@8VAA;F=E(&ET+@H)(R`@(&\@3W!T4F5N +M96=O=&EA=&4Z"@DC("`@("!4:&ES(&5N86)L97,@;W!T:6UI>F5D(%-33"!C +M;VYN96-T:6]N(')E;F5G;W1I871I;VX@:&%N9&QI;F<@=VAE;B!34TP*"2,@ +M("`@(&1I2!C;VYT +M97AT+@H)(U-33$]P=&EO;G,@*T9A:V5"87-I8T%U=&@@*T5X<&]R=$-E2!A;&5R="!B=70@9&]E6]U(&YE +M960@82!D:69F97)E;G0@2P@6]U('5S=6%L;'D@861D:71I;VYA;&QY('=A +M;G0@=&\@9&ES86)L90H)(R`@(&ME97`M86QI=F4@9F]R('1H;W-E(&-L:65N +M=',L('1O;RX@57-E('9A2!-4TE%(&]N(%=I;F1O=W,@6%`N +M"B`@("!,:7-T96X@,3`N,2XQ+C$Z.#0T,PH\+TEF36]D=6QE/@H*/$EF36]D +M=6QE(&UO9%]G;G5T;',N8SX*("`@($QI/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/vhost.template': 'MD5 check failed' + ) << \SHAR_EOF +e42ce7d6f871a7efa7a3c0e164f75dfc cloud_scripts/etc/apache2/vhost.template +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/vhost.template'` -ne 9955 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/vhost.template' is not 9955" + fi +fi +# ============= cloud_scripts/etc/apache2/conf-enabled/security.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/security.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/security.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/security.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/security.conf' && +ServerTokens Prod +ServerSignature Off +TraceEnable Off +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/security.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/security.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/security.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/security.conf': 'MD5 check failed' + ) << \SHAR_EOF +73e01a3d1cf4f93cb11afb4eb1a6f252 cloud_scripts/etc/apache2/conf-enabled/security.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/security.conf'` -ne 54 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/security.conf' is not 54" + fi +fi +# ============= cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' && +# event MPM +# StartServers: initial number of server processes to start +# MinSpareThreads: minimum number of worker threads which are kept spare +# MaxSpareThreads: maximum number of worker threads which are kept spare +# ThreadsPerChild: constant number of worker threads in each server process +# MaxRequestWorkers: maximum number of worker threads +# MaxConnectionsPerChild: maximum number of requests a server process serves + +X StartServers 1 +X MinSpareThreads 25 +X MaxSpareThreads 75 +X ThreadLimit 64 +X ThreadsPerChild 25 +X MaxRequestWorkers 30 +X MaxConnectionsPerChild 1000 + +X +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf': 'MD5 check failed' + ) << \SHAR_EOF +b05dce38d6618734e7f49eddcb8ac131 cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf'` -ne 669 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' is not 669" + fi +fi +# ============= cloud_scripts/etc/apache2/conf-enabled/security.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/security.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/security.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/security.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/security.conf' && +ServerTokens Prod +ServerSignature Off +TraceEnable Off +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/security.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/security.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/security.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/security.conf': 'MD5 check failed' + ) << \SHAR_EOF +73e01a3d1cf4f93cb11afb4eb1a6f252 cloud_scripts/etc/apache2/conf-enabled/security.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/security.conf'` -ne 54 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/security.conf' is not 54" + fi +fi +# ============= cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' && +# event MPM +# StartServers: initial number of server processes to start +# MinSpareThreads: minimum number of worker threads which are kept spare +# MaxSpareThreads: maximum number of worker threads which are kept spare +# ThreadsPerChild: constant number of worker threads in each server process +# MaxRequestWorkers: maximum number of worker threads +# MaxConnectionsPerChild: maximum number of requests a server process serves + +X StartServers 1 +X MinSpareThreads 25 +X MaxSpareThreads 75 +X ThreadLimit 64 +X ThreadsPerChild 25 +X MaxRequestWorkers 30 +X MaxConnectionsPerChild 1000 + +X +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf': 'MD5 check failed' + ) << \SHAR_EOF +b05dce38d6618734e7f49eddcb8ac131 cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf'` -ne 669 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' is not 669" + fi +fi +# ============= cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' && +# event MPM +# StartServers: initial number of server processes to start +# MinSpareThreads: minimum number of worker threads which are kept spare +# MaxSpareThreads: maximum number of worker threads which are kept spare +# ThreadsPerChild: constant number of worker threads in each server process +# MaxRequestWorkers: maximum number of worker threads +# MaxConnectionsPerChild: maximum number of requests a server process serves + +X StartServers 1 +X MinSpareThreads 25 +X MaxSpareThreads 75 +X ThreadLimit 64 +X ThreadsPerChild 25 +X MaxRequestWorkers 30 +X MaxConnectionsPerChild 1000 + +X +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf': 'MD5 check failed' + ) << \SHAR_EOF +b05dce38d6618734e7f49eddcb8ac131 cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf'` -ne 669 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' is not 669" + fi +fi +# ============= cloud_scripts/etc/apache2/httpd.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/httpd.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/apache2/httpd.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/apache2/httpd.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/httpd.conf' && +# Empty +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/httpd.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/apache2/httpd.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/apache2/httpd.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/httpd.conf': 'MD5 check failed' + ) << \SHAR_EOF +2402d4d5cd982d8b74e5c4d62ab0b20b cloud_scripts/etc/apache2/httpd.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/httpd.conf'` -ne 8 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/httpd.conf' is not 8" + fi +fi +# ============= cloud_scripts/etc/apache2/vhost.template ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/vhost.template' +then +${echo} "x - SKIPPING cloud_scripts/etc/apache2/vhost.template (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/apache2/vhost.template (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/etc/apache2/vhost.template +M/%9I3X*"3Q$:7)E8W1O0H)"6%L;&]W(&9R +M;VT@86QL"@D\+T1I3X*"@E38W)I<'1!;&EA0H)"4%L;&]W(&9R;VT@86QL"@D\+T1I3X*"@E%T%004-(15],3T=?1$E2?2]ET%004-(15],3T=?1$E2?2]A8V-E&5S($UU;'1I5FEE=W,@1F]L;&]W4WEM3&EN:W,*("`@("`@("!!;&QO +M=T]V97)R:61E($YO;F4*("`@("`@("!/2!F3X*"CPO5FER='5A +M;$AO2`O/@H)"4]P=&EO;G,@1F]L;&]W +M4WEM3&EN:W,*"0E!;&QO=T]V97)R:61E($YO;F4*"3PO1&ER96-T;W)Y/@H) +M/$1I2`O=F%R+W=W=R]H=&UL/@H)"4]P=&EO;G,@26YD97AE6U,:6YK2`B+W5S&5S($UU;'1I5FEE=W,@1F]L;&]W +M4WEM3&EN:W,*"0E!;&QO=T]V97)R:61E($YO;F4*"0E/2!F3X*"@DC($EN8VQU9&4@0T]2 +M4R!C;VYF:6=U2!A;F0@8V5R=&EF:6-A=&4@87)E('-T;W)E9"!I;B!T:&4@2!A<'!E;F1E9"!T;R!T:&4@2!O;F4*"2,@("!H=6=E(&9I;&4@8V]N=&%I +M;FEN9R!A;&P@;V8@=&AE;2`H9FEL92!M=7-T(&)E(%!%32!E;F-O9&5D*0H) +M(R`@($YO=&4Z($EN2!O;F4@:'5G92!F:6QE(&-O;G1A:6YI +M;F<@86QL"@DC("`@;V8@=&AE;2`H9FEL92!M=7-T(&)E(%!%32!E;F-O9&5D +M*0H)(R`@($YO=&4Z($EN7!E2!T:&4@8V5R=&EF:6-A=&4*"2,@("!I2!A8V-E2!C;VUP;&5X(&)O;VQE86X@97AP"!I*$58 +M4'Q.54Q,*2\@7`H)(R`@("`@("`@("`@(&%N9"`E>U-33%]#3$E%3E1?4U]$ +M3E]/?2!E<2`B4VYA:V4@3VEL+"!,=&0N(B!<"@DC("`@("`@("`@("`@86YD +M("5[4U-,7T-,245.5%]37T1.7T]5?2!I;B![(E-T869F(BP@(D-!(BP@(D1E +M=B)](%P*"2,@("`@("`@("`@("!A;F0@)7M424U%7U=$05E](#X](#$@86YD +M("5[5$E-15]71$%9?2`\/2`U(%P*"2,@("`@("`@("`@("!A;F0@)7M424U% +M7TA/55)](#X](#@@86YD("5[5$E-15](3U52?2`\/2`R,"`@("`@("`I(%P* +M"2,@("`@("`@("`@(&]R("5[4D5-3U1%7T%$1%)](#U^(&TO7C$Y,EPN-S9< +M+C$V,EPN6S`M.5TK)"\*"2,\+TQO8V%T:6]N/@H*"2,@("!34TP@16YG:6YE +M($]P=&EO;G,Z"@DC("`@4V5T('9A2!E;G1R>2!I;B!T:&4@=7-E<@H)(R`@("`@9FEL92!N +M965D'AJ,S%:351:>FM602'!O7,@97AI'!O +M2X*"2,@("!O +M(%-T2!A;GDB('-I='5A=&EO;BP@:2YE +M+B!W:&5N(&ET(&%P<&QI97,@86-C97-S(&ES(&1E;FEE9`H)(R`@("`@86YD +M(&YO(&]T:&5R(&UO9'5L92!C86X@8VAA;F=E(&ET+@H)(R`@(&\@3W!T4F5N +M96=O=&EA=&4Z"@DC("`@("!4:&ES(&5N86)L97,@;W!T:6UI>F5D(%-33"!C +M;VYN96-T:6]N(')E;F5G;W1I871I;VX@:&%N9&QI;F<@=VAE;B!34TP*"2,@ +M("`@(&1I2!C;VYT +M97AT+@H)(U-33$]P=&EO;G,@*T9A:V5"87-I8T%U=&@@*T5X<&]R=$-E2!A;&5R="!B=70@9&]E6]U(&YE +M960@82!D:69F97)E;G0@2P@6]U('5S=6%L;'D@861D:71I;VYA;&QY('=A +M;G0@=&\@9&ES86)L90H)(R`@(&ME97`M86QI=F4@9F]R('1H;W-E(&-L:65N +M=',L('1O;RX@57-E('9A2!-4TE%(&]N(%=I;F1O=W,@6%`N +M"B`@("!,:7-T96X@,3`N,2XQ+C$Z.#0T,PH\+TEF36]D=6QE/@H*/$EF36]D +M=6QE(&UO9%]G;G5T;',N8SX*("`@($QI/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/vhost.template': 'MD5 check failed' + ) << \SHAR_EOF +e42ce7d6f871a7efa7a3c0e164f75dfc cloud_scripts/etc/apache2/vhost.template +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/vhost.template'` -ne 9955 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/vhost.template' is not 9955" + fi +fi +# ============= cloud_scripts/etc/vpcdnsmasq.conf ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/vpcdnsmasq.conf' +then +${echo} "x - SKIPPING cloud_scripts/etc/vpcdnsmasq.conf (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/vpcdnsmasq.conf (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/vpcdnsmasq.conf' && +# Configuration file for dnsmasq. +# +# Format is one option per line, legal options are the same +# as the long options legal on the command line. See +# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. +X +# The following two options make you a better netizen, since they +# tell dnsmasq to filter out queries which the public DNS cannot +# answer, and which load the servers (especially the root servers) +# uneccessarily. If you have a dial-on-demand link they also stop +# these requests from bringing up the link uneccessarily. +X +# Never forward plain names (without a dot or domain part) +domain-needed +# Never forward addresses in the non-routed address spaces. +bogus-priv +X +X +# Uncomment this to filter useless windows-originated DNS requests +# which can trigger dial-on-demand links needlessly. +# Note that (amongst other things) this blocks all SRV requests, +# so don't use it if you use eg Kerberos. +# This option only affects forwarding, SRV records originating for +# dnsmasq (via srv-host= lines) are not suppressed by it. +#filterwin2k +X +# Change this line if you want dns to get its upstream servers from +# somewhere other that /etc/resolv.conf +resolv-file=/etc/dnsmasq-resolv.conf +X +# By default, dnsmasq will send queries to any of the upstream +# servers it knows about and tries to favour servers to are known +# to be up. Uncommenting this forces dnsmasq to try each query +# with each server strictly in the order they appear in +# /etc/resolv.conf +#strict-order +X +# If you don't want dnsmasq to read /etc/resolv.conf or any other +# file, getting its servers from this file instead (see below), then +# uncomment this. +#no-resolv +X +# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv +# files for changes and re-read them then uncomment this. +#no-poll +X +# Add other name servers here, with domain specs if they are for +# non-public domains. +#server=/localnet/192.168.0.1 +X +# Example of routing PTR queries to nameservers: this will send all +# address->name queries for 192.168.3/24 to nameserver 10.1.2.3 +#server=/3.168.192.in-addr.arpa/10.1.2.3 +X +# Add local-only domains here, queries in these domains are answered +# from /etc/hosts or DHCP only. +local=/2.vmops-test.vmops.com/ +X +# Add domains which you want to force to an IP address here. +# The example below send any host in doubleclick.net to a local +# webserver. +#address=/doubleclick.net/127.0.0.1 +X +# If you want dnsmasq to change uid and gid to something other +# than the default, edit the following lines. +#user= +#group= +X +# If you want dnsmasq to listen for DHCP and DNS requests only on +# specified interfaces (and the loopback) give the name of the +# interface (eg eth0) here. +# Repeat the line for more than one interface. +#interface=eth0 +X +# Or you can specify which interface _not_ to listen on +except-interface=lo +X +# Or which to listen on by address (remember to include 127.0.0.1 if +# you use this.) +#listen-address= +# If you want dnsmasq to provide only DNS service on an interface, +# configure it as shown above, and then use the following line to +# disable DHCP on it. +#no-dhcp-interface=eth1 +X +# On systems which support it, dnsmasq binds the wildcard address, +# even when it is listening on only some interfaces. It then discards +# requests that it shouldn't reply to. This has the advantage of +# working even when interfaces come and go and change address. If you +# want dnsmasq to really bind only the interfaces it is listening on, +# uncomment this option. About the only time you may need this is when +# running another nameserver on the same machine. +#bind-interfaces +X +# If you don't want dnsmasq to read /etc/hosts, uncomment the +# following line. +#no-hosts +# or if you want it to read another file, as well as /etc/hosts, use +# this. +#addn-hosts=/etc/banner_add_hosts +X +# Set this (and domain: see below) if you want to have a domain +# automatically added to simple names in a hosts-file. +expand-hosts +X +# Set the domain for dnsmasq. this is optional, but if it is set, it +# does the following things. +# 1) Allows DHCP hosts to have fully qualified domain names, as long +# as the domain part matches this setting. +# 2) Sets the "domain" DHCP option thereby potentially setting the +# domain of all systems configured by DHCP +# 3) Provides the domain part for "expand-hosts" +#domain=2.vmops-test.vmops.com +X +# Uncomment this to enable the integrated DHCP server, you need +# to supply the range of addresses available for lease and optionally +# a lease time. If you have more than one network, you will need to +# repeat this for each network on which you want to supply DHCP +# service. +#dhcp-range=10.1.1.1,static +#dhcp-range=10.0.0.1,10.255.255.255 +#dhcp-hostsfile=/etc/dhcphosts.txt +X +# This is an example of a DHCP range where the netmask is given. This +# is needed for networks we reach the dnsmasq DHCP server via a relay +# agent. If you don't know what a DHCP relay agent is, you probably +# don't need to worry about this. +#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h +X +# This is an example of a DHCP range with a network-id, so that +# some DHCP options may be set only for this network. +#dhcp-range=red,192.168.0.50,192.168.0.150 +X +# Supply parameters for specified hosts using DHCP. There are lots +# of valid alternatives, so we will give examples of each. Note that +# IP addresses DO NOT have to be in the range given above, they just +# need to be on the same network. The order of the parameters in these +# do not matter, it's permissble to give name,adddress and MAC in any order +X +# Always allocate the host with ethernet address 11:22:33:44:55:66 +# The IP address 192.168.0.60 +#dhcp-host=11:22:33:44:55:66,192.168.0.60 +X +# Always set the name of the host with hardware address +# 11:22:33:44:55:66 to be "fred" +#dhcp-host=11:22:33:44:55:66,fred +X +# Always give the host with ethernet address 11:22:33:44:55:66 +# the name fred and IP address 192.168.0.60 and lease time 45 minutes +#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m +X +# Give the machine which says it's name is "bert" IP address +# 192.168.0.70 and an infinite lease +#dhcp-host=bert,192.168.0.70,infinite +X +# Always give the host with client identifier 01:02:02:04 +# the IP address 192.168.0.60 +#dhcp-host=id:01:02:02:04,192.168.0.60 +X +# Always give the host with client identifier "marjorie" +# the IP address 192.168.0.60 +#dhcp-host=id:marjorie,192.168.0.60 +X +# Enable the address given for "judge" in /etc/hosts +# to be given to a machine presenting the name "judge" when +# it asks for a DHCP lease. +#dhcp-host=judge +X +# Never offer DHCP service to a machine whose ethernet +# address is 11:22:33:44:55:66 +#dhcp-host=11:22:33:44:55:66,ignore +X +# Ignore any client-id presented by the machine with ethernet +# address 11:22:33:44:55:66. This is useful to prevent a machine +# being treated differently when running under different OS's or +# between PXE boot and OS boot. +#dhcp-host=11:22:33:44:55:66,id:* +X +# Send extra options which are tagged as "red" to +# the machine with ethernet address 11:22:33:44:55:66 +#dhcp-host=11:22:33:44:55:66,net:red +X +# Send extra options which are tagged as "red" to +# any machine with ethernet address starting 11:22:33: +#dhcp-host=11:22:33:*:*:*,net:red +X +# Ignore any clients which are specified in dhcp-host lines +# or /etc/ethers. Equivalent to ISC "deny unkown-clients". +# This relies on the special "known" tag which is set when +# a host is matched. +#dhcp-ignore=#known +X +# Send extra options which are tagged as "red" to any machine whose +# DHCP vendorclass string includes the substring "Linux" +#dhcp-vendorclass=red,Linux +X +# Send extra options which are tagged as "red" to any machine one +# of whose DHCP userclass strings includes the substring "accounts" +#dhcp-userclass=red,accounts +X +# Send extra options which are tagged as "red" to any machine whose +# MAC address matches the pattern. +#dhcp-mac=red,00:60:8C:*:*:* +X +# If this line is uncommented, dnsmasq will read /etc/ethers and act +# on the ethernet-address/IP pairs found there just as if they had +# been given as --dhcp-host options. Useful if you keep +# MAC-address/host mappings there for other purposes. +#read-ethers +X +# Send options to hosts which ask for a DHCP lease. +# See RFC 2132 for details of available options. +# Common options can be given to dnsmasq by name: +# run "dnsmasq --help dhcp" to get a list. +# Note that all the common settings, such as netmask and +# broadcast address, DNS server and default route, are given +# sane defaults by dnsmasq. You very likely will not need +# any dhcp-options. If you use Windows clients and Samba, there +# are some options which are recommended, they are detailed at the +# end of this section. +X +# Override the default route supplied by dnsmasq, which assumes the +# router is the same machine as the one running dnsmasq. +#dhcp-option=3,1.2.3.4 +X +# Do the same thing, but using the option name +#dhcp-option=option:router,1.2.3.4 +X +# Override the default route supplied by dnsmasq and send no default +# route at all. Note that this only works for the options sent by +# default (1, 3, 6, 12, 28) the same line will send a zero-length option +# for all other option numbers. +#dhcp-option=3 +X +# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 +#dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5 +X +# Set the NTP time server address to be the same machine as +# is running dnsmasq +#dhcp-option=42,0.0.0.0 +X +# Set the NIS domain name to "welly" +#dhcp-option=40,welly +X +# Set the default time-to-live to 50 +#dhcp-option=23,50 +X +# Set the "all subnets are local" flag +#dhcp-option=27,1 +X +# Set the domain +dhcp-option=15,"2.vmops-test.vmops.com" +X +# Send the etherboot magic flag and then etherboot options (a string). +#dhcp-option=128,e4:45:74:68:00:00 +#dhcp-option=129,NIC=eepro100 +X +# Specify an option which will only be sent to the "red" network +# (see dhcp-range for the declaration of the "red" network) +# Note that the net: part must precede the option: part. +#dhcp-option = net:red, option:ntp-server, 192.168.1.1 +X +# The following DHCP options set up dnsmasq in the same way as is specified +# for the ISC dhcpcd in +# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt +# adapted for a typical dnsmasq installation where the host running +# dnsmasq is also the host running samba. +# you may want to uncomment them if you use Windows clients and Samba. +#dhcp-option=19,0 # option ip-forwarding off +#dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) +#dhcp-option=45,0.0.0.0 # netbios datagram distribution server +#dhcp-option=46,8 # netbios node type +#dhcp-option=47 # empty netbios scope. +X +# Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client +# probably doesn't support this...... +#dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com +X +# Send RFC-3442 classless static routes (note the netmask encoding) +#dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8 +X +# Send vendor-class specific options encapsulated in DHCP option 43. +# The meaning of the options is defined by the vendor-class so +# options are sent only when the client supplied vendor class +# matches the class given here. (A substring match is OK, so "MSFT" +# matches "MSFT" and "MSFT 5.0"). This example sets the +# mtftp address to 0.0.0.0 for PXEClients. +#dhcp-option=vendor:PXEClient,1,0.0.0.0 +X +# Send microsoft-specific option to tell windows to release the DHCP lease +# when it shuts down. Note the "i" flag, to tell dnsmasq to send the +# value as a four-byte integer - that's what microsoft wants. See +# http://technet2.microsoft.com/WindowsServer/en/library/a70f1bb7-d2d4-49f0-96d6-4b7414ecfaae1033.mspx?mfr=true +dhcp-option=vendor:MSFT,2,1i +X +# Send the Encapsulated-vendor-class ID needed by some configurations of +# Etherboot to allow is to recognise the DHCP server. +#dhcp-option=vendor:Etherboot,60,"Etherboot" +X +# Send options to PXELinux. Note that we need to send the options even +# though they don't appear in the parameter request list, so we need +# to use dhcp-option-force here. +# See http://syslinux.zytor.com/pxe.php#special for details. +# Magic number - needed before anything else is recognised +#dhcp-option-force=208,f1:00:74:7e +# Configuration file name +#dhcp-option-force=209,configs/common +# Path prefix +#dhcp-option-force=210,/tftpboot/pxelinux/files/ +# Reboot time. (Note 'i' to send 32-bit value) +#dhcp-option-force=211,30i +X +# Set the boot filename for BOOTP. You will only need +# this is you want to boot machines over the network and you will need +# a TFTP server; either dnsmasq's built in TFTP server or an +# external one. (See below for how to enable the TFTP server.) +#dhcp-boot=pxelinux.0 +X +# Enable dnsmasq's built-in TFTP server +#enable-tftp +X +# Set the root directory for files availble via FTP. +#tftp-root=/var/ftpd +X +# Make the TFTP server more secure: with this set, only files owned by +# the user dnsmasq is running as will be send over the net. +#tftp-secure +X +# Set the boot file name only when the "red" tag is set. +#dhcp-boot=net:red,pxelinux.red-net +X +# An example of dhcp-boot with an external server: the name and IP +# address of the server are given after the filename. +#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 +X +# Set the limit on DHCP leases, the default is 150 +dhcp-lease-max=2100 +X +# The DHCP server needs somewhere on disk to keep its lease database. +# This defaults to a sane location, but if you want to change it, use +# the line below. +#dhcp-leasefile=/var/lib/misc/dnsmasq.leases +leasefile-ro +X +# Set the DHCP server to authoritative mode. In this mode it will barge in +# and take over the lease for any client which broadcasts on the network, +# whether it has a record of the lease or not. This avoids long timeouts +# when a machine wakes up on a new network. DO NOT enable this if there's +# the slighest chance that you might end up accidentally configuring a DHCP +# server for your campus/company accidentally. The ISC server uses +# the same option, and this URL provides more information: +# http://www.isc.org/index.pl?/sw/dhcp/authoritative.php +#dhcp-authoritative +X +# Run an executable when a DHCP lease is created or destroyed. +# The arguments sent to the script are "add" or "del", +# then the MAC address, the IP address and finally the hostname +# if there is one. +#dhcp-script=/bin/echo +X +# Set the cachesize here. +#cache-size=150 +X +# If you want to disable negative caching, uncomment this. +#no-negcache +X +# Normally responses which come form /etc/hosts and the DHCP lease +# file have Time-To-Live set as zero, which conventionally means +# do not cache further. If you are happy to trade lower load on the +# server for potentially stale date, you can set a time-to-live (in +# seconds) here. +#local-ttl= +X +# If you want dnsmasq to detect attempts by Verisign to send queries +# to unregistered .com and .net hosts to its sitefinder service and +# have dnsmasq instead return the correct NXDOMAIN response, uncomment +# this line. You can add similar lines to do the same for other +# registries which have implemented wildcard A records. +#bogus-nxdomain=64.94.110.11 +X +# If you want to fix up DNS results from upstream servers, use the +# alias option. This only works for IPv4. +# This alias makes a result of 1.2.3.4 appear as 5.6.7.8 +#alias=1.2.3.4,5.6.7.8 +# and this maps 1.2.3.x to 5.6.7.x +#alias=1.2.3.0,5.6.7.0,255.255.255.0 +X +X +# Change these lines if you want dnsmasq to serve MX records. +X +# Return an MX record named "maildomain.com" with target +# servermachine.com and preference 50 +#mx-host=maildomain.com,servermachine.com,50 +X +# Set the default target for MX records created using the localmx option. +#mx-target=servermachine.com +X +# Return an MX record pointing to the mx-target for all local +# machines. +#localmx +X +# Return an MX record pointing to itself for all local machines. +#selfmx +X +# Change the following lines if you want dnsmasq to serve SRV +# records. These are useful if you want to serve ldap requests for +# Active Directory and other windows-originated DNS requests. +# See RFC 2782. +# You may add multiple srv-host lines. +# The fields are ,,,, +# If the domain part if missing from the name (so that is just has the +# service and protocol sections) then the domain given by the domain= +# config option is used. (Note that expand-hosts does not need to be +# set for this to work.) +X +# A SRV record sending LDAP for the example.com domain to +# ldapserver.example.com port 289 +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389 +X +# A SRV record sending LDAP for the example.com domain to +# ldapserver.example.com port 289 (using domain=) +###domain=example.com +#srv-host=_ldap._tcp,ldapserver.example.com,389 +X +# Two SRV records for LDAP, each with different priorities +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1 +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2 +X +# A SRV record indicating that there is no LDAP server for the domain +# example.com +#srv-host=_ldap._tcp.example.com +X +# The following line shows how to make dnsmasq serve an arbitrary PTR +# record. This is useful for DNS-SD. (Note that the +# domain-name expansion done for SRV records _does_not +# occur for PTR records.) +#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services" +X +# Change the following lines to enable dnsmasq to serve TXT records. +# These are used for things like SPF and zeroconf. (Note that the +# domain-name expansion done for SRV records _does_not +# occur for TXT records.) +X +#Example SPF. +#txt-record=example.com,"v=spf1 a -all" +X +#Example zeroconf +#txt-record=_http._tcp.example.com,name=value,paper=A4 +X +X +# For debugging purposes, log each DNS query as it passes through +# dnsmasq. +#log-queries +X +# Log lots of extra information about DHCP transactions. +#log-dhcp +X +log-facility=/var/log/dnsmasq.log +X +# Include a another lot of configuration options. +#conf-file=/etc/dnsmasq.more.conf +conf-dir=/etc/dnsmasq.d +X +dhcp-optsfile=/etc/dhcpopts.txt +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/vpcdnsmasq.conf' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/vpcdnsmasq.conf' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/vpcdnsmasq.conf failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/vpcdnsmasq.conf': 'MD5 check failed' + ) << \SHAR_EOF +0b53d152c88ebce3ee09d8e9c8addd6b cloud_scripts/etc/vpcdnsmasq.conf +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/vpcdnsmasq.conf'` -ne 17942 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/vpcdnsmasq.conf' is not 17942" + fi +fi +# ============= cloud_scripts/etc/ipsec.secrets ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.secrets' +then +${echo} "x - SKIPPING cloud_scripts/etc/ipsec.secrets (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/ipsec.secrets (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.secrets' && +include /var/lib/strongswan/ipsec.conf.inc +include /etc/ipsec.d/ipsec.*.secrets +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.secrets' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/ipsec.secrets' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/ipsec.secrets failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.secrets': 'MD5 check failed' + ) << \SHAR_EOF +7ab0bddd5ec64ebda91cf3c5262fef2d cloud_scripts/etc/ipsec.secrets +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.secrets'` -ne 80 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.secrets' is not 80" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/dnsmasq ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/dnsmasq' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/dnsmasq (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/dnsmasq (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/dnsmasq' && +/var/log/dnsmasq.log { +X maxsize 10M +X missingok +X rotate 5 +X notifempty +X delaycompress +X sharedscripts +X postrotate +X [ ! -f /var/run/dnsmasq/dnsmasq.pid ] || kill -USR2 `cat /var/run/dnsmasq/dnsmasq.pid` +X endscript +X create 0640 dnsmasq root +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/dnsmasq' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/dnsmasq' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/dnsmasq failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/dnsmasq': 'MD5 check failed' + ) << \SHAR_EOF +e42458bd875605d1cd625f0596b38d4c cloud_scripts/etc/logrotate.d/dnsmasq +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/dnsmasq'` -ne 272 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/dnsmasq' is not 272" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/cloud ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/cloud' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/cloud (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/cloud (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/cloud' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +/var/log/cloud.log { +X rotate 10 +X maxsize 10M +X missingok +X notifempty +X compress +X # CLOUDSTACK-9155: We cannot tell the processes that are writing to this +X # file to use the new inode, so instead we copy the original file, truncate +X # it and keep the same inode. +X copytruncate +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/cloud' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/cloud' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/cloud failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/cloud': 'MD5 check failed' + ) << \SHAR_EOF +f83a4d4cf36adb81699ac5892bf6c6f5 cloud_scripts/etc/logrotate.d/cloud +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/cloud'` -ne 1124 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/cloud' is not 1124" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/conntrackd ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/conntrackd' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/conntrackd (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/conntrackd (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/conntrackd' && +/var/log/conntrackd-stats.log { +X maxsize 10M +X rotate 2 +X missingok +X compress +X delaycompress +X +X postrotate +X if [ -e /var/run/conntrackd.sock ]; then +X /usr/sbin/invoke-rc.d conntrackd restart > /dev/null +X fi +X endscript +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/conntrackd' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/conntrackd' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/conntrackd failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/conntrackd': 'MD5 check failed' + ) << \SHAR_EOF +334d9dd543fcb9c8682b4b8fc3987c4c cloud_scripts/etc/logrotate.d/conntrackd +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/conntrackd'` -ne 263 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/conntrackd' is not 263" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/monitor ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/monitor' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/monitor (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/monitor (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/monitor' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +/var/log/monitor.log { +X rotate 5 +X maxsize 10M +X missingok +X notifempty +X compress +X copytruncate +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/monitor' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/monitor' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/monitor failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/monitor': 'MD5 check failed' + ) << \SHAR_EOF +dbf4af64f49d5ffbf4a725cca714ccd0 cloud_scripts/etc/logrotate.d/monitor +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/monitor'` -ne 922 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/monitor' is not 922" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/routerServiceMonitor ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/routerServiceMonitor (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/routerServiceMonitor (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +/var/log/routerServiceMonitor.log { +X rotate 5 +X maxsize 10M +X missingok +X notifempty +X compress +X copytruncate +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/routerServiceMonitor failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/routerServiceMonitor': 'MD5 check failed' + ) << \SHAR_EOF +0f7968ad2bdbb870fa6a7f55565003c1 cloud_scripts/etc/logrotate.d/routerServiceMonitor +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/routerServiceMonitor'` -ne 935 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' is not 935" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/ppp ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/ppp' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/ppp (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/ppp (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/ppp' && +/var/log/ppp-connect-errors { +X maxsize 10M +X rotate 5 +X missingok +X notifempty +X compress +X nocreate +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/ppp' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/ppp' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/ppp failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/ppp': 'MD5 check failed' + ) << \SHAR_EOF +7d16a52cb372773845f812e51f52318f cloud_scripts/etc/logrotate.d/ppp +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/ppp'` -ne 98 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/ppp' is not 98" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/apache2 ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/apache2' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/apache2 (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/apache2 (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/apache2' && +/var/log/apache2/*.log { +X missingok +X copytruncate +X rotate 3 +X compress +X dateext +X maxsize 10M +X notifempty +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/apache2' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/apache2' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/apache2 failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/apache2': 'MD5 check failed' + ) << \SHAR_EOF +eefd54e0be665bd8a76a7aebee89d6d5 cloud_scripts/etc/logrotate.d/apache2 +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/apache2'` -ne 148 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/apache2' is not 148" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/rsyslog ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/rsyslog' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/rsyslog (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/rsyslog (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/rsyslog' && +/var/log/syslog +{ +X rotate 7 +X maxsize 10M +X missingok +X notifempty +X compress +X postrotate +X /usr/sbin/invoke-rc.d rsyslog rotate > /dev/null +X endscript +} +X +/var/log/mail.info +/var/log/mail.warn +/var/log/mail.err +/var/log/mail.log +/var/log/daemon.log +/var/log/kern.log +/var/log/auth.log +/var/log/user.log +/var/log/lpr.log +/var/log/cron.log +/var/log/debug +/var/log/messages +{ +X rotate 10 +X maxsize 10M +X missingok +X notifempty +X compress +X sharedscripts +X postrotate +X /usr/sbin/invoke-rc.d rsyslog rotate > /dev/null +X endscript +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/rsyslog' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/rsyslog' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/rsyslog failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/rsyslog': 'MD5 check failed' + ) << \SHAR_EOF +b4409ff800ad8ac42c79f412d6b90094 cloud_scripts/etc/logrotate.d/rsyslog +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/rsyslog'` -ne 517 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/rsyslog' is not 517" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/haproxy ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/haproxy' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/haproxy (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/haproxy (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/haproxy' && +/var/log/haproxy.log { +X rotate 5 +X missingok +X notifempty +X maxsize 10M +X postrotate +X /bin/kill -HUP `cat /var/run/rsyslog.pid 2> /dev/null` 2> /dev/null || true +X endscript +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/haproxy' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/haproxy' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/haproxy failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/haproxy': 'MD5 check failed' + ) << \SHAR_EOF +e584fdf0d2a25578f651fccce265ff09 cloud_scripts/etc/logrotate.d/haproxy +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/haproxy'` -ne 194 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/haproxy' is not 194" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/dnsmasq ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/dnsmasq' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/dnsmasq (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/dnsmasq (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/dnsmasq' && +/var/log/dnsmasq.log { +X maxsize 10M +X missingok +X rotate 5 +X notifempty +X delaycompress +X sharedscripts +X postrotate +X [ ! -f /var/run/dnsmasq/dnsmasq.pid ] || kill -USR2 `cat /var/run/dnsmasq/dnsmasq.pid` +X endscript +X create 0640 dnsmasq root +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/dnsmasq' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/dnsmasq' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/dnsmasq failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/dnsmasq': 'MD5 check failed' + ) << \SHAR_EOF +e42458bd875605d1cd625f0596b38d4c cloud_scripts/etc/logrotate.d/dnsmasq +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/dnsmasq'` -ne 272 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/dnsmasq' is not 272" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/cloud ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/cloud' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/cloud (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/cloud (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/cloud' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +/var/log/cloud.log { +X rotate 10 +X maxsize 10M +X missingok +X notifempty +X compress +X # CLOUDSTACK-9155: We cannot tell the processes that are writing to this +X # file to use the new inode, so instead we copy the original file, truncate +X # it and keep the same inode. +X copytruncate +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/cloud' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/cloud' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/cloud failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/cloud': 'MD5 check failed' + ) << \SHAR_EOF +f83a4d4cf36adb81699ac5892bf6c6f5 cloud_scripts/etc/logrotate.d/cloud +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/cloud'` -ne 1124 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/cloud' is not 1124" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/conntrackd ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/conntrackd' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/conntrackd (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/conntrackd (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/conntrackd' && +/var/log/conntrackd-stats.log { +X maxsize 10M +X rotate 2 +X missingok +X compress +X delaycompress +X +X postrotate +X if [ -e /var/run/conntrackd.sock ]; then +X /usr/sbin/invoke-rc.d conntrackd restart > /dev/null +X fi +X endscript +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/conntrackd' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/conntrackd' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/conntrackd failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/conntrackd': 'MD5 check failed' + ) << \SHAR_EOF +334d9dd543fcb9c8682b4b8fc3987c4c cloud_scripts/etc/logrotate.d/conntrackd +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/conntrackd'` -ne 263 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/conntrackd' is not 263" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/monitor ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/monitor' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/monitor (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/monitor (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/monitor' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +/var/log/monitor.log { +X rotate 5 +X maxsize 10M +X missingok +X notifempty +X compress +X copytruncate +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/monitor' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/monitor' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/monitor failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/monitor': 'MD5 check failed' + ) << \SHAR_EOF +dbf4af64f49d5ffbf4a725cca714ccd0 cloud_scripts/etc/logrotate.d/monitor +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/monitor'` -ne 922 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/monitor' is not 922" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/routerServiceMonitor ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/routerServiceMonitor (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/routerServiceMonitor (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +/var/log/routerServiceMonitor.log { +X rotate 5 +X maxsize 10M +X missingok +X notifempty +X compress +X copytruncate +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/routerServiceMonitor failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/routerServiceMonitor': 'MD5 check failed' + ) << \SHAR_EOF +0f7968ad2bdbb870fa6a7f55565003c1 cloud_scripts/etc/logrotate.d/routerServiceMonitor +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/routerServiceMonitor'` -ne 935 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' is not 935" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/ppp ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/ppp' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/ppp (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/ppp (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/ppp' && +/var/log/ppp-connect-errors { +X maxsize 10M +X rotate 5 +X missingok +X notifempty +X compress +X nocreate +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/ppp' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/ppp' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/ppp failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/ppp': 'MD5 check failed' + ) << \SHAR_EOF +7d16a52cb372773845f812e51f52318f cloud_scripts/etc/logrotate.d/ppp +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/ppp'` -ne 98 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/ppp' is not 98" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/apache2 ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/apache2' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/apache2 (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/apache2 (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/apache2' && +/var/log/apache2/*.log { +X missingok +X copytruncate +X rotate 3 +X compress +X dateext +X maxsize 10M +X notifempty +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/apache2' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/apache2' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/apache2 failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/apache2': 'MD5 check failed' + ) << \SHAR_EOF +eefd54e0be665bd8a76a7aebee89d6d5 cloud_scripts/etc/logrotate.d/apache2 +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/apache2'` -ne 148 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/apache2' is not 148" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/rsyslog ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/rsyslog' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/rsyslog (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/rsyslog (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/rsyslog' && +/var/log/syslog +{ +X rotate 7 +X maxsize 10M +X missingok +X notifempty +X compress +X postrotate +X /usr/sbin/invoke-rc.d rsyslog rotate > /dev/null +X endscript +} +X +/var/log/mail.info +/var/log/mail.warn +/var/log/mail.err +/var/log/mail.log +/var/log/daemon.log +/var/log/kern.log +/var/log/auth.log +/var/log/user.log +/var/log/lpr.log +/var/log/cron.log +/var/log/debug +/var/log/messages +{ +X rotate 10 +X maxsize 10M +X missingok +X notifempty +X compress +X sharedscripts +X postrotate +X /usr/sbin/invoke-rc.d rsyslog rotate > /dev/null +X endscript +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/rsyslog' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/rsyslog' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/rsyslog failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/rsyslog': 'MD5 check failed' + ) << \SHAR_EOF +b4409ff800ad8ac42c79f412d6b90094 cloud_scripts/etc/logrotate.d/rsyslog +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/rsyslog'` -ne 517 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/rsyslog' is not 517" + fi +fi +# ============= cloud_scripts/etc/logrotate.d/haproxy ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/haproxy' +then +${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/haproxy (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/logrotate.d/haproxy (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/haproxy' && +/var/log/haproxy.log { +X rotate 5 +X missingok +X notifempty +X maxsize 10M +X postrotate +X /bin/kill -HUP `cat /var/run/rsyslog.pid 2> /dev/null` 2> /dev/null || true +X endscript +} +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/haproxy' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/logrotate.d/haproxy' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/logrotate.d/haproxy failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/haproxy': 'MD5 check failed' + ) << \SHAR_EOF +e584fdf0d2a25578f651fccce265ff09 cloud_scripts/etc/logrotate.d/haproxy +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/haproxy'` -ne 194 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/haproxy' is not 194" + fi +fi +# ============= cloud_scripts/etc/profile.d/cloud.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/profile.d/cloud.sh' +then +${echo} "x - SKIPPING cloud_scripts/etc/profile.d/cloud.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/profile.d/cloud.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/profile.d/cloud.sh' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +if [ "`id -u`" -eq 0 ]; then +X PATH=${PATH}:/opt/cloud/bin +fi +export PATH +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/profile.d/cloud.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/profile.d/cloud.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/profile.d/cloud.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/profile.d/cloud.sh': 'MD5 check failed' + ) << \SHAR_EOF +78e5d1f4d852b0af96f8b2efa5245c86 cloud_scripts/etc/profile.d/cloud.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/profile.d/cloud.sh'` -ne 861 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/profile.d/cloud.sh' is not 861" + fi +fi +# ============= cloud_scripts/etc/profile.d/cloud.sh ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/profile.d/cloud.sh' +then +${echo} "x - SKIPPING cloud_scripts/etc/profile.d/cloud.sh (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/profile.d/cloud.sh (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/profile.d/cloud.sh' && +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +X +X +if [ "`id -u`" -eq 0 ]; then +X PATH=${PATH}:/opt/cloud/bin +fi +export PATH +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/profile.d/cloud.sh' + eval "${shar_touch}") && \ + chmod 0755 'cloud_scripts/etc/profile.d/cloud.sh' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/profile.d/cloud.sh failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/profile.d/cloud.sh': 'MD5 check failed' + ) << \SHAR_EOF +78e5d1f4d852b0af96f8b2efa5245c86 cloud_scripts/etc/profile.d/cloud.sh +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/profile.d/cloud.sh'` -ne 861 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/profile.d/cloud.sh' is not 861" + fi +fi +# ============= cloud_scripts/etc/cloud-nic.rules ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cloud-nic.rules' +then +${echo} "x - SKIPPING cloud_scripts/etc/cloud-nic.rules (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/cloud-nic.rules (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cloud-nic.rules' && +SUBSYSTEM=="net" KERNEL=="eth*" RUN+="/opt/cloud/bin/cloud-nic.sh $env{ACTION} %k" +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cloud-nic.rules' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/cloud-nic.rules' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/cloud-nic.rules failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cloud-nic.rules': 'MD5 check failed' + ) << \SHAR_EOF +4ffd506afaa6a69a55ba9ab6bbf706f5 cloud_scripts/etc/cloud-nic.rules +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/cloud-nic.rules'` -ne 83 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/cloud-nic.rules' is not 83" + fi +fi +# ============= cloud_scripts/etc/haproxy/haproxy.cfg ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/haproxy/haproxy.cfg' +then +${echo} "x - SKIPPING cloud_scripts/etc/haproxy/haproxy.cfg (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/haproxy/haproxy.cfg (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/haproxy/haproxy.cfg' && +global +X log 127.0.0.1:3914 local0 info +X chroot /var/lib/haproxy +X user haproxy +X group haproxy +X daemon +X +defaults +X log global +X mode tcp +X option dontlognull +X retries 3 +X option redispatch +X option forwardfor +X stats enable +X stats uri /admin?stats +X stats realm Haproxy\ Statistics +X stats auth admin1:AdMiN123 +X option forceclose +X timeout connect 5000 +X timeout client 50000 +X timeout server 50000 +X +X +listen cloud-default +X bind 0.0.0.0:35999 +X option transparent +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/haproxy/haproxy.cfg' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/haproxy/haproxy.cfg' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/haproxy/haproxy.cfg failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/haproxy/haproxy.cfg': 'MD5 check failed' + ) << \SHAR_EOF +a554fcecbaff9747723f9cd3aedf1ffd cloud_scripts/etc/haproxy/haproxy.cfg +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/haproxy/haproxy.cfg'` -ne 483 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/haproxy/haproxy.cfg' is not 483" + fi +fi +# ============= cloud_scripts/etc/haproxy/haproxy.cfg ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/etc/haproxy/haproxy.cfg' +then +${echo} "x - SKIPPING cloud_scripts/etc/haproxy/haproxy.cfg (file already exists)" + +else +${echo} "x - extracting cloud_scripts/etc/haproxy/haproxy.cfg (text)" + sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/haproxy/haproxy.cfg' && +global +X log 127.0.0.1:3914 local0 info +X chroot /var/lib/haproxy +X user haproxy +X group haproxy +X daemon +X +defaults +X log global +X mode tcp +X option dontlognull +X retries 3 +X option redispatch +X option forwardfor +X stats enable +X stats uri /admin?stats +X stats realm Haproxy\ Statistics +X stats auth admin1:AdMiN123 +X option forceclose +X timeout connect 5000 +X timeout client 50000 +X timeout server 50000 +X +X +listen cloud-default +X bind 0.0.0.0:35999 +X option transparent +SHAR_EOF + (set 20 20 02 27 09 37 09 'cloud_scripts/etc/haproxy/haproxy.cfg' + eval "${shar_touch}") && \ + chmod 0644 'cloud_scripts/etc/haproxy/haproxy.cfg' +if test $? -ne 0 +then ${echo} "restore of cloud_scripts/etc/haproxy/haproxy.cfg failed" +fi + if ${md5check} + then ( + ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/haproxy/haproxy.cfg': 'MD5 check failed' + ) << \SHAR_EOF +a554fcecbaff9747723f9cd3aedf1ffd cloud_scripts/etc/haproxy/haproxy.cfg +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/etc/haproxy/haproxy.cfg'` -ne 483 && \ + ${echo} "restoration warning: size of 'cloud_scripts/etc/haproxy/haproxy.cfg' is not 483" + fi +fi +# ============= cloud_scripts/usr/share/cloud/cloud-scripts.tar ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/usr/share/cloud/cloud-scripts.tar' +then +${echo} "x - SKIPPING cloud_scripts/usr/share/cloud/cloud-scripts.tar (file already exists)" + +else +${echo} "x - extracting cloud_scripts/usr/share/cloud/cloud-scripts.tar (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/usr/share/cloud/cloud-scripts.tar +M971C+P`````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````#`P,#`W-34`,#`P,37-T96U-87A& +M:6QE4VEZ93TQ,$T*4G5N=&EM94UA>%5S93TR,$T*```````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````971C+W-Y7-T +M96TO:'EP97)V+61A96UO;G,N:'8M=G-S+61A96UO;BYS97)V:6-E```````` +M````````````````````````````````````````````````````,#`P,#8T +M-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,S0`,3,V,C4Q-3`S,30`,#(S +M,37!E2!S97)V:6-E("A64U,I(&1A96UO;@H*6U-E&5C4W1A3UM=6QT:2UU7-T96UD+W-Y2UC;VYF +M:63TO=7-R+VQO8V%L+V-L;W5D+W-Y7-T96TO;W!E;BUV;2UT;V]L3UM=6QT:2UU3UM=6QT:2UU7-T96UD+W-Y&5N+FUO=6YT"D)E9F]R93UN971W;W)K+G1A2UC;VYF:6&5C4W1A&5C4W1A3UM=6QT:2UU7-T96TO:'EP97)V+61A96UO;G,N:'8M +M9F-O<'DM9&%E;6]N+G-E7!E2!S97)V:6-E("A&0T]062D@9&%E;6]N"D-O +M;F1I=&EO;E!A=&A%>&ES=',]+V1E=B]V;6)U0H*6U-E3UM=6QT:2UU7-T96TO8VQO=60M +M<&]S=&EN:70N2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N0`````````````````````````````````````````````` +M`````````````````````````````````````````#`P,#`V-#0`,#`P,36]U(&UA>2!N;W0@=7-E +M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI +M8V5N7!E(#$S("UJ($123U`*+4$@24Y0550@+7`@:6-M<"`M:B!!0T-%4%0* +M+4$@24Y0550@+6D@971H,2`M<"!T8W`@+6T@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* +M(R`@(&AT='`Z+R]W=W7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E +M<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H +M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N +M2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H +M92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R +M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T +M"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7-C=&P@8V]N9FEG=7)A +M=&EO;B!F:6QE"B,*(R!&;W(@8FEN87)Y('9A;'5E7-C=&PN +M8V]N9B@U*2!F;W(@;6]R92!D971A:6QS+@HC($!615)324].0`H*(R!#;VYT +M2!T:&5R +M96)Y(')E9'5C:6YG('1H92!S:7IE(&]F(&1I&PR='!D+WAL +M,G1P9"YC;VYF```````````````````````````````````````````````` +M````````````````````````````````````````````````````````,#`P +M,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,3,`,3,U-C$W,C4Q-3(` +M,#$T-#4U`"`P```````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````'5S=&%R("``9&%R65S"G!P<&]P=&9I;&4@/2`@("`O971C+W!P<"]O<'1I;VYS +M+GAL,G1P9`H````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````971C+V1N2!D:7-A8FQE +MF5N+"!S:6YC92!T:&5Y"B,@=&5L;"!D +M;G-M87-Q('1O(&9I;'1E2X@268@>6]U(&AA=F4@82!D:6%L+6]N+61E;6%N9"!L:6YK('1H97D@ +M86QS;R!S=&]P"B,@=&AE6]U('=A;G0@9&YS('1O(&=E="!I=',@=7!S=')E86T@2`@(&%P<&5A2!O=&AE<@HC(&9I +M;&4L(&=E='1I;F<@:71S('-E2!O;@HC('-P96-I9FEE9"!I;G1E +M&-E<'0M:6YT97)F86-E/65T:#$*97AC97!T+6EN +M=&5R9F%C93UE=&@R"F5X8V5P="UI;G1E6]U('=A;G0@9&YS;6%S<2!T;R!P6]U"B,@=V%N="!D;G-M +M87-Q('1O(')E86QL>2!B:6YD(&]N;'D@=&AE(&EN=&5R9F%C97,@:70@:7,@ +M;&ES=&5N:6YG(&]N+`HC('5N8V]M;65N="!T:&ES(&]P=&EO;BX@06)O=70@ +M=&AE(&]N;'D@=&EM92!Y;W4@;6%Y(&YE960@=&AI6]U('=A;G0@=&\@ +M:&%V92!A(&1O;6%I;@HC(&%U=&]M871I8V%L;'D@861D960@=&\@2!Q=6%L:69I +M960@9&]M86EN(&YA;65S+"!A7-T96US(&-O;F9I9W5R960@8GD@ +M1$A#4`HC(#,I(%!R;W9I9&5S('1H92!D;VUA:6X@<&%R="!F;W(@(F5X<&%N +M9"UH;W-T7,N;W)G+G5K+#$Y,BXQ-C@N,BXP +M+S(T"@HC(%-A;64@:61E82P@8G5T(')A;F=E(')A=&AE7,N;W)G+G5K+#$Y,BXV."XS +M+C$P,"PQ.3(N,38X+C,N,C`P"@HC(%5N8V]M;65N="!T:&ES('1O(&5N86)L +M92!T:&4@:6YT96=R871E9"!$2$-0('-E6]U(&YE960*(R!T;R!S +M=7!P;'D@=&AE(')A;F=E(&]F(&%D9')E2!$2$-0"B,@2!B92!S970@;VYL>2!F;W(@=&AI2!W:&5N('1H92!T86<@(F=R965N +M(B!I2!A('-U8FYE="!W:&EC:"!C +M86XG="!B92!U6YA;6EC(&%D9')E2!A;F0*(R!A9&0@;F%M97,@=&\@=&AE($1.4R!F;W(@=&AE($E0 +M=C8@861D2P@-#AH"@HC($1O($1(0U`@86YD(%)O=71E2!W:6QL('5S +M92!33$%!0R!F;W(@861D2!R82US=&%T96QE2!J +M=7-T"B,@;F5E9"!T;R!B92!O;B!T:&4@7,@9VEV92!T:&4@:&]S="!W:71H($5T +M:&5R;F5T(&%D9')E7,@9VEV92!T:&4@:&]S="!W +M:71H(&-L:65N="!I9&5N=&EF:65R(#`Q.C`R.C`R.C`T"B,@=&AE($E0(&%D +M9')E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ +M(G)E9"(@=&\*(R!T:&4@;6%C:&EN92!W:71H($5T:&5R;F5T(&%D9')E&5D($E0=C8@861D2!;72!A2X*(V1H8W`M:&]S=#UI9#HP,#HP,3HP +M,#HP,3HQ-CID,CHX,SIF8SHY,CID-#HQ.3IE,CID.#IB,BP@9G)E9"P@6S$R +M,S0Z.C5="@HC($EG;F]R92!A;GD@8VQI96YT2!M86-H:6YE('=H;W-E"B,@1$A#4"!V96YD;W)C;&%S +M'1R82!O<'1I +M;VYS('=H:6-H(&%R92!T86=G960@87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@ +M;VYE"B,@;V8@=VAO'1R82!O<'1I;VYS('=H:6-H(&%R +M92!T86=G960@87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO2!D;G-M +M87-Q(&%N9"!S96YD(&YO(&1E9F%U;'0*(R!R;W5T92!A="!A;&PN($YO=&4@ +M=&AA="!T:&ES(&]N;'D@=V]R:W,@9F]R('1H92!O<'1I;VYS('-E;G0@8GD* +M(R!D969A=6QT("@Q+"`S+"`V+"`Q,BP@,C@I('1H92!S86UE(&QI;F4@=VEL +M;"!S96YD(&$@>F5R;RUL96YG=&@@;W!T:6]N"B,@9F]R(&%L;"!O=&AE0H*(R!3970@=&AE(&1E9F%U;'0@=&EM92UT;RUL:79E +M('1O(#4P"B-D:&-P+6]P=&EO;CTR,RPU,`H*(R!3970@=&AE(")A;&P@2!A;B!O<'1I;VX@=VAI8V@@=VEL;"!O;FQY +M(&)E('-E;G0@=&\@=&AE(")R960B(&YE='=O2!A6]U +M(&UA>2!W86YT('1O('5N8V]M;65N="!S;VUE(&]R(&%L;"!O9B!T:&5M(&EF +M('EO=2!U7!E"@HC(%-E;F0@86X@96UP='D@5U!! +M1"!O<'1I;VXN(%1H:7,@;6%Y(&)E(%)%455)4D5$('1O(&=E="!W:6YD;W=S +M(#<@=&\@8F5H879E+@HC9&AC<"UO<'1I;VX],C4R+")<;B(*"B,@4V5N9"!2 +M1D,M,S,Y-R!$3E,@9&]M86EN('-E87)C:"!$2$-0(&]P=&EO;BX@5T%23DE. +M1SH@66]U71H:6YG(&5L&4@=&%G(&9O2YK<'AE"B-D:&-P+6)O;W0];7EB;V]T:6UA9V4*"B,@16YC87!S +M=6QA=&5D(&]P=&EO;G,@9F]R($5T:&5R8F]O="!G4%A%+B!!;&P@=&AE(&]P +M=&EO;G,@87)E"B,@96YC87!S=6QA=&5D('=I=&AI;B!O<'1I;VX@,32!C;V1E"B-D:&-P+6]P=&EO;CUE;F-A<#HQ-S4L(#$W-BP@,6(@("`@("`@ +M(R!N;RUP61H8W`*(V1H8W`M;W!T:6]N/65N8V%P.C$W-2P@,3#@V+3,R"B-D:&-P+6UA=&-H/6ET86YI8W,L(&]P=&EO;CIC;&EE;G0M87)C +M:"P@,B`C24$V-`HC9&AC<"UM871C:#UH86UM97)S+"!O<'1I;VXZ8VQI96YT +M+6%R8V@L(#8@(W@X-BTV-`HC9&AC<"UM871C:#UM86-T96QS+"!O<'1I;VXZ +M8VQI96YT+6%R8V@L(#<@(T5&22!X.#8M-C0*"B,@1&\@&4M<')O;7!T/2)0#@V4$,L("));G-T86QL($QI;G5X(BP@<'AE;&EN=7@*"B,@3&]A +M9',@/'1F='`M#@V4$,L("));G-T86QL($QI;G5X(BP@<'AE;&EN +M=7@L(#$N,BXS+C0*"B,@57-E(&)O;W1S97)V97(@;VX@;F5T=V]R:RP@9F]U +M;F0@;7D@;75L=&EC87-T(&]R(&)R;V%D8V%S="X*(W!X92US97)V:6-E/7@X +M-E!#+"`B26YS=&%L;"!W:6YD;W=S(&9R;VT@4DE3('-E#@V4$,L("));G-T86QL('=I;F1O=W,@9G)O;2!225,@2!F:6QE0HC('1H92!U&%M<&QE(&]F(&1H8W`M8F]O="!W:71H(&%N(&5X=&5R;F%L(%1& +M5%`@2`M+7!X92US97)V +M:6-E+@HC9&AC<"UB;V]T/2]V87(O9G1P9"]P>&5L:6YU>"XP+&)O;W1H;W-T +M+#$Y,BXQ-C@N,"XS"@HC($EF('1H97)E(&%R92!M=6QT:7!L92!E>'1E#TR,3`P"@HC(%1H92!$2$-0('-E6]U(&UI9VAT(&5N9"!U<"!A8V-I9&5N=&%L +M;'D@8V]N9FEG=7)I;F<@82!$2$-0"B,@2X@5&AE($E30R!S97)V97(@=7-E&5C=71A8FQE +M('=H96X@82!$2$-0(&QE87-E(&ES(&-R96%T960@;W(@9&5S=')O>65D+@HC +M(%1H92!A`HC86QI87,],2XR+C,N +M,"PU+C8N-RXP+#(U-2XR-34N,C4U+C`*(R!A;F0@=&AI"UT87)G970@9F]R(&%L;"!L;V-A;`HC(&UA8VAI;F5S+@HC;&]C86QM>`H* +M(R!2971U6]U('=A;G0@=&\@ +M3XL/'=E:6=H=#X*(R!)9B!T:&4@9&]M86EN('!A&%M<&QE+F-O;2!D;VUA:6X@=&\* +M(R!L9&%P&%M +M<&QE+F-O;2!D;VUA:6X@=&\*(R!L9&%P&%M<&QE+F-O;2PS +M.#DL,@H*(R!!(%-25B!R96-O'!A;G-I;VX@ +M9&]N92!F;W(@4U)6(')E8V]R9',@7V1O97-?;F]T"B,@;V-C=7(@9F]R(%!4 +M4B!R96-O'!A;G-I;VX@9&]N92!F;W(@4U)6 +M(')E8V]R9',@7V1O97-?;F]T"B,@;V-C=7(@9F]R(%185"!R96-O&%M<&QE(%-01BX*(W1X="UR96-O5\@=V]R:W,*(R!F;W(@=&%R9V5T3TO=F%R +M+VQO9R]D;G-M87-Q+FQO9PH*(R!);F-L=61E(&$@86YO=&AE'0*```````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````971C+V-R;VXN9&%I +M;'DO```````````````````````````````````````````````````````` +M`````````````````````````````````````````````````````````#`P +M,#`W-34`,#`P,32]C;&5A2!C86-H92!T;R!U;'1I;6%T96QY(')E9'5C92!S=V%P<&EN9PH*7,O=FTO9')O<%]C86-H97,*```````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````````````971C+W9M +M=V%R92UT;V]LF4@:V5P=#H@,2!-0@IV;7-V8RYM +M87A,;V=3:7IE(#T@,0H*(R!$969I;F5S('1H92`B=FUT;V]L"!S:7IE(#4P30IS:7IE(#4P30IC;VUP0HC3&ES=&5N061D7,@9F]R('!R;W1O8V]L('9E2`O971C+W-S:"]SF4@;V8@97!H +M96UE7-L;V=& +M86-I;&ET>2!!551("E-Y65S"D%U=&AO7,@:6X@+V5T8R]S65S(&EF('EO=2!D;VXG="!T'0@<&%S65S"D=34T%024-L96%N=7!#65S"@HC($%C8V5P="!L;V-A;&4M4]F9G-E="`Q,`HC6#$Q57-E3&]C86QH;W-T +M('EE65S"B-5&PR='!D```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````,#`P,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,34`,3,U +M-C$W,C4Q-3(`,#$T-C`W`"`P```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````'5S=&%R("``9&%R6]U('=A;G0@=&\@=7-E(&$@9&EF9F5R +M96YT(&EN=&5R9F%C92!O6]U(&EN2!F2!)4"!A9&1R97-S+`H@("`@("`@(",@>6]U(&-A;B!U7-L;V'-O8VL@(R!P7-T96T@;&]G9VEN9PHD36]D3&]A9"!I;6ML;V<@ +M("`C('!R;W9I9&5S(&ME2!R:VQO9V0I"B,D36]D3&]A9"!I;6UA7-L;V<@7-T96TN("!3<&QI="!I="!U<"!S;R!T:&%T"B,@:70@:7,@96%S>2!T +M;R!W2YL;V<* +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````````````&5T8R]M;V1P +M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@ +M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2!C86-H92!T +M;R!U;'1I;6%T96QY(')E9'5C92!S=V%P<&EN9PH*<&AY;65M/20H9G)E97QA +M=VL@)R]>365M.B][<')I;G0@)#)])RD*:68@6R`D<&AY;65M("UL="`U,3,P +M,#`@73L@=&AE;@H@('-Y;F,@)B8@96-H;R`Q(#X@+W!R;V,O2YC;VYF```````````````````````````````````````````````` +M```````````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P +M,3$-O;FYE8W1I +M;VYS4&5R0VAI;&0@("`),3`P,`H\+TEF36]D=6QE/@H*(R!V:6TZ('-Y;G1A +M>#UA<&%C:&4@=',]-"!S=STT('-T6U,:6YK&5S($9O;&QO=U-Y;4QI;FMS($UU;'1I5FEE=W,*"0E!;&QO=T]V97)R:61E +M($%L;`H)"4]R9&5R(&%L;&]W+&1E;GD*"0EA;&QO=R!F&5C0T=)("U-=6QT:59I97=S +M("M3>6U,:6YK2QA;&QO=PH@("`@("`@($1E;GD@9G)O +M;2!A;&P*("`@("`@("!!;&QO=R!F3X*"3Q$:7)E8W1O0H)"6%L;&]W(&9R;VT@86QL"@D\+T1I3X*"@E38W)I +M<'1!;&EA0H)"4%L;&]W(&9R;VT@86QL"@D\ +M+T1I3X*"@E%T%004-(15],3T=?1$E2?2]ET%004-(15],3T=?1$E2 +M?2]S2QA;&QO=PH)"41E;GD@ +M9G)O;2!A;&P*"0E!;&QO=R!F2!T +M:&4*"2,@("!34TQ#97)T:69I8V%T949I;&4@9&ER96-T:79E(&ES(&YE961E +M9"X*"5-33$-E0H*"2,@("!397)V +M97(@0V5R=&EF:6-A=&4@0VAA:6XZ"@DC("`@4&]I;G0@4U-,0V5R=&EF:6-A +M=&5#:&%I;D9I;&4@870@82!F:6QE(&-O;G1A:6YI;F<@=&AE"@DC("`@8V]N +M8V%T96YA=&EO;B!O9B!014T@96YC;V1E9"!#02!C97)T:69I8V%T97,@=VAI +M8V@@9F]R;2!T:&4*"2,@("!C97)T:69I8V%T92!C:&%I;B!F;W(@=&AE('-E +M0H)(R`@('1H92!R969E +M2`H0T$I.@H)(R`@(%-E="!T:&4@0T$@8V5R=&EF:6-A +M=&4@=F5R:69I8V%T:6]N('!A=&@@=VAE6]U(&YE960@:&%S:"!S>6UL +M:6YK6UL:6YK7!E*3H* +M"2,@("!#;&EE;G0@8V5R=&EF:6-A=&4@=F5R:69I8V%T:6]N('1Y<&4@86YD +M(&1E<'1H+B`@5'EP97,@87)E"@DC("`@;F]N92P@;W!T:6]N86PL(')E<75I +M2!T;R!V97)I9GD@=&AE(&-E +M4-L:65N +M="!R97%U:7)E"@DC4U-,5F5R:69Y1&5P=&@@(#$P"@H)(R`@($%C8V5S6YT87@@:7,@80H)(R`@(&UI>'1UU-33%]#25!(15)]("%^(&TO7BA%6%!\3E5,3"DO(%P* +M"2,@("`@("`@("`@("!A;F0@)7M34TQ?0TQ)14Y47U-?1$Y?3WT@97$@(E-N +M86ME($]I;"P@3'1D+B(@7`H)(R`@("`@("`@("`@(&%N9"`E>U-33%]#3$E% +M3E1?4U]$3E]/57T@:6X@>R)3=&%F9B(L(")#02(L(")$978B?2!<"@DC("`@ +M("`@("`@("`@86YD("5[5$E-15]71$%9?2`^/2`Q(&%N9"`E>U1)345?5T1! +M67T@/#T@-2!<"@DC("`@("`@("`@("`@86YD("5[5$E-15](3U52?2`^/2`X +M(&%N9"`E>U1)345?2$]54GT@/#T@,C`@("`@("`@*2!<"@DC("`@("`@("`@ +M("!OU)%34]415]!1$12?2`]?B!M+UXQ.3)<+C2!E>&ES=&EN9R!W:&5N(&-L +M:65N=`H)(R`@("`@875T:&5N=&EC871I;VX@:7,@=7-E9"DN(%1H:7,@8V%N +M(&)E('5S960@=&\@:6UP;W)T('1H92!C97)T:69I8V%T97,*"2,@("`@(&EN +M=&\@0T=)('-C'!O'!E;G-I=F4@;W!E2!E;F%B;&5S('1H90H)(R`@("`@97AP;W)T871I;VX@9F]R +M($-'22!A;F0@4U-)(')E<75E'!O2`O=7-R+VQI8B]C9VDM8FEN/@H)"5-33$]P=&EO;G,@*U-T +M9$5N=E9A6]U(&-A;B!U6]U(')E8V5I=F4@ +M22]/(&5R2!A;&5R="!I2!F;W(@8G)O=W-E6]U(&MN;W<@=&AA="!T:&5I2X*"2,@("!. +M;W1I8V4Z($UO2!W86YT('1O(&1I2P@;VYE(&AA6]U(&IU2!A;'-O"B,@:&%V92!T;R!C +M:&%N9V4@=&AE(%9I6]U(&AA=F4@=7!GB!A;F0*(R!214%$ +M344N1&5B:6%N+F=Z"@I,:7-T96X@,3`N,2XQ+C$Z.#$X,`H*/$EF36]D=6QE +M(&UO9%]S0HC('1E;&P@ +M9&YS;6%S<2!T;R!F:6QT97(@;W5T('%U97)I97,@=VAI8V@@=&AE('!U8FQI +M8R!$3E,@8V%N;F]T"B,@86YS=V5R+"!A;F0@=VAI8V@@;&]A9"!T:&4@2!T:&4@2X*"B,@3F5V97(@9F]R=V%R9"!P;&%I +M;B!N86UE2X*(R!.;W1E('1H870@*&%M;VYG2!O9B!T:&4@=7!S=')E86T*(R!S97)V97)S(&ET(&MN +M;W=S(&%B;W5T(&%N9"!T2!E86-H('%U97)Y"B,@=VET:"`@96%C:"`@2`@:6X@('1H92`@;W)D97(@('1H97D@("!A<'!E87(@ +M("!I;@HC("]E=&,O2!A&%M<&QE(&]F(')O=71I;F<@4%12('%U97)I97,@=&\@ +M;F%M97-E2!D;VUA:6YS(&AE6]U('=A;G0@=&\@9F]R8V4@=&\@86X@ +M25`@861D&%M<&QE(&)E;&]W('-E;F0@86YY +M(&AO6]U('=A;G0@ +M9&YS;6%S<2!T;R!L:7-T96X@9F]R($1(0U`@86YD($1.4R!R97%U97-T&-E<'0M +M:6YT97)F86-E/6QO"@HC($]R('=H:6-H('1O(&QI2!A9&1R +M97-S("AR96UE;6)E2!$3E,@7-T96US('=H:6-H +M('-U<'!O6]U(&UA>2!N965D('1H:7,@:7,@=VAE;@HC(')U;FYI;F<@ +M86YO=&AE6]U(&1O;B=T('=A;G0@9&YS;6%S<2!T;R!R +M96%D("]E=&,O:&]S=',L('5N8V]M;65N="!T:&4*(R!F;VQL;W=I;F<@;&EN +M92X*(VYO+6AO6]U('=A;G0@:70@=&\@2!P;W1E;G1I86QL>2!S971T:6YG('1H90HC +M("`@(&1O;6%I;B!O9B!A;&P@'!A;F0M:&]S +M=',B"B-D;VUA:6X],BYV;6]P0HC(&$@;&5A6]U(&AA=F4@;6]R92!T:&%N(&]N92!N971W;W)K+"!Y;W4@ +M=VEL;"!N965D('1O"B,@2!P87)A;65T97)S(&9O&%M<&QE +M7,@7,@:70G +M2!T +M:&4@;6%C:&EN92!W:71H(&5T:&5R;F5T"B,@861D'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ +M(G)E9"(@=&\*(R!A;GD@;6%C:&EN92!W:71H(&5T:&5R;F5T(&%D9')E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ +M(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO"(*(V1H8W`M +M=F5N9&]R8VQA2!M86-H:6YE(&]N90HC +M(&]F('=H;W-E($1(0U`@=7-E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@ +M87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO2!N86UE.@HC(')U;B`B9&YS;6%S<2`M+6AE;'`@9&AC<"(@=&\@9V5T +M(&$@;&ES="X*(R!.;W1E('1H870@86QL('1H92!C;VUM;VX@2!D;G-M87-Q+B!9;W4@=F5R>2!L:6ME;'D@=VEL;"!N;W0@ +M;F5E9`HC(&%N>2!D:&-P+6]P=&EO;G,N($EF('EO=2!U2!A2!W;W)K0HC(&1E9F%U;'0@*#$L +M(#,L(#8L(#$R+"`R."D@=&AE('-A;64@;&EN92!W:6QL('-E;F0@82!Z97)O +M+6QE;F=T:"!O<'1I;VX*(R!F;W(@86QL(&]T:&5R(&]P=&EO;B!N=6UB97)S +M+@HC9&AC<"UO<'1I;VX],PH*(R!3970@=&AE($Y44"!T:6UE('-E0H*(R!3970@=&AE(&1E +M9F%U;'0@=&EM92UT;RUL:79E('1O(#4P"B-D:&-P+6]P=&EO;CTR,RPU,`H* +M(R!3970@=&AE(")A;&P@2!A;B!O<'1I +M;VX@=VAI8V@@=VEL;"!O;FQY(&)E('-E;G0@=&\@=&AE(")R960B(&YE='=O +M2!A6]U(&UA>2!W86YT('1O('5N8V]M;65N="!T:&5M +M(&EF('EO=2!U2!N971B:6]S('-C;W!E+@H*(R!396YD(%)&0RTS +M,SDW($1.4R!D;VUA:6X@2!W:&5N('1H92!C;&EE;G0@71E(&EN=&5G97(@+2!T:&%T)W,@=VAA="!M:6-R;W-O9G0@=V%N +M=',N(%-E90HC(&AT='`Z+R]T96-H;F5T,BYM:6-R;W-O9G0N8V]M+U=I;F1O +M=W-397)V97(O96XO;&EB2]A-S!F,6)B-RUD,F0T+30Y9C`M.39D-BTT +M8C2!S;VUE(&-O;F9I9W5R871I;VYS(&]F"B,@ +M171H97)B;V]T('1O(&%L;&]W(&ES('1O(')E8V]G;FES92!T:&4@1$A#4"!S +M97)V97(N"B-D:&-P+6]P=&EO;CUV96YD;W(Z171H97)B;V]T+#8P+")%=&AE +M"X@3F]T92!T:&%T +M('=E(&YE960@=&\@2!N965D"B,@=&AI2!F:6QE0HC('1H92!U&5L:6YU>"YR +M960M;F5T"@HC($%N(&5X86UP;&4@;V8@9&AC<"UB;V]T('=I=&@@86X@97AT +M97)N86P@2!C;&EE +M;G0@=VAI8V@@8G)O861C87-T6]U(&UI9VAT(&5N9"!U +M<"!A8V-I9&5N=&%L;'D@8V]N9FEG=7)I;F<@82!$2$-0"B,@2X@5&AE($E30R!S +M97)V97(@=7-E2!T:&4@:&]S=&YA;64*(R!I9B!T:&5R92!IF4@:&5R92X*(V-A8VAE +M+7-I>F4],34P"@HC($EF('EO=2!W86YT('1O(&1I2!R97-P;VYS97,@=VAI8V@@8V]M92!F;W)M("]E=&,O:&]S=',@86YD +M('1H92!$2$-0(&QE87-E"B,@9FEL92!H879E(%1I;64M5&\M3&EV92!S970@ +M87,@>F5R;RP@=VAI8V@@8V]N=F5N=&EO;F%L;'D@;65A;G,*(R!D;R!N;W0@ +M8V%C:&4@9G5R=&AE6]U(&%R92!H87!P>2!T;R!T6]U(&-A;B!S970@82!T:6UE+71O+6QI=F4@*&EN"B,@6]U('=A;G0@9&YS;6%S<2!T +M;R!D971E8W0@871T96UP=',@8GD@5F5R:7-I9VX@=&\@"!U<"!$ +M3E,@2!W;W)K"!T;R`U+C8N-RYX"B-A;&EA"UT87)G970@9F]R(&%L;"!L;V-A;`HC(&UA8VAI;F5S+@HC;&]C86QM>`H* +M(R!2971U6]U('=A;G0@=&\@ +M3XL/'=E:6=H=#X*(R!)9B!T:&4@9&]M86EN('!A&%M<&QE+F-O;2!D;VUA:6X@=&\* +M(R!L9&%P&%M +M<&QE+F-O;2!D;VUA:6X@=&\*(R!L9&%P&%M<&QE+F-O;2PS +M.#D*"B,@5'=O(%-25B!R96-O&%M<&QE+F-O;2PS.#DL,0HC&%M<&QE+F-O;2QL9&%P&%M<&QE+F-O +M;0HC&%M<&QE+F-O;0H*(R!4:&4@9F]L +M;&]W:6YG(&QI;F4@65E(%!A9V4N7VAT='`N7W1C<"YD;G,M'0M3TO=F%R+VQO9R]D +M;G-M87-Q+FQO9PH*(R!);F-L=61E(&$@86YO=&AE'0*```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````&5T8R]I<'-E8RYS96-R971S```````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P,3PH@("`@;6%X2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P +M.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N +M71R=6YC871E"GT*```````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````&5T8R]L;V=R;W1A=&4N +M9"]C;VYN=')A8VMD```````````````````````````````````````````` +M```````````````````````````````````````````````````````P,#`P +M-C0T`#`P,#$W-3``,#`P,3PH@("`@;6%X6-O;7!R97-S"@H@("`@<&]S=')O=&%T90H@("`@("`@(&EF +M(%L@+64@+W9A2!O9B!T:&4@3&EC96YS92!A +M=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O +M'!R97-S(&]R(&EM<&QI960N("!3 +M964@=&AE($QI8V5NPH@("`@("`@(')O +M=&%T92`U"B`@("`@("`@;6%X2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N'-I>F4@,3!- +M"B`@("`@("`@;6ES0H@("`@("`@ +M(&-O;7!R97-S"B`@("`@("`@8V]P>71R=6YC871E"GT*```````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````!E=&,O;&]G0H)8V]M<')E71R=6YC871E"B`@("`@("!R;W1A=&4@,PH@("`@("`@8V]M<')E'0*("`@("`@(&UA>'-I>F4@,3!-"B`@("`@("!N;W1I9F5M +M<'1Y"GT*```````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````&5T8R]L;V=R;W1A=&4N9"]R0H)8V]M<')E +M2YL;V<@>PH@("`@0H@("`@;6%X7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ +M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E +M(&%T"B,*(R`@(&AT='`Z+R]W=W2\````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````,#`P,#'DN8V9G```````````````````````````````````````````` +M```````````````````````````````````````````````````````````P +M,#`P-C0T`#`P,#$W-3``,#`P,3'D*"75S97(@:&%P0H)9W)O +M=7`@:&%P0H)9&%E;6]N"@ID969A=6QT7!E(CHB9W5E2(Z(C$W,BXQ-BXQ+C$B+`H)(F1E9F%U +M;'1?96YT2(*?0H````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````;W!T+V-L;W5D+W1E7!E(CH@(FEC;7`B"B`@("`@("`@("`@('TL"B`@("`@("`@("`@ +M('L*("`@("`@("`@("`@("`@(")A;&QO=V5D(CH@=')U92P*("`@("`@("`@ +M("`@("`@(")C:61R(CH@(C$P+C`N,BXP+S@B+`H@("`@("`@("`@("`@("`@ +M(F9I7!E(CH@(G5D<"(*("`@("`@("`@ +M("`@?2P*("`@("`@("`@("`@>PH@("`@("`@("`@("`@("`@(F%L;&]W960B +M.B!T7!E(CH@(FYE='=OR)P=6)L:6-?:7`B.B(Q +M,"XP+C(N,3`R(BP*(G-O=7)C95]N870B.G1R=64L"B)A9&0B.G1R=64L"B)O +M;F5?=&]?;VYE7VYA="(Z9F%L2(Z(C$P+C`N,BXQ(BP*(FYE=&UA2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H +M92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2!C;61?;&EN92YJ2!I<',P,#`Q+FIS;VX*+V]P="]C;&]U9"]B:6XO +M=7!D871E7V-O;F9I9RYP>2!I<',P,#`R+FIS;VX*+V]P="]C;&]U9"]B:6XO +M=7!D871E7V-O;F9I9RYP>2!I<',P,#`S+FIS;VX*```````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````;W!T+V-L;W5D+W1ER)P +M=6)L:6-?:7`B.B(Q,"XP+C(N,3`S(BP*(G-O=7)C95]N870B.G1R=64L"B)A +M9&0B.G1R=64L"B)O;F5?=&]?;VYE7VYA="(Z9F%L2(Z(C$P+C`N,BXQ(BP*(FYE=&UAPH)(FQO8V%L7W!U8FQI8U]I<"(Z(C$W,BXQ-BXQ +M+C$B+`H)(FQO8V%L7V=U97-T7V-I9'(B.B(Q-S(N,38N,2XP+S(T(BP*"2)L +M;V-A;%]P=6)L:6-?9V%T97=A>2(Z(C$W,BXQ-BXQ+C$B+`H)(G!E97)?9V%T +M97=A>5]I<"(Z(C$P+C(P,"XR,#`N,2(L"@DB<&5E2(Z(C-D97,M;60U(BP* +M"2)I:V5?<&]L:6-Y(CHB,V1E7)I9VAT(&]W +M;F5R6]U +M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O +M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W +M=W2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NW!R:6YT("0Y.WTG*0H):68@ +M6R`D4D]55$527U-4051%(#T@(E50(B!="@ET:&5N"@D@("`@4U1!5%53/4U! +M4U1%4@H)96QI9B!;("123U5415)?4U1!5$4@/2`B1$]73B(@70H)=&AE;@H) +M("`@(%-405154SU"04-+55`*"69I"F9I"@IE8VAO(")3=&%T=7,Z("1[4U1! +M5%53?2(*```````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````!O<'0O8VQO=60O=&5M<&QA=&5S+VAE87)T8F5A="YS:"YT96UP;``` +M```````````````````````````````````````````````````````````` +M````````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC +M"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ +M=&AE($QI8V5N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H +M='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI +M8V5NPH@("`@36]D +M92!&5$97('L*("`@("`@("`C"B`@("`@("`@(R!3:7IE(&]F('1H92!R97-E +M;F0@<75E=64@*&EN(&]B:F5C=',I+B!4:&ES(&ES('1H92!M87AI;75M"B`@ +M("`@("`@(R!N=6UB97(@;V8@;V)J96-T2!T;R!S=&]R92!D96%D(&]B:F5C=',N"B`@("`@("`@(R!$969A +M=6QT(&ES(#$S,3`W,B!O8FIE8W1S+@H@("`@("`@(",*("`@("`@("`C(%)E +M6]U('-E="!A(&QO=R!V86QU92P@5$-0(&5N +M=')I97,@:6X*("`@("`@("`C($5S=&%B;&ES:&5D('-T871E&%M<&QE+`H@("`@("`@(",@86X@ +M4U-((&-O;FYE8W1I;VX@=VET:&]U="!+965P06QI=F4@96YA8FQE9"X@268@ +M;F]T('-E="P*("`@("`@("`C('1H92!D865M;VX@=7-E6]U(&1E +M8W)E87-E('1H:7,*("`@("`@("`C('9A;'5E+"!T:&4@;G5M8F5R(&]F(&%C +M:VYO=VQE9V1M96YT6]U"B`@("`@("`@(R!I;F-R96%S +M92!T:&ES('9A;'5E+"!T:&4@'!E6-L97,@6]U('1O(&1I +M'1E'1E +MF%T:6]N +M(&UE2!O9B!Y;W5R(&5X:7-T:6YG(&EN=&5R9F%C97,N($EF +M(&%N>2!D;W5B="P*("`@("`@("`C(&1O(&YO="!M;V1I9GD@=&AI0H@("`@("`@(",@9&]U +M8G0L(&1O(&YO="!M;V1I9GD@=&AIF%T:6]N(&UEF%T:6]N(&UE6]U"B`@("`@ +M("`@(R!N;W1I8V4@6]U(&UA>2!W86YT('1O +M(&EN8W)E87-E('1H92!S:7IE"B`@("`@("`@(R!O9B!T:&4@2!T;R!A8VAI979E(&9A=6QT+71O;&5R86YC92X@26X@ +M8V%S92!O9B!D;W5B="P@9&\*("`@("`@("`C(&YO="!M;V1I9GD@=&AI6]U(&-A;B!O;FQY('-E;&5C="!O;F4N"B`@("`C"B`@("`C(%5$4"![ +M"B`@("`@("`@(PH@("`@("`@(",@5410(&%D9')E6]U(&%R92!G;VEN9R!T;R!UF4*("`@("`@("`C"B`@("`@("`@ +M(R!28W93;V-K971"=69F97(@,3(T.3(X,`H*("`@("`@("`C"B`@("`@("`@ +M(R!%;F%B;&4O1&ES86)L92!M97-S86=E(&-H96-KPH@("`@(PH@("`@(R!3970@=&AE +M(&YI8V4@=F%L=64@;V8@=&AE(&1A96UO;BP@=&AI6]U(&-A;B!S96QE8W0@8F5T=V5E +M;@H@("`@(R!24B!A;F0@1DE&3R!A;F0@=&AE('!R;V-EPH@("`@(R`@(%1Y<&4@1DE&3PH@("`@(R`@(%!R:6]R:71Y +M(#DY"B`@("`C('T*"B`@("`C"B`@("`C($YU;6)E2X*("`@(",@4F5A9"!S;VUE(&1O8W5M96YT +M2!K965P +M('-O;64@9&5A9"!E;G1R:65S(&-A8VAE9"!F;W(@<&]S7-L;V2!N86UE +M("AD865M;VX@*&1E9F%U;'0I(&]R(&QO8V%L,"XN-RD*("`@(",@1&5F875L +M=#H@;V9F"B`@("`C"B`@("!3>7-L;V<@;VX*"B`@("`C"B`@("`C($QO8VMF +M:6QE"B`@("`C"B`@("!,;V-K1FEL92`O=F%R+VQO8VLO8V]N;G1R86-K9"YL +M;V-K"@H@("`@(PH@("`@(R!5;FEX('-O8VME="!C;VYF:6=UF5-87A'&%M<&QE(&-O;F9I9W5R +M871I;VX@9FEL92!S971S('1H90H@("`@(R!S:7IE('1O(#(@34)Y=&5S('1O +M(&%V;VED('1H:7,@F4*("`@(",@:68@:70@9&5T96-T&EM=6T@8G5F9F5R('-I>F4@9W)O=W1H('1H870@8V%N(&)E(')E86-H +M960N(%1H:7,@97AA;7!L92!F:6QE"B`@("`C('-E=',@=&AE('-I>F4@=&\@ +M."!-0GET97,N"B`@("`C"B`@("!.971L:6YK0G5F9F5R4VEZ94UA>$=R;W=T +M:"`X,S@X-C`X"@H@("`@(PH@("`@(R!)9B!T:&4@9&%E;6]N(&1E=&5C=',@ +M=&AA="!.971L:6YK(&ES(&1R;W!P:6YG('-T871E+6-H86YG92!E=F5N=',L +M"B`@("`C(&ET(&%U=&]M871I8V%L;'D@6YC:')O +M;FEZ871I;VX@86=A:6YS="!T:&4@2V5R;F5L"B`@("`C(&%F=&5R(#,P('-E +M8V]N9',@*&1E9F%U;'0@=F%L=64I+B!297-Y;F-H6]U('=A;G0@6YC+B!4:&ES(&]P=&EO;B!I"!K97)N96P@/CT@ +M,BXV+C,Q+@H@("`@(PH@("`@(R!.971L:6YK179E;G1S4F5L:6%B;&4@3V9F +M"@H@("`@(PH@("`@(R!">2!D969A=6QT+"!T:&4@9&%E;6]N(')E8V5I=F5S +M('-T871E('5P9&%T97,@9F]L;&]W:6YG(&%N"B`@("`C(&5V96YT+61R:79E +M;B!M;V1E;"X@66]U(&-A;B!M;V1I9GD@=&AIF%T:6]N(&UO +M9&4L('1H92!P;VQL:6YG(&UO9&4@8V%N(&]N;'D@9W5AF5S('1H92!H86YD;&EN9R!O9B!S +M=&%T92UC:&%N9V4@979E;G1S(&-O;6EN9PH@("`@(R!F2`H:6X@ +M=&5R;7,@;V8*("`@(",@2!T:')E92!F:6QT97(M6]U(&-A;B!D969I;F4@=&AE(&5V +M96YT(&9I;'1E2!A=F]I +M9&EN9R!T:&4@8V]P>2!O9B!T:&4@979E;G0@;65S6]U(')E<75I"!K97)N96P@/CT@,BXV+C(Y('1O"B`@("`C +M(&9I;'1E6]U('=A;G0@=&\@PH@ +M("`@("`@(",*("`@("`@("`C($%C8V5P="!O;FQY(&-E65R(#0@<')O +M=&]C;VPN"B`@("`@("`@(PH@("`@("`@(%!R;W1O8V]L($%C8V5P="!["B`@ +M("`@("`@("`@(%1#4`H@("`@("`@("`@("!30U10"B`@("`@("`@("`@($1# +M0U`*("`@("`@("`@("`@5410"B`@("`@("`@("`@($E#35`@(R!4:&ES(')E +M<75I2!A;&P@=&AE"B`@("`@("`@(R!)4"!A +MPH@("`@("`@("`@ +M("!)4'8T7V%D9')E2!A;B!)4'8V(&%D9')E2!F;&]W('-T871E+@H@("`@("`@(",@5&AI +M2!B86-K=7`*("`@("`@("`C(&9I +M7!E/6YO=&EF>0H@("`@4WES=&5M9"!O;@I]"@`````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````!O<'0O8VQO=60O=&5M +M<&QA=&5S+V-H96-K7VAE87)T8F5A="YS:"YT96UP;``````````````````` +M````````````````````````````````````````````````````````,#`P +M,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7-T96UC=&P@2`M+69A=6QT"@H@("`@<&MI;&P@+3D@:V5E<&%L:79E9"`^/B`D4D]55$52 +M7TQ/1R`R/B8Q('Q\('1R=64*("`@('!K:6QL("TY(&-O;FYT&ET"F9I"@``````````````;W!T+V-L;W5D+W1E;7!L871E +M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI +M86YC90HC('=I=&@@=&AE($QI8V5N6]U +M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HA +M('=I=&@@=&AE($QI8V5NPH@("`@PH@("`@("`@(&AE87)T +M8F5A=`H@("`@?0H*("`@(&YO=&EF>5]B86-K=7`@(B]O<'0O8VQO=60O8FEN +M+VUA2`M+6)A8VMU<"(*("`@(&YO=&EF>5]M87-T97(@(B]O<'0O +M8VQO=60O8FEN+VUA2`M+6UA5]F875L +M="`B+V]P="]C;&]U9"]B:6XO;6%S=&5R+G!Y("TM9F%U;'0B"GT*```````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````!O<'0O8VQO=60O8FEN+P`````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````,#`P,#&4N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&ET(#$*?0H*&5?8V9G7V9I;&5N86UE(#P\14]&"D1%1D%53%0@ +M9&5F875L=`I04D]-4%0@,0I424U%3U54(#(V"D1)4U!,05D@8F]O="YMF4]-C8P,#`@:6YI=')D/21I;FET0`````````````````````````````````````````` +M````````````````````````````````````````````,#`P,#2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA +M=R!O'!R97-S(&]R(&EM<&QI960N +M("!3964@=&AE($QI8V5N7!E(ET@/3T@(G-T871I8VYA +M=')U;&5S(CH*("`@("`@("`@("`@;F5W7!E(ET@/3T@(F9O"`](&1B86=;"AF;W)W87)D*0H@("`@("`@("`@("`@("`@("`@(&EF(&YO +M="!I;F1E>"`]/2`M,3H*("`@("`@("`@("`@("`@("`@("`@("`@9&)A9UMS +M;W5R8V5?:7!=6VEN9&5X72`](&YE=W)U;&4*("`@("`@("`@("`@("`@("`@ +M("!E;'-E.@H@("`@("`@("`@("`@("`@("`@("`@("!D8F%G6W-O=7)C95]I +M<%TN87!P96YD*&YE=W)U;&4I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@ +M("`@("`@("`@("`@("`@(&1B86=;7!E(ET@/3T@ +M(G-T871I8VYA=')U;&5S(CH*("`@("`@("`@("`@("`@(&EF('-O=7)C95]I +M<"!I;B!D8F%G+FME>7,H*3H*("`@("`@("`@("`@("`@("`@("!D96P@9&)A +M9UMS;W5R8V5?:7!="B`@("`@("`@("`@(&5L:68@7,H*3H*("`@("`@("`@("`@("`@("`@("!I;F1E>"`] +M("TQ"B`@("`@("`@("`@("`@("`@("`@9F]R(&9O%T*"B`@("!R971U2!T:&4@<'5B;&EC('-I9&4L +M('1H;W-E(&UU7!E(ET@/3T@7!E(ET@/3T@(G-T871I +M8VYA="(Z"B`@("`@("`@2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET(#$*9FD*"G5S86=E*"D@ +M>PH@('!R:6YT9B`B57-A9V4Z("5S("U;8WQG?')\;GQD72!;+6P@/'!U8FQI +M8R!G871E=V%Y/ET@6RUV(#QV<&,@8VED&ET(#(@)&QO8VL@)&QO8VME9`H).SL*("!E +M&ET("0_("1L;V-K("1L;V-K960*9FD*"FEF +M(%L@(B1N9FQA9R(@/3T@(C$B(%T*=&AE;@H@("-G971?=G!N7W5S86=E"B`@ +M=6YL;V-K7V5X:70@)#\@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)&1F;&%G +M(B`]/2`B,2(@70IT:&5N"B`@(W)E;6]V95]U&ET(#`@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)')F;&%G(B`]/2`B +M,2(@70IT:&5N"B`@71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A +M=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&-E +M<'0@24]%2@I"B`@("`@("`@("`@ +M("`@("`@("`@9W5E22R)$;VU57U)E<75E&-E<'0@17AC97!T:6]N(&%S(&4Z +M"B`@("`@("`@("`@("`@("`@("`@;&]G9VEN9RYE7!E)UT@/3T@)V%L;"<@86YD(&]B:ELG +M7!E(#T@(F%N>2(*("`@("`@("`@("`@:68@(FEC +M;7!?='EP92(@:6X@7,H*2!A;F0@7!E)UT*("`@("`@("`@("`@:68@(FEC;7!? +M8V]D92(@:6X@7,H*2!A;F0@7!E)UTL('-E;&8N7!E("5S("UJ("5S(B`E("AI8VUP7W1Y<&4L('-E;&8N&5C=71E*&1S=$EP2==.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5; +M)V%C=&EO;B==(#T@(D%#0T505"(*("`@("`@("`@("`@("`@("`@("!E;'-E +M.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5;)V%C=&EO;B== +M(#T@(D123U`B"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ +M("`@("`@(",@1F]R(&]T:&5R(')U;&5S(&%D9&5D+"!I9B!D969A=6QT7V5G +M7!E("5S(B`E(&EC;7!?='EP90H@("`@("`@("`@("`@ +M("`@96QI9B!R=6QE6R=P7!E +M+B!3;RP@:71S(&9W(&%T=')I8G5T92!I7!E(#T@ +M(F%N>2(*("`@("`@("`@("`@("`@('-E;&8N<')O=&]C;VP@/2!S96QF+G1Y +M<&4*("`@("`@("`@("`@("`@(&EF(")I8VUP7W1Y<&4B(&EN(')U;&4N:V5Y +M7!E +M+"!R=6QE6R=I8VUP7V-O9&4G72D*("`@("`@("`@("`@("`@(&EF('-E;&8N +M='EP92`]/2`B<')O=&]C;VPB.@H@("`@("`@("`@("`@("`@("`@(&EF(')U +M;&5;)W!R;W1O8V]L)UT@/3T@-#$Z"B`@("`@("`@("`@("`@("`@("`@("`@ +M(')U;&5;)W!R;W1O8V]L)UT@/2`B:7!V-B(*("`@("`@("`@("`@("`@("`@ +M("!S96QF+G!R;W1O8V]L(#T@&5C=71E*")I<'1A +M8FQE+4$O:7!T86)L97,@+70@9FEL=&5R("U$+V&5C=71E*")I +M<'-E="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP +M&5C=71E*")I<'-E="`M +M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP2!V +M86QI9"!D871A"B`@("`@("`@("`@("`@("!I9B!F;VQD97(@(3T@(G5S97)D +M871A(B!A;F0@9F]L9&5R("$](")M971A9&%T82(Z"B`@("`@("`@("`@("`@ +M("`@("`@8V]N=&EN=64*"B`@("`@("`@("`@("`@("!I9B!F:6QE(#T]("(B +M.@H@("`@("`@("`@("`@("`@("`@(&-O;G1I;G5E"@H@("`@("`@("`@("`@ +M("`@7,N97AI="@Q*0H@("`@("`@("`@("!I9B!O2Q!;&QO=UQN1&5N>2!F2!E>&ES=',L('=E(&1O(&ET('1H:7,@ +M=V%Y(&9O7,N97AI="@Q +M*0H*("`@("`@("!F:"`](&]P96XH:'1A8V-E2`](")2 +M97=R:71E4G5L92!>;65T82UD871A+R@N*RDD("`N+B\B("L@9F]L9&5R("L@ +M(B\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%=(@H@("`@("`@("`@("!H +M=&%C8V5S7,N97AI="@Q*2`@ +M(R!&25A-10H@("`@("`@(')E='5R;B!4&ET*#$I("`C($9)6$U%"B`@("`@("`@:7!S96,N=G!N+2@N*BDN8V]N9B(L(&9I;&4I"B`@("`@ +M("`@("`@(&EF(&TZ"B`@("`@("`@("`@("`@("!S96QF+F-O;F9I<',N87!P +M96YD*&TN9W)O=7`H,2DI"@H@("`@("`@(&9O&5C=71E*")I<'-E +M8R!R96QO860B*0H*("`@(&1E9B!C;VYF:6=U#4R-2`M:B!!0T-%4%0B("4@9&5V72D*("`@ +M("`@("!F;W(@;F5T(&EN(&]B:ELG<&5E&UA&UA5]I<"=="B`@("`@("`@<&5E7!E/71U;FYE;"(I"B`@ +M("`@("`@9FEL92YA9&1E<2@B(&%U=&AB>3US96-R970B*0H@("`@("`@(&9I +M;&4N861D97$H(B!K97EE>&-H86YG93UI:V4B*0H@("`@("`@(&9I;&4N861D +M97$H(B!I:V4])7,B("4@:6ME<&]L:6-Y*0H@("`@("`@(&9I;&4N861D97$H +M(B!I:V5L:69E=&EM93TE3TS,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1T:6UE;W5T/3$R +M,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1A8W1I;VX]')A;F=E*#,I.@H@("`@("`@("`@("!R +M97-U;'0@/2!#&5C=71E*"=I<'-E8R!S=&%T=7,@=G!N+25S +M('P@9W)E<"`B)7,B)R`E("AR:6=H='!E97(L('!E97)L:7-T+G-P;&ET*"(L +M(BP@,2E;,%TI*0H@("`@("`@("`@("!I9B!L96XH2P@)R,G*0H@("`@("`@(&EF(&YO="!U&5C +M=71E*")T9&)D=6UP("]V87(O&5C=71E*"=K:6QL("TY("5S)R`E('!I9"D*"@IC;&%S&5C=71E*")S>7-T96UC=&P@2YS96-R971S(B`E("AS96QF+E903D-/3D9$25(I"B`@("`@ +M("`@>&PR='!D8V]N9F9I;&4@/2`B+V5T8R]X;#)T<&0O>&PR='!D+F-O;F8B +M"B`@("`@("`@>&PR='!O<'1I;VYS9FEL92`]("(O971C+W!P<"]O<'1I;VYS +M+GAL,G1P9"(*"B`@("`@("`@;&]C86QI<"`](&]B:ELG;&]C86Q?:7`G70H@ +M("`@("`@(&QO8V%L8VED2`Z(%!32R!<(B5S7"(B("4@*&QE9G0L('!S:RDI"B`@("`@ +M("`@&PR='!D8V]N9F9I;&4I"B`@("`@("`@>&PR='!D8V]N9BYA9&1E<2@B +M:7`@&PR='!O<'1I;VYS+F-O;6UI="@I"@H@("`@9&5F(')E;6]T96%C8V5S4EP*'-E;&8L(&EP82DZ"B`@("`@("`@9F]R(&EN +M=&5R9F%C92!I;B!S96QF+F-O;F9I9RYA9&1R97-S*"DN9V5T7VEN=&5R9F%C +M97,H*3H*("`@("`@("`@("`@:68@:6YT97)F86-E+FEP7VEN7W-U8FYE="AI +M<&$I.@H@("`@("`@("`@("`@("`@2@I"B`@("`@("`@4EP*')U +M;&5;)W!U8FQI8U]I<"==*0H@("`@("`@(&EN=&5R;F%L7V9W:6YT97)F86-E +M(#T@4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI"B`@ +M("`@("`@<'5B;&EC7V9W<&]R=',@/2!S96QF+G!O4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI+`H@ +M("`@("`@("`@("`@("`@&UA2(Z"B`@("`@("`@("`@(&9W7W!R97)O=71?2(Z"B`@("`@("`@ +M("`@(&9W7W!O2(Z"B`@("`@("`@("`@ +M(&9W7W!O2(Z"B`@("`@("`@ +M("`@(&9W7V]U='!U=%]R=6QE("L]("(@+2UD<&]R="`E2(Z"B`@("`@("`@("`@(&9W +M7V]U='!U=%]R=6QE("L]("(Z(B`K('-E;&8N<&]R='-4;U-T4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI +M+`H@("`@("`@("`@("`@("`@&9F9F9F9F9F("TM +M8W1M87-K(#!X9F9F9F9F9F8B("4*("`@("`@("`@("`@("`@("`@("`@("`@ +M4EP*')U;&5;(FEN=&5R;F%L7VEP +M(ETI+"!S96QF+F=E=$=U97-T27`H*2E=*0H*"F-L87-S($EP5&%B;&5S17AE +M8W5T;W(Z"@H@("`@8V]N9FEG(#T@3F]N90H*("`@(&1E9B!?7VEN:71?7RAS +M96QF+"!C;VYF:62!PR)P&5C=71OR)P&5C +M=71OR)P +M&5C=71O7!E.B`E&5C27!T86)L97,H8V]N9FEG*3H* +M("`@("`@("!L;V=G:6YG+F1E8G5G*")0&5C=71O7,H*3H*("`@("`@("`@("`@ +M97AE8T1A=&%B86&5C27!T +M86)L97,H8V]N9FEG*0H@("`@96QI9B!J&5C27!T86)L97,H +M8V]N9FEG*0H@("`@96QS93H*("`@("`@("!L;V=G:6YG+G=A7!E/25S(B`E("AP6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7)I9VAT(&]W;F5R6]U('5N9&5R('1H +M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C +M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7)I +M9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT +M='`Z+R]W=W&5C=71I;F'!O2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&QO9V=E +M&ET(#(@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)$%F;&%G(B`] +M/2`B,2(@70IT:&5N"B`@861D7W-N870@("1P=6)L:6-)<`H@('5N;&]C:U]E +M>&ET("0_("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1$9FQA9R(@/3T@(C$B +M(%T*=&AE;@H@(')E;6]V95]S870@("1P=6)L:6-)<`H@('5N;&]C:U]E>&ET +M("0_("1L;V-K("1L;V-K960*9FD*"G5N;&]C:U]E>&ET(#$@)&QO8VL@)&QO +M8VME9`H````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````````````;W!T+V-L +M;W5D+V)I;B]V<&-?2!O9B!T:&4@3&EC96YS92!A=`HC"B,@ +M("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE +M($QI8V5N5]T86)L92@I('L*("!L;V-A;"!F5]T86)L92`B +MPH@(&QO8V%L(')U +M;&4])#$*("!L;V-A;"!I<#TD*&5C:&\@)')U;&4@?"!C=70@+60Z("UF,2D* +M("!I9B!;("1I<"`]/2`B4F5V;VME(B!="B`@=&AE;@H@("`@3TD9V%T97=A>2!C:61R/21C +M:61R(@H@(&QO8V%L(&1E=CTD*&=E=$5T:$)Y27`@)&EP*0H@(&EF(%L@)#\@ +M+6=T(#`@70H@('1H96X*("`@(')E='5R;B`Q"B`@9FD*("!S=61O(&EP(')O +M=71E(&%D9"`D8VED3TD9V%T97=A>2!C:61R/21C:61R(@H@ +M(')E='5R;B`D&ET(#(@)&QO8VL@)&QO8VME +M9`H@("`@("`@(#L["B`@97-A8PID;VYE"@II9B!;("UN("(D6EN9R!F=R!R=6QE +M&ET("1S=6-C97-S("1L;V-K("1L;V-K960*```````` +M``````````````````````````````!O<'0O8VQO=60O8FEN+V)A0`````````````````````````````````````````````````` +M````````````````````````````````````````````,#`P,#7)I9VAT(&]W;F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* +M(R`@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI +M8V5N&5C=71A8FQE/2&-E<'1I;VX@86YD('-E;&8N<')O8V5S&5C=71E('-H96QL(&-O;6UA;F0Z("5S +M)R`E('-E;&8N8VUD*0H@("`@("`@("`@("!E2<@:6X@<#H*("`@ +M("`@("`@("`@("`@("`@("`@("`@&-E<'1I;VXH)V-A;FYO="!F:6YD(&)A2!I;B`E&-E<'1I;VXH)V-A;FYO="!F:6YD +M(&AO2P@PH@("`@("`@("`@("`B87!I2V5Y(CH@87!I:V5Y+`H@ +M("`@("`@("`@("`B8V]M;6%N9"(Z("=N;W1I9GE"87)E;65T86Q07,H*2P@4)A3TE2P@5]P2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ +M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&EP=&%B;&5S +M+7-A=F5\9W)E<"`B24Y0550@+6H@3D545T]22U]35$%44R(@/B`O9&5V+VYU +M;&P*("!I9B!;("0_("UE<2`P(%T*("!T:&5N"B`@("`@(')E='5R;B`D/PH@ +M(&9I"B`@:7!T86)L97,@+4X@3D545T]22U]35$%44R`^("]D978O;G5L;`H@ +M(&EP=&%B;&5S("U)($9/4E=!4D0@+6H@3D545T]22U]35$%44R`^("]D978O +M;G5L;`H@(&EP=&%B;&5S("U)($E.4%54("UJ($Y%5%=/4DM?4U1!5%,@/B`O +M9&5V+VYU;&P*("!I<'1A8FQEPH@(&EP=&%B +M;&5S("U,($Y%5%=/4DM?4U1!5%,@+6X@+78@+7@@?"!A=VL@)R0Q('X@+UY; +M,"TY72LD+R![('!R:6YT9B`B)7,Z(BP@)#)])SL@/B`O9&5V+VYU;&P*("!I +M9B!;("UF("]R;V]T+W)E;6]V9616:69S(%T@.R!T:&5N(&EP=&%B;&5S("U: +M($Y%5%=/4DM?4U1!5%,@.R!F:3L@/B`O9&5V+VYU;&P*("`O&ET("0_("1L;V-K("1L +M;V-K960*9FD*"FEF(%L@(B1A9FQA9R(@/3T@(C$B(%T*=&AE;@H@("-A9&1? +M<'5B;&EC7VEN=&5R9F%C92`D<'5B;&EC268*("!U;FQO8VM?97AI="`D/R`D +M;&]C:R`D;&]C:V5D"F9I"@II9B!;("(D9&9L867)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&ET(#$*9FD*"G-E="`M>`IU2(*"FEF(%L@)#\@+65Q(#`@70IT:&5N +M"B`@("!T/6!D871E("LE2(*:68@6R`D/R`M;F4@ +M,"!="B`@('1H96X*("`@("`@*&-R;VYT86(@+6P@.V5C:&\@+64@(B-M;VYI +M=&]R:6YG0V]N9FEG7&Y32$5,3#TO8FEN+V)A2(I('P@8W)O;G1A8B`M"B`@("`@(&QO9V=E2!F;W(@;6]N:71O6]U(&UA>2!N;W0@=7-E('1H:7,@ +M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NWT*("`@(&9OF4G72`]('-T&QE;BD*("`@(&EF("=N=U]T>7!E)R!N;W0@:6X@:7`N:V5Y7!E)UT@/2`G<'5B;&EC)PH@("`@96QS93H* +M("`@("`@("!I<%LG;G=?='EP92==(#T@:7!;)VYW7W1Y<&4G72YL;W=E7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C +M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F +M('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5LP77T*"B`@("`@("`@("`@ +M("`@("!T;T1A=&5686P])"AD871E("UD("(D9&%T979A;"(@(BLE7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z +M+R]W=W0IE:F5C +M="!\?"!T0IS>7-T96UC=&P@7-T96UD+6IO=7)N +M86QD"@I465!%/20H9W)E<"`M4&\@)W1Y<&4]7$M;82UZ02U:72HG("]V87(O +M8V%C:&4O8VQO=60O8VUD;&EN92D*:68@6R`B)%194$4B(#T](")R;W5T97(B +M(%T@?'P@6R`B)%194$4B(#T](")V<&-R;W5T97(B(%T@?'P@6R`B)%194$4B +M(#T](")D:&-P"`O;W!T+V-L;W5D+V)I +M;B]U<&1A=&5?8V]N9FEG+G!Y(%T*("!T:&5N"B`@("`O;W!T+V-L;W5D+V)I +M;B]U<&1A=&5?8V]N9FEG+G!Y(&-M9%]L:6YE+FIS;VX@?'P@=')U90H@(&9I +M"F9I"@I;("$@+68@+W9A7-T96UD+W-S:&0@;65M;W)Y(&QE86L@+2!H='1P7-T96UD+VES7-T +M96UD+75S97(*"B,@16YA8FQE(&%N9"!3=&%R="!34T@*7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R +M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T +M"B,*(R`@(&AT='`Z+R]W=W2!S=&]R86=E('-Y7`])$A94$525DE33U(*("!I9B!; +M("(D:'EP(B`]/2`B=FUW87)E(B!=('Q\(%L@(B1H>7`B(#T](")H>7!E5]H='1P"B`@83)E;FUO9"!H96%D97)S"@H@(&-A="`^+V5T8R]A +M<&%C:&4R+V-OTA45%!3?2`];VX*4F5W7,@"UR97%U97-T960M=VET:"P@0V]N=&5N="U4 +M>7!E+"!O6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I +M="`B4V5T=&EN9R!U<"!);G1E&5C=71E(&EL8G9M('-V8W,B"B`@97AI="`Q"F9I"G-E +M='5P7VEL8G9M"@`````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````!O<'0O8VQO=60O8FEN+W-E='5P+W9P8W)O=71E2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N7-T96T@=FTB"@H@(&EF(%L@+68@ +M+V5T8R]H;W-TB`D1$]-04E.(%T@)B8@ +M1$]-04E./2)C;&]U9&YI;F4N:6YT97)N86PB"B`@(T1.4R!S97)V97(@=VEL +M;"!A<'!E;F0@)$1/34%)3B!T;R!L;V-A;"!Q=65R:65S"B`@6R-=*FQO8V%L/2XJ)"]L;V-A;#U<+R1$3TU!24Y< +M+R\B("]E=&,O9&YS;6%S<2YC;VYF"@H@(&-O;6UA;F0@+78@9&AC<%]R96QE +M87-E(#X@+V1E=B]N=6QL(#(^)C$*("!N;U]D:&-P7W)E;&5A&ET(#$*9FD*2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&EF(%L@(B1(65!%4E9)4T]2(B`A/2`B=FUW87)E(B!=.R!T:&5N +M"B`@("!R971U6YC"B`@2]L;V=R;W1A=&4@+V5T8R]C2`R/B8Q"B`@9FD*?0H*6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ +M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I="`B +M4V5T=&EN9R!U<"!%;&%S=&EC($QO860@0F%L86YC97(@7)I9VAT(&]W;F5R6]U('5N9&5R('1H +M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C +M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7!EPH@(&EF(%L@+60@+W!R;V,O>&5N(%T[('1H96X*("`@ +M(&UO=6YT("UT('AE;F9S(&YO;F4@+W!R;V,O>&5N"B`@("`D*&1M97-G('P@ +M9W)E<"`M<2`B6&5N($A632(I"B`@("!I9B!;("0_("UE<2`P(%T[('1H96X@ +M(",@,3U05BPP/4A630H@("`@("!E8VAO(")X96XM:'9M(B`F)B!R971UF5D(&%S($AY +M<&5R=B!W:&5N(%9IPH@(%L@(2`M9"`O<')O +M8R]X96X@72`F)B!S960@+6D@)W,O7G9C+R-V8R\G("]E=&,O:6YI='1A8B`F +M)B!T96QI;FET('$*("!;("UD("]P +M(W9C+W9C+R<@+V5T8R]I;FET=&%B("8F('1E;&EN:70@<0H*("!S>7-T96UC +M=&P@9&%E;6]N+7)E;&]A9`H*("!C87-E("1(65!%4E9)4T]2(&EN"B`@("`@ +M>&5N+7!V?'AE;BUD;VU5*0H@("`@("`@("`@7-T +M96UC=&P@7-T96UC=&P@9&ES86)L92!N +M='!D"B`@("`@("`@("!S>7-T96UC=&P@96YA8FQE('AE+61A96UO;@H@("`@ +M("`@("`@&5N=&]O;',@;F]T(&EN7Q#3TY&24=? +M2$]44$Q51U]00TE?04-023UY)R`O8F]O="]C;VYF:62`M +M3"`Q,34R,#`@='1Y4S`@=G0Q,#(B("]E=&,O:6YI='1A8@H@("`@("`@("`@ +M7-T96UC=&P@2!C;61L +M:6YE(&9I;&4@9G)O;2!Q96UU+6=U97-T+6%G96YT(@H@("`@("`@("`@("`@ +M(&)R96%K"B`@("`@("`@("`@(&9I"B`@("`@("`@("`@('-L965P(#$*("`@ +M("`@("`@(&1O;F4*("`@("`@("`@(&EF(%L@(2`M7-T96T@=&EM92!S>6YC)V0@=VET:"!H;W-T('9I82!V;7=AF5D +M(&%S('9I7!E7!E +M65S+"!H86-K>2$I"B`@("`@ +M("`@("!D;6ED96-O9&4@?"!G2(*("`@("`@("`@(&9I"B`@("`@("`@("`[.PH@(&5S86,*"B`@ +M(R!&:6YD(&%N9"!E>'!O7-T96UV;2@I('L*("!L;V-A;"!P871C:&9I;&4])#$*("!L;V-A;"!B +M86-K=7!F;VQD97(](B]T;7`O+F-O;F8N8F%C:W5P(@H@(&QO8V%L(&QO9V9I +M;&4](B]V87(O;&]G+W!A=&-H7-T96UV;2]C;VYF+V-L;W5D+FIK7-T96UV;2]C +M;VYF+RH@)&)A8VMU<&9O;&1E7-T96UV;0H@(&5C:&\@(D%L;"(@?"!U;GII<"`D<&%T8VAF:6QE("UD("]U +M&%R +M9W,@8VAM;V0@-34U"B`@:68@6R`M9B`D8F%C:W5P9F]L9&5R+V-L;W5D+FIK +M7-T96UV;2]C;VYF+PH@("`@96-H;R`B4F5S=&]R960@:V5Y +M7-T;W)E"B`@ +M:V5Y=&]O;"`M:6UP;W)T:V5Y7-T;W)E("]E=&,O7-T;W)E("]UU!!5$-(7TU/54Y4?2]A9V5N="YZ:7`@72`F)B!; +M("UF("]V87(O8V%C:&4O8VQO=60O<&%T8V@N7!E/21465!%(B`^/B`D +M;&]G9FEL90H@("`@<&%T8VA?FEP"B`@("!I9B!;("0_("UG="`P(%T*("`@('1H96X*("`@("`@96-H +M;R`B1F%I;&5D('1O(&%P<&QY('!A=&-H('-Y7-T +M96UD+W-Y365M.B][<')I;G0@)#)])RD*("!I9B!;("0H*'!H>7-M +M96TI*2`M;'0@-#`Y-C`P(%T[('1H96X*("`@("`@6YC"B`@'!O7!E&ET(#$P"B`@;&]G7VET(")3=&%R=&EN9R!G=65S="!S97)V:6-E2YS:``````````` +M```````````````````````````````````````````````````````````` +M````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@ +M("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE +M($QI8V5NPH@(&QO9U]I="`B4V5T=&EN9R!U<"!C;VYS +M;VQE('!R;WAY('-Y'D@+V5T8R]I<'1A8FQE'D*```````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````````````````;W!T +M+V-L;W5D+V)I;B]S971U<"]C;VUM;VXN6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5]M86-S*"D@>PH@("`@;6%CS,Z+2(O971C+W5D978OV%D9')E5]M86-S("(D +M3DE#7TU!0U,B"B`@9FD*?0H*PH@(&QO8V%L +M(&EN=&9N=6T])#$*("!L;V-A;"!I<#TD,@H@(&QO8V%L(&UAVEN=&9N=6U]"B`@;&]C86P@8F]O='!R;W1O/2)S=&%T:6,B"@H@(&EF(%L@ +M(B1"3T]44%)/5$\B(#T](")D:&-P(B!="B`@=&AE;@H@("`@:68@6R`B)&EN +M=&9N=6TB("$]("(P(B!="B`@("!T:&5N"B`@("`@("!B;V]T<')O=&\](F1H +M8W`B"B`@("!F:0H@(&9I"@H@(&EF(%L@(B1I<"(@(3T@(C`N,"XP+C`B("UA +M("(D:7`B("$]("(B("UO("(D9F]R8V4B(#T](")F;W)C92(@70H@('1H96X* +M("`@("!E8VAO(")I9F%C92`@)&EN=&8@:6YE="`D8F]O='!R;W1O(B`^/B`O +M971C+VYE='=O7-C=&P@;F5T+FEP +M=C8N8V]N9BYA;&PN9&ES86)L95]I<'8V/3`*("!S>7-C=&P@;F5T+FEP=C8N +M8V]N9BYA;&PN9F]R=V%R9&EN9STQ"B`@7,O;F5T+VEP=C0O:7!?9F]R=V%R9`H@(%L@+68@+V5T +M8R]I<'1A8FQE7,O;F5T+VEP=C0O8V]N9B]D969A=6QT+W)P7V9I;'1E +M<@H@("`@("!F;W(@=FEF(&EN("16249?3$E35#L@9&\*("`@("`@("`@;&]G +M7VET(")C;&]U9#H@9&ES86)L92!R<%]F:6QT97(@;VX@<'5B;&EC(&EN=&5R +M9F%C93H@)'9I9B(*("`@("`@("`@7,O;F5T +M+VEP=C0O8V]N9B]L;R]R<%]F:6QT97(*?0H*96YA8FQE7VER<6)A;&%N8V4H +M*2!["B`@;&]C86P@96YA8FQE9#TD,0H@(&QO8V%L('!R;V,],`H*("!PPH@ +M(&QO8V%L(&5N86)L93TD,0H*("!I9B!;("1E;F%B;&4@+65Q(#`@70H@('1H +M96X*("`@("`@96-H;R`P(#X@+V5T8R]R<'-R9G-E;F%B;&4*("`@("`@#TD*'!R:6YT9B`B)7A<;B(@)&YU;2D*("!E8VAO("1H97@["B`@(V5N +M86)L92!R<',*("!E8VAO("1H97@@/B`O"TP+W)P7,O;F5T+V-OPH@(&EN:71?:6YT97)F86-EB`B)&=W9&5V +M(B!="B`@("!T:&5N"B`@("`@(&=W9&5V/2)E=&@P(@H@("`@9FD*"B`@("!I +M<"!R;W5T92!A9&0@9&5F875L="!V:6$@)$=7(&1E=B`D9W=D978*("!F:0H* +M("`C(%=OW!R:6YT("0Q(BXB)#(B+B(D,R(N,2)])RD*("`@("`@=&EM +M96]U="`S('!I;F<@+6X@+6,@,R`D34=-5%]'5R`F"B`@9FD*"B`@:68@6R`B +M)$A94$525DE33U(B(#T](")V;7=A6YC +M(&5N86)L90H@(&9I"GT*"G-E='5P7V1NB`D1$]-04E.(%T@)B8@1$]-04E./2)C +M;&]U9&YI;F4N:6YT97)N86PB"B`@(W)E;6]V:6YG('1H92!D;G-M87-Q(&UU +M;'1I<&QE(')A;F=E6R-=*FQO8V%L/2XJ +M)"]L;V-A;#U<+R1$3TU!24Y<+R\B("]E=&,O9&YS;6%S<2YC;VYF"B`@9FD* +M"B`@:68@6R`M;B`@(B1$3E-?4T5!4D-(7T]21$52(B!="B`@=&AE;@H@("`@ +M("!S960@+6D@+64@(B]>6R-=*F1H8W`M;W!T:6]N+BH],3$Y+BHD+V0B("]E +M=&,O9&YS;6%S<2YC;VYF"B`@("`@(&5C:&\@(F1H8W`M;W!T:6]N+69O9&AC<"UR86YG95]I<#0]+BHD+V1H8W`M9&AC<"UR86YG95]I<#8]+BHD+V1H8W`M +M6R-=*F1H8W`M;W!T:6]N/6]P=&EO;CIR;W5T97(N*B0O +M9"(@+V5T8R]D;G-M87-Q+F-O;F8*("!;("1$149!54Q47T=7(%T@)B8@96-H +M;R`B9&AC<"UO<'1I;VX];W!T:6]N.G)O=71E6R-=*F1H8W`M;W!T:6]N/6]P=&EO +M;C8Z9&YS+7-EB`B)$542#!?25`V(B!="B`@=&AE;@H@ +M("`@("!E8VAO(#$@/B`O=F%R+V-A8VAE+V-L;W5D+V1N;&5A7-T96UC=&P@9&ES86)L92!A<&%C:&4R"B`@8VQE86Y?:7!A;&EA +M&%M<&QE+F-O;F8*("!R +M;2`M9B`O971C+V%P86-H93(O26YC;'5D92!P;W)T2!0 +M>71H;VX@0W-!<'`@8V]N9FEG7&XC26YC;'5D92!P;W)T&5S +M($UU;'1I5FEE=W,B+R)/<'1I;VYS("U);F1E>&5S($UU;'1I5FEE=W,B+R`O +M971C+V%P86-H93(O;6]D&5S(B`^("]V87(O=W=W+VAT;6PO+FAT86-C97-S +M"GT*"G-E='5P7V%P86-H93(H*2!["B`@;&]G7VET(")3971T:6YG('5P(&%P +M86-H92!W96(@2!A;F0@;F]T('=OPH@('!U8FQI8U]I<#TD151(,E])4`H@(%L@(B1%5$@R7TE0(B`] +M/2`B,"XP+C`N,"(@72`F)B!P=6)L:6-?:7`])$542#%?25`*("!E8VAO("1P +M=6)L:6-?:7`*?0H*PH@("`@;&]G7VET(")3971T:6YG +M('5P($Y44"(*("`@($Y44%]#3TY&7T9)3$4](B]E=&,O;G1P+F-O;F8B"B`@ +M("!I9B!;("UF("1.5%!?0T].1E]&24Q%(%T*("`@('1H96X*("`@("`@("!) +M1E,])RPG(')E860@+6$@R-S97)V97)?;&ES=%M` +M77TM,2`[(&ET97)A=&]R/CTP(#L@:71E2!A<&%C:&4R +M(B`^("]V87(O8V%C:&4O8VQO=60O96YA8FQE9%]S=F-S"B`@(&5C:&\@(F-L +M;W5D(&YFT-(149?5$U0 +M7T9)3$5]"B`@("`@($-/34U!/2(L7&Y<="(*("`@("`@8V%S92`D2T59(&EN +M"B`@("`@("`@9&ES86)L95]R<%]F:6QT97(I"B`@("`@("`@("`@(&5X<&]R +M="!$25-!0DQ%7U)07T9)3%1%4CTD5D%,544*("`@("`@("`@("`@.SL*("`@ +M("`@("!E=&@P:7`I"B`@("`@("`@("`@(&5X<&]R="!%5$@P7TE0/21604Q5 +M10H@("`@("`@("`@("`[.PH@("`@("`@(&5T:#%I<"D*("`@("`@("`@("`@ +M97AP;W)T($542#%?25`])%9!3%5%"B`@("`@("`@("`@(#L["B`@("`@("`@ +M971H,FEP*0H@("`@("`@("`@("!E>'!O'!O'!O'!O'!O'!O'!O'!O +M'!O'!O'!O +MF4I"B`@("`@("`@("`@(&5X<&]R="!'54535%]#24127U-) +M6D4])%9!3%5%"B`@("`@("`@("`@(#L["B`@("`@("`@'!O'!O +M'!O'!OF4@8VQO=60@<&%S2!S"(B(%T*("!T:&5N"B`@("!E8VAO(")R;V]T.B1635]005-35T]21"(@?"!C +M:'!A6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I="`B4V5T=&EN9R!U<"!D:&-P('-E7-T96T@ +M=FTB"B`@2!A;&QO=R!$3E,@&5C=71E(&1H8W!S7)I9VAT(&]W +M;F5R6]U +M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O +M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W +M=WPH@ +M(&5C:&\@(B0H9&%T92D@)$`B(#X^("]V87(O;&]G+V-L;W5D+FQO9PH@(&QO +M9U]A8W1I;VY?;7-G("(D0"(*?0H*<&%T8V@H*2!["B`@;&]C86P@4$%40TA? +M34]53E0]+VUE9&EA+V-D@H@(&QO8V%L('!R:79K97D])%!!5$-( +M7TU/54Y4+V%U=&AOVUD-69I;&5]*0H@("`@;&]C +M86P@;F5W;60U/0H@("`@6R`M9B`D>W!A=&-H9FEL97T@72`F)B!N97=M9#4] +M)"AM9#5S=6T@)'MP871C:&9I;&5]('P@87=K("=[<')I;G0@)#%])RD*"B`@ +M("!L;V=?:70@(E-CW!A=&-H9FEL97T@72`F)B!;("(D;F5W +M;60U(B`A/2`B(B!="B`@("!T:&5N"B`@("`@('1AF8@)'!A=&-H9FEL +M92`M0R`O"B`@("`@(&5C:&\@)'MN97=M9#5](#X@)'MM9#5F:6QE?0H@("`@ +M("!L;V=?:70@(E!A=&-H960@2`OF5D7VME>7,*("`@(&9I"B`@9FD*"B`@&5C=71I;F<@8VQO=60M96%R +M;'DM8V]N9FEG(@H*("`C($-L96%R("]T;7`@9F]R(&9I;&4@;&]C:PH@(')M +M("UF("]T;7`O*BYL;V-K"B`@6]U +M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC +M('=I=&@@=&AE($QI8V5N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&5N2!T;R!E;G-U'D@:6X@=&AE(')O +M=71I;F<@9&]M86EN"G)E8V]N9FEG7VQB*"D@>PH@(&QO9V=E'D@=&\@<')E=FEO=7,@ +M'DN8V9G+F]L9"`O971C+VAA<')O>'DO:&%P +M2YC9F'DN8V9G+FYE=PH@(&9I"GT*"F=E=%]V +M:69?;&ES="@I('L*("!L;V-A;"!V:69?;&ES=#TB(@H@(&9O7,O8VQA7!E(&]R('!A7!E(&]R('!A2!R96-E +M:79E2!F:7)E=V%L;"!R=6QE2!C;VYF:67!E(&]R('!A2!O +M9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI +M8V5N0H*"F1E9B!M +M97)G92AD8F%G+"!D871A*3H*("`@(&1B86=C(#T@8V]P>2YD965P8V]P>2AD +M8F%G*0H*("`@('!R:6YT(&1B86<*("`@('!R:6YT(&1A=&$*("`@(&EF(")V +M<&Y?=7-E7,H*3H*("`@("`@("!I +M9B!U7,H*2!A;F0@;F]T +M(&%D9#H*("`@("`@("`@("`@9&)A9V-;=7-E6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2D*("`@("`@("`@("`@9&%T82YU +M<&1A=&4H>R)I9"(Z('-E;&8N:V5Y?2D*("`@("`@("!F:6YA;&QY.@H@("`@ +M("`@("`@("!S96QF+F1B86<@/2!D871A"@H@("`@9&5F('-A=F4H2D* +M("`@("`@("`@("`@("`@(&IS;VXN9'5M<"@*("`@("`@("`@("`@("`@("`@ +M("!D8F%G+"!?9F@L"B`@("`@("`@("`@("`@("`@("`@&-E<'0@24]%2`](&ME>0H*"F-L87-S('5P9&%T941A=&%"867!E(#T]("=M;VYI=&]R22AS96QF +M+F1B+F=E=$1A=&%"867!E(#T]("=V<&YU7!E(#T]("=I<&%L:6%S +M97,G.@H@("`@("`@("`@("!S96QF+F1B+G-E=$ME>2@G:7!S)RD*("`@("`@ +M("`@("`@7!E*0H@("`@("`@("`@("!R971U +M2=="B`@ +M("`@("`@9'!;)VYI8U]D979?:60G72`](&1;)V1E=FEC92==6S,Z70H@("`@ +M("`@(&1P6R=N=U]T>7!E)UT@/2`G9W5E4AA8VLN=7!D871E7VYE='=OR=I<%]A9&1R97-S)SH@6V1P72P@)W1Y<&4G.B`G +M:7!S)WTI"B`@("`@("`@:68@)V1O;6%I;E]N86UE)R!N;W0@:6X@9"YK97ES +M*"D@;W(@9%LG9&]M86EN7VYA;64G72`]/2`G)SH*("`@("`@("`@("`@9%LG +M9&]M86EN7VYA;64G72`](")C;&]U9&YI;F4N:6YT97)N86PB"@H@("`@("`@ +M(&0@/2!04AA8VLN=7!D871E7VYE='=O2AS96QF+"!D8F%G*3H*("`@("`@("!R971U2`]("=E=&@G("L@;G5M("L@)VEP)PH@("`@("`@(&1P(#T@>WT*("`@("`@ +M("!I9BAK97D@:6X@5T*("`@("`@("`@("`@9'!;)VYE=&UA7!E(#T] +M(")P=6)L:6,B.@H@("`@("`@("`@("`@("`@9'!;)V=A=&5W87DG72`]('-E +M;&8N<49I;&4N9&%T85LG8VUD7VQI;F4G75LG9V%T97=A>2=="B`@("`@("`@ +M("`@(&5L2==(#T@7!E)SH@)VEP +M2!T;R!D96%L('=I=&@@=&AIPH@("`@("`@("`@("`@("`@ +M)V%D9"7!E(#T@7!E(ET*("`@("`@("`@("`@=7!D871E1&%T84)A9RAS96QF*0H@ +M("`@("`@("`@("!R971U&-E<'1I;VX@97)R;W(@)WMEV9I;&5N86UE?22!B965N(&UO=F5D+B(N9F]R;6%T*&5RV9I;&5N86UE?27!E"@H@("`@9&5F(&=E=$1A=&$HB(*("`@("`@("!W:71H(&]P96XH +M;W)I9U!A=&@L("=R8B7,H*2!E;'-E(&1A +M=&%;)W!U8FQI8U]I<"=="@H@("`@("`@(&EN:71I86Q?9&%T82`](&-L5]I<"AI<"P@:6YI=&EA;%]D871A6R=C;VYF +M:62<@:6X@9&)A9ULG8V]N9FEG)UTN +M:V5Y5]I<"AC;',L(&EP+"!P5]I +M<"`]($9A;'-E"B`@("`@("`@:68@:7`@/3T@<')I=F%T95]G871E=V%Y7VEP +M.@H@("`@("`@("`@("!N97=?:7!?;6%T8VAE5]I<`H*("`@($!C;&%S0`````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````,#`P,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL +M92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2!S=&%T=7,*"F9R;VT@8W,N0W-#;VYF:6<@:6UP;W)T($-S +M0V]N9FEG"F9R;VT@;W!T<&%R7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R +M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T +M"B,*(R`@(&AT='`Z+R]W=WB`D,2!="G1H96X*("`@(&5C:&\@(D9A:6P@ +M=&\@9FEN9"!64$X@<&5E7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2`]('9P;ELG=G!N7W-E2!I;B!D +M8F%G+FME>7,H*2!A;F0@;F]T(&]P.@H@("`@("`@(&1E;"AD8F%G6VME>5TI +M"B`@("!E;'-E.@H@("`@("`@(&1B86=;:V5Y72`]('9P;@H@("`@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H +M='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI +M8V5N2`] +M(')O=71E6R=N971W;W)K)UT*("`@("`@("!D8F%G6VME>5T@/2!R;W5T90H@ +M("`@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R +M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T +M"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ +M=&AE($QI8V5N2`]('9P +M;ELG<&5E71H;VX*(R!, +M:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%3 +M1BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS +M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E +M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!F$EN"@H*<&%S&ES=',H9V5T5&]K96Y&:6QE*"DI.@H@("`@("`@('=I=&@@;W!E +M;BAG9714;VME;D9I;&4H*2P@)W(G*2!A2P@=F%L +M=64@/2!L:6YE+G-T7!E(#T@ +M7!E(#T]("=S96YD7VUY7W!A7-L;V7-L;V7-L;V7-L;V2!I +M<"]P87-S=V]R9%LE7-L;V7-L;V&-E<'0@2V5Y8F]A&-E<'1I +M;VXL(&4Z"B`@("`@("`@0`````````````````````````````````` +M`````````````````````````````````````````````````````````#`P +M,#`W-34`,#`P,36]U +M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC +M('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E +M<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NFEP7V9I;&4B"B`@("!E +M8VAO(")$96QE=&EN9R!D:6%G;F]S=&ECFEP7V9I;&4B +M"F5L6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ +M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N0H*"F1E9B!M97)G92AD8F%G+"!D871A*3H*("`@("(B(B!3:6UP;'D@ +M;W9E&ES='-I;F<@8F%G(&%S+"!T:&4@=VAO;&4@8V]N +M9FEG=7)A=&EO;B!I2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N4EP("@I +M>PH@(&QO8V%L(&EP/20Q"B`@9F]R(&1E=B!I;B!@;',@+3$@+W-Y6]U(&UA>2!N;W0@=7-E('1H +M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N +MWT*("`@("`@("!S96QF+F-H86YG960@/2!;70H@("`@("`@('-E +M;&8N9&5V:6YF;R`]($-S2&5L<&5R+F=E=%]D979I8V5?:6YF;R@I"B`@("`@ +M("`@2@I"B`@("`@("`@("`@(&5L2=="B`@("`@ +M("`@("`@('-L:6YE(#T@(F1H8W`M"P@:7`I"B`@("`@("`@("`@('-E;&8N +M8V]N9BYS96%R8V@H2D*("`@("`@("`@("`@ +M96QS93H*("`@("`@("`@("`@("`@(&QI&-E +M<'0@17AC97!T:6]N(&%S(&4Z"B`@("`@("`@("`@(&QO9V=I;F2!C;VYT2!R96-E:79E($1(0U!.04LN"B`@("`@ +M("`@(R!7:&5N(%9-(&ES(&5X<'5N9V5D+"!I=',@86-T:79E(&QE87-E(&%N +M9"!$2$-0+T1.4R!C;VYF:6<@:7,@<')O<&5R;'D@5LG;6%C7V%D9')E5LG9&5F875L=%]G871E=V%Y +M)UT*"B`@("!D968@861D7VAO6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7!E2`]($9A;'-E"B`@("`@("`@ +M9&5V(#T@)R<*("`@("`@("!F;W(@:6YT97)F86-E(&EN(&EN=&5R9F%C97,Z +M"B`@("`@("`@("`@(&EF(&1E=B`]/2!I;G1E&5C=71E*&-O;6UA;F0I"B`@("`@("`@("`@("`@("!I9B!D9795<#H*("`@ +M("`@("`@("`@("`@("`@("!L;V=G:6YG+FEN9F\H(D1E=FEC92`E65T+"!L970G +M5]I9E]N965D960H"B`@ +M("`@("`@("`@("`@("`B)7,O)7,B("4@*'-E;&8N0U-?5$5-4$Q!5$537T1) +M4BP@5]I9E]N965D960H"B`@("`@("`@("`@("(E +M&5C("1$045-3TX[+RTM97AE8R`D1$%%34].("TM("TM=G)R<#LO9R(@+V5T +M8R]I;FET+F0O:V5E<&%L:79E9"R(L(")] +M(BP@R(L(")](BP@6PH@("`@("`@("`@("`@("`@("`@ +M("`@(DE0=C1?861D&5C=71E*")R;2`M2`S,"!S96-O;F1S"B`@("`@("`@:&5A&ET:6YG +M(B`E("AE&5C=71E +M*"(E&PR='!D +M(BP@(G-T;W`B*0H@("`@("`@($-S2&5L<&5R+G-E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I +M<"@I*2YS=&]P*"D*"B`@("`@("`@&5C=71E*&-M9#(I"B`@("`@("`@("`@(&1E=B`] +M(&EN=&5R9F%C92YG971?9&5V:6-E*"D*"B`@("`@("`@8VUD(#T@(B5S("U# +M("5S(B`E("AS96QF+D-/3DY44D%#2T1?0DE.+"!S96QF+D-/3DY44D%#2T1? +M0T].1BD*("`@("`@("!#&5C=71E*"(E&PR='!D(BP@(G-T;W`B*0H*("`@ +M("`@("!I;G1E&5C=71E*&-M9"D*("`@("`@("`@("`@("`@(&QO9V=I +M;F2D*("`@("`@("`@ +M("`@("`@(&5X8V5P="!%>&-E<'1I;VXZ"B`@("`@("`@("`@("`@("`@("`@ +M;&]G9VEN9RYE&5C=71E*"(E&5C=71E*"(E&PR='!D(BP@(G)E +M2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@("`@ +M("`@("!I9B!G871E=V%Y.@H@("`@("`@("`@("`@("`@("`@(')O=71E+F%D +M9%]R;W5T92AD978L(&=A=&5W87DI"@H@("`@("`@("`@("`C(%1H92!F:7)S +M="!P=6)L:6,@:6YT97)F86-E(&AA&5C=71E +M*")A2!C;VYN=')A8VMD"B`@("`@("`@(B(B"B`@("`@("`@ +M;&EN97,@/2!;70H@("`@("`@(&QI;F5S+F%P<&5N9"@B7'1<=%QT25!V-%]A +M9&1R97-S("5S7&XB("4@(C$R-RXP+C`N,2(I"B`@("`@("`@;&EN97,N87!P +M96YD*")<=%QT7'1)4'8T7V%D9')E7!E(&%N9"!D96-I9&5S(&EF(&ET(&ES(&%N(&EN=&5R +M;F%L(&%D9')E0H@("`@("`@(%1H92!N97<@8V]D92!A +M;'-O(&=I=F5S('1H92!P;W-S:6)I;&ET>2!T;R!C;&]U9'-T86-K('1O(&AA +M=F4@82!H>6)R:60@9&5V:6-E"B`@("`@("`@=&AA="!C;W5L9"!F=6YC=&EO +M;B!A2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N +M;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B971H,2)]"@I3 +M5$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S:"`M8R`@)VEF +M(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@96QS92!E8VAO +M(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@(")V<&-R;W5T +M97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@6R`D,"`]/2!< +M(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ"B`@("`@("`@ +M("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@("`@("`@(&-M +M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U +M8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@("`@("`@;&]G +M9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S(B`E('-T871E +M7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X96-U=&4H7!E*"E=(&%N9"!S=&%T92`]/2`B +M34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE8W5T92AC;60I +M"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@("`@("`@(&5X +M96-U=&4H8VUD*0H*"F1E9B!I&5C=71E*")M;W5N="!T +M;7!F6XH=F%L*3H*("`@(&EF('9A;#H*("`@("`@("!R +M971U&5C=71E*")I<"!A9&1R('-H;W<@?&=R97`@+78@ +MWT*("`@("`@("`@("`@=&];)VEP)UT@ +M/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A;'-;+3%="B`@ +M("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@("(B(@H@("`@ +M9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G*")3879I;F<@ +M:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C=71E*")S>7-T +M96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I;F7-T96UC=&P@&5C=71E*")K:6QL("U(55`@)7,B +M("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D;G-M87-Q(BP@ +M(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O0`````````````````````````````````````````````` +M`````````````````````````````````````````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E +M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI +M8V5N'1D;G,H*3H*("`@("`@("`@("`@9&YS+F%P<&5N9"AS +M96QF+F1A=&%;)W)O=71E2==(#T@=F%L"@H@("`@9&5F(&=E=%]N971M87-K*'-E;&8I.@H@ +M("`@("`@(",@5V4@;F5E9"!T;R!F:7@@:70@<')O<&5R;'DN($D@:G5S="!A +M9&1E9"!T:&4@:68L(&%S($EA;B!D:60@:6X@&-E<'1I;VXN"B`@("`@("`@:68@)W)O=71E6]U +M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC +M('=I=&@@=&AE($QI8V5N"YS=')I +M<"@I(&9O2!A +M9'9A;F-E9"(L("TQ*0H@("`@("`@(&-R;VXN8V]M;6ET*"D*"B`@("!D968@ +M&-L=61E9%]H96%L=&A?8VAE8VMS(ET*("`@("`@("`@("`@:&-? +M9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K0`````````` +M```````````````````````````````````````````````````````````` +M`````````````````````#`P,#`W-34`,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N7,H*3H*("`@("`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@ +M("`@(R!P2!P&ES=',Z(')U;&4])7,@=&%B;&4])7,B+"!F=ULR72P@;F5W7W)U;&4N +M9V5T7W1A8FQE*"DI"B`@("`@("`@("`@(&5L2`](&9W6S)="B`@("`@("`@("`@("`@("!I9B!F=ULQ72`]/2`B9G)O;G0B +M.@H@("`@("`@("`@("`@("`@("`@(&-P>2`](&-P>2YR97!L86-E*"2DI"B`@("`@("`@("`@("`@("`C(%1H97)E(&%R92!S;VUE +M(&ES3H*("`@("`@("`@ +M("`@=&%B;&4@/2`G)PH@("`@("`@("`@("!F;W(@:2!I;B!O<&5N*"(O971C +M+VEP=&%B;&5S+VEP=&%B;&5S+25S(B`E('1Y<&4I.@H@("`@("`@("`@("`@ +M("`@:68@:2YS=&%R='-W:71H*""`]/2!R=6QE70H* +M"F-L87-S($-S3F5T9FEL=&5R*&]B:F5C="DZ"@H@("`@9&5F(%]?:6YI=%]? +M*'-E;&8I.@H@("`@("`@('-E;&8N7!E)RP@)RTM0`````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```P,#`P-S4U`#`P,#$W-3``,#`P,32!O9B!T:&4@3&EC96YS92!A=`HC"B,@ +M:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&ES=',L(&5L5]P87)A;2D*("`@("`@("!E;'-E +M.@H@("`@("`@("`@("!L;V=G:6YG+FEN9F\H(D%D9&EN9R!R;W5T93H@9&5V +M("(@*R!D978@*R`B('1A8FQE.B`B("L*("`@("`@("`@("`@("`@("`@("`@ +M("`@('1A8FQE("L@(B!N971W;W)K.B`B("L@861D2!P87)A;65T97(@5]P87)A;2D*("`@("`@("!E;'-E.@H@("`@("`@ +M("`@("!L;V=G:6YG+FEN9F\H(D%D9&EN9R!R;W5T93H@9&5V("(@*R!D978@ +M*R`B('1A8FQE.B`B("L*("`@("`@("`@("`@("`@("`@("`@("`@('1A8FQE +M("L@(B!N971W;W)K.B`B("L@861D2DZ"B`@("`@("`@(B(B("!!9&0@82!D969A=6QT(')O=71E"B`@("`@("`@ +M.G!A&-E<'1I;VXH(D=A=&5W87D@8V%N;F]T(&)E($YO;F4N(BD*"B`@ +M("`@("`@:68@0H@("`@("`@("`@("!L;V=G +M:6YG+FEN9F\H(D%D9&EN9R!D969A=6QT(')O=71E(BD*("`@("`@("`@("`@ +M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI +M86YC90HC('=I=&@@=&AE($QI8V5N0`````````````````````` +M```````````````````````````````````````````````````````````` +M`````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI +M86YC90HC('=I=&@@=&AE($QI8V5N'DO:&%P2YC9F'DO:&%P2YC9F2@I"B`@("`@("`@9F]R('@@:6X@8V]N9FEG.@H@("`@("`@("`@("!; +M9FEL93$N87!P96YD*'2A(05!23UA97T-/ +M3D9?5"P@2$%04D]865]#3TY&7U`I"@H@("`@("`@("`@("!P2!O9B!T:&4@3&EC96YS92!A=`HC +M"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG +M971?='EP92@I"B`@("`@("`@5]I9E]N965D960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L +M"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE +M,B]S:71E2DI"B`@("`@("`@("`@(&9I;&4N&5C=71E,B@B7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2AS96QF*3H*("`@("`@("!S96QF+F-O;F9I9R`](%M="B`@("`@("`@ +M"P@;&EN +M92!I;B!E;G5M97)A=&4H%T@/2!R97!L86-E("L@ +M(EQN(@H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!S96%R8V@H"P@;&EN92!I;B!E;G5M97)A=&4H +M"P@;&EN92!I;B!E;G5M97)A=&4H +M2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N0`````````````````````````````````````` +M````````````````````````````````````````````````````````,#`P +M,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N"`](&EN="@G)RYJ;VEN*%MD:6=I="!F;W(@9&EG:70@:6X@9&5V:6-E(&EF +M(&1I9VET+FES9&EG:70H*5TI*0H@("`@("`@("`@("`@("`@:68@9&5V:6-E +M7W-U9F9I>"`\(&QO=V5S=%]D979I8V4Z"B`@("`@("`@("`@("`@("`@("`@ +M;&]W97-T7V1E=FEC92`](&1E=FEC95]S=69F:7@*("`@("`@("`@("`@("`@ +M("`@("!G=65S=%]I;G1E5]C:61R*'-E;&8I.@H@("`@("`@ +M(')E='5R;B`B)7,O)7,B("4@*'-E;&8N9V5T7V=A=&5W87DH*2P@F4@:6X@8FETF4B +M*0H*("`@(&1E9B!G971?9&5V:6-E*'-E;&8I.@H@("`@("`@(')E='5R;B!S +M96QF+F=E=%]A='1R*")D979I8V4B*0H*("`@(&1E9B!G971?8VED7!E)UT@:6X@5E)24%]465!% +M4SH*("`@("`@("`@("`@7!E)UT@:6X@6R=G=65S="==.@H@("`@("`@("`@ +M("!R971U7!E)UT@:6X@6R=P=6)L +M:6,G73H*("`@("`@("`@("`@7-T +M96T*("`@("`@("`B(B(*("`@("`@("!S96QF+F1E=FQIWT*("`@("`@("!S96QF+F%D +M9')E7!E*"D@ +M:6X@6R)P=6)L:6,B72!A;F0@861D2)= +M*0H@("`@("`@("`@("`@("`@&UA7!E)UT*("`@("`@("!R971U&9F9F9F9F9F(ETI"@H@("`@("`@('-E;&8N9G7!E*"D@ +M:6X@6R)P=6)L:6,B73H*("`@("`@("`@("`@7!E*"D@:6X@ +M6R)P=6)L:6,B73H*("`@("`@("`@("`@#4R-"\P>&9F +M9F9F9F9F(B`E("AS96QF+F1E=BP@2)=(&%N9"!S96QF+F%D9')E2)=(&%N9"!S96QF+F%D9')E7!E*"D@:6X@6R)P +M=6)L:6,B72!A;F0@*&YO="!S96QF+F-O;F9I9RYI2!T +M:&4@;6%S=&5R(&)A8VMU<"!F=6YC=&EO;G,*("`@("`@("`@("`@("`@(&EF +M(&YO="!C;61L:6YE+FES7W)E9'5N9&%N="@I.@H@("`@("`@("`@("`@("`@ +M("`@(&EF(&UE=&AO9"`]/2`B861D(CH*("`@("`@("`@("`@("`@("`@("`@ +M("`@0W-087-S=V13=F,HWT*("`@("`@("!C +M;60@/2`H(FEP(&%D9'(@2!K965P86QI +M=F5D(&]R(&YO=`H@("`@("`@("(B(@H@("`@("`@(&EF(")N=U]T>7!E(B!I +M;B!S96QF+F%D9')E2==*0H@ +M("`@("`@(&EF(&YO="!S96QF+F-L+FES7W)E9'5N9&%N="@I(&%N9"`H;F]T +M('-E;&8N861D2==(&]R('-E;&8N861D2==(#T](").;VYE(BDZ"B`@("`@("`@("`@(&-M9"`](")A2!H87!P96X@8G5T(&1I9"`Z*0H@("`@ +M("`@(",@270@;65A;G,@86X@87!A8VAE(&9I;&4@9V]T(&]R<&AA;F5D(&%F +M=&5R(&$@9W5E2@I"@H@("`@9&5F +M(&ES7V=U97-T7V=A=&5W87DH7,O;F5T+V-O7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ +M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E +M(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O +M'!R97-S(&]R(&EM<&QI960N("!3 +M964@=&AE($QI8V5N"(I.@H@("`@("`@("`@("!I=&5M&5C +M=71E*")K:6QL("TY("5S(B`E('!I9"D*"B`@("!D968@9W)E<"AS96QF+"!S +M='(I.@H@("`@("`@(&9O"(I.@H@("`@("`@("`@("!I9B!I+F9I;F0H7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C +M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F +M('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L +M:6-A8FQE(&QA=R!O'!R97-S(&]R +M(&EM<&QI960N("!3964@=&AE($QI8V5N2!O +M9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI +M8V5NWT*("`@("`@("!S96QF+F1B(#T@1&%T +M84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF+F1B+G-A=F4HWT*("`@("`@ +M("!R971U&1I9V5S="@I"@H@("`@9&5F(&=E=%]G871E=V%Y +M*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I;B!S96QF+FED871A*"DZ +M"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A*"E;)V=A=&5W87DG70H@ +M("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G971?=7-E7V5X=%]D;G,H +M'1D;G,G +M70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G971?861V97)T7VEN +M="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN="<@:6X@0`````````````````````````````````````````````````````````` +M````````````````````````````````````````,#`P,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7!E&5C=71E*&-M9"D*("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")! +M9&1E9"!R=6QE("5S(&9O0`````````````````````````````````````````````` +M````````````````````````````````````````````````````````,#`P +M,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET*#(I +M"B`@("!F;W(@;W!T+"!A7,N97AI +M="@R*0H*("`@(&9O&ES=',H9&%T869I;&4I.@H@("`@("`@(&]S +M+G)E;6]V92AD871A9FEL92D*"@ID968@8W)E871E9FEL92AI<"P@9F]L9&5R +M+"!F:6QE+"!D871A*3H*("`@(&1E3H* +M("`@("`@("`@("`@;W,N;6%K961I2!E>&ES=',L('=E(&1O(&ET('1H:7,@=V%Y +M(&9O0H@("`@("`@("`@("!I9B!E+F5R&ET*#$I"B`@("`@("`@ +M:68@;W,N<&%T:"YE>&ES=',H;65T86UA;FEF97-T*3H*("`@("`@("`@("`@ +M9F@@/2!O<&5N*&UE=&%M86YI9F5S="P@(G(K82(I"B`@("`@("`@("`@(&5X +M9FQO8VLH9F@I"B`@("`@("`@("`@(&EF(&9I;&4@;F]T(&EN(&9H+G)E860H +M*3H*("`@("`@("`@("`@("`@(&9H+G=R:71E*&9I;&4@*R`G7&XG*0H@("`@ +M("`@("`@("!U;F9L;V-K*&9H*0H@("`@("`@("`@("!F:"YC;&]S92@I"B`@ +M("`@("`@96QS93H*("`@("`@("`@("`@9F@@/2!O<&5N*&UE=&%M86YI9F5S +M="P@(G&9L;V-K*&9H*0H@("`@("`@("`@("!F +M:"YW&9L;V-K*&9H*0H@("`@9F@N +M=W)I=&4H96YT3H*("`@("`@("!F +M;&]C:RAF:6QE+"!,3T-+7T58*0H@("`@97AC97!T($E/17)R;W(@87,@93H* +M("`@("`@("!P71H;VX*(R!,:6-E;G-E9"!T +M;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@ +M;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* +M(R`@(&AT='`Z+R]W=WFEP9FEL90H*"B,@0W)E871E('II<"!A +MFEP +M7V9I;&5S*&9I;&5S*3H*("`@(&9,:7-T(#T@9FEL97,*("`@(&-O;7!R97-S +M:6]N(#T@>FEP9FEL92Y:25!?1$5&3$%4140*("`@('1I;65?&5C=71E7W-H96QL7W-C3H*("`@("`@("`@ +M("`@("`@("`@("!Z9BYW3H*("`@("`@("!C;&5A;G5P*&9I;&5S7V9R;VU?F8N8VQO&5C=71E7W-H96QL +M7W-C&-E<'0@3U-%#H*("`@("`@("`@("`@9&5L971E7W1M<%]F:6QE7V-M9"`]("=R +M;2`M9B`E3H*("`@("`@("`@("`@9BYC;&]S92@I"B`@("!R971U"YS<&QI +M="AC;60I+"!S=&1E&-E<'0@3U-%&5C=71E(&)A'0H +M>FEP7V9I;&4L(&9I;&5S7V9O=6YD+"!F:6QE"YS<&QI="AC;&5A;G5P7V-M9"DI"@H* +M:68@7U]N86UE7U\@/3T@)U]?;6%I;E]?)SH*("`@(&9I;&5,:7-T(#T@7)I9VAT(&]W +M;F5R6]U +M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O +M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W +M=WW!R +M:6YT("0R.WTG('P@6]U(&UA>2!N +M;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@ +M=&AE($QI8V5N2!T;R!E;G-U2!T;R!I=',@<')E=FEO +M=7,@'D@=&\@<')E=FEO=7,@'DN8V9G+F]L9"`O971C+VAA<')O>'DO:&%P2YC9F'DN8V9G+FYE=PH@(&9I"GT*"@IL;V=G97(@+70@8VQO=60@(B0H8F%S +M96YA;64@)#`I.B!%;G1E'D*'D@2P@8V]N9FEG=7)I +M;F<@9FER97=A;&PB"@HC(&EP=&%B;&5S(&5N=')Y('1O(&5N'D@2`D861D961)<',@ +M)')E;6]V961)<',@)'-T871S27`*"FEF(%L@)#\@+6=T(#`@70IT:&5N"B`@ +M;&]G9V5R("UT(&-L;W5D(")&86EL960@=&\@87!P;'D@9FER97=A;&P@'D@8V]N9FEG(@H@(",@4F5S=&]R92!T:&4@3$(*("!R97-T;W)E7VQB +M"@H@(&QO9V=E&ET(#$@)&QO8VL@)&QO8VME +M9`IE;'-E"B`@(R!296UO=F4@8F%C:V5D=7`@:7!T86)L92!R=6QE6]U(&UA>2!N;W0@=7-E('1H:7,@ +M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E +M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI +M8V5N7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z +M+R]W=WPH@('-U9&\@:7!T86)L97,@+70@;6%N9VQE("U$(%!215)/ +M551)3D<@+6D@)&1E=B`M;2!S=&%T92`M+7-T871E($Y%5R`M:B!#3TY.34%2 +M2R`M+7-E="UM87)K("1T86)L94YO(#(^+V1E=B]N=6QL"@H@('-U9&\@:7`@ +MV1E=CHS?2DI"G1A8FQE3F%M93TB5&%B +M;&5?)&1E=B(*"FEF(%L@)&%C=&EO;B`]/2`G861D)R!="G1H96X*("!P;'5G +M7VYI8PIE;'-E"B`@=6YP;'5G7VYI8PIF:0H````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````&]P="]C;&]U9"]B:6XO:7!S96-T=6YN96PN6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC +M90HC('=I=&@@=&AE($QI8V5N#4R-2(*=G!N:6YM87)K/2(P>#4R-"(*"G5S86=E*"D@>PH@("`@<')I;G1F +M(")5'0@ +M:&]P/B`M3X@+6D@/&EK92!P;VQI +M8WD^("UT(#QI:V4@;&EF971I;64^("U4(#QEPH@('-U9&\@:7!T86)L97,MPH@(&1I2!<"B`@("!P:&%S93(@<&]L:6-Y +M/21ER1R:6=H=&YE='-](B`^/B`D=G!N8V]N +M9F9I;&4@)B8*("!S=61O(&5C:&\@(B`@='EP93UT=6YN96PB(#X^("1V<&YC +M;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!A=71H8GD]VEK96QI9F5T:6UE?7,B(#X^("1V<&YC;VYF9FEL92`F)@H@ +M('-U9&\@96-H;R`B("!E2(@/CX@)'9P;F-O;F9F:6QE +M("8F"B`@2!F;W(@'1H;W`](B1/4%1!4D&ET("1R970*```````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````;W!T+V-L;W5D+V)I;B]I<&%S2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&QO8V%L('!U8DEP +M/20H96-H;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?22!E>&ES +M=',B"GT*"F%D9%]V<&Y?8VAA:6Y?9F]R7VEP("@I('L*("!L;V-A;"!P=6)) +M<#TD*&5C:&\@)#$@?"!A=VL@+48G+R<@)WMPPH@(&QO8V%L('!U8DEP/20H96-H;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?2PH@(&QO8V%L +M('!U8DEP/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R +M:6YT("0Q?2W!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)A +MW!R:6YT("0R?2W!R:6YT("0R +M?25]R;W5T97-?9G)O;5]M86EN("1T86)L94YA;64*(R!.3U1%.B!T:&ES +M("!E;G1R>2!W:6QL(&)E(&1E;&5T960@:68@=&AE(&EN=&5R9F%C92!IW!R:6YT +M("0Q?2PH@(&EF(%L@(B1S9FQA9R(@/3T@(C`B +M(%T*("!T:&5N"B`@("!R971UW!R +M:6YT("0Q?2W!R:6YT("0R?22!I<"!I;F9O(&EN=&\@9FEL92P@ +M=7-E9"!O;B!R961U;F1A;G0@W!R:6YT("0Q?2&ES +M=&EN9TEP36%S:STD*'-U9&\@:7`@861DPH@(&QO8V%L('!U8DEP/20Q +M"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP +M/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)A&ES=&EN9TEP36%S:STD*'-U9&\@:7`@861DPH@("`@(V5N86)L92!R<',@ +M86YD(')F%QN(B`D;G5M*0H@("`@("`@("`@96-H +M;R`D:&5X.PH@("`@("`@("`@(V5N86)L92!R<',*("`@("`@("`@(&5C:&\@ +M)&AE>"`^("]S>7,O8VQA&ET +M("0_("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1!9FQA9R(@/3T@(C$B(%T* +M=&AE;@H@(&%D9%]A;E]I<"`@)'!U8FQI8TEP("`F)@H@(&%D9%]F=U]C:&%I +M;E]F;W)?:7`@)'!U8FQI8TEP"B`@=6YL;V-K7V5X:70@)#\@)&QO8VL@)&QO +M8VME9`IF:0H*:68@6R`B)&9F;&%G(B`]/2`B,2(@72`F)B!;("(D1&9L86&ET("0_("1L;V-K("1L;V-K960* +M9FD*"G5N;&]C:U]E>&ET(#`@)&QO8VL@)&QO8VME9`H````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````!O<'0O8VQO=60O8FEN+VQI;F5?961I="YP>0`````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````,#`P,#2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2UL:6YE(&5D:71I;F<@;V8@8V]N9FEG=7)A=&EO;B!F +M:6QE&%M<&QE('1H97)E)W,@82!D;W5B;&4@97-C87!E(&]F('1H92!B86-K2!M +M871C:&5D(&%L;"!F:6QE3H* +M("`@("XN+B`@(&]S+G5N;&EN:R@G9&]C=&5S="UV:&]S=',N8V]N9B55N=7-E9$QO8V%L"B`@ +M("`@("`@("`@('-T870@/2!.;VYE"B`@("`@("`@("`@('=I=&@@;W!E;BAS +M96QF+F9I;&5N86UE+"`G&-E<'1I;VXH +M(DUA9&4@=&]O(&UA;GD@961I=',B*0H@("`@("`@("`@("`@("`@("`@("`@ +M("`@("`@96QI9B!R96UA:6YI;F=?8V]U;G0@/3T@,#H*("`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@("`@("`@ +M("`@("`@("!C:&%N9V5D7VQI;F4L('-U8G,@/2!E9&ET+G!A='1E2AS96QF+F9I;&5N86UE+"!B86-K=7!?9FEL96YA;64I"B`@("`@("`@("`@ +M("`@("!O3H*("`@("`@("`@("`@:68@8VAA;F=E +M9%]F:6QE(&ES(&YO="!.;VYE.B`@("`@("`@("`@("`@("`@("`@("`@("`@ +M("`@("`C(&9A:6QE9"P@8VQE86X@=7`*("`@("`@("`@("`@("`@(&-H86YG +M961?9FEL92YC;&]S92@I"B`@("`@("`@("`@("`@("!O6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC +M90HC('=I=&@@=&AE($QI8V5N2!R=6QE2!O9B!T:&4@3&EC96YS92!A +M=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O +M'!R97-S(&]R(&EM<&QI960N("!3 +M964@=&AE($QI8V5N7,I.@H*("`@(&5X:7-T:6YG7VME>7,@/2!;70H@ +M("`@;F5W7V5T:%]K97D@/2!.;VYE"@H@("`@9F]R(&LQ+"!V,2!I;B!G=65S +M=&YE=%]D:6-T+FET97)I=&5M7,@ +M86YD(&QE;BAV,2D@/B`P.@H@("`@("`@("`@("!E>&ES=&EN9U]K97ES+F%P +M<&5N9"AK,2D*"B`@("!I9B!N;W0@97AI2`Z.B!296UO=FEN9R!G=65S="!N971W;W)K +M+BXN(BD*("`@("`@("!R971U2!T;R!B92!S +M971U<`H@("`@)R2!C;VYF:6=U&ES=',@/2!&86QS90H*("`@(&9O2!P2!C;VYF:6=U2`Z.B!02`Z.B!.;R!'=65S=$YE='=O7,N87)G +M=ELQ72D*("`@('!R;V-E7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=WPH@(&QO8V%L(%]P +M:60])"AP:61O9B!D;G-M87-Q*0H@(&9OW!R:6YT("0R?20H@(&EF(%L@)&EP +M=C0@70H@('1H96X*("`@(&5C:&\@(C`@)&UA8R`D:7!V-"`D:&]S="`J(B`^ +M/B`D1$A#4%],14%315,*("!F:0H@(&EF(%L@)&EP=C8@70H@('1H96X*("`@ +M(&5C:&\@(C`@)&1U:60@)&EP=C8@)&AO6]U(&UA>2!N +M;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@ +M=&AE($QI8V5N&-E<'0@3U-%6]U&-E<'1I;VX@;V-C=7)R960Z("5S(B`E(&4*("`@("`@("`@ +M("`@7!E(#T]("=T0`````````````` +M```````````````````````````````````````````````````````````` +M`````````````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ +M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&-L=61E9%]H96%L=&A?8VAE +M8VMS(ET@/2!D871A6R)E>&-L=61E9%]H96%L=&A?8VAE8VMS(ET*("`@(&EF +M(")H96%L=&A?8VAE8VMS7V-O;F9I9R(@:6X@9&%T83H*("`@("`@("!D8F%G +M6R)H96%L=&A?8VAE8VMS7V-O;F9I9R)=(#T@9&%T85LB:&5A;'1H7V-H96-K +M7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z +M+R]W=WW!R:6YT("0Q?2<*?0H* +M:7!T86)L97-?*"D@>PH@("!L;V-A;"!O<#TD,0H@("!L;V-A;"!P=6)L:6-? +M:7`])#(*("`@;&]C86P@:7-?=G!C/69A;'-E"B`@(&QO8V%L(&9O7-T96UC=&P@:7,M86-T +M:79E(&EPS$N+C5]"B`@("!D;PH@("`@("!L;V=G97(@+70@8VQO +M=60@(B0H8F%S96YA;64@)#`I.B!W86ET:6YG(&EP7-T96UC=&P@:7,M86-T:79E(&EP7-T96UC=&P@:7,M86-T:79E(&EP7-T96UC=&P@&PR='!D"B`@("`@("`@("`@("`@("`@("`@2`Z(%!32R!<(B1I<'-E8U]P +M&PR +M='!D"@H@("!I<'1A8FQEPH@("!L;V-A;"!P=6)L:6-?:7`])#$*"B`@(&EPPH@("!L;V-A;"!U/20Q"B`@(&QO +M8V%L('!A)'4@7"H@7"(D +M<&%S&ET(#(*"0D[.PH@(&5S86,*9&]N90H*:68@6R`B)&1E +M=B(@/3T@(B(@70IT:&5N"B`@("!D978](F5T:#(B"F9I"@II9B!;("(D8VED +M&ET(#(*6R`B)&-R96%T92(@/3T@(C$B(%T@)B8@6R`B)&QF;&%G +M)'!F;&%G)')F;&%G)'-F;&%G(B`A/2`B,3$Q,2(@72`F)B!U&ET(#(*"FEF(%L@(B1CW!R:6YT("0Q?27)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS +M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E +M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,@/2!;)V5T:#$G+"`G971H,B6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2!O9B!T:&4@ +M3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A +M8FQE(&QA=R!O2!O9B!T:&4@9&YS;6%S<2!F:6QE+@IC<"`B)$1( +M0U!?0T].1DE'7TU!24XB("`B)$1(0U!?0T].1DE'7TU!24Y?0D%+(@IC<"`B +M)$1(0U!?0T].1DE'(B`B)$1(0U!?0T].1DE'7T)!2R(*"B-E;7!T>2!T:&4@ +M8V]N9FEG(&9I;&4*96-H;R`^("1$2$-07T-/3D9)1PH*=F%R/2(D,2(*9&AC +M<%]R86YG93TB(@ID:&-P7V=A=&5W87D](B(*9&AC<%]N971M87-K/2(B"F1N +M'1?9&YS/20H96-H +M;R`B)$--1$Q)3D4B('P@9W)E<"`M;R`B=7-E97AT9&YS/71R=64B*0IW:&EL +M92!;("UN("(D=F%R(B!="F1O"B!V87(Q/20H96-H;R`D=F%R('P@8W5T("UF +M,2`M9"`B+2(I"B!R;W5T97)I<#TD*"!E8VAO("1V87(Q('P@8W5T("UF,2`M +M9"`B.B(@*0H@9V%T97=A>3TD*&5C:&\@)'9AV1H8W!?V1H8W!?;F5T;6%S:WTB)V1H8W`M;W!T:6]N/71A9SIR86YG +M92W9A +MVQO9WTB8&=R97`@(EYD:&-P+6]P=&EO;CTV(B`B)$1(0U!?0T].1DE'7TU! +M24XB8")<;B(*;&]G/2(D>VQO9WTB8&=R97`@(EYD:&-P+6]P=&EO;CUO<'1I +M;VXZVQO +M9WTB8&=R97`@(EYD:&-P+7)A;F=E/2(@(B1$2$-07T-/3D9)1U]-04E.(F`B +M7&XB"@II9B!;("(D;&]G(B`A/2`G7&Y<;EQN)R!="G1H96X*("-#;&5A;FEN +M9R!T:&4@97AI9&AC<"UR86YG93TO9"<@(B1$2$-07T-/3D9)1U]-04E.(@IF:0H*(W=R +M=&EN9R!T:&4@;F5W(&-O;F9I9R!I;G1O('1H92!C;VYF:6<@9FEL92X*96-H +M;R`M92`B)&1H8W!?&ET("1R +M97-U;'0@)&QO8VL@)&QO8VME9`H````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````````````````````!O +M<'0O8VQO=60O8FEN+V-S7V1H8W`N<'D````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7,@/2!S970H*0H@("`@("`@(&9O2`A/2`G +M:60G(&%N9"!E;G1R>5LG;6%C7V%D9')E7,N861D*&ME>2D* +M("`@("`@("`@("`@("`@(&)R96%K"@H@("`@("`@(&EF(&1A=&%;)W)E;6]V +M92==(&%N9"!K97D@;F]T(&EN(')E;6]V95]K97ES.@H@("`@("`@("`@("!R +M96UO=F5?:V5Y2!I +M;B!R96UO=F5?:V5Y5TI"@H@("`@("`@(&1B86=;9&%T85LG:7!V-%]A9&1R97-S)UU=(#T@9&%T +M80H*("`@(')E='5R;B!D8F%G"@```&]P="]C;&]U9"]B:6XO8W-?8VUD;&EN +M92YP>0`````````````````````````````````````````````````````` +M```````````````````````````````````````````P,#`P-S4U`#`P,#$W +M-3``,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ +M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E +M(&%T"B,*(R`@(&AT='`Z+R]W=W2!O9B!T:&4@ +M3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A +M8FQE(&QA=R!O'!R97-S(&]R(&EM +M<&QI960N("!3964@=&AE($QI8V5N'DN8V9G("]E=&,O:&%P2]H87!R;WAY+F-F9RYO;&0*"B`@;78@)&YE +M=U]C;VYF:6<@+V5T8R]H87!R;WAY+VAA<')O>'DN8V9G"B`@:68@:&%P2`M<"`O=F%R+W)U;B]H87!R;WAY+G!I9"`M9B`O971C+VAA<')O>'DO:&%P +M2YC9F<@+7-F("0H8V%T("]V87(O'DN<&ED*3L@=&AE +M;@H@("`@;&]G9V5R("UT(&-L;W5D(").97<@:&%P2!I;G-T86YC92!S +M=6-C97-S9G5L;'D@;&]A9&5D+"!S=&]P<&EN9R!P'DO:&%P2YC9F<@)&YE=U]C;VYF:6<* +M("`@(&UV("]E=&,O:&%P2]H87!R;WAY+F-F9RYO;&0@+V5T8R]H87!R +M;WAY+VAA<')O>'DN8V9G"B`@("!H87!R;WAY("UP("]V87(O'DN<&ED("UF("]E=&,O:&%P2]H87!R;WAY+F-F9R`M2YP:60I"B`@("!R970],0H@(&9I"@IE>&ET("1R +M970*```````````````````````````````````````````````````````` +M`````````````````````````````````````````````````````')O;W0O +M;6]N:71O71H;VX*(R!,:6-E;G-E9"!T;R!T +M:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE +M"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@ +M(&AT='`Z+R]W=WWT*("`@('!A2`K)UTG*R(@(B`K("=;)RMP2LG +M72<@*R`B("(@*R!M2!O;F4@<&ED(&]R(&YO=`H@("`@:68@97AI=%-T871U6EN9R!F97<@;6]R92!T:6UEWT*("`@(&9A:6QI +M;F=?PH@("`@("`@("`@("`@("`@ +M(G-U8V-EPH@("`@("`@("`@("`@ +M("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EWT@(U-K:7`@WT*("`@(&9A:6QI;F=# +M:&5C:W,@/2!;70H@("`@:68@8VAE8VM4>7!E(#T](")B87-I8R(Z"B`@("`@ +M("`@;6]N:71297-U;'0L(&9A:6QI;F=#:&5C:W,@/2!M;VYI=%!R;V-E&-L=61E(#T@:&-?9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!H8U]D871A(&5L7!E*0H@("`@("`@("`@("`@("`@:68@;&5N*')E="D@ +M/3T@,#H*("`@("`@("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@ +M("`@("`@:68@(G-U8V-E7,N87)G=BD@/3T@,CH*("`@("`@("!I9B!S>7,N +M87)G=ELQ72`]/2`B861V86YC960B.@H@("`@("`@("`@("!M86EN*")A9'9A +M;F-E9"(I"B`@("`@("`@96QI9B!S>7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@ +M("`@("`@("`@("!M86EN*")B87-I8R(I"B`@("`@("`@96QS93H*("`@("`@ +M("`@("`@<')I;G1D*")%7!E(&]F('1E7,N87)G=BD*("`@(&5L0`````` +M```````````````````````````````````````````````````````````` +M```````````````````P,#`P-C0T`#`P,#$W-3``,#`P,371H;VX*(R!,:6-E +M;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@ +M=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ +M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E +M(&%T"B,*(R`@(&AT='`Z+R]W=W'!E8W1E9"`](%M="B`@("`@("`@ +M9&5S=$EP(#T@<&]R=$9O'0L('-R8U!O2!I +M;B!I<%1A8FQE4QI'!E8W1E +M9#H*("`@("`@("`@("`@("`@("`@("!I9B!I<%1A8FQE16YT'!E8W1E9$5N=')Y*2`]/2`M,3H*("`@("`@("`@("`@("`@("`@("`@("`@ +M9F]U;F1!;&P@/2!&86QS90H@("`@("`@("`@("`@("`@("`@("`@("!B4QI2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA +M=R!O'!R97-S(&]R(&EM<&QI960N +M("!3964@=&AE($QI8V5N$UE;6]R>55S86=E(&EN(&AE86QT:%]C +M:&5C:W-?9&%T82`B("L@7`H@("`@("`@("`@("`@(")S>7-T96U4:')E&ET*#`I"@H@("`@;6%X365M;W)Y +M57-A9V4@/2!F;&]A="AD871A6R)M87A-96UO7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@ +M(&UA:6XH*0H````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M'E?8VAE8VLN<'D````````````` +M```````````````````````````````````````````````````````````` +M`````````````#`P,#`V-#0`,#`P,36]U(&UA>2!N;W0@=7-E('1H +M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N +M41A=&$@86YD(")M87AC;VYN +M(B!I;B!H84-F9U-E8W1I;VYS6R)G;&]B86PB73H*("`@("`@("!I9B!H87!R +M;WAY1&%T85LB;6%X8V]N;B)=("$](&AA0V9G4V5C=&EO;G-;(F=L;V)A;")= +M6R)M87AC;VYN(EU;,%TN'E$871A(BD*("`@(&EF(&AA +M<')O>'E$871A(&ES($YO;F4@;W(@;&5N*&AA<')O>'E$871A*2`]/2`P.@H@ +M("`@("`@('!R:6YT(").;R!D871A('!R;W9I9&5D('1O(&-H96-K+"!S:VEP +M<&EN9R(*("`@("`@("!E>&ET*#`I"@H@("`@=VET:"!O<&5N*"(O971C+VAA +M<')O>'DO:&%P2YC9FWT*("`@(&-UWT*("`@(&9O41A=&$L(&AA0V9G4V5C=&EO;G,I"@H@("`@:68@ +M8VAE8VM-87A#;VYN(&%N9"!C:&5C:TQB4G5L97,Z"B`@("`@("`@<')I;G0@ +M(D%L;"!C:&5C:W,@<&%S&ET*#`I"B`@("!E;'-E.@H@ +M("`@("`@(&5X:70H,2D*"@II9B!?7VYA;65?7R`]/2`B7U]M86EN7U\B.@H@ +M("`@:68@;&5N*'-Y7,N87)G=ELQ72`]/2`B +M861V86YC960B.@H@("`@("`@(&UA:6XH*0H````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&ET*#`I"@H@("`@=&5M<&QA=&5697)S:6]N36%T8VAE +M65T('-E='5P(&%T("(@*R!R96QE87-E1FEL92`K7`H@ +M("`@("`@("`@("`@("`@("`B+"!S:VEP<&EN9RXB"B`@("`@("`@96QI9B!E +M>'!E8W1E9"`A/2!F;W5N9#H*("`@("`@("`@("`@<')I;G0@(E1E;7!L871E +M(%9E'!E8W1E9"`K("(L(&9O=6YD.B`B("L@9F]U;F0*("`@("`@ +M("`@("`@=&5M<&QA=&5697)S:6]N36%T8VAE'!E8W1E9"`K("(L(&9O=6YD.B`B("L@9F]U;F0*("`@("`@ +M("`@("`@&ET*#$I"@H*:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH* +M("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A;F0@2\````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````,#`P,#0`````````````````````````` +M```````````````````````````````````````````````P,#`P-C0T`#`P +M,#$W-3``,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS +M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E +M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W3U.;VYE*3H*("`@('=I=&@@ +M;W!E;B@G+W)O;W0O:&5A;'1H7V-H96-K2!I2!I5TN2D@/3T@,#H*("`@("`@("`@("`@("`@(&-O;G1I +M;G5E"B`@("`@("`@("`@(&ME>59A;"`](&5N=')Y+G-P;&ET*"(](BD*("`@ +M("`@("`@("`@:68@;&5N*&ME>59A;"D@/3T@,CH*("`@("`@("`@("`@("`@ +M(&1;:V5Y5F%L6S!=+G-T2]?7VEN:71?7RYP>0`````````````````````````````````````````` +M````````````````````````````````````````,#`P,#8T-``P,#`Q-S4P +M`#`P,#$W-3``,#`P,#`P,#$U-#``,3,V,C4Q-3`S,30`,#$W-S8R`"`P```` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````'5S=&%R("``9&%R2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO +M2!A<'!L:6-A8FQE(&QA=R!O'!R +M97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N0`````````````````````````````````` +M````````````````````````````````````````````````,#`P,#8T-``P +M,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#,Q,S(`,3,V,C4Q-3`S,30`,#$W-S8Q +M`"`P```````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````'5S=&%R("``9&%R2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET +M*#`I"@H@("`@;6EN1&ES:TYE961E9"`](&9L;V%T*&1A=&%;(FUI;D1IF4I("\@,3`R-`H*("`@ +M(&EF("AF6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI +M86YC90HC('=I=&@@=&AE($QI8V5N2!I;7!O7,I(#T](#`Z"B`@("`@ +M("`@<')I;G0@(D%L;"`B("L@7,@ +M87)E(')E86-H86)L92!V:6$@<&EN9R(*("`@("`@("!E>&ET*#`I"B`@("!E +M;'-E.@H@("`@("`@('!R:6YT(")5;G)E86-H86)L92!G871E=V%Y7,N87)G=ELQ72`]/2`B8F%S:6,B +M.@H@("`@("`@(&UA:6XH*0H````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````')O;W0O:&5A;'1H7V-H96-K0`````````````````````````````````````````````````````````` +M```````````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P +M,371H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD +M871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C +M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F +M('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&5C=71A8FQE71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E +M($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H +M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C +M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I +M"@H@("`@=VET:"!O<&5N*"2!O +M9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A +M<'!L:6-A8FQE(&QA=R!O'!R97-S +M(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N$-P=55S86=E(&EN(&AE +M86QT:%]C:&5C:W-?9&%T82!S>7-T96U4:')E&ET*#`I"@H@("`@;6%X0W!U57-A9V4@/2!F;&]A="AD871A +M6R)M87A#<'55&ET*#`I"B`@("!E +M;'-E.@H@("`@("`@('!R:6YT(")&86EL960@=&\@&ET*#$I"@H*:68@7U]N86UE +M7U\@/3T@(E]?;6%I;E]?(CH*("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A +M;F0@0`````````````````````````````````````` +M````````````````````````````````````````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2`]('9-6R)M86-!9&1R97-S(ET@ +M*R`B("(@*R!V35LB:7`B72`K("(@(B`K('9-6R)V;4YA;64B70H@("`@("`@ +M(&9O=6YD16YT2`](%1R=64*("`@("`@("`@("`@("`@(&)R96%K"@H@("`@("`@("`@("!N +M;VY$969A=6QT4V5T(#T@(G-E=#HB("L@=DU;(FEP(ETN2`](%1R=64*("`@("`@ +M("`@("`@("`@(&)R96%K"@H@("`@("`@(&EF(&YO="!F;W5N9$5N=')Y.@H@ +M("`@("`@("`@("!F86EL961#:&5C:R`](%1R=64*("`@("`@("`@("`@9F%I +M;'5R94UE&ET*#$I"B`@("!E;'-E.@H@("`@("`@('!R +M:6YT(")!;&P@(B`K('-T7,N87)G=ELQ72`]/2`B861V86YC960B.@H@("`@("`@(&UA:6XH +M*0H````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````````````````!R;V]T +M+V9U;F,N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P +M.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N +M2!O;F4@;&]C:R!IPH@("`@ +MPH@("`@;&]C:STD,0H*("`@(%]?;&]C:V5D/3`*("`@ +M(%]?5%,]8&1A=&4@*R5S)4Y@"B`@("!?7TQ/0TM$25(](B]T;7`B"B`@("!? +M7TQ/0TM&24Q%/2(D7U],3T-+1$E2+R1?7U13+20D+21L;V-K+FQO8VLB"@H@ +M("`@:68@6R`D,B!="B`@("!T:&5N"B`@("`@("`@7U]424U%3U54/20R"B`@ +M("!E;'-E"B`@("`@("`@7U]424U%3U54/3,P"B`@("!F:0H*("`@(&EF(%L@ +M+64@)%]?3$]#2T9)3$4@70H@("`@=&AE;@H@("`@("`@(&QO9V=EPH@("`@7U],3T-+1$E2/2(O=&UP +M(@H@("`@7U],3T-+1DE,13TB)%]?3$]#2T1)4B\J+20D+20Q+FQO8VLB"B`@ +M("!?7VQO8VME9#TD,@H@("`@:68@6R`B)%]?;&]C:V5D(B`]/2`B,2(@70H@ +M("`@=&AE;@H@("`@("`@(')M("1?7TQ/0TM&24Q%"B`@("!F:0I]"@HC(')E +M;&5A&ET('9A;'5E"B,@ +M)#(@;&]C:R!F:6QE;F%M90HC("0S(&QO8VME9"@Q*2!OF4]8&EP(&%D9'(@2!O9B!T:&4@3&EC96YS92!A=`HC +M"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ +M=&AE($QI8V5N7,O8VQA;65T82UD871A+R@N*UM>+UTI+S\D("`N+B]M +M971A9&%T82\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%="@HC:'1T<#HO +M+SQR;W5T97))4#XO;&%T97-T+V9O;R!A;F0@+BXN+V9O;R\@*'EI96QD(&UE +M=&%D871A+R1)4"]F;V\I"B-A2UZ;VYE+S\D("`N+B]M971A9&%T82\E>U)%34]415]! +M1$12?2]A=F%I;&%B:6QI='DM>F]N92!;3"Q.0RQ14T%="E)E=W)I=&52=6QE +M(%YC;&]U9"UI9&5N=&EF:65R+S\D("`N+B]M971A9&%T82\E>U)%34]415]! +M1$12?2]C;&]U9"UI9&5N=&EF:65R(%M,+$Y#+%%305T*4F5WU)%34]415]!1$12?2]I +M;G-T86YC92UI9"!;3"Q.0RQ14T%="E)E=W)I=&52=6QE(%YL;V-A;"UH;W-T +M;F%M92\_)"`@+BXO;65T861A=&$O)7M214U/5$5?041$4GTO;&]C86PM:&]S +M=&YA;64@6TPL3D,L45-!70I297=R:71E4G5L92!>;&]C86PM:7!V-"\_)"`@ +M+BXO;65T861A=&$O)7M214U/5$5?041$4GTO;&]C86PM:7!V-"!;3"Q.0RQ1 +M4T%="E)E=W)I=&52=6QE(%YP=6)L:6,M:&]S=&YA;64O/R0@("XN+VUE=&%D +M871A+R5[4D5-3U1%7T%$1%)]+W!U8FQI8RUH;W-T;F%M92!;3"Q.0RQ14T%= +M"E)E=W)I=&52=6QE(%YP=6)L:6,M:7!V-"\_)"`@+BXO;65T861A=&$O)7M2 +M14U/5$5?041$4GTO<'5B;&EC+6EP=C0@6TPL3D,L45-!70I297=R:71E4G5L +M92!><'5B;&EC+6ME>7,O/R0@("XN+VUE=&%D871A+R5[4D5-3U1%7T%$1%)] +M+W!U8FQI8RUK97ES(%M,+$Y#+%%305T*4F5W=FTM:60O/R0@ +M("XN+VUE=&%D871A+R5[4D5-3U1%7T%$1%)]+W9M+6ED(%M,+$Y#+%%305T* +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````=F%R+W=W=R]H=&UL+W5S97)D871A+P`` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````#`P,#`W-34`,#`P,3/dev/null 2>&1 || ${echo} 'cloud_scripts/usr/share/cloud/cloud-scripts.tar': 'MD5 check failed' + ) << \SHAR_EOF +6c9c71f04c38fbbe6031c09a732f525d cloud_scripts/usr/share/cloud/cloud-scripts.tar +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/usr/share/cloud/cloud-scripts.tar'` -ne 696320 && \ + ${echo} "restoration warning: size of 'cloud_scripts/usr/share/cloud/cloud-scripts.tar' is not 696320" + fi +fi +# ============= cloud_scripts/usr/share/cloud/cloud-scripts.tar ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/usr/share/cloud/cloud-scripts.tar' +then +${echo} "x - SKIPPING cloud_scripts/usr/share/cloud/cloud-scripts.tar (file already exists)" + +else +${echo} "x - extracting cloud_scripts/usr/share/cloud/cloud-scripts.tar (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/usr/share/cloud/cloud-scripts.tar +M971C+P`````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````#`P,#`W-34`,#`P,37-T96U-87A& +M:6QE4VEZ93TQ,$T*4G5N=&EM94UA>%5S93TR,$T*```````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````971C+W-Y7-T +M96TO:'EP97)V+61A96UO;G,N:'8M=G-S+61A96UO;BYS97)V:6-E```````` +M````````````````````````````````````````````````````,#`P,#8T +M-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,S0`,3,V,C4Q-3`S,30`,#(S +M,37!E2!S97)V:6-E("A64U,I(&1A96UO;@H*6U-E&5C4W1A3UM=6QT:2UU7-T96UD+W-Y2UC;VYF +M:63TO=7-R+VQO8V%L+V-L;W5D+W-Y7-T96TO;W!E;BUV;2UT;V]L3UM=6QT:2UU3UM=6QT:2UU7-T96UD+W-Y&5N+FUO=6YT"D)E9F]R93UN971W;W)K+G1A2UC;VYF:6&5C4W1A&5C4W1A3UM=6QT:2UU7-T96TO:'EP97)V+61A96UO;G,N:'8M +M9F-O<'DM9&%E;6]N+G-E7!E2!S97)V:6-E("A&0T]062D@9&%E;6]N"D-O +M;F1I=&EO;E!A=&A%>&ES=',]+V1E=B]V;6)U0H*6U-E3UM=6QT:2UU7-T96TO8VQO=60M +M<&]S=&EN:70N2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N0`````````````````````````````````````````````` +M`````````````````````````````````````````#`P,#`V-#0`,#`P,36]U(&UA>2!N;W0@=7-E +M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI +M8V5N7!E(#$S("UJ($123U`*+4$@24Y0550@+7`@:6-M<"`M:B!!0T-%4%0* +M+4$@24Y0550@+6D@971H,2`M<"!T8W`@+6T@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* +M(R`@(&AT='`Z+R]W=W7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E +M<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H +M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N +M2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H +M92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R +M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T +M"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7-C=&P@8V]N9FEG=7)A +M=&EO;B!F:6QE"B,*(R!&;W(@8FEN87)Y('9A;'5E7-C=&PN +M8V]N9B@U*2!F;W(@;6]R92!D971A:6QS+@HC($!615)324].0`H*(R!#;VYT +M2!T:&5R +M96)Y(')E9'5C:6YG('1H92!S:7IE(&]F(&1I&PR='!D+WAL +M,G1P9"YC;VYF```````````````````````````````````````````````` +M````````````````````````````````````````````````````````,#`P +M,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,3,`,3,U-C$W,C4Q-3(` +M,#$T-#4U`"`P```````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````'5S=&%R("``9&%R65S"G!P<&]P=&9I;&4@/2`@("`O971C+W!P<"]O<'1I;VYS +M+GAL,G1P9`H````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````971C+V1N2!D:7-A8FQE +MF5N+"!S:6YC92!T:&5Y"B,@=&5L;"!D +M;G-M87-Q('1O(&9I;'1E2X@268@>6]U(&AA=F4@82!D:6%L+6]N+61E;6%N9"!L:6YK('1H97D@ +M86QS;R!S=&]P"B,@=&AE6]U('=A;G0@9&YS('1O(&=E="!I=',@=7!S=')E86T@2`@(&%P<&5A2!O=&AE<@HC(&9I +M;&4L(&=E='1I;F<@:71S('-E2!O;@HC('-P96-I9FEE9"!I;G1E +M&-E<'0M:6YT97)F86-E/65T:#$*97AC97!T+6EN +M=&5R9F%C93UE=&@R"F5X8V5P="UI;G1E6]U('=A;G0@9&YS;6%S<2!T;R!P6]U"B,@=V%N="!D;G-M +M87-Q('1O(')E86QL>2!B:6YD(&]N;'D@=&AE(&EN=&5R9F%C97,@:70@:7,@ +M;&ES=&5N:6YG(&]N+`HC('5N8V]M;65N="!T:&ES(&]P=&EO;BX@06)O=70@ +M=&AE(&]N;'D@=&EM92!Y;W4@;6%Y(&YE960@=&AI6]U('=A;G0@=&\@ +M:&%V92!A(&1O;6%I;@HC(&%U=&]M871I8V%L;'D@861D960@=&\@2!Q=6%L:69I +M960@9&]M86EN(&YA;65S+"!A7-T96US(&-O;F9I9W5R960@8GD@ +M1$A#4`HC(#,I(%!R;W9I9&5S('1H92!D;VUA:6X@<&%R="!F;W(@(F5X<&%N +M9"UH;W-T7,N;W)G+G5K+#$Y,BXQ-C@N,BXP +M+S(T"@HC(%-A;64@:61E82P@8G5T(')A;F=E(')A=&AE7,N;W)G+G5K+#$Y,BXV."XS +M+C$P,"PQ.3(N,38X+C,N,C`P"@HC(%5N8V]M;65N="!T:&ES('1O(&5N86)L +M92!T:&4@:6YT96=R871E9"!$2$-0('-E6]U(&YE960*(R!T;R!S +M=7!P;'D@=&AE(')A;F=E(&]F(&%D9')E2!$2$-0"B,@2!B92!S970@;VYL>2!F;W(@=&AI2!W:&5N('1H92!T86<@(F=R965N +M(B!I2!A('-U8FYE="!W:&EC:"!C +M86XG="!B92!U6YA;6EC(&%D9')E2!A;F0*(R!A9&0@;F%M97,@=&\@=&AE($1.4R!F;W(@=&AE($E0 +M=C8@861D2P@-#AH"@HC($1O($1(0U`@86YD(%)O=71E2!W:6QL('5S +M92!33$%!0R!F;W(@861D2!R82US=&%T96QE2!J +M=7-T"B,@;F5E9"!T;R!B92!O;B!T:&4@7,@9VEV92!T:&4@:&]S="!W:71H($5T +M:&5R;F5T(&%D9')E7,@9VEV92!T:&4@:&]S="!W +M:71H(&-L:65N="!I9&5N=&EF:65R(#`Q.C`R.C`R.C`T"B,@=&AE($E0(&%D +M9')E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ +M(G)E9"(@=&\*(R!T:&4@;6%C:&EN92!W:71H($5T:&5R;F5T(&%D9')E&5D($E0=C8@861D2!;72!A2X*(V1H8W`M:&]S=#UI9#HP,#HP,3HP +M,#HP,3HQ-CID,CHX,SIF8SHY,CID-#HQ.3IE,CID.#IB,BP@9G)E9"P@6S$R +M,S0Z.C5="@HC($EG;F]R92!A;GD@8VQI96YT2!M86-H:6YE('=H;W-E"B,@1$A#4"!V96YD;W)C;&%S +M'1R82!O<'1I +M;VYS('=H:6-H(&%R92!T86=G960@87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@ +M;VYE"B,@;V8@=VAO'1R82!O<'1I;VYS('=H:6-H(&%R +M92!T86=G960@87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO2!D;G-M +M87-Q(&%N9"!S96YD(&YO(&1E9F%U;'0*(R!R;W5T92!A="!A;&PN($YO=&4@ +M=&AA="!T:&ES(&]N;'D@=V]R:W,@9F]R('1H92!O<'1I;VYS('-E;G0@8GD* +M(R!D969A=6QT("@Q+"`S+"`V+"`Q,BP@,C@I('1H92!S86UE(&QI;F4@=VEL +M;"!S96YD(&$@>F5R;RUL96YG=&@@;W!T:6]N"B,@9F]R(&%L;"!O=&AE0H*(R!3970@=&AE(&1E9F%U;'0@=&EM92UT;RUL:79E +M('1O(#4P"B-D:&-P+6]P=&EO;CTR,RPU,`H*(R!3970@=&AE(")A;&P@2!A;B!O<'1I;VX@=VAI8V@@=VEL;"!O;FQY +M(&)E('-E;G0@=&\@=&AE(")R960B(&YE='=O2!A6]U +M(&UA>2!W86YT('1O('5N8V]M;65N="!S;VUE(&]R(&%L;"!O9B!T:&5M(&EF +M('EO=2!U7!E"@HC(%-E;F0@86X@96UP='D@5U!! +M1"!O<'1I;VXN(%1H:7,@;6%Y(&)E(%)%455)4D5$('1O(&=E="!W:6YD;W=S +M(#<@=&\@8F5H879E+@HC9&AC<"UO<'1I;VX],C4R+")<;B(*"B,@4V5N9"!2 +M1D,M,S,Y-R!$3E,@9&]M86EN('-E87)C:"!$2$-0(&]P=&EO;BX@5T%23DE. +M1SH@66]U71H:6YG(&5L&4@=&%G(&9O2YK<'AE"B-D:&-P+6)O;W0];7EB;V]T:6UA9V4*"B,@16YC87!S +M=6QA=&5D(&]P=&EO;G,@9F]R($5T:&5R8F]O="!G4%A%+B!!;&P@=&AE(&]P +M=&EO;G,@87)E"B,@96YC87!S=6QA=&5D('=I=&AI;B!O<'1I;VX@,32!C;V1E"B-D:&-P+6]P=&EO;CUE;F-A<#HQ-S4L(#$W-BP@,6(@("`@("`@ +M(R!N;RUP61H8W`*(V1H8W`M;W!T:6]N/65N8V%P.C$W-2P@,3#@V+3,R"B-D:&-P+6UA=&-H/6ET86YI8W,L(&]P=&EO;CIC;&EE;G0M87)C +M:"P@,B`C24$V-`HC9&AC<"UM871C:#UH86UM97)S+"!O<'1I;VXZ8VQI96YT +M+6%R8V@L(#8@(W@X-BTV-`HC9&AC<"UM871C:#UM86-T96QS+"!O<'1I;VXZ +M8VQI96YT+6%R8V@L(#<@(T5&22!X.#8M-C0*"B,@1&\@&4M<')O;7!T/2)0#@V4$,L("));G-T86QL($QI;G5X(BP@<'AE;&EN=7@*"B,@3&]A +M9',@/'1F='`M#@V4$,L("));G-T86QL($QI;G5X(BP@<'AE;&EN +M=7@L(#$N,BXS+C0*"B,@57-E(&)O;W1S97)V97(@;VX@;F5T=V]R:RP@9F]U +M;F0@;7D@;75L=&EC87-T(&]R(&)R;V%D8V%S="X*(W!X92US97)V:6-E/7@X +M-E!#+"`B26YS=&%L;"!W:6YD;W=S(&9R;VT@4DE3('-E#@V4$,L("));G-T86QL('=I;F1O=W,@9G)O;2!225,@2!F:6QE0HC('1H92!U&%M<&QE(&]F(&1H8W`M8F]O="!W:71H(&%N(&5X=&5R;F%L(%1& +M5%`@2`M+7!X92US97)V +M:6-E+@HC9&AC<"UB;V]T/2]V87(O9G1P9"]P>&5L:6YU>"XP+&)O;W1H;W-T +M+#$Y,BXQ-C@N,"XS"@HC($EF('1H97)E(&%R92!M=6QT:7!L92!E>'1E#TR,3`P"@HC(%1H92!$2$-0('-E6]U(&UI9VAT(&5N9"!U<"!A8V-I9&5N=&%L +M;'D@8V]N9FEG=7)I;F<@82!$2$-0"B,@2X@5&AE($E30R!S97)V97(@=7-E&5C=71A8FQE +M('=H96X@82!$2$-0(&QE87-E(&ES(&-R96%T960@;W(@9&5S=')O>65D+@HC +M(%1H92!A`HC86QI87,],2XR+C,N +M,"PU+C8N-RXP+#(U-2XR-34N,C4U+C`*(R!A;F0@=&AI"UT87)G970@9F]R(&%L;"!L;V-A;`HC(&UA8VAI;F5S+@HC;&]C86QM>`H* +M(R!2971U6]U('=A;G0@=&\@ +M3XL/'=E:6=H=#X*(R!)9B!T:&4@9&]M86EN('!A&%M<&QE+F-O;2!D;VUA:6X@=&\* +M(R!L9&%P&%M +M<&QE+F-O;2!D;VUA:6X@=&\*(R!L9&%P&%M<&QE+F-O;2PS +M.#DL,@H*(R!!(%-25B!R96-O'!A;G-I;VX@ +M9&]N92!F;W(@4U)6(')E8V]R9',@7V1O97-?;F]T"B,@;V-C=7(@9F]R(%!4 +M4B!R96-O'!A;G-I;VX@9&]N92!F;W(@4U)6 +M(')E8V]R9',@7V1O97-?;F]T"B,@;V-C=7(@9F]R(%185"!R96-O&%M<&QE(%-01BX*(W1X="UR96-O5\@=V]R:W,*(R!F;W(@=&%R9V5T3TO=F%R +M+VQO9R]D;G-M87-Q+FQO9PH*(R!);F-L=61E(&$@86YO=&AE'0*```````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````971C+V-R;VXN9&%I +M;'DO```````````````````````````````````````````````````````` +M`````````````````````````````````````````````````````````#`P +M,#`W-34`,#`P,32]C;&5A2!C86-H92!T;R!U;'1I;6%T96QY(')E9'5C92!S=V%P<&EN9PH*7,O=FTO9')O<%]C86-H97,*```````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````````````971C+W9M +M=V%R92UT;V]LF4@:V5P=#H@,2!-0@IV;7-V8RYM +M87A,;V=3:7IE(#T@,0H*(R!$969I;F5S('1H92`B=FUT;V]L"!S:7IE(#4P30IS:7IE(#4P30IC;VUP0HC3&ES=&5N061D7,@9F]R('!R;W1O8V]L('9E2`O971C+W-S:"]SF4@;V8@97!H +M96UE7-L;V=& +M86-I;&ET>2!!551("E-Y65S"D%U=&AO7,@:6X@+V5T8R]S65S(&EF('EO=2!D;VXG="!T'0@<&%S65S"D=34T%024-L96%N=7!#65S"@HC($%C8V5P="!L;V-A;&4M4]F9G-E="`Q,`HC6#$Q57-E3&]C86QH;W-T +M('EE65S"B-5&PR='!D```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````,#`P,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,34`,3,U +M-C$W,C4Q-3(`,#$T-C`W`"`P```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````'5S=&%R("``9&%R6]U('=A;G0@=&\@=7-E(&$@9&EF9F5R +M96YT(&EN=&5R9F%C92!O6]U(&EN2!F2!)4"!A9&1R97-S+`H@("`@("`@(",@>6]U(&-A;B!U7-L;V'-O8VL@(R!P7-T96T@;&]G9VEN9PHD36]D3&]A9"!I;6ML;V<@ +M("`C('!R;W9I9&5S(&ME2!R:VQO9V0I"B,D36]D3&]A9"!I;6UA7-L;V<@7-T96TN("!3<&QI="!I="!U<"!S;R!T:&%T"B,@:70@:7,@96%S>2!T +M;R!W2YL;V<* +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````````````&5T8R]M;V1P +M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@ +M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2!C86-H92!T +M;R!U;'1I;6%T96QY(')E9'5C92!S=V%P<&EN9PH*<&AY;65M/20H9G)E97QA +M=VL@)R]>365M.B][<')I;G0@)#)])RD*:68@6R`D<&AY;65M("UL="`U,3,P +M,#`@73L@=&AE;@H@('-Y;F,@)B8@96-H;R`Q(#X@+W!R;V,O2YC;VYF```````````````````````````````````````````````` +M```````````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P +M,3$-O;FYE8W1I +M;VYS4&5R0VAI;&0@("`),3`P,`H\+TEF36]D=6QE/@H*(R!V:6TZ('-Y;G1A +M>#UA<&%C:&4@=',]-"!S=STT('-T6U,:6YK&5S($9O;&QO=U-Y;4QI;FMS($UU;'1I5FEE=W,*"0E!;&QO=T]V97)R:61E +M($%L;`H)"4]R9&5R(&%L;&]W+&1E;GD*"0EA;&QO=R!F&5C0T=)("U-=6QT:59I97=S +M("M3>6U,:6YK2QA;&QO=PH@("`@("`@($1E;GD@9G)O +M;2!A;&P*("`@("`@("!!;&QO=R!F3X*"3Q$:7)E8W1O0H)"6%L;&]W(&9R;VT@86QL"@D\+T1I3X*"@E38W)I +M<'1!;&EA0H)"4%L;&]W(&9R;VT@86QL"@D\ +M+T1I3X*"@E%T%004-(15],3T=?1$E2?2]ET%004-(15],3T=?1$E2 +M?2]S2QA;&QO=PH)"41E;GD@ +M9G)O;2!A;&P*"0E!;&QO=R!F2!T +M:&4*"2,@("!34TQ#97)T:69I8V%T949I;&4@9&ER96-T:79E(&ES(&YE961E +M9"X*"5-33$-E0H*"2,@("!397)V +M97(@0V5R=&EF:6-A=&4@0VAA:6XZ"@DC("`@4&]I;G0@4U-,0V5R=&EF:6-A +M=&5#:&%I;D9I;&4@870@82!F:6QE(&-O;G1A:6YI;F<@=&AE"@DC("`@8V]N +M8V%T96YA=&EO;B!O9B!014T@96YC;V1E9"!#02!C97)T:69I8V%T97,@=VAI +M8V@@9F]R;2!T:&4*"2,@("!C97)T:69I8V%T92!C:&%I;B!F;W(@=&AE('-E +M0H)(R`@('1H92!R969E +M2`H0T$I.@H)(R`@(%-E="!T:&4@0T$@8V5R=&EF:6-A +M=&4@=F5R:69I8V%T:6]N('!A=&@@=VAE6]U(&YE960@:&%S:"!S>6UL +M:6YK6UL:6YK7!E*3H* +M"2,@("!#;&EE;G0@8V5R=&EF:6-A=&4@=F5R:69I8V%T:6]N('1Y<&4@86YD +M(&1E<'1H+B`@5'EP97,@87)E"@DC("`@;F]N92P@;W!T:6]N86PL(')E<75I +M2!T;R!V97)I9GD@=&AE(&-E +M4-L:65N +M="!R97%U:7)E"@DC4U-,5F5R:69Y1&5P=&@@(#$P"@H)(R`@($%C8V5S6YT87@@:7,@80H)(R`@(&UI>'1UU-33%]#25!(15)]("%^(&TO7BA%6%!\3E5,3"DO(%P* +M"2,@("`@("`@("`@("!A;F0@)7M34TQ?0TQ)14Y47U-?1$Y?3WT@97$@(E-N +M86ME($]I;"P@3'1D+B(@7`H)(R`@("`@("`@("`@(&%N9"`E>U-33%]#3$E% +M3E1?4U]$3E]/57T@:6X@>R)3=&%F9B(L(")#02(L(")$978B?2!<"@DC("`@ +M("`@("`@("`@86YD("5[5$E-15]71$%9?2`^/2`Q(&%N9"`E>U1)345?5T1! +M67T@/#T@-2!<"@DC("`@("`@("`@("`@86YD("5[5$E-15](3U52?2`^/2`X +M(&%N9"`E>U1)345?2$]54GT@/#T@,C`@("`@("`@*2!<"@DC("`@("`@("`@ +M("!OU)%34]415]!1$12?2`]?B!M+UXQ.3)<+C2!E>&ES=&EN9R!W:&5N(&-L +M:65N=`H)(R`@("`@875T:&5N=&EC871I;VX@:7,@=7-E9"DN(%1H:7,@8V%N +M(&)E('5S960@=&\@:6UP;W)T('1H92!C97)T:69I8V%T97,*"2,@("`@(&EN +M=&\@0T=)('-C'!O'!E;G-I=F4@;W!E2!E;F%B;&5S('1H90H)(R`@("`@97AP;W)T871I;VX@9F]R +M($-'22!A;F0@4U-)(')E<75E'!O2`O=7-R+VQI8B]C9VDM8FEN/@H)"5-33$]P=&EO;G,@*U-T +M9$5N=E9A6]U(&-A;B!U6]U(')E8V5I=F4@ +M22]/(&5R2!A;&5R="!I2!F;W(@8G)O=W-E6]U(&MN;W<@=&AA="!T:&5I2X*"2,@("!. +M;W1I8V4Z($UO2!W86YT('1O(&1I2P@;VYE(&AA6]U(&IU2!A;'-O"B,@:&%V92!T;R!C +M:&%N9V4@=&AE(%9I6]U(&AA=F4@=7!GB!A;F0*(R!214%$ +M344N1&5B:6%N+F=Z"@I,:7-T96X@,3`N,2XQ+C$Z.#$X,`H*/$EF36]D=6QE +M(&UO9%]S0HC('1E;&P@ +M9&YS;6%S<2!T;R!F:6QT97(@;W5T('%U97)I97,@=VAI8V@@=&AE('!U8FQI +M8R!$3E,@8V%N;F]T"B,@86YS=V5R+"!A;F0@=VAI8V@@;&]A9"!T:&4@2!T:&4@2X*"B,@3F5V97(@9F]R=V%R9"!P;&%I +M;B!N86UE2X*(R!.;W1E('1H870@*&%M;VYG2!O9B!T:&4@=7!S=')E86T*(R!S97)V97)S(&ET(&MN +M;W=S(&%B;W5T(&%N9"!T2!E86-H('%U97)Y"B,@=VET:"`@96%C:"`@2`@:6X@('1H92`@;W)D97(@('1H97D@("!A<'!E87(@ +M("!I;@HC("]E=&,O2!A&%M<&QE(&]F(')O=71I;F<@4%12('%U97)I97,@=&\@ +M;F%M97-E2!D;VUA:6YS(&AE6]U('=A;G0@=&\@9F]R8V4@=&\@86X@ +M25`@861D&%M<&QE(&)E;&]W('-E;F0@86YY +M(&AO6]U('=A;G0@ +M9&YS;6%S<2!T;R!L:7-T96X@9F]R($1(0U`@86YD($1.4R!R97%U97-T&-E<'0M +M:6YT97)F86-E/6QO"@HC($]R('=H:6-H('1O(&QI2!A9&1R +M97-S("AR96UE;6)E2!$3E,@7-T96US('=H:6-H +M('-U<'!O6]U(&UA>2!N965D('1H:7,@:7,@=VAE;@HC(')U;FYI;F<@ +M86YO=&AE6]U(&1O;B=T('=A;G0@9&YS;6%S<2!T;R!R +M96%D("]E=&,O:&]S=',L('5N8V]M;65N="!T:&4*(R!F;VQL;W=I;F<@;&EN +M92X*(VYO+6AO6]U('=A;G0@:70@=&\@2!P;W1E;G1I86QL>2!S971T:6YG('1H90HC +M("`@(&1O;6%I;B!O9B!A;&P@'!A;F0M:&]S +M=',B"B-D;VUA:6X],BYV;6]P0HC(&$@;&5A6]U(&AA=F4@;6]R92!T:&%N(&]N92!N971W;W)K+"!Y;W4@ +M=VEL;"!N965D('1O"B,@2!P87)A;65T97)S(&9O&%M<&QE +M7,@7,@:70G +M2!T +M:&4@;6%C:&EN92!W:71H(&5T:&5R;F5T"B,@861D'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ +M(G)E9"(@=&\*(R!A;GD@;6%C:&EN92!W:71H(&5T:&5R;F5T(&%D9')E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ +M(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO"(*(V1H8W`M +M=F5N9&]R8VQA2!M86-H:6YE(&]N90HC +M(&]F('=H;W-E($1(0U`@=7-E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@ +M87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO2!N86UE.@HC(')U;B`B9&YS;6%S<2`M+6AE;'`@9&AC<"(@=&\@9V5T +M(&$@;&ES="X*(R!.;W1E('1H870@86QL('1H92!C;VUM;VX@2!D;G-M87-Q+B!9;W4@=F5R>2!L:6ME;'D@=VEL;"!N;W0@ +M;F5E9`HC(&%N>2!D:&-P+6]P=&EO;G,N($EF('EO=2!U2!A2!W;W)K0HC(&1E9F%U;'0@*#$L +M(#,L(#8L(#$R+"`R."D@=&AE('-A;64@;&EN92!W:6QL('-E;F0@82!Z97)O +M+6QE;F=T:"!O<'1I;VX*(R!F;W(@86QL(&]T:&5R(&]P=&EO;B!N=6UB97)S +M+@HC9&AC<"UO<'1I;VX],PH*(R!3970@=&AE($Y44"!T:6UE('-E0H*(R!3970@=&AE(&1E +M9F%U;'0@=&EM92UT;RUL:79E('1O(#4P"B-D:&-P+6]P=&EO;CTR,RPU,`H* +M(R!3970@=&AE(")A;&P@2!A;B!O<'1I +M;VX@=VAI8V@@=VEL;"!O;FQY(&)E('-E;G0@=&\@=&AE(")R960B(&YE='=O +M2!A6]U(&UA>2!W86YT('1O('5N8V]M;65N="!T:&5M +M(&EF('EO=2!U2!N971B:6]S('-C;W!E+@H*(R!396YD(%)&0RTS +M,SDW($1.4R!D;VUA:6X@2!W:&5N('1H92!C;&EE;G0@71E(&EN=&5G97(@+2!T:&%T)W,@=VAA="!M:6-R;W-O9G0@=V%N +M=',N(%-E90HC(&AT='`Z+R]T96-H;F5T,BYM:6-R;W-O9G0N8V]M+U=I;F1O +M=W-397)V97(O96XO;&EB2]A-S!F,6)B-RUD,F0T+30Y9C`M.39D-BTT +M8C2!S;VUE(&-O;F9I9W5R871I;VYS(&]F"B,@ +M171H97)B;V]T('1O(&%L;&]W(&ES('1O(')E8V]G;FES92!T:&4@1$A#4"!S +M97)V97(N"B-D:&-P+6]P=&EO;CUV96YD;W(Z171H97)B;V]T+#8P+")%=&AE +M"X@3F]T92!T:&%T +M('=E(&YE960@=&\@2!N965D"B,@=&AI2!F:6QE0HC('1H92!U&5L:6YU>"YR +M960M;F5T"@HC($%N(&5X86UP;&4@;V8@9&AC<"UB;V]T('=I=&@@86X@97AT +M97)N86P@2!C;&EE +M;G0@=VAI8V@@8G)O861C87-T6]U(&UI9VAT(&5N9"!U +M<"!A8V-I9&5N=&%L;'D@8V]N9FEG=7)I;F<@82!$2$-0"B,@2X@5&AE($E30R!S +M97)V97(@=7-E2!T:&4@:&]S=&YA;64*(R!I9B!T:&5R92!IF4@:&5R92X*(V-A8VAE +M+7-I>F4],34P"@HC($EF('EO=2!W86YT('1O(&1I2!R97-P;VYS97,@=VAI8V@@8V]M92!F;W)M("]E=&,O:&]S=',@86YD +M('1H92!$2$-0(&QE87-E"B,@9FEL92!H879E(%1I;64M5&\M3&EV92!S970@ +M87,@>F5R;RP@=VAI8V@@8V]N=F5N=&EO;F%L;'D@;65A;G,*(R!D;R!N;W0@ +M8V%C:&4@9G5R=&AE6]U(&%R92!H87!P>2!T;R!T6]U(&-A;B!S970@82!T:6UE+71O+6QI=F4@*&EN"B,@6]U('=A;G0@9&YS;6%S<2!T +M;R!D971E8W0@871T96UP=',@8GD@5F5R:7-I9VX@=&\@"!U<"!$ +M3E,@2!W;W)K"!T;R`U+C8N-RYX"B-A;&EA"UT87)G970@9F]R(&%L;"!L;V-A;`HC(&UA8VAI;F5S+@HC;&]C86QM>`H* +M(R!2971U6]U('=A;G0@=&\@ +M3XL/'=E:6=H=#X*(R!)9B!T:&4@9&]M86EN('!A&%M<&QE+F-O;2!D;VUA:6X@=&\* +M(R!L9&%P&%M +M<&QE+F-O;2!D;VUA:6X@=&\*(R!L9&%P&%M<&QE+F-O;2PS +M.#D*"B,@5'=O(%-25B!R96-O&%M<&QE+F-O;2PS.#DL,0HC&%M<&QE+F-O;2QL9&%P&%M<&QE+F-O +M;0HC&%M<&QE+F-O;0H*(R!4:&4@9F]L +M;&]W:6YG(&QI;F4@65E(%!A9V4N7VAT='`N7W1C<"YD;G,M'0M3TO=F%R+VQO9R]D +M;G-M87-Q+FQO9PH*(R!);F-L=61E(&$@86YO=&AE'0*```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````&5T8R]I<'-E8RYS96-R971S```````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P,3PH@("`@;6%X2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P +M.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N +M71R=6YC871E"GT*```````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````&5T8R]L;V=R;W1A=&4N +M9"]C;VYN=')A8VMD```````````````````````````````````````````` +M```````````````````````````````````````````````````````P,#`P +M-C0T`#`P,#$W-3``,#`P,3PH@("`@;6%X6-O;7!R97-S"@H@("`@<&]S=')O=&%T90H@("`@("`@(&EF +M(%L@+64@+W9A2!O9B!T:&4@3&EC96YS92!A +M=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O +M'!R97-S(&]R(&EM<&QI960N("!3 +M964@=&AE($QI8V5NPH@("`@("`@(')O +M=&%T92`U"B`@("`@("`@;6%X2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N'-I>F4@,3!- +M"B`@("`@("`@;6ES0H@("`@("`@ +M(&-O;7!R97-S"B`@("`@("`@8V]P>71R=6YC871E"GT*```````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````!E=&,O;&]G0H)8V]M<')E71R=6YC871E"B`@("`@("!R;W1A=&4@,PH@("`@("`@8V]M<')E'0*("`@("`@(&UA>'-I>F4@,3!-"B`@("`@("!N;W1I9F5M +M<'1Y"GT*```````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````&5T8R]L;V=R;W1A=&4N9"]R0H)8V]M<')E +M2YL;V<@>PH@("`@0H@("`@;6%X7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ +M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E +M(&%T"B,*(R`@(&AT='`Z+R]W=W2\````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````,#`P,#'DN8V9G```````````````````````````````````````````` +M```````````````````````````````````````````````````````````P +M,#`P-C0T`#`P,#$W-3``,#`P,3'D*"75S97(@:&%P0H)9W)O +M=7`@:&%P0H)9&%E;6]N"@ID969A=6QT7!E(CHB9W5E2(Z(C$W,BXQ-BXQ+C$B+`H)(F1E9F%U +M;'1?96YT2(*?0H````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````;W!T+V-L;W5D+W1E7!E(CH@(FEC;7`B"B`@("`@("`@("`@('TL"B`@("`@("`@("`@ +M('L*("`@("`@("`@("`@("`@(")A;&QO=V5D(CH@=')U92P*("`@("`@("`@ +M("`@("`@(")C:61R(CH@(C$P+C`N,BXP+S@B+`H@("`@("`@("`@("`@("`@ +M(F9I7!E(CH@(G5D<"(*("`@("`@("`@ +M("`@?2P*("`@("`@("`@("`@>PH@("`@("`@("`@("`@("`@(F%L;&]W960B +M.B!T7!E(CH@(FYE='=OR)P=6)L:6-?:7`B.B(Q +M,"XP+C(N,3`R(BP*(G-O=7)C95]N870B.G1R=64L"B)A9&0B.G1R=64L"B)O +M;F5?=&]?;VYE7VYA="(Z9F%L2(Z(C$P+C`N,BXQ(BP*(FYE=&UA2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H +M92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2!C;61?;&EN92YJ2!I<',P,#`Q+FIS;VX*+V]P="]C;&]U9"]B:6XO +M=7!D871E7V-O;F9I9RYP>2!I<',P,#`R+FIS;VX*+V]P="]C;&]U9"]B:6XO +M=7!D871E7V-O;F9I9RYP>2!I<',P,#`S+FIS;VX*```````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````;W!T+V-L;W5D+W1ER)P +M=6)L:6-?:7`B.B(Q,"XP+C(N,3`S(BP*(G-O=7)C95]N870B.G1R=64L"B)A +M9&0B.G1R=64L"B)O;F5?=&]?;VYE7VYA="(Z9F%L2(Z(C$P+C`N,BXQ(BP*(FYE=&UAPH)(FQO8V%L7W!U8FQI8U]I<"(Z(C$W,BXQ-BXQ +M+C$B+`H)(FQO8V%L7V=U97-T7V-I9'(B.B(Q-S(N,38N,2XP+S(T(BP*"2)L +M;V-A;%]P=6)L:6-?9V%T97=A>2(Z(C$W,BXQ-BXQ+C$B+`H)(G!E97)?9V%T +M97=A>5]I<"(Z(C$P+C(P,"XR,#`N,2(L"@DB<&5E2(Z(C-D97,M;60U(BP* +M"2)I:V5?<&]L:6-Y(CHB,V1E7)I9VAT(&]W +M;F5R6]U +M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O +M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W +M=W2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NW!R:6YT("0Y.WTG*0H):68@ +M6R`D4D]55$527U-4051%(#T@(E50(B!="@ET:&5N"@D@("`@4U1!5%53/4U! +M4U1%4@H)96QI9B!;("123U5415)?4U1!5$4@/2`B1$]73B(@70H)=&AE;@H) +M("`@(%-405154SU"04-+55`*"69I"F9I"@IE8VAO(")3=&%T=7,Z("1[4U1! +M5%53?2(*```````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````!O<'0O8VQO=60O=&5M<&QA=&5S+VAE87)T8F5A="YS:"YT96UP;``` +M```````````````````````````````````````````````````````````` +M````````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC +M"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ +M=&AE($QI8V5N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H +M='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI +M8V5NPH@("`@36]D +M92!&5$97('L*("`@("`@("`C"B`@("`@("`@(R!3:7IE(&]F('1H92!R97-E +M;F0@<75E=64@*&EN(&]B:F5C=',I+B!4:&ES(&ES('1H92!M87AI;75M"B`@ +M("`@("`@(R!N=6UB97(@;V8@;V)J96-T2!T;R!S=&]R92!D96%D(&]B:F5C=',N"B`@("`@("`@(R!$969A +M=6QT(&ES(#$S,3`W,B!O8FIE8W1S+@H@("`@("`@(",*("`@("`@("`C(%)E +M6]U('-E="!A(&QO=R!V86QU92P@5$-0(&5N +M=')I97,@:6X*("`@("`@("`C($5S=&%B;&ES:&5D('-T871E&%M<&QE+`H@("`@("`@(",@86X@ +M4U-((&-O;FYE8W1I;VX@=VET:&]U="!+965P06QI=F4@96YA8FQE9"X@268@ +M;F]T('-E="P*("`@("`@("`C('1H92!D865M;VX@=7-E6]U(&1E +M8W)E87-E('1H:7,*("`@("`@("`C('9A;'5E+"!T:&4@;G5M8F5R(&]F(&%C +M:VYO=VQE9V1M96YT6]U"B`@("`@("`@(R!I;F-R96%S +M92!T:&ES('9A;'5E+"!T:&4@'!E6-L97,@6]U('1O(&1I +M'1E'1E +MF%T:6]N +M(&UE2!O9B!Y;W5R(&5X:7-T:6YG(&EN=&5R9F%C97,N($EF +M(&%N>2!D;W5B="P*("`@("`@("`C(&1O(&YO="!M;V1I9GD@=&AI0H@("`@("`@(",@9&]U +M8G0L(&1O(&YO="!M;V1I9GD@=&AIF%T:6]N(&UEF%T:6]N(&UE6]U"B`@("`@ +M("`@(R!N;W1I8V4@6]U(&UA>2!W86YT('1O +M(&EN8W)E87-E('1H92!S:7IE"B`@("`@("`@(R!O9B!T:&4@2!T;R!A8VAI979E(&9A=6QT+71O;&5R86YC92X@26X@ +M8V%S92!O9B!D;W5B="P@9&\*("`@("`@("`C(&YO="!M;V1I9GD@=&AI6]U(&-A;B!O;FQY('-E;&5C="!O;F4N"B`@("`C"B`@("`C(%5$4"![ +M"B`@("`@("`@(PH@("`@("`@(",@5410(&%D9')E6]U(&%R92!G;VEN9R!T;R!UF4*("`@("`@("`C"B`@("`@("`@ +M(R!28W93;V-K971"=69F97(@,3(T.3(X,`H*("`@("`@("`C"B`@("`@("`@ +M(R!%;F%B;&4O1&ES86)L92!M97-S86=E(&-H96-KPH@("`@(PH@("`@(R!3970@=&AE +M(&YI8V4@=F%L=64@;V8@=&AE(&1A96UO;BP@=&AI6]U(&-A;B!S96QE8W0@8F5T=V5E +M;@H@("`@(R!24B!A;F0@1DE&3R!A;F0@=&AE('!R;V-EPH@("`@(R`@(%1Y<&4@1DE&3PH@("`@(R`@(%!R:6]R:71Y +M(#DY"B`@("`C('T*"B`@("`C"B`@("`C($YU;6)E2X*("`@(",@4F5A9"!S;VUE(&1O8W5M96YT +M2!K965P +M('-O;64@9&5A9"!E;G1R:65S(&-A8VAE9"!F;W(@<&]S7-L;V2!N86UE +M("AD865M;VX@*&1E9F%U;'0I(&]R(&QO8V%L,"XN-RD*("`@(",@1&5F875L +M=#H@;V9F"B`@("`C"B`@("!3>7-L;V<@;VX*"B`@("`C"B`@("`C($QO8VMF +M:6QE"B`@("`C"B`@("!,;V-K1FEL92`O=F%R+VQO8VLO8V]N;G1R86-K9"YL +M;V-K"@H@("`@(PH@("`@(R!5;FEX('-O8VME="!C;VYF:6=UF5-87A'&%M<&QE(&-O;F9I9W5R +M871I;VX@9FEL92!S971S('1H90H@("`@(R!S:7IE('1O(#(@34)Y=&5S('1O +M(&%V;VED('1H:7,@F4*("`@(",@:68@:70@9&5T96-T&EM=6T@8G5F9F5R('-I>F4@9W)O=W1H('1H870@8V%N(&)E(')E86-H +M960N(%1H:7,@97AA;7!L92!F:6QE"B`@("`C('-E=',@=&AE('-I>F4@=&\@ +M."!-0GET97,N"B`@("`C"B`@("!.971L:6YK0G5F9F5R4VEZ94UA>$=R;W=T +M:"`X,S@X-C`X"@H@("`@(PH@("`@(R!)9B!T:&4@9&%E;6]N(&1E=&5C=',@ +M=&AA="!.971L:6YK(&ES(&1R;W!P:6YG('-T871E+6-H86YG92!E=F5N=',L +M"B`@("`C(&ET(&%U=&]M871I8V%L;'D@6YC:')O +M;FEZ871I;VX@86=A:6YS="!T:&4@2V5R;F5L"B`@("`C(&%F=&5R(#,P('-E +M8V]N9',@*&1E9F%U;'0@=F%L=64I+B!297-Y;F-H6]U('=A;G0@6YC+B!4:&ES(&]P=&EO;B!I"!K97)N96P@/CT@ +M,BXV+C,Q+@H@("`@(PH@("`@(R!.971L:6YK179E;G1S4F5L:6%B;&4@3V9F +M"@H@("`@(PH@("`@(R!">2!D969A=6QT+"!T:&4@9&%E;6]N(')E8V5I=F5S +M('-T871E('5P9&%T97,@9F]L;&]W:6YG(&%N"B`@("`C(&5V96YT+61R:79E +M;B!M;V1E;"X@66]U(&-A;B!M;V1I9GD@=&AIF%T:6]N(&UO +M9&4L('1H92!P;VQL:6YG(&UO9&4@8V%N(&]N;'D@9W5AF5S('1H92!H86YD;&EN9R!O9B!S +M=&%T92UC:&%N9V4@979E;G1S(&-O;6EN9PH@("`@(R!F2`H:6X@ +M=&5R;7,@;V8*("`@(",@2!T:')E92!F:6QT97(M6]U(&-A;B!D969I;F4@=&AE(&5V +M96YT(&9I;'1E2!A=F]I +M9&EN9R!T:&4@8V]P>2!O9B!T:&4@979E;G0@;65S6]U(')E<75I"!K97)N96P@/CT@,BXV+C(Y('1O"B`@("`C +M(&9I;'1E6]U('=A;G0@=&\@PH@ +M("`@("`@(",*("`@("`@("`C($%C8V5P="!O;FQY(&-E65R(#0@<')O +M=&]C;VPN"B`@("`@("`@(PH@("`@("`@(%!R;W1O8V]L($%C8V5P="!["B`@ +M("`@("`@("`@(%1#4`H@("`@("`@("`@("!30U10"B`@("`@("`@("`@($1# +M0U`*("`@("`@("`@("`@5410"B`@("`@("`@("`@($E#35`@(R!4:&ES(')E +M<75I2!A;&P@=&AE"B`@("`@("`@(R!)4"!A +MPH@("`@("`@("`@ +M("!)4'8T7V%D9')E2!A;B!)4'8V(&%D9')E2!F;&]W('-T871E+@H@("`@("`@(",@5&AI +M2!B86-K=7`*("`@("`@("`C(&9I +M7!E/6YO=&EF>0H@("`@4WES=&5M9"!O;@I]"@`````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````!O<'0O8VQO=60O=&5M +M<&QA=&5S+V-H96-K7VAE87)T8F5A="YS:"YT96UP;``````````````````` +M````````````````````````````````````````````````````````,#`P +M,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7-T96UC=&P@2`M+69A=6QT"@H@("`@<&MI;&P@+3D@:V5E<&%L:79E9"`^/B`D4D]55$52 +M7TQ/1R`R/B8Q('Q\('1R=64*("`@('!K:6QL("TY(&-O;FYT&ET"F9I"@``````````````;W!T+V-L;W5D+W1E;7!L871E +M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI +M86YC90HC('=I=&@@=&AE($QI8V5N6]U +M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HA +M('=I=&@@=&AE($QI8V5NPH@("`@PH@("`@("`@(&AE87)T +M8F5A=`H@("`@?0H*("`@(&YO=&EF>5]B86-K=7`@(B]O<'0O8VQO=60O8FEN +M+VUA2`M+6)A8VMU<"(*("`@(&YO=&EF>5]M87-T97(@(B]O<'0O +M8VQO=60O8FEN+VUA2`M+6UA5]F875L +M="`B+V]P="]C;&]U9"]B:6XO;6%S=&5R+G!Y("TM9F%U;'0B"GT*```````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````!O<'0O8VQO=60O8FEN+P`````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````,#`P,#&4N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&ET(#$*?0H*&5?8V9G7V9I;&5N86UE(#P\14]&"D1%1D%53%0@ +M9&5F875L=`I04D]-4%0@,0I424U%3U54(#(V"D1)4U!,05D@8F]O="YMF4]-C8P,#`@:6YI=')D/21I;FET0`````````````````````````````````````````` +M````````````````````````````````````````````,#`P,#2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA +M=R!O'!R97-S(&]R(&EM<&QI960N +M("!3964@=&AE($QI8V5N7!E(ET@/3T@(G-T871I8VYA +M=')U;&5S(CH*("`@("`@("`@("`@;F5W7!E(ET@/3T@(F9O"`](&1B86=;"AF;W)W87)D*0H@("`@("`@("`@("`@("`@("`@(&EF(&YO +M="!I;F1E>"`]/2`M,3H*("`@("`@("`@("`@("`@("`@("`@("`@9&)A9UMS +M;W5R8V5?:7!=6VEN9&5X72`](&YE=W)U;&4*("`@("`@("`@("`@("`@("`@ +M("!E;'-E.@H@("`@("`@("`@("`@("`@("`@("`@("!D8F%G6W-O=7)C95]I +M<%TN87!P96YD*&YE=W)U;&4I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@ +M("`@("`@("`@("`@("`@(&1B86=;7!E(ET@/3T@ +M(G-T871I8VYA=')U;&5S(CH*("`@("`@("`@("`@("`@(&EF('-O=7)C95]I +M<"!I;B!D8F%G+FME>7,H*3H*("`@("`@("`@("`@("`@("`@("!D96P@9&)A +M9UMS;W5R8V5?:7!="B`@("`@("`@("`@(&5L:68@7,H*3H*("`@("`@("`@("`@("`@("`@("!I;F1E>"`] +M("TQ"B`@("`@("`@("`@("`@("`@("`@9F]R(&9O%T*"B`@("!R971U2!T:&4@<'5B;&EC('-I9&4L +M('1H;W-E(&UU7!E(ET@/3T@7!E(ET@/3T@(G-T871I +M8VYA="(Z"B`@("`@("`@2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET(#$*9FD*"G5S86=E*"D@ +M>PH@('!R:6YT9B`B57-A9V4Z("5S("U;8WQG?')\;GQD72!;+6P@/'!U8FQI +M8R!G871E=V%Y/ET@6RUV(#QV<&,@8VED&ET(#(@)&QO8VL@)&QO8VME9`H).SL*("!E +M&ET("0_("1L;V-K("1L;V-K960*9FD*"FEF +M(%L@(B1N9FQA9R(@/3T@(C$B(%T*=&AE;@H@("-G971?=G!N7W5S86=E"B`@ +M=6YL;V-K7V5X:70@)#\@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)&1F;&%G +M(B`]/2`B,2(@70IT:&5N"B`@(W)E;6]V95]U&ET(#`@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)')F;&%G(B`]/2`B +M,2(@70IT:&5N"B`@71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A +M=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&-E +M<'0@24]%2@I"B`@("`@("`@("`@ +M("`@("`@("`@9W5E22R)$;VU57U)E<75E&-E<'0@17AC97!T:6]N(&%S(&4Z +M"B`@("`@("`@("`@("`@("`@("`@;&]G9VEN9RYE7!E)UT@/3T@)V%L;"<@86YD(&]B:ELG +M7!E(#T@(F%N>2(*("`@("`@("`@("`@:68@(FEC +M;7!?='EP92(@:6X@7,H*2!A;F0@7!E)UT*("`@("`@("`@("`@:68@(FEC;7!? +M8V]D92(@:6X@7,H*2!A;F0@7!E)UTL('-E;&8N7!E("5S("UJ("5S(B`E("AI8VUP7W1Y<&4L('-E;&8N&5C=71E*&1S=$EP2==.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5; +M)V%C=&EO;B==(#T@(D%#0T505"(*("`@("`@("`@("`@("`@("`@("!E;'-E +M.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5;)V%C=&EO;B== +M(#T@(D123U`B"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ +M("`@("`@(",@1F]R(&]T:&5R(')U;&5S(&%D9&5D+"!I9B!D969A=6QT7V5G +M7!E("5S(B`E(&EC;7!?='EP90H@("`@("`@("`@("`@ +M("`@96QI9B!R=6QE6R=P7!E +M+B!3;RP@:71S(&9W(&%T=')I8G5T92!I7!E(#T@ +M(F%N>2(*("`@("`@("`@("`@("`@('-E;&8N<')O=&]C;VP@/2!S96QF+G1Y +M<&4*("`@("`@("`@("`@("`@(&EF(")I8VUP7W1Y<&4B(&EN(')U;&4N:V5Y +M7!E +M+"!R=6QE6R=I8VUP7V-O9&4G72D*("`@("`@("`@("`@("`@(&EF('-E;&8N +M='EP92`]/2`B<')O=&]C;VPB.@H@("`@("`@("`@("`@("`@("`@(&EF(')U +M;&5;)W!R;W1O8V]L)UT@/3T@-#$Z"B`@("`@("`@("`@("`@("`@("`@("`@ +M(')U;&5;)W!R;W1O8V]L)UT@/2`B:7!V-B(*("`@("`@("`@("`@("`@("`@ +M("!S96QF+G!R;W1O8V]L(#T@&5C=71E*")I<'1A +M8FQE+4$O:7!T86)L97,@+70@9FEL=&5R("U$+V&5C=71E*")I +M<'-E="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP +M&5C=71E*")I<'-E="`M +M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP2!V +M86QI9"!D871A"B`@("`@("`@("`@("`@("!I9B!F;VQD97(@(3T@(G5S97)D +M871A(B!A;F0@9F]L9&5R("$](")M971A9&%T82(Z"B`@("`@("`@("`@("`@ +M("`@("`@8V]N=&EN=64*"B`@("`@("`@("`@("`@("!I9B!F:6QE(#T]("(B +M.@H@("`@("`@("`@("`@("`@("`@(&-O;G1I;G5E"@H@("`@("`@("`@("`@ +M("`@7,N97AI="@Q*0H@("`@("`@("`@("!I9B!O2Q!;&QO=UQN1&5N>2!F2!E>&ES=',L('=E(&1O(&ET('1H:7,@ +M=V%Y(&9O7,N97AI="@Q +M*0H*("`@("`@("!F:"`](&]P96XH:'1A8V-E2`](")2 +M97=R:71E4G5L92!>;65T82UD871A+R@N*RDD("`N+B\B("L@9F]L9&5R("L@ +M(B\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%=(@H@("`@("`@("`@("!H +M=&%C8V5S7,N97AI="@Q*2`@ +M(R!&25A-10H@("`@("`@(')E='5R;B!4&ET*#$I("`C($9)6$U%"B`@("`@("`@:7!S96,N=G!N+2@N*BDN8V]N9B(L(&9I;&4I"B`@("`@ +M("`@("`@(&EF(&TZ"B`@("`@("`@("`@("`@("!S96QF+F-O;F9I<',N87!P +M96YD*&TN9W)O=7`H,2DI"@H@("`@("`@(&9O&5C=71E*")I<'-E +M8R!R96QO860B*0H*("`@(&1E9B!C;VYF:6=U#4R-2`M:B!!0T-%4%0B("4@9&5V72D*("`@ +M("`@("!F;W(@;F5T(&EN(&]B:ELG<&5E&UA&UA5]I<"=="B`@("`@("`@<&5E7!E/71U;FYE;"(I"B`@ +M("`@("`@9FEL92YA9&1E<2@B(&%U=&AB>3US96-R970B*0H@("`@("`@(&9I +M;&4N861D97$H(B!K97EE>&-H86YG93UI:V4B*0H@("`@("`@(&9I;&4N861D +M97$H(B!I:V4])7,B("4@:6ME<&]L:6-Y*0H@("`@("`@(&9I;&4N861D97$H +M(B!I:V5L:69E=&EM93TE3TS,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1T:6UE;W5T/3$R +M,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1A8W1I;VX]')A;F=E*#,I.@H@("`@("`@("`@("!R +M97-U;'0@/2!#&5C=71E*"=I<'-E8R!S=&%T=7,@=G!N+25S +M('P@9W)E<"`B)7,B)R`E("AR:6=H='!E97(L('!E97)L:7-T+G-P;&ET*"(L +M(BP@,2E;,%TI*0H@("`@("`@("`@("!I9B!L96XH2P@)R,G*0H@("`@("`@(&EF(&YO="!U&5C +M=71E*")T9&)D=6UP("]V87(O&5C=71E*"=K:6QL("TY("5S)R`E('!I9"D*"@IC;&%S&5C=71E*")S>7-T96UC=&P@2YS96-R971S(B`E("AS96QF+E903D-/3D9$25(I"B`@("`@ +M("`@>&PR='!D8V]N9F9I;&4@/2`B+V5T8R]X;#)T<&0O>&PR='!D+F-O;F8B +M"B`@("`@("`@>&PR='!O<'1I;VYS9FEL92`]("(O971C+W!P<"]O<'1I;VYS +M+GAL,G1P9"(*"B`@("`@("`@;&]C86QI<"`](&]B:ELG;&]C86Q?:7`G70H@ +M("`@("`@(&QO8V%L8VED2`Z(%!32R!<(B5S7"(B("4@*&QE9G0L('!S:RDI"B`@("`@ +M("`@&PR='!D8V]N9F9I;&4I"B`@("`@("`@>&PR='!D8V]N9BYA9&1E<2@B +M:7`@&PR='!O<'1I;VYS+F-O;6UI="@I"@H@("`@9&5F(')E;6]T96%C8V5S4EP*'-E;&8L(&EP82DZ"B`@("`@("`@9F]R(&EN +M=&5R9F%C92!I;B!S96QF+F-O;F9I9RYA9&1R97-S*"DN9V5T7VEN=&5R9F%C +M97,H*3H*("`@("`@("`@("`@:68@:6YT97)F86-E+FEP7VEN7W-U8FYE="AI +M<&$I.@H@("`@("`@("`@("`@("`@2@I"B`@("`@("`@4EP*')U +M;&5;)W!U8FQI8U]I<"==*0H@("`@("`@(&EN=&5R;F%L7V9W:6YT97)F86-E +M(#T@4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI"B`@ +M("`@("`@<'5B;&EC7V9W<&]R=',@/2!S96QF+G!O4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI+`H@ +M("`@("`@("`@("`@("`@&UA2(Z"B`@("`@("`@("`@(&9W7W!R97)O=71?2(Z"B`@("`@("`@ +M("`@(&9W7W!O2(Z"B`@("`@("`@("`@ +M(&9W7W!O2(Z"B`@("`@("`@ +M("`@(&9W7V]U='!U=%]R=6QE("L]("(@+2UD<&]R="`E2(Z"B`@("`@("`@("`@(&9W +M7V]U='!U=%]R=6QE("L]("(Z(B`K('-E;&8N<&]R='-4;U-T4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI +M+`H@("`@("`@("`@("`@("`@&9F9F9F9F9F("TM +M8W1M87-K(#!X9F9F9F9F9F8B("4*("`@("`@("`@("`@("`@("`@("`@("`@ +M4EP*')U;&5;(FEN=&5R;F%L7VEP +M(ETI+"!S96QF+F=E=$=U97-T27`H*2E=*0H*"F-L87-S($EP5&%B;&5S17AE +M8W5T;W(Z"@H@("`@8V]N9FEG(#T@3F]N90H*("`@(&1E9B!?7VEN:71?7RAS +M96QF+"!C;VYF:62!PR)P&5C=71OR)P&5C +M=71OR)P +M&5C=71O7!E.B`E&5C27!T86)L97,H8V]N9FEG*3H* +M("`@("`@("!L;V=G:6YG+F1E8G5G*")0&5C=71O7,H*3H*("`@("`@("`@("`@ +M97AE8T1A=&%B86&5C27!T +M86)L97,H8V]N9FEG*0H@("`@96QI9B!J&5C27!T86)L97,H +M8V]N9FEG*0H@("`@96QS93H*("`@("`@("!L;V=G:6YG+G=A7!E/25S(B`E("AP6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7)I9VAT(&]W;F5R6]U('5N9&5R('1H +M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C +M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7)I +M9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT +M='`Z+R]W=W&5C=71I;F'!O2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&QO9V=E +M&ET(#(@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)$%F;&%G(B`] +M/2`B,2(@70IT:&5N"B`@861D7W-N870@("1P=6)L:6-)<`H@('5N;&]C:U]E +M>&ET("0_("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1$9FQA9R(@/3T@(C$B +M(%T*=&AE;@H@(')E;6]V95]S870@("1P=6)L:6-)<`H@('5N;&]C:U]E>&ET +M("0_("1L;V-K("1L;V-K960*9FD*"G5N;&]C:U]E>&ET(#$@)&QO8VL@)&QO +M8VME9`H````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````````````;W!T+V-L +M;W5D+V)I;B]V<&-?2!O9B!T:&4@3&EC96YS92!A=`HC"B,@ +M("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE +M($QI8V5N5]T86)L92@I('L*("!L;V-A;"!F5]T86)L92`B +MPH@(&QO8V%L(')U +M;&4])#$*("!L;V-A;"!I<#TD*&5C:&\@)')U;&4@?"!C=70@+60Z("UF,2D* +M("!I9B!;("1I<"`]/2`B4F5V;VME(B!="B`@=&AE;@H@("`@3TD9V%T97=A>2!C:61R/21C +M:61R(@H@(&QO8V%L(&1E=CTD*&=E=$5T:$)Y27`@)&EP*0H@(&EF(%L@)#\@ +M+6=T(#`@70H@('1H96X*("`@(')E='5R;B`Q"B`@9FD*("!S=61O(&EP(')O +M=71E(&%D9"`D8VED3TD9V%T97=A>2!C:61R/21C:61R(@H@ +M(')E='5R;B`D&ET(#(@)&QO8VL@)&QO8VME +M9`H@("`@("`@(#L["B`@97-A8PID;VYE"@II9B!;("UN("(D6EN9R!F=R!R=6QE +M&ET("1S=6-C97-S("1L;V-K("1L;V-K960*```````` +M``````````````````````````````!O<'0O8VQO=60O8FEN+V)A0`````````````````````````````````````````````````` +M````````````````````````````````````````````,#`P,#7)I9VAT(&]W;F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* +M(R`@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI +M8V5N&5C=71A8FQE/2&-E<'1I;VX@86YD('-E;&8N<')O8V5S&5C=71E('-H96QL(&-O;6UA;F0Z("5S +M)R`E('-E;&8N8VUD*0H@("`@("`@("`@("!E2<@:6X@<#H*("`@ +M("`@("`@("`@("`@("`@("`@("`@&-E<'1I;VXH)V-A;FYO="!F:6YD(&)A2!I;B`E&-E<'1I;VXH)V-A;FYO="!F:6YD +M(&AO2P@PH@("`@("`@("`@("`B87!I2V5Y(CH@87!I:V5Y+`H@ +M("`@("`@("`@("`B8V]M;6%N9"(Z("=N;W1I9GE"87)E;65T86Q07,H*2P@4)A3TE2P@5]P2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ +M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&EP=&%B;&5S +M+7-A=F5\9W)E<"`B24Y0550@+6H@3D545T]22U]35$%44R(@/B`O9&5V+VYU +M;&P*("!I9B!;("0_("UE<2`P(%T*("!T:&5N"B`@("`@(')E='5R;B`D/PH@ +M(&9I"B`@:7!T86)L97,@+4X@3D545T]22U]35$%44R`^("]D978O;G5L;`H@ +M(&EP=&%B;&5S("U)($9/4E=!4D0@+6H@3D545T]22U]35$%44R`^("]D978O +M;G5L;`H@(&EP=&%B;&5S("U)($E.4%54("UJ($Y%5%=/4DM?4U1!5%,@/B`O +M9&5V+VYU;&P*("!I<'1A8FQEPH@(&EP=&%B +M;&5S("U,($Y%5%=/4DM?4U1!5%,@+6X@+78@+7@@?"!A=VL@)R0Q('X@+UY; +M,"TY72LD+R![('!R:6YT9B`B)7,Z(BP@)#)])SL@/B`O9&5V+VYU;&P*("!I +M9B!;("UF("]R;V]T+W)E;6]V9616:69S(%T@.R!T:&5N(&EP=&%B;&5S("U: +M($Y%5%=/4DM?4U1!5%,@.R!F:3L@/B`O9&5V+VYU;&P*("`O&ET("0_("1L;V-K("1L +M;V-K960*9FD*"FEF(%L@(B1A9FQA9R(@/3T@(C$B(%T*=&AE;@H@("-A9&1? +M<'5B;&EC7VEN=&5R9F%C92`D<'5B;&EC268*("!U;FQO8VM?97AI="`D/R`D +M;&]C:R`D;&]C:V5D"F9I"@II9B!;("(D9&9L867)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&ET(#$*9FD*"G-E="`M>`IU2(*"FEF(%L@)#\@+65Q(#`@70IT:&5N +M"B`@("!T/6!D871E("LE2(*:68@6R`D/R`M;F4@ +M,"!="B`@('1H96X*("`@("`@*&-R;VYT86(@+6P@.V5C:&\@+64@(B-M;VYI +M=&]R:6YG0V]N9FEG7&Y32$5,3#TO8FEN+V)A2(I('P@8W)O;G1A8B`M"B`@("`@(&QO9V=E2!F;W(@;6]N:71O6]U(&UA>2!N;W0@=7-E('1H:7,@ +M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NWT*("`@(&9OF4G72`]('-T&QE;BD*("`@(&EF("=N=U]T>7!E)R!N;W0@:6X@:7`N:V5Y7!E)UT@/2`G<'5B;&EC)PH@("`@96QS93H* +M("`@("`@("!I<%LG;G=?='EP92==(#T@:7!;)VYW7W1Y<&4G72YL;W=E7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C +M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F +M('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5LP77T*"B`@("`@("`@("`@ +M("`@("!T;T1A=&5686P])"AD871E("UD("(D9&%T979A;"(@(BLE7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z +M+R]W=W0IE:F5C +M="!\?"!T0IS>7-T96UC=&P@7-T96UD+6IO=7)N +M86QD"@I465!%/20H9W)E<"`M4&\@)W1Y<&4]7$M;82UZ02U:72HG("]V87(O +M8V%C:&4O8VQO=60O8VUD;&EN92D*:68@6R`B)%194$4B(#T](")R;W5T97(B +M(%T@?'P@6R`B)%194$4B(#T](")V<&-R;W5T97(B(%T@?'P@6R`B)%194$4B +M(#T](")D:&-P"`O;W!T+V-L;W5D+V)I +M;B]U<&1A=&5?8V]N9FEG+G!Y(%T*("!T:&5N"B`@("`O;W!T+V-L;W5D+V)I +M;B]U<&1A=&5?8V]N9FEG+G!Y(&-M9%]L:6YE+FIS;VX@?'P@=')U90H@(&9I +M"F9I"@I;("$@+68@+W9A7-T96UD+W-S:&0@;65M;W)Y(&QE86L@+2!H='1P7-T96UD+VES7-T +M96UD+75S97(*"B,@16YA8FQE(&%N9"!3=&%R="!34T@*7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R +M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T +M"B,*(R`@(&AT='`Z+R]W=W2!S=&]R86=E('-Y7`])$A94$525DE33U(*("!I9B!; +M("(D:'EP(B`]/2`B=FUW87)E(B!=('Q\(%L@(B1H>7`B(#T](")H>7!E5]H='1P"B`@83)E;FUO9"!H96%D97)S"@H@(&-A="`^+V5T8R]A +M<&%C:&4R+V-OTA45%!3?2`];VX*4F5W7,@"UR97%U97-T960M=VET:"P@0V]N=&5N="U4 +M>7!E+"!O6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I +M="`B4V5T=&EN9R!U<"!);G1E&5C=71E(&EL8G9M('-V8W,B"B`@97AI="`Q"F9I"G-E +M='5P7VEL8G9M"@`````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````!O<'0O8VQO=60O8FEN+W-E='5P+W9P8W)O=71E2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N7-T96T@=FTB"@H@(&EF(%L@+68@ +M+V5T8R]H;W-TB`D1$]-04E.(%T@)B8@ +M1$]-04E./2)C;&]U9&YI;F4N:6YT97)N86PB"B`@(T1.4R!S97)V97(@=VEL +M;"!A<'!E;F0@)$1/34%)3B!T;R!L;V-A;"!Q=65R:65S"B`@6R-=*FQO8V%L/2XJ)"]L;V-A;#U<+R1$3TU!24Y< +M+R\B("]E=&,O9&YS;6%S<2YC;VYF"@H@(&-O;6UA;F0@+78@9&AC<%]R96QE +M87-E(#X@+V1E=B]N=6QL(#(^)C$*("!N;U]D:&-P7W)E;&5A&ET(#$*9FD*2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&EF(%L@(B1(65!%4E9)4T]2(B`A/2`B=FUW87)E(B!=.R!T:&5N +M"B`@("!R971U6YC"B`@2]L;V=R;W1A=&4@+V5T8R]C2`R/B8Q"B`@9FD*?0H*6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ +M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I="`B +M4V5T=&EN9R!U<"!%;&%S=&EC($QO860@0F%L86YC97(@7)I9VAT(&]W;F5R6]U('5N9&5R('1H +M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C +M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7!EPH@(&EF(%L@+60@+W!R;V,O>&5N(%T[('1H96X*("`@ +M(&UO=6YT("UT('AE;F9S(&YO;F4@+W!R;V,O>&5N"B`@("`D*&1M97-G('P@ +M9W)E<"`M<2`B6&5N($A632(I"B`@("!I9B!;("0_("UE<2`P(%T[('1H96X@ +M(",@,3U05BPP/4A630H@("`@("!E8VAO(")X96XM:'9M(B`F)B!R971UF5D(&%S($AY +M<&5R=B!W:&5N(%9IPH@(%L@(2`M9"`O<')O +M8R]X96X@72`F)B!S960@+6D@)W,O7G9C+R-V8R\G("]E=&,O:6YI='1A8B`F +M)B!T96QI;FET('$*("!;("UD("]P +M(W9C+W9C+R<@+V5T8R]I;FET=&%B("8F('1E;&EN:70@<0H*("!S>7-T96UC +M=&P@9&%E;6]N+7)E;&]A9`H*("!C87-E("1(65!%4E9)4T]2(&EN"B`@("`@ +M>&5N+7!V?'AE;BUD;VU5*0H@("`@("`@("`@7-T +M96UC=&P@7-T96UC=&P@9&ES86)L92!N +M='!D"B`@("`@("`@("!S>7-T96UC=&P@96YA8FQE('AE+61A96UO;@H@("`@ +M("`@("`@&5N=&]O;',@;F]T(&EN7Q#3TY&24=? +M2$]44$Q51U]00TE?04-023UY)R`O8F]O="]C;VYF:62`M +M3"`Q,34R,#`@='1Y4S`@=G0Q,#(B("]E=&,O:6YI='1A8@H@("`@("`@("`@ +M7-T96UC=&P@2!C;61L +M:6YE(&9I;&4@9G)O;2!Q96UU+6=U97-T+6%G96YT(@H@("`@("`@("`@("`@ +M(&)R96%K"B`@("`@("`@("`@(&9I"B`@("`@("`@("`@('-L965P(#$*("`@ +M("`@("`@(&1O;F4*("`@("`@("`@(&EF(%L@(2`M7-T96T@=&EM92!S>6YC)V0@=VET:"!H;W-T('9I82!V;7=AF5D +M(&%S('9I7!E7!E +M65S+"!H86-K>2$I"B`@("`@ +M("`@("!D;6ED96-O9&4@?"!G2(*("`@("`@("`@(&9I"B`@("`@("`@("`[.PH@(&5S86,*"B`@ +M(R!&:6YD(&%N9"!E>'!O7-T96UV;2@I('L*("!L;V-A;"!P871C:&9I;&4])#$*("!L;V-A;"!B +M86-K=7!F;VQD97(](B]T;7`O+F-O;F8N8F%C:W5P(@H@(&QO8V%L(&QO9V9I +M;&4](B]V87(O;&]G+W!A=&-H7-T96UV;2]C;VYF+V-L;W5D+FIK7-T96UV;2]C +M;VYF+RH@)&)A8VMU<&9O;&1E7-T96UV;0H@(&5C:&\@(D%L;"(@?"!U;GII<"`D<&%T8VAF:6QE("UD("]U +M&%R +M9W,@8VAM;V0@-34U"B`@:68@6R`M9B`D8F%C:W5P9F]L9&5R+V-L;W5D+FIK +M7-T96UV;2]C;VYF+PH@("`@96-H;R`B4F5S=&]R960@:V5Y +M7-T;W)E"B`@ +M:V5Y=&]O;"`M:6UP;W)T:V5Y7-T;W)E("]E=&,O7-T;W)E("]UU!!5$-(7TU/54Y4?2]A9V5N="YZ:7`@72`F)B!; +M("UF("]V87(O8V%C:&4O8VQO=60O<&%T8V@N7!E/21465!%(B`^/B`D +M;&]G9FEL90H@("`@<&%T8VA?FEP"B`@("!I9B!;("0_("UG="`P(%T*("`@('1H96X*("`@("`@96-H +M;R`B1F%I;&5D('1O(&%P<&QY('!A=&-H('-Y7-T +M96UD+W-Y365M.B][<')I;G0@)#)])RD*("!I9B!;("0H*'!H>7-M +M96TI*2`M;'0@-#`Y-C`P(%T[('1H96X*("`@("`@6YC"B`@'!O7!E&ET(#$P"B`@;&]G7VET(")3=&%R=&EN9R!G=65S="!S97)V:6-E2YS:``````````` +M```````````````````````````````````````````````````````````` +M````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@ +M("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE +M($QI8V5NPH@(&QO9U]I="`B4V5T=&EN9R!U<"!C;VYS +M;VQE('!R;WAY('-Y'D@+V5T8R]I<'1A8FQE'D*```````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````````````````;W!T +M+V-L;W5D+V)I;B]S971U<"]C;VUM;VXN6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5]M86-S*"D@>PH@("`@;6%CS,Z+2(O971C+W5D978OV%D9')E5]M86-S("(D +M3DE#7TU!0U,B"B`@9FD*?0H*PH@(&QO8V%L +M(&EN=&9N=6T])#$*("!L;V-A;"!I<#TD,@H@(&QO8V%L(&UAVEN=&9N=6U]"B`@;&]C86P@8F]O='!R;W1O/2)S=&%T:6,B"@H@(&EF(%L@ +M(B1"3T]44%)/5$\B(#T](")D:&-P(B!="B`@=&AE;@H@("`@:68@6R`B)&EN +M=&9N=6TB("$]("(P(B!="B`@("!T:&5N"B`@("`@("!B;V]T<')O=&\](F1H +M8W`B"B`@("!F:0H@(&9I"@H@(&EF(%L@(B1I<"(@(3T@(C`N,"XP+C`B("UA +M("(D:7`B("$]("(B("UO("(D9F]R8V4B(#T](")F;W)C92(@70H@('1H96X* +M("`@("!E8VAO(")I9F%C92`@)&EN=&8@:6YE="`D8F]O='!R;W1O(B`^/B`O +M971C+VYE='=O7-C=&P@;F5T+FEP +M=C8N8V]N9BYA;&PN9&ES86)L95]I<'8V/3`*("!S>7-C=&P@;F5T+FEP=C8N +M8V]N9BYA;&PN9F]R=V%R9&EN9STQ"B`@7,O;F5T+VEP=C0O:7!?9F]R=V%R9`H@(%L@+68@+V5T +M8R]I<'1A8FQE7,O;F5T+VEP=C0O8V]N9B]D969A=6QT+W)P7V9I;'1E +M<@H@("`@("!F;W(@=FEF(&EN("16249?3$E35#L@9&\*("`@("`@("`@;&]G +M7VET(")C;&]U9#H@9&ES86)L92!R<%]F:6QT97(@;VX@<'5B;&EC(&EN=&5R +M9F%C93H@)'9I9B(*("`@("`@("`@7,O;F5T +M+VEP=C0O8V]N9B]L;R]R<%]F:6QT97(*?0H*96YA8FQE7VER<6)A;&%N8V4H +M*2!["B`@;&]C86P@96YA8FQE9#TD,0H@(&QO8V%L('!R;V,],`H*("!PPH@ +M(&QO8V%L(&5N86)L93TD,0H*("!I9B!;("1E;F%B;&4@+65Q(#`@70H@('1H +M96X*("`@("`@96-H;R`P(#X@+V5T8R]R<'-R9G-E;F%B;&4*("`@("`@#TD*'!R:6YT9B`B)7A<;B(@)&YU;2D*("!E8VAO("1H97@["B`@(V5N +M86)L92!R<',*("!E8VAO("1H97@@/B`O"TP+W)P7,O;F5T+V-OPH@(&EN:71?:6YT97)F86-EB`B)&=W9&5V +M(B!="B`@("!T:&5N"B`@("`@(&=W9&5V/2)E=&@P(@H@("`@9FD*"B`@("!I +M<"!R;W5T92!A9&0@9&5F875L="!V:6$@)$=7(&1E=B`D9W=D978*("!F:0H* +M("`C(%=OW!R:6YT("0Q(BXB)#(B+B(D,R(N,2)])RD*("`@("`@=&EM +M96]U="`S('!I;F<@+6X@+6,@,R`D34=-5%]'5R`F"B`@9FD*"B`@:68@6R`B +M)$A94$525DE33U(B(#T](")V;7=A6YC +M(&5N86)L90H@(&9I"GT*"G-E='5P7V1NB`D1$]-04E.(%T@)B8@1$]-04E./2)C +M;&]U9&YI;F4N:6YT97)N86PB"B`@(W)E;6]V:6YG('1H92!D;G-M87-Q(&UU +M;'1I<&QE(')A;F=E6R-=*FQO8V%L/2XJ +M)"]L;V-A;#U<+R1$3TU!24Y<+R\B("]E=&,O9&YS;6%S<2YC;VYF"B`@9FD* +M"B`@:68@6R`M;B`@(B1$3E-?4T5!4D-(7T]21$52(B!="B`@=&AE;@H@("`@ +M("!S960@+6D@+64@(B]>6R-=*F1H8W`M;W!T:6]N+BH],3$Y+BHD+V0B("]E +M=&,O9&YS;6%S<2YC;VYF"B`@("`@(&5C:&\@(F1H8W`M;W!T:6]N+69O9&AC<"UR86YG95]I<#0]+BHD+V1H8W`M9&AC<"UR86YG95]I<#8]+BHD+V1H8W`M +M6R-=*F1H8W`M;W!T:6]N/6]P=&EO;CIR;W5T97(N*B0O +M9"(@+V5T8R]D;G-M87-Q+F-O;F8*("!;("1$149!54Q47T=7(%T@)B8@96-H +M;R`B9&AC<"UO<'1I;VX];W!T:6]N.G)O=71E6R-=*F1H8W`M;W!T:6]N/6]P=&EO +M;C8Z9&YS+7-EB`B)$542#!?25`V(B!="B`@=&AE;@H@ +M("`@("!E8VAO(#$@/B`O=F%R+V-A8VAE+V-L;W5D+V1N;&5A7-T96UC=&P@9&ES86)L92!A<&%C:&4R"B`@8VQE86Y?:7!A;&EA +M&%M<&QE+F-O;F8*("!R +M;2`M9B`O971C+V%P86-H93(O26YC;'5D92!P;W)T2!0 +M>71H;VX@0W-!<'`@8V]N9FEG7&XC26YC;'5D92!P;W)T&5S +M($UU;'1I5FEE=W,B+R)/<'1I;VYS("U);F1E>&5S($UU;'1I5FEE=W,B+R`O +M971C+V%P86-H93(O;6]D&5S(B`^("]V87(O=W=W+VAT;6PO+FAT86-C97-S +M"GT*"G-E='5P7V%P86-H93(H*2!["B`@;&]G7VET(")3971T:6YG('5P(&%P +M86-H92!W96(@2!A;F0@;F]T('=OPH@('!U8FQI8U]I<#TD151(,E])4`H@(%L@(B1%5$@R7TE0(B`] +M/2`B,"XP+C`N,"(@72`F)B!P=6)L:6-?:7`])$542#%?25`*("!E8VAO("1P +M=6)L:6-?:7`*?0H*PH@("`@;&]G7VET(")3971T:6YG +M('5P($Y44"(*("`@($Y44%]#3TY&7T9)3$4](B]E=&,O;G1P+F-O;F8B"B`@ +M("!I9B!;("UF("1.5%!?0T].1E]&24Q%(%T*("`@('1H96X*("`@("`@("!) +M1E,])RPG(')E860@+6$@R-S97)V97)?;&ES=%M` +M77TM,2`[(&ET97)A=&]R/CTP(#L@:71E2!A<&%C:&4R +M(B`^("]V87(O8V%C:&4O8VQO=60O96YA8FQE9%]S=F-S"B`@(&5C:&\@(F-L +M;W5D(&YFT-(149?5$U0 +M7T9)3$5]"B`@("`@($-/34U!/2(L7&Y<="(*("`@("`@8V%S92`D2T59(&EN +M"B`@("`@("`@9&ES86)L95]R<%]F:6QT97(I"B`@("`@("`@("`@(&5X<&]R +M="!$25-!0DQ%7U)07T9)3%1%4CTD5D%,544*("`@("`@("`@("`@.SL*("`@ +M("`@("!E=&@P:7`I"B`@("`@("`@("`@(&5X<&]R="!%5$@P7TE0/21604Q5 +M10H@("`@("`@("`@("`[.PH@("`@("`@(&5T:#%I<"D*("`@("`@("`@("`@ +M97AP;W)T($542#%?25`])%9!3%5%"B`@("`@("`@("`@(#L["B`@("`@("`@ +M971H,FEP*0H@("`@("`@("`@("!E>'!O'!O'!O'!O'!O'!O'!O'!O +M'!O'!O'!O +MF4I"B`@("`@("`@("`@(&5X<&]R="!'54535%]#24127U-) +M6D4])%9!3%5%"B`@("`@("`@("`@(#L["B`@("`@("`@'!O'!O +M'!O'!OF4@8VQO=60@<&%S2!S"(B(%T*("!T:&5N"B`@("!E8VAO(")R;V]T.B1635]005-35T]21"(@?"!C +M:'!A6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I="`B4V5T=&EN9R!U<"!D:&-P('-E7-T96T@ +M=FTB"B`@2!A;&QO=R!$3E,@&5C=71E(&1H8W!S7)I9VAT(&]W +M;F5R6]U +M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O +M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W +M=WPH@ +M(&5C:&\@(B0H9&%T92D@)$`B(#X^("]V87(O;&]G+V-L;W5D+FQO9PH@(&QO +M9U]A8W1I;VY?;7-G("(D0"(*?0H*<&%T8V@H*2!["B`@;&]C86P@4$%40TA? +M34]53E0]+VUE9&EA+V-D@H@(&QO8V%L('!R:79K97D])%!!5$-( +M7TU/54Y4+V%U=&AOVUD-69I;&5]*0H@("`@;&]C +M86P@;F5W;60U/0H@("`@6R`M9B`D>W!A=&-H9FEL97T@72`F)B!N97=M9#4] +M)"AM9#5S=6T@)'MP871C:&9I;&5]('P@87=K("=[<')I;G0@)#%])RD*"B`@ +M("!L;V=?:70@(E-CW!A=&-H9FEL97T@72`F)B!;("(D;F5W +M;60U(B`A/2`B(B!="B`@("!T:&5N"B`@("`@('1AF8@)'!A=&-H9FEL +M92`M0R`O"B`@("`@(&5C:&\@)'MN97=M9#5](#X@)'MM9#5F:6QE?0H@("`@ +M("!L;V=?:70@(E!A=&-H960@2`OF5D7VME>7,*("`@(&9I"B`@9FD*"B`@&5C=71I;F<@8VQO=60M96%R +M;'DM8V]N9FEG(@H*("`C($-L96%R("]T;7`@9F]R(&9I;&4@;&]C:PH@(')M +M("UF("]T;7`O*BYL;V-K"B`@6]U +M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC +M('=I=&@@=&AE($QI8V5N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&5N2!T;R!E;G-U'D@:6X@=&AE(')O +M=71I;F<@9&]M86EN"G)E8V]N9FEG7VQB*"D@>PH@(&QO9V=E'D@=&\@<')E=FEO=7,@ +M'DN8V9G+F]L9"`O971C+VAA<')O>'DO:&%P +M2YC9F'DN8V9G+FYE=PH@(&9I"GT*"F=E=%]V +M:69?;&ES="@I('L*("!L;V-A;"!V:69?;&ES=#TB(@H@(&9O7,O8VQA7!E(&]R('!A7!E(&]R('!A2!R96-E +M:79E2!F:7)E=V%L;"!R=6QE2!C;VYF:67!E(&]R('!A2!O +M9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI +M8V5N0H*"F1E9B!M +M97)G92AD8F%G+"!D871A*3H*("`@(&1B86=C(#T@8V]P>2YD965P8V]P>2AD +M8F%G*0H*("`@('!R:6YT(&1B86<*("`@('!R:6YT(&1A=&$*("`@(&EF(")V +M<&Y?=7-E7,H*3H*("`@("`@("!I +M9B!U7,H*2!A;F0@;F]T +M(&%D9#H*("`@("`@("`@("`@9&)A9V-;=7-E6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2D*("`@("`@("`@("`@9&%T82YU +M<&1A=&4H>R)I9"(Z('-E;&8N:V5Y?2D*("`@("`@("!F:6YA;&QY.@H@("`@ +M("`@("`@("!S96QF+F1B86<@/2!D871A"@H@("`@9&5F('-A=F4H2D* +M("`@("`@("`@("`@("`@(&IS;VXN9'5M<"@*("`@("`@("`@("`@("`@("`@ +M("!D8F%G+"!?9F@L"B`@("`@("`@("`@("`@("`@("`@&-E<'0@24]%2`](&ME>0H*"F-L87-S('5P9&%T941A=&%"867!E(#T]("=M;VYI=&]R22AS96QF +M+F1B+F=E=$1A=&%"867!E(#T]("=V<&YU7!E(#T]("=I<&%L:6%S +M97,G.@H@("`@("`@("`@("!S96QF+F1B+G-E=$ME>2@G:7!S)RD*("`@("`@ +M("`@("`@7!E*0H@("`@("`@("`@("!R971U +M2=="B`@ +M("`@("`@9'!;)VYI8U]D979?:60G72`](&1;)V1E=FEC92==6S,Z70H@("`@ +M("`@(&1P6R=N=U]T>7!E)UT@/2`G9W5E4AA8VLN=7!D871E7VYE='=OR=I<%]A9&1R97-S)SH@6V1P72P@)W1Y<&4G.B`G +M:7!S)WTI"B`@("`@("`@:68@)V1O;6%I;E]N86UE)R!N;W0@:6X@9"YK97ES +M*"D@;W(@9%LG9&]M86EN7VYA;64G72`]/2`G)SH*("`@("`@("`@("`@9%LG +M9&]M86EN7VYA;64G72`](")C;&]U9&YI;F4N:6YT97)N86PB"@H@("`@("`@ +M(&0@/2!04AA8VLN=7!D871E7VYE='=O2AS96QF+"!D8F%G*3H*("`@("`@("!R971U2`]("=E=&@G("L@;G5M("L@)VEP)PH@("`@("`@(&1P(#T@>WT*("`@("`@ +M("!I9BAK97D@:6X@5T*("`@("`@("`@("`@9'!;)VYE=&UA7!E(#T] +M(")P=6)L:6,B.@H@("`@("`@("`@("`@("`@9'!;)V=A=&5W87DG72`]('-E +M;&8N<49I;&4N9&%T85LG8VUD7VQI;F4G75LG9V%T97=A>2=="B`@("`@("`@ +M("`@(&5L2==(#T@7!E)SH@)VEP +M2!T;R!D96%L('=I=&@@=&AIPH@("`@("`@("`@("`@("`@ +M)V%D9"7!E(#T@7!E(ET*("`@("`@("`@("`@=7!D871E1&%T84)A9RAS96QF*0H@ +M("`@("`@("`@("!R971U&-E<'1I;VX@97)R;W(@)WMEV9I;&5N86UE?22!B965N(&UO=F5D+B(N9F]R;6%T*&5RV9I;&5N86UE?27!E"@H@("`@9&5F(&=E=$1A=&$HB(*("`@("`@("!W:71H(&]P96XH +M;W)I9U!A=&@L("=R8B7,H*2!E;'-E(&1A +M=&%;)W!U8FQI8U]I<"=="@H@("`@("`@(&EN:71I86Q?9&%T82`](&-L5]I<"AI<"P@:6YI=&EA;%]D871A6R=C;VYF +M:62<@:6X@9&)A9ULG8V]N9FEG)UTN +M:V5Y5]I<"AC;',L(&EP+"!P5]I +M<"`]($9A;'-E"B`@("`@("`@:68@:7`@/3T@<')I=F%T95]G871E=V%Y7VEP +M.@H@("`@("`@("`@("!N97=?:7!?;6%T8VAE5]I<`H*("`@($!C;&%S0`````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````,#`P,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL +M92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2!S=&%T=7,*"F9R;VT@8W,N0W-#;VYF:6<@:6UP;W)T($-S +M0V]N9FEG"F9R;VT@;W!T<&%R7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R +M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T +M"B,*(R`@(&AT='`Z+R]W=WB`D,2!="G1H96X*("`@(&5C:&\@(D9A:6P@ +M=&\@9FEN9"!64$X@<&5E7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2`]('9P;ELG=G!N7W-E2!I;B!D +M8F%G+FME>7,H*2!A;F0@;F]T(&]P.@H@("`@("`@(&1E;"AD8F%G6VME>5TI +M"B`@("!E;'-E.@H@("`@("`@(&1B86=;:V5Y72`]('9P;@H@("`@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H +M='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI +M8V5N2`] +M(')O=71E6R=N971W;W)K)UT*("`@("`@("!D8F%G6VME>5T@/2!R;W5T90H@ +M("`@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R +M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T +M"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ +M=&AE($QI8V5N2`]('9P +M;ELG<&5E71H;VX*(R!, +M:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%3 +M1BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS +M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E +M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!F$EN"@H*<&%S&ES=',H9V5T5&]K96Y&:6QE*"DI.@H@("`@("`@('=I=&@@;W!E +M;BAG9714;VME;D9I;&4H*2P@)W(G*2!A2P@=F%L +M=64@/2!L:6YE+G-T7!E(#T@ +M7!E(#T]("=S96YD7VUY7W!A7-L;V7-L;V7-L;V7-L;V2!I +M<"]P87-S=V]R9%LE7-L;V7-L;V&-E<'0@2V5Y8F]A&-E<'1I +M;VXL(&4Z"B`@("`@("`@0`````````````````````````````````` +M`````````````````````````````````````````````````````````#`P +M,#`W-34`,#`P,36]U +M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC +M('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E +M<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NFEP7V9I;&4B"B`@("!E +M8VAO(")$96QE=&EN9R!D:6%G;F]S=&ECFEP7V9I;&4B +M"F5L6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ +M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N0H*"F1E9B!M97)G92AD8F%G+"!D871A*3H*("`@("(B(B!3:6UP;'D@ +M;W9E&ES='-I;F<@8F%G(&%S+"!T:&4@=VAO;&4@8V]N +M9FEG=7)A=&EO;B!I2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N4EP("@I +M>PH@(&QO8V%L(&EP/20Q"B`@9F]R(&1E=B!I;B!@;',@+3$@+W-Y6]U(&UA>2!N;W0@=7-E('1H +M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N +MWT*("`@("`@("!S96QF+F-H86YG960@/2!;70H@("`@("`@('-E +M;&8N9&5V:6YF;R`]($-S2&5L<&5R+F=E=%]D979I8V5?:6YF;R@I"B`@("`@ +M("`@2@I"B`@("`@("`@("`@(&5L2=="B`@("`@ +M("`@("`@('-L:6YE(#T@(F1H8W`M"P@:7`I"B`@("`@("`@("`@('-E;&8N +M8V]N9BYS96%R8V@H2D*("`@("`@("`@("`@ +M96QS93H*("`@("`@("`@("`@("`@(&QI&-E +M<'0@17AC97!T:6]N(&%S(&4Z"B`@("`@("`@("`@(&QO9V=I;F2!C;VYT2!R96-E:79E($1(0U!.04LN"B`@("`@ +M("`@(R!7:&5N(%9-(&ES(&5X<'5N9V5D+"!I=',@86-T:79E(&QE87-E(&%N +M9"!$2$-0+T1.4R!C;VYF:6<@:7,@<')O<&5R;'D@5LG;6%C7V%D9')E5LG9&5F875L=%]G871E=V%Y +M)UT*"B`@("!D968@861D7VAO6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7!E2`]($9A;'-E"B`@("`@("`@ +M9&5V(#T@)R<*("`@("`@("!F;W(@:6YT97)F86-E(&EN(&EN=&5R9F%C97,Z +M"B`@("`@("`@("`@(&EF(&1E=B`]/2!I;G1E&5C=71E*&-O;6UA;F0I"B`@("`@("`@("`@("`@("!I9B!D9795<#H*("`@ +M("`@("`@("`@("`@("`@("!L;V=G:6YG+FEN9F\H(D1E=FEC92`E65T+"!L970G +M5]I9E]N965D960H"B`@ +M("`@("`@("`@("`@("`B)7,O)7,B("4@*'-E;&8N0U-?5$5-4$Q!5$537T1) +M4BP@5]I9E]N965D960H"B`@("`@("`@("`@("(E +M&5C("1$045-3TX[+RTM97AE8R`D1$%%34].("TM("TM=G)R<#LO9R(@+V5T +M8R]I;FET+F0O:V5E<&%L:79E9"R(L(")] +M(BP@R(L(")](BP@6PH@("`@("`@("`@("`@("`@("`@ +M("`@(DE0=C1?861D&5C=71E*")R;2`M2`S,"!S96-O;F1S"B`@("`@("`@:&5A&ET:6YG +M(B`E("AE&5C=71E +M*"(E&PR='!D +M(BP@(G-T;W`B*0H@("`@("`@($-S2&5L<&5R+G-E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I +M<"@I*2YS=&]P*"D*"B`@("`@("`@&5C=71E*&-M9#(I"B`@("`@("`@("`@(&1E=B`] +M(&EN=&5R9F%C92YG971?9&5V:6-E*"D*"B`@("`@("`@8VUD(#T@(B5S("U# +M("5S(B`E("AS96QF+D-/3DY44D%#2T1?0DE.+"!S96QF+D-/3DY44D%#2T1? +M0T].1BD*("`@("`@("!#&5C=71E*"(E&PR='!D(BP@(G-T;W`B*0H*("`@ +M("`@("!I;G1E&5C=71E*&-M9"D*("`@("`@("`@("`@("`@(&QO9V=I +M;F2D*("`@("`@("`@ +M("`@("`@(&5X8V5P="!%>&-E<'1I;VXZ"B`@("`@("`@("`@("`@("`@("`@ +M;&]G9VEN9RYE&5C=71E*"(E&5C=71E*"(E&PR='!D(BP@(G)E +M2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@("`@ +M("`@("!I9B!G871E=V%Y.@H@("`@("`@("`@("`@("`@("`@(')O=71E+F%D +M9%]R;W5T92AD978L(&=A=&5W87DI"@H@("`@("`@("`@("`C(%1H92!F:7)S +M="!P=6)L:6,@:6YT97)F86-E(&AA&5C=71E +M*")A2!C;VYN=')A8VMD"B`@("`@("`@(B(B"B`@("`@("`@ +M;&EN97,@/2!;70H@("`@("`@(&QI;F5S+F%P<&5N9"@B7'1<=%QT25!V-%]A +M9&1R97-S("5S7&XB("4@(C$R-RXP+C`N,2(I"B`@("`@("`@;&EN97,N87!P +M96YD*")<=%QT7'1)4'8T7V%D9')E7!E(&%N9"!D96-I9&5S(&EF(&ET(&ES(&%N(&EN=&5R +M;F%L(&%D9')E0H@("`@("`@(%1H92!N97<@8V]D92!A +M;'-O(&=I=F5S('1H92!P;W-S:6)I;&ET>2!T;R!C;&]U9'-T86-K('1O(&AA +M=F4@82!H>6)R:60@9&5V:6-E"B`@("`@("`@=&AA="!C;W5L9"!F=6YC=&EO +M;B!A2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N +M;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B971H,2)]"@I3 +M5$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S:"`M8R`@)VEF +M(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@96QS92!E8VAO +M(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@(")V<&-R;W5T +M97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@6R`D,"`]/2!< +M(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ"B`@("`@("`@ +M("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@("`@("`@(&-M +M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U +M8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@("`@("`@;&]G +M9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S(B`E('-T871E +M7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X96-U=&4H7!E*"E=(&%N9"!S=&%T92`]/2`B +M34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE8W5T92AC;60I +M"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@("`@("`@(&5X +M96-U=&4H8VUD*0H*"F1E9B!I&5C=71E*")M;W5N="!T +M;7!F6XH=F%L*3H*("`@(&EF('9A;#H*("`@("`@("!R +M971U&5C=71E*")I<"!A9&1R('-H;W<@?&=R97`@+78@ +MWT*("`@("`@("`@("`@=&];)VEP)UT@ +M/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A;'-;+3%="B`@ +M("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@("(B(@H@("`@ +M9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G*")3879I;F<@ +M:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C=71E*")S>7-T +M96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I;F7-T96UC=&P@&5C=71E*")K:6QL("U(55`@)7,B +M("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D;G-M87-Q(BP@ +M(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O0`````````````````````````````````````````````` +M`````````````````````````````````````````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E +M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI +M8V5N'1D;G,H*3H*("`@("`@("`@("`@9&YS+F%P<&5N9"AS +M96QF+F1A=&%;)W)O=71E2==(#T@=F%L"@H@("`@9&5F(&=E=%]N971M87-K*'-E;&8I.@H@ +M("`@("`@(",@5V4@;F5E9"!T;R!F:7@@:70@<')O<&5R;'DN($D@:G5S="!A +M9&1E9"!T:&4@:68L(&%S($EA;B!D:60@:6X@&-E<'1I;VXN"B`@("`@("`@:68@)W)O=71E6]U +M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC +M('=I=&@@=&AE($QI8V5N"YS=')I +M<"@I(&9O2!A +M9'9A;F-E9"(L("TQ*0H@("`@("`@(&-R;VXN8V]M;6ET*"D*"B`@("!D968@ +M&-L=61E9%]H96%L=&A?8VAE8VMS(ET*("`@("`@("`@("`@:&-? +M9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K0`````````` +M```````````````````````````````````````````````````````````` +M`````````````````````#`P,#`W-34`,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N7,H*3H*("`@("`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@ +M("`@(R!P2!P&ES=',Z(')U;&4])7,@=&%B;&4])7,B+"!F=ULR72P@;F5W7W)U;&4N +M9V5T7W1A8FQE*"DI"B`@("`@("`@("`@(&5L2`](&9W6S)="B`@("`@("`@("`@("`@("!I9B!F=ULQ72`]/2`B9G)O;G0B +M.@H@("`@("`@("`@("`@("`@("`@(&-P>2`](&-P>2YR97!L86-E*"2DI"B`@("`@("`@("`@("`@("`C(%1H97)E(&%R92!S;VUE +M(&ES3H*("`@("`@("`@ +M("`@=&%B;&4@/2`G)PH@("`@("`@("`@("!F;W(@:2!I;B!O<&5N*"(O971C +M+VEP=&%B;&5S+VEP=&%B;&5S+25S(B`E('1Y<&4I.@H@("`@("`@("`@("`@ +M("`@:68@:2YS=&%R='-W:71H*""`]/2!R=6QE70H* +M"F-L87-S($-S3F5T9FEL=&5R*&]B:F5C="DZ"@H@("`@9&5F(%]?:6YI=%]? +M*'-E;&8I.@H@("`@("`@('-E;&8N7!E)RP@)RTM0`````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```P,#`P-S4U`#`P,#$W-3``,#`P,32!O9B!T:&4@3&EC96YS92!A=`HC"B,@ +M:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&ES=',L(&5L5]P87)A;2D*("`@("`@("!E;'-E +M.@H@("`@("`@("`@("!L;V=G:6YG+FEN9F\H(D%D9&EN9R!R;W5T93H@9&5V +M("(@*R!D978@*R`B('1A8FQE.B`B("L*("`@("`@("`@("`@("`@("`@("`@ +M("`@('1A8FQE("L@(B!N971W;W)K.B`B("L@861D2!P87)A;65T97(@5]P87)A;2D*("`@("`@("!E;'-E.@H@("`@("`@ +M("`@("!L;V=G:6YG+FEN9F\H(D%D9&EN9R!R;W5T93H@9&5V("(@*R!D978@ +M*R`B('1A8FQE.B`B("L*("`@("`@("`@("`@("`@("`@("`@("`@('1A8FQE +M("L@(B!N971W;W)K.B`B("L@861D2DZ"B`@("`@("`@(B(B("!!9&0@82!D969A=6QT(')O=71E"B`@("`@("`@ +M.G!A&-E<'1I;VXH(D=A=&5W87D@8V%N;F]T(&)E($YO;F4N(BD*"B`@ +M("`@("`@:68@0H@("`@("`@("`@("!L;V=G +M:6YG+FEN9F\H(D%D9&EN9R!D969A=6QT(')O=71E(BD*("`@("`@("`@("`@ +M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI +M86YC90HC('=I=&@@=&AE($QI8V5N0`````````````````````` +M```````````````````````````````````````````````````````````` +M`````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI +M86YC90HC('=I=&@@=&AE($QI8V5N'DO:&%P2YC9F'DO:&%P2YC9F2@I"B`@("`@("`@9F]R('@@:6X@8V]N9FEG.@H@("`@("`@("`@("!; +M9FEL93$N87!P96YD*'2A(05!23UA97T-/ +M3D9?5"P@2$%04D]865]#3TY&7U`I"@H@("`@("`@("`@("!P2!O9B!T:&4@3&EC96YS92!A=`HC +M"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG +M971?='EP92@I"B`@("`@("`@5]I9E]N965D960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L +M"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE +M,B]S:71E2DI"B`@("`@("`@("`@(&9I;&4N&5C=71E,B@B7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2AS96QF*3H*("`@("`@("!S96QF+F-O;F9I9R`](%M="B`@("`@("`@ +M"P@;&EN +M92!I;B!E;G5M97)A=&4H%T@/2!R97!L86-E("L@ +M(EQN(@H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!S96%R8V@H"P@;&EN92!I;B!E;G5M97)A=&4H +M"P@;&EN92!I;B!E;G5M97)A=&4H +M2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N0`````````````````````````````````````` +M````````````````````````````````````````````````````````,#`P +M,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N"`](&EN="@G)RYJ;VEN*%MD:6=I="!F;W(@9&EG:70@:6X@9&5V:6-E(&EF +M(&1I9VET+FES9&EG:70H*5TI*0H@("`@("`@("`@("`@("`@:68@9&5V:6-E +M7W-U9F9I>"`\(&QO=V5S=%]D979I8V4Z"B`@("`@("`@("`@("`@("`@("`@ +M;&]W97-T7V1E=FEC92`](&1E=FEC95]S=69F:7@*("`@("`@("`@("`@("`@ +M("`@("!G=65S=%]I;G1E5]C:61R*'-E;&8I.@H@("`@("`@ +M(')E='5R;B`B)7,O)7,B("4@*'-E;&8N9V5T7V=A=&5W87DH*2P@F4@:6X@8FETF4B +M*0H*("`@(&1E9B!G971?9&5V:6-E*'-E;&8I.@H@("`@("`@(')E='5R;B!S +M96QF+F=E=%]A='1R*")D979I8V4B*0H*("`@(&1E9B!G971?8VED7!E)UT@:6X@5E)24%]465!% +M4SH*("`@("`@("`@("`@7!E)UT@:6X@6R=G=65S="==.@H@("`@("`@("`@ +M("!R971U7!E)UT@:6X@6R=P=6)L +M:6,G73H*("`@("`@("`@("`@7-T +M96T*("`@("`@("`B(B(*("`@("`@("!S96QF+F1E=FQIWT*("`@("`@("!S96QF+F%D +M9')E7!E*"D@ +M:6X@6R)P=6)L:6,B72!A;F0@861D2)= +M*0H@("`@("`@("`@("`@("`@&UA7!E)UT*("`@("`@("!R971U&9F9F9F9F9F(ETI"@H@("`@("`@('-E;&8N9G7!E*"D@ +M:6X@6R)P=6)L:6,B73H*("`@("`@("`@("`@7!E*"D@:6X@ +M6R)P=6)L:6,B73H*("`@("`@("`@("`@#4R-"\P>&9F +M9F9F9F9F(B`E("AS96QF+F1E=BP@2)=(&%N9"!S96QF+F%D9')E2)=(&%N9"!S96QF+F%D9')E7!E*"D@:6X@6R)P +M=6)L:6,B72!A;F0@*&YO="!S96QF+F-O;F9I9RYI2!T +M:&4@;6%S=&5R(&)A8VMU<"!F=6YC=&EO;G,*("`@("`@("`@("`@("`@(&EF +M(&YO="!C;61L:6YE+FES7W)E9'5N9&%N="@I.@H@("`@("`@("`@("`@("`@ +M("`@(&EF(&UE=&AO9"`]/2`B861D(CH*("`@("`@("`@("`@("`@("`@("`@ +M("`@0W-087-S=V13=F,HWT*("`@("`@("!C +M;60@/2`H(FEP(&%D9'(@2!K965P86QI +M=F5D(&]R(&YO=`H@("`@("`@("(B(@H@("`@("`@(&EF(")N=U]T>7!E(B!I +M;B!S96QF+F%D9')E2==*0H@ +M("`@("`@(&EF(&YO="!S96QF+F-L+FES7W)E9'5N9&%N="@I(&%N9"`H;F]T +M('-E;&8N861D2==(&]R('-E;&8N861D2==(#T](").;VYE(BDZ"B`@("`@("`@("`@(&-M9"`](")A2!H87!P96X@8G5T(&1I9"`Z*0H@("`@ +M("`@(",@270@;65A;G,@86X@87!A8VAE(&9I;&4@9V]T(&]R<&AA;F5D(&%F +M=&5R(&$@9W5E2@I"@H@("`@9&5F +M(&ES7V=U97-T7V=A=&5W87DH7,O;F5T+V-O7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ +M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E +M(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O +M'!R97-S(&]R(&EM<&QI960N("!3 +M964@=&AE($QI8V5N"(I.@H@("`@("`@("`@("!I=&5M&5C +M=71E*")K:6QL("TY("5S(B`E('!I9"D*"B`@("!D968@9W)E<"AS96QF+"!S +M='(I.@H@("`@("`@(&9O"(I.@H@("`@("`@("`@("!I9B!I+F9I;F0H7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C +M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F +M('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L +M:6-A8FQE(&QA=R!O'!R97-S(&]R +M(&EM<&QI960N("!3964@=&AE($QI8V5N2!O +M9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI +M8V5NWT*("`@("`@("!S96QF+F1B(#T@1&%T +M84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF+F1B+G-A=F4HWT*("`@("`@ +M("!R971U&1I9V5S="@I"@H@("`@9&5F(&=E=%]G871E=V%Y +M*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I;B!S96QF+FED871A*"DZ +M"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A*"E;)V=A=&5W87DG70H@ +M("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G971?=7-E7V5X=%]D;G,H +M'1D;G,G +M70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G971?861V97)T7VEN +M="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN="<@:6X@0`````````````````````````````````````````````````````````` +M````````````````````````````````````````,#`P,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7!E&5C=71E*&-M9"D*("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")! +M9&1E9"!R=6QE("5S(&9O0`````````````````````````````````````````````` +M````````````````````````````````````````````````````````,#`P +M,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET*#(I +M"B`@("!F;W(@;W!T+"!A7,N97AI +M="@R*0H*("`@(&9O&ES=',H9&%T869I;&4I.@H@("`@("`@(&]S +M+G)E;6]V92AD871A9FEL92D*"@ID968@8W)E871E9FEL92AI<"P@9F]L9&5R +M+"!F:6QE+"!D871A*3H*("`@(&1E3H* +M("`@("`@("`@("`@;W,N;6%K961I2!E>&ES=',L('=E(&1O(&ET('1H:7,@=V%Y +M(&9O0H@("`@("`@("`@("!I9B!E+F5R&ET*#$I"B`@("`@("`@ +M:68@;W,N<&%T:"YE>&ES=',H;65T86UA;FEF97-T*3H*("`@("`@("`@("`@ +M9F@@/2!O<&5N*&UE=&%M86YI9F5S="P@(G(K82(I"B`@("`@("`@("`@(&5X +M9FQO8VLH9F@I"B`@("`@("`@("`@(&EF(&9I;&4@;F]T(&EN(&9H+G)E860H +M*3H*("`@("`@("`@("`@("`@(&9H+G=R:71E*&9I;&4@*R`G7&XG*0H@("`@ +M("`@("`@("!U;F9L;V-K*&9H*0H@("`@("`@("`@("!F:"YC;&]S92@I"B`@ +M("`@("`@96QS93H*("`@("`@("`@("`@9F@@/2!O<&5N*&UE=&%M86YI9F5S +M="P@(G&9L;V-K*&9H*0H@("`@("`@("`@("!F +M:"YW&9L;V-K*&9H*0H@("`@9F@N +M=W)I=&4H96YT3H*("`@("`@("!F +M;&]C:RAF:6QE+"!,3T-+7T58*0H@("`@97AC97!T($E/17)R;W(@87,@93H* +M("`@("`@("!P71H;VX*(R!,:6-E;G-E9"!T +M;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@ +M;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* +M(R`@(&AT='`Z+R]W=WFEP9FEL90H*"B,@0W)E871E('II<"!A +MFEP +M7V9I;&5S*&9I;&5S*3H*("`@(&9,:7-T(#T@9FEL97,*("`@(&-O;7!R97-S +M:6]N(#T@>FEP9FEL92Y:25!?1$5&3$%4140*("`@('1I;65?&5C=71E7W-H96QL7W-C3H*("`@("`@("`@ +M("`@("`@("`@("!Z9BYW3H*("`@("`@("!C;&5A;G5P*&9I;&5S7V9R;VU?F8N8VQO&5C=71E7W-H96QL +M7W-C&-E<'0@3U-%#H*("`@("`@("`@("`@9&5L971E7W1M<%]F:6QE7V-M9"`]("=R +M;2`M9B`E3H*("`@("`@("`@("`@9BYC;&]S92@I"B`@("!R971U"YS<&QI +M="AC;60I+"!S=&1E&-E<'0@3U-%&5C=71E(&)A'0H +M>FEP7V9I;&4L(&9I;&5S7V9O=6YD+"!F:6QE"YS<&QI="AC;&5A;G5P7V-M9"DI"@H* +M:68@7U]N86UE7U\@/3T@)U]?;6%I;E]?)SH*("`@(&9I;&5,:7-T(#T@7)I9VAT(&]W +M;F5R6]U +M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O +M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W +M=WW!R +M:6YT("0R.WTG('P@6]U(&UA>2!N +M;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@ +M=&AE($QI8V5N2!T;R!E;G-U2!T;R!I=',@<')E=FEO +M=7,@'D@=&\@<')E=FEO=7,@'DN8V9G+F]L9"`O971C+VAA<')O>'DO:&%P2YC9F'DN8V9G+FYE=PH@(&9I"GT*"@IL;V=G97(@+70@8VQO=60@(B0H8F%S +M96YA;64@)#`I.B!%;G1E'D*'D@2P@8V]N9FEG=7)I +M;F<@9FER97=A;&PB"@HC(&EP=&%B;&5S(&5N=')Y('1O(&5N'D@2`D861D961)<',@ +M)')E;6]V961)<',@)'-T871S27`*"FEF(%L@)#\@+6=T(#`@70IT:&5N"B`@ +M;&]G9V5R("UT(&-L;W5D(")&86EL960@=&\@87!P;'D@9FER97=A;&P@'D@8V]N9FEG(@H@(",@4F5S=&]R92!T:&4@3$(*("!R97-T;W)E7VQB +M"@H@(&QO9V=E&ET(#$@)&QO8VL@)&QO8VME +M9`IE;'-E"B`@(R!296UO=F4@8F%C:V5D=7`@:7!T86)L92!R=6QE6]U(&UA>2!N;W0@=7-E('1H:7,@ +M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E +M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI +M8V5N7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z +M+R]W=WPH@('-U9&\@:7!T86)L97,@+70@;6%N9VQE("U$(%!215)/ +M551)3D<@+6D@)&1E=B`M;2!S=&%T92`M+7-T871E($Y%5R`M:B!#3TY.34%2 +M2R`M+7-E="UM87)K("1T86)L94YO(#(^+V1E=B]N=6QL"@H@('-U9&\@:7`@ +MV1E=CHS?2DI"G1A8FQE3F%M93TB5&%B +M;&5?)&1E=B(*"FEF(%L@)&%C=&EO;B`]/2`G861D)R!="G1H96X*("!P;'5G +M7VYI8PIE;'-E"B`@=6YP;'5G7VYI8PIF:0H````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````&]P="]C;&]U9"]B:6XO:7!S96-T=6YN96PN6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC +M90HC('=I=&@@=&AE($QI8V5N#4R-2(*=G!N:6YM87)K/2(P>#4R-"(*"G5S86=E*"D@>PH@("`@<')I;G1F +M(")5'0@ +M:&]P/B`M3X@+6D@/&EK92!P;VQI +M8WD^("UT(#QI:V4@;&EF971I;64^("U4(#QEPH@('-U9&\@:7!T86)L97,MPH@(&1I2!<"B`@("!P:&%S93(@<&]L:6-Y +M/21ER1R:6=H=&YE='-](B`^/B`D=G!N8V]N +M9F9I;&4@)B8*("!S=61O(&5C:&\@(B`@='EP93UT=6YN96PB(#X^("1V<&YC +M;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!A=71H8GD]VEK96QI9F5T:6UE?7,B(#X^("1V<&YC;VYF9FEL92`F)@H@ +M('-U9&\@96-H;R`B("!E2(@/CX@)'9P;F-O;F9F:6QE +M("8F"B`@2!F;W(@'1H;W`](B1/4%1!4D&ET("1R970*```````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````;W!T+V-L;W5D+V)I;B]I<&%S2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&QO8V%L('!U8DEP +M/20H96-H;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?22!E>&ES +M=',B"GT*"F%D9%]V<&Y?8VAA:6Y?9F]R7VEP("@I('L*("!L;V-A;"!P=6)) +M<#TD*&5C:&\@)#$@?"!A=VL@+48G+R<@)WMPPH@(&QO8V%L('!U8DEP/20H96-H;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?2PH@(&QO8V%L +M('!U8DEP/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R +M:6YT("0Q?2W!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)A +MW!R:6YT("0R?2W!R:6YT("0R +M?25]R;W5T97-?9G)O;5]M86EN("1T86)L94YA;64*(R!.3U1%.B!T:&ES +M("!E;G1R>2!W:6QL(&)E(&1E;&5T960@:68@=&AE(&EN=&5R9F%C92!IW!R:6YT +M("0Q?2PH@(&EF(%L@(B1S9FQA9R(@/3T@(C`B +M(%T*("!T:&5N"B`@("!R971UW!R +M:6YT("0Q?2W!R:6YT("0R?22!I<"!I;F9O(&EN=&\@9FEL92P@ +M=7-E9"!O;B!R961U;F1A;G0@W!R:6YT("0Q?2&ES +M=&EN9TEP36%S:STD*'-U9&\@:7`@861DPH@(&QO8V%L('!U8DEP/20Q +M"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP +M/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)A&ES=&EN9TEP36%S:STD*'-U9&\@:7`@861DPH@("`@(V5N86)L92!R<',@ +M86YD(')F%QN(B`D;G5M*0H@("`@("`@("`@96-H +M;R`D:&5X.PH@("`@("`@("`@(V5N86)L92!R<',*("`@("`@("`@(&5C:&\@ +M)&AE>"`^("]S>7,O8VQA&ET +M("0_("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1!9FQA9R(@/3T@(C$B(%T* +M=&AE;@H@(&%D9%]A;E]I<"`@)'!U8FQI8TEP("`F)@H@(&%D9%]F=U]C:&%I +M;E]F;W)?:7`@)'!U8FQI8TEP"B`@=6YL;V-K7V5X:70@)#\@)&QO8VL@)&QO +M8VME9`IF:0H*:68@6R`B)&9F;&%G(B`]/2`B,2(@72`F)B!;("(D1&9L86&ET("0_("1L;V-K("1L;V-K960* +M9FD*"G5N;&]C:U]E>&ET(#`@)&QO8VL@)&QO8VME9`H````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````!O<'0O8VQO=60O8FEN+VQI;F5?961I="YP>0`````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````,#`P,#2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2UL:6YE(&5D:71I;F<@;V8@8V]N9FEG=7)A=&EO;B!F +M:6QE&%M<&QE('1H97)E)W,@82!D;W5B;&4@97-C87!E(&]F('1H92!B86-K2!M +M871C:&5D(&%L;"!F:6QE3H* +M("`@("XN+B`@(&]S+G5N;&EN:R@G9&]C=&5S="UV:&]S=',N8V]N9B55N=7-E9$QO8V%L"B`@ +M("`@("`@("`@('-T870@/2!.;VYE"B`@("`@("`@("`@('=I=&@@;W!E;BAS +M96QF+F9I;&5N86UE+"`G&-E<'1I;VXH +M(DUA9&4@=&]O(&UA;GD@961I=',B*0H@("`@("`@("`@("`@("`@("`@("`@ +M("`@("`@96QI9B!R96UA:6YI;F=?8V]U;G0@/3T@,#H*("`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@("`@("`@ +M("`@("`@("!C:&%N9V5D7VQI;F4L('-U8G,@/2!E9&ET+G!A='1E2AS96QF+F9I;&5N86UE+"!B86-K=7!?9FEL96YA;64I"B`@("`@("`@("`@ +M("`@("!O3H*("`@("`@("`@("`@:68@8VAA;F=E +M9%]F:6QE(&ES(&YO="!.;VYE.B`@("`@("`@("`@("`@("`@("`@("`@("`@ +M("`@("`C(&9A:6QE9"P@8VQE86X@=7`*("`@("`@("`@("`@("`@(&-H86YG +M961?9FEL92YC;&]S92@I"B`@("`@("`@("`@("`@("!O6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC +M90HC('=I=&@@=&AE($QI8V5N2!R=6QE2!O9B!T:&4@3&EC96YS92!A +M=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O +M'!R97-S(&]R(&EM<&QI960N("!3 +M964@=&AE($QI8V5N7,I.@H*("`@(&5X:7-T:6YG7VME>7,@/2!;70H@ +M("`@;F5W7V5T:%]K97D@/2!.;VYE"@H@("`@9F]R(&LQ+"!V,2!I;B!G=65S +M=&YE=%]D:6-T+FET97)I=&5M7,@ +M86YD(&QE;BAV,2D@/B`P.@H@("`@("`@("`@("!E>&ES=&EN9U]K97ES+F%P +M<&5N9"AK,2D*"B`@("!I9B!N;W0@97AI2`Z.B!296UO=FEN9R!G=65S="!N971W;W)K +M+BXN(BD*("`@("`@("!R971U2!T;R!B92!S +M971U<`H@("`@)R2!C;VYF:6=U&ES=',@/2!&86QS90H*("`@(&9O2!P2!C;VYF:6=U2`Z.B!02`Z.B!.;R!'=65S=$YE='=O7,N87)G +M=ELQ72D*("`@('!R;V-E7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=WPH@(&QO8V%L(%]P +M:60])"AP:61O9B!D;G-M87-Q*0H@(&9OW!R:6YT("0R?20H@(&EF(%L@)&EP +M=C0@70H@('1H96X*("`@(&5C:&\@(C`@)&UA8R`D:7!V-"`D:&]S="`J(B`^ +M/B`D1$A#4%],14%315,*("!F:0H@(&EF(%L@)&EP=C8@70H@('1H96X*("`@ +M(&5C:&\@(C`@)&1U:60@)&EP=C8@)&AO6]U(&UA>2!N +M;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@ +M=&AE($QI8V5N&-E<'0@3U-%6]U&-E<'1I;VX@;V-C=7)R960Z("5S(B`E(&4*("`@("`@("`@ +M("`@7!E(#T]("=T0`````````````` +M```````````````````````````````````````````````````````````` +M`````````````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ +M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&-L=61E9%]H96%L=&A?8VAE +M8VMS(ET@/2!D871A6R)E>&-L=61E9%]H96%L=&A?8VAE8VMS(ET*("`@(&EF +M(")H96%L=&A?8VAE8VMS7V-O;F9I9R(@:6X@9&%T83H*("`@("`@("!D8F%G +M6R)H96%L=&A?8VAE8VMS7V-O;F9I9R)=(#T@9&%T85LB:&5A;'1H7V-H96-K +M7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z +M+R]W=WW!R:6YT("0Q?2<*?0H* +M:7!T86)L97-?*"D@>PH@("!L;V-A;"!O<#TD,0H@("!L;V-A;"!P=6)L:6-? +M:7`])#(*("`@;&]C86P@:7-?=G!C/69A;'-E"B`@(&QO8V%L(&9O7-T96UC=&P@:7,M86-T +M:79E(&EPS$N+C5]"B`@("!D;PH@("`@("!L;V=G97(@+70@8VQO +M=60@(B0H8F%S96YA;64@)#`I.B!W86ET:6YG(&EP7-T96UC=&P@:7,M86-T:79E(&EP7-T96UC=&P@:7,M86-T:79E(&EP7-T96UC=&P@&PR='!D"B`@("`@("`@("`@("`@("`@("`@2`Z(%!32R!<(B1I<'-E8U]P +M&PR +M='!D"@H@("!I<'1A8FQEPH@("!L;V-A;"!P=6)L:6-?:7`])#$*"B`@(&EPPH@("!L;V-A;"!U/20Q"B`@(&QO +M8V%L('!A)'4@7"H@7"(D +M<&%S&ET(#(*"0D[.PH@(&5S86,*9&]N90H*:68@6R`B)&1E +M=B(@/3T@(B(@70IT:&5N"B`@("!D978](F5T:#(B"F9I"@II9B!;("(D8VED +M&ET(#(*6R`B)&-R96%T92(@/3T@(C$B(%T@)B8@6R`B)&QF;&%G +M)'!F;&%G)')F;&%G)'-F;&%G(B`A/2`B,3$Q,2(@72`F)B!U&ET(#(*"FEF(%L@(B1CW!R:6YT("0Q?27)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS +M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E +M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,@/2!;)V5T:#$G+"`G971H,B6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2!O9B!T:&4@ +M3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A +M8FQE(&QA=R!O2!O9B!T:&4@9&YS;6%S<2!F:6QE+@IC<"`B)$1( +M0U!?0T].1DE'7TU!24XB("`B)$1(0U!?0T].1DE'7TU!24Y?0D%+(@IC<"`B +M)$1(0U!?0T].1DE'(B`B)$1(0U!?0T].1DE'7T)!2R(*"B-E;7!T>2!T:&4@ +M8V]N9FEG(&9I;&4*96-H;R`^("1$2$-07T-/3D9)1PH*=F%R/2(D,2(*9&AC +M<%]R86YG93TB(@ID:&-P7V=A=&5W87D](B(*9&AC<%]N971M87-K/2(B"F1N +M'1?9&YS/20H96-H +M;R`B)$--1$Q)3D4B('P@9W)E<"`M;R`B=7-E97AT9&YS/71R=64B*0IW:&EL +M92!;("UN("(D=F%R(B!="F1O"B!V87(Q/20H96-H;R`D=F%R('P@8W5T("UF +M,2`M9"`B+2(I"B!R;W5T97)I<#TD*"!E8VAO("1V87(Q('P@8W5T("UF,2`M +M9"`B.B(@*0H@9V%T97=A>3TD*&5C:&\@)'9AV1H8W!?V1H8W!?;F5T;6%S:WTB)V1H8W`M;W!T:6]N/71A9SIR86YG +M92W9A +MVQO9WTB8&=R97`@(EYD:&-P+6]P=&EO;CTV(B`B)$1(0U!?0T].1DE'7TU! +M24XB8")<;B(*;&]G/2(D>VQO9WTB8&=R97`@(EYD:&-P+6]P=&EO;CUO<'1I +M;VXZVQO +M9WTB8&=R97`@(EYD:&-P+7)A;F=E/2(@(B1$2$-07T-/3D9)1U]-04E.(F`B +M7&XB"@II9B!;("(D;&]G(B`A/2`G7&Y<;EQN)R!="G1H96X*("-#;&5A;FEN +M9R!T:&4@97AI9&AC<"UR86YG93TO9"<@(B1$2$-07T-/3D9)1U]-04E.(@IF:0H*(W=R +M=&EN9R!T:&4@;F5W(&-O;F9I9R!I;G1O('1H92!C;VYF:6<@9FEL92X*96-H +M;R`M92`B)&1H8W!?&ET("1R +M97-U;'0@)&QO8VL@)&QO8VME9`H````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````````````````````!O +M<'0O8VQO=60O8FEN+V-S7V1H8W`N<'D````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7,@/2!S970H*0H@("`@("`@(&9O2`A/2`G +M:60G(&%N9"!E;G1R>5LG;6%C7V%D9')E7,N861D*&ME>2D* +M("`@("`@("`@("`@("`@(&)R96%K"@H@("`@("`@(&EF(&1A=&%;)W)E;6]V +M92==(&%N9"!K97D@;F]T(&EN(')E;6]V95]K97ES.@H@("`@("`@("`@("!R +M96UO=F5?:V5Y2!I +M;B!R96UO=F5?:V5Y5TI"@H@("`@("`@(&1B86=;9&%T85LG:7!V-%]A9&1R97-S)UU=(#T@9&%T +M80H*("`@(')E='5R;B!D8F%G"@```&]P="]C;&]U9"]B:6XO8W-?8VUD;&EN +M92YP>0`````````````````````````````````````````````````````` +M```````````````````````````````````````````P,#`P-S4U`#`P,#$W +M-3``,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ +M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E +M(&%T"B,*(R`@(&AT='`Z+R]W=W2!O9B!T:&4@ +M3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A +M8FQE(&QA=R!O'!R97-S(&]R(&EM +M<&QI960N("!3964@=&AE($QI8V5N'DN8V9G("]E=&,O:&%P2]H87!R;WAY+F-F9RYO;&0*"B`@;78@)&YE +M=U]C;VYF:6<@+V5T8R]H87!R;WAY+VAA<')O>'DN8V9G"B`@:68@:&%P2`M<"`O=F%R+W)U;B]H87!R;WAY+G!I9"`M9B`O971C+VAA<')O>'DO:&%P +M2YC9F<@+7-F("0H8V%T("]V87(O'DN<&ED*3L@=&AE +M;@H@("`@;&]G9V5R("UT(&-L;W5D(").97<@:&%P2!I;G-T86YC92!S +M=6-C97-S9G5L;'D@;&]A9&5D+"!S=&]P<&EN9R!P'DO:&%P2YC9F<@)&YE=U]C;VYF:6<* +M("`@(&UV("]E=&,O:&%P2]H87!R;WAY+F-F9RYO;&0@+V5T8R]H87!R +M;WAY+VAA<')O>'DN8V9G"B`@("!H87!R;WAY("UP("]V87(O'DN<&ED("UF("]E=&,O:&%P2]H87!R;WAY+F-F9R`M2YP:60I"B`@("!R970],0H@(&9I"@IE>&ET("1R +M970*```````````````````````````````````````````````````````` +M`````````````````````````````````````````````````````')O;W0O +M;6]N:71O71H;VX*(R!,:6-E;G-E9"!T;R!T +M:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE +M"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@ +M(&AT='`Z+R]W=WWT*("`@('!A2`K)UTG*R(@(B`K("=;)RMP2LG +M72<@*R`B("(@*R!M2!O;F4@<&ED(&]R(&YO=`H@("`@:68@97AI=%-T871U6EN9R!F97<@;6]R92!T:6UEWT*("`@(&9A:6QI +M;F=?PH@("`@("`@("`@("`@("`@ +M(G-U8V-EPH@("`@("`@("`@("`@ +M("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EWT@(U-K:7`@WT*("`@(&9A:6QI;F=# +M:&5C:W,@/2!;70H@("`@:68@8VAE8VM4>7!E(#T](")B87-I8R(Z"B`@("`@ +M("`@;6]N:71297-U;'0L(&9A:6QI;F=#:&5C:W,@/2!M;VYI=%!R;V-E&-L=61E(#T@:&-?9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!H8U]D871A(&5L7!E*0H@("`@("`@("`@("`@("`@:68@;&5N*')E="D@ +M/3T@,#H*("`@("`@("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@ +M("`@("`@:68@(G-U8V-E7,N87)G=BD@/3T@,CH*("`@("`@("!I9B!S>7,N +M87)G=ELQ72`]/2`B861V86YC960B.@H@("`@("`@("`@("!M86EN*")A9'9A +M;F-E9"(I"B`@("`@("`@96QI9B!S>7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@ +M("`@("`@("`@("!M86EN*")B87-I8R(I"B`@("`@("`@96QS93H*("`@("`@ +M("`@("`@<')I;G1D*")%7!E(&]F('1E7,N87)G=BD*("`@(&5L0`````` +M```````````````````````````````````````````````````````````` +M```````````````````P,#`P-C0T`#`P,#$W-3``,#`P,371H;VX*(R!,:6-E +M;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@ +M=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ +M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E +M(&%T"B,*(R`@(&AT='`Z+R]W=W'!E8W1E9"`](%M="B`@("`@("`@ +M9&5S=$EP(#T@<&]R=$9O'0L('-R8U!O2!I +M;B!I<%1A8FQE4QI'!E8W1E +M9#H*("`@("`@("`@("`@("`@("`@("!I9B!I<%1A8FQE16YT'!E8W1E9$5N=')Y*2`]/2`M,3H*("`@("`@("`@("`@("`@("`@("`@("`@ +M9F]U;F1!;&P@/2!&86QS90H@("`@("`@("`@("`@("`@("`@("`@("!B4QI2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA +M=R!O'!R97-S(&]R(&EM<&QI960N +M("!3964@=&AE($QI8V5N$UE;6]R>55S86=E(&EN(&AE86QT:%]C +M:&5C:W-?9&%T82`B("L@7`H@("`@("`@("`@("`@(")S>7-T96U4:')E&ET*#`I"@H@("`@;6%X365M;W)Y +M57-A9V4@/2!F;&]A="AD871A6R)M87A-96UO7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@ +M(&UA:6XH*0H````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M'E?8VAE8VLN<'D````````````` +M```````````````````````````````````````````````````````````` +M`````````````#`P,#`V-#0`,#`P,36]U(&UA>2!N;W0@=7-E('1H +M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N +M41A=&$@86YD(")M87AC;VYN +M(B!I;B!H84-F9U-E8W1I;VYS6R)G;&]B86PB73H*("`@("`@("!I9B!H87!R +M;WAY1&%T85LB;6%X8V]N;B)=("$](&AA0V9G4V5C=&EO;G-;(F=L;V)A;")= +M6R)M87AC;VYN(EU;,%TN'E$871A(BD*("`@(&EF(&AA +M<')O>'E$871A(&ES($YO;F4@;W(@;&5N*&AA<')O>'E$871A*2`]/2`P.@H@ +M("`@("`@('!R:6YT(").;R!D871A('!R;W9I9&5D('1O(&-H96-K+"!S:VEP +M<&EN9R(*("`@("`@("!E>&ET*#`I"@H@("`@=VET:"!O<&5N*"(O971C+VAA +M<')O>'DO:&%P2YC9FWT*("`@(&-UWT*("`@(&9O41A=&$L(&AA0V9G4V5C=&EO;G,I"@H@("`@:68@ +M8VAE8VM-87A#;VYN(&%N9"!C:&5C:TQB4G5L97,Z"B`@("`@("`@<')I;G0@ +M(D%L;"!C:&5C:W,@<&%S&ET*#`I"B`@("!E;'-E.@H@ +M("`@("`@(&5X:70H,2D*"@II9B!?7VYA;65?7R`]/2`B7U]M86EN7U\B.@H@ +M("`@:68@;&5N*'-Y7,N87)G=ELQ72`]/2`B +M861V86YC960B.@H@("`@("`@(&UA:6XH*0H````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&ET*#`I"@H@("`@=&5M<&QA=&5697)S:6]N36%T8VAE +M65T('-E='5P(&%T("(@*R!R96QE87-E1FEL92`K7`H@ +M("`@("`@("`@("`@("`@("`B+"!S:VEP<&EN9RXB"B`@("`@("`@96QI9B!E +M>'!E8W1E9"`A/2!F;W5N9#H*("`@("`@("`@("`@<')I;G0@(E1E;7!L871E +M(%9E'!E8W1E9"`K("(L(&9O=6YD.B`B("L@9F]U;F0*("`@("`@ +M("`@("`@=&5M<&QA=&5697)S:6]N36%T8VAE'!E8W1E9"`K("(L(&9O=6YD.B`B("L@9F]U;F0*("`@("`@ +M("`@("`@&ET*#$I"@H*:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH* +M("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A;F0@2\````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````,#`P,#0`````````````````````````` +M```````````````````````````````````````````````P,#`P-C0T`#`P +M,#$W-3``,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS +M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E +M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W3U.;VYE*3H*("`@('=I=&@@ +M;W!E;B@G+W)O;W0O:&5A;'1H7V-H96-K2!I2!I5TN2D@/3T@,#H*("`@("`@("`@("`@("`@(&-O;G1I +M;G5E"B`@("`@("`@("`@(&ME>59A;"`](&5N=')Y+G-P;&ET*"(](BD*("`@ +M("`@("`@("`@:68@;&5N*&ME>59A;"D@/3T@,CH*("`@("`@("`@("`@("`@ +M(&1;:V5Y5F%L6S!=+G-T2]?7VEN:71?7RYP>0`````````````````````````````````````````` +M````````````````````````````````````````,#`P,#8T-``P,#`Q-S4P +M`#`P,#$W-3``,#`P,#`P,#$U-#``,3,V,C4Q-3`S,30`,#$W-S8R`"`P```` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````'5S=&%R("``9&%R2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO +M2!A<'!L:6-A8FQE(&QA=R!O'!R +M97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N0`````````````````````````````````` +M````````````````````````````````````````````````,#`P,#8T-``P +M,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#,Q,S(`,3,V,C4Q-3`S,30`,#$W-S8Q +M`"`P```````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````'5S=&%R("``9&%R2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET +M*#`I"@H@("`@;6EN1&ES:TYE961E9"`](&9L;V%T*&1A=&%;(FUI;D1IF4I("\@,3`R-`H*("`@ +M(&EF("AF6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI +M86YC90HC('=I=&@@=&AE($QI8V5N2!I;7!O7,I(#T](#`Z"B`@("`@ +M("`@<')I;G0@(D%L;"`B("L@7,@ +M87)E(')E86-H86)L92!V:6$@<&EN9R(*("`@("`@("!E>&ET*#`I"B`@("!E +M;'-E.@H@("`@("`@('!R:6YT(")5;G)E86-H86)L92!G871E=V%Y7,N87)G=ELQ72`]/2`B8F%S:6,B +M.@H@("`@("`@(&UA:6XH*0H````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````')O;W0O:&5A;'1H7V-H96-K0`````````````````````````````````````````````````````````` +M```````````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P +M,371H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD +M871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C +M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F +M('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&5C=71A8FQE71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E +M($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H +M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C +M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I +M"@H@("`@=VET:"!O<&5N*"2!O +M9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A +M<'!L:6-A8FQE(&QA=R!O'!R97-S +M(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N$-P=55S86=E(&EN(&AE +M86QT:%]C:&5C:W-?9&%T82!S>7-T96U4:')E&ET*#`I"@H@("`@;6%X0W!U57-A9V4@/2!F;&]A="AD871A +M6R)M87A#<'55&ET*#`I"B`@("!E +M;'-E.@H@("`@("`@('!R:6YT(")&86EL960@=&\@&ET*#$I"@H*:68@7U]N86UE +M7U\@/3T@(E]?;6%I;E]?(CH*("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A +M;F0@0`````````````````````````````````````` +M````````````````````````````````````````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2`]('9-6R)M86-!9&1R97-S(ET@ +M*R`B("(@*R!V35LB:7`B72`K("(@(B`K('9-6R)V;4YA;64B70H@("`@("`@ +M(&9O=6YD16YT2`](%1R=64*("`@("`@("`@("`@("`@(&)R96%K"@H@("`@("`@("`@("!N +M;VY$969A=6QT4V5T(#T@(G-E=#HB("L@=DU;(FEP(ETN2`](%1R=64*("`@("`@ +M("`@("`@("`@(&)R96%K"@H@("`@("`@(&EF(&YO="!F;W5N9$5N=')Y.@H@ +M("`@("`@("`@("!F86EL961#:&5C:R`](%1R=64*("`@("`@("`@("`@9F%I +M;'5R94UE&ET*#$I"B`@("!E;'-E.@H@("`@("`@('!R +M:6YT(")!;&P@(B`K('-T7,N87)G=ELQ72`]/2`B861V86YC960B.@H@("`@("`@(&UA:6XH +M*0H````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````````````````!R;V]T +M+V9U;F,N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P +M.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N +M2!O;F4@;&]C:R!IPH@("`@ +MPH@("`@;&]C:STD,0H*("`@(%]?;&]C:V5D/3`*("`@ +M(%]?5%,]8&1A=&4@*R5S)4Y@"B`@("!?7TQ/0TM$25(](B]T;7`B"B`@("!? +M7TQ/0TM&24Q%/2(D7U],3T-+1$E2+R1?7U13+20D+21L;V-K+FQO8VLB"@H@ +M("`@:68@6R`D,B!="B`@("!T:&5N"B`@("`@("`@7U]424U%3U54/20R"B`@ +M("!E;'-E"B`@("`@("`@7U]424U%3U54/3,P"B`@("!F:0H*("`@(&EF(%L@ +M+64@)%]?3$]#2T9)3$4@70H@("`@=&AE;@H@("`@("`@(&QO9V=EPH@("`@7U],3T-+1$E2/2(O=&UP +M(@H@("`@7U],3T-+1DE,13TB)%]?3$]#2T1)4B\J+20D+20Q+FQO8VLB"B`@ +M("!?7VQO8VME9#TD,@H@("`@:68@6R`B)%]?;&]C:V5D(B`]/2`B,2(@70H@ +M("`@=&AE;@H@("`@("`@(')M("1?7TQ/0TM&24Q%"B`@("!F:0I]"@HC(')E +M;&5A&ET('9A;'5E"B,@ +M)#(@;&]C:R!F:6QE;F%M90HC("0S(&QO8VME9"@Q*2!OF4]8&EP(&%D9'(@2!O9B!T:&4@3&EC96YS92!A=`HC +M"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ +M=&AE($QI8V5N7,O8VQA;65T82UD871A+R@N*UM>+UTI+S\D("`N+B]M +M971A9&%T82\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%="@HC:'1T<#HO +M+SQR;W5T97))4#XO;&%T97-T+V9O;R!A;F0@+BXN+V9O;R\@*'EI96QD(&UE +M=&%D871A+R1)4"]F;V\I"B-A2UZ;VYE+S\D("`N+B]M971A9&%T82\E>U)%34]415]! +M1$12?2]A=F%I;&%B:6QI='DM>F]N92!;3"Q.0RQ14T%="E)E=W)I=&52=6QE +M(%YC;&]U9"UI9&5N=&EF:65R+S\D("`N+B]M971A9&%T82\E>U)%34]415]! +M1$12?2]C;&]U9"UI9&5N=&EF:65R(%M,+$Y#+%%305T*4F5WU)%34]415]!1$12?2]I +M;G-T86YC92UI9"!;3"Q.0RQ14T%="E)E=W)I=&52=6QE(%YL;V-A;"UH;W-T +M;F%M92\_)"`@+BXO;65T861A=&$O)7M214U/5$5?041$4GTO;&]C86PM:&]S +M=&YA;64@6TPL3D,L45-!70I297=R:71E4G5L92!>;&]C86PM:7!V-"\_)"`@ +M+BXO;65T861A=&$O)7M214U/5$5?041$4GTO;&]C86PM:7!V-"!;3"Q.0RQ1 +M4T%="E)E=W)I=&52=6QE(%YP=6)L:6,M:&]S=&YA;64O/R0@("XN+VUE=&%D +M871A+R5[4D5-3U1%7T%$1%)]+W!U8FQI8RUH;W-T;F%M92!;3"Q.0RQ14T%= +M"E)E=W)I=&52=6QE(%YP=6)L:6,M:7!V-"\_)"`@+BXO;65T861A=&$O)7M2 +M14U/5$5?041$4GTO<'5B;&EC+6EP=C0@6TPL3D,L45-!70I297=R:71E4G5L +M92!><'5B;&EC+6ME>7,O/R0@("XN+VUE=&%D871A+R5[4D5-3U1%7T%$1%)] +M+W!U8FQI8RUK97ES(%M,+$Y#+%%305T*4F5W=FTM:60O/R0@ +M("XN+VUE=&%D871A+R5[4D5-3U1%7T%$1%)]+W9M+6ED(%M,+$Y#+%%305T* +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````=F%R+W=W=R]H=&UL+W5S97)D871A+P`` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````#`P,#`W-34`,#`P,3/dev/null 2>&1 || ${echo} 'cloud_scripts/usr/share/cloud/cloud-scripts.tar': 'MD5 check failed' + ) << \SHAR_EOF +6c9c71f04c38fbbe6031c09a732f525d cloud_scripts/usr/share/cloud/cloud-scripts.tar +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/usr/share/cloud/cloud-scripts.tar'` -ne 696320 && \ + ${echo} "restoration warning: size of 'cloud_scripts/usr/share/cloud/cloud-scripts.tar' is not 696320" + fi +fi +# ============= cloud_scripts/usr/share/cloud/cloud-scripts.tar ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/usr/share/cloud/cloud-scripts.tar' +then +${echo} "x - SKIPPING cloud_scripts/usr/share/cloud/cloud-scripts.tar (file already exists)" + +else +${echo} "x - extracting cloud_scripts/usr/share/cloud/cloud-scripts.tar (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/usr/share/cloud/cloud-scripts.tar +M971C+P`````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````#`P,#`W-34`,#`P,37-T96U-87A& +M:6QE4VEZ93TQ,$T*4G5N=&EM94UA>%5S93TR,$T*```````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````971C+W-Y7-T +M96TO:'EP97)V+61A96UO;G,N:'8M=G-S+61A96UO;BYS97)V:6-E```````` +M````````````````````````````````````````````````````,#`P,#8T +M-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,S0`,3,V,C4Q-3`S,30`,#(S +M,37!E2!S97)V:6-E("A64U,I(&1A96UO;@H*6U-E&5C4W1A3UM=6QT:2UU7-T96UD+W-Y2UC;VYF +M:63TO=7-R+VQO8V%L+V-L;W5D+W-Y7-T96TO;W!E;BUV;2UT;V]L3UM=6QT:2UU3UM=6QT:2UU7-T96UD+W-Y&5N+FUO=6YT"D)E9F]R93UN971W;W)K+G1A2UC;VYF:6&5C4W1A&5C4W1A3UM=6QT:2UU7-T96TO:'EP97)V+61A96UO;G,N:'8M +M9F-O<'DM9&%E;6]N+G-E7!E2!S97)V:6-E("A&0T]062D@9&%E;6]N"D-O +M;F1I=&EO;E!A=&A%>&ES=',]+V1E=B]V;6)U0H*6U-E3UM=6QT:2UU7-T96TO8VQO=60M +M<&]S=&EN:70N2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N0`````````````````````````````````````````````` +M`````````````````````````````````````````#`P,#`V-#0`,#`P,36]U(&UA>2!N;W0@=7-E +M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI +M8V5N7!E(#$S("UJ($123U`*+4$@24Y0550@+7`@:6-M<"`M:B!!0T-%4%0* +M+4$@24Y0550@+6D@971H,2`M<"!T8W`@+6T@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* +M(R`@(&AT='`Z+R]W=W7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E +M<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H +M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N +M2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H +M92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R +M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T +M"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7-C=&P@8V]N9FEG=7)A +M=&EO;B!F:6QE"B,*(R!&;W(@8FEN87)Y('9A;'5E7-C=&PN +M8V]N9B@U*2!F;W(@;6]R92!D971A:6QS+@HC($!615)324].0`H*(R!#;VYT +M2!T:&5R +M96)Y(')E9'5C:6YG('1H92!S:7IE(&]F(&1I&PR='!D+WAL +M,G1P9"YC;VYF```````````````````````````````````````````````` +M````````````````````````````````````````````````````````,#`P +M,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,3,`,3,U-C$W,C4Q-3(` +M,#$T-#4U`"`P```````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````'5S=&%R("``9&%R65S"G!P<&]P=&9I;&4@/2`@("`O971C+W!P<"]O<'1I;VYS +M+GAL,G1P9`H````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````971C+V1N2!D:7-A8FQE +MF5N+"!S:6YC92!T:&5Y"B,@=&5L;"!D +M;G-M87-Q('1O(&9I;'1E2X@268@>6]U(&AA=F4@82!D:6%L+6]N+61E;6%N9"!L:6YK('1H97D@ +M86QS;R!S=&]P"B,@=&AE6]U('=A;G0@9&YS('1O(&=E="!I=',@=7!S=')E86T@2`@(&%P<&5A2!O=&AE<@HC(&9I +M;&4L(&=E='1I;F<@:71S('-E2!O;@HC('-P96-I9FEE9"!I;G1E +M&-E<'0M:6YT97)F86-E/65T:#$*97AC97!T+6EN +M=&5R9F%C93UE=&@R"F5X8V5P="UI;G1E6]U('=A;G0@9&YS;6%S<2!T;R!P6]U"B,@=V%N="!D;G-M +M87-Q('1O(')E86QL>2!B:6YD(&]N;'D@=&AE(&EN=&5R9F%C97,@:70@:7,@ +M;&ES=&5N:6YG(&]N+`HC('5N8V]M;65N="!T:&ES(&]P=&EO;BX@06)O=70@ +M=&AE(&]N;'D@=&EM92!Y;W4@;6%Y(&YE960@=&AI6]U('=A;G0@=&\@ +M:&%V92!A(&1O;6%I;@HC(&%U=&]M871I8V%L;'D@861D960@=&\@2!Q=6%L:69I +M960@9&]M86EN(&YA;65S+"!A7-T96US(&-O;F9I9W5R960@8GD@ +M1$A#4`HC(#,I(%!R;W9I9&5S('1H92!D;VUA:6X@<&%R="!F;W(@(F5X<&%N +M9"UH;W-T7,N;W)G+G5K+#$Y,BXQ-C@N,BXP +M+S(T"@HC(%-A;64@:61E82P@8G5T(')A;F=E(')A=&AE7,N;W)G+G5K+#$Y,BXV."XS +M+C$P,"PQ.3(N,38X+C,N,C`P"@HC(%5N8V]M;65N="!T:&ES('1O(&5N86)L +M92!T:&4@:6YT96=R871E9"!$2$-0('-E6]U(&YE960*(R!T;R!S +M=7!P;'D@=&AE(')A;F=E(&]F(&%D9')E2!$2$-0"B,@2!B92!S970@;VYL>2!F;W(@=&AI2!W:&5N('1H92!T86<@(F=R965N +M(B!I2!A('-U8FYE="!W:&EC:"!C +M86XG="!B92!U6YA;6EC(&%D9')E2!A;F0*(R!A9&0@;F%M97,@=&\@=&AE($1.4R!F;W(@=&AE($E0 +M=C8@861D2P@-#AH"@HC($1O($1(0U`@86YD(%)O=71E2!W:6QL('5S +M92!33$%!0R!F;W(@861D2!R82US=&%T96QE2!J +M=7-T"B,@;F5E9"!T;R!B92!O;B!T:&4@7,@9VEV92!T:&4@:&]S="!W:71H($5T +M:&5R;F5T(&%D9')E7,@9VEV92!T:&4@:&]S="!W +M:71H(&-L:65N="!I9&5N=&EF:65R(#`Q.C`R.C`R.C`T"B,@=&AE($E0(&%D +M9')E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ +M(G)E9"(@=&\*(R!T:&4@;6%C:&EN92!W:71H($5T:&5R;F5T(&%D9')E&5D($E0=C8@861D2!;72!A2X*(V1H8W`M:&]S=#UI9#HP,#HP,3HP +M,#HP,3HQ-CID,CHX,SIF8SHY,CID-#HQ.3IE,CID.#IB,BP@9G)E9"P@6S$R +M,S0Z.C5="@HC($EG;F]R92!A;GD@8VQI96YT2!M86-H:6YE('=H;W-E"B,@1$A#4"!V96YD;W)C;&%S +M'1R82!O<'1I +M;VYS('=H:6-H(&%R92!T86=G960@87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@ +M;VYE"B,@;V8@=VAO'1R82!O<'1I;VYS('=H:6-H(&%R +M92!T86=G960@87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO2!D;G-M +M87-Q(&%N9"!S96YD(&YO(&1E9F%U;'0*(R!R;W5T92!A="!A;&PN($YO=&4@ +M=&AA="!T:&ES(&]N;'D@=V]R:W,@9F]R('1H92!O<'1I;VYS('-E;G0@8GD* +M(R!D969A=6QT("@Q+"`S+"`V+"`Q,BP@,C@I('1H92!S86UE(&QI;F4@=VEL +M;"!S96YD(&$@>F5R;RUL96YG=&@@;W!T:6]N"B,@9F]R(&%L;"!O=&AE0H*(R!3970@=&AE(&1E9F%U;'0@=&EM92UT;RUL:79E +M('1O(#4P"B-D:&-P+6]P=&EO;CTR,RPU,`H*(R!3970@=&AE(")A;&P@2!A;B!O<'1I;VX@=VAI8V@@=VEL;"!O;FQY +M(&)E('-E;G0@=&\@=&AE(")R960B(&YE='=O2!A6]U +M(&UA>2!W86YT('1O('5N8V]M;65N="!S;VUE(&]R(&%L;"!O9B!T:&5M(&EF +M('EO=2!U7!E"@HC(%-E;F0@86X@96UP='D@5U!! +M1"!O<'1I;VXN(%1H:7,@;6%Y(&)E(%)%455)4D5$('1O(&=E="!W:6YD;W=S +M(#<@=&\@8F5H879E+@HC9&AC<"UO<'1I;VX],C4R+")<;B(*"B,@4V5N9"!2 +M1D,M,S,Y-R!$3E,@9&]M86EN('-E87)C:"!$2$-0(&]P=&EO;BX@5T%23DE. +M1SH@66]U71H:6YG(&5L&4@=&%G(&9O2YK<'AE"B-D:&-P+6)O;W0];7EB;V]T:6UA9V4*"B,@16YC87!S +M=6QA=&5D(&]P=&EO;G,@9F]R($5T:&5R8F]O="!G4%A%+B!!;&P@=&AE(&]P +M=&EO;G,@87)E"B,@96YC87!S=6QA=&5D('=I=&AI;B!O<'1I;VX@,32!C;V1E"B-D:&-P+6]P=&EO;CUE;F-A<#HQ-S4L(#$W-BP@,6(@("`@("`@ +M(R!N;RUP61H8W`*(V1H8W`M;W!T:6]N/65N8V%P.C$W-2P@,3#@V+3,R"B-D:&-P+6UA=&-H/6ET86YI8W,L(&]P=&EO;CIC;&EE;G0M87)C +M:"P@,B`C24$V-`HC9&AC<"UM871C:#UH86UM97)S+"!O<'1I;VXZ8VQI96YT +M+6%R8V@L(#8@(W@X-BTV-`HC9&AC<"UM871C:#UM86-T96QS+"!O<'1I;VXZ +M8VQI96YT+6%R8V@L(#<@(T5&22!X.#8M-C0*"B,@1&\@&4M<')O;7!T/2)0#@V4$,L("));G-T86QL($QI;G5X(BP@<'AE;&EN=7@*"B,@3&]A +M9',@/'1F='`M#@V4$,L("));G-T86QL($QI;G5X(BP@<'AE;&EN +M=7@L(#$N,BXS+C0*"B,@57-E(&)O;W1S97)V97(@;VX@;F5T=V]R:RP@9F]U +M;F0@;7D@;75L=&EC87-T(&]R(&)R;V%D8V%S="X*(W!X92US97)V:6-E/7@X +M-E!#+"`B26YS=&%L;"!W:6YD;W=S(&9R;VT@4DE3('-E#@V4$,L("));G-T86QL('=I;F1O=W,@9G)O;2!225,@2!F:6QE0HC('1H92!U&%M<&QE(&]F(&1H8W`M8F]O="!W:71H(&%N(&5X=&5R;F%L(%1& +M5%`@2`M+7!X92US97)V +M:6-E+@HC9&AC<"UB;V]T/2]V87(O9G1P9"]P>&5L:6YU>"XP+&)O;W1H;W-T +M+#$Y,BXQ-C@N,"XS"@HC($EF('1H97)E(&%R92!M=6QT:7!L92!E>'1E#TR,3`P"@HC(%1H92!$2$-0('-E6]U(&UI9VAT(&5N9"!U<"!A8V-I9&5N=&%L +M;'D@8V]N9FEG=7)I;F<@82!$2$-0"B,@2X@5&AE($E30R!S97)V97(@=7-E&5C=71A8FQE +M('=H96X@82!$2$-0(&QE87-E(&ES(&-R96%T960@;W(@9&5S=')O>65D+@HC +M(%1H92!A`HC86QI87,],2XR+C,N +M,"PU+C8N-RXP+#(U-2XR-34N,C4U+C`*(R!A;F0@=&AI"UT87)G970@9F]R(&%L;"!L;V-A;`HC(&UA8VAI;F5S+@HC;&]C86QM>`H* +M(R!2971U6]U('=A;G0@=&\@ +M3XL/'=E:6=H=#X*(R!)9B!T:&4@9&]M86EN('!A&%M<&QE+F-O;2!D;VUA:6X@=&\* +M(R!L9&%P&%M +M<&QE+F-O;2!D;VUA:6X@=&\*(R!L9&%P&%M<&QE+F-O;2PS +M.#DL,@H*(R!!(%-25B!R96-O'!A;G-I;VX@ +M9&]N92!F;W(@4U)6(')E8V]R9',@7V1O97-?;F]T"B,@;V-C=7(@9F]R(%!4 +M4B!R96-O'!A;G-I;VX@9&]N92!F;W(@4U)6 +M(')E8V]R9',@7V1O97-?;F]T"B,@;V-C=7(@9F]R(%185"!R96-O&%M<&QE(%-01BX*(W1X="UR96-O5\@=V]R:W,*(R!F;W(@=&%R9V5T3TO=F%R +M+VQO9R]D;G-M87-Q+FQO9PH*(R!);F-L=61E(&$@86YO=&AE'0*```````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````971C+V-R;VXN9&%I +M;'DO```````````````````````````````````````````````````````` +M`````````````````````````````````````````````````````````#`P +M,#`W-34`,#`P,32]C;&5A2!C86-H92!T;R!U;'1I;6%T96QY(')E9'5C92!S=V%P<&EN9PH*7,O=FTO9')O<%]C86-H97,*```````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````````````971C+W9M +M=V%R92UT;V]LF4@:V5P=#H@,2!-0@IV;7-V8RYM +M87A,;V=3:7IE(#T@,0H*(R!$969I;F5S('1H92`B=FUT;V]L"!S:7IE(#4P30IS:7IE(#4P30IC;VUP0HC3&ES=&5N061D7,@9F]R('!R;W1O8V]L('9E2`O971C+W-S:"]SF4@;V8@97!H +M96UE7-L;V=& +M86-I;&ET>2!!551("E-Y65S"D%U=&AO7,@:6X@+V5T8R]S65S(&EF('EO=2!D;VXG="!T'0@<&%S65S"D=34T%024-L96%N=7!#65S"@HC($%C8V5P="!L;V-A;&4M4]F9G-E="`Q,`HC6#$Q57-E3&]C86QH;W-T +M('EE65S"B-5&PR='!D```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````,#`P,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,34`,3,U +M-C$W,C4Q-3(`,#$T-C`W`"`P```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````'5S=&%R("``9&%R6]U('=A;G0@=&\@=7-E(&$@9&EF9F5R +M96YT(&EN=&5R9F%C92!O6]U(&EN2!F2!)4"!A9&1R97-S+`H@("`@("`@(",@>6]U(&-A;B!U7-L;V'-O8VL@(R!P7-T96T@;&]G9VEN9PHD36]D3&]A9"!I;6ML;V<@ +M("`C('!R;W9I9&5S(&ME2!R:VQO9V0I"B,D36]D3&]A9"!I;6UA7-L;V<@7-T96TN("!3<&QI="!I="!U<"!S;R!T:&%T"B,@:70@:7,@96%S>2!T +M;R!W2YL;V<* +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````````````&5T8R]M;V1P +M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@ +M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2!C86-H92!T +M;R!U;'1I;6%T96QY(')E9'5C92!S=V%P<&EN9PH*<&AY;65M/20H9G)E97QA +M=VL@)R]>365M.B][<')I;G0@)#)])RD*:68@6R`D<&AY;65M("UL="`U,3,P +M,#`@73L@=&AE;@H@('-Y;F,@)B8@96-H;R`Q(#X@+W!R;V,O2YC;VYF```````````````````````````````````````````````` +M```````````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P +M,3$-O;FYE8W1I +M;VYS4&5R0VAI;&0@("`),3`P,`H\+TEF36]D=6QE/@H*(R!V:6TZ('-Y;G1A +M>#UA<&%C:&4@=',]-"!S=STT('-T6U,:6YK&5S($9O;&QO=U-Y;4QI;FMS($UU;'1I5FEE=W,*"0E!;&QO=T]V97)R:61E +M($%L;`H)"4]R9&5R(&%L;&]W+&1E;GD*"0EA;&QO=R!F&5C0T=)("U-=6QT:59I97=S +M("M3>6U,:6YK2QA;&QO=PH@("`@("`@($1E;GD@9G)O +M;2!A;&P*("`@("`@("!!;&QO=R!F3X*"3Q$:7)E8W1O0H)"6%L;&]W(&9R;VT@86QL"@D\+T1I3X*"@E38W)I +M<'1!;&EA0H)"4%L;&]W(&9R;VT@86QL"@D\ +M+T1I3X*"@E%T%004-(15],3T=?1$E2?2]ET%004-(15],3T=?1$E2 +M?2]S2QA;&QO=PH)"41E;GD@ +M9G)O;2!A;&P*"0E!;&QO=R!F2!T +M:&4*"2,@("!34TQ#97)T:69I8V%T949I;&4@9&ER96-T:79E(&ES(&YE961E +M9"X*"5-33$-E0H*"2,@("!397)V +M97(@0V5R=&EF:6-A=&4@0VAA:6XZ"@DC("`@4&]I;G0@4U-,0V5R=&EF:6-A +M=&5#:&%I;D9I;&4@870@82!F:6QE(&-O;G1A:6YI;F<@=&AE"@DC("`@8V]N +M8V%T96YA=&EO;B!O9B!014T@96YC;V1E9"!#02!C97)T:69I8V%T97,@=VAI +M8V@@9F]R;2!T:&4*"2,@("!C97)T:69I8V%T92!C:&%I;B!F;W(@=&AE('-E +M0H)(R`@('1H92!R969E +M2`H0T$I.@H)(R`@(%-E="!T:&4@0T$@8V5R=&EF:6-A +M=&4@=F5R:69I8V%T:6]N('!A=&@@=VAE6]U(&YE960@:&%S:"!S>6UL +M:6YK6UL:6YK7!E*3H* +M"2,@("!#;&EE;G0@8V5R=&EF:6-A=&4@=F5R:69I8V%T:6]N('1Y<&4@86YD +M(&1E<'1H+B`@5'EP97,@87)E"@DC("`@;F]N92P@;W!T:6]N86PL(')E<75I +M2!T;R!V97)I9GD@=&AE(&-E +M4-L:65N +M="!R97%U:7)E"@DC4U-,5F5R:69Y1&5P=&@@(#$P"@H)(R`@($%C8V5S6YT87@@:7,@80H)(R`@(&UI>'1UU-33%]#25!(15)]("%^(&TO7BA%6%!\3E5,3"DO(%P* +M"2,@("`@("`@("`@("!A;F0@)7M34TQ?0TQ)14Y47U-?1$Y?3WT@97$@(E-N +M86ME($]I;"P@3'1D+B(@7`H)(R`@("`@("`@("`@(&%N9"`E>U-33%]#3$E% +M3E1?4U]$3E]/57T@:6X@>R)3=&%F9B(L(")#02(L(")$978B?2!<"@DC("`@ +M("`@("`@("`@86YD("5[5$E-15]71$%9?2`^/2`Q(&%N9"`E>U1)345?5T1! +M67T@/#T@-2!<"@DC("`@("`@("`@("`@86YD("5[5$E-15](3U52?2`^/2`X +M(&%N9"`E>U1)345?2$]54GT@/#T@,C`@("`@("`@*2!<"@DC("`@("`@("`@ +M("!OU)%34]415]!1$12?2`]?B!M+UXQ.3)<+C2!E>&ES=&EN9R!W:&5N(&-L +M:65N=`H)(R`@("`@875T:&5N=&EC871I;VX@:7,@=7-E9"DN(%1H:7,@8V%N +M(&)E('5S960@=&\@:6UP;W)T('1H92!C97)T:69I8V%T97,*"2,@("`@(&EN +M=&\@0T=)('-C'!O'!E;G-I=F4@;W!E2!E;F%B;&5S('1H90H)(R`@("`@97AP;W)T871I;VX@9F]R +M($-'22!A;F0@4U-)(')E<75E'!O2`O=7-R+VQI8B]C9VDM8FEN/@H)"5-33$]P=&EO;G,@*U-T +M9$5N=E9A6]U(&-A;B!U6]U(')E8V5I=F4@ +M22]/(&5R2!A;&5R="!I2!F;W(@8G)O=W-E6]U(&MN;W<@=&AA="!T:&5I2X*"2,@("!. +M;W1I8V4Z($UO2!W86YT('1O(&1I2P@;VYE(&AA6]U(&IU2!A;'-O"B,@:&%V92!T;R!C +M:&%N9V4@=&AE(%9I6]U(&AA=F4@=7!GB!A;F0*(R!214%$ +M344N1&5B:6%N+F=Z"@I,:7-T96X@,3`N,2XQ+C$Z.#$X,`H*/$EF36]D=6QE +M(&UO9%]S0HC('1E;&P@ +M9&YS;6%S<2!T;R!F:6QT97(@;W5T('%U97)I97,@=VAI8V@@=&AE('!U8FQI +M8R!$3E,@8V%N;F]T"B,@86YS=V5R+"!A;F0@=VAI8V@@;&]A9"!T:&4@2!T:&4@2X*"B,@3F5V97(@9F]R=V%R9"!P;&%I +M;B!N86UE2X*(R!.;W1E('1H870@*&%M;VYG2!O9B!T:&4@=7!S=')E86T*(R!S97)V97)S(&ET(&MN +M;W=S(&%B;W5T(&%N9"!T2!E86-H('%U97)Y"B,@=VET:"`@96%C:"`@2`@:6X@('1H92`@;W)D97(@('1H97D@("!A<'!E87(@ +M("!I;@HC("]E=&,O2!A&%M<&QE(&]F(')O=71I;F<@4%12('%U97)I97,@=&\@ +M;F%M97-E2!D;VUA:6YS(&AE6]U('=A;G0@=&\@9F]R8V4@=&\@86X@ +M25`@861D&%M<&QE(&)E;&]W('-E;F0@86YY +M(&AO6]U('=A;G0@ +M9&YS;6%S<2!T;R!L:7-T96X@9F]R($1(0U`@86YD($1.4R!R97%U97-T&-E<'0M +M:6YT97)F86-E/6QO"@HC($]R('=H:6-H('1O(&QI2!A9&1R +M97-S("AR96UE;6)E2!$3E,@7-T96US('=H:6-H +M('-U<'!O6]U(&UA>2!N965D('1H:7,@:7,@=VAE;@HC(')U;FYI;F<@ +M86YO=&AE6]U(&1O;B=T('=A;G0@9&YS;6%S<2!T;R!R +M96%D("]E=&,O:&]S=',L('5N8V]M;65N="!T:&4*(R!F;VQL;W=I;F<@;&EN +M92X*(VYO+6AO6]U('=A;G0@:70@=&\@2!P;W1E;G1I86QL>2!S971T:6YG('1H90HC +M("`@(&1O;6%I;B!O9B!A;&P@'!A;F0M:&]S +M=',B"B-D;VUA:6X],BYV;6]P0HC(&$@;&5A6]U(&AA=F4@;6]R92!T:&%N(&]N92!N971W;W)K+"!Y;W4@ +M=VEL;"!N965D('1O"B,@2!P87)A;65T97)S(&9O&%M<&QE +M7,@7,@:70G +M2!T +M:&4@;6%C:&EN92!W:71H(&5T:&5R;F5T"B,@861D'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ +M(G)E9"(@=&\*(R!A;GD@;6%C:&EN92!W:71H(&5T:&5R;F5T(&%D9')E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ +M(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO"(*(V1H8W`M +M=F5N9&]R8VQA2!M86-H:6YE(&]N90HC +M(&]F('=H;W-E($1(0U`@=7-E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@ +M87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO2!N86UE.@HC(')U;B`B9&YS;6%S<2`M+6AE;'`@9&AC<"(@=&\@9V5T +M(&$@;&ES="X*(R!.;W1E('1H870@86QL('1H92!C;VUM;VX@2!D;G-M87-Q+B!9;W4@=F5R>2!L:6ME;'D@=VEL;"!N;W0@ +M;F5E9`HC(&%N>2!D:&-P+6]P=&EO;G,N($EF('EO=2!U2!A2!W;W)K0HC(&1E9F%U;'0@*#$L +M(#,L(#8L(#$R+"`R."D@=&AE('-A;64@;&EN92!W:6QL('-E;F0@82!Z97)O +M+6QE;F=T:"!O<'1I;VX*(R!F;W(@86QL(&]T:&5R(&]P=&EO;B!N=6UB97)S +M+@HC9&AC<"UO<'1I;VX],PH*(R!3970@=&AE($Y44"!T:6UE('-E0H*(R!3970@=&AE(&1E +M9F%U;'0@=&EM92UT;RUL:79E('1O(#4P"B-D:&-P+6]P=&EO;CTR,RPU,`H* +M(R!3970@=&AE(")A;&P@2!A;B!O<'1I +M;VX@=VAI8V@@=VEL;"!O;FQY(&)E('-E;G0@=&\@=&AE(")R960B(&YE='=O +M2!A6]U(&UA>2!W86YT('1O('5N8V]M;65N="!T:&5M +M(&EF('EO=2!U2!N971B:6]S('-C;W!E+@H*(R!396YD(%)&0RTS +M,SDW($1.4R!D;VUA:6X@2!W:&5N('1H92!C;&EE;G0@71E(&EN=&5G97(@+2!T:&%T)W,@=VAA="!M:6-R;W-O9G0@=V%N +M=',N(%-E90HC(&AT='`Z+R]T96-H;F5T,BYM:6-R;W-O9G0N8V]M+U=I;F1O +M=W-397)V97(O96XO;&EB2]A-S!F,6)B-RUD,F0T+30Y9C`M.39D-BTT +M8C2!S;VUE(&-O;F9I9W5R871I;VYS(&]F"B,@ +M171H97)B;V]T('1O(&%L;&]W(&ES('1O(')E8V]G;FES92!T:&4@1$A#4"!S +M97)V97(N"B-D:&-P+6]P=&EO;CUV96YD;W(Z171H97)B;V]T+#8P+")%=&AE +M"X@3F]T92!T:&%T +M('=E(&YE960@=&\@2!N965D"B,@=&AI2!F:6QE0HC('1H92!U&5L:6YU>"YR +M960M;F5T"@HC($%N(&5X86UP;&4@;V8@9&AC<"UB;V]T('=I=&@@86X@97AT +M97)N86P@2!C;&EE +M;G0@=VAI8V@@8G)O861C87-T6]U(&UI9VAT(&5N9"!U +M<"!A8V-I9&5N=&%L;'D@8V]N9FEG=7)I;F<@82!$2$-0"B,@2X@5&AE($E30R!S +M97)V97(@=7-E2!T:&4@:&]S=&YA;64*(R!I9B!T:&5R92!IF4@:&5R92X*(V-A8VAE +M+7-I>F4],34P"@HC($EF('EO=2!W86YT('1O(&1I2!R97-P;VYS97,@=VAI8V@@8V]M92!F;W)M("]E=&,O:&]S=',@86YD +M('1H92!$2$-0(&QE87-E"B,@9FEL92!H879E(%1I;64M5&\M3&EV92!S970@ +M87,@>F5R;RP@=VAI8V@@8V]N=F5N=&EO;F%L;'D@;65A;G,*(R!D;R!N;W0@ +M8V%C:&4@9G5R=&AE6]U(&%R92!H87!P>2!T;R!T6]U(&-A;B!S970@82!T:6UE+71O+6QI=F4@*&EN"B,@6]U('=A;G0@9&YS;6%S<2!T +M;R!D971E8W0@871T96UP=',@8GD@5F5R:7-I9VX@=&\@"!U<"!$ +M3E,@2!W;W)K"!T;R`U+C8N-RYX"B-A;&EA"UT87)G970@9F]R(&%L;"!L;V-A;`HC(&UA8VAI;F5S+@HC;&]C86QM>`H* +M(R!2971U6]U('=A;G0@=&\@ +M3XL/'=E:6=H=#X*(R!)9B!T:&4@9&]M86EN('!A&%M<&QE+F-O;2!D;VUA:6X@=&\* +M(R!L9&%P&%M +M<&QE+F-O;2!D;VUA:6X@=&\*(R!L9&%P&%M<&QE+F-O;2PS +M.#D*"B,@5'=O(%-25B!R96-O&%M<&QE+F-O;2PS.#DL,0HC&%M<&QE+F-O;2QL9&%P&%M<&QE+F-O +M;0HC&%M<&QE+F-O;0H*(R!4:&4@9F]L +M;&]W:6YG(&QI;F4@65E(%!A9V4N7VAT='`N7W1C<"YD;G,M'0M3TO=F%R+VQO9R]D +M;G-M87-Q+FQO9PH*(R!);F-L=61E(&$@86YO=&AE'0*```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````&5T8R]I<'-E8RYS96-R971S```````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P,3PH@("`@;6%X2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P +M.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N +M71R=6YC871E"GT*```````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````&5T8R]L;V=R;W1A=&4N +M9"]C;VYN=')A8VMD```````````````````````````````````````````` +M```````````````````````````````````````````````````````P,#`P +M-C0T`#`P,#$W-3``,#`P,3PH@("`@;6%X6-O;7!R97-S"@H@("`@<&]S=')O=&%T90H@("`@("`@(&EF +M(%L@+64@+W9A2!O9B!T:&4@3&EC96YS92!A +M=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O +M'!R97-S(&]R(&EM<&QI960N("!3 +M964@=&AE($QI8V5NPH@("`@("`@(')O +M=&%T92`U"B`@("`@("`@;6%X2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N'-I>F4@,3!- +M"B`@("`@("`@;6ES0H@("`@("`@ +M(&-O;7!R97-S"B`@("`@("`@8V]P>71R=6YC871E"GT*```````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````!E=&,O;&]G0H)8V]M<')E71R=6YC871E"B`@("`@("!R;W1A=&4@,PH@("`@("`@8V]M<')E'0*("`@("`@(&UA>'-I>F4@,3!-"B`@("`@("!N;W1I9F5M +M<'1Y"GT*```````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````&5T8R]L;V=R;W1A=&4N9"]R0H)8V]M<')E +M2YL;V<@>PH@("`@0H@("`@;6%X7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ +M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E +M(&%T"B,*(R`@(&AT='`Z+R]W=W2\````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````,#`P,#'DN8V9G```````````````````````````````````````````` +M```````````````````````````````````````````````````````````P +M,#`P-C0T`#`P,#$W-3``,#`P,3'D*"75S97(@:&%P0H)9W)O +M=7`@:&%P0H)9&%E;6]N"@ID969A=6QT7!E(CHB9W5E2(Z(C$W,BXQ-BXQ+C$B+`H)(F1E9F%U +M;'1?96YT2(*?0H````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````;W!T+V-L;W5D+W1E7!E(CH@(FEC;7`B"B`@("`@("`@("`@('TL"B`@("`@("`@("`@ +M('L*("`@("`@("`@("`@("`@(")A;&QO=V5D(CH@=')U92P*("`@("`@("`@ +M("`@("`@(")C:61R(CH@(C$P+C`N,BXP+S@B+`H@("`@("`@("`@("`@("`@ +M(F9I7!E(CH@(G5D<"(*("`@("`@("`@ +M("`@?2P*("`@("`@("`@("`@>PH@("`@("`@("`@("`@("`@(F%L;&]W960B +M.B!T7!E(CH@(FYE='=OR)P=6)L:6-?:7`B.B(Q +M,"XP+C(N,3`R(BP*(G-O=7)C95]N870B.G1R=64L"B)A9&0B.G1R=64L"B)O +M;F5?=&]?;VYE7VYA="(Z9F%L2(Z(C$P+C`N,BXQ(BP*(FYE=&UA2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H +M92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2!C;61?;&EN92YJ2!I<',P,#`Q+FIS;VX*+V]P="]C;&]U9"]B:6XO +M=7!D871E7V-O;F9I9RYP>2!I<',P,#`R+FIS;VX*+V]P="]C;&]U9"]B:6XO +M=7!D871E7V-O;F9I9RYP>2!I<',P,#`S+FIS;VX*```````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````;W!T+V-L;W5D+W1ER)P +M=6)L:6-?:7`B.B(Q,"XP+C(N,3`S(BP*(G-O=7)C95]N870B.G1R=64L"B)A +M9&0B.G1R=64L"B)O;F5?=&]?;VYE7VYA="(Z9F%L2(Z(C$P+C`N,BXQ(BP*(FYE=&UAPH)(FQO8V%L7W!U8FQI8U]I<"(Z(C$W,BXQ-BXQ +M+C$B+`H)(FQO8V%L7V=U97-T7V-I9'(B.B(Q-S(N,38N,2XP+S(T(BP*"2)L +M;V-A;%]P=6)L:6-?9V%T97=A>2(Z(C$W,BXQ-BXQ+C$B+`H)(G!E97)?9V%T +M97=A>5]I<"(Z(C$P+C(P,"XR,#`N,2(L"@DB<&5E2(Z(C-D97,M;60U(BP* +M"2)I:V5?<&]L:6-Y(CHB,V1E7)I9VAT(&]W +M;F5R6]U +M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O +M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W +M=W2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NW!R:6YT("0Y.WTG*0H):68@ +M6R`D4D]55$527U-4051%(#T@(E50(B!="@ET:&5N"@D@("`@4U1!5%53/4U! +M4U1%4@H)96QI9B!;("123U5415)?4U1!5$4@/2`B1$]73B(@70H)=&AE;@H) +M("`@(%-405154SU"04-+55`*"69I"F9I"@IE8VAO(")3=&%T=7,Z("1[4U1! +M5%53?2(*```````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````!O<'0O8VQO=60O=&5M<&QA=&5S+VAE87)T8F5A="YS:"YT96UP;``` +M```````````````````````````````````````````````````````````` +M````````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC +M"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ +M=&AE($QI8V5N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H +M='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI +M8V5NPH@("`@36]D +M92!&5$97('L*("`@("`@("`C"B`@("`@("`@(R!3:7IE(&]F('1H92!R97-E +M;F0@<75E=64@*&EN(&]B:F5C=',I+B!4:&ES(&ES('1H92!M87AI;75M"B`@ +M("`@("`@(R!N=6UB97(@;V8@;V)J96-T2!T;R!S=&]R92!D96%D(&]B:F5C=',N"B`@("`@("`@(R!$969A +M=6QT(&ES(#$S,3`W,B!O8FIE8W1S+@H@("`@("`@(",*("`@("`@("`C(%)E +M6]U('-E="!A(&QO=R!V86QU92P@5$-0(&5N +M=')I97,@:6X*("`@("`@("`C($5S=&%B;&ES:&5D('-T871E&%M<&QE+`H@("`@("`@(",@86X@ +M4U-((&-O;FYE8W1I;VX@=VET:&]U="!+965P06QI=F4@96YA8FQE9"X@268@ +M;F]T('-E="P*("`@("`@("`C('1H92!D865M;VX@=7-E6]U(&1E +M8W)E87-E('1H:7,*("`@("`@("`C('9A;'5E+"!T:&4@;G5M8F5R(&]F(&%C +M:VYO=VQE9V1M96YT6]U"B`@("`@("`@(R!I;F-R96%S +M92!T:&ES('9A;'5E+"!T:&4@'!E6-L97,@6]U('1O(&1I +M'1E'1E +MF%T:6]N +M(&UE2!O9B!Y;W5R(&5X:7-T:6YG(&EN=&5R9F%C97,N($EF +M(&%N>2!D;W5B="P*("`@("`@("`C(&1O(&YO="!M;V1I9GD@=&AI0H@("`@("`@(",@9&]U +M8G0L(&1O(&YO="!M;V1I9GD@=&AIF%T:6]N(&UEF%T:6]N(&UE6]U"B`@("`@ +M("`@(R!N;W1I8V4@6]U(&UA>2!W86YT('1O +M(&EN8W)E87-E('1H92!S:7IE"B`@("`@("`@(R!O9B!T:&4@2!T;R!A8VAI979E(&9A=6QT+71O;&5R86YC92X@26X@ +M8V%S92!O9B!D;W5B="P@9&\*("`@("`@("`C(&YO="!M;V1I9GD@=&AI6]U(&-A;B!O;FQY('-E;&5C="!O;F4N"B`@("`C"B`@("`C(%5$4"![ +M"B`@("`@("`@(PH@("`@("`@(",@5410(&%D9')E6]U(&%R92!G;VEN9R!T;R!UF4*("`@("`@("`C"B`@("`@("`@ +M(R!28W93;V-K971"=69F97(@,3(T.3(X,`H*("`@("`@("`C"B`@("`@("`@ +M(R!%;F%B;&4O1&ES86)L92!M97-S86=E(&-H96-KPH@("`@(PH@("`@(R!3970@=&AE +M(&YI8V4@=F%L=64@;V8@=&AE(&1A96UO;BP@=&AI6]U(&-A;B!S96QE8W0@8F5T=V5E +M;@H@("`@(R!24B!A;F0@1DE&3R!A;F0@=&AE('!R;V-EPH@("`@(R`@(%1Y<&4@1DE&3PH@("`@(R`@(%!R:6]R:71Y +M(#DY"B`@("`C('T*"B`@("`C"B`@("`C($YU;6)E2X*("`@(",@4F5A9"!S;VUE(&1O8W5M96YT +M2!K965P +M('-O;64@9&5A9"!E;G1R:65S(&-A8VAE9"!F;W(@<&]S7-L;V2!N86UE +M("AD865M;VX@*&1E9F%U;'0I(&]R(&QO8V%L,"XN-RD*("`@(",@1&5F875L +M=#H@;V9F"B`@("`C"B`@("!3>7-L;V<@;VX*"B`@("`C"B`@("`C($QO8VMF +M:6QE"B`@("`C"B`@("!,;V-K1FEL92`O=F%R+VQO8VLO8V]N;G1R86-K9"YL +M;V-K"@H@("`@(PH@("`@(R!5;FEX('-O8VME="!C;VYF:6=UF5-87A'&%M<&QE(&-O;F9I9W5R +M871I;VX@9FEL92!S971S('1H90H@("`@(R!S:7IE('1O(#(@34)Y=&5S('1O +M(&%V;VED('1H:7,@F4*("`@(",@:68@:70@9&5T96-T&EM=6T@8G5F9F5R('-I>F4@9W)O=W1H('1H870@8V%N(&)E(')E86-H +M960N(%1H:7,@97AA;7!L92!F:6QE"B`@("`C('-E=',@=&AE('-I>F4@=&\@ +M."!-0GET97,N"B`@("`C"B`@("!.971L:6YK0G5F9F5R4VEZ94UA>$=R;W=T +M:"`X,S@X-C`X"@H@("`@(PH@("`@(R!)9B!T:&4@9&%E;6]N(&1E=&5C=',@ +M=&AA="!.971L:6YK(&ES(&1R;W!P:6YG('-T871E+6-H86YG92!E=F5N=',L +M"B`@("`C(&ET(&%U=&]M871I8V%L;'D@6YC:')O +M;FEZ871I;VX@86=A:6YS="!T:&4@2V5R;F5L"B`@("`C(&%F=&5R(#,P('-E +M8V]N9',@*&1E9F%U;'0@=F%L=64I+B!297-Y;F-H6]U('=A;G0@6YC+B!4:&ES(&]P=&EO;B!I"!K97)N96P@/CT@ +M,BXV+C,Q+@H@("`@(PH@("`@(R!.971L:6YK179E;G1S4F5L:6%B;&4@3V9F +M"@H@("`@(PH@("`@(R!">2!D969A=6QT+"!T:&4@9&%E;6]N(')E8V5I=F5S +M('-T871E('5P9&%T97,@9F]L;&]W:6YG(&%N"B`@("`C(&5V96YT+61R:79E +M;B!M;V1E;"X@66]U(&-A;B!M;V1I9GD@=&AIF%T:6]N(&UO +M9&4L('1H92!P;VQL:6YG(&UO9&4@8V%N(&]N;'D@9W5AF5S('1H92!H86YD;&EN9R!O9B!S +M=&%T92UC:&%N9V4@979E;G1S(&-O;6EN9PH@("`@(R!F2`H:6X@ +M=&5R;7,@;V8*("`@(",@2!T:')E92!F:6QT97(M6]U(&-A;B!D969I;F4@=&AE(&5V +M96YT(&9I;'1E2!A=F]I +M9&EN9R!T:&4@8V]P>2!O9B!T:&4@979E;G0@;65S6]U(')E<75I"!K97)N96P@/CT@,BXV+C(Y('1O"B`@("`C +M(&9I;'1E6]U('=A;G0@=&\@PH@ +M("`@("`@(",*("`@("`@("`C($%C8V5P="!O;FQY(&-E65R(#0@<')O +M=&]C;VPN"B`@("`@("`@(PH@("`@("`@(%!R;W1O8V]L($%C8V5P="!["B`@ +M("`@("`@("`@(%1#4`H@("`@("`@("`@("!30U10"B`@("`@("`@("`@($1# +M0U`*("`@("`@("`@("`@5410"B`@("`@("`@("`@($E#35`@(R!4:&ES(')E +M<75I2!A;&P@=&AE"B`@("`@("`@(R!)4"!A +MPH@("`@("`@("`@ +M("!)4'8T7V%D9')E2!A;B!)4'8V(&%D9')E2!F;&]W('-T871E+@H@("`@("`@(",@5&AI +M2!B86-K=7`*("`@("`@("`C(&9I +M7!E/6YO=&EF>0H@("`@4WES=&5M9"!O;@I]"@`````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````!O<'0O8VQO=60O=&5M +M<&QA=&5S+V-H96-K7VAE87)T8F5A="YS:"YT96UP;``````````````````` +M````````````````````````````````````````````````````````,#`P +M,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7-T96UC=&P@2`M+69A=6QT"@H@("`@<&MI;&P@+3D@:V5E<&%L:79E9"`^/B`D4D]55$52 +M7TQ/1R`R/B8Q('Q\('1R=64*("`@('!K:6QL("TY(&-O;FYT&ET"F9I"@``````````````;W!T+V-L;W5D+W1E;7!L871E +M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI +M86YC90HC('=I=&@@=&AE($QI8V5N6]U +M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HA +M('=I=&@@=&AE($QI8V5NPH@("`@PH@("`@("`@(&AE87)T +M8F5A=`H@("`@?0H*("`@(&YO=&EF>5]B86-K=7`@(B]O<'0O8VQO=60O8FEN +M+VUA2`M+6)A8VMU<"(*("`@(&YO=&EF>5]M87-T97(@(B]O<'0O +M8VQO=60O8FEN+VUA2`M+6UA5]F875L +M="`B+V]P="]C;&]U9"]B:6XO;6%S=&5R+G!Y("TM9F%U;'0B"GT*```````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````!O<'0O8VQO=60O8FEN+P`````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````,#`P,#&4N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&ET(#$*?0H*&5?8V9G7V9I;&5N86UE(#P\14]&"D1%1D%53%0@ +M9&5F875L=`I04D]-4%0@,0I424U%3U54(#(V"D1)4U!,05D@8F]O="YMF4]-C8P,#`@:6YI=')D/21I;FET0`````````````````````````````````````````` +M````````````````````````````````````````````,#`P,#2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA +M=R!O'!R97-S(&]R(&EM<&QI960N +M("!3964@=&AE($QI8V5N7!E(ET@/3T@(G-T871I8VYA +M=')U;&5S(CH*("`@("`@("`@("`@;F5W7!E(ET@/3T@(F9O"`](&1B86=;"AF;W)W87)D*0H@("`@("`@("`@("`@("`@("`@(&EF(&YO +M="!I;F1E>"`]/2`M,3H*("`@("`@("`@("`@("`@("`@("`@("`@9&)A9UMS +M;W5R8V5?:7!=6VEN9&5X72`](&YE=W)U;&4*("`@("`@("`@("`@("`@("`@ +M("!E;'-E.@H@("`@("`@("`@("`@("`@("`@("`@("!D8F%G6W-O=7)C95]I +M<%TN87!P96YD*&YE=W)U;&4I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@ +M("`@("`@("`@("`@("`@(&1B86=;7!E(ET@/3T@ +M(G-T871I8VYA=')U;&5S(CH*("`@("`@("`@("`@("`@(&EF('-O=7)C95]I +M<"!I;B!D8F%G+FME>7,H*3H*("`@("`@("`@("`@("`@("`@("!D96P@9&)A +M9UMS;W5R8V5?:7!="B`@("`@("`@("`@(&5L:68@7,H*3H*("`@("`@("`@("`@("`@("`@("!I;F1E>"`] +M("TQ"B`@("`@("`@("`@("`@("`@("`@9F]R(&9O%T*"B`@("!R971U2!T:&4@<'5B;&EC('-I9&4L +M('1H;W-E(&UU7!E(ET@/3T@7!E(ET@/3T@(G-T871I +M8VYA="(Z"B`@("`@("`@2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET(#$*9FD*"G5S86=E*"D@ +M>PH@('!R:6YT9B`B57-A9V4Z("5S("U;8WQG?')\;GQD72!;+6P@/'!U8FQI +M8R!G871E=V%Y/ET@6RUV(#QV<&,@8VED&ET(#(@)&QO8VL@)&QO8VME9`H).SL*("!E +M&ET("0_("1L;V-K("1L;V-K960*9FD*"FEF +M(%L@(B1N9FQA9R(@/3T@(C$B(%T*=&AE;@H@("-G971?=G!N7W5S86=E"B`@ +M=6YL;V-K7V5X:70@)#\@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)&1F;&%G +M(B`]/2`B,2(@70IT:&5N"B`@(W)E;6]V95]U&ET(#`@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)')F;&%G(B`]/2`B +M,2(@70IT:&5N"B`@71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A +M=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&-E +M<'0@24]%2@I"B`@("`@("`@("`@ +M("`@("`@("`@9W5E22R)$;VU57U)E<75E&-E<'0@17AC97!T:6]N(&%S(&4Z +M"B`@("`@("`@("`@("`@("`@("`@;&]G9VEN9RYE7!E)UT@/3T@)V%L;"<@86YD(&]B:ELG +M7!E(#T@(F%N>2(*("`@("`@("`@("`@:68@(FEC +M;7!?='EP92(@:6X@7,H*2!A;F0@7!E)UT*("`@("`@("`@("`@:68@(FEC;7!? +M8V]D92(@:6X@7,H*2!A;F0@7!E)UTL('-E;&8N7!E("5S("UJ("5S(B`E("AI8VUP7W1Y<&4L('-E;&8N&5C=71E*&1S=$EP2==.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5; +M)V%C=&EO;B==(#T@(D%#0T505"(*("`@("`@("`@("`@("`@("`@("!E;'-E +M.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5;)V%C=&EO;B== +M(#T@(D123U`B"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ +M("`@("`@(",@1F]R(&]T:&5R(')U;&5S(&%D9&5D+"!I9B!D969A=6QT7V5G +M7!E("5S(B`E(&EC;7!?='EP90H@("`@("`@("`@("`@ +M("`@96QI9B!R=6QE6R=P7!E +M+B!3;RP@:71S(&9W(&%T=')I8G5T92!I7!E(#T@ +M(F%N>2(*("`@("`@("`@("`@("`@('-E;&8N<')O=&]C;VP@/2!S96QF+G1Y +M<&4*("`@("`@("`@("`@("`@(&EF(")I8VUP7W1Y<&4B(&EN(')U;&4N:V5Y +M7!E +M+"!R=6QE6R=I8VUP7V-O9&4G72D*("`@("`@("`@("`@("`@(&EF('-E;&8N +M='EP92`]/2`B<')O=&]C;VPB.@H@("`@("`@("`@("`@("`@("`@(&EF(')U +M;&5;)W!R;W1O8V]L)UT@/3T@-#$Z"B`@("`@("`@("`@("`@("`@("`@("`@ +M(')U;&5;)W!R;W1O8V]L)UT@/2`B:7!V-B(*("`@("`@("`@("`@("`@("`@ +M("!S96QF+G!R;W1O8V]L(#T@&5C=71E*")I<'1A +M8FQE+4$O:7!T86)L97,@+70@9FEL=&5R("U$+V&5C=71E*")I +M<'-E="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP +M&5C=71E*")I<'-E="`M +M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP2!V +M86QI9"!D871A"B`@("`@("`@("`@("`@("!I9B!F;VQD97(@(3T@(G5S97)D +M871A(B!A;F0@9F]L9&5R("$](")M971A9&%T82(Z"B`@("`@("`@("`@("`@ +M("`@("`@8V]N=&EN=64*"B`@("`@("`@("`@("`@("!I9B!F:6QE(#T]("(B +M.@H@("`@("`@("`@("`@("`@("`@(&-O;G1I;G5E"@H@("`@("`@("`@("`@ +M("`@7,N97AI="@Q*0H@("`@("`@("`@("!I9B!O2Q!;&QO=UQN1&5N>2!F2!E>&ES=',L('=E(&1O(&ET('1H:7,@ +M=V%Y(&9O7,N97AI="@Q +M*0H*("`@("`@("!F:"`](&]P96XH:'1A8V-E2`](")2 +M97=R:71E4G5L92!>;65T82UD871A+R@N*RDD("`N+B\B("L@9F]L9&5R("L@ +M(B\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%=(@H@("`@("`@("`@("!H +M=&%C8V5S7,N97AI="@Q*2`@ +M(R!&25A-10H@("`@("`@(')E='5R;B!4&ET*#$I("`C($9)6$U%"B`@("`@("`@:7!S96,N=G!N+2@N*BDN8V]N9B(L(&9I;&4I"B`@("`@ +M("`@("`@(&EF(&TZ"B`@("`@("`@("`@("`@("!S96QF+F-O;F9I<',N87!P +M96YD*&TN9W)O=7`H,2DI"@H@("`@("`@(&9O&5C=71E*")I<'-E +M8R!R96QO860B*0H*("`@(&1E9B!C;VYF:6=U#4R-2`M:B!!0T-%4%0B("4@9&5V72D*("`@ +M("`@("!F;W(@;F5T(&EN(&]B:ELG<&5E&UA&UA5]I<"=="B`@("`@("`@<&5E7!E/71U;FYE;"(I"B`@ +M("`@("`@9FEL92YA9&1E<2@B(&%U=&AB>3US96-R970B*0H@("`@("`@(&9I +M;&4N861D97$H(B!K97EE>&-H86YG93UI:V4B*0H@("`@("`@(&9I;&4N861D +M97$H(B!I:V4])7,B("4@:6ME<&]L:6-Y*0H@("`@("`@(&9I;&4N861D97$H +M(B!I:V5L:69E=&EM93TE3TS,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1T:6UE;W5T/3$R +M,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1A8W1I;VX]')A;F=E*#,I.@H@("`@("`@("`@("!R +M97-U;'0@/2!#&5C=71E*"=I<'-E8R!S=&%T=7,@=G!N+25S +M('P@9W)E<"`B)7,B)R`E("AR:6=H='!E97(L('!E97)L:7-T+G-P;&ET*"(L +M(BP@,2E;,%TI*0H@("`@("`@("`@("!I9B!L96XH2P@)R,G*0H@("`@("`@(&EF(&YO="!U&5C +M=71E*")T9&)D=6UP("]V87(O&5C=71E*"=K:6QL("TY("5S)R`E('!I9"D*"@IC;&%S&5C=71E*")S>7-T96UC=&P@2YS96-R971S(B`E("AS96QF+E903D-/3D9$25(I"B`@("`@ +M("`@>&PR='!D8V]N9F9I;&4@/2`B+V5T8R]X;#)T<&0O>&PR='!D+F-O;F8B +M"B`@("`@("`@>&PR='!O<'1I;VYS9FEL92`]("(O971C+W!P<"]O<'1I;VYS +M+GAL,G1P9"(*"B`@("`@("`@;&]C86QI<"`](&]B:ELG;&]C86Q?:7`G70H@ +M("`@("`@(&QO8V%L8VED2`Z(%!32R!<(B5S7"(B("4@*&QE9G0L('!S:RDI"B`@("`@ +M("`@&PR='!D8V]N9F9I;&4I"B`@("`@("`@>&PR='!D8V]N9BYA9&1E<2@B +M:7`@&PR='!O<'1I;VYS+F-O;6UI="@I"@H@("`@9&5F(')E;6]T96%C8V5S4EP*'-E;&8L(&EP82DZ"B`@("`@("`@9F]R(&EN +M=&5R9F%C92!I;B!S96QF+F-O;F9I9RYA9&1R97-S*"DN9V5T7VEN=&5R9F%C +M97,H*3H*("`@("`@("`@("`@:68@:6YT97)F86-E+FEP7VEN7W-U8FYE="AI +M<&$I.@H@("`@("`@("`@("`@("`@2@I"B`@("`@("`@4EP*')U +M;&5;)W!U8FQI8U]I<"==*0H@("`@("`@(&EN=&5R;F%L7V9W:6YT97)F86-E +M(#T@4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI"B`@ +M("`@("`@<'5B;&EC7V9W<&]R=',@/2!S96QF+G!O4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI+`H@ +M("`@("`@("`@("`@("`@&UA2(Z"B`@("`@("`@("`@(&9W7W!R97)O=71?2(Z"B`@("`@("`@ +M("`@(&9W7W!O2(Z"B`@("`@("`@("`@ +M(&9W7W!O2(Z"B`@("`@("`@ +M("`@(&9W7V]U='!U=%]R=6QE("L]("(@+2UD<&]R="`E2(Z"B`@("`@("`@("`@(&9W +M7V]U='!U=%]R=6QE("L]("(Z(B`K('-E;&8N<&]R='-4;U-T4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI +M+`H@("`@("`@("`@("`@("`@&9F9F9F9F9F("TM +M8W1M87-K(#!X9F9F9F9F9F8B("4*("`@("`@("`@("`@("`@("`@("`@("`@ +M4EP*')U;&5;(FEN=&5R;F%L7VEP +M(ETI+"!S96QF+F=E=$=U97-T27`H*2E=*0H*"F-L87-S($EP5&%B;&5S17AE +M8W5T;W(Z"@H@("`@8V]N9FEG(#T@3F]N90H*("`@(&1E9B!?7VEN:71?7RAS +M96QF+"!C;VYF:62!PR)P&5C=71OR)P&5C +M=71OR)P +M&5C=71O7!E.B`E&5C27!T86)L97,H8V]N9FEG*3H* +M("`@("`@("!L;V=G:6YG+F1E8G5G*")0&5C=71O7,H*3H*("`@("`@("`@("`@ +M97AE8T1A=&%B86&5C27!T +M86)L97,H8V]N9FEG*0H@("`@96QI9B!J&5C27!T86)L97,H +M8V]N9FEG*0H@("`@96QS93H*("`@("`@("!L;V=G:6YG+G=A7!E/25S(B`E("AP6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7)I9VAT(&]W;F5R6]U('5N9&5R('1H +M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C +M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7)I +M9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT +M='`Z+R]W=W&5C=71I;F'!O2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&QO9V=E +M&ET(#(@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)$%F;&%G(B`] +M/2`B,2(@70IT:&5N"B`@861D7W-N870@("1P=6)L:6-)<`H@('5N;&]C:U]E +M>&ET("0_("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1$9FQA9R(@/3T@(C$B +M(%T*=&AE;@H@(')E;6]V95]S870@("1P=6)L:6-)<`H@('5N;&]C:U]E>&ET +M("0_("1L;V-K("1L;V-K960*9FD*"G5N;&]C:U]E>&ET(#$@)&QO8VL@)&QO +M8VME9`H````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````````````;W!T+V-L +M;W5D+V)I;B]V<&-?2!O9B!T:&4@3&EC96YS92!A=`HC"B,@ +M("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE +M($QI8V5N5]T86)L92@I('L*("!L;V-A;"!F5]T86)L92`B +MPH@(&QO8V%L(')U +M;&4])#$*("!L;V-A;"!I<#TD*&5C:&\@)')U;&4@?"!C=70@+60Z("UF,2D* +M("!I9B!;("1I<"`]/2`B4F5V;VME(B!="B`@=&AE;@H@("`@3TD9V%T97=A>2!C:61R/21C +M:61R(@H@(&QO8V%L(&1E=CTD*&=E=$5T:$)Y27`@)&EP*0H@(&EF(%L@)#\@ +M+6=T(#`@70H@('1H96X*("`@(')E='5R;B`Q"B`@9FD*("!S=61O(&EP(')O +M=71E(&%D9"`D8VED3TD9V%T97=A>2!C:61R/21C:61R(@H@ +M(')E='5R;B`D&ET(#(@)&QO8VL@)&QO8VME +M9`H@("`@("`@(#L["B`@97-A8PID;VYE"@II9B!;("UN("(D6EN9R!F=R!R=6QE +M&ET("1S=6-C97-S("1L;V-K("1L;V-K960*```````` +M``````````````````````````````!O<'0O8VQO=60O8FEN+V)A0`````````````````````````````````````````````````` +M````````````````````````````````````````````,#`P,#7)I9VAT(&]W;F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* +M(R`@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI +M8V5N&5C=71A8FQE/2&-E<'1I;VX@86YD('-E;&8N<')O8V5S&5C=71E('-H96QL(&-O;6UA;F0Z("5S +M)R`E('-E;&8N8VUD*0H@("`@("`@("`@("!E2<@:6X@<#H*("`@ +M("`@("`@("`@("`@("`@("`@("`@&-E<'1I;VXH)V-A;FYO="!F:6YD(&)A2!I;B`E&-E<'1I;VXH)V-A;FYO="!F:6YD +M(&AO2P@PH@("`@("`@("`@("`B87!I2V5Y(CH@87!I:V5Y+`H@ +M("`@("`@("`@("`B8V]M;6%N9"(Z("=N;W1I9GE"87)E;65T86Q07,H*2P@4)A3TE2P@5]P2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ +M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&EP=&%B;&5S +M+7-A=F5\9W)E<"`B24Y0550@+6H@3D545T]22U]35$%44R(@/B`O9&5V+VYU +M;&P*("!I9B!;("0_("UE<2`P(%T*("!T:&5N"B`@("`@(')E='5R;B`D/PH@ +M(&9I"B`@:7!T86)L97,@+4X@3D545T]22U]35$%44R`^("]D978O;G5L;`H@ +M(&EP=&%B;&5S("U)($9/4E=!4D0@+6H@3D545T]22U]35$%44R`^("]D978O +M;G5L;`H@(&EP=&%B;&5S("U)($E.4%54("UJ($Y%5%=/4DM?4U1!5%,@/B`O +M9&5V+VYU;&P*("!I<'1A8FQEPH@(&EP=&%B +M;&5S("U,($Y%5%=/4DM?4U1!5%,@+6X@+78@+7@@?"!A=VL@)R0Q('X@+UY; +M,"TY72LD+R![('!R:6YT9B`B)7,Z(BP@)#)])SL@/B`O9&5V+VYU;&P*("!I +M9B!;("UF("]R;V]T+W)E;6]V9616:69S(%T@.R!T:&5N(&EP=&%B;&5S("U: +M($Y%5%=/4DM?4U1!5%,@.R!F:3L@/B`O9&5V+VYU;&P*("`O&ET("0_("1L;V-K("1L +M;V-K960*9FD*"FEF(%L@(B1A9FQA9R(@/3T@(C$B(%T*=&AE;@H@("-A9&1? +M<'5B;&EC7VEN=&5R9F%C92`D<'5B;&EC268*("!U;FQO8VM?97AI="`D/R`D +M;&]C:R`D;&]C:V5D"F9I"@II9B!;("(D9&9L867)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&ET(#$*9FD*"G-E="`M>`IU2(*"FEF(%L@)#\@+65Q(#`@70IT:&5N +M"B`@("!T/6!D871E("LE2(*:68@6R`D/R`M;F4@ +M,"!="B`@('1H96X*("`@("`@*&-R;VYT86(@+6P@.V5C:&\@+64@(B-M;VYI +M=&]R:6YG0V]N9FEG7&Y32$5,3#TO8FEN+V)A2(I('P@8W)O;G1A8B`M"B`@("`@(&QO9V=E2!F;W(@;6]N:71O6]U(&UA>2!N;W0@=7-E('1H:7,@ +M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NWT*("`@(&9OF4G72`]('-T&QE;BD*("`@(&EF("=N=U]T>7!E)R!N;W0@:6X@:7`N:V5Y7!E)UT@/2`G<'5B;&EC)PH@("`@96QS93H* +M("`@("`@("!I<%LG;G=?='EP92==(#T@:7!;)VYW7W1Y<&4G72YL;W=E7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C +M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F +M('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5LP77T*"B`@("`@("`@("`@ +M("`@("!T;T1A=&5686P])"AD871E("UD("(D9&%T979A;"(@(BLE7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z +M+R]W=W0IE:F5C +M="!\?"!T0IS>7-T96UC=&P@7-T96UD+6IO=7)N +M86QD"@I465!%/20H9W)E<"`M4&\@)W1Y<&4]7$M;82UZ02U:72HG("]V87(O +M8V%C:&4O8VQO=60O8VUD;&EN92D*:68@6R`B)%194$4B(#T](")R;W5T97(B +M(%T@?'P@6R`B)%194$4B(#T](")V<&-R;W5T97(B(%T@?'P@6R`B)%194$4B +M(#T](")D:&-P"`O;W!T+V-L;W5D+V)I +M;B]U<&1A=&5?8V]N9FEG+G!Y(%T*("!T:&5N"B`@("`O;W!T+V-L;W5D+V)I +M;B]U<&1A=&5?8V]N9FEG+G!Y(&-M9%]L:6YE+FIS;VX@?'P@=')U90H@(&9I +M"F9I"@I;("$@+68@+W9A7-T96UD+W-S:&0@;65M;W)Y(&QE86L@+2!H='1P7-T96UD+VES7-T +M96UD+75S97(*"B,@16YA8FQE(&%N9"!3=&%R="!34T@*7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R +M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T +M"B,*(R`@(&AT='`Z+R]W=W2!S=&]R86=E('-Y7`])$A94$525DE33U(*("!I9B!; +M("(D:'EP(B`]/2`B=FUW87)E(B!=('Q\(%L@(B1H>7`B(#T](")H>7!E5]H='1P"B`@83)E;FUO9"!H96%D97)S"@H@(&-A="`^+V5T8R]A +M<&%C:&4R+V-OTA45%!3?2`];VX*4F5W7,@"UR97%U97-T960M=VET:"P@0V]N=&5N="U4 +M>7!E+"!O6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I +M="`B4V5T=&EN9R!U<"!);G1E&5C=71E(&EL8G9M('-V8W,B"B`@97AI="`Q"F9I"G-E +M='5P7VEL8G9M"@`````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````!O<'0O8VQO=60O8FEN+W-E='5P+W9P8W)O=71E2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N7-T96T@=FTB"@H@(&EF(%L@+68@ +M+V5T8R]H;W-TB`D1$]-04E.(%T@)B8@ +M1$]-04E./2)C;&]U9&YI;F4N:6YT97)N86PB"B`@(T1.4R!S97)V97(@=VEL +M;"!A<'!E;F0@)$1/34%)3B!T;R!L;V-A;"!Q=65R:65S"B`@6R-=*FQO8V%L/2XJ)"]L;V-A;#U<+R1$3TU!24Y< +M+R\B("]E=&,O9&YS;6%S<2YC;VYF"@H@(&-O;6UA;F0@+78@9&AC<%]R96QE +M87-E(#X@+V1E=B]N=6QL(#(^)C$*("!N;U]D:&-P7W)E;&5A&ET(#$*9FD*2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&EF(%L@(B1(65!%4E9)4T]2(B`A/2`B=FUW87)E(B!=.R!T:&5N +M"B`@("!R971U6YC"B`@2]L;V=R;W1A=&4@+V5T8R]C2`R/B8Q"B`@9FD*?0H*6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ +M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I="`B +M4V5T=&EN9R!U<"!%;&%S=&EC($QO860@0F%L86YC97(@7)I9VAT(&]W;F5R6]U('5N9&5R('1H +M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C +M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7!EPH@(&EF(%L@+60@+W!R;V,O>&5N(%T[('1H96X*("`@ +M(&UO=6YT("UT('AE;F9S(&YO;F4@+W!R;V,O>&5N"B`@("`D*&1M97-G('P@ +M9W)E<"`M<2`B6&5N($A632(I"B`@("!I9B!;("0_("UE<2`P(%T[('1H96X@ +M(",@,3U05BPP/4A630H@("`@("!E8VAO(")X96XM:'9M(B`F)B!R971UF5D(&%S($AY +M<&5R=B!W:&5N(%9IPH@(%L@(2`M9"`O<')O +M8R]X96X@72`F)B!S960@+6D@)W,O7G9C+R-V8R\G("]E=&,O:6YI='1A8B`F +M)B!T96QI;FET('$*("!;("UD("]P +M(W9C+W9C+R<@+V5T8R]I;FET=&%B("8F('1E;&EN:70@<0H*("!S>7-T96UC +M=&P@9&%E;6]N+7)E;&]A9`H*("!C87-E("1(65!%4E9)4T]2(&EN"B`@("`@ +M>&5N+7!V?'AE;BUD;VU5*0H@("`@("`@("`@7-T +M96UC=&P@7-T96UC=&P@9&ES86)L92!N +M='!D"B`@("`@("`@("!S>7-T96UC=&P@96YA8FQE('AE+61A96UO;@H@("`@ +M("`@("`@&5N=&]O;',@;F]T(&EN7Q#3TY&24=? +M2$]44$Q51U]00TE?04-023UY)R`O8F]O="]C;VYF:62`M +M3"`Q,34R,#`@='1Y4S`@=G0Q,#(B("]E=&,O:6YI='1A8@H@("`@("`@("`@ +M7-T96UC=&P@2!C;61L +M:6YE(&9I;&4@9G)O;2!Q96UU+6=U97-T+6%G96YT(@H@("`@("`@("`@("`@ +M(&)R96%K"B`@("`@("`@("`@(&9I"B`@("`@("`@("`@('-L965P(#$*("`@ +M("`@("`@(&1O;F4*("`@("`@("`@(&EF(%L@(2`M7-T96T@=&EM92!S>6YC)V0@=VET:"!H;W-T('9I82!V;7=AF5D +M(&%S('9I7!E7!E +M65S+"!H86-K>2$I"B`@("`@ +M("`@("!D;6ED96-O9&4@?"!G2(*("`@("`@("`@(&9I"B`@("`@("`@("`[.PH@(&5S86,*"B`@ +M(R!&:6YD(&%N9"!E>'!O7-T96UV;2@I('L*("!L;V-A;"!P871C:&9I;&4])#$*("!L;V-A;"!B +M86-K=7!F;VQD97(](B]T;7`O+F-O;F8N8F%C:W5P(@H@(&QO8V%L(&QO9V9I +M;&4](B]V87(O;&]G+W!A=&-H7-T96UV;2]C;VYF+V-L;W5D+FIK7-T96UV;2]C +M;VYF+RH@)&)A8VMU<&9O;&1E7-T96UV;0H@(&5C:&\@(D%L;"(@?"!U;GII<"`D<&%T8VAF:6QE("UD("]U +M&%R +M9W,@8VAM;V0@-34U"B`@:68@6R`M9B`D8F%C:W5P9F]L9&5R+V-L;W5D+FIK +M7-T96UV;2]C;VYF+PH@("`@96-H;R`B4F5S=&]R960@:V5Y +M7-T;W)E"B`@ +M:V5Y=&]O;"`M:6UP;W)T:V5Y7-T;W)E("]E=&,O7-T;W)E("]UU!!5$-(7TU/54Y4?2]A9V5N="YZ:7`@72`F)B!; +M("UF("]V87(O8V%C:&4O8VQO=60O<&%T8V@N7!E/21465!%(B`^/B`D +M;&]G9FEL90H@("`@<&%T8VA?FEP"B`@("!I9B!;("0_("UG="`P(%T*("`@('1H96X*("`@("`@96-H +M;R`B1F%I;&5D('1O(&%P<&QY('!A=&-H('-Y7-T +M96UD+W-Y365M.B][<')I;G0@)#)])RD*("!I9B!;("0H*'!H>7-M +M96TI*2`M;'0@-#`Y-C`P(%T[('1H96X*("`@("`@6YC"B`@'!O7!E&ET(#$P"B`@;&]G7VET(")3=&%R=&EN9R!G=65S="!S97)V:6-E2YS:``````````` +M```````````````````````````````````````````````````````````` +M````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@ +M("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE +M($QI8V5NPH@(&QO9U]I="`B4V5T=&EN9R!U<"!C;VYS +M;VQE('!R;WAY('-Y'D@+V5T8R]I<'1A8FQE'D*```````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````````````````;W!T +M+V-L;W5D+V)I;B]S971U<"]C;VUM;VXN6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5]M86-S*"D@>PH@("`@;6%CS,Z+2(O971C+W5D978OV%D9')E5]M86-S("(D +M3DE#7TU!0U,B"B`@9FD*?0H*PH@(&QO8V%L +M(&EN=&9N=6T])#$*("!L;V-A;"!I<#TD,@H@(&QO8V%L(&UAVEN=&9N=6U]"B`@;&]C86P@8F]O='!R;W1O/2)S=&%T:6,B"@H@(&EF(%L@ +M(B1"3T]44%)/5$\B(#T](")D:&-P(B!="B`@=&AE;@H@("`@:68@6R`B)&EN +M=&9N=6TB("$]("(P(B!="B`@("!T:&5N"B`@("`@("!B;V]T<')O=&\](F1H +M8W`B"B`@("!F:0H@(&9I"@H@(&EF(%L@(B1I<"(@(3T@(C`N,"XP+C`B("UA +M("(D:7`B("$]("(B("UO("(D9F]R8V4B(#T](")F;W)C92(@70H@('1H96X* +M("`@("!E8VAO(")I9F%C92`@)&EN=&8@:6YE="`D8F]O='!R;W1O(B`^/B`O +M971C+VYE='=O7-C=&P@;F5T+FEP +M=C8N8V]N9BYA;&PN9&ES86)L95]I<'8V/3`*("!S>7-C=&P@;F5T+FEP=C8N +M8V]N9BYA;&PN9F]R=V%R9&EN9STQ"B`@7,O;F5T+VEP=C0O:7!?9F]R=V%R9`H@(%L@+68@+V5T +M8R]I<'1A8FQE7,O;F5T+VEP=C0O8V]N9B]D969A=6QT+W)P7V9I;'1E +M<@H@("`@("!F;W(@=FEF(&EN("16249?3$E35#L@9&\*("`@("`@("`@;&]G +M7VET(")C;&]U9#H@9&ES86)L92!R<%]F:6QT97(@;VX@<'5B;&EC(&EN=&5R +M9F%C93H@)'9I9B(*("`@("`@("`@7,O;F5T +M+VEP=C0O8V]N9B]L;R]R<%]F:6QT97(*?0H*96YA8FQE7VER<6)A;&%N8V4H +M*2!["B`@;&]C86P@96YA8FQE9#TD,0H@(&QO8V%L('!R;V,],`H*("!PPH@ +M(&QO8V%L(&5N86)L93TD,0H*("!I9B!;("1E;F%B;&4@+65Q(#`@70H@('1H +M96X*("`@("`@96-H;R`P(#X@+V5T8R]R<'-R9G-E;F%B;&4*("`@("`@#TD*'!R:6YT9B`B)7A<;B(@)&YU;2D*("!E8VAO("1H97@["B`@(V5N +M86)L92!R<',*("!E8VAO("1H97@@/B`O"TP+W)P7,O;F5T+V-OPH@(&EN:71?:6YT97)F86-EB`B)&=W9&5V +M(B!="B`@("!T:&5N"B`@("`@(&=W9&5V/2)E=&@P(@H@("`@9FD*"B`@("!I +M<"!R;W5T92!A9&0@9&5F875L="!V:6$@)$=7(&1E=B`D9W=D978*("!F:0H* +M("`C(%=OW!R:6YT("0Q(BXB)#(B+B(D,R(N,2)])RD*("`@("`@=&EM +M96]U="`S('!I;F<@+6X@+6,@,R`D34=-5%]'5R`F"B`@9FD*"B`@:68@6R`B +M)$A94$525DE33U(B(#T](")V;7=A6YC +M(&5N86)L90H@(&9I"GT*"G-E='5P7V1NB`D1$]-04E.(%T@)B8@1$]-04E./2)C +M;&]U9&YI;F4N:6YT97)N86PB"B`@(W)E;6]V:6YG('1H92!D;G-M87-Q(&UU +M;'1I<&QE(')A;F=E6R-=*FQO8V%L/2XJ +M)"]L;V-A;#U<+R1$3TU!24Y<+R\B("]E=&,O9&YS;6%S<2YC;VYF"B`@9FD* +M"B`@:68@6R`M;B`@(B1$3E-?4T5!4D-(7T]21$52(B!="B`@=&AE;@H@("`@ +M("!S960@+6D@+64@(B]>6R-=*F1H8W`M;W!T:6]N+BH],3$Y+BHD+V0B("]E +M=&,O9&YS;6%S<2YC;VYF"B`@("`@(&5C:&\@(F1H8W`M;W!T:6]N+69O9&AC<"UR86YG95]I<#0]+BHD+V1H8W`M9&AC<"UR86YG95]I<#8]+BHD+V1H8W`M +M6R-=*F1H8W`M;W!T:6]N/6]P=&EO;CIR;W5T97(N*B0O +M9"(@+V5T8R]D;G-M87-Q+F-O;F8*("!;("1$149!54Q47T=7(%T@)B8@96-H +M;R`B9&AC<"UO<'1I;VX];W!T:6]N.G)O=71E6R-=*F1H8W`M;W!T:6]N/6]P=&EO +M;C8Z9&YS+7-EB`B)$542#!?25`V(B!="B`@=&AE;@H@ +M("`@("!E8VAO(#$@/B`O=F%R+V-A8VAE+V-L;W5D+V1N;&5A7-T96UC=&P@9&ES86)L92!A<&%C:&4R"B`@8VQE86Y?:7!A;&EA +M&%M<&QE+F-O;F8*("!R +M;2`M9B`O971C+V%P86-H93(O26YC;'5D92!P;W)T2!0 +M>71H;VX@0W-!<'`@8V]N9FEG7&XC26YC;'5D92!P;W)T&5S +M($UU;'1I5FEE=W,B+R)/<'1I;VYS("U);F1E>&5S($UU;'1I5FEE=W,B+R`O +M971C+V%P86-H93(O;6]D&5S(B`^("]V87(O=W=W+VAT;6PO+FAT86-C97-S +M"GT*"G-E='5P7V%P86-H93(H*2!["B`@;&]G7VET(")3971T:6YG('5P(&%P +M86-H92!W96(@2!A;F0@;F]T('=OPH@('!U8FQI8U]I<#TD151(,E])4`H@(%L@(B1%5$@R7TE0(B`] +M/2`B,"XP+C`N,"(@72`F)B!P=6)L:6-?:7`])$542#%?25`*("!E8VAO("1P +M=6)L:6-?:7`*?0H*PH@("`@;&]G7VET(")3971T:6YG +M('5P($Y44"(*("`@($Y44%]#3TY&7T9)3$4](B]E=&,O;G1P+F-O;F8B"B`@ +M("!I9B!;("UF("1.5%!?0T].1E]&24Q%(%T*("`@('1H96X*("`@("`@("!) +M1E,])RPG(')E860@+6$@R-S97)V97)?;&ES=%M` +M77TM,2`[(&ET97)A=&]R/CTP(#L@:71E2!A<&%C:&4R +M(B`^("]V87(O8V%C:&4O8VQO=60O96YA8FQE9%]S=F-S"B`@(&5C:&\@(F-L +M;W5D(&YFT-(149?5$U0 +M7T9)3$5]"B`@("`@($-/34U!/2(L7&Y<="(*("`@("`@8V%S92`D2T59(&EN +M"B`@("`@("`@9&ES86)L95]R<%]F:6QT97(I"B`@("`@("`@("`@(&5X<&]R +M="!$25-!0DQ%7U)07T9)3%1%4CTD5D%,544*("`@("`@("`@("`@.SL*("`@ +M("`@("!E=&@P:7`I"B`@("`@("`@("`@(&5X<&]R="!%5$@P7TE0/21604Q5 +M10H@("`@("`@("`@("`[.PH@("`@("`@(&5T:#%I<"D*("`@("`@("`@("`@ +M97AP;W)T($542#%?25`])%9!3%5%"B`@("`@("`@("`@(#L["B`@("`@("`@ +M971H,FEP*0H@("`@("`@("`@("!E>'!O'!O'!O'!O'!O'!O'!O'!O +M'!O'!O'!O +MF4I"B`@("`@("`@("`@(&5X<&]R="!'54535%]#24127U-) +M6D4])%9!3%5%"B`@("`@("`@("`@(#L["B`@("`@("`@'!O'!O +M'!O'!OF4@8VQO=60@<&%S2!S"(B(%T*("!T:&5N"B`@("!E8VAO(")R;V]T.B1635]005-35T]21"(@?"!C +M:'!A6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I="`B4V5T=&EN9R!U<"!D:&-P('-E7-T96T@ +M=FTB"B`@2!A;&QO=R!$3E,@&5C=71E(&1H8W!S7)I9VAT(&]W +M;F5R6]U +M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O +M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W +M=WPH@ +M(&5C:&\@(B0H9&%T92D@)$`B(#X^("]V87(O;&]G+V-L;W5D+FQO9PH@(&QO +M9U]A8W1I;VY?;7-G("(D0"(*?0H*<&%T8V@H*2!["B`@;&]C86P@4$%40TA? +M34]53E0]+VUE9&EA+V-D@H@(&QO8V%L('!R:79K97D])%!!5$-( +M7TU/54Y4+V%U=&AOVUD-69I;&5]*0H@("`@;&]C +M86P@;F5W;60U/0H@("`@6R`M9B`D>W!A=&-H9FEL97T@72`F)B!N97=M9#4] +M)"AM9#5S=6T@)'MP871C:&9I;&5]('P@87=K("=[<')I;G0@)#%])RD*"B`@ +M("!L;V=?:70@(E-CW!A=&-H9FEL97T@72`F)B!;("(D;F5W +M;60U(B`A/2`B(B!="B`@("!T:&5N"B`@("`@('1AF8@)'!A=&-H9FEL +M92`M0R`O"B`@("`@(&5C:&\@)'MN97=M9#5](#X@)'MM9#5F:6QE?0H@("`@ +M("!L;V=?:70@(E!A=&-H960@2`OF5D7VME>7,*("`@(&9I"B`@9FD*"B`@&5C=71I;F<@8VQO=60M96%R +M;'DM8V]N9FEG(@H*("`C($-L96%R("]T;7`@9F]R(&9I;&4@;&]C:PH@(')M +M("UF("]T;7`O*BYL;V-K"B`@6]U +M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC +M('=I=&@@=&AE($QI8V5N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&5N2!T;R!E;G-U'D@:6X@=&AE(')O +M=71I;F<@9&]M86EN"G)E8V]N9FEG7VQB*"D@>PH@(&QO9V=E'D@=&\@<')E=FEO=7,@ +M'DN8V9G+F]L9"`O971C+VAA<')O>'DO:&%P +M2YC9F'DN8V9G+FYE=PH@(&9I"GT*"F=E=%]V +M:69?;&ES="@I('L*("!L;V-A;"!V:69?;&ES=#TB(@H@(&9O7,O8VQA7!E(&]R('!A7!E(&]R('!A2!R96-E +M:79E2!F:7)E=V%L;"!R=6QE2!C;VYF:67!E(&]R('!A2!O +M9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI +M8V5N0H*"F1E9B!M +M97)G92AD8F%G+"!D871A*3H*("`@(&1B86=C(#T@8V]P>2YD965P8V]P>2AD +M8F%G*0H*("`@('!R:6YT(&1B86<*("`@('!R:6YT(&1A=&$*("`@(&EF(")V +M<&Y?=7-E7,H*3H*("`@("`@("!I +M9B!U7,H*2!A;F0@;F]T +M(&%D9#H*("`@("`@("`@("`@9&)A9V-;=7-E6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2D*("`@("`@("`@("`@9&%T82YU +M<&1A=&4H>R)I9"(Z('-E;&8N:V5Y?2D*("`@("`@("!F:6YA;&QY.@H@("`@ +M("`@("`@("!S96QF+F1B86<@/2!D871A"@H@("`@9&5F('-A=F4H2D* +M("`@("`@("`@("`@("`@(&IS;VXN9'5M<"@*("`@("`@("`@("`@("`@("`@ +M("!D8F%G+"!?9F@L"B`@("`@("`@("`@("`@("`@("`@&-E<'0@24]%2`](&ME>0H*"F-L87-S('5P9&%T941A=&%"867!E(#T]("=M;VYI=&]R22AS96QF +M+F1B+F=E=$1A=&%"867!E(#T]("=V<&YU7!E(#T]("=I<&%L:6%S +M97,G.@H@("`@("`@("`@("!S96QF+F1B+G-E=$ME>2@G:7!S)RD*("`@("`@ +M("`@("`@7!E*0H@("`@("`@("`@("!R971U +M2=="B`@ +M("`@("`@9'!;)VYI8U]D979?:60G72`](&1;)V1E=FEC92==6S,Z70H@("`@ +M("`@(&1P6R=N=U]T>7!E)UT@/2`G9W5E4AA8VLN=7!D871E7VYE='=OR=I<%]A9&1R97-S)SH@6V1P72P@)W1Y<&4G.B`G +M:7!S)WTI"B`@("`@("`@:68@)V1O;6%I;E]N86UE)R!N;W0@:6X@9"YK97ES +M*"D@;W(@9%LG9&]M86EN7VYA;64G72`]/2`G)SH*("`@("`@("`@("`@9%LG +M9&]M86EN7VYA;64G72`](")C;&]U9&YI;F4N:6YT97)N86PB"@H@("`@("`@ +M(&0@/2!04AA8VLN=7!D871E7VYE='=O2AS96QF+"!D8F%G*3H*("`@("`@("!R971U2`]("=E=&@G("L@;G5M("L@)VEP)PH@("`@("`@(&1P(#T@>WT*("`@("`@ +M("!I9BAK97D@:6X@5T*("`@("`@("`@("`@9'!;)VYE=&UA7!E(#T] +M(")P=6)L:6,B.@H@("`@("`@("`@("`@("`@9'!;)V=A=&5W87DG72`]('-E +M;&8N<49I;&4N9&%T85LG8VUD7VQI;F4G75LG9V%T97=A>2=="B`@("`@("`@ +M("`@(&5L2==(#T@7!E)SH@)VEP +M2!T;R!D96%L('=I=&@@=&AIPH@("`@("`@("`@("`@("`@ +M)V%D9"7!E(#T@7!E(ET*("`@("`@("`@("`@=7!D871E1&%T84)A9RAS96QF*0H@ +M("`@("`@("`@("!R971U&-E<'1I;VX@97)R;W(@)WMEV9I;&5N86UE?22!B965N(&UO=F5D+B(N9F]R;6%T*&5RV9I;&5N86UE?27!E"@H@("`@9&5F(&=E=$1A=&$HB(*("`@("`@("!W:71H(&]P96XH +M;W)I9U!A=&@L("=R8B7,H*2!E;'-E(&1A +M=&%;)W!U8FQI8U]I<"=="@H@("`@("`@(&EN:71I86Q?9&%T82`](&-L5]I<"AI<"P@:6YI=&EA;%]D871A6R=C;VYF +M:62<@:6X@9&)A9ULG8V]N9FEG)UTN +M:V5Y5]I<"AC;',L(&EP+"!P5]I +M<"`]($9A;'-E"B`@("`@("`@:68@:7`@/3T@<')I=F%T95]G871E=V%Y7VEP +M.@H@("`@("`@("`@("!N97=?:7!?;6%T8VAE5]I<`H*("`@($!C;&%S0`````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````,#`P,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL +M92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2!S=&%T=7,*"F9R;VT@8W,N0W-#;VYF:6<@:6UP;W)T($-S +M0V]N9FEG"F9R;VT@;W!T<&%R7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R +M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T +M"B,*(R`@(&AT='`Z+R]W=WB`D,2!="G1H96X*("`@(&5C:&\@(D9A:6P@ +M=&\@9FEN9"!64$X@<&5E7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2`]('9P;ELG=G!N7W-E2!I;B!D +M8F%G+FME>7,H*2!A;F0@;F]T(&]P.@H@("`@("`@(&1E;"AD8F%G6VME>5TI +M"B`@("!E;'-E.@H@("`@("`@(&1B86=;:V5Y72`]('9P;@H@("`@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H +M='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI +M8V5N2`] +M(')O=71E6R=N971W;W)K)UT*("`@("`@("!D8F%G6VME>5T@/2!R;W5T90H@ +M("`@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R +M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T +M"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ +M=&AE($QI8V5N2`]('9P +M;ELG<&5E71H;VX*(R!, +M:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%3 +M1BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS +M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E +M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!F$EN"@H*<&%S&ES=',H9V5T5&]K96Y&:6QE*"DI.@H@("`@("`@('=I=&@@;W!E +M;BAG9714;VME;D9I;&4H*2P@)W(G*2!A2P@=F%L +M=64@/2!L:6YE+G-T7!E(#T@ +M7!E(#T]("=S96YD7VUY7W!A7-L;V7-L;V7-L;V7-L;V2!I +M<"]P87-S=V]R9%LE7-L;V7-L;V&-E<'0@2V5Y8F]A&-E<'1I +M;VXL(&4Z"B`@("`@("`@0`````````````````````````````````` +M`````````````````````````````````````````````````````````#`P +M,#`W-34`,#`P,36]U +M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC +M('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E +M<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NFEP7V9I;&4B"B`@("!E +M8VAO(")$96QE=&EN9R!D:6%G;F]S=&ECFEP7V9I;&4B +M"F5L6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ +M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N0H*"F1E9B!M97)G92AD8F%G+"!D871A*3H*("`@("(B(B!3:6UP;'D@ +M;W9E&ES='-I;F<@8F%G(&%S+"!T:&4@=VAO;&4@8V]N +M9FEG=7)A=&EO;B!I2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N4EP("@I +M>PH@(&QO8V%L(&EP/20Q"B`@9F]R(&1E=B!I;B!@;',@+3$@+W-Y6]U(&UA>2!N;W0@=7-E('1H +M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N +MWT*("`@("`@("!S96QF+F-H86YG960@/2!;70H@("`@("`@('-E +M;&8N9&5V:6YF;R`]($-S2&5L<&5R+F=E=%]D979I8V5?:6YF;R@I"B`@("`@ +M("`@2@I"B`@("`@("`@("`@(&5L2=="B`@("`@ +M("`@("`@('-L:6YE(#T@(F1H8W`M"P@:7`I"B`@("`@("`@("`@('-E;&8N +M8V]N9BYS96%R8V@H2D*("`@("`@("`@("`@ +M96QS93H*("`@("`@("`@("`@("`@(&QI&-E +M<'0@17AC97!T:6]N(&%S(&4Z"B`@("`@("`@("`@(&QO9V=I;F2!C;VYT2!R96-E:79E($1(0U!.04LN"B`@("`@ +M("`@(R!7:&5N(%9-(&ES(&5X<'5N9V5D+"!I=',@86-T:79E(&QE87-E(&%N +M9"!$2$-0+T1.4R!C;VYF:6<@:7,@<')O<&5R;'D@5LG;6%C7V%D9')E5LG9&5F875L=%]G871E=V%Y +M)UT*"B`@("!D968@861D7VAO6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7!E2`]($9A;'-E"B`@("`@("`@ +M9&5V(#T@)R<*("`@("`@("!F;W(@:6YT97)F86-E(&EN(&EN=&5R9F%C97,Z +M"B`@("`@("`@("`@(&EF(&1E=B`]/2!I;G1E&5C=71E*&-O;6UA;F0I"B`@("`@("`@("`@("`@("!I9B!D9795<#H*("`@ +M("`@("`@("`@("`@("`@("!L;V=G:6YG+FEN9F\H(D1E=FEC92`E65T+"!L970G +M5]I9E]N965D960H"B`@ +M("`@("`@("`@("`@("`B)7,O)7,B("4@*'-E;&8N0U-?5$5-4$Q!5$537T1) +M4BP@5]I9E]N965D960H"B`@("`@("`@("`@("(E +M&5C("1$045-3TX[+RTM97AE8R`D1$%%34].("TM("TM=G)R<#LO9R(@+V5T +M8R]I;FET+F0O:V5E<&%L:79E9"R(L(")] +M(BP@R(L(")](BP@6PH@("`@("`@("`@("`@("`@("`@ +M("`@(DE0=C1?861D&5C=71E*")R;2`M2`S,"!S96-O;F1S"B`@("`@("`@:&5A&ET:6YG +M(B`E("AE&5C=71E +M*"(E&PR='!D +M(BP@(G-T;W`B*0H@("`@("`@($-S2&5L<&5R+G-E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I +M<"@I*2YS=&]P*"D*"B`@("`@("`@&5C=71E*&-M9#(I"B`@("`@("`@("`@(&1E=B`] +M(&EN=&5R9F%C92YG971?9&5V:6-E*"D*"B`@("`@("`@8VUD(#T@(B5S("U# +M("5S(B`E("AS96QF+D-/3DY44D%#2T1?0DE.+"!S96QF+D-/3DY44D%#2T1? +M0T].1BD*("`@("`@("!#&5C=71E*"(E&PR='!D(BP@(G-T;W`B*0H*("`@ +M("`@("!I;G1E&5C=71E*&-M9"D*("`@("`@("`@("`@("`@(&QO9V=I +M;F2D*("`@("`@("`@ +M("`@("`@(&5X8V5P="!%>&-E<'1I;VXZ"B`@("`@("`@("`@("`@("`@("`@ +M;&]G9VEN9RYE&5C=71E*"(E&5C=71E*"(E&PR='!D(BP@(G)E +M2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@("`@ +M("`@("!I9B!G871E=V%Y.@H@("`@("`@("`@("`@("`@("`@(')O=71E+F%D +M9%]R;W5T92AD978L(&=A=&5W87DI"@H@("`@("`@("`@("`C(%1H92!F:7)S +M="!P=6)L:6,@:6YT97)F86-E(&AA&5C=71E +M*")A2!C;VYN=')A8VMD"B`@("`@("`@(B(B"B`@("`@("`@ +M;&EN97,@/2!;70H@("`@("`@(&QI;F5S+F%P<&5N9"@B7'1<=%QT25!V-%]A +M9&1R97-S("5S7&XB("4@(C$R-RXP+C`N,2(I"B`@("`@("`@;&EN97,N87!P +M96YD*")<=%QT7'1)4'8T7V%D9')E7!E(&%N9"!D96-I9&5S(&EF(&ET(&ES(&%N(&EN=&5R +M;F%L(&%D9')E0H@("`@("`@(%1H92!N97<@8V]D92!A +M;'-O(&=I=F5S('1H92!P;W-S:6)I;&ET>2!T;R!C;&]U9'-T86-K('1O(&AA +M=F4@82!H>6)R:60@9&5V:6-E"B`@("`@("`@=&AA="!C;W5L9"!F=6YC=&EO +M;B!A2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N +M;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B971H,2)]"@I3 +M5$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S:"`M8R`@)VEF +M(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@96QS92!E8VAO +M(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@(")V<&-R;W5T +M97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@6R`D,"`]/2!< +M(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ"B`@("`@("`@ +M("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@("`@("`@(&-M +M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U +M8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@("`@("`@;&]G +M9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S(B`E('-T871E +M7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X96-U=&4H7!E*"E=(&%N9"!S=&%T92`]/2`B +M34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE8W5T92AC;60I +M"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@("`@("`@(&5X +M96-U=&4H8VUD*0H*"F1E9B!I&5C=71E*")M;W5N="!T +M;7!F6XH=F%L*3H*("`@(&EF('9A;#H*("`@("`@("!R +M971U&5C=71E*")I<"!A9&1R('-H;W<@?&=R97`@+78@ +MWT*("`@("`@("`@("`@=&];)VEP)UT@ +M/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A;'-;+3%="B`@ +M("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@("(B(@H@("`@ +M9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G*")3879I;F<@ +M:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C=71E*")S>7-T +M96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I;F7-T96UC=&P@&5C=71E*")K:6QL("U(55`@)7,B +M("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D;G-M87-Q(BP@ +M(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O0`````````````````````````````````````````````` +M`````````````````````````````````````````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E +M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI +M8V5N'1D;G,H*3H*("`@("`@("`@("`@9&YS+F%P<&5N9"AS +M96QF+F1A=&%;)W)O=71E2==(#T@=F%L"@H@("`@9&5F(&=E=%]N971M87-K*'-E;&8I.@H@ +M("`@("`@(",@5V4@;F5E9"!T;R!F:7@@:70@<')O<&5R;'DN($D@:G5S="!A +M9&1E9"!T:&4@:68L(&%S($EA;B!D:60@:6X@&-E<'1I;VXN"B`@("`@("`@:68@)W)O=71E6]U +M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC +M('=I=&@@=&AE($QI8V5N"YS=')I +M<"@I(&9O2!A +M9'9A;F-E9"(L("TQ*0H@("`@("`@(&-R;VXN8V]M;6ET*"D*"B`@("!D968@ +M&-L=61E9%]H96%L=&A?8VAE8VMS(ET*("`@("`@("`@("`@:&-? +M9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K0`````````` +M```````````````````````````````````````````````````````````` +M`````````````````````#`P,#`W-34`,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N7,H*3H*("`@("`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@ +M("`@(R!P2!P&ES=',Z(')U;&4])7,@=&%B;&4])7,B+"!F=ULR72P@;F5W7W)U;&4N +M9V5T7W1A8FQE*"DI"B`@("`@("`@("`@(&5L2`](&9W6S)="B`@("`@("`@("`@("`@("!I9B!F=ULQ72`]/2`B9G)O;G0B +M.@H@("`@("`@("`@("`@("`@("`@(&-P>2`](&-P>2YR97!L86-E*"2DI"B`@("`@("`@("`@("`@("`C(%1H97)E(&%R92!S;VUE +M(&ES3H*("`@("`@("`@ +M("`@=&%B;&4@/2`G)PH@("`@("`@("`@("!F;W(@:2!I;B!O<&5N*"(O971C +M+VEP=&%B;&5S+VEP=&%B;&5S+25S(B`E('1Y<&4I.@H@("`@("`@("`@("`@ +M("`@:68@:2YS=&%R='-W:71H*""`]/2!R=6QE70H* +M"F-L87-S($-S3F5T9FEL=&5R*&]B:F5C="DZ"@H@("`@9&5F(%]?:6YI=%]? +M*'-E;&8I.@H@("`@("`@('-E;&8N7!E)RP@)RTM0`````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```P,#`P-S4U`#`P,#$W-3``,#`P,32!O9B!T:&4@3&EC96YS92!A=`HC"B,@ +M:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&ES=',L(&5L5]P87)A;2D*("`@("`@("!E;'-E +M.@H@("`@("`@("`@("!L;V=G:6YG+FEN9F\H(D%D9&EN9R!R;W5T93H@9&5V +M("(@*R!D978@*R`B('1A8FQE.B`B("L*("`@("`@("`@("`@("`@("`@("`@ +M("`@('1A8FQE("L@(B!N971W;W)K.B`B("L@861D2!P87)A;65T97(@5]P87)A;2D*("`@("`@("!E;'-E.@H@("`@("`@ +M("`@("!L;V=G:6YG+FEN9F\H(D%D9&EN9R!R;W5T93H@9&5V("(@*R!D978@ +M*R`B('1A8FQE.B`B("L*("`@("`@("`@("`@("`@("`@("`@("`@('1A8FQE +M("L@(B!N971W;W)K.B`B("L@861D2DZ"B`@("`@("`@(B(B("!!9&0@82!D969A=6QT(')O=71E"B`@("`@("`@ +M.G!A&-E<'1I;VXH(D=A=&5W87D@8V%N;F]T(&)E($YO;F4N(BD*"B`@ +M("`@("`@:68@0H@("`@("`@("`@("!L;V=G +M:6YG+FEN9F\H(D%D9&EN9R!D969A=6QT(')O=71E(BD*("`@("`@("`@("`@ +M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI +M86YC90HC('=I=&@@=&AE($QI8V5N0`````````````````````` +M```````````````````````````````````````````````````````````` +M`````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI +M86YC90HC('=I=&@@=&AE($QI8V5N'DO:&%P2YC9F'DO:&%P2YC9F2@I"B`@("`@("`@9F]R('@@:6X@8V]N9FEG.@H@("`@("`@("`@("!; +M9FEL93$N87!P96YD*'2A(05!23UA97T-/ +M3D9?5"P@2$%04D]865]#3TY&7U`I"@H@("`@("`@("`@("!P2!O9B!T:&4@3&EC96YS92!A=`HC +M"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG +M971?='EP92@I"B`@("`@("`@5]I9E]N965D960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L +M"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE +M,B]S:71E2DI"B`@("`@("`@("`@(&9I;&4N&5C=71E,B@B7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2AS96QF*3H*("`@("`@("!S96QF+F-O;F9I9R`](%M="B`@("`@("`@ +M"P@;&EN +M92!I;B!E;G5M97)A=&4H%T@/2!R97!L86-E("L@ +M(EQN(@H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!S96%R8V@H"P@;&EN92!I;B!E;G5M97)A=&4H +M"P@;&EN92!I;B!E;G5M97)A=&4H +M2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N0`````````````````````````````````````` +M````````````````````````````````````````````````````````,#`P +M,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N"`](&EN="@G)RYJ;VEN*%MD:6=I="!F;W(@9&EG:70@:6X@9&5V:6-E(&EF +M(&1I9VET+FES9&EG:70H*5TI*0H@("`@("`@("`@("`@("`@:68@9&5V:6-E +M7W-U9F9I>"`\(&QO=V5S=%]D979I8V4Z"B`@("`@("`@("`@("`@("`@("`@ +M;&]W97-T7V1E=FEC92`](&1E=FEC95]S=69F:7@*("`@("`@("`@("`@("`@ +M("`@("!G=65S=%]I;G1E5]C:61R*'-E;&8I.@H@("`@("`@ +M(')E='5R;B`B)7,O)7,B("4@*'-E;&8N9V5T7V=A=&5W87DH*2P@F4@:6X@8FETF4B +M*0H*("`@(&1E9B!G971?9&5V:6-E*'-E;&8I.@H@("`@("`@(')E='5R;B!S +M96QF+F=E=%]A='1R*")D979I8V4B*0H*("`@(&1E9B!G971?8VED7!E)UT@:6X@5E)24%]465!% +M4SH*("`@("`@("`@("`@7!E)UT@:6X@6R=G=65S="==.@H@("`@("`@("`@ +M("!R971U7!E)UT@:6X@6R=P=6)L +M:6,G73H*("`@("`@("`@("`@7-T +M96T*("`@("`@("`B(B(*("`@("`@("!S96QF+F1E=FQIWT*("`@("`@("!S96QF+F%D +M9')E7!E*"D@ +M:6X@6R)P=6)L:6,B72!A;F0@861D2)= +M*0H@("`@("`@("`@("`@("`@&UA7!E)UT*("`@("`@("!R971U&9F9F9F9F9F(ETI"@H@("`@("`@('-E;&8N9G7!E*"D@ +M:6X@6R)P=6)L:6,B73H*("`@("`@("`@("`@7!E*"D@:6X@ +M6R)P=6)L:6,B73H*("`@("`@("`@("`@#4R-"\P>&9F +M9F9F9F9F(B`E("AS96QF+F1E=BP@2)=(&%N9"!S96QF+F%D9')E2)=(&%N9"!S96QF+F%D9')E7!E*"D@:6X@6R)P +M=6)L:6,B72!A;F0@*&YO="!S96QF+F-O;F9I9RYI2!T +M:&4@;6%S=&5R(&)A8VMU<"!F=6YC=&EO;G,*("`@("`@("`@("`@("`@(&EF +M(&YO="!C;61L:6YE+FES7W)E9'5N9&%N="@I.@H@("`@("`@("`@("`@("`@ +M("`@(&EF(&UE=&AO9"`]/2`B861D(CH*("`@("`@("`@("`@("`@("`@("`@ +M("`@0W-087-S=V13=F,HWT*("`@("`@("!C +M;60@/2`H(FEP(&%D9'(@2!K965P86QI +M=F5D(&]R(&YO=`H@("`@("`@("(B(@H@("`@("`@(&EF(")N=U]T>7!E(B!I +M;B!S96QF+F%D9')E2==*0H@ +M("`@("`@(&EF(&YO="!S96QF+F-L+FES7W)E9'5N9&%N="@I(&%N9"`H;F]T +M('-E;&8N861D2==(&]R('-E;&8N861D2==(#T](").;VYE(BDZ"B`@("`@("`@("`@(&-M9"`](")A2!H87!P96X@8G5T(&1I9"`Z*0H@("`@ +M("`@(",@270@;65A;G,@86X@87!A8VAE(&9I;&4@9V]T(&]R<&AA;F5D(&%F +M=&5R(&$@9W5E2@I"@H@("`@9&5F +M(&ES7V=U97-T7V=A=&5W87DH7,O;F5T+V-O7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ +M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E +M(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O +M'!R97-S(&]R(&EM<&QI960N("!3 +M964@=&AE($QI8V5N"(I.@H@("`@("`@("`@("!I=&5M&5C +M=71E*")K:6QL("TY("5S(B`E('!I9"D*"B`@("!D968@9W)E<"AS96QF+"!S +M='(I.@H@("`@("`@(&9O"(I.@H@("`@("`@("`@("!I9B!I+F9I;F0H7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C +M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F +M('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L +M:6-A8FQE(&QA=R!O'!R97-S(&]R +M(&EM<&QI960N("!3964@=&AE($QI8V5N2!O +M9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI +M8V5NWT*("`@("`@("!S96QF+F1B(#T@1&%T +M84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF+F1B+G-A=F4HWT*("`@("`@ +M("!R971U&1I9V5S="@I"@H@("`@9&5F(&=E=%]G871E=V%Y +M*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I;B!S96QF+FED871A*"DZ +M"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A*"E;)V=A=&5W87DG70H@ +M("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G971?=7-E7V5X=%]D;G,H +M'1D;G,G +M70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G971?861V97)T7VEN +M="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN="<@:6X@0`````````````````````````````````````````````````````````` +M````````````````````````````````````````,#`P,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7!E&5C=71E*&-M9"D*("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")! +M9&1E9"!R=6QE("5S(&9O0`````````````````````````````````````````````` +M````````````````````````````````````````````````````````,#`P +M,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET*#(I +M"B`@("!F;W(@;W!T+"!A7,N97AI +M="@R*0H*("`@(&9O&ES=',H9&%T869I;&4I.@H@("`@("`@(&]S +M+G)E;6]V92AD871A9FEL92D*"@ID968@8W)E871E9FEL92AI<"P@9F]L9&5R +M+"!F:6QE+"!D871A*3H*("`@(&1E3H* +M("`@("`@("`@("`@;W,N;6%K961I2!E>&ES=',L('=E(&1O(&ET('1H:7,@=V%Y +M(&9O0H@("`@("`@("`@("!I9B!E+F5R&ET*#$I"B`@("`@("`@ +M:68@;W,N<&%T:"YE>&ES=',H;65T86UA;FEF97-T*3H*("`@("`@("`@("`@ +M9F@@/2!O<&5N*&UE=&%M86YI9F5S="P@(G(K82(I"B`@("`@("`@("`@(&5X +M9FQO8VLH9F@I"B`@("`@("`@("`@(&EF(&9I;&4@;F]T(&EN(&9H+G)E860H +M*3H*("`@("`@("`@("`@("`@(&9H+G=R:71E*&9I;&4@*R`G7&XG*0H@("`@ +M("`@("`@("!U;F9L;V-K*&9H*0H@("`@("`@("`@("!F:"YC;&]S92@I"B`@ +M("`@("`@96QS93H*("`@("`@("`@("`@9F@@/2!O<&5N*&UE=&%M86YI9F5S +M="P@(G&9L;V-K*&9H*0H@("`@("`@("`@("!F +M:"YW&9L;V-K*&9H*0H@("`@9F@N +M=W)I=&4H96YT3H*("`@("`@("!F +M;&]C:RAF:6QE+"!,3T-+7T58*0H@("`@97AC97!T($E/17)R;W(@87,@93H* +M("`@("`@("!P71H;VX*(R!,:6-E;G-E9"!T +M;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@ +M;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* +M(R`@(&AT='`Z+R]W=WFEP9FEL90H*"B,@0W)E871E('II<"!A +MFEP +M7V9I;&5S*&9I;&5S*3H*("`@(&9,:7-T(#T@9FEL97,*("`@(&-O;7!R97-S +M:6]N(#T@>FEP9FEL92Y:25!?1$5&3$%4140*("`@('1I;65?&5C=71E7W-H96QL7W-C3H*("`@("`@("`@ +M("`@("`@("`@("!Z9BYW3H*("`@("`@("!C;&5A;G5P*&9I;&5S7V9R;VU?F8N8VQO&5C=71E7W-H96QL +M7W-C&-E<'0@3U-%#H*("`@("`@("`@("`@9&5L971E7W1M<%]F:6QE7V-M9"`]("=R +M;2`M9B`E3H*("`@("`@("`@("`@9BYC;&]S92@I"B`@("!R971U"YS<&QI +M="AC;60I+"!S=&1E&-E<'0@3U-%&5C=71E(&)A'0H +M>FEP7V9I;&4L(&9I;&5S7V9O=6YD+"!F:6QE"YS<&QI="AC;&5A;G5P7V-M9"DI"@H* +M:68@7U]N86UE7U\@/3T@)U]?;6%I;E]?)SH*("`@(&9I;&5,:7-T(#T@7)I9VAT(&]W +M;F5R6]U +M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O +M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W +M=WW!R +M:6YT("0R.WTG('P@6]U(&UA>2!N +M;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@ +M=&AE($QI8V5N2!T;R!E;G-U2!T;R!I=',@<')E=FEO +M=7,@'D@=&\@<')E=FEO=7,@'DN8V9G+F]L9"`O971C+VAA<')O>'DO:&%P2YC9F'DN8V9G+FYE=PH@(&9I"GT*"@IL;V=G97(@+70@8VQO=60@(B0H8F%S +M96YA;64@)#`I.B!%;G1E'D*'D@2P@8V]N9FEG=7)I +M;F<@9FER97=A;&PB"@HC(&EP=&%B;&5S(&5N=')Y('1O(&5N'D@2`D861D961)<',@ +M)')E;6]V961)<',@)'-T871S27`*"FEF(%L@)#\@+6=T(#`@70IT:&5N"B`@ +M;&]G9V5R("UT(&-L;W5D(")&86EL960@=&\@87!P;'D@9FER97=A;&P@'D@8V]N9FEG(@H@(",@4F5S=&]R92!T:&4@3$(*("!R97-T;W)E7VQB +M"@H@(&QO9V=E&ET(#$@)&QO8VL@)&QO8VME +M9`IE;'-E"B`@(R!296UO=F4@8F%C:V5D=7`@:7!T86)L92!R=6QE6]U(&UA>2!N;W0@=7-E('1H:7,@ +M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E +M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI +M8V5N7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z +M+R]W=WPH@('-U9&\@:7!T86)L97,@+70@;6%N9VQE("U$(%!215)/ +M551)3D<@+6D@)&1E=B`M;2!S=&%T92`M+7-T871E($Y%5R`M:B!#3TY.34%2 +M2R`M+7-E="UM87)K("1T86)L94YO(#(^+V1E=B]N=6QL"@H@('-U9&\@:7`@ +MV1E=CHS?2DI"G1A8FQE3F%M93TB5&%B +M;&5?)&1E=B(*"FEF(%L@)&%C=&EO;B`]/2`G861D)R!="G1H96X*("!P;'5G +M7VYI8PIE;'-E"B`@=6YP;'5G7VYI8PIF:0H````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````&]P="]C;&]U9"]B:6XO:7!S96-T=6YN96PN6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC +M90HC('=I=&@@=&AE($QI8V5N#4R-2(*=G!N:6YM87)K/2(P>#4R-"(*"G5S86=E*"D@>PH@("`@<')I;G1F +M(")5'0@ +M:&]P/B`M3X@+6D@/&EK92!P;VQI +M8WD^("UT(#QI:V4@;&EF971I;64^("U4(#QEPH@('-U9&\@:7!T86)L97,MPH@(&1I2!<"B`@("!P:&%S93(@<&]L:6-Y +M/21ER1R:6=H=&YE='-](B`^/B`D=G!N8V]N +M9F9I;&4@)B8*("!S=61O(&5C:&\@(B`@='EP93UT=6YN96PB(#X^("1V<&YC +M;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!A=71H8GD]VEK96QI9F5T:6UE?7,B(#X^("1V<&YC;VYF9FEL92`F)@H@ +M('-U9&\@96-H;R`B("!E2(@/CX@)'9P;F-O;F9F:6QE +M("8F"B`@2!F;W(@'1H;W`](B1/4%1!4D&ET("1R970*```````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````;W!T+V-L;W5D+V)I;B]I<&%S2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&QO8V%L('!U8DEP +M/20H96-H;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?22!E>&ES +M=',B"GT*"F%D9%]V<&Y?8VAA:6Y?9F]R7VEP("@I('L*("!L;V-A;"!P=6)) +M<#TD*&5C:&\@)#$@?"!A=VL@+48G+R<@)WMPPH@(&QO8V%L('!U8DEP/20H96-H;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?2PH@(&QO8V%L +M('!U8DEP/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R +M:6YT("0Q?2W!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)A +MW!R:6YT("0R?2W!R:6YT("0R +M?25]R;W5T97-?9G)O;5]M86EN("1T86)L94YA;64*(R!.3U1%.B!T:&ES +M("!E;G1R>2!W:6QL(&)E(&1E;&5T960@:68@=&AE(&EN=&5R9F%C92!IW!R:6YT +M("0Q?2PH@(&EF(%L@(B1S9FQA9R(@/3T@(C`B +M(%T*("!T:&5N"B`@("!R971UW!R +M:6YT("0Q?2W!R:6YT("0R?22!I<"!I;F9O(&EN=&\@9FEL92P@ +M=7-E9"!O;B!R961U;F1A;G0@W!R:6YT("0Q?2&ES +M=&EN9TEP36%S:STD*'-U9&\@:7`@861DPH@(&QO8V%L('!U8DEP/20Q +M"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP +M/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)A&ES=&EN9TEP36%S:STD*'-U9&\@:7`@861DPH@("`@(V5N86)L92!R<',@ +M86YD(')F%QN(B`D;G5M*0H@("`@("`@("`@96-H +M;R`D:&5X.PH@("`@("`@("`@(V5N86)L92!R<',*("`@("`@("`@(&5C:&\@ +M)&AE>"`^("]S>7,O8VQA&ET +M("0_("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1!9FQA9R(@/3T@(C$B(%T* +M=&AE;@H@(&%D9%]A;E]I<"`@)'!U8FQI8TEP("`F)@H@(&%D9%]F=U]C:&%I +M;E]F;W)?:7`@)'!U8FQI8TEP"B`@=6YL;V-K7V5X:70@)#\@)&QO8VL@)&QO +M8VME9`IF:0H*:68@6R`B)&9F;&%G(B`]/2`B,2(@72`F)B!;("(D1&9L86&ET("0_("1L;V-K("1L;V-K960* +M9FD*"G5N;&]C:U]E>&ET(#`@)&QO8VL@)&QO8VME9`H````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````!O<'0O8VQO=60O8FEN+VQI;F5?961I="YP>0`````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````,#`P,#2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2UL:6YE(&5D:71I;F<@;V8@8V]N9FEG=7)A=&EO;B!F +M:6QE&%M<&QE('1H97)E)W,@82!D;W5B;&4@97-C87!E(&]F('1H92!B86-K2!M +M871C:&5D(&%L;"!F:6QE3H* +M("`@("XN+B`@(&]S+G5N;&EN:R@G9&]C=&5S="UV:&]S=',N8V]N9B55N=7-E9$QO8V%L"B`@ +M("`@("`@("`@('-T870@/2!.;VYE"B`@("`@("`@("`@('=I=&@@;W!E;BAS +M96QF+F9I;&5N86UE+"`G&-E<'1I;VXH +M(DUA9&4@=&]O(&UA;GD@961I=',B*0H@("`@("`@("`@("`@("`@("`@("`@ +M("`@("`@96QI9B!R96UA:6YI;F=?8V]U;G0@/3T@,#H*("`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@("`@("`@ +M("`@("`@("!C:&%N9V5D7VQI;F4L('-U8G,@/2!E9&ET+G!A='1E2AS96QF+F9I;&5N86UE+"!B86-K=7!?9FEL96YA;64I"B`@("`@("`@("`@ +M("`@("!O3H*("`@("`@("`@("`@:68@8VAA;F=E +M9%]F:6QE(&ES(&YO="!.;VYE.B`@("`@("`@("`@("`@("`@("`@("`@("`@ +M("`@("`C(&9A:6QE9"P@8VQE86X@=7`*("`@("`@("`@("`@("`@(&-H86YG +M961?9FEL92YC;&]S92@I"B`@("`@("`@("`@("`@("!O6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC +M90HC('=I=&@@=&AE($QI8V5N2!R=6QE2!O9B!T:&4@3&EC96YS92!A +M=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O +M'!R97-S(&]R(&EM<&QI960N("!3 +M964@=&AE($QI8V5N7,I.@H*("`@(&5X:7-T:6YG7VME>7,@/2!;70H@ +M("`@;F5W7V5T:%]K97D@/2!.;VYE"@H@("`@9F]R(&LQ+"!V,2!I;B!G=65S +M=&YE=%]D:6-T+FET97)I=&5M7,@ +M86YD(&QE;BAV,2D@/B`P.@H@("`@("`@("`@("!E>&ES=&EN9U]K97ES+F%P +M<&5N9"AK,2D*"B`@("!I9B!N;W0@97AI2`Z.B!296UO=FEN9R!G=65S="!N971W;W)K +M+BXN(BD*("`@("`@("!R971U2!T;R!B92!S +M971U<`H@("`@)R2!C;VYF:6=U&ES=',@/2!&86QS90H*("`@(&9O2!P2!C;VYF:6=U2`Z.B!02`Z.B!.;R!'=65S=$YE='=O7,N87)G +M=ELQ72D*("`@('!R;V-E7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=WPH@(&QO8V%L(%]P +M:60])"AP:61O9B!D;G-M87-Q*0H@(&9OW!R:6YT("0R?20H@(&EF(%L@)&EP +M=C0@70H@('1H96X*("`@(&5C:&\@(C`@)&UA8R`D:7!V-"`D:&]S="`J(B`^ +M/B`D1$A#4%],14%315,*("!F:0H@(&EF(%L@)&EP=C8@70H@('1H96X*("`@ +M(&5C:&\@(C`@)&1U:60@)&EP=C8@)&AO6]U(&UA>2!N +M;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@ +M=&AE($QI8V5N&-E<'0@3U-%6]U&-E<'1I;VX@;V-C=7)R960Z("5S(B`E(&4*("`@("`@("`@ +M("`@7!E(#T]("=T0`````````````` +M```````````````````````````````````````````````````````````` +M`````````````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ +M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&-L=61E9%]H96%L=&A?8VAE +M8VMS(ET@/2!D871A6R)E>&-L=61E9%]H96%L=&A?8VAE8VMS(ET*("`@(&EF +M(")H96%L=&A?8VAE8VMS7V-O;F9I9R(@:6X@9&%T83H*("`@("`@("!D8F%G +M6R)H96%L=&A?8VAE8VMS7V-O;F9I9R)=(#T@9&%T85LB:&5A;'1H7V-H96-K +M7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z +M+R]W=WW!R:6YT("0Q?2<*?0H* +M:7!T86)L97-?*"D@>PH@("!L;V-A;"!O<#TD,0H@("!L;V-A;"!P=6)L:6-? +M:7`])#(*("`@;&]C86P@:7-?=G!C/69A;'-E"B`@(&QO8V%L(&9O7-T96UC=&P@:7,M86-T +M:79E(&EPS$N+C5]"B`@("!D;PH@("`@("!L;V=G97(@+70@8VQO +M=60@(B0H8F%S96YA;64@)#`I.B!W86ET:6YG(&EP7-T96UC=&P@:7,M86-T:79E(&EP7-T96UC=&P@:7,M86-T:79E(&EP7-T96UC=&P@&PR='!D"B`@("`@("`@("`@("`@("`@("`@2`Z(%!32R!<(B1I<'-E8U]P +M&PR +M='!D"@H@("!I<'1A8FQEPH@("!L;V-A;"!P=6)L:6-?:7`])#$*"B`@(&EPPH@("!L;V-A;"!U/20Q"B`@(&QO +M8V%L('!A)'4@7"H@7"(D +M<&%S&ET(#(*"0D[.PH@(&5S86,*9&]N90H*:68@6R`B)&1E +M=B(@/3T@(B(@70IT:&5N"B`@("!D978](F5T:#(B"F9I"@II9B!;("(D8VED +M&ET(#(*6R`B)&-R96%T92(@/3T@(C$B(%T@)B8@6R`B)&QF;&%G +M)'!F;&%G)')F;&%G)'-F;&%G(B`A/2`B,3$Q,2(@72`F)B!U&ET(#(*"FEF(%L@(B1CW!R:6YT("0Q?27)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS +M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E +M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,@/2!;)V5T:#$G+"`G971H,B6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2!O9B!T:&4@ +M3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A +M8FQE(&QA=R!O2!O9B!T:&4@9&YS;6%S<2!F:6QE+@IC<"`B)$1( +M0U!?0T].1DE'7TU!24XB("`B)$1(0U!?0T].1DE'7TU!24Y?0D%+(@IC<"`B +M)$1(0U!?0T].1DE'(B`B)$1(0U!?0T].1DE'7T)!2R(*"B-E;7!T>2!T:&4@ +M8V]N9FEG(&9I;&4*96-H;R`^("1$2$-07T-/3D9)1PH*=F%R/2(D,2(*9&AC +M<%]R86YG93TB(@ID:&-P7V=A=&5W87D](B(*9&AC<%]N971M87-K/2(B"F1N +M'1?9&YS/20H96-H +M;R`B)$--1$Q)3D4B('P@9W)E<"`M;R`B=7-E97AT9&YS/71R=64B*0IW:&EL +M92!;("UN("(D=F%R(B!="F1O"B!V87(Q/20H96-H;R`D=F%R('P@8W5T("UF +M,2`M9"`B+2(I"B!R;W5T97)I<#TD*"!E8VAO("1V87(Q('P@8W5T("UF,2`M +M9"`B.B(@*0H@9V%T97=A>3TD*&5C:&\@)'9AV1H8W!?V1H8W!?;F5T;6%S:WTB)V1H8W`M;W!T:6]N/71A9SIR86YG +M92W9A +MVQO9WTB8&=R97`@(EYD:&-P+6]P=&EO;CTV(B`B)$1(0U!?0T].1DE'7TU! +M24XB8")<;B(*;&]G/2(D>VQO9WTB8&=R97`@(EYD:&-P+6]P=&EO;CUO<'1I +M;VXZVQO +M9WTB8&=R97`@(EYD:&-P+7)A;F=E/2(@(B1$2$-07T-/3D9)1U]-04E.(F`B +M7&XB"@II9B!;("(D;&]G(B`A/2`G7&Y<;EQN)R!="G1H96X*("-#;&5A;FEN +M9R!T:&4@97AI9&AC<"UR86YG93TO9"<@(B1$2$-07T-/3D9)1U]-04E.(@IF:0H*(W=R +M=&EN9R!T:&4@;F5W(&-O;F9I9R!I;G1O('1H92!C;VYF:6<@9FEL92X*96-H +M;R`M92`B)&1H8W!?&ET("1R +M97-U;'0@)&QO8VL@)&QO8VME9`H````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````````````````````!O +M<'0O8VQO=60O8FEN+V-S7V1H8W`N<'D````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7,@/2!S970H*0H@("`@("`@(&9O2`A/2`G +M:60G(&%N9"!E;G1R>5LG;6%C7V%D9')E7,N861D*&ME>2D* +M("`@("`@("`@("`@("`@(&)R96%K"@H@("`@("`@(&EF(&1A=&%;)W)E;6]V +M92==(&%N9"!K97D@;F]T(&EN(')E;6]V95]K97ES.@H@("`@("`@("`@("!R +M96UO=F5?:V5Y2!I +M;B!R96UO=F5?:V5Y5TI"@H@("`@("`@(&1B86=;9&%T85LG:7!V-%]A9&1R97-S)UU=(#T@9&%T +M80H*("`@(')E='5R;B!D8F%G"@```&]P="]C;&]U9"]B:6XO8W-?8VUD;&EN +M92YP>0`````````````````````````````````````````````````````` +M```````````````````````````````````````````P,#`P-S4U`#`P,#$W +M-3``,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ +M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E +M(&%T"B,*(R`@(&AT='`Z+R]W=W2!O9B!T:&4@ +M3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A +M8FQE(&QA=R!O'!R97-S(&]R(&EM +M<&QI960N("!3964@=&AE($QI8V5N'DN8V9G("]E=&,O:&%P2]H87!R;WAY+F-F9RYO;&0*"B`@;78@)&YE +M=U]C;VYF:6<@+V5T8R]H87!R;WAY+VAA<')O>'DN8V9G"B`@:68@:&%P2`M<"`O=F%R+W)U;B]H87!R;WAY+G!I9"`M9B`O971C+VAA<')O>'DO:&%P +M2YC9F<@+7-F("0H8V%T("]V87(O'DN<&ED*3L@=&AE +M;@H@("`@;&]G9V5R("UT(&-L;W5D(").97<@:&%P2!I;G-T86YC92!S +M=6-C97-S9G5L;'D@;&]A9&5D+"!S=&]P<&EN9R!P'DO:&%P2YC9F<@)&YE=U]C;VYF:6<* +M("`@(&UV("]E=&,O:&%P2]H87!R;WAY+F-F9RYO;&0@+V5T8R]H87!R +M;WAY+VAA<')O>'DN8V9G"B`@("!H87!R;WAY("UP("]V87(O'DN<&ED("UF("]E=&,O:&%P2]H87!R;WAY+F-F9R`M2YP:60I"B`@("!R970],0H@(&9I"@IE>&ET("1R +M970*```````````````````````````````````````````````````````` +M`````````````````````````````````````````````````````')O;W0O +M;6]N:71O71H;VX*(R!,:6-E;G-E9"!T;R!T +M:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE +M"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@ +M(&AT='`Z+R]W=WWT*("`@('!A2`K)UTG*R(@(B`K("=;)RMP2LG +M72<@*R`B("(@*R!M2!O;F4@<&ED(&]R(&YO=`H@("`@:68@97AI=%-T871U6EN9R!F97<@;6]R92!T:6UEWT*("`@(&9A:6QI +M;F=?PH@("`@("`@("`@("`@("`@ +M(G-U8V-EPH@("`@("`@("`@("`@ +M("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EWT@(U-K:7`@WT*("`@(&9A:6QI;F=# +M:&5C:W,@/2!;70H@("`@:68@8VAE8VM4>7!E(#T](")B87-I8R(Z"B`@("`@ +M("`@;6]N:71297-U;'0L(&9A:6QI;F=#:&5C:W,@/2!M;VYI=%!R;V-E&-L=61E(#T@:&-?9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!H8U]D871A(&5L7!E*0H@("`@("`@("`@("`@("`@:68@;&5N*')E="D@ +M/3T@,#H*("`@("`@("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@ +M("`@("`@:68@(G-U8V-E7,N87)G=BD@/3T@,CH*("`@("`@("!I9B!S>7,N +M87)G=ELQ72`]/2`B861V86YC960B.@H@("`@("`@("`@("!M86EN*")A9'9A +M;F-E9"(I"B`@("`@("`@96QI9B!S>7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@ +M("`@("`@("`@("!M86EN*")B87-I8R(I"B`@("`@("`@96QS93H*("`@("`@ +M("`@("`@<')I;G1D*")%7!E(&]F('1E7,N87)G=BD*("`@(&5L0`````` +M```````````````````````````````````````````````````````````` +M```````````````````P,#`P-C0T`#`P,#$W-3``,#`P,371H;VX*(R!,:6-E +M;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@ +M=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ +M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E +M(&%T"B,*(R`@(&AT='`Z+R]W=W'!E8W1E9"`](%M="B`@("`@("`@ +M9&5S=$EP(#T@<&]R=$9O'0L('-R8U!O2!I +M;B!I<%1A8FQE4QI'!E8W1E +M9#H*("`@("`@("`@("`@("`@("`@("!I9B!I<%1A8FQE16YT'!E8W1E9$5N=')Y*2`]/2`M,3H*("`@("`@("`@("`@("`@("`@("`@("`@ +M9F]U;F1!;&P@/2!&86QS90H@("`@("`@("`@("`@("`@("`@("`@("!B4QI2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA +M=R!O'!R97-S(&]R(&EM<&QI960N +M("!3964@=&AE($QI8V5N$UE;6]R>55S86=E(&EN(&AE86QT:%]C +M:&5C:W-?9&%T82`B("L@7`H@("`@("`@("`@("`@(")S>7-T96U4:')E&ET*#`I"@H@("`@;6%X365M;W)Y +M57-A9V4@/2!F;&]A="AD871A6R)M87A-96UO7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@ +M(&UA:6XH*0H````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M'E?8VAE8VLN<'D````````````` +M```````````````````````````````````````````````````````````` +M`````````````#`P,#`V-#0`,#`P,36]U(&UA>2!N;W0@=7-E('1H +M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N +M41A=&$@86YD(")M87AC;VYN +M(B!I;B!H84-F9U-E8W1I;VYS6R)G;&]B86PB73H*("`@("`@("!I9B!H87!R +M;WAY1&%T85LB;6%X8V]N;B)=("$](&AA0V9G4V5C=&EO;G-;(F=L;V)A;")= +M6R)M87AC;VYN(EU;,%TN'E$871A(BD*("`@(&EF(&AA +M<')O>'E$871A(&ES($YO;F4@;W(@;&5N*&AA<')O>'E$871A*2`]/2`P.@H@ +M("`@("`@('!R:6YT(").;R!D871A('!R;W9I9&5D('1O(&-H96-K+"!S:VEP +M<&EN9R(*("`@("`@("!E>&ET*#`I"@H@("`@=VET:"!O<&5N*"(O971C+VAA +M<')O>'DO:&%P2YC9FWT*("`@(&-UWT*("`@(&9O41A=&$L(&AA0V9G4V5C=&EO;G,I"@H@("`@:68@ +M8VAE8VM-87A#;VYN(&%N9"!C:&5C:TQB4G5L97,Z"B`@("`@("`@<')I;G0@ +M(D%L;"!C:&5C:W,@<&%S&ET*#`I"B`@("!E;'-E.@H@ +M("`@("`@(&5X:70H,2D*"@II9B!?7VYA;65?7R`]/2`B7U]M86EN7U\B.@H@ +M("`@:68@;&5N*'-Y7,N87)G=ELQ72`]/2`B +M861V86YC960B.@H@("`@("`@(&UA:6XH*0H````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&ET*#`I"@H@("`@=&5M<&QA=&5697)S:6]N36%T8VAE +M65T('-E='5P(&%T("(@*R!R96QE87-E1FEL92`K7`H@ +M("`@("`@("`@("`@("`@("`B+"!S:VEP<&EN9RXB"B`@("`@("`@96QI9B!E +M>'!E8W1E9"`A/2!F;W5N9#H*("`@("`@("`@("`@<')I;G0@(E1E;7!L871E +M(%9E'!E8W1E9"`K("(L(&9O=6YD.B`B("L@9F]U;F0*("`@("`@ +M("`@("`@=&5M<&QA=&5697)S:6]N36%T8VAE'!E8W1E9"`K("(L(&9O=6YD.B`B("L@9F]U;F0*("`@("`@ +M("`@("`@&ET*#$I"@H*:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH* +M("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A;F0@2\````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````,#`P,#0`````````````````````````` +M```````````````````````````````````````````````P,#`P-C0T`#`P +M,#$W-3``,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS +M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E +M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W3U.;VYE*3H*("`@('=I=&@@ +M;W!E;B@G+W)O;W0O:&5A;'1H7V-H96-K2!I2!I5TN2D@/3T@,#H*("`@("`@("`@("`@("`@(&-O;G1I +M;G5E"B`@("`@("`@("`@(&ME>59A;"`](&5N=')Y+G-P;&ET*"(](BD*("`@ +M("`@("`@("`@:68@;&5N*&ME>59A;"D@/3T@,CH*("`@("`@("`@("`@("`@ +M(&1;:V5Y5F%L6S!=+G-T2]?7VEN:71?7RYP>0`````````````````````````````````````````` +M````````````````````````````````````````,#`P,#8T-``P,#`Q-S4P +M`#`P,#$W-3``,#`P,#`P,#$U-#``,3,V,C4Q-3`S,30`,#$W-S8R`"`P```` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````'5S=&%R("``9&%R2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO +M2!A<'!L:6-A8FQE(&QA=R!O'!R +M97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N0`````````````````````````````````` +M````````````````````````````````````````````````,#`P,#8T-``P +M,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#,Q,S(`,3,V,C4Q-3`S,30`,#$W-S8Q +M`"`P```````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````'5S=&%R("``9&%R2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET +M*#`I"@H@("`@;6EN1&ES:TYE961E9"`](&9L;V%T*&1A=&%;(FUI;D1IF4I("\@,3`R-`H*("`@ +M(&EF("AF6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI +M86YC90HC('=I=&@@=&AE($QI8V5N2!I;7!O7,I(#T](#`Z"B`@("`@ +M("`@<')I;G0@(D%L;"`B("L@7,@ +M87)E(')E86-H86)L92!V:6$@<&EN9R(*("`@("`@("!E>&ET*#`I"B`@("!E +M;'-E.@H@("`@("`@('!R:6YT(")5;G)E86-H86)L92!G871E=V%Y7,N87)G=ELQ72`]/2`B8F%S:6,B +M.@H@("`@("`@(&UA:6XH*0H````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````')O;W0O:&5A;'1H7V-H96-K0`````````````````````````````````````````````````````````` +M```````````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P +M,371H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD +M871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C +M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F +M('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&5C=71A8FQE71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E +M($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H +M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C +M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I +M"@H@("`@=VET:"!O<&5N*"2!O +M9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A +M<'!L:6-A8FQE(&QA=R!O'!R97-S +M(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N$-P=55S86=E(&EN(&AE +M86QT:%]C:&5C:W-?9&%T82!S>7-T96U4:')E&ET*#`I"@H@("`@;6%X0W!U57-A9V4@/2!F;&]A="AD871A +M6R)M87A#<'55&ET*#`I"B`@("!E +M;'-E.@H@("`@("`@('!R:6YT(")&86EL960@=&\@&ET*#$I"@H*:68@7U]N86UE +M7U\@/3T@(E]?;6%I;E]?(CH*("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A +M;F0@0`````````````````````````````````````` +M````````````````````````````````````````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2`]('9-6R)M86-!9&1R97-S(ET@ +M*R`B("(@*R!V35LB:7`B72`K("(@(B`K('9-6R)V;4YA;64B70H@("`@("`@ +M(&9O=6YD16YT2`](%1R=64*("`@("`@("`@("`@("`@(&)R96%K"@H@("`@("`@("`@("!N +M;VY$969A=6QT4V5T(#T@(G-E=#HB("L@=DU;(FEP(ETN2`](%1R=64*("`@("`@ +M("`@("`@("`@(&)R96%K"@H@("`@("`@(&EF(&YO="!F;W5N9$5N=')Y.@H@ +M("`@("`@("`@("!F86EL961#:&5C:R`](%1R=64*("`@("`@("`@("`@9F%I +M;'5R94UE&ET*#$I"B`@("!E;'-E.@H@("`@("`@('!R +M:6YT(")!;&P@(B`K('-T7,N87)G=ELQ72`]/2`B861V86YC960B.@H@("`@("`@(&UA:6XH +M*0H````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````````````````!R;V]T +M+V9U;F,N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P +M.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N +M2!O;F4@;&]C:R!IPH@("`@ +MPH@("`@;&]C:STD,0H*("`@(%]?;&]C:V5D/3`*("`@ +M(%]?5%,]8&1A=&4@*R5S)4Y@"B`@("!?7TQ/0TM$25(](B]T;7`B"B`@("!? +M7TQ/0TM&24Q%/2(D7U],3T-+1$E2+R1?7U13+20D+21L;V-K+FQO8VLB"@H@ +M("`@:68@6R`D,B!="B`@("!T:&5N"B`@("`@("`@7U]424U%3U54/20R"B`@ +M("!E;'-E"B`@("`@("`@7U]424U%3U54/3,P"B`@("!F:0H*("`@(&EF(%L@ +M+64@)%]?3$]#2T9)3$4@70H@("`@=&AE;@H@("`@("`@(&QO9V=EPH@("`@7U],3T-+1$E2/2(O=&UP +M(@H@("`@7U],3T-+1DE,13TB)%]?3$]#2T1)4B\J+20D+20Q+FQO8VLB"B`@ +M("!?7VQO8VME9#TD,@H@("`@:68@6R`B)%]?;&]C:V5D(B`]/2`B,2(@70H@ +M("`@=&AE;@H@("`@("`@(')M("1?7TQ/0TM&24Q%"B`@("!F:0I]"@HC(')E +M;&5A&ET('9A;'5E"B,@ +M)#(@;&]C:R!F:6QE;F%M90HC("0S(&QO8VME9"@Q*2!OF4]8&EP(&%D9'(@2!O9B!T:&4@3&EC96YS92!A=`HC +M"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ +M=&AE($QI8V5N7,O8VQA;65T82UD871A+R@N*UM>+UTI+S\D("`N+B]M +M971A9&%T82\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%="@HC:'1T<#HO +M+SQR;W5T97))4#XO;&%T97-T+V9O;R!A;F0@+BXN+V9O;R\@*'EI96QD(&UE +M=&%D871A+R1)4"]F;V\I"B-A2UZ;VYE+S\D("`N+B]M971A9&%T82\E>U)%34]415]! +M1$12?2]A=F%I;&%B:6QI='DM>F]N92!;3"Q.0RQ14T%="E)E=W)I=&52=6QE +M(%YC;&]U9"UI9&5N=&EF:65R+S\D("`N+B]M971A9&%T82\E>U)%34]415]! +M1$12?2]C;&]U9"UI9&5N=&EF:65R(%M,+$Y#+%%305T*4F5WU)%34]415]!1$12?2]I +M;G-T86YC92UI9"!;3"Q.0RQ14T%="E)E=W)I=&52=6QE(%YL;V-A;"UH;W-T +M;F%M92\_)"`@+BXO;65T861A=&$O)7M214U/5$5?041$4GTO;&]C86PM:&]S +M=&YA;64@6TPL3D,L45-!70I297=R:71E4G5L92!>;&]C86PM:7!V-"\_)"`@ +M+BXO;65T861A=&$O)7M214U/5$5?041$4GTO;&]C86PM:7!V-"!;3"Q.0RQ1 +M4T%="E)E=W)I=&52=6QE(%YP=6)L:6,M:&]S=&YA;64O/R0@("XN+VUE=&%D +M871A+R5[4D5-3U1%7T%$1%)]+W!U8FQI8RUH;W-T;F%M92!;3"Q.0RQ14T%= +M"E)E=W)I=&52=6QE(%YP=6)L:6,M:7!V-"\_)"`@+BXO;65T861A=&$O)7M2 +M14U/5$5?041$4GTO<'5B;&EC+6EP=C0@6TPL3D,L45-!70I297=R:71E4G5L +M92!><'5B;&EC+6ME>7,O/R0@("XN+VUE=&%D871A+R5[4D5-3U1%7T%$1%)] +M+W!U8FQI8RUK97ES(%M,+$Y#+%%305T*4F5W=FTM:60O/R0@ +M("XN+VUE=&%D871A+R5[4D5-3U1%7T%$1%)]+W9M+6ED(%M,+$Y#+%%305T* +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````=F%R+W=W=R]H=&UL+W5S97)D871A+P`` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````#`P,#`W-34`,#`P,3/dev/null 2>&1 || ${echo} 'cloud_scripts/usr/share/cloud/cloud-scripts.tar': 'MD5 check failed' + ) << \SHAR_EOF +6c9c71f04c38fbbe6031c09a732f525d cloud_scripts/usr/share/cloud/cloud-scripts.tar +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/usr/share/cloud/cloud-scripts.tar'` -ne 696320 && \ + ${echo} "restoration warning: size of 'cloud_scripts/usr/share/cloud/cloud-scripts.tar' is not 696320" + fi +fi +# ============= cloud_scripts/usr/share/cloud/cloud-scripts.tar ============== +if test -n "${keep_file}" && test -f 'cloud_scripts/usr/share/cloud/cloud-scripts.tar' +then +${echo} "x - SKIPPING cloud_scripts/usr/share/cloud/cloud-scripts.tar (file already exists)" + +else +${echo} "x - extracting cloud_scripts/usr/share/cloud/cloud-scripts.tar (text)" + sed 's/^X//' << 'SHAR_EOF' | uudecode && +begin 600 cloud_scripts/usr/share/cloud/cloud-scripts.tar +M971C+P`````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````#`P,#`W-34`,#`P,37-T96U-87A& +M:6QE4VEZ93TQ,$T*4G5N=&EM94UA>%5S93TR,$T*```````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````971C+W-Y7-T +M96TO:'EP97)V+61A96UO;G,N:'8M=G-S+61A96UO;BYS97)V:6-E```````` +M````````````````````````````````````````````````````,#`P,#8T +M-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,S0`,3,V,C4Q-3`S,30`,#(S +M,37!E2!S97)V:6-E("A64U,I(&1A96UO;@H*6U-E&5C4W1A3UM=6QT:2UU7-T96UD+W-Y2UC;VYF +M:63TO=7-R+VQO8V%L+V-L;W5D+W-Y7-T96TO;W!E;BUV;2UT;V]L3UM=6QT:2UU3UM=6QT:2UU7-T96UD+W-Y&5N+FUO=6YT"D)E9F]R93UN971W;W)K+G1A2UC;VYF:6&5C4W1A&5C4W1A3UM=6QT:2UU7-T96TO:'EP97)V+61A96UO;G,N:'8M +M9F-O<'DM9&%E;6]N+G-E7!E2!S97)V:6-E("A&0T]062D@9&%E;6]N"D-O +M;F1I=&EO;E!A=&A%>&ES=',]+V1E=B]V;6)U0H*6U-E3UM=6QT:2UU7-T96TO8VQO=60M +M<&]S=&EN:70N2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N0`````````````````````````````````````````````` +M`````````````````````````````````````````#`P,#`V-#0`,#`P,36]U(&UA>2!N;W0@=7-E +M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI +M8V5N7!E(#$S("UJ($123U`*+4$@24Y0550@+7`@:6-M<"`M:B!!0T-%4%0* +M+4$@24Y0550@+6D@971H,2`M<"!T8W`@+6T@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* +M(R`@(&AT='`Z+R]W=W7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E +M<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H +M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N +M2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H +M92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R +M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T +M"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7-C=&P@8V]N9FEG=7)A +M=&EO;B!F:6QE"B,*(R!&;W(@8FEN87)Y('9A;'5E7-C=&PN +M8V]N9B@U*2!F;W(@;6]R92!D971A:6QS+@HC($!615)324].0`H*(R!#;VYT +M2!T:&5R +M96)Y(')E9'5C:6YG('1H92!S:7IE(&]F(&1I&PR='!D+WAL +M,G1P9"YC;VYF```````````````````````````````````````````````` +M````````````````````````````````````````````````````````,#`P +M,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,3,`,3,U-C$W,C4Q-3(` +M,#$T-#4U`"`P```````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````'5S=&%R("``9&%R65S"G!P<&]P=&9I;&4@/2`@("`O971C+W!P<"]O<'1I;VYS +M+GAL,G1P9`H````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````971C+V1N2!D:7-A8FQE +MF5N+"!S:6YC92!T:&5Y"B,@=&5L;"!D +M;G-M87-Q('1O(&9I;'1E2X@268@>6]U(&AA=F4@82!D:6%L+6]N+61E;6%N9"!L:6YK('1H97D@ +M86QS;R!S=&]P"B,@=&AE6]U('=A;G0@9&YS('1O(&=E="!I=',@=7!S=')E86T@2`@(&%P<&5A2!O=&AE<@HC(&9I +M;&4L(&=E='1I;F<@:71S('-E2!O;@HC('-P96-I9FEE9"!I;G1E +M&-E<'0M:6YT97)F86-E/65T:#$*97AC97!T+6EN +M=&5R9F%C93UE=&@R"F5X8V5P="UI;G1E6]U('=A;G0@9&YS;6%S<2!T;R!P6]U"B,@=V%N="!D;G-M +M87-Q('1O(')E86QL>2!B:6YD(&]N;'D@=&AE(&EN=&5R9F%C97,@:70@:7,@ +M;&ES=&5N:6YG(&]N+`HC('5N8V]M;65N="!T:&ES(&]P=&EO;BX@06)O=70@ +M=&AE(&]N;'D@=&EM92!Y;W4@;6%Y(&YE960@=&AI6]U('=A;G0@=&\@ +M:&%V92!A(&1O;6%I;@HC(&%U=&]M871I8V%L;'D@861D960@=&\@2!Q=6%L:69I +M960@9&]M86EN(&YA;65S+"!A7-T96US(&-O;F9I9W5R960@8GD@ +M1$A#4`HC(#,I(%!R;W9I9&5S('1H92!D;VUA:6X@<&%R="!F;W(@(F5X<&%N +M9"UH;W-T7,N;W)G+G5K+#$Y,BXQ-C@N,BXP +M+S(T"@HC(%-A;64@:61E82P@8G5T(')A;F=E(')A=&AE7,N;W)G+G5K+#$Y,BXV."XS +M+C$P,"PQ.3(N,38X+C,N,C`P"@HC(%5N8V]M;65N="!T:&ES('1O(&5N86)L +M92!T:&4@:6YT96=R871E9"!$2$-0('-E6]U(&YE960*(R!T;R!S +M=7!P;'D@=&AE(')A;F=E(&]F(&%D9')E2!$2$-0"B,@2!B92!S970@;VYL>2!F;W(@=&AI2!W:&5N('1H92!T86<@(F=R965N +M(B!I2!A('-U8FYE="!W:&EC:"!C +M86XG="!B92!U6YA;6EC(&%D9')E2!A;F0*(R!A9&0@;F%M97,@=&\@=&AE($1.4R!F;W(@=&AE($E0 +M=C8@861D2P@-#AH"@HC($1O($1(0U`@86YD(%)O=71E2!W:6QL('5S +M92!33$%!0R!F;W(@861D2!R82US=&%T96QE2!J +M=7-T"B,@;F5E9"!T;R!B92!O;B!T:&4@7,@9VEV92!T:&4@:&]S="!W:71H($5T +M:&5R;F5T(&%D9')E7,@9VEV92!T:&4@:&]S="!W +M:71H(&-L:65N="!I9&5N=&EF:65R(#`Q.C`R.C`R.C`T"B,@=&AE($E0(&%D +M9')E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ +M(G)E9"(@=&\*(R!T:&4@;6%C:&EN92!W:71H($5T:&5R;F5T(&%D9')E&5D($E0=C8@861D2!;72!A2X*(V1H8W`M:&]S=#UI9#HP,#HP,3HP +M,#HP,3HQ-CID,CHX,SIF8SHY,CID-#HQ.3IE,CID.#IB,BP@9G)E9"P@6S$R +M,S0Z.C5="@HC($EG;F]R92!A;GD@8VQI96YT2!M86-H:6YE('=H;W-E"B,@1$A#4"!V96YD;W)C;&%S +M'1R82!O<'1I +M;VYS('=H:6-H(&%R92!T86=G960@87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@ +M;VYE"B,@;V8@=VAO'1R82!O<'1I;VYS('=H:6-H(&%R +M92!T86=G960@87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO2!D;G-M +M87-Q(&%N9"!S96YD(&YO(&1E9F%U;'0*(R!R;W5T92!A="!A;&PN($YO=&4@ +M=&AA="!T:&ES(&]N;'D@=V]R:W,@9F]R('1H92!O<'1I;VYS('-E;G0@8GD* +M(R!D969A=6QT("@Q+"`S+"`V+"`Q,BP@,C@I('1H92!S86UE(&QI;F4@=VEL +M;"!S96YD(&$@>F5R;RUL96YG=&@@;W!T:6]N"B,@9F]R(&%L;"!O=&AE0H*(R!3970@=&AE(&1E9F%U;'0@=&EM92UT;RUL:79E +M('1O(#4P"B-D:&-P+6]P=&EO;CTR,RPU,`H*(R!3970@=&AE(")A;&P@2!A;B!O<'1I;VX@=VAI8V@@=VEL;"!O;FQY +M(&)E('-E;G0@=&\@=&AE(")R960B(&YE='=O2!A6]U +M(&UA>2!W86YT('1O('5N8V]M;65N="!S;VUE(&]R(&%L;"!O9B!T:&5M(&EF +M('EO=2!U7!E"@HC(%-E;F0@86X@96UP='D@5U!! +M1"!O<'1I;VXN(%1H:7,@;6%Y(&)E(%)%455)4D5$('1O(&=E="!W:6YD;W=S +M(#<@=&\@8F5H879E+@HC9&AC<"UO<'1I;VX],C4R+")<;B(*"B,@4V5N9"!2 +M1D,M,S,Y-R!$3E,@9&]M86EN('-E87)C:"!$2$-0(&]P=&EO;BX@5T%23DE. +M1SH@66]U71H:6YG(&5L&4@=&%G(&9O2YK<'AE"B-D:&-P+6)O;W0];7EB;V]T:6UA9V4*"B,@16YC87!S +M=6QA=&5D(&]P=&EO;G,@9F]R($5T:&5R8F]O="!G4%A%+B!!;&P@=&AE(&]P +M=&EO;G,@87)E"B,@96YC87!S=6QA=&5D('=I=&AI;B!O<'1I;VX@,32!C;V1E"B-D:&-P+6]P=&EO;CUE;F-A<#HQ-S4L(#$W-BP@,6(@("`@("`@ +M(R!N;RUP61H8W`*(V1H8W`M;W!T:6]N/65N8V%P.C$W-2P@,3#@V+3,R"B-D:&-P+6UA=&-H/6ET86YI8W,L(&]P=&EO;CIC;&EE;G0M87)C +M:"P@,B`C24$V-`HC9&AC<"UM871C:#UH86UM97)S+"!O<'1I;VXZ8VQI96YT +M+6%R8V@L(#8@(W@X-BTV-`HC9&AC<"UM871C:#UM86-T96QS+"!O<'1I;VXZ +M8VQI96YT+6%R8V@L(#<@(T5&22!X.#8M-C0*"B,@1&\@&4M<')O;7!T/2)0#@V4$,L("));G-T86QL($QI;G5X(BP@<'AE;&EN=7@*"B,@3&]A +M9',@/'1F='`M#@V4$,L("));G-T86QL($QI;G5X(BP@<'AE;&EN +M=7@L(#$N,BXS+C0*"B,@57-E(&)O;W1S97)V97(@;VX@;F5T=V]R:RP@9F]U +M;F0@;7D@;75L=&EC87-T(&]R(&)R;V%D8V%S="X*(W!X92US97)V:6-E/7@X +M-E!#+"`B26YS=&%L;"!W:6YD;W=S(&9R;VT@4DE3('-E#@V4$,L("));G-T86QL('=I;F1O=W,@9G)O;2!225,@2!F:6QE0HC('1H92!U&%M<&QE(&]F(&1H8W`M8F]O="!W:71H(&%N(&5X=&5R;F%L(%1& +M5%`@2`M+7!X92US97)V +M:6-E+@HC9&AC<"UB;V]T/2]V87(O9G1P9"]P>&5L:6YU>"XP+&)O;W1H;W-T +M+#$Y,BXQ-C@N,"XS"@HC($EF('1H97)E(&%R92!M=6QT:7!L92!E>'1E#TR,3`P"@HC(%1H92!$2$-0('-E6]U(&UI9VAT(&5N9"!U<"!A8V-I9&5N=&%L +M;'D@8V]N9FEG=7)I;F<@82!$2$-0"B,@2X@5&AE($E30R!S97)V97(@=7-E&5C=71A8FQE +M('=H96X@82!$2$-0(&QE87-E(&ES(&-R96%T960@;W(@9&5S=')O>65D+@HC +M(%1H92!A`HC86QI87,],2XR+C,N +M,"PU+C8N-RXP+#(U-2XR-34N,C4U+C`*(R!A;F0@=&AI"UT87)G970@9F]R(&%L;"!L;V-A;`HC(&UA8VAI;F5S+@HC;&]C86QM>`H* +M(R!2971U6]U('=A;G0@=&\@ +M3XL/'=E:6=H=#X*(R!)9B!T:&4@9&]M86EN('!A&%M<&QE+F-O;2!D;VUA:6X@=&\* +M(R!L9&%P&%M +M<&QE+F-O;2!D;VUA:6X@=&\*(R!L9&%P&%M<&QE+F-O;2PS +M.#DL,@H*(R!!(%-25B!R96-O'!A;G-I;VX@ +M9&]N92!F;W(@4U)6(')E8V]R9',@7V1O97-?;F]T"B,@;V-C=7(@9F]R(%!4 +M4B!R96-O'!A;G-I;VX@9&]N92!F;W(@4U)6 +M(')E8V]R9',@7V1O97-?;F]T"B,@;V-C=7(@9F]R(%185"!R96-O&%M<&QE(%-01BX*(W1X="UR96-O5\@=V]R:W,*(R!F;W(@=&%R9V5T3TO=F%R +M+VQO9R]D;G-M87-Q+FQO9PH*(R!);F-L=61E(&$@86YO=&AE'0*```````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````971C+V-R;VXN9&%I +M;'DO```````````````````````````````````````````````````````` +M`````````````````````````````````````````````````````````#`P +M,#`W-34`,#`P,32]C;&5A2!C86-H92!T;R!U;'1I;6%T96QY(')E9'5C92!S=V%P<&EN9PH*7,O=FTO9')O<%]C86-H97,*```````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````````````971C+W9M +M=V%R92UT;V]LF4@:V5P=#H@,2!-0@IV;7-V8RYM +M87A,;V=3:7IE(#T@,0H*(R!$969I;F5S('1H92`B=FUT;V]L"!S:7IE(#4P30IS:7IE(#4P30IC;VUP0HC3&ES=&5N061D7,@9F]R('!R;W1O8V]L('9E2`O971C+W-S:"]SF4@;V8@97!H +M96UE7-L;V=& +M86-I;&ET>2!!551("E-Y65S"D%U=&AO7,@:6X@+V5T8R]S65S(&EF('EO=2!D;VXG="!T'0@<&%S65S"D=34T%024-L96%N=7!#65S"@HC($%C8V5P="!L;V-A;&4M4]F9G-E="`Q,`HC6#$Q57-E3&]C86QH;W-T +M('EE65S"B-5&PR='!D```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````,#`P,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,34`,3,U +M-C$W,C4Q-3(`,#$T-C`W`"`P```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````'5S=&%R("``9&%R6]U('=A;G0@=&\@=7-E(&$@9&EF9F5R +M96YT(&EN=&5R9F%C92!O6]U(&EN2!F2!)4"!A9&1R97-S+`H@("`@("`@(",@>6]U(&-A;B!U7-L;V'-O8VL@(R!P7-T96T@;&]G9VEN9PHD36]D3&]A9"!I;6ML;V<@ +M("`C('!R;W9I9&5S(&ME2!R:VQO9V0I"B,D36]D3&]A9"!I;6UA7-L;V<@7-T96TN("!3<&QI="!I="!U<"!S;R!T:&%T"B,@:70@:7,@96%S>2!T +M;R!W2YL;V<* +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````````````&5T8R]M;V1P +M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@ +M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2!C86-H92!T +M;R!U;'1I;6%T96QY(')E9'5C92!S=V%P<&EN9PH*<&AY;65M/20H9G)E97QA +M=VL@)R]>365M.B][<')I;G0@)#)])RD*:68@6R`D<&AY;65M("UL="`U,3,P +M,#`@73L@=&AE;@H@('-Y;F,@)B8@96-H;R`Q(#X@+W!R;V,O2YC;VYF```````````````````````````````````````````````` +M```````````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P +M,3$-O;FYE8W1I +M;VYS4&5R0VAI;&0@("`),3`P,`H\+TEF36]D=6QE/@H*(R!V:6TZ('-Y;G1A +M>#UA<&%C:&4@=',]-"!S=STT('-T6U,:6YK&5S($9O;&QO=U-Y;4QI;FMS($UU;'1I5FEE=W,*"0E!;&QO=T]V97)R:61E +M($%L;`H)"4]R9&5R(&%L;&]W+&1E;GD*"0EA;&QO=R!F&5C0T=)("U-=6QT:59I97=S +M("M3>6U,:6YK2QA;&QO=PH@("`@("`@($1E;GD@9G)O +M;2!A;&P*("`@("`@("!!;&QO=R!F3X*"3Q$:7)E8W1O0H)"6%L;&]W(&9R;VT@86QL"@D\+T1I3X*"@E38W)I +M<'1!;&EA0H)"4%L;&]W(&9R;VT@86QL"@D\ +M+T1I3X*"@E%T%004-(15],3T=?1$E2?2]ET%004-(15],3T=?1$E2 +M?2]S2QA;&QO=PH)"41E;GD@ +M9G)O;2!A;&P*"0E!;&QO=R!F2!T +M:&4*"2,@("!34TQ#97)T:69I8V%T949I;&4@9&ER96-T:79E(&ES(&YE961E +M9"X*"5-33$-E0H*"2,@("!397)V +M97(@0V5R=&EF:6-A=&4@0VAA:6XZ"@DC("`@4&]I;G0@4U-,0V5R=&EF:6-A +M=&5#:&%I;D9I;&4@870@82!F:6QE(&-O;G1A:6YI;F<@=&AE"@DC("`@8V]N +M8V%T96YA=&EO;B!O9B!014T@96YC;V1E9"!#02!C97)T:69I8V%T97,@=VAI +M8V@@9F]R;2!T:&4*"2,@("!C97)T:69I8V%T92!C:&%I;B!F;W(@=&AE('-E +M0H)(R`@('1H92!R969E +M2`H0T$I.@H)(R`@(%-E="!T:&4@0T$@8V5R=&EF:6-A +M=&4@=F5R:69I8V%T:6]N('!A=&@@=VAE6]U(&YE960@:&%S:"!S>6UL +M:6YK6UL:6YK7!E*3H* +M"2,@("!#;&EE;G0@8V5R=&EF:6-A=&4@=F5R:69I8V%T:6]N('1Y<&4@86YD +M(&1E<'1H+B`@5'EP97,@87)E"@DC("`@;F]N92P@;W!T:6]N86PL(')E<75I +M2!T;R!V97)I9GD@=&AE(&-E +M4-L:65N +M="!R97%U:7)E"@DC4U-,5F5R:69Y1&5P=&@@(#$P"@H)(R`@($%C8V5S6YT87@@:7,@80H)(R`@(&UI>'1UU-33%]#25!(15)]("%^(&TO7BA%6%!\3E5,3"DO(%P* +M"2,@("`@("`@("`@("!A;F0@)7M34TQ?0TQ)14Y47U-?1$Y?3WT@97$@(E-N +M86ME($]I;"P@3'1D+B(@7`H)(R`@("`@("`@("`@(&%N9"`E>U-33%]#3$E% +M3E1?4U]$3E]/57T@:6X@>R)3=&%F9B(L(")#02(L(")$978B?2!<"@DC("`@ +M("`@("`@("`@86YD("5[5$E-15]71$%9?2`^/2`Q(&%N9"`E>U1)345?5T1! +M67T@/#T@-2!<"@DC("`@("`@("`@("`@86YD("5[5$E-15](3U52?2`^/2`X +M(&%N9"`E>U1)345?2$]54GT@/#T@,C`@("`@("`@*2!<"@DC("`@("`@("`@ +M("!OU)%34]415]!1$12?2`]?B!M+UXQ.3)<+C2!E>&ES=&EN9R!W:&5N(&-L +M:65N=`H)(R`@("`@875T:&5N=&EC871I;VX@:7,@=7-E9"DN(%1H:7,@8V%N +M(&)E('5S960@=&\@:6UP;W)T('1H92!C97)T:69I8V%T97,*"2,@("`@(&EN +M=&\@0T=)('-C'!O'!E;G-I=F4@;W!E2!E;F%B;&5S('1H90H)(R`@("`@97AP;W)T871I;VX@9F]R +M($-'22!A;F0@4U-)(')E<75E'!O2`O=7-R+VQI8B]C9VDM8FEN/@H)"5-33$]P=&EO;G,@*U-T +M9$5N=E9A6]U(&-A;B!U6]U(')E8V5I=F4@ +M22]/(&5R2!A;&5R="!I2!F;W(@8G)O=W-E6]U(&MN;W<@=&AA="!T:&5I2X*"2,@("!. +M;W1I8V4Z($UO2!W86YT('1O(&1I2P@;VYE(&AA6]U(&IU2!A;'-O"B,@:&%V92!T;R!C +M:&%N9V4@=&AE(%9I6]U(&AA=F4@=7!GB!A;F0*(R!214%$ +M344N1&5B:6%N+F=Z"@I,:7-T96X@,3`N,2XQ+C$Z.#$X,`H*/$EF36]D=6QE +M(&UO9%]S0HC('1E;&P@ +M9&YS;6%S<2!T;R!F:6QT97(@;W5T('%U97)I97,@=VAI8V@@=&AE('!U8FQI +M8R!$3E,@8V%N;F]T"B,@86YS=V5R+"!A;F0@=VAI8V@@;&]A9"!T:&4@2!T:&4@2X*"B,@3F5V97(@9F]R=V%R9"!P;&%I +M;B!N86UE2X*(R!.;W1E('1H870@*&%M;VYG2!O9B!T:&4@=7!S=')E86T*(R!S97)V97)S(&ET(&MN +M;W=S(&%B;W5T(&%N9"!T2!E86-H('%U97)Y"B,@=VET:"`@96%C:"`@2`@:6X@('1H92`@;W)D97(@('1H97D@("!A<'!E87(@ +M("!I;@HC("]E=&,O2!A&%M<&QE(&]F(')O=71I;F<@4%12('%U97)I97,@=&\@ +M;F%M97-E2!D;VUA:6YS(&AE6]U('=A;G0@=&\@9F]R8V4@=&\@86X@ +M25`@861D&%M<&QE(&)E;&]W('-E;F0@86YY +M(&AO6]U('=A;G0@ +M9&YS;6%S<2!T;R!L:7-T96X@9F]R($1(0U`@86YD($1.4R!R97%U97-T&-E<'0M +M:6YT97)F86-E/6QO"@HC($]R('=H:6-H('1O(&QI2!A9&1R +M97-S("AR96UE;6)E2!$3E,@7-T96US('=H:6-H +M('-U<'!O6]U(&UA>2!N965D('1H:7,@:7,@=VAE;@HC(')U;FYI;F<@ +M86YO=&AE6]U(&1O;B=T('=A;G0@9&YS;6%S<2!T;R!R +M96%D("]E=&,O:&]S=',L('5N8V]M;65N="!T:&4*(R!F;VQL;W=I;F<@;&EN +M92X*(VYO+6AO6]U('=A;G0@:70@=&\@2!P;W1E;G1I86QL>2!S971T:6YG('1H90HC +M("`@(&1O;6%I;B!O9B!A;&P@'!A;F0M:&]S +M=',B"B-D;VUA:6X],BYV;6]P0HC(&$@;&5A6]U(&AA=F4@;6]R92!T:&%N(&]N92!N971W;W)K+"!Y;W4@ +M=VEL;"!N965D('1O"B,@2!P87)A;65T97)S(&9O&%M<&QE +M7,@7,@:70G +M2!T +M:&4@;6%C:&EN92!W:71H(&5T:&5R;F5T"B,@861D'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ +M(G)E9"(@=&\*(R!A;GD@;6%C:&EN92!W:71H(&5T:&5R;F5T(&%D9')E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ +M(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO"(*(V1H8W`M +M=F5N9&]R8VQA2!M86-H:6YE(&]N90HC +M(&]F('=H;W-E($1(0U`@=7-E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@ +M87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO2!N86UE.@HC(')U;B`B9&YS;6%S<2`M+6AE;'`@9&AC<"(@=&\@9V5T +M(&$@;&ES="X*(R!.;W1E('1H870@86QL('1H92!C;VUM;VX@2!D;G-M87-Q+B!9;W4@=F5R>2!L:6ME;'D@=VEL;"!N;W0@ +M;F5E9`HC(&%N>2!D:&-P+6]P=&EO;G,N($EF('EO=2!U2!A2!W;W)K0HC(&1E9F%U;'0@*#$L +M(#,L(#8L(#$R+"`R."D@=&AE('-A;64@;&EN92!W:6QL('-E;F0@82!Z97)O +M+6QE;F=T:"!O<'1I;VX*(R!F;W(@86QL(&]T:&5R(&]P=&EO;B!N=6UB97)S +M+@HC9&AC<"UO<'1I;VX],PH*(R!3970@=&AE($Y44"!T:6UE('-E0H*(R!3970@=&AE(&1E +M9F%U;'0@=&EM92UT;RUL:79E('1O(#4P"B-D:&-P+6]P=&EO;CTR,RPU,`H* +M(R!3970@=&AE(")A;&P@2!A;B!O<'1I +M;VX@=VAI8V@@=VEL;"!O;FQY(&)E('-E;G0@=&\@=&AE(")R960B(&YE='=O +M2!A6]U(&UA>2!W86YT('1O('5N8V]M;65N="!T:&5M +M(&EF('EO=2!U2!N971B:6]S('-C;W!E+@H*(R!396YD(%)&0RTS +M,SDW($1.4R!D;VUA:6X@2!W:&5N('1H92!C;&EE;G0@71E(&EN=&5G97(@+2!T:&%T)W,@=VAA="!M:6-R;W-O9G0@=V%N +M=',N(%-E90HC(&AT='`Z+R]T96-H;F5T,BYM:6-R;W-O9G0N8V]M+U=I;F1O +M=W-397)V97(O96XO;&EB2]A-S!F,6)B-RUD,F0T+30Y9C`M.39D-BTT +M8C2!S;VUE(&-O;F9I9W5R871I;VYS(&]F"B,@ +M171H97)B;V]T('1O(&%L;&]W(&ES('1O(')E8V]G;FES92!T:&4@1$A#4"!S +M97)V97(N"B-D:&-P+6]P=&EO;CUV96YD;W(Z171H97)B;V]T+#8P+")%=&AE +M"X@3F]T92!T:&%T +M('=E(&YE960@=&\@2!N965D"B,@=&AI2!F:6QE0HC('1H92!U&5L:6YU>"YR +M960M;F5T"@HC($%N(&5X86UP;&4@;V8@9&AC<"UB;V]T('=I=&@@86X@97AT +M97)N86P@2!C;&EE +M;G0@=VAI8V@@8G)O861C87-T6]U(&UI9VAT(&5N9"!U +M<"!A8V-I9&5N=&%L;'D@8V]N9FEG=7)I;F<@82!$2$-0"B,@2X@5&AE($E30R!S +M97)V97(@=7-E2!T:&4@:&]S=&YA;64*(R!I9B!T:&5R92!IF4@:&5R92X*(V-A8VAE +M+7-I>F4],34P"@HC($EF('EO=2!W86YT('1O(&1I2!R97-P;VYS97,@=VAI8V@@8V]M92!F;W)M("]E=&,O:&]S=',@86YD +M('1H92!$2$-0(&QE87-E"B,@9FEL92!H879E(%1I;64M5&\M3&EV92!S970@ +M87,@>F5R;RP@=VAI8V@@8V]N=F5N=&EO;F%L;'D@;65A;G,*(R!D;R!N;W0@ +M8V%C:&4@9G5R=&AE6]U(&%R92!H87!P>2!T;R!T6]U(&-A;B!S970@82!T:6UE+71O+6QI=F4@*&EN"B,@6]U('=A;G0@9&YS;6%S<2!T +M;R!D971E8W0@871T96UP=',@8GD@5F5R:7-I9VX@=&\@"!U<"!$ +M3E,@2!W;W)K"!T;R`U+C8N-RYX"B-A;&EA"UT87)G970@9F]R(&%L;"!L;V-A;`HC(&UA8VAI;F5S+@HC;&]C86QM>`H* +M(R!2971U6]U('=A;G0@=&\@ +M3XL/'=E:6=H=#X*(R!)9B!T:&4@9&]M86EN('!A&%M<&QE+F-O;2!D;VUA:6X@=&\* +M(R!L9&%P&%M +M<&QE+F-O;2!D;VUA:6X@=&\*(R!L9&%P&%M<&QE+F-O;2PS +M.#D*"B,@5'=O(%-25B!R96-O&%M<&QE+F-O;2PS.#DL,0HC&%M<&QE+F-O;2QL9&%P&%M<&QE+F-O +M;0HC&%M<&QE+F-O;0H*(R!4:&4@9F]L +M;&]W:6YG(&QI;F4@65E(%!A9V4N7VAT='`N7W1C<"YD;G,M'0M3TO=F%R+VQO9R]D +M;G-M87-Q+FQO9PH*(R!);F-L=61E(&$@86YO=&AE'0*```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````&5T8R]I<'-E8RYS96-R971S```````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P,3PH@("`@;6%X2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P +M.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N +M71R=6YC871E"GT*```````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````&5T8R]L;V=R;W1A=&4N +M9"]C;VYN=')A8VMD```````````````````````````````````````````` +M```````````````````````````````````````````````````````P,#`P +M-C0T`#`P,#$W-3``,#`P,3PH@("`@;6%X6-O;7!R97-S"@H@("`@<&]S=')O=&%T90H@("`@("`@(&EF +M(%L@+64@+W9A2!O9B!T:&4@3&EC96YS92!A +M=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O +M'!R97-S(&]R(&EM<&QI960N("!3 +M964@=&AE($QI8V5NPH@("`@("`@(')O +M=&%T92`U"B`@("`@("`@;6%X2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N'-I>F4@,3!- +M"B`@("`@("`@;6ES0H@("`@("`@ +M(&-O;7!R97-S"B`@("`@("`@8V]P>71R=6YC871E"GT*```````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````!E=&,O;&]G0H)8V]M<')E71R=6YC871E"B`@("`@("!R;W1A=&4@,PH@("`@("`@8V]M<')E'0*("`@("`@(&UA>'-I>F4@,3!-"B`@("`@("!N;W1I9F5M +M<'1Y"GT*```````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````&5T8R]L;V=R;W1A=&4N9"]R0H)8V]M<')E +M2YL;V<@>PH@("`@0H@("`@;6%X7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ +M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E +M(&%T"B,*(R`@(&AT='`Z+R]W=W2\````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````,#`P,#'DN8V9G```````````````````````````````````````````` +M```````````````````````````````````````````````````````````P +M,#`P-C0T`#`P,#$W-3``,#`P,3'D*"75S97(@:&%P0H)9W)O +M=7`@:&%P0H)9&%E;6]N"@ID969A=6QT7!E(CHB9W5E2(Z(C$W,BXQ-BXQ+C$B+`H)(F1E9F%U +M;'1?96YT2(*?0H````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````;W!T+V-L;W5D+W1E7!E(CH@(FEC;7`B"B`@("`@("`@("`@('TL"B`@("`@("`@("`@ +M('L*("`@("`@("`@("`@("`@(")A;&QO=V5D(CH@=')U92P*("`@("`@("`@ +M("`@("`@(")C:61R(CH@(C$P+C`N,BXP+S@B+`H@("`@("`@("`@("`@("`@ +M(F9I7!E(CH@(G5D<"(*("`@("`@("`@ +M("`@?2P*("`@("`@("`@("`@>PH@("`@("`@("`@("`@("`@(F%L;&]W960B +M.B!T7!E(CH@(FYE='=OR)P=6)L:6-?:7`B.B(Q +M,"XP+C(N,3`R(BP*(G-O=7)C95]N870B.G1R=64L"B)A9&0B.G1R=64L"B)O +M;F5?=&]?;VYE7VYA="(Z9F%L2(Z(C$P+C`N,BXQ(BP*(FYE=&UA2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H +M92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2!C;61?;&EN92YJ2!I<',P,#`Q+FIS;VX*+V]P="]C;&]U9"]B:6XO +M=7!D871E7V-O;F9I9RYP>2!I<',P,#`R+FIS;VX*+V]P="]C;&]U9"]B:6XO +M=7!D871E7V-O;F9I9RYP>2!I<',P,#`S+FIS;VX*```````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````;W!T+V-L;W5D+W1ER)P +M=6)L:6-?:7`B.B(Q,"XP+C(N,3`S(BP*(G-O=7)C95]N870B.G1R=64L"B)A +M9&0B.G1R=64L"B)O;F5?=&]?;VYE7VYA="(Z9F%L2(Z(C$P+C`N,BXQ(BP*(FYE=&UAPH)(FQO8V%L7W!U8FQI8U]I<"(Z(C$W,BXQ-BXQ +M+C$B+`H)(FQO8V%L7V=U97-T7V-I9'(B.B(Q-S(N,38N,2XP+S(T(BP*"2)L +M;V-A;%]P=6)L:6-?9V%T97=A>2(Z(C$W,BXQ-BXQ+C$B+`H)(G!E97)?9V%T +M97=A>5]I<"(Z(C$P+C(P,"XR,#`N,2(L"@DB<&5E2(Z(C-D97,M;60U(BP* +M"2)I:V5?<&]L:6-Y(CHB,V1E7)I9VAT(&]W +M;F5R6]U +M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O +M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W +M=W2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NW!R:6YT("0Y.WTG*0H):68@ +M6R`D4D]55$527U-4051%(#T@(E50(B!="@ET:&5N"@D@("`@4U1!5%53/4U! +M4U1%4@H)96QI9B!;("123U5415)?4U1!5$4@/2`B1$]73B(@70H)=&AE;@H) +M("`@(%-405154SU"04-+55`*"69I"F9I"@IE8VAO(")3=&%T=7,Z("1[4U1! +M5%53?2(*```````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````!O<'0O8VQO=60O=&5M<&QA=&5S+VAE87)T8F5A="YS:"YT96UP;``` +M```````````````````````````````````````````````````````````` +M````````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC +M"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ +M=&AE($QI8V5N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H +M='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI +M8V5NPH@("`@36]D +M92!&5$97('L*("`@("`@("`C"B`@("`@("`@(R!3:7IE(&]F('1H92!R97-E +M;F0@<75E=64@*&EN(&]B:F5C=',I+B!4:&ES(&ES('1H92!M87AI;75M"B`@ +M("`@("`@(R!N=6UB97(@;V8@;V)J96-T2!T;R!S=&]R92!D96%D(&]B:F5C=',N"B`@("`@("`@(R!$969A +M=6QT(&ES(#$S,3`W,B!O8FIE8W1S+@H@("`@("`@(",*("`@("`@("`C(%)E +M6]U('-E="!A(&QO=R!V86QU92P@5$-0(&5N +M=')I97,@:6X*("`@("`@("`C($5S=&%B;&ES:&5D('-T871E&%M<&QE+`H@("`@("`@(",@86X@ +M4U-((&-O;FYE8W1I;VX@=VET:&]U="!+965P06QI=F4@96YA8FQE9"X@268@ +M;F]T('-E="P*("`@("`@("`C('1H92!D865M;VX@=7-E6]U(&1E +M8W)E87-E('1H:7,*("`@("`@("`C('9A;'5E+"!T:&4@;G5M8F5R(&]F(&%C +M:VYO=VQE9V1M96YT6]U"B`@("`@("`@(R!I;F-R96%S +M92!T:&ES('9A;'5E+"!T:&4@'!E6-L97,@6]U('1O(&1I +M'1E'1E +MF%T:6]N +M(&UE2!O9B!Y;W5R(&5X:7-T:6YG(&EN=&5R9F%C97,N($EF +M(&%N>2!D;W5B="P*("`@("`@("`C(&1O(&YO="!M;V1I9GD@=&AI0H@("`@("`@(",@9&]U +M8G0L(&1O(&YO="!M;V1I9GD@=&AIF%T:6]N(&UEF%T:6]N(&UE6]U"B`@("`@ +M("`@(R!N;W1I8V4@6]U(&UA>2!W86YT('1O +M(&EN8W)E87-E('1H92!S:7IE"B`@("`@("`@(R!O9B!T:&4@2!T;R!A8VAI979E(&9A=6QT+71O;&5R86YC92X@26X@ +M8V%S92!O9B!D;W5B="P@9&\*("`@("`@("`C(&YO="!M;V1I9GD@=&AI6]U(&-A;B!O;FQY('-E;&5C="!O;F4N"B`@("`C"B`@("`C(%5$4"![ +M"B`@("`@("`@(PH@("`@("`@(",@5410(&%D9')E6]U(&%R92!G;VEN9R!T;R!UF4*("`@("`@("`C"B`@("`@("`@ +M(R!28W93;V-K971"=69F97(@,3(T.3(X,`H*("`@("`@("`C"B`@("`@("`@ +M(R!%;F%B;&4O1&ES86)L92!M97-S86=E(&-H96-KPH@("`@(PH@("`@(R!3970@=&AE +M(&YI8V4@=F%L=64@;V8@=&AE(&1A96UO;BP@=&AI6]U(&-A;B!S96QE8W0@8F5T=V5E +M;@H@("`@(R!24B!A;F0@1DE&3R!A;F0@=&AE('!R;V-EPH@("`@(R`@(%1Y<&4@1DE&3PH@("`@(R`@(%!R:6]R:71Y +M(#DY"B`@("`C('T*"B`@("`C"B`@("`C($YU;6)E2X*("`@(",@4F5A9"!S;VUE(&1O8W5M96YT +M2!K965P +M('-O;64@9&5A9"!E;G1R:65S(&-A8VAE9"!F;W(@<&]S7-L;V2!N86UE +M("AD865M;VX@*&1E9F%U;'0I(&]R(&QO8V%L,"XN-RD*("`@(",@1&5F875L +M=#H@;V9F"B`@("`C"B`@("!3>7-L;V<@;VX*"B`@("`C"B`@("`C($QO8VMF +M:6QE"B`@("`C"B`@("!,;V-K1FEL92`O=F%R+VQO8VLO8V]N;G1R86-K9"YL +M;V-K"@H@("`@(PH@("`@(R!5;FEX('-O8VME="!C;VYF:6=UF5-87A'&%M<&QE(&-O;F9I9W5R +M871I;VX@9FEL92!S971S('1H90H@("`@(R!S:7IE('1O(#(@34)Y=&5S('1O +M(&%V;VED('1H:7,@F4*("`@(",@:68@:70@9&5T96-T&EM=6T@8G5F9F5R('-I>F4@9W)O=W1H('1H870@8V%N(&)E(')E86-H +M960N(%1H:7,@97AA;7!L92!F:6QE"B`@("`C('-E=',@=&AE('-I>F4@=&\@ +M."!-0GET97,N"B`@("`C"B`@("!.971L:6YK0G5F9F5R4VEZ94UA>$=R;W=T +M:"`X,S@X-C`X"@H@("`@(PH@("`@(R!)9B!T:&4@9&%E;6]N(&1E=&5C=',@ +M=&AA="!.971L:6YK(&ES(&1R;W!P:6YG('-T871E+6-H86YG92!E=F5N=',L +M"B`@("`C(&ET(&%U=&]M871I8V%L;'D@6YC:')O +M;FEZ871I;VX@86=A:6YS="!T:&4@2V5R;F5L"B`@("`C(&%F=&5R(#,P('-E +M8V]N9',@*&1E9F%U;'0@=F%L=64I+B!297-Y;F-H6]U('=A;G0@6YC+B!4:&ES(&]P=&EO;B!I"!K97)N96P@/CT@ +M,BXV+C,Q+@H@("`@(PH@("`@(R!.971L:6YK179E;G1S4F5L:6%B;&4@3V9F +M"@H@("`@(PH@("`@(R!">2!D969A=6QT+"!T:&4@9&%E;6]N(')E8V5I=F5S +M('-T871E('5P9&%T97,@9F]L;&]W:6YG(&%N"B`@("`C(&5V96YT+61R:79E +M;B!M;V1E;"X@66]U(&-A;B!M;V1I9GD@=&AIF%T:6]N(&UO +M9&4L('1H92!P;VQL:6YG(&UO9&4@8V%N(&]N;'D@9W5AF5S('1H92!H86YD;&EN9R!O9B!S +M=&%T92UC:&%N9V4@979E;G1S(&-O;6EN9PH@("`@(R!F2`H:6X@ +M=&5R;7,@;V8*("`@(",@2!T:')E92!F:6QT97(M6]U(&-A;B!D969I;F4@=&AE(&5V +M96YT(&9I;'1E2!A=F]I +M9&EN9R!T:&4@8V]P>2!O9B!T:&4@979E;G0@;65S6]U(')E<75I"!K97)N96P@/CT@,BXV+C(Y('1O"B`@("`C +M(&9I;'1E6]U('=A;G0@=&\@PH@ +M("`@("`@(",*("`@("`@("`C($%C8V5P="!O;FQY(&-E65R(#0@<')O +M=&]C;VPN"B`@("`@("`@(PH@("`@("`@(%!R;W1O8V]L($%C8V5P="!["B`@ +M("`@("`@("`@(%1#4`H@("`@("`@("`@("!30U10"B`@("`@("`@("`@($1# +M0U`*("`@("`@("`@("`@5410"B`@("`@("`@("`@($E#35`@(R!4:&ES(')E +M<75I2!A;&P@=&AE"B`@("`@("`@(R!)4"!A +MPH@("`@("`@("`@ +M("!)4'8T7V%D9')E2!A;B!)4'8V(&%D9')E2!F;&]W('-T871E+@H@("`@("`@(",@5&AI +M2!B86-K=7`*("`@("`@("`C(&9I +M7!E/6YO=&EF>0H@("`@4WES=&5M9"!O;@I]"@`````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````!O<'0O8VQO=60O=&5M +M<&QA=&5S+V-H96-K7VAE87)T8F5A="YS:"YT96UP;``````````````````` +M````````````````````````````````````````````````````````,#`P +M,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7-T96UC=&P@2`M+69A=6QT"@H@("`@<&MI;&P@+3D@:V5E<&%L:79E9"`^/B`D4D]55$52 +M7TQ/1R`R/B8Q('Q\('1R=64*("`@('!K:6QL("TY(&-O;FYT&ET"F9I"@``````````````;W!T+V-L;W5D+W1E;7!L871E +M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI +M86YC90HC('=I=&@@=&AE($QI8V5N6]U +M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HA +M('=I=&@@=&AE($QI8V5NPH@("`@PH@("`@("`@(&AE87)T +M8F5A=`H@("`@?0H*("`@(&YO=&EF>5]B86-K=7`@(B]O<'0O8VQO=60O8FEN +M+VUA2`M+6)A8VMU<"(*("`@(&YO=&EF>5]M87-T97(@(B]O<'0O +M8VQO=60O8FEN+VUA2`M+6UA5]F875L +M="`B+V]P="]C;&]U9"]B:6XO;6%S=&5R+G!Y("TM9F%U;'0B"GT*```````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````!O<'0O8VQO=60O8FEN+P`````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````,#`P,#&4N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&ET(#$*?0H*&5?8V9G7V9I;&5N86UE(#P\14]&"D1%1D%53%0@ +M9&5F875L=`I04D]-4%0@,0I424U%3U54(#(V"D1)4U!,05D@8F]O="YMF4]-C8P,#`@:6YI=')D/21I;FET0`````````````````````````````````````````` +M````````````````````````````````````````````,#`P,#2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA +M=R!O'!R97-S(&]R(&EM<&QI960N +M("!3964@=&AE($QI8V5N7!E(ET@/3T@(G-T871I8VYA +M=')U;&5S(CH*("`@("`@("`@("`@;F5W7!E(ET@/3T@(F9O"`](&1B86=;"AF;W)W87)D*0H@("`@("`@("`@("`@("`@("`@(&EF(&YO +M="!I;F1E>"`]/2`M,3H*("`@("`@("`@("`@("`@("`@("`@("`@9&)A9UMS +M;W5R8V5?:7!=6VEN9&5X72`](&YE=W)U;&4*("`@("`@("`@("`@("`@("`@ +M("!E;'-E.@H@("`@("`@("`@("`@("`@("`@("`@("!D8F%G6W-O=7)C95]I +M<%TN87!P96YD*&YE=W)U;&4I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@ +M("`@("`@("`@("`@("`@(&1B86=;7!E(ET@/3T@ +M(G-T871I8VYA=')U;&5S(CH*("`@("`@("`@("`@("`@(&EF('-O=7)C95]I +M<"!I;B!D8F%G+FME>7,H*3H*("`@("`@("`@("`@("`@("`@("!D96P@9&)A +M9UMS;W5R8V5?:7!="B`@("`@("`@("`@(&5L:68@7,H*3H*("`@("`@("`@("`@("`@("`@("!I;F1E>"`] +M("TQ"B`@("`@("`@("`@("`@("`@("`@9F]R(&9O%T*"B`@("!R971U2!T:&4@<'5B;&EC('-I9&4L +M('1H;W-E(&UU7!E(ET@/3T@7!E(ET@/3T@(G-T871I +M8VYA="(Z"B`@("`@("`@2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET(#$*9FD*"G5S86=E*"D@ +M>PH@('!R:6YT9B`B57-A9V4Z("5S("U;8WQG?')\;GQD72!;+6P@/'!U8FQI +M8R!G871E=V%Y/ET@6RUV(#QV<&,@8VED&ET(#(@)&QO8VL@)&QO8VME9`H).SL*("!E +M&ET("0_("1L;V-K("1L;V-K960*9FD*"FEF +M(%L@(B1N9FQA9R(@/3T@(C$B(%T*=&AE;@H@("-G971?=G!N7W5S86=E"B`@ +M=6YL;V-K7V5X:70@)#\@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)&1F;&%G +M(B`]/2`B,2(@70IT:&5N"B`@(W)E;6]V95]U&ET(#`@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)')F;&%G(B`]/2`B +M,2(@70IT:&5N"B`@71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A +M=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&-E +M<'0@24]%2@I"B`@("`@("`@("`@ +M("`@("`@("`@9W5E22R)$;VU57U)E<75E&-E<'0@17AC97!T:6]N(&%S(&4Z +M"B`@("`@("`@("`@("`@("`@("`@;&]G9VEN9RYE7!E)UT@/3T@)V%L;"<@86YD(&]B:ELG +M7!E(#T@(F%N>2(*("`@("`@("`@("`@:68@(FEC +M;7!?='EP92(@:6X@7,H*2!A;F0@7!E)UT*("`@("`@("`@("`@:68@(FEC;7!? +M8V]D92(@:6X@7,H*2!A;F0@7!E)UTL('-E;&8N7!E("5S("UJ("5S(B`E("AI8VUP7W1Y<&4L('-E;&8N&5C=71E*&1S=$EP2==.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5; +M)V%C=&EO;B==(#T@(D%#0T505"(*("`@("`@("`@("`@("`@("`@("!E;'-E +M.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5;)V%C=&EO;B== +M(#T@(D123U`B"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ +M("`@("`@(",@1F]R(&]T:&5R(')U;&5S(&%D9&5D+"!I9B!D969A=6QT7V5G +M7!E("5S(B`E(&EC;7!?='EP90H@("`@("`@("`@("`@ +M("`@96QI9B!R=6QE6R=P7!E +M+B!3;RP@:71S(&9W(&%T=')I8G5T92!I7!E(#T@ +M(F%N>2(*("`@("`@("`@("`@("`@('-E;&8N<')O=&]C;VP@/2!S96QF+G1Y +M<&4*("`@("`@("`@("`@("`@(&EF(")I8VUP7W1Y<&4B(&EN(')U;&4N:V5Y +M7!E +M+"!R=6QE6R=I8VUP7V-O9&4G72D*("`@("`@("`@("`@("`@(&EF('-E;&8N +M='EP92`]/2`B<')O=&]C;VPB.@H@("`@("`@("`@("`@("`@("`@(&EF(')U +M;&5;)W!R;W1O8V]L)UT@/3T@-#$Z"B`@("`@("`@("`@("`@("`@("`@("`@ +M(')U;&5;)W!R;W1O8V]L)UT@/2`B:7!V-B(*("`@("`@("`@("`@("`@("`@ +M("!S96QF+G!R;W1O8V]L(#T@&5C=71E*")I<'1A +M8FQE+4$O:7!T86)L97,@+70@9FEL=&5R("U$+V&5C=71E*")I +M<'-E="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP +M&5C=71E*")I<'-E="`M +M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP2!V +M86QI9"!D871A"B`@("`@("`@("`@("`@("!I9B!F;VQD97(@(3T@(G5S97)D +M871A(B!A;F0@9F]L9&5R("$](")M971A9&%T82(Z"B`@("`@("`@("`@("`@ +M("`@("`@8V]N=&EN=64*"B`@("`@("`@("`@("`@("!I9B!F:6QE(#T]("(B +M.@H@("`@("`@("`@("`@("`@("`@(&-O;G1I;G5E"@H@("`@("`@("`@("`@ +M("`@7,N97AI="@Q*0H@("`@("`@("`@("!I9B!O2Q!;&QO=UQN1&5N>2!F2!E>&ES=',L('=E(&1O(&ET('1H:7,@ +M=V%Y(&9O7,N97AI="@Q +M*0H*("`@("`@("!F:"`](&]P96XH:'1A8V-E2`](")2 +M97=R:71E4G5L92!>;65T82UD871A+R@N*RDD("`N+B\B("L@9F]L9&5R("L@ +M(B\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%=(@H@("`@("`@("`@("!H +M=&%C8V5S7,N97AI="@Q*2`@ +M(R!&25A-10H@("`@("`@(')E='5R;B!4&ET*#$I("`C($9)6$U%"B`@("`@("`@:7!S96,N=G!N+2@N*BDN8V]N9B(L(&9I;&4I"B`@("`@ +M("`@("`@(&EF(&TZ"B`@("`@("`@("`@("`@("!S96QF+F-O;F9I<',N87!P +M96YD*&TN9W)O=7`H,2DI"@H@("`@("`@(&9O&5C=71E*")I<'-E +M8R!R96QO860B*0H*("`@(&1E9B!C;VYF:6=U#4R-2`M:B!!0T-%4%0B("4@9&5V72D*("`@ +M("`@("!F;W(@;F5T(&EN(&]B:ELG<&5E&UA&UA5]I<"=="B`@("`@("`@<&5E7!E/71U;FYE;"(I"B`@ +M("`@("`@9FEL92YA9&1E<2@B(&%U=&AB>3US96-R970B*0H@("`@("`@(&9I +M;&4N861D97$H(B!K97EE>&-H86YG93UI:V4B*0H@("`@("`@(&9I;&4N861D +M97$H(B!I:V4])7,B("4@:6ME<&]L:6-Y*0H@("`@("`@(&9I;&4N861D97$H +M(B!I:V5L:69E=&EM93TE3TS,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1T:6UE;W5T/3$R +M,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1A8W1I;VX]')A;F=E*#,I.@H@("`@("`@("`@("!R +M97-U;'0@/2!#&5C=71E*"=I<'-E8R!S=&%T=7,@=G!N+25S +M('P@9W)E<"`B)7,B)R`E("AR:6=H='!E97(L('!E97)L:7-T+G-P;&ET*"(L +M(BP@,2E;,%TI*0H@("`@("`@("`@("!I9B!L96XH2P@)R,G*0H@("`@("`@(&EF(&YO="!U&5C +M=71E*")T9&)D=6UP("]V87(O&5C=71E*"=K:6QL("TY("5S)R`E('!I9"D*"@IC;&%S&5C=71E*")S>7-T96UC=&P@2YS96-R971S(B`E("AS96QF+E903D-/3D9$25(I"B`@("`@ +M("`@>&PR='!D8V]N9F9I;&4@/2`B+V5T8R]X;#)T<&0O>&PR='!D+F-O;F8B +M"B`@("`@("`@>&PR='!O<'1I;VYS9FEL92`]("(O971C+W!P<"]O<'1I;VYS +M+GAL,G1P9"(*"B`@("`@("`@;&]C86QI<"`](&]B:ELG;&]C86Q?:7`G70H@ +M("`@("`@(&QO8V%L8VED2`Z(%!32R!<(B5S7"(B("4@*&QE9G0L('!S:RDI"B`@("`@ +M("`@&PR='!D8V]N9F9I;&4I"B`@("`@("`@>&PR='!D8V]N9BYA9&1E<2@B +M:7`@&PR='!O<'1I;VYS+F-O;6UI="@I"@H@("`@9&5F(')E;6]T96%C8V5S4EP*'-E;&8L(&EP82DZ"B`@("`@("`@9F]R(&EN +M=&5R9F%C92!I;B!S96QF+F-O;F9I9RYA9&1R97-S*"DN9V5T7VEN=&5R9F%C +M97,H*3H*("`@("`@("`@("`@:68@:6YT97)F86-E+FEP7VEN7W-U8FYE="AI +M<&$I.@H@("`@("`@("`@("`@("`@2@I"B`@("`@("`@4EP*')U +M;&5;)W!U8FQI8U]I<"==*0H@("`@("`@(&EN=&5R;F%L7V9W:6YT97)F86-E +M(#T@4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI"B`@ +M("`@("`@<'5B;&EC7V9W<&]R=',@/2!S96QF+G!O4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI+`H@ +M("`@("`@("`@("`@("`@&UA2(Z"B`@("`@("`@("`@(&9W7W!R97)O=71?2(Z"B`@("`@("`@ +M("`@(&9W7W!O2(Z"B`@("`@("`@("`@ +M(&9W7W!O2(Z"B`@("`@("`@ +M("`@(&9W7V]U='!U=%]R=6QE("L]("(@+2UD<&]R="`E2(Z"B`@("`@("`@("`@(&9W +M7V]U='!U=%]R=6QE("L]("(Z(B`K('-E;&8N<&]R='-4;U-T4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI +M+`H@("`@("`@("`@("`@("`@&9F9F9F9F9F("TM +M8W1M87-K(#!X9F9F9F9F9F8B("4*("`@("`@("`@("`@("`@("`@("`@("`@ +M4EP*')U;&5;(FEN=&5R;F%L7VEP +M(ETI+"!S96QF+F=E=$=U97-T27`H*2E=*0H*"F-L87-S($EP5&%B;&5S17AE +M8W5T;W(Z"@H@("`@8V]N9FEG(#T@3F]N90H*("`@(&1E9B!?7VEN:71?7RAS +M96QF+"!C;VYF:62!PR)P&5C=71OR)P&5C +M=71OR)P +M&5C=71O7!E.B`E&5C27!T86)L97,H8V]N9FEG*3H* +M("`@("`@("!L;V=G:6YG+F1E8G5G*")0&5C=71O7,H*3H*("`@("`@("`@("`@ +M97AE8T1A=&%B86&5C27!T +M86)L97,H8V]N9FEG*0H@("`@96QI9B!J&5C27!T86)L97,H +M8V]N9FEG*0H@("`@96QS93H*("`@("`@("!L;V=G:6YG+G=A7!E/25S(B`E("AP6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7)I9VAT(&]W;F5R6]U('5N9&5R('1H +M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C +M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7)I +M9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT +M='`Z+R]W=W&5C=71I;F'!O2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&QO9V=E +M&ET(#(@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)$%F;&%G(B`] +M/2`B,2(@70IT:&5N"B`@861D7W-N870@("1P=6)L:6-)<`H@('5N;&]C:U]E +M>&ET("0_("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1$9FQA9R(@/3T@(C$B +M(%T*=&AE;@H@(')E;6]V95]S870@("1P=6)L:6-)<`H@('5N;&]C:U]E>&ET +M("0_("1L;V-K("1L;V-K960*9FD*"G5N;&]C:U]E>&ET(#$@)&QO8VL@)&QO +M8VME9`H````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````````````;W!T+V-L +M;W5D+V)I;B]V<&-?2!O9B!T:&4@3&EC96YS92!A=`HC"B,@ +M("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE +M($QI8V5N5]T86)L92@I('L*("!L;V-A;"!F5]T86)L92`B +MPH@(&QO8V%L(')U +M;&4])#$*("!L;V-A;"!I<#TD*&5C:&\@)')U;&4@?"!C=70@+60Z("UF,2D* +M("!I9B!;("1I<"`]/2`B4F5V;VME(B!="B`@=&AE;@H@("`@3TD9V%T97=A>2!C:61R/21C +M:61R(@H@(&QO8V%L(&1E=CTD*&=E=$5T:$)Y27`@)&EP*0H@(&EF(%L@)#\@ +M+6=T(#`@70H@('1H96X*("`@(')E='5R;B`Q"B`@9FD*("!S=61O(&EP(')O +M=71E(&%D9"`D8VED3TD9V%T97=A>2!C:61R/21C:61R(@H@ +M(')E='5R;B`D&ET(#(@)&QO8VL@)&QO8VME +M9`H@("`@("`@(#L["B`@97-A8PID;VYE"@II9B!;("UN("(D6EN9R!F=R!R=6QE +M&ET("1S=6-C97-S("1L;V-K("1L;V-K960*```````` +M``````````````````````````````!O<'0O8VQO=60O8FEN+V)A0`````````````````````````````````````````````````` +M````````````````````````````````````````````,#`P,#7)I9VAT(&]W;F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* +M(R`@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI +M8V5N&5C=71A8FQE/2&-E<'1I;VX@86YD('-E;&8N<')O8V5S&5C=71E('-H96QL(&-O;6UA;F0Z("5S +M)R`E('-E;&8N8VUD*0H@("`@("`@("`@("!E2<@:6X@<#H*("`@ +M("`@("`@("`@("`@("`@("`@("`@&-E<'1I;VXH)V-A;FYO="!F:6YD(&)A2!I;B`E&-E<'1I;VXH)V-A;FYO="!F:6YD +M(&AO2P@PH@("`@("`@("`@("`B87!I2V5Y(CH@87!I:V5Y+`H@ +M("`@("`@("`@("`B8V]M;6%N9"(Z("=N;W1I9GE"87)E;65T86Q07,H*2P@4)A3TE2P@5]P2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ +M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&EP=&%B;&5S +M+7-A=F5\9W)E<"`B24Y0550@+6H@3D545T]22U]35$%44R(@/B`O9&5V+VYU +M;&P*("!I9B!;("0_("UE<2`P(%T*("!T:&5N"B`@("`@(')E='5R;B`D/PH@ +M(&9I"B`@:7!T86)L97,@+4X@3D545T]22U]35$%44R`^("]D978O;G5L;`H@ +M(&EP=&%B;&5S("U)($9/4E=!4D0@+6H@3D545T]22U]35$%44R`^("]D978O +M;G5L;`H@(&EP=&%B;&5S("U)($E.4%54("UJ($Y%5%=/4DM?4U1!5%,@/B`O +M9&5V+VYU;&P*("!I<'1A8FQEPH@(&EP=&%B +M;&5S("U,($Y%5%=/4DM?4U1!5%,@+6X@+78@+7@@?"!A=VL@)R0Q('X@+UY; +M,"TY72LD+R![('!R:6YT9B`B)7,Z(BP@)#)])SL@/B`O9&5V+VYU;&P*("!I +M9B!;("UF("]R;V]T+W)E;6]V9616:69S(%T@.R!T:&5N(&EP=&%B;&5S("U: +M($Y%5%=/4DM?4U1!5%,@.R!F:3L@/B`O9&5V+VYU;&P*("`O&ET("0_("1L;V-K("1L +M;V-K960*9FD*"FEF(%L@(B1A9FQA9R(@/3T@(C$B(%T*=&AE;@H@("-A9&1? +M<'5B;&EC7VEN=&5R9F%C92`D<'5B;&EC268*("!U;FQO8VM?97AI="`D/R`D +M;&]C:R`D;&]C:V5D"F9I"@II9B!;("(D9&9L867)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&ET(#$*9FD*"G-E="`M>`IU2(*"FEF(%L@)#\@+65Q(#`@70IT:&5N +M"B`@("!T/6!D871E("LE2(*:68@6R`D/R`M;F4@ +M,"!="B`@('1H96X*("`@("`@*&-R;VYT86(@+6P@.V5C:&\@+64@(B-M;VYI +M=&]R:6YG0V]N9FEG7&Y32$5,3#TO8FEN+V)A2(I('P@8W)O;G1A8B`M"B`@("`@(&QO9V=E2!F;W(@;6]N:71O6]U(&UA>2!N;W0@=7-E('1H:7,@ +M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NWT*("`@(&9OF4G72`]('-T&QE;BD*("`@(&EF("=N=U]T>7!E)R!N;W0@:6X@:7`N:V5Y7!E)UT@/2`G<'5B;&EC)PH@("`@96QS93H* +M("`@("`@("!I<%LG;G=?='EP92==(#T@:7!;)VYW7W1Y<&4G72YL;W=E7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C +M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F +M('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5LP77T*"B`@("`@("`@("`@ +M("`@("!T;T1A=&5686P])"AD871E("UD("(D9&%T979A;"(@(BLE7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z +M+R]W=W0IE:F5C +M="!\?"!T0IS>7-T96UC=&P@7-T96UD+6IO=7)N +M86QD"@I465!%/20H9W)E<"`M4&\@)W1Y<&4]7$M;82UZ02U:72HG("]V87(O +M8V%C:&4O8VQO=60O8VUD;&EN92D*:68@6R`B)%194$4B(#T](")R;W5T97(B +M(%T@?'P@6R`B)%194$4B(#T](")V<&-R;W5T97(B(%T@?'P@6R`B)%194$4B +M(#T](")D:&-P"`O;W!T+V-L;W5D+V)I +M;B]U<&1A=&5?8V]N9FEG+G!Y(%T*("!T:&5N"B`@("`O;W!T+V-L;W5D+V)I +M;B]U<&1A=&5?8V]N9FEG+G!Y(&-M9%]L:6YE+FIS;VX@?'P@=')U90H@(&9I +M"F9I"@I;("$@+68@+W9A7-T96UD+W-S:&0@;65M;W)Y(&QE86L@+2!H='1P7-T96UD+VES7-T +M96UD+75S97(*"B,@16YA8FQE(&%N9"!3=&%R="!34T@*7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R +M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T +M"B,*(R`@(&AT='`Z+R]W=W2!S=&]R86=E('-Y7`])$A94$525DE33U(*("!I9B!; +M("(D:'EP(B`]/2`B=FUW87)E(B!=('Q\(%L@(B1H>7`B(#T](")H>7!E5]H='1P"B`@83)E;FUO9"!H96%D97)S"@H@(&-A="`^+V5T8R]A +M<&%C:&4R+V-OTA45%!3?2`];VX*4F5W7,@"UR97%U97-T960M=VET:"P@0V]N=&5N="U4 +M>7!E+"!O6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I +M="`B4V5T=&EN9R!U<"!);G1E&5C=71E(&EL8G9M('-V8W,B"B`@97AI="`Q"F9I"G-E +M='5P7VEL8G9M"@`````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````!O<'0O8VQO=60O8FEN+W-E='5P+W9P8W)O=71E2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N7-T96T@=FTB"@H@(&EF(%L@+68@ +M+V5T8R]H;W-TB`D1$]-04E.(%T@)B8@ +M1$]-04E./2)C;&]U9&YI;F4N:6YT97)N86PB"B`@(T1.4R!S97)V97(@=VEL +M;"!A<'!E;F0@)$1/34%)3B!T;R!L;V-A;"!Q=65R:65S"B`@6R-=*FQO8V%L/2XJ)"]L;V-A;#U<+R1$3TU!24Y< +M+R\B("]E=&,O9&YS;6%S<2YC;VYF"@H@(&-O;6UA;F0@+78@9&AC<%]R96QE +M87-E(#X@+V1E=B]N=6QL(#(^)C$*("!N;U]D:&-P7W)E;&5A&ET(#$*9FD*2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&EF(%L@(B1(65!%4E9)4T]2(B`A/2`B=FUW87)E(B!=.R!T:&5N +M"B`@("!R971U6YC"B`@2]L;V=R;W1A=&4@+V5T8R]C2`R/B8Q"B`@9FD*?0H*6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ +M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I="`B +M4V5T=&EN9R!U<"!%;&%S=&EC($QO860@0F%L86YC97(@7)I9VAT(&]W;F5R6]U('5N9&5R('1H +M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C +M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7!EPH@(&EF(%L@+60@+W!R;V,O>&5N(%T[('1H96X*("`@ +M(&UO=6YT("UT('AE;F9S(&YO;F4@+W!R;V,O>&5N"B`@("`D*&1M97-G('P@ +M9W)E<"`M<2`B6&5N($A632(I"B`@("!I9B!;("0_("UE<2`P(%T[('1H96X@ +M(",@,3U05BPP/4A630H@("`@("!E8VAO(")X96XM:'9M(B`F)B!R971UF5D(&%S($AY +M<&5R=B!W:&5N(%9IPH@(%L@(2`M9"`O<')O +M8R]X96X@72`F)B!S960@+6D@)W,O7G9C+R-V8R\G("]E=&,O:6YI='1A8B`F +M)B!T96QI;FET('$*("!;("UD("]P +M(W9C+W9C+R<@+V5T8R]I;FET=&%B("8F('1E;&EN:70@<0H*("!S>7-T96UC +M=&P@9&%E;6]N+7)E;&]A9`H*("!C87-E("1(65!%4E9)4T]2(&EN"B`@("`@ +M>&5N+7!V?'AE;BUD;VU5*0H@("`@("`@("`@7-T +M96UC=&P@7-T96UC=&P@9&ES86)L92!N +M='!D"B`@("`@("`@("!S>7-T96UC=&P@96YA8FQE('AE+61A96UO;@H@("`@ +M("`@("`@&5N=&]O;',@;F]T(&EN7Q#3TY&24=? +M2$]44$Q51U]00TE?04-023UY)R`O8F]O="]C;VYF:62`M +M3"`Q,34R,#`@='1Y4S`@=G0Q,#(B("]E=&,O:6YI='1A8@H@("`@("`@("`@ +M7-T96UC=&P@2!C;61L +M:6YE(&9I;&4@9G)O;2!Q96UU+6=U97-T+6%G96YT(@H@("`@("`@("`@("`@ +M(&)R96%K"B`@("`@("`@("`@(&9I"B`@("`@("`@("`@('-L965P(#$*("`@ +M("`@("`@(&1O;F4*("`@("`@("`@(&EF(%L@(2`M7-T96T@=&EM92!S>6YC)V0@=VET:"!H;W-T('9I82!V;7=AF5D +M(&%S('9I7!E7!E +M65S+"!H86-K>2$I"B`@("`@ +M("`@("!D;6ED96-O9&4@?"!G2(*("`@("`@("`@(&9I"B`@("`@("`@("`[.PH@(&5S86,*"B`@ +M(R!&:6YD(&%N9"!E>'!O7-T96UV;2@I('L*("!L;V-A;"!P871C:&9I;&4])#$*("!L;V-A;"!B +M86-K=7!F;VQD97(](B]T;7`O+F-O;F8N8F%C:W5P(@H@(&QO8V%L(&QO9V9I +M;&4](B]V87(O;&]G+W!A=&-H7-T96UV;2]C;VYF+V-L;W5D+FIK7-T96UV;2]C +M;VYF+RH@)&)A8VMU<&9O;&1E7-T96UV;0H@(&5C:&\@(D%L;"(@?"!U;GII<"`D<&%T8VAF:6QE("UD("]U +M&%R +M9W,@8VAM;V0@-34U"B`@:68@6R`M9B`D8F%C:W5P9F]L9&5R+V-L;W5D+FIK +M7-T96UV;2]C;VYF+PH@("`@96-H;R`B4F5S=&]R960@:V5Y +M7-T;W)E"B`@ +M:V5Y=&]O;"`M:6UP;W)T:V5Y7-T;W)E("]E=&,O7-T;W)E("]UU!!5$-(7TU/54Y4?2]A9V5N="YZ:7`@72`F)B!; +M("UF("]V87(O8V%C:&4O8VQO=60O<&%T8V@N7!E/21465!%(B`^/B`D +M;&]G9FEL90H@("`@<&%T8VA?FEP"B`@("!I9B!;("0_("UG="`P(%T*("`@('1H96X*("`@("`@96-H +M;R`B1F%I;&5D('1O(&%P<&QY('!A=&-H('-Y7-T +M96UD+W-Y365M.B][<')I;G0@)#)])RD*("!I9B!;("0H*'!H>7-M +M96TI*2`M;'0@-#`Y-C`P(%T[('1H96X*("`@("`@6YC"B`@'!O7!E&ET(#$P"B`@;&]G7VET(")3=&%R=&EN9R!G=65S="!S97)V:6-E2YS:``````````` +M```````````````````````````````````````````````````````````` +M````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@ +M("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE +M($QI8V5NPH@(&QO9U]I="`B4V5T=&EN9R!U<"!C;VYS +M;VQE('!R;WAY('-Y'D@+V5T8R]I<'1A8FQE'D*```````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````````````````;W!T +M+V-L;W5D+V)I;B]S971U<"]C;VUM;VXN6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5]M86-S*"D@>PH@("`@;6%CS,Z+2(O971C+W5D978OV%D9')E5]M86-S("(D +M3DE#7TU!0U,B"B`@9FD*?0H*PH@(&QO8V%L +M(&EN=&9N=6T])#$*("!L;V-A;"!I<#TD,@H@(&QO8V%L(&UAVEN=&9N=6U]"B`@;&]C86P@8F]O='!R;W1O/2)S=&%T:6,B"@H@(&EF(%L@ +M(B1"3T]44%)/5$\B(#T](")D:&-P(B!="B`@=&AE;@H@("`@:68@6R`B)&EN +M=&9N=6TB("$]("(P(B!="B`@("!T:&5N"B`@("`@("!B;V]T<')O=&\](F1H +M8W`B"B`@("!F:0H@(&9I"@H@(&EF(%L@(B1I<"(@(3T@(C`N,"XP+C`B("UA +M("(D:7`B("$]("(B("UO("(D9F]R8V4B(#T](")F;W)C92(@70H@('1H96X* +M("`@("!E8VAO(")I9F%C92`@)&EN=&8@:6YE="`D8F]O='!R;W1O(B`^/B`O +M971C+VYE='=O7-C=&P@;F5T+FEP +M=C8N8V]N9BYA;&PN9&ES86)L95]I<'8V/3`*("!S>7-C=&P@;F5T+FEP=C8N +M8V]N9BYA;&PN9F]R=V%R9&EN9STQ"B`@7,O;F5T+VEP=C0O:7!?9F]R=V%R9`H@(%L@+68@+V5T +M8R]I<'1A8FQE7,O;F5T+VEP=C0O8V]N9B]D969A=6QT+W)P7V9I;'1E +M<@H@("`@("!F;W(@=FEF(&EN("16249?3$E35#L@9&\*("`@("`@("`@;&]G +M7VET(")C;&]U9#H@9&ES86)L92!R<%]F:6QT97(@;VX@<'5B;&EC(&EN=&5R +M9F%C93H@)'9I9B(*("`@("`@("`@7,O;F5T +M+VEP=C0O8V]N9B]L;R]R<%]F:6QT97(*?0H*96YA8FQE7VER<6)A;&%N8V4H +M*2!["B`@;&]C86P@96YA8FQE9#TD,0H@(&QO8V%L('!R;V,],`H*("!PPH@ +M(&QO8V%L(&5N86)L93TD,0H*("!I9B!;("1E;F%B;&4@+65Q(#`@70H@('1H +M96X*("`@("`@96-H;R`P(#X@+V5T8R]R<'-R9G-E;F%B;&4*("`@("`@#TD*'!R:6YT9B`B)7A<;B(@)&YU;2D*("!E8VAO("1H97@["B`@(V5N +M86)L92!R<',*("!E8VAO("1H97@@/B`O"TP+W)P7,O;F5T+V-OPH@(&EN:71?:6YT97)F86-EB`B)&=W9&5V +M(B!="B`@("!T:&5N"B`@("`@(&=W9&5V/2)E=&@P(@H@("`@9FD*"B`@("!I +M<"!R;W5T92!A9&0@9&5F875L="!V:6$@)$=7(&1E=B`D9W=D978*("!F:0H* +M("`C(%=OW!R:6YT("0Q(BXB)#(B+B(D,R(N,2)])RD*("`@("`@=&EM +M96]U="`S('!I;F<@+6X@+6,@,R`D34=-5%]'5R`F"B`@9FD*"B`@:68@6R`B +M)$A94$525DE33U(B(#T](")V;7=A6YC +M(&5N86)L90H@(&9I"GT*"G-E='5P7V1NB`D1$]-04E.(%T@)B8@1$]-04E./2)C +M;&]U9&YI;F4N:6YT97)N86PB"B`@(W)E;6]V:6YG('1H92!D;G-M87-Q(&UU +M;'1I<&QE(')A;F=E6R-=*FQO8V%L/2XJ +M)"]L;V-A;#U<+R1$3TU!24Y<+R\B("]E=&,O9&YS;6%S<2YC;VYF"B`@9FD* +M"B`@:68@6R`M;B`@(B1$3E-?4T5!4D-(7T]21$52(B!="B`@=&AE;@H@("`@ +M("!S960@+6D@+64@(B]>6R-=*F1H8W`M;W!T:6]N+BH],3$Y+BHD+V0B("]E +M=&,O9&YS;6%S<2YC;VYF"B`@("`@(&5C:&\@(F1H8W`M;W!T:6]N+69O9&AC<"UR86YG95]I<#0]+BHD+V1H8W`M9&AC<"UR86YG95]I<#8]+BHD+V1H8W`M +M6R-=*F1H8W`M;W!T:6]N/6]P=&EO;CIR;W5T97(N*B0O +M9"(@+V5T8R]D;G-M87-Q+F-O;F8*("!;("1$149!54Q47T=7(%T@)B8@96-H +M;R`B9&AC<"UO<'1I;VX];W!T:6]N.G)O=71E6R-=*F1H8W`M;W!T:6]N/6]P=&EO +M;C8Z9&YS+7-EB`B)$542#!?25`V(B!="B`@=&AE;@H@ +M("`@("!E8VAO(#$@/B`O=F%R+V-A8VAE+V-L;W5D+V1N;&5A7-T96UC=&P@9&ES86)L92!A<&%C:&4R"B`@8VQE86Y?:7!A;&EA +M&%M<&QE+F-O;F8*("!R +M;2`M9B`O971C+V%P86-H93(O26YC;'5D92!P;W)T2!0 +M>71H;VX@0W-!<'`@8V]N9FEG7&XC26YC;'5D92!P;W)T&5S +M($UU;'1I5FEE=W,B+R)/<'1I;VYS("U);F1E>&5S($UU;'1I5FEE=W,B+R`O +M971C+V%P86-H93(O;6]D&5S(B`^("]V87(O=W=W+VAT;6PO+FAT86-C97-S +M"GT*"G-E='5P7V%P86-H93(H*2!["B`@;&]G7VET(")3971T:6YG('5P(&%P +M86-H92!W96(@2!A;F0@;F]T('=OPH@('!U8FQI8U]I<#TD151(,E])4`H@(%L@(B1%5$@R7TE0(B`] +M/2`B,"XP+C`N,"(@72`F)B!P=6)L:6-?:7`])$542#%?25`*("!E8VAO("1P +M=6)L:6-?:7`*?0H*PH@("`@;&]G7VET(")3971T:6YG +M('5P($Y44"(*("`@($Y44%]#3TY&7T9)3$4](B]E=&,O;G1P+F-O;F8B"B`@ +M("!I9B!;("UF("1.5%!?0T].1E]&24Q%(%T*("`@('1H96X*("`@("`@("!) +M1E,])RPG(')E860@+6$@R-S97)V97)?;&ES=%M` +M77TM,2`[(&ET97)A=&]R/CTP(#L@:71E2!A<&%C:&4R +M(B`^("]V87(O8V%C:&4O8VQO=60O96YA8FQE9%]S=F-S"B`@(&5C:&\@(F-L +M;W5D(&YFT-(149?5$U0 +M7T9)3$5]"B`@("`@($-/34U!/2(L7&Y<="(*("`@("`@8V%S92`D2T59(&EN +M"B`@("`@("`@9&ES86)L95]R<%]F:6QT97(I"B`@("`@("`@("`@(&5X<&]R +M="!$25-!0DQ%7U)07T9)3%1%4CTD5D%,544*("`@("`@("`@("`@.SL*("`@ +M("`@("!E=&@P:7`I"B`@("`@("`@("`@(&5X<&]R="!%5$@P7TE0/21604Q5 +M10H@("`@("`@("`@("`[.PH@("`@("`@(&5T:#%I<"D*("`@("`@("`@("`@ +M97AP;W)T($542#%?25`])%9!3%5%"B`@("`@("`@("`@(#L["B`@("`@("`@ +M971H,FEP*0H@("`@("`@("`@("!E>'!O'!O'!O'!O'!O'!O'!O'!O +M'!O'!O'!O +MF4I"B`@("`@("`@("`@(&5X<&]R="!'54535%]#24127U-) +M6D4])%9!3%5%"B`@("`@("`@("`@(#L["B`@("`@("`@'!O'!O +M'!O'!OF4@8VQO=60@<&%S2!S"(B(%T*("!T:&5N"B`@("!E8VAO(")R;V]T.B1635]005-35T]21"(@?"!C +M:'!A6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I="`B4V5T=&EN9R!U<"!D:&-P('-E7-T96T@ +M=FTB"B`@2!A;&QO=R!$3E,@&5C=71E(&1H8W!S7)I9VAT(&]W +M;F5R6]U +M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O +M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W +M=WPH@ +M(&5C:&\@(B0H9&%T92D@)$`B(#X^("]V87(O;&]G+V-L;W5D+FQO9PH@(&QO +M9U]A8W1I;VY?;7-G("(D0"(*?0H*<&%T8V@H*2!["B`@;&]C86P@4$%40TA? +M34]53E0]+VUE9&EA+V-D@H@(&QO8V%L('!R:79K97D])%!!5$-( +M7TU/54Y4+V%U=&AOVUD-69I;&5]*0H@("`@;&]C +M86P@;F5W;60U/0H@("`@6R`M9B`D>W!A=&-H9FEL97T@72`F)B!N97=M9#4] +M)"AM9#5S=6T@)'MP871C:&9I;&5]('P@87=K("=[<')I;G0@)#%])RD*"B`@ +M("!L;V=?:70@(E-CW!A=&-H9FEL97T@72`F)B!;("(D;F5W +M;60U(B`A/2`B(B!="B`@("!T:&5N"B`@("`@('1AF8@)'!A=&-H9FEL +M92`M0R`O"B`@("`@(&5C:&\@)'MN97=M9#5](#X@)'MM9#5F:6QE?0H@("`@ +M("!L;V=?:70@(E!A=&-H960@2`OF5D7VME>7,*("`@(&9I"B`@9FD*"B`@&5C=71I;F<@8VQO=60M96%R +M;'DM8V]N9FEG(@H*("`C($-L96%R("]T;7`@9F]R(&9I;&4@;&]C:PH@(')M +M("UF("]T;7`O*BYL;V-K"B`@6]U +M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC +M('=I=&@@=&AE($QI8V5N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&5N2!T;R!E;G-U'D@:6X@=&AE(')O +M=71I;F<@9&]M86EN"G)E8V]N9FEG7VQB*"D@>PH@(&QO9V=E'D@=&\@<')E=FEO=7,@ +M'DN8V9G+F]L9"`O971C+VAA<')O>'DO:&%P +M2YC9F'DN8V9G+FYE=PH@(&9I"GT*"F=E=%]V +M:69?;&ES="@I('L*("!L;V-A;"!V:69?;&ES=#TB(@H@(&9O7,O8VQA7!E(&]R('!A7!E(&]R('!A2!R96-E +M:79E2!F:7)E=V%L;"!R=6QE2!C;VYF:67!E(&]R('!A2!O +M9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI +M8V5N0H*"F1E9B!M +M97)G92AD8F%G+"!D871A*3H*("`@(&1B86=C(#T@8V]P>2YD965P8V]P>2AD +M8F%G*0H*("`@('!R:6YT(&1B86<*("`@('!R:6YT(&1A=&$*("`@(&EF(")V +M<&Y?=7-E7,H*3H*("`@("`@("!I +M9B!U7,H*2!A;F0@;F]T +M(&%D9#H*("`@("`@("`@("`@9&)A9V-;=7-E6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2D*("`@("`@("`@("`@9&%T82YU +M<&1A=&4H>R)I9"(Z('-E;&8N:V5Y?2D*("`@("`@("!F:6YA;&QY.@H@("`@ +M("`@("`@("!S96QF+F1B86<@/2!D871A"@H@("`@9&5F('-A=F4H2D* +M("`@("`@("`@("`@("`@(&IS;VXN9'5M<"@*("`@("`@("`@("`@("`@("`@ +M("!D8F%G+"!?9F@L"B`@("`@("`@("`@("`@("`@("`@&-E<'0@24]%2`](&ME>0H*"F-L87-S('5P9&%T941A=&%"867!E(#T]("=M;VYI=&]R22AS96QF +M+F1B+F=E=$1A=&%"867!E(#T]("=V<&YU7!E(#T]("=I<&%L:6%S +M97,G.@H@("`@("`@("`@("!S96QF+F1B+G-E=$ME>2@G:7!S)RD*("`@("`@ +M("`@("`@7!E*0H@("`@("`@("`@("!R971U +M2=="B`@ +M("`@("`@9'!;)VYI8U]D979?:60G72`](&1;)V1E=FEC92==6S,Z70H@("`@ +M("`@(&1P6R=N=U]T>7!E)UT@/2`G9W5E4AA8VLN=7!D871E7VYE='=OR=I<%]A9&1R97-S)SH@6V1P72P@)W1Y<&4G.B`G +M:7!S)WTI"B`@("`@("`@:68@)V1O;6%I;E]N86UE)R!N;W0@:6X@9"YK97ES +M*"D@;W(@9%LG9&]M86EN7VYA;64G72`]/2`G)SH*("`@("`@("`@("`@9%LG +M9&]M86EN7VYA;64G72`](")C;&]U9&YI;F4N:6YT97)N86PB"@H@("`@("`@ +M(&0@/2!04AA8VLN=7!D871E7VYE='=O2AS96QF+"!D8F%G*3H*("`@("`@("!R971U2`]("=E=&@G("L@;G5M("L@)VEP)PH@("`@("`@(&1P(#T@>WT*("`@("`@ +M("!I9BAK97D@:6X@5T*("`@("`@("`@("`@9'!;)VYE=&UA7!E(#T] +M(")P=6)L:6,B.@H@("`@("`@("`@("`@("`@9'!;)V=A=&5W87DG72`]('-E +M;&8N<49I;&4N9&%T85LG8VUD7VQI;F4G75LG9V%T97=A>2=="B`@("`@("`@ +M("`@(&5L2==(#T@7!E)SH@)VEP +M2!T;R!D96%L('=I=&@@=&AIPH@("`@("`@("`@("`@("`@ +M)V%D9"7!E(#T@7!E(ET*("`@("`@("`@("`@=7!D871E1&%T84)A9RAS96QF*0H@ +M("`@("`@("`@("!R971U&-E<'1I;VX@97)R;W(@)WMEV9I;&5N86UE?22!B965N(&UO=F5D+B(N9F]R;6%T*&5RV9I;&5N86UE?27!E"@H@("`@9&5F(&=E=$1A=&$HB(*("`@("`@("!W:71H(&]P96XH +M;W)I9U!A=&@L("=R8B7,H*2!E;'-E(&1A +M=&%;)W!U8FQI8U]I<"=="@H@("`@("`@(&EN:71I86Q?9&%T82`](&-L5]I<"AI<"P@:6YI=&EA;%]D871A6R=C;VYF +M:62<@:6X@9&)A9ULG8V]N9FEG)UTN +M:V5Y5]I<"AC;',L(&EP+"!P5]I +M<"`]($9A;'-E"B`@("`@("`@:68@:7`@/3T@<')I=F%T95]G871E=V%Y7VEP +M.@H@("`@("`@("`@("!N97=?:7!?;6%T8VAE5]I<`H*("`@($!C;&%S0`````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````,#`P,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL +M92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2!S=&%T=7,*"F9R;VT@8W,N0W-#;VYF:6<@:6UP;W)T($-S +M0V]N9FEG"F9R;VT@;W!T<&%R7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R +M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T +M"B,*(R`@(&AT='`Z+R]W=WB`D,2!="G1H96X*("`@(&5C:&\@(D9A:6P@ +M=&\@9FEN9"!64$X@<&5E7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2`]('9P;ELG=G!N7W-E2!I;B!D +M8F%G+FME>7,H*2!A;F0@;F]T(&]P.@H@("`@("`@(&1E;"AD8F%G6VME>5TI +M"B`@("!E;'-E.@H@("`@("`@(&1B86=;:V5Y72`]('9P;@H@("`@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H +M='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI +M8V5N2`] +M(')O=71E6R=N971W;W)K)UT*("`@("`@("!D8F%G6VME>5T@/2!R;W5T90H@ +M("`@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R +M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T +M"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ +M=&AE($QI8V5N2`]('9P +M;ELG<&5E71H;VX*(R!, +M:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%3 +M1BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS +M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E +M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!F$EN"@H*<&%S&ES=',H9V5T5&]K96Y&:6QE*"DI.@H@("`@("`@('=I=&@@;W!E +M;BAG9714;VME;D9I;&4H*2P@)W(G*2!A2P@=F%L +M=64@/2!L:6YE+G-T7!E(#T@ +M7!E(#T]("=S96YD7VUY7W!A7-L;V7-L;V7-L;V7-L;V2!I +M<"]P87-S=V]R9%LE7-L;V7-L;V&-E<'0@2V5Y8F]A&-E<'1I +M;VXL(&4Z"B`@("`@("`@0`````````````````````````````````` +M`````````````````````````````````````````````````````````#`P +M,#`W-34`,#`P,36]U +M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC +M('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E +M<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NFEP7V9I;&4B"B`@("!E +M8VAO(")$96QE=&EN9R!D:6%G;F]S=&ECFEP7V9I;&4B +M"F5L6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ +M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N0H*"F1E9B!M97)G92AD8F%G+"!D871A*3H*("`@("(B(B!3:6UP;'D@ +M;W9E&ES='-I;F<@8F%G(&%S+"!T:&4@=VAO;&4@8V]N +M9FEG=7)A=&EO;B!I2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N4EP("@I +M>PH@(&QO8V%L(&EP/20Q"B`@9F]R(&1E=B!I;B!@;',@+3$@+W-Y6]U(&UA>2!N;W0@=7-E('1H +M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N +MWT*("`@("`@("!S96QF+F-H86YG960@/2!;70H@("`@("`@('-E +M;&8N9&5V:6YF;R`]($-S2&5L<&5R+F=E=%]D979I8V5?:6YF;R@I"B`@("`@ +M("`@2@I"B`@("`@("`@("`@(&5L2=="B`@("`@ +M("`@("`@('-L:6YE(#T@(F1H8W`M"P@:7`I"B`@("`@("`@("`@('-E;&8N +M8V]N9BYS96%R8V@H2D*("`@("`@("`@("`@ +M96QS93H*("`@("`@("`@("`@("`@(&QI&-E +M<'0@17AC97!T:6]N(&%S(&4Z"B`@("`@("`@("`@(&QO9V=I;F2!C;VYT2!R96-E:79E($1(0U!.04LN"B`@("`@ +M("`@(R!7:&5N(%9-(&ES(&5X<'5N9V5D+"!I=',@86-T:79E(&QE87-E(&%N +M9"!$2$-0+T1.4R!C;VYF:6<@:7,@<')O<&5R;'D@5LG;6%C7V%D9')E5LG9&5F875L=%]G871E=V%Y +M)UT*"B`@("!D968@861D7VAO6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7!E2`]($9A;'-E"B`@("`@("`@ +M9&5V(#T@)R<*("`@("`@("!F;W(@:6YT97)F86-E(&EN(&EN=&5R9F%C97,Z +M"B`@("`@("`@("`@(&EF(&1E=B`]/2!I;G1E&5C=71E*&-O;6UA;F0I"B`@("`@("`@("`@("`@("!I9B!D9795<#H*("`@ +M("`@("`@("`@("`@("`@("!L;V=G:6YG+FEN9F\H(D1E=FEC92`E65T+"!L970G +M5]I9E]N965D960H"B`@ +M("`@("`@("`@("`@("`B)7,O)7,B("4@*'-E;&8N0U-?5$5-4$Q!5$537T1) +M4BP@5]I9E]N965D960H"B`@("`@("`@("`@("(E +M&5C("1$045-3TX[+RTM97AE8R`D1$%%34].("TM("TM=G)R<#LO9R(@+V5T +M8R]I;FET+F0O:V5E<&%L:79E9"R(L(")] +M(BP@R(L(")](BP@6PH@("`@("`@("`@("`@("`@("`@ +M("`@(DE0=C1?861D&5C=71E*")R;2`M2`S,"!S96-O;F1S"B`@("`@("`@:&5A&ET:6YG +M(B`E("AE&5C=71E +M*"(E&PR='!D +M(BP@(G-T;W`B*0H@("`@("`@($-S2&5L<&5R+G-E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I +M<"@I*2YS=&]P*"D*"B`@("`@("`@&5C=71E*&-M9#(I"B`@("`@("`@("`@(&1E=B`] +M(&EN=&5R9F%C92YG971?9&5V:6-E*"D*"B`@("`@("`@8VUD(#T@(B5S("U# +M("5S(B`E("AS96QF+D-/3DY44D%#2T1?0DE.+"!S96QF+D-/3DY44D%#2T1? +M0T].1BD*("`@("`@("!#&5C=71E*"(E&PR='!D(BP@(G-T;W`B*0H*("`@ +M("`@("!I;G1E&5C=71E*&-M9"D*("`@("`@("`@("`@("`@(&QO9V=I +M;F2D*("`@("`@("`@ +M("`@("`@(&5X8V5P="!%>&-E<'1I;VXZ"B`@("`@("`@("`@("`@("`@("`@ +M;&]G9VEN9RYE&5C=71E*"(E&5C=71E*"(E&PR='!D(BP@(G)E +M2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@("`@ +M("`@("!I9B!G871E=V%Y.@H@("`@("`@("`@("`@("`@("`@(')O=71E+F%D +M9%]R;W5T92AD978L(&=A=&5W87DI"@H@("`@("`@("`@("`C(%1H92!F:7)S +M="!P=6)L:6,@:6YT97)F86-E(&AA&5C=71E +M*")A2!C;VYN=')A8VMD"B`@("`@("`@(B(B"B`@("`@("`@ +M;&EN97,@/2!;70H@("`@("`@(&QI;F5S+F%P<&5N9"@B7'1<=%QT25!V-%]A +M9&1R97-S("5S7&XB("4@(C$R-RXP+C`N,2(I"B`@("`@("`@;&EN97,N87!P +M96YD*")<=%QT7'1)4'8T7V%D9')E7!E(&%N9"!D96-I9&5S(&EF(&ET(&ES(&%N(&EN=&5R +M;F%L(&%D9')E0H@("`@("`@(%1H92!N97<@8V]D92!A +M;'-O(&=I=F5S('1H92!P;W-S:6)I;&ET>2!T;R!C;&]U9'-T86-K('1O(&AA +M=F4@82!H>6)R:60@9&5V:6-E"B`@("`@("`@=&AA="!C;W5L9"!F=6YC=&EO +M;B!A2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N +M;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B971H,2)]"@I3 +M5$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S:"`M8R`@)VEF +M(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@96QS92!E8VAO +M(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@(")V<&-R;W5T +M97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@6R`D,"`]/2!< +M(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ"B`@("`@("`@ +M("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@("`@("`@(&-M +M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U +M8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@("`@("`@;&]G +M9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S(B`E('-T871E +M7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X96-U=&4H7!E*"E=(&%N9"!S=&%T92`]/2`B +M34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE8W5T92AC;60I +M"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@("`@("`@(&5X +M96-U=&4H8VUD*0H*"F1E9B!I&5C=71E*")M;W5N="!T +M;7!F6XH=F%L*3H*("`@(&EF('9A;#H*("`@("`@("!R +M971U&5C=71E*")I<"!A9&1R('-H;W<@?&=R97`@+78@ +MWT*("`@("`@("`@("`@=&];)VEP)UT@ +M/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A;'-;+3%="B`@ +M("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@("(B(@H@("`@ +M9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G*")3879I;F<@ +M:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C=71E*")S>7-T +M96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I;F7-T96UC=&P@&5C=71E*")K:6QL("U(55`@)7,B +M("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D;G-M87-Q(BP@ +M(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O0`````````````````````````````````````````````` +M`````````````````````````````````````````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E +M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI +M8V5N'1D;G,H*3H*("`@("`@("`@("`@9&YS+F%P<&5N9"AS +M96QF+F1A=&%;)W)O=71E2==(#T@=F%L"@H@("`@9&5F(&=E=%]N971M87-K*'-E;&8I.@H@ +M("`@("`@(",@5V4@;F5E9"!T;R!F:7@@:70@<')O<&5R;'DN($D@:G5S="!A +M9&1E9"!T:&4@:68L(&%S($EA;B!D:60@:6X@&-E<'1I;VXN"B`@("`@("`@:68@)W)O=71E6]U +M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC +M('=I=&@@=&AE($QI8V5N"YS=')I +M<"@I(&9O2!A +M9'9A;F-E9"(L("TQ*0H@("`@("`@(&-R;VXN8V]M;6ET*"D*"B`@("!D968@ +M&-L=61E9%]H96%L=&A?8VAE8VMS(ET*("`@("`@("`@("`@:&-? +M9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K0`````````` +M```````````````````````````````````````````````````````````` +M`````````````````````#`P,#`W-34`,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC +M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, +M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N7,H*3H*("`@("`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@ +M("`@(R!P2!P&ES=',Z(')U;&4])7,@=&%B;&4])7,B+"!F=ULR72P@;F5W7W)U;&4N +M9V5T7W1A8FQE*"DI"B`@("`@("`@("`@(&5L2`](&9W6S)="B`@("`@("`@("`@("`@("!I9B!F=ULQ72`]/2`B9G)O;G0B +M.@H@("`@("`@("`@("`@("`@("`@(&-P>2`](&-P>2YR97!L86-E*"2DI"B`@("`@("`@("`@("`@("`C(%1H97)E(&%R92!S;VUE +M(&ES3H*("`@("`@("`@ +M("`@=&%B;&4@/2`G)PH@("`@("`@("`@("!F;W(@:2!I;B!O<&5N*"(O971C +M+VEP=&%B;&5S+VEP=&%B;&5S+25S(B`E('1Y<&4I.@H@("`@("`@("`@("`@ +M("`@:68@:2YS=&%R='-W:71H*""`]/2!R=6QE70H* +M"F-L87-S($-S3F5T9FEL=&5R*&]B:F5C="DZ"@H@("`@9&5F(%]?:6YI=%]? +M*'-E;&8I.@H@("`@("`@('-E;&8N7!E)RP@)RTM0`````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```P,#`P-S4U`#`P,#$W-3``,#`P,32!O9B!T:&4@3&EC96YS92!A=`HC"B,@ +M:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&ES=',L(&5L5]P87)A;2D*("`@("`@("!E;'-E +M.@H@("`@("`@("`@("!L;V=G:6YG+FEN9F\H(D%D9&EN9R!R;W5T93H@9&5V +M("(@*R!D978@*R`B('1A8FQE.B`B("L*("`@("`@("`@("`@("`@("`@("`@ +M("`@('1A8FQE("L@(B!N971W;W)K.B`B("L@861D2!P87)A;65T97(@5]P87)A;2D*("`@("`@("!E;'-E.@H@("`@("`@ +M("`@("!L;V=G:6YG+FEN9F\H(D%D9&EN9R!R;W5T93H@9&5V("(@*R!D978@ +M*R`B('1A8FQE.B`B("L*("`@("`@("`@("`@("`@("`@("`@("`@('1A8FQE +M("L@(B!N971W;W)K.B`B("L@861D2DZ"B`@("`@("`@(B(B("!!9&0@82!D969A=6QT(')O=71E"B`@("`@("`@ +M.G!A&-E<'1I;VXH(D=A=&5W87D@8V%N;F]T(&)E($YO;F4N(BD*"B`@ +M("`@("`@:68@0H@("`@("`@("`@("!L;V=G +M:6YG+FEN9F\H(D%D9&EN9R!D969A=6QT(')O=71E(BD*("`@("`@("`@("`@ +M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI +M86YC90HC('=I=&@@=&AE($QI8V5N0`````````````````````` +M```````````````````````````````````````````````````````````` +M`````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI +M86YC90HC('=I=&@@=&AE($QI8V5N'DO:&%P2YC9F'DO:&%P2YC9F2@I"B`@("`@("`@9F]R('@@:6X@8V]N9FEG.@H@("`@("`@("`@("!; +M9FEL93$N87!P96YD*'2A(05!23UA97T-/ +M3D9?5"P@2$%04D]865]#3TY&7U`I"@H@("`@("`@("`@("!P2!O9B!T:&4@3&EC96YS92!A=`HC +M"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG +M971?='EP92@I"B`@("`@("`@5]I9E]N965D960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L +M"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE +M,B]S:71E2DI"B`@("`@("`@("`@(&9I;&4N&5C=71E,B@B7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2AS96QF*3H*("`@("`@("!S96QF+F-O;F9I9R`](%M="B`@("`@("`@ +M"P@;&EN +M92!I;B!E;G5M97)A=&4H%T@/2!R97!L86-E("L@ +M(EQN(@H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!S96%R8V@H"P@;&EN92!I;B!E;G5M97)A=&4H +M"P@;&EN92!I;B!E;G5M97)A=&4H +M2!O9B!T:&4@3&EC +M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE +M(&QA=R!O'!R97-S(&]R(&EM<&QI +M960N("!3964@=&AE($QI8V5N0`````````````````````````````````````` +M````````````````````````````````````````````````````````,#`P +M,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E +M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N"`](&EN="@G)RYJ;VEN*%MD:6=I="!F;W(@9&EG:70@:6X@9&5V:6-E(&EF +M(&1I9VET+FES9&EG:70H*5TI*0H@("`@("`@("`@("`@("`@:68@9&5V:6-E +M7W-U9F9I>"`\(&QO=V5S=%]D979I8V4Z"B`@("`@("`@("`@("`@("`@("`@ +M;&]W97-T7V1E=FEC92`](&1E=FEC95]S=69F:7@*("`@("`@("`@("`@("`@ +M("`@("!G=65S=%]I;G1E5]C:61R*'-E;&8I.@H@("`@("`@ +M(')E='5R;B`B)7,O)7,B("4@*'-E;&8N9V5T7V=A=&5W87DH*2P@F4@:6X@8FETF4B +M*0H*("`@(&1E9B!G971?9&5V:6-E*'-E;&8I.@H@("`@("`@(')E='5R;B!S +M96QF+F=E=%]A='1R*")D979I8V4B*0H*("`@(&1E9B!G971?8VED7!E)UT@:6X@5E)24%]465!% +M4SH*("`@("`@("`@("`@7!E)UT@:6X@6R=G=65S="==.@H@("`@("`@("`@ +M("!R971U7!E)UT@:6X@6R=P=6)L +M:6,G73H*("`@("`@("`@("`@7-T +M96T*("`@("`@("`B(B(*("`@("`@("!S96QF+F1E=FQIWT*("`@("`@("!S96QF+F%D +M9')E7!E*"D@ +M:6X@6R)P=6)L:6,B72!A;F0@861D2)= +M*0H@("`@("`@("`@("`@("`@&UA7!E)UT*("`@("`@("!R971U&9F9F9F9F9F(ETI"@H@("`@("`@('-E;&8N9G7!E*"D@ +M:6X@6R)P=6)L:6,B73H*("`@("`@("`@("`@7!E*"D@:6X@ +M6R)P=6)L:6,B73H*("`@("`@("`@("`@#4R-"\P>&9F +M9F9F9F9F(B`E("AS96QF+F1E=BP@2)=(&%N9"!S96QF+F%D9')E2)=(&%N9"!S96QF+F%D9')E7!E*"D@:6X@6R)P +M=6)L:6,B72!A;F0@*&YO="!S96QF+F-O;F9I9RYI2!T +M:&4@;6%S=&5R(&)A8VMU<"!F=6YC=&EO;G,*("`@("`@("`@("`@("`@(&EF +M(&YO="!C;61L:6YE+FES7W)E9'5N9&%N="@I.@H@("`@("`@("`@("`@("`@ +M("`@(&EF(&UE=&AO9"`]/2`B861D(CH*("`@("`@("`@("`@("`@("`@("`@ +M("`@0W-087-S=V13=F,HWT*("`@("`@("!C +M;60@/2`H(FEP(&%D9'(@2!K965P86QI +M=F5D(&]R(&YO=`H@("`@("`@("(B(@H@("`@("`@(&EF(")N=U]T>7!E(B!I +M;B!S96QF+F%D9')E2==*0H@ +M("`@("`@(&EF(&YO="!S96QF+F-L+FES7W)E9'5N9&%N="@I(&%N9"`H;F]T +M('-E;&8N861D2==(&]R('-E;&8N861D2==(#T](").;VYE(BDZ"B`@("`@("`@("`@(&-M9"`](")A2!H87!P96X@8G5T(&1I9"`Z*0H@("`@ +M("`@(",@270@;65A;G,@86X@87!A8VAE(&9I;&4@9V]T(&]R<&AA;F5D(&%F +M=&5R(&$@9W5E2@I"@H@("`@9&5F +M(&ES7V=U97-T7V=A=&5W87DH7,O;F5T+V-O7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ +M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E +M(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O +M'!R97-S(&]R(&EM<&QI960N("!3 +M964@=&AE($QI8V5N"(I.@H@("`@("`@("`@("!I=&5M&5C +M=71E*")K:6QL("TY("5S(B`E('!I9"D*"B`@("!D968@9W)E<"AS96QF+"!S +M='(I.@H@("`@("`@(&9O"(I.@H@("`@("`@("`@("!I9B!I+F9I;F0H7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C +M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F +M('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L +M:6-A8FQE(&QA=R!O'!R97-S(&]R +M(&EM<&QI960N("!3964@=&AE($QI8V5N2!O +M9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI +M8V5NWT*("`@("`@("!S96QF+F1B(#T@1&%T +M84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF+F1B+G-A=F4HWT*("`@("`@ +M("!R971U&1I9V5S="@I"@H@("`@9&5F(&=E=%]G871E=V%Y +M*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I;B!S96QF+FED871A*"DZ +M"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A*"E;)V=A=&5W87DG70H@ +M("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G971?=7-E7V5X=%]D;G,H +M'1D;G,G +M70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G971?861V97)T7VEN +M="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN="<@:6X@0`````````````````````````````````````````````````````````` +M````````````````````````````````````````,#`P,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7!E&5C=71E*&-M9"D*("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")! +M9&1E9"!R=6QE("5S(&9O0`````````````````````````````````````````````` +M````````````````````````````````````````````````````````,#`P +M,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O +M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET*#(I +M"B`@("!F;W(@;W!T+"!A7,N97AI +M="@R*0H*("`@(&9O&ES=',H9&%T869I;&4I.@H@("`@("`@(&]S +M+G)E;6]V92AD871A9FEL92D*"@ID968@8W)E871E9FEL92AI<"P@9F]L9&5R +M+"!F:6QE+"!D871A*3H*("`@(&1E3H* +M("`@("`@("`@("`@;W,N;6%K961I2!E>&ES=',L('=E(&1O(&ET('1H:7,@=V%Y +M(&9O0H@("`@("`@("`@("!I9B!E+F5R&ET*#$I"B`@("`@("`@ +M:68@;W,N<&%T:"YE>&ES=',H;65T86UA;FEF97-T*3H*("`@("`@("`@("`@ +M9F@@/2!O<&5N*&UE=&%M86YI9F5S="P@(G(K82(I"B`@("`@("`@("`@(&5X +M9FQO8VLH9F@I"B`@("`@("`@("`@(&EF(&9I;&4@;F]T(&EN(&9H+G)E860H +M*3H*("`@("`@("`@("`@("`@(&9H+G=R:71E*&9I;&4@*R`G7&XG*0H@("`@ +M("`@("`@("!U;F9L;V-K*&9H*0H@("`@("`@("`@("!F:"YC;&]S92@I"B`@ +M("`@("`@96QS93H*("`@("`@("`@("`@9F@@/2!O<&5N*&UE=&%M86YI9F5S +M="P@(G&9L;V-K*&9H*0H@("`@("`@("`@("!F +M:"YW&9L;V-K*&9H*0H@("`@9F@N +M=W)I=&4H96YT3H*("`@("`@("!F +M;&]C:RAF:6QE+"!,3T-+7T58*0H@("`@97AC97!T($E/17)R;W(@87,@93H* +M("`@("`@("!P71H;VX*(R!,:6-E;G-E9"!T +M;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@ +M;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* +M(R`@(&AT='`Z+R]W=WFEP9FEL90H*"B,@0W)E871E('II<"!A +MFEP +M7V9I;&5S*&9I;&5S*3H*("`@(&9,:7-T(#T@9FEL97,*("`@(&-O;7!R97-S +M:6]N(#T@>FEP9FEL92Y:25!?1$5&3$%4140*("`@('1I;65?&5C=71E7W-H96QL7W-C3H*("`@("`@("`@ +M("`@("`@("`@("!Z9BYW3H*("`@("`@("!C;&5A;G5P*&9I;&5S7V9R;VU?F8N8VQO&5C=71E7W-H96QL +M7W-C&-E<'0@3U-%#H*("`@("`@("`@("`@9&5L971E7W1M<%]F:6QE7V-M9"`]("=R +M;2`M9B`E3H*("`@("`@("`@("`@9BYC;&]S92@I"B`@("!R971U"YS<&QI +M="AC;60I+"!S=&1E&-E<'0@3U-%&5C=71E(&)A'0H +M>FEP7V9I;&4L(&9I;&5S7V9O=6YD+"!F:6QE"YS<&QI="AC;&5A;G5P7V-M9"DI"@H* +M:68@7U]N86UE7U\@/3T@)U]?;6%I;E]?)SH*("`@(&9I;&5,:7-T(#T@7)I9VAT(&]W +M;F5R6]U +M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O +M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W +M=WW!R +M:6YT("0R.WTG('P@6]U(&UA>2!N +M;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@ +M=&AE($QI8V5N2!T;R!E;G-U2!T;R!I=',@<')E=FEO +M=7,@'D@=&\@<')E=FEO=7,@'DN8V9G+F]L9"`O971C+VAA<')O>'DO:&%P2YC9F'DN8V9G+FYE=PH@(&9I"GT*"@IL;V=G97(@+70@8VQO=60@(B0H8F%S +M96YA;64@)#`I.B!%;G1E'D*'D@2P@8V]N9FEG=7)I +M;F<@9FER97=A;&PB"@HC(&EP=&%B;&5S(&5N=')Y('1O(&5N'D@2`D861D961)<',@ +M)')E;6]V961)<',@)'-T871S27`*"FEF(%L@)#\@+6=T(#`@70IT:&5N"B`@ +M;&]G9V5R("UT(&-L;W5D(")&86EL960@=&\@87!P;'D@9FER97=A;&P@'D@8V]N9FEG(@H@(",@4F5S=&]R92!T:&4@3$(*("!R97-T;W)E7VQB +M"@H@(&QO9V=E&ET(#$@)&QO8VL@)&QO8VME +M9`IE;'-E"B`@(R!296UO=F4@8F%C:V5D=7`@:7!T86)L92!R=6QE6]U(&UA>2!N;W0@=7-E('1H:7,@ +M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E +M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI +M8V5N7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z +M+R]W=WPH@('-U9&\@:7!T86)L97,@+70@;6%N9VQE("U$(%!215)/ +M551)3D<@+6D@)&1E=B`M;2!S=&%T92`M+7-T871E($Y%5R`M:B!#3TY.34%2 +M2R`M+7-E="UM87)K("1T86)L94YO(#(^+V1E=B]N=6QL"@H@('-U9&\@:7`@ +MV1E=CHS?2DI"G1A8FQE3F%M93TB5&%B +M;&5?)&1E=B(*"FEF(%L@)&%C=&EO;B`]/2`G861D)R!="G1H96X*("!P;'5G +M7VYI8PIE;'-E"B`@=6YP;'5G7VYI8PIF:0H````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````&]P="]C;&]U9"]B:6XO:7!S96-T=6YN96PN6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC +M90HC('=I=&@@=&AE($QI8V5N#4R-2(*=G!N:6YM87)K/2(P>#4R-"(*"G5S86=E*"D@>PH@("`@<')I;G1F +M(")5'0@ +M:&]P/B`M3X@+6D@/&EK92!P;VQI +M8WD^("UT(#QI:V4@;&EF971I;64^("U4(#QEPH@('-U9&\@:7!T86)L97,MPH@(&1I2!<"B`@("!P:&%S93(@<&]L:6-Y +M/21ER1R:6=H=&YE='-](B`^/B`D=G!N8V]N +M9F9I;&4@)B8*("!S=61O(&5C:&\@(B`@='EP93UT=6YN96PB(#X^("1V<&YC +M;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!A=71H8GD]VEK96QI9F5T:6UE?7,B(#X^("1V<&YC;VYF9FEL92`F)@H@ +M('-U9&\@96-H;R`B("!E2(@/CX@)'9P;F-O;F9F:6QE +M("8F"B`@2!F;W(@'1H;W`](B1/4%1!4D&ET("1R970*```````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````;W!T+V-L;W5D+V)I;B]I<&%S2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&QO8V%L('!U8DEP +M/20H96-H;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?22!E>&ES +M=',B"GT*"F%D9%]V<&Y?8VAA:6Y?9F]R7VEP("@I('L*("!L;V-A;"!P=6)) +M<#TD*&5C:&\@)#$@?"!A=VL@+48G+R<@)WMPPH@(&QO8V%L('!U8DEP/20H96-H;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?2PH@(&QO8V%L +M('!U8DEP/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R +M:6YT("0Q?2W!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)A +MW!R:6YT("0R?2W!R:6YT("0R +M?25]R;W5T97-?9G)O;5]M86EN("1T86)L94YA;64*(R!.3U1%.B!T:&ES +M("!E;G1R>2!W:6QL(&)E(&1E;&5T960@:68@=&AE(&EN=&5R9F%C92!IW!R:6YT +M("0Q?2PH@(&EF(%L@(B1S9FQA9R(@/3T@(C`B +M(%T*("!T:&5N"B`@("!R971UW!R +M:6YT("0Q?2W!R:6YT("0R?22!I<"!I;F9O(&EN=&\@9FEL92P@ +M=7-E9"!O;B!R961U;F1A;G0@W!R:6YT("0Q?2&ES +M=&EN9TEP36%S:STD*'-U9&\@:7`@861DPH@(&QO8V%L('!U8DEP/20Q +M"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP +M/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)A&ES=&EN9TEP36%S:STD*'-U9&\@:7`@861DPH@("`@(V5N86)L92!R<',@ +M86YD(')F%QN(B`D;G5M*0H@("`@("`@("`@96-H +M;R`D:&5X.PH@("`@("`@("`@(V5N86)L92!R<',*("`@("`@("`@(&5C:&\@ +M)&AE>"`^("]S>7,O8VQA&ET +M("0_("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1!9FQA9R(@/3T@(C$B(%T* +M=&AE;@H@(&%D9%]A;E]I<"`@)'!U8FQI8TEP("`F)@H@(&%D9%]F=U]C:&%I +M;E]F;W)?:7`@)'!U8FQI8TEP"B`@=6YL;V-K7V5X:70@)#\@)&QO8VL@)&QO +M8VME9`IF:0H*:68@6R`B)&9F;&%G(B`]/2`B,2(@72`F)B!;("(D1&9L86&ET("0_("1L;V-K("1L;V-K960* +M9FD*"G5N;&]C:U]E>&ET(#`@)&QO8VL@)&QO8VME9`H````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````!O<'0O8VQO=60O8FEN+VQI;F5?961I="YP>0`````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````,#`P,#2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2UL:6YE(&5D:71I;F<@;V8@8V]N9FEG=7)A=&EO;B!F +M:6QE&%M<&QE('1H97)E)W,@82!D;W5B;&4@97-C87!E(&]F('1H92!B86-K2!M +M871C:&5D(&%L;"!F:6QE3H* +M("`@("XN+B`@(&]S+G5N;&EN:R@G9&]C=&5S="UV:&]S=',N8V]N9B55N=7-E9$QO8V%L"B`@ +M("`@("`@("`@('-T870@/2!.;VYE"B`@("`@("`@("`@('=I=&@@;W!E;BAS +M96QF+F9I;&5N86UE+"`G&-E<'1I;VXH +M(DUA9&4@=&]O(&UA;GD@961I=',B*0H@("`@("`@("`@("`@("`@("`@("`@ +M("`@("`@96QI9B!R96UA:6YI;F=?8V]U;G0@/3T@,#H*("`@("`@("`@("`@ +M("`@("`@("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@("`@("`@ +M("`@("`@("!C:&%N9V5D7VQI;F4L('-U8G,@/2!E9&ET+G!A='1E2AS96QF+F9I;&5N86UE+"!B86-K=7!?9FEL96YA;64I"B`@("`@("`@("`@ +M("`@("!O3H*("`@("`@("`@("`@:68@8VAA;F=E +M9%]F:6QE(&ES(&YO="!.;VYE.B`@("`@("`@("`@("`@("`@("`@("`@("`@ +M("`@("`C(&9A:6QE9"P@8VQE86X@=7`*("`@("`@("`@("`@("`@(&-H86YG +M961?9FEL92YC;&]S92@I"B`@("`@("`@("`@("`@("!O6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC +M90HC('=I=&@@=&AE($QI8V5N2!R=6QE2!O9B!T:&4@3&EC96YS92!A +M=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O +M'!R97-S(&]R(&EM<&QI960N("!3 +M964@=&AE($QI8V5N7,I.@H*("`@(&5X:7-T:6YG7VME>7,@/2!;70H@ +M("`@;F5W7V5T:%]K97D@/2!.;VYE"@H@("`@9F]R(&LQ+"!V,2!I;B!G=65S +M=&YE=%]D:6-T+FET97)I=&5M7,@ +M86YD(&QE;BAV,2D@/B`P.@H@("`@("`@("`@("!E>&ES=&EN9U]K97ES+F%P +M<&5N9"AK,2D*"B`@("!I9B!N;W0@97AI2`Z.B!296UO=FEN9R!G=65S="!N971W;W)K +M+BXN(BD*("`@("`@("!R971U2!T;R!B92!S +M971U<`H@("`@)R2!C;VYF:6=U&ES=',@/2!&86QS90H*("`@(&9O2!P2!C;VYF:6=U2`Z.B!02`Z.B!.;R!'=65S=$YE='=O7,N87)G +M=ELQ72D*("`@('!R;V-E7)I9VAT(&]W;F5R +M6]U('5N +M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A +M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=WPH@(&QO8V%L(%]P +M:60])"AP:61O9B!D;G-M87-Q*0H@(&9OW!R:6YT("0R?20H@(&EF(%L@)&EP +M=C0@70H@('1H96X*("`@(&5C:&\@(C`@)&UA8R`D:7!V-"`D:&]S="`J(B`^ +M/B`D1$A#4%],14%315,*("!F:0H@(&EF(%L@)&EP=C8@70H@('1H96X*("`@ +M(&5C:&\@(C`@)&1U:60@)&EP=C8@)&AO6]U(&UA>2!N +M;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@ +M=&AE($QI8V5N&-E<'0@3U-%6]U&-E<'1I;VX@;V-C=7)R960Z("5S(B`E(&4*("`@("`@("`@ +M("`@7!E(#T]("=T0`````````````` +M```````````````````````````````````````````````````````````` +M`````````````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ +M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&-L=61E9%]H96%L=&A?8VAE +M8VMS(ET@/2!D871A6R)E>&-L=61E9%]H96%L=&A?8VAE8VMS(ET*("`@(&EF +M(")H96%L=&A?8VAE8VMS7V-O;F9I9R(@:6X@9&%T83H*("`@("`@("!D8F%G +M6R)H96%L=&A?8VAE8VMS7V-O;F9I9R)=(#T@9&%T85LB:&5A;'1H7V-H96-K +M7)I9VAT +M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z +M+R]W=WW!R:6YT("0Q?2<*?0H* +M:7!T86)L97-?*"D@>PH@("!L;V-A;"!O<#TD,0H@("!L;V-A;"!P=6)L:6-? +M:7`])#(*("`@;&]C86P@:7-?=G!C/69A;'-E"B`@(&QO8V%L(&9O7-T96UC=&P@:7,M86-T +M:79E(&EPS$N+C5]"B`@("!D;PH@("`@("!L;V=G97(@+70@8VQO +M=60@(B0H8F%S96YA;64@)#`I.B!W86ET:6YG(&EP7-T96UC=&P@:7,M86-T:79E(&EP7-T96UC=&P@:7,M86-T:79E(&EP7-T96UC=&P@&PR='!D"B`@("`@("`@("`@("`@("`@("`@2`Z(%!32R!<(B1I<'-E8U]P +M&PR +M='!D"@H@("!I<'1A8FQEPH@("!L;V-A;"!P=6)L:6-?:7`])#$*"B`@(&EPPH@("!L;V-A;"!U/20Q"B`@(&QO +M8V%L('!A)'4@7"H@7"(D +M<&%S&ET(#(*"0D[.PH@(&5S86,*9&]N90H*:68@6R`B)&1E +M=B(@/3T@(B(@70IT:&5N"B`@("!D978](F5T:#(B"F9I"@II9B!;("(D8VED +M&ET(#(*6R`B)&-R96%T92(@/3T@(C$B(%T@)B8@6R`B)&QF;&%G +M)'!F;&%G)')F;&%G)'-F;&%G(B`A/2`B,3$Q,2(@72`F)B!U&ET(#(*"FEF(%L@(B1CW!R:6YT("0Q?27)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS +M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E +M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,@/2!;)V5T:#$G+"`G971H,B6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ +M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2!O9B!T:&4@ +M3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A +M8FQE(&QA=R!O2!O9B!T:&4@9&YS;6%S<2!F:6QE+@IC<"`B)$1( +M0U!?0T].1DE'7TU!24XB("`B)$1(0U!?0T].1DE'7TU!24Y?0D%+(@IC<"`B +M)$1(0U!?0T].1DE'(B`B)$1(0U!?0T].1DE'7T)!2R(*"B-E;7!T>2!T:&4@ +M8V]N9FEG(&9I;&4*96-H;R`^("1$2$-07T-/3D9)1PH*=F%R/2(D,2(*9&AC +M<%]R86YG93TB(@ID:&-P7V=A=&5W87D](B(*9&AC<%]N971M87-K/2(B"F1N +M'1?9&YS/20H96-H +M;R`B)$--1$Q)3D4B('P@9W)E<"`M;R`B=7-E97AT9&YS/71R=64B*0IW:&EL +M92!;("UN("(D=F%R(B!="F1O"B!V87(Q/20H96-H;R`D=F%R('P@8W5T("UF +M,2`M9"`B+2(I"B!R;W5T97)I<#TD*"!E8VAO("1V87(Q('P@8W5T("UF,2`M +M9"`B.B(@*0H@9V%T97=A>3TD*&5C:&\@)'9AV1H8W!?V1H8W!?;F5T;6%S:WTB)V1H8W`M;W!T:6]N/71A9SIR86YG +M92W9A +MVQO9WTB8&=R97`@(EYD:&-P+6]P=&EO;CTV(B`B)$1(0U!?0T].1DE'7TU! +M24XB8")<;B(*;&]G/2(D>VQO9WTB8&=R97`@(EYD:&-P+6]P=&EO;CUO<'1I +M;VXZVQO +M9WTB8&=R97`@(EYD:&-P+7)A;F=E/2(@(B1$2$-07T-/3D9)1U]-04E.(F`B +M7&XB"@II9B!;("(D;&]G(B`A/2`G7&Y<;EQN)R!="G1H96X*("-#;&5A;FEN +M9R!T:&4@97AI9&AC<"UR86YG93TO9"<@(B1$2$-07T-/3D9)1U]-04E.(@IF:0H*(W=R +M=&EN9R!T:&4@;F5W(&-O;F9I9R!I;G1O('1H92!C;VYF:6<@9FEL92X*96-H +M;R`M92`B)&1H8W!?&ET("1R +M97-U;'0@)&QO8VL@)&QO8VME9`H````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````````````````````!O +M<'0O8VQO=60O8FEN+V-S7V1H8W`N<'D````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7,@/2!S970H*0H@("`@("`@(&9O2`A/2`G +M:60G(&%N9"!E;G1R>5LG;6%C7V%D9')E7,N861D*&ME>2D* +M("`@("`@("`@("`@("`@(&)R96%K"@H@("`@("`@(&EF(&1A=&%;)W)E;6]V +M92==(&%N9"!K97D@;F]T(&EN(')E;6]V95]K97ES.@H@("`@("`@("`@("!R +M96UO=F5?:V5Y2!I +M;B!R96UO=F5?:V5Y5TI"@H@("`@("`@(&1B86=;9&%T85LG:7!V-%]A9&1R97-S)UU=(#T@9&%T +M80H*("`@(')E='5R;B!D8F%G"@```&]P="]C;&]U9"]B:6XO8W-?8VUD;&EN +M92YP>0`````````````````````````````````````````````````````` +M```````````````````````````````````````````P,#`P-S4U`#`P,#$W +M-3``,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ +M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E +M(&%T"B,*(R`@(&AT='`Z+R]W=W2!O9B!T:&4@ +M3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A +M8FQE(&QA=R!O'!R97-S(&]R(&EM +M<&QI960N("!3964@=&AE($QI8V5N'DN8V9G("]E=&,O:&%P2]H87!R;WAY+F-F9RYO;&0*"B`@;78@)&YE +M=U]C;VYF:6<@+V5T8R]H87!R;WAY+VAA<')O>'DN8V9G"B`@:68@:&%P2`M<"`O=F%R+W)U;B]H87!R;WAY+G!I9"`M9B`O971C+VAA<')O>'DO:&%P +M2YC9F<@+7-F("0H8V%T("]V87(O'DN<&ED*3L@=&AE +M;@H@("`@;&]G9V5R("UT(&-L;W5D(").97<@:&%P2!I;G-T86YC92!S +M=6-C97-S9G5L;'D@;&]A9&5D+"!S=&]P<&EN9R!P'DO:&%P2YC9F<@)&YE=U]C;VYF:6<* +M("`@(&UV("]E=&,O:&%P2]H87!R;WAY+F-F9RYO;&0@+V5T8R]H87!R +M;WAY+VAA<')O>'DN8V9G"B`@("!H87!R;WAY("UP("]V87(O'DN<&ED("UF("]E=&,O:&%P2]H87!R;WAY+F-F9R`M2YP:60I"B`@("!R970],0H@(&9I"@IE>&ET("1R +M970*```````````````````````````````````````````````````````` +M`````````````````````````````````````````````````````')O;W0O +M;6]N:71O71H;VX*(R!,:6-E;G-E9"!T;R!T +M:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE +M"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@ +M(&AT='`Z+R]W=WWT*("`@('!A2`K)UTG*R(@(B`K("=;)RMP2LG +M72<@*R`B("(@*R!M2!O;F4@<&ED(&]R(&YO=`H@("`@:68@97AI=%-T871U6EN9R!F97<@;6]R92!T:6UEWT*("`@(&9A:6QI +M;F=?PH@("`@("`@("`@("`@("`@ +M(G-U8V-EPH@("`@("`@("`@("`@ +M("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EWT@(U-K:7`@WT*("`@(&9A:6QI;F=# +M:&5C:W,@/2!;70H@("`@:68@8VAE8VM4>7!E(#T](")B87-I8R(Z"B`@("`@ +M("`@;6]N:71297-U;'0L(&9A:6QI;F=#:&5C:W,@/2!M;VYI=%!R;V-E&-L=61E(#T@:&-?9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!H8U]D871A(&5L7!E*0H@("`@("`@("`@("`@("`@:68@;&5N*')E="D@ +M/3T@,#H*("`@("`@("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@ +M("`@("`@:68@(G-U8V-E7,N87)G=BD@/3T@,CH*("`@("`@("!I9B!S>7,N +M87)G=ELQ72`]/2`B861V86YC960B.@H@("`@("`@("`@("!M86EN*")A9'9A +M;F-E9"(I"B`@("`@("`@96QI9B!S>7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@ +M("`@("`@("`@("!M86EN*")B87-I8R(I"B`@("`@("`@96QS93H*("`@("`@ +M("`@("`@<')I;G1D*")%7!E(&]F('1E7,N87)G=BD*("`@(&5L0`````` +M```````````````````````````````````````````````````````````` +M```````````````````P,#`P-C0T`#`P,#$W-3``,#`P,371H;VX*(R!,:6-E +M;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@ +M=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ +M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E +M(&%T"B,*(R`@(&AT='`Z+R]W=W'!E8W1E9"`](%M="B`@("`@("`@ +M9&5S=$EP(#T@<&]R=$9O'0L('-R8U!O2!I +M;B!I<%1A8FQE4QI'!E8W1E +M9#H*("`@("`@("`@("`@("`@("`@("!I9B!I<%1A8FQE16YT'!E8W1E9$5N=')Y*2`]/2`M,3H*("`@("`@("`@("`@("`@("`@("`@("`@ +M9F]U;F1!;&P@/2!&86QS90H@("`@("`@("`@("`@("`@("`@("`@("!B4QI2!O9B!T:&4@3&EC96YS +M92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA +M=R!O'!R97-S(&]R(&EM<&QI960N +M("!3964@=&AE($QI8V5N$UE;6]R>55S86=E(&EN(&AE86QT:%]C +M:&5C:W-?9&%T82`B("L@7`H@("`@("`@("`@("`@(")S>7-T96U4:')E&ET*#`I"@H@("`@;6%X365M;W)Y +M57-A9V4@/2!F;&]A="AD871A6R)M87A-96UO7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@ +M(&UA:6XH*0H````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M'E?8VAE8VLN<'D````````````` +M```````````````````````````````````````````````````````````` +M`````````````#`P,#`V-#0`,#`P,36]U(&UA>2!N;W0@=7-E('1H +M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N +M41A=&$@86YD(")M87AC;VYN +M(B!I;B!H84-F9U-E8W1I;VYS6R)G;&]B86PB73H*("`@("`@("!I9B!H87!R +M;WAY1&%T85LB;6%X8V]N;B)=("$](&AA0V9G4V5C=&EO;G-;(F=L;V)A;")= +M6R)M87AC;VYN(EU;,%TN'E$871A(BD*("`@(&EF(&AA +M<')O>'E$871A(&ES($YO;F4@;W(@;&5N*&AA<')O>'E$871A*2`]/2`P.@H@ +M("`@("`@('!R:6YT(").;R!D871A('!R;W9I9&5D('1O(&-H96-K+"!S:VEP +M<&EN9R(*("`@("`@("!E>&ET*#`I"@H@("`@=VET:"!O<&5N*"(O971C+VAA +M<')O>'DO:&%P2YC9FWT*("`@(&-UWT*("`@(&9O41A=&$L(&AA0V9G4V5C=&EO;G,I"@H@("`@:68@ +M8VAE8VM-87A#;VYN(&%N9"!C:&5C:TQB4G5L97,Z"B`@("`@("`@<')I;G0@ +M(D%L;"!C:&5C:W,@<&%S&ET*#`I"B`@("!E;'-E.@H@ +M("`@("`@(&5X:70H,2D*"@II9B!?7VYA;65?7R`]/2`B7U]M86EN7U\B.@H@ +M("`@:68@;&5N*'-Y7,N87)G=ELQ72`]/2`B +M861V86YC960B.@H@("`@("`@(&UA:6XH*0H````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M +M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&ET*#`I"@H@("`@=&5M<&QA=&5697)S:6]N36%T8VAE +M65T('-E='5P(&%T("(@*R!R96QE87-E1FEL92`K7`H@ +M("`@("`@("`@("`@("`@("`B+"!S:VEP<&EN9RXB"B`@("`@("`@96QI9B!E +M>'!E8W1E9"`A/2!F;W5N9#H*("`@("`@("`@("`@<')I;G0@(E1E;7!L871E +M(%9E'!E8W1E9"`K("(L(&9O=6YD.B`B("L@9F]U;F0*("`@("`@ +M("`@("`@=&5M<&QA=&5697)S:6]N36%T8VAE'!E8W1E9"`K("(L(&9O=6YD.B`B("L@9F]U;F0*("`@("`@ +M("`@("`@&ET*#$I"@H*:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH* +M("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A;F0@2\````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````,#`P,#0`````````````````````````` +M```````````````````````````````````````````````P,#`P-C0T`#`P +M,#$W-3``,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS +M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E +M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W3U.;VYE*3H*("`@('=I=&@@ +M;W!E;B@G+W)O;W0O:&5A;'1H7V-H96-K2!I2!I5TN2D@/3T@,#H*("`@("`@("`@("`@("`@(&-O;G1I +M;G5E"B`@("`@("`@("`@(&ME>59A;"`](&5N=')Y+G-P;&ET*"(](BD*("`@ +M("`@("`@("`@:68@;&5N*&ME>59A;"D@/3T@,CH*("`@("`@("`@("`@("`@ +M(&1;:V5Y5F%L6S!=+G-T2]?7VEN:71?7RYP>0`````````````````````````````````````````` +M````````````````````````````````````````,#`P,#8T-``P,#`Q-S4P +M`#`P,#$W-3``,#`P,#`P,#$U-#``,3,V,C4Q-3`S,30`,#$W-S8R`"`P```` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````'5S=&%R("``9&%R2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO +M2!A<'!L:6-A8FQE(&QA=R!O'!R +M97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N0`````````````````````````````````` +M````````````````````````````````````````````````,#`P,#8T-``P +M,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#,Q,S(`,3,V,C4Q-3`S,30`,#$W-S8Q +M`"`P```````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````'5S=&%R("``9&%R2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P +M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET +M*#`I"@H@("`@;6EN1&ES:TYE961E9"`](&9L;V%T*&1A=&%;(FUI;D1IF4I("\@,3`R-`H*("`@ +M(&EF("AF6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI +M86YC90HC('=I=&@@=&AE($QI8V5N2!I;7!O7,I(#T](#`Z"B`@("`@ +M("`@<')I;G0@(D%L;"`B("L@7,@ +M87)E(')E86-H86)L92!V:6$@<&EN9R(*("`@("`@("!E>&ET*#`I"B`@("!E +M;'-E.@H@("`@("`@('!R:6YT(")5;G)E86-H86)L92!G871E=V%Y7,N87)G=ELQ72`]/2`B8F%S:6,B +M.@H@("`@("`@(&UA:6XH*0H````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````')O;W0O:&5A;'1H7V-H96-K0`````````````````````````````````````````````````````````` +M```````````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P +M,371H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD +M871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C +M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F +M('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&5C=71A8FQE71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E +M($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H +M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C +M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I +M"@H@("`@=VET:"!O<&5N*"2!O +M9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A +M<'!L:6-A8FQE(&QA=R!O'!R97-S +M(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N$-P=55S86=E(&EN(&AE +M86QT:%]C:&5C:W-?9&%T82!S>7-T96U4:')E&ET*#`I"@H@("`@;6%X0W!U57-A9V4@/2!F;&]A="AD871A +M6R)M87A#<'55&ET*#`I"B`@("!E +M;'-E.@H@("`@("`@('!R:6YT(")&86EL960@=&\@&ET*#$I"@H*:68@7U]N86UE +M7U\@/3T@(E]?;6%I;E]?(CH*("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A +M;F0@0`````````````````````````````````````` +M````````````````````````````````````````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W +M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2`]('9-6R)M86-!9&1R97-S(ET@ +M*R`B("(@*R!V35LB:7`B72`K("(@(B`K('9-6R)V;4YA;64B70H@("`@("`@ +M(&9O=6YD16YT2`](%1R=64*("`@("`@("`@("`@("`@(&)R96%K"@H@("`@("`@("`@("!N +M;VY$969A=6QT4V5T(#T@(G-E=#HB("L@=DU;(FEP(ETN2`](%1R=64*("`@("`@ +M("`@("`@("`@(&)R96%K"@H@("`@("`@(&EF(&YO="!F;W5N9$5N=')Y.@H@ +M("`@("`@("`@("!F86EL961#:&5C:R`](%1R=64*("`@("`@("`@("`@9F%I +M;'5R94UE&ET*#$I"B`@("!E;'-E.@H@("`@("`@('!R +M:6YT(")!;&P@(B`K('-T7,N87)G=ELQ72`]/2`B861V86YC960B.@H@("`@("`@(&UA:6XH +M*0H````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````````````````!R;V]T +M+V9U;F,N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P +M.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N +M2!O;F4@;&]C:R!IPH@("`@ +MPH@("`@;&]C:STD,0H*("`@(%]?;&]C:V5D/3`*("`@ +M(%]?5%,]8&1A=&4@*R5S)4Y@"B`@("!?7TQ/0TM$25(](B]T;7`B"B`@("!? +M7TQ/0TM&24Q%/2(D7U],3T-+1$E2+R1?7U13+20D+21L;V-K+FQO8VLB"@H@ +M("`@:68@6R`D,B!="B`@("!T:&5N"B`@("`@("`@7U]424U%3U54/20R"B`@ +M("!E;'-E"B`@("`@("`@7U]424U%3U54/3,P"B`@("!F:0H*("`@(&EF(%L@ +M+64@)%]?3$]#2T9)3$4@70H@("`@=&AE;@H@("`@("`@(&QO9V=EPH@("`@7U],3T-+1$E2/2(O=&UP +M(@H@("`@7U],3T-+1DE,13TB)%]?3$]#2T1)4B\J+20D+20Q+FQO8VLB"B`@ +M("!?7VQO8VME9#TD,@H@("`@:68@6R`B)%]?;&]C:V5D(B`]/2`B,2(@70H@ +M("`@=&AE;@H@("`@("`@(')M("1?7TQ/0TM&24Q%"B`@("!F:0I]"@HC(')E +M;&5A&ET('9A;'5E"B,@ +M)#(@;&]C:R!F:6QE;F%M90HC("0S(&QO8VME9"@Q*2!OF4]8&EP(&%D9'(@2!O9B!T:&4@3&EC96YS92!A=`HC +M"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ +M=&AE($QI8V5N7,O8VQA;65T82UD871A+R@N*UM>+UTI+S\D("`N+B]M +M971A9&%T82\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%="@HC:'1T<#HO +M+SQR;W5T97))4#XO;&%T97-T+V9O;R!A;F0@+BXN+V9O;R\@*'EI96QD(&UE +M=&%D871A+R1)4"]F;V\I"B-A2UZ;VYE+S\D("`N+B]M971A9&%T82\E>U)%34]415]! +M1$12?2]A=F%I;&%B:6QI='DM>F]N92!;3"Q.0RQ14T%="E)E=W)I=&52=6QE +M(%YC;&]U9"UI9&5N=&EF:65R+S\D("`N+B]M971A9&%T82\E>U)%34]415]! +M1$12?2]C;&]U9"UI9&5N=&EF:65R(%M,+$Y#+%%305T*4F5WU)%34]415]!1$12?2]I +M;G-T86YC92UI9"!;3"Q.0RQ14T%="E)E=W)I=&52=6QE(%YL;V-A;"UH;W-T +M;F%M92\_)"`@+BXO;65T861A=&$O)7M214U/5$5?041$4GTO;&]C86PM:&]S +M=&YA;64@6TPL3D,L45-!70I297=R:71E4G5L92!>;&]C86PM:7!V-"\_)"`@ +M+BXO;65T861A=&$O)7M214U/5$5?041$4GTO;&]C86PM:7!V-"!;3"Q.0RQ1 +M4T%="E)E=W)I=&52=6QE(%YP=6)L:6,M:&]S=&YA;64O/R0@("XN+VUE=&%D +M871A+R5[4D5-3U1%7T%$1%)]+W!U8FQI8RUH;W-T;F%M92!;3"Q.0RQ14T%= +M"E)E=W)I=&52=6QE(%YP=6)L:6,M:7!V-"\_)"`@+BXO;65T861A=&$O)7M2 +M14U/5$5?041$4GTO<'5B;&EC+6EP=C0@6TPL3D,L45-!70I297=R:71E4G5L +M92!><'5B;&EC+6ME>7,O/R0@("XN+VUE=&%D871A+R5[4D5-3U1%7T%$1%)] +M+W!U8FQI8RUK97ES(%M,+$Y#+%%305T*4F5W=FTM:60O/R0@ +M("XN+VUE=&%D871A+R5[4D5-3U1%7T%$1%)]+W9M+6ED(%M,+$Y#+%%305T* +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````=F%R+W=W=R]H=&UL+W5S97)D871A+P`` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````#`P,#`W-34`,#`P,3/dev/null 2>&1 || ${echo} 'cloud_scripts/usr/share/cloud/cloud-scripts.tar': 'MD5 check failed' + ) << \SHAR_EOF +6c9c71f04c38fbbe6031c09a732f525d cloud_scripts/usr/share/cloud/cloud-scripts.tar +SHAR_EOF + +else +test `LC_ALL=C wc -c < 'cloud_scripts/usr/share/cloud/cloud-scripts.tar'` -ne 696320 && \ + ${echo} "restoration warning: size of 'cloud_scripts/usr/share/cloud/cloud-scripts.tar' is not 696320" + fi +fi +if rm -fr ${lock_dir} +then ${echo} "x - removed lock directory ${lock_dir}." +else ${echo} "x - failed to remove lock directory ${lock_dir}." + exit 1 +fi +exit 0 From fa221a1e880c687d7feb2f53c2bf5b15b4d004c7 Mon Sep 17 00:00:00 2001 From: Spaceman1984 <49917670+Spaceman1984@users.noreply.github.com> Date: Tue, 3 Mar 2020 10:01:57 +0200 Subject: [PATCH 2/2] Removed generated file --- tools/appliance/cloud_scripts_shar_archive.sh | 208895 --------------- 1 file changed, 208895 deletions(-) delete mode 100755 tools/appliance/cloud_scripts_shar_archive.sh diff --git a/tools/appliance/cloud_scripts_shar_archive.sh b/tools/appliance/cloud_scripts_shar_archive.sh deleted file mode 100755 index b2395cd65c77..000000000000 --- a/tools/appliance/cloud_scripts_shar_archive.sh +++ /dev/null @@ -1,208895 +0,0 @@ -#!/bin/sh -# This is a shell archive (produced by GNU sharutils 4.15.2). -# To extract the files from this archive, save it to some FILE, remove -# everything before the '#!/bin/sh' line above, then type 'sh FILE'. -# -lock_dir=_sh57448 -# Made on 2020-02-27 09:37 SAST by . -# Source directory was '/tmp/shar_cloud.XnZHhBXb'. -# -# Existing files will *not* be overwritten, unless '-c' is specified. -# -# This shar contains: -# length mode name -# ------ ---------- ------------------------------------------ -# 253 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0003.json -# 77 -rw-r--r-- cloud_scripts/opt/cloud/testdata/vmp0001.json -# 267 -rw-r--r-- cloud_scripts/opt/cloud/testdata/gn0001.json -# 250 -rw-r--r-- cloud_scripts/opt/cloud/testdata/dhcp0001.json -# 1405 -rw-r--r-- cloud_scripts/opt/cloud/testdata/acl0001.json -# 70 -rw-r--r-- cloud_scripts/opt/cloud/testdata/README -# 254 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0001.json -# 1062 -rwxr-xr-x cloud_scripts/opt/cloud/testdata/test.sh -# 254 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0002.json -# 380 -rw-r--r-- cloud_scripts/opt/cloud/testdata/s2s0001.json -# 1177 -rw-r--r-- cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ -# 1357 -rwxr-xr-x cloud_scripts/opt/cloud/templates/checkrouter.sh.templ -# 853 -rwxr-xr-x cloud_scripts/opt/cloud/templates/heartbeat.sh.templ -# 15888 -rw-r--r-- cloud_scripts/opt/cloud/templates/conntrackd.conf.templ -# 2037 -rwxr-xr-x cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ -# 822 -rw-r--r-- cloud_scripts/opt/cloud/templates/check_bumpup.sh -# 1429 -rw-r--r-- cloud_scripts/opt/cloud/templates/keepalived.conf.templ -# 1792 -rwxr-xr-x cloud_scripts/opt/cloud/bin/prepare_pxe.sh -# 3239 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_forwardingrules.py -# 3377 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_netusage.sh -# 45920 -rwxr-xr-x cloud_scripts/opt/cloud/bin/configure.py -# 1126 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vmp.py -# 1526 -rwxr-xr-x cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh -# 2725 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vr_cfg.sh -# 2346 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_snat.sh -# 3043 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_staticroute.sh -# 5587 -rwxr-xr-x cloud_scripts/opt/cloud/bin/baremetal-vr.py -# 1141 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_firewallrules.py -# 3478 -rwxr-xr-x cloud_scripts/opt/cloud/bin/netusage.sh -# 2294 -rwxr-xr-x cloud_scripts/opt/cloud/bin/monitor_service.sh -# 2581 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_ip.py -# 824 -rwxr-xr-x cloud_scripts/opt/cloud/bin/bumpup_priority.sh -# 1706 -rwxr-xr-x cloud_scripts/opt/cloud/bin/getRouterAlerts.sh -# 2122 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/postinit.sh -# 2720 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/secstorage.sh -# 1442 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/ilbvm.sh -# 3885 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh -# 3355 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/router.sh -# 1578 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/elbvm.sh -# 7721 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/bootstrap.sh -# 1658 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh -# 22472 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/common.sh -# 1985 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh -# 2765 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/cloud-early-config -# 1002 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/default.sh -# 8234 -rwxr-xr-x cloud_scripts/opt/cloud/bin/loadbalancer.sh -# 1717 -rwxr-xr-x cloud_scripts/opt/cloud/bin/baremetal_snat.sh -# 1469 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vpnusers.py -# 13492 -rwxr-xr-x cloud_scripts/opt/cloud/bin/merge.py -# 2040 -rwxr-xr-x cloud_scripts/opt/cloud/bin/master.py -# 1663 -rwxr-xr-x cloud_scripts/opt/cloud/bin/set_redundant.py -# 1178 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checks2svpn.sh -# 994 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py -# 952 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_staticroutes.py -# 996 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py -# 7020 -rwxr-xr-x cloud_scripts/opt/cloud/bin/passwd_server_ip.py -# 881 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_network_acl.py -# 986 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cleanup.sh -# 1016 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_loadbalancer.py -# 1849 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_func.sh -# 8809 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDhcp.py -# 16789 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRedundant.py -# 7644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsHelper.py -# 2545 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py -# 3681 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsMonitor.py -# 11100 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py -# 4989 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRoute.py -# 1655 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py -# 3393 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py -# 4159 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsApp.py -# 6133 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsFile.py -# 785 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/__init__.py -# 29236 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsAddress.py -# 2156 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsProcess.py -# 3179 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsConfig.py -# 4808 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDatabag.py -# 2192 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRule.py -# 4723 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vmdata.py -# 4478 -rwxr-xr-x cloud_scripts/opt/cloud/bin/get_diagnostics_files.py -# 1445 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checkrouter.sh -# 5644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ilb.sh -# 924 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh -# 1525 -rwxr-xr-x cloud_scripts/opt/cloud/bin/savepassword.sh -# 2632 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cloud-nic.sh -# 8769 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ipsectunnel.sh -# 13401 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ipassoc.sh -# 7961 -rwxr-xr-x cloud_scripts/opt/cloud/bin/line_edit.py -# 1449 -rwxr-xr-x cloud_scripts/opt/cloud/bin/get_template_version.sh -# 5136 -rwxr-xr-x cloud_scripts/opt/cloud/bin/update_config.py -# 5502 -rwxr-xr-x cloud_scripts/opt/cloud/bin/edithosts.sh -# 2012 -rwxr-xr-x cloud_scripts/opt/cloud/bin/diagnostics.py -# 1541 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_monitorservice.py -# 6986 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpn_l2tp.sh -# 1401 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_guestnetwork.py -# 892 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vmdata.py -# 4359 -rwxr-xr-x cloud_scripts/opt/cloud/bin/dnsmasq.sh -# 1533 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_dhcp.py -# 1045 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_cmdline.py -# 1454 -rwxr-xr-x cloud_scripts/root/reconfigLB.sh -# 12747 -rwxr-xr-x cloud_scripts/root/monitorServices.py -# 3349 -rw-r--r-- cloud_scripts/root/health_checks/iptables_check.py -# 1966 -rw-r--r-- cloud_scripts/root/health_checks/memory_usage_check.py -# 5274 -rw-r--r-- cloud_scripts/root/health_checks/haproxy_check.py -# 2773 -rw-r--r-- cloud_scripts/root/health_checks/router_version_check.py -# 1865 -rw-r--r-- cloud_scripts/root/health_checks/utility/sharedFunctions.py -# 864 -rw-r--r-- cloud_scripts/root/health_checks/utility/__init__.py -# 1626 -rw-r--r-- cloud_scripts/root/health_checks/disk_space_check.py -# 1869 -rw-r--r-- cloud_scripts/root/health_checks/gateways_check.py -# 942 -rw-r--r-- cloud_scripts/root/health_checks/__init__.py -# 1972 -rw-r--r-- cloud_scripts/root/health_checks/dns_check.py -# 2078 -rw-r--r-- cloud_scripts/root/health_checks/cpu_usage_check.py -# 2386 -rwxr-xr-x cloud_scripts/root/health_checks/dhcp_check.py -# 3567 -rw-r--r-- cloud_scripts/root/func.sh -# 1461 -rwxr-xr-x cloud_scripts/root/clearUsageRules.sh -# 1425 -rw-r--r-- cloud_scripts/var/www/html/latest/.htaccess -# 17 -rw-r--r-- cloud_scripts/var/www/html/userdata/.htaccess -# 94 -rw-r--r-- cloud_scripts/etc/ipsec.conf -# 80 -rw-r--r-- cloud_scripts/etc/systemd/journald.conf -# 156 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service -# 143 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service -# 298 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud.service -# 280 -rw-r--r-- cloud_scripts/etc/systemd/system/open-vm-tools.service -# 257 -rw-r--r-- cloud_scripts/etc/systemd/system/baremetal-vr.service -# 398 -rw-r--r-- cloud_scripts/etc/systemd/system/xe-daemon.service -# 190 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service -# 348 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-early-config.service -# 244 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-password-server@.service -# 287 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-postinit.service -# 1731 -rw-r--r-- cloud_scripts/etc/iptables/rules -# 1601 -rw-r--r-- cloud_scripts/etc/iptables/iptables-consoleproxy -# 2348 -rw-r--r-- cloud_scripts/etc/iptables/iptables-router -# 1465 -rw-r--r-- cloud_scripts/etc/iptables/iptables-vpcrouter -# 2348 -rw-r--r-- cloud_scripts/etc/iptables/iptables-dhcpsrvr -# 1256 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-elbvm -# 1375 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-secstorage -# 1192 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-ilbvm -# 897 -rw-r--r-- cloud_scripts/etc/iptables/rt_tables_init -# 2049 -rw-r--r-- cloud_scripts/etc/sysctl.conf -# 139 -rw-r--r-- cloud_scripts/etc/xl2tpd/xl2tpd.conf -# 25321 -rw-r--r-- cloud_scripts/etc/dnsmasq.conf.tmpl -# 107 -rwxr-xr-x cloud_scripts/etc/cron.daily/clear_cache -# 477 -rw-r--r-- cloud_scripts/etc/vmware-tools/tools.conf -# 507 -rw-r--r-- cloud_scripts/etc/logrotate.conf -# 3603 -rw-r--r-- cloud_scripts/etc/ssh/sshd_config -# 141 -rw-r--r-- cloud_scripts/etc/ppp/options.xl2tpd -# 1234 -rw-r--r-- cloud_scripts/etc/ipsec.d/l2tp.conf -# 2298 -rw-r--r-- cloud_scripts/etc/rsyslog.conf -# 801 -rw-r--r-- cloud_scripts/etc/modprobe.d/pcspkr.conf -# 807 -rw-r--r-- cloud_scripts/etc/modprobe.d/aesni_intel.conf -# 183 -rwxr-xr-x cloud_scripts/etc/cron.hourly/clear_cache -# 54 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/security.conf -# 669 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf -# 8 -rw-r--r-- cloud_scripts/etc/apache2/httpd.conf -# 9955 -rw-r--r-- cloud_scripts/etc/apache2/vhost.template -# 17942 -rw-r--r-- cloud_scripts/etc/vpcdnsmasq.conf -# 80 -rw-r--r-- cloud_scripts/etc/ipsec.secrets -# 272 -rw-r--r-- cloud_scripts/etc/logrotate.d/dnsmasq -# 1124 -rw-r--r-- cloud_scripts/etc/logrotate.d/cloud -# 263 -rw-r--r-- cloud_scripts/etc/logrotate.d/conntrackd -# 922 -rw-r--r-- cloud_scripts/etc/logrotate.d/monitor -# 935 -rw-r--r-- cloud_scripts/etc/logrotate.d/routerServiceMonitor -# 98 -rw-r--r-- cloud_scripts/etc/logrotate.d/ppp -# 148 -rw-r--r-- cloud_scripts/etc/logrotate.d/apache2 -# 517 -rw-r--r-- cloud_scripts/etc/logrotate.d/rsyslog -# 194 -rw-r--r-- cloud_scripts/etc/logrotate.d/haproxy -# 861 -rwxr-xr-x cloud_scripts/etc/profile.d/cloud.sh -# 83 -rw-r--r-- cloud_scripts/etc/cloud-nic.rules -# 483 -rw-r--r-- cloud_scripts/etc/haproxy/haproxy.cfg -# 696320 -rw-r--r-- cloud_scripts/usr/share/cloud/cloud-scripts.tar -# 253 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0003.json -# 77 -rw-r--r-- cloud_scripts/opt/cloud/testdata/vmp0001.json -# 267 -rw-r--r-- cloud_scripts/opt/cloud/testdata/gn0001.json -# 250 -rw-r--r-- cloud_scripts/opt/cloud/testdata/dhcp0001.json -# 1405 -rw-r--r-- cloud_scripts/opt/cloud/testdata/acl0001.json -# 70 -rw-r--r-- cloud_scripts/opt/cloud/testdata/README -# 254 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0001.json -# 1062 -rwxr-xr-x cloud_scripts/opt/cloud/testdata/test.sh -# 254 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0002.json -# 380 -rw-r--r-- cloud_scripts/opt/cloud/testdata/s2s0001.json -# 1177 -rw-r--r-- cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ -# 1357 -rwxr-xr-x cloud_scripts/opt/cloud/templates/checkrouter.sh.templ -# 853 -rwxr-xr-x cloud_scripts/opt/cloud/templates/heartbeat.sh.templ -# 15888 -rw-r--r-- cloud_scripts/opt/cloud/templates/conntrackd.conf.templ -# 2037 -rwxr-xr-x cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ -# 822 -rw-r--r-- cloud_scripts/opt/cloud/templates/check_bumpup.sh -# 1429 -rw-r--r-- cloud_scripts/opt/cloud/templates/keepalived.conf.templ -# 1792 -rwxr-xr-x cloud_scripts/opt/cloud/bin/prepare_pxe.sh -# 3239 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_forwardingrules.py -# 3377 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_netusage.sh -# 45920 -rwxr-xr-x cloud_scripts/opt/cloud/bin/configure.py -# 1126 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vmp.py -# 1526 -rwxr-xr-x cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh -# 2725 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vr_cfg.sh -# 2346 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_snat.sh -# 3043 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_staticroute.sh -# 5587 -rwxr-xr-x cloud_scripts/opt/cloud/bin/baremetal-vr.py -# 1141 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_firewallrules.py -# 3478 -rwxr-xr-x cloud_scripts/opt/cloud/bin/netusage.sh -# 2294 -rwxr-xr-x cloud_scripts/opt/cloud/bin/monitor_service.sh -# 2581 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_ip.py -# 824 -rwxr-xr-x cloud_scripts/opt/cloud/bin/bumpup_priority.sh -# 1706 -rwxr-xr-x cloud_scripts/opt/cloud/bin/getRouterAlerts.sh -# 2122 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/postinit.sh -# 2720 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/secstorage.sh -# 1442 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/ilbvm.sh -# 3885 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh -# 3355 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/router.sh -# 1578 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/elbvm.sh -# 7721 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/bootstrap.sh -# 1658 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh -# 22472 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/common.sh -# 1985 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh -# 2765 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/cloud-early-config -# 1002 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/default.sh -# 8234 -rwxr-xr-x cloud_scripts/opt/cloud/bin/loadbalancer.sh -# 1717 -rwxr-xr-x cloud_scripts/opt/cloud/bin/baremetal_snat.sh -# 1469 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vpnusers.py -# 13492 -rwxr-xr-x cloud_scripts/opt/cloud/bin/merge.py -# 2040 -rwxr-xr-x cloud_scripts/opt/cloud/bin/master.py -# 1663 -rwxr-xr-x cloud_scripts/opt/cloud/bin/set_redundant.py -# 1178 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checks2svpn.sh -# 994 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py -# 952 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_staticroutes.py -# 996 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py -# 7020 -rwxr-xr-x cloud_scripts/opt/cloud/bin/passwd_server_ip.py -# 881 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_network_acl.py -# 986 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cleanup.sh -# 1016 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_loadbalancer.py -# 1849 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_func.sh -# 8809 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDhcp.py -# 16789 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRedundant.py -# 7644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsHelper.py -# 2545 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py -# 3681 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsMonitor.py -# 11100 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py -# 4989 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRoute.py -# 1655 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py -# 3393 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py -# 4159 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsApp.py -# 6133 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsFile.py -# 785 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/__init__.py -# 29236 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsAddress.py -# 2156 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsProcess.py -# 3179 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsConfig.py -# 4808 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDatabag.py -# 2192 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRule.py -# 4723 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vmdata.py -# 4478 -rwxr-xr-x cloud_scripts/opt/cloud/bin/get_diagnostics_files.py -# 1445 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checkrouter.sh -# 5644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ilb.sh -# 924 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh -# 1525 -rwxr-xr-x cloud_scripts/opt/cloud/bin/savepassword.sh -# 2632 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cloud-nic.sh -# 8769 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ipsectunnel.sh -# 13401 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ipassoc.sh -# 7961 -rwxr-xr-x cloud_scripts/opt/cloud/bin/line_edit.py -# 1449 -rwxr-xr-x cloud_scripts/opt/cloud/bin/get_template_version.sh -# 5136 -rwxr-xr-x cloud_scripts/opt/cloud/bin/update_config.py -# 5502 -rwxr-xr-x cloud_scripts/opt/cloud/bin/edithosts.sh -# 2012 -rwxr-xr-x cloud_scripts/opt/cloud/bin/diagnostics.py -# 1541 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_monitorservice.py -# 6986 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpn_l2tp.sh -# 1401 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_guestnetwork.py -# 892 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vmdata.py -# 4359 -rwxr-xr-x cloud_scripts/opt/cloud/bin/dnsmasq.sh -# 1533 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_dhcp.py -# 1045 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_cmdline.py -# 1454 -rwxr-xr-x cloud_scripts/root/reconfigLB.sh -# 12747 -rwxr-xr-x cloud_scripts/root/monitorServices.py -# 3349 -rw-r--r-- cloud_scripts/root/health_checks/iptables_check.py -# 1966 -rw-r--r-- cloud_scripts/root/health_checks/memory_usage_check.py -# 5274 -rw-r--r-- cloud_scripts/root/health_checks/haproxy_check.py -# 2773 -rw-r--r-- cloud_scripts/root/health_checks/router_version_check.py -# 1865 -rw-r--r-- cloud_scripts/root/health_checks/utility/sharedFunctions.py -# 864 -rw-r--r-- cloud_scripts/root/health_checks/utility/__init__.py -# 1626 -rw-r--r-- cloud_scripts/root/health_checks/disk_space_check.py -# 1869 -rw-r--r-- cloud_scripts/root/health_checks/gateways_check.py -# 942 -rw-r--r-- cloud_scripts/root/health_checks/__init__.py -# 1972 -rw-r--r-- cloud_scripts/root/health_checks/dns_check.py -# 2078 -rw-r--r-- cloud_scripts/root/health_checks/cpu_usage_check.py -# 2386 -rwxr-xr-x cloud_scripts/root/health_checks/dhcp_check.py -# 3567 -rw-r--r-- cloud_scripts/root/func.sh -# 1461 -rwxr-xr-x cloud_scripts/root/clearUsageRules.sh -# 1425 -rw-r--r-- cloud_scripts/var/www/html/latest/.htaccess -# 17 -rw-r--r-- cloud_scripts/var/www/html/userdata/.htaccess -# 94 -rw-r--r-- cloud_scripts/etc/ipsec.conf -# 80 -rw-r--r-- cloud_scripts/etc/systemd/journald.conf -# 156 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service -# 143 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service -# 298 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud.service -# 280 -rw-r--r-- cloud_scripts/etc/systemd/system/open-vm-tools.service -# 257 -rw-r--r-- cloud_scripts/etc/systemd/system/baremetal-vr.service -# 398 -rw-r--r-- cloud_scripts/etc/systemd/system/xe-daemon.service -# 190 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service -# 348 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-early-config.service -# 244 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-password-server@.service -# 287 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-postinit.service -# 1731 -rw-r--r-- cloud_scripts/etc/iptables/rules -# 1601 -rw-r--r-- cloud_scripts/etc/iptables/iptables-consoleproxy -# 2348 -rw-r--r-- cloud_scripts/etc/iptables/iptables-router -# 1465 -rw-r--r-- cloud_scripts/etc/iptables/iptables-vpcrouter -# 2348 -rw-r--r-- cloud_scripts/etc/iptables/iptables-dhcpsrvr -# 1256 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-elbvm -# 1375 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-secstorage -# 1192 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-ilbvm -# 897 -rw-r--r-- cloud_scripts/etc/iptables/rt_tables_init -# 2049 -rw-r--r-- cloud_scripts/etc/sysctl.conf -# 139 -rw-r--r-- cloud_scripts/etc/xl2tpd/xl2tpd.conf -# 25321 -rw-r--r-- cloud_scripts/etc/dnsmasq.conf.tmpl -# 107 -rwxr-xr-x cloud_scripts/etc/cron.daily/clear_cache -# 477 -rw-r--r-- cloud_scripts/etc/vmware-tools/tools.conf -# 507 -rw-r--r-- cloud_scripts/etc/logrotate.conf -# 3603 -rw-r--r-- cloud_scripts/etc/ssh/sshd_config -# 141 -rw-r--r-- cloud_scripts/etc/ppp/options.xl2tpd -# 1234 -rw-r--r-- cloud_scripts/etc/ipsec.d/l2tp.conf -# 2298 -rw-r--r-- cloud_scripts/etc/rsyslog.conf -# 801 -rw-r--r-- cloud_scripts/etc/modprobe.d/pcspkr.conf -# 807 -rw-r--r-- cloud_scripts/etc/modprobe.d/aesni_intel.conf -# 183 -rwxr-xr-x cloud_scripts/etc/cron.hourly/clear_cache -# 54 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/security.conf -# 669 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf -# 8 -rw-r--r-- cloud_scripts/etc/apache2/httpd.conf -# 9955 -rw-r--r-- cloud_scripts/etc/apache2/vhost.template -# 17942 -rw-r--r-- cloud_scripts/etc/vpcdnsmasq.conf -# 80 -rw-r--r-- cloud_scripts/etc/ipsec.secrets -# 272 -rw-r--r-- cloud_scripts/etc/logrotate.d/dnsmasq -# 1124 -rw-r--r-- cloud_scripts/etc/logrotate.d/cloud -# 263 -rw-r--r-- cloud_scripts/etc/logrotate.d/conntrackd -# 922 -rw-r--r-- cloud_scripts/etc/logrotate.d/monitor -# 935 -rw-r--r-- cloud_scripts/etc/logrotate.d/routerServiceMonitor -# 98 -rw-r--r-- cloud_scripts/etc/logrotate.d/ppp -# 148 -rw-r--r-- cloud_scripts/etc/logrotate.d/apache2 -# 517 -rw-r--r-- cloud_scripts/etc/logrotate.d/rsyslog -# 194 -rw-r--r-- cloud_scripts/etc/logrotate.d/haproxy -# 861 -rwxr-xr-x cloud_scripts/etc/profile.d/cloud.sh -# 83 -rw-r--r-- cloud_scripts/etc/cloud-nic.rules -# 483 -rw-r--r-- cloud_scripts/etc/haproxy/haproxy.cfg -# 696320 -rw-r--r-- cloud_scripts/usr/share/cloud/cloud-scripts.tar -# 253 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0003.json -# 77 -rw-r--r-- cloud_scripts/opt/cloud/testdata/vmp0001.json -# 267 -rw-r--r-- cloud_scripts/opt/cloud/testdata/gn0001.json -# 250 -rw-r--r-- cloud_scripts/opt/cloud/testdata/dhcp0001.json -# 1405 -rw-r--r-- cloud_scripts/opt/cloud/testdata/acl0001.json -# 70 -rw-r--r-- cloud_scripts/opt/cloud/testdata/README -# 254 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0001.json -# 1062 -rwxr-xr-x cloud_scripts/opt/cloud/testdata/test.sh -# 254 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0002.json -# 380 -rw-r--r-- cloud_scripts/opt/cloud/testdata/s2s0001.json -# 1177 -rw-r--r-- cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ -# 1357 -rwxr-xr-x cloud_scripts/opt/cloud/templates/checkrouter.sh.templ -# 853 -rwxr-xr-x cloud_scripts/opt/cloud/templates/heartbeat.sh.templ -# 15888 -rw-r--r-- cloud_scripts/opt/cloud/templates/conntrackd.conf.templ -# 2037 -rwxr-xr-x cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ -# 822 -rw-r--r-- cloud_scripts/opt/cloud/templates/check_bumpup.sh -# 1429 -rw-r--r-- cloud_scripts/opt/cloud/templates/keepalived.conf.templ -# 1792 -rwxr-xr-x cloud_scripts/opt/cloud/bin/prepare_pxe.sh -# 3239 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_forwardingrules.py -# 3377 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_netusage.sh -# 45920 -rwxr-xr-x cloud_scripts/opt/cloud/bin/configure.py -# 1126 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vmp.py -# 1526 -rwxr-xr-x cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh -# 2725 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vr_cfg.sh -# 2346 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_snat.sh -# 3043 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_staticroute.sh -# 5587 -rwxr-xr-x cloud_scripts/opt/cloud/bin/baremetal-vr.py -# 1141 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_firewallrules.py -# 3478 -rwxr-xr-x cloud_scripts/opt/cloud/bin/netusage.sh -# 2294 -rwxr-xr-x cloud_scripts/opt/cloud/bin/monitor_service.sh -# 2581 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_ip.py -# 824 -rwxr-xr-x cloud_scripts/opt/cloud/bin/bumpup_priority.sh -# 1706 -rwxr-xr-x cloud_scripts/opt/cloud/bin/getRouterAlerts.sh -# 2122 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/postinit.sh -# 2720 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/secstorage.sh -# 1442 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/ilbvm.sh -# 3885 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh -# 3355 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/router.sh -# 1578 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/elbvm.sh -# 7721 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/bootstrap.sh -# 1658 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh -# 22472 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/common.sh -# 1985 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh -# 2765 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/cloud-early-config -# 1002 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/default.sh -# 8234 -rwxr-xr-x cloud_scripts/opt/cloud/bin/loadbalancer.sh -# 1717 -rwxr-xr-x cloud_scripts/opt/cloud/bin/baremetal_snat.sh -# 1469 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vpnusers.py -# 13492 -rwxr-xr-x cloud_scripts/opt/cloud/bin/merge.py -# 2040 -rwxr-xr-x cloud_scripts/opt/cloud/bin/master.py -# 1663 -rwxr-xr-x cloud_scripts/opt/cloud/bin/set_redundant.py -# 1178 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checks2svpn.sh -# 994 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py -# 952 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_staticroutes.py -# 996 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py -# 7020 -rwxr-xr-x cloud_scripts/opt/cloud/bin/passwd_server_ip.py -# 881 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_network_acl.py -# 986 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cleanup.sh -# 1016 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_loadbalancer.py -# 1849 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_func.sh -# 8809 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDhcp.py -# 16789 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRedundant.py -# 7644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsHelper.py -# 2545 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py -# 3681 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsMonitor.py -# 11100 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py -# 4989 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRoute.py -# 1655 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py -# 3393 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py -# 4159 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsApp.py -# 6133 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsFile.py -# 785 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/__init__.py -# 29236 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsAddress.py -# 2156 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsProcess.py -# 3179 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsConfig.py -# 4808 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDatabag.py -# 2192 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRule.py -# 4723 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vmdata.py -# 4478 -rwxr-xr-x cloud_scripts/opt/cloud/bin/get_diagnostics_files.py -# 1445 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checkrouter.sh -# 5644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ilb.sh -# 924 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh -# 1525 -rwxr-xr-x cloud_scripts/opt/cloud/bin/savepassword.sh -# 2632 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cloud-nic.sh -# 8769 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ipsectunnel.sh -# 13401 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ipassoc.sh -# 7961 -rwxr-xr-x cloud_scripts/opt/cloud/bin/line_edit.py -# 1449 -rwxr-xr-x cloud_scripts/opt/cloud/bin/get_template_version.sh -# 5136 -rwxr-xr-x cloud_scripts/opt/cloud/bin/update_config.py -# 5502 -rwxr-xr-x cloud_scripts/opt/cloud/bin/edithosts.sh -# 2012 -rwxr-xr-x cloud_scripts/opt/cloud/bin/diagnostics.py -# 1541 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_monitorservice.py -# 6986 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpn_l2tp.sh -# 1401 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_guestnetwork.py -# 892 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vmdata.py -# 4359 -rwxr-xr-x cloud_scripts/opt/cloud/bin/dnsmasq.sh -# 1533 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_dhcp.py -# 1045 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_cmdline.py -# 253 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0003.json -# 77 -rw-r--r-- cloud_scripts/opt/cloud/testdata/vmp0001.json -# 267 -rw-r--r-- cloud_scripts/opt/cloud/testdata/gn0001.json -# 250 -rw-r--r-- cloud_scripts/opt/cloud/testdata/dhcp0001.json -# 1405 -rw-r--r-- cloud_scripts/opt/cloud/testdata/acl0001.json -# 70 -rw-r--r-- cloud_scripts/opt/cloud/testdata/README -# 254 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0001.json -# 1062 -rwxr-xr-x cloud_scripts/opt/cloud/testdata/test.sh -# 254 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0002.json -# 380 -rw-r--r-- cloud_scripts/opt/cloud/testdata/s2s0001.json -# 1177 -rw-r--r-- cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ -# 1357 -rwxr-xr-x cloud_scripts/opt/cloud/templates/checkrouter.sh.templ -# 853 -rwxr-xr-x cloud_scripts/opt/cloud/templates/heartbeat.sh.templ -# 15888 -rw-r--r-- cloud_scripts/opt/cloud/templates/conntrackd.conf.templ -# 2037 -rwxr-xr-x cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ -# 822 -rw-r--r-- cloud_scripts/opt/cloud/templates/check_bumpup.sh -# 1429 -rw-r--r-- cloud_scripts/opt/cloud/templates/keepalived.conf.templ -# 1792 -rwxr-xr-x cloud_scripts/opt/cloud/bin/prepare_pxe.sh -# 3239 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_forwardingrules.py -# 3377 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_netusage.sh -# 45920 -rwxr-xr-x cloud_scripts/opt/cloud/bin/configure.py -# 1126 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vmp.py -# 1526 -rwxr-xr-x cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh -# 2725 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vr_cfg.sh -# 2346 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_snat.sh -# 3043 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_staticroute.sh -# 5587 -rwxr-xr-x cloud_scripts/opt/cloud/bin/baremetal-vr.py -# 1141 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_firewallrules.py -# 3478 -rwxr-xr-x cloud_scripts/opt/cloud/bin/netusage.sh -# 2294 -rwxr-xr-x cloud_scripts/opt/cloud/bin/monitor_service.sh -# 2581 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_ip.py -# 824 -rwxr-xr-x cloud_scripts/opt/cloud/bin/bumpup_priority.sh -# 1706 -rwxr-xr-x cloud_scripts/opt/cloud/bin/getRouterAlerts.sh -# 2122 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/postinit.sh -# 2720 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/secstorage.sh -# 1442 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/ilbvm.sh -# 3885 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh -# 3355 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/router.sh -# 1578 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/elbvm.sh -# 7721 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/bootstrap.sh -# 1658 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh -# 22472 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/common.sh -# 1985 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh -# 2765 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/cloud-early-config -# 1002 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/default.sh -# 8234 -rwxr-xr-x cloud_scripts/opt/cloud/bin/loadbalancer.sh -# 1717 -rwxr-xr-x cloud_scripts/opt/cloud/bin/baremetal_snat.sh -# 1469 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vpnusers.py -# 13492 -rwxr-xr-x cloud_scripts/opt/cloud/bin/merge.py -# 2040 -rwxr-xr-x cloud_scripts/opt/cloud/bin/master.py -# 1663 -rwxr-xr-x cloud_scripts/opt/cloud/bin/set_redundant.py -# 1178 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checks2svpn.sh -# 994 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py -# 952 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_staticroutes.py -# 996 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py -# 7020 -rwxr-xr-x cloud_scripts/opt/cloud/bin/passwd_server_ip.py -# 881 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_network_acl.py -# 986 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cleanup.sh -# 1016 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_loadbalancer.py -# 1849 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_func.sh -# 8809 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDhcp.py -# 16789 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRedundant.py -# 7644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsHelper.py -# 2545 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py -# 3681 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsMonitor.py -# 11100 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py -# 4989 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRoute.py -# 1655 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py -# 3393 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py -# 4159 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsApp.py -# 6133 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsFile.py -# 785 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/__init__.py -# 29236 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsAddress.py -# 2156 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsProcess.py -# 3179 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsConfig.py -# 4808 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDatabag.py -# 2192 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRule.py -# 4723 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vmdata.py -# 4478 -rwxr-xr-x cloud_scripts/opt/cloud/bin/get_diagnostics_files.py -# 1445 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checkrouter.sh -# 5644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ilb.sh -# 924 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh -# 1525 -rwxr-xr-x cloud_scripts/opt/cloud/bin/savepassword.sh -# 2632 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cloud-nic.sh -# 8769 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ipsectunnel.sh -# 13401 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ipassoc.sh -# 7961 -rwxr-xr-x cloud_scripts/opt/cloud/bin/line_edit.py -# 1449 -rwxr-xr-x cloud_scripts/opt/cloud/bin/get_template_version.sh -# 5136 -rwxr-xr-x cloud_scripts/opt/cloud/bin/update_config.py -# 5502 -rwxr-xr-x cloud_scripts/opt/cloud/bin/edithosts.sh -# 2012 -rwxr-xr-x cloud_scripts/opt/cloud/bin/diagnostics.py -# 1541 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_monitorservice.py -# 6986 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpn_l2tp.sh -# 1401 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_guestnetwork.py -# 892 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vmdata.py -# 4359 -rwxr-xr-x cloud_scripts/opt/cloud/bin/dnsmasq.sh -# 1533 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_dhcp.py -# 1045 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_cmdline.py -# 253 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0003.json -# 77 -rw-r--r-- cloud_scripts/opt/cloud/testdata/vmp0001.json -# 267 -rw-r--r-- cloud_scripts/opt/cloud/testdata/gn0001.json -# 250 -rw-r--r-- cloud_scripts/opt/cloud/testdata/dhcp0001.json -# 1405 -rw-r--r-- cloud_scripts/opt/cloud/testdata/acl0001.json -# 70 -rw-r--r-- cloud_scripts/opt/cloud/testdata/README -# 254 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0001.json -# 1062 -rwxr-xr-x cloud_scripts/opt/cloud/testdata/test.sh -# 254 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0002.json -# 380 -rw-r--r-- cloud_scripts/opt/cloud/testdata/s2s0001.json -# 253 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0003.json -# 77 -rw-r--r-- cloud_scripts/opt/cloud/testdata/vmp0001.json -# 267 -rw-r--r-- cloud_scripts/opt/cloud/testdata/gn0001.json -# 250 -rw-r--r-- cloud_scripts/opt/cloud/testdata/dhcp0001.json -# 1405 -rw-r--r-- cloud_scripts/opt/cloud/testdata/acl0001.json -# 70 -rw-r--r-- cloud_scripts/opt/cloud/testdata/README -# 254 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0001.json -# 1062 -rwxr-xr-x cloud_scripts/opt/cloud/testdata/test.sh -# 254 -rw-r--r-- cloud_scripts/opt/cloud/testdata/ips0002.json -# 380 -rw-r--r-- cloud_scripts/opt/cloud/testdata/s2s0001.json -# 1177 -rw-r--r-- cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ -# 1357 -rwxr-xr-x cloud_scripts/opt/cloud/templates/checkrouter.sh.templ -# 853 -rwxr-xr-x cloud_scripts/opt/cloud/templates/heartbeat.sh.templ -# 15888 -rw-r--r-- cloud_scripts/opt/cloud/templates/conntrackd.conf.templ -# 2037 -rwxr-xr-x cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ -# 822 -rw-r--r-- cloud_scripts/opt/cloud/templates/check_bumpup.sh -# 1429 -rw-r--r-- cloud_scripts/opt/cloud/templates/keepalived.conf.templ -# 1177 -rw-r--r-- cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ -# 1357 -rwxr-xr-x cloud_scripts/opt/cloud/templates/checkrouter.sh.templ -# 853 -rwxr-xr-x cloud_scripts/opt/cloud/templates/heartbeat.sh.templ -# 15888 -rw-r--r-- cloud_scripts/opt/cloud/templates/conntrackd.conf.templ -# 2037 -rwxr-xr-x cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ -# 822 -rw-r--r-- cloud_scripts/opt/cloud/templates/check_bumpup.sh -# 1429 -rw-r--r-- cloud_scripts/opt/cloud/templates/keepalived.conf.templ -# 1792 -rwxr-xr-x cloud_scripts/opt/cloud/bin/prepare_pxe.sh -# 3239 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_forwardingrules.py -# 3377 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_netusage.sh -# 45920 -rwxr-xr-x cloud_scripts/opt/cloud/bin/configure.py -# 1126 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vmp.py -# 1526 -rwxr-xr-x cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh -# 2725 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vr_cfg.sh -# 2346 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_snat.sh -# 3043 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_staticroute.sh -# 5587 -rwxr-xr-x cloud_scripts/opt/cloud/bin/baremetal-vr.py -# 1141 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_firewallrules.py -# 3478 -rwxr-xr-x cloud_scripts/opt/cloud/bin/netusage.sh -# 2294 -rwxr-xr-x cloud_scripts/opt/cloud/bin/monitor_service.sh -# 2581 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_ip.py -# 824 -rwxr-xr-x cloud_scripts/opt/cloud/bin/bumpup_priority.sh -# 1706 -rwxr-xr-x cloud_scripts/opt/cloud/bin/getRouterAlerts.sh -# 2122 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/postinit.sh -# 2720 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/secstorage.sh -# 1442 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/ilbvm.sh -# 3885 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh -# 3355 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/router.sh -# 1578 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/elbvm.sh -# 7721 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/bootstrap.sh -# 1658 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh -# 22472 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/common.sh -# 1985 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh -# 2765 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/cloud-early-config -# 1002 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/default.sh -# 8234 -rwxr-xr-x cloud_scripts/opt/cloud/bin/loadbalancer.sh -# 1717 -rwxr-xr-x cloud_scripts/opt/cloud/bin/baremetal_snat.sh -# 1469 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vpnusers.py -# 13492 -rwxr-xr-x cloud_scripts/opt/cloud/bin/merge.py -# 2040 -rwxr-xr-x cloud_scripts/opt/cloud/bin/master.py -# 1663 -rwxr-xr-x cloud_scripts/opt/cloud/bin/set_redundant.py -# 1178 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checks2svpn.sh -# 994 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py -# 952 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_staticroutes.py -# 996 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py -# 7020 -rwxr-xr-x cloud_scripts/opt/cloud/bin/passwd_server_ip.py -# 881 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_network_acl.py -# 986 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cleanup.sh -# 1016 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_loadbalancer.py -# 1849 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_func.sh -# 8809 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDhcp.py -# 16789 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRedundant.py -# 7644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsHelper.py -# 2545 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py -# 3681 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsMonitor.py -# 11100 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py -# 4989 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRoute.py -# 1655 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py -# 3393 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py -# 4159 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsApp.py -# 6133 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsFile.py -# 785 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/__init__.py -# 29236 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsAddress.py -# 2156 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsProcess.py -# 3179 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsConfig.py -# 4808 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDatabag.py -# 2192 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRule.py -# 4723 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vmdata.py -# 4478 -rwxr-xr-x cloud_scripts/opt/cloud/bin/get_diagnostics_files.py -# 1445 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checkrouter.sh -# 5644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ilb.sh -# 924 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh -# 1525 -rwxr-xr-x cloud_scripts/opt/cloud/bin/savepassword.sh -# 2632 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cloud-nic.sh -# 8769 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ipsectunnel.sh -# 13401 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ipassoc.sh -# 7961 -rwxr-xr-x cloud_scripts/opt/cloud/bin/line_edit.py -# 1449 -rwxr-xr-x cloud_scripts/opt/cloud/bin/get_template_version.sh -# 5136 -rwxr-xr-x cloud_scripts/opt/cloud/bin/update_config.py -# 5502 -rwxr-xr-x cloud_scripts/opt/cloud/bin/edithosts.sh -# 2012 -rwxr-xr-x cloud_scripts/opt/cloud/bin/diagnostics.py -# 1541 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_monitorservice.py -# 6986 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpn_l2tp.sh -# 1401 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_guestnetwork.py -# 892 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vmdata.py -# 4359 -rwxr-xr-x cloud_scripts/opt/cloud/bin/dnsmasq.sh -# 1533 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_dhcp.py -# 1045 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_cmdline.py -# 1792 -rwxr-xr-x cloud_scripts/opt/cloud/bin/prepare_pxe.sh -# 3239 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_forwardingrules.py -# 3377 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_netusage.sh -# 45920 -rwxr-xr-x cloud_scripts/opt/cloud/bin/configure.py -# 1126 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vmp.py -# 1526 -rwxr-xr-x cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh -# 2725 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vr_cfg.sh -# 2346 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_snat.sh -# 3043 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_staticroute.sh -# 5587 -rwxr-xr-x cloud_scripts/opt/cloud/bin/baremetal-vr.py -# 1141 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_firewallrules.py -# 3478 -rwxr-xr-x cloud_scripts/opt/cloud/bin/netusage.sh -# 2294 -rwxr-xr-x cloud_scripts/opt/cloud/bin/monitor_service.sh -# 2581 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_ip.py -# 824 -rwxr-xr-x cloud_scripts/opt/cloud/bin/bumpup_priority.sh -# 1706 -rwxr-xr-x cloud_scripts/opt/cloud/bin/getRouterAlerts.sh -# 2122 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/postinit.sh -# 2720 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/secstorage.sh -# 1442 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/ilbvm.sh -# 3885 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh -# 3355 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/router.sh -# 1578 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/elbvm.sh -# 7721 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/bootstrap.sh -# 1658 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh -# 22472 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/common.sh -# 1985 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh -# 2765 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/cloud-early-config -# 1002 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/default.sh -# 2122 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/postinit.sh -# 2720 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/secstorage.sh -# 1442 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/ilbvm.sh -# 3885 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh -# 3355 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/router.sh -# 1578 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/elbvm.sh -# 7721 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/bootstrap.sh -# 1658 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh -# 22472 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/common.sh -# 1985 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh -# 2765 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/cloud-early-config -# 1002 -rwxr-xr-x cloud_scripts/opt/cloud/bin/setup/default.sh -# 8234 -rwxr-xr-x cloud_scripts/opt/cloud/bin/loadbalancer.sh -# 1717 -rwxr-xr-x cloud_scripts/opt/cloud/bin/baremetal_snat.sh -# 1469 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vpnusers.py -# 13492 -rwxr-xr-x cloud_scripts/opt/cloud/bin/merge.py -# 2040 -rwxr-xr-x cloud_scripts/opt/cloud/bin/master.py -# 1663 -rwxr-xr-x cloud_scripts/opt/cloud/bin/set_redundant.py -# 1178 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checks2svpn.sh -# 994 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py -# 952 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_staticroutes.py -# 996 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py -# 7020 -rwxr-xr-x cloud_scripts/opt/cloud/bin/passwd_server_ip.py -# 881 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_network_acl.py -# 986 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cleanup.sh -# 1016 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_loadbalancer.py -# 1849 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpc_func.sh -# 8809 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDhcp.py -# 16789 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRedundant.py -# 7644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsHelper.py -# 2545 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py -# 3681 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsMonitor.py -# 11100 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py -# 4989 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRoute.py -# 1655 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py -# 3393 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py -# 4159 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsApp.py -# 6133 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsFile.py -# 785 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/__init__.py -# 29236 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsAddress.py -# 2156 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsProcess.py -# 3179 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsConfig.py -# 4808 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDatabag.py -# 2192 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRule.py -# 8809 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDhcp.py -# 16789 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRedundant.py -# 7644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsHelper.py -# 2545 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py -# 3681 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsMonitor.py -# 11100 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py -# 4989 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRoute.py -# 1655 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py -# 3393 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py -# 4159 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsApp.py -# 6133 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsFile.py -# 785 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/__init__.py -# 29236 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsAddress.py -# 2156 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsProcess.py -# 3179 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsConfig.py -# 4808 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsDatabag.py -# 2192 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs/CsRule.py -# 4723 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vmdata.py -# 4478 -rwxr-xr-x cloud_scripts/opt/cloud/bin/get_diagnostics_files.py -# 1445 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checkrouter.sh -# 5644 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ilb.sh -# 924 -rwxr-xr-x cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh -# 1525 -rwxr-xr-x cloud_scripts/opt/cloud/bin/savepassword.sh -# 2632 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cloud-nic.sh -# 8769 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ipsectunnel.sh -# 13401 -rwxr-xr-x cloud_scripts/opt/cloud/bin/ipassoc.sh -# 7961 -rwxr-xr-x cloud_scripts/opt/cloud/bin/line_edit.py -# 1449 -rwxr-xr-x cloud_scripts/opt/cloud/bin/get_template_version.sh -# 5136 -rwxr-xr-x cloud_scripts/opt/cloud/bin/update_config.py -# 5502 -rwxr-xr-x cloud_scripts/opt/cloud/bin/edithosts.sh -# 2012 -rwxr-xr-x cloud_scripts/opt/cloud/bin/diagnostics.py -# 1541 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_monitorservice.py -# 6986 -rwxr-xr-x cloud_scripts/opt/cloud/bin/vpn_l2tp.sh -# 1401 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_guestnetwork.py -# 892 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_vmdata.py -# 4359 -rwxr-xr-x cloud_scripts/opt/cloud/bin/dnsmasq.sh -# 1533 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_dhcp.py -# 1045 -rwxr-xr-x cloud_scripts/opt/cloud/bin/cs_cmdline.py -# 1454 -rwxr-xr-x cloud_scripts/root/reconfigLB.sh -# 12747 -rwxr-xr-x cloud_scripts/root/monitorServices.py -# 3349 -rw-r--r-- cloud_scripts/root/health_checks/iptables_check.py -# 1966 -rw-r--r-- cloud_scripts/root/health_checks/memory_usage_check.py -# 5274 -rw-r--r-- cloud_scripts/root/health_checks/haproxy_check.py -# 2773 -rw-r--r-- cloud_scripts/root/health_checks/router_version_check.py -# 1865 -rw-r--r-- cloud_scripts/root/health_checks/utility/sharedFunctions.py -# 864 -rw-r--r-- cloud_scripts/root/health_checks/utility/__init__.py -# 1626 -rw-r--r-- cloud_scripts/root/health_checks/disk_space_check.py -# 1869 -rw-r--r-- cloud_scripts/root/health_checks/gateways_check.py -# 942 -rw-r--r-- cloud_scripts/root/health_checks/__init__.py -# 1972 -rw-r--r-- cloud_scripts/root/health_checks/dns_check.py -# 2078 -rw-r--r-- cloud_scripts/root/health_checks/cpu_usage_check.py -# 2386 -rwxr-xr-x cloud_scripts/root/health_checks/dhcp_check.py -# 3567 -rw-r--r-- cloud_scripts/root/func.sh -# 1461 -rwxr-xr-x cloud_scripts/root/clearUsageRules.sh -# 1454 -rwxr-xr-x cloud_scripts/root/reconfigLB.sh -# 12747 -rwxr-xr-x cloud_scripts/root/monitorServices.py -# 3349 -rw-r--r-- cloud_scripts/root/health_checks/iptables_check.py -# 1966 -rw-r--r-- cloud_scripts/root/health_checks/memory_usage_check.py -# 5274 -rw-r--r-- cloud_scripts/root/health_checks/haproxy_check.py -# 2773 -rw-r--r-- cloud_scripts/root/health_checks/router_version_check.py -# 1865 -rw-r--r-- cloud_scripts/root/health_checks/utility/sharedFunctions.py -# 864 -rw-r--r-- cloud_scripts/root/health_checks/utility/__init__.py -# 1626 -rw-r--r-- cloud_scripts/root/health_checks/disk_space_check.py -# 1869 -rw-r--r-- cloud_scripts/root/health_checks/gateways_check.py -# 942 -rw-r--r-- cloud_scripts/root/health_checks/__init__.py -# 1972 -rw-r--r-- cloud_scripts/root/health_checks/dns_check.py -# 2078 -rw-r--r-- cloud_scripts/root/health_checks/cpu_usage_check.py -# 2386 -rwxr-xr-x cloud_scripts/root/health_checks/dhcp_check.py -# 3349 -rw-r--r-- cloud_scripts/root/health_checks/iptables_check.py -# 1966 -rw-r--r-- cloud_scripts/root/health_checks/memory_usage_check.py -# 5274 -rw-r--r-- cloud_scripts/root/health_checks/haproxy_check.py -# 2773 -rw-r--r-- cloud_scripts/root/health_checks/router_version_check.py -# 1865 -rw-r--r-- cloud_scripts/root/health_checks/utility/sharedFunctions.py -# 864 -rw-r--r-- cloud_scripts/root/health_checks/utility/__init__.py -# 1865 -rw-r--r-- cloud_scripts/root/health_checks/utility/sharedFunctions.py -# 864 -rw-r--r-- cloud_scripts/root/health_checks/utility/__init__.py -# 1626 -rw-r--r-- cloud_scripts/root/health_checks/disk_space_check.py -# 1869 -rw-r--r-- cloud_scripts/root/health_checks/gateways_check.py -# 942 -rw-r--r-- cloud_scripts/root/health_checks/__init__.py -# 1972 -rw-r--r-- cloud_scripts/root/health_checks/dns_check.py -# 2078 -rw-r--r-- cloud_scripts/root/health_checks/cpu_usage_check.py -# 2386 -rwxr-xr-x cloud_scripts/root/health_checks/dhcp_check.py -# 3567 -rw-r--r-- cloud_scripts/root/func.sh -# 1461 -rwxr-xr-x cloud_scripts/root/clearUsageRules.sh -# 1425 -rw-r--r-- cloud_scripts/var/www/html/latest/.htaccess -# 17 -rw-r--r-- cloud_scripts/var/www/html/userdata/.htaccess -# 1425 -rw-r--r-- cloud_scripts/var/www/html/latest/.htaccess -# 17 -rw-r--r-- cloud_scripts/var/www/html/userdata/.htaccess -# 1425 -rw-r--r-- cloud_scripts/var/www/html/latest/.htaccess -# 17 -rw-r--r-- cloud_scripts/var/www/html/userdata/.htaccess -# 1425 -rw-r--r-- cloud_scripts/var/www/html/latest/.htaccess -# 1425 -rw-r--r-- cloud_scripts/var/www/html/latest/.htaccess -# 17 -rw-r--r-- cloud_scripts/var/www/html/userdata/.htaccess -# 17 -rw-r--r-- cloud_scripts/var/www/html/userdata/.htaccess -# 94 -rw-r--r-- cloud_scripts/etc/ipsec.conf -# 80 -rw-r--r-- cloud_scripts/etc/systemd/journald.conf -# 156 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service -# 143 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service -# 298 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud.service -# 280 -rw-r--r-- cloud_scripts/etc/systemd/system/open-vm-tools.service -# 257 -rw-r--r-- cloud_scripts/etc/systemd/system/baremetal-vr.service -# 398 -rw-r--r-- cloud_scripts/etc/systemd/system/xe-daemon.service -# 190 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service -# 348 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-early-config.service -# 244 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-password-server@.service -# 287 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-postinit.service -# 1731 -rw-r--r-- cloud_scripts/etc/iptables/rules -# 1601 -rw-r--r-- cloud_scripts/etc/iptables/iptables-consoleproxy -# 2348 -rw-r--r-- cloud_scripts/etc/iptables/iptables-router -# 1465 -rw-r--r-- cloud_scripts/etc/iptables/iptables-vpcrouter -# 2348 -rw-r--r-- cloud_scripts/etc/iptables/iptables-dhcpsrvr -# 1256 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-elbvm -# 1375 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-secstorage -# 1192 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-ilbvm -# 897 -rw-r--r-- cloud_scripts/etc/iptables/rt_tables_init -# 2049 -rw-r--r-- cloud_scripts/etc/sysctl.conf -# 139 -rw-r--r-- cloud_scripts/etc/xl2tpd/xl2tpd.conf -# 25321 -rw-r--r-- cloud_scripts/etc/dnsmasq.conf.tmpl -# 107 -rwxr-xr-x cloud_scripts/etc/cron.daily/clear_cache -# 477 -rw-r--r-- cloud_scripts/etc/vmware-tools/tools.conf -# 507 -rw-r--r-- cloud_scripts/etc/logrotate.conf -# 3603 -rw-r--r-- cloud_scripts/etc/ssh/sshd_config -# 141 -rw-r--r-- cloud_scripts/etc/ppp/options.xl2tpd -# 1234 -rw-r--r-- cloud_scripts/etc/ipsec.d/l2tp.conf -# 2298 -rw-r--r-- cloud_scripts/etc/rsyslog.conf -# 801 -rw-r--r-- cloud_scripts/etc/modprobe.d/pcspkr.conf -# 807 -rw-r--r-- cloud_scripts/etc/modprobe.d/aesni_intel.conf -# 183 -rwxr-xr-x cloud_scripts/etc/cron.hourly/clear_cache -# 54 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/security.conf -# 669 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf -# 8 -rw-r--r-- cloud_scripts/etc/apache2/httpd.conf -# 9955 -rw-r--r-- cloud_scripts/etc/apache2/vhost.template -# 17942 -rw-r--r-- cloud_scripts/etc/vpcdnsmasq.conf -# 80 -rw-r--r-- cloud_scripts/etc/ipsec.secrets -# 272 -rw-r--r-- cloud_scripts/etc/logrotate.d/dnsmasq -# 1124 -rw-r--r-- cloud_scripts/etc/logrotate.d/cloud -# 263 -rw-r--r-- cloud_scripts/etc/logrotate.d/conntrackd -# 922 -rw-r--r-- cloud_scripts/etc/logrotate.d/monitor -# 935 -rw-r--r-- cloud_scripts/etc/logrotate.d/routerServiceMonitor -# 98 -rw-r--r-- cloud_scripts/etc/logrotate.d/ppp -# 148 -rw-r--r-- cloud_scripts/etc/logrotate.d/apache2 -# 517 -rw-r--r-- cloud_scripts/etc/logrotate.d/rsyslog -# 194 -rw-r--r-- cloud_scripts/etc/logrotate.d/haproxy -# 861 -rwxr-xr-x cloud_scripts/etc/profile.d/cloud.sh -# 83 -rw-r--r-- cloud_scripts/etc/cloud-nic.rules -# 483 -rw-r--r-- cloud_scripts/etc/haproxy/haproxy.cfg -# 94 -rw-r--r-- cloud_scripts/etc/ipsec.conf -# 80 -rw-r--r-- cloud_scripts/etc/systemd/journald.conf -# 156 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service -# 143 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service -# 298 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud.service -# 280 -rw-r--r-- cloud_scripts/etc/systemd/system/open-vm-tools.service -# 257 -rw-r--r-- cloud_scripts/etc/systemd/system/baremetal-vr.service -# 398 -rw-r--r-- cloud_scripts/etc/systemd/system/xe-daemon.service -# 190 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service -# 348 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-early-config.service -# 244 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-password-server@.service -# 287 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-postinit.service -# 80 -rw-r--r-- cloud_scripts/etc/systemd/journald.conf -# 156 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service -# 143 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service -# 298 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud.service -# 280 -rw-r--r-- cloud_scripts/etc/systemd/system/open-vm-tools.service -# 257 -rw-r--r-- cloud_scripts/etc/systemd/system/baremetal-vr.service -# 398 -rw-r--r-- cloud_scripts/etc/systemd/system/xe-daemon.service -# 190 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service -# 348 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-early-config.service -# 244 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-password-server@.service -# 287 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-postinit.service -# 156 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service -# 143 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service -# 298 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud.service -# 280 -rw-r--r-- cloud_scripts/etc/systemd/system/open-vm-tools.service -# 257 -rw-r--r-- cloud_scripts/etc/systemd/system/baremetal-vr.service -# 398 -rw-r--r-- cloud_scripts/etc/systemd/system/xe-daemon.service -# 190 -rw-r--r-- cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service -# 348 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-early-config.service -# 244 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-password-server@.service -# 287 -rw-r--r-- cloud_scripts/etc/systemd/system/cloud-postinit.service -# 1731 -rw-r--r-- cloud_scripts/etc/iptables/rules -# 1601 -rw-r--r-- cloud_scripts/etc/iptables/iptables-consoleproxy -# 2348 -rw-r--r-- cloud_scripts/etc/iptables/iptables-router -# 1465 -rw-r--r-- cloud_scripts/etc/iptables/iptables-vpcrouter -# 2348 -rw-r--r-- cloud_scripts/etc/iptables/iptables-dhcpsrvr -# 1256 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-elbvm -# 1375 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-secstorage -# 1192 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-ilbvm -# 897 -rw-r--r-- cloud_scripts/etc/iptables/rt_tables_init -# 1731 -rw-r--r-- cloud_scripts/etc/iptables/rules -# 1601 -rw-r--r-- cloud_scripts/etc/iptables/iptables-consoleproxy -# 2348 -rw-r--r-- cloud_scripts/etc/iptables/iptables-router -# 1465 -rw-r--r-- cloud_scripts/etc/iptables/iptables-vpcrouter -# 2348 -rw-r--r-- cloud_scripts/etc/iptables/iptables-dhcpsrvr -# 1256 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-elbvm -# 1375 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-secstorage -# 1192 -rwxr-xr-x cloud_scripts/etc/iptables/iptables-ilbvm -# 897 -rw-r--r-- cloud_scripts/etc/iptables/rt_tables_init -# 2049 -rw-r--r-- cloud_scripts/etc/sysctl.conf -# 139 -rw-r--r-- cloud_scripts/etc/xl2tpd/xl2tpd.conf -# 139 -rw-r--r-- cloud_scripts/etc/xl2tpd/xl2tpd.conf -# 25321 -rw-r--r-- cloud_scripts/etc/dnsmasq.conf.tmpl -# 107 -rwxr-xr-x cloud_scripts/etc/cron.daily/clear_cache -# 107 -rwxr-xr-x cloud_scripts/etc/cron.daily/clear_cache -# 477 -rw-r--r-- cloud_scripts/etc/vmware-tools/tools.conf -# 477 -rw-r--r-- cloud_scripts/etc/vmware-tools/tools.conf -# 507 -rw-r--r-- cloud_scripts/etc/logrotate.conf -# 3603 -rw-r--r-- cloud_scripts/etc/ssh/sshd_config -# 3603 -rw-r--r-- cloud_scripts/etc/ssh/sshd_config -# 141 -rw-r--r-- cloud_scripts/etc/ppp/options.xl2tpd -# 141 -rw-r--r-- cloud_scripts/etc/ppp/options.xl2tpd -# 1234 -rw-r--r-- cloud_scripts/etc/ipsec.d/l2tp.conf -# 1234 -rw-r--r-- cloud_scripts/etc/ipsec.d/l2tp.conf -# 2298 -rw-r--r-- cloud_scripts/etc/rsyslog.conf -# 801 -rw-r--r-- cloud_scripts/etc/modprobe.d/pcspkr.conf -# 807 -rw-r--r-- cloud_scripts/etc/modprobe.d/aesni_intel.conf -# 801 -rw-r--r-- cloud_scripts/etc/modprobe.d/pcspkr.conf -# 807 -rw-r--r-- cloud_scripts/etc/modprobe.d/aesni_intel.conf -# 183 -rwxr-xr-x cloud_scripts/etc/cron.hourly/clear_cache -# 183 -rwxr-xr-x cloud_scripts/etc/cron.hourly/clear_cache -# 54 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/security.conf -# 669 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf -# 8 -rw-r--r-- cloud_scripts/etc/apache2/httpd.conf -# 9955 -rw-r--r-- cloud_scripts/etc/apache2/vhost.template -# 54 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/security.conf -# 669 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf -# 54 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/security.conf -# 669 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf -# 669 -rw-r--r-- cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf -# 8 -rw-r--r-- cloud_scripts/etc/apache2/httpd.conf -# 9955 -rw-r--r-- cloud_scripts/etc/apache2/vhost.template -# 17942 -rw-r--r-- cloud_scripts/etc/vpcdnsmasq.conf -# 80 -rw-r--r-- cloud_scripts/etc/ipsec.secrets -# 272 -rw-r--r-- cloud_scripts/etc/logrotate.d/dnsmasq -# 1124 -rw-r--r-- cloud_scripts/etc/logrotate.d/cloud -# 263 -rw-r--r-- cloud_scripts/etc/logrotate.d/conntrackd -# 922 -rw-r--r-- cloud_scripts/etc/logrotate.d/monitor -# 935 -rw-r--r-- cloud_scripts/etc/logrotate.d/routerServiceMonitor -# 98 -rw-r--r-- cloud_scripts/etc/logrotate.d/ppp -# 148 -rw-r--r-- cloud_scripts/etc/logrotate.d/apache2 -# 517 -rw-r--r-- cloud_scripts/etc/logrotate.d/rsyslog -# 194 -rw-r--r-- cloud_scripts/etc/logrotate.d/haproxy -# 272 -rw-r--r-- cloud_scripts/etc/logrotate.d/dnsmasq -# 1124 -rw-r--r-- cloud_scripts/etc/logrotate.d/cloud -# 263 -rw-r--r-- cloud_scripts/etc/logrotate.d/conntrackd -# 922 -rw-r--r-- cloud_scripts/etc/logrotate.d/monitor -# 935 -rw-r--r-- cloud_scripts/etc/logrotate.d/routerServiceMonitor -# 98 -rw-r--r-- cloud_scripts/etc/logrotate.d/ppp -# 148 -rw-r--r-- cloud_scripts/etc/logrotate.d/apache2 -# 517 -rw-r--r-- cloud_scripts/etc/logrotate.d/rsyslog -# 194 -rw-r--r-- cloud_scripts/etc/logrotate.d/haproxy -# 861 -rwxr-xr-x cloud_scripts/etc/profile.d/cloud.sh -# 861 -rwxr-xr-x cloud_scripts/etc/profile.d/cloud.sh -# 83 -rw-r--r-- cloud_scripts/etc/cloud-nic.rules -# 483 -rw-r--r-- cloud_scripts/etc/haproxy/haproxy.cfg -# 483 -rw-r--r-- cloud_scripts/etc/haproxy/haproxy.cfg -# 696320 -rw-r--r-- cloud_scripts/usr/share/cloud/cloud-scripts.tar -# 696320 -rw-r--r-- cloud_scripts/usr/share/cloud/cloud-scripts.tar -# 696320 -rw-r--r-- cloud_scripts/usr/share/cloud/cloud-scripts.tar -# 696320 -rw-r--r-- cloud_scripts/usr/share/cloud/cloud-scripts.tar -# -MD5SUM=${MD5SUM-md5sum} -f=`${MD5SUM} --version | egrep '^md5sum .*(core|text)utils'` -test -n "${f}" && md5check=true || md5check=false -${md5check} || \ - echo 'Note: not verifying md5sums. Consider installing GNU coreutils.' -if test "X$1" = "X-c" -then keep_file='' -else keep_file=true -fi -echo=echo -save_IFS="${IFS}" -IFS="${IFS}:" -gettext_dir= -locale_dir= -set_echo=false - -for dir in $PATH -do - if test -f $dir/gettext \ - && ($dir/gettext --version >/dev/null 2>&1) - then - case `$dir/gettext --version 2>&1 | sed 1q` in - *GNU*) gettext_dir=$dir - set_echo=true - break ;; - esac - fi -done - -if ${set_echo} -then - set_echo=false - for dir in $PATH - do - if test -f $dir/shar \ - && ($dir/shar --print-text-domain-dir >/dev/null 2>&1) - then - locale_dir=`$dir/shar --print-text-domain-dir` - set_echo=true - break - fi - done - - if ${set_echo} - then - TEXTDOMAINDIR=$locale_dir - export TEXTDOMAINDIR - TEXTDOMAIN=sharutils - export TEXTDOMAIN - echo="$gettext_dir/gettext -s" - fi -fi -IFS="$save_IFS" -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null -then if (echo -n test; echo 1,2,3) | grep n >/dev/null - then shar_n= shar_c=' -' - else shar_n=-n shar_c= ; fi -else shar_n= shar_c='\c' ; fi -f=shar-touch.$$ -st1=200112312359.59 -st2=123123592001.59 -st2tr=123123592001.5 # old SysV 14-char limit -st3=1231235901 - -if touch -am -t ${st1} ${f} >/dev/null 2>&1 && \ - test ! -f ${st1} && test -f ${f}; then - shar_touch='touch -am -t $1$2$3$4$5$6.$7 "$8"' - -elif touch -am ${st2} ${f} >/dev/null 2>&1 && \ - test ! -f ${st2} && test ! -f ${st2tr} && test -f ${f}; then - shar_touch='touch -am $3$4$5$6$1$2.$7 "$8"' - -elif touch -am ${st3} ${f} >/dev/null 2>&1 && \ - test ! -f ${st3} && test -f ${f}; then - shar_touch='touch -am $3$4$5$6$2 "$8"' - -else - shar_touch=: - echo - ${echo} 'WARNING: not restoring timestamps. Consider getting and -installing GNU '\''touch'\'', distributed in GNU coreutils...' - echo -fi -rm -f ${st1} ${st2} ${st2tr} ${st3} ${f} -# -if test ! -d ${lock_dir} ; then : -else ${echo} "lock directory ${lock_dir} exists" - exit 1 -fi -if mkdir ${lock_dir} -then ${echo} "x - created lock directory ${lock_dir}." -else ${echo} "x - failed to create lock directory ${lock_dir}." - exit 1 -fi -# ============= cloud_scripts/opt/cloud/testdata/ips0003.json ============== -if test ! -d 'cloud_scripts'; then - mkdir 'cloud_scripts' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts." -else ${echo} "x - failed to create directory cloud_scripts." - exit 1 -fi -fi -if test ! -d 'cloud_scripts/opt'; then - mkdir 'cloud_scripts/opt' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/opt." -else ${echo} "x - failed to create directory cloud_scripts/opt." - exit 1 -fi -fi -if test ! -d 'cloud_scripts/opt/cloud'; then - mkdir 'cloud_scripts/opt/cloud' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/opt/cloud." -else ${echo} "x - failed to create directory cloud_scripts/opt/cloud." - exit 1 -fi -fi -if test ! -d 'cloud_scripts/opt/cloud/testdata'; then - mkdir 'cloud_scripts/opt/cloud/testdata' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/opt/cloud/testdata." -else ${echo} "x - failed to create directory cloud_scripts/opt/cloud/testdata." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0003.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0003.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0003.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0003.json' && -{"ip_address": -[{"public_ip":"10.0.3.10", -"source_nat":true, -"add":true, -"one_to_one_nat":false, -"first_i_p":false, -"gateway":"10.0.3.1", -"netmask":"255.255.255.0", -"vif_mac_address":"06:cb:aa:00:00:03", -"nic_dev_id":2, -"new_nic":false}], -"type":"ips"} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0003.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0003.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0003.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0003.json': 'MD5 check failed' - ) << \SHAR_EOF -e8113ca4dc70734a2e07e4cd5aa817e7 cloud_scripts/opt/cloud/testdata/ips0003.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0003.json'` -ne 253 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0003.json' is not 253" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/vmp0001.json ============== -if test ! -d 'cloud_scripts/opt/cloud/testdata'; then - mkdir 'cloud_scripts/opt/cloud/testdata' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/opt/cloud/testdata." -else ${echo} "x - failed to create directory cloud_scripts/opt/cloud/testdata." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/vmp0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/vmp0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/vmp0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/testdata/vmp0001.json -M>R)I<%]A9&1R97-S(CHB,3/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/vmp0001.json': 'MD5 check failed' - ) << \SHAR_EOF -a3150c6241b311cbfc2180be23d1ddee cloud_scripts/opt/cloud/testdata/vmp0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/vmp0001.json'` -ne 77 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/vmp0001.json' is not 77" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/gn0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/gn0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/gn0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/gn0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/gn0001.json' && -{"add":true, -"mac_address":"02:00:56:36:00:02", -"device":"eth3", -"router_guest_ip":"172.16.1.1", -"router_guest_gateway":"172.16.1.0", -"router_guest_netmask":"255.255.255.0", -"cidr":"24", -"dns":"8.8.8.8,8.8.8.4", -"domain_name":"devcloud.local", -"type":"guestnetwork"} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/gn0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/gn0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/gn0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/gn0001.json': 'MD5 check failed' - ) << \SHAR_EOF -e790842388eb0a3f86ea0dbbcf4608eb cloud_scripts/opt/cloud/testdata/gn0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/gn0001.json'` -ne 267 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/gn0001.json' is not 267" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/dhcp0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/dhcp0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/dhcp0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' && -{ -X "host_name":"VM-58976c22-0832-451e-9ab2-039e9f27e415", -X "mac_address":"02:00:26:c3:00:02", -X "ipv4_address":"172.16.1.102", -X "ipv6_duid":"00:03:00:01:02:00:26:c3:00:02", -X "default_gateway":"172.16.1.1", -X "default_entry":true, -X "type":"dhcpentry" -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/dhcp0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/dhcp0001.json': 'MD5 check failed' - ) << \SHAR_EOF -0f44da4132b56f2ece9b36bab3213f28 cloud_scripts/opt/cloud/testdata/dhcp0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/dhcp0001.json'` -ne 250 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' is not 250" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/acl0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/acl0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/acl0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/acl0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/acl0001.json' && -{ -X "eth2": { -X "device": "eth2", -X "egress_rules": [ -X { -X "allowed": false, -X "cidr": "10.0.6.0/8", -X "first_port": 60, -X "last_port": 60, -X "type": "tcp" -X } -X ], -X "ingress_rules": [ -X { -X "allowed": true, -X "cidr": "10.0.1.0/8", -X "protocol": 41, -X "type": "protocol" -X }, -X { -X "allowed": true, -X "cidr": "10.0.4.0/8", -X "type": "all" -X }, -X { -X "allowed": true, -X "cidr": "10.0.3.0/8", -X "icmp_code": -1, -X "icmp_type": -1, -X "type": "icmp" -X }, -X { -X "allowed": true, -X "cidr": "10.0.2.0/8", -X "first_port": 40, -X "last_port": 40, -X "type": "udp" -X }, -X { -X "allowed": true, -X "cidr": "10.0.1.0/8", -X "first_port": 30, -X "last_port": 30, -X "type": "tcp" -X } -X ], -X "mac_address": "02:00:0d:7b:00:04", -X "nic_ip": "172.16.1.1", -X "nic_netmask": "24", -X "private_gateway_acl": false, -X "type": "networkacl" -X }, -X "id": "networkacl" -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/acl0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/acl0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/acl0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/acl0001.json': 'MD5 check failed' - ) << \SHAR_EOF -1ea2a1b5d6a98bc6c0fc2375de284b17 cloud_scripts/opt/cloud/testdata/acl0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/acl0001.json'` -ne 1405 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/acl0001.json' is not 1405" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/README ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/README' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/README (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/README (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/README' && -Json file used to test the provisioning scripts on virtual appliances -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/README' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/README' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/README failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/README': 'MD5 check failed' - ) << \SHAR_EOF -13e5ecf4d998c3df3cf53485d6f46ee1 cloud_scripts/opt/cloud/testdata/README -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/README'` -ne 70 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/README' is not 70" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/ips0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0001.json' && -{"ip_address": -[{"public_ip":"10.0.2.102", -"source_nat":true, -"add":true, -"one_to_one_nat":false, -"first_i_p":false, -"gateway":"10.0.2.1", -"netmask":"255.255.255.0", -"vif_mac_address":"06:cb:aa:00:00:03", -"nic_dev_id":1, -"new_nic":false}], -"type":"ips"} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0001.json': 'MD5 check failed' - ) << \SHAR_EOF -6f7337aaa605096eef31300afba0f4af cloud_scripts/opt/cloud/testdata/ips0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0001.json'` -ne 254 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0001.json' is not 254" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/test.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/test.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/test.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/test.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/test.sh' && -#!/bin/sh -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -cp /opt/cloud/testdata/* /etc/cloudstack -/opt/cloud/bin/update_config.py cmd_line.json -/opt/cloud/bin/update_config.py gn0001.json -/opt/cloud/bin/update_config.py ips0001.json -/opt/cloud/bin/update_config.py ips0002.json -/opt/cloud/bin/update_config.py ips0003.json -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/test.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/testdata/test.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/test.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/test.sh': 'MD5 check failed' - ) << \SHAR_EOF -7fbb72051fd8d3b66fd481aa51d3debe cloud_scripts/opt/cloud/testdata/test.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/test.sh'` -ne 1062 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/test.sh' is not 1062" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/ips0002.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0002.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0002.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0002.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0002.json' && -{"ip_address": -[{"public_ip":"10.0.2.103", -"source_nat":true, -"add":true, -"one_to_one_nat":false, -"first_i_p":false, -"gateway":"10.0.2.1", -"netmask":"255.255.255.0", -"vif_mac_address":"06:cb:aa:00:00:03", -"nic_dev_id":1, -"new_nic":false}], -"type":"ips"} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0002.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0002.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0002.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0002.json': 'MD5 check failed' - ) << \SHAR_EOF -12aec2bca1d88c499ee0af39c2e20ea1 cloud_scripts/opt/cloud/testdata/ips0002.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0002.json'` -ne 254 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0002.json' is not 254" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/s2s0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/s2s0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/s2s0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/s2s0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/s2s0001.json' && -{ -X "local_public_ip":"172.16.1.1", -X "local_guest_cidr":"172.16.1.0/24", -X "local_public_gateway":"172.16.1.1", -X "peer_gateway_ip":"10.200.200.1", -X "peer_guest_cidr_list":"10.0.0.0/24", -X "esp_policy":"3des-md5", -X "ike_policy":"3des-md5", -X "ipsec_psk":"vpnblabla", -X "ike_lifetime":86400, -X "esp_lifetime":3600, -X "create":true, -X "dpd":false, -X "passive":false, -X "type":"site2sitevpn" -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/s2s0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/s2s0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/s2s0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/s2s0001.json': 'MD5 check failed' - ) << \SHAR_EOF -ff589cb7ab7721a270f4cc703719c917 cloud_scripts/opt/cloud/testdata/s2s0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/s2s0001.json'` -ne 380 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/s2s0001.json' is not 380" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ ============== -if test ! -d 'cloud_scripts/opt/cloud/templates'; then - mkdir 'cloud_scripts/opt/cloud/templates' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/opt/cloud/templates." -else ${echo} "x - failed to create directory cloud_scripts/opt/cloud/templates." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -ip link|grep BROADCAST|grep -v eth0|grep -v eth1|cut -d ":" -f 2 > /tmp/iflist -while read i -do -X ip addr show $i|grep "inet " > /tmp/iplist_$i -X while read line -X do -X ip=`echo $line|cut -d " " -f 2|cut -d "/" -f 1` -X arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 -X arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 -X done < /tmp/iplist_$i -done < /tmp/iflist -sleep 1 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ': 'MD5 check failed' - ) << \SHAR_EOF -023d994f54c0955f160f127c1d85d6ae cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ'` -ne 1177 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' is not 1177" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/checkrouter.sh.templ ============== -if test ! -d 'cloud_scripts/opt/cloud/templates'; then - mkdir 'cloud_scripts/opt/cloud/templates' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/opt/cloud/templates." -else ${echo} "x - failed to create directory cloud_scripts/opt/cloud/templates." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/checkrouter.sh.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/checkrouter.sh.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -STATUS=UNKNOWN -INTERFACE=eth1 -ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g') -if [ $ROUTER_TYPE = "router" ] -then -X ROUTER_STATE=$(ip addr | grep eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi') -X STATUS=$ROUTER_STATE -else -X ROUTER_STATE=$(ip addr | grep $INTERFACE | grep state | awk '{print $9;}') -X if [ $ROUTER_STATE = "UP" ] -X then -X STATUS=MASTER -X elif [ $ROUTER_STATE = "DOWN" ] -X then -X STATUS=BACKUP -X fi -fi -X -echo "Status: ${STATUS}" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/checkrouter.sh.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ': 'MD5 check failed' - ) << \SHAR_EOF -bbd331057760019d05ead01eec5e42aa cloud_scripts/opt/cloud/templates/checkrouter.sh.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ'` -ne 1357 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' is not 1357" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/heartbeat.sh.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/heartbeat.sh.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/heartbeat.sh.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -t=$(date +%s) -echo $t > /ramdisk/rrouter/keepalived.ts -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/heartbeat.sh.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ': 'MD5 check failed' - ) << \SHAR_EOF -c006a52c775a0418870c0c50f0131ee7 cloud_scripts/opt/cloud/templates/heartbeat.sh.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ'` -ne 853 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' is not 853" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/conntrackd.conf.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/conntrackd.conf.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/conntrackd.conf.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# Synchronizer settings -# -Sync { -X Mode FTFW { -X # -X # Size of the resend queue (in objects). This is the maximum -X # number of objects that can be stored waiting to be confirmed -X # via acknoledgment. If you keep this value low, the daemon -X # will have less chances to recover state-changes under message -X # omission. On the other hand, if you keep this value high, -X # the daemon will consume more memory to store dead objects. -X # Default is 131072 objects. -X # -X # ResendQueueSize 131072 -X -X # -X # This parameter allows you to set an initial fixed timeout -X # for the committed entries when this node goes from backup -X # to primary. This mechanism provides a way to purge entries -X # that were not recovered appropriately after the specified -X # fixed timeout. If you set a low value, TCP entries in -X # Established states with no traffic may hang. For example, -X # an SSH connection without KeepAlive enabled. If not set, -X # the daemon uses an approximate timeout value calculation -X # mechanism. By default, this option is not set. -X # -X # CommitTimeout 180 -X -X # -X # If the firewall replica goes from primary to backup, -X # the conntrackd -t command is invoked in the script. -X # This command schedules a flush of the table in N seconds. -X # This is useful to purge the connection tracking table of -X # zombie entries and avoid clashes with old entries if you -X # trigger several consecutive hand-overs. Default is 60 seconds. -X # -X # PurgeTimeout 60 -X -X # Set the acknowledgement window size. If you decrease this -X # value, the number of acknowlegdments increases. More -X # acknowledgments means more overhead as conntrackd has to -X # handle more control messages. On the other hand, if you -X # increase this value, the resend queue gets more populated. -X # This results in more overhead in the queue releasing. -X # The following value is based on some practical experiments -X # measuring the cycles spent by the acknowledgment handling -X # with oprofile. If not set, default window size is 300. -X # -X # ACKWindowSize 300 -X -X # -X # This clause allows you to disable the external cache. Thus, -X # the state entries are directly injected into the kernel -X # conntrack table. As a result, you save memory in user-space -X # but you consume slots in the kernel conntrack table for -X # backup state entries. Moreover, disabling the external cache -X # means more CPU consumption. You need a Linux kernel -X # >= 2.6.29 to use this feature. By default, this clause is -X # set off. If you are installing conntrackd for first time, -X # please read the user manual and I encourage you to consider -X # using the fail-over scripts instead of enabling this option! -X # -X # DisableExternalCache Off -X } -X -X # -X # Multicast IP and interface where messages are -X # broadcasted (dedicated link). IMPORTANT: Make sure -X # that iptables accepts traffic for destination -X # 225.0.0.50, eg: -X # -X # iptables -I INPUT -d 225.0.0.50 -j ACCEPT -X # iptables -I OUTPUT -d 225.0.0.50 -j ACCEPT -X # -X Multicast { -X # -X # Multicast address: The address that you use as destination -X # in the synchronization messages. You do not have to add -X # this IP to any of your existing interfaces. If any doubt, -X # do not modify this value. -X # -X IPv4_address 225.0.0.50 -X -X # -X # The multicast group that identifies the cluster. If any -X # doubt, do not modify this value. -X # -X Group 3780 -X -X # -X # IP address of the interface that you are going to use to -X # send the synchronization messages. Remember that you must -X # use a dedicated link for the synchronization messages. -X # -X IPv4_interface [LINK_IP] -X -X # -X # The name of the interface that you are going to use to -X # send the synchronization messages. -X # -X Interface [LINK_IF] -X -X # The multicast sender uses a buffer to enqueue the packets -X # that are going to be transmitted. The default size of this -X # socket buffer is available at /proc/sys/net/core/wmem_default. -X # This value determines the chances to have an overrun in the -X # sender queue. The overrun results packet loss, thus, losing -X # state information that would have to be retransmitted. If you -X # notice some packet loss, you may want to increase the size -X # of the sender buffer. The default size is usually around -X # ~100 KBytes which is fairly small for busy firewalls. -X # -X SndSocketBuffer 1249280 -X -X # The multicast receiver uses a buffer to enqueue the packets -X # that the socket is pending to handle. The default size of this -X # socket buffer is available at /proc/sys/net/core/rmem_default. -X # This value determines the chances to have an overrun in the -X # receiver queue. The overrun results packet loss, thus, losing -X # state information that would have to be retransmitted. If you -X # notice some packet loss, you may want to increase the size of -X # the receiver buffer. The default size is usually around -X # ~100 KBytes which is fairly small for busy firewalls. -X # -X RcvSocketBuffer 1249280 -X -X # -X # Enable/Disable message checksumming. This is a good -X # property to achieve fault-tolerance. In case of doubt, do -X # not modify this value. -X # -X Checksum on -X } -X # -X # You can specify more than one dedicated link. Thus, if one dedicated -X # link fails, conntrackd can fail-over to another. Note that adding -X # more than one dedicated link does not mean that state-updates will -X # be sent to all of them. There is only one active dedicated link at -X # a given moment. The `Default' keyword indicates that this interface -X # will be selected as the initial dedicated link. You can have -X # up to 4 redundant dedicated links. Note: Use different multicast -X # groups for every redundant link. -X # -X # Multicast Default { -X # IPv4_address 225.0.0.51 -X # Group 3781 -X # IPv4_interface 192.168.100.101 -X # Interface eth3 -X # # SndSocketBuffer 1249280 -X # # RcvSocketBuffer 1249280 -X # Checksum on -X # } -X -X # -X # You can use Unicast UDP instead of Multicast to propagate events. -X # Note that you cannot use unicast UDP and Multicast at the same -X # time, you can only select one. -X # -X # UDP { -X # -X # UDP address that this firewall uses to listen to events. -X # -X # IPv4_address 192.168.2.100 -X # -X # or you may want to use an IPv6 address: -X # -X # IPv6_address fe80::215:58ff:fe28:5a27 -X -X # -X # Destination UDP address that receives events, ie. the other -X # firewall's dedicated link address. -X # -X # IPv4_Destination_Address 192.168.2.101 -X # -X # or you may want to use an IPv6 address: -X # -X # IPv6_Destination_Address fe80::2d0:59ff:fe2a:775c -X -X # -X # UDP port used -X # -X # Port 3780 -X -X # -X # The name of the interface that you are going to use to -X # send the synchronization messages. -X # -X # Interface eth2 -X -X # -X # The sender socket buffer size -X # -X # SndSocketBuffer 1249280 -X -X # -X # The receiver socket buffer size -X # -X # RcvSocketBuffer 1249280 -X -X # -X # Enable/Disable message checksumming. -X # -X # Checksum on -X # } -X -} -X -# -# General settings -# -General { -X # -X # Set the nice value of the daemon, this value goes from -20 -X # (most favorable scheduling) to 19 (least favorable). Using a -X # very low value reduces the chances to lose state-change events. -X # Default is 0 but this example file sets it to most favourable -X # scheduling as this is generally a good idea. See man nice(1) for -X # more information. -X # -X Nice -20 -X -X # -X # Select a different scheduler for the daemon, you can select between -X # RR and FIFO and the process priority (minimum is 0, maximum is 99). -X # See man sched_setscheduler(2) for more information. Using a RT -X # scheduler reduces the chances to overrun the Netlink buffer. -X # -X # Scheduler { -X # Type FIFO -X # Priority 99 -X # } -X -X # -X # Number of buckets in the cache hashtable. The bigger it is, -X # the closer it gets to O(1) at the cost of consuming more memory. -X # Read some documents about tuning hashtables for further reference. -X # -X HashSize 32768 -X -X # -X # Maximum number of conntracks, it should be double of: -X # $ cat /proc/sys/net/netfilter/nf_conntrack_max -X # since the daemon may keep some dead entries cached for possible -X # retransmission during state synchronization. -X # -X HashLimit 131072 -X -X LogFile on -X -X # -X # Syslog: on, off or a facility name (daemon (default) or local0..7) -X # Default: off -X # -X Syslog on -X -X # -X # Lockfile -X # -X LockFile /var/lock/conntrackd.lock -X -X # -X # Unix socket configuration -X # -X UNIX { -X Path /var/run/conntrackd.sock -X Backlog 20 -X } -X -X SocketBufferSize 2097152 -X SocketBufferSizeMaxGrown 8388608 -X -X # -X # Netlink event socket buffer size. If you do not specify this clause, -X # the default buffer size value in /proc/net/core/rmem_default is -X # used. This default value is usually around 100 Kbytes which is -X # fairly small for busy firewalls. This leads to event message dropping -X # and high CPU consumption. This example configuration file sets the -X # size to 2 MBytes to avoid this sort of problems. -X # -X NetlinkBufferSize 2097152 -X -X # -X # The daemon doubles the size of the netlink event socket buffer size -X # if it detects netlink event message dropping. This clause sets the -X # maximum buffer size growth that can be reached. This example file -X # sets the size to 8 MBytes. -X # -X NetlinkBufferSizeMaxGrowth 8388608 -X -X # -X # If the daemon detects that Netlink is dropping state-change events, -X # it automatically schedules a resynchronization against the Kernel -X # after 30 seconds (default value). Resynchronizations are expensive -X # in terms of CPU consumption since the daemon has to get the full -X # kernel state-table and purge state-entries that do not exist anymore. -X # Be careful of setting a very small value here. You have the following -X # choices: On (enabled, use default 30 seconds value), Off (disabled) -X # or Value (in seconds, to set a specific amount of time). If not -X # specified, the daemon assumes that this option is enabled. -X # -X # NetlinkOverrunResync On -X -X # -X # If you want reliable event reporting over Netlink, set on this -X # option. If you set on this clause, it is a good idea to set off -X # NetlinkOverrunResync. This option is off by default and you need -X # a Linux kernel >= 2.6.31. -X # -X # NetlinkEventsReliable Off -X -X # -X # By default, the daemon receives state updates following an -X # event-driven model. You can modify this behaviour by switching to -X # polling mode with the PollSecs clause. This clause tells conntrackd -X # to dump the states in the kernel every N seconds. With regards to -X # synchronization mode, the polling mode can only guarantee that -X # long-lifetime states are recovered. The main advantage of this method -X # is the reduction in the state replication at the cost of reducing the -X # chances of recovering connections. -X # -X # PollSecs 15 -X -X # -X # The daemon prioritizes the handling of state-change events coming -X # from the core. With this clause, you can set the maximum number of -X # state-change events (those coming from kernel-space) that the daemon -X # will handle after which it will handle other events coming from the -X # network or userspace. A low value improves interactivity (in terms of -X # real-time behaviour) at the cost of extra CPU consumption. -X # Default (if not set) is 100. -X # -X # EventIterationLimit 100 -X -X # -X # Event filtering: This clause allows you to filter certain traffic, -X # There are currently three filter-sets: Protocol, Address and -X # State. The filter is attached to an action that can be: Accept or -X # Ignore. Thus, you can define the event filtering policy of the -X # filter-sets in positive or negative logic depending on your needs. -X # You can select if conntrackd filters the event messages from -X # user-space or kernel-space. The kernel-space event filtering -X # saves some CPU cycles by avoiding the copy of the event message -X # from kernel-space to user-space. The kernel-space event filtering -X # is prefered, however, you require a Linux kernel >= 2.6.29 to -X # filter from kernel-space. If you want to select kernel-space -X # event filtering, use the keyword 'Kernelspace' instead of -X # 'Userspace'. -X # -X Filter From Userspace { -X # -X # Accept only certain protocols: You may want to replicate -X # the state of flows depending on their layer 4 protocol. -X # -X Protocol Accept { -X TCP -X SCTP -X DCCP -X UDP -X ICMP # This requires a Linux kernel >= 2.6.31 -X } -X -X # -X # Ignore traffic for a certain set of IP's: Usually all the -X # IP assigned to the firewall since local traffic must be -X # ignored, only forwarded connections are worth to replicate. -X # Note that these values depends on the local IPs that are -X # assigned to the firewall. -X # -X Address Ignore { -X IPv4_address 127.0.0.1 # loopback -X IPv4_address [IGNORE_IP1] -X IPv4_address [IGNORE_IP2] -X IPv4_address [IGNORE_IP3] -X #IPv4_address 192.168.0.100 # virtual IP 1 -X #IPv4_address 192.168.1.100 # virtual IP 2 -X #IPv4_address 192.168.0.1 -X #IPv4_address 192.168.1.1 -X #IPv4_address 192.168.100.100 # dedicated link ip -X # -X # You can also specify networks in format IP/cidr. -X # IPv4_address 192.168.0.0/24 -X # -X # You can also specify an IPv6 address -X # IPv6_address ::1 -X } -X -X # -X # Uncomment this line below if you want to filter by flow state. -X # This option introduces a trade-off in the replication: it -X # reduces CPU consumption at the cost of having lazy backup -X # firewall replicas. The existing TCP states are: SYN_SENT, -X # SYN_RECV, ESTABLISHED, FIN_WAIT, CLOSE_WAIT, LAST_ACK, -X # TIME_WAIT, CLOSED, LISTEN. -X # -X # State Accept { -X # ESTABLISHED CLOSED TIME_WAIT CLOSE_WAIT for TCP -X # } -X } -X -X # default debian service unit file is of Type=notify -X Systemd on -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/conntrackd.conf.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ': 'MD5 check failed' - ) << \SHAR_EOF -13781a8581b74b0cf402c01264bdca48 cloud_scripts/opt/cloud/templates/conntrackd.conf.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ'` -ne 15888 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' is not 15888" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -ROUTER_BIN_PATH="/ramdisk/rrouter" -ROUTER_LOG="${ROUTER_BIN_PATH}/keepalived.log" -STRIKE_FILE="$ROUTER_BIN_PATH/keepalived.strikes" -TS_FILE="$ROUTER_BIN_PATH/keepalived.ts" -CT_FILE="$ROUTER_BIN_PATH/keepalived.ct" -X -checktime=$(date +%s) -hbtime=$(cat $TS_FILE) -diff=$(($checktime - $hbtime)) -X -lastcheck=0 -if [ -e $CT_FILE ] -then -X lastcheck=$(cat $CT_FILE 2>/dev/null) -fi -checkdiff=$(($checktime - $lastcheck)) -if [ $checkdiff -ge 0 ] && [ $checkdiff -lt 30 ] -then -X exit -fi -echo $checktime > $CT_FILE -X -s=0 -if [ $diff -gt 10 ] -then -X if [ -e $STRIKE_FILE ] -X then -X s=$(cat $STRIKE_FILE 2>/dev/null) -X fi -X s=$(($s+1)) -X echo $s > $STRIKE_FILE -X echo "Check time: $checktime, last heartbeat time: $hbtime, time diff: $diff, strike count: $s" >> $ROUTER_LOG -else -X rm -f $STRIKE_FILE -fi -X -if [ $s -gt 3 ] -then -X systemctl stop --now keepalived >> $ROUTER_LOG 2>&1 -X systemctl stop --now conntrackd >> $ROUTER_LOG 2>&1 -X -X #Set fault so we have the same effect as a KeepaliveD fault. -X python /opt/cloud/bin/master.py --fault -X -X pkill -9 keepalived >> $ROUTER_LOG 2>&1 || true -X pkill -9 conntrackd >> $ROUTER_LOG 2>&1 || true -X echo Status: FAULT \(keepalived process is dead\) >> $ROUTER_LOG -X exit -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ': 'MD5 check failed' - ) << \SHAR_EOF -7040d7485f89a97be367132d28af1267 cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ'` -ne 2037 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' is not 2037" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/check_bumpup.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/check_bumpup.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/check_bumpup.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -cat /tmp/rrouter_bumped -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/check_bumpup.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/check_bumpup.sh': 'MD5 check failed' - ) << \SHAR_EOF -ab6cbce5de505d137d05bcae1af8e18a cloud_scripts/opt/cloud/templates/check_bumpup.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/check_bumpup.sh'` -ne 822 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' is not 822" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/keepalived.conf.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/keepalived.conf.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/keepalived.conf.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' && -! Licensed to the Apache Software Foundation (ASF) under one -! or more contributor license agreements. See the NOTICE file -! distributed with this work for additional information -! regarding copyright ownership. The ASF licenses this file -! to you under the Apache License, Version 2.0 (the -! "License"); you may not use this file except in compliance -! with the License. You may obtain a copy of the License at -! -! http://www.apache.org/licenses/LICENSE-2.0 -! -! Unless required by applicable law or agreed to in writing, -! software distributed under the License is distributed on an -! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -! KIND, either express or implied. See the License for the -! specific language governing permissions and limitations -! under the License. -X -global_defs { -X router_id [ROUTER_ID] -} -X -vrrp_script heartbeat { -X script "[RROUTER_BIN_PATH]/heartbeat.sh" -X interval 5 -} -X -vrrp_instance inside_network { -X state BACKUP -X interface eth2 -X virtual_router_id 51 -X nopreempt -X -X advert_int 1 -X -X #use_vmac -X #vmac_xmit_base -X -X authentication { -X auth_type AH -X auth_pass PASS -X } -X -X virtual_ipaddress { -X [ROUTER_IP] brd [BOARDCAST] dev eth2 -X } -X -X track_script { -X heartbeat -X } -X -X notify_backup "/opt/cloud/bin/master.py --backup" -X notify_master "/opt/cloud/bin/master.py --master" -X notify_fault "/opt/cloud/bin/master.py --fault" -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/keepalived.conf.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ': 'MD5 check failed' - ) << \SHAR_EOF -464642e87bbb032071111b84f82ba135 cloud_scripts/opt/cloud/templates/keepalived.conf.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ'` -ne 1429 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' is not 1429" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/prepare_pxe.sh ============== -if test ! -d 'cloud_scripts/opt/cloud/bin'; then - mkdir 'cloud_scripts/opt/cloud/bin' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/opt/cloud/bin." -else ${echo} "x - failed to create directory cloud_scripts/opt/cloud/bin." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/prepare_pxe.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/prepare_pxe.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' && -#!/bin/sh -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# # regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -X -set +u -X -err_exit() { -X echo $1 -X exit 1 -} -X -success() { -X exit 0 -} -X -TFTP_ROOT='/opt/tftpboot' -PXELINUX_CFG_DIR='/opt/tftpboot/pxelinux.cfg' -X -kernel_nfs_path=$1 -kernel_file_name=`basename $kernel_nfs_path` -initrd_nfs_path=$2 -initrd_file_name=`basename $initrd_nfs_path` -tmpt_uuid=$3 -pxe_cfg_filename=$4 -ks_file=$5 -X -kernel_path=$tmpt_uuid/$kernel_file_name -initrd_path=$tmpt_uuid/$initrd_file_name -X -cat > $PXELINUX_CFG_DIR/$pxe_cfg_filename </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh': 'MD5 check failed' - ) << \SHAR_EOF -8b495c4ea50905f4197974ee82e607ba cloud_scripts/opt/cloud/bin/prepare_pxe.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh'` -ne 1792 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' is not 1792" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_forwardingrules.py ============== -if test ! -d 'cloud_scripts/opt/cloud/bin'; then - mkdir 'cloud_scripts/opt/cloud/bin' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/opt/cloud/bin." -else ${echo} "x - failed to create directory cloud_scripts/opt/cloud/bin." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_forwardingrules.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_forwardingrules.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, rules): -X for rule in rules["rules"]: -X source_ip = rule["source_ip_address"] -X destination_ip = rule["destination_ip_address"] -X revoke = rule["revoke"] -X -X newrule = dict() -X newrule["public_ip"] = source_ip -X newrule["internal_ip"] = destination_ip -X -X if rules["type"] == "staticnatrules": -X newrule["type"] = "staticnat" -X elif rules["type"] == "forwardrules": -X newrule["type"] = "forward" -X newrule["public_ports"] = rule["source_port_range"] -X newrule["internal_ports"] = rule["destination_port_range"] -X newrule["protocol"] = rule["protocol"] -X -X if not revoke: -X if rules["type"] == "staticnatrules": -X dbag[source_ip] = [newrule] -X elif rules["type"] == "forwardrules": -X index = -1 -X if source_ip in dbag.keys(): -X for forward in dbag[source_ip]: -X if ruleCompare(forward, newrule): -X index = dbag[source_ip].index(forward) -X if not index == -1: -X dbag[source_ip][index] = newrule -X else: -X dbag[source_ip].append(newrule) -X else: -X dbag[source_ip] = [newrule] -X else: -X if rules["type"] == "staticnatrules": -X if source_ip in dbag.keys(): -X del dbag[source_ip] -X elif rules["type"] == "forwardrules": -X if source_ip in dbag.keys(): -X index = -1 -X for forward in dbag[source_ip]: -X if ruleCompare(forward, newrule): -X index = dbag[source_ip].index(forward) -X print "removing index %s" % str(index) -X if not index == -1: -X del dbag[source_ip][index] -X -X return dbag -X -X -# Compare function checks only the public side, those must be equal the internal details could change -def ruleCompare(ruleA, ruleB): -X if not ruleA["type"] == ruleB["type"]: -X return False -X if ruleA["type"] == "staticnat": -X return ruleA["public_ip"] == ruleB["public_ip"] -X elif ruleA["type"] == "forward": -X return ruleA["public_ip"] == ruleB["public_ip"] and ruleA["public_ports"] == ruleB["public_ports"] \ -X and ruleA["protocol"] == ruleB["protocol"] -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_forwardingrules.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py': 'MD5 check failed' - ) << \SHAR_EOF -278288da98263d674e9d0d0aecaca56d cloud_scripts/opt/cloud/bin/cs_forwardingrules.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py'` -ne 3239 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' is not 3239" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpc_netusage.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_netusage.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_netusage.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -source /root/func.sh -source /opt/cloud/bin/vpc_func.sh -X -vpnoutmark="0x525" -vpninmark="0x524" -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s -[c|g|r|n|d] [-l ] [-v ] \n" $(basename $0) >&2 -} -X -create_usage_rules () { -X iptables-save|grep "NETWORK_STATS_$ethDev" > /dev/null -X if [ $? -gt 0 ] -X then -X iptables -N NETWORK_STATS_$ethDev > /dev/null; -X iptables -I FORWARD -j NETWORK_STATS_$ethDev > /dev/null; -X iptables -A NETWORK_STATS_$ethDev -o $ethDev -s $vcidr > /dev/null; -X iptables -A NETWORK_STATS_$ethDev -i $ethDev -d $vcidr > /dev/null; -X fi -X return $? -} -X -create_vpn_usage_rules () { -X iptables-save|grep "VPN_STATS_$ethDev" > /dev/null -X if [ $? -gt 0 ] -X then -X iptables -t mangle -N VPN_STATS_$ethDev > /dev/null; -X iptables -t mangle -I FORWARD -j VPN_STATS_$ethDev > /dev/null; -X iptables -t mangle -A VPN_STATS_$ethDev -o $ethDev -m mark --mark $vpnoutmark > /dev/null; -X iptables -t mangle -A VPN_STATS_$ethDev -i $ethDev -m mark --mark $vpninmark > /dev/null; -X fi -X return $? -} -X -remove_usage_rules () { -X return 0 -} -X -get_usage () { -X iptables -L NETWORK_STATS_$ethDev -n -v -x 2> /dev/null | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null -X return 0 -} -X -get_vpn_usage () { -X iptables -t mangle -L VPN_STATS_$ethDev -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null -X if [ $? -gt 0 ] -X then -X printf $? -X return 1 -X fi -} -X -reset_usage () { -X iptables -Z NETWORK_STATS_$ethDev > /dev/null -X if [ $? -gt 0 -a $? -ne 2 ] -X then -X return 1 -X fi -} -X -#set -x -X -cflag= -gflag= -rflag= -lflag= -vflag= -nflag= -dflag= -X -while getopts 'cgndrl:v:' OPTION -do -X case $OPTION in -X c) cflag=1 -X ;; -X g) gflag=1 -X ;; -X r) rflag=1 -X ;; -X l) lflag=1 -X publicIp="$OPTARG" -X ;; -X v) vflag=1 -X vcidr="$OPTARG" -X ;; -X n) nflag=1 -X ;; -X d) dflag=1 -X ;; -X i) #Do nothing, since it's parameter for host script -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -ethDev=$(getEthByIp $publicIp) -if [ "$cflag" == "1" ] -then -X if [ "$ethDev" != "" ] -X then -X create_usage_rules -X create_vpn_usage_rules -X unlock_exit 0 $lock $locked -X fi -fi -X -if [ "$gflag" == "1" ] -then -X get_usage -X unlock_exit $? $lock $locked -fi -X -if [ "$nflag" == "1" ] -then -X #get_vpn_usage -X unlock_exit $? $lock $locked -fi -X -if [ "$dflag" == "1" ] -then -X #remove_usage_rules -X unlock_exit 0 $lock $locked -fi -X -if [ "$rflag" == "1" ] -then -X reset_usage -X unlock_exit $? $lock $locked -fi -X -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_netusage.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh': 'MD5 check failed' - ) << \SHAR_EOF -f3f8069de696e92a24cbc694275c0bd5 cloud_scripts/opt/cloud/bin/vpc_netusage.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh'` -ne 3377 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' is not 3377" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/configure.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/configure.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/configure.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/configure.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/configure.py -M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&-E<'0@24]%2@I"B`@("`@("`@ -M("`@("`@("`@("`@9W5E22R)$;VU57U)E<75E&-E<'0@17AC97!T:6]N(&%S -M(&4Z"B`@("`@("`@("`@("`@("`@("`@;&]G9VEN9RYE7!E)UT@/3T@)V%L;"<@86YD(&]B -M:ELG7!E(#T@(F%N>2(*("`@("`@("`@("`@:68@ -M(FEC;7!?='EP92(@:6X@7,H*2!A;F0@7!E)UT*("`@("`@("`@("`@:68@(FEC -M;7!?8V]D92(@:6X@7,H*2!A;F0@7!E)UTL('-E;&8N7!E("5S("UJ("5S(B`E("AI8VUP7W1Y<&4L('-E;&8N&5C=71E*&1S=$EP2==.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U -M;&5;)V%C=&EO;B==(#T@(D%#0T505"(*("`@("`@("`@("`@("`@("`@("!E -M;'-E.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5;)V%C=&EO -M;B==(#T@(D123U`B"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@ -M("`@("`@("`@(",@1F]R(&]T:&5R(')U;&5S(&%D9&5D+"!I9B!D969A=6QT -M7V5G7!E("5S(B`E(&EC;7!?='EP90H@("`@("`@("`@ -M("`@("`@96QI9B!R=6QE6R=P7!E+B!3;RP@:71S(&9W(&%T=')I8G5T92!I7!E -M(#T@(F%N>2(*("`@("`@("`@("`@("`@('-E;&8N<')O=&]C;VP@/2!S96QF -M+G1Y<&4*("`@("`@("`@("`@("`@(&EF(")I8VUP7W1Y<&4B(&EN(')U;&4N -M:V5Y7!E+"!R=6QE6R=I8VUP7V-O9&4G72D*("`@("`@("`@("`@("`@(&EF('-E -M;&8N='EP92`]/2`B<')O=&]C;VPB.@H@("`@("`@("`@("`@("`@("`@(&EF -M(')U;&5;)W!R;W1O8V]L)UT@/3T@-#$Z"B`@("`@("`@("`@("`@("`@("`@ -M("`@(')U;&5;)W!R;W1O8V]L)UT@/2`B:7!V-B(*("`@("`@("`@("`@("`@ -M("`@("!S96QF+G!R;W1O8V]L(#T@&5C=71E*")I -M<'1A8FQE+4$O:7!T86)L97,@+70@9FEL=&5R("U$+V&5C=71E -M*")I<'-E="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\ -M(&EP&5C=71E*")I<'-E -M="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP2!V86QI9"!D871A"B`@("`@("`@("`@("`@("!I9B!F;VQD97(@(3T@(G5S -M97)D871A(B!A;F0@9F]L9&5R("$](")M971A9&%T82(Z"B`@("`@("`@("`@ -M("`@("`@("`@8V]N=&EN=64*"B`@("`@("`@("`@("`@("!I9B!F:6QE(#T] -M("(B.@H@("`@("`@("`@("`@("`@("`@(&-O;G1I;G5E"@H@("`@("`@("`@ -M("`@("`@7,N97AI="@Q*0H@("`@("`@("`@("!I9B!O2Q!;&QO=UQN1&5N>2!F2!E>&ES=',L('=E(&1O(&ET('1H -M:7,@=V%Y(&9O7,N97AI -M="@Q*0H*("`@("`@("!F:"`](&]P96XH:'1A8V-E2`] -M(")297=R:71E4G5L92!>;65T82UD871A+R@N*RDD("`N+B\B("L@9F]L9&5R -M("L@(B\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%=(@H@("`@("`@("`@ -M("!H=&%C8V5S7,N97AI="@Q -M*2`@(R!&25A-10H@("`@("`@(')E='5R;B!4&ET*#$I("`C($9)6$U%"B`@("`@("`@:7!S96,N=G!N+2@N*BDN8V]N9B(L(&9I;&4I"B`@ -M("`@("`@("`@(&EF(&TZ"B`@("`@("`@("`@("`@("!S96QF+F-O;F9I<',N -M87!P96YD*&TN9W)O=7`H,2DI"@H@("`@("`@(&9O&5C=71E*")I -M<'-E8R!R96QO860B*0H*("`@(&1E9B!C;VYF:6=U#4R-2`M:B!!0T-%4%0B("4@9&5V72D* -M("`@("`@("!F;W(@;F5T(&EN(&]B:ELG<&5E&UA&UA5]I<"=="B`@("`@("`@<&5E7!E/71U;FYE;"(I -M"B`@("`@("`@9FEL92YA9&1E<2@B(&%U=&AB>3US96-R970B*0H@("`@("`@ -M(&9I;&4N861D97$H(B!K97EE>&-H86YG93UI:V4B*0H@("`@("`@(&9I;&4N -M861D97$H(B!I:V4])7,B("4@:6ME<&]L:6-Y*0H@("`@("`@(&9I;&4N861D -M97$H(B!I:V5L:69E=&EM93TE3TS,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1T:6UE;W5T -M/3$R,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1A8W1I;VX]')A;F=E*#,I.@H@("`@("`@("`@ -M("!R97-U;'0@/2!#&5C=71E*"=I<'-E8R!S=&%T=7,@=G!N -M+25S('P@9W)E<"`B)7,B)R`E("AR:6=H='!E97(L('!E97)L:7-T+G-P;&ET -M*"(L(BP@,2E;,%TI*0H@("`@("`@("`@("!I9B!L96XH2P@)R,G*0H@("`@("`@(&EF(&YO="!U&5C=71E*")T9&)D=6UP("]V87(O&5C=71E*"=K:6QL("TY("5S)R`E('!I9"D*"@IC;&%S -M&5C=71E*")S>7-T96UC=&P@2YS96-R971S(B`E("AS96QF+E903D-/3D9$25(I"B`@ -M("`@("`@>&PR='!D8V]N9F9I;&4@/2`B+V5T8R]X;#)T<&0O>&PR='!D+F-O -M;F8B"B`@("`@("`@>&PR='!O<'1I;VYS9FEL92`]("(O971C+W!P<"]O<'1I -M;VYS+GAL,G1P9"(*"B`@("`@("`@;&]C86QI<"`](&]B:ELG;&]C86Q?:7`G -M70H@("`@("`@(&QO8V%L8VED2`Z(%!32R!<(B5S7"(B("4@*&QE9G0L('!S:RDI"B`@ -M("`@("`@&PR='!D8V]N9F9I;&4I"B`@("`@("`@>&PR='!D8V]N9BYA9&1E -M<2@B:7`@&PR='!O<'1I;VYS+F-O;6UI="@I"@H@("`@9&5F(')E;6]T96%C8V5S -M2@I"B`@("`@("`@4EP -M*')U;&5;)W!U8FQI8U]I<"==*0H@("`@("`@(&EN=&5R;F%L7V9W:6YT97)F -M86-E(#T@4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI -M"B`@("`@("`@<'5B;&EC7V9W<&]R=',@/2!S96QF+G!O4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI -M+`H@("`@("`@("`@("`@("`@&UA2(Z"B`@("`@("`@("`@(&9W7W!R97)O=71? -M2(Z"B`@("`@ -M("`@("`@(&9W7W!O2(Z"B`@("`@("`@ -M("`@(&9W7W!O2(Z"B`@("`@ -M("`@("`@(&9W7V]U='!U=%]R=6QE("L]("(@+2UD<&]R="`E2(Z"B`@("`@("`@("`@ -M(&9W7V]U='!U=%]R=6QE("L]("(Z(B`K('-E;&8N<&]R='-4;U-T4EP*')U;&5;)VEN=&5R;F%L7VEP -M)UTI+`H@("`@("`@("`@("`@("`@&9F9F9F9F9F -M("TM8W1M87-K(#!X9F9F9F9F9F8B("4*("`@("`@("`@("`@("`@("`@("`@ -M("`@4EP*')U;&5;(FEN=&5R;F%L -M7VEP(ETI+"!S96QF+F=E=$=U97-T27`H*2E=*0H*"F-L87-S($EP5&%B;&5S -M17AE8W5T;W(Z"@H@("`@8V]N9FEG(#T@3F]N90H*("`@(&1E9B!?7VEN:71? -M7RAS96QF+"!C;VYF:62!PR)P&5C=71OR)P&5C=71OR)P&5C=71O7!E.B`E&5C27!T86)L97,H8V]N9FEG -M*3H*("`@("`@("!L;V=G:6YG+F1E8G5G*")0&5C=71O7,H*3H*("`@("`@("`@ -M("`@97AE8T1A=&%B86&5C -M27!T86)L97,H8V]N9FEG*0H@("`@96QI9B!J&5C27!T86)L -M97,H8V]N9FEG*0H@("`@96QS93H*("`@("`@("!L;V=G:6YG+G=A7!E/25S(B`E("AP/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/configure.py': 'MD5 check failed' - ) << \SHAR_EOF -8987217852a386250687dfce6d0b10be cloud_scripts/opt/cloud/bin/configure.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/configure.py'` -ne 45920 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/configure.py' is not 45920" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_vmp.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vmp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vmp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vmp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_vmp.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=WWT*("`@(')C6R=I9"==(#T@)W9M<&%S/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vmp.py': 'MD5 check failed' - ) << \SHAR_EOF -3e1ea6831cb27eedc825e25bf817cb9c cloud_scripts/opt/cloud/bin/cs_vmp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vmp.py'` -ne 1126 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vmp.py' is not 1126" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# getRouterMonitorResults.sh --- Send the monitor results to Management Server -X -if [ "$1" == "true" ] -then -X python /root/monitorServices.py > /dev/null -fi -X -printf "FAILING CHECKS:\n" -X -if [ -f /root/basic_failing_health_checks ] -then -X echo `cat /root/basic_failing_health_checks` -fi -X -if [ -f /root/advanced_failing_health_checks ] -then -X echo `cat /root/advanced_failing_health_checks` -fi -X -printf "MONITOR RESULTS:\n" -X -echo "{\"basic\":" -if [ -f /root/basic_monitor_results.json ] -then -X echo `cat /root/basic_monitor_results.json` -else -X echo "{}" -fi -echo ",\"advanced\":" -if [ -f /root/advanced_monitor_results.json ] -then -X echo `cat /root/advanced_monitor_results.json` -else -X echo "{}" -fi -X -echo "}" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh': 'MD5 check failed' - ) << \SHAR_EOF -35649a8a1a8339aaa42a311826699849 cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh'` -ne 1526 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' is not 1526" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vr_cfg.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vr_cfg.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vr_cfg.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -#set -x -X -cfg= -version= -log=/var/log/cloud.log -X -log_it() { -X logger -t cloud "$*" -X echo "$(date) : $*" >> $log -} -X -while getopts 'c:' OPTION; do -X case $OPTION in -X c) cfg="$OPTARG" ;; -esac; done -X -export DEFER_CONFIG=true -while read line; do -X #comment -X if [[ $line == \#* ]]; then -X continue -X -X elif [ "$line" == "" ]; then -X read line -X version=$line -X log_it "VR config: configuation format version $version" -X #skip -X read line -X -X elif [ "$line" == " -X read line -X log_it "VR config: execution success " -X -X elif [ "$line" == "" ]; then -X read line -X file=$line -X log_it "VR config: creating file: $file" -X rm -f $file -X while read -r line; do -X if [ "$line" == "" ]; then -X break -X fi -X echo $line >> $file -X done -X log_it "VR config: create file success" -X -X fi -X -done < $cfg -X -# archive the configuration file -mv $cfg /var/cache/cloud/processed/ -X -unset DEFER_CONFIG -# trigger finish_config() -if [ -f /etc/cloudstack/dhcpentry.json ]; then -X /opt/cloud/bin/configure.py vm_dhcp_entry.json -fi -if [ -f /etc/cloudstack/vmdata.json ]; then -X /opt/cloud/bin/configure.py vm_metadata.json -fi -X -# Flush kernel conntrack table -log_it "VR config: Flushing conntrack table" -conntrackd -d 2> /dev/null -if [ $? -eq 0 ]; then -X conntrackd -F -X conntrackd -k -else -X conntrackd -F -fi -log_it "VR config: Flushing conntrack table completed" -X -Xexit 0 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vr_cfg.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vr_cfg.sh': 'MD5 check failed' - ) << \SHAR_EOF -da02bd413616a9cc131fd039e627eb3e cloud_scripts/opt/cloud/bin/vr_cfg.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vr_cfg.sh'` -ne 2725 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' is not 2725" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpc_snat.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_snat.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_snat.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# @VERSION@ -X -source /root/func.sh -source /opt/cloud/bin/vpc_func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage:\n %s -A -l \n" $(basename $0) >&2 -X printf " %s -D -l \n" $(basename $0) >&2 -} -X -X -add_snat() { -X logger -t cloud "$(basename $0):Added SourceNAT $pubIp on interface $ethDev" -X vpccidr=$(getVPCcidr) -X sudo iptables -D FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT -X sudo iptables -A FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT -X sudo iptables -t nat -D POSTROUTING -j SNAT -o $ethDev --to-source $pubIp -X sudo iptables -t nat -A POSTROUTING -j SNAT -o $ethDev --to-source $pubIp -X return $? -} -remove_snat() { -X logger -t cloud "$(basename $0):Removing SourceNAT $pubIp on interface $ethDev" -X sudo iptables -t nat -D POSTROUTING -j SNAT -o $ethDev --to-source $pubIp -X return $? -} -X -#set -x -lflag=0 -cflag=0 -op="" -X -while getopts 'ADl:c:' OPTION -do -X case $OPTION in -X A) Aflag=1 -X op="-A" -X ;; -X D) Dflag=1 -X op="-D" -X ;; -X l) lflag=1 -X pubIp="$OPTARG" -X ;; -X c) cflag=1 -X ethDev="$OPTARG" -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [ "$Aflag$Dflag" != "1" ] -then -X usage -X unlock_exit 2 $lock $locked -fi -X -if [ "$lflag$cflag" != "11" ] -then -X usage -X unlock_exit 2 $lock $locked -fi -X -if [ "$Aflag" == "1" ] -then -X add_snat $publicIp -X unlock_exit $? $lock $locked -fi -X -if [ "$Dflag" == "1" ] -then -X remove_sat $publicIp -X unlock_exit $? $lock $locked -fi -X -unlock_exit 1 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_snat.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_snat.sh': 'MD5 check failed' - ) << \SHAR_EOF -23502a2ce3829fb787464124f13b9141 cloud_scripts/opt/cloud/bin/vpc_snat.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_snat.sh'` -ne 2346 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' is not 2346" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpc_staticroute.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_staticroute.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_staticroute.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# @VERSION@ -X -source /root/func.sh -source /opt/cloud/bin/vpc_func.sh -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s: -a < routes > \n" $(basename $0) >&2 -} -X -#set -x -X -flush_table_backup() { -X flush_table "static_route_back" -} -X -flush_table() { -X local tab=$1 -X sudo ip route flush table $tab -} -X -copy_table() { -X local from=$1 -X local to=$2 -X sudo ip route show table $from | while read route -X do -X sudo ip route add table $to $route -X done -} -X -backup_table() { -X flush_table "static_route_back" -X copy_table "static_route" "static_route_back" -X flush_table "static_route" -} -X -restore_table() { -X flush_table "static_route" -X copy_table "static_route_back" "static_route" -X flush_table "static_route_back" -} -X -static_route() { -X local rule=$1 -X local ip=$(echo $rule | cut -d: -f1) -X if [ $ip == "Revoke" ] -X then -X return 0 -X fi -X local gateway=$(echo $rule | cut -d: -f2) -X local cidr=$(echo $rule | cut -d: -f3) -X logger -t cloud "$(basename $0): static route: public ip=$ip \ -X gateway=$gateway cidr=$cidr" -X local dev=$(getEthByIp $ip) -X if [ $? -gt 0 ] -X then -X return 1 -X fi -X sudo ip route add $cidr dev $dev via $gateway table static_route &>/dev/null -X result=$? -X logger -t cloud "$(basename $0): done static route: public ip=$ip \ -X gateway=$gateway cidr=$cidr" -X return $result -} -X -gflag= -aflag= -while getopts 'a:' OPTION -X -do -X case $OPTION in -X a) aflag=1 -X rules="$OPTARG" -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [ -n "$rules" ] -then -X rules_list=$(echo $rules | cut -d, -f1- --output-delimiter=" ") -fi -X -success=0 -X -backup_table -X -for r in $rules_list -do -X static_route $r -X success=$? -X if [ $success -gt 0 ] -X then -X logger -t cloud "$(basename $0): failure to apply fw rules for guest network: $gcidr" -X break -X else -X logger -t cloud "$(basename $0): successful in applying fw rules for guest network: $gcidr" -X fi -done -X -if [ $success -gt 0 ] -then -X logger -t cloud "$(basename $0): restoring from backup for guest network: $gcidr" -X restore_table -else -X logger -t cloud "$(basename $0): deleting backup for guest network: $gcidr" -X flush_table_backup -fi -unlock_exit $success $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_staticroute.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh': 'MD5 check failed' - ) << \SHAR_EOF -4080c04ff7600874ef4a4364aefc4d18 cloud_scripts/opt/cloud/bin/vpc_staticroute.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh'` -ne 3043 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' is not 3043" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/baremetal-vr.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/baremetal-vr.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/baremetal-vr.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/baremetal-vr.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/baremetal-vr.py -M(TQI8V5N6ME>2<@:6X@<#H*("`@("`@("`@("`@("`@("`@("`@("`@ -M2`]('`N6ME>2!I;B`E0H*("`@(&1E -M9B!?9V5T7VUG;71?:7`H4)AFEP*')E<7,N:V5Y2P@:&%S:%-T5]P/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/baremetal-vr.py': 'MD5 check failed' - ) << \SHAR_EOF -f87e8890aa7ad3cc522c5c5ceb2fbf69 cloud_scripts/opt/cloud/bin/baremetal-vr.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/baremetal-vr.py'` -ne 5587 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/baremetal-vr.py' is not 5587" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_firewallrules.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_firewallrules.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_firewallrules.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import copy -X -X -def merge(dbag, data): -X dbagc = copy.deepcopy(dbag) -X if "rules" not in data: -X return dbagc -X for rule in data['rules']: -X id = str(rule['id']) -X if rule['revoked']: -X if id in dbagc.keys(): -X del(dbagc[id]) -X elif id not in dbagc.keys(): -X dbagc[id] = rule -X return dbagc -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_firewallrules.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py': 'MD5 check failed' - ) << \SHAR_EOF -6d3faf49679b84bf9a098eee6b630f69 cloud_scripts/opt/cloud/bin/cs_firewallrules.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py'` -ne 1141 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' is not 1141" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/netusage.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/netusage.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/netusage.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/netusage.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/netusage.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -X -# netusage.sh -- create iptable rules to gather network stats, running within DomR -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s -[c|g|r] [-[a|d] ]\n" $(basename $0) >&2 -} -X -create_usage_rules () { -X iptables-save|grep "INPUT -j NETWORK_STATS" > /dev/null -X if [ $? -eq 0 ] -X then -X return $? -X fi -X iptables -N NETWORK_STATS > /dev/null -X iptables -I FORWARD -j NETWORK_STATS > /dev/null -X iptables -I INPUT -j NETWORK_STATS > /dev/null -X iptables -I OUTPUT -j NETWORK_STATS > /dev/null -X iptables -A NETWORK_STATS -i eth0 -o eth2 > /dev/null -X iptables -A NETWORK_STATS -i eth2 -o eth0 > /dev/null -X iptables -A NETWORK_STATS -o eth2 ! -i eth0 -p tcp > /dev/null -X iptables -A NETWORK_STATS -i eth2 ! -o eth0 -p tcp > /dev/null -X return $? -} -X -add_public_interface () { -X local pubIf=$1 -X iptables-save|grep "NETWORK_STATS -i eth0 -o $pubIf" > /dev/null -X if [ $? -eq 0 ] -X then -X return $? -X fi -X iptables -A NETWORK_STATS -i eth0 -o $pubIf > /dev/null -X iptables -A NETWORK_STATS -i $pubIf -o eth0 > /dev/null -X iptables -A NETWORK_STATS -o $pubIf ! -i eth0 -p tcp > /dev/null -X iptables -A NETWORK_STATS -i $pubIf ! -o eth0 -p tcp > /dev/null -X return $? -} -X -delete_public_interface () { -X local pubIf=$1 -X echo $pubIf >> /root/removedVifs -X return $? -} -X -get_usage () { -X iptables -L NETWORK_STATS -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null -X if [ -f /root/removedVifs ] ; then iptables -Z NETWORK_STATS ; fi; > /dev/null -X /root/clearUsageRules.sh > /dev/null -X if [ $? -gt 0 -a $? -ne 2 ] -X then -X printf $? -X return 1 -X fi -} -X -reset_usage () { -X iptables -Z NETWORK_STATS > /dev/null -X if [ $? -gt 0 -a $? -ne 2 ] -X then -X return 1 -X fi -} -X -#set -x -X -cflag= -gflag= -rflag= -iflag= -aflag= -dflag= -X -while getopts 'cgria:d:' OPTION -do -X case $OPTION in -X c) cflag=1 -X ;; -X g) gflag=1 -X ;; -X r) rflag=1 -X ;; -X a) aflag=1 -X publicIf="$OPTARG" -X ;; -X d) dflag=1 -X publicIf="$OPTARG" -X ;; -X i) #Do nothing, since it's parameter for host script -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [ "$cflag" == "1" ] -then -X #create_usage_rules -X unlock_exit $? $lock $locked -fi -X -if [ "$gflag" == "1" ] -then -X get_usage -X unlock_exit $? $lock $locked -fi -X -if [ "$rflag" == "1" ] -then -X reset_usage -X unlock_exit $? $lock $locked -fi -X -if [ "$aflag" == "1" ] -then -X #add_public_interface $publicIf -X unlock_exit $? $lock $locked -fi -X -if [ "$dflag" == "1" ] -then -X #delete_public_interface $publicIf -X unlock_exit $? $lock $locked -fi -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/netusage.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/netusage.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/netusage.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/netusage.sh': 'MD5 check failed' - ) << \SHAR_EOF -2966c6cafee62e66ff903e53367b498b cloud_scripts/opt/cloud/bin/netusage.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/netusage.sh'` -ne 3478 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/netusage.sh' is not 3478" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/monitor_service.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/monitor_service.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/monitor_service.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/monitor_service.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/monitor_service.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -set -x -usage() { -X printf "Usage: %s: -c config string \n" $(basename $0) >&2 -} -X -configFile='/etc/monitor.conf' -X -create_config() { -services=$1; -services_list=$(echo $services | cut -d, -f1- --output-delimiter=" "); -X -echo "#Monitor services config" >$configFile -X -for s in $services_list -do -service=$(echo $s | cut -d: -f1); -processname=$(echo $s | cut -d: -f2); -service_name=$(echo $s | cut -d: -f3); -pidfile=$(echo $s | cut -d: -f4); -X -echo "$service" >> $configFile; -echo $processname >> $configFile -echo $service_name >> $configFile -echo $pidfile >> $configFile -X -done -X -} -X -config=$2 -if [ -n "$3" ] -then -X -#delete cron job before updating config file -crontab -l|grep "monitorServices.py" -X -if [ $? -eq 0 ] -then -X t=`date +%s`; -X touch /tmp/monitor-$t.txt; -X conf=/tmp/monitor-$t.txt -X crontab -l >$conf -X sed -i /#monitoringConfig/,+3d $conf -X crontab $conf -X rm $conf -fi -X -X -logger -t cloud "deleted crontab entry for monitoring services" -unlock_exit 0 $lock $locked -fi -X -create_config $config -X -#add cron job -crontab -l|grep "monitorServices.py" -if [ $? -ne 0 ] -X then -X (crontab -l ;echo -e "#monitoringConfig\nSHELL=/bin/bash\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n */3 * * * * /usr/bin/python /root/monitorServices.py") | crontab - -X logger -t cloud "added crontab entry for monitoring services" -fi -X -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/monitor_service.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/monitor_service.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/monitor_service.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/monitor_service.sh': 'MD5 check failed' - ) << \SHAR_EOF -3419e7baf45ac36d3d69ca71ef7ab978 cloud_scripts/opt/cloud/bin/monitor_service.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/monitor_service.sh'` -ne 2294 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/monitor_service.sh' is not 2294" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_ip.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_ip.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_ip.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_ip.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_ip.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N7!E)UT@/2!I<%LG;G=?='EP92==+FQO=V5R*"D*("`@(&EF(&EP -M6R=N=U]T>7!E)UT@/3T@)V-O;G1R;VPG.@H@("`@("`@(&1B86=;:7!;)V1E -M=FEC92==72`](%MI<%T*("`@(&5L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_ip.py': 'MD5 check failed' - ) << \SHAR_EOF -856c6261f2876c280c49fa486f4f7408 cloud_scripts/opt/cloud/bin/cs_ip.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_ip.py'` -ne 2581 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_ip.py' is not 2581" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/bumpup_priority.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/bumpup_priority.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/bumpup_priority.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -touch /tmp/rrouter_bumped -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/bumpup_priority.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh': 'MD5 check failed' - ) << \SHAR_EOF -35091259ed848a9f7270aca1a90e95af cloud_scripts/opt/cloud/bin/bumpup_priority.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh'` -ne 824 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' is not 824" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/getRouterAlerts.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/getRouterAlerts.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/getRouterAlerts.sh (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/getRouterAlerts.sh -M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5LP77T*"B`@("`@("`@("`@ -M("`@("!T;T1A=&5686P])"AD871E("UD("(D9&%T979A;"(@(BLE/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh': 'MD5 check failed' - ) << \SHAR_EOF -6c3803100b0923fd3f9017a0e09d6fd5 cloud_scripts/opt/cloud/bin/getRouterAlerts.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh'` -ne 1706 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh' is not 1706" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/postinit.sh ============== -if test ! -d 'cloud_scripts/opt/cloud/bin/setup'; then - mkdir 'cloud_scripts/opt/cloud/bin/setup' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/opt/cloud/bin/setup." -else ${echo} "x - failed to create directory cloud_scripts/opt/cloud/bin/setup." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/postinit.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/postinit.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# This scripts before ssh.service but after cloud-early-config -X -# Eject cdrom if any -eject || true -X -# Restart journald for setting changes to apply -systemctl restart systemd-journald -X -TYPE=$(grep -Po 'type=\K[a-zA-Z]*' /var/cache/cloud/cmdline) -if [ "$TYPE" == "router" ] || [ "$TYPE" == "vpcrouter" ] || [ "$TYPE" == "dhcpsrvr" ] -then -X if [ -x /opt/cloud/bin/update_config.py ] -X then -X /opt/cloud/bin/update_config.py cmd_line.json || true -X fi -fi -X -[ ! -f /var/cache/cloud/enabled_svcs ] && touch /var/cache/cloud/enabled_svcs -for svc in $(cat /var/cache/cloud/enabled_svcs) -do -X systemctl enable --now --no-block $svc -done -X -[ ! -f /var/cache/cloud/disabled_svcs ] && touch /var/cache/cloud/disabled_svcs -for svc in $(cat /var/cache/cloud/disabled_svcs) -do -X systemctl disable --now --no-block $svc -done -X -# Restore the persistent iptables nat, rules and filters for IPv4 and IPv6 if they exist -ipv4="/etc/iptables/rules.v4" -if [ -e $ipv4 ] -then -X iptables-restore < $ipv4 -fi -X -ipv6="/etc/iptables/rules.v6" -if [ -e $ipv6 ] -then -X ip6tables-restore < $ipv6 -fi -X -# Patch known systemd/sshd memory leak - https://github.com/systemd/systemd/issues/8015#issuecomment-476160981 -echo '@include null' >> /etc/pam.d/systemd-user -X -# Enable and Start SSH -systemctl enable --now --no-block ssh -X -date > /var/cache/cloud/boot_up_done -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/postinit.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/postinit.sh': 'MD5 check failed' - ) << \SHAR_EOF -170afadf6f130e9cb697dca65a87aacb cloud_scripts/opt/cloud/bin/setup/postinit.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/postinit.sh'` -ne 2122 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' is not 2122" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/secstorage.sh ============== -if test ! -d 'cloud_scripts/opt/cloud/bin/setup'; then - mkdir 'cloud_scripts/opt/cloud/bin/setup' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/opt/cloud/bin/setup." -else ${echo} "x - failed to create directory cloud_scripts/opt/cloud/bin/setup." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/secstorage.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/secstorage.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_secstorage() { -X log_it "Setting up secondary storage system vm" -X -X echo "cloud apache2 nfs-common portmap" > /var/cache/cloud/enabled_svcs -X echo "conntrackd keepalived haproxy dnsmasq" > /var/cache/cloud/disabled_svcs -X mkdir -p /var/log/cloud -X -X setup_common eth0 eth1 eth2 -X setup_storage_network -X setup_system_rfc1918_internal -X -X log_it "Setting up entry in hosts" -X sed -i /$NAME/d /etc/hosts -X public_ip=`getPublicIp` -X echo "$public_ip $NAME" >> /etc/hosts -X -X log_it "Applying iptables rules" -X cp /etc/iptables/iptables-secstorage /etc/iptables/rules.v4 -X -X log_it "Configuring sshd" -X local hyp=$HYPERVISOR -X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then -X setup_sshd $ETH1_IP "eth1" -X else -X setup_sshd $ETH0_IP "eth0" -X fi -X -X log_it "Configuring apache2" -X setup_apache2 $ETH2_IP -X -X # Deprecated, should move to Cs Python all of it -X sed -e "s///" \ -X -e "s///" \ -X -e "s/Listen .*:8180/Listen $ETH2_IP:80/g" \ -X -e "s/Listen .*:8443/Listen $ETH2_IP:443/g" /etc/apache2/vhost.template > /etc/apache2/sites-enabled/vhost-${ETH2_IP}.conf -X -X log_it "Setting up apache2 for post upload of volume/template" -X a2enmod proxy -X a2enmod proxy_http -X a2enmod headers -X -X cat >/etc/apache2/cors.conf </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh': 'MD5 check failed' - ) << \SHAR_EOF -14aea171a5e0fdfd3069bb96bde91e0b cloud_scripts/opt/cloud/bin/setup/secstorage.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh'` -ne 2720 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' is not 2720" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/ilbvm.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -ilbvm_svcs() { -X echo "haproxy" > /var/cache/cloud/enabled_svcs -X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs -} -X -setup_ilbvm() { -X log_it "Setting up Internal Load Balancer system vm" -X setup_common eth0 eth1 -X #eth0 = guest network, eth1=control network -X -X sed -i /$NAME/d /etc/hosts -X echo "$ETH0_IP $NAME" >> /etc/hosts -X -X cp /etc/iptables/iptables-ilbvm /etc/iptables/rules.v4 -X setup_sshd $ETH1_IP "eth1" -X -X enable_fwding 0 -X enable_irqbalance 1 -} -X -ilbvm_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute ilbvm svcs" -X exit 1 -fi -setup_ilbvm -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/ilbvm.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh': 'MD5 check failed' - ) << \SHAR_EOF -87c70bdf6c0d4d41f0ff87475494188f cloud_scripts/opt/cloud/bin/setup/ilbvm.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh'` -ne 1442 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' is not 1442" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_vpcrouter() { -X log_it "Setting up VPC virtual router system vm" -X -X if [ -f /etc/hosts ]; then -X grep -q $NAME /etc/hosts || echo "127.0.0.1 $NAME" >> /etc/hosts; -X fi -X -X cat > /etc/network/interfaces << EOF -auto lo eth0 -iface lo inet loopback -EOF -X setup_interface "0" $ETH0_IP $ETH0_MASK $GW -X -X echo $NAME > /etc/hostname -X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon -X hostnamectl set-hostname $NAME -X -X #Nameserver -X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries -X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries -X if [ -n "$internalNS1" ] -X then -X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS1" > /etc/resolv.conf -X fi -X -X if [ -n "$internalNS2" ] -X then -X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS2" >> /etc/resolv.conf -X fi -X if [ -n "$NS1" ] -X then -X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS1" >> /etc/resolv.conf -X fi -X -X if [ -n "$NS2" ] -X then -X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS2" >> /etc/resolv.conf -X fi -X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] -X then -X if [ "$HYPERVISOR" == "vmware" ] || [ "$HYPERVISOR" == "hyperv" ]; -X then -X ip route add $MGMTNET via $LOCAL_GW dev eth0 -X # workaround to activate vSwitch under VMware -X timeout 3 ping -n -c 3 $LOCAL_GW || true -X fi -X fi -X -X ip route delete default -X # create route table for static route -X -X sudo echo "252 static_route" >> /etc/iproute2/rt_tables 2>/dev/null -X sudo echo "251 static_route_back" >> /etc/iproute2/rt_tables 2>/dev/null -X sudo ip rule add from $VPCCIDR table static_route 2>/dev/null -X sudo ip rule add from $VPCCIDR table static_route_back 2>/dev/null -X -X setup_vpc_apache2 -X -X enable_irqbalance 1 -X enable_vpc_rpsrfs 1 -X disable_rpfilter -X enable_fwding 1 -X enable_passive_ftp 1 -X cp /etc/iptables/iptables-vpcrouter /etc/iptables/rules.v4 -X setup_sshd $ETH0_IP "eth0" -X cp /etc/vpcdnsmasq.conf /etc/dnsmasq.conf -X cp /etc/cloud-nic.rules /etc/udev/rules.d/cloud-nic.rules -X echo "" > /etc/dnsmasq.d/dhcphosts.txt -X echo "dhcp-hostsfile=/etc/dhcphosts.txt" > /etc/dnsmasq.d/cloud.conf -X -X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" -X #DNS server will append $DOMAIN to local queries -X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf -X #answer all local domain queries -X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf -X -X command -v dhcp_release > /dev/null 2>&1 -X no_dhcp_release=$? -X if [ $no_dhcp_release -eq 0 ] -X then -X echo 1 > /var/cache/cloud/dnsmasq_managed_lease -X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf -X else -X echo 0 > /var/cache/cloud/dnsmasq_managed_lease -X fi -X -X # Setup hourly logrotate -X if [ -f /etc/cron.daily/logrotate ]; then -X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 -X fi -} -X -routing_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute routing_svcs" -X exit 1 -fi -setup_vpcrouter -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh': 'MD5 check failed' - ) << \SHAR_EOF -811420d11f97b1d7237b964e8bbbdf5d cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh'` -ne 3885 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' is not 3885" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/router.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/router.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/router.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/router.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/router.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -check_reboot_vmware() { -X if [ "$HYPERVISOR" != "vmware" ]; then -X return -X fi -X -X if [ -n "$MGMTNET" ]; then -X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') -X if ping -n -c 1 -W 3 $MGMT_GW &> /dev/null; then -X log_it "Management gateway pingable, skipping VR reboot" -X return -X fi -X fi -X -X log_it "Management gateway not pingable, rebooting VR" -X sync -X reboot -} -X -setup_router() { -X # To save router public interface and gw ip information -X touch /var/cache/cloud/ifaceGwIp -X -X oldmd5= -X [ -f "/etc/udev/rules.d/70-persistent-net.rules" ] && oldmd5=$(md5sum "/etc/udev/rules.d/70-persistent-net.rules" | awk '{print $1}') -X -X if [ -n "$ETH2_IP" ]; then -X setup_common eth0 eth1 eth2 -X -X if [ -n "$EXTRA_PUBNICS" ]; then -X for ((i = 3; i < 3 + $EXTRA_PUBNICS; i++)); do -X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" -X done -X fi -X else -X setup_common eth0 eth1 -X if [ -n "$EXTRA_PUBNICS" ]; then -X for ((i = 2; i < 2 + $EXTRA_PUBNICS; i++)); do -X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" -X done -X fi -X fi -X -X log_it "Checking udev NIC assignment order changes" -X if [ "$NIC_MACS" != "" ] -X then -X init_interfaces_orderby_macs "$NIC_MACS" "/tmp/interfaces" "/tmp/udev-rules" -X newmd5=$(md5sum "/tmp/udev-rules" | awk '{print $1}') -X rm /tmp/interfaces -X rm /tmp/udev-rules -X -X if [ "$oldmd5" != "$newmd5" ] -X then -X log_it "Reloading udev for new udev NIC assignment" -X udevadm control --reload-rules && udevadm trigger -X check_reboot_vmware -X fi -X fi -X -X setup_aesni -X setup_dnsmasq -X setup_apache2 $ETH0_IP -X -X sed -i /$NAME/d /etc/hosts -X echo "$ETH0_IP $NAME" >> /etc/hosts -X -X enable_irqbalance 1 -X disable_rpfilter_domR -X enable_fwding 1 -X enable_rpsrfs 1 -X enable_passive_ftp 1 -X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 -X setup_sshd $ETH1_IP "eth1" -X -X # Only allow DNS service for current network -X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X -X # Setup hourly logrotate -X if [ -f /etc/cron.daily/logrotate ]; then -X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 -X fi -} -X -routing_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute routing_svcs" -X exit 1 -fi -setup_router -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/router.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/router.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/router.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/router.sh': 'MD5 check failed' - ) << \SHAR_EOF -2ae62d5d44c716730231c9d77618fe91 cloud_scripts/opt/cloud/bin/setup/router.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/router.sh'` -ne 3355 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/router.sh' is not 3355" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/elbvm.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/elbvm.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/elbvm.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -elbvm_svcs() { -X echo "haproxy" > /var/cache/cloud/enabled_svcs -X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs -} -X -setup_elbvm() { -X log_it "Setting up Elastic Load Balancer system vm" -X setup_common eth0 eth1 -X sed -i /$NAME/d /etc/hosts -X public_ip=$ETH2_IP -X [ "$ETH2_IP" == "0.0.0.0" ] || [ "$ETH2_IP" == "" ] && public_ip=$ETH0_IP -X echo "$public_ip $NAME" >> /etc/hosts -X -X cp /etc/iptables/iptables-elbvm /etc/iptables/rules.v4 -X if [ "$SSHONGUEST" == "true" ] -X then -X setup_sshd $ETH0_IP "eth0" -X else -X setup_sshd $ETH1_IP "eth1" -X fi -X -X enable_fwding 0 -X enable_irqbalance 0 -} -X -elbvm_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute elbvm svcs" -X exit 1 -fi -setup_elbvm -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/elbvm.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh': 'MD5 check failed' - ) << \SHAR_EOF -2d34615f1d40f6125a2205e6118ba07f cloud_scripts/opt/cloud/bin/setup/elbvm.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh'` -ne 1578 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' is not 1578" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/bootstrap.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" -CMDLINE=/var/cache/cloud/cmdline -X -rm -f /var/cache/cloud/enabled_svcs -rm -f /var/cache/cloud/disabled_svcs -X -X. /lib/lsb/init-functions -X -log_it() { -X echo "$(date) $@" >> /var/log/cloud.log -X log_action_msg "$@" -} -X -hypervisor() { -X if [ -d /proc/xen ]; then -X mount -t xenfs none /proc/xen -X $(dmesg | grep -q "Xen HVM") -X if [ $? -eq 0 ]; then # 1=PV,0=HVM -X echo "xen-hvm" && return 0 -X else -X echo "xen-pv" && return 0 -X fi -X fi -X -X [ -x /usr/sbin/virt-what ] && local facts=( $(virt-what) ) -X if [ "$facts" != "" ]; then -X # Xen HVM is recognized as Hyperv when Viridian extensions are enabled -X if [ "${facts[-1]}" == "xen-domU" ] && [ "${facts[0]}" == "hyperv" ]; then -X echo "xen-hvm" && return 0 -X else -X echo ${facts[-1]} && return 0 -X fi -X fi -X -X grep -q QEMU /proc/cpuinfo && echo "kvm" && return 0 -X grep -q QEMU /var/log/messages && echo "kvm" && return 0 -X -X vmware-checkvm &> /dev/null && echo "vmware" && return 0 -X -X echo "unknown" && return 1 -} -X -config_guest() { -X [ ! -d /proc/xen ] && sed -i 's/^vc/#vc/' /etc/inittab && telinit q -X [ -d /proc/xen ] && sed -i 's/^#vc/vc/' /etc/inittab && telinit q -X -X systemctl daemon-reload -X -X case $HYPERVISOR in -X xen-pv|xen-domU) -X systemctl stop ntpd -X systemctl disable ntpd -X systemctl enable xe-daemon -X systemctl start xe-daemon -X -X cat /proc/cmdline > $CMDLINE -X sed -i "s/%/ /g" $CMDLINE -X ;; -X xen-hvm) -X systemctl stop ntpd -X systemctl disable ntpd -X systemctl enable xe-daemon -X systemctl start xe-daemon -X -X if [ ! -f /usr/bin/xenstore-read ]; then -X log_it "ERROR: xentools not installed, cannot found xenstore-read" && exit 5 -X fi -X /usr/bin/xenstore-read vm-data/cloudstack/init > $CMDLINE -X sed -i "s/%/ /g" $CMDLINE -X ;; -X kvm) -X # Configure kvm hotplug support -X if grep -E 'CONFIG_HOTPLUG_PCI=y|CONFIG_HOTPLUG_PCI_ACPI=y' /boot/config-`uname -r`; then -X log_it "acpiphp and pci_hotplug module already compiled in" -X else -X modprobe acpiphp 2> /dev/null && log_it "acpiphp module loaded" || true -X modprobe pci_hotplug 2> /dev/null && log_it "pci_hotplug module loaded" || true -X fi -X -X sed -i -e "/^s0:2345:respawn.*/d" /etc/inittab -X sed -i -e "/6:23:respawn/a\s0:2345:respawn:/sbin/getty -L 115200 ttyS0 vt102" /etc/inittab -X systemctl enable qemu-guest-agent -X systemctl start qemu-guest-agent -X -X # Wait for $CMDLINE file to be written by the qemu-guest-agent -X for i in {1..60}; do -X if [ -s $CMDLINE ]; then -X log_it "Received a new non-empty cmdline file from qemu-guest-agent" -X break -X fi -X sleep 1 -X done -X if [ ! -s $CMDLINE ]; then -X log_it "Failed to receive the cmdline file via the qemu-guest-agent" -X fi -X ;; -X vmware) -X # system time sync'd with host via vmware tools -X systemctl stop ntpd -X systemctl disable ntpd -X systemctl enable open-vm-tools -X systemctl start open-vm-tools -X -X vmtoolsd --cmd 'machine.id.get' > $CMDLINE -X ;; -X virtualpc|hyperv) -X # Hyper-V is recognized as virtualpc hypervisor type. Boot args are passed using KVP Daemon -X systemctl enable hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service -X systemctl start hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service -X sleep 5 -X cp -f /var/opt/hyperv/.kvp_pool_0 $CMDLINE -X cat /dev/null > /var/opt/hyperv/.kvp_pool_0 -X ;; -X virtualbox) -X # Virtualbox is used to test the virtual router -X # get the commandline from a dmistring (yes, hacky!) -X dmidecode | grep cmdline | sed 's/^.*cmdline://' > $CMDLINE -X RV=$? -X if [ $RV -ne 0 ] ; then -X log_it "Failed to get cmdline from a virtualbox dmi property" -X fi -X ;; -X esac -X -X # Find and export guest type -X export TYPE=$(grep -Po 'type=\K[a-zA-Z]*' $CMDLINE) -} -X -patch_systemvm() { -X local patchfile=$1 -X local backupfolder="/tmp/.conf.backup" -X local logfile="/var/log/patchsystemvm.log" -X if [ -f /usr/local/cloud/systemvm/conf/cloud.jks ]; then -X rm -fr $backupfolder -X mkdir -p $backupfolder -X cp -r /usr/local/cloud/systemvm/conf/* $backupfolder/ -X fi -X rm /usr/local/cloud/systemvm -rf -X mkdir -p /usr/local/cloud/systemvm -X echo "All" | unzip $patchfile -d /usr/local/cloud/systemvm >$logfile 2>&1 -X find /usr/local/cloud/systemvm/ -name \*.sh | xargs chmod 555 -X if [ -f $backupfolder/cloud.jks ]; then -X cp -r $backupfolder/* /usr/local/cloud/systemvm/conf/ -X echo "Restored keystore file and certs using backup" >> $logfile -X fi -X rm -fr $backupfolder -X # Import global cacerts into 'cloud' service's keystore -X keytool -importkeystore -srckeystore /etc/ssl/certs/java/cacerts -destkeystore /usr/local/cloud/systemvm/certs/realhostip.keystore -srcstorepass changeit -deststorepass vmops.com -noprompt || true -X return 0 -} -X -patch() { -X local PATCH_MOUNT=/media/cdrom -X local logfile="/var/log/patchsystemvm.log" -X if [ "$TYPE" == "consoleproxy" ] || [ "$TYPE" == "secstorage" ] && [ -f ${PATCH_MOUNT}/agent.zip ] && [ -f /var/cache/cloud/patch.required ] -X then -X echo "Patching systemvm for cloud service with mount=$PATCH_MOUNT for type=$TYPE" >> $logfile -X patch_systemvm ${PATCH_MOUNT}/agent.zip -X if [ $? -gt 0 ] -X then -X echo "Failed to apply patch systemvm\n" >> $logfile -X exit 1 -X fi -X fi -X -X rm -f /var/cache/cloud/patch.required -X chmod -x /etc/systemd/system/cloud*.service -X systemctl daemon-reload -X umount $PATCH_MOUNT || true -X -X if [ -f /mnt/cmdline ]; then -X cat /mnt/cmdline > $CMDLINE -X fi -X return 0 -} -X -config_sysctl() { -X # When there is more memory reset the cache back pressure to default 100 -X physmem=$(free|awk '/^Mem:/{print $2}') -X if [ $((physmem)) -lt 409600 ]; then -X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 200" /etc/sysctl.conf -X else -X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 100" /etc/sysctl.conf -X fi -X -X sync -X sysctl -p -} -X -bootstrap() { -X log_it "Bootstrapping systemvm appliance" -X -X export HYPERVISOR=$(hypervisor) -X [ $? -ne 0 ] && log_it "Failed to detect hypervisor type, bailing out" && exit 10 -X log_it "Starting guest services for $HYPERVISOR" -X -X config_guest -X patch -X config_sysctl -X -X log_it "Configuring systemvm type=$TYPE" -X if [ -f "/opt/cloud/bin/setup/$TYPE.sh" ]; then -X /opt/cloud/bin/setup/$TYPE.sh -X else -X /opt/cloud/bin/setup/default.sh -X fi -X -X log_it "Finished setting up systemvm" -X exit 0 -} -X -bootstrap -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/bootstrap.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh': 'MD5 check failed' - ) << \SHAR_EOF -722a9c6abfff147c7727fdcd85c96767 cloud_scripts/opt/cloud/bin/setup/bootstrap.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh'` -ne 7721 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' is not 7721" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_console_proxy() { -X log_it "Setting up console proxy system vm" -X -X echo "cloud" > /var/cache/cloud/enabled_svcs -X echo "haproxy dnsmasq apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs -X mkdir -p /var/log/cloud -X -X setup_common eth0 eth1 eth2 -X setup_system_rfc1918_internal -X -X log_it "Setting up entry in hosts" -X sed -i /$NAME/d /etc/hosts -X public_ip=`getPublicIp` -X echo "$public_ip $NAME" >> /etc/hosts -X -X log_it "Applying iptables rules" -X cp /etc/iptables/iptables-consoleproxy /etc/iptables/rules.v4 -X -X log_it "Configuring sshd" -X local hyp=$HYPERVISOR -X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then -X setup_sshd $ETH1_IP "eth1" -X else -X setup_sshd $ETH0_IP "eth0" -X fi -X -X disable_rpfilter -X enable_fwding 0 -X enable_irqbalance 0 -X rm -f /etc/logrotate.d/cloud -} -X -setup_console_proxy -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh': 'MD5 check failed' - ) << \SHAR_EOF -44adac9bf5e54d4791da00e3d1bdaf46 cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh'` -ne 1658 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' is not 1658" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/common.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/common.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/common.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/common.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/common.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" -X -X. /lib/lsb/init-functions -X -log_it() { -X echo "$(date) $@" >> /var/log/cloud.log -X log_action_msg "$@" -} -X -init_interfaces_orderby_macs() { -X macs=( $(echo $1 | sed "s/|/ /g") ) -X total_nics=${#macs[@]} -X interface_file=${2:-"/etc/network/interfaces"} -X rule_file=${3:-"/etc/udev/rules.d/70-persistent-net.rules"} -X -X echo -n "auto lo" > $interface_file -X for((i=0; i> $interface_file -X fi -X done -X -X cat >> $interface_file << EOF -X -iface lo inet loopback -X -EOF -X -X echo "" > $rule_file -X for((i=0; i < ${#macs[@]}; i++)) -X do -X echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${macs[$i]}\", NAME=\"eth$i\"" >> $rule_file -X done -} -X -init_interfaces() { -X if [ "$NIC_MACS" == "" ] -X then -X cat > /etc/network/interfaces << EOF -auto lo $1 $2 $3 -iface lo inet loopback -X -EOF -X else -X init_interfaces_orderby_macs "$NIC_MACS" -X fi -} -X -setup_interface() { -X local intfnum=$1 -X local ip=$2 -X local mask=$3 -X local gw=$4 -X local force=$5 -X local intf=eth${intfnum} -X local bootproto="static" -X -X if [ "$BOOTPROTO" == "dhcp" ] -X then -X if [ "$intfnum" != "0" ] -X then -X bootproto="dhcp" -X fi -X fi -X -X if [ "$ip" != "0.0.0.0" -a "$ip" != "" -o "$force" == "force" ] -X then -X echo "iface $intf inet $bootproto" >> /etc/network/interfaces -X if [ "$bootproto" == "static" ] -X then -X echo " address $ip " >> /etc/network/interfaces -X echo " netmask $mask" >> /etc/network/interfaces -X fi -X fi -X -X if [ "$ip" == "0.0.0.0" -o "$ip" == "" ] -X then -X ifconfig $intf down -X fi -X -X if [ "$force" == "force" ] -X then -X ifdown $intf -X else -X ifdown $intf -X if [ "$RROUTER" != "1" -o "$1" != "2" ] -X then -X ifup $intf -X fi -X fi -} -X -setup_interface_ipv6() { -X sysctl net.ipv6.conf.all.disable_ipv6=0 -X sysctl net.ipv6.conf.all.forwarding=1 -X sysctl net.ipv6.conf.all.accept_ra=1 -X -X sed -i "s/net.ipv6.conf.all.disable_ipv6 =.*$/net.ipv6.conf.all.disable_ipv6 = 0/" /etc/sysctl.conf -X sed -i "s/net.ipv6.conf.all.forwarding =.*$/net.ipv6.conf.all.forwarding = 1/" /etc/sysctl.conf -X sed -i "s/net.ipv6.conf.all.accept_ra =.*$/net.ipv6.conf.all.accept_ra = 1/" /etc/sysctl.conf -X -X local intfnum=$1 -X local ipv6="$2" -X local prelen="$3" -X local intf=eth${intfnum} -X -X echo "iface $intf inet6 static" >> /etc/network/interfaces -X echo " address $ipv6 " >> /etc/network/interfaces -X echo " netmask $prelen" >> /etc/network/interfaces -X echo " accept_ra 1" >> /etc/network/interfaces -X ifdown $intf -X ifup $intf -} -X -X -enable_fwding() { -X local enabled=$1 -X log_it "cloud: enable_fwding = $1" -X log_it "enable_fwding = $1" -X echo "$1" > /proc/sys/net/ipv4/ip_forward -X [ -f /etc/iptables/iptables.conf ] && sed -i "s/ENABLE_ROUTING=.*$/ENABLE_ROUTING=$enabled/" /etc/iptables/iptables.conf && return -} -X -enable_passive_ftp() { -X log_it "cloud: enabling passive FTP for guest VMs" -X echo "$1" > /proc/sys/net/netfilter/nf_conntrack_helper -} -X -disable_rpfilter() { -X log_it "cloud: disable rp_filter" -X log_it "disable rpfilter" -X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf -} -X -get_public_vif_list() { -X local vif_list="" -X for i in /sys/class/net/eth*; do -X vif=$(basename $i); -X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] -X then -X vif_list="$vif_list $vif"; -X fi -X done -X -X echo $vif_list -} -X -disable_rpfilter_domR() { -X log_it "cloud: Tuning rp_filter on public interfaces" -X -X VIF_LIST=$(get_public_vif_list) -X log_it "rpfilter public interfaces : $VIF_LIST" -X if [ "$DISABLE_RP_FILTER" == "true" ] -X then -X log_it "cloud: disable rp_filter on public interfaces" -X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf -X echo "0" > /proc/sys/net/ipv4/conf/default/rp_filter -X for vif in $VIF_LIST; do -X log_it "cloud: disable rp_filter on public interface: $vif" -X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 0/" /etc/sysctl.conf -X echo "0" > /proc/sys/net/ipv4/conf/$vif/rp_filter -X done -X else -X log_it "cloud: enable rp_filter on public interfaces" -X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 1/" /etc/sysctl.conf -X echo "1" > /proc/sys/net/ipv4/conf/default/rp_filter -X for vif in $VIF_LIST; do -X log_it "cloud: enable rp_filter on public interface: $vif" -X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 1/" /etc/sysctl.conf -X echo "1" > /proc/sys/net/ipv4/conf/$vif/rp_filter -X done -X fi -X log_it "cloud: Enabling rp_filter on Non-public interfaces(eth0,eth1,lo)" -X echo "1" > /proc/sys/net/ipv4/conf/eth0/rp_filter -X echo "1" > /proc/sys/net/ipv4/conf/eth1/rp_filter -X echo "1" > /proc/sys/net/ipv4/conf/lo/rp_filter -} -X -enable_irqbalance() { -X local enabled=$1 -X local proc=0 -X -X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) -X if [ $proc -le 1 ] && [ $enabled -eq 1 ] -X then -X enabled=0 -X fi -X -X log_it "Processors = $proc Enable service ${svc} = $enabled" -X local cfg=/etc/default/irqbalance -X [ -f $cfg ] && sed -i "s/ENABLED=.*$/ENABLED=$enabled/" $cfg && return -} -X -enable_vpc_rpsrfs() { -X local enable=$1 -X if [ $enable -eq 0 ] -X then -X echo 0 > /etc/rpsrfsenable -X else -X echo 1 > /etc/rpsrfsenable -X fi -X -X return 0 -} -X -enable_rpsrfs() { -X local enable=$1 -X -X if [ $enable -eq 0 ] -X then -X echo 0 > /etc/rpsrfsenable -X return 0 -X fi -X -X if [ ! -f /sys/class/net/eth0/queues/rx-0/rps_cpus ] -X then -X echo "rps is not enabled in the kernel" -X echo 0 > /etc/rpsrfsenable -X return 0 -X fi -X -X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) -X if [ $proc -le 1 ] -X then -X echo 0 > /etc/rpsrfsenable -X return 0; -X fi -X -X echo 1 > /etc/rpsrfsenable -X num=1 -X num=$(($num<<$proc)) -X num=$(($num-1)); -X echo $num; -X hex=$(printf "%x\n" $num) -X echo $hex; -X #enable rps -X echo $hex > /sys/class/net/eth0/queues/rx-0/rps_cpus -X echo $hex > /sys/class/net/eth2/queues/rx-0/rps_cpus -X -X #enble rfs -X echo 256 > /proc/sys/net/core/rps_sock_flow_entries -X echo 256 > /sys/class/net/eth0/queues/rx-0/rps_flow_cnt -X echo 256 > /sys/class/net/eth2/queues/rx-0/rps_flow_cnt -} -X -setup_common() { -X init_interfaces $1 $2 $3 -X if [ -n "$ETH0_IP" ] -X then -X setup_interface "0" $ETH0_IP $ETH0_MASK $GW -X fi -X if [ -n "$ETH0_IP6" ] -X then -X setup_interface_ipv6 "0" $ETH0_IP6 $ETH0_IP6_PRELEN -X fi -X setup_interface "1" $ETH1_IP $ETH1_MASK $GW -X if [ -n "$ETH2_IP" ] -X then -X setup_interface "2" $ETH2_IP $ETH2_MASK $GW -X fi -X -X echo $NAME > /etc/hostname -X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon -X hostnamectl set-hostname $NAME -X -X #Nameserver -X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries -X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries -X if [ -n "$internalNS1" ] -X then -X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS1" > /etc/resolv.conf -X fi -X -X if [ -n "$internalNS2" ] -X then -X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS2" >> /etc/resolv.conf -X fi -X if [ -n "$NS1" ] -X then -X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS1" >> /etc/resolv.conf -X fi -X -X if [ -n "$NS2" ] -X then -X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS2" >> /etc/resolv.conf -X fi -X -X if [ -n "$IP6_NS1" ] -X then -X echo "nameserver $IP6_NS1" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $IP6_NS1" >> /etc/resolv.conf -X fi -X if [ -n "$IP6_NS2" ] -X then -X echo "nameserver $IP6_NS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $IP6_NS2" >> /etc/resolv.conf -X fi -X -X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] -X then -X ip route add $MGMTNET via $LOCAL_GW dev eth1 -X fi -X -X ip route delete default -X if [ "$RROUTER" != "1" ] -X then -X gwdev=$3 -X if [ -z "$gwdev" ] -X then -X gwdev="eth0" -X fi -X -X ip route add default via $GW dev $gwdev -X fi -X -X # Workaround to activate vSwitch under VMware -X timeout 3 ping -n -c 3 $GW & -X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] -X then -X timeout 3 ping -n -c 3 $LOCAL_GW & -X #This code is added to address ARP issue by pinging MGMT_GW -X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') -X timeout 3 ping -n -c 3 $MGMT_GW & -X fi -X -X if [ "$HYPERVISOR" == "vmware" ]; then -X ntpq -p &> /dev/null || vmware-toolbox-cmd timesync enable -X fi -} -X -setup_dnsmasq() { -X log_it "Setting up dnsmasq" -X -X touch /etc/dhcpopts.txt -X -X [ -z $DHCP_RANGE ] && [ $ETH0_IP ] && DHCP_RANGE=$ETH0_IP -X [ $ETH0_IP6 ] && DHCP_RANGE_IP6=$ETH0_IP6 -X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" -X #removing the dnsmasq multiple ranges config file. -X rm /etc/dnsmasq.d/multiple_ranges.conf -X -X #get the template -X cp /etc/dnsmasq.conf.tmpl /etc/dnsmasq.conf -X -X if [ -n "$DOMAIN" ] -X then -X #send domain name to dhcp clients -X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\"$DOMAIN\"/ /etc/dnsmasq.conf -X #DNS server will append $DOMAIN to local queries -X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf -X #answer all local domain queries -X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf -X fi -X -X if [ -n "$DNS_SEARCH_ORDER" ] -X then -X sed -i -e "/^[#]*dhcp-option.*=119.*$/d" /etc/dnsmasq.conf -X echo "dhcp-option-force=119,$DNS_SEARCH_ORDER" >> /etc/dnsmasq.conf -X # set the domain search order as a space seprated list for option 15 -X DNS_SEARCH_ORDER=$(echo $DNS_SEARCH_ORDER | sed 's/,/ /g') -X #send domain name to dhcp clients -X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\""$DNS_SEARCH_ORDER"\"/ /etc/dnsmasq.conf -X fi -X -X if [ $DHCP_RANGE ] -X then -X sed -i -e "s/^dhcp-range_ip4=.*$/dhcp-range=$DHCP_RANGE,static/" /etc/dnsmasq.conf -X else -X sed -i -e "s/^dhcp-range_ip4=.*$//" /etc/dnsmasq.conf -X fi -X if [ $DHCP_RANGE_IP6 ] -X then -X sed -i -e "s/^dhcp-range_ip6=.*$/dhcp-range=$DHCP_RANGE_IP6,static/" /etc/dnsmasq.conf -X # For nondefault6 tagged host, don't send dns-server information -X sed -i /nondefault6/d /etc/dnsmasq.conf -X echo "dhcp-option=nondefault6,option6:dns-server" >> /etc/dnsmasq.conf -X else -X sed -i -e "s/^dhcp-range_ip6=.*$//" /etc/dnsmasq.conf -X fi -X -X if [ "$RROUTER" == "1" ] -X then -X DEFAULT_GW=$GUEST_GW -X INTERNAL_DNS=$GUEST_GW -X else -X if [ "$TYPE" == "dhcpsrvr" ] -X then -X DEFAULT_GW=$GW -X else -X DEFAULT_GW=$ETH0_IP -X fi -X INTERNAL_DNS=$ETH0_IP -X fi -X sed -i -e "/^[#]*dhcp-option=option:router.*$/d" /etc/dnsmasq.conf -X [ $DEFAULT_GW ] && echo "dhcp-option=option:router,$DEFAULT_GW" >> /etc/dnsmasq.conf -X -X [ $ETH0_IP ] && [ $NS1 ] && NS="$NS1," -X [ $ETH0_IP ] && [ $NS2 ] && NS="$NS$NS2," -X [ $ETH0_IP6 ] && [ $IP6_NS1 ] && NS6="[$IP6_NS1]," -X [ $ETH0_IP6 ] && [ $IP6_NS2 ] && NS6="$NS6[$IP6_NS2]," -X #for now set up ourself as the dns server as well -X sed -i -e "/^[#]*dhcp-option=6,.*$/d" /etc/dnsmasq.conf -X sed -i -e "/^[#]*dhcp-option=option6:dns-server,.*$/d" /etc/dnsmasq.conf -X if [ "$USE_EXTERNAL_DNS" != "true" ] -X then -X [ $ETH0_IP ] && NS="$INTERNAL_DNS,$NS" -X [ $ETH0_IP6 ] && NS6="[::],$NS6" -X # enable dns -X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf -X else -X # disable dns -X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf -X echo "port=0" >> /etc/dnsmasq.conf -X fi -X NS=${NS%?} -X NS6=${NS6%?} -X [ $ETH0_IP ] && echo "dhcp-option=6,$NS" >> /etc/dnsmasq.conf -X [ $ETH0_IP6 ] && echo "dhcp-option=option6:dns-server,$NS6" >> /etc/dnsmasq.conf -X #adding the name data-server to the /etc/hosts for allowing the access to user-data service and ssh-key reset in every subnet. -X #removing the existing entires to avoid duplicates on restarts. -X sed -i '/data-server/d' /etc/hosts -X if [ -n "$ETH0_IP" ] -X then -X echo "$ETH0_IP data-server" >> /etc/hosts -X fi -X if [ -n "$ETH0_IP6" ] -X then -X echo "$ETH0_IP6 data-server" >> /etc/hosts -X fi -X #add the dhcp-client-update only if dnsmasq version is 2.6 and above -X dnsmasqVersion=$(dnsmasq -v | grep version -m 1 | grep -o "[[:digit:]]\.[[:digit:]]") -X major=$(echo "$dnsmasqVersion" | cut -d '.' -f 1) -X minor=$(echo "$dnsmasqVersion" | cut -d '.' -f 2) -X if [ "$major" -eq '2' -a "$minor" -ge '6' ] || [ "$major" -gt '2' ] -X then -X sed -i -e "/^dhcp-client-update/d" /etc/dnsmasq.conf -X echo 'dhcp-client-update' >> /etc/dnsmasq.conf -X fi -X -X command -v dhcp_release > /dev/null 2>&1 -X no_dhcp_release=$? -X if [ $no_dhcp_release -eq 0 -a -z "$ETH0_IP6" ] -X then -X echo 1 > /var/cache/cloud/dnsmasq_managed_lease -X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf -X else -X echo 0 > /var/cache/cloud/dnsmasq_managed_lease -X fi -} -X -setup_sshd(){ -X local ip=$1 -X local eth=$2 -X [ -f /etc/ssh/sshd_config ] && sed -i -e "s/^[#]*ListenAddress.*$/ListenAddress $ip/" /etc/ssh/sshd_config -X sed -i "/3922/s/eth./$eth/" /etc/iptables/rules.v4 -} -X -setup_vpc_apache2() { -X log_it "Setting up apache web server for VPC" -X systemctl disable apache2 -X clean_ipalias_config -X setup_apache2_common -} -X -clean_ipalias_config() { -X rm -f /etc/apache2/conf.d/ports.*.meta-data.conf -X rm -f /etc/apache2/sites-available/ipAlias* -X rm -f /etc/apache2/sites-enabled/ipAlias* -X rm -f /etc/apache2/conf.d/vhost*.conf -X rm -f /etc/apache2/ports.conf -X rm -f /etc/apache2/vhostexample.conf -X rm -f /etc/apache2/sites-available/* -X rm -f /etc/apache2/sites-enabled/* -X -X rm -rf /etc/failure_config -} -X -setup_apache2_common() { -X sed -i 's/^Include ports.conf.*/# CS: Done by Python CsApp config\n#Include ports.conf/g' /etc/apache2/apache2.conf -X # Disable listing of http://SSVM-IP/icons folder for security issue. see article http://www.i-lateral.com/tutorials/disabling-the-icons-folder-on-an-ubuntu-web-server/ -X [ -f /etc/apache2/mods-available/alias.conf ] && sed -i s/"Options Indexes MultiViews"/"Options -Indexes MultiViews"/ /etc/apache2/mods-available/alias.conf -X -X echo "Options -Indexes" > /var/www/html/.htaccess -} -X -setup_apache2() { -X log_it "Setting up apache web server" -X mkdir -p /var/www -X chown www-data:www-data -R /var/www -X clean_ipalias_config -X setup_apache2_common -X local ip=$1 -} -X -setup_aesni() { -X if [ `grep aes /proc/cpuinfo | wc -l` -gt 0 ] -X then -X modprobe aesni_intel -X fi -} -X -setup_storage_network() { -X if [ x"$STORAGE_IP" == "x" -o x"$STORAGE_NETMASK" == "x" ] -X then -X log_it "Incompleted parameters STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR. Cannot setup storage network" -X return -X fi -X -X echo "" >> /etc/network/interfaces -X echo "auto eth3" >> /etc/network/interfaces -X -X setup_interface "3" "$STORAGE_IP" "$STORAGE_NETMASK" -X [ -n "$MTU" ] && ifconfig eth3 mtu $MTU && echo " mtu $MTU" >> /etc/network/interfaces -X #ip route add "$STORAGE_CIDR" via "$STORAGE_IP" -X log_it "Successfully setup storage network with STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR" -} -X -setup_system_rfc1918_internal() { -X public_ip=`getPublicIp` -X echo "$public_ip" | grep -E "^((127\.)|(10\.)|(172\.1[6-9]\.)|(172\.2[0-9]\.)|(172\.3[0-1]\.)|(192\.168\.))" -X if [ "$?" == "0" ]; then -X log_it "Not setting up route of RFC1918 space to $LOCAL_GW befause $public_ip is RFC1918." -X else -X log_it "Setting up route of RFC1918 space to $LOCAL_GW" -X # Setup general route for RFC 1918 space, as otherwise it will be sent to -X # the public gateway and not work -X # More specific routes that may be set have preference over this generic route. -X ip route add 10.0.0.0/8 via $LOCAL_GW -X ip route add 172.16.0.0/12 via $LOCAL_GW -X ip route add 192.168.0.0/16 via $LOCAL_GW -X fi -} -X -getPublicIp() { -X public_ip=$ETH2_IP -X [ "$ETH2_IP" == "0.0.0.0" ] && public_ip=$ETH1_IP -X echo $public_ip -} -X -setup_ntp() { -X log_it "Setting up NTP" -X NTP_CONF_FILE="/etc/ntp.conf" -X if [ -f $NTP_CONF_FILE ] -X then -X IFS=',' read -a server_list <<< "$NTP_SERVER_LIST" -X for (( iterator=${#server_list[@]}-1 ; iterator>=0 ; iterator-- )) -X do -X server=$(echo ${server_list[iterator]} | tr -d '\r') -X PATTERN="server $server" -X if grep -q "^$PATTERN$" $NTP_CONF_FILE ; then -X sed -i "/^$PATTERN$/d" $NTP_CONF_FILE -X fi -X sed -i "0,/^server/s//$PATTERN\nserver/" $NTP_CONF_FILE -X done -X systemctl enable ntp -X else -X log_it "NTP configuration file not found" -X fi -} -X -routing_svcs() { -X echo "haproxy apache2" > /var/cache/cloud/enabled_svcs -X echo "cloud nfs-common portmap" > /var/cache/cloud/disabled_svcs -X if [ "$RROUTER" -eq "1" ] -X then -X echo "keepalived conntrackd" >> /var/cache/cloud/enabled_svcs -X echo "dnsmasq" >> /var/cache/cloud/disabled_svcs -X else -X echo "dnsmasq" >> /var/cache/cloud/enabled_svcs -X echo "keepalived conntrackd " >> /var/cache/cloud/disabled_svcs -X fi -} -X -parse_cmd_line() { -X CMDLINE=$(cat /var/cache/cloud/cmdline) -X TYPE="unknown" -X BOOTPROTO="static" -X DISABLE_RP_FILTER="false" -X STORAGE_IP="" -X STORAGE_NETMASK="" -X STORAGE_CIDR="" -X VM_PASSWORD="" -X -X CHEF_TMP_FILE=/tmp/cmdline.json -X COMMA="\t" -X echo -e "{\n\"type\": \"cmdline\"," > ${CHEF_TMP_FILE} -X echo -e "\"cmd_line\": {" >> ${CHEF_TMP_FILE} -X -X for i in $CMDLINE -X do -X # search for foo=bar pattern and cut out foo -X KEY=$(echo $i | cut -d= -f1) -X VALUE=$(echo $i | cut -d= -f2) -X echo -en ${COMMA} >> ${CHEF_TMP_FILE} -X # Two lines so values do not accidently interpretted as escapes!! -X echo -n \"${KEY}\"': '\"${VALUE}\" >> ${CHEF_TMP_FILE} -X COMMA=",\n\t" -X case $KEY in -X disable_rp_filter) -X export DISABLE_RP_FILTER=$VALUE -X ;; -X eth0ip) -X export ETH0_IP=$VALUE -X ;; -X eth1ip) -X export ETH1_IP=$VALUE -X ;; -X eth2ip) -X export ETH2_IP=$VALUE -X ;; -X host) -X export MGMT_HOST=$VALUE -X ;; -X gateway) -X export GW=$VALUE -X ;; -X ip6gateway) -X export IP6GW=$VALUE -X ;; -X eth0mask) -X export ETH0_MASK=$VALUE -X ;; -X eth1mask) -X export ETH1_MASK=$VALUE -X ;; -X eth2mask) -X export ETH2_MASK=$VALUE -X ;; -X eth0ip6) -X export ETH0_IP6=$VALUE -X ;; -X eth0ip6prelen) -X export ETH0_IP6_PRELEN=$VALUE -X ;; -X internaldns1) -X export internalNS1=$VALUE -X ;; -X internaldns2) -X export internalNS2=$VALUE -X ;; -X dns1) -X export NS1=$VALUE -X ;; -X dns2) -X export NS2=$VALUE -X ;; -X ip6dns1) -X export IP6_NS1=$VALUE -X ;; -X ip6dns2) -X export IP6_NS2=$VALUE -X ;; -X domain) -X export DOMAIN=$VALUE -X ;; -X dnssearchorder) -X export DNS_SEARCH_ORDER=$VALUE -X ;; -X useextdns) -X export USE_EXTERNAL_DNS=$VALUE -X ;; -X mgmtcidr) -X export MGMTNET=$VALUE -X ;; -X localgw) -X export LOCAL_GW=$VALUE -X ;; -X template) -X export TEMPLATE=$VALUE -X ;; -X sshonguest) -X export SSHONGUEST=$VALUE -X ;; -X name) -X export NAME=$VALUE -X ;; -X dhcprange) -X export DHCP_RANGE=$(echo $VALUE | tr ':' ',') -X ;; -X bootproto) -X export BOOTPROTO=$VALUE -X ;; -X type) -X export TYPE=$VALUE -X ;; -X defaultroute) -X export DEFAULTROUTE=$VALUE -X ;; -X redundant_router) -X export RROUTER=$VALUE -X ;; -X redundant_state) -X export RROUTER_STATE=$VALUE -X ;; -X guestgw) -X export GUEST_GW=$VALUE -X ;; -X guestbrd) -X export GUEST_BRD=$VALUE -X ;; -X guestcidrsize) -X export GUEST_CIDR_SIZE=$VALUE -X ;; -X router_pr) -X export ROUTER_PR=$VALUE -X ;; -X extra_pubnics) -X export EXTRA_PUBNICS=$VALUE -X ;; -X nic_macs) -X export NIC_MACS=$VALUE -X ;; -X mtu) -X export MTU=$VALUE -X ;; -X storageip) -X export STORAGE_IP=$VALUE -X ;; -X storagenetmask) -X export STORAGE_NETMASK=$VALUE -X ;; -X storagecidr) -X export STORAGE_CIDR=$VALUE -X ;; -X vmpassword) -X export VM_PASSWORD=$VALUE -X ;; -X vpccidr) -X export VPCCIDR=$VALUE -X ;; -X cidrsize) -X export CIDR_SIZE=$VALUE -X ;; -X advert_int) -X export ADVERT_INT=$VALUE -X ;; -X ntpserverlist) -X export NTP_SERVER_LIST=$VALUE -X ;; -X esac -X done -X echo -e "\n\t}\n}" >> ${CHEF_TMP_FILE} -X if [ "$TYPE" != "unknown" ] -X then -X mv ${CHEF_TMP_FILE} /var/cache/cloud/cmd_line.json -X fi -X -X [ $ETH0_IP ] && export LOCAL_ADDRS=$ETH0_IP -X [ $ETH0_IP6 ] && export LOCAL_ADDRS=$ETH0_IP6 -X [ $ETH0_IP ] && [ $ETH0_IP6 ] && export LOCAL_ADDRS="$ETH0_IP,$ETH0_IP6" -X -X # Randomize cloud password so only ssh login is allowed -X echo "cloud:`openssl rand -base64 32`" | chpasswd -X -X if [ x"$VM_PASSWORD" != x"" ] -X then -X echo "root:$VM_PASSWORD" | chpasswd -X fi -} -X -parse_cmd_line -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/common.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/common.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/common.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/common.sh': 'MD5 check failed' - ) << \SHAR_EOF -8754c81bacd82458e4ce221b476505ea cloud_scripts/opt/cloud/bin/setup/common.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/common.sh'` -ne 22472 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/common.sh' is not 22472" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -dhcpsrvr_svcs() { -X echo "dnsmasq apache2" > /var/cache/cloud/enabled_svcs -X echo "cloud nfs-common conntrackd keepalived haproxy portmap" > /var/cache/cloud/disabled_svcs -} -X -setup_dhcpsrvr() { -X log_it "Setting up dhcp server system vm" -X setup_common eth0 eth1 -X setup_dnsmasq -X setup_apache2 $ETH0_IP -X -X sed -i /$NAME/d /etc/hosts -X [ $ETH0_IP ] && echo "$ETH0_IP $NAME" >> /etc/hosts -X [ $ETH0_IP6 ] && echo "$ETH0_IP6 $NAME" >> /etc/hosts -X -X enable_irqbalance 0 -X enable_fwding 0 -X -X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 -X -X #Only allow DNS service for current network -X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X -X if [ "$SSHONGUEST" == "true" ] -X then -X setup_sshd $ETH0_IP "eth0" -X else -X setup_sshd $ETH1_IP "eth1" -X fi -} -X -dhcpsrvr_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute dhcpsrvr_svcs" -X exit 1 -fi -setup_dhcpsrvr -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh': 'MD5 check failed' - ) << \SHAR_EOF -08afc46420e5e388ba6be68cfdbd4a59 cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh'` -ne 1985 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' is not 1985" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/cloud-early-config ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/cloud-early-config (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/cloud-early-config (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" -X -# Clear boot up flag, it would be created by rc.local after boot up done -mkdir -p /var/cache/cloud -rm -f /var/cache/cloud/boot_up_done -X -[ -x /sbin/ifup ] || exit 0 -X -X. /lib/lsb/init-functions -X -log_it() { -X echo "$(date) $@" >> /var/log/cloud.log -X log_action_msg "$@" -} -X -patch() { -X local PATCH_MOUNT=/media/cdrom -X local patchfile=$PATCH_MOUNT/cloud-scripts.tgz -X local privkey=$PATCH_MOUNT/authorized_keys -X local md5file=/var/cache/cloud/cloud-scripts-signature -X local cdrom_dev= -X mkdir -p $PATCH_MOUNT -X -X if [ -e /dev/xvdd ]; then -X cdrom_dev=/dev/xvdd -X elif [ -e /dev/cdrom ]; then -X cdrom_dev=/dev/cdrom -X elif [ -e /dev/cdrom1 ]; then -X cdrom_dev=/dev/cdrom1 -X elif [ -e /dev/cdrom2 ]; then -X cdrom_dev=/dev/cdrom2 -X elif [ -e /dev/cdrom3 ]; then -X cdrom_dev=/dev/cdrom3 -X fi -X -X if [ -f /var/cache/cloud/authorized_keys ]; then -X privkey=/var/cache/cloud/authorized_keys -X fi -X -X if [ -n "$cdrom_dev" ]; then -X mount -o ro $cdrom_dev $PATCH_MOUNT -X local oldmd5= -X [ -f ${md5file} ] && oldmd5=$(cat ${md5file}) -X local newmd5= -X [ -f ${patchfile} ] && newmd5=$(md5sum ${patchfile} | awk '{print $1}') -X -X log_it "Scripts checksum detected: oldmd5=$oldmd5 newmd5=$newmd5" -X if [ "$oldmd5" != "$newmd5" ] && [ -f ${patchfile} ] && [ "$newmd5" != "" ] -X then -X tar xzf $patchfile -C / -X echo ${newmd5} > ${md5file} -X log_it "Patched scripts using $patchfile" -X touch /var/cache/cloud/patch.required -X fi -X -X if [ -f $privkey ]; then -X cp -f $privkey /root/.ssh/ -X chmod go-rwx /root/.ssh/authorized_keys -X fi -X fi -X -X return 0 -} -X -start() { -X log_it "Executing cloud-early-config" -X -X # Clear /tmp for file lock -X rm -f /tmp/*.lock -X rm -f /tmp/rrouter_bumped -X rm -f /root/.rnd -X echo "" > /root/.ssh/known_hosts -X -X patch -X sync -X /opt/cloud/bin/setup/bootstrap.sh -X -X log_it "Finished setting up systemvm" -X exit 0 -} -X -start -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/cloud-early-config failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config': 'MD5 check failed' - ) << \SHAR_EOF -c9e5973de3771fd5f5e9b490c60db970 cloud_scripts/opt/cloud/bin/setup/cloud-early-config -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config'` -ne 2765 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' is not 2765" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/default.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/default.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/default.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/default.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/default.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_default() { -X cat > /etc/network/interfaces << EOF -auto lo -iface lo inet loopback -EOF -X cp -f /etc/iptables/rt_tables_init /etc/iproute2/rt_tables -} -X -setup_default -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/default.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/default.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/default.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/default.sh': 'MD5 check failed' - ) << \SHAR_EOF -20e3a01cb77930eba6438de6d9a3f193 cloud_scripts/opt/cloud/bin/setup/default.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/default.sh'` -ne 1002 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/default.sh' is not 1002" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/loadbalancer.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/loadbalancer.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/loadbalancer.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -X -# $Id: loadbalancer.sh 9947 2010-06-25 19:34:24Z manuel $ $HeadURL: svn://svn.lab.vmops.com/repos/vmdev/java/patches/xenserver/root/loadbalancer.sh $ -# loadbalancer.sh -- reconfigure loadbalancer rules -# @VERSION@ -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s: -i -a -d -f -s \n" $(basename $0) >&2 -} -X -# set -x -X -# ensure that the nic has the public ip we are load balancing on -ip_entry() { -X local added=$1 -X local removed=$2 -X -X if [ "$added" == "none" ] -X then -X added="" -X fi -X -X if [ "$removed" == "none" ] -X then -X removed="" -X fi -X -X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") -X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") -X -X for i in $a -X do -X local pubIp=$(echo $i | cut -d: -f1) -X logger -t cloud "Adding public ip $pubIp for load balancing" -X for vif in $VIF_LIST; do -X sudo ip addr add dev $vif $pubIp/32 -X #ignore error since it is because the ip is already there -X done -X done -X -X for i in $r -X do -X logger -t cloud "Removing public ips for deleted loadbalancers" -X local pubIp=$(echo $i | cut -d: -f1) -X logger -t cloud "Removing public ip $pubIp for deleted loadbalancers" -X for vif in $VIF_LIST; do -X sudo ip addr del $pubIp/32 dev $vif -X done -X done -X -X return 0 -} -get_lb_vif_list() { -# add eth0 to the VIF_LIST if it is not there, this allows guest VMs to use the LB service. -X local lb_list="$VIF_LIST eth0"; -X lb_list=$(echo $lb_list | tr " " "\n" | sort | uniq | tr "\n" " ") -X echo $lb_list -} -fw_remove_backup() { -X local lb_vif_list=$(get_lb_vif_list) -X for vif in $lb_vif_list; do -X sudo iptables -F back_load_balancer_$vif 2> /dev/null -X sudo iptables -D INPUT -i $vif -p tcp -j back_load_balancer_$vif 2> /dev/null -X sudo iptables -X back_load_balancer_$vif 2> /dev/null -X done -X sudo iptables -F back_lb_stats 2> /dev/null -X sudo iptables -D INPUT -p tcp -j back_lb_stats 2> /dev/null -X sudo iptables -X back_lb_stats 2> /dev/null -} -fw_restore() { -X local lb_vif_list=$(get_lb_vif_list) -X for vif in $lb_vif_list; do -X sudo iptables -F load_balancer_$vif 2> /dev/null -X sudo iptables -D INPUT -i $vif -p tcp -j load_balancer_$vif 2> /dev/null -X sudo iptables -X load_balancer_$vif 2> /dev/null -X sudo iptables -E back_load_balancer_$vif load_balancer_$vif 2> /dev/null -X done -X sudo iptables -F lb_stats 2> /dev/null -X sudo iptables -D INPUT -p tcp -j lb_stats 2> /dev/null -X sudo iptables -X lb_stats 2> /dev/null -X sudo iptables -E back_lb_stats lb_stats 2> /dev/null -} -# firewall entry to ensure that haproxy can receive on specified port -fw_entry() { -X local added=$1 -X local removed=$2 -X local stats=$3 -X -X if [ "$added" == "none" ] -X then -X added="" -X fi -X -X if [ "$removed" == "none" ] -X then -X removed="" -X fi -X -X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") -X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") -X -# back up the iptable rules by renaming before creating new. -X local lb_vif_list=$(get_lb_vif_list) -X for vif in $lb_vif_list; do -X sudo iptables -E load_balancer_$vif back_load_balancer_$vif 2> /dev/null -X sudo iptables -N load_balancer_$vif 2> /dev/null -X sudo iptables -A INPUT -i $vif -p tcp -j load_balancer_$vif -X done -X sudo iptables -E lb_stats back_lb_stats 2> /dev/null -X sudo iptables -N lb_stats 2> /dev/null -X sudo iptables -A INPUT -p tcp -j lb_stats -X -X for i in $a -X do -X local pubIp=$(echo $i | cut -d: -f1) -X local dport=$(echo $i | cut -d: -f2) -X local lb_vif_list=$(get_lb_vif_list) -X for vif in $lb_vif_list; do -X -#TODO : The below delete will be used only when we upgrade the from older verion to the newer one , the below delete become obsolute in the future. -X sudo iptables -D INPUT -i $vif -p tcp -d $pubIp --dport $dport -j ACCEPT 2> /dev/null -X -X sudo iptables -A load_balancer_$vif -p tcp -d $pubIp --dport $dport -j ACCEPT -X -X if [ $? -gt 0 ] -X then -X return 1 -X fi -X done -X done -X local pubIp=$(echo $stats | cut -d: -f1) -X local dport=$(echo $stats | cut -d: -f2) -X local cidrs=$(echo $stats | cut -d: -f3 | sed 's/-/,/') -X sudo iptables -A lb_stats -s $cidrs -p tcp -m state --state NEW -d $pubIp --dport $dport -j ACCEPT -X -X -#TODO : The below delete in the for-loop will be used only when we upgrade the from older verion to the newer one , the below delete become obsolute in the future. -X for i in $r -X do -X local pubIp=$(echo $i | cut -d: -f1) -X local dport=$(echo $i | cut -d: -f2) -X -X for vif in $VIF_LIST; do -X sudo iptables -D INPUT -i $vif -p tcp -d $pubIp --dport $dport -j ACCEPT 2> /dev/null -X done -X done -X -X return 0 -} -X -#Hot reconfigure HA Proxy in the routing domain -reconfig_lb() { -X logger -t cloud "Reconfiguring loadbalancer using $1" -X /root/reconfigLB.sh $1 -X return $? -} -X -# Restore the HA Proxy to its previous state, and revert iptables rules on DomR -restore_lb() { -X logger -t cloud "Restoring HA Proxy to previous state" -X # Copy the old version of haproxy.cfg into the file that reconfigLB.sh uses -X cp /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg.new -X -X if [ $? -eq 0 ] -X then -X # Run reconfigLB.sh again -X /root/reconfigLB.sh /etc/haproxy/haproxy.cfg.new -X fi -} -X -get_vif_list() { -X local vif_list="" -X for i in /sys/class/net/eth*; do -X vif=$(basename $i); -X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] -X then -X vif_list="$vif_list $vif"; -X fi -X done -X if [ "$vif_list" == "" ] -X then -X vif_list="eth0" -X fi -X -X logger -t cloud "Loadbalancer public interfaces = $vif_list" -X echo $vif_list -} -X -mflag= -iflag= -aflag= -dflag= -fflag= -sflag= -X -while getopts 'i:a:d:f:s:' OPTION -do -X case $OPTION in -X i) iflag=1 -X domRIp="$OPTARG" -X ;; -X a) aflag=1 -X addedIps="$OPTARG" -X ;; -X d) dflag=1 -X removedIps="$OPTARG" -X ;; -X f) fflag=1 -X cfgfile="$OPTARG" -X ;; -X s) sflag=1 -X statsIp="$OPTARG" -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [ "$addedIps" == "" ] -then -X addedIps="none" -fi -X -X -if [ "$removedIps" == "" ] -then -X removedIps="none" -fi -X -VIF_LIST=$(get_vif_list) -X -X -if [ "$addedIps" == "" ] -then -X addedIps="none" -fi -X -if [ "$removedIps" == "" ] -then -X removedIps="none" -fi -X -#FIXME: make this explicit via check on vm type or passed in flag -if [ "$VIF_LIST" == "eth0" ] -then -X ip_entry $addedIps $removedIps -fi -X -# hot reconfigure haproxy -reconfig_lb $cfgfile -X -if [ $? -gt 0 ] -then -X logger -t cloud "Reconfiguring loadbalancer failed" -X #FIXME: make this explicit via check on vm type or passed in flag -X if [ "$VIF_LIST" == "eth0" ] -X then -X ip_entry $removedIps $addedIps -X fi -X unlock_exit 1 $lock $locked -fi -X -# iptables entry to ensure that haproxy receives traffic -fw_entry $addedIps $removedIps $statsIp -X -if [ $? -gt 0 ] -then -X logger -t cloud "Failed to apply firewall rules for load balancing, reverting HA Proxy config" -X # Restore the LB -X restore_lb -X -X logger -t cloud "Reverting firewall config" -X # Revert iptables rules on DomR -X fw_restore -X -X #FIXME: make this explicit via check on vm type or passed in flag -X if [ "$VIF_LIST" == "eth0" ] -X then -X logger -t cloud "Reverting ip address changes to eth0" -X ip_entry $removedIps $addedIps -X fi -X -X unlock_exit 1 $lock $locked -else -X # Remove backedup iptable rules -X fw_remove_backup -fi -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/loadbalancer.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/loadbalancer.sh': 'MD5 check failed' - ) << \SHAR_EOF -6da53e4d9dd0b11f6fa334c6f583f8cd cloud_scripts/opt/cloud/bin/loadbalancer.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/loadbalancer.sh'` -ne 8234 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' is not 8234" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/baremetal_snat.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/baremetal_snat.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/baremetal_snat.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' && -#!/bin/bash -X -#Licensed to the Apache Software Foundation (ASF) under one -#or more contributor license agreements. See the NOTICE file -#distributed with this work for additional information -#regarding copyright ownership. The ASF licenses this file -#to you under the Apache License, Version 2.0 (the -#"License"); you may not use this file except in compliance -#with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -#Unless required by applicable law or agreed to in writing, -#software distributed under the License is distributed on an -#"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -#KIND, either express or implied. See the License for the -#specific language governing permissions and limitations -#under the License. -X -set +u -X -mgmt_nic_ip=$1 -internal_server_ip=$2 -gateway_ip=$3 -X -ip route | grep "$internal_server_ip" > /dev/null -X -if [ $? -ne 0 ]; then -X ip route add $internal_server_ip via $gateway_ip -fi -X -iptables-save | grep -- "-A POSTROUTING -d $internal_server_ip" > /dev/null -X -if [ $? -ne 0 ]; then -X iptables -t nat -A POSTROUTING -d $internal_server_ip -j SNAT --to-source $mgmt_nic_ip -fi -X -X -iptables-save | grep -- "-A INPUT -i eth0 -p udp -m udp --dport 69 -j ACCEPT" > /dev/null -if [ $? -ne 0 ]; then -X iptables -I INPUT -i eth0 -p udp -m udp --dport 69 -j ACCEPT -fi -X -iptables-save | grep -- "-A FORWARD -i eth1 -o eth0 -j ACCEPT" > /dev/null -if [ $? -ne 0 ]; then -X iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT -fi -X -rule="-A FORWARD -d $internal_server_ip/32 -i eth0 -o eth1 -j ACCEPT" -iptables-save | grep -- "$rule" > /dev/null -if [ $? -ne 0 ]; then -X iptables -I FORWARD -d $internal_server_ip/32 -i eth0 -o eth1 -j ACCEPT -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/baremetal_snat.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh': 'MD5 check failed' - ) << \SHAR_EOF -acab3e2b25ee898e7dd05c4e77b15569 cloud_scripts/opt/cloud/bin/baremetal_snat.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh'` -ne 1717 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' is not 1717" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_vpnusers.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vpnusers.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vpnusers.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import copy -X -X -def merge(dbag, data): -X dbagc = copy.deepcopy(dbag) -X -X print dbag -X print data -X if "vpn_users" not in data: -X return dbagc -X -X # remove previously deleted user from the dict -X for user in dbagc.keys(): -X if user == 'id': -X continue -X userrec = dbagc[user] -X add = userrec['add'] -X if not add: -X del(dbagc[user]) -X -X for user in data['vpn_users']: -X username = user['user'] -X add = user['add'] -X if username not in dbagc.keys(): -X dbagc[username] = user -X elif username in dbagc.keys() and not add: -X dbagc[username] = user -X -X return dbagc -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_vpnusers.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py': 'MD5 check failed' - ) << \SHAR_EOF -d54ff81fd9901ecc0bfbe9528343e238 cloud_scripts/opt/cloud/bin/cs_vpnusers.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py'` -ne 1469 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' is not 1469" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/merge.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/merge.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/merge.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/merge.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/merge.py' && -#!/usr/bin/python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import json -import os -import uuid -import logging -import gzip -import shutil -import cs_ip -import cs_guestnetwork -import cs_cmdline -import cs_vmp -import cs_network_acl -import cs_firewallrules -import cs_loadbalancer -import cs_monitorservice -import cs_vmdata -import cs_dhcp -import cs_forwardingrules -import cs_site2sitevpn -import cs_remoteaccessvpn -import cs_vpnusers -import cs_staticroutes -X -X -class DataBag: -X -X DPATH = "/etc/cloudstack" -X -X def __init__(self): -X self.bdata = {} -X -X def load(self): -X data = self.bdata -X if not os.path.exists(self.DPATH): -X os.makedirs(self.DPATH) -X self.fpath = os.path.join(self.DPATH, self.key + '.json') -X -X try: -X with open(self.fpath, 'r') as _fh: -X logging.debug("Loading data bag type %s", self.key) -X data = json.load(_fh) -X except (IOError, ValueError): -X logging.debug("Caught load error, creating empty data bag type %s", self.key) -X data.update({"id": self.key}) -X finally: -X self.dbag = data -X -X def save(self, dbag): -X try: -X with open(self.fpath, 'w') as _fh: -X logging.debug("Writing data bag type %s", self.key) -X json.dump( -X dbag, _fh, -X sort_keys=True, -X indent=2 -X ) -X except IOError: -X logging.error("Could not write data bag %s", self.key) -X -X def getDataBag(self): -X return self.dbag -X -X def setKey(self, key): -X self.key = key -X -X -class updateDataBag: -X -X DPATH = "/etc/cloudstack" -X -X def __init__(self, qFile): -X self.qFile = qFile -X self.fpath = '' -X self.bdata = {} -X self.process() -X -X def process(self): -X self.db = DataBag() -X if (self.qFile.type == "staticnatrules" or self.qFile.type == "forwardrules"): -X self.db.setKey("forwardingrules") -X else: -X self.db.setKey(self.qFile.type) -X dbag = self.db.load() -X logging.info("Command of type %s received", self.qFile.type) -X -X if self.qFile.type == 'ips': -X dbag = self.processIP(self.db.getDataBag()) -X elif self.qFile.type == 'guestnetwork': -X dbag = self.processGuestNetwork(self.db.getDataBag()) -X elif self.qFile.type == 'cmdline': -X dbag = self.processCL(self.db.getDataBag()) -X elif self.qFile.type == 'vmpassword': -X dbag = self.processVMpassword(self.db.getDataBag()) -X elif self.qFile.type == 'networkacl': -X dbag = self.process_network_acl(self.db.getDataBag()) -X elif self.qFile.type == 'firewallrules': -X dbag = self.process_firewallrules(self.db.getDataBag()) -X elif self.qFile.type == 'loadbalancer': -X dbag = self.process_loadbalancer(self.db.getDataBag()) -X elif self.qFile.type == 'monitorservice': -X dbag = self.process_monitorservice(self.db.getDataBag()) -X elif self.qFile.type == 'vmdata': -X dbag = self.processVmData(self.db.getDataBag()) -X elif self.qFile.type == 'dhcpentry': -X dbag = self.process_dhcp_entry(self.db.getDataBag()) -X elif self.qFile.type == 'staticnatrules' or self.qFile.type == 'forwardrules': -X dbag = self.processForwardingRules(self.db.getDataBag()) -X elif self.qFile.type == 'site2sitevpn': -X dbag = self.process_site2sitevpn(self.db.getDataBag()) -X elif self.qFile.type == 'remoteaccessvpn': -X dbag = self.process_remoteaccessvpn(self.db.getDataBag()) -X elif self.qFile.type == 'vpnuserlist': -X dbag = self.process_vpnusers(self.db.getDataBag()) -X elif self.qFile.type == 'staticroutes': -X dbag = self.process_staticroutes(self.db.getDataBag()) -X elif self.qFile.type == 'ipaliases': -X self.db.setKey('ips') -X self.db.load() -X dbag = self.process_ipaliases(self.db.getDataBag()) -X elif self.qFile.type == 'dhcpconfig': -X logging.error("I don't think I need %s anymore", self.qFile.type) -X return -X else: -X logging.error("Error I do not know what to do with file of type %s", self.qFile.type) -X return -X self.db.save(dbag) -X -X def processGuestNetwork(self, dbag): -X d = self.qFile.data -X dp = {} -X dp['public_ip'] = d['router_guest_ip'] -X dp['netmask'] = d['router_guest_netmask'] -X dp['source_nat'] = False -X dp['add'] = d['add'] -X dp['one_to_one_nat'] = False -X dp['gateway'] = d['router_guest_gateway'] -X dp['nic_dev_id'] = d['device'][3:] -X dp['nw_type'] = 'guest' -X dp = PrivateGatewayHack.update_network_type_for_privategateway(dbag, dp) -X qf = QueueFile() -X qf.load({'ip_address': [dp], 'type': 'ips'}) -X if 'domain_name' not in d.keys() or d['domain_name'] == '': -X d['domain_name'] = "cloudnine.internal" -X -X d = PrivateGatewayHack.update_network_type_for_privategateway(dbag, d) -X return cs_guestnetwork.merge(dbag, d) -X -X def process_dhcp_entry(self, dbag): -X return cs_dhcp.merge(dbag, self.qFile.data) -X -X def process_site2sitevpn(self, dbag): -X return cs_site2sitevpn.merge(dbag, self.qFile.data) -X -X def process_remoteaccessvpn(self, dbag): -X return cs_remoteaccessvpn.merge(dbag, self.qFile.data) -X -X def process_vpnusers(self, dbag): -X return cs_vpnusers.merge(dbag, self.qFile.data) -X -X def process_network_acl(self, dbag): -X return cs_network_acl.merge(dbag, self.qFile.data) -X -X def process_firewallrules(self, dbag): -X return cs_firewallrules.merge(dbag, self.qFile.data) -X -X def process_loadbalancer(self, dbag): -X return cs_loadbalancer.merge(dbag, self.qFile.data) -X -X def process_monitorservice(self, dbag): -X return cs_monitorservice.merge(dbag, self.qFile.data) -X -X def process_staticroutes(self, dbag): -X return cs_staticroutes.merge(dbag, self.qFile.data) -X -X def processVMpassword(self, dbag): -X return cs_vmp.merge(dbag, self.qFile.data) -X -X def processForwardingRules(self, dbag): -X # to be used by both staticnat and portforwarding -X return cs_forwardingrules.merge(dbag, self.qFile.data) -X -X def processIP(self, dbag): -X for ip in self.qFile.data["ip_address"]: -X dbag = cs_ip.merge(dbag, ip) -X return dbag -X -X def processCL(self, dbag): -X # Convert the ip stuff to an ip object and pass that into cs_ip_merge -X # "eth0ip": "192.168.56.32", -X # "eth0mask": "255.255.255.0", -X self.newData = [] -X if (self.qFile.data['cmd_line']['type'] == "router"): -X self.processCLItem('0', "guest") -X self.processCLItem('1', "control") -X self.processCLItem('2', "public") -X elif (self.qFile.data['cmd_line']['type'] == "vpcrouter"): -X self.processCLItem('0', "control") -X elif (self.qFile.data['cmd_line']['type'] == "dhcpsrvr"): -X self.processCLItem('0', "guest") -X self.processCLItem('1', "control") -X elif (self.qFile.data['cmd_line']['type'] == "ilbvm"): -X self.processCLItem('0', "guest") -X self.processCLItem('1', "control") -X -X return cs_cmdline.merge(dbag, self.qFile.data) -X -X def processCLItem(self, num, nw_type): -X key = 'eth' + num + 'ip' -X dp = {} -X if(key in self.qFile.data['cmd_line']): -X dp['public_ip'] = self.qFile.data['cmd_line'][key] -X dp['netmask'] = self.qFile.data['cmd_line']['eth' + num + 'mask'] -X dp['source_nat'] = False -X dp['add'] = True -X dp['one_to_one_nat'] = False -X if nw_type == "public": -X dp['gateway'] = self.qFile.data['cmd_line']['gateway'] -X else: -X if('localgw' in self.qFile.data['cmd_line']): -X dp['gateway'] = self.qFile.data['cmd_line']['localgw'] -X else: -X dp['gateway'] = '' -X dp['nic_dev_id'] = num -X dp['nw_type'] = nw_type -X qf = QueueFile() -X qf.load({'ip_address': [dp], 'type': 'ips'}) -X -X def processVmData(self, dbag): -X cs_vmdata.merge(dbag, self.qFile.data) -X return dbag -X -X def process_ipaliases(self, dbag): -X nic_dev = None -X # Should be a way to deal with this better -X for intf, data in dbag.items(): -X if intf == 'id': -X continue -X elif any([net['nw_type'] == 'guest' for net in data]): -X nic_dev = intf -X break -X -X assert nic_dev is not None, 'Unable to determine Guest interface' -X -X nic_dev_id = nic_dev[3:] -X -X for alias in self.qFile.data['aliases']: -X ip = { -X 'add': not alias['revoke'], -X 'nw_type': 'guest', -X 'public_ip': alias['ip_address'], -X 'netmask': alias['netmask'], -X 'nic_dev_id': nic_dev_id -X } -X dbag = cs_ip.merge(dbag, ip) -X return dbag -X -X -class QueueFile: -X -X fileName = '' -X configCache = "/var/cache/cloud" -X keep = True -X data = {} -X -X def load(self, data): -X if data is not None: -X self.data = data -X self.type = self.data["type"] -X updateDataBag(self) -X return -X filename = '{cache_location}/{json_file}'.format(cache_location=self.configCache, json_file=self.fileName) -X try: -X handle = open(filename) -X except IOError as exception: -X error_message = ("Exception occurred with the following exception error '{error}'. Could not open '{filename}'. " -X "It seems that the file has already been moved.".format(error=exception, filename=filename)) -X logging.error(error_message) -X else: -X logging.info("Continuing with the processing of file '{filename}'".format(filename=filename)) -X -X self.data = json.load(handle) -X self.type = self.data["type"] -X handle.close() -X if self.keep: -X self.__moveFile(filename, self.configCache + "/processed") -X else: -X logging.debug("Processed file deleted: %s and not kept in /processed", filename) -X os.remove(filename) -X updateDataBag(self) -X -X def setFile(self, name): -X self.fileName = name -X -X def getType(self): -X return self.type -X -X def getData(self): -X return self.data -X -X def setPath(self, path): -X self.configCache = path -X -X def __moveFile(self, origPath, path): -X if not os.path.exists(path): -X os.makedirs(path) -X originalName = os.path.basename(origPath) -X if originalName.count(".") == 1: -X originalName += "." + str(uuid.uuid4()) -X zipped_file_name = path + "/" + originalName + ".gz" -X with open(origPath, 'rb') as f_in, gzip.open(zipped_file_name, 'wb') as f_out: -X shutil.copyfileobj(f_in, f_out) -X os.remove(origPath) -X -X logging.debug("Processed file written to %s", zipped_file_name) -X -X -class PrivateGatewayHack: -X -X @classmethod -X def update_network_type_for_privategateway(cls, dbag, data): -X ip = data['router_guest_ip'] if 'router_guest_ip' in data.keys() else data['public_ip'] -X -X initial_data = cls.load_inital_data() -X has_private_gw_ip = cls.if_config_has_privategateway(initial_data) -X private_gw_matches = 'privategateway' in initial_data['config'] and cls.ip_matches_private_gateway_ip(ip, initial_data['config']['privategateway']) -X -X if has_private_gw_ip and private_gw_matches: -X data['nw_type'] = "public" -X logging.debug("Updating nw_type for ip %s" % ip) -X else: -X logging.debug("Not updating nw_type for ip %s because has_private_gw_ip = %s and private_gw_matches = %s " % (ip, has_private_gw_ip, private_gw_matches)) -X return data -X -X @classmethod -X def if_config_has_privategateway(cls, dbag): -X return 'privategateway' in dbag['config'].keys() and dbag['config']['privategateway'] != "None" -X -X @classmethod -X def ip_matches_private_gateway_ip(cls, ip, private_gateway_ip): -X new_ip_matches_private_gateway_ip = False -X if ip == private_gateway_ip: -X new_ip_matches_private_gateway_ip = True -X return new_ip_matches_private_gateway_ip -X -X @classmethod -X def load_inital_data(cls): -X initial_data_bag = DataBag() -X initial_data_bag.setKey('cmdline') -X initial_data_bag.load() -X initial_data = initial_data_bag.getDataBag() -X logging.debug("Initial data = %s" % initial_data) -X -X return initial_data -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/merge.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/merge.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/merge.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/merge.py': 'MD5 check failed' - ) << \SHAR_EOF -dc7c85d58b4e5f38ae61c82679523884 cloud_scripts/opt/cloud/bin/merge.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/merge.py'` -ne 13492 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/merge.py' is not 13492" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/master.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/master.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/master.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/master.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/master.py -M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2!&875L="(I"BAO<'1I -M;VYS+"!A/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/master.py': 'MD5 check failed' - ) << \SHAR_EOF -602ac6725c182da5ffa17760b2fe3ba5 cloud_scripts/opt/cloud/bin/master.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/master.py'` -ne 2040 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/master.py' is not 2040" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/set_redundant.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/set_redundant.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/set_redundant.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/set_redundant.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/set_redundant.py -M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/set_redundant.py': 'MD5 check failed' - ) << \SHAR_EOF -648b240f11d938ebd185d0e2a75004b8 cloud_scripts/opt/cloud/bin/set_redundant.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/set_redundant.py'` -ne 1663 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/set_redundant.py' is not 1663" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/checks2svpn.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checks2svpn.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/checks2svpn.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -if [ -z $1 ] -then -X echo "Fail to find VPN peer address!" -X exit 1 -fi -X -ipsec status vpn-$1 > /tmp/vpn-$1.status -X -cat /tmp/vpn-$1.status | grep "ESTABLISHED" > /dev/null -ipsecok=$? -if [ $ipsecok -ne 0 ] -then -X echo -n "IPsec SA not found;" -X echo "Site-to-site VPN have not connected" -X exit 11 -fi -echo -n "IPsec SA found;" -echo "Site-to-site VPN have connected" -Xexit 0 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/checks2svpn.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checks2svpn.sh': 'MD5 check failed' - ) << \SHAR_EOF -8aed94140f491ae027b3b55e9b1535bb cloud_scripts/opt/cloud/bin/checks2svpn.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checks2svpn.sh'` -ne 1178 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' is not 1178" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, vpn): -X key = vpn['vpn_server_ip'] -X op = vpn['create'] -X if key in dbag.keys() and not op: -X del(dbag[key]) -X else: -X dbag[key] = vpn -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py': 'MD5 check failed' - ) << \SHAR_EOF -9945565c7eb92c9fd9aa85648f8c4352 cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py'` -ne 994 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' is not 994" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_staticroutes.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_staticroutes.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_staticroutes.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, staticroutes): -X for route in staticroutes['routes']: -X key = route['network'] -X dbag[key] = route -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_staticroutes.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py': 'MD5 check failed' - ) << \SHAR_EOF -c89832deefffed1dcc12b367d9f9062e cloud_scripts/opt/cloud/bin/cs_staticroutes.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py'` -ne 952 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' is not 952" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, vpn): -X key = vpn['peer_gateway_ip'] -X op = vpn['create'] -X if key in dbag.keys() and not op: -X del(dbag[key]) -X else: -X dbag[key] = vpn -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py': 'MD5 check failed' - ) << \SHAR_EOF -37138a9d2b00c0cd0488f03f0b1e1c34 cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py'` -ne 996 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' is not 996" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/passwd_server_ip.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/passwd_server_ip.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/passwd_server_ip.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/passwd_server_ip.py -M(R$O=7-R+V)I;B]E;G8@<'ET:&]N"B,@3&EC96YS960@=&\@=&AE($%P86-H -M92!3;V9T=V%R92!&;W5N9&%T:6]N("A!4T8I('5N9&5R(&]N90HC(&]R(&UO -M2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N5]P87-S=V]R9"<@/')O=71E$EN(",L -M($9O2AO3H*("`@("`@("!W:71H(&9I;&4H9V5T4&%S -M&-E<'0@24]%3H* -M("`@("`@("`@("`@=VET:"!F:6QE*&=E=%!A&-E -M<'0@24]%"<*("`@(&1E9B!D;U]'150H5]P87-S=V]R9"7!E(#T]("=S879E9%]P87-S=V]R9"7-L;VR=215%515-47TU%5$A/1"7!E)UTL"B`@("`@("`@("`@("`@ -M("`@("`@?2D*("`@("`@("!S96QF+G-E;F1?7-L;V6EN9R!T;R!S879E('!A7-L;V6EN9R!T;R!S879E('!A7-L -M;V7-L;V7-L;V7,N87)G=BD@/B`Q -M.@H@("`@("`@(&%D9')E7-L -M;V6)O87)D26YT97)R -M=7!T.@H@("`@("`@('-Y7-L;V&-E<'0@17AC97!T:6]N+"!E.@H@("`@("`@('-Y7-L;V&-E<'1I;VX@)7,@+2T@ -M9&EE9"<@)2!E*0H@("`@("`@('!A/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py': 'MD5 check failed' - ) << \SHAR_EOF -1d63c1d8b2e5a6a48d48d76228964aee cloud_scripts/opt/cloud/bin/passwd_server_ip.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py'` -ne 7020 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py' is not 7020" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_network_acl.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_network_acl.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_network_acl.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_network_acl.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_network_acl.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_network_acl.py': 'MD5 check failed' - ) << \SHAR_EOF -79760ec4739cb68a9a8bf86319a2dd65 cloud_scripts/opt/cloud/bin/cs_network_acl.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_network_acl.py'` -ne 881 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_network_acl.py' is not 881" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cleanup.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cleanup.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cleanup.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cleanup.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cleanup.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -#rm -rf $@ && echo $? -X -zip_file=$1 -if [ -e "$zip_file" ]; -then -X rm -rf "$zip_file" -X echo "Deleting diagnostics zip file $zip_file" -else -X echo "File $zip_file not found in vm " -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cleanup.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cleanup.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cleanup.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cleanup.sh': 'MD5 check failed' - ) << \SHAR_EOF -63ca1758ffda6344d2622a21f5fc15b9 cloud_scripts/opt/cloud/bin/cleanup.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cleanup.sh'` -ne 986 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cleanup.sh' is not 986" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_loadbalancer.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_loadbalancer.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_loadbalancer.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import copy -X -X -def merge(dbag, data): -X """ Simply overwrite the existsing bag as, the whole configuration is sent every time """ -X if "rules" not in data: -X return dbag -X dbag['config'] = data['rules'] -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_loadbalancer.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py': 'MD5 check failed' - ) << \SHAR_EOF -667380d51eaa9aade2317d66a11529aa cloud_scripts/opt/cloud/bin/cs_loadbalancer.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py'` -ne 1016 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' is not 1016" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpc_func.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_func.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_func.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_func.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_func.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# @VERSION@ -X -getEthByIp (){ -X local ip=$1 -X for dev in `ls -1 /sys/class/net | grep eth` -X do -X sudo ip addr show dev $dev | grep $ip\/ > /dev/null -X if [ $? -eq 0 ] -X then -X echo $dev -X return 0 -X fi -X done -X return 1 -} -X -getVPCcidr () { -X CMDLINE=$(cat /var/cache/cloud/cmdline) -X for i in $CMDLINE -X do -X # search for foo=bar pattern and cut out foo -X KEY=$(echo $i | cut -d= -f1) -X VALUE=$(echo $i | cut -d= -f2) -X if [ "$KEY" == "vpccidr" ] -X then -X echo "$VALUE" -X return 0 -X fi -X done -X return 1 -} -X -removeRulesForIp() { -X local ip=$1 -X iptables-save -t mangle | grep $ip | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t mangle $rule -X done -X iptables-save -t nat | grep $ip | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t nat $rule -X done -X iptables-save -t filter | grep $ip | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t filter $rule -X done -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_func.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_func.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_func.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_func.sh': 'MD5 check failed' - ) << \SHAR_EOF -bc1b0432818cc40ea79df6720e16ecad cloud_scripts/opt/cloud/bin/vpc_func.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_func.sh'` -ne 1849 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_func.sh' is not 1849" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsDhcp.py ============== -if test ! -d 'cloud_scripts/opt/cloud/bin/cs'; then - mkdir 'cloud_scripts/opt/cloud/bin/cs' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/opt/cloud/bin/cs." -else ${echo} "x - failed to create directory cloud_scripts/opt/cloud/bin/cs." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsDhcp.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N'0B"D1(0U!?3U!44R`]("(O971C+V1H8W!O<'1S -M+G1X="(*0TQ/541?0T].1B`]("(O971C+V1N"`](#`*("`@("`@("!L:7-T96Y?861D0H@("`@("`@("`@("!G871E=V%Y(#T@ -M)R<*("`@("`@("`@("`@:68@2`](&E;)V=A=&5W -M87DG70H@("`@("`@("`@("!S;&EN92`](")D:&-P+7)A;F=E/7-E=#II;G1E -M"P@9V%T97=A>2D*("`@("`@("`@("`@96QS93H*("`@ -M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UR86YG93US970Z:6YT97)F86-E -M+25S+25S+"5S+'-T871I8R(@)2`H9&5V:6-E+"!I9'@L(&EP*0H@("`@("`@ -M("`@("!S96QF+F-O;F8N"D*("`@("`@("`@("`@;&EN92`](")D:&-P+6]P -M=&EO;CUT86"P@9VXN9V5T7V1O;6%I;B@I*0H@("`@("`@("`@("!S96QF+F-O;F8N"!F;W(@>"!I;B!G;BYG971?9&YS*"D@:68@>%T*("`@ -M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C -M92TE"P@)RPG+FIO:6XH9&YS7VQI -M2`A/2`G,"XP+C`N,""D*("`@("`@("`@("`@("`@ -M(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C92TE"P@9V%T97=A>2D*("`@("`@("`@("`@("`@('-E -M;&8N8V]N9BYS96%R8V@H"P@;F5T;6%S:RD*("`@("`@("`@("`@"`K/2`Q"@H@("`@("`@(",@ -M3&ES=&5N($%D9')E3H*("`@ -M("`@("`@("`@;&]G9VEN9RYI;F9O*")!='1E;7!T:6YG('1O(&1E;&5T92!E -M;G1R:65S(&9R;VT@9&YS;6%S<2YL96%S97,@9FEL92!F;W(@5DUS('=H:6-H -M(&%R92!N;W0@;VX@9&AC<&AOW!R:6YT("0S?22DZ"B`@("`@("`@5LG:7!V-%]A -M9&1R97-S)UTL(&5N=')Y6R=H;W-T7VYA;64G72D*("`@("`@("`C($QE87-E -M('1I;64@'!U;F=E9"P@:71S(&%C=&EV -M92!L96%S92!A;F0@1$A#4"]$3E,@8V]N9FEG(&ES('!R;W!E2!I2!R=6YN:6YG(&EN('!R;V1U8W1I;VYS -M('-Y5LG:7!V-%]A9&1R -M97-S)UTL"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@ -M("`@("`@("`@("`@("!E;G1R>5LG:&]S=%]N86UE)UTL"B`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!L96%S -M92DI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L)7,B("4@ -M*'1A9RP@,RDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L -M)7,B("4@*'1A9RP@-BDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D -M9"@B)7,L)7,B("4@*'1A9RP@,34I*0H*("`@("`@("!I(#T@25!!9&1R97-S -M*&5N=')Y6R=I<'8T7V%D9')E2==(#T@96YT2=="@H@("`@9&5F(&%D9%]H;W-T*'-E;&8L(&EP+"!H;W-T -M/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py': 'MD5 check failed' - ) << \SHAR_EOF -bcf1831b38d86bf041523540fa8f821e cloud_scripts/opt/cloud/bin/cs/CsDhcp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py'` -ne 8809 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' is not 8809" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsRedundant.py ============== -if test ! -d 'cloud_scripts/opt/cloud/bin/cs'; then - mkdir 'cloud_scripts/opt/cloud/bin/cs' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/opt/cloud/bin/cs." -else ${echo} "x - failed to create directory cloud_scripts/opt/cloud/bin/cs." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsRedundant.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N7,N2`](%1R=64*"B`@ -M("`@("`@:68@;F]T(&ES1&5V:6-E4F5A9'DZ"B`@("`@("`@("`@(&QO9V=I -M;F5]I9E]N965D960H"B`@("`@("`@("`@("(E&5C("1$045-3TX@+2T@+2UVR(L(")](BP@6PH@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("`@("(@("`@("`@(&%U=&A?='EP92!!2"!< -M;B(L("(@("`@("`@(&%U=&A?<&%S2AC;VYN=')A8VMD7W1E;7!L871E7V-O;F8L(&-O;FYT0H@("`@("`@("(B(@H@("`@("`@(&ET97)A=&EO;G,@ -M/2`Q,`H@("`@("`@('1I;65?8F5T=V5E;B`](#$*"B`@("`@("`@9F]R(&ET -M97(@:6X@3H* -M("`@("`@("`@("`@("`@(',@/2!S;V-K970N2!R=6YN:6YG("@E9#HE2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I<"@I*2YS=&]P*"D* -M"B`@("`@("`@0W-(96QP97(N2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@ -M("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")!9&1I;F<@9V%T97=A>2`]/3X@ -M)7,@=&\@9&5V:6-E(#T]/B`E2P@9&5V*2D*("`@("`@ -M("`@("`@("`@("`@("!I9B!D978@/3T@0W-(96QP97(N4%5"3$E#7TE.5$52 -M1D%#15-;&5C -M=71E*"(E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I -M<"@I*2YR97-T87)T*"D*"B`@("`@("`@0W-(96QP97(N2D*"B`@("`@("`@("`@(",@5&AE(&9I -M2!I;G1E2!V'1E2!E=F5R(&)E(&]N92!A9&1R97-S(&EN -M(&$@5E!#('1H97)E(&-A;B!B92!M86YY"B`@("`@("`@5&AE(&YE=R!C;V1E -M(&%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py': 'MD5 check failed' - ) << \SHAR_EOF -6936e38f53736f7c5a04b255800a242d cloud_scripts/opt/cloud/bin/cs/CsRedundant.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py'` -ne 16789 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' is not 16789" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsHelper.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsHelper.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsHelper.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsHelper.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B -M971H,2)]"@I35$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S -M:"`M8R`@)VEF(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@ -M96QS92!E8VAO(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@ -M(")V<&-R;W5T97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@ -M6R`D,"`]/2!<(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ -M"B`@("`@("`@("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@ -M("`@("`@(&-M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@ -M("`@("`@;&]G9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S -M(B`E('-T871E7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X -M96-U=&4H7!E*"E=(&%N9"!S -M=&%T92`]/2`B34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE -M8W5T92AC;60I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ -M("`@("`@(&5X96-U=&4H8VUD*0H*"F1E9B!I&5C=71E -M*")M;W5N="!T;7!F6XH=F%L*3H*("`@(&EF('9A;#H* -M("`@("`@("!R971U&5C=71E*")I<"!A9&1R('-H;W<@ -M?&=R97`@+78@WT*("`@("`@("`@("`@ -M=&];)VEP)UT@/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A -M;'-;+3%="B`@("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@ -M("(B(@H@("`@9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G -M*")3879I;F<@:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C -M=71E*")S>7-T96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I -M;F7-T96UC=&P@&5C=71E*")K:6QL -M("U(55`@)7,B("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D -M;G-M87-Q(BP@(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py': 'MD5 check failed' - ) << \SHAR_EOF -9bdd1fdfea8177d3e408b2cc87e5d503 cloud_scripts/opt/cloud/bin/cs/CsHelper.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py'` -ne 7644 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' is not 7644" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5NWT*("`@("`@("!S96QF+F=U97-T(#T@5')U90H@("`@("`@ -M(&1B(#T@1&%T84)A9R@I"B`@("`@("`@9&(N7,H*2!A;F0@;&5N*&1B86=;9&5V:6-E -M72D@(3T@,#H*("`@("`@("`@("`@2==*0H*("`@ -M("`@("!I9B`G9&YS)R!I;B!S96QF+F1A=&$Z"B`@("`@("`@("`@(&1N'1E;F0H&-E<'1I;VXN"B`@("`@("`@:68@)W)O -M=71E"!I="!P2X@22!J=7-T(&%D -M9&5D('1H92!I9BP@87,@26%N(&1I9"!I;B!S;VUE(&]T:&5R(&9I;&5S+"!T -M;R!A=F]I9"!T:&4@97AC97!T:6]N+@H@("`@("`@(&EF("=R;W5T97)?9W5E -M2<@:6X@2=="B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py': 'MD5 check failed' - ) << \SHAR_EOF -98c84f4067412f263891f8293f185243 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py'` -ne 2545 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' is not 2545" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsMonitor.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N"!I;B!S96QF+F1B86=;)V-O;F9I9R==+G-P;&ET*"WT*("`@("`@("!H8U]D871A6R)H96%L=&A?8VAE8VMS7V)A&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!S96QF+F1B -M86&-L=61E9%]H96%L=&A?8VAE8VMS(ET@/2!;70H* -M("`@("`@("!I9B`B:&5A;'1H7V-H96-K/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py': 'MD5 check failed' - ) << \SHAR_EOF -d8f5dcf496dbc6d8508e40b906f48245 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py'` -ne 3681 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' is not 3681" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@ -M("`@("!S96QF+FQA2!E>&ES=',Z(')U;&4] -M)7,@=&%B;&4])7,@8VAA:6X])7,B+"!N97=?2`](&-P>2YR97!L86-E*"(M02`E&5C=71E,B@B:7!T86)L97,@+70@)7,@ -M)7,B("4@*&YE=U]R=6QE+F=E=%]T86)L92@I+"!C<'DI*0H@("`@("`@("`@ -M("`@("`@(R!4:&5R92!A"!I;B!T:&4@ -M9G)A;65W;W)K+@H@("`@("`@("`@("`@("`@:68@&5C=71E*")I<'1A8FQE7!E(#T@0W-#;61,:6YE*")C;61L:6YE(BDN9V5T7W1Y<&4H*0H* -M("`@("`@("!T7!E*3H*("`@("`@("`@("`@("`@(&EF(&DNFEP*&)I='-;,#HZ,ETL(&)I='-;,3HZ,ETI*0H@("`@("`@(&EF -M("(M02(@:6X@2!C;W)R96-T(&EP=&%B;&5S(&-O;6UA -M;F0@(B(B"B`@("`@("`@(R!/7,H*3H*("`@("`@("`@("`@("`@('!R:6YT86)L92`] -M(&LN=7)N($9A;'-E"B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py': 'MD5 check failed' - ) << \SHAR_EOF -7456b53eba9f115f9ad344bc1c01611d cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py'` -ne 11100 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' is not 11100" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsRoute.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRoute.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRoute.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import CsHelper -import logging -X -X -class CsRoute: -X -X """ Manage routes """ -X -X def __init__(self): -X self.table_prefix = "Table_" -X -X def get_tablename(self, name): -X return self.table_prefix + name -X -X def add_table(self, devicename): -X tablenumber = 100 + int(devicename[3:]) -X tablename = self.get_tablename(devicename) -X str = "%s %s" % (tablenumber, tablename) -X filename = "/etc/iproute2/rt_tables" -X logging.info("Adding route table: " + str + " to " + filename + " if not present ") -X if not CsHelper.definedinfile(filename, str): -X CsHelper.execute("sudo echo " + str + " >> /etc/iproute2/rt_tables") -X # remove "from all table tablename" if exists, else it will interfer with -X # routing of unintended traffic -X if self.findRule("from all lookup " + tablename): -X CsHelper.execute("sudo ip rule delete from all table " + tablename) -X -X def flush_table(self, tablename): -X CsHelper.execute("ip route flush table %s" % (tablename)) -X CsHelper.execute("ip route flush cache") -X -X def add_route(self, dev, address): -X """ Wrapper method that adds table name and device to route statement """ -X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 -X table = self.get_tablename(dev) -X -X if not table or not address: -X empty_param = "table" if not table else "address" -X logging.info("Empty parameter received %s while trying to add route, skipping" % empty_param) -X else: -X logging.info("Adding route: dev " + dev + " table: " + -X table + " network: " + address + " if not present") -X cmd = "default via %s table %s proto static" % (address, table) -X self.set_route(cmd) -X -X def add_network_route(self, dev, address): -X """ Wrapper method that adds table name and device to route statement """ -X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 -X table = self.get_tablename(dev) -X -X if not table or not address: -X empty_param = "table" if not table else "address" -X logging.info("Empty parameter received %s while trying to add network route, skipping" % empty_param) -X else: -X logging.info("Adding route: dev " + dev + " table: " + -X table + " network: " + address + " if not present") -X cmd = "throw %s table %s proto static" % (address, table) -X self.set_route(cmd) -X -X def set_route(self, cmd, method="add"): -X """ Add a route if it is not already defined """ -X found = False -X search = cmd -X if "throw" in search: -X search = search.replace("throw", "") -X for i in CsHelper.execute("ip route show " + search): -X found = True -X if not found and method == "add": -X logging.info("Add " + cmd) -X cmd = "ip route add " + cmd -X elif found and method == "delete": -X logging.info("Delete " + cmd) -X cmd = "ip route delete " + cmd -X else: -X return -X CsHelper.execute(cmd) -X -X def add_defaultroute(self, gateway): -X """ Add a default route -X :param str gateway -X :return: bool -X """ -X if not gateway: -X raise Exception("Gateway cannot be None.") -X -X if self.defaultroute_exists(): -X return False -X else: -X cmd = "default via " + gateway -X logging.info("Adding default route") -X self.set_route(cmd) -X return True -X -X def defaultroute_exists(self): -X """ Return True if a default route is present -X :return: bool -X """ -X logging.info("Checking if default ipv4 route is present") -X route_found = CsHelper.execute("ip -4 route list 0/0") -X -X if len(route_found) > 0: -X logging.info("Default route found: " + route_found[0]) -X return True -X else: -X logging.warn("No default route found!") -X return False -X -X def findRule(self, rule): -X for i in CsHelper.execute("ip rule show"): -X if rule in i.strip(): -X return True -X return False -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRoute.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py': 'MD5 check failed' - ) << \SHAR_EOF -4f2109aa1d89157e14817f90c676c2d3 cloud_scripts/opt/cloud/bin/cs/CsRoute.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py'` -ne 4989 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' is not 4989" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py -M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2==*0H@("`@("`@("`@ -M("!#&5C=71E*&-O;6UA;F0I"B`@("`@("`@96QS93H*("`@ -M("`@("`@("`@8V]M;6%N9"`](")I<"!R;W5T92!S:&]W('P@9W)E<"`EW!R:6YT("0Q+"`D,WTG(B`E(')O=71E6R=N971W;W)K)UT*("`@ -M("`@("`@("`@2==*0H@("`@("`@("`@("`@ -C("`@0W-(96QP97(N97AE8W5T92AR;W5T95]C;VUM86YD*0H@ -` -end -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py': 'MD5 check failed' - ) << \SHAR_EOF -f9f9db3a4543397153d69a62551a6c8c cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py'` -ne 1655 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' is not 1655" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N7,H*3H* -M("`@("`@("`@("`@"YS<&QI="@G7&XG*5T*"B`@("`@("`@9FEL -M93$N8V]M;6ET*"D*("`@("`@("!F:6QE,B`]($-S1FEL92A(05!23UA97T-/ -M3D9?4"D*("`@("`@("!I9B!N;W0@9FEL93(N8V]M<&%R92AF:6QE,2DZ"B`@ -M("`@("`@("`@($-S2&5L<&5R+F-O<'DH2$%04D]865]#3TY&7U0L($A!4%)/ -M6%E?0T].1E]0*0H*("`@("`@("`@("`@<')O8R`]($-S4')O8V5S2YP:60G72D*("`@("`@("`@("`@:68@;F]T('!R;V,N9FEN -M9"@I.@H@("`@("`@("`@("`@("`@;&]G9VEN9RYD96)U9R@B0W-,;V%D0F%L -M86YC97(Z.B!W:6QL(')E2$B*0H@("`@("`@("`@("`@ -M("`@0W-(96QP97(N2(L(")R97-T87)T(BD*("`@ -M("`@("`@("`@96QS93H*("`@("`@("`@("`@("`@(&QO9V=I;F2$B*0H@("`@ -M("`@("`@("`@("`@0W-(96QP97(N2(L(")R96QO -M860B*0H*("`@("`@("!A9&1?/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py': 'MD5 check failed' - ) << \SHAR_EOF -8f93571ff9b8f21c947e90193c3efa38 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py'` -ne 3393 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' is not 3393" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsApp.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsApp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsApp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsApp.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G -M871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG971?='EP92@I"B`@ -M("`@("`@5]I9E]N965D -M960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L"B`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE,B]S:71E2DI"B`@("`@("`@ -M("`@(&9I;&4N&5C=71E,B@B/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsApp.py': 'MD5 check failed' - ) << \SHAR_EOF -fa071a9d58a918b6a9d5e09ae10e3e11 cloud_scripts/opt/cloud/bin/cs/CsApp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsApp.py'` -ne 4159 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' is not 4159" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsFile.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsFile.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsFile.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import logging -import re -import copy -X -X -class CsFile: -X """ File editors """ -X -X def __init__(self, filename): -X self.filename = filename -X self.load() -X -X def load(self): -X self.new_config = [] -X self.config = [] -X try: -X for line in open(self.filename): -X self.new_config.append(line) -X except IOError: -X logging.debug("File %s does not exist" % self.filename) -X else: -X logging.debug("Reading file %s" % self.filename) -X self.config = list(self.new_config) -X -X def is_changed(self): -X if set(self.config) != set(self.new_config): -X return True -X else: -X return False -X -X def __len__(self): -X return len(self.config) -X -X def empty(self): -X self.config = [] -X self.new_config = [] -X -X def repopulate(self): -X self.new_config = [] -X -X def commit(self): -X if not self.is_changed(): -X logging.info("Nothing to commit. The %s file did not change" % self.filename) -X return False -X handle = open(self.filename, "w+") -X for line in self.new_config: -X handle.write(line) -X handle.close() -X logging.info("Wrote edited file %s" % self.filename) -X self.config = list(self.new_config) -X logging.info("Updated file in-cache configuration") -X return True -X -X def dump(self): -X for line in self.new_config: -X print line -X -X def addeq(self, string): -X """ Update a line in a file of the form token=something -X match on token= and replace something if needed -X Add line if token is not present -X """ -X token = string.split('=')[0] + '=' -X self.search(token, string) -X -X def append(self, string, where=-1): -X if where == -1: -X self.new_config.append("%s\n" % string) -X else: -X self.new_config.insert(where, "%s\n" % string) -X -X def add(self, string, where=-1): -X for index, line in enumerate(self.new_config): -X if line.strip() == string: -X return False -X if where == -1: -X self.new_config.append("%s\n" % string) -X else: -X self.new_config.insert(where, "%s\n" % string) -X return True -X -X def section(self, start, end, content): -X sind = -1 -X eind = -1 -X found = False -X for index, line in enumerate(self.new_config): -X if found and line.strip() == end: -X eind = index -X found = False -X if line.strip() == start: -X sind = index + 1 -X found = True -X if sind == -1: -X content.insert(0, start + "\n") -X content.append(end + "\n") -X self.new_config[sind:eind] = content -X -X def greplace(self, search, replace): -X logging.debug("Searching for %s and replacing with %s" % (search, replace)) -X self.new_config = [w.replace(search, replace) for w in self.new_config] -X -X def replaceIfFound(self, search, replace): -X found = False -X replace_filtered = replace -X if re.search("PSK \"", replace): -X replace_filtered = re.sub(r'".*"', '"****"', replace) -X logging.debug("Searching for %s and replacing with %s if found" % (search, replace_filtered)) -X for index, line in enumerate(self.new_config): -X if line.lstrip().startswith("#"): -X continue -X if re.search(search, line): -X if replace not in line: -X self.new_config[index] = replace + "\n" -X return False -X -X def search(self, search, replace): -X found = False -X replace_filtered = replace -X if re.search("PSK \"", replace): -X replace_filtered = re.sub(r'".*"', '"****"', replace) -X logging.debug("Searching for %s and replacing with %s" % (search, replace_filtered)) -X for index, line in enumerate(self.new_config): -X if line.lstrip().startswith("#"): -X continue -X if re.search(search, line): -X found = True -X if replace not in line: -X self.new_config[index] = replace + "\n" -X if not found: -X self.new_config.append(replace + "\n") -X return True -X return False -X -X def searchString(self, search, ignoreLinesStartWith): -X found = False -X logging.debug("Searching for %s string " % search) -X -X for index, line in enumerate(self.new_config): -X print ' line = ' + line -X if line.lstrip().startswith(ignoreLinesStartWith): -X continue -X if search in line: -X found = True -X break -X -X return found -X -X def deleteLine(self, search): -X found = False -X logging.debug("Searching for %s to remove the line " % search) -X temp_config = [] -X for index, line in enumerate(self.new_config): -X if line.lstrip().startswith("#"): -X continue -X if search not in line: -X temp_config.append(line) -X -X self.new_config = list(temp_config) -X -X def compare(self, o): -X result = (isinstance(o, self.__class__) and set(self.config) == set(o.config)) -X logging.debug("Comparison of CsFiles content is ==> %s" % result) -X return result -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsFile.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsFile.py': 'MD5 check failed' - ) << \SHAR_EOF -81531ddee205a5eb66bb44f400ab222c cloud_scripts/opt/cloud/bin/cs/CsFile.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsFile.py'` -ne 6133 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' is not 6133" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/__init__.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/__init__.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/__init__.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/__init__.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/__init__.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/__init__.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/__init__.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/__init__.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/__init__.py': 'MD5 check failed' - ) << \SHAR_EOF -33215d440d5ba5fa95b1ffa035d769e2 cloud_scripts/opt/cloud/bin/cs/__init__.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/__init__.py'` -ne 785 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/__init__.py' is not 785" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsAddress.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsAddress.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsAddress.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsAddress.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N`H@("`@("`@("`@("`@("`@("`@ -M(&=U97-T7VEN=&5R9F%C92`](&EN=&5R9F%C90H@("`@("`@("`@("`@("`@ -M("`@(&QO9V=I;F2!C;VYF:6=U2AS96QF*3H*("`@("`@("!I -M9B!S96QF+F-O;F9I9RYI2(I -M"B`@("`@("`@96QS93H*("`@("`@("`@("`@2@I+"!S96QF+F=E=%]S -M:7IE*"DI"@H@("`@9&5F(&=E=%]S:7IE*'-E;&8I.@H@("`@("`@("(B(B!2 -M971U7!E -M(B!I;B!S96QF+F%D9')E"@Q,#`@*R!I;G0H9&5V6S,Z72DI -M"B`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@("`@97AC97!T($5X8V5P=&EO;B!A -M&-E<'1I;VX@ -M;V-C=7)R960@/3T^("5S(B`E(&4I"@H@("`@("`@("`@("!S96QF+G!O7!E*"D@:6X@6R)C;VYT7!E*"D@:6X@ -M6R=P=6)L:6,G73H*("`@("`@("`@("`@("`@('-E;&8N7!E*"E=.@H@("`@("`@ -M("`@("`@("`@9V%T97=A>2`]('-T2@I*3H* -M("`@("`@("`@("`@("`@(')O=71E+F%D9%]D969A=6QT2@I*0H*("`@(&1E9B!S971?;6%R:RAS96QF*3H*("`@ -M("`@("!C;60@/2`B+4$@4%)%4D]55$E.1R`M:2`E7!E(&]F('1H92!)4`H@("`@("`@(&=U97-T"B`@("`@("`@8V]N -M=')O;`H@("`@("`@('!U8FQI8PH@("`@("`@("(B(@H@("`@("`@(&EF(")N -M=U]T>7!E(B!I;B!S96QF+F%D9')E&9F9F9F9F9F -M("TM8W1M87-K(#!X9F9F9F9F9F8B72D*"B`@("`@("`@&UA7!E*"D@:6X@6R)G=65S=")=.@H@("`@("`@("`@("!G=65S -M=$YE='=O&9F9F9F9F9F(ETI"B`@ -M("`@("`@("`@(&=U97-T3F5T=V]R:T-I9'(@/2!S96QF+F%D9')E#4R-2\P>&9F9F9F9F9F(B`E -M("AS96QF+F1E=BP@2)=("$](").;VYE(CH* -M("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@("`@("`@:68@ -M(FYE='=O7!E*"D@:6X@6R)P=6)L:6,B -M72!A;F0@(F=A=&5W87DB(&EN('-E;&8N861D2)=("$] -M(").;VYE(CH*("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@ -M("`@("`@("`@(&9O7!E(B!I;B!A9&1R97-S(&%N9"!A -M9&1R97-S6R)N=U]T>7!E(ET@/3T@(F=U97-T(CH*("`@("`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("!R;W5T92YA9&1?;F5T=V]R:U]R;W5T92AS96QF -M+F1E=BP@&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A8VAE(BD*"B`@("`@("`@ -M96QI9B!M971H;V0@/3T@(F1E;&5T92(Z"B`@("`@("`@("`@(",@=')E870@ -M=&AE(&QA&5C=71E*")S=61O(&EP(')U;&4@9&5L971E('1A8FQE("(@*R!T86)L94YA -M;64I"B`@("`@("`@("`@("`@("!#&5C=71E*")S=61O(&EP -M(')O=71E(&9L=7-H('1A8FQE("(@*R!T86)L94YA;64I"B`@("`@("`@("`@ -M("`@("!#&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A -M8VAE(BD*("`@("`@("`@("`@("`@($-S4G5L92AS96QF+F1E=BDN9&5L36%R -M:R@I"@H@("`@("`@('-E;&8N9G=?7!E('=I;&P@ -M;F\@;&]N9V5R(&)E(&MN;W=N"B`@("`@("`@:68@7!E*"D@/3T@(G!U8FQI8R(@86YD('-E;&8N8V]N9FEG+FES7W9P8R@I -M(&%N9"!M971H;V0@/3T@(F%D9"(Z"B`@("`@("`@("`@(&EF('-E;&8N861D -M7,H*3H*("`@("`@("`@ -M("`@7!E)UT@:6X@5E)2 -M4%]465!%4SH*("`@("`@("`@("`@7!E(B!I;B!S96QF+F%D9')E&5C=71E,BAC;60L($9A -M;'-E*0H*("`@(",@1&5L971E(&%N>2!I<',@=&AA="!A7,H*2!O2AS96QF+"!B862!F;W(@ -M7,O8VQA"TP+W)P&-E<'0@24]%/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py': 'MD5 check failed' - ) << \SHAR_EOF -5cebbbd106abd3eba7ee0e4d23277dda cloud_scripts/opt/cloud/bin/cs/CsAddress.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py'` -ne 29236 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' is not 29236" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsProcess.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsProcess.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsProcess.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import os -import re -import CsHelper -import logging -X -X -class CsProcess(object): -X """ Manipulate processes """ -X -X def __init__(self, search): -X self.search = search -X -X def start(self, thru, background=''): -X # if(background): -X # cmd = cmd + " &" -X logging.info("Started %s", " ".join(self.search)) -X os.system("%s %s %s" % (thru, " ".join(self.search), background)) -X -X def kill_all(self): -X pids = self.find_pid() -X for p in pids: -X CsHelper.execute("kill -9 %s" % p) -X -X def find_pid(self): -X self.pid = [] -X for i in CsHelper.execute("ps aux"): -X items = len(self.search) -X proc = re.split(r"\s+", i)[items*-1:] -X matches = len([m for m in proc if m in self.search]) -X if matches == items: -X self.pid.append(re.split(r"\s+", i)[1]) -X -X logging.debug("CsProcess:: Searching for process ==> %s and found PIDs ==> %s", self.search, self.pid) -X return self.pid -X -X def find(self): -X has_pid = len(self.find_pid()) > 0 -X return has_pid -X -X def kill(self, pid): -X if pid > 1: -X CsHelper.execute("kill -9 %s" % pid) -X -X def grep(self, str): -X for i in CsHelper.execute("ps aux"): -X if i.find(str) != -1: -X return re.split(r"\s+", i)[1] -X return -1 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsProcess.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py': 'MD5 check failed' - ) << \SHAR_EOF -75a4650fe1e521049e80d32a022d8689 cloud_scripts/opt/cloud/bin/cs/CsProcess.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py'` -ne 2156 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' is not 2156" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsConfig.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsConfig.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsConfig.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsConfig.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N7!E*"D@/3T@)W9P8W)O=71E'1D;G,H'1D;G,G+"`G9F%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py': 'MD5 check failed' - ) << \SHAR_EOF -836541a5b9cb1b2f9df5dad6bb806745 cloud_scripts/opt/cloud/bin/cs/CsConfig.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py'` -ne 3179 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' is not 3179" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsDatabag.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@("`@ -M("!S96QF+F1B(#T@1&%T84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF -M+F1B+G-A=F4HWT*("`@("`@("!R971U&1I9V5S="@I"@H@("`@ -M9&5F(&=E=%]G871E=V%Y*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I -M;B!S96QF+FED871A*"DZ"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A -M*"E;)V=A=&5W87DG70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G -M971?=7-E7V5X=%]D;G,H'1D;G,G70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E -M9B!G971?861V97)T7VEN="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN -M="<@:6X@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py': 'MD5 check failed' - ) << \SHAR_EOF -9e4de6e0a115a5e806e80dc151769b21 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py'` -ne 4808 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' is not 4808" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsRule.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRule.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRule.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import CsHelper -import logging -X -X -class CsRule: -X """ Manage iprules -X Supported Types: -X fwmark -X """ -X -X def __init__(self, dev): -X self.dev = dev -X self.tableNo = 100 + int(dev[3:]) -X self.table = "Table_%s" % (dev) -X -X def addRule(self, rule): -X if not self.findRule(rule + " lookup " + self.table): -X cmd = "ip rule add " + rule + " table " + self.table -X CsHelper.execute(cmd) -X logging.info("Added rule %s for %s" % (cmd, self.table)) -X -X def findRule(self, rule): -X for i in CsHelper.execute("ip rule show"): -X if rule in i.strip(): -X return True -X return False -X -X def addMark(self): -X if not self.findMark(): -X cmd = "ip rule add fwmark %s table %s" % (self.tableNo, self.table) -X CsHelper.execute(cmd) -X logging.info("Added fwmark rule for %s" % (self.table)) -X -X def delMark(self): -X if self.findMark(): -X cmd = "ip rule delete fwmark %s table %s" % (self.tableNo, self.table) -X CsHelper.execute(cmd) -X logging.info("Deleting fwmark rule for %s" % (self.table)) -X -X def findMark(self): -X srch = "from all fwmark %s lookup %s" % (hex(self.tableNo), self.table) -X for i in CsHelper.execute("ip rule show"): -X if srch in i.strip(): -X return True -X return False -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRule.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRule.py': 'MD5 check failed' - ) << \SHAR_EOF -78748432f1ac57194339aef8bdb7c9f8 cloud_scripts/opt/cloud/bin/cs/CsRule.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRule.py'` -ne 2192 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' is not 2192" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vmdata.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vmdata.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vmdata.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vmdata.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/vmdata.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&ET*#(I -M"@H@("`@9F]R(&EP(&EN(&IS;VY?9&%T83H*("`@("`@("!F;W(@:71E;2!I -M;B!J2!V86QI9"!D -M871A"B`@("`@("`@("`@(&EF(&9O;&1E&ES=',H;65T -M86UA;FEF97-T*3H*("`@("`@("!O2Q!;&QO=UQN1&5N -M>2!F&-E<'0@3U-%2!E>&ES=',L('=E(&1O(&ET('1H:7,@=V%Y(&9O -M7,N97AI="@Q*0H*("`@(&9H(#T@;W!E;BAH -M=&%C8V5S2`K("=<;B&9L;V-K*&9I;&4I.@H@("`@=')Y.@H@("`@("`@(&9L;V-K -M*&9I;&4L($Q/0TM?15@I"B`@("!E>&-E<'0@24]%7,N97AI="@Q -M*0H@("`@3H*("`@("`@("!F;&]C:RAF:6QE+"!,3T-+7U5.*0H@("`@97AC97!T($E/ -M17)R;W(@87,@93H*("`@("`@("!P7,N97AI="@Q*0H@("`@7,N87)G=ELQ.ETI"FYA -` -end -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vmdata.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vmdata.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vmdata.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vmdata.py': 'MD5 check failed' - ) << \SHAR_EOF -f585277ddefb989a0662db609bc199c7 cloud_scripts/opt/cloud/bin/vmdata.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vmdata.py'` -ne 4723 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vmdata.py' is not 4723" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/get_diagnostics_files.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/get_diagnostics_files.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/get_diagnostics_files.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' && -#!/usr/bin/env python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import logging -import os -import re -import shlex -import subprocess as sp -import sys -import time -import zipfile -X -X -# Create zip archive and append files for retrieval -def zip_files(files): -X fList = files -X compression = zipfile.ZIP_DEFLATED -X time_str = time.strftime("%Y%m%d-%H%M%S") -X zf_name = '/root/diagnostics_files_' + time_str + '.zip' -X zf = zipfile.ZipFile(zf_name, 'w', compression) -X -X ''' -X Initialize 3 empty arrays to collect found files, non-existent files -X and last one to collect temp files to be cleaned up when script exits -X ''' -X files_found_list = [] -X files_not_found_list = [] -X files_from_shell_commands = [] -X -X try: -X for f in fList: -X f = f.strip() -X -X if f in ('iptables', 'ipaddr', 'iprule', 'iproute'): -X f = execute_shell_script(f) -X files_from_shell_commands.append(f) -X -X if len(f) > 3 and f.startswith('[') and f.endswith(']'): -X f = execute_shell_script(f[1:-1]) -X files_from_shell_commands.append(f) -X -X if os.path.isfile(f): -X try: -X zf.write(f, f[f.rfind('/') + 1:]) -X except OSError or RuntimeError as e: -X files_not_found_list.append(f) -X else: -X files_found_list.append(f) -X finally: -X cleanup(files_from_shell_commands) -X generate_retrieved_files_txt(zf, files_found_list, files_not_found_list) -X zf.close() -X print zf_name -X -X -def get_cmd(script): -X if script is None or len(script) == 0: -X return None -X -X cmd = None -X if script == 'iptables': -X cmd = 'iptables-save' -X elif script == 'ipaddr': -X cmd = 'ip address' -X elif script == 'iprule': -X cmd = 'ip rule list' -X elif script == 'iproute': -X cmd = 'ip route show table all' -X else: -X cmd = '/opt/cloud/bin/' + script -X if not os.path.isfile(cmd.split(' ')[0]): -X cmd = None -X -X return cmd -X -X -def execute_shell_script(script): -X script = script.strip() -X outputfile = script + '.log' -X -X with open(outputfile, 'wb', 0) as f: -X try: -X cmd = get_cmd(script) -X if cmd is None: -X f.write('Unable to generate command for ' + script + ', perhaps missing file') -X else: -X p = sp.Popen(cmd, shell=True, stdout=sp.PIPE, stderr=sp.PIPE) -X stdout, stderr = p.communicate() -X return_code = p.returncode -X if return_code is 0: -X f.write(stdout) -X else: -X f.write(stderr) -X except OSError as ex: -X delete_tmp_file_cmd = 'rm -f %s' % outputfile -X sp.check_call(shlex.split(delete_tmp_file_cmd)) -X finally: -X f.close() -X return outputfile -X -X -def cleanup(file_list): -X files = ' '.join(file_list) -X cmd = 'rm -f %s' % files -X try: -X p = sp.Popen(shlex.split(cmd), stderr=sp.PIPE, stdout=sp.PIPE) -X p.communicate() -X except OSError as e: -X logging.debug("Failed to execute bash command") -X -X -def generate_retrieved_files_txt(zip_file, files_found, files_not_found): -X output_file = 'fileinfo.txt' -X try: -X with open(output_file, 'wb', 0) as man: -X for i in files_found: -X man.write(i + '\n') -X for j in files_not_found: -X man.write(j + 'File Not Found!!\n') -X zip_file.write(output_file, output_file) -X finally: -X cleanup_cmd = "rm -f %s" % output_file -X sp.check_call(shlex.split(cleanup_cmd)) -X -X -if __name__ == '__main__': -X fileList = sys.argv[1:] -X zip_files(fileList) -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/get_diagnostics_files.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py': 'MD5 check failed' - ) << \SHAR_EOF -f8b91c14af848f14696aa2c1193b0907 cloud_scripts/opt/cloud/bin/get_diagnostics_files.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py'` -ne 4478 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' is not 4478" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/checkrouter.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checkrouter.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checkrouter.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/checkrouter.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checkrouter.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -STATUS=UNKNOWN -X -if [ "$(systemctl is-active keepalived)" != "active" ] -then -X echo "Status: FAULT" -X exit -fi -X -ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g') -if [ "$ROUTER_TYPE" = "router" ] -then -X ROUTER_STATE=$(ip addr show dev eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi') -X STATUS=$ROUTER_STATE -else -X ROUTER_STATE=$(ip addr show dev eth1 | grep state | awk '{print $9;}') -X if [ "$ROUTER_STATE" = "UP" ] -X then -X STATUS=MASTER -X elif [ "$ROUTER_STATE" = "DOWN" ] -X then -X STATUS=BACKUP -X fi -fi -X -echo "Status: ${STATUS}" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checkrouter.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/checkrouter.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/checkrouter.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checkrouter.sh': 'MD5 check failed' - ) << \SHAR_EOF -b107b37bc85a7036ef9f4e81cf4ae8b2 cloud_scripts/opt/cloud/bin/checkrouter.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checkrouter.sh'` -ne 1445 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checkrouter.sh' is not 1445" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/ilb.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ilb.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ilb.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/ilb.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/ilb.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s: -a -d -f -s \n" $(basename $0) >&2 -} -X -#set -x -X -fw_remove_backup() { -X logger -t cloud "$(basename $0): Entering fw_remove_backup" -X local lb_vif_list=eth0 -X for vif in $lb_vif_list; do -X sudo iptables -F back_load_balancer_$vif 2> /dev/null -X sudo iptables -D INPUT -i $vif -p tcp -j back_load_balancer_$vif 2> /dev/null -X sudo iptables -X back_load_balancer_$vif 2> /dev/null -X done -X sudo iptables -F back_lb_stats 2> /dev/null -X sudo iptables -D INPUT -p tcp -j back_lb_stats 2> /dev/null -X sudo iptables -X back_lb_stats 2> /dev/null -} -X -fw_restore() { -X logger -t cloud "$(basename $0): Entering fw_restore" -X local lb_vif_list="eth0" -X for vif in $lb_vif_list; do -X sudo iptables -F load_balancer_$vif 2> /dev/null -X sudo iptables -D INPUT -i $vif -p tcp -j load_balancer_$vif 2> /dev/null -X sudo iptables -X load_balancer_$vif 2> /dev/null -X sudo iptables -E back_load_balancer_$vif load_balancer_$vif 2> /dev/null -X done -X sudo iptables -F lb_stats 2> /dev/null -X sudo iptables -D INPUT -p tcp -j lb_stats 2> /dev/null -X sudo iptables -X lb_stats 2> /dev/null -X sudo iptables -E back_lb_stats lb_stats 2> /dev/null -} -X -# firewall entry to ensure that haproxy can receive on specified port -fw_entry() { -X logger -t cloud "$(basename $0): Entering fw_entry" -X local added=$1 -X local removed=$2 -X local stats=$3 -X -X if [ "$added" == "none" ] -X then -X added="" -X fi -X -X if [ "$removed" == "none" ] -X then -X removed="" -X fi -X -X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") -X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") -X -# back up the iptable rules by renaming before creating new. -X local lb_vif_list=eth0 -X for vif in $lb_vif_list; do -X sudo iptables -E load_balancer_$vif back_load_balancer_$vif 2> /dev/null -X sudo iptables -N load_balancer_$vif 2> /dev/null -X sudo iptables -A INPUT -i $vif -p tcp -j load_balancer_$vif -X done -X sudo iptables -E lb_stats back_lb_stats 2> /dev/null -X sudo iptables -N lb_stats 2> /dev/null -X sudo iptables -A INPUT -p tcp -j lb_stats -X -X for i in $a -X do -X local pubIp=$(echo $i | cut -d: -f1) -X local dport=$(echo $i | cut -d: -f2) -X local lb_vif_list="eth0" -X for vif in $lb_vif_list; do -X sudo iptables -A load_balancer_$vif -p tcp -d $pubIp --dport $dport -j ACCEPT -X if [ $? -gt 0 ] -X then -X return 1 -X fi -X done -X done -X local pubIp=$(echo $stats | cut -d: -f1) -X local dport=$(echo $stats | cut -d: -f2) -X local cidrs=$(echo $stats | cut -d: -f3 | sed 's/-/,/') -X sudo iptables -A lb_stats -s $cidrs -p tcp -m state --state NEW -d $pubIp --dport $dport -j ACCEPT -X -X return 0 -} -X -#Hot reconfigure HA Proxy in the routing domain -reconfig_lb() { -X logger -t cloud "Reconfiguring ilb using $1" -X /root/reconfigLB.sh $1 -X return $? -} -X -# Restore the HA Proxy to its previous state, and revert iptables rules on loadbalancer -restore_lb() { -X logger -t cloud "Restoring HA Proxy to previous state" -X # Copy the old version of haproxy.cfg into the file that reconfigLB.sh uses -X cp /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg.new -X -X if [ $? -eq 0 ] -X then -X # Run reconfigLB.sh again -X /root/reconfigLB.sh /etc/haproxy/haproxy.cfg.new -X fi -} -X -X -logger -t cloud "$(basename $0): Entering $(dirname $0)/$(basename $0)" -X -iflag= -aflag= -dflag= -fflag= -sflag= -X -while getopts 'i:a:d:f:s:' OPTION -do -X case $OPTION in -X i) iflag=1 -X domRIp="$OPTARG" #unused but passed in -X ;; -X a) aflag=1 -X addedIps="$OPTARG" -X ;; -X d) dflag=1 -X removedIps="$OPTARG" -X ;; -X f) fflag=1 -X cfgfile="$OPTARG" -X ;; -X s) sflag=1 -X statsIp="$OPTARG" -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [[ "$aflag$dflag" != "1" && "$aflag$dflag" != "11" ]] -then -X usage -X unlock_exit 2 $lock $locked -fi -X -if [ "$addedIps" == "" ] -then -X addedIps="none" -fi -X -X -if [ "$removedIps" == "" ] -then -X removedIps="none" -fi -X -X -# hot reconfigure haproxy -reconfig_lb $cfgfile -X -if [ $? -gt 0 ] -then -X logger -t cloud "Reconfiguring ilb failed" -X unlock_exit 1 $lock $locked -fi -X -logger -t cloud "HAProxy reconfigured successfully, configuring firewall" -X -# iptables entry to ensure that haproxy receives traffic -fw_entry $addedIps $removedIps $statsIp -X -if [ $? -gt 0 ] -then -X logger -t cloud "Failed to apply firewall rules for internal load balancing, reverting HA Proxy config" -X # Restore the LB -X restore_lb -X -X logger -t cloud "Reverting firewall config" -X fw_restore -X -X unlock_exit 1 $lock $locked -else -X # Remove backedup iptable rules -X logger -t cloud "Firewall configured successfully, deleting backup firewall config" -X fw_remove_backup -fi -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/ilb.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/ilb.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/ilb.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ilb.sh': 'MD5 check failed' - ) << \SHAR_EOF -8b7374975ee7d7a5d73da78b60bd508c cloud_scripts/opt/cloud/bin/ilb.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ilb.sh'` -ne 5644 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ilb.sh' is not 5644" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -for i in $* -do -X info=`/opt/cloud/bin/checks2svpn.sh $i` -X ret=$? -X batchInfo+="$i:$ret:$info&" -done -echo -n $batchInfo -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh': 'MD5 check failed' - ) << \SHAR_EOF -36a25911b669737ea678011f72a6f3f9 cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh'` -ne 924 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' is not 924" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/savepassword.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/savepassword.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/savepassword.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/savepassword.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/savepassword.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# Usage -# save_password -v -p -X -while getopts 'v:p:' OPTION -do -X case $OPTION in -X v) VM_IP="$OPTARG" -X ;; -X p) PASSWORD="$OPTARG" -X ;; -X ?) echo "Incorrect usage" -X ;; -X esac -done -TOKEN_FILE="/tmp/passwdsrvrtoken" -TOKEN="" -if [ -f $TOKEN_FILE ]; then -X TOKEN=$(cat $TOKEN_FILE) -fi -ps aux | grep passwd_server_ip.py |grep -v grep 2>&1 > /dev/null -if [ $? -eq 0 ] -then -X ips=$(ip addr show | grep inet | awk '{print $2}') -X for ip in $ips; do -X server_ip=$(echo $ip | awk -F'/' '{print $1}') -X curl --header "DomU_Request: save_password" "http://$server_ip:8080/" -F "ip=$VM_IP" -F "password=$PASSWORD" -F "token=$TOKEN" >/dev/null 2>/dev/null & -X done -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/savepassword.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/savepassword.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/savepassword.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/savepassword.sh': 'MD5 check failed' - ) << \SHAR_EOF -edebd2c25984e1ed00b36e4f8d360a63 cloud_scripts/opt/cloud/bin/savepassword.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/savepassword.sh'` -ne 1525 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/savepassword.sh' is not 1525" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cloud-nic.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cloud-nic.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cloud-nic.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -plug_nic() { -X sudo echo "$tableNo $tableName" >> /etc/iproute2/rt_tables 2>/dev/null -X sudo ip rule add fwmark $tableNo table $tableName 2>/dev/null -X sudo ip route flush table $tableName -X sudo ip route flush cache -} -X -X -unplug_nic() { -X sudo iptables -t mangle -D PREROUTING -i $dev -m state --state NEW -j CONNMARK --set-mark $tableNo 2>/dev/null -X -X sudo ip rule del fwmark $tableNo 2>/dev/null -X sudo ip route flush table $tableName -X sudo sed -i /"$tableNo $tableName"/d /etc/iproute2/rt_tables 2>/dev/null -X sudo ip route flush cache -X # remove network usage rules -X sudo iptables -F NETWORK_STATS_$dev 2>/dev/null -X iptables-save | grep NETWORK_STATS_$dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables $rule -X done -X sudo iptables -X NETWORK_STATS_$dev 2>/dev/null -X # remove vpn network usage rules -X sudo iptables -t mangle -F VPN_STATS_$dev 2>/dev/null -X iptables-save -t mangle | grep VPN_STATS_$dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t mangle $rule -X done -X sudo iptables -t mangle -X VPN_STATS_$dev 2>/dev/null -X # remove rules on this dev -X iptables-save -t mangle | grep $dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t mangle $rule -X done -X iptables-save -t nat | grep $dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t nat $rule -X done -X iptables-save | grep $dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables $rule -X done -X # remove apache config for this eth -X rm -f /etc/apache2/conf.d/vhost$dev.conf -} -X -action=$1 -dev=$2 -tableNo=$((100+${dev:3})) -tableName="Table_$dev" -X -if [ $action == 'add' ] -then -X plug_nic -else -X unplug_nic -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cloud-nic.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cloud-nic.sh': 'MD5 check failed' - ) << \SHAR_EOF -6afed00cefb1dc06b8b4969c2c26933e cloud_scripts/opt/cloud/bin/cloud-nic.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cloud-nic.sh'` -ne 2632 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' is not 2632" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/ipsectunnel.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ipsectunnel.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/ipsectunnel.sh (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/ipsectunnel.sh -M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N#4R-2(*=G!N:6YM87)K/2(P>#4R-"(*"G5S86=E*"D@ -M>PH@("`@<')I;G1F(")5PH@('-U9&\@:7!T86)L -M97,MPH@(&1I2!<"B`@("!P -M:&%S93(@<&]L:6-Y/21ER1R:6=H=&YE='-] -M(B`^/B`D=G!N8V]N9F9I;&4@)B8*("!S=61O(&5C:&\@(B`@='EP93UT=6YN -M96PB(#X^("1V<&YC;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!A=71H8GD] -MVEK96QI9F5T:6UE?7,B(#X^("1V<&YC -M;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!E2(@/CX@ -M)'9P;F-O;F9F:6QE("8F"B`@2!F -M;W(@'1H;W`](B1/4%1!4D&ET("1R970* -` -end -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/ipsectunnel.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh': 'MD5 check failed' - ) << \SHAR_EOF -097a970ec94a68d965ffd7f446e3862d cloud_scripts/opt/cloud/bin/ipsectunnel.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh'` -ne 8769 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' is not 8769" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/ipassoc.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ipassoc.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ipassoc.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/ipassoc.sh (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/ipassoc.sh -M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N"`D("1(96%D55),.B!S=FXZ+R]S=FXN;&%B+G9M;W!S+F-O;2]R97!O2!E>&ES=',B"GT* -M"F1E;%]F=U]C:&%I;E]F;W)?:7`@*"D@>PH@(&QO8V%L('!U8DEP/20H96-H -M;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?2W!R:6YT("0R?2W!R:6YT("0R?2W!R:6YT("0Q?2PH@(&QO -M8V%L(&1E=CTB)#$B"B`@;&]C86P@:7`](B0R(@H@('-U9&\@:7`@861DW!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP/20Q -M"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0Q?22!F;W(@:7`@)'!U8DEP(&]N(&EN=&5R9F%C92`D971H1&5V(@H@("`@ -M(')E='5R;B`Q"B`@9FD*"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0R?2<@('P@9W)E<"`M=R`D -M:7!.;TUAW!R -M:6YT("0R?2#TD*'!R:6YT9B`B)7A<;B(@)&YU;2D*("`@("`@("`@ -M(&5C:&\@)&AE>#L*("`@("`@("`@("-E;F%B;&4@`IS -M9FQA9STP"FQF;&%G/0IF9FQA9ST*8V9L86<]"FYF;&%G/0IO<#TB(@H*:7-? -M;6%S=&5R/3`*:7-?&ET(#(@)&QO8VL@)&QO8VME9`H)"3L["B`@ -M97-A8PID;VYE"@H*:68@6R`B)$%F;&%G)$1F;&%G(B`A/2`B,2(@70IT:&5N -M"B`@("!U&ET("0_("1L;V-K -M("1L;V-K960*9FD*"FEF(%L@(B1F9FQA9R(@/3T@(C$B(%T@)B8@6R`B)$1F -M;&%G(B`]/2`B,2(@70IT:&5N"B`@&ET("0_ -M("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1$9FQA9R(@/3T@(C$B(%T*=&AE -M;@H@(')E;6]V95]A;E]I<"`@)'!U8FQI8TEP("8F"B`@9&5L7V9W7V-H86EN -M7V9O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ipassoc.sh': 'MD5 check failed' - ) << \SHAR_EOF -ad068a0cc84ded8f79c63ce3aced4586 cloud_scripts/opt/cloud/bin/ipassoc.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ipassoc.sh'` -ne 13401 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ipassoc.sh' is not 13401" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/line_edit.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/line_edit.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/line_edit.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/line_edit.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/line_edit.py' && -#!/usr/bin/python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import logging -import re -import shutil -import os -X -X -class LineEdit(object): -X """Helper for LineEditingFile that keeps track of one edit.""" -X def __init__(self, search, sub, *sub_args, **kwargs): -X if len(sub_args) > 0: -X sub = sub % sub_args -X flags = kwargs.get('flags', 0) -X self.pattern = re.compile(search, flags=flags) -X self.sub = sub -X self.count = kwargs.get('count', 0) # max subs to make -X self.subs = 0 # subs made so far -X -X -class LineEditingFile(object): -X """ -X Atomic, conservative, by-line editing of configuration files. -X -X Will not touch the file if there are no changes to do. -X Reasonably efficient for large files, though files with a long time -X before their first match will use memory. -X -X -X Given a vhosts file such as: -X >>> with open('doctest-vhosts.conf', 'w') as f: -X ... f.write(''' -X ... Listen foo:80 -X ... -X ... DocRoot /var/www -X ... -X ... -X ... Listen other:80 -X ... -X ... DocRoot /var/www -X ... -X ... ''') -X ... -X -X To replace the hostname for the first virtualhost entry: -X >>> new_hostname = 'fooooo' -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... f.replace(r'', '', new_hostname, count=1, flags=re.I) -X ... f.replace(r'Listen .*?:80', 'Listen %s:80', new_hostname, count=1, flags=re.I) -X ... -X -X Be careful with the matches! -X A second invocation of the same rule will edit the second vhost: -X >>> new_hostname = 'fooooo' -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... f.replace(r'', '', new_hostname, count=1, flags=re.I) -X ... -X -X To move all hosts from port 80 to port 8080: -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... f.replace(r'', '', flags=re.I) -X ... f.replace(r'Listen (.*?):80', 'Listen \\\\1:80', flags=re.I) -X ... -X -X (please note in this example there's a double escape of the backreference -X \\\\1, to make the example work with doctest) -X -X Since this example already matched all files, a second invocation does nothing: -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... f.replace(r'', '', flags=re.I) -X ... -X -X It's also acceptable to not make any edits at all: -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... pass -X ... -X -X You don't _have_ to use a with statement: -X >>> f = LineEditingFile('doctest-vhosts.conf') -X >>> f.replace(r'DocRoot /var/www', 'DocRoot /var/www/html', flags=re.I) -X >>> changes = f.commit() -X >>> print changes -X 2 -X >>> -X -X Cleanup of the example vhosts.conf: -X >>> # noinspection PyBroadException -X >>> try: -X ... os.unlink('doctest-vhosts.conf') -X ... os.unlink('doctest-vhosts.conf.bak') -X ... os.unlink('doctest-vhosts.conf.new') -X ... except: -X ... pass -X ... -X """ -X -X def __init__(self, filename): -X self.filename = filename -X self.changed = False -X self.edits = [] -X -X def __enter__(self): -X return self -X -X def replace(self, search, sub, *sub_args, **kwargs): -X edit = LineEdit(search, sub, *sub_args, **kwargs) -X self.edits.append(edit) -X -X # noinspection PyUnusedLocal -X def __exit__(self, exc, value, traceback): -X if exc is not None: -X return False # return false results in re-raise -X -X self.commit() -X -X def commit(self): -X changes = 0 -X changed_file = None -X changed_filename = self.filename + '.new' -X try: -X lines = [] -X backup_filename = self.filename + '.bak' -X # noinspection PyUnusedLocal -X stat = None -X with open(self.filename, 'r') as orig: -X stat = os.fstat(orig.fileno()) -X for line in orig: -X changed_line = line -X for edit in self.edits: -X remaining_count = 0 -X if edit.count != 0: -X remaining_count = edit.count - edit.subs -X if remaining_count < 0: -X raise Exception("Made too many edits") -X elif remaining_count == 0: -X continue -X changed_line, subs = edit.pattern.subn( -X edit.sub, line, remaining_count) -X if changed_line != line: -X if changed_file is None: -X logging.debug("Editing file %s" % self.filename) -X logging.debug(" - %s" % line[:-1]) -X logging.debug(" + %s" % changed_line[:-1]) -X changes += subs -X edit.subs += subs -X if changes == 0: # buffer until we find a change -X lines.append(changed_line) -X elif changed_file is None: # found first change, flush buffer -X changed_file = open(changed_filename, 'w') -X if hasattr(os, 'fchmod'): -X os.fchmod(changed_file.fileno(), # can cause OSError which aborts -X stat.st_mode) -X if hasattr(os, 'fchown'): -X os.fchown(changed_file.fileno(), # can cause OSError which aborts -X stat.st_uid, stat.st_gid) -X changed_file.writelines(lines) -X changed_file.write(changed_line) -X del lines # reclaim buffer memory -X else: # already flushed, just write -X changed_file.write(changed_line) -X -X if changes == 0: -X logging.info("No edits need for file %s" % -X self.filename) -X else: -X changed_file.close() -X changed_file = None -X if os.path.exists(backup_filename): # back up the original -X os.unlink(backup_filename) -X shutil.copy(self.filename, backup_filename) -X os.rename(changed_filename, self.filename) # the swap -X logging.info("Edited file %s (%d changes)" % -X (self.filename, changes)) -X finally: -X if changed_file is not None: # failed, clean up -X changed_file.close() -X os.unlink(changed_filename) -X return changes -X -X -if __name__ == "__main__": -X logging.basicConfig(level=logging.DEBUG) -X import doctest -X doctest.testmod() -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/line_edit.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/line_edit.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/line_edit.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/line_edit.py': 'MD5 check failed' - ) << \SHAR_EOF -4d05b8a011ff9c6132a3ca4ff477a161 cloud_scripts/opt/cloud/bin/line_edit.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/line_edit.py'` -ne 7961 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/line_edit.py' is not 7961" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/get_template_version.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/get_template_version.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/get_template_version.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/get_template_version.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/get_template_version.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# As the last command send to router before any rules operation, wait until boot up done -X -__TIMEOUT=240 -__FLAGFILE=/var/cache/cloud/boot_up_done -done=0 -for i in `seq 1 $(($__TIMEOUT * 10))` -do -X if [ -e $__FLAGFILE ] -X then -X done=1 -X break -X fi -X sleep 0.1 -X if [ $((i % 10)) -eq 0 ] -X then -X logger -t cloud "Waiting for VM boot up done for one second" -X fi -done -X -if [ -z $done ] -then -X # declare we failed booting process -X echo "Waited 60 seconds but boot up haven't been completed" -X exit -fi -X -release=`cat /etc/cloudstack-release` -sig=`cat /var/cache/cloud/cloud-scripts-signature` -echo "${release}&${sig}" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/get_template_version.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/get_template_version.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/get_template_version.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/get_template_version.sh': 'MD5 check failed' - ) << \SHAR_EOF -2234ad00c02a6be63cb0f4f876b8960b cloud_scripts/opt/cloud/bin/get_template_version.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/get_template_version.sh'` -ne 1449 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/get_template_version.sh' is not 1449" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/update_config.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/update_config.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/update_config.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/update_config.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/update_config.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,N87)G=BD*:68@87)G8R`A/2`R(&%N9"!A7,N97AI="@Q*0H*(R!&25A- -M12!W92!S:&]U;&0@9V5T('1H:7,@;&]C871I;VX@9G)O;2!A(&-O;F9I9W5R -M871I;VX@8VQA7,N97AI="AR971U -M2!S<&5E9&EN9R!U<"!L;V%D:6YG('1I;65S -M"B`@("!I9B!N;W0@*&]S+F5N=FER;VXN9V5T*"=$149%4E]#3TY&242YJ7,N87)G=ELQ -M72!O2`]($YO -M;F4*"B`@("!F;W(@:S$L('8Q(&EN(&=U97-T;F5T7V1I8W0N:71E7,N87!P96YD*&LQ*0H*("`@(&EF(&YO -M="!E>&ES=&EN9U]K97ES.@H@("`@("`@("2`Z -M.B!296-O;F9I9W5R:6YG(&=U97-T(&YE='=O&ES=&EN9U]K97ES.@H@("`@("`@("2!I;B!E>&ES=&EN9U]K97ES.@H@("`@("`@(&9O&ES=',@/2!4&ES=',Z"B`@("`@("`@("`@(&)R96%K -M"@H@("`@B(I*3H* -M("`@("`@("!S>7,N97AI="@P*0H@("`@;&]G9VEN9RYE2`Z.B!5;F%B;&4@=&\@7,N97AI="@Q -M*0H*(R!)9B!T:&4@9W5E2`Z.B!.;R!N965D('1O('!R;V-E/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/update_config.py': 'MD5 check failed' - ) << \SHAR_EOF -a2062b2b010940ea783d8256b807c488 cloud_scripts/opt/cloud/bin/update_config.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/update_config.py'` -ne 5136 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/update_config.py' is not 5136" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/edithosts.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/edithosts.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/edithosts.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/edithosts.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/edithosts.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -X -# edithosts.sh -- edit the dhcphosts file on the routing domain -X -usage() { -X printf "Usage: %s: -m -4 -6 -h -d -n -s -u [-N]\n" $(basename $0) >&2 -} -X -mac= -ipv4= -ipv6= -host= -dflt= -dns= -routes= -duid= -nondefault= -X -while getopts 'm:4:h:d:n:s:6:u:N' OPTION -do -X case $OPTION in -X m) mac="$OPTARG" -X ;; -X 4) ipv4="$OPTARG" -X ;; -X 6) ipv6="$OPTARG" -X ;; -X u) duid="$OPTARG" -X ;; -X h) host="$OPTARG" -X ;; -X d) dflt="$OPTARG" -X ;; -X n) dns="$OPTARG" -X ;; -X s) routes="$OPTARG" -X ;; -X N) nondefault=1 -X ;; -X ?) usage -X exit 2 -X ;; -X esac -done -X -DHCP_HOSTS=/etc/dhcphosts.txt -DHCP_OPTS=/etc/dhcpopts.txt -DHCP_LEASES=/var/lib/misc/dnsmasq.leases -HOSTS=/etc/hosts -X -source /root/func.sh -X -lock="biglock" -#default timeout value is 30 mins as DhcpEntryCommand is not synchronized on agent side any more, -#and multiple commands can be sent to the same VR at a time -locked=$(getLockFile $lock 1800) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -grep "redundant_router=1" /var/cache/cloud/cmdline > /dev/null -no_redundant=$? -X -dnsmasq_managed_lease=`cat /var/cache/cloud/dnsmasq_managed_lease` -X -wait_for_dnsmasq () { -X local _pid=$(pidof dnsmasq) -X for i in 0 1 2 3 4 5 6 7 8 9 10 -X do -X sleep 1 -X _pid=$(pidof dnsmasq) -X [ "$_pid" != "" ] && break; -X done -X [ "$_pid" != "" ] && return 0; -X logger -t cloud "edithosts: timed out waiting for dnsmasq to start" -X return 1 -} -X -if [ $dnsmasq_managed_lease ] -then -X #release previous dhcp lease if present -X logger -t cloud "edithosts: releasing $ipv4" -X dhcp_release $(ip route get "$ipv4/32" | grep " dev " | sed -e "s/^.* dev \([^ ]*\) .*$/\1/g") $ipv4 $(grep "$ipv4 " $DHCP_LEASES | awk '{print $2}') > /dev/null 2>&1 -X logger -t cloud "edithosts: released $ipv4" -fi -X -logger -t cloud "edithosts: update $mac $ipv4 $ipv6 $host to hosts" -X -[ ! -f $DHCP_HOSTS ] && touch $DHCP_HOSTS -[ ! -f $DHCP_OPTS ] && touch $DHCP_OPTS -[ ! -f $DHCP_LEASES ] && touch $DHCP_LEASES -X -#delete any previous entries from the dhcp hosts file -sed -i /$mac/d $DHCP_HOSTS -if [ $ipv4 ] -then -X sed -i /$ipv4,/d $DHCP_HOSTS -fi -if [ $ipv6 ] -then -X #searching with [$ipv6], matching other ip so using $ipv6], -X sed -i /$ipv6],/d $DHCP_HOSTS -fi -# don't want to do this in the future, we can have same VM with multiple nics/entries -sed -i /$host,/d $DHCP_HOSTS -X -#put in the new entry -if [ $ipv4 ] -then -X echo "$mac,$ipv4,$host,infinite" >>$DHCP_HOSTS -fi -if [ $ipv6 ] -then -X if [ $nondefault ] -X then -X echo "id:$duid,set:nondefault6,[$ipv6],$host,infinite" >>$DHCP_HOSTS -X else -X echo "id:$duid,[$ipv6],$host,infinite" >>$DHCP_HOSTS -X fi -fi -X -if [ $dnsmasq_managed_lease -eq 0 ] -then -X #delete leases to supplied mac and ip addresses -X if [ $ipv4 ] -X then -X sed -i /$mac/d $DHCP_LEASES -X sed -i /"$ipv4 "/d $DHCP_LEASES -X fi -X if [ $ipv6 ] -X then -X sed -i /$duid/d $DHCP_LEASES -X sed -i /"$ipv6 "/d $DHCP_LEASES -X fi -X sed -i /"$host "/d $DHCP_LEASES -X -X #put in the new entry -X if [ $ipv4 ] -X then -X echo "0 $mac $ipv4 $host *" >> $DHCP_LEASES -X fi -X if [ $ipv6 ] -X then -X echo "0 $duid $ipv6 $host *" >> $DHCP_LEASES -X fi -fi -X -#edit hosts file as well -if [ $ipv4 ] -then -X sed -i /"$ipv4 "/d $HOSTS -fi -if [ $ipv6 ] -then -X sed -i /"$ipv6 "/d $HOSTS -fi -sed -i /" $host$"/d $HOSTS -if [ $ipv4 ] -then -X echo "$ipv4 $host" >> $HOSTS -fi -if [ $ipv6 ] -then -X echo "$ipv6 $host" >> $HOSTS -fi -X -if [ "$dflt" != "" -a "$ipv4" != "" ] -then -X #make sure dnsmasq looks into options file -X sed -i /dhcp-optsfile/d /etc/dnsmasq.conf -X echo "dhcp-optsfile=$DHCP_OPTS" >> /etc/dnsmasq.conf -X -X tag=$(echo $ipv4 | tr '.' '_') -X sed -i /$tag,/d $DHCP_OPTS -X if [ "$dflt" == "0.0.0.0" ] -X then -X logger -t cloud "$0: unset default router for $ipv4" -X logger -t cloud "$0: unset dns server for $ipv4" -X echo "$tag,3" >> $DHCP_OPTS -X echo "$tag,6" >> $DHCP_OPTS -X echo "$tag,15" >> $DHCP_OPTS -X fi -X [ "$routes" != "" ] && echo "$tag,121,$routes" >> $DHCP_OPTS -X #delete entry we just put in because we need a tag -X sed -i /$ipv4,/d $DHCP_HOSTS -X #put it back with a tag -X echo "$mac,set:$tag,$ipv4,$host,infinite" >>$DHCP_HOSTS -fi -X -# make dnsmasq re-read files -pid=$(pidof dnsmasq) -if [ "$pid" != "" ] -then -X # use SIGHUP to avoid service outage if dhcp_release is available. -X if [ $dnsmasq_managed_lease ] -X then -X kill -HUP $pid -X else -X systemctl restart dnsmasq -X fi -else -X if [ $no_redundant -eq 1 ] -X then -X wait_for_dnsmasq -X else -X logger -t cloud "edithosts: skip wait dnsmasq due to redundant virtual router" -X fi -fi -X -ret=$? -unlock_exit $ret $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/edithosts.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/edithosts.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/edithosts.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/edithosts.sh': 'MD5 check failed' - ) << \SHAR_EOF -68e47d6a7efaacefbbaebf8b4e7408c3 cloud_scripts/opt/cloud/bin/edithosts.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/edithosts.sh'` -ne 5502 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/edithosts.sh' is not 5502" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/diagnostics.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/diagnostics.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/diagnostics.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/diagnostics.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/diagnostics.py' && -#!/usr/bin/env python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import shlex -import subprocess -import sys -X -X -def run_cmd(command): -X if command is not None: -X try: -X p = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE) -X stdout, stderr = p.communicate() -X return_code = p.returncode -X -X except OSError as e: -X stdout = "Check your command type" -X stderr = "Exception occurred: %s" % e -X return_code = 1 -X -X finally: -X print('%s&&' % stdout.strip()) -X print('%s&&' % stderr.strip()) -X print('%s' % return_code) -X -X -def get_command(): -X arguments = sys.argv -X cmd = " ".join(arguments[1:]) -X cmd_type = sys.argv[1] -X -X if cmd_type == 'ping': -X if '-c' in arguments: -X return cmd -X else: -X return cmd + " -c 4" -X -X elif cmd_type == 'traceroute': -X if '-m' in arguments: -X return cmd -X else: -X return cmd + " -m 20" -X -X elif cmd_type == 'arping': -X if '-c' in arguments: -X return cmd -X else: -X return cmd + " -c 4" -X -X else: -X return None -X -X -if __name__ == "__main__": -X command = get_command() -X run_cmd(command) -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/diagnostics.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/diagnostics.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/diagnostics.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/diagnostics.py': 'MD5 check failed' - ) << \SHAR_EOF -91a837e5bcafee663cbfb8532574405a cloud_scripts/opt/cloud/bin/diagnostics.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/diagnostics.py'` -ne 2012 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/diagnostics.py' is not 2012" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_monitorservice.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_monitorservice.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_monitorservice.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_monitorservice.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py': 'MD5 check failed' - ) << \SHAR_EOF -1121a063f2dbcfc1bdc426ceba249184 cloud_scripts/opt/cloud/bin/cs_monitorservice.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py'` -ne 1541 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py' is not 1541" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpn_l2tp.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpn_l2tp.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpn_l2tp.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -X -X -#set -x -usage() { -X printf "Usage:\n" -X printf "Create VPN : %s -c -r -l -p -s -i \n" $(basename $0) -X printf "Delete VPN : %s -d -l -s -D -C < local cidr> \n" $(basename $0) -X printf "Add VPN User : %s -u \n" $(basename $0) -X printf "Remote VPN User: %s -U /dev/null -X then -X is_vpc=true -X fi -X -X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 500 -j ACCEPT -X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 4500 -j ACCEPT -X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 1701 -j ACCEPT -X sudo iptables $op INPUT -i $dev -p ah -j ACCEPT -X sudo iptables $op INPUT -i $dev -p esp -j ACCEPT -X if $is_vpc -X then -X # Need to apply the following ACL rules as well. -X if sudo iptables -N VPN_FORWARD &> /dev/null -X then -X sudo iptables -I FORWARD -i ppp+ -j VPN_FORWARD -X sudo iptables -I FORWARD -o ppp+ -j VPN_FORWARD -X sudo iptables -A VPN_FORWARD -j DROP -X fi -X sudo iptables $op VPN_FORWARD -i ppp+ -o ppp+ -j RETURN -X sudo iptables $op VPN_FORWARD -i ppp+ -d $cidr -j RETURN -X sudo iptables $op VPN_FORWARD -s $cidr -o ppp+ -j RETURN -X else -X sudo iptables $op FORWARD -i ppp+ -d $cidr -j ACCEPT -X sudo iptables $op FORWARD -s $cidr -o ppp+ -j ACCEPT -X sudo iptables $op FORWARD -i ppp+ -o ppp+ -j ACCEPT -X fi -X sudo iptables $op INPUT -i ppp+ -m udp -p udp --dport 53 -j ACCEPT -X sudo iptables $op INPUT -i ppp+ -m tcp -p tcp --dport 53 -j ACCEPT -X sudo iptables -t nat $op PREROUTING -i ppp+ -p tcp -m tcp --dport 53 -j DNAT --to-destination $local_ip -X sudo iptables -t nat $op PREROUTING -i ppp+ -p udp -m udp --dport 53 -j DNAT --to-destination $local_ip -X -X if $is_vpc -X then -X return -X fi -X -X if sudo iptables -t mangle -N VPN_$public_ip &> /dev/null -X then -X logger -t cloud "$(basename $0): created VPN chain in PREROUTING mangle" -X sudo iptables -t mangle -I PREROUTING -d $public_ip -j VPN_$public_ip -X sudo iptables -t mangle -A VPN_$public_ip -j RETURN -X fi -X op2="-D" -X [ "$op" == "-A" ] && op2="-I" -X sudo iptables -t mangle $op VPN_$public_ip -p ah -j ACCEPT -X sudo iptables -t mangle $op VPN_$public_ip -p esp -j ACCEPT -} -X -start_ipsec() { -X systemctl is-active ipsec > /dev/null -X if [ $? -ne 0 ] -X then -X systemctl start ipsec > /dev/null -X #Wait until ipsec started, 5 seconds at most -X for i in {1..5} -X do -X logger -t cloud "$(basename $0): waiting ipsec start..." -X systemctl is-active ipsec > /dev/null -X result=$? -X if [ $result -eq 0 ] -X then -X break -X fi -X sleep 1 -X done -X fi -X systemctl is-active ipsec > /dev/null -X return $? -} -X -ipsec_server() { -X local op=$1 -X case $op in -X "start") start_ipsec -X sudo systemctl start xl2tpd -X ;; -X "stop") sudo systemctl stop xl2tpd -X ;; -X "restart") start_ipsec -X sudo ipsec auto --rereadall -X systemctl stop xl2tpd -X systemctl start xl2tpd -X ;; -X esac -} -X -create_l2tp_ipsec_vpn_server() { -X local ipsec_psk=$1 -X local public_ip=$2 -X local client_range=$3 -X local local_ip=$4 -X -X sed -i -e "s/left=.*$/left=$public_ip/" /etc/ipsec.d/l2tp.conf -X echo "$public_ip %any : PSK \"$ipsec_psk\"" > /etc/ipsec.d/ipsec.any.secrets -X sed -i -e "s/^ip range = .*$/ip range = $client_range/" /etc/xl2tpd/xl2tpd.conf -X sed -i -e "s/^local ip = .*$/local ip = $local_ip/" /etc/xl2tpd/xl2tpd.conf -X -X sed -i -e "s/^ms-dns.*$/ms-dns $local_ip/" /etc/ppp/options.xl2tpd -X -X iptables_ "-D" $public_ip -X iptables_ "-I" $public_ip -X -X ipsec_server "restart" -X -X ipsec auto --rereadsecrets -X ipsec auto --replace L2TP-PSK -} -X -destroy_l2tp_ipsec_vpn_server() { -X local public_ip=$1 -X -X ipsec auto --down L2TP-PSK -X -X iptables_ "-D" $public_ip -X -X ipsec_server "stop" -} -X -remove_l2tp_ipsec_user() { -X local u=$1 -X sed -i -e "/^$u .*$/d" /etc/ppp/chap-secrets -X if [ -x /usr/bin/tdbdump ]; then -X pid=$(tdbdump /var/run/pppd2.tdb | grep -w $u | awk -F';' '{print $4}' | awk -F= '{print $2}') -X [ "$pid" != "" ] && kill -9 $pid -X fi -X return 0 -} -X -add_l2tp_ipsec_user() { -X local u=$1 -X local passwd=$2 -X -X uptodate=$(grep "^$u \* \"$passwd\" \*$" /etc/ppp/chap-secrets) -X if [ "$uptodate" == "" ] -X then -X remove_l2tp_ipsec_user $u -X echo "$u * \"$passwd\" *" >> /etc/ppp/chap-secrets -X fi -} -X -rflag= -pflag= -lflag= -sflag= -create= -destroy= -useradd= -userdel= -dev= -cidr= -X -while getopts 'cdl:p:r:s:u:U:i:C:' OPTION -do -X case $OPTION in -X c) create=1 -X ;; -X d) destroy=1 -X ;; -X u) useradd=1 -X user_pwd="$OPTARG" -X ;; -X U) userdel=1 -X user="$OPTARG" -X ;; -X r) rflag=1 -X client_range="$OPTARG" -X ;; -X p) pflag=1 -X ipsec_psk="$OPTARG" -X ;; -X l) lflag=1 -X local_ip="$OPTARG" -X ;; -X s) sflag=1 -X server_ip="$OPTARG" -X ;; -X i) dev="$OPTARG" -X ;; -X C) cidr="$OPTARG" -X ;; -X ?) usage -X exit 2 -X ;; -X esac -done -X -if [ "$dev" == "" ] -then -X dev="eth2" -fi -X -if [ "$cidr" == "" ] -then -X cidr=$(get_intf_ip "eth0") -fi -X -[ "$create$destroy" == "11" ] || [ "$create$destroy$useradd$userdel" == "" ] && usage && exit 2 -[ "$create" == "1" ] && [ "$lflag$pflag$rflag$sflag" != "1111" ] && usage && exit 2 -X -if [ "$create" == "1" ]; then -X create_l2tp_ipsec_vpn_server $ipsec_psk $server_ip $client_range $local_ip -X exit $? -fi -X -if [ "$destroy" == "1" ]; then -X destroy_l2tp_ipsec_vpn_server $server_ip -X exit $? -fi -X -if [ "$useradd" == "1" ]; then -X u=$(echo $user_pwd | awk -F',' '{print $1}') -X pwd=$(echo $user_pwd | awk -F',' '{print $2}') -X add_l2tp_ipsec_user $u $pwd -X exit $? -fi -if [ "$userdel" == "1" ]; then -X remove_l2tp_ipsec_user $user -X exit $? -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpn_l2tp.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh': 'MD5 check failed' - ) << \SHAR_EOF -79e41044b43cc49c6b11859534bc454d cloud_scripts/opt/cloud/bin/vpn_l2tp.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh'` -ne 6986 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' is not 6986" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_guestnetwork.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_guestnetwork.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_guestnetwork.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -keys = ['eth1', 'eth2', 'eth3', 'eth4', 'eth5', 'eth6', 'eth7', 'eth8', 'eth9'] -X -X -def merge(dbag, gn): -X device = gn['device'] -X -X if not gn['add'] and device in dbag: -X -X if dbag[device]: -X device_to_die = dbag[device][0] -X try: -X dbag[device].remove(device_to_die) -X except ValueError, e: -X print "[WARN] cs_guestnetwork.py :: Error occurred removing item from databag. => %s" % device_to_die -X del(dbag[device]) -X else: -X del(dbag[device]) -X -X else: -X dbag.setdefault(device, []).append(gn) -X -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_guestnetwork.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py': 'MD5 check failed' - ) << \SHAR_EOF -599105da1bdfaced1f2c8078d3fbed19 cloud_scripts/opt/cloud/bin/cs_guestnetwork.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py'` -ne 1401 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' is not 1401" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_vmdata.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vmdata.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vmdata.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, metadata): -X dbag[metadata["vm_ip_address"]] = metadata["vm_metadata"] -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_vmdata.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vmdata.py': 'MD5 check failed' - ) << \SHAR_EOF -3ee2451cb48927d361f05bb5fe3df4ce cloud_scripts/opt/cloud/bin/cs_vmdata.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vmdata.py'` -ne 892 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' is not 892" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/dnsmasq.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/dnsmasq.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/dnsmasq.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -usage() { -X printf "Usage: %s: \n" $(basename $0) >&2 -} -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -#set -x -#backup the old config file -DHCP_CONFIG=/etc/dnsmasq.d/multiple_ranges.conf -DHCP_CONFIG_BAK=/etc/dnsmasq.d/multiple_ranges.conf.bak -DHCP_CONFIG_MAIN=/etc/dnsmasq.conf -DHCP_CONFIG_MAIN_BAK=/etc/dnsmasq.conf.bak -DHCP_FAILURE_CONFIG=/etc/multiple_ranges.conf.failure -DHCP_FAILURE_CONFIG_MAIN=/etc/dnsmasq.conf.failure -CMDLINE=$(cat /var/cache/cloud/cmdline | tr '\n' ' ') -X -#take a backup copy of the dnsmasq file. -cp "$DHCP_CONFIG_MAIN" "$DHCP_CONFIG_MAIN_BAK" -cp "$DHCP_CONFIG" "$DHCP_CONFIG_BAK" -X -#empty the config file -echo > $DHCP_CONFIG -X -var="$1" -dhcp_range="" -dhcp_gateway="" -dhcp_netmask="" -dns_option="" -dns_servers="" -count=0 -X -X -# fetching the dns Ips from the command line. -dns1=$(echo "$CMDLINE" | grep -o " dns1=[[:digit:]].* " | sed -e 's/dns1=//' | awk '{print $1}') -dns2=$(echo "$CMDLINE" | grep -o " dns2=[[:digit:]].* " | sed -e 's/dns2=//' | awk '{print $1}') -X -dns_servers="${dns1}" -if [ -n "$dns2" ] -then -dns_servers="${dns1},${dns2}" -fi -X -X -# check if useextdns is true -use_ext_dns=$(echo "$CMDLINE" | grep -o "useextdns=true") -while [ -n "$var" ] -do -X var1=$(echo $var | cut -f1 -d "-") -X routerip=$( echo $var1 | cut -f1 -d ":" ) -X gateway=$(echo $var1 | cut -f2 -d ":") -X netmask=$(echo $var1 | cut -f3 -d ":") -X start_ip_of_subnet=$(echo $var1 | cut -f4 -d ":") -X dhcp_range="${dhcp_range}"'dhcp-range=set:range'$count","$start_ip_of_subnet",static \n" -X dhcp_gateway="${dhcp_gateway}"'dhcp-option=tag:range'$count",3,"$gateway" \n" -X dhcp_netmask="${dhcp_netmask}"'dhcp-option=tag:range'$count",1,"$netmask" \n" -X if [ -n "$use_ext_dns" ] -X then -X dns_option="${dns_option}"'dhcp-option=tag:range'$count",6,"$dns_servers" \n" -X else -X dns_option="${dns_option}"'dhcp-option=tag:range'$count",6,$routerip"","$dns_servers" \n" -X fi -X var=$( echo $var | sed "s/${var1}-//" ) -X count=$[$count+1] -done -X -#logging the configuration being removed. -log="" -log="${log}"`grep "^dhcp-option=6" "$DHCP_CONFIG_MAIN"`"\n" -log="${log}"`grep "^dhcp-option=option:router" "$DHCP_CONFIG_MAIN"`"\n" -log="${log}"`grep "^dhcp-range=" "$DHCP_CONFIG_MAIN"`"\n" -X -if [ "$log" != '\n\n\n' ] -then -X #Cleaning the existing dhcp confgiuration -X logger -t cloud "dnsmasq.sh: remvoing the primaryip confg from dnsmasq.conf and adding it to /etc/dnsmaq.d/multiple_ranges.conf" -X logger -t cloud "dnsmasq.sh: config removed from dnsmasq.conf is $log" -X sed -i -e '/dhcp-option=6/d' "$DHCP_CONFIG_MAIN" -X sed -i -e '/dhcp-option=option:router/d' "$DHCP_CONFIG_MAIN" -X sed -i -e '/^dhcp-range=/d' "$DHCP_CONFIG_MAIN" -fi -X -#wrting the new config into the config file. -echo -e "$dhcp_range" >> "$DHCP_CONFIG" -echo -e "$dhcp_gateway" >> "$DHCP_CONFIG" -echo -e "$dhcp_netmask" >> "$DHCP_CONFIG" -echo -e "$dns_option" >> "$DHCP_CONFIG" -X -X -#restart the dnsmasq -systemctl restart dnsmasq -result=$? -if [ "$result" -ne "0" ] -then -X logger -t cloud "dnsmasq.sh: could not configure dnsmasq" -X logger -t cloud "dnsmasq.sh: reverting to the old config" -X logger -t cloud "dnsmasq.sh: copying the failure config to `$DHCP_FAILURE_CONFIG` and `$DHCP_FAILURE_CONFIG_MAIN`" -X cp "$DHCP_CONFIG" "$DHCP_FAILURE_CONFIG" -X cp "$DHCP_CONFIG_MAIN" "$DHCP_FAILURE_CONFIG_MAIN" -X cp "$DHCP_CONFIG_BAK" "$DHCP_CONFIG" -X cp "$DHCP_CONFIG_MAIN_BAK" "$DHCP_CONFIG_MAIN" -X systemctl restart dnsmasq -X unlock_exit $result $lock $locked -fi -rm "$DHCP_CONFIG_BAK" -rm "$DHCP_CONFIG_MAIN_BAK" -unlock_exit $result $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/dnsmasq.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/dnsmasq.sh': 'MD5 check failed' - ) << \SHAR_EOF -d603da3043a61bea911e21fb4da8ded0 cloud_scripts/opt/cloud/bin/dnsmasq.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/dnsmasq.sh'` -ne 4359 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' is not 4359" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_dhcp.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_dhcp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_dhcp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_dhcp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_dhcp.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2P@96YT2!N;W0@ -M:6X@7,Z"B`@("`@("`@("`@(')E;6]V95]K97ES+F%D9"AK -M97DI"@H@("`@("`@(&9O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_dhcp.py': 'MD5 check failed' - ) << \SHAR_EOF -9b17e95a8fcb1cf185c9e74cc6ddecca cloud_scripts/opt/cloud/bin/cs_dhcp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_dhcp.py'` -ne 1533 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_dhcp.py' is not 1533" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_cmdline.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_cmdline.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_cmdline.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, cmdline): -X if 'redundant_router' in cmdline['cmd_line']: -X cmdline['cmd_line']['redundant_router'] = "true" -X else: -X cmdline['cmd_line']['redundant_router'] = "false" -X dbag['config'] = cmdline['cmd_line'] -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_cmdline.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_cmdline.py': 'MD5 check failed' - ) << \SHAR_EOF -a6290582c86832c4c94985580ceda8e5 cloud_scripts/opt/cloud/bin/cs_cmdline.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_cmdline.py'` -ne 1045 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' is not 1045" - fi -fi -# ============= cloud_scripts/root/reconfigLB.sh ============== -if test ! -d 'cloud_scripts/root'; then - mkdir 'cloud_scripts/root' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/root." -else ${echo} "x - failed to create directory cloud_scripts/root." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/root/reconfigLB.sh' -then -${echo} "x - SKIPPING cloud_scripts/root/reconfigLB.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/reconfigLB.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/reconfigLB.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -ret=0 -X -new_config=$1 -X -# save previous state -X mv /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy.cfg.old -X -X mv $new_config /etc/haproxy/haproxy.cfg -X if haproxy -p /var/run/haproxy.pid -f /etc/haproxy/haproxy.cfg -sf $(cat /var/run/haproxy.pid); then -X logger -t cloud "New haproxy instance successfully loaded, stopping previous one." -X ret=0 -X else -X logger -t cloud "New instance failed to start, resuming previous one." -X mv /etc/haproxy/haproxy.cfg $new_config -X mv /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg -X haproxy -p /var/run/haproxy.pid -f /etc/haproxy/haproxy.cfg -sf $(cat /var/run/haproxy.pid) -X ret=1 -X fi -X -exit $ret -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/reconfigLB.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/root/reconfigLB.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/reconfigLB.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/reconfigLB.sh': 'MD5 check failed' - ) << \SHAR_EOF -d73e1491560b810ac47d1aaeb2b466ba cloud_scripts/root/reconfigLB.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/reconfigLB.sh'` -ne 1454 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/reconfigLB.sh' is not 1454" - fi -fi -# ============= cloud_scripts/root/monitorServices.py ============== -if test ! -d 'cloud_scripts/root'; then - mkdir 'cloud_scripts/root' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/root." -else ${echo} "x - failed to create directory cloud_scripts/root." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/root/monitorServices.py' -then -${echo} "x - SKIPPING cloud_scripts/root/monitorServices.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/monitorServices.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/monitorServices.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,L('!A=&@*9G)O;2!H96%L=&A?8VAE -M8VMS+G5T:6QI='D@:6UP;W)T(&=E=$AE86QT:$-H96-KWT* -M("`@('!A2`K)UTG*R(@(B`K -M("=;)RMP2LG72<@*R`B("(@*R!M -M2!O;F4@<&ED(&]R -M(&YO=`H@("`@:68@97AI=%-T871U6EN9R!F97<@;6]R92!T:6UEPH@("`@("`@("`@("`@("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EWT@(U-K:7`@WT*("`@(&9A:6QI;F=#:&5C:W,@/2!;70H@ -M("`@:68@8VAE8VM4>7!E(#T](")B87-I8R(Z"B`@("`@("`@;6]N:71297-U -M;'0L(&9A:6QI;F=#:&5C:W,@/2!M;VYI=%!R;V-E&-L=61E(#T@ -M:&-?9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K&-L=61E -M9%]H96%L=&A?8VAE8VMS(B!I;B!H8U]D871A(&5L7!E*0H@("`@("`@("`@("`@("`@:68@;&5N*')E="D@/3T@,#H*("`@("`@ -M("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@("`@("`@:68@(G-U -M8V-E7,N87)G=BD@/3T@,CH*("`@("`@("!I9B!S>7,N87)G=ELQ72`]/2`B -M861V86YC960B.@H@("`@("`@("`@("!M86EN*")A9'9A;F-E9"(I"B`@("`@ -M("`@96QI9B!S>7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@("`@("!M -M86EN*")B87-I8R(I"B`@("`@("`@96QS93H*("`@("`@("`@("`@<')I;G1D -M*")%7!E(&]F('1E7,N87)G=BD* -M("`@(&5L/dev/null 2>&1 || ${echo} 'cloud_scripts/root/monitorServices.py': 'MD5 check failed' - ) << \SHAR_EOF -d46009a10f68b7f2c57e43e215cba41c cloud_scripts/root/monitorServices.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/monitorServices.py'` -ne 12747 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/monitorServices.py' is not 12747" - fi -fi -# ============= cloud_scripts/root/health_checks/iptables_check.py ============== -if test ! -d 'cloud_scripts/root/health_checks'; then - mkdir 'cloud_scripts/root/health_checks' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/root/health_checks." -else ${echo} "x - failed to create directory cloud_scripts/root/health_checks." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/iptables_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/iptables_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/iptables_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/iptables_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W'!E8W1E9"`](%M="B`@("`@("`@9&5S=$EP(#T@<&]R=$9O'0L('-R8U!O2!I;B!I<%1A8FQE4QI'!E8W1E9#H*("`@("`@("`@("`@("`@("`@ -M("!I9B!I<%1A8FQE16YT'!E8W1E9$5N=')Y*2`]/2`M,3H* -M("`@("`@("`@("`@("`@("`@("`@("`@9F]U;F1!;&P@/2!&86QS90H@("`@ -M("`@("`@("`@("`@("`@("`@("!B4QI -M/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/iptables_check.py': 'MD5 check failed' - ) << \SHAR_EOF -36d30e9b9ff7842db6472b1f063bb076 cloud_scripts/root/health_checks/iptables_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/iptables_check.py'` -ne 3349 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/iptables_check.py' is not 3349" - fi -fi -# ============= cloud_scripts/root/health_checks/memory_usage_check.py ============== -if test ! -d 'cloud_scripts/root/health_checks'; then - mkdir 'cloud_scripts/root/health_checks' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/root/health_checks." -else ${echo} "x - failed to create directory cloud_scripts/root/health_checks." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/memory_usage_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/memory_usage_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/memory_usage_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/memory_usage_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W$UE;6]R>55S86=E(ETI"B`@("!C;60@/2`B9G)E92!\(&%W:R`G1DY2(#T] -M(#(@>R!P2!5$UE;6]R>55S86=E*2`K("(E(@H@("`@("`@("`@("!E>&ET*#$I"B`@ -M("`@("`@<')I;G0@(DUE;6]R>2!5/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/memory_usage_check.py': 'MD5 check failed' - ) << \SHAR_EOF -1d0f74928584f4e36af8d1d726fac4a4 cloud_scripts/root/health_checks/memory_usage_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/memory_usage_check.py'` -ne 1966 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/memory_usage_check.py' is not 1966" - fi -fi -# ============= cloud_scripts/root/health_checks/haproxy_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/haproxy_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/haproxy_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/haproxy_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/haproxy_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&-O;FXH -M:&%P41A=&$L(&AA0V9G4V5C=&EO;G,I.@H@("`@:68@(FUA>&-O;FXB -M(&EN(&AA<')O>'E$871A(&%N9"`B;6%X8V]N;B(@:6X@:&%#9F=396-T:6]N -M41A=&%;(FUA>&-O;FXB -M72`A/2!H84-F9U-E8W1I;VYS6R)G;&]B86PB75LB;6%X8V]N;B)=6S!=+G-T -M'E$871A -M+"!H84-F9U-E8W1I;VYS*3H*("`@(&-O41A=&$Z"B`@("`@("`@'!E8W1E9"`Z("(@*R!L8E-E8ULB86QG -M;W)I=&AM(ET@*R!<"B`@("`@("`@("`@("`@("`@("`@("`@("`@(B!B=70@ -M9F]U;F0@(B`K(&-F9U-E8W1I;VY;(F)A;&%N8V4B75LP72`K(")<;B(*("`@ -M("`@("`@("`@("`@("`@("!C;W)R96-T(#T@1F%L'!E8W1E9%-E'!E8W1E9%-E"!C;VX@86YD(&5A8V@@;&]A -M9"!B86QA;F-I;F<@41A=&$@/2!G971(96%L=&A#:&5C:W-$ -M871A*")H87!R;WAY1&%T82(I"B`@("!I9B!H87!R;WAY1&%T82!I'DN8V9G -M(BP@)W(G*2!A2]H87!R -M;WAY+F-F9R(*("`@("`@("!E>&ET*#$I"@H@("`@:&%#9F=396-T:6]NWT*("`@("`@("`@("`@8V]N=&EN=64*"B`@("`@("`@ -M:68@8W5R$-O;FX@ -M/2!C:&5C:TUA>&-O;FXH:&%P41A=&%;,%TL(&AA0V9G4V5C=&EO;G,I -M"B`@("!C:&5C:TQB4G5L97,@/2!C:&5C:TQO861"86QA;F-E*&AA<')O>'E$ -M871A+"!H84-F9U-E8W1I;VYS*0H*("`@(&EF(&-H96-K36%X0V]N;B!A;F0@ -M8VAE8VM,8E)U;&5S.@H@("`@("`@('!R:6YT(")!;&P@8VAE8VMS('!A&ET*#$I"@H* -M:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH*("`@(&EF(&QE;BAS>7,N87)G -M=BD@/3T@,B!A;F0@/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/haproxy_check.py': 'MD5 check failed' - ) << \SHAR_EOF -a6a55e4accdf61929c52391235dea744 cloud_scripts/root/health_checks/haproxy_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/haproxy_check.py'` -ne 5274 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/haproxy_check.py' is not 5274" - fi -fi -# ============= cloud_scripts/root/health_checks/router_version_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/router_version_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/router_version_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/router_version_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/router_version_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O -M'!E8W1E9#H@(B`K(%P*("`@("`@ -M("`@("`@("`@("`@97AP96-T960@*R`B+"!F;W5N9#H@(B`K(&9O=6YD"B`@ -M("`@("`@("`@('1E;7!L871E5F5R'!E8W1E -M9"`](&1A=&%;(G-C'!E8W1E9#H@(B`K(%P*("`@("`@ -M("`@("`@("`@("`@97AP96-T960@*R`B+"!F;W5N9#H@(B`K(&9O=6YD"B`@ -M("`@("`@("`@('-C/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/router_version_check.py': 'MD5 check failed' - ) << \SHAR_EOF -408778f28fd8559df294e18256af1f0b cloud_scripts/root/health_checks/router_version_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/router_version_check.py'` -ne 2773 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/router_version_check.py' is not 2773" - fi -fi -# ============= cloud_scripts/root/health_checks/utility/sharedFunctions.py ============== -if test ! -d 'cloud_scripts/root/health_checks/utility'; then - mkdir 'cloud_scripts/root/health_checks/utility' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/root/health_checks/utility." -else ${echo} "x - failed to create directory cloud_scripts/root/health_checks/utility." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/utility/sharedFunctions.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/utility/sharedFunctions.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import json -X -X -def getHealthChecksData(additionalDataKey=None): -X with open('/root/health_checks_data.json', 'r') as hc_data_file: -X hc_data = json.load(hc_data_file) -X -X # If no specific key is requested return all the data as JSON -X if additionalDataKey is None: -X return hc_data -X -X if additionalDataKey not in hc_data["health_checks_config"]: -X return None -X -X data = hc_data["health_checks_config"][additionalDataKey].strip().split(";") -X addData = [] -X for line in data: -X line = line.strip() -X if len(line) == 0: -X continue -X entries = line.split(',') -X d = {} -X for entry in entries: -X entry = entry.strip() -X if len(entry) == 0: -X continue -X keyVal = entry.split("=") -X if len(keyVal) == 2: -X d[keyVal[0].strip()] = keyVal[1].strip() -X if len(d) > 0: -X addData.append(d) -X -X return addData -X -X -def formatPort(portStart, portEnd, delim="-"): -X return portStart if portStart == portEnd else portStart + delim + portEnd -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/health_checks/utility/sharedFunctions.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/utility/sharedFunctions.py': 'MD5 check failed' - ) << \SHAR_EOF -4fa10a419db9715b34c7037bce5e6fe8 cloud_scripts/root/health_checks/utility/sharedFunctions.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/utility/sharedFunctions.py'` -ne 1865 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' is not 1865" - fi -fi -# ============= cloud_scripts/root/health_checks/utility/__init__.py ============== -if test ! -d 'cloud_scripts/root/health_checks/utility'; then - mkdir 'cloud_scripts/root/health_checks/utility' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/root/health_checks/utility." -else ${echo} "x - failed to create directory cloud_scripts/root/health_checks/utility." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/utility/__init__.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/utility/__init__.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/utility/__init__.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/utility/__init__.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/utility/__init__.py': 'MD5 check failed' - ) << \SHAR_EOF -ea0b11e040da094dd4f5628b467d5d88 cloud_scripts/root/health_checks/utility/__init__.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/utility/__init__.py'` -ne 864 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/utility/__init__.py' is not 864" - fi -fi -# ============= cloud_scripts/root/health_checks/disk_space_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/disk_space_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/disk_space_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/disk_space_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/disk_space_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O -MWT*("`@(&EF(&5N=')I97,@:7,@;F]T($YO;F4@86YD -M(&QE;BAE;G1R:65S*2`]/2`Q.@H@("`@("`@(&1A=&$@/2!E;G1R:65S6S!= -M"@H@("`@:68@(FUI;D1I/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/disk_space_check.py': 'MD5 check failed' - ) << \SHAR_EOF -9bbb07b130e3946c35263c2e970b59ba cloud_scripts/root/health_checks/disk_space_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/disk_space_check.py'` -ne 1626 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/disk_space_check.py' is not 1626" - fi -fi -# ============= cloud_scripts/root/health_checks/gateways_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/gateways_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/gateways_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/gateways_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/gateways_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,B*0H@("`@:68@9W=S(&ES($YO;F4@86YD(&QE;BAG=W,I(#T](#`Z"B`@ -M("`@("`@<')I;G0@(DYO(&=A=&5W87ES(&1A=&$@879A:6QA8FQE+"!S:VEP -M<&EN9R(*("`@("`@("!E>&ET*#`I"@H@("`@=6YR96%C:&%B;&5'871E5V%Y -M7,N87!P -M96YD*&=W*0H*("`@(&EF(&QE;BAU;G)E86-H86)L94=A=&5787ES*2`]/2`P -M.@H@("`@("`@('!R:6YT(")!;&P@(B`K('-T7,* -M("`@("`@("!E>&ET*#$I"@H*:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH* -M("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A;F0@/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/gateways_check.py': 'MD5 check failed' - ) << \SHAR_EOF -d1715f65dfe24b77c489d24fc1717bc9 cloud_scripts/root/health_checks/gateways_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/gateways_check.py'` -ne 1869 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/gateways_check.py' is not 1869" - fi -fi -# ============= cloud_scripts/root/health_checks/__init__.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/__init__.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/__init__.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/__init__.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/health_checks/__init__.py' && -#!/usr/bin/python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# Needed to expose utility as package outside for monitorServices.py. -# This directory should only contain executables for health checks. -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/__init__.py' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/root/health_checks/__init__.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/health_checks/__init__.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/__init__.py': 'MD5 check failed' - ) << \SHAR_EOF -fb151d74c97d6b3926d6b7a48eea3e56 cloud_scripts/root/health_checks/__init__.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/__init__.py'` -ne 942 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/__init__.py' is not 942" - fi -fi -# ============= cloud_scripts/root/health_checks/dns_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/dns_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/dns_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/dns_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/dns_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I"@H@("`@=VET:"!O<&5N*"/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/dns_check.py': 'MD5 check failed' - ) << \SHAR_EOF -b3192e74a4e52893fdeca4850eb096f4 cloud_scripts/root/health_checks/dns_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/dns_check.py'` -ne 1972 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/dns_check.py' is not 1972" - fi -fi -# ============= cloud_scripts/root/health_checks/cpu_usage_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/cpu_usage_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/cpu_usage_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/cpu_usage_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/cpu_usage_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W$-P=55S86=E(ETI"B`@("!C;60@/2`B=&]P("UB -M("UN,B`M<"`Q('P@9F=R97`@7")#<'4H7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@ -((&UA:6XH*0HR -` -end -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/cpu_usage_check.py' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/root/health_checks/cpu_usage_check.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/health_checks/cpu_usage_check.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/cpu_usage_check.py': 'MD5 check failed' - ) << \SHAR_EOF -faa54497a494f763c8f1a5a4d9b49c4f cloud_scripts/root/health_checks/cpu_usage_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/cpu_usage_check.py'` -ne 2078 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/cpu_usage_check.py' is not 2078" - fi -fi -# ============= cloud_scripts/root/health_checks/dhcp_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/dhcp_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/dhcp_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/dhcp_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/dhcp_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I"@H@("`@=VET:"!O<&5N*"'0G+"`G -M2`]($9A;'-E"B`@("`@("`@9F]R(&AO'0B"B`@("`@("`@97AI="@P*0H*"FEF(%]?;F%M -M95]?(#T](")?7VUA:6Y?7R(Z"B`@("!I9B!L96XH/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/dhcp_check.py': 'MD5 check failed' - ) << \SHAR_EOF -20e7a36b29f4160ae3e5814f042a8242 cloud_scripts/root/health_checks/dhcp_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/dhcp_check.py'` -ne 2386 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/dhcp_check.py' is not 2386" - fi -fi -# ============= cloud_scripts/root/func.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/func.sh' -then -${echo} "x - SKIPPING cloud_scripts/root/func.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/func.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/func.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# Only one lock is allowed: biglock -X -# getLockFile() parameters -# $1 lock filename -# $2 timeout seconds -X -#set -x -X -getCurrLock() { -X result=`ls $__LOCKDIR/*-$1.lock 2>/dev/null | head -n1` -X while [ $? -ne 0 ] -X do -X result=`ls $__LOCKDIR/*-$1.lock 2>/dev/null| head -n1` -X done -X echo $result -} -X -getLockFile() { -X lock=$1 -X -X __locked=0 -X __TS=`date +%s%N` -X __LOCKDIR="/tmp" -X __LOCKFILE="$__LOCKDIR/$__TS-$$-$lock.lock" -X -X if [ $2 ] -X then -X __TIMEOUT=$2 -X else -X __TIMEOUT=30 -X fi -X -X if [ -e $__LOCKFILE ] -X then -X logger -t cloud "Process $0 pid $$ want to get ECLUSIVE LOCK $lock RECURSIVELY!" -X psline=`ps u $$` -X logger -t cloud "Failed job detail: $psline" -X echo 0 -X return -X fi -X -X psline=`ps u $$` -X echo $psline > $__LOCKFILE -X if [ ! -e $__LOCKFILE ] -X then -X return -X fi -X -X for i in `seq 1 $(($__TIMEOUT * 10))` -X do -X currlock=$(getCurrLock $lock) -X if [ $currlock -ef $__LOCKFILE ] -X then -X __locked=1 -X break -X fi -X -X sleep 0.1 -X if [ $((i % 10)) -eq 0 ] -X then -X logger -t cloud "Process $0 pid $$ waiting for the lock $lock for another 1 second" -X fi -X done -X if [ $__locked -ne 1 ] -X then -X logger -t cloud "fail to acquire the lock $lock for process $0 pid $$ after $__TIMEOUT seconds time out!" -X cmd=`cat $currlock 2>/dev/null` -X if [ $? -eq 0 ] -X then -X logger -t cloud "waiting for process: $cmd" -X else -X logger -t cloud "didn't get info about process who we're waiting for" -X fi -X psline=`ps u $$` -X logger -t cloud "Failed job detail: $psline" -X rm $__LOCKFILE -X fi -X echo $__locked -} -X -# releaseLockFile() parameters -# $1 lock filename -# $2 locked(1) or not(0) -releaseLockFile() { -X __LOCKDIR="/tmp" -X __LOCKFILE="$__LOCKDIR/*-$$-$1.lock" -X __locked=$2 -X if [ "$__locked" == "1" ] -X then -X rm $__LOCKFILE -X fi -} -X -# releaseLockFile() parameters -# $1 exit value -# $2 lock filename -# $3 locked(1) or not(0) -unlock_exit() { -X releaseLockFile $2 $3 -X exit $1 -} -X -# calcuate the ip & network mask -rangecalc(){ -X local IFS='.' -X local -a oct mask ip -X -X read -ra oct <<<"$1" -X read -ra mask <<<"$2" -X for i in {0..3} -X do -X ip+=( "$(( oct[i] & mask[i] ))" ) -X done -X echo "${ip[*]}" -} -X -#get cidr of the nic -getcidr(){ -X local dev=$1 -X local mask=`ifconfig $dev|grep "Mask"|cut -d ":" -f 4` -X local cidrsize=`ip addr show $dev|grep inet|head -n 1|awk '{print $2}'|cut -d '/' -f 2` -X local ipaddr=`ip addr show $dev|grep inet|head -n 1|awk '{print $2}'|cut -d '/' -f 1` -X local base=$(rangecalc $ipaddr $mask) -X echo $base/$cidrsize -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/func.sh' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/root/func.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/func.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/func.sh': 'MD5 check failed' - ) << \SHAR_EOF -89141bce2eaa74a4a9a9788cae397be4 cloud_scripts/root/func.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/func.sh'` -ne 3567 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/func.sh' is not 3567" - fi -fi -# ============= cloud_scripts/root/clearUsageRules.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/clearUsageRules.sh' -then -${echo} "x - SKIPPING cloud_scripts/root/clearUsageRules.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/clearUsageRules.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/clearUsageRules.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -# clearUsageRules.sh - remove iptable rules for removed public interfaces -# @VERSION@ -X -if [ -f /root/removedVifs ] -then -X var=`cat /root/removedVifs` -X # loop through even vif to be cleared -X for i in $var; do -X # Make sure vif doesn't exist -X if [ ! -f /sys/class/net/$i ] -X then -X # remove rules -X iptables -D NETWORK_STATS -i eth0 -o $i > /dev/null; -X iptables -D NETWORK_STATS -i $i -o eth0 > /dev/null; -X iptables -D NETWORK_STATS -o $i ! -i eth0 -p tcp > /dev/null; -X iptables -D NETWORK_STATS -i $i ! -o eth0 -p tcp > /dev/null; -X fi -X done -rm /root/removedVifs -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/clearUsageRules.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/root/clearUsageRules.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/clearUsageRules.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/clearUsageRules.sh': 'MD5 check failed' - ) << \SHAR_EOF -f176fc60b3a7b07a47482d68528bb460 cloud_scripts/root/clearUsageRules.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/clearUsageRules.sh'` -ne 1461 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/clearUsageRules.sh' is not 1461" - fi -fi -# ============= cloud_scripts/var/www/html/latest/.htaccess ============== -if test ! -d 'cloud_scripts/var'; then - mkdir 'cloud_scripts/var' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/var." -else ${echo} "x - failed to create directory cloud_scripts/var." - exit 1 -fi -fi -if test ! -d 'cloud_scripts/var/www'; then - mkdir 'cloud_scripts/var/www' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/var/www." -else ${echo} "x - failed to create directory cloud_scripts/var/www." - exit 1 -fi -fi -if test ! -d 'cloud_scripts/var/www/html'; then - mkdir 'cloud_scripts/var/www/html' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/var/www/html." -else ${echo} "x - failed to create directory cloud_scripts/var/www/html." - exit 1 -fi -fi -if test ! -d 'cloud_scripts/var/www/html/latest'; then - mkdir 'cloud_scripts/var/www/html/latest' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/var/www/html/latest." -else ${echo} "x - failed to create directory cloud_scripts/var/www/html/latest." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/latest/.htaccess' -then -${echo} "x - SKIPPING cloud_scripts/var/www/html/latest/.htaccess (file already exists)" - -else -${echo} "x - extracting cloud_scripts/var/www/html/latest/.htaccess (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/latest/.htaccess' && -Options +FollowSymLinks -RewriteEngine On -X -#http:///latest/user-data and .../user-data/ (both yield user-data file) -#http:///latest/meta-data and .../meta-data/ (dir listing of meta-data) -RewriteRule ^user-data/?$ ../userdata/%{REMOTE_ADDR}/user-data [L,NC,QSA] -RewriteRule ^meta-data/?$ ../metadata/%{REMOTE_ADDR}/meta-data [L,NC,QSA] -X -#http:///latest/foo and .../foo/ (yield metadata/$IP/foo) -#are these used? -RewriteRule ^availability-zone/?$ ../metadata/%{REMOTE_ADDR}/availability-zone [L,NC,QSA] -RewriteRule ^cloud-identifier/?$ ../metadata/%{REMOTE_ADDR}/cloud-identifier [L,NC,QSA] -RewriteRule ^instance-id/?$ ../metadata/%{REMOTE_ADDR}/instance-id [L,NC,QSA] -RewriteRule ^local-hostname/?$ ../metadata/%{REMOTE_ADDR}/local-hostname [L,NC,QSA] -RewriteRule ^local-ipv4/?$ ../metadata/%{REMOTE_ADDR}/local-ipv4 [L,NC,QSA] -RewriteRule ^public-hostname/?$ ../metadata/%{REMOTE_ADDR}/public-hostname [L,NC,QSA] -RewriteRule ^public-ipv4/?$ ../metadata/%{REMOTE_ADDR}/public-ipv4 [L,NC,QSA] -RewriteRule ^public-keys/?$ ../metadata/%{REMOTE_ADDR}/public-keys [L,NC,QSA] -RewriteRule ^service-offering/?$ ../metadata/%{REMOTE_ADDR}/service-offering [L,NC,QSA] -RewriteRule ^vm-id/?$ ../metadata/%{REMOTE_ADDR}/vm-id [L,NC,QSA] -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/latest/.htaccess' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/var/www/html/latest/.htaccess' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/var/www/html/latest/.htaccess failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/latest/.htaccess': 'MD5 check failed' - ) << \SHAR_EOF -b20d7331940666e4f160df0a03678813 cloud_scripts/var/www/html/latest/.htaccess -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/latest/.htaccess'` -ne 1425 && \ - ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/latest/.htaccess' is not 1425" - fi -fi -# ============= cloud_scripts/var/www/html/userdata/.htaccess ============== -if test ! -d 'cloud_scripts/var/www/html/userdata'; then - mkdir 'cloud_scripts/var/www/html/userdata' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/var/www/html/userdata." -else ${echo} "x - failed to create directory cloud_scripts/var/www/html/userdata." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/userdata/.htaccess' -then -${echo} "x - SKIPPING cloud_scripts/var/www/html/userdata/.htaccess (file already exists)" - -else -${echo} "x - extracting cloud_scripts/var/www/html/userdata/.htaccess (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/userdata/.htaccess' && -Options -Indexes -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/userdata/.htaccess' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/var/www/html/userdata/.htaccess' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/var/www/html/userdata/.htaccess failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/userdata/.htaccess': 'MD5 check failed' - ) << \SHAR_EOF -7eb825c9c5f32d7efe110c8d7ed402dc cloud_scripts/var/www/html/userdata/.htaccess -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/userdata/.htaccess'` -ne 17 && \ - ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/userdata/.htaccess' is not 17" - fi -fi -# ============= cloud_scripts/etc/ipsec.conf ============== -if test ! -d 'cloud_scripts/etc'; then - mkdir 'cloud_scripts/etc' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/etc." -else ${echo} "x - failed to create directory cloud_scripts/etc." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/ipsec.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/ipsec.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.conf' && -# ipsec.conf - strongSwan IPsec configuration file -X -config setup -X -include /etc/ipsec.d/*.conf -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/ipsec.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/ipsec.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.conf': 'MD5 check failed' - ) << \SHAR_EOF -da4dd5d331eed3e64a528dc648aa7cae cloud_scripts/etc/ipsec.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.conf'` -ne 94 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.conf' is not 94" - fi -fi -# ============= cloud_scripts/etc/systemd/journald.conf ============== -if test ! -d 'cloud_scripts/etc'; then - mkdir 'cloud_scripts/etc' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/etc." -else ${echo} "x - failed to create directory cloud_scripts/etc." - exit 1 -fi -fi -if test ! -d 'cloud_scripts/etc/systemd'; then - mkdir 'cloud_scripts/etc/systemd' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/etc/systemd." -else ${echo} "x - failed to create directory cloud_scripts/etc/systemd." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/journald.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/journald.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/journald.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/journald.conf' && -[Journal] -Compress=yes -SystemMaxUse=40M -SystemMaxFileSize=10M -RuntimeMaxUse=20M -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/journald.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/journald.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/journald.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/journald.conf': 'MD5 check failed' - ) << \SHAR_EOF -ea3c97c4a558fbfdf53304f77275ef8a cloud_scripts/etc/systemd/journald.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/journald.conf'` -ne 80 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/journald.conf' is not 80" - fi -fi -# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service ============== -if test ! -d 'cloud_scripts/etc/systemd'; then - mkdir 'cloud_scripts/etc/systemd' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/etc/systemd." -else ${echo} "x - failed to create directory cloud_scripts/etc/systemd." - exit 1 -fi -fi -if test ! -d 'cloud_scripts/etc/systemd/system'; then - mkdir 'cloud_scripts/etc/systemd/system' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/etc/systemd/system." -else ${echo} "x - failed to create directory cloud_scripts/etc/systemd/system." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service -M[[N_6U5N:71="D1E/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service': 'MD5 check failed' - ) << \SHAR_EOF -58d4e646ee66ac7c470796bd6ce9e2a6 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service'` -ne 156 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service' is not 156" - fi -fi -# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service ============== -if test ! -d 'cloud_scripts/etc/systemd/system'; then - mkdir 'cloud_scripts/etc/systemd/system' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/etc/systemd/system." -else ${echo} "x - failed to create directory cloud_scripts/etc/systemd/system." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service -M[[N_6U5N:71="D1E/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service': 'MD5 check failed' - ) << \SHAR_EOF -027a172fad275171647740477b78ca93 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service'` -ne 143 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service' is not 143" - fi -fi -# ============= cloud_scripts/etc/systemd/system/cloud.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud.service' && -[Unit] -Description=CloudStack Agent service -After=cloud-early-config.service network.target cloud-postinit.service local-fs.target -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=simple -WorkingDirectory=/usr/local/cloud/systemvm -ExecStart=/usr/local/cloud/systemvm/_run.sh -Restart=on-failure -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/cloud.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud.service': 'MD5 check failed' - ) << \SHAR_EOF -b7eb67763e7d694ed98758faef961ac6 cloud_scripts/etc/systemd/system/cloud.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud.service'` -ne 298 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud.service' is not 298" - fi -fi -# ============= cloud_scripts/etc/systemd/system/open-vm-tools.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/open-vm-tools.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/open-vm-tools.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/open-vm-tools.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/open-vm-tools.service -M[[N_6U5N:71="D1E&5C4W1A/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/open-vm-tools.service': 'MD5 check failed' - ) << \SHAR_EOF -10af19a17cd3ee299f08c46bace0f56f cloud_scripts/etc/systemd/system/open-vm-tools.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/open-vm-tools.service'` -ne 280 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/open-vm-tools.service' is not 280" - fi -fi -# ============= cloud_scripts/etc/systemd/system/baremetal-vr.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/baremetal-vr.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/baremetal-vr.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/baremetal-vr.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/baremetal-vr.service' && -[Unit] -Description=CloudStack Baremetal VR service -After=network.target local-fs.target -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=simple -WorkingDirectory=/opt/cloud/bin -ExecStart=/usr/bin/python /opt/cloud/bin/baremetal-vr.py -Restart=on-failure -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/baremetal-vr.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/baremetal-vr.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/baremetal-vr.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/baremetal-vr.service': 'MD5 check failed' - ) << \SHAR_EOF -9fc2a325a709e7cf9ae4d4ec8b7e692a cloud_scripts/etc/systemd/system/baremetal-vr.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/baremetal-vr.service'` -ne 257 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/baremetal-vr.service' is not 257" - fi -fi -# ============= cloud_scripts/etc/systemd/system/xe-daemon.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/xe-daemon.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/xe-daemon.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/xe-daemon.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/xe-daemon.service -M[[N_6U5N:71="D1E&5N+FUO=6YT"D)E9F]R93UN971W;W)K+G1A -M2UC;VYF:6&5C -M4W1A&5C4W1A3UM=6QT:2UU/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/xe-daemon.service': 'MD5 check failed' - ) << \SHAR_EOF -51e30000a8c2d2a91ba1a372bc40a628 cloud_scripts/etc/systemd/system/xe-daemon.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/xe-daemon.service'` -ne 398 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/xe-daemon.service' is not 398" - fi -fi -# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service -M[[N_6U5N:71="D1E5]D865M;VX@+6X*"EM);G-T86QL70I786YT961">3UM=6QT:2UU -*/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service': 'MD5 check failed' - ) << \SHAR_EOF -b1d4d295d2f3dff1ed1e13835e365e86 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service'` -ne 190 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service' is not 190" - fi -fi -# ============= cloud_scripts/etc/systemd/system/cloud-early-config.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-early-config.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-early-config.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-early-config.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-early-config.service' && -[Unit] -Description=CloudStack post-boot patching service using cmdline -DefaultDependencies=no -X -Before=network-pre.target -Wants=network-pre.target -X -Requires=local-fs.target -After=local-fs.target -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=oneshot -ExecStart=/opt/cloud/bin/setup/cloud-early-config -RemainAfterExit=true -TimeoutStartSec=5min -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-early-config.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/cloud-early-config.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-early-config.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-early-config.service': 'MD5 check failed' - ) << \SHAR_EOF -60723561261aa16ed4477c5e02c52bcd cloud_scripts/etc/systemd/system/cloud-early-config.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-early-config.service'` -ne 348 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-early-config.service' is not 348" - fi -fi -# ============= cloud_scripts/etc/systemd/system/cloud-password-server@.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-password-server@.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-password-server@.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' && -[Unit] -Description=Cloud password server on %I -After=network.target local-fs.target -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=simple -WorkingDirectory=/opt/cloud/bin -ExecStart=/opt/cloud/bin/passwd_server_ip.py %I -Restart=on-failure -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-password-server@.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-password-server@.service': 'MD5 check failed' - ) << \SHAR_EOF -3edb13a39635749f16f0579b481c5f25 cloud_scripts/etc/systemd/system/cloud-password-server@.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-password-server@.service'` -ne 244 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' is not 244" - fi -fi -# ============= cloud_scripts/etc/systemd/system/cloud-postinit.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-postinit.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-postinit.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-postinit.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-postinit.service' && -[Unit] -Description=CloudStack post-patching init script -After=cloud-early-config.service network.target local-fs.target -Before=ssh.service -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=oneshot -ExecStart=/opt/cloud/bin/setup/postinit.sh -RemainAfterExit=true -TimeoutStartSec=10min -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-postinit.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/cloud-postinit.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-postinit.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-postinit.service': 'MD5 check failed' - ) << \SHAR_EOF -22b48cd2a7478d27cb155d32cc2610cb cloud_scripts/etc/systemd/system/cloud-postinit.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-postinit.service'` -ne 287 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-postinit.service' is not 287" - fi -fi -# ============= cloud_scripts/etc/iptables/rules ============== -if test ! -d 'cloud_scripts/etc/iptables'; then - mkdir 'cloud_scripts/etc/iptables' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/etc/iptables." -else ${echo} "x - failed to create directory cloud_scripts/etc/iptables." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/rules' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/rules (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/rules (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/rules' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT --A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT --A INPUT -i eth0 -p tcp -m state --state NEW --dport 8080 -j ACCEPT --A INPUT -i eth0 -p tcp -m state --state NEW --dport 80 -j ACCEPT --A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth0 -o eth2 -j ACCEPT --A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/rules' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/rules' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/rules failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/rules': 'MD5 check failed' - ) << \SHAR_EOF -e2be370a53cd4e436ce4c298b16ead21 cloud_scripts/etc/iptables/rules -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/rules'` -ne 1731 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/rules' is not 1731" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-consoleproxy ============== -if test ! -d 'cloud_scripts/etc/iptables'; then - mkdir 'cloud_scripts/etc/iptables' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/etc/iptables." -else ${echo} "x - failed to create directory cloud_scripts/etc/iptables." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-consoleproxy' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-consoleproxy (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-consoleproxy (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-consoleproxy' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] --A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp --icmp-type 13 -j DROP --A INPUT -p icmp -j ACCEPT --A INPUT -i eth1 -p tcp -m state --state NEW -m tcp --dport 3922 -j ACCEPT --A INPUT -i eth0 -p tcp -m state --state NEW -m tcp --dport 8001 -j ACCEPT --A INPUT -i eth1 -p tcp -m state --state NEW -m tcp --dport 8001 -j ACCEPT --A INPUT -i eth2 -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT --A INPUT -i eth2 -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-consoleproxy' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/iptables-consoleproxy' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-consoleproxy failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-consoleproxy': 'MD5 check failed' - ) << \SHAR_EOF -2840365dad7fe832ea35d8f72a3bfdca cloud_scripts/etc/iptables/iptables-consoleproxy -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-consoleproxy'` -ne 1601 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-consoleproxy' is not 1601" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-router ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-router' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-router (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-router (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-router' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] -:FW_EGRESS_RULES - [0:0] -:FW_OUTBOUND - [0:0] --A INPUT -d 224.0.0.18/32 -j ACCEPT --A INPUT -d 225.0.0.50/32 -j ACCEPT --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT --A INPUT -i eth1 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp -m state --state NEW --dport 80 -j ACCEPT --A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth0 -o eth0 -m state --state NEW -j ACCEPT --A FORWARD -i eth0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth0 -o eth2 -j FW_OUTBOUND --A FW_EGRESS_RULES -j ACCEPT --I FW_OUTBOUND -m state --state RELATED,ESTABLISHED -j ACCEPT --A FW_OUTBOUND -j FW_EGRESS_RULES -COMMIT -*mangle -:PREROUTING ACCEPT [0:0] -:INPUT ACCEPT [0:0] -:FORWARD ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] --A PREROUTING -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark --A POSTROUTING -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-router' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/iptables-router' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-router failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-router': 'MD5 check failed' - ) << \SHAR_EOF -aeabe6897f9969f64a87b793deee6500 cloud_scripts/etc/iptables/iptables-router -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-router'` -ne 2348 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-router' is not 2348" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-vpcrouter ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-vpcrouter' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-vpcrouter (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-vpcrouter (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-vpcrouter' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] --A INPUT -d 224.0.0.18/32 -j ACCEPT --A INPUT -d 225.0.0.50/32 -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT --A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT --A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT -COMMIT -*mangle -:PREROUTING ACCEPT [0:0] -:INPUT ACCEPT [0:0] -:FORWARD ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] --A OUTPUT -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-vpcrouter' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/iptables-vpcrouter' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-vpcrouter failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-vpcrouter': 'MD5 check failed' - ) << \SHAR_EOF -f3e4459f3b0eea8f2de2a6f01ef79866 cloud_scripts/etc/iptables/iptables-vpcrouter -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-vpcrouter'` -ne 1465 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-vpcrouter' is not 1465" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-dhcpsrvr ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-dhcpsrvr (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-dhcpsrvr (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] -:FW_EGRESS_RULES - [0:0] -:FW_OUTBOUND - [0:0] --A INPUT -d 224.0.0.18/32 -j ACCEPT --A INPUT -d 225.0.0.50/32 -j ACCEPT --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT --A INPUT -i eth1 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp -m state --state NEW --dport 80 -j ACCEPT --A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth0 -o eth0 -m state --state NEW -j ACCEPT --A FORWARD -i eth0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth0 -o eth2 -j FW_OUTBOUND --A FW_EGRESS_RULES -j ACCEPT --I FW_OUTBOUND -m state --state RELATED,ESTABLISHED -j ACCEPT --A FW_OUTBOUND -j FW_EGRESS_RULES -COMMIT -*mangle -:PREROUTING ACCEPT [0:0] -:INPUT ACCEPT [0:0] -:FORWARD ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] --A PREROUTING -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark --A POSTROUTING -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-dhcpsrvr failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-dhcpsrvr': 'MD5 check failed' - ) << \SHAR_EOF -aeabe6897f9969f64a87b793deee6500 cloud_scripts/etc/iptables/iptables-dhcpsrvr -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-dhcpsrvr'` -ne 2348 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' is not 2348" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-elbvm ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-elbvm' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-elbvm (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-elbvm (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-elbvm' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-elbvm' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/iptables/iptables-elbvm' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-elbvm failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-elbvm': 'MD5 check failed' - ) << \SHAR_EOF -7a950ed86376c0166c53943cdf68ccb2 cloud_scripts/etc/iptables/iptables-elbvm -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-elbvm'` -ne 1256 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-elbvm' is not 1256" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-secstorage ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-secstorage' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-secstorage (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-secstorage (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-secstorage' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] -:HTTP - [0:0] --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth3 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -p icmp --icmp-type 13 -j DROP --A INPUT -p icmp -j ACCEPT --A INPUT -i eth0 -p tcp -m state --state NEW --dport 3922 -j ACCEPT -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-secstorage' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/iptables/iptables-secstorage' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-secstorage failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-secstorage': 'MD5 check failed' - ) << \SHAR_EOF -d031185b81ee7ee008b80d434d44b61d cloud_scripts/etc/iptables/iptables-secstorage -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-secstorage'` -ne 1375 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-secstorage' is not 1375" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-ilbvm ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-ilbvm' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-ilbvm (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-ilbvm (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-ilbvm' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-ilbvm' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/iptables/iptables-ilbvm' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-ilbvm failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-ilbvm': 'MD5 check failed' - ) << \SHAR_EOF -85129e942bc07d1fb67e0e169238c345 cloud_scripts/etc/iptables/iptables-ilbvm -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-ilbvm'` -ne 1192 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-ilbvm' is not 1192" - fi -fi -# ============= cloud_scripts/etc/iptables/rt_tables_init ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/rt_tables_init' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/rt_tables_init (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/rt_tables_init (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/rt_tables_init' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -# -# reserved values -# -255 local -254 main -253 default -0 unspec -# -# local -# -#1 inr.ruhep -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/rt_tables_init' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/rt_tables_init' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/rt_tables_init failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/rt_tables_init': 'MD5 check failed' - ) << \SHAR_EOF -86477f42d18121a176751c7284251089 cloud_scripts/etc/iptables/rt_tables_init -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/rt_tables_init'` -ne 897 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/rt_tables_init' is not 897" - fi -fi -# ============= cloud_scripts/etc/sysctl.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/sysctl.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/sysctl.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/sysctl.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/sysctl.conf' && -# Kernel sysctl configuration file -# -# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and -# sysctl.conf(5) for more details. -# @VERSION@ -X -# Controls IP packet forwarding -net.ipv4.ip_forward = 1 -X -# Controls source route verification -net.ipv4.conf.default.rp_filter = 0 -X -# Do not accept source routing -net.ipv4.conf.default.accept_source_route = 0 -X -# Respect local interface in ARP interactions -net.ipv4.conf.default.arp_announce = 2 -net.ipv4.conf.default.arp_ignore = 2 -net.ipv4.conf.all.arp_announce = 2 -net.ipv4.conf.all.arp_ignore = 2 -X -# IPSec NETKEY -- avoid bogus redirects -net.ipv4.conf.all.accept_redirects = 0 -net.ipv4.conf.default.accept_redirects = 0 -net.ipv4.conf.all.send_redirects = 0 -net.ipv4.conf.default.send_redirects = 0 -net.ipv4.conf.all.secure_redirects = 0 -net.ipv4.conf.default.secure_redirects = 0 -X -# For smooth transition of the vip address in case of a keepalived failover -net.ipv4.ip_nonlocal_bind = 1 -X -# Controls the System Request debugging functionality of the kernel -kernel.sysrq = 0 -X -# Controls whether core dumps will append the PID to the core filename. -# Useful for debugging multi-threaded applications. -kernel.core_uses_pid = 1 -X -# A better way for the instance to die -kernel.panic = 10 -kernel.panic_on_oops = 1 -vm.panic_on_oom = 1 -X -# Controls the use of TCP syncookies -net.ipv4.tcp_syncookies = 1 -X -# disable tcp time stamps -net.ipv4.tcp_timestamps = 0 -X -net.ipv4.tcp_tw_reuse = 1 -net.ipv4.tcp_max_tw_buckets = 1000000 -net.core.somaxconn = 65535 -net.nf_conntrack_max = 1000000 -net.netfilter.nf_conntrack_max = 1000000 -X -# Disable IPv6 -net.ipv6.conf.all.disable_ipv6 = 1 -net.ipv6.conf.all.forwarding = 0 -net.ipv6.conf.all.accept_ra = 0 -net.ipv6.conf.all.accept_redirects = 0 -net.ipv6.conf.all.autoconf = 0 -X -# Minimum swappiness without disabling it -vm.swappiness=1 -X -# make the kernel more aggressive in reclaiming RAM from the disk and swap caches -vm.vfs_cache_pressure = 200 -X -# try to maintain 'free' memory thereby reducing the size of disk cache, hence reducing swapping. -vm.min_free_kbytes = 20480 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/sysctl.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/sysctl.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/sysctl.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/sysctl.conf': 'MD5 check failed' - ) << \SHAR_EOF -f1cef50b7a8a7cc7a7a24ff08cbea1f8 cloud_scripts/etc/sysctl.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/sysctl.conf'` -ne 2049 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/sysctl.conf' is not 2049" - fi -fi -# ============= cloud_scripts/etc/xl2tpd/xl2tpd.conf ============== -if test ! -d 'cloud_scripts/etc/xl2tpd'; then - mkdir 'cloud_scripts/etc/xl2tpd' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/etc/xl2tpd." -else ${echo} "x - failed to create directory cloud_scripts/etc/xl2tpd." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/xl2tpd/xl2tpd.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/xl2tpd/xl2tpd.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' && -[lns default] -ip range = 10.1.9.2-10.1.9.8 -local ip = 10.1.9.1 -require chap = yes -refuse pap = yes -pppoptfile = /etc/ppp/options.xl2tpd -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/xl2tpd/xl2tpd.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/xl2tpd/xl2tpd.conf': 'MD5 check failed' - ) << \SHAR_EOF -060f03388ae34c64f85a45f47c9f6d48 cloud_scripts/etc/xl2tpd/xl2tpd.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/xl2tpd/xl2tpd.conf'` -ne 139 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' is not 139" - fi -fi -# ============= cloud_scripts/etc/dnsmasq.conf.tmpl ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/dnsmasq.conf.tmpl' -then -${echo} "x - SKIPPING cloud_scripts/etc/dnsmasq.conf.tmpl (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/dnsmasq.conf.tmpl (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/dnsmasq.conf.tmpl' && -# Configuration file for dnsmasq. -# -# Format is one option per line, legal options are the same -# as the long options legal on the command line. See -# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. -X -# Listen on this specific port instead of the standard DNS port -# (53). Setting this to zero completely disables DNS function, -# leaving only DHCP and/or TFTP. -#port=5353 -X -# The following two options make you a better netizen, since they -# tell dnsmasq to filter out queries which the public DNS cannot -# answer, and which load the servers (especially the root servers) -# unnecessarily. If you have a dial-on-demand link they also stop -# these requests from bringing up the link unnecessarily. -X -# Never forward plain names (without a dot or domain part) -domain-needed -# Never forward addresses in the non-routed address spaces. -bogus-priv -X -X -# Uncomment this to filter useless windows-originated DNS requests -# which can trigger dial-on-demand links needlessly. -# Note that (amongst other things) this blocks all SRV requests, -# so don't use it if you use eg Kerberos, SIP, XMMP or Google-talk. -# This option only affects forwarding, SRV records originating for -# dnsmasq (via srv-host= lines) are not suppressed by it. -# filterwin2k -X -# Change this line if you want dns to get its upstream servers from -# somewhere other that /etc/resolv.conf -resolv-file=/etc/dnsmasq-resolv.conf -X -# By default, dnsmasq will send queries to any of the upstream -# servers it knows about and tries to favour servers to are known -# to be up. Uncommenting this forces dnsmasq to try each query -# with each server strictly in the order they appear in -# /etc/resolv.conf -#strict-order -X -# If you don't want dnsmasq to read /etc/resolv.conf or any other -# file, getting its servers from this file instead (see below), then -# uncomment this. -#no-resolv -X -# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv -# files for changes and re-read them then uncomment this. -#no-poll -X -# Add other name servers here, with domain specs if they are for -# non-public domains. -#server=/localnet/192.168.0.1 -X -# Example of routing PTR queries to nameservers: this will send all -# address->name queries for 192.168.3/24 to nameserver 10.1.2.3 -#server=/3.168.192.in-addr.arpa/10.1.2.3 -X -# Add local-only domains here, queries in these domains are answered -# from /etc/hosts or DHCP only. -local=/2.vmops-test.vmops.com/ -X -# Add domains which you want to force to an IP address here. -# The example below send any host in double-click.net to a local -# web-server. -#address=/double-click.net/127.0.0.1 -X -# --address (and --server) work with IPv6 addresses too. -#address=/www.thekelleys.org.uk/fe80::20d:60ff:fe36:f83 -X -# You can control how dnsmasq talks to a server: this forces -# queries to 10.1.2.3 to be routed via eth1 -# server=10.1.2.3@eth1 -X -# and this sets the source (ie local) address used to talk to -# 10.1.2.3 to 192.168.1.1 port 55 (there must be a interface with that -# IP on the machine, obviously). -# server=10.1.2.3@192.168.1.1#55 -X -# If you want dnsmasq to change uid and gid to something other -# than the default, edit the following lines. -#user= -#group= -X -# If you want dnsmasq to listen for DHCP and DNS requests only on -# specified interfaces (and the loopback) give the name of the -# interface (eg eth0) here. -# Repeat the line for more than one interface. -#interface=eth0 -# Or you can specify which interface _not_ to listen on -except-interface=eth1 -except-interface=eth2 -except-interface=lo -# Or which to listen on by address (remember to include 127.0.0.1 if -# you use this.) -#listen-address= -# If you want dnsmasq to provide only DNS service on an interface, -# configure it as shown above, and then use the following line to -# disable DHCP and TFTP on it. -no-dhcp-interface=eth1 -no-dhcp-interface=eth2 -X -# On systems which support it, dnsmasq binds the wildcard address, -# even when it is listening on only some interfaces. It then discards -# requests that it shouldn't reply to. This has the advantage of -# working even when interfaces come and go and change address. If you -# want dnsmasq to really bind only the interfaces it is listening on, -# uncomment this option. About the only time you may need this is when -# running another nameserver on the same machine. -#bind-interfaces -X -# If you don't want dnsmasq to read /etc/hosts, uncomment the -# following line. -#no-hosts -# or if you want it to read another file, as well as /etc/hosts, use -# this. -#addn-hosts=/etc/banner_add_hosts -X -# Set this (and domain: see below) if you want to have a domain -# automatically added to simple names in a hosts-file. -expand-hosts -X -# Set the domain for dnsmasq. this is optional, but if it is set, it -# does the following things. -# 1) Allows DHCP hosts to have fully qualified domain names, as long -# as the domain part matches this setting. -# 2) Sets the "domain" DHCP option thereby potentially setting the -# domain of all systems configured by DHCP -# 3) Provides the domain part for "expand-hosts" -domain=2.vmops-test.vmops.com -X -# Set a different domain for a particular subnet -#domain=wireless.thekelleys.org.uk,192.168.2.0/24 -X -# Same idea, but range rather then subnet -#domain=reserved.thekelleys.org.uk,192.68.3.100,192.168.3.200 -X -# Uncomment this to enable the integrated DHCP server, you need -# to supply the range of addresses available for lease and optionally -# a lease time. If you have more than one network, you will need to -# repeat this for each network on which you want to supply DHCP -# service. -dhcp-range_ip4=10.1.1.1,static -dhcp-range_ip6=::1,static -dhcp-hostsfile=/etc/dhcphosts.txt -X -# This is an example of a DHCP range where the netmask is given. This -# is needed for networks we reach the dnsmasq DHCP server via a relay -# agent. If you don't know what a DHCP relay agent is, you probably -# don't need to worry about this. -#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h -X -# This is an example of a DHCP range which sets a tag, so that -# some DHCP options may be set only for this network. -#dhcp-range=set:red,192.168.0.50,192.168.0.150 -X -# Use this DHCP range only when the tag "green" is set. -#dhcp-range=tag:green,192.168.0.50,192.168.0.150,12h -X -# Specify a subnet which can't be used for dynamic address allocation, -# is available for hosts with matching --dhcp-host lines. Note that -# dhcp-host declarations will be ignored unless there is a dhcp-range -# of some type for the subnet in question. -# In this case the netmask is implied (it comes from the network -# configuration on the machine running dnsmasq) it is possible to give -# an explicit netmask instead. -#dhcp-range=192.168.0.0,static -X -# Enable DHCPv6. Note that the prefix-length does not need to be specified -# and defaults to 64 if missing/ -#dhcp-range=1234::2, 1234::500, 64, 12h -X -# Do Router Advertisements, BUT NOT DHCP for this subnet. -#dhcp-range=1234::, ra-only -X -# Do Router Advertisements, BUT NOT DHCP for this subnet, also try and -# add names to the DNS for the IPv6 address of SLAAC-configured dual-stack -# hosts. Use the DHCPv4 lease to derive the name, network segment and -# MAC address and assume that the host will also have an -# IPv6 address calculated using the SLAAC alogrithm. -#dhcp-range=1234::, ra-names -X -# Do Router Advertisements, BUT NOT DHCP for this subnet. -# Set the lifetime to 46 hours. (Note: minimum lifetime is 2 hours.) -#dhcp-range=1234::, ra-only, 48h -X -# Do DHCP and Router Advertisements for this subnet. Set the A bit in the RA -# so that clients can use SLAAC addresses as well as DHCP ones. -#dhcp-range=1234::2, 1234::500, slaac -X -# Do Router Advertisements and stateless DHCP for this subnet. Clients will -# not get addresses from DHCP, but they will get other configuration information. -# They will use SLAAC for addresses. -#dhcp-range=1234::, ra-stateless -X -# Do stateless DHCP, SLAAC, and generate DNS names for SLAAC addresses -# from DHCPv4 leases. -#dhcp-range=1234::, ra-stateless, ra-names -X -# Do router advertisements for all subnets where we're doing DHCPv6 -# Unless overriden by ra-stateless, ra-names, et al, the router -# advertisements will have the M and O bits set, so that the clients -# get addresses and configuration from DHCPv6, and the A bit reset, so the -# clients don't use SLAAC addresses. -#enable-ra -X -# Supply parameters for specified hosts using DHCP. There are lots -# of valid alternatives, so we will give examples of each. Note that -# IP addresses DO NOT have to be in the range given above, they just -# need to be on the same network. The order of the parameters in these -# do not matter, it's permissible to give name, address and MAC in any -# order. -X -# Always allocate the host with Ethernet address 11:22:33:44:55:66 -# The IP address 192.168.0.60 -#dhcp-host=11:22:33:44:55:66,192.168.0.60 -X -# Always set the name of the host with hardware address -# 11:22:33:44:55:66 to be "fred" -#dhcp-host=11:22:33:44:55:66,fred -X -# Always give the host with Ethernet address 11:22:33:44:55:66 -# the name fred and IP address 192.168.0.60 and lease time 45 minutes -#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m -X -# Give a host with Ethernet address 11:22:33:44:55:66 or -# 12:34:56:78:90:12 the IP address 192.168.0.60. Dnsmasq will assume -# that these two Ethernet interfaces will never be in use at the same -# time, and give the IP address to the second, even if it is already -# in use by the first. Useful for laptops with wired and wireless -# addresses. -#dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.60 -X -# Give the machine which says its name is "bert" IP address -# 192.168.0.70 and an infinite lease -#dhcp-host=bert,192.168.0.70,infinite -X -# Always give the host with client identifier 01:02:02:04 -# the IP address 192.168.0.60 -#dhcp-host=id:01:02:02:04,192.168.0.60 -X -# Always give the host with client identifier "marjorie" -# the IP address 192.168.0.60 -#dhcp-host=id:marjorie,192.168.0.60 -X -# Enable the address given for "judge" in /etc/hosts -# to be given to a machine presenting the name "judge" when -# it asks for a DHCP lease. -#dhcp-host=judge -X -# Never offer DHCP service to a machine whose Ethernet -# address is 11:22:33:44:55:66 -#dhcp-host=11:22:33:44:55:66,ignore -X -# Ignore any client-id presented by the machine with Ethernet -# address 11:22:33:44:55:66. This is useful to prevent a machine -# being treated differently when running under different OS's or -# between PXE boot and OS boot. -#dhcp-host=11:22:33:44:55:66,id:* -X -# Send extra options which are tagged as "red" to -# the machine with Ethernet address 11:22:33:44:55:66 -#dhcp-host=11:22:33:44:55:66,set:red -X -# Send extra options which are tagged as "red" to -# any machine with Ethernet address starting 11:22:33: -#dhcp-host=11:22:33:*:*:*,set:red -X -# Give a fixed IPv6 address and name to client with -# DUID 00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2 -# Note the MAC addresses CANNOT be used to identify DHCPv6 clients. -# Note also the they [] around the IPv6 address are obilgatory. -#dhcp-host=id:00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2, fred, [1234::5] -X -# Ignore any clients which are not specified in dhcp-host lines -# or /etc/ethers. Equivalent to ISC "deny unknown-clients". -# This relies on the special "known" tag which is set when -# a host is matched. -# -# When using bridged networks in ACS this prevents ack to DHCPINFORM etc. request -dhcp-ignore=tag:!known -X -# Send extra options which are tagged as "red" to any machine whose -# DHCP vendorclass string includes the substring "Linux" -#dhcp-vendorclass=set:red,Linux -X -# Send extra options which are tagged as "red" to any machine one -# of whose DHCP userclass strings includes the substring "accounts" -#dhcp-userclass=set:red,accounts -X -# Send extra options which are tagged as "red" to any machine whose -# MAC address matches the pattern. -#dhcp-mac=set:red,00:60:8C:*:*:* -X -# If this line is uncommented, dnsmasq will read /etc/ethers and act -# on the ethernet-address/IP pairs found there just as if they had -# been given as --dhcp-host options. Useful if you keep -# MAC-address/host mappings there for other purposes. -#read-ethers -X -# Send options to hosts which ask for a DHCP lease. -# See RFC 2132 for details of available options. -# Common options can be given to dnsmasq by name: -# run "dnsmasq --help dhcp" to get a list. -# Note that all the common settings, such as netmask and -# broadcast address, DNS server and default route, are given -# sane defaults by dnsmasq. You very likely will not need -# any dhcp-options. If you use Windows clients and Samba, there -# are some options which are recommended, they are detailed at the -# end of this section. -X -# Override the default route supplied by dnsmasq, which assumes the -# router is the same machine as the one running dnsmasq. -#dhcp-option=3,1.2.3.4 -X -# Do the same thing, but using the option name -#dhcp-option=option:router,1.2.3.4 -X -# Override the default route supplied by dnsmasq and send no default -# route at all. Note that this only works for the options sent by -# default (1, 3, 6, 12, 28) the same line will send a zero-length option -# for all other option numbers. -#dhcp-option=3 -X -# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 -#dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5 -X -# Send DHCPv6 option. Note [] around IPv6 addresses. -#dhcp-option=option6:dns-server,[1234::77],[1234::88] -X -# Send DHCPv6 option for namservers as the machine running -# dnsmasq and another. -#dhcp-option=option6:dns-server,[::],[1234::88] -X -# Set the NTP time server address to be the same machine as -# is running dnsmasq -#dhcp-option=42,0.0.0.0 -X -# Set the NIS domain name to "welly" -#dhcp-option=40,welly -X -# Set the default time-to-live to 50 -#dhcp-option=23,50 -X -# Set the "all subnets are local" flag -#dhcp-option=27,1 -X -# Set the domain -dhcp-option=15,"2.vmops-test.vmops.com" -X -# Send the etherboot magic flag and then etherboot options (a string). -#dhcp-option=128,e4:45:74:68:00:00 -#dhcp-option=129,NIC=eepro100 -X -# Specify an option which will only be sent to the "red" network -# (see dhcp-range for the declaration of the "red" network) -# Note that the tag: part must precede the option: part. -#dhcp-option = tag:red, option:ntp-server, 192.168.1.1 -X -# The following DHCP options set up dnsmasq in the same way as is specified -# for the ISC dhcpcd in -# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt -# adapted for a typical dnsmasq installation where the host running -# dnsmasq is also the host running samba. -# you may want to uncomment some or all of them if you use -# Windows clients and Samba. -#dhcp-option=19,0 # option ip-forwarding off -#dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) -#dhcp-option=45,0.0.0.0 # netbios datagram distribution server -#dhcp-option=46,8 # netbios node type -X -# Send an empty WPAD option. This may be REQUIRED to get windows 7 to behave. -#dhcp-option=252,"\n" -X -# Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client -# probably doesn't support this...... -#dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com -X -# Send RFC-3442 classless static routes (note the netmask encoding) -#dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8 -X -# Send vendor-class specific options encapsulated in DHCP option 43. -# The meaning of the options is defined by the vendor-class so -# options are sent only when the client supplied vendor class -# matches the class given here. (A substring match is OK, so "MSFT" -# matches "MSFT" and "MSFT 5.0"). This example sets the -# mtftp address to 0.0.0.0 for PXEClients. -#dhcp-option=vendor:PXEClient,1,0.0.0.0 -X -# Send microsoft-specific option to tell windows to release the DHCP lease -# when it shuts down. Note the "i" flag, to tell dnsmasq to send the -# value as a four-byte integer - that's what microsoft wants. See -# http://technet2.microsoft.com/WindowsServer/en/library/a70f1bb7-d2d4-49f0-96d6-4b7414ecfaae1033.mspx?mfr=true -dhcp-option=vendor:MSFT,2,1i -X -# Send the Encapsulated-vendor-class ID needed by some configurations of -# Etherboot to allow is to recognise the DHCP server. -#dhcp-option=vendor:Etherboot,60,"Etherboot" -X -# Send options to PXELinux. Note that we need to send the options even -# though they don't appear in the parameter request list, so we need -# to use dhcp-option-force here. -# See http://syslinux.zytor.com/pxe.php#special for details. -# Magic number - needed before anything else is recognised -#dhcp-option-force=208,f1:00:74:7e -# Configuration file name -#dhcp-option-force=209,configs/common -# Path prefix -#dhcp-option-force=210,/tftpboot/pxelinux/files/ -# Reboot time. (Note 'i' to send 32-bit value) -#dhcp-option-force=211,30i -X -# Set the boot filename for netboot/PXE. You will only need -# this is you want to boot machines over the network and you will need -# a TFTP server; either dnsmasq's built in TFTP server or an -# external one. (See below for how to enable the TFTP server.) -dhcp-boot=pxelinux.0 -X -# The same as above, but use custom tftp-server instead machine running dnsmasq -#dhcp-boot=pxelinux,server.name,192.168.1.100 -X -# Boot for Etherboot gPXE. The idea is to send two different -# filenames, the first loads gPXE, and the second tells gPXE what to -# load. The dhcp-match sets the gpxe tag for requests from gPXE. -#dhcp-match=set:gpxe,175 # gPXE sends a 175 option. -#dhcp-boot=tag:!gpxe,undionly.kpxe -#dhcp-boot=mybootimage -X -# Encapsulated options for Etherboot gPXE. All the options are -# encapsulated within option 175 -#dhcp-option=encap:175, 1, 5b # priority code -#dhcp-option=encap:175, 176, 1b # no-proxydhcp -#dhcp-option=encap:175, 177, string # bus-id -#dhcp-option=encap:175, 189, 1b # BIOS drive code -#dhcp-option=encap:175, 190, user # iSCSI username -#dhcp-option=encap:175, 191, pass # iSCSI password -X -# Test for the architecture of a netboot client. PXE clients are -# supposed to send their architecture as option 93. (See RFC 4578) -#dhcp-match=peecees, option:client-arch, 0 #x86-32 -#dhcp-match=itanics, option:client-arch, 2 #IA64 -#dhcp-match=hammers, option:client-arch, 6 #x86-64 -#dhcp-match=mactels, option:client-arch, 7 #EFI x86-64 -X -# Do real PXE, rather than just booting a single file, this is an -# alternative to dhcp-boot. -#pxe-prompt="What system shall I netboot?" -# or with timeout before first available action is taken: -#pxe-prompt="Press F8 for menu.", 60 -X -# Available boot services. for PXE. -#pxe-service=x86PC, "Boot from local disk" -X -# Loads /pxelinux.0 from dnsmasq TFTP server. -#pxe-service=x86PC, "Install Linux", pxelinux -X -# Loads /pxelinux.0 from TFTP server at 1.2.3.4. -# Beware this fails on old PXE ROMS. -#pxe-service=x86PC, "Install Linux", pxelinux, 1.2.3.4 -X -# Use bootserver on network, found my multicast or broadcast. -#pxe-service=x86PC, "Install windows from RIS server", 1 -X -# Use bootserver at a known IP address. -#pxe-service=x86PC, "Install windows from RIS server", 1, 1.2.3.4 -X -# If you have multicast-FTP available, -# information for that can be passed in a similar way using options 1 -# to 5. See page 19 of -# http://download.intel.com/design/archives/wfm/downloads/pxespec.pdf -X -X -# Enable dnsmasq's built-in TFTP server -enable-tftp -X -# Set the root directory for files available via FTP. -tftp-root=/opt/tftpboot -X -# Make the TFTP server more secure: with this set, only files owned by -# the user dnsmasq is running as will be send over the net. -#tftp-secure -X -# This option stops dnsmasq from negotiating a larger blocksize for TFTP -# transfers. It will slow things down, but may rescue some broken TFTP -# clients. -#tftp-no-blocksize -X -# Set the boot file name only when the "red" tag is set. -#dhcp-boot=net:red,pxelinux.red-net -X -# An example of dhcp-boot with an external TFTP server: the name and IP -# address of the server are given after the filename. -# Can fail with old PXE ROMS. Overridden by --pxe-service. -#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 -X -# If there are multiple external tftp servers having a same name -# (using /etc/hosts) then that name can be specified as the -# tftp_servername (the third option to dhcp-boot) and in that -# case dnsmasq resolves this name and returns the resultant IP -# addresses in round robin fasion. This facility can be used to -# load balance the tftp load among a set of servers. -#dhcp-boot=/var/ftpd/pxelinux.0,boothost,tftp_server_name -X -# Set the limit on DHCP leases, the default is 150 -dhcp-lease-max=2100 -X -# The DHCP server needs somewhere on disk to keep its lease database. -# This defaults to a sane location, but if you want to change it, use -# the line below. -#dhcp-leasefile=/var/lib/misc/dnsmasq.leases -leasefile-ro -X -# Set the DHCP server to authoritative mode. In this mode it will barge in -# and take over the lease for any client which broadcasts on the network, -# whether it has a record of the lease or not. This avoids long timeouts -# when a machine wakes up on a new network. DO NOT enable this if there's -# the slightest chance that you might end up accidentally configuring a DHCP -# server for your campus/company accidentally. The ISC server uses -# the same option, and this URL provides more information: -# http://www.isc.org/files/auth.html -#dhcp-authoritative -X -# Run an executable when a DHCP lease is created or destroyed. -# The arguments sent to the script are "add" or "del", -# then the MAC address, the IP address and finally the hostname -# if there is one. -#dhcp-script=/bin/echo -X -# Set the cachesize here. -#cache-size=150 -X -# If you want to disable negative caching, uncomment this. -#no-negcache -X -# Normally responses which come form /etc/hosts and the DHCP lease -# file have Time-To-Live set as zero, which conventionally means -# do not cache further. If you are happy to trade lower load on the -# server for potentially stale date, you can set a time-to-live (in -# seconds) here. -#local-ttl= -X -# If you want dnsmasq to detect attempts by Verisign to send queries -# to unregistered .com and .net hosts to its sitefinder service and -# have dnsmasq instead return the correct NXDOMAIN response, uncomment -# this line. You can add similar lines to do the same for other -# registries which have implemented wildcard A records. -#bogus-nxdomain=64.94.110.11 -X -# If you want to fix up DNS results from upstream servers, use the -# alias option. This only works for IPv4. -# This alias makes a result of 1.2.3.4 appear as 5.6.7.8 -#alias=1.2.3.4,5.6.7.8 -# and this maps 1.2.3.x to 5.6.7.x -#alias=1.2.3.0,5.6.7.0,255.255.255.0 -# and this maps 192.168.0.10->192.168.0.40 to 10.0.0.10->10.0.0.40 -#alias=192.168.0.10-192.168.0.40,10.0.0.0,255.255.255.0 -X -# Change these lines if you want dnsmasq to serve MX records. -X -# Return an MX record named "maildomain.com" with target -# servermachine.com and preference 50 -#mx-host=maildomain.com,servermachine.com,50 -X -# Set the default target for MX records created using the localmx option. -#mx-target=servermachine.com -X -# Return an MX record pointing to the mx-target for all local -# machines. -#localmx -X -# Return an MX record pointing to itself for all local machines. -#selfmx -X -# Change the following lines if you want dnsmasq to serve SRV -# records. These are useful if you want to serve ldap requests for -# Active Directory and other windows-originated DNS requests. -# See RFC 2782. -# You may add multiple srv-host lines. -# The fields are ,,,, -# If the domain part if missing from the name (so that is just has the -# service and protocol sections) then the domain given by the domain= -# config option is used. (Note that expand-hosts does not need to be -# set for this to work.) -X -# A SRV record sending LDAP for the example.com domain to -# ldapserver.example.com port 389 -#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389 -X -# A SRV record sending LDAP for the example.com domain to -# ldapserver.example.com port 389 (using domain=) -#domain=example.com -#srv-host=_ldap._tcp,ldapserver.example.com,389 -X -# Two SRV records for LDAP, each with different priorities -#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1 -#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2 -X -# A SRV record indicating that there is no LDAP server for the domain -# example.com -#srv-host=_ldap._tcp.example.com -X -# The following line shows how to make dnsmasq serve an arbitrary PTR -# record. This is useful for DNS-SD. (Note that the -# domain-name expansion done for SRV records _does_not -# occur for PTR records.) -#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services" -X -# Change the following lines to enable dnsmasq to serve TXT records. -# These are used for things like SPF and zeroconf. (Note that the -# domain-name expansion done for SRV records _does_not -# occur for TXT records.) -X -#Example SPF. -#txt-record=example.com,"v=spf1 a -all" -X -#Example zeroconf -#txt-record=_http._tcp.example.com,name=value,paper=A4 -X -# Provide an alias for a "local" DNS name. Note that this _only_ works -# for targets which are names from DHCP or /etc/hosts. Give host -# "bert" another name, bertrand -#cname=bertand,bert -X -# For debugging purposes, log each DNS query as it passes through -# dnsmasq. -#log-queries -X -# Log lots of extra information about DHCP transactions. -#log-dhcp -X -log-facility=/var/log/dnsmasq.log -X -# Include a another lot of configuration options. -#conf-file=/etc/dnsmasq.more.conf -conf-dir=/etc/dnsmasq.d -X -dhcp-optsfile=/etc/dhcpopts.txt -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/dnsmasq.conf.tmpl' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/dnsmasq.conf.tmpl' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/dnsmasq.conf.tmpl failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/dnsmasq.conf.tmpl': 'MD5 check failed' - ) << \SHAR_EOF -a0f6d4fbdef769352c0b4c6aee0e5b0b cloud_scripts/etc/dnsmasq.conf.tmpl -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/dnsmasq.conf.tmpl'` -ne 25321 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/dnsmasq.conf.tmpl' is not 25321" - fi -fi -# ============= cloud_scripts/etc/cron.daily/clear_cache ============== -if test ! -d 'cloud_scripts/etc/cron.daily'; then - mkdir 'cloud_scripts/etc/cron.daily' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/etc/cron.daily." -else ${echo} "x - failed to create directory cloud_scripts/etc/cron.daily." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cron.daily/clear_cache' -then -${echo} "x - SKIPPING cloud_scripts/etc/cron.daily/clear_cache (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/cron.daily/clear_cache (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cron.daily/clear_cache' && -#!/bin/bash -X -# clear memory cache to ultimately reduce swapping -X -sync && echo 1 > /proc/sys/vm/drop_caches -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cron.daily/clear_cache' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/cron.daily/clear_cache' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/cron.daily/clear_cache failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cron.daily/clear_cache': 'MD5 check failed' - ) << \SHAR_EOF -7935ce340439ae62c8f12f337d420207 cloud_scripts/etc/cron.daily/clear_cache -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/cron.daily/clear_cache'` -ne 107 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/cron.daily/clear_cache' is not 107" - fi -fi -# ============= cloud_scripts/etc/vmware-tools/tools.conf ============== -if test ! -d 'cloud_scripts/etc/vmware-tools'; then - mkdir 'cloud_scripts/etc/vmware-tools' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/etc/vmware-tools." -else ${echo} "x - failed to create directory cloud_scripts/etc/vmware-tools." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/vmware-tools/tools.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/vmware-tools/tools.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/vmware-tools/tools.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/vmware-tools/tools.conf' && -[logging] -# Turns on logging globally. It can still be disabled for each domain. -# log = true -X -# Disables core dumps on fatal errors; they're enabled by default. -enableCoreDump = false -X -# Defines the "vmsvc" domain, logging to file -# vmsvc.level = message -vmsvc.handler = file -# Setup file rotation - keep 3 files -vmsvc.maxOldLogFiles = 2 -# Max log file size kept: 1 MB -vmsvc.maxLogSize = 1 -X -# Defines the "vmtoolsd" domain, and disable logging for it. -# vmtoolsd.level = none -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/vmware-tools/tools.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/vmware-tools/tools.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/vmware-tools/tools.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/vmware-tools/tools.conf': 'MD5 check failed' - ) << \SHAR_EOF -4d08804e1a2d4526faeec6404c18fabe cloud_scripts/etc/vmware-tools/tools.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/vmware-tools/tools.conf'` -ne 477 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/vmware-tools/tools.conf' is not 477" - fi -fi -# ============= cloud_scripts/etc/logrotate.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.conf' && -# rotate log files daily -daily -# keep 3 days worth -rotate 3 -# create new (empty) log files after rotating old ones -create -# use date as a suffix of the rotated file -#dateext -# max size 50M -size 50M -compress -# RPM packages drop log rotation information into this directory -include /etc/logrotate.d -# no packages own wtmp and btmp -- we'll rotate them here -/var/log/wtmp { -X monthly -X create 0664 root utmp -X rotate 1 -} -/var/log/btmp { -X missingok -X monthly -X create 0600 root utmp -X rotate 1 -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.conf': 'MD5 check failed' - ) << \SHAR_EOF -2430f483d055288c92deb28733562d8f cloud_scripts/etc/logrotate.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.conf'` -ne 507 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.conf' is not 507" - fi -fi -# ============= cloud_scripts/etc/ssh/sshd_config ============== -if test ! -d 'cloud_scripts/etc/ssh'; then - mkdir 'cloud_scripts/etc/ssh' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/etc/ssh." -else ${echo} "x - failed to create directory cloud_scripts/etc/ssh." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ssh/sshd_config' -then -${echo} "x - SKIPPING cloud_scripts/etc/ssh/sshd_config (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/ssh/sshd_config (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ssh/sshd_config' && -# $OpenBSD: sshd_config,v 1.75 2007/03/19 01:01:29 djm Exp $ -X -# This is the sshd server system-wide configuration file. See -# sshd_config(5) for more information. -X -# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin -X -# The strategy used for options in the default sshd_config shipped with -# OpenSSH is to specify options with their default value where -# possible, but leave them commented. Uncommented options change a -# default value. -X -Port 3922 -#AddressFamily any -#ListenAddress 0.0.0.0 -X -# Disable legacy (protocol version 1) support in the server for new -# installations. In future the default will change to require explicit -# activation of protocol 1 -Protocol 2 -X -# HostKey for protocol version 1 -#HostKey /etc/ssh/ssh_host_key -# HostKeys for protocol version 2 -#HostKey /etc/ssh/ssh_host_rsa_key -#HostKey /etc/ssh/ssh_host_dsa_key -X -# Lifetime and size of ephemeral version 1 server key -#KeyRegenerationInterval 1h -#ServerKeyBits 768 -X -# Logging -# obsoletes QuietMode and FascistLogging -#SyslogFacility AUTH -SyslogFacility AUTHPRIV -#LogLevel INFO -X -# Authentication: -X -#LoginGraceTime 2m -PermitRootLogin yes -#StrictModes yes -#MaxAuthTries 6 -X -#RSAAuthentication yes -PubkeyAuthentication yes -AuthorizedKeysFile .ssh/authorized_keys -X -# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts -#RhostsRSAAuthentication no -# similar for protocol version 2 -#HostbasedAuthentication no -# Change to yes if you don't trust ~/.ssh/known_hosts for -# RhostsRSAAuthentication and HostbasedAuthentication -#IgnoreUserKnownHosts no -# Don't read the user's ~/.rhosts and ~/.shosts files -#IgnoreRhosts yes -X -# To disable tunneled clear text passwords, change to no here! -#PermitEmptyPasswords no -PasswordAuthentication no -X -# Change to no to disable s/key passwords -#ChallengeResponseAuthentication yes -ChallengeResponseAuthentication no -X -# Kerberos options -#KerberosAuthentication no -#KerberosOrLocalPasswd yes -#KerberosTicketCleanup yes -#KerberosGetAFSToken no -X -# GSSAPI options -#GSSAPIAuthentication no -GSSAPIAuthentication no -#GSSAPICleanupCredentials yes -GSSAPICleanupCredentials yes -X -# Set this to 'yes' to enable PAM authentication, account processing, -# and session processing. If this is enabled, PAM authentication will -# be allowed through the ChallengeResponseAuthentication and -# PasswordAuthentication. Depending on your PAM configuration, -# PAM authentication via ChallengeResponseAuthentication may bypass -# the setting of "PermitRootLogin without-password". -# If you just want the PAM account and session checks to run without -# PAM authentication, then enable this but set PasswordAuthentication -# and ChallengeResponseAuthentication to 'no'. -#UsePAM no -UsePAM yes -X -# Accept locale-related environment variables -AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES -AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT -AcceptEnv LC_IDENTIFICATION LC_ALL -#AllowTcpForwarding yes -#GatewayPorts no -#X11Forwarding no -#X11Forwarding yes -#X11DisplayOffset 10 -#X11UseLocalhost yes -#PrintMotd yes -#PrintLastLog yes -TCPKeepAlive yes -#UseLogin no -#UsePrivilegeSeparation yes -#PermitUserEnvironment no -#Compression delayed -#ClientAliveInterval 0 -#ClientAliveCountMax 3 -#ShowPatchLevel no -UseDNS no -#PidFile /var/run/sshd.pid -#PermitTunnel no -X -MaxStartups 1000 -MaxSessions 1000 -X -# no default banner path -#Banner /some/path -X -# override default of no subsystems -Subsystem sftp /usr/lib/openssh/sftp-server -X -# Example of overriding settings on a per-user basis -#Match User anoncvs -# X11Forwarding no -# AllowTcpForwarding no -# ForceCommand cvs server -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ssh/sshd_config' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/ssh/sshd_config' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/ssh/sshd_config failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ssh/sshd_config': 'MD5 check failed' - ) << \SHAR_EOF -842613e1f724e90888a90882ed1a5684 cloud_scripts/etc/ssh/sshd_config -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/ssh/sshd_config'` -ne 3603 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/ssh/sshd_config' is not 3603" - fi -fi -# ============= cloud_scripts/etc/ppp/options.xl2tpd ============== -if test ! -d 'cloud_scripts/etc/ppp'; then - mkdir 'cloud_scripts/etc/ppp' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/etc/ppp." -else ${echo} "x - failed to create directory cloud_scripts/etc/ppp." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ppp/options.xl2tpd' -then -${echo} "x - SKIPPING cloud_scripts/etc/ppp/options.xl2tpd (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/ppp/options.xl2tpd (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ppp/options.xl2tpd' && -proxyarp -ipcp-accept-local -ipcp-accept-remote -noccp -idle 1800 -auth -mtu 1410 -mru 1410 -nodefaultroute -debug -connect-delay 5000 -ms-dns 10.1.1.1 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ppp/options.xl2tpd' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/ppp/options.xl2tpd' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/ppp/options.xl2tpd failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ppp/options.xl2tpd': 'MD5 check failed' - ) << \SHAR_EOF -80ba26ac087aaf7f13cdc1fa8f985d72 cloud_scripts/etc/ppp/options.xl2tpd -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/ppp/options.xl2tpd'` -ne 141 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/ppp/options.xl2tpd' is not 141" - fi -fi -# ============= cloud_scripts/etc/ipsec.d/l2tp.conf ============== -if test ! -d 'cloud_scripts/etc/ipsec.d'; then - mkdir 'cloud_scripts/etc/ipsec.d' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/etc/ipsec.d." -else ${echo} "x - failed to create directory cloud_scripts/etc/ipsec.d." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.d/l2tp.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/ipsec.d/l2tp.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/ipsec.d/l2tp.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.d/l2tp.conf' && -#ipsec remote access vpn configuration -conn L2TP-PSK -X authby=secret -X rekey=no -X keyingtries=3 -X leftfirewall=yes -X type=transport -X # -X # ---------------------------------------------------------- -X # The VPN server. -X # -X # Allow incoming connections on the external network interface. -X # If you want to use a different interface or if there is no -X # defaultroute, you can use: left=your.ip.addr.ess -X # -X left=172.26.0.151 -X # -X leftprotoport=udp/l2tp -X # If you insist on supporting non-updated Windows clients, -X # you can use: leftprotoport=17/%any -X # -X # ---------------------------------------------------------- -X # The remote user(s). -X # -X # Allow incoming connections only from this IP address. -X right=%any -X # If you want to allow multiple connections from any IP address, -X # you can use: right=%any -X # -X rightprotoport=udp/%any -X # -X # ---------------------------------------------------------- -X # Change 'ignore' to 'add' to enable this configuration. -X # -X rightsubnetwithin=0.0.0.0/0 -X auto=route -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.d/l2tp.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/ipsec.d/l2tp.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/ipsec.d/l2tp.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.d/l2tp.conf': 'MD5 check failed' - ) << \SHAR_EOF -8ca6cb315858c9ccf8c91374c4f32def cloud_scripts/etc/ipsec.d/l2tp.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.d/l2tp.conf'` -ne 1234 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.d/l2tp.conf' is not 1234" - fi -fi -# ============= cloud_scripts/etc/rsyslog.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/rsyslog.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/rsyslog.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/rsyslog.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/rsyslog.conf' && -# /etc/rsyslog.conf Configuration file for rsyslog. -# -# For more information see -# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html -X -X -################# -#### MODULES #### -################# -X -$ModLoad imuxsock # provides support for local system logging -$ModLoad imklog # provides kernel logging support (previously done by rklogd) -#$ModLoad immark # provides --MARK-- message capability -X -# provides UDP syslog reception -$ModLoad imudp -$UDPServerRun 3914 -X -# provides TCP syslog reception -#$ModLoad imtcp -#$InputTCPServerRun 514 -X -X -########################### -#### GLOBAL DIRECTIVES #### -########################### -X -# -# Use traditional timestamp format. -# To enable high precision timestamps, comment out the following line. -# -$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat -X -# -# Set the default permissions for all log files. -# -$FileOwner root -$FileGroup adm -$FileCreateMode 0640 -$DirCreateMode 0755 -$Umask 0022 -X -# -# Include all config files in /etc/rsyslog.d/ -# -$IncludeConfig /etc/rsyslog.d/*.conf -X -X -############### -#### RULES #### -############### -X -# -# First some standard log files. Log by facility. -# -auth,authpriv.* /var/log/auth.log -#*.*;auth,authpriv.none -/var/log/syslog -cron.* /var/log/cron.log -daemon.* -/var/log/daemon.log -kern.* -/var/log/kern.log -lpr.* -/var/log/lpr.log -mail.* -/var/log/mail.log -#user.* -/var/log/user.log -X -# -# Logging for the mail system. Split it up so that -# it is easy to write scripts to parse these files. -# -mail.info -/var/log/mail.info -mail.warn -/var/log/mail.warn -mail.err /var/log/mail.err -X -# -# Logging for INN news system. -# -news.crit /var/log/news/news.crit -news.err /var/log/news/news.err -news.notice -/var/log/news/news.notice -X -# -# Some "catch-all" log files. -# -#*.=debug;\ -# auth,authpriv.none;\ -# news.none;mail.none -/var/log/debug -*.=info;*.=notice;*.=warn;\ -X auth,authpriv.none;\ -X cron.none,daemon.none;\ -X local0.none,daemon.none;\ -X mail.none,news.none -/var/log/messages -X -# -# Emergencies are sent to everybody logged in. -# -*.emerg :omusrmsg:* -X -# -# I like to have messages displayed on the console, but only on a virtual -# console I usually leave idle. -# -#daemon,mail.*;\ -# news.=crit;news.=err;news.=notice;\ -# *.=debug;*.=info;\ -# *.=notice;*.=warn /dev/tty8 -X -local0.* -/var/log/haproxy.log -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/rsyslog.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/rsyslog.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/rsyslog.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/rsyslog.conf': 'MD5 check failed' - ) << \SHAR_EOF -1ae97a7bb7bd89a2a7c2e9507bd5c95f cloud_scripts/etc/rsyslog.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/rsyslog.conf'` -ne 2298 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/rsyslog.conf' is not 2298" - fi -fi -# ============= cloud_scripts/etc/modprobe.d/pcspkr.conf ============== -if test ! -d 'cloud_scripts/etc/modprobe.d'; then - mkdir 'cloud_scripts/etc/modprobe.d' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/etc/modprobe.d." -else ${echo} "x - failed to create directory cloud_scripts/etc/modprobe.d." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/modprobe.d/pcspkr.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/modprobe.d/pcspkr.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/modprobe.d/pcspkr.conf (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/modprobe.d/pcspkr.conf -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/modprobe.d/pcspkr.conf': 'MD5 check failed' - ) << \SHAR_EOF -6dc1a7a74dfa22c4f3b37e8700b61658 cloud_scripts/etc/modprobe.d/pcspkr.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/modprobe.d/pcspkr.conf'` -ne 801 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/modprobe.d/pcspkr.conf' is not 801" - fi -fi -# ============= cloud_scripts/etc/modprobe.d/aesni_intel.conf ============== -if test ! -d 'cloud_scripts/etc/modprobe.d'; then - mkdir 'cloud_scripts/etc/modprobe.d' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/etc/modprobe.d." -else ${echo} "x - failed to create directory cloud_scripts/etc/modprobe.d." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/modprobe.d/aesni_intel.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/modprobe.d/aesni_intel.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -blacklist aesni_intel -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/modprobe.d/aesni_intel.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/modprobe.d/aesni_intel.conf': 'MD5 check failed' - ) << \SHAR_EOF -45027ef77fea6dd170da8ea5e1ad1268 cloud_scripts/etc/modprobe.d/aesni_intel.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/modprobe.d/aesni_intel.conf'` -ne 807 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' is not 807" - fi -fi -# ============= cloud_scripts/etc/cron.hourly/clear_cache ============== -if test ! -d 'cloud_scripts/etc/cron.hourly'; then - mkdir 'cloud_scripts/etc/cron.hourly' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/etc/cron.hourly." -else ${echo} "x - failed to create directory cloud_scripts/etc/cron.hourly." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cron.hourly/clear_cache' -then -${echo} "x - SKIPPING cloud_scripts/etc/cron.hourly/clear_cache (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/cron.hourly/clear_cache (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cron.hourly/clear_cache' && -#!/bin/bash -X -# clear memory cache to ultimately reduce swapping -X -phymem=$(free|awk '/^Mem:/{print $2}') -if [ $phymem -lt 513000 ]; then -X sync && echo 1 > /proc/sys/vm/drop_caches -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cron.hourly/clear_cache' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/cron.hourly/clear_cache' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/cron.hourly/clear_cache failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cron.hourly/clear_cache': 'MD5 check failed' - ) << \SHAR_EOF -648c036aba1a5d72010bf11e0ec95147 cloud_scripts/etc/cron.hourly/clear_cache -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/cron.hourly/clear_cache'` -ne 183 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/cron.hourly/clear_cache' is not 183" - fi -fi -# ============= cloud_scripts/etc/apache2/conf-enabled/security.conf ============== -if test ! -d 'cloud_scripts/etc/apache2'; then - mkdir 'cloud_scripts/etc/apache2' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/etc/apache2." -else ${echo} "x - failed to create directory cloud_scripts/etc/apache2." - exit 1 -fi -fi -if test ! -d 'cloud_scripts/etc/apache2/conf-enabled'; then - mkdir 'cloud_scripts/etc/apache2/conf-enabled' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/etc/apache2/conf-enabled." -else ${echo} "x - failed to create directory cloud_scripts/etc/apache2/conf-enabled." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/security.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/security.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/security.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/security.conf' && -ServerTokens Prod -ServerSignature Off -TraceEnable Off -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/security.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/security.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/security.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/security.conf': 'MD5 check failed' - ) << \SHAR_EOF -73e01a3d1cf4f93cb11afb4eb1a6f252 cloud_scripts/etc/apache2/conf-enabled/security.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/security.conf'` -ne 54 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/security.conf' is not 54" - fi -fi -# ============= cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf ============== -if test ! -d 'cloud_scripts/etc/apache2/conf-enabled'; then - mkdir 'cloud_scripts/etc/apache2/conf-enabled' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/etc/apache2/conf-enabled." -else ${echo} "x - failed to create directory cloud_scripts/etc/apache2/conf-enabled." - exit 1 -fi -fi -if test ! -d 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled'; then - mkdir 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/etc/apache2/conf-enabled/mods-enabled." -else ${echo} "x - failed to create directory cloud_scripts/etc/apache2/conf-enabled/mods-enabled." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' && -# event MPM -# StartServers: initial number of server processes to start -# MinSpareThreads: minimum number of worker threads which are kept spare -# MaxSpareThreads: maximum number of worker threads which are kept spare -# ThreadsPerChild: constant number of worker threads in each server process -# MaxRequestWorkers: maximum number of worker threads -# MaxConnectionsPerChild: maximum number of requests a server process serves - -X StartServers 1 -X MinSpareThreads 25 -X MaxSpareThreads 75 -X ThreadLimit 64 -X ThreadsPerChild 25 -X MaxRequestWorkers 30 -X MaxConnectionsPerChild 1000 - -X -# vim: syntax=apache ts=4 sw=4 sts=4 sr noet -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf': 'MD5 check failed' - ) << \SHAR_EOF -b05dce38d6618734e7f49eddcb8ac131 cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf'` -ne 669 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' is not 669" - fi -fi -# ============= cloud_scripts/etc/apache2/httpd.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/httpd.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/apache2/httpd.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/apache2/httpd.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/httpd.conf' && -# Empty -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/httpd.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/apache2/httpd.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/apache2/httpd.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/httpd.conf': 'MD5 check failed' - ) << \SHAR_EOF -2402d4d5cd982d8b74e5c4d62ab0b20b cloud_scripts/etc/apache2/httpd.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/httpd.conf'` -ne 8 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/httpd.conf' is not 8" - fi -fi -# ============= cloud_scripts/etc/apache2/vhost.template ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/vhost.template' -then -${echo} "x - SKIPPING cloud_scripts/etc/apache2/vhost.template (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/apache2/vhost.template (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/apache2/vhost.template -M/%9I3X*"3Q$:7)E8W1O0H)"6%L;&]W(&9R -M;VT@86QL"@D\+T1I3X*"@E38W)I<'1!;&EA0H)"4%L;&]W(&9R;VT@86QL"@D\+T1I3X*"@E%T%004-(15],3T=?1$E2?2]ET%004-(15],3T=?1$E2?2]A8V-E&5S($UU;'1I5FEE=W,@1F]L;&]W4WEM3&EN:W,*("`@("`@("!!;&QO -M=T]V97)R:61E($YO;F4*("`@("`@("!/2!F3X*"CPO5FER='5A -M;$AO2`O/@H)"4]P=&EO;G,@1F]L;&]W -M4WEM3&EN:W,*"0E!;&QO=T]V97)R:61E($YO;F4*"3PO1&ER96-T;W)Y/@H) -M/$1I2`O=F%R+W=W=R]H=&UL/@H)"4]P=&EO;G,@26YD97AE6U,:6YK2`B+W5S&5S($UU;'1I5FEE=W,@1F]L;&]W -M4WEM3&EN:W,*"0E!;&QO=T]V97)R:61E($YO;F4*"0E/2!F3X*"@DC($EN8VQU9&4@0T]2 -M4R!C;VYF:6=U2!A;F0@8V5R=&EF:6-A=&4@87)E('-T;W)E9"!I;B!T:&4@2!A<'!E;F1E9"!T;R!T:&4@2!O;F4*"2,@("!H=6=E(&9I;&4@8V]N=&%I -M;FEN9R!A;&P@;V8@=&AE;2`H9FEL92!M=7-T(&)E(%!%32!E;F-O9&5D*0H) -M(R`@($YO=&4Z($EN2!O;F4@:'5G92!F:6QE(&-O;G1A:6YI -M;F<@86QL"@DC("`@;V8@=&AE;2`H9FEL92!M=7-T(&)E(%!%32!E;F-O9&5D -M*0H)(R`@($YO=&4Z($EN7!E2!T:&4@8V5R=&EF:6-A=&4*"2,@("!I2!A8V-E2!C;VUP;&5X(&)O;VQE86X@97AP"!I*$58 -M4'Q.54Q,*2\@7`H)(R`@("`@("`@("`@(&%N9"`E>U-33%]#3$E%3E1?4U]$ -M3E]/?2!E<2`B4VYA:V4@3VEL+"!,=&0N(B!<"@DC("`@("`@("`@("`@86YD -M("5[4U-,7T-,245.5%]37T1.7T]5?2!I;B![(E-T869F(BP@(D-!(BP@(D1E -M=B)](%P*"2,@("`@("`@("`@("!A;F0@)7M424U%7U=$05E](#X](#$@86YD -M("5[5$E-15]71$%9?2`\/2`U(%P*"2,@("`@("`@("`@("!A;F0@)7M424U% -M7TA/55)](#X](#@@86YD("5[5$E-15](3U52?2`\/2`R,"`@("`@("`I(%P* -M"2,@("`@("`@("`@(&]R("5[4D5-3U1%7T%$1%)](#U^(&TO7C$Y,EPN-S9< -M+C$V,EPN6S`M.5TK)"\*"2,\+TQO8V%T:6]N/@H*"2,@("!34TP@16YG:6YE -M($]P=&EO;G,Z"@DC("`@4V5T('9A2!E;G1R>2!I;B!T:&4@=7-E<@H)(R`@("`@9FEL92!N -M965D'AJ,S%:351:>FM602'!O7,@97AI'!O -M2X*"2,@("!O -M(%-T2!A;GDB('-I='5A=&EO;BP@:2YE -M+B!W:&5N(&ET(&%P<&QI97,@86-C97-S(&ES(&1E;FEE9`H)(R`@("`@86YD -M(&YO(&]T:&5R(&UO9'5L92!C86X@8VAA;F=E(&ET+@H)(R`@(&\@3W!T4F5N -M96=O=&EA=&4Z"@DC("`@("!4:&ES(&5N86)L97,@;W!T:6UI>F5D(%-33"!C -M;VYN96-T:6]N(')E;F5G;W1I871I;VX@:&%N9&QI;F<@=VAE;B!34TP*"2,@ -M("`@(&1I2!C;VYT -M97AT+@H)(U-33$]P=&EO;G,@*T9A:V5"87-I8T%U=&@@*T5X<&]R=$-E2!A;&5R="!B=70@9&]E6]U(&YE -M960@82!D:69F97)E;G0@2P@6]U('5S=6%L;'D@861D:71I;VYA;&QY('=A -M;G0@=&\@9&ES86)L90H)(R`@(&ME97`M86QI=F4@9F]R('1H;W-E(&-L:65N -M=',L('1O;RX@57-E('9A2!-4TE%(&]N(%=I;F1O=W,@6%`N -M"B`@("!,:7-T96X@,3`N,2XQ+C$Z.#0T,PH\+TEF36]D=6QE/@H*/$EF36]D -M=6QE(&UO9%]G;G5T;',N8SX*("`@($QI/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/vhost.template': 'MD5 check failed' - ) << \SHAR_EOF -e42ce7d6f871a7efa7a3c0e164f75dfc cloud_scripts/etc/apache2/vhost.template -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/vhost.template'` -ne 9955 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/vhost.template' is not 9955" - fi -fi -# ============= cloud_scripts/etc/vpcdnsmasq.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/vpcdnsmasq.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/vpcdnsmasq.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/vpcdnsmasq.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/vpcdnsmasq.conf' && -# Configuration file for dnsmasq. -# -# Format is one option per line, legal options are the same -# as the long options legal on the command line. See -# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. -X -# The following two options make you a better netizen, since they -# tell dnsmasq to filter out queries which the public DNS cannot -# answer, and which load the servers (especially the root servers) -# uneccessarily. If you have a dial-on-demand link they also stop -# these requests from bringing up the link uneccessarily. -X -# Never forward plain names (without a dot or domain part) -domain-needed -# Never forward addresses in the non-routed address spaces. -bogus-priv -X -X -# Uncomment this to filter useless windows-originated DNS requests -# which can trigger dial-on-demand links needlessly. -# Note that (amongst other things) this blocks all SRV requests, -# so don't use it if you use eg Kerberos. -# This option only affects forwarding, SRV records originating for -# dnsmasq (via srv-host= lines) are not suppressed by it. -#filterwin2k -X -# Change this line if you want dns to get its upstream servers from -# somewhere other that /etc/resolv.conf -resolv-file=/etc/dnsmasq-resolv.conf -X -# By default, dnsmasq will send queries to any of the upstream -# servers it knows about and tries to favour servers to are known -# to be up. Uncommenting this forces dnsmasq to try each query -# with each server strictly in the order they appear in -# /etc/resolv.conf -#strict-order -X -# If you don't want dnsmasq to read /etc/resolv.conf or any other -# file, getting its servers from this file instead (see below), then -# uncomment this. -#no-resolv -X -# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv -# files for changes and re-read them then uncomment this. -#no-poll -X -# Add other name servers here, with domain specs if they are for -# non-public domains. -#server=/localnet/192.168.0.1 -X -# Example of routing PTR queries to nameservers: this will send all -# address->name queries for 192.168.3/24 to nameserver 10.1.2.3 -#server=/3.168.192.in-addr.arpa/10.1.2.3 -X -# Add local-only domains here, queries in these domains are answered -# from /etc/hosts or DHCP only. -local=/2.vmops-test.vmops.com/ -X -# Add domains which you want to force to an IP address here. -# The example below send any host in doubleclick.net to a local -# webserver. -#address=/doubleclick.net/127.0.0.1 -X -# If you want dnsmasq to change uid and gid to something other -# than the default, edit the following lines. -#user= -#group= -X -# If you want dnsmasq to listen for DHCP and DNS requests only on -# specified interfaces (and the loopback) give the name of the -# interface (eg eth0) here. -# Repeat the line for more than one interface. -#interface=eth0 -X -# Or you can specify which interface _not_ to listen on -except-interface=lo -X -# Or which to listen on by address (remember to include 127.0.0.1 if -# you use this.) -#listen-address= -# If you want dnsmasq to provide only DNS service on an interface, -# configure it as shown above, and then use the following line to -# disable DHCP on it. -#no-dhcp-interface=eth1 -X -# On systems which support it, dnsmasq binds the wildcard address, -# even when it is listening on only some interfaces. It then discards -# requests that it shouldn't reply to. This has the advantage of -# working even when interfaces come and go and change address. If you -# want dnsmasq to really bind only the interfaces it is listening on, -# uncomment this option. About the only time you may need this is when -# running another nameserver on the same machine. -#bind-interfaces -X -# If you don't want dnsmasq to read /etc/hosts, uncomment the -# following line. -#no-hosts -# or if you want it to read another file, as well as /etc/hosts, use -# this. -#addn-hosts=/etc/banner_add_hosts -X -# Set this (and domain: see below) if you want to have a domain -# automatically added to simple names in a hosts-file. -expand-hosts -X -# Set the domain for dnsmasq. this is optional, but if it is set, it -# does the following things. -# 1) Allows DHCP hosts to have fully qualified domain names, as long -# as the domain part matches this setting. -# 2) Sets the "domain" DHCP option thereby potentially setting the -# domain of all systems configured by DHCP -# 3) Provides the domain part for "expand-hosts" -#domain=2.vmops-test.vmops.com -X -# Uncomment this to enable the integrated DHCP server, you need -# to supply the range of addresses available for lease and optionally -# a lease time. If you have more than one network, you will need to -# repeat this for each network on which you want to supply DHCP -# service. -#dhcp-range=10.1.1.1,static -#dhcp-range=10.0.0.1,10.255.255.255 -#dhcp-hostsfile=/etc/dhcphosts.txt -X -# This is an example of a DHCP range where the netmask is given. This -# is needed for networks we reach the dnsmasq DHCP server via a relay -# agent. If you don't know what a DHCP relay agent is, you probably -# don't need to worry about this. -#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h -X -# This is an example of a DHCP range with a network-id, so that -# some DHCP options may be set only for this network. -#dhcp-range=red,192.168.0.50,192.168.0.150 -X -# Supply parameters for specified hosts using DHCP. There are lots -# of valid alternatives, so we will give examples of each. Note that -# IP addresses DO NOT have to be in the range given above, they just -# need to be on the same network. The order of the parameters in these -# do not matter, it's permissble to give name,adddress and MAC in any order -X -# Always allocate the host with ethernet address 11:22:33:44:55:66 -# The IP address 192.168.0.60 -#dhcp-host=11:22:33:44:55:66,192.168.0.60 -X -# Always set the name of the host with hardware address -# 11:22:33:44:55:66 to be "fred" -#dhcp-host=11:22:33:44:55:66,fred -X -# Always give the host with ethernet address 11:22:33:44:55:66 -# the name fred and IP address 192.168.0.60 and lease time 45 minutes -#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m -X -# Give the machine which says it's name is "bert" IP address -# 192.168.0.70 and an infinite lease -#dhcp-host=bert,192.168.0.70,infinite -X -# Always give the host with client identifier 01:02:02:04 -# the IP address 192.168.0.60 -#dhcp-host=id:01:02:02:04,192.168.0.60 -X -# Always give the host with client identifier "marjorie" -# the IP address 192.168.0.60 -#dhcp-host=id:marjorie,192.168.0.60 -X -# Enable the address given for "judge" in /etc/hosts -# to be given to a machine presenting the name "judge" when -# it asks for a DHCP lease. -#dhcp-host=judge -X -# Never offer DHCP service to a machine whose ethernet -# address is 11:22:33:44:55:66 -#dhcp-host=11:22:33:44:55:66,ignore -X -# Ignore any client-id presented by the machine with ethernet -# address 11:22:33:44:55:66. This is useful to prevent a machine -# being treated differently when running under different OS's or -# between PXE boot and OS boot. -#dhcp-host=11:22:33:44:55:66,id:* -X -# Send extra options which are tagged as "red" to -# the machine with ethernet address 11:22:33:44:55:66 -#dhcp-host=11:22:33:44:55:66,net:red -X -# Send extra options which are tagged as "red" to -# any machine with ethernet address starting 11:22:33: -#dhcp-host=11:22:33:*:*:*,net:red -X -# Ignore any clients which are specified in dhcp-host lines -# or /etc/ethers. Equivalent to ISC "deny unkown-clients". -# This relies on the special "known" tag which is set when -# a host is matched. -#dhcp-ignore=#known -X -# Send extra options which are tagged as "red" to any machine whose -# DHCP vendorclass string includes the substring "Linux" -#dhcp-vendorclass=red,Linux -X -# Send extra options which are tagged as "red" to any machine one -# of whose DHCP userclass strings includes the substring "accounts" -#dhcp-userclass=red,accounts -X -# Send extra options which are tagged as "red" to any machine whose -# MAC address matches the pattern. -#dhcp-mac=red,00:60:8C:*:*:* -X -# If this line is uncommented, dnsmasq will read /etc/ethers and act -# on the ethernet-address/IP pairs found there just as if they had -# been given as --dhcp-host options. Useful if you keep -# MAC-address/host mappings there for other purposes. -#read-ethers -X -# Send options to hosts which ask for a DHCP lease. -# See RFC 2132 for details of available options. -# Common options can be given to dnsmasq by name: -# run "dnsmasq --help dhcp" to get a list. -# Note that all the common settings, such as netmask and -# broadcast address, DNS server and default route, are given -# sane defaults by dnsmasq. You very likely will not need -# any dhcp-options. If you use Windows clients and Samba, there -# are some options which are recommended, they are detailed at the -# end of this section. -X -# Override the default route supplied by dnsmasq, which assumes the -# router is the same machine as the one running dnsmasq. -#dhcp-option=3,1.2.3.4 -X -# Do the same thing, but using the option name -#dhcp-option=option:router,1.2.3.4 -X -# Override the default route supplied by dnsmasq and send no default -# route at all. Note that this only works for the options sent by -# default (1, 3, 6, 12, 28) the same line will send a zero-length option -# for all other option numbers. -#dhcp-option=3 -X -# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 -#dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5 -X -# Set the NTP time server address to be the same machine as -# is running dnsmasq -#dhcp-option=42,0.0.0.0 -X -# Set the NIS domain name to "welly" -#dhcp-option=40,welly -X -# Set the default time-to-live to 50 -#dhcp-option=23,50 -X -# Set the "all subnets are local" flag -#dhcp-option=27,1 -X -# Set the domain -dhcp-option=15,"2.vmops-test.vmops.com" -X -# Send the etherboot magic flag and then etherboot options (a string). -#dhcp-option=128,e4:45:74:68:00:00 -#dhcp-option=129,NIC=eepro100 -X -# Specify an option which will only be sent to the "red" network -# (see dhcp-range for the declaration of the "red" network) -# Note that the net: part must precede the option: part. -#dhcp-option = net:red, option:ntp-server, 192.168.1.1 -X -# The following DHCP options set up dnsmasq in the same way as is specified -# for the ISC dhcpcd in -# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt -# adapted for a typical dnsmasq installation where the host running -# dnsmasq is also the host running samba. -# you may want to uncomment them if you use Windows clients and Samba. -#dhcp-option=19,0 # option ip-forwarding off -#dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) -#dhcp-option=45,0.0.0.0 # netbios datagram distribution server -#dhcp-option=46,8 # netbios node type -#dhcp-option=47 # empty netbios scope. -X -# Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client -# probably doesn't support this...... -#dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com -X -# Send RFC-3442 classless static routes (note the netmask encoding) -#dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8 -X -# Send vendor-class specific options encapsulated in DHCP option 43. -# The meaning of the options is defined by the vendor-class so -# options are sent only when the client supplied vendor class -# matches the class given here. (A substring match is OK, so "MSFT" -# matches "MSFT" and "MSFT 5.0"). This example sets the -# mtftp address to 0.0.0.0 for PXEClients. -#dhcp-option=vendor:PXEClient,1,0.0.0.0 -X -# Send microsoft-specific option to tell windows to release the DHCP lease -# when it shuts down. Note the "i" flag, to tell dnsmasq to send the -# value as a four-byte integer - that's what microsoft wants. See -# http://technet2.microsoft.com/WindowsServer/en/library/a70f1bb7-d2d4-49f0-96d6-4b7414ecfaae1033.mspx?mfr=true -dhcp-option=vendor:MSFT,2,1i -X -# Send the Encapsulated-vendor-class ID needed by some configurations of -# Etherboot to allow is to recognise the DHCP server. -#dhcp-option=vendor:Etherboot,60,"Etherboot" -X -# Send options to PXELinux. Note that we need to send the options even -# though they don't appear in the parameter request list, so we need -# to use dhcp-option-force here. -# See http://syslinux.zytor.com/pxe.php#special for details. -# Magic number - needed before anything else is recognised -#dhcp-option-force=208,f1:00:74:7e -# Configuration file name -#dhcp-option-force=209,configs/common -# Path prefix -#dhcp-option-force=210,/tftpboot/pxelinux/files/ -# Reboot time. (Note 'i' to send 32-bit value) -#dhcp-option-force=211,30i -X -# Set the boot filename for BOOTP. You will only need -# this is you want to boot machines over the network and you will need -# a TFTP server; either dnsmasq's built in TFTP server or an -# external one. (See below for how to enable the TFTP server.) -#dhcp-boot=pxelinux.0 -X -# Enable dnsmasq's built-in TFTP server -#enable-tftp -X -# Set the root directory for files availble via FTP. -#tftp-root=/var/ftpd -X -# Make the TFTP server more secure: with this set, only files owned by -# the user dnsmasq is running as will be send over the net. -#tftp-secure -X -# Set the boot file name only when the "red" tag is set. -#dhcp-boot=net:red,pxelinux.red-net -X -# An example of dhcp-boot with an external server: the name and IP -# address of the server are given after the filename. -#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 -X -# Set the limit on DHCP leases, the default is 150 -dhcp-lease-max=2100 -X -# The DHCP server needs somewhere on disk to keep its lease database. -# This defaults to a sane location, but if you want to change it, use -# the line below. -#dhcp-leasefile=/var/lib/misc/dnsmasq.leases -leasefile-ro -X -# Set the DHCP server to authoritative mode. In this mode it will barge in -# and take over the lease for any client which broadcasts on the network, -# whether it has a record of the lease or not. This avoids long timeouts -# when a machine wakes up on a new network. DO NOT enable this if there's -# the slighest chance that you might end up accidentally configuring a DHCP -# server for your campus/company accidentally. The ISC server uses -# the same option, and this URL provides more information: -# http://www.isc.org/index.pl?/sw/dhcp/authoritative.php -#dhcp-authoritative -X -# Run an executable when a DHCP lease is created or destroyed. -# The arguments sent to the script are "add" or "del", -# then the MAC address, the IP address and finally the hostname -# if there is one. -#dhcp-script=/bin/echo -X -# Set the cachesize here. -#cache-size=150 -X -# If you want to disable negative caching, uncomment this. -#no-negcache -X -# Normally responses which come form /etc/hosts and the DHCP lease -# file have Time-To-Live set as zero, which conventionally means -# do not cache further. If you are happy to trade lower load on the -# server for potentially stale date, you can set a time-to-live (in -# seconds) here. -#local-ttl= -X -# If you want dnsmasq to detect attempts by Verisign to send queries -# to unregistered .com and .net hosts to its sitefinder service and -# have dnsmasq instead return the correct NXDOMAIN response, uncomment -# this line. You can add similar lines to do the same for other -# registries which have implemented wildcard A records. -#bogus-nxdomain=64.94.110.11 -X -# If you want to fix up DNS results from upstream servers, use the -# alias option. This only works for IPv4. -# This alias makes a result of 1.2.3.4 appear as 5.6.7.8 -#alias=1.2.3.4,5.6.7.8 -# and this maps 1.2.3.x to 5.6.7.x -#alias=1.2.3.0,5.6.7.0,255.255.255.0 -X -X -# Change these lines if you want dnsmasq to serve MX records. -X -# Return an MX record named "maildomain.com" with target -# servermachine.com and preference 50 -#mx-host=maildomain.com,servermachine.com,50 -X -# Set the default target for MX records created using the localmx option. -#mx-target=servermachine.com -X -# Return an MX record pointing to the mx-target for all local -# machines. -#localmx -X -# Return an MX record pointing to itself for all local machines. -#selfmx -X -# Change the following lines if you want dnsmasq to serve SRV -# records. These are useful if you want to serve ldap requests for -# Active Directory and other windows-originated DNS requests. -# See RFC 2782. -# You may add multiple srv-host lines. -# The fields are ,,,, -# If the domain part if missing from the name (so that is just has the -# service and protocol sections) then the domain given by the domain= -# config option is used. (Note that expand-hosts does not need to be -# set for this to work.) -X -# A SRV record sending LDAP for the example.com domain to -# ldapserver.example.com port 289 -#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389 -X -# A SRV record sending LDAP for the example.com domain to -# ldapserver.example.com port 289 (using domain=) -###domain=example.com -#srv-host=_ldap._tcp,ldapserver.example.com,389 -X -# Two SRV records for LDAP, each with different priorities -#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1 -#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2 -X -# A SRV record indicating that there is no LDAP server for the domain -# example.com -#srv-host=_ldap._tcp.example.com -X -# The following line shows how to make dnsmasq serve an arbitrary PTR -# record. This is useful for DNS-SD. (Note that the -# domain-name expansion done for SRV records _does_not -# occur for PTR records.) -#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services" -X -# Change the following lines to enable dnsmasq to serve TXT records. -# These are used for things like SPF and zeroconf. (Note that the -# domain-name expansion done for SRV records _does_not -# occur for TXT records.) -X -#Example SPF. -#txt-record=example.com,"v=spf1 a -all" -X -#Example zeroconf -#txt-record=_http._tcp.example.com,name=value,paper=A4 -X -X -# For debugging purposes, log each DNS query as it passes through -# dnsmasq. -#log-queries -X -# Log lots of extra information about DHCP transactions. -#log-dhcp -X -log-facility=/var/log/dnsmasq.log -X -# Include a another lot of configuration options. -#conf-file=/etc/dnsmasq.more.conf -conf-dir=/etc/dnsmasq.d -X -dhcp-optsfile=/etc/dhcpopts.txt -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/vpcdnsmasq.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/vpcdnsmasq.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/vpcdnsmasq.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/vpcdnsmasq.conf': 'MD5 check failed' - ) << \SHAR_EOF -0b53d152c88ebce3ee09d8e9c8addd6b cloud_scripts/etc/vpcdnsmasq.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/vpcdnsmasq.conf'` -ne 17942 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/vpcdnsmasq.conf' is not 17942" - fi -fi -# ============= cloud_scripts/etc/ipsec.secrets ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.secrets' -then -${echo} "x - SKIPPING cloud_scripts/etc/ipsec.secrets (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/ipsec.secrets (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.secrets' && -include /var/lib/strongswan/ipsec.conf.inc -include /etc/ipsec.d/ipsec.*.secrets -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.secrets' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/ipsec.secrets' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/ipsec.secrets failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.secrets': 'MD5 check failed' - ) << \SHAR_EOF -7ab0bddd5ec64ebda91cf3c5262fef2d cloud_scripts/etc/ipsec.secrets -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.secrets'` -ne 80 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.secrets' is not 80" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/dnsmasq ============== -if test ! -d 'cloud_scripts/etc/logrotate.d'; then - mkdir 'cloud_scripts/etc/logrotate.d' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/etc/logrotate.d." -else ${echo} "x - failed to create directory cloud_scripts/etc/logrotate.d." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/dnsmasq' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/dnsmasq (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/dnsmasq (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/dnsmasq' && -/var/log/dnsmasq.log { -X maxsize 10M -X missingok -X rotate 5 -X notifempty -X delaycompress -X sharedscripts -X postrotate -X [ ! -f /var/run/dnsmasq/dnsmasq.pid ] || kill -USR2 `cat /var/run/dnsmasq/dnsmasq.pid` -X endscript -X create 0640 dnsmasq root -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/dnsmasq' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/dnsmasq' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/dnsmasq failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/dnsmasq': 'MD5 check failed' - ) << \SHAR_EOF -e42458bd875605d1cd625f0596b38d4c cloud_scripts/etc/logrotate.d/dnsmasq -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/dnsmasq'` -ne 272 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/dnsmasq' is not 272" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/cloud ============== -if test ! -d 'cloud_scripts/etc/logrotate.d'; then - mkdir 'cloud_scripts/etc/logrotate.d' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/etc/logrotate.d." -else ${echo} "x - failed to create directory cloud_scripts/etc/logrotate.d." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/cloud' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/cloud (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/cloud (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/cloud' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -/var/log/cloud.log { -X rotate 10 -X maxsize 10M -X missingok -X notifempty -X compress -X # CLOUDSTACK-9155: We cannot tell the processes that are writing to this -X # file to use the new inode, so instead we copy the original file, truncate -X # it and keep the same inode. -X copytruncate -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/cloud' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/cloud' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/cloud failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/cloud': 'MD5 check failed' - ) << \SHAR_EOF -f83a4d4cf36adb81699ac5892bf6c6f5 cloud_scripts/etc/logrotate.d/cloud -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/cloud'` -ne 1124 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/cloud' is not 1124" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/conntrackd ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/conntrackd' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/conntrackd (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/conntrackd (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/conntrackd' && -/var/log/conntrackd-stats.log { -X maxsize 10M -X rotate 2 -X missingok -X compress -X delaycompress -X -X postrotate -X if [ -e /var/run/conntrackd.sock ]; then -X /usr/sbin/invoke-rc.d conntrackd restart > /dev/null -X fi -X endscript -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/conntrackd' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/conntrackd' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/conntrackd failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/conntrackd': 'MD5 check failed' - ) << \SHAR_EOF -334d9dd543fcb9c8682b4b8fc3987c4c cloud_scripts/etc/logrotate.d/conntrackd -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/conntrackd'` -ne 263 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/conntrackd' is not 263" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/monitor ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/monitor' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/monitor (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/monitor (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/monitor' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -/var/log/monitor.log { -X rotate 5 -X maxsize 10M -X missingok -X notifempty -X compress -X copytruncate -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/monitor' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/monitor' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/monitor failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/monitor': 'MD5 check failed' - ) << \SHAR_EOF -dbf4af64f49d5ffbf4a725cca714ccd0 cloud_scripts/etc/logrotate.d/monitor -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/monitor'` -ne 922 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/monitor' is not 922" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/routerServiceMonitor ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/routerServiceMonitor (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/routerServiceMonitor (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -/var/log/routerServiceMonitor.log { -X rotate 5 -X maxsize 10M -X missingok -X notifempty -X compress -X copytruncate -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/routerServiceMonitor failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/routerServiceMonitor': 'MD5 check failed' - ) << \SHAR_EOF -0f7968ad2bdbb870fa6a7f55565003c1 cloud_scripts/etc/logrotate.d/routerServiceMonitor -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/routerServiceMonitor'` -ne 935 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' is not 935" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/ppp ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/ppp' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/ppp (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/ppp (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/ppp' && -/var/log/ppp-connect-errors { -X maxsize 10M -X rotate 5 -X missingok -X notifempty -X compress -X nocreate -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/ppp' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/ppp' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/ppp failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/ppp': 'MD5 check failed' - ) << \SHAR_EOF -7d16a52cb372773845f812e51f52318f cloud_scripts/etc/logrotate.d/ppp -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/ppp'` -ne 98 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/ppp' is not 98" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/apache2 ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/apache2' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/apache2 (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/apache2 (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/apache2' && -/var/log/apache2/*.log { -X missingok -X copytruncate -X rotate 3 -X compress -X dateext -X maxsize 10M -X notifempty -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/apache2' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/apache2' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/apache2 failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/apache2': 'MD5 check failed' - ) << \SHAR_EOF -eefd54e0be665bd8a76a7aebee89d6d5 cloud_scripts/etc/logrotate.d/apache2 -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/apache2'` -ne 148 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/apache2' is not 148" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/rsyslog ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/rsyslog' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/rsyslog (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/rsyslog (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/rsyslog' && -/var/log/syslog -{ -X rotate 7 -X maxsize 10M -X missingok -X notifempty -X compress -X postrotate -X /usr/sbin/invoke-rc.d rsyslog rotate > /dev/null -X endscript -} -X -/var/log/mail.info -/var/log/mail.warn -/var/log/mail.err -/var/log/mail.log -/var/log/daemon.log -/var/log/kern.log -/var/log/auth.log -/var/log/user.log -/var/log/lpr.log -/var/log/cron.log -/var/log/debug -/var/log/messages -{ -X rotate 10 -X maxsize 10M -X missingok -X notifempty -X compress -X sharedscripts -X postrotate -X /usr/sbin/invoke-rc.d rsyslog rotate > /dev/null -X endscript -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/rsyslog' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/rsyslog' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/rsyslog failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/rsyslog': 'MD5 check failed' - ) << \SHAR_EOF -b4409ff800ad8ac42c79f412d6b90094 cloud_scripts/etc/logrotate.d/rsyslog -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/rsyslog'` -ne 517 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/rsyslog' is not 517" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/haproxy ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/haproxy' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/haproxy (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/haproxy (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/haproxy' && -/var/log/haproxy.log { -X rotate 5 -X missingok -X notifempty -X maxsize 10M -X postrotate -X /bin/kill -HUP `cat /var/run/rsyslog.pid 2> /dev/null` 2> /dev/null || true -X endscript -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/haproxy' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/haproxy' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/haproxy failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/haproxy': 'MD5 check failed' - ) << \SHAR_EOF -e584fdf0d2a25578f651fccce265ff09 cloud_scripts/etc/logrotate.d/haproxy -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/haproxy'` -ne 194 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/haproxy' is not 194" - fi -fi -# ============= cloud_scripts/etc/profile.d/cloud.sh ============== -if test ! -d 'cloud_scripts/etc/profile.d'; then - mkdir 'cloud_scripts/etc/profile.d' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/etc/profile.d." -else ${echo} "x - failed to create directory cloud_scripts/etc/profile.d." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/profile.d/cloud.sh' -then -${echo} "x - SKIPPING cloud_scripts/etc/profile.d/cloud.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/profile.d/cloud.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/profile.d/cloud.sh' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -if [ "`id -u`" -eq 0 ]; then -X PATH=${PATH}:/opt/cloud/bin -fi -export PATH -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/profile.d/cloud.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/profile.d/cloud.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/profile.d/cloud.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/profile.d/cloud.sh': 'MD5 check failed' - ) << \SHAR_EOF -78e5d1f4d852b0af96f8b2efa5245c86 cloud_scripts/etc/profile.d/cloud.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/profile.d/cloud.sh'` -ne 861 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/profile.d/cloud.sh' is not 861" - fi -fi -# ============= cloud_scripts/etc/cloud-nic.rules ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cloud-nic.rules' -then -${echo} "x - SKIPPING cloud_scripts/etc/cloud-nic.rules (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/cloud-nic.rules (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cloud-nic.rules' && -SUBSYSTEM=="net" KERNEL=="eth*" RUN+="/opt/cloud/bin/cloud-nic.sh $env{ACTION} %k" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cloud-nic.rules' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/cloud-nic.rules' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/cloud-nic.rules failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cloud-nic.rules': 'MD5 check failed' - ) << \SHAR_EOF -4ffd506afaa6a69a55ba9ab6bbf706f5 cloud_scripts/etc/cloud-nic.rules -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/cloud-nic.rules'` -ne 83 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/cloud-nic.rules' is not 83" - fi -fi -# ============= cloud_scripts/etc/haproxy/haproxy.cfg ============== -if test ! -d 'cloud_scripts/etc/haproxy'; then - mkdir 'cloud_scripts/etc/haproxy' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/etc/haproxy." -else ${echo} "x - failed to create directory cloud_scripts/etc/haproxy." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/haproxy/haproxy.cfg' -then -${echo} "x - SKIPPING cloud_scripts/etc/haproxy/haproxy.cfg (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/haproxy/haproxy.cfg (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/haproxy/haproxy.cfg' && -global -X log 127.0.0.1:3914 local0 info -X chroot /var/lib/haproxy -X user haproxy -X group haproxy -X daemon -X -defaults -X log global -X mode tcp -X option dontlognull -X retries 3 -X option redispatch -X option forwardfor -X stats enable -X stats uri /admin?stats -X stats realm Haproxy\ Statistics -X stats auth admin1:AdMiN123 -X option forceclose -X timeout connect 5000 -X timeout client 50000 -X timeout server 50000 -X -X -listen cloud-default -X bind 0.0.0.0:35999 -X option transparent -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/haproxy/haproxy.cfg' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/haproxy/haproxy.cfg' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/haproxy/haproxy.cfg failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/haproxy/haproxy.cfg': 'MD5 check failed' - ) << \SHAR_EOF -a554fcecbaff9747723f9cd3aedf1ffd cloud_scripts/etc/haproxy/haproxy.cfg -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/haproxy/haproxy.cfg'` -ne 483 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/haproxy/haproxy.cfg' is not 483" - fi -fi -# ============= cloud_scripts/usr/share/cloud/cloud-scripts.tar ============== -if test ! -d 'cloud_scripts/usr'; then - mkdir 'cloud_scripts/usr' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/usr." -else ${echo} "x - failed to create directory cloud_scripts/usr." - exit 1 -fi -fi -if test ! -d 'cloud_scripts/usr/share'; then - mkdir 'cloud_scripts/usr/share' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/usr/share." -else ${echo} "x - failed to create directory cloud_scripts/usr/share." - exit 1 -fi -fi -if test ! -d 'cloud_scripts/usr/share/cloud'; then - mkdir 'cloud_scripts/usr/share/cloud' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/usr/share/cloud." -else ${echo} "x - failed to create directory cloud_scripts/usr/share/cloud." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/usr/share/cloud/cloud-scripts.tar' -then -${echo} "x - SKIPPING cloud_scripts/usr/share/cloud/cloud-scripts.tar (file already exists)" - -else -${echo} "x - extracting cloud_scripts/usr/share/cloud/cloud-scripts.tar (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/usr/share/cloud/cloud-scripts.tar -M971C+P`````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````#`P,#`W-34`,#`P,37-T96U-87A& -M:6QE4VEZ93TQ,$T*4G5N=&EM94UA>%5S93TR,$T*```````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````971C+W-Y7-T -M96TO:'EP97)V+61A96UO;G,N:'8M=G-S+61A96UO;BYS97)V:6-E```````` -M````````````````````````````````````````````````````,#`P,#8T -M-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,S0`,3,V,C4Q-3`S,30`,#(S -M,37!E2!S97)V:6-E("A64U,I(&1A96UO;@H*6U-E&5C4W1A3UM=6QT:2UU7-T96UD+W-Y2UC;VYF -M:63TO=7-R+VQO8V%L+V-L;W5D+W-Y7-T96TO;W!E;BUV;2UT;V]L3UM=6QT:2UU3UM=6QT:2UU7-T96UD+W-Y&5N+FUO=6YT"D)E9F]R93UN971W;W)K+G1A2UC;VYF:6&5C4W1A&5C4W1A3UM=6QT:2UU7-T96TO:'EP97)V+61A96UO;G,N:'8M -M9F-O<'DM9&%E;6]N+G-E7!E2!S97)V:6-E("A&0T]062D@9&%E;6]N"D-O -M;F1I=&EO;E!A=&A%>&ES=',]+V1E=B]V;6)U0H*6U-E3UM=6QT:2UU7-T96TO8VQO=60M -M<&]S=&EN:70N2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N0`````````````````````````````````````````````` -M`````````````````````````````````````````#`P,#`V-#0`,#`P,36]U(&UA>2!N;W0@=7-E -M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI -M8V5N7!E(#$S("UJ($123U`*+4$@24Y0550@+7`@:6-M<"`M:B!!0T-%4%0* -M+4$@24Y0550@+6D@971H,2`M<"!T8W`@+6T@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* -M(R`@(&AT='`Z+R]W=W7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E -M<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H -M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N -M2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H -M92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R -M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T -M"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7-C=&P@8V]N9FEG=7)A -M=&EO;B!F:6QE"B,*(R!&;W(@8FEN87)Y('9A;'5E7-C=&PN -M8V]N9B@U*2!F;W(@;6]R92!D971A:6QS+@HC($!615)324].0`H*(R!#;VYT -M2!T:&5R -M96)Y(')E9'5C:6YG('1H92!S:7IE(&]F(&1I&PR='!D+WAL -M,G1P9"YC;VYF```````````````````````````````````````````````` -M````````````````````````````````````````````````````````,#`P -M,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,3,`,3,U-C$W,C4Q-3(` -M,#$T-#4U`"`P```````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````'5S=&%R("``9&%R65S"G!P<&]P=&9I;&4@/2`@("`O971C+W!P<"]O<'1I;VYS -M+GAL,G1P9`H````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````971C+V1N2!D:7-A8FQE -MF5N+"!S:6YC92!T:&5Y"B,@=&5L;"!D -M;G-M87-Q('1O(&9I;'1E2X@268@>6]U(&AA=F4@82!D:6%L+6]N+61E;6%N9"!L:6YK('1H97D@ -M86QS;R!S=&]P"B,@=&AE6]U('=A;G0@9&YS('1O(&=E="!I=',@=7!S=')E86T@2`@(&%P<&5A2!O=&AE<@HC(&9I -M;&4L(&=E='1I;F<@:71S('-E2!O;@HC('-P96-I9FEE9"!I;G1E -M&-E<'0M:6YT97)F86-E/65T:#$*97AC97!T+6EN -M=&5R9F%C93UE=&@R"F5X8V5P="UI;G1E6]U('=A;G0@9&YS;6%S<2!T;R!P6]U"B,@=V%N="!D;G-M -M87-Q('1O(')E86QL>2!B:6YD(&]N;'D@=&AE(&EN=&5R9F%C97,@:70@:7,@ -M;&ES=&5N:6YG(&]N+`HC('5N8V]M;65N="!T:&ES(&]P=&EO;BX@06)O=70@ -M=&AE(&]N;'D@=&EM92!Y;W4@;6%Y(&YE960@=&AI6]U('=A;G0@=&\@ -M:&%V92!A(&1O;6%I;@HC(&%U=&]M871I8V%L;'D@861D960@=&\@2!Q=6%L:69I -M960@9&]M86EN(&YA;65S+"!A7-T96US(&-O;F9I9W5R960@8GD@ -M1$A#4`HC(#,I(%!R;W9I9&5S('1H92!D;VUA:6X@<&%R="!F;W(@(F5X<&%N -M9"UH;W-T7,N;W)G+G5K+#$Y,BXQ-C@N,BXP -M+S(T"@HC(%-A;64@:61E82P@8G5T(')A;F=E(')A=&AE7,N;W)G+G5K+#$Y,BXV."XS -M+C$P,"PQ.3(N,38X+C,N,C`P"@HC(%5N8V]M;65N="!T:&ES('1O(&5N86)L -M92!T:&4@:6YT96=R871E9"!$2$-0('-E6]U(&YE960*(R!T;R!S -M=7!P;'D@=&AE(')A;F=E(&]F(&%D9')E2!$2$-0"B,@2!B92!S970@;VYL>2!F;W(@=&AI2!W:&5N('1H92!T86<@(F=R965N -M(B!I2!A('-U8FYE="!W:&EC:"!C -M86XG="!B92!U6YA;6EC(&%D9')E2!A;F0*(R!A9&0@;F%M97,@=&\@=&AE($1.4R!F;W(@=&AE($E0 -M=C8@861D2P@-#AH"@HC($1O($1(0U`@86YD(%)O=71E2!W:6QL('5S -M92!33$%!0R!F;W(@861D2!R82US=&%T96QE2!J -M=7-T"B,@;F5E9"!T;R!B92!O;B!T:&4@7,@9VEV92!T:&4@:&]S="!W:71H($5T -M:&5R;F5T(&%D9')E7,@9VEV92!T:&4@:&]S="!W -M:71H(&-L:65N="!I9&5N=&EF:65R(#`Q.C`R.C`R.C`T"B,@=&AE($E0(&%D -M9')E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ -M(G)E9"(@=&\*(R!T:&4@;6%C:&EN92!W:71H($5T:&5R;F5T(&%D9')E&5D($E0=C8@861D2!;72!A2X*(V1H8W`M:&]S=#UI9#HP,#HP,3HP -M,#HP,3HQ-CID,CHX,SIF8SHY,CID-#HQ.3IE,CID.#IB,BP@9G)E9"P@6S$R -M,S0Z.C5="@HC($EG;F]R92!A;GD@8VQI96YT2!M86-H:6YE('=H;W-E"B,@1$A#4"!V96YD;W)C;&%S -M'1R82!O<'1I -M;VYS('=H:6-H(&%R92!T86=G960@87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@ -M;VYE"B,@;V8@=VAO'1R82!O<'1I;VYS('=H:6-H(&%R -M92!T86=G960@87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO2!D;G-M -M87-Q(&%N9"!S96YD(&YO(&1E9F%U;'0*(R!R;W5T92!A="!A;&PN($YO=&4@ -M=&AA="!T:&ES(&]N;'D@=V]R:W,@9F]R('1H92!O<'1I;VYS('-E;G0@8GD* -M(R!D969A=6QT("@Q+"`S+"`V+"`Q,BP@,C@I('1H92!S86UE(&QI;F4@=VEL -M;"!S96YD(&$@>F5R;RUL96YG=&@@;W!T:6]N"B,@9F]R(&%L;"!O=&AE0H*(R!3970@=&AE(&1E9F%U;'0@=&EM92UT;RUL:79E -M('1O(#4P"B-D:&-P+6]P=&EO;CTR,RPU,`H*(R!3970@=&AE(")A;&P@2!A;B!O<'1I;VX@=VAI8V@@=VEL;"!O;FQY -M(&)E('-E;G0@=&\@=&AE(")R960B(&YE='=O2!A6]U -M(&UA>2!W86YT('1O('5N8V]M;65N="!S;VUE(&]R(&%L;"!O9B!T:&5M(&EF -M('EO=2!U7!E"@HC(%-E;F0@86X@96UP='D@5U!! -M1"!O<'1I;VXN(%1H:7,@;6%Y(&)E(%)%455)4D5$('1O(&=E="!W:6YD;W=S -M(#<@=&\@8F5H879E+@HC9&AC<"UO<'1I;VX],C4R+")<;B(*"B,@4V5N9"!2 -M1D,M,S,Y-R!$3E,@9&]M86EN('-E87)C:"!$2$-0(&]P=&EO;BX@5T%23DE. -M1SH@66]U71H:6YG(&5L&4@=&%G(&9O2YK<'AE"B-D:&-P+6)O;W0];7EB;V]T:6UA9V4*"B,@16YC87!S -M=6QA=&5D(&]P=&EO;G,@9F]R($5T:&5R8F]O="!G4%A%+B!!;&P@=&AE(&]P -M=&EO;G,@87)E"B,@96YC87!S=6QA=&5D('=I=&AI;B!O<'1I;VX@,32!C;V1E"B-D:&-P+6]P=&EO;CUE;F-A<#HQ-S4L(#$W-BP@,6(@("`@("`@ -M(R!N;RUP61H8W`*(V1H8W`M;W!T:6]N/65N8V%P.C$W-2P@,3#@V+3,R"B-D:&-P+6UA=&-H/6ET86YI8W,L(&]P=&EO;CIC;&EE;G0M87)C -M:"P@,B`C24$V-`HC9&AC<"UM871C:#UH86UM97)S+"!O<'1I;VXZ8VQI96YT -M+6%R8V@L(#8@(W@X-BTV-`HC9&AC<"UM871C:#UM86-T96QS+"!O<'1I;VXZ -M8VQI96YT+6%R8V@L(#<@(T5&22!X.#8M-C0*"B,@1&\@&4M<')O;7!T/2)0#@V4$,L("));G-T86QL($QI;G5X(BP@<'AE;&EN=7@*"B,@3&]A -M9',@/'1F='`M#@V4$,L("));G-T86QL($QI;G5X(BP@<'AE;&EN -M=7@L(#$N,BXS+C0*"B,@57-E(&)O;W1S97)V97(@;VX@;F5T=V]R:RP@9F]U -M;F0@;7D@;75L=&EC87-T(&]R(&)R;V%D8V%S="X*(W!X92US97)V:6-E/7@X -M-E!#+"`B26YS=&%L;"!W:6YD;W=S(&9R;VT@4DE3('-E#@V4$,L("));G-T86QL('=I;F1O=W,@9G)O;2!225,@2!F:6QE0HC('1H92!U&%M<&QE(&]F(&1H8W`M8F]O="!W:71H(&%N(&5X=&5R;F%L(%1& -M5%`@2`M+7!X92US97)V -M:6-E+@HC9&AC<"UB;V]T/2]V87(O9G1P9"]P>&5L:6YU>"XP+&)O;W1H;W-T -M+#$Y,BXQ-C@N,"XS"@HC($EF('1H97)E(&%R92!M=6QT:7!L92!E>'1E#TR,3`P"@HC(%1H92!$2$-0('-E6]U(&UI9VAT(&5N9"!U<"!A8V-I9&5N=&%L -M;'D@8V]N9FEG=7)I;F<@82!$2$-0"B,@2X@5&AE($E30R!S97)V97(@=7-E&5C=71A8FQE -M('=H96X@82!$2$-0(&QE87-E(&ES(&-R96%T960@;W(@9&5S=')O>65D+@HC -M(%1H92!A`HC86QI87,],2XR+C,N -M,"PU+C8N-RXP+#(U-2XR-34N,C4U+C`*(R!A;F0@=&AI"UT87)G970@9F]R(&%L;"!L;V-A;`HC(&UA8VAI;F5S+@HC;&]C86QM>`H* -M(R!2971U6]U('=A;G0@=&\@ -M3XL/'=E:6=H=#X*(R!)9B!T:&4@9&]M86EN('!A&%M<&QE+F-O;2!D;VUA:6X@=&\* -M(R!L9&%P&%M -M<&QE+F-O;2!D;VUA:6X@=&\*(R!L9&%P&%M<&QE+F-O;2PS -M.#DL,@H*(R!!(%-25B!R96-O'!A;G-I;VX@ -M9&]N92!F;W(@4U)6(')E8V]R9',@7V1O97-?;F]T"B,@;V-C=7(@9F]R(%!4 -M4B!R96-O'!A;G-I;VX@9&]N92!F;W(@4U)6 -M(')E8V]R9',@7V1O97-?;F]T"B,@;V-C=7(@9F]R(%185"!R96-O&%M<&QE(%-01BX*(W1X="UR96-O5\@=V]R:W,*(R!F;W(@=&%R9V5T3TO=F%R -M+VQO9R]D;G-M87-Q+FQO9PH*(R!);F-L=61E(&$@86YO=&AE'0*```````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````````971C+V-R;VXN9&%I -M;'DO```````````````````````````````````````````````````````` -M`````````````````````````````````````````````````````````#`P -M,#`W-34`,#`P,32]C;&5A2!C86-H92!T;R!U;'1I;6%T96QY(')E9'5C92!S=V%P<&EN9PH*7,O=FTO9')O<%]C86-H97,*```````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````````````````971C+W9M -M=V%R92UT;V]LF4@:V5P=#H@,2!-0@IV;7-V8RYM -M87A,;V=3:7IE(#T@,0H*(R!$969I;F5S('1H92`B=FUT;V]L"!S:7IE(#4P30IS:7IE(#4P30IC;VUP0HC3&ES=&5N061D7,@9F]R('!R;W1O8V]L('9E2`O971C+W-S:"]SF4@;V8@97!H -M96UE7-L;V=& -M86-I;&ET>2!!551("E-Y65S"D%U=&AO7,@:6X@+V5T8R]S65S(&EF('EO=2!D;VXG="!T'0@<&%S65S"D=34T%024-L96%N=7!#65S"@HC($%C8V5P="!L;V-A;&4M4]F9G-E="`Q,`HC6#$Q57-E3&]C86QH;W-T -M('EE65S"B-5&PR='!D```````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````,#`P,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,34`,3,U -M-C$W,C4Q-3(`,#$T-C`W`"`P```````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````'5S=&%R("``9&%R6]U('=A;G0@=&\@=7-E(&$@9&EF9F5R -M96YT(&EN=&5R9F%C92!O6]U(&EN2!F2!)4"!A9&1R97-S+`H@("`@("`@(",@>6]U(&-A;B!U7-L;V'-O8VL@(R!P7-T96T@;&]G9VEN9PHD36]D3&]A9"!I;6ML;V<@ -M("`C('!R;W9I9&5S(&ME2!R:VQO9V0I"B,D36]D3&]A9"!I;6UA7-L;V<@7-T96TN("!3<&QI="!I="!U<"!S;R!T:&%T"B,@:70@:7,@96%S>2!T -M;R!W2YL;V<* -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````````````````&5T8R]M;V1P -M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@ -M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2!C86-H92!T -M;R!U;'1I;6%T96QY(')E9'5C92!S=V%P<&EN9PH*<&AY;65M/20H9G)E97QA -M=VL@)R]>365M.B][<')I;G0@)#)])RD*:68@6R`D<&AY;65M("UL="`U,3,P -M,#`@73L@=&AE;@H@('-Y;F,@)B8@96-H;R`Q(#X@+W!R;V,O2YC;VYF```````````````````````````````````````````````` -M```````````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P -M,3$-O;FYE8W1I -M;VYS4&5R0VAI;&0@("`),3`P,`H\+TEF36]D=6QE/@H*(R!V:6TZ('-Y;G1A -M>#UA<&%C:&4@=',]-"!S=STT('-T6U,:6YK&5S($9O;&QO=U-Y;4QI;FMS($UU;'1I5FEE=W,*"0E!;&QO=T]V97)R:61E -M($%L;`H)"4]R9&5R(&%L;&]W+&1E;GD*"0EA;&QO=R!F&5C0T=)("U-=6QT:59I97=S -M("M3>6U,:6YK2QA;&QO=PH@("`@("`@($1E;GD@9G)O -M;2!A;&P*("`@("`@("!!;&QO=R!F3X*"3Q$:7)E8W1O0H)"6%L;&]W(&9R;VT@86QL"@D\+T1I3X*"@E38W)I -M<'1!;&EA0H)"4%L;&]W(&9R;VT@86QL"@D\ -M+T1I3X*"@E%T%004-(15],3T=?1$E2?2]ET%004-(15],3T=?1$E2 -M?2]S2QA;&QO=PH)"41E;GD@ -M9G)O;2!A;&P*"0E!;&QO=R!F2!T -M:&4*"2,@("!34TQ#97)T:69I8V%T949I;&4@9&ER96-T:79E(&ES(&YE961E -M9"X*"5-33$-E0H*"2,@("!397)V -M97(@0V5R=&EF:6-A=&4@0VAA:6XZ"@DC("`@4&]I;G0@4U-,0V5R=&EF:6-A -M=&5#:&%I;D9I;&4@870@82!F:6QE(&-O;G1A:6YI;F<@=&AE"@DC("`@8V]N -M8V%T96YA=&EO;B!O9B!014T@96YC;V1E9"!#02!C97)T:69I8V%T97,@=VAI -M8V@@9F]R;2!T:&4*"2,@("!C97)T:69I8V%T92!C:&%I;B!F;W(@=&AE('-E -M0H)(R`@('1H92!R969E -M2`H0T$I.@H)(R`@(%-E="!T:&4@0T$@8V5R=&EF:6-A -M=&4@=F5R:69I8V%T:6]N('!A=&@@=VAE6]U(&YE960@:&%S:"!S>6UL -M:6YK6UL:6YK7!E*3H* -M"2,@("!#;&EE;G0@8V5R=&EF:6-A=&4@=F5R:69I8V%T:6]N('1Y<&4@86YD -M(&1E<'1H+B`@5'EP97,@87)E"@DC("`@;F]N92P@;W!T:6]N86PL(')E<75I -M2!T;R!V97)I9GD@=&AE(&-E -M4-L:65N -M="!R97%U:7)E"@DC4U-,5F5R:69Y1&5P=&@@(#$P"@H)(R`@($%C8V5S6YT87@@:7,@80H)(R`@(&UI>'1UU-33%]#25!(15)]("%^(&TO7BA%6%!\3E5,3"DO(%P* -M"2,@("`@("`@("`@("!A;F0@)7M34TQ?0TQ)14Y47U-?1$Y?3WT@97$@(E-N -M86ME($]I;"P@3'1D+B(@7`H)(R`@("`@("`@("`@(&%N9"`E>U-33%]#3$E% -M3E1?4U]$3E]/57T@:6X@>R)3=&%F9B(L(")#02(L(")$978B?2!<"@DC("`@ -M("`@("`@("`@86YD("5[5$E-15]71$%9?2`^/2`Q(&%N9"`E>U1)345?5T1! -M67T@/#T@-2!<"@DC("`@("`@("`@("`@86YD("5[5$E-15](3U52?2`^/2`X -M(&%N9"`E>U1)345?2$]54GT@/#T@,C`@("`@("`@*2!<"@DC("`@("`@("`@ -M("!OU)%34]415]!1$12?2`]?B!M+UXQ.3)<+C2!E>&ES=&EN9R!W:&5N(&-L -M:65N=`H)(R`@("`@875T:&5N=&EC871I;VX@:7,@=7-E9"DN(%1H:7,@8V%N -M(&)E('5S960@=&\@:6UP;W)T('1H92!C97)T:69I8V%T97,*"2,@("`@(&EN -M=&\@0T=)('-C'!O'!E;G-I=F4@;W!E2!E;F%B;&5S('1H90H)(R`@("`@97AP;W)T871I;VX@9F]R -M($-'22!A;F0@4U-)(')E<75E'!O2`O=7-R+VQI8B]C9VDM8FEN/@H)"5-33$]P=&EO;G,@*U-T -M9$5N=E9A6]U(&-A;B!U6]U(')E8V5I=F4@ -M22]/(&5R2!A;&5R="!I2!F;W(@8G)O=W-E6]U(&MN;W<@=&AA="!T:&5I2X*"2,@("!. -M;W1I8V4Z($UO2!W86YT('1O(&1I2P@;VYE(&AA6]U(&IU2!A;'-O"B,@:&%V92!T;R!C -M:&%N9V4@=&AE(%9I6]U(&AA=F4@=7!GB!A;F0*(R!214%$ -M344N1&5B:6%N+F=Z"@I,:7-T96X@,3`N,2XQ+C$Z.#$X,`H*/$EF36]D=6QE -M(&UO9%]S0HC('1E;&P@ -M9&YS;6%S<2!T;R!F:6QT97(@;W5T('%U97)I97,@=VAI8V@@=&AE('!U8FQI -M8R!$3E,@8V%N;F]T"B,@86YS=V5R+"!A;F0@=VAI8V@@;&]A9"!T:&4@2!T:&4@2X*"B,@3F5V97(@9F]R=V%R9"!P;&%I -M;B!N86UE2X*(R!.;W1E('1H870@*&%M;VYG2!O9B!T:&4@=7!S=')E86T*(R!S97)V97)S(&ET(&MN -M;W=S(&%B;W5T(&%N9"!T2!E86-H('%U97)Y"B,@=VET:"`@96%C:"`@2`@:6X@('1H92`@;W)D97(@('1H97D@("!A<'!E87(@ -M("!I;@HC("]E=&,O2!A&%M<&QE(&]F(')O=71I;F<@4%12('%U97)I97,@=&\@ -M;F%M97-E2!D;VUA:6YS(&AE6]U('=A;G0@=&\@9F]R8V4@=&\@86X@ -M25`@861D&%M<&QE(&)E;&]W('-E;F0@86YY -M(&AO6]U('=A;G0@ -M9&YS;6%S<2!T;R!L:7-T96X@9F]R($1(0U`@86YD($1.4R!R97%U97-T&-E<'0M -M:6YT97)F86-E/6QO"@HC($]R('=H:6-H('1O(&QI2!A9&1R -M97-S("AR96UE;6)E2!$3E,@7-T96US('=H:6-H -M('-U<'!O6]U(&UA>2!N965D('1H:7,@:7,@=VAE;@HC(')U;FYI;F<@ -M86YO=&AE6]U(&1O;B=T('=A;G0@9&YS;6%S<2!T;R!R -M96%D("]E=&,O:&]S=',L('5N8V]M;65N="!T:&4*(R!F;VQL;W=I;F<@;&EN -M92X*(VYO+6AO6]U('=A;G0@:70@=&\@2!P;W1E;G1I86QL>2!S971T:6YG('1H90HC -M("`@(&1O;6%I;B!O9B!A;&P@'!A;F0M:&]S -M=',B"B-D;VUA:6X],BYV;6]P0HC(&$@;&5A6]U(&AA=F4@;6]R92!T:&%N(&]N92!N971W;W)K+"!Y;W4@ -M=VEL;"!N965D('1O"B,@2!P87)A;65T97)S(&9O&%M<&QE -M7,@7,@:70G -M2!T -M:&4@;6%C:&EN92!W:71H(&5T:&5R;F5T"B,@861D'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ -M(G)E9"(@=&\*(R!A;GD@;6%C:&EN92!W:71H(&5T:&5R;F5T(&%D9')E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ -M(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO"(*(V1H8W`M -M=F5N9&]R8VQA2!M86-H:6YE(&]N90HC -M(&]F('=H;W-E($1(0U`@=7-E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@ -M87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO2!N86UE.@HC(')U;B`B9&YS;6%S<2`M+6AE;'`@9&AC<"(@=&\@9V5T -M(&$@;&ES="X*(R!.;W1E('1H870@86QL('1H92!C;VUM;VX@2!D;G-M87-Q+B!9;W4@=F5R>2!L:6ME;'D@=VEL;"!N;W0@ -M;F5E9`HC(&%N>2!D:&-P+6]P=&EO;G,N($EF('EO=2!U2!A2!W;W)K0HC(&1E9F%U;'0@*#$L -M(#,L(#8L(#$R+"`R."D@=&AE('-A;64@;&EN92!W:6QL('-E;F0@82!Z97)O -M+6QE;F=T:"!O<'1I;VX*(R!F;W(@86QL(&]T:&5R(&]P=&EO;B!N=6UB97)S -M+@HC9&AC<"UO<'1I;VX],PH*(R!3970@=&AE($Y44"!T:6UE('-E0H*(R!3970@=&AE(&1E -M9F%U;'0@=&EM92UT;RUL:79E('1O(#4P"B-D:&-P+6]P=&EO;CTR,RPU,`H* -M(R!3970@=&AE(")A;&P@2!A;B!O<'1I -M;VX@=VAI8V@@=VEL;"!O;FQY(&)E('-E;G0@=&\@=&AE(")R960B(&YE='=O -M2!A6]U(&UA>2!W86YT('1O('5N8V]M;65N="!T:&5M -M(&EF('EO=2!U2!N971B:6]S('-C;W!E+@H*(R!396YD(%)&0RTS -M,SDW($1.4R!D;VUA:6X@2!W:&5N('1H92!C;&EE;G0@71E(&EN=&5G97(@+2!T:&%T)W,@=VAA="!M:6-R;W-O9G0@=V%N -M=',N(%-E90HC(&AT='`Z+R]T96-H;F5T,BYM:6-R;W-O9G0N8V]M+U=I;F1O -M=W-397)V97(O96XO;&EB2]A-S!F,6)B-RUD,F0T+30Y9C`M.39D-BTT -M8C2!S;VUE(&-O;F9I9W5R871I;VYS(&]F"B,@ -M171H97)B;V]T('1O(&%L;&]W(&ES('1O(')E8V]G;FES92!T:&4@1$A#4"!S -M97)V97(N"B-D:&-P+6]P=&EO;CUV96YD;W(Z171H97)B;V]T+#8P+")%=&AE -M"X@3F]T92!T:&%T -M('=E(&YE960@=&\@2!N965D"B,@=&AI2!F:6QE0HC('1H92!U&5L:6YU>"YR -M960M;F5T"@HC($%N(&5X86UP;&4@;V8@9&AC<"UB;V]T('=I=&@@86X@97AT -M97)N86P@2!C;&EE -M;G0@=VAI8V@@8G)O861C87-T6]U(&UI9VAT(&5N9"!U -M<"!A8V-I9&5N=&%L;'D@8V]N9FEG=7)I;F<@82!$2$-0"B,@2X@5&AE($E30R!S -M97)V97(@=7-E2!T:&4@:&]S=&YA;64*(R!I9B!T:&5R92!IF4@:&5R92X*(V-A8VAE -M+7-I>F4],34P"@HC($EF('EO=2!W86YT('1O(&1I2!R97-P;VYS97,@=VAI8V@@8V]M92!F;W)M("]E=&,O:&]S=',@86YD -M('1H92!$2$-0(&QE87-E"B,@9FEL92!H879E(%1I;64M5&\M3&EV92!S970@ -M87,@>F5R;RP@=VAI8V@@8V]N=F5N=&EO;F%L;'D@;65A;G,*(R!D;R!N;W0@ -M8V%C:&4@9G5R=&AE6]U(&%R92!H87!P>2!T;R!T6]U(&-A;B!S970@82!T:6UE+71O+6QI=F4@*&EN"B,@6]U('=A;G0@9&YS;6%S<2!T -M;R!D971E8W0@871T96UP=',@8GD@5F5R:7-I9VX@=&\@"!U<"!$ -M3E,@2!W;W)K"!T;R`U+C8N-RYX"B-A;&EA"UT87)G970@9F]R(&%L;"!L;V-A;`HC(&UA8VAI;F5S+@HC;&]C86QM>`H* -M(R!2971U6]U('=A;G0@=&\@ -M3XL/'=E:6=H=#X*(R!)9B!T:&4@9&]M86EN('!A&%M<&QE+F-O;2!D;VUA:6X@=&\* -M(R!L9&%P&%M -M<&QE+F-O;2!D;VUA:6X@=&\*(R!L9&%P&%M<&QE+F-O;2PS -M.#D*"B,@5'=O(%-25B!R96-O&%M<&QE+F-O;2PS.#DL,0HC&%M<&QE+F-O;2QL9&%P&%M<&QE+F-O -M;0HC&%M<&QE+F-O;0H*(R!4:&4@9F]L -M;&]W:6YG(&QI;F4@65E(%!A9V4N7VAT='`N7W1C<"YD;G,M'0M3TO=F%R+VQO9R]D -M;G-M87-Q+FQO9PH*(R!);F-L=61E(&$@86YO=&AE'0*```````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````&5T8R]I<'-E8RYS96-R971S```````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P,3PH@("`@;6%X2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P -M.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N -M71R=6YC871E"GT*```````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````````&5T8R]L;V=R;W1A=&4N -M9"]C;VYN=')A8VMD```````````````````````````````````````````` -M```````````````````````````````````````````````````````P,#`P -M-C0T`#`P,#$W-3``,#`P,3PH@("`@;6%X6-O;7!R97-S"@H@("`@<&]S=')O=&%T90H@("`@("`@(&EF -M(%L@+64@+W9A2!O9B!T:&4@3&EC96YS92!A -M=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O -M'!R97-S(&]R(&EM<&QI960N("!3 -M964@=&AE($QI8V5NPH@("`@("`@(')O -M=&%T92`U"B`@("`@("`@;6%X2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N'-I>F4@,3!- -M"B`@("`@("`@;6ES0H@("`@("`@ -M(&-O;7!R97-S"B`@("`@("`@8V]P>71R=6YC871E"GT*```````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````!E=&,O;&]G0H)8V]M<')E71R=6YC871E"B`@("`@("!R;W1A=&4@,PH@("`@("`@8V]M<')E'0*("`@("`@(&UA>'-I>F4@,3!-"B`@("`@("!N;W1I9F5M -M<'1Y"GT*```````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````&5T8R]L;V=R;W1A=&4N9"]R0H)8V]M<')E -M2YL;V<@>PH@("`@0H@("`@;6%X7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ -M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E -M(&%T"B,*(R`@(&AT='`Z+R]W=W2\````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````,#`P,#'DN8V9G```````````````````````````````````````````` -M```````````````````````````````````````````````````````````P -M,#`P-C0T`#`P,#$W-3``,#`P,3'D*"75S97(@:&%P0H)9W)O -M=7`@:&%P0H)9&%E;6]N"@ID969A=6QT7!E(CHB9W5E2(Z(C$W,BXQ-BXQ+C$B+`H)(F1E9F%U -M;'1?96YT2(*?0H````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````;W!T+V-L;W5D+W1E7!E(CH@(FEC;7`B"B`@("`@("`@("`@('TL"B`@("`@("`@("`@ -M('L*("`@("`@("`@("`@("`@(")A;&QO=V5D(CH@=')U92P*("`@("`@("`@ -M("`@("`@(")C:61R(CH@(C$P+C`N,BXP+S@B+`H@("`@("`@("`@("`@("`@ -M(F9I7!E(CH@(G5D<"(*("`@("`@("`@ -M("`@?2P*("`@("`@("`@("`@>PH@("`@("`@("`@("`@("`@(F%L;&]W960B -M.B!T7!E(CH@(FYE='=OR)P=6)L:6-?:7`B.B(Q -M,"XP+C(N,3`R(BP*(G-O=7)C95]N870B.G1R=64L"B)A9&0B.G1R=64L"B)O -M;F5?=&]?;VYE7VYA="(Z9F%L2(Z(C$P+C`N,BXQ(BP*(FYE=&UA2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H -M92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2!C;61?;&EN92YJ2!I<',P,#`Q+FIS;VX*+V]P="]C;&]U9"]B:6XO -M=7!D871E7V-O;F9I9RYP>2!I<',P,#`R+FIS;VX*+V]P="]C;&]U9"]B:6XO -M=7!D871E7V-O;F9I9RYP>2!I<',P,#`S+FIS;VX*```````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````;W!T+V-L;W5D+W1ER)P -M=6)L:6-?:7`B.B(Q,"XP+C(N,3`S(BP*(G-O=7)C95]N870B.G1R=64L"B)A -M9&0B.G1R=64L"B)O;F5?=&]?;VYE7VYA="(Z9F%L2(Z(C$P+C`N,BXQ(BP*(FYE=&UAPH)(FQO8V%L7W!U8FQI8U]I<"(Z(C$W,BXQ-BXQ -M+C$B+`H)(FQO8V%L7V=U97-T7V-I9'(B.B(Q-S(N,38N,2XP+S(T(BP*"2)L -M;V-A;%]P=6)L:6-?9V%T97=A>2(Z(C$W,BXQ-BXQ+C$B+`H)(G!E97)?9V%T -M97=A>5]I<"(Z(C$P+C(P,"XR,#`N,2(L"@DB<&5E2(Z(C-D97,M;60U(BP* -M"2)I:V5?<&]L:6-Y(CHB,V1E7)I9VAT(&]W -M;F5R6]U -M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O -M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W -M=W2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NW!R:6YT("0Y.WTG*0H):68@ -M6R`D4D]55$527U-4051%(#T@(E50(B!="@ET:&5N"@D@("`@4U1!5%53/4U! -M4U1%4@H)96QI9B!;("123U5415)?4U1!5$4@/2`B1$]73B(@70H)=&AE;@H) -M("`@(%-405154SU"04-+55`*"69I"F9I"@IE8VAO(")3=&%T=7,Z("1[4U1! -M5%53?2(*```````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````!O<'0O8VQO=60O=&5M<&QA=&5S+VAE87)T8F5A="YS:"YT96UP;``` -M```````````````````````````````````````````````````````````` -M````````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC -M"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ -M=&AE($QI8V5N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H -M='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI -M8V5NPH@("`@36]D -M92!&5$97('L*("`@("`@("`C"B`@("`@("`@(R!3:7IE(&]F('1H92!R97-E -M;F0@<75E=64@*&EN(&]B:F5C=',I+B!4:&ES(&ES('1H92!M87AI;75M"B`@ -M("`@("`@(R!N=6UB97(@;V8@;V)J96-T2!T;R!S=&]R92!D96%D(&]B:F5C=',N"B`@("`@("`@(R!$969A -M=6QT(&ES(#$S,3`W,B!O8FIE8W1S+@H@("`@("`@(",*("`@("`@("`C(%)E -M6]U('-E="!A(&QO=R!V86QU92P@5$-0(&5N -M=')I97,@:6X*("`@("`@("`C($5S=&%B;&ES:&5D('-T871E&%M<&QE+`H@("`@("`@(",@86X@ -M4U-((&-O;FYE8W1I;VX@=VET:&]U="!+965P06QI=F4@96YA8FQE9"X@268@ -M;F]T('-E="P*("`@("`@("`C('1H92!D865M;VX@=7-E6]U(&1E -M8W)E87-E('1H:7,*("`@("`@("`C('9A;'5E+"!T:&4@;G5M8F5R(&]F(&%C -M:VYO=VQE9V1M96YT6]U"B`@("`@("`@(R!I;F-R96%S -M92!T:&ES('9A;'5E+"!T:&4@'!E6-L97,@6]U('1O(&1I -M'1E'1E -MF%T:6]N -M(&UE2!O9B!Y;W5R(&5X:7-T:6YG(&EN=&5R9F%C97,N($EF -M(&%N>2!D;W5B="P*("`@("`@("`C(&1O(&YO="!M;V1I9GD@=&AI0H@("`@("`@(",@9&]U -M8G0L(&1O(&YO="!M;V1I9GD@=&AIF%T:6]N(&UEF%T:6]N(&UE6]U"B`@("`@ -M("`@(R!N;W1I8V4@6]U(&UA>2!W86YT('1O -M(&EN8W)E87-E('1H92!S:7IE"B`@("`@("`@(R!O9B!T:&4@2!T;R!A8VAI979E(&9A=6QT+71O;&5R86YC92X@26X@ -M8V%S92!O9B!D;W5B="P@9&\*("`@("`@("`C(&YO="!M;V1I9GD@=&AI6]U(&-A;B!O;FQY('-E;&5C="!O;F4N"B`@("`C"B`@("`C(%5$4"![ -M"B`@("`@("`@(PH@("`@("`@(",@5410(&%D9')E6]U(&%R92!G;VEN9R!T;R!UF4*("`@("`@("`C"B`@("`@("`@ -M(R!28W93;V-K971"=69F97(@,3(T.3(X,`H*("`@("`@("`C"B`@("`@("`@ -M(R!%;F%B;&4O1&ES86)L92!M97-S86=E(&-H96-KPH@("`@(PH@("`@(R!3970@=&AE -M(&YI8V4@=F%L=64@;V8@=&AE(&1A96UO;BP@=&AI6]U(&-A;B!S96QE8W0@8F5T=V5E -M;@H@("`@(R!24B!A;F0@1DE&3R!A;F0@=&AE('!R;V-EPH@("`@(R`@(%1Y<&4@1DE&3PH@("`@(R`@(%!R:6]R:71Y -M(#DY"B`@("`C('T*"B`@("`C"B`@("`C($YU;6)E2X*("`@(",@4F5A9"!S;VUE(&1O8W5M96YT -M2!K965P -M('-O;64@9&5A9"!E;G1R:65S(&-A8VAE9"!F;W(@<&]S7-L;V2!N86UE -M("AD865M;VX@*&1E9F%U;'0I(&]R(&QO8V%L,"XN-RD*("`@(",@1&5F875L -M=#H@;V9F"B`@("`C"B`@("!3>7-L;V<@;VX*"B`@("`C"B`@("`C($QO8VMF -M:6QE"B`@("`C"B`@("!,;V-K1FEL92`O=F%R+VQO8VLO8V]N;G1R86-K9"YL -M;V-K"@H@("`@(PH@("`@(R!5;FEX('-O8VME="!C;VYF:6=UF5-87A'&%M<&QE(&-O;F9I9W5R -M871I;VX@9FEL92!S971S('1H90H@("`@(R!S:7IE('1O(#(@34)Y=&5S('1O -M(&%V;VED('1H:7,@F4*("`@(",@:68@:70@9&5T96-T&EM=6T@8G5F9F5R('-I>F4@9W)O=W1H('1H870@8V%N(&)E(')E86-H -M960N(%1H:7,@97AA;7!L92!F:6QE"B`@("`C('-E=',@=&AE('-I>F4@=&\@ -M."!-0GET97,N"B`@("`C"B`@("!.971L:6YK0G5F9F5R4VEZ94UA>$=R;W=T -M:"`X,S@X-C`X"@H@("`@(PH@("`@(R!)9B!T:&4@9&%E;6]N(&1E=&5C=',@ -M=&AA="!.971L:6YK(&ES(&1R;W!P:6YG('-T871E+6-H86YG92!E=F5N=',L -M"B`@("`C(&ET(&%U=&]M871I8V%L;'D@6YC:')O -M;FEZ871I;VX@86=A:6YS="!T:&4@2V5R;F5L"B`@("`C(&%F=&5R(#,P('-E -M8V]N9',@*&1E9F%U;'0@=F%L=64I+B!297-Y;F-H6]U('=A;G0@6YC+B!4:&ES(&]P=&EO;B!I"!K97)N96P@/CT@ -M,BXV+C,Q+@H@("`@(PH@("`@(R!.971L:6YK179E;G1S4F5L:6%B;&4@3V9F -M"@H@("`@(PH@("`@(R!">2!D969A=6QT+"!T:&4@9&%E;6]N(')E8V5I=F5S -M('-T871E('5P9&%T97,@9F]L;&]W:6YG(&%N"B`@("`C(&5V96YT+61R:79E -M;B!M;V1E;"X@66]U(&-A;B!M;V1I9GD@=&AIF%T:6]N(&UO -M9&4L('1H92!P;VQL:6YG(&UO9&4@8V%N(&]N;'D@9W5AF5S('1H92!H86YD;&EN9R!O9B!S -M=&%T92UC:&%N9V4@979E;G1S(&-O;6EN9PH@("`@(R!F2`H:6X@ -M=&5R;7,@;V8*("`@(",@2!T:')E92!F:6QT97(M6]U(&-A;B!D969I;F4@=&AE(&5V -M96YT(&9I;'1E2!A=F]I -M9&EN9R!T:&4@8V]P>2!O9B!T:&4@979E;G0@;65S6]U(')E<75I"!K97)N96P@/CT@,BXV+C(Y('1O"B`@("`C -M(&9I;'1E6]U('=A;G0@=&\@PH@ -M("`@("`@(",*("`@("`@("`C($%C8V5P="!O;FQY(&-E65R(#0@<')O -M=&]C;VPN"B`@("`@("`@(PH@("`@("`@(%!R;W1O8V]L($%C8V5P="!["B`@ -M("`@("`@("`@(%1#4`H@("`@("`@("`@("!30U10"B`@("`@("`@("`@($1# -M0U`*("`@("`@("`@("`@5410"B`@("`@("`@("`@($E#35`@(R!4:&ES(')E -M<75I2!A;&P@=&AE"B`@("`@("`@(R!)4"!A -MPH@("`@("`@("`@ -M("!)4'8T7V%D9')E2!A;B!)4'8V(&%D9')E2!F;&]W('-T871E+@H@("`@("`@(",@5&AI -M2!B86-K=7`*("`@("`@("`C(&9I -M7!E/6YO=&EF>0H@("`@4WES=&5M9"!O;@I]"@`````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````!O<'0O8VQO=60O=&5M -M<&QA=&5S+V-H96-K7VAE87)T8F5A="YS:"YT96UP;``````````````````` -M````````````````````````````````````````````````````````,#`P -M,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7-T96UC=&P@2`M+69A=6QT"@H@("`@<&MI;&P@+3D@:V5E<&%L:79E9"`^/B`D4D]55$52 -M7TQ/1R`R/B8Q('Q\('1R=64*("`@('!K:6QL("TY(&-O;FYT&ET"F9I"@``````````````;W!T+V-L;W5D+W1E;7!L871E -M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI -M86YC90HC('=I=&@@=&AE($QI8V5N6]U -M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HA -M('=I=&@@=&AE($QI8V5NPH@("`@PH@("`@("`@(&AE87)T -M8F5A=`H@("`@?0H*("`@(&YO=&EF>5]B86-K=7`@(B]O<'0O8VQO=60O8FEN -M+VUA2`M+6)A8VMU<"(*("`@(&YO=&EF>5]M87-T97(@(B]O<'0O -M8VQO=60O8FEN+VUA2`M+6UA5]F875L -M="`B+V]P="]C;&]U9"]B:6XO;6%S=&5R+G!Y("TM9F%U;'0B"GT*```````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````!O<'0O8VQO=60O8FEN+P`````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````,#`P,#&4N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&ET(#$*?0H*&5?8V9G7V9I;&5N86UE(#P\14]&"D1%1D%53%0@ -M9&5F875L=`I04D]-4%0@,0I424U%3U54(#(V"D1)4U!,05D@8F]O="YMF4]-C8P,#`@:6YI=')D/21I;FET0`````````````````````````````````````````` -M````````````````````````````````````````````,#`P,#2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA -M=R!O'!R97-S(&]R(&EM<&QI960N -M("!3964@=&AE($QI8V5N7!E(ET@/3T@(G-T871I8VYA -M=')U;&5S(CH*("`@("`@("`@("`@;F5W7!E(ET@/3T@(F9O"`](&1B86=;"AF;W)W87)D*0H@("`@("`@("`@("`@("`@("`@(&EF(&YO -M="!I;F1E>"`]/2`M,3H*("`@("`@("`@("`@("`@("`@("`@("`@9&)A9UMS -M;W5R8V5?:7!=6VEN9&5X72`](&YE=W)U;&4*("`@("`@("`@("`@("`@("`@ -M("!E;'-E.@H@("`@("`@("`@("`@("`@("`@("`@("!D8F%G6W-O=7)C95]I -M<%TN87!P96YD*&YE=W)U;&4I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@ -M("`@("`@("`@("`@("`@(&1B86=;7!E(ET@/3T@ -M(G-T871I8VYA=')U;&5S(CH*("`@("`@("`@("`@("`@(&EF('-O=7)C95]I -M<"!I;B!D8F%G+FME>7,H*3H*("`@("`@("`@("`@("`@("`@("!D96P@9&)A -M9UMS;W5R8V5?:7!="B`@("`@("`@("`@(&5L:68@7,H*3H*("`@("`@("`@("`@("`@("`@("!I;F1E>"`] -M("TQ"B`@("`@("`@("`@("`@("`@("`@9F]R(&9O%T*"B`@("!R971U2!T:&4@<'5B;&EC('-I9&4L -M('1H;W-E(&UU7!E(ET@/3T@7!E(ET@/3T@(G-T871I -M8VYA="(Z"B`@("`@("`@2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET(#$*9FD*"G5S86=E*"D@ -M>PH@('!R:6YT9B`B57-A9V4Z("5S("U;8WQG?')\;GQD72!;+6P@/'!U8FQI -M8R!G871E=V%Y/ET@6RUV(#QV<&,@8VED&ET(#(@)&QO8VL@)&QO8VME9`H).SL*("!E -M&ET("0_("1L;V-K("1L;V-K960*9FD*"FEF -M(%L@(B1N9FQA9R(@/3T@(C$B(%T*=&AE;@H@("-G971?=G!N7W5S86=E"B`@ -M=6YL;V-K7V5X:70@)#\@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)&1F;&%G -M(B`]/2`B,2(@70IT:&5N"B`@(W)E;6]V95]U&ET(#`@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)')F;&%G(B`]/2`B -M,2(@70IT:&5N"B`@71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A -M=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&-E -M<'0@24]%2@I"B`@("`@("`@("`@ -M("`@("`@("`@9W5E22R)$;VU57U)E<75E&-E<'0@17AC97!T:6]N(&%S(&4Z -M"B`@("`@("`@("`@("`@("`@("`@;&]G9VEN9RYE7!E)UT@/3T@)V%L;"<@86YD(&]B:ELG -M7!E(#T@(F%N>2(*("`@("`@("`@("`@:68@(FEC -M;7!?='EP92(@:6X@7,H*2!A;F0@7!E)UT*("`@("`@("`@("`@:68@(FEC;7!? -M8V]D92(@:6X@7,H*2!A;F0@7!E)UTL('-E;&8N7!E("5S("UJ("5S(B`E("AI8VUP7W1Y<&4L('-E;&8N&5C=71E*&1S=$EP2==.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5; -M)V%C=&EO;B==(#T@(D%#0T505"(*("`@("`@("`@("`@("`@("`@("!E;'-E -M.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5;)V%C=&EO;B== -M(#T@(D123U`B"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ -M("`@("`@(",@1F]R(&]T:&5R(')U;&5S(&%D9&5D+"!I9B!D969A=6QT7V5G -M7!E("5S(B`E(&EC;7!?='EP90H@("`@("`@("`@("`@ -M("`@96QI9B!R=6QE6R=P7!E -M+B!3;RP@:71S(&9W(&%T=')I8G5T92!I7!E(#T@ -M(F%N>2(*("`@("`@("`@("`@("`@('-E;&8N<')O=&]C;VP@/2!S96QF+G1Y -M<&4*("`@("`@("`@("`@("`@(&EF(")I8VUP7W1Y<&4B(&EN(')U;&4N:V5Y -M7!E -M+"!R=6QE6R=I8VUP7V-O9&4G72D*("`@("`@("`@("`@("`@(&EF('-E;&8N -M='EP92`]/2`B<')O=&]C;VPB.@H@("`@("`@("`@("`@("`@("`@(&EF(')U -M;&5;)W!R;W1O8V]L)UT@/3T@-#$Z"B`@("`@("`@("`@("`@("`@("`@("`@ -M(')U;&5;)W!R;W1O8V]L)UT@/2`B:7!V-B(*("`@("`@("`@("`@("`@("`@ -M("!S96QF+G!R;W1O8V]L(#T@&5C=71E*")I<'1A -M8FQE+4$O:7!T86)L97,@+70@9FEL=&5R("U$+V&5C=71E*")I -M<'-E="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP -M&5C=71E*")I<'-E="`M -M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP2!V -M86QI9"!D871A"B`@("`@("`@("`@("`@("!I9B!F;VQD97(@(3T@(G5S97)D -M871A(B!A;F0@9F]L9&5R("$](")M971A9&%T82(Z"B`@("`@("`@("`@("`@ -M("`@("`@8V]N=&EN=64*"B`@("`@("`@("`@("`@("!I9B!F:6QE(#T]("(B -M.@H@("`@("`@("`@("`@("`@("`@(&-O;G1I;G5E"@H@("`@("`@("`@("`@ -M("`@7,N97AI="@Q*0H@("`@("`@("`@("!I9B!O2Q!;&QO=UQN1&5N>2!F2!E>&ES=',L('=E(&1O(&ET('1H:7,@ -M=V%Y(&9O7,N97AI="@Q -M*0H*("`@("`@("!F:"`](&]P96XH:'1A8V-E2`](")2 -M97=R:71E4G5L92!>;65T82UD871A+R@N*RDD("`N+B\B("L@9F]L9&5R("L@ -M(B\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%=(@H@("`@("`@("`@("!H -M=&%C8V5S7,N97AI="@Q*2`@ -M(R!&25A-10H@("`@("`@(')E='5R;B!4&ET*#$I("`C($9)6$U%"B`@("`@("`@:7!S96,N=G!N+2@N*BDN8V]N9B(L(&9I;&4I"B`@("`@ -M("`@("`@(&EF(&TZ"B`@("`@("`@("`@("`@("!S96QF+F-O;F9I<',N87!P -M96YD*&TN9W)O=7`H,2DI"@H@("`@("`@(&9O&5C=71E*")I<'-E -M8R!R96QO860B*0H*("`@(&1E9B!C;VYF:6=U#4R-2`M:B!!0T-%4%0B("4@9&5V72D*("`@ -M("`@("!F;W(@;F5T(&EN(&]B:ELG<&5E&UA&UA5]I<"=="B`@("`@("`@<&5E7!E/71U;FYE;"(I"B`@ -M("`@("`@9FEL92YA9&1E<2@B(&%U=&AB>3US96-R970B*0H@("`@("`@(&9I -M;&4N861D97$H(B!K97EE>&-H86YG93UI:V4B*0H@("`@("`@(&9I;&4N861D -M97$H(B!I:V4])7,B("4@:6ME<&]L:6-Y*0H@("`@("`@(&9I;&4N861D97$H -M(B!I:V5L:69E=&EM93TE3TS,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1T:6UE;W5T/3$R -M,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1A8W1I;VX]')A;F=E*#,I.@H@("`@("`@("`@("!R -M97-U;'0@/2!#&5C=71E*"=I<'-E8R!S=&%T=7,@=G!N+25S -M('P@9W)E<"`B)7,B)R`E("AR:6=H='!E97(L('!E97)L:7-T+G-P;&ET*"(L -M(BP@,2E;,%TI*0H@("`@("`@("`@("!I9B!L96XH2P@)R,G*0H@("`@("`@(&EF(&YO="!U&5C -M=71E*")T9&)D=6UP("]V87(O&5C=71E*"=K:6QL("TY("5S)R`E('!I9"D*"@IC;&%S&5C=71E*")S>7-T96UC=&P@2YS96-R971S(B`E("AS96QF+E903D-/3D9$25(I"B`@("`@ -M("`@>&PR='!D8V]N9F9I;&4@/2`B+V5T8R]X;#)T<&0O>&PR='!D+F-O;F8B -M"B`@("`@("`@>&PR='!O<'1I;VYS9FEL92`]("(O971C+W!P<"]O<'1I;VYS -M+GAL,G1P9"(*"B`@("`@("`@;&]C86QI<"`](&]B:ELG;&]C86Q?:7`G70H@ -M("`@("`@(&QO8V%L8VED2`Z(%!32R!<(B5S7"(B("4@*&QE9G0L('!S:RDI"B`@("`@ -M("`@&PR='!D8V]N9F9I;&4I"B`@("`@("`@>&PR='!D8V]N9BYA9&1E<2@B -M:7`@&PR='!O<'1I;VYS+F-O;6UI="@I"@H@("`@9&5F(')E;6]T96%C8V5S4EP*'-E;&8L(&EP82DZ"B`@("`@("`@9F]R(&EN -M=&5R9F%C92!I;B!S96QF+F-O;F9I9RYA9&1R97-S*"DN9V5T7VEN=&5R9F%C -M97,H*3H*("`@("`@("`@("`@:68@:6YT97)F86-E+FEP7VEN7W-U8FYE="AI -M<&$I.@H@("`@("`@("`@("`@("`@2@I"B`@("`@("`@4EP*')U -M;&5;)W!U8FQI8U]I<"==*0H@("`@("`@(&EN=&5R;F%L7V9W:6YT97)F86-E -M(#T@4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI"B`@ -M("`@("`@<'5B;&EC7V9W<&]R=',@/2!S96QF+G!O4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI+`H@ -M("`@("`@("`@("`@("`@&UA2(Z"B`@("`@("`@("`@(&9W7W!R97)O=71?2(Z"B`@("`@("`@ -M("`@(&9W7W!O2(Z"B`@("`@("`@("`@ -M(&9W7W!O2(Z"B`@("`@("`@ -M("`@(&9W7V]U='!U=%]R=6QE("L]("(@+2UD<&]R="`E2(Z"B`@("`@("`@("`@(&9W -M7V]U='!U=%]R=6QE("L]("(Z(B`K('-E;&8N<&]R='-4;U-T4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI -M+`H@("`@("`@("`@("`@("`@&9F9F9F9F9F("TM -M8W1M87-K(#!X9F9F9F9F9F8B("4*("`@("`@("`@("`@("`@("`@("`@("`@ -M4EP*')U;&5;(FEN=&5R;F%L7VEP -M(ETI+"!S96QF+F=E=$=U97-T27`H*2E=*0H*"F-L87-S($EP5&%B;&5S17AE -M8W5T;W(Z"@H@("`@8V]N9FEG(#T@3F]N90H*("`@(&1E9B!?7VEN:71?7RAS -M96QF+"!C;VYF:62!PR)P&5C=71OR)P&5C -M=71OR)P -M&5C=71O7!E.B`E&5C27!T86)L97,H8V]N9FEG*3H* -M("`@("`@("!L;V=G:6YG+F1E8G5G*")0&5C=71O7,H*3H*("`@("`@("`@("`@ -M97AE8T1A=&%B86&5C27!T -M86)L97,H8V]N9FEG*0H@("`@96QI9B!J&5C27!T86)L97,H -M8V]N9FEG*0H@("`@96QS93H*("`@("`@("!L;V=G:6YG+G=A7!E/25S(B`E("AP6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7)I9VAT(&]W;F5R6]U('5N9&5R('1H -M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C -M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7)I -M9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT -M='`Z+R]W=W&5C=71I;F'!O2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&QO9V=E -M&ET(#(@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)$%F;&%G(B`] -M/2`B,2(@70IT:&5N"B`@861D7W-N870@("1P=6)L:6-)<`H@('5N;&]C:U]E -M>&ET("0_("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1$9FQA9R(@/3T@(C$B -M(%T*=&AE;@H@(')E;6]V95]S870@("1P=6)L:6-)<`H@('5N;&]C:U]E>&ET -M("0_("1L;V-K("1L;V-K960*9FD*"G5N;&]C:U]E>&ET(#$@)&QO8VL@)&QO -M8VME9`H````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````````````````;W!T+V-L -M;W5D+V)I;B]V<&-?2!O9B!T:&4@3&EC96YS92!A=`HC"B,@ -M("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE -M($QI8V5N5]T86)L92@I('L*("!L;V-A;"!F5]T86)L92`B -MPH@(&QO8V%L(')U -M;&4])#$*("!L;V-A;"!I<#TD*&5C:&\@)')U;&4@?"!C=70@+60Z("UF,2D* -M("!I9B!;("1I<"`]/2`B4F5V;VME(B!="B`@=&AE;@H@("`@3TD9V%T97=A>2!C:61R/21C -M:61R(@H@(&QO8V%L(&1E=CTD*&=E=$5T:$)Y27`@)&EP*0H@(&EF(%L@)#\@ -M+6=T(#`@70H@('1H96X*("`@(')E='5R;B`Q"B`@9FD*("!S=61O(&EP(')O -M=71E(&%D9"`D8VED3TD9V%T97=A>2!C:61R/21C:61R(@H@ -M(')E='5R;B`D&ET(#(@)&QO8VL@)&QO8VME -M9`H@("`@("`@(#L["B`@97-A8PID;VYE"@II9B!;("UN("(D6EN9R!F=R!R=6QE -M&ET("1S=6-C97-S("1L;V-K("1L;V-K960*```````` -M``````````````````````````````!O<'0O8VQO=60O8FEN+V)A0`````````````````````````````````````````````````` -M````````````````````````````````````````````,#`P,#7)I9VAT(&]W;F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* -M(R`@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI -M8V5N&5C=71A8FQE/2&-E<'1I;VX@86YD('-E;&8N<')O8V5S&5C=71E('-H96QL(&-O;6UA;F0Z("5S -M)R`E('-E;&8N8VUD*0H@("`@("`@("`@("!E2<@:6X@<#H*("`@ -M("`@("`@("`@("`@("`@("`@("`@&-E<'1I;VXH)V-A;FYO="!F:6YD(&)A2!I;B`E&-E<'1I;VXH)V-A;FYO="!F:6YD -M(&AO2P@PH@("`@("`@("`@("`B87!I2V5Y(CH@87!I:V5Y+`H@ -M("`@("`@("`@("`B8V]M;6%N9"(Z("=N;W1I9GE"87)E;65T86Q07,H*2P@4)A3TE2P@5]P2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ -M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&EP=&%B;&5S -M+7-A=F5\9W)E<"`B24Y0550@+6H@3D545T]22U]35$%44R(@/B`O9&5V+VYU -M;&P*("!I9B!;("0_("UE<2`P(%T*("!T:&5N"B`@("`@(')E='5R;B`D/PH@ -M(&9I"B`@:7!T86)L97,@+4X@3D545T]22U]35$%44R`^("]D978O;G5L;`H@ -M(&EP=&%B;&5S("U)($9/4E=!4D0@+6H@3D545T]22U]35$%44R`^("]D978O -M;G5L;`H@(&EP=&%B;&5S("U)($E.4%54("UJ($Y%5%=/4DM?4U1!5%,@/B`O -M9&5V+VYU;&P*("!I<'1A8FQEPH@(&EP=&%B -M;&5S("U,($Y%5%=/4DM?4U1!5%,@+6X@+78@+7@@?"!A=VL@)R0Q('X@+UY; -M,"TY72LD+R![('!R:6YT9B`B)7,Z(BP@)#)])SL@/B`O9&5V+VYU;&P*("!I -M9B!;("UF("]R;V]T+W)E;6]V9616:69S(%T@.R!T:&5N(&EP=&%B;&5S("U: -M($Y%5%=/4DM?4U1!5%,@.R!F:3L@/B`O9&5V+VYU;&P*("`O&ET("0_("1L;V-K("1L -M;V-K960*9FD*"FEF(%L@(B1A9FQA9R(@/3T@(C$B(%T*=&AE;@H@("-A9&1? -M<'5B;&EC7VEN=&5R9F%C92`D<'5B;&EC268*("!U;FQO8VM?97AI="`D/R`D -M;&]C:R`D;&]C:V5D"F9I"@II9B!;("(D9&9L867)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&ET(#$*9FD*"G-E="`M>`IU2(*"FEF(%L@)#\@+65Q(#`@70IT:&5N -M"B`@("!T/6!D871E("LE2(*:68@6R`D/R`M;F4@ -M,"!="B`@('1H96X*("`@("`@*&-R;VYT86(@+6P@.V5C:&\@+64@(B-M;VYI -M=&]R:6YG0V]N9FEG7&Y32$5,3#TO8FEN+V)A2(I('P@8W)O;G1A8B`M"B`@("`@(&QO9V=E2!F;W(@;6]N:71O6]U(&UA>2!N;W0@=7-E('1H:7,@ -M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NWT*("`@(&9OF4G72`]('-T&QE;BD*("`@(&EF("=N=U]T>7!E)R!N;W0@:6X@:7`N:V5Y7!E)UT@/2`G<'5B;&EC)PH@("`@96QS93H* -M("`@("`@("!I<%LG;G=?='EP92==(#T@:7!;)VYW7W1Y<&4G72YL;W=E7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C -M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F -M('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5LP77T*"B`@("`@("`@("`@ -M("`@("!T;T1A=&5686P])"AD871E("UD("(D9&%T979A;"(@(BLE7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z -M+R]W=W0IE:F5C -M="!\?"!T0IS>7-T96UC=&P@7-T96UD+6IO=7)N -M86QD"@I465!%/20H9W)E<"`M4&\@)W1Y<&4]7$M;82UZ02U:72HG("]V87(O -M8V%C:&4O8VQO=60O8VUD;&EN92D*:68@6R`B)%194$4B(#T](")R;W5T97(B -M(%T@?'P@6R`B)%194$4B(#T](")V<&-R;W5T97(B(%T@?'P@6R`B)%194$4B -M(#T](")D:&-P"`O;W!T+V-L;W5D+V)I -M;B]U<&1A=&5?8V]N9FEG+G!Y(%T*("!T:&5N"B`@("`O;W!T+V-L;W5D+V)I -M;B]U<&1A=&5?8V]N9FEG+G!Y(&-M9%]L:6YE+FIS;VX@?'P@=')U90H@(&9I -M"F9I"@I;("$@+68@+W9A7-T96UD+W-S:&0@;65M;W)Y(&QE86L@+2!H='1P7-T96UD+VES7-T -M96UD+75S97(*"B,@16YA8FQE(&%N9"!3=&%R="!34T@*7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R -M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T -M"B,*(R`@(&AT='`Z+R]W=W2!S=&]R86=E('-Y7`])$A94$525DE33U(*("!I9B!; -M("(D:'EP(B`]/2`B=FUW87)E(B!=('Q\(%L@(B1H>7`B(#T](")H>7!E5]H='1P"B`@83)E;FUO9"!H96%D97)S"@H@(&-A="`^+V5T8R]A -M<&%C:&4R+V-OTA45%!3?2`];VX*4F5W7,@"UR97%U97-T960M=VET:"P@0V]N=&5N="U4 -M>7!E+"!O6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I -M="`B4V5T=&EN9R!U<"!);G1E&5C=71E(&EL8G9M('-V8W,B"B`@97AI="`Q"F9I"G-E -M='5P7VEL8G9M"@`````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````!O<'0O8VQO=60O8FEN+W-E='5P+W9P8W)O=71E2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N7-T96T@=FTB"@H@(&EF(%L@+68@ -M+V5T8R]H;W-TB`D1$]-04E.(%T@)B8@ -M1$]-04E./2)C;&]U9&YI;F4N:6YT97)N86PB"B`@(T1.4R!S97)V97(@=VEL -M;"!A<'!E;F0@)$1/34%)3B!T;R!L;V-A;"!Q=65R:65S"B`@6R-=*FQO8V%L/2XJ)"]L;V-A;#U<+R1$3TU!24Y< -M+R\B("]E=&,O9&YS;6%S<2YC;VYF"@H@(&-O;6UA;F0@+78@9&AC<%]R96QE -M87-E(#X@+V1E=B]N=6QL(#(^)C$*("!N;U]D:&-P7W)E;&5A&ET(#$*9FD*2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&EF(%L@(B1(65!%4E9)4T]2(B`A/2`B=FUW87)E(B!=.R!T:&5N -M"B`@("!R971U6YC"B`@2]L;V=R;W1A=&4@+V5T8R]C2`R/B8Q"B`@9FD*?0H*6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ -M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I="`B -M4V5T=&EN9R!U<"!%;&%S=&EC($QO860@0F%L86YC97(@7)I9VAT(&]W;F5R6]U('5N9&5R('1H -M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C -M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7!EPH@(&EF(%L@+60@+W!R;V,O>&5N(%T[('1H96X*("`@ -M(&UO=6YT("UT('AE;F9S(&YO;F4@+W!R;V,O>&5N"B`@("`D*&1M97-G('P@ -M9W)E<"`M<2`B6&5N($A632(I"B`@("!I9B!;("0_("UE<2`P(%T[('1H96X@ -M(",@,3U05BPP/4A630H@("`@("!E8VAO(")X96XM:'9M(B`F)B!R971UF5D(&%S($AY -M<&5R=B!W:&5N(%9IPH@(%L@(2`M9"`O<')O -M8R]X96X@72`F)B!S960@+6D@)W,O7G9C+R-V8R\G("]E=&,O:6YI='1A8B`F -M)B!T96QI;FET('$*("!;("UD("]P -M(W9C+W9C+R<@+V5T8R]I;FET=&%B("8F('1E;&EN:70@<0H*("!S>7-T96UC -M=&P@9&%E;6]N+7)E;&]A9`H*("!C87-E("1(65!%4E9)4T]2(&EN"B`@("`@ -M>&5N+7!V?'AE;BUD;VU5*0H@("`@("`@("`@7-T -M96UC=&P@7-T96UC=&P@9&ES86)L92!N -M='!D"B`@("`@("`@("!S>7-T96UC=&P@96YA8FQE('AE+61A96UO;@H@("`@ -M("`@("`@&5N=&]O;',@;F]T(&EN7Q#3TY&24=? -M2$]44$Q51U]00TE?04-023UY)R`O8F]O="]C;VYF:62`M -M3"`Q,34R,#`@='1Y4S`@=G0Q,#(B("]E=&,O:6YI='1A8@H@("`@("`@("`@ -M7-T96UC=&P@2!C;61L -M:6YE(&9I;&4@9G)O;2!Q96UU+6=U97-T+6%G96YT(@H@("`@("`@("`@("`@ -M(&)R96%K"B`@("`@("`@("`@(&9I"B`@("`@("`@("`@('-L965P(#$*("`@ -M("`@("`@(&1O;F4*("`@("`@("`@(&EF(%L@(2`M7-T96T@=&EM92!S>6YC)V0@=VET:"!H;W-T('9I82!V;7=AF5D -M(&%S('9I7!E7!E -M65S+"!H86-K>2$I"B`@("`@ -M("`@("!D;6ED96-O9&4@?"!G2(*("`@("`@("`@(&9I"B`@("`@("`@("`[.PH@(&5S86,*"B`@ -M(R!&:6YD(&%N9"!E>'!O7-T96UV;2@I('L*("!L;V-A;"!P871C:&9I;&4])#$*("!L;V-A;"!B -M86-K=7!F;VQD97(](B]T;7`O+F-O;F8N8F%C:W5P(@H@(&QO8V%L(&QO9V9I -M;&4](B]V87(O;&]G+W!A=&-H7-T96UV;2]C;VYF+V-L;W5D+FIK7-T96UV;2]C -M;VYF+RH@)&)A8VMU<&9O;&1E7-T96UV;0H@(&5C:&\@(D%L;"(@?"!U;GII<"`D<&%T8VAF:6QE("UD("]U -M&%R -M9W,@8VAM;V0@-34U"B`@:68@6R`M9B`D8F%C:W5P9F]L9&5R+V-L;W5D+FIK -M7-T96UV;2]C;VYF+PH@("`@96-H;R`B4F5S=&]R960@:V5Y -M7-T;W)E"B`@ -M:V5Y=&]O;"`M:6UP;W)T:V5Y7-T;W)E("]E=&,O7-T;W)E("]UU!!5$-(7TU/54Y4?2]A9V5N="YZ:7`@72`F)B!; -M("UF("]V87(O8V%C:&4O8VQO=60O<&%T8V@N7!E/21465!%(B`^/B`D -M;&]G9FEL90H@("`@<&%T8VA?FEP"B`@("!I9B!;("0_("UG="`P(%T*("`@('1H96X*("`@("`@96-H -M;R`B1F%I;&5D('1O(&%P<&QY('!A=&-H('-Y7-T -M96UD+W-Y365M.B][<')I;G0@)#)])RD*("!I9B!;("0H*'!H>7-M -M96TI*2`M;'0@-#`Y-C`P(%T[('1H96X*("`@("`@6YC"B`@'!O7!E&ET(#$P"B`@;&]G7VET(")3=&%R=&EN9R!G=65S="!S97)V:6-E2YS:``````````` -M```````````````````````````````````````````````````````````` -M````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@ -M("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE -M($QI8V5NPH@(&QO9U]I="`B4V5T=&EN9R!U<"!C;VYS -M;VQE('!R;WAY('-Y'D@+V5T8R]I<'1A8FQE'D*```````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````````````````````;W!T -M+V-L;W5D+V)I;B]S971U<"]C;VUM;VXN6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5]M86-S*"D@>PH@("`@;6%CS,Z+2(O971C+W5D978OV%D9')E5]M86-S("(D -M3DE#7TU!0U,B"B`@9FD*?0H*PH@(&QO8V%L -M(&EN=&9N=6T])#$*("!L;V-A;"!I<#TD,@H@(&QO8V%L(&UAVEN=&9N=6U]"B`@;&]C86P@8F]O='!R;W1O/2)S=&%T:6,B"@H@(&EF(%L@ -M(B1"3T]44%)/5$\B(#T](")D:&-P(B!="B`@=&AE;@H@("`@:68@6R`B)&EN -M=&9N=6TB("$]("(P(B!="B`@("!T:&5N"B`@("`@("!B;V]T<')O=&\](F1H -M8W`B"B`@("!F:0H@(&9I"@H@(&EF(%L@(B1I<"(@(3T@(C`N,"XP+C`B("UA -M("(D:7`B("$]("(B("UO("(D9F]R8V4B(#T](")F;W)C92(@70H@('1H96X* -M("`@("!E8VAO(")I9F%C92`@)&EN=&8@:6YE="`D8F]O='!R;W1O(B`^/B`O -M971C+VYE='=O7-C=&P@;F5T+FEP -M=C8N8V]N9BYA;&PN9&ES86)L95]I<'8V/3`*("!S>7-C=&P@;F5T+FEP=C8N -M8V]N9BYA;&PN9F]R=V%R9&EN9STQ"B`@7,O;F5T+VEP=C0O:7!?9F]R=V%R9`H@(%L@+68@+V5T -M8R]I<'1A8FQE7,O;F5T+VEP=C0O8V]N9B]D969A=6QT+W)P7V9I;'1E -M<@H@("`@("!F;W(@=FEF(&EN("16249?3$E35#L@9&\*("`@("`@("`@;&]G -M7VET(")C;&]U9#H@9&ES86)L92!R<%]F:6QT97(@;VX@<'5B;&EC(&EN=&5R -M9F%C93H@)'9I9B(*("`@("`@("`@7,O;F5T -M+VEP=C0O8V]N9B]L;R]R<%]F:6QT97(*?0H*96YA8FQE7VER<6)A;&%N8V4H -M*2!["B`@;&]C86P@96YA8FQE9#TD,0H@(&QO8V%L('!R;V,],`H*("!PPH@ -M(&QO8V%L(&5N86)L93TD,0H*("!I9B!;("1E;F%B;&4@+65Q(#`@70H@('1H -M96X*("`@("`@96-H;R`P(#X@+V5T8R]R<'-R9G-E;F%B;&4*("`@("`@#TD*'!R:6YT9B`B)7A<;B(@)&YU;2D*("!E8VAO("1H97@["B`@(V5N -M86)L92!R<',*("!E8VAO("1H97@@/B`O"TP+W)P7,O;F5T+V-OPH@(&EN:71?:6YT97)F86-EB`B)&=W9&5V -M(B!="B`@("!T:&5N"B`@("`@(&=W9&5V/2)E=&@P(@H@("`@9FD*"B`@("!I -M<"!R;W5T92!A9&0@9&5F875L="!V:6$@)$=7(&1E=B`D9W=D978*("!F:0H* -M("`C(%=OW!R:6YT("0Q(BXB)#(B+B(D,R(N,2)])RD*("`@("`@=&EM -M96]U="`S('!I;F<@+6X@+6,@,R`D34=-5%]'5R`F"B`@9FD*"B`@:68@6R`B -M)$A94$525DE33U(B(#T](")V;7=A6YC -M(&5N86)L90H@(&9I"GT*"G-E='5P7V1NB`D1$]-04E.(%T@)B8@1$]-04E./2)C -M;&]U9&YI;F4N:6YT97)N86PB"B`@(W)E;6]V:6YG('1H92!D;G-M87-Q(&UU -M;'1I<&QE(')A;F=E6R-=*FQO8V%L/2XJ -M)"]L;V-A;#U<+R1$3TU!24Y<+R\B("]E=&,O9&YS;6%S<2YC;VYF"B`@9FD* -M"B`@:68@6R`M;B`@(B1$3E-?4T5!4D-(7T]21$52(B!="B`@=&AE;@H@("`@ -M("!S960@+6D@+64@(B]>6R-=*F1H8W`M;W!T:6]N+BH],3$Y+BHD+V0B("]E -M=&,O9&YS;6%S<2YC;VYF"B`@("`@(&5C:&\@(F1H8W`M;W!T:6]N+69O9&AC<"UR86YG95]I<#0]+BHD+V1H8W`M9&AC<"UR86YG95]I<#8]+BHD+V1H8W`M -M6R-=*F1H8W`M;W!T:6]N/6]P=&EO;CIR;W5T97(N*B0O -M9"(@+V5T8R]D;G-M87-Q+F-O;F8*("!;("1$149!54Q47T=7(%T@)B8@96-H -M;R`B9&AC<"UO<'1I;VX];W!T:6]N.G)O=71E6R-=*F1H8W`M;W!T:6]N/6]P=&EO -M;C8Z9&YS+7-EB`B)$542#!?25`V(B!="B`@=&AE;@H@ -M("`@("!E8VAO(#$@/B`O=F%R+V-A8VAE+V-L;W5D+V1N;&5A7-T96UC=&P@9&ES86)L92!A<&%C:&4R"B`@8VQE86Y?:7!A;&EA -M&%M<&QE+F-O;F8*("!R -M;2`M9B`O971C+V%P86-H93(O26YC;'5D92!P;W)T2!0 -M>71H;VX@0W-!<'`@8V]N9FEG7&XC26YC;'5D92!P;W)T&5S -M($UU;'1I5FEE=W,B+R)/<'1I;VYS("U);F1E>&5S($UU;'1I5FEE=W,B+R`O -M971C+V%P86-H93(O;6]D&5S(B`^("]V87(O=W=W+VAT;6PO+FAT86-C97-S -M"GT*"G-E='5P7V%P86-H93(H*2!["B`@;&]G7VET(")3971T:6YG('5P(&%P -M86-H92!W96(@2!A;F0@;F]T('=OPH@('!U8FQI8U]I<#TD151(,E])4`H@(%L@(B1%5$@R7TE0(B`] -M/2`B,"XP+C`N,"(@72`F)B!P=6)L:6-?:7`])$542#%?25`*("!E8VAO("1P -M=6)L:6-?:7`*?0H*PH@("`@;&]G7VET(")3971T:6YG -M('5P($Y44"(*("`@($Y44%]#3TY&7T9)3$4](B]E=&,O;G1P+F-O;F8B"B`@ -M("!I9B!;("UF("1.5%!?0T].1E]&24Q%(%T*("`@('1H96X*("`@("`@("!) -M1E,])RPG(')E860@+6$@R-S97)V97)?;&ES=%M` -M77TM,2`[(&ET97)A=&]R/CTP(#L@:71E2!A<&%C:&4R -M(B`^("]V87(O8V%C:&4O8VQO=60O96YA8FQE9%]S=F-S"B`@(&5C:&\@(F-L -M;W5D(&YFT-(149?5$U0 -M7T9)3$5]"B`@("`@($-/34U!/2(L7&Y<="(*("`@("`@8V%S92`D2T59(&EN -M"B`@("`@("`@9&ES86)L95]R<%]F:6QT97(I"B`@("`@("`@("`@(&5X<&]R -M="!$25-!0DQ%7U)07T9)3%1%4CTD5D%,544*("`@("`@("`@("`@.SL*("`@ -M("`@("!E=&@P:7`I"B`@("`@("`@("`@(&5X<&]R="!%5$@P7TE0/21604Q5 -M10H@("`@("`@("`@("`[.PH@("`@("`@(&5T:#%I<"D*("`@("`@("`@("`@ -M97AP;W)T($542#%?25`])%9!3%5%"B`@("`@("`@("`@(#L["B`@("`@("`@ -M971H,FEP*0H@("`@("`@("`@("!E>'!O'!O'!O'!O'!O'!O'!O'!O -M'!O'!O'!O -MF4I"B`@("`@("`@("`@(&5X<&]R="!'54535%]#24127U-) -M6D4])%9!3%5%"B`@("`@("`@("`@(#L["B`@("`@("`@'!O'!O -M'!O'!OF4@8VQO=60@<&%S2!S"(B(%T*("!T:&5N"B`@("!E8VAO(")R;V]T.B1635]005-35T]21"(@?"!C -M:'!A6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I="`B4V5T=&EN9R!U<"!D:&-P('-E7-T96T@ -M=FTB"B`@2!A;&QO=R!$3E,@&5C=71E(&1H8W!S7)I9VAT(&]W -M;F5R6]U -M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O -M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W -M=WPH@ -M(&5C:&\@(B0H9&%T92D@)$`B(#X^("]V87(O;&]G+V-L;W5D+FQO9PH@(&QO -M9U]A8W1I;VY?;7-G("(D0"(*?0H*<&%T8V@H*2!["B`@;&]C86P@4$%40TA? -M34]53E0]+VUE9&EA+V-D@H@(&QO8V%L('!R:79K97D])%!!5$-( -M7TU/54Y4+V%U=&AOVUD-69I;&5]*0H@("`@;&]C -M86P@;F5W;60U/0H@("`@6R`M9B`D>W!A=&-H9FEL97T@72`F)B!N97=M9#4] -M)"AM9#5S=6T@)'MP871C:&9I;&5]('P@87=K("=[<')I;G0@)#%])RD*"B`@ -M("!L;V=?:70@(E-CW!A=&-H9FEL97T@72`F)B!;("(D;F5W -M;60U(B`A/2`B(B!="B`@("!T:&5N"B`@("`@('1AF8@)'!A=&-H9FEL -M92`M0R`O"B`@("`@(&5C:&\@)'MN97=M9#5](#X@)'MM9#5F:6QE?0H@("`@ -M("!L;V=?:70@(E!A=&-H960@2`OF5D7VME>7,*("`@(&9I"B`@9FD*"B`@&5C=71I;F<@8VQO=60M96%R -M;'DM8V]N9FEG(@H*("`C($-L96%R("]T;7`@9F]R(&9I;&4@;&]C:PH@(')M -M("UF("]T;7`O*BYL;V-K"B`@6]U -M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC -M('=I=&@@=&AE($QI8V5N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&5N2!T;R!E;G-U'D@:6X@=&AE(')O -M=71I;F<@9&]M86EN"G)E8V]N9FEG7VQB*"D@>PH@(&QO9V=E'D@=&\@<')E=FEO=7,@ -M'DN8V9G+F]L9"`O971C+VAA<')O>'DO:&%P -M2YC9F'DN8V9G+FYE=PH@(&9I"GT*"F=E=%]V -M:69?;&ES="@I('L*("!L;V-A;"!V:69?;&ES=#TB(@H@(&9O7,O8VQA7!E(&]R('!A7!E(&]R('!A2!R96-E -M:79E2!F:7)E=V%L;"!R=6QE2!C;VYF:67!E(&]R('!A2!O -M9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI -M8V5N0H*"F1E9B!M -M97)G92AD8F%G+"!D871A*3H*("`@(&1B86=C(#T@8V]P>2YD965P8V]P>2AD -M8F%G*0H*("`@('!R:6YT(&1B86<*("`@('!R:6YT(&1A=&$*("`@(&EF(")V -M<&Y?=7-E7,H*3H*("`@("`@("!I -M9B!U7,H*2!A;F0@;F]T -M(&%D9#H*("`@("`@("`@("`@9&)A9V-;=7-E6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2D*("`@("`@("`@("`@9&%T82YU -M<&1A=&4H>R)I9"(Z('-E;&8N:V5Y?2D*("`@("`@("!F:6YA;&QY.@H@("`@ -M("`@("`@("!S96QF+F1B86<@/2!D871A"@H@("`@9&5F('-A=F4H2D* -M("`@("`@("`@("`@("`@(&IS;VXN9'5M<"@*("`@("`@("`@("`@("`@("`@ -M("!D8F%G+"!?9F@L"B`@("`@("`@("`@("`@("`@("`@&-E<'0@24]%2`](&ME>0H*"F-L87-S('5P9&%T941A=&%"867!E(#T]("=M;VYI=&]R22AS96QF -M+F1B+F=E=$1A=&%"867!E(#T]("=V<&YU7!E(#T]("=I<&%L:6%S -M97,G.@H@("`@("`@("`@("!S96QF+F1B+G-E=$ME>2@G:7!S)RD*("`@("`@ -M("`@("`@7!E*0H@("`@("`@("`@("!R971U -M2=="B`@ -M("`@("`@9'!;)VYI8U]D979?:60G72`](&1;)V1E=FEC92==6S,Z70H@("`@ -M("`@(&1P6R=N=U]T>7!E)UT@/2`G9W5E4AA8VLN=7!D871E7VYE='=OR=I<%]A9&1R97-S)SH@6V1P72P@)W1Y<&4G.B`G -M:7!S)WTI"B`@("`@("`@:68@)V1O;6%I;E]N86UE)R!N;W0@:6X@9"YK97ES -M*"D@;W(@9%LG9&]M86EN7VYA;64G72`]/2`G)SH*("`@("`@("`@("`@9%LG -M9&]M86EN7VYA;64G72`](")C;&]U9&YI;F4N:6YT97)N86PB"@H@("`@("`@ -M(&0@/2!04AA8VLN=7!D871E7VYE='=O2AS96QF+"!D8F%G*3H*("`@("`@("!R971U2`]("=E=&@G("L@;G5M("L@)VEP)PH@("`@("`@(&1P(#T@>WT*("`@("`@ -M("!I9BAK97D@:6X@5T*("`@("`@("`@("`@9'!;)VYE=&UA7!E(#T] -M(")P=6)L:6,B.@H@("`@("`@("`@("`@("`@9'!;)V=A=&5W87DG72`]('-E -M;&8N<49I;&4N9&%T85LG8VUD7VQI;F4G75LG9V%T97=A>2=="B`@("`@("`@ -M("`@(&5L2==(#T@7!E)SH@)VEP -M2!T;R!D96%L('=I=&@@=&AIPH@("`@("`@("`@("`@("`@ -M)V%D9"7!E(#T@7!E(ET*("`@("`@("`@("`@=7!D871E1&%T84)A9RAS96QF*0H@ -M("`@("`@("`@("!R971U&-E<'1I;VX@97)R;W(@)WMEV9I;&5N86UE?22!B965N(&UO=F5D+B(N9F]R;6%T*&5RV9I;&5N86UE?27!E"@H@("`@9&5F(&=E=$1A=&$HB(*("`@("`@("!W:71H(&]P96XH -M;W)I9U!A=&@L("=R8B7,H*2!E;'-E(&1A -M=&%;)W!U8FQI8U]I<"=="@H@("`@("`@(&EN:71I86Q?9&%T82`](&-L5]I<"AI<"P@:6YI=&EA;%]D871A6R=C;VYF -M:62<@:6X@9&)A9ULG8V]N9FEG)UTN -M:V5Y5]I<"AC;',L(&EP+"!P5]I -M<"`]($9A;'-E"B`@("`@("`@:68@:7`@/3T@<')I=F%T95]G871E=V%Y7VEP -M.@H@("`@("`@("`@("!N97=?:7!?;6%T8VAE5]I<`H*("`@($!C;&%S0`````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````,#`P,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL -M92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2!S=&%T=7,*"F9R;VT@8W,N0W-#;VYF:6<@:6UP;W)T($-S -M0V]N9FEG"F9R;VT@;W!T<&%R7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R -M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T -M"B,*(R`@(&AT='`Z+R]W=WB`D,2!="G1H96X*("`@(&5C:&\@(D9A:6P@ -M=&\@9FEN9"!64$X@<&5E7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2`]('9P;ELG=G!N7W-E2!I;B!D -M8F%G+FME>7,H*2!A;F0@;F]T(&]P.@H@("`@("`@(&1E;"AD8F%G6VME>5TI -M"B`@("!E;'-E.@H@("`@("`@(&1B86=;:V5Y72`]('9P;@H@("`@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H -M='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI -M8V5N2`] -M(')O=71E6R=N971W;W)K)UT*("`@("`@("!D8F%G6VME>5T@/2!R;W5T90H@ -M("`@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R -M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T -M"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ -M=&AE($QI8V5N2`]('9P -M;ELG<&5E71H;VX*(R!, -M:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%3 -M1BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS -M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E -M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!F$EN"@H*<&%S&ES=',H9V5T5&]K96Y&:6QE*"DI.@H@("`@("`@('=I=&@@;W!E -M;BAG9714;VME;D9I;&4H*2P@)W(G*2!A2P@=F%L -M=64@/2!L:6YE+G-T7!E(#T@ -M7!E(#T]("=S96YD7VUY7W!A7-L;V7-L;V7-L;V7-L;V2!I -M<"]P87-S=V]R9%LE7-L;V7-L;V&-E<'0@2V5Y8F]A&-E<'1I -M;VXL(&4Z"B`@("`@("`@0`````````````````````````````````` -M`````````````````````````````````````````````````````````#`P -M,#`W-34`,#`P,36]U -M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC -M('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E -M<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NFEP7V9I;&4B"B`@("!E -M8VAO(")$96QE=&EN9R!D:6%G;F]S=&ECFEP7V9I;&4B -M"F5L6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ -M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N0H*"F1E9B!M97)G92AD8F%G+"!D871A*3H*("`@("(B(B!3:6UP;'D@ -M;W9E&ES='-I;F<@8F%G(&%S+"!T:&4@=VAO;&4@8V]N -M9FEG=7)A=&EO;B!I2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N4EP("@I -M>PH@(&QO8V%L(&EP/20Q"B`@9F]R(&1E=B!I;B!@;',@+3$@+W-Y6]U(&UA>2!N;W0@=7-E('1H -M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N -MWT*("`@("`@("!S96QF+F-H86YG960@/2!;70H@("`@("`@('-E -M;&8N9&5V:6YF;R`]($-S2&5L<&5R+F=E=%]D979I8V5?:6YF;R@I"B`@("`@ -M("`@2@I"B`@("`@("`@("`@(&5L2=="B`@("`@ -M("`@("`@('-L:6YE(#T@(F1H8W`M"P@:7`I"B`@("`@("`@("`@('-E;&8N -M8V]N9BYS96%R8V@H2D*("`@("`@("`@("`@ -M96QS93H*("`@("`@("`@("`@("`@(&QI&-E -M<'0@17AC97!T:6]N(&%S(&4Z"B`@("`@("`@("`@(&QO9V=I;F2!C;VYT2!R96-E:79E($1(0U!.04LN"B`@("`@ -M("`@(R!7:&5N(%9-(&ES(&5X<'5N9V5D+"!I=',@86-T:79E(&QE87-E(&%N -M9"!$2$-0+T1.4R!C;VYF:6<@:7,@<')O<&5R;'D@5LG;6%C7V%D9')E5LG9&5F875L=%]G871E=V%Y -M)UT*"B`@("!D968@861D7VAO6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7!E2`]($9A;'-E"B`@("`@("`@ -M9&5V(#T@)R<*("`@("`@("!F;W(@:6YT97)F86-E(&EN(&EN=&5R9F%C97,Z -M"B`@("`@("`@("`@(&EF(&1E=B`]/2!I;G1E&5C=71E*&-O;6UA;F0I"B`@("`@("`@("`@("`@("!I9B!D9795<#H*("`@ -M("`@("`@("`@("`@("`@("!L;V=G:6YG+FEN9F\H(D1E=FEC92`E65T+"!L970G -M5]I9E]N965D960H"B`@ -M("`@("`@("`@("`@("`B)7,O)7,B("4@*'-E;&8N0U-?5$5-4$Q!5$537T1) -M4BP@5]I9E]N965D960H"B`@("`@("`@("`@("(E -M&5C("1$045-3TX[+RTM97AE8R`D1$%%34].("TM("TM=G)R<#LO9R(@+V5T -M8R]I;FET+F0O:V5E<&%L:79E9"R(L(")] -M(BP@R(L(")](BP@6PH@("`@("`@("`@("`@("`@("`@ -M("`@(DE0=C1?861D&5C=71E*")R;2`M2`S,"!S96-O;F1S"B`@("`@("`@:&5A&ET:6YG -M(B`E("AE&5C=71E -M*"(E&PR='!D -M(BP@(G-T;W`B*0H@("`@("`@($-S2&5L<&5R+G-E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I -M<"@I*2YS=&]P*"D*"B`@("`@("`@&5C=71E*&-M9#(I"B`@("`@("`@("`@(&1E=B`] -M(&EN=&5R9F%C92YG971?9&5V:6-E*"D*"B`@("`@("`@8VUD(#T@(B5S("U# -M("5S(B`E("AS96QF+D-/3DY44D%#2T1?0DE.+"!S96QF+D-/3DY44D%#2T1? -M0T].1BD*("`@("`@("!#&5C=71E*"(E&PR='!D(BP@(G-T;W`B*0H*("`@ -M("`@("!I;G1E&5C=71E*&-M9"D*("`@("`@("`@("`@("`@(&QO9V=I -M;F2D*("`@("`@("`@ -M("`@("`@(&5X8V5P="!%>&-E<'1I;VXZ"B`@("`@("`@("`@("`@("`@("`@ -M;&]G9VEN9RYE&5C=71E*"(E&5C=71E*"(E&PR='!D(BP@(G)E -M2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@("`@ -M("`@("!I9B!G871E=V%Y.@H@("`@("`@("`@("`@("`@("`@(')O=71E+F%D -M9%]R;W5T92AD978L(&=A=&5W87DI"@H@("`@("`@("`@("`C(%1H92!F:7)S -M="!P=6)L:6,@:6YT97)F86-E(&AA&5C=71E -M*")A2!C;VYN=')A8VMD"B`@("`@("`@(B(B"B`@("`@("`@ -M;&EN97,@/2!;70H@("`@("`@(&QI;F5S+F%P<&5N9"@B7'1<=%QT25!V-%]A -M9&1R97-S("5S7&XB("4@(C$R-RXP+C`N,2(I"B`@("`@("`@;&EN97,N87!P -M96YD*")<=%QT7'1)4'8T7V%D9')E7!E(&%N9"!D96-I9&5S(&EF(&ET(&ES(&%N(&EN=&5R -M;F%L(&%D9')E0H@("`@("`@(%1H92!N97<@8V]D92!A -M;'-O(&=I=F5S('1H92!P;W-S:6)I;&ET>2!T;R!C;&]U9'-T86-K('1O(&AA -M=F4@82!H>6)R:60@9&5V:6-E"B`@("`@("`@=&AA="!C;W5L9"!F=6YC=&EO -M;B!A2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N -M;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B971H,2)]"@I3 -M5$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S:"`M8R`@)VEF -M(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@96QS92!E8VAO -M(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@(")V<&-R;W5T -M97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@6R`D,"`]/2!< -M(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ"B`@("`@("`@ -M("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@("`@("`@(&-M -M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U -M8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@("`@("`@;&]G -M9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S(B`E('-T871E -M7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X96-U=&4H7!E*"E=(&%N9"!S=&%T92`]/2`B -M34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE8W5T92AC;60I -M"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@("`@("`@(&5X -M96-U=&4H8VUD*0H*"F1E9B!I&5C=71E*")M;W5N="!T -M;7!F6XH=F%L*3H*("`@(&EF('9A;#H*("`@("`@("!R -M971U&5C=71E*")I<"!A9&1R('-H;W<@?&=R97`@+78@ -MWT*("`@("`@("`@("`@=&];)VEP)UT@ -M/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A;'-;+3%="B`@ -M("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@("(B(@H@("`@ -M9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G*")3879I;F<@ -M:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C=71E*")S>7-T -M96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I;F7-T96UC=&P@&5C=71E*")K:6QL("U(55`@)7,B -M("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D;G-M87-Q(BP@ -M(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O0`````````````````````````````````````````````` -M`````````````````````````````````````````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E -M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI -M8V5N'1D;G,H*3H*("`@("`@("`@("`@9&YS+F%P<&5N9"AS -M96QF+F1A=&%;)W)O=71E2==(#T@=F%L"@H@("`@9&5F(&=E=%]N971M87-K*'-E;&8I.@H@ -M("`@("`@(",@5V4@;F5E9"!T;R!F:7@@:70@<')O<&5R;'DN($D@:G5S="!A -M9&1E9"!T:&4@:68L(&%S($EA;B!D:60@:6X@&-E<'1I;VXN"B`@("`@("`@:68@)W)O=71E6]U -M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC -M('=I=&@@=&AE($QI8V5N"YS=')I -M<"@I(&9O2!A -M9'9A;F-E9"(L("TQ*0H@("`@("`@(&-R;VXN8V]M;6ET*"D*"B`@("!D968@ -M&-L=61E9%]H96%L=&A?8VAE8VMS(ET*("`@("`@("`@("`@:&-? -M9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K0`````````` -M```````````````````````````````````````````````````````````` -M`````````````````````#`P,#`W-34`,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N7,H*3H*("`@("`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@ -M("`@(R!P2!P&ES=',Z(')U;&4])7,@=&%B;&4])7,B+"!F=ULR72P@;F5W7W)U;&4N -M9V5T7W1A8FQE*"DI"B`@("`@("`@("`@(&5L2`](&9W6S)="B`@("`@("`@("`@("`@("!I9B!F=ULQ72`]/2`B9G)O;G0B -M.@H@("`@("`@("`@("`@("`@("`@(&-P>2`](&-P>2YR97!L86-E*"2DI"B`@("`@("`@("`@("`@("`C(%1H97)E(&%R92!S;VUE -M(&ES3H*("`@("`@("`@ -M("`@=&%B;&4@/2`G)PH@("`@("`@("`@("!F;W(@:2!I;B!O<&5N*"(O971C -M+VEP=&%B;&5S+VEP=&%B;&5S+25S(B`E('1Y<&4I.@H@("`@("`@("`@("`@ -M("`@:68@:2YS=&%R='-W:71H*""`]/2!R=6QE70H* -M"F-L87-S($-S3F5T9FEL=&5R*&]B:F5C="DZ"@H@("`@9&5F(%]?:6YI=%]? -M*'-E;&8I.@H@("`@("`@('-E;&8N7!E)RP@)RTM0`````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```P,#`P-S4U`#`P,#$W-3``,#`P,32!O9B!T:&4@3&EC96YS92!A=`HC"B,@ -M:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&ES=',L(&5L5]P87)A;2D*("`@("`@("!E;'-E -M.@H@("`@("`@("`@("!L;V=G:6YG+FEN9F\H(D%D9&EN9R!R;W5T93H@9&5V -M("(@*R!D978@*R`B('1A8FQE.B`B("L*("`@("`@("`@("`@("`@("`@("`@ -M("`@('1A8FQE("L@(B!N971W;W)K.B`B("L@861D2!P87)A;65T97(@5]P87)A;2D*("`@("`@("!E;'-E.@H@("`@("`@ -M("`@("!L;V=G:6YG+FEN9F\H(D%D9&EN9R!R;W5T93H@9&5V("(@*R!D978@ -M*R`B('1A8FQE.B`B("L*("`@("`@("`@("`@("`@("`@("`@("`@('1A8FQE -M("L@(B!N971W;W)K.B`B("L@861D2DZ"B`@("`@("`@(B(B("!!9&0@82!D969A=6QT(')O=71E"B`@("`@("`@ -M.G!A&-E<'1I;VXH(D=A=&5W87D@8V%N;F]T(&)E($YO;F4N(BD*"B`@ -M("`@("`@:68@0H@("`@("`@("`@("!L;V=G -M:6YG+FEN9F\H(D%D9&EN9R!D969A=6QT(')O=71E(BD*("`@("`@("`@("`@ -M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI -M86YC90HC('=I=&@@=&AE($QI8V5N0`````````````````````` -M```````````````````````````````````````````````````````````` -M`````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI -M86YC90HC('=I=&@@=&AE($QI8V5N'DO:&%P2YC9F'DO:&%P2YC9F2@I"B`@("`@("`@9F]R('@@:6X@8V]N9FEG.@H@("`@("`@("`@("!; -M9FEL93$N87!P96YD*'2A(05!23UA97T-/ -M3D9?5"P@2$%04D]865]#3TY&7U`I"@H@("`@("`@("`@("!P2!O9B!T:&4@3&EC96YS92!A=`HC -M"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG -M971?='EP92@I"B`@("`@("`@5]I9E]N965D960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L -M"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE -M,B]S:71E2DI"B`@("`@("`@("`@(&9I;&4N&5C=71E,B@B7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2AS96QF*3H*("`@("`@("!S96QF+F-O;F9I9R`](%M="B`@("`@("`@ -M"P@;&EN -M92!I;B!E;G5M97)A=&4H%T@/2!R97!L86-E("L@ -M(EQN(@H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!S96%R8V@H"P@;&EN92!I;B!E;G5M97)A=&4H -M"P@;&EN92!I;B!E;G5M97)A=&4H -M2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N0`````````````````````````````````````` -M````````````````````````````````````````````````````````,#`P -M,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N"`](&EN="@G)RYJ;VEN*%MD:6=I="!F;W(@9&EG:70@:6X@9&5V:6-E(&EF -M(&1I9VET+FES9&EG:70H*5TI*0H@("`@("`@("`@("`@("`@:68@9&5V:6-E -M7W-U9F9I>"`\(&QO=V5S=%]D979I8V4Z"B`@("`@("`@("`@("`@("`@("`@ -M;&]W97-T7V1E=FEC92`](&1E=FEC95]S=69F:7@*("`@("`@("`@("`@("`@ -M("`@("!G=65S=%]I;G1E5]C:61R*'-E;&8I.@H@("`@("`@ -M(')E='5R;B`B)7,O)7,B("4@*'-E;&8N9V5T7V=A=&5W87DH*2P@F4@:6X@8FETF4B -M*0H*("`@(&1E9B!G971?9&5V:6-E*'-E;&8I.@H@("`@("`@(')E='5R;B!S -M96QF+F=E=%]A='1R*")D979I8V4B*0H*("`@(&1E9B!G971?8VED7!E)UT@:6X@5E)24%]465!% -M4SH*("`@("`@("`@("`@7!E)UT@:6X@6R=G=65S="==.@H@("`@("`@("`@ -M("!R971U7!E)UT@:6X@6R=P=6)L -M:6,G73H*("`@("`@("`@("`@7-T -M96T*("`@("`@("`B(B(*("`@("`@("!S96QF+F1E=FQIWT*("`@("`@("!S96QF+F%D -M9')E7!E*"D@ -M:6X@6R)P=6)L:6,B72!A;F0@861D2)= -M*0H@("`@("`@("`@("`@("`@&UA7!E)UT*("`@("`@("!R971U&9F9F9F9F9F(ETI"@H@("`@("`@('-E;&8N9G7!E*"D@ -M:6X@6R)P=6)L:6,B73H*("`@("`@("`@("`@7!E*"D@:6X@ -M6R)P=6)L:6,B73H*("`@("`@("`@("`@#4R-"\P>&9F -M9F9F9F9F(B`E("AS96QF+F1E=BP@2)=(&%N9"!S96QF+F%D9')E2)=(&%N9"!S96QF+F%D9')E7!E*"D@:6X@6R)P -M=6)L:6,B72!A;F0@*&YO="!S96QF+F-O;F9I9RYI2!T -M:&4@;6%S=&5R(&)A8VMU<"!F=6YC=&EO;G,*("`@("`@("`@("`@("`@(&EF -M(&YO="!C;61L:6YE+FES7W)E9'5N9&%N="@I.@H@("`@("`@("`@("`@("`@ -M("`@(&EF(&UE=&AO9"`]/2`B861D(CH*("`@("`@("`@("`@("`@("`@("`@ -M("`@0W-087-S=V13=F,HWT*("`@("`@("!C -M;60@/2`H(FEP(&%D9'(@2!K965P86QI -M=F5D(&]R(&YO=`H@("`@("`@("(B(@H@("`@("`@(&EF(")N=U]T>7!E(B!I -M;B!S96QF+F%D9')E2==*0H@ -M("`@("`@(&EF(&YO="!S96QF+F-L+FES7W)E9'5N9&%N="@I(&%N9"`H;F]T -M('-E;&8N861D2==(&]R('-E;&8N861D2==(#T](").;VYE(BDZ"B`@("`@("`@("`@(&-M9"`](")A2!H87!P96X@8G5T(&1I9"`Z*0H@("`@ -M("`@(",@270@;65A;G,@86X@87!A8VAE(&9I;&4@9V]T(&]R<&AA;F5D(&%F -M=&5R(&$@9W5E2@I"@H@("`@9&5F -M(&ES7V=U97-T7V=A=&5W87DH7,O;F5T+V-O7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ -M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E -M(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O -M'!R97-S(&]R(&EM<&QI960N("!3 -M964@=&AE($QI8V5N"(I.@H@("`@("`@("`@("!I=&5M&5C -M=71E*")K:6QL("TY("5S(B`E('!I9"D*"B`@("!D968@9W)E<"AS96QF+"!S -M='(I.@H@("`@("`@(&9O"(I.@H@("`@("`@("`@("!I9B!I+F9I;F0H7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C -M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F -M('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L -M:6-A8FQE(&QA=R!O'!R97-S(&]R -M(&EM<&QI960N("!3964@=&AE($QI8V5N2!O -M9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI -M8V5NWT*("`@("`@("!S96QF+F1B(#T@1&%T -M84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF+F1B+G-A=F4HWT*("`@("`@ -M("!R971U&1I9V5S="@I"@H@("`@9&5F(&=E=%]G871E=V%Y -M*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I;B!S96QF+FED871A*"DZ -M"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A*"E;)V=A=&5W87DG70H@ -M("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G971?=7-E7V5X=%]D;G,H -M'1D;G,G -M70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G971?861V97)T7VEN -M="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN="<@:6X@0`````````````````````````````````````````````````````````` -M````````````````````````````````````````,#`P,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7!E&5C=71E*&-M9"D*("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")! -M9&1E9"!R=6QE("5S(&9O0`````````````````````````````````````````````` -M````````````````````````````````````````````````````````,#`P -M,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET*#(I -M"B`@("!F;W(@;W!T+"!A7,N97AI -M="@R*0H*("`@(&9O&ES=',H9&%T869I;&4I.@H@("`@("`@(&]S -M+G)E;6]V92AD871A9FEL92D*"@ID968@8W)E871E9FEL92AI<"P@9F]L9&5R -M+"!F:6QE+"!D871A*3H*("`@(&1E3H* -M("`@("`@("`@("`@;W,N;6%K961I2!E>&ES=',L('=E(&1O(&ET('1H:7,@=V%Y -M(&9O0H@("`@("`@("`@("!I9B!E+F5R&ET*#$I"B`@("`@("`@ -M:68@;W,N<&%T:"YE>&ES=',H;65T86UA;FEF97-T*3H*("`@("`@("`@("`@ -M9F@@/2!O<&5N*&UE=&%M86YI9F5S="P@(G(K82(I"B`@("`@("`@("`@(&5X -M9FQO8VLH9F@I"B`@("`@("`@("`@(&EF(&9I;&4@;F]T(&EN(&9H+G)E860H -M*3H*("`@("`@("`@("`@("`@(&9H+G=R:71E*&9I;&4@*R`G7&XG*0H@("`@ -M("`@("`@("!U;F9L;V-K*&9H*0H@("`@("`@("`@("!F:"YC;&]S92@I"B`@ -M("`@("`@96QS93H*("`@("`@("`@("`@9F@@/2!O<&5N*&UE=&%M86YI9F5S -M="P@(G&9L;V-K*&9H*0H@("`@("`@("`@("!F -M:"YW&9L;V-K*&9H*0H@("`@9F@N -M=W)I=&4H96YT3H*("`@("`@("!F -M;&]C:RAF:6QE+"!,3T-+7T58*0H@("`@97AC97!T($E/17)R;W(@87,@93H* -M("`@("`@("!P71H;VX*(R!,:6-E;G-E9"!T -M;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@ -M;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* -M(R`@(&AT='`Z+R]W=WFEP9FEL90H*"B,@0W)E871E('II<"!A -MFEP -M7V9I;&5S*&9I;&5S*3H*("`@(&9,:7-T(#T@9FEL97,*("`@(&-O;7!R97-S -M:6]N(#T@>FEP9FEL92Y:25!?1$5&3$%4140*("`@('1I;65?&5C=71E7W-H96QL7W-C3H*("`@("`@("`@ -M("`@("`@("`@("!Z9BYW3H*("`@("`@("!C;&5A;G5P*&9I;&5S7V9R;VU?F8N8VQO&5C=71E7W-H96QL -M7W-C&-E<'0@3U-%#H*("`@("`@("`@("`@9&5L971E7W1M<%]F:6QE7V-M9"`]("=R -M;2`M9B`E3H*("`@("`@("`@("`@9BYC;&]S92@I"B`@("!R971U"YS<&QI -M="AC;60I+"!S=&1E&-E<'0@3U-%&5C=71E(&)A'0H -M>FEP7V9I;&4L(&9I;&5S7V9O=6YD+"!F:6QE"YS<&QI="AC;&5A;G5P7V-M9"DI"@H* -M:68@7U]N86UE7U\@/3T@)U]?;6%I;E]?)SH*("`@(&9I;&5,:7-T(#T@7)I9VAT(&]W -M;F5R6]U -M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O -M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W -M=WW!R -M:6YT("0R.WTG('P@6]U(&UA>2!N -M;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@ -M=&AE($QI8V5N2!T;R!E;G-U2!T;R!I=',@<')E=FEO -M=7,@'D@=&\@<')E=FEO=7,@'DN8V9G+F]L9"`O971C+VAA<')O>'DO:&%P2YC9F'DN8V9G+FYE=PH@(&9I"GT*"@IL;V=G97(@+70@8VQO=60@(B0H8F%S -M96YA;64@)#`I.B!%;G1E'D*'D@2P@8V]N9FEG=7)I -M;F<@9FER97=A;&PB"@HC(&EP=&%B;&5S(&5N=')Y('1O(&5N'D@2`D861D961)<',@ -M)')E;6]V961)<',@)'-T871S27`*"FEF(%L@)#\@+6=T(#`@70IT:&5N"B`@ -M;&]G9V5R("UT(&-L;W5D(")&86EL960@=&\@87!P;'D@9FER97=A;&P@'D@8V]N9FEG(@H@(",@4F5S=&]R92!T:&4@3$(*("!R97-T;W)E7VQB -M"@H@(&QO9V=E&ET(#$@)&QO8VL@)&QO8VME -M9`IE;'-E"B`@(R!296UO=F4@8F%C:V5D=7`@:7!T86)L92!R=6QE6]U(&UA>2!N;W0@=7-E('1H:7,@ -M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E -M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI -M8V5N7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z -M+R]W=WPH@('-U9&\@:7!T86)L97,@+70@;6%N9VQE("U$(%!215)/ -M551)3D<@+6D@)&1E=B`M;2!S=&%T92`M+7-T871E($Y%5R`M:B!#3TY.34%2 -M2R`M+7-E="UM87)K("1T86)L94YO(#(^+V1E=B]N=6QL"@H@('-U9&\@:7`@ -MV1E=CHS?2DI"G1A8FQE3F%M93TB5&%B -M;&5?)&1E=B(*"FEF(%L@)&%C=&EO;B`]/2`G861D)R!="G1H96X*("!P;'5G -M7VYI8PIE;'-E"B`@=6YP;'5G7VYI8PIF:0H````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````&]P="]C;&]U9"]B:6XO:7!S96-T=6YN96PN6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC -M90HC('=I=&@@=&AE($QI8V5N#4R-2(*=G!N:6YM87)K/2(P>#4R-"(*"G5S86=E*"D@>PH@("`@<')I;G1F -M(")5'0@ -M:&]P/B`M3X@+6D@/&EK92!P;VQI -M8WD^("UT(#QI:V4@;&EF971I;64^("U4(#QEPH@('-U9&\@:7!T86)L97,MPH@(&1I2!<"B`@("!P:&%S93(@<&]L:6-Y -M/21ER1R:6=H=&YE='-](B`^/B`D=G!N8V]N -M9F9I;&4@)B8*("!S=61O(&5C:&\@(B`@='EP93UT=6YN96PB(#X^("1V<&YC -M;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!A=71H8GD]VEK96QI9F5T:6UE?7,B(#X^("1V<&YC;VYF9FEL92`F)@H@ -M('-U9&\@96-H;R`B("!E2(@/CX@)'9P;F-O;F9F:6QE -M("8F"B`@2!F;W(@'1H;W`](B1/4%1!4D&ET("1R970*```````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````;W!T+V-L;W5D+V)I;B]I<&%S2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&QO8V%L('!U8DEP -M/20H96-H;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?22!E>&ES -M=',B"GT*"F%D9%]V<&Y?8VAA:6Y?9F]R7VEP("@I('L*("!L;V-A;"!P=6)) -M<#TD*&5C:&\@)#$@?"!A=VL@+48G+R<@)WMPPH@(&QO8V%L('!U8DEP/20H96-H;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?2PH@(&QO8V%L -M('!U8DEP/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R -M:6YT("0Q?2W!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)A -MW!R:6YT("0R?2W!R:6YT("0R -M?25]R;W5T97-?9G)O;5]M86EN("1T86)L94YA;64*(R!.3U1%.B!T:&ES -M("!E;G1R>2!W:6QL(&)E(&1E;&5T960@:68@=&AE(&EN=&5R9F%C92!IW!R:6YT -M("0Q?2PH@(&EF(%L@(B1S9FQA9R(@/3T@(C`B -M(%T*("!T:&5N"B`@("!R971UW!R -M:6YT("0Q?2W!R:6YT("0R?22!I<"!I;F9O(&EN=&\@9FEL92P@ -M=7-E9"!O;B!R961U;F1A;G0@W!R:6YT("0Q?2&ES -M=&EN9TEP36%S:STD*'-U9&\@:7`@861DPH@(&QO8V%L('!U8DEP/20Q -M"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP -M/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)A&ES=&EN9TEP36%S:STD*'-U9&\@:7`@861DPH@("`@(V5N86)L92!R<',@ -M86YD(')F%QN(B`D;G5M*0H@("`@("`@("`@96-H -M;R`D:&5X.PH@("`@("`@("`@(V5N86)L92!R<',*("`@("`@("`@(&5C:&\@ -M)&AE>"`^("]S>7,O8VQA&ET -M("0_("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1!9FQA9R(@/3T@(C$B(%T* -M=&AE;@H@(&%D9%]A;E]I<"`@)'!U8FQI8TEP("`F)@H@(&%D9%]F=U]C:&%I -M;E]F;W)?:7`@)'!U8FQI8TEP"B`@=6YL;V-K7V5X:70@)#\@)&QO8VL@)&QO -M8VME9`IF:0H*:68@6R`B)&9F;&%G(B`]/2`B,2(@72`F)B!;("(D1&9L86&ET("0_("1L;V-K("1L;V-K960* -M9FD*"G5N;&]C:U]E>&ET(#`@)&QO8VL@)&QO8VME9`H````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````!O<'0O8VQO=60O8FEN+VQI;F5?961I="YP>0`````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````,#`P,#2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2UL:6YE(&5D:71I;F<@;V8@8V]N9FEG=7)A=&EO;B!F -M:6QE&%M<&QE('1H97)E)W,@82!D;W5B;&4@97-C87!E(&]F('1H92!B86-K2!M -M871C:&5D(&%L;"!F:6QE3H* -M("`@("XN+B`@(&]S+G5N;&EN:R@G9&]C=&5S="UV:&]S=',N8V]N9B55N=7-E9$QO8V%L"B`@ -M("`@("`@("`@('-T870@/2!.;VYE"B`@("`@("`@("`@('=I=&@@;W!E;BAS -M96QF+F9I;&5N86UE+"`G&-E<'1I;VXH -M(DUA9&4@=&]O(&UA;GD@961I=',B*0H@("`@("`@("`@("`@("`@("`@("`@ -M("`@("`@96QI9B!R96UA:6YI;F=?8V]U;G0@/3T@,#H*("`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@("`@("`@ -M("`@("`@("!C:&%N9V5D7VQI;F4L('-U8G,@/2!E9&ET+G!A='1E2AS96QF+F9I;&5N86UE+"!B86-K=7!?9FEL96YA;64I"B`@("`@("`@("`@ -M("`@("!O3H*("`@("`@("`@("`@:68@8VAA;F=E -M9%]F:6QE(&ES(&YO="!.;VYE.B`@("`@("`@("`@("`@("`@("`@("`@("`@ -M("`@("`C(&9A:6QE9"P@8VQE86X@=7`*("`@("`@("`@("`@("`@(&-H86YG -M961?9FEL92YC;&]S92@I"B`@("`@("`@("`@("`@("!O6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC -M90HC('=I=&@@=&AE($QI8V5N2!R=6QE2!O9B!T:&4@3&EC96YS92!A -M=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O -M'!R97-S(&]R(&EM<&QI960N("!3 -M964@=&AE($QI8V5N7,I.@H*("`@(&5X:7-T:6YG7VME>7,@/2!;70H@ -M("`@;F5W7V5T:%]K97D@/2!.;VYE"@H@("`@9F]R(&LQ+"!V,2!I;B!G=65S -M=&YE=%]D:6-T+FET97)I=&5M7,@ -M86YD(&QE;BAV,2D@/B`P.@H@("`@("`@("`@("!E>&ES=&EN9U]K97ES+F%P -M<&5N9"AK,2D*"B`@("!I9B!N;W0@97AI2`Z.B!296UO=FEN9R!G=65S="!N971W;W)K -M+BXN(BD*("`@("`@("!R971U2!T;R!B92!S -M971U<`H@("`@)R2!C;VYF:6=U&ES=',@/2!&86QS90H*("`@(&9O2!P2!C;VYF:6=U2`Z.B!02`Z.B!.;R!'=65S=$YE='=O7,N87)G -M=ELQ72D*("`@('!R;V-E7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=WPH@(&QO8V%L(%]P -M:60])"AP:61O9B!D;G-M87-Q*0H@(&9OW!R:6YT("0R?20H@(&EF(%L@)&EP -M=C0@70H@('1H96X*("`@(&5C:&\@(C`@)&UA8R`D:7!V-"`D:&]S="`J(B`^ -M/B`D1$A#4%],14%315,*("!F:0H@(&EF(%L@)&EP=C8@70H@('1H96X*("`@ -M(&5C:&\@(C`@)&1U:60@)&EP=C8@)&AO6]U(&UA>2!N -M;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@ -M=&AE($QI8V5N&-E<'0@3U-%6]U&-E<'1I;VX@;V-C=7)R960Z("5S(B`E(&4*("`@("`@("`@ -M("`@7!E(#T]("=T0`````````````` -M```````````````````````````````````````````````````````````` -M`````````````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ -M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&-L=61E9%]H96%L=&A?8VAE -M8VMS(ET@/2!D871A6R)E>&-L=61E9%]H96%L=&A?8VAE8VMS(ET*("`@(&EF -M(")H96%L=&A?8VAE8VMS7V-O;F9I9R(@:6X@9&%T83H*("`@("`@("!D8F%G -M6R)H96%L=&A?8VAE8VMS7V-O;F9I9R)=(#T@9&%T85LB:&5A;'1H7V-H96-K -M7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z -M+R]W=WW!R:6YT("0Q?2<*?0H* -M:7!T86)L97-?*"D@>PH@("!L;V-A;"!O<#TD,0H@("!L;V-A;"!P=6)L:6-? -M:7`])#(*("`@;&]C86P@:7-?=G!C/69A;'-E"B`@(&QO8V%L(&9O7-T96UC=&P@:7,M86-T -M:79E(&EPS$N+C5]"B`@("!D;PH@("`@("!L;V=G97(@+70@8VQO -M=60@(B0H8F%S96YA;64@)#`I.B!W86ET:6YG(&EP7-T96UC=&P@:7,M86-T:79E(&EP7-T96UC=&P@:7,M86-T:79E(&EP7-T96UC=&P@&PR='!D"B`@("`@("`@("`@("`@("`@("`@2`Z(%!32R!<(B1I<'-E8U]P -M&PR -M='!D"@H@("!I<'1A8FQEPH@("!L;V-A;"!P=6)L:6-?:7`])#$*"B`@(&EPPH@("!L;V-A;"!U/20Q"B`@(&QO -M8V%L('!A)'4@7"H@7"(D -M<&%S&ET(#(*"0D[.PH@(&5S86,*9&]N90H*:68@6R`B)&1E -M=B(@/3T@(B(@70IT:&5N"B`@("!D978](F5T:#(B"F9I"@II9B!;("(D8VED -M&ET(#(*6R`B)&-R96%T92(@/3T@(C$B(%T@)B8@6R`B)&QF;&%G -M)'!F;&%G)')F;&%G)'-F;&%G(B`A/2`B,3$Q,2(@72`F)B!U&ET(#(*"FEF(%L@(B1CW!R:6YT("0Q?27)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS -M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E -M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,@/2!;)V5T:#$G+"`G971H,B6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2!O9B!T:&4@ -M3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A -M8FQE(&QA=R!O2!O9B!T:&4@9&YS;6%S<2!F:6QE+@IC<"`B)$1( -M0U!?0T].1DE'7TU!24XB("`B)$1(0U!?0T].1DE'7TU!24Y?0D%+(@IC<"`B -M)$1(0U!?0T].1DE'(B`B)$1(0U!?0T].1DE'7T)!2R(*"B-E;7!T>2!T:&4@ -M8V]N9FEG(&9I;&4*96-H;R`^("1$2$-07T-/3D9)1PH*=F%R/2(D,2(*9&AC -M<%]R86YG93TB(@ID:&-P7V=A=&5W87D](B(*9&AC<%]N971M87-K/2(B"F1N -M'1?9&YS/20H96-H -M;R`B)$--1$Q)3D4B('P@9W)E<"`M;R`B=7-E97AT9&YS/71R=64B*0IW:&EL -M92!;("UN("(D=F%R(B!="F1O"B!V87(Q/20H96-H;R`D=F%R('P@8W5T("UF -M,2`M9"`B+2(I"B!R;W5T97)I<#TD*"!E8VAO("1V87(Q('P@8W5T("UF,2`M -M9"`B.B(@*0H@9V%T97=A>3TD*&5C:&\@)'9AV1H8W!?V1H8W!?;F5T;6%S:WTB)V1H8W`M;W!T:6]N/71A9SIR86YG -M92W9A -MVQO9WTB8&=R97`@(EYD:&-P+6]P=&EO;CTV(B`B)$1(0U!?0T].1DE'7TU! -M24XB8")<;B(*;&]G/2(D>VQO9WTB8&=R97`@(EYD:&-P+6]P=&EO;CUO<'1I -M;VXZVQO -M9WTB8&=R97`@(EYD:&-P+7)A;F=E/2(@(B1$2$-07T-/3D9)1U]-04E.(F`B -M7&XB"@II9B!;("(D;&]G(B`A/2`G7&Y<;EQN)R!="G1H96X*("-#;&5A;FEN -M9R!T:&4@97AI9&AC<"UR86YG93TO9"<@(B1$2$-07T-/3D9)1U]-04E.(@IF:0H*(W=R -M=&EN9R!T:&4@;F5W(&-O;F9I9R!I;G1O('1H92!C;VYF:6<@9FEL92X*96-H -M;R`M92`B)&1H8W!?&ET("1R -M97-U;'0@)&QO8VL@)&QO8VME9`H````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````````````````````!O -M<'0O8VQO=60O8FEN+V-S7V1H8W`N<'D````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7,@/2!S970H*0H@("`@("`@(&9O2`A/2`G -M:60G(&%N9"!E;G1R>5LG;6%C7V%D9')E7,N861D*&ME>2D* -M("`@("`@("`@("`@("`@(&)R96%K"@H@("`@("`@(&EF(&1A=&%;)W)E;6]V -M92==(&%N9"!K97D@;F]T(&EN(')E;6]V95]K97ES.@H@("`@("`@("`@("!R -M96UO=F5?:V5Y2!I -M;B!R96UO=F5?:V5Y5TI"@H@("`@("`@(&1B86=;9&%T85LG:7!V-%]A9&1R97-S)UU=(#T@9&%T -M80H*("`@(')E='5R;B!D8F%G"@```&]P="]C;&]U9"]B:6XO8W-?8VUD;&EN -M92YP>0`````````````````````````````````````````````````````` -M```````````````````````````````````````````P,#`P-S4U`#`P,#$W -M-3``,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ -M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E -M(&%T"B,*(R`@(&AT='`Z+R]W=W2!O9B!T:&4@ -M3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A -M8FQE(&QA=R!O'!R97-S(&]R(&EM -M<&QI960N("!3964@=&AE($QI8V5N'DN8V9G("]E=&,O:&%P2]H87!R;WAY+F-F9RYO;&0*"B`@;78@)&YE -M=U]C;VYF:6<@+V5T8R]H87!R;WAY+VAA<')O>'DN8V9G"B`@:68@:&%P2`M<"`O=F%R+W)U;B]H87!R;WAY+G!I9"`M9B`O971C+VAA<')O>'DO:&%P -M2YC9F<@+7-F("0H8V%T("]V87(O'DN<&ED*3L@=&AE -M;@H@("`@;&]G9V5R("UT(&-L;W5D(").97<@:&%P2!I;G-T86YC92!S -M=6-C97-S9G5L;'D@;&]A9&5D+"!S=&]P<&EN9R!P'DO:&%P2YC9F<@)&YE=U]C;VYF:6<* -M("`@(&UV("]E=&,O:&%P2]H87!R;WAY+F-F9RYO;&0@+V5T8R]H87!R -M;WAY+VAA<')O>'DN8V9G"B`@("!H87!R;WAY("UP("]V87(O'DN<&ED("UF("]E=&,O:&%P2]H87!R;WAY+F-F9R`M2YP:60I"B`@("!R970],0H@(&9I"@IE>&ET("1R -M970*```````````````````````````````````````````````````````` -M`````````````````````````````````````````````````````')O;W0O -M;6]N:71O71H;VX*(R!,:6-E;G-E9"!T;R!T -M:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE -M"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@ -M(&AT='`Z+R]W=WWT*("`@('!A2`K)UTG*R(@(B`K("=;)RMP2LG -M72<@*R`B("(@*R!M2!O;F4@<&ED(&]R(&YO=`H@("`@:68@97AI=%-T871U6EN9R!F97<@;6]R92!T:6UEWT*("`@(&9A:6QI -M;F=?PH@("`@("`@("`@("`@("`@ -M(G-U8V-EPH@("`@("`@("`@("`@ -M("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EWT@(U-K:7`@WT*("`@(&9A:6QI;F=# -M:&5C:W,@/2!;70H@("`@:68@8VAE8VM4>7!E(#T](")B87-I8R(Z"B`@("`@ -M("`@;6]N:71297-U;'0L(&9A:6QI;F=#:&5C:W,@/2!M;VYI=%!R;V-E&-L=61E(#T@:&-?9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!H8U]D871A(&5L7!E*0H@("`@("`@("`@("`@("`@:68@;&5N*')E="D@ -M/3T@,#H*("`@("`@("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@ -M("`@("`@:68@(G-U8V-E7,N87)G=BD@/3T@,CH*("`@("`@("!I9B!S>7,N -M87)G=ELQ72`]/2`B861V86YC960B.@H@("`@("`@("`@("!M86EN*")A9'9A -M;F-E9"(I"B`@("`@("`@96QI9B!S>7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@ -M("`@("`@("`@("!M86EN*")B87-I8R(I"B`@("`@("`@96QS93H*("`@("`@ -M("`@("`@<')I;G1D*")%7!E(&]F('1E7,N87)G=BD*("`@(&5L0`````` -M```````````````````````````````````````````````````````````` -M```````````````````P,#`P-C0T`#`P,#$W-3``,#`P,371H;VX*(R!,:6-E -M;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@ -M=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ -M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E -M(&%T"B,*(R`@(&AT='`Z+R]W=W'!E8W1E9"`](%M="B`@("`@("`@ -M9&5S=$EP(#T@<&]R=$9O'0L('-R8U!O2!I -M;B!I<%1A8FQE4QI'!E8W1E -M9#H*("`@("`@("`@("`@("`@("`@("!I9B!I<%1A8FQE16YT'!E8W1E9$5N=')Y*2`]/2`M,3H*("`@("`@("`@("`@("`@("`@("`@("`@ -M9F]U;F1!;&P@/2!&86QS90H@("`@("`@("`@("`@("`@("`@("`@("!B4QI2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA -M=R!O'!R97-S(&]R(&EM<&QI960N -M("!3964@=&AE($QI8V5N$UE;6]R>55S86=E(&EN(&AE86QT:%]C -M:&5C:W-?9&%T82`B("L@7`H@("`@("`@("`@("`@(")S>7-T96U4:')E&ET*#`I"@H@("`@;6%X365M;W)Y -M57-A9V4@/2!F;&]A="AD871A6R)M87A-96UO7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@ -M(&UA:6XH*0H````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M'E?8VAE8VLN<'D````````````` -M```````````````````````````````````````````````````````````` -M`````````````#`P,#`V-#0`,#`P,36]U(&UA>2!N;W0@=7-E('1H -M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N -M41A=&$@86YD(")M87AC;VYN -M(B!I;B!H84-F9U-E8W1I;VYS6R)G;&]B86PB73H*("`@("`@("!I9B!H87!R -M;WAY1&%T85LB;6%X8V]N;B)=("$](&AA0V9G4V5C=&EO;G-;(F=L;V)A;")= -M6R)M87AC;VYN(EU;,%TN'E$871A(BD*("`@(&EF(&AA -M<')O>'E$871A(&ES($YO;F4@;W(@;&5N*&AA<')O>'E$871A*2`]/2`P.@H@ -M("`@("`@('!R:6YT(").;R!D871A('!R;W9I9&5D('1O(&-H96-K+"!S:VEP -M<&EN9R(*("`@("`@("!E>&ET*#`I"@H@("`@=VET:"!O<&5N*"(O971C+VAA -M<')O>'DO:&%P2YC9FWT*("`@(&-UWT*("`@(&9O41A=&$L(&AA0V9G4V5C=&EO;G,I"@H@("`@:68@ -M8VAE8VM-87A#;VYN(&%N9"!C:&5C:TQB4G5L97,Z"B`@("`@("`@<')I;G0@ -M(D%L;"!C:&5C:W,@<&%S&ET*#`I"B`@("!E;'-E.@H@ -M("`@("`@(&5X:70H,2D*"@II9B!?7VYA;65?7R`]/2`B7U]M86EN7U\B.@H@ -M("`@:68@;&5N*'-Y7,N87)G=ELQ72`]/2`B -M861V86YC960B.@H@("`@("`@(&UA:6XH*0H````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&ET*#`I"@H@("`@=&5M<&QA=&5697)S:6]N36%T8VAE -M65T('-E='5P(&%T("(@*R!R96QE87-E1FEL92`K7`H@ -M("`@("`@("`@("`@("`@("`B+"!S:VEP<&EN9RXB"B`@("`@("`@96QI9B!E -M>'!E8W1E9"`A/2!F;W5N9#H*("`@("`@("`@("`@<')I;G0@(E1E;7!L871E -M(%9E'!E8W1E9"`K("(L(&9O=6YD.B`B("L@9F]U;F0*("`@("`@ -M("`@("`@=&5M<&QA=&5697)S:6]N36%T8VAE'!E8W1E9"`K("(L(&9O=6YD.B`B("L@9F]U;F0*("`@("`@ -M("`@("`@&ET*#$I"@H*:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH* -M("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A;F0@2\````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````,#`P,#0`````````````````````````` -M```````````````````````````````````````````````P,#`P-C0T`#`P -M,#$W-3``,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS -M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E -M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W3U.;VYE*3H*("`@('=I=&@@ -M;W!E;B@G+W)O;W0O:&5A;'1H7V-H96-K2!I2!I5TN2D@/3T@,#H*("`@("`@("`@("`@("`@(&-O;G1I -M;G5E"B`@("`@("`@("`@(&ME>59A;"`](&5N=')Y+G-P;&ET*"(](BD*("`@ -M("`@("`@("`@:68@;&5N*&ME>59A;"D@/3T@,CH*("`@("`@("`@("`@("`@ -M(&1;:V5Y5F%L6S!=+G-T2]?7VEN:71?7RYP>0`````````````````````````````````````````` -M````````````````````````````````````````,#`P,#8T-``P,#`Q-S4P -M`#`P,#$W-3``,#`P,#`P,#$U-#``,3,V,C4Q-3`S,30`,#$W-S8R`"`P```` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````'5S=&%R("``9&%R2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO -M2!A<'!L:6-A8FQE(&QA=R!O'!R -M97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N0`````````````````````````````````` -M````````````````````````````````````````````````,#`P,#8T-``P -M,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#,Q,S(`,3,V,C4Q-3`S,30`,#$W-S8Q -M`"`P```````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````'5S=&%R("``9&%R2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET -M*#`I"@H@("`@;6EN1&ES:TYE961E9"`](&9L;V%T*&1A=&%;(FUI;D1IF4I("\@,3`R-`H*("`@ -M(&EF("AF6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI -M86YC90HC('=I=&@@=&AE($QI8V5N2!I;7!O7,I(#T](#`Z"B`@("`@ -M("`@<')I;G0@(D%L;"`B("L@7,@ -M87)E(')E86-H86)L92!V:6$@<&EN9R(*("`@("`@("!E>&ET*#`I"B`@("!E -M;'-E.@H@("`@("`@('!R:6YT(")5;G)E86-H86)L92!G871E=V%Y7,N87)G=ELQ72`]/2`B8F%S:6,B -M.@H@("`@("`@(&UA:6XH*0H````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````')O;W0O:&5A;'1H7V-H96-K0`````````````````````````````````````````````````````````` -M```````````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P -M,371H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD -M871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C -M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F -M('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&5C=71A8FQE71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E -M($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H -M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C -M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I -M"@H@("`@=VET:"!O<&5N*"2!O -M9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A -M<'!L:6-A8FQE(&QA=R!O'!R97-S -M(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N$-P=55S86=E(&EN(&AE -M86QT:%]C:&5C:W-?9&%T82!S>7-T96U4:')E&ET*#`I"@H@("`@;6%X0W!U57-A9V4@/2!F;&]A="AD871A -M6R)M87A#<'55&ET*#`I"B`@("!E -M;'-E.@H@("`@("`@('!R:6YT(")&86EL960@=&\@&ET*#$I"@H*:68@7U]N86UE -M7U\@/3T@(E]?;6%I;E]?(CH*("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A -M;F0@0`````````````````````````````````````` -M````````````````````````````````````````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2`]('9-6R)M86-!9&1R97-S(ET@ -M*R`B("(@*R!V35LB:7`B72`K("(@(B`K('9-6R)V;4YA;64B70H@("`@("`@ -M(&9O=6YD16YT2`](%1R=64*("`@("`@("`@("`@("`@(&)R96%K"@H@("`@("`@("`@("!N -M;VY$969A=6QT4V5T(#T@(G-E=#HB("L@=DU;(FEP(ETN2`](%1R=64*("`@("`@ -M("`@("`@("`@(&)R96%K"@H@("`@("`@(&EF(&YO="!F;W5N9$5N=')Y.@H@ -M("`@("`@("`@("!F86EL961#:&5C:R`](%1R=64*("`@("`@("`@("`@9F%I -M;'5R94UE&ET*#$I"B`@("!E;'-E.@H@("`@("`@('!R -M:6YT(")!;&P@(B`K('-T7,N87)G=ELQ72`]/2`B861V86YC960B.@H@("`@("`@(&UA:6XH -M*0H````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````````````````!R;V]T -M+V9U;F,N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P -M.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N -M2!O;F4@;&]C:R!IPH@("`@ -MPH@("`@;&]C:STD,0H*("`@(%]?;&]C:V5D/3`*("`@ -M(%]?5%,]8&1A=&4@*R5S)4Y@"B`@("!?7TQ/0TM$25(](B]T;7`B"B`@("!? -M7TQ/0TM&24Q%/2(D7U],3T-+1$E2+R1?7U13+20D+21L;V-K+FQO8VLB"@H@ -M("`@:68@6R`D,B!="B`@("!T:&5N"B`@("`@("`@7U]424U%3U54/20R"B`@ -M("!E;'-E"B`@("`@("`@7U]424U%3U54/3,P"B`@("!F:0H*("`@(&EF(%L@ -M+64@)%]?3$]#2T9)3$4@70H@("`@=&AE;@H@("`@("`@(&QO9V=EPH@("`@7U],3T-+1$E2/2(O=&UP -M(@H@("`@7U],3T-+1DE,13TB)%]?3$]#2T1)4B\J+20D+20Q+FQO8VLB"B`@ -M("!?7VQO8VME9#TD,@H@("`@:68@6R`B)%]?;&]C:V5D(B`]/2`B,2(@70H@ -M("`@=&AE;@H@("`@("`@(')M("1?7TQ/0TM&24Q%"B`@("!F:0I]"@HC(')E -M;&5A&ET('9A;'5E"B,@ -M)#(@;&]C:R!F:6QE;F%M90HC("0S(&QO8VME9"@Q*2!OF4]8&EP(&%D9'(@2!O9B!T:&4@3&EC96YS92!A=`HC -M"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ -M=&AE($QI8V5N7,O8VQA;65T82UD871A+R@N*UM>+UTI+S\D("`N+B]M -M971A9&%T82\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%="@HC:'1T<#HO -M+SQR;W5T97))4#XO;&%T97-T+V9O;R!A;F0@+BXN+V9O;R\@*'EI96QD(&UE -M=&%D871A+R1)4"]F;V\I"B-A2UZ;VYE+S\D("`N+B]M971A9&%T82\E>U)%34]415]! -M1$12?2]A=F%I;&%B:6QI='DM>F]N92!;3"Q.0RQ14T%="E)E=W)I=&52=6QE -M(%YC;&]U9"UI9&5N=&EF:65R+S\D("`N+B]M971A9&%T82\E>U)%34]415]! -M1$12?2]C;&]U9"UI9&5N=&EF:65R(%M,+$Y#+%%305T*4F5WU)%34]415]!1$12?2]I -M;G-T86YC92UI9"!;3"Q.0RQ14T%="E)E=W)I=&52=6QE(%YL;V-A;"UH;W-T -M;F%M92\_)"`@+BXO;65T861A=&$O)7M214U/5$5?041$4GTO;&]C86PM:&]S -M=&YA;64@6TPL3D,L45-!70I297=R:71E4G5L92!>;&]C86PM:7!V-"\_)"`@ -M+BXO;65T861A=&$O)7M214U/5$5?041$4GTO;&]C86PM:7!V-"!;3"Q.0RQ1 -M4T%="E)E=W)I=&52=6QE(%YP=6)L:6,M:&]S=&YA;64O/R0@("XN+VUE=&%D -M871A+R5[4D5-3U1%7T%$1%)]+W!U8FQI8RUH;W-T;F%M92!;3"Q.0RQ14T%= -M"E)E=W)I=&52=6QE(%YP=6)L:6,M:7!V-"\_)"`@+BXO;65T861A=&$O)7M2 -M14U/5$5?041$4GTO<'5B;&EC+6EP=C0@6TPL3D,L45-!70I297=R:71E4G5L -M92!><'5B;&EC+6ME>7,O/R0@("XN+VUE=&%D871A+R5[4D5-3U1%7T%$1%)] -M+W!U8FQI8RUK97ES(%M,+$Y#+%%305T*4F5W=FTM:60O/R0@ -M("XN+VUE=&%D871A+R5[4D5-3U1%7T%$1%)]+W9M+6ED(%M,+$Y#+%%305T* -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````=F%R+W=W=R]H=&UL+W5S97)D871A+P`` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````````#`P,#`W-34`,#`P,3/dev/null 2>&1 || ${echo} 'cloud_scripts/usr/share/cloud/cloud-scripts.tar': 'MD5 check failed' - ) << \SHAR_EOF -6c9c71f04c38fbbe6031c09a732f525d cloud_scripts/usr/share/cloud/cloud-scripts.tar -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/usr/share/cloud/cloud-scripts.tar'` -ne 696320 && \ - ${echo} "restoration warning: size of 'cloud_scripts/usr/share/cloud/cloud-scripts.tar' is not 696320" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/ips0003.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0003.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0003.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0003.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0003.json' && -{"ip_address": -[{"public_ip":"10.0.3.10", -"source_nat":true, -"add":true, -"one_to_one_nat":false, -"first_i_p":false, -"gateway":"10.0.3.1", -"netmask":"255.255.255.0", -"vif_mac_address":"06:cb:aa:00:00:03", -"nic_dev_id":2, -"new_nic":false}], -"type":"ips"} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0003.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0003.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0003.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0003.json': 'MD5 check failed' - ) << \SHAR_EOF -e8113ca4dc70734a2e07e4cd5aa817e7 cloud_scripts/opt/cloud/testdata/ips0003.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0003.json'` -ne 253 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0003.json' is not 253" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/vmp0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/vmp0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/vmp0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/vmp0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/testdata/vmp0001.json -M>R)I<%]A9&1R97-S(CHB,3/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/vmp0001.json': 'MD5 check failed' - ) << \SHAR_EOF -a3150c6241b311cbfc2180be23d1ddee cloud_scripts/opt/cloud/testdata/vmp0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/vmp0001.json'` -ne 77 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/vmp0001.json' is not 77" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/gn0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/gn0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/gn0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/gn0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/gn0001.json' && -{"add":true, -"mac_address":"02:00:56:36:00:02", -"device":"eth3", -"router_guest_ip":"172.16.1.1", -"router_guest_gateway":"172.16.1.0", -"router_guest_netmask":"255.255.255.0", -"cidr":"24", -"dns":"8.8.8.8,8.8.8.4", -"domain_name":"devcloud.local", -"type":"guestnetwork"} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/gn0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/gn0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/gn0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/gn0001.json': 'MD5 check failed' - ) << \SHAR_EOF -e790842388eb0a3f86ea0dbbcf4608eb cloud_scripts/opt/cloud/testdata/gn0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/gn0001.json'` -ne 267 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/gn0001.json' is not 267" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/dhcp0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/dhcp0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/dhcp0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' && -{ -X "host_name":"VM-58976c22-0832-451e-9ab2-039e9f27e415", -X "mac_address":"02:00:26:c3:00:02", -X "ipv4_address":"172.16.1.102", -X "ipv6_duid":"00:03:00:01:02:00:26:c3:00:02", -X "default_gateway":"172.16.1.1", -X "default_entry":true, -X "type":"dhcpentry" -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/dhcp0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/dhcp0001.json': 'MD5 check failed' - ) << \SHAR_EOF -0f44da4132b56f2ece9b36bab3213f28 cloud_scripts/opt/cloud/testdata/dhcp0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/dhcp0001.json'` -ne 250 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' is not 250" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/acl0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/acl0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/acl0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/acl0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/acl0001.json' && -{ -X "eth2": { -X "device": "eth2", -X "egress_rules": [ -X { -X "allowed": false, -X "cidr": "10.0.6.0/8", -X "first_port": 60, -X "last_port": 60, -X "type": "tcp" -X } -X ], -X "ingress_rules": [ -X { -X "allowed": true, -X "cidr": "10.0.1.0/8", -X "protocol": 41, -X "type": "protocol" -X }, -X { -X "allowed": true, -X "cidr": "10.0.4.0/8", -X "type": "all" -X }, -X { -X "allowed": true, -X "cidr": "10.0.3.0/8", -X "icmp_code": -1, -X "icmp_type": -1, -X "type": "icmp" -X }, -X { -X "allowed": true, -X "cidr": "10.0.2.0/8", -X "first_port": 40, -X "last_port": 40, -X "type": "udp" -X }, -X { -X "allowed": true, -X "cidr": "10.0.1.0/8", -X "first_port": 30, -X "last_port": 30, -X "type": "tcp" -X } -X ], -X "mac_address": "02:00:0d:7b:00:04", -X "nic_ip": "172.16.1.1", -X "nic_netmask": "24", -X "private_gateway_acl": false, -X "type": "networkacl" -X }, -X "id": "networkacl" -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/acl0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/acl0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/acl0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/acl0001.json': 'MD5 check failed' - ) << \SHAR_EOF -1ea2a1b5d6a98bc6c0fc2375de284b17 cloud_scripts/opt/cloud/testdata/acl0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/acl0001.json'` -ne 1405 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/acl0001.json' is not 1405" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/README ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/README' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/README (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/README (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/README' && -Json file used to test the provisioning scripts on virtual appliances -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/README' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/README' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/README failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/README': 'MD5 check failed' - ) << \SHAR_EOF -13e5ecf4d998c3df3cf53485d6f46ee1 cloud_scripts/opt/cloud/testdata/README -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/README'` -ne 70 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/README' is not 70" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/ips0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0001.json' && -{"ip_address": -[{"public_ip":"10.0.2.102", -"source_nat":true, -"add":true, -"one_to_one_nat":false, -"first_i_p":false, -"gateway":"10.0.2.1", -"netmask":"255.255.255.0", -"vif_mac_address":"06:cb:aa:00:00:03", -"nic_dev_id":1, -"new_nic":false}], -"type":"ips"} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0001.json': 'MD5 check failed' - ) << \SHAR_EOF -6f7337aaa605096eef31300afba0f4af cloud_scripts/opt/cloud/testdata/ips0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0001.json'` -ne 254 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0001.json' is not 254" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/test.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/test.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/test.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/test.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/test.sh' && -#!/bin/sh -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -cp /opt/cloud/testdata/* /etc/cloudstack -/opt/cloud/bin/update_config.py cmd_line.json -/opt/cloud/bin/update_config.py gn0001.json -/opt/cloud/bin/update_config.py ips0001.json -/opt/cloud/bin/update_config.py ips0002.json -/opt/cloud/bin/update_config.py ips0003.json -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/test.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/testdata/test.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/test.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/test.sh': 'MD5 check failed' - ) << \SHAR_EOF -7fbb72051fd8d3b66fd481aa51d3debe cloud_scripts/opt/cloud/testdata/test.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/test.sh'` -ne 1062 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/test.sh' is not 1062" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/ips0002.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0002.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0002.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0002.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0002.json' && -{"ip_address": -[{"public_ip":"10.0.2.103", -"source_nat":true, -"add":true, -"one_to_one_nat":false, -"first_i_p":false, -"gateway":"10.0.2.1", -"netmask":"255.255.255.0", -"vif_mac_address":"06:cb:aa:00:00:03", -"nic_dev_id":1, -"new_nic":false}], -"type":"ips"} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0002.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0002.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0002.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0002.json': 'MD5 check failed' - ) << \SHAR_EOF -12aec2bca1d88c499ee0af39c2e20ea1 cloud_scripts/opt/cloud/testdata/ips0002.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0002.json'` -ne 254 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0002.json' is not 254" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/s2s0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/s2s0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/s2s0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/s2s0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/s2s0001.json' && -{ -X "local_public_ip":"172.16.1.1", -X "local_guest_cidr":"172.16.1.0/24", -X "local_public_gateway":"172.16.1.1", -X "peer_gateway_ip":"10.200.200.1", -X "peer_guest_cidr_list":"10.0.0.0/24", -X "esp_policy":"3des-md5", -X "ike_policy":"3des-md5", -X "ipsec_psk":"vpnblabla", -X "ike_lifetime":86400, -X "esp_lifetime":3600, -X "create":true, -X "dpd":false, -X "passive":false, -X "type":"site2sitevpn" -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/s2s0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/s2s0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/s2s0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/s2s0001.json': 'MD5 check failed' - ) << \SHAR_EOF -ff589cb7ab7721a270f4cc703719c917 cloud_scripts/opt/cloud/testdata/s2s0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/s2s0001.json'` -ne 380 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/s2s0001.json' is not 380" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -ip link|grep BROADCAST|grep -v eth0|grep -v eth1|cut -d ":" -f 2 > /tmp/iflist -while read i -do -X ip addr show $i|grep "inet " > /tmp/iplist_$i -X while read line -X do -X ip=`echo $line|cut -d " " -f 2|cut -d "/" -f 1` -X arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 -X arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 -X done < /tmp/iplist_$i -done < /tmp/iflist -sleep 1 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ': 'MD5 check failed' - ) << \SHAR_EOF -023d994f54c0955f160f127c1d85d6ae cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ'` -ne 1177 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' is not 1177" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/checkrouter.sh.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/checkrouter.sh.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/checkrouter.sh.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -STATUS=UNKNOWN -INTERFACE=eth1 -ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g') -if [ $ROUTER_TYPE = "router" ] -then -X ROUTER_STATE=$(ip addr | grep eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi') -X STATUS=$ROUTER_STATE -else -X ROUTER_STATE=$(ip addr | grep $INTERFACE | grep state | awk '{print $9;}') -X if [ $ROUTER_STATE = "UP" ] -X then -X STATUS=MASTER -X elif [ $ROUTER_STATE = "DOWN" ] -X then -X STATUS=BACKUP -X fi -fi -X -echo "Status: ${STATUS}" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/checkrouter.sh.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ': 'MD5 check failed' - ) << \SHAR_EOF -bbd331057760019d05ead01eec5e42aa cloud_scripts/opt/cloud/templates/checkrouter.sh.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ'` -ne 1357 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' is not 1357" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/heartbeat.sh.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/heartbeat.sh.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/heartbeat.sh.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -t=$(date +%s) -echo $t > /ramdisk/rrouter/keepalived.ts -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/heartbeat.sh.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ': 'MD5 check failed' - ) << \SHAR_EOF -c006a52c775a0418870c0c50f0131ee7 cloud_scripts/opt/cloud/templates/heartbeat.sh.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ'` -ne 853 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' is not 853" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/conntrackd.conf.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/conntrackd.conf.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/conntrackd.conf.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# Synchronizer settings -# -Sync { -X Mode FTFW { -X # -X # Size of the resend queue (in objects). This is the maximum -X # number of objects that can be stored waiting to be confirmed -X # via acknoledgment. If you keep this value low, the daemon -X # will have less chances to recover state-changes under message -X # omission. On the other hand, if you keep this value high, -X # the daemon will consume more memory to store dead objects. -X # Default is 131072 objects. -X # -X # ResendQueueSize 131072 -X -X # -X # This parameter allows you to set an initial fixed timeout -X # for the committed entries when this node goes from backup -X # to primary. This mechanism provides a way to purge entries -X # that were not recovered appropriately after the specified -X # fixed timeout. If you set a low value, TCP entries in -X # Established states with no traffic may hang. For example, -X # an SSH connection without KeepAlive enabled. If not set, -X # the daemon uses an approximate timeout value calculation -X # mechanism. By default, this option is not set. -X # -X # CommitTimeout 180 -X -X # -X # If the firewall replica goes from primary to backup, -X # the conntrackd -t command is invoked in the script. -X # This command schedules a flush of the table in N seconds. -X # This is useful to purge the connection tracking table of -X # zombie entries and avoid clashes with old entries if you -X # trigger several consecutive hand-overs. Default is 60 seconds. -X # -X # PurgeTimeout 60 -X -X # Set the acknowledgement window size. If you decrease this -X # value, the number of acknowlegdments increases. More -X # acknowledgments means more overhead as conntrackd has to -X # handle more control messages. On the other hand, if you -X # increase this value, the resend queue gets more populated. -X # This results in more overhead in the queue releasing. -X # The following value is based on some practical experiments -X # measuring the cycles spent by the acknowledgment handling -X # with oprofile. If not set, default window size is 300. -X # -X # ACKWindowSize 300 -X -X # -X # This clause allows you to disable the external cache. Thus, -X # the state entries are directly injected into the kernel -X # conntrack table. As a result, you save memory in user-space -X # but you consume slots in the kernel conntrack table for -X # backup state entries. Moreover, disabling the external cache -X # means more CPU consumption. You need a Linux kernel -X # >= 2.6.29 to use this feature. By default, this clause is -X # set off. If you are installing conntrackd for first time, -X # please read the user manual and I encourage you to consider -X # using the fail-over scripts instead of enabling this option! -X # -X # DisableExternalCache Off -X } -X -X # -X # Multicast IP and interface where messages are -X # broadcasted (dedicated link). IMPORTANT: Make sure -X # that iptables accepts traffic for destination -X # 225.0.0.50, eg: -X # -X # iptables -I INPUT -d 225.0.0.50 -j ACCEPT -X # iptables -I OUTPUT -d 225.0.0.50 -j ACCEPT -X # -X Multicast { -X # -X # Multicast address: The address that you use as destination -X # in the synchronization messages. You do not have to add -X # this IP to any of your existing interfaces. If any doubt, -X # do not modify this value. -X # -X IPv4_address 225.0.0.50 -X -X # -X # The multicast group that identifies the cluster. If any -X # doubt, do not modify this value. -X # -X Group 3780 -X -X # -X # IP address of the interface that you are going to use to -X # send the synchronization messages. Remember that you must -X # use a dedicated link for the synchronization messages. -X # -X IPv4_interface [LINK_IP] -X -X # -X # The name of the interface that you are going to use to -X # send the synchronization messages. -X # -X Interface [LINK_IF] -X -X # The multicast sender uses a buffer to enqueue the packets -X # that are going to be transmitted. The default size of this -X # socket buffer is available at /proc/sys/net/core/wmem_default. -X # This value determines the chances to have an overrun in the -X # sender queue. The overrun results packet loss, thus, losing -X # state information that would have to be retransmitted. If you -X # notice some packet loss, you may want to increase the size -X # of the sender buffer. The default size is usually around -X # ~100 KBytes which is fairly small for busy firewalls. -X # -X SndSocketBuffer 1249280 -X -X # The multicast receiver uses a buffer to enqueue the packets -X # that the socket is pending to handle. The default size of this -X # socket buffer is available at /proc/sys/net/core/rmem_default. -X # This value determines the chances to have an overrun in the -X # receiver queue. The overrun results packet loss, thus, losing -X # state information that would have to be retransmitted. If you -X # notice some packet loss, you may want to increase the size of -X # the receiver buffer. The default size is usually around -X # ~100 KBytes which is fairly small for busy firewalls. -X # -X RcvSocketBuffer 1249280 -X -X # -X # Enable/Disable message checksumming. This is a good -X # property to achieve fault-tolerance. In case of doubt, do -X # not modify this value. -X # -X Checksum on -X } -X # -X # You can specify more than one dedicated link. Thus, if one dedicated -X # link fails, conntrackd can fail-over to another. Note that adding -X # more than one dedicated link does not mean that state-updates will -X # be sent to all of them. There is only one active dedicated link at -X # a given moment. The `Default' keyword indicates that this interface -X # will be selected as the initial dedicated link. You can have -X # up to 4 redundant dedicated links. Note: Use different multicast -X # groups for every redundant link. -X # -X # Multicast Default { -X # IPv4_address 225.0.0.51 -X # Group 3781 -X # IPv4_interface 192.168.100.101 -X # Interface eth3 -X # # SndSocketBuffer 1249280 -X # # RcvSocketBuffer 1249280 -X # Checksum on -X # } -X -X # -X # You can use Unicast UDP instead of Multicast to propagate events. -X # Note that you cannot use unicast UDP and Multicast at the same -X # time, you can only select one. -X # -X # UDP { -X # -X # UDP address that this firewall uses to listen to events. -X # -X # IPv4_address 192.168.2.100 -X # -X # or you may want to use an IPv6 address: -X # -X # IPv6_address fe80::215:58ff:fe28:5a27 -X -X # -X # Destination UDP address that receives events, ie. the other -X # firewall's dedicated link address. -X # -X # IPv4_Destination_Address 192.168.2.101 -X # -X # or you may want to use an IPv6 address: -X # -X # IPv6_Destination_Address fe80::2d0:59ff:fe2a:775c -X -X # -X # UDP port used -X # -X # Port 3780 -X -X # -X # The name of the interface that you are going to use to -X # send the synchronization messages. -X # -X # Interface eth2 -X -X # -X # The sender socket buffer size -X # -X # SndSocketBuffer 1249280 -X -X # -X # The receiver socket buffer size -X # -X # RcvSocketBuffer 1249280 -X -X # -X # Enable/Disable message checksumming. -X # -X # Checksum on -X # } -X -} -X -# -# General settings -# -General { -X # -X # Set the nice value of the daemon, this value goes from -20 -X # (most favorable scheduling) to 19 (least favorable). Using a -X # very low value reduces the chances to lose state-change events. -X # Default is 0 but this example file sets it to most favourable -X # scheduling as this is generally a good idea. See man nice(1) for -X # more information. -X # -X Nice -20 -X -X # -X # Select a different scheduler for the daemon, you can select between -X # RR and FIFO and the process priority (minimum is 0, maximum is 99). -X # See man sched_setscheduler(2) for more information. Using a RT -X # scheduler reduces the chances to overrun the Netlink buffer. -X # -X # Scheduler { -X # Type FIFO -X # Priority 99 -X # } -X -X # -X # Number of buckets in the cache hashtable. The bigger it is, -X # the closer it gets to O(1) at the cost of consuming more memory. -X # Read some documents about tuning hashtables for further reference. -X # -X HashSize 32768 -X -X # -X # Maximum number of conntracks, it should be double of: -X # $ cat /proc/sys/net/netfilter/nf_conntrack_max -X # since the daemon may keep some dead entries cached for possible -X # retransmission during state synchronization. -X # -X HashLimit 131072 -X -X LogFile on -X -X # -X # Syslog: on, off or a facility name (daemon (default) or local0..7) -X # Default: off -X # -X Syslog on -X -X # -X # Lockfile -X # -X LockFile /var/lock/conntrackd.lock -X -X # -X # Unix socket configuration -X # -X UNIX { -X Path /var/run/conntrackd.sock -X Backlog 20 -X } -X -X SocketBufferSize 2097152 -X SocketBufferSizeMaxGrown 8388608 -X -X # -X # Netlink event socket buffer size. If you do not specify this clause, -X # the default buffer size value in /proc/net/core/rmem_default is -X # used. This default value is usually around 100 Kbytes which is -X # fairly small for busy firewalls. This leads to event message dropping -X # and high CPU consumption. This example configuration file sets the -X # size to 2 MBytes to avoid this sort of problems. -X # -X NetlinkBufferSize 2097152 -X -X # -X # The daemon doubles the size of the netlink event socket buffer size -X # if it detects netlink event message dropping. This clause sets the -X # maximum buffer size growth that can be reached. This example file -X # sets the size to 8 MBytes. -X # -X NetlinkBufferSizeMaxGrowth 8388608 -X -X # -X # If the daemon detects that Netlink is dropping state-change events, -X # it automatically schedules a resynchronization against the Kernel -X # after 30 seconds (default value). Resynchronizations are expensive -X # in terms of CPU consumption since the daemon has to get the full -X # kernel state-table and purge state-entries that do not exist anymore. -X # Be careful of setting a very small value here. You have the following -X # choices: On (enabled, use default 30 seconds value), Off (disabled) -X # or Value (in seconds, to set a specific amount of time). If not -X # specified, the daemon assumes that this option is enabled. -X # -X # NetlinkOverrunResync On -X -X # -X # If you want reliable event reporting over Netlink, set on this -X # option. If you set on this clause, it is a good idea to set off -X # NetlinkOverrunResync. This option is off by default and you need -X # a Linux kernel >= 2.6.31. -X # -X # NetlinkEventsReliable Off -X -X # -X # By default, the daemon receives state updates following an -X # event-driven model. You can modify this behaviour by switching to -X # polling mode with the PollSecs clause. This clause tells conntrackd -X # to dump the states in the kernel every N seconds. With regards to -X # synchronization mode, the polling mode can only guarantee that -X # long-lifetime states are recovered. The main advantage of this method -X # is the reduction in the state replication at the cost of reducing the -X # chances of recovering connections. -X # -X # PollSecs 15 -X -X # -X # The daemon prioritizes the handling of state-change events coming -X # from the core. With this clause, you can set the maximum number of -X # state-change events (those coming from kernel-space) that the daemon -X # will handle after which it will handle other events coming from the -X # network or userspace. A low value improves interactivity (in terms of -X # real-time behaviour) at the cost of extra CPU consumption. -X # Default (if not set) is 100. -X # -X # EventIterationLimit 100 -X -X # -X # Event filtering: This clause allows you to filter certain traffic, -X # There are currently three filter-sets: Protocol, Address and -X # State. The filter is attached to an action that can be: Accept or -X # Ignore. Thus, you can define the event filtering policy of the -X # filter-sets in positive or negative logic depending on your needs. -X # You can select if conntrackd filters the event messages from -X # user-space or kernel-space. The kernel-space event filtering -X # saves some CPU cycles by avoiding the copy of the event message -X # from kernel-space to user-space. The kernel-space event filtering -X # is prefered, however, you require a Linux kernel >= 2.6.29 to -X # filter from kernel-space. If you want to select kernel-space -X # event filtering, use the keyword 'Kernelspace' instead of -X # 'Userspace'. -X # -X Filter From Userspace { -X # -X # Accept only certain protocols: You may want to replicate -X # the state of flows depending on their layer 4 protocol. -X # -X Protocol Accept { -X TCP -X SCTP -X DCCP -X UDP -X ICMP # This requires a Linux kernel >= 2.6.31 -X } -X -X # -X # Ignore traffic for a certain set of IP's: Usually all the -X # IP assigned to the firewall since local traffic must be -X # ignored, only forwarded connections are worth to replicate. -X # Note that these values depends on the local IPs that are -X # assigned to the firewall. -X # -X Address Ignore { -X IPv4_address 127.0.0.1 # loopback -X IPv4_address [IGNORE_IP1] -X IPv4_address [IGNORE_IP2] -X IPv4_address [IGNORE_IP3] -X #IPv4_address 192.168.0.100 # virtual IP 1 -X #IPv4_address 192.168.1.100 # virtual IP 2 -X #IPv4_address 192.168.0.1 -X #IPv4_address 192.168.1.1 -X #IPv4_address 192.168.100.100 # dedicated link ip -X # -X # You can also specify networks in format IP/cidr. -X # IPv4_address 192.168.0.0/24 -X # -X # You can also specify an IPv6 address -X # IPv6_address ::1 -X } -X -X # -X # Uncomment this line below if you want to filter by flow state. -X # This option introduces a trade-off in the replication: it -X # reduces CPU consumption at the cost of having lazy backup -X # firewall replicas. The existing TCP states are: SYN_SENT, -X # SYN_RECV, ESTABLISHED, FIN_WAIT, CLOSE_WAIT, LAST_ACK, -X # TIME_WAIT, CLOSED, LISTEN. -X # -X # State Accept { -X # ESTABLISHED CLOSED TIME_WAIT CLOSE_WAIT for TCP -X # } -X } -X -X # default debian service unit file is of Type=notify -X Systemd on -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/conntrackd.conf.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ': 'MD5 check failed' - ) << \SHAR_EOF -13781a8581b74b0cf402c01264bdca48 cloud_scripts/opt/cloud/templates/conntrackd.conf.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ'` -ne 15888 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' is not 15888" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -ROUTER_BIN_PATH="/ramdisk/rrouter" -ROUTER_LOG="${ROUTER_BIN_PATH}/keepalived.log" -STRIKE_FILE="$ROUTER_BIN_PATH/keepalived.strikes" -TS_FILE="$ROUTER_BIN_PATH/keepalived.ts" -CT_FILE="$ROUTER_BIN_PATH/keepalived.ct" -X -checktime=$(date +%s) -hbtime=$(cat $TS_FILE) -diff=$(($checktime - $hbtime)) -X -lastcheck=0 -if [ -e $CT_FILE ] -then -X lastcheck=$(cat $CT_FILE 2>/dev/null) -fi -checkdiff=$(($checktime - $lastcheck)) -if [ $checkdiff -ge 0 ] && [ $checkdiff -lt 30 ] -then -X exit -fi -echo $checktime > $CT_FILE -X -s=0 -if [ $diff -gt 10 ] -then -X if [ -e $STRIKE_FILE ] -X then -X s=$(cat $STRIKE_FILE 2>/dev/null) -X fi -X s=$(($s+1)) -X echo $s > $STRIKE_FILE -X echo "Check time: $checktime, last heartbeat time: $hbtime, time diff: $diff, strike count: $s" >> $ROUTER_LOG -else -X rm -f $STRIKE_FILE -fi -X -if [ $s -gt 3 ] -then -X systemctl stop --now keepalived >> $ROUTER_LOG 2>&1 -X systemctl stop --now conntrackd >> $ROUTER_LOG 2>&1 -X -X #Set fault so we have the same effect as a KeepaliveD fault. -X python /opt/cloud/bin/master.py --fault -X -X pkill -9 keepalived >> $ROUTER_LOG 2>&1 || true -X pkill -9 conntrackd >> $ROUTER_LOG 2>&1 || true -X echo Status: FAULT \(keepalived process is dead\) >> $ROUTER_LOG -X exit -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ': 'MD5 check failed' - ) << \SHAR_EOF -7040d7485f89a97be367132d28af1267 cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ'` -ne 2037 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' is not 2037" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/check_bumpup.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/check_bumpup.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/check_bumpup.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -cat /tmp/rrouter_bumped -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/check_bumpup.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/check_bumpup.sh': 'MD5 check failed' - ) << \SHAR_EOF -ab6cbce5de505d137d05bcae1af8e18a cloud_scripts/opt/cloud/templates/check_bumpup.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/check_bumpup.sh'` -ne 822 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' is not 822" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/keepalived.conf.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/keepalived.conf.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/keepalived.conf.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' && -! Licensed to the Apache Software Foundation (ASF) under one -! or more contributor license agreements. See the NOTICE file -! distributed with this work for additional information -! regarding copyright ownership. The ASF licenses this file -! to you under the Apache License, Version 2.0 (the -! "License"); you may not use this file except in compliance -! with the License. You may obtain a copy of the License at -! -! http://www.apache.org/licenses/LICENSE-2.0 -! -! Unless required by applicable law or agreed to in writing, -! software distributed under the License is distributed on an -! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -! KIND, either express or implied. See the License for the -! specific language governing permissions and limitations -! under the License. -X -global_defs { -X router_id [ROUTER_ID] -} -X -vrrp_script heartbeat { -X script "[RROUTER_BIN_PATH]/heartbeat.sh" -X interval 5 -} -X -vrrp_instance inside_network { -X state BACKUP -X interface eth2 -X virtual_router_id 51 -X nopreempt -X -X advert_int 1 -X -X #use_vmac -X #vmac_xmit_base -X -X authentication { -X auth_type AH -X auth_pass PASS -X } -X -X virtual_ipaddress { -X [ROUTER_IP] brd [BOARDCAST] dev eth2 -X } -X -X track_script { -X heartbeat -X } -X -X notify_backup "/opt/cloud/bin/master.py --backup" -X notify_master "/opt/cloud/bin/master.py --master" -X notify_fault "/opt/cloud/bin/master.py --fault" -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/keepalived.conf.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ': 'MD5 check failed' - ) << \SHAR_EOF -464642e87bbb032071111b84f82ba135 cloud_scripts/opt/cloud/templates/keepalived.conf.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ'` -ne 1429 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' is not 1429" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/prepare_pxe.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/prepare_pxe.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/prepare_pxe.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' && -#!/bin/sh -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# # regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -X -set +u -X -err_exit() { -X echo $1 -X exit 1 -} -X -success() { -X exit 0 -} -X -TFTP_ROOT='/opt/tftpboot' -PXELINUX_CFG_DIR='/opt/tftpboot/pxelinux.cfg' -X -kernel_nfs_path=$1 -kernel_file_name=`basename $kernel_nfs_path` -initrd_nfs_path=$2 -initrd_file_name=`basename $initrd_nfs_path` -tmpt_uuid=$3 -pxe_cfg_filename=$4 -ks_file=$5 -X -kernel_path=$tmpt_uuid/$kernel_file_name -initrd_path=$tmpt_uuid/$initrd_file_name -X -cat > $PXELINUX_CFG_DIR/$pxe_cfg_filename </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh': 'MD5 check failed' - ) << \SHAR_EOF -8b495c4ea50905f4197974ee82e607ba cloud_scripts/opt/cloud/bin/prepare_pxe.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh'` -ne 1792 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' is not 1792" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_forwardingrules.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_forwardingrules.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_forwardingrules.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, rules): -X for rule in rules["rules"]: -X source_ip = rule["source_ip_address"] -X destination_ip = rule["destination_ip_address"] -X revoke = rule["revoke"] -X -X newrule = dict() -X newrule["public_ip"] = source_ip -X newrule["internal_ip"] = destination_ip -X -X if rules["type"] == "staticnatrules": -X newrule["type"] = "staticnat" -X elif rules["type"] == "forwardrules": -X newrule["type"] = "forward" -X newrule["public_ports"] = rule["source_port_range"] -X newrule["internal_ports"] = rule["destination_port_range"] -X newrule["protocol"] = rule["protocol"] -X -X if not revoke: -X if rules["type"] == "staticnatrules": -X dbag[source_ip] = [newrule] -X elif rules["type"] == "forwardrules": -X index = -1 -X if source_ip in dbag.keys(): -X for forward in dbag[source_ip]: -X if ruleCompare(forward, newrule): -X index = dbag[source_ip].index(forward) -X if not index == -1: -X dbag[source_ip][index] = newrule -X else: -X dbag[source_ip].append(newrule) -X else: -X dbag[source_ip] = [newrule] -X else: -X if rules["type"] == "staticnatrules": -X if source_ip in dbag.keys(): -X del dbag[source_ip] -X elif rules["type"] == "forwardrules": -X if source_ip in dbag.keys(): -X index = -1 -X for forward in dbag[source_ip]: -X if ruleCompare(forward, newrule): -X index = dbag[source_ip].index(forward) -X print "removing index %s" % str(index) -X if not index == -1: -X del dbag[source_ip][index] -X -X return dbag -X -X -# Compare function checks only the public side, those must be equal the internal details could change -def ruleCompare(ruleA, ruleB): -X if not ruleA["type"] == ruleB["type"]: -X return False -X if ruleA["type"] == "staticnat": -X return ruleA["public_ip"] == ruleB["public_ip"] -X elif ruleA["type"] == "forward": -X return ruleA["public_ip"] == ruleB["public_ip"] and ruleA["public_ports"] == ruleB["public_ports"] \ -X and ruleA["protocol"] == ruleB["protocol"] -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_forwardingrules.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py': 'MD5 check failed' - ) << \SHAR_EOF -278288da98263d674e9d0d0aecaca56d cloud_scripts/opt/cloud/bin/cs_forwardingrules.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py'` -ne 3239 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' is not 3239" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpc_netusage.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_netusage.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_netusage.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -source /root/func.sh -source /opt/cloud/bin/vpc_func.sh -X -vpnoutmark="0x525" -vpninmark="0x524" -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s -[c|g|r|n|d] [-l ] [-v ] \n" $(basename $0) >&2 -} -X -create_usage_rules () { -X iptables-save|grep "NETWORK_STATS_$ethDev" > /dev/null -X if [ $? -gt 0 ] -X then -X iptables -N NETWORK_STATS_$ethDev > /dev/null; -X iptables -I FORWARD -j NETWORK_STATS_$ethDev > /dev/null; -X iptables -A NETWORK_STATS_$ethDev -o $ethDev -s $vcidr > /dev/null; -X iptables -A NETWORK_STATS_$ethDev -i $ethDev -d $vcidr > /dev/null; -X fi -X return $? -} -X -create_vpn_usage_rules () { -X iptables-save|grep "VPN_STATS_$ethDev" > /dev/null -X if [ $? -gt 0 ] -X then -X iptables -t mangle -N VPN_STATS_$ethDev > /dev/null; -X iptables -t mangle -I FORWARD -j VPN_STATS_$ethDev > /dev/null; -X iptables -t mangle -A VPN_STATS_$ethDev -o $ethDev -m mark --mark $vpnoutmark > /dev/null; -X iptables -t mangle -A VPN_STATS_$ethDev -i $ethDev -m mark --mark $vpninmark > /dev/null; -X fi -X return $? -} -X -remove_usage_rules () { -X return 0 -} -X -get_usage () { -X iptables -L NETWORK_STATS_$ethDev -n -v -x 2> /dev/null | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null -X return 0 -} -X -get_vpn_usage () { -X iptables -t mangle -L VPN_STATS_$ethDev -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null -X if [ $? -gt 0 ] -X then -X printf $? -X return 1 -X fi -} -X -reset_usage () { -X iptables -Z NETWORK_STATS_$ethDev > /dev/null -X if [ $? -gt 0 -a $? -ne 2 ] -X then -X return 1 -X fi -} -X -#set -x -X -cflag= -gflag= -rflag= -lflag= -vflag= -nflag= -dflag= -X -while getopts 'cgndrl:v:' OPTION -do -X case $OPTION in -X c) cflag=1 -X ;; -X g) gflag=1 -X ;; -X r) rflag=1 -X ;; -X l) lflag=1 -X publicIp="$OPTARG" -X ;; -X v) vflag=1 -X vcidr="$OPTARG" -X ;; -X n) nflag=1 -X ;; -X d) dflag=1 -X ;; -X i) #Do nothing, since it's parameter for host script -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -ethDev=$(getEthByIp $publicIp) -if [ "$cflag" == "1" ] -then -X if [ "$ethDev" != "" ] -X then -X create_usage_rules -X create_vpn_usage_rules -X unlock_exit 0 $lock $locked -X fi -fi -X -if [ "$gflag" == "1" ] -then -X get_usage -X unlock_exit $? $lock $locked -fi -X -if [ "$nflag" == "1" ] -then -X #get_vpn_usage -X unlock_exit $? $lock $locked -fi -X -if [ "$dflag" == "1" ] -then -X #remove_usage_rules -X unlock_exit 0 $lock $locked -fi -X -if [ "$rflag" == "1" ] -then -X reset_usage -X unlock_exit $? $lock $locked -fi -X -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_netusage.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh': 'MD5 check failed' - ) << \SHAR_EOF -f3f8069de696e92a24cbc694275c0bd5 cloud_scripts/opt/cloud/bin/vpc_netusage.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh'` -ne 3377 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' is not 3377" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/configure.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/configure.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/configure.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/configure.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/configure.py -M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&-E<'0@24]%2@I"B`@("`@("`@ -M("`@("`@("`@("`@9W5E22R)$;VU57U)E<75E&-E<'0@17AC97!T:6]N(&%S -M(&4Z"B`@("`@("`@("`@("`@("`@("`@;&]G9VEN9RYE7!E)UT@/3T@)V%L;"<@86YD(&]B -M:ELG7!E(#T@(F%N>2(*("`@("`@("`@("`@:68@ -M(FEC;7!?='EP92(@:6X@7,H*2!A;F0@7!E)UT*("`@("`@("`@("`@:68@(FEC -M;7!?8V]D92(@:6X@7,H*2!A;F0@7!E)UTL('-E;&8N7!E("5S("UJ("5S(B`E("AI8VUP7W1Y<&4L('-E;&8N&5C=71E*&1S=$EP2==.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U -M;&5;)V%C=&EO;B==(#T@(D%#0T505"(*("`@("`@("`@("`@("`@("`@("!E -M;'-E.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5;)V%C=&EO -M;B==(#T@(D123U`B"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@ -M("`@("`@("`@(",@1F]R(&]T:&5R(')U;&5S(&%D9&5D+"!I9B!D969A=6QT -M7V5G7!E("5S(B`E(&EC;7!?='EP90H@("`@("`@("`@ -M("`@("`@96QI9B!R=6QE6R=P7!E+B!3;RP@:71S(&9W(&%T=')I8G5T92!I7!E -M(#T@(F%N>2(*("`@("`@("`@("`@("`@('-E;&8N<')O=&]C;VP@/2!S96QF -M+G1Y<&4*("`@("`@("`@("`@("`@(&EF(")I8VUP7W1Y<&4B(&EN(')U;&4N -M:V5Y7!E+"!R=6QE6R=I8VUP7V-O9&4G72D*("`@("`@("`@("`@("`@(&EF('-E -M;&8N='EP92`]/2`B<')O=&]C;VPB.@H@("`@("`@("`@("`@("`@("`@(&EF -M(')U;&5;)W!R;W1O8V]L)UT@/3T@-#$Z"B`@("`@("`@("`@("`@("`@("`@ -M("`@(')U;&5;)W!R;W1O8V]L)UT@/2`B:7!V-B(*("`@("`@("`@("`@("`@ -M("`@("!S96QF+G!R;W1O8V]L(#T@&5C=71E*")I -M<'1A8FQE+4$O:7!T86)L97,@+70@9FEL=&5R("U$+V&5C=71E -M*")I<'-E="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\ -M(&EP&5C=71E*")I<'-E -M="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP2!V86QI9"!D871A"B`@("`@("`@("`@("`@("!I9B!F;VQD97(@(3T@(G5S -M97)D871A(B!A;F0@9F]L9&5R("$](")M971A9&%T82(Z"B`@("`@("`@("`@ -M("`@("`@("`@8V]N=&EN=64*"B`@("`@("`@("`@("`@("!I9B!F:6QE(#T] -M("(B.@H@("`@("`@("`@("`@("`@("`@(&-O;G1I;G5E"@H@("`@("`@("`@ -M("`@("`@7,N97AI="@Q*0H@("`@("`@("`@("!I9B!O2Q!;&QO=UQN1&5N>2!F2!E>&ES=',L('=E(&1O(&ET('1H -M:7,@=V%Y(&9O7,N97AI -M="@Q*0H*("`@("`@("!F:"`](&]P96XH:'1A8V-E2`] -M(")297=R:71E4G5L92!>;65T82UD871A+R@N*RDD("`N+B\B("L@9F]L9&5R -M("L@(B\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%=(@H@("`@("`@("`@ -M("!H=&%C8V5S7,N97AI="@Q -M*2`@(R!&25A-10H@("`@("`@(')E='5R;B!4&ET*#$I("`C($9)6$U%"B`@("`@("`@:7!S96,N=G!N+2@N*BDN8V]N9B(L(&9I;&4I"B`@ -M("`@("`@("`@(&EF(&TZ"B`@("`@("`@("`@("`@("!S96QF+F-O;F9I<',N -M87!P96YD*&TN9W)O=7`H,2DI"@H@("`@("`@(&9O&5C=71E*")I -M<'-E8R!R96QO860B*0H*("`@(&1E9B!C;VYF:6=U#4R-2`M:B!!0T-%4%0B("4@9&5V72D* -M("`@("`@("!F;W(@;F5T(&EN(&]B:ELG<&5E&UA&UA5]I<"=="B`@("`@("`@<&5E7!E/71U;FYE;"(I -M"B`@("`@("`@9FEL92YA9&1E<2@B(&%U=&AB>3US96-R970B*0H@("`@("`@ -M(&9I;&4N861D97$H(B!K97EE>&-H86YG93UI:V4B*0H@("`@("`@(&9I;&4N -M861D97$H(B!I:V4])7,B("4@:6ME<&]L:6-Y*0H@("`@("`@(&9I;&4N861D -M97$H(B!I:V5L:69E=&EM93TE3TS,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1T:6UE;W5T -M/3$R,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1A8W1I;VX]')A;F=E*#,I.@H@("`@("`@("`@ -M("!R97-U;'0@/2!#&5C=71E*"=I<'-E8R!S=&%T=7,@=G!N -M+25S('P@9W)E<"`B)7,B)R`E("AR:6=H='!E97(L('!E97)L:7-T+G-P;&ET -M*"(L(BP@,2E;,%TI*0H@("`@("`@("`@("!I9B!L96XH2P@)R,G*0H@("`@("`@(&EF(&YO="!U&5C=71E*")T9&)D=6UP("]V87(O&5C=71E*"=K:6QL("TY("5S)R`E('!I9"D*"@IC;&%S -M&5C=71E*")S>7-T96UC=&P@2YS96-R971S(B`E("AS96QF+E903D-/3D9$25(I"B`@ -M("`@("`@>&PR='!D8V]N9F9I;&4@/2`B+V5T8R]X;#)T<&0O>&PR='!D+F-O -M;F8B"B`@("`@("`@>&PR='!O<'1I;VYS9FEL92`]("(O971C+W!P<"]O<'1I -M;VYS+GAL,G1P9"(*"B`@("`@("`@;&]C86QI<"`](&]B:ELG;&]C86Q?:7`G -M70H@("`@("`@(&QO8V%L8VED2`Z(%!32R!<(B5S7"(B("4@*&QE9G0L('!S:RDI"B`@ -M("`@("`@&PR='!D8V]N9F9I;&4I"B`@("`@("`@>&PR='!D8V]N9BYA9&1E -M<2@B:7`@&PR='!O<'1I;VYS+F-O;6UI="@I"@H@("`@9&5F(')E;6]T96%C8V5S -M2@I"B`@("`@("`@4EP -M*')U;&5;)W!U8FQI8U]I<"==*0H@("`@("`@(&EN=&5R;F%L7V9W:6YT97)F -M86-E(#T@4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI -M"B`@("`@("`@<'5B;&EC7V9W<&]R=',@/2!S96QF+G!O4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI -M+`H@("`@("`@("`@("`@("`@&UA2(Z"B`@("`@("`@("`@(&9W7W!R97)O=71? -M2(Z"B`@("`@ -M("`@("`@(&9W7W!O2(Z"B`@("`@("`@ -M("`@(&9W7W!O2(Z"B`@("`@ -M("`@("`@(&9W7V]U='!U=%]R=6QE("L]("(@+2UD<&]R="`E2(Z"B`@("`@("`@("`@ -M(&9W7V]U='!U=%]R=6QE("L]("(Z(B`K('-E;&8N<&]R='-4;U-T4EP*')U;&5;)VEN=&5R;F%L7VEP -M)UTI+`H@("`@("`@("`@("`@("`@&9F9F9F9F9F -M("TM8W1M87-K(#!X9F9F9F9F9F8B("4*("`@("`@("`@("`@("`@("`@("`@ -M("`@4EP*')U;&5;(FEN=&5R;F%L -M7VEP(ETI+"!S96QF+F=E=$=U97-T27`H*2E=*0H*"F-L87-S($EP5&%B;&5S -M17AE8W5T;W(Z"@H@("`@8V]N9FEG(#T@3F]N90H*("`@(&1E9B!?7VEN:71? -M7RAS96QF+"!C;VYF:62!PR)P&5C=71OR)P&5C=71OR)P&5C=71O7!E.B`E&5C27!T86)L97,H8V]N9FEG -M*3H*("`@("`@("!L;V=G:6YG+F1E8G5G*")0&5C=71O7,H*3H*("`@("`@("`@ -M("`@97AE8T1A=&%B86&5C -M27!T86)L97,H8V]N9FEG*0H@("`@96QI9B!J&5C27!T86)L -M97,H8V]N9FEG*0H@("`@96QS93H*("`@("`@("!L;V=G:6YG+G=A7!E/25S(B`E("AP/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/configure.py': 'MD5 check failed' - ) << \SHAR_EOF -8987217852a386250687dfce6d0b10be cloud_scripts/opt/cloud/bin/configure.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/configure.py'` -ne 45920 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/configure.py' is not 45920" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_vmp.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vmp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vmp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vmp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_vmp.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=WWT*("`@(')C6R=I9"==(#T@)W9M<&%S/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vmp.py': 'MD5 check failed' - ) << \SHAR_EOF -3e1ea6831cb27eedc825e25bf817cb9c cloud_scripts/opt/cloud/bin/cs_vmp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vmp.py'` -ne 1126 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vmp.py' is not 1126" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# getRouterMonitorResults.sh --- Send the monitor results to Management Server -X -if [ "$1" == "true" ] -then -X python /root/monitorServices.py > /dev/null -fi -X -printf "FAILING CHECKS:\n" -X -if [ -f /root/basic_failing_health_checks ] -then -X echo `cat /root/basic_failing_health_checks` -fi -X -if [ -f /root/advanced_failing_health_checks ] -then -X echo `cat /root/advanced_failing_health_checks` -fi -X -printf "MONITOR RESULTS:\n" -X -echo "{\"basic\":" -if [ -f /root/basic_monitor_results.json ] -then -X echo `cat /root/basic_monitor_results.json` -else -X echo "{}" -fi -echo ",\"advanced\":" -if [ -f /root/advanced_monitor_results.json ] -then -X echo `cat /root/advanced_monitor_results.json` -else -X echo "{}" -fi -X -echo "}" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh': 'MD5 check failed' - ) << \SHAR_EOF -35649a8a1a8339aaa42a311826699849 cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh'` -ne 1526 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' is not 1526" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vr_cfg.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vr_cfg.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vr_cfg.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -#set -x -X -cfg= -version= -log=/var/log/cloud.log -X -log_it() { -X logger -t cloud "$*" -X echo "$(date) : $*" >> $log -} -X -while getopts 'c:' OPTION; do -X case $OPTION in -X c) cfg="$OPTARG" ;; -esac; done -X -export DEFER_CONFIG=true -while read line; do -X #comment -X if [[ $line == \#* ]]; then -X continue -X -X elif [ "$line" == "" ]; then -X read line -X version=$line -X log_it "VR config: configuation format version $version" -X #skip -X read line -X -X elif [ "$line" == " -X read line -X log_it "VR config: execution success " -X -X elif [ "$line" == "" ]; then -X read line -X file=$line -X log_it "VR config: creating file: $file" -X rm -f $file -X while read -r line; do -X if [ "$line" == "" ]; then -X break -X fi -X echo $line >> $file -X done -X log_it "VR config: create file success" -X -X fi -X -done < $cfg -X -# archive the configuration file -mv $cfg /var/cache/cloud/processed/ -X -unset DEFER_CONFIG -# trigger finish_config() -if [ -f /etc/cloudstack/dhcpentry.json ]; then -X /opt/cloud/bin/configure.py vm_dhcp_entry.json -fi -if [ -f /etc/cloudstack/vmdata.json ]; then -X /opt/cloud/bin/configure.py vm_metadata.json -fi -X -# Flush kernel conntrack table -log_it "VR config: Flushing conntrack table" -conntrackd -d 2> /dev/null -if [ $? -eq 0 ]; then -X conntrackd -F -X conntrackd -k -else -X conntrackd -F -fi -log_it "VR config: Flushing conntrack table completed" -X -Xexit 0 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vr_cfg.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vr_cfg.sh': 'MD5 check failed' - ) << \SHAR_EOF -da02bd413616a9cc131fd039e627eb3e cloud_scripts/opt/cloud/bin/vr_cfg.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vr_cfg.sh'` -ne 2725 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' is not 2725" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpc_snat.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_snat.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_snat.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# @VERSION@ -X -source /root/func.sh -source /opt/cloud/bin/vpc_func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage:\n %s -A -l \n" $(basename $0) >&2 -X printf " %s -D -l \n" $(basename $0) >&2 -} -X -X -add_snat() { -X logger -t cloud "$(basename $0):Added SourceNAT $pubIp on interface $ethDev" -X vpccidr=$(getVPCcidr) -X sudo iptables -D FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT -X sudo iptables -A FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT -X sudo iptables -t nat -D POSTROUTING -j SNAT -o $ethDev --to-source $pubIp -X sudo iptables -t nat -A POSTROUTING -j SNAT -o $ethDev --to-source $pubIp -X return $? -} -remove_snat() { -X logger -t cloud "$(basename $0):Removing SourceNAT $pubIp on interface $ethDev" -X sudo iptables -t nat -D POSTROUTING -j SNAT -o $ethDev --to-source $pubIp -X return $? -} -X -#set -x -lflag=0 -cflag=0 -op="" -X -while getopts 'ADl:c:' OPTION -do -X case $OPTION in -X A) Aflag=1 -X op="-A" -X ;; -X D) Dflag=1 -X op="-D" -X ;; -X l) lflag=1 -X pubIp="$OPTARG" -X ;; -X c) cflag=1 -X ethDev="$OPTARG" -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [ "$Aflag$Dflag" != "1" ] -then -X usage -X unlock_exit 2 $lock $locked -fi -X -if [ "$lflag$cflag" != "11" ] -then -X usage -X unlock_exit 2 $lock $locked -fi -X -if [ "$Aflag" == "1" ] -then -X add_snat $publicIp -X unlock_exit $? $lock $locked -fi -X -if [ "$Dflag" == "1" ] -then -X remove_sat $publicIp -X unlock_exit $? $lock $locked -fi -X -unlock_exit 1 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_snat.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_snat.sh': 'MD5 check failed' - ) << \SHAR_EOF -23502a2ce3829fb787464124f13b9141 cloud_scripts/opt/cloud/bin/vpc_snat.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_snat.sh'` -ne 2346 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' is not 2346" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpc_staticroute.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_staticroute.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_staticroute.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# @VERSION@ -X -source /root/func.sh -source /opt/cloud/bin/vpc_func.sh -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s: -a < routes > \n" $(basename $0) >&2 -} -X -#set -x -X -flush_table_backup() { -X flush_table "static_route_back" -} -X -flush_table() { -X local tab=$1 -X sudo ip route flush table $tab -} -X -copy_table() { -X local from=$1 -X local to=$2 -X sudo ip route show table $from | while read route -X do -X sudo ip route add table $to $route -X done -} -X -backup_table() { -X flush_table "static_route_back" -X copy_table "static_route" "static_route_back" -X flush_table "static_route" -} -X -restore_table() { -X flush_table "static_route" -X copy_table "static_route_back" "static_route" -X flush_table "static_route_back" -} -X -static_route() { -X local rule=$1 -X local ip=$(echo $rule | cut -d: -f1) -X if [ $ip == "Revoke" ] -X then -X return 0 -X fi -X local gateway=$(echo $rule | cut -d: -f2) -X local cidr=$(echo $rule | cut -d: -f3) -X logger -t cloud "$(basename $0): static route: public ip=$ip \ -X gateway=$gateway cidr=$cidr" -X local dev=$(getEthByIp $ip) -X if [ $? -gt 0 ] -X then -X return 1 -X fi -X sudo ip route add $cidr dev $dev via $gateway table static_route &>/dev/null -X result=$? -X logger -t cloud "$(basename $0): done static route: public ip=$ip \ -X gateway=$gateway cidr=$cidr" -X return $result -} -X -gflag= -aflag= -while getopts 'a:' OPTION -X -do -X case $OPTION in -X a) aflag=1 -X rules="$OPTARG" -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [ -n "$rules" ] -then -X rules_list=$(echo $rules | cut -d, -f1- --output-delimiter=" ") -fi -X -success=0 -X -backup_table -X -for r in $rules_list -do -X static_route $r -X success=$? -X if [ $success -gt 0 ] -X then -X logger -t cloud "$(basename $0): failure to apply fw rules for guest network: $gcidr" -X break -X else -X logger -t cloud "$(basename $0): successful in applying fw rules for guest network: $gcidr" -X fi -done -X -if [ $success -gt 0 ] -then -X logger -t cloud "$(basename $0): restoring from backup for guest network: $gcidr" -X restore_table -else -X logger -t cloud "$(basename $0): deleting backup for guest network: $gcidr" -X flush_table_backup -fi -unlock_exit $success $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_staticroute.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh': 'MD5 check failed' - ) << \SHAR_EOF -4080c04ff7600874ef4a4364aefc4d18 cloud_scripts/opt/cloud/bin/vpc_staticroute.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh'` -ne 3043 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' is not 3043" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/baremetal-vr.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/baremetal-vr.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/baremetal-vr.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/baremetal-vr.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/baremetal-vr.py -M(TQI8V5N6ME>2<@:6X@<#H*("`@("`@("`@("`@("`@("`@("`@("`@ -M2`]('`N6ME>2!I;B`E0H*("`@(&1E -M9B!?9V5T7VUG;71?:7`H4)AFEP*')E<7,N:V5Y2P@:&%S:%-T5]P/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/baremetal-vr.py': 'MD5 check failed' - ) << \SHAR_EOF -f87e8890aa7ad3cc522c5c5ceb2fbf69 cloud_scripts/opt/cloud/bin/baremetal-vr.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/baremetal-vr.py'` -ne 5587 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/baremetal-vr.py' is not 5587" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_firewallrules.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_firewallrules.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_firewallrules.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import copy -X -X -def merge(dbag, data): -X dbagc = copy.deepcopy(dbag) -X if "rules" not in data: -X return dbagc -X for rule in data['rules']: -X id = str(rule['id']) -X if rule['revoked']: -X if id in dbagc.keys(): -X del(dbagc[id]) -X elif id not in dbagc.keys(): -X dbagc[id] = rule -X return dbagc -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_firewallrules.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py': 'MD5 check failed' - ) << \SHAR_EOF -6d3faf49679b84bf9a098eee6b630f69 cloud_scripts/opt/cloud/bin/cs_firewallrules.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py'` -ne 1141 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' is not 1141" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/netusage.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/netusage.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/netusage.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/netusage.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/netusage.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -X -# netusage.sh -- create iptable rules to gather network stats, running within DomR -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s -[c|g|r] [-[a|d] ]\n" $(basename $0) >&2 -} -X -create_usage_rules () { -X iptables-save|grep "INPUT -j NETWORK_STATS" > /dev/null -X if [ $? -eq 0 ] -X then -X return $? -X fi -X iptables -N NETWORK_STATS > /dev/null -X iptables -I FORWARD -j NETWORK_STATS > /dev/null -X iptables -I INPUT -j NETWORK_STATS > /dev/null -X iptables -I OUTPUT -j NETWORK_STATS > /dev/null -X iptables -A NETWORK_STATS -i eth0 -o eth2 > /dev/null -X iptables -A NETWORK_STATS -i eth2 -o eth0 > /dev/null -X iptables -A NETWORK_STATS -o eth2 ! -i eth0 -p tcp > /dev/null -X iptables -A NETWORK_STATS -i eth2 ! -o eth0 -p tcp > /dev/null -X return $? -} -X -add_public_interface () { -X local pubIf=$1 -X iptables-save|grep "NETWORK_STATS -i eth0 -o $pubIf" > /dev/null -X if [ $? -eq 0 ] -X then -X return $? -X fi -X iptables -A NETWORK_STATS -i eth0 -o $pubIf > /dev/null -X iptables -A NETWORK_STATS -i $pubIf -o eth0 > /dev/null -X iptables -A NETWORK_STATS -o $pubIf ! -i eth0 -p tcp > /dev/null -X iptables -A NETWORK_STATS -i $pubIf ! -o eth0 -p tcp > /dev/null -X return $? -} -X -delete_public_interface () { -X local pubIf=$1 -X echo $pubIf >> /root/removedVifs -X return $? -} -X -get_usage () { -X iptables -L NETWORK_STATS -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null -X if [ -f /root/removedVifs ] ; then iptables -Z NETWORK_STATS ; fi; > /dev/null -X /root/clearUsageRules.sh > /dev/null -X if [ $? -gt 0 -a $? -ne 2 ] -X then -X printf $? -X return 1 -X fi -} -X -reset_usage () { -X iptables -Z NETWORK_STATS > /dev/null -X if [ $? -gt 0 -a $? -ne 2 ] -X then -X return 1 -X fi -} -X -#set -x -X -cflag= -gflag= -rflag= -iflag= -aflag= -dflag= -X -while getopts 'cgria:d:' OPTION -do -X case $OPTION in -X c) cflag=1 -X ;; -X g) gflag=1 -X ;; -X r) rflag=1 -X ;; -X a) aflag=1 -X publicIf="$OPTARG" -X ;; -X d) dflag=1 -X publicIf="$OPTARG" -X ;; -X i) #Do nothing, since it's parameter for host script -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [ "$cflag" == "1" ] -then -X #create_usage_rules -X unlock_exit $? $lock $locked -fi -X -if [ "$gflag" == "1" ] -then -X get_usage -X unlock_exit $? $lock $locked -fi -X -if [ "$rflag" == "1" ] -then -X reset_usage -X unlock_exit $? $lock $locked -fi -X -if [ "$aflag" == "1" ] -then -X #add_public_interface $publicIf -X unlock_exit $? $lock $locked -fi -X -if [ "$dflag" == "1" ] -then -X #delete_public_interface $publicIf -X unlock_exit $? $lock $locked -fi -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/netusage.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/netusage.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/netusage.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/netusage.sh': 'MD5 check failed' - ) << \SHAR_EOF -2966c6cafee62e66ff903e53367b498b cloud_scripts/opt/cloud/bin/netusage.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/netusage.sh'` -ne 3478 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/netusage.sh' is not 3478" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/monitor_service.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/monitor_service.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/monitor_service.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/monitor_service.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/monitor_service.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -set -x -usage() { -X printf "Usage: %s: -c config string \n" $(basename $0) >&2 -} -X -configFile='/etc/monitor.conf' -X -create_config() { -services=$1; -services_list=$(echo $services | cut -d, -f1- --output-delimiter=" "); -X -echo "#Monitor services config" >$configFile -X -for s in $services_list -do -service=$(echo $s | cut -d: -f1); -processname=$(echo $s | cut -d: -f2); -service_name=$(echo $s | cut -d: -f3); -pidfile=$(echo $s | cut -d: -f4); -X -echo "$service" >> $configFile; -echo $processname >> $configFile -echo $service_name >> $configFile -echo $pidfile >> $configFile -X -done -X -} -X -config=$2 -if [ -n "$3" ] -then -X -#delete cron job before updating config file -crontab -l|grep "monitorServices.py" -X -if [ $? -eq 0 ] -then -X t=`date +%s`; -X touch /tmp/monitor-$t.txt; -X conf=/tmp/monitor-$t.txt -X crontab -l >$conf -X sed -i /#monitoringConfig/,+3d $conf -X crontab $conf -X rm $conf -fi -X -X -logger -t cloud "deleted crontab entry for monitoring services" -unlock_exit 0 $lock $locked -fi -X -create_config $config -X -#add cron job -crontab -l|grep "monitorServices.py" -if [ $? -ne 0 ] -X then -X (crontab -l ;echo -e "#monitoringConfig\nSHELL=/bin/bash\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n */3 * * * * /usr/bin/python /root/monitorServices.py") | crontab - -X logger -t cloud "added crontab entry for monitoring services" -fi -X -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/monitor_service.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/monitor_service.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/monitor_service.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/monitor_service.sh': 'MD5 check failed' - ) << \SHAR_EOF -3419e7baf45ac36d3d69ca71ef7ab978 cloud_scripts/opt/cloud/bin/monitor_service.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/monitor_service.sh'` -ne 2294 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/monitor_service.sh' is not 2294" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_ip.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_ip.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_ip.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_ip.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_ip.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N7!E)UT@/2!I<%LG;G=?='EP92==+FQO=V5R*"D*("`@(&EF(&EP -M6R=N=U]T>7!E)UT@/3T@)V-O;G1R;VPG.@H@("`@("`@(&1B86=;:7!;)V1E -M=FEC92==72`](%MI<%T*("`@(&5L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_ip.py': 'MD5 check failed' - ) << \SHAR_EOF -856c6261f2876c280c49fa486f4f7408 cloud_scripts/opt/cloud/bin/cs_ip.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_ip.py'` -ne 2581 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_ip.py' is not 2581" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/bumpup_priority.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/bumpup_priority.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/bumpup_priority.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -touch /tmp/rrouter_bumped -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/bumpup_priority.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh': 'MD5 check failed' - ) << \SHAR_EOF -35091259ed848a9f7270aca1a90e95af cloud_scripts/opt/cloud/bin/bumpup_priority.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh'` -ne 824 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' is not 824" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/getRouterAlerts.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/getRouterAlerts.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/getRouterAlerts.sh (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/getRouterAlerts.sh -M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5LP77T*"B`@("`@("`@("`@ -M("`@("!T;T1A=&5686P])"AD871E("UD("(D9&%T979A;"(@(BLE/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh': 'MD5 check failed' - ) << \SHAR_EOF -6c3803100b0923fd3f9017a0e09d6fd5 cloud_scripts/opt/cloud/bin/getRouterAlerts.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh'` -ne 1706 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh' is not 1706" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/postinit.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/postinit.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/postinit.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# This scripts before ssh.service but after cloud-early-config -X -# Eject cdrom if any -eject || true -X -# Restart journald for setting changes to apply -systemctl restart systemd-journald -X -TYPE=$(grep -Po 'type=\K[a-zA-Z]*' /var/cache/cloud/cmdline) -if [ "$TYPE" == "router" ] || [ "$TYPE" == "vpcrouter" ] || [ "$TYPE" == "dhcpsrvr" ] -then -X if [ -x /opt/cloud/bin/update_config.py ] -X then -X /opt/cloud/bin/update_config.py cmd_line.json || true -X fi -fi -X -[ ! -f /var/cache/cloud/enabled_svcs ] && touch /var/cache/cloud/enabled_svcs -for svc in $(cat /var/cache/cloud/enabled_svcs) -do -X systemctl enable --now --no-block $svc -done -X -[ ! -f /var/cache/cloud/disabled_svcs ] && touch /var/cache/cloud/disabled_svcs -for svc in $(cat /var/cache/cloud/disabled_svcs) -do -X systemctl disable --now --no-block $svc -done -X -# Restore the persistent iptables nat, rules and filters for IPv4 and IPv6 if they exist -ipv4="/etc/iptables/rules.v4" -if [ -e $ipv4 ] -then -X iptables-restore < $ipv4 -fi -X -ipv6="/etc/iptables/rules.v6" -if [ -e $ipv6 ] -then -X ip6tables-restore < $ipv6 -fi -X -# Patch known systemd/sshd memory leak - https://github.com/systemd/systemd/issues/8015#issuecomment-476160981 -echo '@include null' >> /etc/pam.d/systemd-user -X -# Enable and Start SSH -systemctl enable --now --no-block ssh -X -date > /var/cache/cloud/boot_up_done -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/postinit.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/postinit.sh': 'MD5 check failed' - ) << \SHAR_EOF -170afadf6f130e9cb697dca65a87aacb cloud_scripts/opt/cloud/bin/setup/postinit.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/postinit.sh'` -ne 2122 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' is not 2122" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/secstorage.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/secstorage.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/secstorage.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_secstorage() { -X log_it "Setting up secondary storage system vm" -X -X echo "cloud apache2 nfs-common portmap" > /var/cache/cloud/enabled_svcs -X echo "conntrackd keepalived haproxy dnsmasq" > /var/cache/cloud/disabled_svcs -X mkdir -p /var/log/cloud -X -X setup_common eth0 eth1 eth2 -X setup_storage_network -X setup_system_rfc1918_internal -X -X log_it "Setting up entry in hosts" -X sed -i /$NAME/d /etc/hosts -X public_ip=`getPublicIp` -X echo "$public_ip $NAME" >> /etc/hosts -X -X log_it "Applying iptables rules" -X cp /etc/iptables/iptables-secstorage /etc/iptables/rules.v4 -X -X log_it "Configuring sshd" -X local hyp=$HYPERVISOR -X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then -X setup_sshd $ETH1_IP "eth1" -X else -X setup_sshd $ETH0_IP "eth0" -X fi -X -X log_it "Configuring apache2" -X setup_apache2 $ETH2_IP -X -X # Deprecated, should move to Cs Python all of it -X sed -e "s///" \ -X -e "s///" \ -X -e "s/Listen .*:8180/Listen $ETH2_IP:80/g" \ -X -e "s/Listen .*:8443/Listen $ETH2_IP:443/g" /etc/apache2/vhost.template > /etc/apache2/sites-enabled/vhost-${ETH2_IP}.conf -X -X log_it "Setting up apache2 for post upload of volume/template" -X a2enmod proxy -X a2enmod proxy_http -X a2enmod headers -X -X cat >/etc/apache2/cors.conf </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh': 'MD5 check failed' - ) << \SHAR_EOF -14aea171a5e0fdfd3069bb96bde91e0b cloud_scripts/opt/cloud/bin/setup/secstorage.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh'` -ne 2720 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' is not 2720" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/ilbvm.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -ilbvm_svcs() { -X echo "haproxy" > /var/cache/cloud/enabled_svcs -X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs -} -X -setup_ilbvm() { -X log_it "Setting up Internal Load Balancer system vm" -X setup_common eth0 eth1 -X #eth0 = guest network, eth1=control network -X -X sed -i /$NAME/d /etc/hosts -X echo "$ETH0_IP $NAME" >> /etc/hosts -X -X cp /etc/iptables/iptables-ilbvm /etc/iptables/rules.v4 -X setup_sshd $ETH1_IP "eth1" -X -X enable_fwding 0 -X enable_irqbalance 1 -} -X -ilbvm_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute ilbvm svcs" -X exit 1 -fi -setup_ilbvm -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/ilbvm.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh': 'MD5 check failed' - ) << \SHAR_EOF -87c70bdf6c0d4d41f0ff87475494188f cloud_scripts/opt/cloud/bin/setup/ilbvm.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh'` -ne 1442 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' is not 1442" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_vpcrouter() { -X log_it "Setting up VPC virtual router system vm" -X -X if [ -f /etc/hosts ]; then -X grep -q $NAME /etc/hosts || echo "127.0.0.1 $NAME" >> /etc/hosts; -X fi -X -X cat > /etc/network/interfaces << EOF -auto lo eth0 -iface lo inet loopback -EOF -X setup_interface "0" $ETH0_IP $ETH0_MASK $GW -X -X echo $NAME > /etc/hostname -X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon -X hostnamectl set-hostname $NAME -X -X #Nameserver -X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries -X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries -X if [ -n "$internalNS1" ] -X then -X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS1" > /etc/resolv.conf -X fi -X -X if [ -n "$internalNS2" ] -X then -X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS2" >> /etc/resolv.conf -X fi -X if [ -n "$NS1" ] -X then -X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS1" >> /etc/resolv.conf -X fi -X -X if [ -n "$NS2" ] -X then -X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS2" >> /etc/resolv.conf -X fi -X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] -X then -X if [ "$HYPERVISOR" == "vmware" ] || [ "$HYPERVISOR" == "hyperv" ]; -X then -X ip route add $MGMTNET via $LOCAL_GW dev eth0 -X # workaround to activate vSwitch under VMware -X timeout 3 ping -n -c 3 $LOCAL_GW || true -X fi -X fi -X -X ip route delete default -X # create route table for static route -X -X sudo echo "252 static_route" >> /etc/iproute2/rt_tables 2>/dev/null -X sudo echo "251 static_route_back" >> /etc/iproute2/rt_tables 2>/dev/null -X sudo ip rule add from $VPCCIDR table static_route 2>/dev/null -X sudo ip rule add from $VPCCIDR table static_route_back 2>/dev/null -X -X setup_vpc_apache2 -X -X enable_irqbalance 1 -X enable_vpc_rpsrfs 1 -X disable_rpfilter -X enable_fwding 1 -X enable_passive_ftp 1 -X cp /etc/iptables/iptables-vpcrouter /etc/iptables/rules.v4 -X setup_sshd $ETH0_IP "eth0" -X cp /etc/vpcdnsmasq.conf /etc/dnsmasq.conf -X cp /etc/cloud-nic.rules /etc/udev/rules.d/cloud-nic.rules -X echo "" > /etc/dnsmasq.d/dhcphosts.txt -X echo "dhcp-hostsfile=/etc/dhcphosts.txt" > /etc/dnsmasq.d/cloud.conf -X -X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" -X #DNS server will append $DOMAIN to local queries -X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf -X #answer all local domain queries -X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf -X -X command -v dhcp_release > /dev/null 2>&1 -X no_dhcp_release=$? -X if [ $no_dhcp_release -eq 0 ] -X then -X echo 1 > /var/cache/cloud/dnsmasq_managed_lease -X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf -X else -X echo 0 > /var/cache/cloud/dnsmasq_managed_lease -X fi -X -X # Setup hourly logrotate -X if [ -f /etc/cron.daily/logrotate ]; then -X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 -X fi -} -X -routing_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute routing_svcs" -X exit 1 -fi -setup_vpcrouter -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh': 'MD5 check failed' - ) << \SHAR_EOF -811420d11f97b1d7237b964e8bbbdf5d cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh'` -ne 3885 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' is not 3885" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/router.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/router.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/router.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/router.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/router.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -check_reboot_vmware() { -X if [ "$HYPERVISOR" != "vmware" ]; then -X return -X fi -X -X if [ -n "$MGMTNET" ]; then -X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') -X if ping -n -c 1 -W 3 $MGMT_GW &> /dev/null; then -X log_it "Management gateway pingable, skipping VR reboot" -X return -X fi -X fi -X -X log_it "Management gateway not pingable, rebooting VR" -X sync -X reboot -} -X -setup_router() { -X # To save router public interface and gw ip information -X touch /var/cache/cloud/ifaceGwIp -X -X oldmd5= -X [ -f "/etc/udev/rules.d/70-persistent-net.rules" ] && oldmd5=$(md5sum "/etc/udev/rules.d/70-persistent-net.rules" | awk '{print $1}') -X -X if [ -n "$ETH2_IP" ]; then -X setup_common eth0 eth1 eth2 -X -X if [ -n "$EXTRA_PUBNICS" ]; then -X for ((i = 3; i < 3 + $EXTRA_PUBNICS; i++)); do -X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" -X done -X fi -X else -X setup_common eth0 eth1 -X if [ -n "$EXTRA_PUBNICS" ]; then -X for ((i = 2; i < 2 + $EXTRA_PUBNICS; i++)); do -X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" -X done -X fi -X fi -X -X log_it "Checking udev NIC assignment order changes" -X if [ "$NIC_MACS" != "" ] -X then -X init_interfaces_orderby_macs "$NIC_MACS" "/tmp/interfaces" "/tmp/udev-rules" -X newmd5=$(md5sum "/tmp/udev-rules" | awk '{print $1}') -X rm /tmp/interfaces -X rm /tmp/udev-rules -X -X if [ "$oldmd5" != "$newmd5" ] -X then -X log_it "Reloading udev for new udev NIC assignment" -X udevadm control --reload-rules && udevadm trigger -X check_reboot_vmware -X fi -X fi -X -X setup_aesni -X setup_dnsmasq -X setup_apache2 $ETH0_IP -X -X sed -i /$NAME/d /etc/hosts -X echo "$ETH0_IP $NAME" >> /etc/hosts -X -X enable_irqbalance 1 -X disable_rpfilter_domR -X enable_fwding 1 -X enable_rpsrfs 1 -X enable_passive_ftp 1 -X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 -X setup_sshd $ETH1_IP "eth1" -X -X # Only allow DNS service for current network -X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X -X # Setup hourly logrotate -X if [ -f /etc/cron.daily/logrotate ]; then -X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 -X fi -} -X -routing_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute routing_svcs" -X exit 1 -fi -setup_router -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/router.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/router.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/router.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/router.sh': 'MD5 check failed' - ) << \SHAR_EOF -2ae62d5d44c716730231c9d77618fe91 cloud_scripts/opt/cloud/bin/setup/router.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/router.sh'` -ne 3355 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/router.sh' is not 3355" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/elbvm.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/elbvm.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/elbvm.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -elbvm_svcs() { -X echo "haproxy" > /var/cache/cloud/enabled_svcs -X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs -} -X -setup_elbvm() { -X log_it "Setting up Elastic Load Balancer system vm" -X setup_common eth0 eth1 -X sed -i /$NAME/d /etc/hosts -X public_ip=$ETH2_IP -X [ "$ETH2_IP" == "0.0.0.0" ] || [ "$ETH2_IP" == "" ] && public_ip=$ETH0_IP -X echo "$public_ip $NAME" >> /etc/hosts -X -X cp /etc/iptables/iptables-elbvm /etc/iptables/rules.v4 -X if [ "$SSHONGUEST" == "true" ] -X then -X setup_sshd $ETH0_IP "eth0" -X else -X setup_sshd $ETH1_IP "eth1" -X fi -X -X enable_fwding 0 -X enable_irqbalance 0 -} -X -elbvm_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute elbvm svcs" -X exit 1 -fi -setup_elbvm -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/elbvm.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh': 'MD5 check failed' - ) << \SHAR_EOF -2d34615f1d40f6125a2205e6118ba07f cloud_scripts/opt/cloud/bin/setup/elbvm.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh'` -ne 1578 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' is not 1578" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/bootstrap.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" -CMDLINE=/var/cache/cloud/cmdline -X -rm -f /var/cache/cloud/enabled_svcs -rm -f /var/cache/cloud/disabled_svcs -X -X. /lib/lsb/init-functions -X -log_it() { -X echo "$(date) $@" >> /var/log/cloud.log -X log_action_msg "$@" -} -X -hypervisor() { -X if [ -d /proc/xen ]; then -X mount -t xenfs none /proc/xen -X $(dmesg | grep -q "Xen HVM") -X if [ $? -eq 0 ]; then # 1=PV,0=HVM -X echo "xen-hvm" && return 0 -X else -X echo "xen-pv" && return 0 -X fi -X fi -X -X [ -x /usr/sbin/virt-what ] && local facts=( $(virt-what) ) -X if [ "$facts" != "" ]; then -X # Xen HVM is recognized as Hyperv when Viridian extensions are enabled -X if [ "${facts[-1]}" == "xen-domU" ] && [ "${facts[0]}" == "hyperv" ]; then -X echo "xen-hvm" && return 0 -X else -X echo ${facts[-1]} && return 0 -X fi -X fi -X -X grep -q QEMU /proc/cpuinfo && echo "kvm" && return 0 -X grep -q QEMU /var/log/messages && echo "kvm" && return 0 -X -X vmware-checkvm &> /dev/null && echo "vmware" && return 0 -X -X echo "unknown" && return 1 -} -X -config_guest() { -X [ ! -d /proc/xen ] && sed -i 's/^vc/#vc/' /etc/inittab && telinit q -X [ -d /proc/xen ] && sed -i 's/^#vc/vc/' /etc/inittab && telinit q -X -X systemctl daemon-reload -X -X case $HYPERVISOR in -X xen-pv|xen-domU) -X systemctl stop ntpd -X systemctl disable ntpd -X systemctl enable xe-daemon -X systemctl start xe-daemon -X -X cat /proc/cmdline > $CMDLINE -X sed -i "s/%/ /g" $CMDLINE -X ;; -X xen-hvm) -X systemctl stop ntpd -X systemctl disable ntpd -X systemctl enable xe-daemon -X systemctl start xe-daemon -X -X if [ ! -f /usr/bin/xenstore-read ]; then -X log_it "ERROR: xentools not installed, cannot found xenstore-read" && exit 5 -X fi -X /usr/bin/xenstore-read vm-data/cloudstack/init > $CMDLINE -X sed -i "s/%/ /g" $CMDLINE -X ;; -X kvm) -X # Configure kvm hotplug support -X if grep -E 'CONFIG_HOTPLUG_PCI=y|CONFIG_HOTPLUG_PCI_ACPI=y' /boot/config-`uname -r`; then -X log_it "acpiphp and pci_hotplug module already compiled in" -X else -X modprobe acpiphp 2> /dev/null && log_it "acpiphp module loaded" || true -X modprobe pci_hotplug 2> /dev/null && log_it "pci_hotplug module loaded" || true -X fi -X -X sed -i -e "/^s0:2345:respawn.*/d" /etc/inittab -X sed -i -e "/6:23:respawn/a\s0:2345:respawn:/sbin/getty -L 115200 ttyS0 vt102" /etc/inittab -X systemctl enable qemu-guest-agent -X systemctl start qemu-guest-agent -X -X # Wait for $CMDLINE file to be written by the qemu-guest-agent -X for i in {1..60}; do -X if [ -s $CMDLINE ]; then -X log_it "Received a new non-empty cmdline file from qemu-guest-agent" -X break -X fi -X sleep 1 -X done -X if [ ! -s $CMDLINE ]; then -X log_it "Failed to receive the cmdline file via the qemu-guest-agent" -X fi -X ;; -X vmware) -X # system time sync'd with host via vmware tools -X systemctl stop ntpd -X systemctl disable ntpd -X systemctl enable open-vm-tools -X systemctl start open-vm-tools -X -X vmtoolsd --cmd 'machine.id.get' > $CMDLINE -X ;; -X virtualpc|hyperv) -X # Hyper-V is recognized as virtualpc hypervisor type. Boot args are passed using KVP Daemon -X systemctl enable hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service -X systemctl start hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service -X sleep 5 -X cp -f /var/opt/hyperv/.kvp_pool_0 $CMDLINE -X cat /dev/null > /var/opt/hyperv/.kvp_pool_0 -X ;; -X virtualbox) -X # Virtualbox is used to test the virtual router -X # get the commandline from a dmistring (yes, hacky!) -X dmidecode | grep cmdline | sed 's/^.*cmdline://' > $CMDLINE -X RV=$? -X if [ $RV -ne 0 ] ; then -X log_it "Failed to get cmdline from a virtualbox dmi property" -X fi -X ;; -X esac -X -X # Find and export guest type -X export TYPE=$(grep -Po 'type=\K[a-zA-Z]*' $CMDLINE) -} -X -patch_systemvm() { -X local patchfile=$1 -X local backupfolder="/tmp/.conf.backup" -X local logfile="/var/log/patchsystemvm.log" -X if [ -f /usr/local/cloud/systemvm/conf/cloud.jks ]; then -X rm -fr $backupfolder -X mkdir -p $backupfolder -X cp -r /usr/local/cloud/systemvm/conf/* $backupfolder/ -X fi -X rm /usr/local/cloud/systemvm -rf -X mkdir -p /usr/local/cloud/systemvm -X echo "All" | unzip $patchfile -d /usr/local/cloud/systemvm >$logfile 2>&1 -X find /usr/local/cloud/systemvm/ -name \*.sh | xargs chmod 555 -X if [ -f $backupfolder/cloud.jks ]; then -X cp -r $backupfolder/* /usr/local/cloud/systemvm/conf/ -X echo "Restored keystore file and certs using backup" >> $logfile -X fi -X rm -fr $backupfolder -X # Import global cacerts into 'cloud' service's keystore -X keytool -importkeystore -srckeystore /etc/ssl/certs/java/cacerts -destkeystore /usr/local/cloud/systemvm/certs/realhostip.keystore -srcstorepass changeit -deststorepass vmops.com -noprompt || true -X return 0 -} -X -patch() { -X local PATCH_MOUNT=/media/cdrom -X local logfile="/var/log/patchsystemvm.log" -X if [ "$TYPE" == "consoleproxy" ] || [ "$TYPE" == "secstorage" ] && [ -f ${PATCH_MOUNT}/agent.zip ] && [ -f /var/cache/cloud/patch.required ] -X then -X echo "Patching systemvm for cloud service with mount=$PATCH_MOUNT for type=$TYPE" >> $logfile -X patch_systemvm ${PATCH_MOUNT}/agent.zip -X if [ $? -gt 0 ] -X then -X echo "Failed to apply patch systemvm\n" >> $logfile -X exit 1 -X fi -X fi -X -X rm -f /var/cache/cloud/patch.required -X chmod -x /etc/systemd/system/cloud*.service -X systemctl daemon-reload -X umount $PATCH_MOUNT || true -X -X if [ -f /mnt/cmdline ]; then -X cat /mnt/cmdline > $CMDLINE -X fi -X return 0 -} -X -config_sysctl() { -X # When there is more memory reset the cache back pressure to default 100 -X physmem=$(free|awk '/^Mem:/{print $2}') -X if [ $((physmem)) -lt 409600 ]; then -X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 200" /etc/sysctl.conf -X else -X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 100" /etc/sysctl.conf -X fi -X -X sync -X sysctl -p -} -X -bootstrap() { -X log_it "Bootstrapping systemvm appliance" -X -X export HYPERVISOR=$(hypervisor) -X [ $? -ne 0 ] && log_it "Failed to detect hypervisor type, bailing out" && exit 10 -X log_it "Starting guest services for $HYPERVISOR" -X -X config_guest -X patch -X config_sysctl -X -X log_it "Configuring systemvm type=$TYPE" -X if [ -f "/opt/cloud/bin/setup/$TYPE.sh" ]; then -X /opt/cloud/bin/setup/$TYPE.sh -X else -X /opt/cloud/bin/setup/default.sh -X fi -X -X log_it "Finished setting up systemvm" -X exit 0 -} -X -bootstrap -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/bootstrap.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh': 'MD5 check failed' - ) << \SHAR_EOF -722a9c6abfff147c7727fdcd85c96767 cloud_scripts/opt/cloud/bin/setup/bootstrap.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh'` -ne 7721 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' is not 7721" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_console_proxy() { -X log_it "Setting up console proxy system vm" -X -X echo "cloud" > /var/cache/cloud/enabled_svcs -X echo "haproxy dnsmasq apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs -X mkdir -p /var/log/cloud -X -X setup_common eth0 eth1 eth2 -X setup_system_rfc1918_internal -X -X log_it "Setting up entry in hosts" -X sed -i /$NAME/d /etc/hosts -X public_ip=`getPublicIp` -X echo "$public_ip $NAME" >> /etc/hosts -X -X log_it "Applying iptables rules" -X cp /etc/iptables/iptables-consoleproxy /etc/iptables/rules.v4 -X -X log_it "Configuring sshd" -X local hyp=$HYPERVISOR -X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then -X setup_sshd $ETH1_IP "eth1" -X else -X setup_sshd $ETH0_IP "eth0" -X fi -X -X disable_rpfilter -X enable_fwding 0 -X enable_irqbalance 0 -X rm -f /etc/logrotate.d/cloud -} -X -setup_console_proxy -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh': 'MD5 check failed' - ) << \SHAR_EOF -44adac9bf5e54d4791da00e3d1bdaf46 cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh'` -ne 1658 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' is not 1658" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/common.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/common.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/common.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/common.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/common.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" -X -X. /lib/lsb/init-functions -X -log_it() { -X echo "$(date) $@" >> /var/log/cloud.log -X log_action_msg "$@" -} -X -init_interfaces_orderby_macs() { -X macs=( $(echo $1 | sed "s/|/ /g") ) -X total_nics=${#macs[@]} -X interface_file=${2:-"/etc/network/interfaces"} -X rule_file=${3:-"/etc/udev/rules.d/70-persistent-net.rules"} -X -X echo -n "auto lo" > $interface_file -X for((i=0; i> $interface_file -X fi -X done -X -X cat >> $interface_file << EOF -X -iface lo inet loopback -X -EOF -X -X echo "" > $rule_file -X for((i=0; i < ${#macs[@]}; i++)) -X do -X echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${macs[$i]}\", NAME=\"eth$i\"" >> $rule_file -X done -} -X -init_interfaces() { -X if [ "$NIC_MACS" == "" ] -X then -X cat > /etc/network/interfaces << EOF -auto lo $1 $2 $3 -iface lo inet loopback -X -EOF -X else -X init_interfaces_orderby_macs "$NIC_MACS" -X fi -} -X -setup_interface() { -X local intfnum=$1 -X local ip=$2 -X local mask=$3 -X local gw=$4 -X local force=$5 -X local intf=eth${intfnum} -X local bootproto="static" -X -X if [ "$BOOTPROTO" == "dhcp" ] -X then -X if [ "$intfnum" != "0" ] -X then -X bootproto="dhcp" -X fi -X fi -X -X if [ "$ip" != "0.0.0.0" -a "$ip" != "" -o "$force" == "force" ] -X then -X echo "iface $intf inet $bootproto" >> /etc/network/interfaces -X if [ "$bootproto" == "static" ] -X then -X echo " address $ip " >> /etc/network/interfaces -X echo " netmask $mask" >> /etc/network/interfaces -X fi -X fi -X -X if [ "$ip" == "0.0.0.0" -o "$ip" == "" ] -X then -X ifconfig $intf down -X fi -X -X if [ "$force" == "force" ] -X then -X ifdown $intf -X else -X ifdown $intf -X if [ "$RROUTER" != "1" -o "$1" != "2" ] -X then -X ifup $intf -X fi -X fi -} -X -setup_interface_ipv6() { -X sysctl net.ipv6.conf.all.disable_ipv6=0 -X sysctl net.ipv6.conf.all.forwarding=1 -X sysctl net.ipv6.conf.all.accept_ra=1 -X -X sed -i "s/net.ipv6.conf.all.disable_ipv6 =.*$/net.ipv6.conf.all.disable_ipv6 = 0/" /etc/sysctl.conf -X sed -i "s/net.ipv6.conf.all.forwarding =.*$/net.ipv6.conf.all.forwarding = 1/" /etc/sysctl.conf -X sed -i "s/net.ipv6.conf.all.accept_ra =.*$/net.ipv6.conf.all.accept_ra = 1/" /etc/sysctl.conf -X -X local intfnum=$1 -X local ipv6="$2" -X local prelen="$3" -X local intf=eth${intfnum} -X -X echo "iface $intf inet6 static" >> /etc/network/interfaces -X echo " address $ipv6 " >> /etc/network/interfaces -X echo " netmask $prelen" >> /etc/network/interfaces -X echo " accept_ra 1" >> /etc/network/interfaces -X ifdown $intf -X ifup $intf -} -X -X -enable_fwding() { -X local enabled=$1 -X log_it "cloud: enable_fwding = $1" -X log_it "enable_fwding = $1" -X echo "$1" > /proc/sys/net/ipv4/ip_forward -X [ -f /etc/iptables/iptables.conf ] && sed -i "s/ENABLE_ROUTING=.*$/ENABLE_ROUTING=$enabled/" /etc/iptables/iptables.conf && return -} -X -enable_passive_ftp() { -X log_it "cloud: enabling passive FTP for guest VMs" -X echo "$1" > /proc/sys/net/netfilter/nf_conntrack_helper -} -X -disable_rpfilter() { -X log_it "cloud: disable rp_filter" -X log_it "disable rpfilter" -X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf -} -X -get_public_vif_list() { -X local vif_list="" -X for i in /sys/class/net/eth*; do -X vif=$(basename $i); -X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] -X then -X vif_list="$vif_list $vif"; -X fi -X done -X -X echo $vif_list -} -X -disable_rpfilter_domR() { -X log_it "cloud: Tuning rp_filter on public interfaces" -X -X VIF_LIST=$(get_public_vif_list) -X log_it "rpfilter public interfaces : $VIF_LIST" -X if [ "$DISABLE_RP_FILTER" == "true" ] -X then -X log_it "cloud: disable rp_filter on public interfaces" -X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf -X echo "0" > /proc/sys/net/ipv4/conf/default/rp_filter -X for vif in $VIF_LIST; do -X log_it "cloud: disable rp_filter on public interface: $vif" -X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 0/" /etc/sysctl.conf -X echo "0" > /proc/sys/net/ipv4/conf/$vif/rp_filter -X done -X else -X log_it "cloud: enable rp_filter on public interfaces" -X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 1/" /etc/sysctl.conf -X echo "1" > /proc/sys/net/ipv4/conf/default/rp_filter -X for vif in $VIF_LIST; do -X log_it "cloud: enable rp_filter on public interface: $vif" -X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 1/" /etc/sysctl.conf -X echo "1" > /proc/sys/net/ipv4/conf/$vif/rp_filter -X done -X fi -X log_it "cloud: Enabling rp_filter on Non-public interfaces(eth0,eth1,lo)" -X echo "1" > /proc/sys/net/ipv4/conf/eth0/rp_filter -X echo "1" > /proc/sys/net/ipv4/conf/eth1/rp_filter -X echo "1" > /proc/sys/net/ipv4/conf/lo/rp_filter -} -X -enable_irqbalance() { -X local enabled=$1 -X local proc=0 -X -X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) -X if [ $proc -le 1 ] && [ $enabled -eq 1 ] -X then -X enabled=0 -X fi -X -X log_it "Processors = $proc Enable service ${svc} = $enabled" -X local cfg=/etc/default/irqbalance -X [ -f $cfg ] && sed -i "s/ENABLED=.*$/ENABLED=$enabled/" $cfg && return -} -X -enable_vpc_rpsrfs() { -X local enable=$1 -X if [ $enable -eq 0 ] -X then -X echo 0 > /etc/rpsrfsenable -X else -X echo 1 > /etc/rpsrfsenable -X fi -X -X return 0 -} -X -enable_rpsrfs() { -X local enable=$1 -X -X if [ $enable -eq 0 ] -X then -X echo 0 > /etc/rpsrfsenable -X return 0 -X fi -X -X if [ ! -f /sys/class/net/eth0/queues/rx-0/rps_cpus ] -X then -X echo "rps is not enabled in the kernel" -X echo 0 > /etc/rpsrfsenable -X return 0 -X fi -X -X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) -X if [ $proc -le 1 ] -X then -X echo 0 > /etc/rpsrfsenable -X return 0; -X fi -X -X echo 1 > /etc/rpsrfsenable -X num=1 -X num=$(($num<<$proc)) -X num=$(($num-1)); -X echo $num; -X hex=$(printf "%x\n" $num) -X echo $hex; -X #enable rps -X echo $hex > /sys/class/net/eth0/queues/rx-0/rps_cpus -X echo $hex > /sys/class/net/eth2/queues/rx-0/rps_cpus -X -X #enble rfs -X echo 256 > /proc/sys/net/core/rps_sock_flow_entries -X echo 256 > /sys/class/net/eth0/queues/rx-0/rps_flow_cnt -X echo 256 > /sys/class/net/eth2/queues/rx-0/rps_flow_cnt -} -X -setup_common() { -X init_interfaces $1 $2 $3 -X if [ -n "$ETH0_IP" ] -X then -X setup_interface "0" $ETH0_IP $ETH0_MASK $GW -X fi -X if [ -n "$ETH0_IP6" ] -X then -X setup_interface_ipv6 "0" $ETH0_IP6 $ETH0_IP6_PRELEN -X fi -X setup_interface "1" $ETH1_IP $ETH1_MASK $GW -X if [ -n "$ETH2_IP" ] -X then -X setup_interface "2" $ETH2_IP $ETH2_MASK $GW -X fi -X -X echo $NAME > /etc/hostname -X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon -X hostnamectl set-hostname $NAME -X -X #Nameserver -X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries -X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries -X if [ -n "$internalNS1" ] -X then -X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS1" > /etc/resolv.conf -X fi -X -X if [ -n "$internalNS2" ] -X then -X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS2" >> /etc/resolv.conf -X fi -X if [ -n "$NS1" ] -X then -X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS1" >> /etc/resolv.conf -X fi -X -X if [ -n "$NS2" ] -X then -X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS2" >> /etc/resolv.conf -X fi -X -X if [ -n "$IP6_NS1" ] -X then -X echo "nameserver $IP6_NS1" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $IP6_NS1" >> /etc/resolv.conf -X fi -X if [ -n "$IP6_NS2" ] -X then -X echo "nameserver $IP6_NS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $IP6_NS2" >> /etc/resolv.conf -X fi -X -X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] -X then -X ip route add $MGMTNET via $LOCAL_GW dev eth1 -X fi -X -X ip route delete default -X if [ "$RROUTER" != "1" ] -X then -X gwdev=$3 -X if [ -z "$gwdev" ] -X then -X gwdev="eth0" -X fi -X -X ip route add default via $GW dev $gwdev -X fi -X -X # Workaround to activate vSwitch under VMware -X timeout 3 ping -n -c 3 $GW & -X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] -X then -X timeout 3 ping -n -c 3 $LOCAL_GW & -X #This code is added to address ARP issue by pinging MGMT_GW -X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') -X timeout 3 ping -n -c 3 $MGMT_GW & -X fi -X -X if [ "$HYPERVISOR" == "vmware" ]; then -X ntpq -p &> /dev/null || vmware-toolbox-cmd timesync enable -X fi -} -X -setup_dnsmasq() { -X log_it "Setting up dnsmasq" -X -X touch /etc/dhcpopts.txt -X -X [ -z $DHCP_RANGE ] && [ $ETH0_IP ] && DHCP_RANGE=$ETH0_IP -X [ $ETH0_IP6 ] && DHCP_RANGE_IP6=$ETH0_IP6 -X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" -X #removing the dnsmasq multiple ranges config file. -X rm /etc/dnsmasq.d/multiple_ranges.conf -X -X #get the template -X cp /etc/dnsmasq.conf.tmpl /etc/dnsmasq.conf -X -X if [ -n "$DOMAIN" ] -X then -X #send domain name to dhcp clients -X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\"$DOMAIN\"/ /etc/dnsmasq.conf -X #DNS server will append $DOMAIN to local queries -X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf -X #answer all local domain queries -X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf -X fi -X -X if [ -n "$DNS_SEARCH_ORDER" ] -X then -X sed -i -e "/^[#]*dhcp-option.*=119.*$/d" /etc/dnsmasq.conf -X echo "dhcp-option-force=119,$DNS_SEARCH_ORDER" >> /etc/dnsmasq.conf -X # set the domain search order as a space seprated list for option 15 -X DNS_SEARCH_ORDER=$(echo $DNS_SEARCH_ORDER | sed 's/,/ /g') -X #send domain name to dhcp clients -X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\""$DNS_SEARCH_ORDER"\"/ /etc/dnsmasq.conf -X fi -X -X if [ $DHCP_RANGE ] -X then -X sed -i -e "s/^dhcp-range_ip4=.*$/dhcp-range=$DHCP_RANGE,static/" /etc/dnsmasq.conf -X else -X sed -i -e "s/^dhcp-range_ip4=.*$//" /etc/dnsmasq.conf -X fi -X if [ $DHCP_RANGE_IP6 ] -X then -X sed -i -e "s/^dhcp-range_ip6=.*$/dhcp-range=$DHCP_RANGE_IP6,static/" /etc/dnsmasq.conf -X # For nondefault6 tagged host, don't send dns-server information -X sed -i /nondefault6/d /etc/dnsmasq.conf -X echo "dhcp-option=nondefault6,option6:dns-server" >> /etc/dnsmasq.conf -X else -X sed -i -e "s/^dhcp-range_ip6=.*$//" /etc/dnsmasq.conf -X fi -X -X if [ "$RROUTER" == "1" ] -X then -X DEFAULT_GW=$GUEST_GW -X INTERNAL_DNS=$GUEST_GW -X else -X if [ "$TYPE" == "dhcpsrvr" ] -X then -X DEFAULT_GW=$GW -X else -X DEFAULT_GW=$ETH0_IP -X fi -X INTERNAL_DNS=$ETH0_IP -X fi -X sed -i -e "/^[#]*dhcp-option=option:router.*$/d" /etc/dnsmasq.conf -X [ $DEFAULT_GW ] && echo "dhcp-option=option:router,$DEFAULT_GW" >> /etc/dnsmasq.conf -X -X [ $ETH0_IP ] && [ $NS1 ] && NS="$NS1," -X [ $ETH0_IP ] && [ $NS2 ] && NS="$NS$NS2," -X [ $ETH0_IP6 ] && [ $IP6_NS1 ] && NS6="[$IP6_NS1]," -X [ $ETH0_IP6 ] && [ $IP6_NS2 ] && NS6="$NS6[$IP6_NS2]," -X #for now set up ourself as the dns server as well -X sed -i -e "/^[#]*dhcp-option=6,.*$/d" /etc/dnsmasq.conf -X sed -i -e "/^[#]*dhcp-option=option6:dns-server,.*$/d" /etc/dnsmasq.conf -X if [ "$USE_EXTERNAL_DNS" != "true" ] -X then -X [ $ETH0_IP ] && NS="$INTERNAL_DNS,$NS" -X [ $ETH0_IP6 ] && NS6="[::],$NS6" -X # enable dns -X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf -X else -X # disable dns -X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf -X echo "port=0" >> /etc/dnsmasq.conf -X fi -X NS=${NS%?} -X NS6=${NS6%?} -X [ $ETH0_IP ] && echo "dhcp-option=6,$NS" >> /etc/dnsmasq.conf -X [ $ETH0_IP6 ] && echo "dhcp-option=option6:dns-server,$NS6" >> /etc/dnsmasq.conf -X #adding the name data-server to the /etc/hosts for allowing the access to user-data service and ssh-key reset in every subnet. -X #removing the existing entires to avoid duplicates on restarts. -X sed -i '/data-server/d' /etc/hosts -X if [ -n "$ETH0_IP" ] -X then -X echo "$ETH0_IP data-server" >> /etc/hosts -X fi -X if [ -n "$ETH0_IP6" ] -X then -X echo "$ETH0_IP6 data-server" >> /etc/hosts -X fi -X #add the dhcp-client-update only if dnsmasq version is 2.6 and above -X dnsmasqVersion=$(dnsmasq -v | grep version -m 1 | grep -o "[[:digit:]]\.[[:digit:]]") -X major=$(echo "$dnsmasqVersion" | cut -d '.' -f 1) -X minor=$(echo "$dnsmasqVersion" | cut -d '.' -f 2) -X if [ "$major" -eq '2' -a "$minor" -ge '6' ] || [ "$major" -gt '2' ] -X then -X sed -i -e "/^dhcp-client-update/d" /etc/dnsmasq.conf -X echo 'dhcp-client-update' >> /etc/dnsmasq.conf -X fi -X -X command -v dhcp_release > /dev/null 2>&1 -X no_dhcp_release=$? -X if [ $no_dhcp_release -eq 0 -a -z "$ETH0_IP6" ] -X then -X echo 1 > /var/cache/cloud/dnsmasq_managed_lease -X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf -X else -X echo 0 > /var/cache/cloud/dnsmasq_managed_lease -X fi -} -X -setup_sshd(){ -X local ip=$1 -X local eth=$2 -X [ -f /etc/ssh/sshd_config ] && sed -i -e "s/^[#]*ListenAddress.*$/ListenAddress $ip/" /etc/ssh/sshd_config -X sed -i "/3922/s/eth./$eth/" /etc/iptables/rules.v4 -} -X -setup_vpc_apache2() { -X log_it "Setting up apache web server for VPC" -X systemctl disable apache2 -X clean_ipalias_config -X setup_apache2_common -} -X -clean_ipalias_config() { -X rm -f /etc/apache2/conf.d/ports.*.meta-data.conf -X rm -f /etc/apache2/sites-available/ipAlias* -X rm -f /etc/apache2/sites-enabled/ipAlias* -X rm -f /etc/apache2/conf.d/vhost*.conf -X rm -f /etc/apache2/ports.conf -X rm -f /etc/apache2/vhostexample.conf -X rm -f /etc/apache2/sites-available/* -X rm -f /etc/apache2/sites-enabled/* -X -X rm -rf /etc/failure_config -} -X -setup_apache2_common() { -X sed -i 's/^Include ports.conf.*/# CS: Done by Python CsApp config\n#Include ports.conf/g' /etc/apache2/apache2.conf -X # Disable listing of http://SSVM-IP/icons folder for security issue. see article http://www.i-lateral.com/tutorials/disabling-the-icons-folder-on-an-ubuntu-web-server/ -X [ -f /etc/apache2/mods-available/alias.conf ] && sed -i s/"Options Indexes MultiViews"/"Options -Indexes MultiViews"/ /etc/apache2/mods-available/alias.conf -X -X echo "Options -Indexes" > /var/www/html/.htaccess -} -X -setup_apache2() { -X log_it "Setting up apache web server" -X mkdir -p /var/www -X chown www-data:www-data -R /var/www -X clean_ipalias_config -X setup_apache2_common -X local ip=$1 -} -X -setup_aesni() { -X if [ `grep aes /proc/cpuinfo | wc -l` -gt 0 ] -X then -X modprobe aesni_intel -X fi -} -X -setup_storage_network() { -X if [ x"$STORAGE_IP" == "x" -o x"$STORAGE_NETMASK" == "x" ] -X then -X log_it "Incompleted parameters STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR. Cannot setup storage network" -X return -X fi -X -X echo "" >> /etc/network/interfaces -X echo "auto eth3" >> /etc/network/interfaces -X -X setup_interface "3" "$STORAGE_IP" "$STORAGE_NETMASK" -X [ -n "$MTU" ] && ifconfig eth3 mtu $MTU && echo " mtu $MTU" >> /etc/network/interfaces -X #ip route add "$STORAGE_CIDR" via "$STORAGE_IP" -X log_it "Successfully setup storage network with STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR" -} -X -setup_system_rfc1918_internal() { -X public_ip=`getPublicIp` -X echo "$public_ip" | grep -E "^((127\.)|(10\.)|(172\.1[6-9]\.)|(172\.2[0-9]\.)|(172\.3[0-1]\.)|(192\.168\.))" -X if [ "$?" == "0" ]; then -X log_it "Not setting up route of RFC1918 space to $LOCAL_GW befause $public_ip is RFC1918." -X else -X log_it "Setting up route of RFC1918 space to $LOCAL_GW" -X # Setup general route for RFC 1918 space, as otherwise it will be sent to -X # the public gateway and not work -X # More specific routes that may be set have preference over this generic route. -X ip route add 10.0.0.0/8 via $LOCAL_GW -X ip route add 172.16.0.0/12 via $LOCAL_GW -X ip route add 192.168.0.0/16 via $LOCAL_GW -X fi -} -X -getPublicIp() { -X public_ip=$ETH2_IP -X [ "$ETH2_IP" == "0.0.0.0" ] && public_ip=$ETH1_IP -X echo $public_ip -} -X -setup_ntp() { -X log_it "Setting up NTP" -X NTP_CONF_FILE="/etc/ntp.conf" -X if [ -f $NTP_CONF_FILE ] -X then -X IFS=',' read -a server_list <<< "$NTP_SERVER_LIST" -X for (( iterator=${#server_list[@]}-1 ; iterator>=0 ; iterator-- )) -X do -X server=$(echo ${server_list[iterator]} | tr -d '\r') -X PATTERN="server $server" -X if grep -q "^$PATTERN$" $NTP_CONF_FILE ; then -X sed -i "/^$PATTERN$/d" $NTP_CONF_FILE -X fi -X sed -i "0,/^server/s//$PATTERN\nserver/" $NTP_CONF_FILE -X done -X systemctl enable ntp -X else -X log_it "NTP configuration file not found" -X fi -} -X -routing_svcs() { -X echo "haproxy apache2" > /var/cache/cloud/enabled_svcs -X echo "cloud nfs-common portmap" > /var/cache/cloud/disabled_svcs -X if [ "$RROUTER" -eq "1" ] -X then -X echo "keepalived conntrackd" >> /var/cache/cloud/enabled_svcs -X echo "dnsmasq" >> /var/cache/cloud/disabled_svcs -X else -X echo "dnsmasq" >> /var/cache/cloud/enabled_svcs -X echo "keepalived conntrackd " >> /var/cache/cloud/disabled_svcs -X fi -} -X -parse_cmd_line() { -X CMDLINE=$(cat /var/cache/cloud/cmdline) -X TYPE="unknown" -X BOOTPROTO="static" -X DISABLE_RP_FILTER="false" -X STORAGE_IP="" -X STORAGE_NETMASK="" -X STORAGE_CIDR="" -X VM_PASSWORD="" -X -X CHEF_TMP_FILE=/tmp/cmdline.json -X COMMA="\t" -X echo -e "{\n\"type\": \"cmdline\"," > ${CHEF_TMP_FILE} -X echo -e "\"cmd_line\": {" >> ${CHEF_TMP_FILE} -X -X for i in $CMDLINE -X do -X # search for foo=bar pattern and cut out foo -X KEY=$(echo $i | cut -d= -f1) -X VALUE=$(echo $i | cut -d= -f2) -X echo -en ${COMMA} >> ${CHEF_TMP_FILE} -X # Two lines so values do not accidently interpretted as escapes!! -X echo -n \"${KEY}\"': '\"${VALUE}\" >> ${CHEF_TMP_FILE} -X COMMA=",\n\t" -X case $KEY in -X disable_rp_filter) -X export DISABLE_RP_FILTER=$VALUE -X ;; -X eth0ip) -X export ETH0_IP=$VALUE -X ;; -X eth1ip) -X export ETH1_IP=$VALUE -X ;; -X eth2ip) -X export ETH2_IP=$VALUE -X ;; -X host) -X export MGMT_HOST=$VALUE -X ;; -X gateway) -X export GW=$VALUE -X ;; -X ip6gateway) -X export IP6GW=$VALUE -X ;; -X eth0mask) -X export ETH0_MASK=$VALUE -X ;; -X eth1mask) -X export ETH1_MASK=$VALUE -X ;; -X eth2mask) -X export ETH2_MASK=$VALUE -X ;; -X eth0ip6) -X export ETH0_IP6=$VALUE -X ;; -X eth0ip6prelen) -X export ETH0_IP6_PRELEN=$VALUE -X ;; -X internaldns1) -X export internalNS1=$VALUE -X ;; -X internaldns2) -X export internalNS2=$VALUE -X ;; -X dns1) -X export NS1=$VALUE -X ;; -X dns2) -X export NS2=$VALUE -X ;; -X ip6dns1) -X export IP6_NS1=$VALUE -X ;; -X ip6dns2) -X export IP6_NS2=$VALUE -X ;; -X domain) -X export DOMAIN=$VALUE -X ;; -X dnssearchorder) -X export DNS_SEARCH_ORDER=$VALUE -X ;; -X useextdns) -X export USE_EXTERNAL_DNS=$VALUE -X ;; -X mgmtcidr) -X export MGMTNET=$VALUE -X ;; -X localgw) -X export LOCAL_GW=$VALUE -X ;; -X template) -X export TEMPLATE=$VALUE -X ;; -X sshonguest) -X export SSHONGUEST=$VALUE -X ;; -X name) -X export NAME=$VALUE -X ;; -X dhcprange) -X export DHCP_RANGE=$(echo $VALUE | tr ':' ',') -X ;; -X bootproto) -X export BOOTPROTO=$VALUE -X ;; -X type) -X export TYPE=$VALUE -X ;; -X defaultroute) -X export DEFAULTROUTE=$VALUE -X ;; -X redundant_router) -X export RROUTER=$VALUE -X ;; -X redundant_state) -X export RROUTER_STATE=$VALUE -X ;; -X guestgw) -X export GUEST_GW=$VALUE -X ;; -X guestbrd) -X export GUEST_BRD=$VALUE -X ;; -X guestcidrsize) -X export GUEST_CIDR_SIZE=$VALUE -X ;; -X router_pr) -X export ROUTER_PR=$VALUE -X ;; -X extra_pubnics) -X export EXTRA_PUBNICS=$VALUE -X ;; -X nic_macs) -X export NIC_MACS=$VALUE -X ;; -X mtu) -X export MTU=$VALUE -X ;; -X storageip) -X export STORAGE_IP=$VALUE -X ;; -X storagenetmask) -X export STORAGE_NETMASK=$VALUE -X ;; -X storagecidr) -X export STORAGE_CIDR=$VALUE -X ;; -X vmpassword) -X export VM_PASSWORD=$VALUE -X ;; -X vpccidr) -X export VPCCIDR=$VALUE -X ;; -X cidrsize) -X export CIDR_SIZE=$VALUE -X ;; -X advert_int) -X export ADVERT_INT=$VALUE -X ;; -X ntpserverlist) -X export NTP_SERVER_LIST=$VALUE -X ;; -X esac -X done -X echo -e "\n\t}\n}" >> ${CHEF_TMP_FILE} -X if [ "$TYPE" != "unknown" ] -X then -X mv ${CHEF_TMP_FILE} /var/cache/cloud/cmd_line.json -X fi -X -X [ $ETH0_IP ] && export LOCAL_ADDRS=$ETH0_IP -X [ $ETH0_IP6 ] && export LOCAL_ADDRS=$ETH0_IP6 -X [ $ETH0_IP ] && [ $ETH0_IP6 ] && export LOCAL_ADDRS="$ETH0_IP,$ETH0_IP6" -X -X # Randomize cloud password so only ssh login is allowed -X echo "cloud:`openssl rand -base64 32`" | chpasswd -X -X if [ x"$VM_PASSWORD" != x"" ] -X then -X echo "root:$VM_PASSWORD" | chpasswd -X fi -} -X -parse_cmd_line -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/common.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/common.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/common.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/common.sh': 'MD5 check failed' - ) << \SHAR_EOF -8754c81bacd82458e4ce221b476505ea cloud_scripts/opt/cloud/bin/setup/common.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/common.sh'` -ne 22472 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/common.sh' is not 22472" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -dhcpsrvr_svcs() { -X echo "dnsmasq apache2" > /var/cache/cloud/enabled_svcs -X echo "cloud nfs-common conntrackd keepalived haproxy portmap" > /var/cache/cloud/disabled_svcs -} -X -setup_dhcpsrvr() { -X log_it "Setting up dhcp server system vm" -X setup_common eth0 eth1 -X setup_dnsmasq -X setup_apache2 $ETH0_IP -X -X sed -i /$NAME/d /etc/hosts -X [ $ETH0_IP ] && echo "$ETH0_IP $NAME" >> /etc/hosts -X [ $ETH0_IP6 ] && echo "$ETH0_IP6 $NAME" >> /etc/hosts -X -X enable_irqbalance 0 -X enable_fwding 0 -X -X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 -X -X #Only allow DNS service for current network -X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X -X if [ "$SSHONGUEST" == "true" ] -X then -X setup_sshd $ETH0_IP "eth0" -X else -X setup_sshd $ETH1_IP "eth1" -X fi -} -X -dhcpsrvr_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute dhcpsrvr_svcs" -X exit 1 -fi -setup_dhcpsrvr -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh': 'MD5 check failed' - ) << \SHAR_EOF -08afc46420e5e388ba6be68cfdbd4a59 cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh'` -ne 1985 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' is not 1985" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/cloud-early-config ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/cloud-early-config (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/cloud-early-config (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" -X -# Clear boot up flag, it would be created by rc.local after boot up done -mkdir -p /var/cache/cloud -rm -f /var/cache/cloud/boot_up_done -X -[ -x /sbin/ifup ] || exit 0 -X -X. /lib/lsb/init-functions -X -log_it() { -X echo "$(date) $@" >> /var/log/cloud.log -X log_action_msg "$@" -} -X -patch() { -X local PATCH_MOUNT=/media/cdrom -X local patchfile=$PATCH_MOUNT/cloud-scripts.tgz -X local privkey=$PATCH_MOUNT/authorized_keys -X local md5file=/var/cache/cloud/cloud-scripts-signature -X local cdrom_dev= -X mkdir -p $PATCH_MOUNT -X -X if [ -e /dev/xvdd ]; then -X cdrom_dev=/dev/xvdd -X elif [ -e /dev/cdrom ]; then -X cdrom_dev=/dev/cdrom -X elif [ -e /dev/cdrom1 ]; then -X cdrom_dev=/dev/cdrom1 -X elif [ -e /dev/cdrom2 ]; then -X cdrom_dev=/dev/cdrom2 -X elif [ -e /dev/cdrom3 ]; then -X cdrom_dev=/dev/cdrom3 -X fi -X -X if [ -f /var/cache/cloud/authorized_keys ]; then -X privkey=/var/cache/cloud/authorized_keys -X fi -X -X if [ -n "$cdrom_dev" ]; then -X mount -o ro $cdrom_dev $PATCH_MOUNT -X local oldmd5= -X [ -f ${md5file} ] && oldmd5=$(cat ${md5file}) -X local newmd5= -X [ -f ${patchfile} ] && newmd5=$(md5sum ${patchfile} | awk '{print $1}') -X -X log_it "Scripts checksum detected: oldmd5=$oldmd5 newmd5=$newmd5" -X if [ "$oldmd5" != "$newmd5" ] && [ -f ${patchfile} ] && [ "$newmd5" != "" ] -X then -X tar xzf $patchfile -C / -X echo ${newmd5} > ${md5file} -X log_it "Patched scripts using $patchfile" -X touch /var/cache/cloud/patch.required -X fi -X -X if [ -f $privkey ]; then -X cp -f $privkey /root/.ssh/ -X chmod go-rwx /root/.ssh/authorized_keys -X fi -X fi -X -X return 0 -} -X -start() { -X log_it "Executing cloud-early-config" -X -X # Clear /tmp for file lock -X rm -f /tmp/*.lock -X rm -f /tmp/rrouter_bumped -X rm -f /root/.rnd -X echo "" > /root/.ssh/known_hosts -X -X patch -X sync -X /opt/cloud/bin/setup/bootstrap.sh -X -X log_it "Finished setting up systemvm" -X exit 0 -} -X -start -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/cloud-early-config failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config': 'MD5 check failed' - ) << \SHAR_EOF -c9e5973de3771fd5f5e9b490c60db970 cloud_scripts/opt/cloud/bin/setup/cloud-early-config -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config'` -ne 2765 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' is not 2765" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/default.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/default.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/default.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/default.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/default.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_default() { -X cat > /etc/network/interfaces << EOF -auto lo -iface lo inet loopback -EOF -X cp -f /etc/iptables/rt_tables_init /etc/iproute2/rt_tables -} -X -setup_default -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/default.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/default.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/default.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/default.sh': 'MD5 check failed' - ) << \SHAR_EOF -20e3a01cb77930eba6438de6d9a3f193 cloud_scripts/opt/cloud/bin/setup/default.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/default.sh'` -ne 1002 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/default.sh' is not 1002" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/loadbalancer.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/loadbalancer.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/loadbalancer.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -X -# $Id: loadbalancer.sh 9947 2010-06-25 19:34:24Z manuel $ $HeadURL: svn://svn.lab.vmops.com/repos/vmdev/java/patches/xenserver/root/loadbalancer.sh $ -# loadbalancer.sh -- reconfigure loadbalancer rules -# @VERSION@ -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s: -i -a -d -f -s \n" $(basename $0) >&2 -} -X -# set -x -X -# ensure that the nic has the public ip we are load balancing on -ip_entry() { -X local added=$1 -X local removed=$2 -X -X if [ "$added" == "none" ] -X then -X added="" -X fi -X -X if [ "$removed" == "none" ] -X then -X removed="" -X fi -X -X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") -X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") -X -X for i in $a -X do -X local pubIp=$(echo $i | cut -d: -f1) -X logger -t cloud "Adding public ip $pubIp for load balancing" -X for vif in $VIF_LIST; do -X sudo ip addr add dev $vif $pubIp/32 -X #ignore error since it is because the ip is already there -X done -X done -X -X for i in $r -X do -X logger -t cloud "Removing public ips for deleted loadbalancers" -X local pubIp=$(echo $i | cut -d: -f1) -X logger -t cloud "Removing public ip $pubIp for deleted loadbalancers" -X for vif in $VIF_LIST; do -X sudo ip addr del $pubIp/32 dev $vif -X done -X done -X -X return 0 -} -get_lb_vif_list() { -# add eth0 to the VIF_LIST if it is not there, this allows guest VMs to use the LB service. -X local lb_list="$VIF_LIST eth0"; -X lb_list=$(echo $lb_list | tr " " "\n" | sort | uniq | tr "\n" " ") -X echo $lb_list -} -fw_remove_backup() { -X local lb_vif_list=$(get_lb_vif_list) -X for vif in $lb_vif_list; do -X sudo iptables -F back_load_balancer_$vif 2> /dev/null -X sudo iptables -D INPUT -i $vif -p tcp -j back_load_balancer_$vif 2> /dev/null -X sudo iptables -X back_load_balancer_$vif 2> /dev/null -X done -X sudo iptables -F back_lb_stats 2> /dev/null -X sudo iptables -D INPUT -p tcp -j back_lb_stats 2> /dev/null -X sudo iptables -X back_lb_stats 2> /dev/null -} -fw_restore() { -X local lb_vif_list=$(get_lb_vif_list) -X for vif in $lb_vif_list; do -X sudo iptables -F load_balancer_$vif 2> /dev/null -X sudo iptables -D INPUT -i $vif -p tcp -j load_balancer_$vif 2> /dev/null -X sudo iptables -X load_balancer_$vif 2> /dev/null -X sudo iptables -E back_load_balancer_$vif load_balancer_$vif 2> /dev/null -X done -X sudo iptables -F lb_stats 2> /dev/null -X sudo iptables -D INPUT -p tcp -j lb_stats 2> /dev/null -X sudo iptables -X lb_stats 2> /dev/null -X sudo iptables -E back_lb_stats lb_stats 2> /dev/null -} -# firewall entry to ensure that haproxy can receive on specified port -fw_entry() { -X local added=$1 -X local removed=$2 -X local stats=$3 -X -X if [ "$added" == "none" ] -X then -X added="" -X fi -X -X if [ "$removed" == "none" ] -X then -X removed="" -X fi -X -X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") -X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") -X -# back up the iptable rules by renaming before creating new. -X local lb_vif_list=$(get_lb_vif_list) -X for vif in $lb_vif_list; do -X sudo iptables -E load_balancer_$vif back_load_balancer_$vif 2> /dev/null -X sudo iptables -N load_balancer_$vif 2> /dev/null -X sudo iptables -A INPUT -i $vif -p tcp -j load_balancer_$vif -X done -X sudo iptables -E lb_stats back_lb_stats 2> /dev/null -X sudo iptables -N lb_stats 2> /dev/null -X sudo iptables -A INPUT -p tcp -j lb_stats -X -X for i in $a -X do -X local pubIp=$(echo $i | cut -d: -f1) -X local dport=$(echo $i | cut -d: -f2) -X local lb_vif_list=$(get_lb_vif_list) -X for vif in $lb_vif_list; do -X -#TODO : The below delete will be used only when we upgrade the from older verion to the newer one , the below delete become obsolute in the future. -X sudo iptables -D INPUT -i $vif -p tcp -d $pubIp --dport $dport -j ACCEPT 2> /dev/null -X -X sudo iptables -A load_balancer_$vif -p tcp -d $pubIp --dport $dport -j ACCEPT -X -X if [ $? -gt 0 ] -X then -X return 1 -X fi -X done -X done -X local pubIp=$(echo $stats | cut -d: -f1) -X local dport=$(echo $stats | cut -d: -f2) -X local cidrs=$(echo $stats | cut -d: -f3 | sed 's/-/,/') -X sudo iptables -A lb_stats -s $cidrs -p tcp -m state --state NEW -d $pubIp --dport $dport -j ACCEPT -X -X -#TODO : The below delete in the for-loop will be used only when we upgrade the from older verion to the newer one , the below delete become obsolute in the future. -X for i in $r -X do -X local pubIp=$(echo $i | cut -d: -f1) -X local dport=$(echo $i | cut -d: -f2) -X -X for vif in $VIF_LIST; do -X sudo iptables -D INPUT -i $vif -p tcp -d $pubIp --dport $dport -j ACCEPT 2> /dev/null -X done -X done -X -X return 0 -} -X -#Hot reconfigure HA Proxy in the routing domain -reconfig_lb() { -X logger -t cloud "Reconfiguring loadbalancer using $1" -X /root/reconfigLB.sh $1 -X return $? -} -X -# Restore the HA Proxy to its previous state, and revert iptables rules on DomR -restore_lb() { -X logger -t cloud "Restoring HA Proxy to previous state" -X # Copy the old version of haproxy.cfg into the file that reconfigLB.sh uses -X cp /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg.new -X -X if [ $? -eq 0 ] -X then -X # Run reconfigLB.sh again -X /root/reconfigLB.sh /etc/haproxy/haproxy.cfg.new -X fi -} -X -get_vif_list() { -X local vif_list="" -X for i in /sys/class/net/eth*; do -X vif=$(basename $i); -X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] -X then -X vif_list="$vif_list $vif"; -X fi -X done -X if [ "$vif_list" == "" ] -X then -X vif_list="eth0" -X fi -X -X logger -t cloud "Loadbalancer public interfaces = $vif_list" -X echo $vif_list -} -X -mflag= -iflag= -aflag= -dflag= -fflag= -sflag= -X -while getopts 'i:a:d:f:s:' OPTION -do -X case $OPTION in -X i) iflag=1 -X domRIp="$OPTARG" -X ;; -X a) aflag=1 -X addedIps="$OPTARG" -X ;; -X d) dflag=1 -X removedIps="$OPTARG" -X ;; -X f) fflag=1 -X cfgfile="$OPTARG" -X ;; -X s) sflag=1 -X statsIp="$OPTARG" -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [ "$addedIps" == "" ] -then -X addedIps="none" -fi -X -X -if [ "$removedIps" == "" ] -then -X removedIps="none" -fi -X -VIF_LIST=$(get_vif_list) -X -X -if [ "$addedIps" == "" ] -then -X addedIps="none" -fi -X -if [ "$removedIps" == "" ] -then -X removedIps="none" -fi -X -#FIXME: make this explicit via check on vm type or passed in flag -if [ "$VIF_LIST" == "eth0" ] -then -X ip_entry $addedIps $removedIps -fi -X -# hot reconfigure haproxy -reconfig_lb $cfgfile -X -if [ $? -gt 0 ] -then -X logger -t cloud "Reconfiguring loadbalancer failed" -X #FIXME: make this explicit via check on vm type or passed in flag -X if [ "$VIF_LIST" == "eth0" ] -X then -X ip_entry $removedIps $addedIps -X fi -X unlock_exit 1 $lock $locked -fi -X -# iptables entry to ensure that haproxy receives traffic -fw_entry $addedIps $removedIps $statsIp -X -if [ $? -gt 0 ] -then -X logger -t cloud "Failed to apply firewall rules for load balancing, reverting HA Proxy config" -X # Restore the LB -X restore_lb -X -X logger -t cloud "Reverting firewall config" -X # Revert iptables rules on DomR -X fw_restore -X -X #FIXME: make this explicit via check on vm type or passed in flag -X if [ "$VIF_LIST" == "eth0" ] -X then -X logger -t cloud "Reverting ip address changes to eth0" -X ip_entry $removedIps $addedIps -X fi -X -X unlock_exit 1 $lock $locked -else -X # Remove backedup iptable rules -X fw_remove_backup -fi -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/loadbalancer.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/loadbalancer.sh': 'MD5 check failed' - ) << \SHAR_EOF -6da53e4d9dd0b11f6fa334c6f583f8cd cloud_scripts/opt/cloud/bin/loadbalancer.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/loadbalancer.sh'` -ne 8234 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' is not 8234" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/baremetal_snat.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/baremetal_snat.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/baremetal_snat.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' && -#!/bin/bash -X -#Licensed to the Apache Software Foundation (ASF) under one -#or more contributor license agreements. See the NOTICE file -#distributed with this work for additional information -#regarding copyright ownership. The ASF licenses this file -#to you under the Apache License, Version 2.0 (the -#"License"); you may not use this file except in compliance -#with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -#Unless required by applicable law or agreed to in writing, -#software distributed under the License is distributed on an -#"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -#KIND, either express or implied. See the License for the -#specific language governing permissions and limitations -#under the License. -X -set +u -X -mgmt_nic_ip=$1 -internal_server_ip=$2 -gateway_ip=$3 -X -ip route | grep "$internal_server_ip" > /dev/null -X -if [ $? -ne 0 ]; then -X ip route add $internal_server_ip via $gateway_ip -fi -X -iptables-save | grep -- "-A POSTROUTING -d $internal_server_ip" > /dev/null -X -if [ $? -ne 0 ]; then -X iptables -t nat -A POSTROUTING -d $internal_server_ip -j SNAT --to-source $mgmt_nic_ip -fi -X -X -iptables-save | grep -- "-A INPUT -i eth0 -p udp -m udp --dport 69 -j ACCEPT" > /dev/null -if [ $? -ne 0 ]; then -X iptables -I INPUT -i eth0 -p udp -m udp --dport 69 -j ACCEPT -fi -X -iptables-save | grep -- "-A FORWARD -i eth1 -o eth0 -j ACCEPT" > /dev/null -if [ $? -ne 0 ]; then -X iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT -fi -X -rule="-A FORWARD -d $internal_server_ip/32 -i eth0 -o eth1 -j ACCEPT" -iptables-save | grep -- "$rule" > /dev/null -if [ $? -ne 0 ]; then -X iptables -I FORWARD -d $internal_server_ip/32 -i eth0 -o eth1 -j ACCEPT -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/baremetal_snat.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh': 'MD5 check failed' - ) << \SHAR_EOF -acab3e2b25ee898e7dd05c4e77b15569 cloud_scripts/opt/cloud/bin/baremetal_snat.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh'` -ne 1717 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' is not 1717" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_vpnusers.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vpnusers.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vpnusers.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import copy -X -X -def merge(dbag, data): -X dbagc = copy.deepcopy(dbag) -X -X print dbag -X print data -X if "vpn_users" not in data: -X return dbagc -X -X # remove previously deleted user from the dict -X for user in dbagc.keys(): -X if user == 'id': -X continue -X userrec = dbagc[user] -X add = userrec['add'] -X if not add: -X del(dbagc[user]) -X -X for user in data['vpn_users']: -X username = user['user'] -X add = user['add'] -X if username not in dbagc.keys(): -X dbagc[username] = user -X elif username in dbagc.keys() and not add: -X dbagc[username] = user -X -X return dbagc -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_vpnusers.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py': 'MD5 check failed' - ) << \SHAR_EOF -d54ff81fd9901ecc0bfbe9528343e238 cloud_scripts/opt/cloud/bin/cs_vpnusers.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py'` -ne 1469 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' is not 1469" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/merge.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/merge.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/merge.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/merge.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/merge.py' && -#!/usr/bin/python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import json -import os -import uuid -import logging -import gzip -import shutil -import cs_ip -import cs_guestnetwork -import cs_cmdline -import cs_vmp -import cs_network_acl -import cs_firewallrules -import cs_loadbalancer -import cs_monitorservice -import cs_vmdata -import cs_dhcp -import cs_forwardingrules -import cs_site2sitevpn -import cs_remoteaccessvpn -import cs_vpnusers -import cs_staticroutes -X -X -class DataBag: -X -X DPATH = "/etc/cloudstack" -X -X def __init__(self): -X self.bdata = {} -X -X def load(self): -X data = self.bdata -X if not os.path.exists(self.DPATH): -X os.makedirs(self.DPATH) -X self.fpath = os.path.join(self.DPATH, self.key + '.json') -X -X try: -X with open(self.fpath, 'r') as _fh: -X logging.debug("Loading data bag type %s", self.key) -X data = json.load(_fh) -X except (IOError, ValueError): -X logging.debug("Caught load error, creating empty data bag type %s", self.key) -X data.update({"id": self.key}) -X finally: -X self.dbag = data -X -X def save(self, dbag): -X try: -X with open(self.fpath, 'w') as _fh: -X logging.debug("Writing data bag type %s", self.key) -X json.dump( -X dbag, _fh, -X sort_keys=True, -X indent=2 -X ) -X except IOError: -X logging.error("Could not write data bag %s", self.key) -X -X def getDataBag(self): -X return self.dbag -X -X def setKey(self, key): -X self.key = key -X -X -class updateDataBag: -X -X DPATH = "/etc/cloudstack" -X -X def __init__(self, qFile): -X self.qFile = qFile -X self.fpath = '' -X self.bdata = {} -X self.process() -X -X def process(self): -X self.db = DataBag() -X if (self.qFile.type == "staticnatrules" or self.qFile.type == "forwardrules"): -X self.db.setKey("forwardingrules") -X else: -X self.db.setKey(self.qFile.type) -X dbag = self.db.load() -X logging.info("Command of type %s received", self.qFile.type) -X -X if self.qFile.type == 'ips': -X dbag = self.processIP(self.db.getDataBag()) -X elif self.qFile.type == 'guestnetwork': -X dbag = self.processGuestNetwork(self.db.getDataBag()) -X elif self.qFile.type == 'cmdline': -X dbag = self.processCL(self.db.getDataBag()) -X elif self.qFile.type == 'vmpassword': -X dbag = self.processVMpassword(self.db.getDataBag()) -X elif self.qFile.type == 'networkacl': -X dbag = self.process_network_acl(self.db.getDataBag()) -X elif self.qFile.type == 'firewallrules': -X dbag = self.process_firewallrules(self.db.getDataBag()) -X elif self.qFile.type == 'loadbalancer': -X dbag = self.process_loadbalancer(self.db.getDataBag()) -X elif self.qFile.type == 'monitorservice': -X dbag = self.process_monitorservice(self.db.getDataBag()) -X elif self.qFile.type == 'vmdata': -X dbag = self.processVmData(self.db.getDataBag()) -X elif self.qFile.type == 'dhcpentry': -X dbag = self.process_dhcp_entry(self.db.getDataBag()) -X elif self.qFile.type == 'staticnatrules' or self.qFile.type == 'forwardrules': -X dbag = self.processForwardingRules(self.db.getDataBag()) -X elif self.qFile.type == 'site2sitevpn': -X dbag = self.process_site2sitevpn(self.db.getDataBag()) -X elif self.qFile.type == 'remoteaccessvpn': -X dbag = self.process_remoteaccessvpn(self.db.getDataBag()) -X elif self.qFile.type == 'vpnuserlist': -X dbag = self.process_vpnusers(self.db.getDataBag()) -X elif self.qFile.type == 'staticroutes': -X dbag = self.process_staticroutes(self.db.getDataBag()) -X elif self.qFile.type == 'ipaliases': -X self.db.setKey('ips') -X self.db.load() -X dbag = self.process_ipaliases(self.db.getDataBag()) -X elif self.qFile.type == 'dhcpconfig': -X logging.error("I don't think I need %s anymore", self.qFile.type) -X return -X else: -X logging.error("Error I do not know what to do with file of type %s", self.qFile.type) -X return -X self.db.save(dbag) -X -X def processGuestNetwork(self, dbag): -X d = self.qFile.data -X dp = {} -X dp['public_ip'] = d['router_guest_ip'] -X dp['netmask'] = d['router_guest_netmask'] -X dp['source_nat'] = False -X dp['add'] = d['add'] -X dp['one_to_one_nat'] = False -X dp['gateway'] = d['router_guest_gateway'] -X dp['nic_dev_id'] = d['device'][3:] -X dp['nw_type'] = 'guest' -X dp = PrivateGatewayHack.update_network_type_for_privategateway(dbag, dp) -X qf = QueueFile() -X qf.load({'ip_address': [dp], 'type': 'ips'}) -X if 'domain_name' not in d.keys() or d['domain_name'] == '': -X d['domain_name'] = "cloudnine.internal" -X -X d = PrivateGatewayHack.update_network_type_for_privategateway(dbag, d) -X return cs_guestnetwork.merge(dbag, d) -X -X def process_dhcp_entry(self, dbag): -X return cs_dhcp.merge(dbag, self.qFile.data) -X -X def process_site2sitevpn(self, dbag): -X return cs_site2sitevpn.merge(dbag, self.qFile.data) -X -X def process_remoteaccessvpn(self, dbag): -X return cs_remoteaccessvpn.merge(dbag, self.qFile.data) -X -X def process_vpnusers(self, dbag): -X return cs_vpnusers.merge(dbag, self.qFile.data) -X -X def process_network_acl(self, dbag): -X return cs_network_acl.merge(dbag, self.qFile.data) -X -X def process_firewallrules(self, dbag): -X return cs_firewallrules.merge(dbag, self.qFile.data) -X -X def process_loadbalancer(self, dbag): -X return cs_loadbalancer.merge(dbag, self.qFile.data) -X -X def process_monitorservice(self, dbag): -X return cs_monitorservice.merge(dbag, self.qFile.data) -X -X def process_staticroutes(self, dbag): -X return cs_staticroutes.merge(dbag, self.qFile.data) -X -X def processVMpassword(self, dbag): -X return cs_vmp.merge(dbag, self.qFile.data) -X -X def processForwardingRules(self, dbag): -X # to be used by both staticnat and portforwarding -X return cs_forwardingrules.merge(dbag, self.qFile.data) -X -X def processIP(self, dbag): -X for ip in self.qFile.data["ip_address"]: -X dbag = cs_ip.merge(dbag, ip) -X return dbag -X -X def processCL(self, dbag): -X # Convert the ip stuff to an ip object and pass that into cs_ip_merge -X # "eth0ip": "192.168.56.32", -X # "eth0mask": "255.255.255.0", -X self.newData = [] -X if (self.qFile.data['cmd_line']['type'] == "router"): -X self.processCLItem('0', "guest") -X self.processCLItem('1', "control") -X self.processCLItem('2', "public") -X elif (self.qFile.data['cmd_line']['type'] == "vpcrouter"): -X self.processCLItem('0', "control") -X elif (self.qFile.data['cmd_line']['type'] == "dhcpsrvr"): -X self.processCLItem('0', "guest") -X self.processCLItem('1', "control") -X elif (self.qFile.data['cmd_line']['type'] == "ilbvm"): -X self.processCLItem('0', "guest") -X self.processCLItem('1', "control") -X -X return cs_cmdline.merge(dbag, self.qFile.data) -X -X def processCLItem(self, num, nw_type): -X key = 'eth' + num + 'ip' -X dp = {} -X if(key in self.qFile.data['cmd_line']): -X dp['public_ip'] = self.qFile.data['cmd_line'][key] -X dp['netmask'] = self.qFile.data['cmd_line']['eth' + num + 'mask'] -X dp['source_nat'] = False -X dp['add'] = True -X dp['one_to_one_nat'] = False -X if nw_type == "public": -X dp['gateway'] = self.qFile.data['cmd_line']['gateway'] -X else: -X if('localgw' in self.qFile.data['cmd_line']): -X dp['gateway'] = self.qFile.data['cmd_line']['localgw'] -X else: -X dp['gateway'] = '' -X dp['nic_dev_id'] = num -X dp['nw_type'] = nw_type -X qf = QueueFile() -X qf.load({'ip_address': [dp], 'type': 'ips'}) -X -X def processVmData(self, dbag): -X cs_vmdata.merge(dbag, self.qFile.data) -X return dbag -X -X def process_ipaliases(self, dbag): -X nic_dev = None -X # Should be a way to deal with this better -X for intf, data in dbag.items(): -X if intf == 'id': -X continue -X elif any([net['nw_type'] == 'guest' for net in data]): -X nic_dev = intf -X break -X -X assert nic_dev is not None, 'Unable to determine Guest interface' -X -X nic_dev_id = nic_dev[3:] -X -X for alias in self.qFile.data['aliases']: -X ip = { -X 'add': not alias['revoke'], -X 'nw_type': 'guest', -X 'public_ip': alias['ip_address'], -X 'netmask': alias['netmask'], -X 'nic_dev_id': nic_dev_id -X } -X dbag = cs_ip.merge(dbag, ip) -X return dbag -X -X -class QueueFile: -X -X fileName = '' -X configCache = "/var/cache/cloud" -X keep = True -X data = {} -X -X def load(self, data): -X if data is not None: -X self.data = data -X self.type = self.data["type"] -X updateDataBag(self) -X return -X filename = '{cache_location}/{json_file}'.format(cache_location=self.configCache, json_file=self.fileName) -X try: -X handle = open(filename) -X except IOError as exception: -X error_message = ("Exception occurred with the following exception error '{error}'. Could not open '{filename}'. " -X "It seems that the file has already been moved.".format(error=exception, filename=filename)) -X logging.error(error_message) -X else: -X logging.info("Continuing with the processing of file '{filename}'".format(filename=filename)) -X -X self.data = json.load(handle) -X self.type = self.data["type"] -X handle.close() -X if self.keep: -X self.__moveFile(filename, self.configCache + "/processed") -X else: -X logging.debug("Processed file deleted: %s and not kept in /processed", filename) -X os.remove(filename) -X updateDataBag(self) -X -X def setFile(self, name): -X self.fileName = name -X -X def getType(self): -X return self.type -X -X def getData(self): -X return self.data -X -X def setPath(self, path): -X self.configCache = path -X -X def __moveFile(self, origPath, path): -X if not os.path.exists(path): -X os.makedirs(path) -X originalName = os.path.basename(origPath) -X if originalName.count(".") == 1: -X originalName += "." + str(uuid.uuid4()) -X zipped_file_name = path + "/" + originalName + ".gz" -X with open(origPath, 'rb') as f_in, gzip.open(zipped_file_name, 'wb') as f_out: -X shutil.copyfileobj(f_in, f_out) -X os.remove(origPath) -X -X logging.debug("Processed file written to %s", zipped_file_name) -X -X -class PrivateGatewayHack: -X -X @classmethod -X def update_network_type_for_privategateway(cls, dbag, data): -X ip = data['router_guest_ip'] if 'router_guest_ip' in data.keys() else data['public_ip'] -X -X initial_data = cls.load_inital_data() -X has_private_gw_ip = cls.if_config_has_privategateway(initial_data) -X private_gw_matches = 'privategateway' in initial_data['config'] and cls.ip_matches_private_gateway_ip(ip, initial_data['config']['privategateway']) -X -X if has_private_gw_ip and private_gw_matches: -X data['nw_type'] = "public" -X logging.debug("Updating nw_type for ip %s" % ip) -X else: -X logging.debug("Not updating nw_type for ip %s because has_private_gw_ip = %s and private_gw_matches = %s " % (ip, has_private_gw_ip, private_gw_matches)) -X return data -X -X @classmethod -X def if_config_has_privategateway(cls, dbag): -X return 'privategateway' in dbag['config'].keys() and dbag['config']['privategateway'] != "None" -X -X @classmethod -X def ip_matches_private_gateway_ip(cls, ip, private_gateway_ip): -X new_ip_matches_private_gateway_ip = False -X if ip == private_gateway_ip: -X new_ip_matches_private_gateway_ip = True -X return new_ip_matches_private_gateway_ip -X -X @classmethod -X def load_inital_data(cls): -X initial_data_bag = DataBag() -X initial_data_bag.setKey('cmdline') -X initial_data_bag.load() -X initial_data = initial_data_bag.getDataBag() -X logging.debug("Initial data = %s" % initial_data) -X -X return initial_data -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/merge.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/merge.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/merge.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/merge.py': 'MD5 check failed' - ) << \SHAR_EOF -dc7c85d58b4e5f38ae61c82679523884 cloud_scripts/opt/cloud/bin/merge.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/merge.py'` -ne 13492 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/merge.py' is not 13492" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/master.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/master.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/master.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/master.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/master.py -M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2!&875L="(I"BAO<'1I -M;VYS+"!A/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/master.py': 'MD5 check failed' - ) << \SHAR_EOF -602ac6725c182da5ffa17760b2fe3ba5 cloud_scripts/opt/cloud/bin/master.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/master.py'` -ne 2040 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/master.py' is not 2040" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/set_redundant.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/set_redundant.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/set_redundant.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/set_redundant.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/set_redundant.py -M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/set_redundant.py': 'MD5 check failed' - ) << \SHAR_EOF -648b240f11d938ebd185d0e2a75004b8 cloud_scripts/opt/cloud/bin/set_redundant.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/set_redundant.py'` -ne 1663 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/set_redundant.py' is not 1663" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/checks2svpn.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checks2svpn.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/checks2svpn.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -if [ -z $1 ] -then -X echo "Fail to find VPN peer address!" -X exit 1 -fi -X -ipsec status vpn-$1 > /tmp/vpn-$1.status -X -cat /tmp/vpn-$1.status | grep "ESTABLISHED" > /dev/null -ipsecok=$? -if [ $ipsecok -ne 0 ] -then -X echo -n "IPsec SA not found;" -X echo "Site-to-site VPN have not connected" -X exit 11 -fi -echo -n "IPsec SA found;" -echo "Site-to-site VPN have connected" -Xexit 0 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/checks2svpn.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checks2svpn.sh': 'MD5 check failed' - ) << \SHAR_EOF -8aed94140f491ae027b3b55e9b1535bb cloud_scripts/opt/cloud/bin/checks2svpn.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checks2svpn.sh'` -ne 1178 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' is not 1178" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, vpn): -X key = vpn['vpn_server_ip'] -X op = vpn['create'] -X if key in dbag.keys() and not op: -X del(dbag[key]) -X else: -X dbag[key] = vpn -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py': 'MD5 check failed' - ) << \SHAR_EOF -9945565c7eb92c9fd9aa85648f8c4352 cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py'` -ne 994 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' is not 994" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_staticroutes.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_staticroutes.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_staticroutes.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, staticroutes): -X for route in staticroutes['routes']: -X key = route['network'] -X dbag[key] = route -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_staticroutes.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py': 'MD5 check failed' - ) << \SHAR_EOF -c89832deefffed1dcc12b367d9f9062e cloud_scripts/opt/cloud/bin/cs_staticroutes.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py'` -ne 952 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' is not 952" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, vpn): -X key = vpn['peer_gateway_ip'] -X op = vpn['create'] -X if key in dbag.keys() and not op: -X del(dbag[key]) -X else: -X dbag[key] = vpn -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py': 'MD5 check failed' - ) << \SHAR_EOF -37138a9d2b00c0cd0488f03f0b1e1c34 cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py'` -ne 996 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' is not 996" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/passwd_server_ip.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/passwd_server_ip.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/passwd_server_ip.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/passwd_server_ip.py -M(R$O=7-R+V)I;B]E;G8@<'ET:&]N"B,@3&EC96YS960@=&\@=&AE($%P86-H -M92!3;V9T=V%R92!&;W5N9&%T:6]N("A!4T8I('5N9&5R(&]N90HC(&]R(&UO -M2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N5]P87-S=V]R9"<@/')O=71E$EN(",L -M($9O2AO3H*("`@("`@("!W:71H(&9I;&4H9V5T4&%S -M&-E<'0@24]%3H* -M("`@("`@("`@("`@=VET:"!F:6QE*&=E=%!A&-E -M<'0@24]%"<*("`@(&1E9B!D;U]'150H5]P87-S=V]R9"7!E(#T]("=S879E9%]P87-S=V]R9"7-L;VR=215%515-47TU%5$A/1"7!E)UTL"B`@("`@("`@("`@("`@ -M("`@("`@?2D*("`@("`@("!S96QF+G-E;F1?7-L;V6EN9R!T;R!S879E('!A7-L;V6EN9R!T;R!S879E('!A7-L -M;V7-L;V7-L;V7,N87)G=BD@/B`Q -M.@H@("`@("`@(&%D9')E7-L -M;V6)O87)D26YT97)R -M=7!T.@H@("`@("`@('-Y7-L;V&-E<'0@17AC97!T:6]N+"!E.@H@("`@("`@('-Y7-L;V&-E<'1I;VX@)7,@+2T@ -M9&EE9"<@)2!E*0H@("`@("`@('!A/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py': 'MD5 check failed' - ) << \SHAR_EOF -1d63c1d8b2e5a6a48d48d76228964aee cloud_scripts/opt/cloud/bin/passwd_server_ip.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py'` -ne 7020 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py' is not 7020" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_network_acl.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_network_acl.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_network_acl.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_network_acl.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_network_acl.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_network_acl.py': 'MD5 check failed' - ) << \SHAR_EOF -79760ec4739cb68a9a8bf86319a2dd65 cloud_scripts/opt/cloud/bin/cs_network_acl.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_network_acl.py'` -ne 881 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_network_acl.py' is not 881" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cleanup.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cleanup.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cleanup.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cleanup.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cleanup.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -#rm -rf $@ && echo $? -X -zip_file=$1 -if [ -e "$zip_file" ]; -then -X rm -rf "$zip_file" -X echo "Deleting diagnostics zip file $zip_file" -else -X echo "File $zip_file not found in vm " -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cleanup.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cleanup.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cleanup.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cleanup.sh': 'MD5 check failed' - ) << \SHAR_EOF -63ca1758ffda6344d2622a21f5fc15b9 cloud_scripts/opt/cloud/bin/cleanup.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cleanup.sh'` -ne 986 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cleanup.sh' is not 986" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_loadbalancer.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_loadbalancer.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_loadbalancer.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import copy -X -X -def merge(dbag, data): -X """ Simply overwrite the existsing bag as, the whole configuration is sent every time """ -X if "rules" not in data: -X return dbag -X dbag['config'] = data['rules'] -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_loadbalancer.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py': 'MD5 check failed' - ) << \SHAR_EOF -667380d51eaa9aade2317d66a11529aa cloud_scripts/opt/cloud/bin/cs_loadbalancer.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py'` -ne 1016 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' is not 1016" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpc_func.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_func.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_func.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_func.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_func.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# @VERSION@ -X -getEthByIp (){ -X local ip=$1 -X for dev in `ls -1 /sys/class/net | grep eth` -X do -X sudo ip addr show dev $dev | grep $ip\/ > /dev/null -X if [ $? -eq 0 ] -X then -X echo $dev -X return 0 -X fi -X done -X return 1 -} -X -getVPCcidr () { -X CMDLINE=$(cat /var/cache/cloud/cmdline) -X for i in $CMDLINE -X do -X # search for foo=bar pattern and cut out foo -X KEY=$(echo $i | cut -d= -f1) -X VALUE=$(echo $i | cut -d= -f2) -X if [ "$KEY" == "vpccidr" ] -X then -X echo "$VALUE" -X return 0 -X fi -X done -X return 1 -} -X -removeRulesForIp() { -X local ip=$1 -X iptables-save -t mangle | grep $ip | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t mangle $rule -X done -X iptables-save -t nat | grep $ip | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t nat $rule -X done -X iptables-save -t filter | grep $ip | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t filter $rule -X done -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_func.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_func.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_func.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_func.sh': 'MD5 check failed' - ) << \SHAR_EOF -bc1b0432818cc40ea79df6720e16ecad cloud_scripts/opt/cloud/bin/vpc_func.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_func.sh'` -ne 1849 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_func.sh' is not 1849" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsDhcp.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsDhcp.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N'0B"D1(0U!?3U!44R`]("(O971C+V1H8W!O<'1S -M+G1X="(*0TQ/541?0T].1B`]("(O971C+V1N"`](#`*("`@("`@("!L:7-T96Y?861D0H@("`@("`@("`@("!G871E=V%Y(#T@ -M)R<*("`@("`@("`@("`@:68@2`](&E;)V=A=&5W -M87DG70H@("`@("`@("`@("!S;&EN92`](")D:&-P+7)A;F=E/7-E=#II;G1E -M"P@9V%T97=A>2D*("`@("`@("`@("`@96QS93H*("`@ -M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UR86YG93US970Z:6YT97)F86-E -M+25S+25S+"5S+'-T871I8R(@)2`H9&5V:6-E+"!I9'@L(&EP*0H@("`@("`@ -M("`@("!S96QF+F-O;F8N"D*("`@("`@("`@("`@;&EN92`](")D:&-P+6]P -M=&EO;CUT86"P@9VXN9V5T7V1O;6%I;B@I*0H@("`@("`@("`@("!S96QF+F-O;F8N"!F;W(@>"!I;B!G;BYG971?9&YS*"D@:68@>%T*("`@ -M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C -M92TE"P@)RPG+FIO:6XH9&YS7VQI -M2`A/2`G,"XP+C`N,""D*("`@("`@("`@("`@("`@ -M(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C92TE"P@9V%T97=A>2D*("`@("`@("`@("`@("`@('-E -M;&8N8V]N9BYS96%R8V@H"P@;F5T;6%S:RD*("`@("`@("`@("`@"`K/2`Q"@H@("`@("`@(",@ -M3&ES=&5N($%D9')E3H*("`@ -M("`@("`@("`@;&]G9VEN9RYI;F9O*")!='1E;7!T:6YG('1O(&1E;&5T92!E -M;G1R:65S(&9R;VT@9&YS;6%S<2YL96%S97,@9FEL92!F;W(@5DUS('=H:6-H -M(&%R92!N;W0@;VX@9&AC<&AOW!R:6YT("0S?22DZ"B`@("`@("`@5LG:7!V-%]A -M9&1R97-S)UTL(&5N=')Y6R=H;W-T7VYA;64G72D*("`@("`@("`C($QE87-E -M('1I;64@'!U;F=E9"P@:71S(&%C=&EV -M92!L96%S92!A;F0@1$A#4"]$3E,@8V]N9FEG(&ES('!R;W!E2!I2!R=6YN:6YG(&EN('!R;V1U8W1I;VYS -M('-Y5LG:7!V-%]A9&1R -M97-S)UTL"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@ -M("`@("`@("`@("`@("!E;G1R>5LG:&]S=%]N86UE)UTL"B`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!L96%S -M92DI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L)7,B("4@ -M*'1A9RP@,RDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L -M)7,B("4@*'1A9RP@-BDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D -M9"@B)7,L)7,B("4@*'1A9RP@,34I*0H*("`@("`@("!I(#T@25!!9&1R97-S -M*&5N=')Y6R=I<'8T7V%D9')E2==(#T@96YT2=="@H@("`@9&5F(&%D9%]H;W-T*'-E;&8L(&EP+"!H;W-T -M/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py': 'MD5 check failed' - ) << \SHAR_EOF -bcf1831b38d86bf041523540fa8f821e cloud_scripts/opt/cloud/bin/cs/CsDhcp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py'` -ne 8809 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' is not 8809" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsRedundant.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsRedundant.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N7,N2`](%1R=64*"B`@ -M("`@("`@:68@;F]T(&ES1&5V:6-E4F5A9'DZ"B`@("`@("`@("`@(&QO9V=I -M;F5]I9E]N965D960H"B`@("`@("`@("`@("(E&5C("1$045-3TX@+2T@+2UVR(L(")](BP@6PH@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("`@("(@("`@("`@(&%U=&A?='EP92!!2"!< -M;B(L("(@("`@("`@(&%U=&A?<&%S2AC;VYN=')A8VMD7W1E;7!L871E7V-O;F8L(&-O;FYT0H@("`@("`@("(B(@H@("`@("`@(&ET97)A=&EO;G,@ -M/2`Q,`H@("`@("`@('1I;65?8F5T=V5E;B`](#$*"B`@("`@("`@9F]R(&ET -M97(@:6X@3H* -M("`@("`@("`@("`@("`@(',@/2!S;V-K970N2!R=6YN:6YG("@E9#HE2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I<"@I*2YS=&]P*"D* -M"B`@("`@("`@0W-(96QP97(N2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@ -M("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")!9&1I;F<@9V%T97=A>2`]/3X@ -M)7,@=&\@9&5V:6-E(#T]/B`E2P@9&5V*2D*("`@("`@ -M("`@("`@("`@("`@("!I9B!D978@/3T@0W-(96QP97(N4%5"3$E#7TE.5$52 -M1D%#15-;&5C -M=71E*"(E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I -M<"@I*2YR97-T87)T*"D*"B`@("`@("`@0W-(96QP97(N2D*"B`@("`@("`@("`@(",@5&AE(&9I -M2!I;G1E2!V'1E2!E=F5R(&)E(&]N92!A9&1R97-S(&EN -M(&$@5E!#('1H97)E(&-A;B!B92!M86YY"B`@("`@("`@5&AE(&YE=R!C;V1E -M(&%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py': 'MD5 check failed' - ) << \SHAR_EOF -6936e38f53736f7c5a04b255800a242d cloud_scripts/opt/cloud/bin/cs/CsRedundant.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py'` -ne 16789 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' is not 16789" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsHelper.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsHelper.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsHelper.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsHelper.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B -M971H,2)]"@I35$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S -M:"`M8R`@)VEF(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@ -M96QS92!E8VAO(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@ -M(")V<&-R;W5T97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@ -M6R`D,"`]/2!<(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ -M"B`@("`@("`@("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@ -M("`@("`@(&-M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@ -M("`@("`@;&]G9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S -M(B`E('-T871E7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X -M96-U=&4H7!E*"E=(&%N9"!S -M=&%T92`]/2`B34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE -M8W5T92AC;60I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ -M("`@("`@(&5X96-U=&4H8VUD*0H*"F1E9B!I&5C=71E -M*")M;W5N="!T;7!F6XH=F%L*3H*("`@(&EF('9A;#H* -M("`@("`@("!R971U&5C=71E*")I<"!A9&1R('-H;W<@ -M?&=R97`@+78@WT*("`@("`@("`@("`@ -M=&];)VEP)UT@/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A -M;'-;+3%="B`@("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@ -M("(B(@H@("`@9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G -M*")3879I;F<@:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C -M=71E*")S>7-T96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I -M;F7-T96UC=&P@&5C=71E*")K:6QL -M("U(55`@)7,B("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D -M;G-M87-Q(BP@(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py': 'MD5 check failed' - ) << \SHAR_EOF -9bdd1fdfea8177d3e408b2cc87e5d503 cloud_scripts/opt/cloud/bin/cs/CsHelper.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py'` -ne 7644 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' is not 7644" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5NWT*("`@("`@("!S96QF+F=U97-T(#T@5')U90H@("`@("`@ -M(&1B(#T@1&%T84)A9R@I"B`@("`@("`@9&(N7,H*2!A;F0@;&5N*&1B86=;9&5V:6-E -M72D@(3T@,#H*("`@("`@("`@("`@2==*0H*("`@ -M("`@("!I9B`G9&YS)R!I;B!S96QF+F1A=&$Z"B`@("`@("`@("`@(&1N'1E;F0H&-E<'1I;VXN"B`@("`@("`@:68@)W)O -M=71E"!I="!P2X@22!J=7-T(&%D -M9&5D('1H92!I9BP@87,@26%N(&1I9"!I;B!S;VUE(&]T:&5R(&9I;&5S+"!T -M;R!A=F]I9"!T:&4@97AC97!T:6]N+@H@("`@("`@(&EF("=R;W5T97)?9W5E -M2<@:6X@2=="B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py': 'MD5 check failed' - ) << \SHAR_EOF -98c84f4067412f263891f8293f185243 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py'` -ne 2545 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' is not 2545" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsMonitor.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N"!I;B!S96QF+F1B86=;)V-O;F9I9R==+G-P;&ET*"WT*("`@("`@("!H8U]D871A6R)H96%L=&A?8VAE8VMS7V)A&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!S96QF+F1B -M86&-L=61E9%]H96%L=&A?8VAE8VMS(ET@/2!;70H* -M("`@("`@("!I9B`B:&5A;'1H7V-H96-K/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py': 'MD5 check failed' - ) << \SHAR_EOF -d8f5dcf496dbc6d8508e40b906f48245 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py'` -ne 3681 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' is not 3681" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@ -M("`@("!S96QF+FQA2!E>&ES=',Z(')U;&4] -M)7,@=&%B;&4])7,@8VAA:6X])7,B+"!N97=?2`](&-P>2YR97!L86-E*"(M02`E&5C=71E,B@B:7!T86)L97,@+70@)7,@ -M)7,B("4@*&YE=U]R=6QE+F=E=%]T86)L92@I+"!C<'DI*0H@("`@("`@("`@ -M("`@("`@(R!4:&5R92!A"!I;B!T:&4@ -M9G)A;65W;W)K+@H@("`@("`@("`@("`@("`@:68@&5C=71E*")I<'1A8FQE7!E(#T@0W-#;61,:6YE*")C;61L:6YE(BDN9V5T7W1Y<&4H*0H* -M("`@("`@("!T7!E*3H*("`@("`@("`@("`@("`@(&EF(&DNFEP*&)I='-;,#HZ,ETL(&)I='-;,3HZ,ETI*0H@("`@("`@(&EF -M("(M02(@:6X@2!C;W)R96-T(&EP=&%B;&5S(&-O;6UA -M;F0@(B(B"B`@("`@("`@(R!/7,H*3H*("`@("`@("`@("`@("`@('!R:6YT86)L92`] -M(&LN=7)N($9A;'-E"B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py': 'MD5 check failed' - ) << \SHAR_EOF -7456b53eba9f115f9ad344bc1c01611d cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py'` -ne 11100 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' is not 11100" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsRoute.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRoute.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRoute.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import CsHelper -import logging -X -X -class CsRoute: -X -X """ Manage routes """ -X -X def __init__(self): -X self.table_prefix = "Table_" -X -X def get_tablename(self, name): -X return self.table_prefix + name -X -X def add_table(self, devicename): -X tablenumber = 100 + int(devicename[3:]) -X tablename = self.get_tablename(devicename) -X str = "%s %s" % (tablenumber, tablename) -X filename = "/etc/iproute2/rt_tables" -X logging.info("Adding route table: " + str + " to " + filename + " if not present ") -X if not CsHelper.definedinfile(filename, str): -X CsHelper.execute("sudo echo " + str + " >> /etc/iproute2/rt_tables") -X # remove "from all table tablename" if exists, else it will interfer with -X # routing of unintended traffic -X if self.findRule("from all lookup " + tablename): -X CsHelper.execute("sudo ip rule delete from all table " + tablename) -X -X def flush_table(self, tablename): -X CsHelper.execute("ip route flush table %s" % (tablename)) -X CsHelper.execute("ip route flush cache") -X -X def add_route(self, dev, address): -X """ Wrapper method that adds table name and device to route statement """ -X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 -X table = self.get_tablename(dev) -X -X if not table or not address: -X empty_param = "table" if not table else "address" -X logging.info("Empty parameter received %s while trying to add route, skipping" % empty_param) -X else: -X logging.info("Adding route: dev " + dev + " table: " + -X table + " network: " + address + " if not present") -X cmd = "default via %s table %s proto static" % (address, table) -X self.set_route(cmd) -X -X def add_network_route(self, dev, address): -X """ Wrapper method that adds table name and device to route statement """ -X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 -X table = self.get_tablename(dev) -X -X if not table or not address: -X empty_param = "table" if not table else "address" -X logging.info("Empty parameter received %s while trying to add network route, skipping" % empty_param) -X else: -X logging.info("Adding route: dev " + dev + " table: " + -X table + " network: " + address + " if not present") -X cmd = "throw %s table %s proto static" % (address, table) -X self.set_route(cmd) -X -X def set_route(self, cmd, method="add"): -X """ Add a route if it is not already defined """ -X found = False -X search = cmd -X if "throw" in search: -X search = search.replace("throw", "") -X for i in CsHelper.execute("ip route show " + search): -X found = True -X if not found and method == "add": -X logging.info("Add " + cmd) -X cmd = "ip route add " + cmd -X elif found and method == "delete": -X logging.info("Delete " + cmd) -X cmd = "ip route delete " + cmd -X else: -X return -X CsHelper.execute(cmd) -X -X def add_defaultroute(self, gateway): -X """ Add a default route -X :param str gateway -X :return: bool -X """ -X if not gateway: -X raise Exception("Gateway cannot be None.") -X -X if self.defaultroute_exists(): -X return False -X else: -X cmd = "default via " + gateway -X logging.info("Adding default route") -X self.set_route(cmd) -X return True -X -X def defaultroute_exists(self): -X """ Return True if a default route is present -X :return: bool -X """ -X logging.info("Checking if default ipv4 route is present") -X route_found = CsHelper.execute("ip -4 route list 0/0") -X -X if len(route_found) > 0: -X logging.info("Default route found: " + route_found[0]) -X return True -X else: -X logging.warn("No default route found!") -X return False -X -X def findRule(self, rule): -X for i in CsHelper.execute("ip rule show"): -X if rule in i.strip(): -X return True -X return False -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRoute.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py': 'MD5 check failed' - ) << \SHAR_EOF -4f2109aa1d89157e14817f90c676c2d3 cloud_scripts/opt/cloud/bin/cs/CsRoute.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py'` -ne 4989 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' is not 4989" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py -M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2==*0H@("`@("`@("`@ -M("!#&5C=71E*&-O;6UA;F0I"B`@("`@("`@96QS93H*("`@ -M("`@("`@("`@8V]M;6%N9"`](")I<"!R;W5T92!S:&]W('P@9W)E<"`EW!R:6YT("0Q+"`D,WTG(B`E(')O=71E6R=N971W;W)K)UT*("`@ -M("`@("`@("`@2==*0H@("`@("`@("`@("`@ -C("`@0W-(96QP97(N97AE8W5T92AR;W5T95]C;VUM86YD*0H@ -` -end -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py': 'MD5 check failed' - ) << \SHAR_EOF -f9f9db3a4543397153d69a62551a6c8c cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py'` -ne 1655 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' is not 1655" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N7,H*3H* -M("`@("`@("`@("`@"YS<&QI="@G7&XG*5T*"B`@("`@("`@9FEL -M93$N8V]M;6ET*"D*("`@("`@("!F:6QE,B`]($-S1FEL92A(05!23UA97T-/ -M3D9?4"D*("`@("`@("!I9B!N;W0@9FEL93(N8V]M<&%R92AF:6QE,2DZ"B`@ -M("`@("`@("`@($-S2&5L<&5R+F-O<'DH2$%04D]865]#3TY&7U0L($A!4%)/ -M6%E?0T].1E]0*0H*("`@("`@("`@("`@<')O8R`]($-S4')O8V5S2YP:60G72D*("`@("`@("`@("`@:68@;F]T('!R;V,N9FEN -M9"@I.@H@("`@("`@("`@("`@("`@;&]G9VEN9RYD96)U9R@B0W-,;V%D0F%L -M86YC97(Z.B!W:6QL(')E2$B*0H@("`@("`@("`@("`@ -M("`@0W-(96QP97(N2(L(")R97-T87)T(BD*("`@ -M("`@("`@("`@96QS93H*("`@("`@("`@("`@("`@(&QO9V=I;F2$B*0H@("`@ -M("`@("`@("`@("`@0W-(96QP97(N2(L(")R96QO -M860B*0H*("`@("`@("!A9&1?/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py': 'MD5 check failed' - ) << \SHAR_EOF -8f93571ff9b8f21c947e90193c3efa38 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py'` -ne 3393 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' is not 3393" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsApp.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsApp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsApp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsApp.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G -M871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG971?='EP92@I"B`@ -M("`@("`@5]I9E]N965D -M960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L"B`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE,B]S:71E2DI"B`@("`@("`@ -M("`@(&9I;&4N&5C=71E,B@B/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsApp.py': 'MD5 check failed' - ) << \SHAR_EOF -fa071a9d58a918b6a9d5e09ae10e3e11 cloud_scripts/opt/cloud/bin/cs/CsApp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsApp.py'` -ne 4159 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' is not 4159" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsFile.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsFile.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsFile.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import logging -import re -import copy -X -X -class CsFile: -X """ File editors """ -X -X def __init__(self, filename): -X self.filename = filename -X self.load() -X -X def load(self): -X self.new_config = [] -X self.config = [] -X try: -X for line in open(self.filename): -X self.new_config.append(line) -X except IOError: -X logging.debug("File %s does not exist" % self.filename) -X else: -X logging.debug("Reading file %s" % self.filename) -X self.config = list(self.new_config) -X -X def is_changed(self): -X if set(self.config) != set(self.new_config): -X return True -X else: -X return False -X -X def __len__(self): -X return len(self.config) -X -X def empty(self): -X self.config = [] -X self.new_config = [] -X -X def repopulate(self): -X self.new_config = [] -X -X def commit(self): -X if not self.is_changed(): -X logging.info("Nothing to commit. The %s file did not change" % self.filename) -X return False -X handle = open(self.filename, "w+") -X for line in self.new_config: -X handle.write(line) -X handle.close() -X logging.info("Wrote edited file %s" % self.filename) -X self.config = list(self.new_config) -X logging.info("Updated file in-cache configuration") -X return True -X -X def dump(self): -X for line in self.new_config: -X print line -X -X def addeq(self, string): -X """ Update a line in a file of the form token=something -X match on token= and replace something if needed -X Add line if token is not present -X """ -X token = string.split('=')[0] + '=' -X self.search(token, string) -X -X def append(self, string, where=-1): -X if where == -1: -X self.new_config.append("%s\n" % string) -X else: -X self.new_config.insert(where, "%s\n" % string) -X -X def add(self, string, where=-1): -X for index, line in enumerate(self.new_config): -X if line.strip() == string: -X return False -X if where == -1: -X self.new_config.append("%s\n" % string) -X else: -X self.new_config.insert(where, "%s\n" % string) -X return True -X -X def section(self, start, end, content): -X sind = -1 -X eind = -1 -X found = False -X for index, line in enumerate(self.new_config): -X if found and line.strip() == end: -X eind = index -X found = False -X if line.strip() == start: -X sind = index + 1 -X found = True -X if sind == -1: -X content.insert(0, start + "\n") -X content.append(end + "\n") -X self.new_config[sind:eind] = content -X -X def greplace(self, search, replace): -X logging.debug("Searching for %s and replacing with %s" % (search, replace)) -X self.new_config = [w.replace(search, replace) for w in self.new_config] -X -X def replaceIfFound(self, search, replace): -X found = False -X replace_filtered = replace -X if re.search("PSK \"", replace): -X replace_filtered = re.sub(r'".*"', '"****"', replace) -X logging.debug("Searching for %s and replacing with %s if found" % (search, replace_filtered)) -X for index, line in enumerate(self.new_config): -X if line.lstrip().startswith("#"): -X continue -X if re.search(search, line): -X if replace not in line: -X self.new_config[index] = replace + "\n" -X return False -X -X def search(self, search, replace): -X found = False -X replace_filtered = replace -X if re.search("PSK \"", replace): -X replace_filtered = re.sub(r'".*"', '"****"', replace) -X logging.debug("Searching for %s and replacing with %s" % (search, replace_filtered)) -X for index, line in enumerate(self.new_config): -X if line.lstrip().startswith("#"): -X continue -X if re.search(search, line): -X found = True -X if replace not in line: -X self.new_config[index] = replace + "\n" -X if not found: -X self.new_config.append(replace + "\n") -X return True -X return False -X -X def searchString(self, search, ignoreLinesStartWith): -X found = False -X logging.debug("Searching for %s string " % search) -X -X for index, line in enumerate(self.new_config): -X print ' line = ' + line -X if line.lstrip().startswith(ignoreLinesStartWith): -X continue -X if search in line: -X found = True -X break -X -X return found -X -X def deleteLine(self, search): -X found = False -X logging.debug("Searching for %s to remove the line " % search) -X temp_config = [] -X for index, line in enumerate(self.new_config): -X if line.lstrip().startswith("#"): -X continue -X if search not in line: -X temp_config.append(line) -X -X self.new_config = list(temp_config) -X -X def compare(self, o): -X result = (isinstance(o, self.__class__) and set(self.config) == set(o.config)) -X logging.debug("Comparison of CsFiles content is ==> %s" % result) -X return result -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsFile.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsFile.py': 'MD5 check failed' - ) << \SHAR_EOF -81531ddee205a5eb66bb44f400ab222c cloud_scripts/opt/cloud/bin/cs/CsFile.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsFile.py'` -ne 6133 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' is not 6133" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/__init__.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/__init__.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/__init__.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/__init__.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/__init__.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/__init__.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/__init__.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/__init__.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/__init__.py': 'MD5 check failed' - ) << \SHAR_EOF -33215d440d5ba5fa95b1ffa035d769e2 cloud_scripts/opt/cloud/bin/cs/__init__.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/__init__.py'` -ne 785 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/__init__.py' is not 785" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsAddress.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsAddress.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsAddress.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsAddress.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N`H@("`@("`@("`@("`@("`@("`@ -M(&=U97-T7VEN=&5R9F%C92`](&EN=&5R9F%C90H@("`@("`@("`@("`@("`@ -M("`@(&QO9V=I;F2!C;VYF:6=U2AS96QF*3H*("`@("`@("!I -M9B!S96QF+F-O;F9I9RYI2(I -M"B`@("`@("`@96QS93H*("`@("`@("`@("`@2@I+"!S96QF+F=E=%]S -M:7IE*"DI"@H@("`@9&5F(&=E=%]S:7IE*'-E;&8I.@H@("`@("`@("(B(B!2 -M971U7!E -M(B!I;B!S96QF+F%D9')E"@Q,#`@*R!I;G0H9&5V6S,Z72DI -M"B`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@("`@97AC97!T($5X8V5P=&EO;B!A -M&-E<'1I;VX@ -M;V-C=7)R960@/3T^("5S(B`E(&4I"@H@("`@("`@("`@("!S96QF+G!O7!E*"D@:6X@6R)C;VYT7!E*"D@:6X@ -M6R=P=6)L:6,G73H*("`@("`@("`@("`@("`@('-E;&8N7!E*"E=.@H@("`@("`@ -M("`@("`@("`@9V%T97=A>2`]('-T2@I*3H* -M("`@("`@("`@("`@("`@(')O=71E+F%D9%]D969A=6QT2@I*0H*("`@(&1E9B!S971?;6%R:RAS96QF*3H*("`@ -M("`@("!C;60@/2`B+4$@4%)%4D]55$E.1R`M:2`E7!E(&]F('1H92!)4`H@("`@("`@(&=U97-T"B`@("`@("`@8V]N -M=')O;`H@("`@("`@('!U8FQI8PH@("`@("`@("(B(@H@("`@("`@(&EF(")N -M=U]T>7!E(B!I;B!S96QF+F%D9')E&9F9F9F9F9F -M("TM8W1M87-K(#!X9F9F9F9F9F8B72D*"B`@("`@("`@&UA7!E*"D@:6X@6R)G=65S=")=.@H@("`@("`@("`@("!G=65S -M=$YE='=O&9F9F9F9F9F(ETI"B`@ -M("`@("`@("`@(&=U97-T3F5T=V]R:T-I9'(@/2!S96QF+F%D9')E#4R-2\P>&9F9F9F9F9F(B`E -M("AS96QF+F1E=BP@2)=("$](").;VYE(CH* -M("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@("`@("`@:68@ -M(FYE='=O7!E*"D@:6X@6R)P=6)L:6,B -M72!A;F0@(F=A=&5W87DB(&EN('-E;&8N861D2)=("$] -M(").;VYE(CH*("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@ -M("`@("`@("`@(&9O7!E(B!I;B!A9&1R97-S(&%N9"!A -M9&1R97-S6R)N=U]T>7!E(ET@/3T@(F=U97-T(CH*("`@("`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("!R;W5T92YA9&1?;F5T=V]R:U]R;W5T92AS96QF -M+F1E=BP@&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A8VAE(BD*"B`@("`@("`@ -M96QI9B!M971H;V0@/3T@(F1E;&5T92(Z"B`@("`@("`@("`@(",@=')E870@ -M=&AE(&QA&5C=71E*")S=61O(&EP(')U;&4@9&5L971E('1A8FQE("(@*R!T86)L94YA -M;64I"B`@("`@("`@("`@("`@("!#&5C=71E*")S=61O(&EP -M(')O=71E(&9L=7-H('1A8FQE("(@*R!T86)L94YA;64I"B`@("`@("`@("`@ -M("`@("!#&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A -M8VAE(BD*("`@("`@("`@("`@("`@($-S4G5L92AS96QF+F1E=BDN9&5L36%R -M:R@I"@H@("`@("`@('-E;&8N9G=?7!E('=I;&P@ -M;F\@;&]N9V5R(&)E(&MN;W=N"B`@("`@("`@:68@7!E*"D@/3T@(G!U8FQI8R(@86YD('-E;&8N8V]N9FEG+FES7W9P8R@I -M(&%N9"!M971H;V0@/3T@(F%D9"(Z"B`@("`@("`@("`@(&EF('-E;&8N861D -M7,H*3H*("`@("`@("`@ -M("`@7!E)UT@:6X@5E)2 -M4%]465!%4SH*("`@("`@("`@("`@7!E(B!I;B!S96QF+F%D9')E&5C=71E,BAC;60L($9A -M;'-E*0H*("`@(",@1&5L971E(&%N>2!I<',@=&AA="!A7,H*2!O2AS96QF+"!B862!F;W(@ -M7,O8VQA"TP+W)P&-E<'0@24]%/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py': 'MD5 check failed' - ) << \SHAR_EOF -5cebbbd106abd3eba7ee0e4d23277dda cloud_scripts/opt/cloud/bin/cs/CsAddress.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py'` -ne 29236 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' is not 29236" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsProcess.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsProcess.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsProcess.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import os -import re -import CsHelper -import logging -X -X -class CsProcess(object): -X """ Manipulate processes """ -X -X def __init__(self, search): -X self.search = search -X -X def start(self, thru, background=''): -X # if(background): -X # cmd = cmd + " &" -X logging.info("Started %s", " ".join(self.search)) -X os.system("%s %s %s" % (thru, " ".join(self.search), background)) -X -X def kill_all(self): -X pids = self.find_pid() -X for p in pids: -X CsHelper.execute("kill -9 %s" % p) -X -X def find_pid(self): -X self.pid = [] -X for i in CsHelper.execute("ps aux"): -X items = len(self.search) -X proc = re.split(r"\s+", i)[items*-1:] -X matches = len([m for m in proc if m in self.search]) -X if matches == items: -X self.pid.append(re.split(r"\s+", i)[1]) -X -X logging.debug("CsProcess:: Searching for process ==> %s and found PIDs ==> %s", self.search, self.pid) -X return self.pid -X -X def find(self): -X has_pid = len(self.find_pid()) > 0 -X return has_pid -X -X def kill(self, pid): -X if pid > 1: -X CsHelper.execute("kill -9 %s" % pid) -X -X def grep(self, str): -X for i in CsHelper.execute("ps aux"): -X if i.find(str) != -1: -X return re.split(r"\s+", i)[1] -X return -1 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsProcess.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py': 'MD5 check failed' - ) << \SHAR_EOF -75a4650fe1e521049e80d32a022d8689 cloud_scripts/opt/cloud/bin/cs/CsProcess.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py'` -ne 2156 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' is not 2156" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsConfig.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsConfig.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsConfig.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsConfig.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N7!E*"D@/3T@)W9P8W)O=71E'1D;G,H'1D;G,G+"`G9F%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py': 'MD5 check failed' - ) << \SHAR_EOF -836541a5b9cb1b2f9df5dad6bb806745 cloud_scripts/opt/cloud/bin/cs/CsConfig.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py'` -ne 3179 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' is not 3179" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsDatabag.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@("`@ -M("!S96QF+F1B(#T@1&%T84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF -M+F1B+G-A=F4HWT*("`@("`@("!R971U&1I9V5S="@I"@H@("`@ -M9&5F(&=E=%]G871E=V%Y*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I -M;B!S96QF+FED871A*"DZ"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A -M*"E;)V=A=&5W87DG70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G -M971?=7-E7V5X=%]D;G,H'1D;G,G70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E -M9B!G971?861V97)T7VEN="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN -M="<@:6X@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py': 'MD5 check failed' - ) << \SHAR_EOF -9e4de6e0a115a5e806e80dc151769b21 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py'` -ne 4808 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' is not 4808" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsRule.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRule.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRule.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import CsHelper -import logging -X -X -class CsRule: -X """ Manage iprules -X Supported Types: -X fwmark -X """ -X -X def __init__(self, dev): -X self.dev = dev -X self.tableNo = 100 + int(dev[3:]) -X self.table = "Table_%s" % (dev) -X -X def addRule(self, rule): -X if not self.findRule(rule + " lookup " + self.table): -X cmd = "ip rule add " + rule + " table " + self.table -X CsHelper.execute(cmd) -X logging.info("Added rule %s for %s" % (cmd, self.table)) -X -X def findRule(self, rule): -X for i in CsHelper.execute("ip rule show"): -X if rule in i.strip(): -X return True -X return False -X -X def addMark(self): -X if not self.findMark(): -X cmd = "ip rule add fwmark %s table %s" % (self.tableNo, self.table) -X CsHelper.execute(cmd) -X logging.info("Added fwmark rule for %s" % (self.table)) -X -X def delMark(self): -X if self.findMark(): -X cmd = "ip rule delete fwmark %s table %s" % (self.tableNo, self.table) -X CsHelper.execute(cmd) -X logging.info("Deleting fwmark rule for %s" % (self.table)) -X -X def findMark(self): -X srch = "from all fwmark %s lookup %s" % (hex(self.tableNo), self.table) -X for i in CsHelper.execute("ip rule show"): -X if srch in i.strip(): -X return True -X return False -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRule.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRule.py': 'MD5 check failed' - ) << \SHAR_EOF -78748432f1ac57194339aef8bdb7c9f8 cloud_scripts/opt/cloud/bin/cs/CsRule.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRule.py'` -ne 2192 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' is not 2192" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vmdata.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vmdata.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vmdata.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vmdata.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/vmdata.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&ET*#(I -M"@H@("`@9F]R(&EP(&EN(&IS;VY?9&%T83H*("`@("`@("!F;W(@:71E;2!I -M;B!J2!V86QI9"!D -M871A"B`@("`@("`@("`@(&EF(&9O;&1E&ES=',H;65T -M86UA;FEF97-T*3H*("`@("`@("!O2Q!;&QO=UQN1&5N -M>2!F&-E<'0@3U-%2!E>&ES=',L('=E(&1O(&ET('1H:7,@=V%Y(&9O -M7,N97AI="@Q*0H*("`@(&9H(#T@;W!E;BAH -M=&%C8V5S2`K("=<;B&9L;V-K*&9I;&4I.@H@("`@=')Y.@H@("`@("`@(&9L;V-K -M*&9I;&4L($Q/0TM?15@I"B`@("!E>&-E<'0@24]%7,N97AI="@Q -M*0H@("`@3H*("`@("`@("!F;&]C:RAF:6QE+"!,3T-+7U5.*0H@("`@97AC97!T($E/ -M17)R;W(@87,@93H*("`@("`@("!P7,N97AI="@Q*0H@("`@7,N87)G=ELQ.ETI"FYA -` -end -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vmdata.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vmdata.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vmdata.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vmdata.py': 'MD5 check failed' - ) << \SHAR_EOF -f585277ddefb989a0662db609bc199c7 cloud_scripts/opt/cloud/bin/vmdata.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vmdata.py'` -ne 4723 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vmdata.py' is not 4723" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/get_diagnostics_files.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/get_diagnostics_files.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/get_diagnostics_files.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' && -#!/usr/bin/env python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import logging -import os -import re -import shlex -import subprocess as sp -import sys -import time -import zipfile -X -X -# Create zip archive and append files for retrieval -def zip_files(files): -X fList = files -X compression = zipfile.ZIP_DEFLATED -X time_str = time.strftime("%Y%m%d-%H%M%S") -X zf_name = '/root/diagnostics_files_' + time_str + '.zip' -X zf = zipfile.ZipFile(zf_name, 'w', compression) -X -X ''' -X Initialize 3 empty arrays to collect found files, non-existent files -X and last one to collect temp files to be cleaned up when script exits -X ''' -X files_found_list = [] -X files_not_found_list = [] -X files_from_shell_commands = [] -X -X try: -X for f in fList: -X f = f.strip() -X -X if f in ('iptables', 'ipaddr', 'iprule', 'iproute'): -X f = execute_shell_script(f) -X files_from_shell_commands.append(f) -X -X if len(f) > 3 and f.startswith('[') and f.endswith(']'): -X f = execute_shell_script(f[1:-1]) -X files_from_shell_commands.append(f) -X -X if os.path.isfile(f): -X try: -X zf.write(f, f[f.rfind('/') + 1:]) -X except OSError or RuntimeError as e: -X files_not_found_list.append(f) -X else: -X files_found_list.append(f) -X finally: -X cleanup(files_from_shell_commands) -X generate_retrieved_files_txt(zf, files_found_list, files_not_found_list) -X zf.close() -X print zf_name -X -X -def get_cmd(script): -X if script is None or len(script) == 0: -X return None -X -X cmd = None -X if script == 'iptables': -X cmd = 'iptables-save' -X elif script == 'ipaddr': -X cmd = 'ip address' -X elif script == 'iprule': -X cmd = 'ip rule list' -X elif script == 'iproute': -X cmd = 'ip route show table all' -X else: -X cmd = '/opt/cloud/bin/' + script -X if not os.path.isfile(cmd.split(' ')[0]): -X cmd = None -X -X return cmd -X -X -def execute_shell_script(script): -X script = script.strip() -X outputfile = script + '.log' -X -X with open(outputfile, 'wb', 0) as f: -X try: -X cmd = get_cmd(script) -X if cmd is None: -X f.write('Unable to generate command for ' + script + ', perhaps missing file') -X else: -X p = sp.Popen(cmd, shell=True, stdout=sp.PIPE, stderr=sp.PIPE) -X stdout, stderr = p.communicate() -X return_code = p.returncode -X if return_code is 0: -X f.write(stdout) -X else: -X f.write(stderr) -X except OSError as ex: -X delete_tmp_file_cmd = 'rm -f %s' % outputfile -X sp.check_call(shlex.split(delete_tmp_file_cmd)) -X finally: -X f.close() -X return outputfile -X -X -def cleanup(file_list): -X files = ' '.join(file_list) -X cmd = 'rm -f %s' % files -X try: -X p = sp.Popen(shlex.split(cmd), stderr=sp.PIPE, stdout=sp.PIPE) -X p.communicate() -X except OSError as e: -X logging.debug("Failed to execute bash command") -X -X -def generate_retrieved_files_txt(zip_file, files_found, files_not_found): -X output_file = 'fileinfo.txt' -X try: -X with open(output_file, 'wb', 0) as man: -X for i in files_found: -X man.write(i + '\n') -X for j in files_not_found: -X man.write(j + 'File Not Found!!\n') -X zip_file.write(output_file, output_file) -X finally: -X cleanup_cmd = "rm -f %s" % output_file -X sp.check_call(shlex.split(cleanup_cmd)) -X -X -if __name__ == '__main__': -X fileList = sys.argv[1:] -X zip_files(fileList) -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/get_diagnostics_files.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py': 'MD5 check failed' - ) << \SHAR_EOF -f8b91c14af848f14696aa2c1193b0907 cloud_scripts/opt/cloud/bin/get_diagnostics_files.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py'` -ne 4478 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' is not 4478" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/checkrouter.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checkrouter.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checkrouter.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/checkrouter.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checkrouter.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -STATUS=UNKNOWN -X -if [ "$(systemctl is-active keepalived)" != "active" ] -then -X echo "Status: FAULT" -X exit -fi -X -ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g') -if [ "$ROUTER_TYPE" = "router" ] -then -X ROUTER_STATE=$(ip addr show dev eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi') -X STATUS=$ROUTER_STATE -else -X ROUTER_STATE=$(ip addr show dev eth1 | grep state | awk '{print $9;}') -X if [ "$ROUTER_STATE" = "UP" ] -X then -X STATUS=MASTER -X elif [ "$ROUTER_STATE" = "DOWN" ] -X then -X STATUS=BACKUP -X fi -fi -X -echo "Status: ${STATUS}" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checkrouter.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/checkrouter.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/checkrouter.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checkrouter.sh': 'MD5 check failed' - ) << \SHAR_EOF -b107b37bc85a7036ef9f4e81cf4ae8b2 cloud_scripts/opt/cloud/bin/checkrouter.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checkrouter.sh'` -ne 1445 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checkrouter.sh' is not 1445" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/ilb.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ilb.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ilb.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/ilb.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/ilb.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s: -a -d -f -s \n" $(basename $0) >&2 -} -X -#set -x -X -fw_remove_backup() { -X logger -t cloud "$(basename $0): Entering fw_remove_backup" -X local lb_vif_list=eth0 -X for vif in $lb_vif_list; do -X sudo iptables -F back_load_balancer_$vif 2> /dev/null -X sudo iptables -D INPUT -i $vif -p tcp -j back_load_balancer_$vif 2> /dev/null -X sudo iptables -X back_load_balancer_$vif 2> /dev/null -X done -X sudo iptables -F back_lb_stats 2> /dev/null -X sudo iptables -D INPUT -p tcp -j back_lb_stats 2> /dev/null -X sudo iptables -X back_lb_stats 2> /dev/null -} -X -fw_restore() { -X logger -t cloud "$(basename $0): Entering fw_restore" -X local lb_vif_list="eth0" -X for vif in $lb_vif_list; do -X sudo iptables -F load_balancer_$vif 2> /dev/null -X sudo iptables -D INPUT -i $vif -p tcp -j load_balancer_$vif 2> /dev/null -X sudo iptables -X load_balancer_$vif 2> /dev/null -X sudo iptables -E back_load_balancer_$vif load_balancer_$vif 2> /dev/null -X done -X sudo iptables -F lb_stats 2> /dev/null -X sudo iptables -D INPUT -p tcp -j lb_stats 2> /dev/null -X sudo iptables -X lb_stats 2> /dev/null -X sudo iptables -E back_lb_stats lb_stats 2> /dev/null -} -X -# firewall entry to ensure that haproxy can receive on specified port -fw_entry() { -X logger -t cloud "$(basename $0): Entering fw_entry" -X local added=$1 -X local removed=$2 -X local stats=$3 -X -X if [ "$added" == "none" ] -X then -X added="" -X fi -X -X if [ "$removed" == "none" ] -X then -X removed="" -X fi -X -X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") -X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") -X -# back up the iptable rules by renaming before creating new. -X local lb_vif_list=eth0 -X for vif in $lb_vif_list; do -X sudo iptables -E load_balancer_$vif back_load_balancer_$vif 2> /dev/null -X sudo iptables -N load_balancer_$vif 2> /dev/null -X sudo iptables -A INPUT -i $vif -p tcp -j load_balancer_$vif -X done -X sudo iptables -E lb_stats back_lb_stats 2> /dev/null -X sudo iptables -N lb_stats 2> /dev/null -X sudo iptables -A INPUT -p tcp -j lb_stats -X -X for i in $a -X do -X local pubIp=$(echo $i | cut -d: -f1) -X local dport=$(echo $i | cut -d: -f2) -X local lb_vif_list="eth0" -X for vif in $lb_vif_list; do -X sudo iptables -A load_balancer_$vif -p tcp -d $pubIp --dport $dport -j ACCEPT -X if [ $? -gt 0 ] -X then -X return 1 -X fi -X done -X done -X local pubIp=$(echo $stats | cut -d: -f1) -X local dport=$(echo $stats | cut -d: -f2) -X local cidrs=$(echo $stats | cut -d: -f3 | sed 's/-/,/') -X sudo iptables -A lb_stats -s $cidrs -p tcp -m state --state NEW -d $pubIp --dport $dport -j ACCEPT -X -X return 0 -} -X -#Hot reconfigure HA Proxy in the routing domain -reconfig_lb() { -X logger -t cloud "Reconfiguring ilb using $1" -X /root/reconfigLB.sh $1 -X return $? -} -X -# Restore the HA Proxy to its previous state, and revert iptables rules on loadbalancer -restore_lb() { -X logger -t cloud "Restoring HA Proxy to previous state" -X # Copy the old version of haproxy.cfg into the file that reconfigLB.sh uses -X cp /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg.new -X -X if [ $? -eq 0 ] -X then -X # Run reconfigLB.sh again -X /root/reconfigLB.sh /etc/haproxy/haproxy.cfg.new -X fi -} -X -X -logger -t cloud "$(basename $0): Entering $(dirname $0)/$(basename $0)" -X -iflag= -aflag= -dflag= -fflag= -sflag= -X -while getopts 'i:a:d:f:s:' OPTION -do -X case $OPTION in -X i) iflag=1 -X domRIp="$OPTARG" #unused but passed in -X ;; -X a) aflag=1 -X addedIps="$OPTARG" -X ;; -X d) dflag=1 -X removedIps="$OPTARG" -X ;; -X f) fflag=1 -X cfgfile="$OPTARG" -X ;; -X s) sflag=1 -X statsIp="$OPTARG" -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [[ "$aflag$dflag" != "1" && "$aflag$dflag" != "11" ]] -then -X usage -X unlock_exit 2 $lock $locked -fi -X -if [ "$addedIps" == "" ] -then -X addedIps="none" -fi -X -X -if [ "$removedIps" == "" ] -then -X removedIps="none" -fi -X -X -# hot reconfigure haproxy -reconfig_lb $cfgfile -X -if [ $? -gt 0 ] -then -X logger -t cloud "Reconfiguring ilb failed" -X unlock_exit 1 $lock $locked -fi -X -logger -t cloud "HAProxy reconfigured successfully, configuring firewall" -X -# iptables entry to ensure that haproxy receives traffic -fw_entry $addedIps $removedIps $statsIp -X -if [ $? -gt 0 ] -then -X logger -t cloud "Failed to apply firewall rules for internal load balancing, reverting HA Proxy config" -X # Restore the LB -X restore_lb -X -X logger -t cloud "Reverting firewall config" -X fw_restore -X -X unlock_exit 1 $lock $locked -else -X # Remove backedup iptable rules -X logger -t cloud "Firewall configured successfully, deleting backup firewall config" -X fw_remove_backup -fi -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/ilb.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/ilb.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/ilb.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ilb.sh': 'MD5 check failed' - ) << \SHAR_EOF -8b7374975ee7d7a5d73da78b60bd508c cloud_scripts/opt/cloud/bin/ilb.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ilb.sh'` -ne 5644 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ilb.sh' is not 5644" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -for i in $* -do -X info=`/opt/cloud/bin/checks2svpn.sh $i` -X ret=$? -X batchInfo+="$i:$ret:$info&" -done -echo -n $batchInfo -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh': 'MD5 check failed' - ) << \SHAR_EOF -36a25911b669737ea678011f72a6f3f9 cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh'` -ne 924 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' is not 924" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/savepassword.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/savepassword.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/savepassword.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/savepassword.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/savepassword.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# Usage -# save_password -v -p -X -while getopts 'v:p:' OPTION -do -X case $OPTION in -X v) VM_IP="$OPTARG" -X ;; -X p) PASSWORD="$OPTARG" -X ;; -X ?) echo "Incorrect usage" -X ;; -X esac -done -TOKEN_FILE="/tmp/passwdsrvrtoken" -TOKEN="" -if [ -f $TOKEN_FILE ]; then -X TOKEN=$(cat $TOKEN_FILE) -fi -ps aux | grep passwd_server_ip.py |grep -v grep 2>&1 > /dev/null -if [ $? -eq 0 ] -then -X ips=$(ip addr show | grep inet | awk '{print $2}') -X for ip in $ips; do -X server_ip=$(echo $ip | awk -F'/' '{print $1}') -X curl --header "DomU_Request: save_password" "http://$server_ip:8080/" -F "ip=$VM_IP" -F "password=$PASSWORD" -F "token=$TOKEN" >/dev/null 2>/dev/null & -X done -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/savepassword.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/savepassword.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/savepassword.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/savepassword.sh': 'MD5 check failed' - ) << \SHAR_EOF -edebd2c25984e1ed00b36e4f8d360a63 cloud_scripts/opt/cloud/bin/savepassword.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/savepassword.sh'` -ne 1525 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/savepassword.sh' is not 1525" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cloud-nic.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cloud-nic.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cloud-nic.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -plug_nic() { -X sudo echo "$tableNo $tableName" >> /etc/iproute2/rt_tables 2>/dev/null -X sudo ip rule add fwmark $tableNo table $tableName 2>/dev/null -X sudo ip route flush table $tableName -X sudo ip route flush cache -} -X -X -unplug_nic() { -X sudo iptables -t mangle -D PREROUTING -i $dev -m state --state NEW -j CONNMARK --set-mark $tableNo 2>/dev/null -X -X sudo ip rule del fwmark $tableNo 2>/dev/null -X sudo ip route flush table $tableName -X sudo sed -i /"$tableNo $tableName"/d /etc/iproute2/rt_tables 2>/dev/null -X sudo ip route flush cache -X # remove network usage rules -X sudo iptables -F NETWORK_STATS_$dev 2>/dev/null -X iptables-save | grep NETWORK_STATS_$dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables $rule -X done -X sudo iptables -X NETWORK_STATS_$dev 2>/dev/null -X # remove vpn network usage rules -X sudo iptables -t mangle -F VPN_STATS_$dev 2>/dev/null -X iptables-save -t mangle | grep VPN_STATS_$dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t mangle $rule -X done -X sudo iptables -t mangle -X VPN_STATS_$dev 2>/dev/null -X # remove rules on this dev -X iptables-save -t mangle | grep $dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t mangle $rule -X done -X iptables-save -t nat | grep $dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t nat $rule -X done -X iptables-save | grep $dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables $rule -X done -X # remove apache config for this eth -X rm -f /etc/apache2/conf.d/vhost$dev.conf -} -X -action=$1 -dev=$2 -tableNo=$((100+${dev:3})) -tableName="Table_$dev" -X -if [ $action == 'add' ] -then -X plug_nic -else -X unplug_nic -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cloud-nic.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cloud-nic.sh': 'MD5 check failed' - ) << \SHAR_EOF -6afed00cefb1dc06b8b4969c2c26933e cloud_scripts/opt/cloud/bin/cloud-nic.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cloud-nic.sh'` -ne 2632 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' is not 2632" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/ipsectunnel.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ipsectunnel.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/ipsectunnel.sh (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/ipsectunnel.sh -M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N#4R-2(*=G!N:6YM87)K/2(P>#4R-"(*"G5S86=E*"D@ -M>PH@("`@<')I;G1F(")5PH@('-U9&\@:7!T86)L -M97,MPH@(&1I2!<"B`@("!P -M:&%S93(@<&]L:6-Y/21ER1R:6=H=&YE='-] -M(B`^/B`D=G!N8V]N9F9I;&4@)B8*("!S=61O(&5C:&\@(B`@='EP93UT=6YN -M96PB(#X^("1V<&YC;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!A=71H8GD] -MVEK96QI9F5T:6UE?7,B(#X^("1V<&YC -M;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!E2(@/CX@ -M)'9P;F-O;F9F:6QE("8F"B`@2!F -M;W(@'1H;W`](B1/4%1!4D&ET("1R970* -` -end -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/ipsectunnel.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh': 'MD5 check failed' - ) << \SHAR_EOF -097a970ec94a68d965ffd7f446e3862d cloud_scripts/opt/cloud/bin/ipsectunnel.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh'` -ne 8769 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' is not 8769" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/ipassoc.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ipassoc.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ipassoc.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/ipassoc.sh (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/ipassoc.sh -M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N"`D("1(96%D55),.B!S=FXZ+R]S=FXN;&%B+G9M;W!S+F-O;2]R97!O2!E>&ES=',B"GT* -M"F1E;%]F=U]C:&%I;E]F;W)?:7`@*"D@>PH@(&QO8V%L('!U8DEP/20H96-H -M;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?2W!R:6YT("0R?2W!R:6YT("0R?2W!R:6YT("0Q?2PH@(&QO -M8V%L(&1E=CTB)#$B"B`@;&]C86P@:7`](B0R(@H@('-U9&\@:7`@861DW!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP/20Q -M"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0Q?22!F;W(@:7`@)'!U8DEP(&]N(&EN=&5R9F%C92`D971H1&5V(@H@("`@ -M(')E='5R;B`Q"B`@9FD*"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0R?2<@('P@9W)E<"`M=R`D -M:7!.;TUAW!R -M:6YT("0R?2#TD*'!R:6YT9B`B)7A<;B(@)&YU;2D*("`@("`@("`@ -M(&5C:&\@)&AE>#L*("`@("`@("`@("-E;F%B;&4@`IS -M9FQA9STP"FQF;&%G/0IF9FQA9ST*8V9L86<]"FYF;&%G/0IO<#TB(@H*:7-? -M;6%S=&5R/3`*:7-?&ET(#(@)&QO8VL@)&QO8VME9`H)"3L["B`@ -M97-A8PID;VYE"@H*:68@6R`B)$%F;&%G)$1F;&%G(B`A/2`B,2(@70IT:&5N -M"B`@("!U&ET("0_("1L;V-K -M("1L;V-K960*9FD*"FEF(%L@(B1F9FQA9R(@/3T@(C$B(%T@)B8@6R`B)$1F -M;&%G(B`]/2`B,2(@70IT:&5N"B`@&ET("0_ -M("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1$9FQA9R(@/3T@(C$B(%T*=&AE -M;@H@(')E;6]V95]A;E]I<"`@)'!U8FQI8TEP("8F"B`@9&5L7V9W7V-H86EN -M7V9O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ipassoc.sh': 'MD5 check failed' - ) << \SHAR_EOF -ad068a0cc84ded8f79c63ce3aced4586 cloud_scripts/opt/cloud/bin/ipassoc.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ipassoc.sh'` -ne 13401 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ipassoc.sh' is not 13401" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/line_edit.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/line_edit.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/line_edit.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/line_edit.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/line_edit.py' && -#!/usr/bin/python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import logging -import re -import shutil -import os -X -X -class LineEdit(object): -X """Helper for LineEditingFile that keeps track of one edit.""" -X def __init__(self, search, sub, *sub_args, **kwargs): -X if len(sub_args) > 0: -X sub = sub % sub_args -X flags = kwargs.get('flags', 0) -X self.pattern = re.compile(search, flags=flags) -X self.sub = sub -X self.count = kwargs.get('count', 0) # max subs to make -X self.subs = 0 # subs made so far -X -X -class LineEditingFile(object): -X """ -X Atomic, conservative, by-line editing of configuration files. -X -X Will not touch the file if there are no changes to do. -X Reasonably efficient for large files, though files with a long time -X before their first match will use memory. -X -X -X Given a vhosts file such as: -X >>> with open('doctest-vhosts.conf', 'w') as f: -X ... f.write(''' -X ... Listen foo:80 -X ... -X ... DocRoot /var/www -X ... -X ... -X ... Listen other:80 -X ... -X ... DocRoot /var/www -X ... -X ... ''') -X ... -X -X To replace the hostname for the first virtualhost entry: -X >>> new_hostname = 'fooooo' -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... f.replace(r'', '', new_hostname, count=1, flags=re.I) -X ... f.replace(r'Listen .*?:80', 'Listen %s:80', new_hostname, count=1, flags=re.I) -X ... -X -X Be careful with the matches! -X A second invocation of the same rule will edit the second vhost: -X >>> new_hostname = 'fooooo' -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... f.replace(r'', '', new_hostname, count=1, flags=re.I) -X ... -X -X To move all hosts from port 80 to port 8080: -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... f.replace(r'', '', flags=re.I) -X ... f.replace(r'Listen (.*?):80', 'Listen \\\\1:80', flags=re.I) -X ... -X -X (please note in this example there's a double escape of the backreference -X \\\\1, to make the example work with doctest) -X -X Since this example already matched all files, a second invocation does nothing: -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... f.replace(r'', '', flags=re.I) -X ... -X -X It's also acceptable to not make any edits at all: -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... pass -X ... -X -X You don't _have_ to use a with statement: -X >>> f = LineEditingFile('doctest-vhosts.conf') -X >>> f.replace(r'DocRoot /var/www', 'DocRoot /var/www/html', flags=re.I) -X >>> changes = f.commit() -X >>> print changes -X 2 -X >>> -X -X Cleanup of the example vhosts.conf: -X >>> # noinspection PyBroadException -X >>> try: -X ... os.unlink('doctest-vhosts.conf') -X ... os.unlink('doctest-vhosts.conf.bak') -X ... os.unlink('doctest-vhosts.conf.new') -X ... except: -X ... pass -X ... -X """ -X -X def __init__(self, filename): -X self.filename = filename -X self.changed = False -X self.edits = [] -X -X def __enter__(self): -X return self -X -X def replace(self, search, sub, *sub_args, **kwargs): -X edit = LineEdit(search, sub, *sub_args, **kwargs) -X self.edits.append(edit) -X -X # noinspection PyUnusedLocal -X def __exit__(self, exc, value, traceback): -X if exc is not None: -X return False # return false results in re-raise -X -X self.commit() -X -X def commit(self): -X changes = 0 -X changed_file = None -X changed_filename = self.filename + '.new' -X try: -X lines = [] -X backup_filename = self.filename + '.bak' -X # noinspection PyUnusedLocal -X stat = None -X with open(self.filename, 'r') as orig: -X stat = os.fstat(orig.fileno()) -X for line in orig: -X changed_line = line -X for edit in self.edits: -X remaining_count = 0 -X if edit.count != 0: -X remaining_count = edit.count - edit.subs -X if remaining_count < 0: -X raise Exception("Made too many edits") -X elif remaining_count == 0: -X continue -X changed_line, subs = edit.pattern.subn( -X edit.sub, line, remaining_count) -X if changed_line != line: -X if changed_file is None: -X logging.debug("Editing file %s" % self.filename) -X logging.debug(" - %s" % line[:-1]) -X logging.debug(" + %s" % changed_line[:-1]) -X changes += subs -X edit.subs += subs -X if changes == 0: # buffer until we find a change -X lines.append(changed_line) -X elif changed_file is None: # found first change, flush buffer -X changed_file = open(changed_filename, 'w') -X if hasattr(os, 'fchmod'): -X os.fchmod(changed_file.fileno(), # can cause OSError which aborts -X stat.st_mode) -X if hasattr(os, 'fchown'): -X os.fchown(changed_file.fileno(), # can cause OSError which aborts -X stat.st_uid, stat.st_gid) -X changed_file.writelines(lines) -X changed_file.write(changed_line) -X del lines # reclaim buffer memory -X else: # already flushed, just write -X changed_file.write(changed_line) -X -X if changes == 0: -X logging.info("No edits need for file %s" % -X self.filename) -X else: -X changed_file.close() -X changed_file = None -X if os.path.exists(backup_filename): # back up the original -X os.unlink(backup_filename) -X shutil.copy(self.filename, backup_filename) -X os.rename(changed_filename, self.filename) # the swap -X logging.info("Edited file %s (%d changes)" % -X (self.filename, changes)) -X finally: -X if changed_file is not None: # failed, clean up -X changed_file.close() -X os.unlink(changed_filename) -X return changes -X -X -if __name__ == "__main__": -X logging.basicConfig(level=logging.DEBUG) -X import doctest -X doctest.testmod() -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/line_edit.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/line_edit.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/line_edit.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/line_edit.py': 'MD5 check failed' - ) << \SHAR_EOF -4d05b8a011ff9c6132a3ca4ff477a161 cloud_scripts/opt/cloud/bin/line_edit.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/line_edit.py'` -ne 7961 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/line_edit.py' is not 7961" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/get_template_version.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/get_template_version.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/get_template_version.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/get_template_version.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/get_template_version.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# As the last command send to router before any rules operation, wait until boot up done -X -__TIMEOUT=240 -__FLAGFILE=/var/cache/cloud/boot_up_done -done=0 -for i in `seq 1 $(($__TIMEOUT * 10))` -do -X if [ -e $__FLAGFILE ] -X then -X done=1 -X break -X fi -X sleep 0.1 -X if [ $((i % 10)) -eq 0 ] -X then -X logger -t cloud "Waiting for VM boot up done for one second" -X fi -done -X -if [ -z $done ] -then -X # declare we failed booting process -X echo "Waited 60 seconds but boot up haven't been completed" -X exit -fi -X -release=`cat /etc/cloudstack-release` -sig=`cat /var/cache/cloud/cloud-scripts-signature` -echo "${release}&${sig}" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/get_template_version.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/get_template_version.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/get_template_version.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/get_template_version.sh': 'MD5 check failed' - ) << \SHAR_EOF -2234ad00c02a6be63cb0f4f876b8960b cloud_scripts/opt/cloud/bin/get_template_version.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/get_template_version.sh'` -ne 1449 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/get_template_version.sh' is not 1449" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/update_config.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/update_config.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/update_config.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/update_config.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/update_config.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,N87)G=BD*:68@87)G8R`A/2`R(&%N9"!A7,N97AI="@Q*0H*(R!&25A- -M12!W92!S:&]U;&0@9V5T('1H:7,@;&]C871I;VX@9G)O;2!A(&-O;F9I9W5R -M871I;VX@8VQA7,N97AI="AR971U -M2!S<&5E9&EN9R!U<"!L;V%D:6YG('1I;65S -M"B`@("!I9B!N;W0@*&]S+F5N=FER;VXN9V5T*"=$149%4E]#3TY&242YJ7,N87)G=ELQ -M72!O2`]($YO -M;F4*"B`@("!F;W(@:S$L('8Q(&EN(&=U97-T;F5T7V1I8W0N:71E7,N87!P96YD*&LQ*0H*("`@(&EF(&YO -M="!E>&ES=&EN9U]K97ES.@H@("`@("`@("2`Z -M.B!296-O;F9I9W5R:6YG(&=U97-T(&YE='=O&ES=&EN9U]K97ES.@H@("`@("`@("2!I;B!E>&ES=&EN9U]K97ES.@H@("`@("`@(&9O&ES=',@/2!4&ES=',Z"B`@("`@("`@("`@(&)R96%K -M"@H@("`@B(I*3H* -M("`@("`@("!S>7,N97AI="@P*0H@("`@;&]G9VEN9RYE2`Z.B!5;F%B;&4@=&\@7,N97AI="@Q -M*0H*(R!)9B!T:&4@9W5E2`Z.B!.;R!N965D('1O('!R;V-E/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/update_config.py': 'MD5 check failed' - ) << \SHAR_EOF -a2062b2b010940ea783d8256b807c488 cloud_scripts/opt/cloud/bin/update_config.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/update_config.py'` -ne 5136 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/update_config.py' is not 5136" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/edithosts.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/edithosts.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/edithosts.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/edithosts.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/edithosts.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -X -# edithosts.sh -- edit the dhcphosts file on the routing domain -X -usage() { -X printf "Usage: %s: -m -4 -6 -h -d -n -s -u [-N]\n" $(basename $0) >&2 -} -X -mac= -ipv4= -ipv6= -host= -dflt= -dns= -routes= -duid= -nondefault= -X -while getopts 'm:4:h:d:n:s:6:u:N' OPTION -do -X case $OPTION in -X m) mac="$OPTARG" -X ;; -X 4) ipv4="$OPTARG" -X ;; -X 6) ipv6="$OPTARG" -X ;; -X u) duid="$OPTARG" -X ;; -X h) host="$OPTARG" -X ;; -X d) dflt="$OPTARG" -X ;; -X n) dns="$OPTARG" -X ;; -X s) routes="$OPTARG" -X ;; -X N) nondefault=1 -X ;; -X ?) usage -X exit 2 -X ;; -X esac -done -X -DHCP_HOSTS=/etc/dhcphosts.txt -DHCP_OPTS=/etc/dhcpopts.txt -DHCP_LEASES=/var/lib/misc/dnsmasq.leases -HOSTS=/etc/hosts -X -source /root/func.sh -X -lock="biglock" -#default timeout value is 30 mins as DhcpEntryCommand is not synchronized on agent side any more, -#and multiple commands can be sent to the same VR at a time -locked=$(getLockFile $lock 1800) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -grep "redundant_router=1" /var/cache/cloud/cmdline > /dev/null -no_redundant=$? -X -dnsmasq_managed_lease=`cat /var/cache/cloud/dnsmasq_managed_lease` -X -wait_for_dnsmasq () { -X local _pid=$(pidof dnsmasq) -X for i in 0 1 2 3 4 5 6 7 8 9 10 -X do -X sleep 1 -X _pid=$(pidof dnsmasq) -X [ "$_pid" != "" ] && break; -X done -X [ "$_pid" != "" ] && return 0; -X logger -t cloud "edithosts: timed out waiting for dnsmasq to start" -X return 1 -} -X -if [ $dnsmasq_managed_lease ] -then -X #release previous dhcp lease if present -X logger -t cloud "edithosts: releasing $ipv4" -X dhcp_release $(ip route get "$ipv4/32" | grep " dev " | sed -e "s/^.* dev \([^ ]*\) .*$/\1/g") $ipv4 $(grep "$ipv4 " $DHCP_LEASES | awk '{print $2}') > /dev/null 2>&1 -X logger -t cloud "edithosts: released $ipv4" -fi -X -logger -t cloud "edithosts: update $mac $ipv4 $ipv6 $host to hosts" -X -[ ! -f $DHCP_HOSTS ] && touch $DHCP_HOSTS -[ ! -f $DHCP_OPTS ] && touch $DHCP_OPTS -[ ! -f $DHCP_LEASES ] && touch $DHCP_LEASES -X -#delete any previous entries from the dhcp hosts file -sed -i /$mac/d $DHCP_HOSTS -if [ $ipv4 ] -then -X sed -i /$ipv4,/d $DHCP_HOSTS -fi -if [ $ipv6 ] -then -X #searching with [$ipv6], matching other ip so using $ipv6], -X sed -i /$ipv6],/d $DHCP_HOSTS -fi -# don't want to do this in the future, we can have same VM with multiple nics/entries -sed -i /$host,/d $DHCP_HOSTS -X -#put in the new entry -if [ $ipv4 ] -then -X echo "$mac,$ipv4,$host,infinite" >>$DHCP_HOSTS -fi -if [ $ipv6 ] -then -X if [ $nondefault ] -X then -X echo "id:$duid,set:nondefault6,[$ipv6],$host,infinite" >>$DHCP_HOSTS -X else -X echo "id:$duid,[$ipv6],$host,infinite" >>$DHCP_HOSTS -X fi -fi -X -if [ $dnsmasq_managed_lease -eq 0 ] -then -X #delete leases to supplied mac and ip addresses -X if [ $ipv4 ] -X then -X sed -i /$mac/d $DHCP_LEASES -X sed -i /"$ipv4 "/d $DHCP_LEASES -X fi -X if [ $ipv6 ] -X then -X sed -i /$duid/d $DHCP_LEASES -X sed -i /"$ipv6 "/d $DHCP_LEASES -X fi -X sed -i /"$host "/d $DHCP_LEASES -X -X #put in the new entry -X if [ $ipv4 ] -X then -X echo "0 $mac $ipv4 $host *" >> $DHCP_LEASES -X fi -X if [ $ipv6 ] -X then -X echo "0 $duid $ipv6 $host *" >> $DHCP_LEASES -X fi -fi -X -#edit hosts file as well -if [ $ipv4 ] -then -X sed -i /"$ipv4 "/d $HOSTS -fi -if [ $ipv6 ] -then -X sed -i /"$ipv6 "/d $HOSTS -fi -sed -i /" $host$"/d $HOSTS -if [ $ipv4 ] -then -X echo "$ipv4 $host" >> $HOSTS -fi -if [ $ipv6 ] -then -X echo "$ipv6 $host" >> $HOSTS -fi -X -if [ "$dflt" != "" -a "$ipv4" != "" ] -then -X #make sure dnsmasq looks into options file -X sed -i /dhcp-optsfile/d /etc/dnsmasq.conf -X echo "dhcp-optsfile=$DHCP_OPTS" >> /etc/dnsmasq.conf -X -X tag=$(echo $ipv4 | tr '.' '_') -X sed -i /$tag,/d $DHCP_OPTS -X if [ "$dflt" == "0.0.0.0" ] -X then -X logger -t cloud "$0: unset default router for $ipv4" -X logger -t cloud "$0: unset dns server for $ipv4" -X echo "$tag,3" >> $DHCP_OPTS -X echo "$tag,6" >> $DHCP_OPTS -X echo "$tag,15" >> $DHCP_OPTS -X fi -X [ "$routes" != "" ] && echo "$tag,121,$routes" >> $DHCP_OPTS -X #delete entry we just put in because we need a tag -X sed -i /$ipv4,/d $DHCP_HOSTS -X #put it back with a tag -X echo "$mac,set:$tag,$ipv4,$host,infinite" >>$DHCP_HOSTS -fi -X -# make dnsmasq re-read files -pid=$(pidof dnsmasq) -if [ "$pid" != "" ] -then -X # use SIGHUP to avoid service outage if dhcp_release is available. -X if [ $dnsmasq_managed_lease ] -X then -X kill -HUP $pid -X else -X systemctl restart dnsmasq -X fi -else -X if [ $no_redundant -eq 1 ] -X then -X wait_for_dnsmasq -X else -X logger -t cloud "edithosts: skip wait dnsmasq due to redundant virtual router" -X fi -fi -X -ret=$? -unlock_exit $ret $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/edithosts.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/edithosts.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/edithosts.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/edithosts.sh': 'MD5 check failed' - ) << \SHAR_EOF -68e47d6a7efaacefbbaebf8b4e7408c3 cloud_scripts/opt/cloud/bin/edithosts.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/edithosts.sh'` -ne 5502 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/edithosts.sh' is not 5502" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/diagnostics.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/diagnostics.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/diagnostics.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/diagnostics.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/diagnostics.py' && -#!/usr/bin/env python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import shlex -import subprocess -import sys -X -X -def run_cmd(command): -X if command is not None: -X try: -X p = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE) -X stdout, stderr = p.communicate() -X return_code = p.returncode -X -X except OSError as e: -X stdout = "Check your command type" -X stderr = "Exception occurred: %s" % e -X return_code = 1 -X -X finally: -X print('%s&&' % stdout.strip()) -X print('%s&&' % stderr.strip()) -X print('%s' % return_code) -X -X -def get_command(): -X arguments = sys.argv -X cmd = " ".join(arguments[1:]) -X cmd_type = sys.argv[1] -X -X if cmd_type == 'ping': -X if '-c' in arguments: -X return cmd -X else: -X return cmd + " -c 4" -X -X elif cmd_type == 'traceroute': -X if '-m' in arguments: -X return cmd -X else: -X return cmd + " -m 20" -X -X elif cmd_type == 'arping': -X if '-c' in arguments: -X return cmd -X else: -X return cmd + " -c 4" -X -X else: -X return None -X -X -if __name__ == "__main__": -X command = get_command() -X run_cmd(command) -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/diagnostics.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/diagnostics.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/diagnostics.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/diagnostics.py': 'MD5 check failed' - ) << \SHAR_EOF -91a837e5bcafee663cbfb8532574405a cloud_scripts/opt/cloud/bin/diagnostics.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/diagnostics.py'` -ne 2012 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/diagnostics.py' is not 2012" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_monitorservice.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_monitorservice.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_monitorservice.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_monitorservice.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py': 'MD5 check failed' - ) << \SHAR_EOF -1121a063f2dbcfc1bdc426ceba249184 cloud_scripts/opt/cloud/bin/cs_monitorservice.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py'` -ne 1541 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py' is not 1541" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpn_l2tp.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpn_l2tp.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpn_l2tp.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -X -X -#set -x -usage() { -X printf "Usage:\n" -X printf "Create VPN : %s -c -r -l -p -s -i \n" $(basename $0) -X printf "Delete VPN : %s -d -l -s -D -C < local cidr> \n" $(basename $0) -X printf "Add VPN User : %s -u \n" $(basename $0) -X printf "Remote VPN User: %s -U /dev/null -X then -X is_vpc=true -X fi -X -X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 500 -j ACCEPT -X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 4500 -j ACCEPT -X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 1701 -j ACCEPT -X sudo iptables $op INPUT -i $dev -p ah -j ACCEPT -X sudo iptables $op INPUT -i $dev -p esp -j ACCEPT -X if $is_vpc -X then -X # Need to apply the following ACL rules as well. -X if sudo iptables -N VPN_FORWARD &> /dev/null -X then -X sudo iptables -I FORWARD -i ppp+ -j VPN_FORWARD -X sudo iptables -I FORWARD -o ppp+ -j VPN_FORWARD -X sudo iptables -A VPN_FORWARD -j DROP -X fi -X sudo iptables $op VPN_FORWARD -i ppp+ -o ppp+ -j RETURN -X sudo iptables $op VPN_FORWARD -i ppp+ -d $cidr -j RETURN -X sudo iptables $op VPN_FORWARD -s $cidr -o ppp+ -j RETURN -X else -X sudo iptables $op FORWARD -i ppp+ -d $cidr -j ACCEPT -X sudo iptables $op FORWARD -s $cidr -o ppp+ -j ACCEPT -X sudo iptables $op FORWARD -i ppp+ -o ppp+ -j ACCEPT -X fi -X sudo iptables $op INPUT -i ppp+ -m udp -p udp --dport 53 -j ACCEPT -X sudo iptables $op INPUT -i ppp+ -m tcp -p tcp --dport 53 -j ACCEPT -X sudo iptables -t nat $op PREROUTING -i ppp+ -p tcp -m tcp --dport 53 -j DNAT --to-destination $local_ip -X sudo iptables -t nat $op PREROUTING -i ppp+ -p udp -m udp --dport 53 -j DNAT --to-destination $local_ip -X -X if $is_vpc -X then -X return -X fi -X -X if sudo iptables -t mangle -N VPN_$public_ip &> /dev/null -X then -X logger -t cloud "$(basename $0): created VPN chain in PREROUTING mangle" -X sudo iptables -t mangle -I PREROUTING -d $public_ip -j VPN_$public_ip -X sudo iptables -t mangle -A VPN_$public_ip -j RETURN -X fi -X op2="-D" -X [ "$op" == "-A" ] && op2="-I" -X sudo iptables -t mangle $op VPN_$public_ip -p ah -j ACCEPT -X sudo iptables -t mangle $op VPN_$public_ip -p esp -j ACCEPT -} -X -start_ipsec() { -X systemctl is-active ipsec > /dev/null -X if [ $? -ne 0 ] -X then -X systemctl start ipsec > /dev/null -X #Wait until ipsec started, 5 seconds at most -X for i in {1..5} -X do -X logger -t cloud "$(basename $0): waiting ipsec start..." -X systemctl is-active ipsec > /dev/null -X result=$? -X if [ $result -eq 0 ] -X then -X break -X fi -X sleep 1 -X done -X fi -X systemctl is-active ipsec > /dev/null -X return $? -} -X -ipsec_server() { -X local op=$1 -X case $op in -X "start") start_ipsec -X sudo systemctl start xl2tpd -X ;; -X "stop") sudo systemctl stop xl2tpd -X ;; -X "restart") start_ipsec -X sudo ipsec auto --rereadall -X systemctl stop xl2tpd -X systemctl start xl2tpd -X ;; -X esac -} -X -create_l2tp_ipsec_vpn_server() { -X local ipsec_psk=$1 -X local public_ip=$2 -X local client_range=$3 -X local local_ip=$4 -X -X sed -i -e "s/left=.*$/left=$public_ip/" /etc/ipsec.d/l2tp.conf -X echo "$public_ip %any : PSK \"$ipsec_psk\"" > /etc/ipsec.d/ipsec.any.secrets -X sed -i -e "s/^ip range = .*$/ip range = $client_range/" /etc/xl2tpd/xl2tpd.conf -X sed -i -e "s/^local ip = .*$/local ip = $local_ip/" /etc/xl2tpd/xl2tpd.conf -X -X sed -i -e "s/^ms-dns.*$/ms-dns $local_ip/" /etc/ppp/options.xl2tpd -X -X iptables_ "-D" $public_ip -X iptables_ "-I" $public_ip -X -X ipsec_server "restart" -X -X ipsec auto --rereadsecrets -X ipsec auto --replace L2TP-PSK -} -X -destroy_l2tp_ipsec_vpn_server() { -X local public_ip=$1 -X -X ipsec auto --down L2TP-PSK -X -X iptables_ "-D" $public_ip -X -X ipsec_server "stop" -} -X -remove_l2tp_ipsec_user() { -X local u=$1 -X sed -i -e "/^$u .*$/d" /etc/ppp/chap-secrets -X if [ -x /usr/bin/tdbdump ]; then -X pid=$(tdbdump /var/run/pppd2.tdb | grep -w $u | awk -F';' '{print $4}' | awk -F= '{print $2}') -X [ "$pid" != "" ] && kill -9 $pid -X fi -X return 0 -} -X -add_l2tp_ipsec_user() { -X local u=$1 -X local passwd=$2 -X -X uptodate=$(grep "^$u \* \"$passwd\" \*$" /etc/ppp/chap-secrets) -X if [ "$uptodate" == "" ] -X then -X remove_l2tp_ipsec_user $u -X echo "$u * \"$passwd\" *" >> /etc/ppp/chap-secrets -X fi -} -X -rflag= -pflag= -lflag= -sflag= -create= -destroy= -useradd= -userdel= -dev= -cidr= -X -while getopts 'cdl:p:r:s:u:U:i:C:' OPTION -do -X case $OPTION in -X c) create=1 -X ;; -X d) destroy=1 -X ;; -X u) useradd=1 -X user_pwd="$OPTARG" -X ;; -X U) userdel=1 -X user="$OPTARG" -X ;; -X r) rflag=1 -X client_range="$OPTARG" -X ;; -X p) pflag=1 -X ipsec_psk="$OPTARG" -X ;; -X l) lflag=1 -X local_ip="$OPTARG" -X ;; -X s) sflag=1 -X server_ip="$OPTARG" -X ;; -X i) dev="$OPTARG" -X ;; -X C) cidr="$OPTARG" -X ;; -X ?) usage -X exit 2 -X ;; -X esac -done -X -if [ "$dev" == "" ] -then -X dev="eth2" -fi -X -if [ "$cidr" == "" ] -then -X cidr=$(get_intf_ip "eth0") -fi -X -[ "$create$destroy" == "11" ] || [ "$create$destroy$useradd$userdel" == "" ] && usage && exit 2 -[ "$create" == "1" ] && [ "$lflag$pflag$rflag$sflag" != "1111" ] && usage && exit 2 -X -if [ "$create" == "1" ]; then -X create_l2tp_ipsec_vpn_server $ipsec_psk $server_ip $client_range $local_ip -X exit $? -fi -X -if [ "$destroy" == "1" ]; then -X destroy_l2tp_ipsec_vpn_server $server_ip -X exit $? -fi -X -if [ "$useradd" == "1" ]; then -X u=$(echo $user_pwd | awk -F',' '{print $1}') -X pwd=$(echo $user_pwd | awk -F',' '{print $2}') -X add_l2tp_ipsec_user $u $pwd -X exit $? -fi -if [ "$userdel" == "1" ]; then -X remove_l2tp_ipsec_user $user -X exit $? -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpn_l2tp.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh': 'MD5 check failed' - ) << \SHAR_EOF -79e41044b43cc49c6b11859534bc454d cloud_scripts/opt/cloud/bin/vpn_l2tp.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh'` -ne 6986 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' is not 6986" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_guestnetwork.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_guestnetwork.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_guestnetwork.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -keys = ['eth1', 'eth2', 'eth3', 'eth4', 'eth5', 'eth6', 'eth7', 'eth8', 'eth9'] -X -X -def merge(dbag, gn): -X device = gn['device'] -X -X if not gn['add'] and device in dbag: -X -X if dbag[device]: -X device_to_die = dbag[device][0] -X try: -X dbag[device].remove(device_to_die) -X except ValueError, e: -X print "[WARN] cs_guestnetwork.py :: Error occurred removing item from databag. => %s" % device_to_die -X del(dbag[device]) -X else: -X del(dbag[device]) -X -X else: -X dbag.setdefault(device, []).append(gn) -X -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_guestnetwork.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py': 'MD5 check failed' - ) << \SHAR_EOF -599105da1bdfaced1f2c8078d3fbed19 cloud_scripts/opt/cloud/bin/cs_guestnetwork.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py'` -ne 1401 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' is not 1401" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_vmdata.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vmdata.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vmdata.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, metadata): -X dbag[metadata["vm_ip_address"]] = metadata["vm_metadata"] -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_vmdata.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vmdata.py': 'MD5 check failed' - ) << \SHAR_EOF -3ee2451cb48927d361f05bb5fe3df4ce cloud_scripts/opt/cloud/bin/cs_vmdata.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vmdata.py'` -ne 892 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' is not 892" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/dnsmasq.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/dnsmasq.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/dnsmasq.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -usage() { -X printf "Usage: %s: \n" $(basename $0) >&2 -} -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -#set -x -#backup the old config file -DHCP_CONFIG=/etc/dnsmasq.d/multiple_ranges.conf -DHCP_CONFIG_BAK=/etc/dnsmasq.d/multiple_ranges.conf.bak -DHCP_CONFIG_MAIN=/etc/dnsmasq.conf -DHCP_CONFIG_MAIN_BAK=/etc/dnsmasq.conf.bak -DHCP_FAILURE_CONFIG=/etc/multiple_ranges.conf.failure -DHCP_FAILURE_CONFIG_MAIN=/etc/dnsmasq.conf.failure -CMDLINE=$(cat /var/cache/cloud/cmdline | tr '\n' ' ') -X -#take a backup copy of the dnsmasq file. -cp "$DHCP_CONFIG_MAIN" "$DHCP_CONFIG_MAIN_BAK" -cp "$DHCP_CONFIG" "$DHCP_CONFIG_BAK" -X -#empty the config file -echo > $DHCP_CONFIG -X -var="$1" -dhcp_range="" -dhcp_gateway="" -dhcp_netmask="" -dns_option="" -dns_servers="" -count=0 -X -X -# fetching the dns Ips from the command line. -dns1=$(echo "$CMDLINE" | grep -o " dns1=[[:digit:]].* " | sed -e 's/dns1=//' | awk '{print $1}') -dns2=$(echo "$CMDLINE" | grep -o " dns2=[[:digit:]].* " | sed -e 's/dns2=//' | awk '{print $1}') -X -dns_servers="${dns1}" -if [ -n "$dns2" ] -then -dns_servers="${dns1},${dns2}" -fi -X -X -# check if useextdns is true -use_ext_dns=$(echo "$CMDLINE" | grep -o "useextdns=true") -while [ -n "$var" ] -do -X var1=$(echo $var | cut -f1 -d "-") -X routerip=$( echo $var1 | cut -f1 -d ":" ) -X gateway=$(echo $var1 | cut -f2 -d ":") -X netmask=$(echo $var1 | cut -f3 -d ":") -X start_ip_of_subnet=$(echo $var1 | cut -f4 -d ":") -X dhcp_range="${dhcp_range}"'dhcp-range=set:range'$count","$start_ip_of_subnet",static \n" -X dhcp_gateway="${dhcp_gateway}"'dhcp-option=tag:range'$count",3,"$gateway" \n" -X dhcp_netmask="${dhcp_netmask}"'dhcp-option=tag:range'$count",1,"$netmask" \n" -X if [ -n "$use_ext_dns" ] -X then -X dns_option="${dns_option}"'dhcp-option=tag:range'$count",6,"$dns_servers" \n" -X else -X dns_option="${dns_option}"'dhcp-option=tag:range'$count",6,$routerip"","$dns_servers" \n" -X fi -X var=$( echo $var | sed "s/${var1}-//" ) -X count=$[$count+1] -done -X -#logging the configuration being removed. -log="" -log="${log}"`grep "^dhcp-option=6" "$DHCP_CONFIG_MAIN"`"\n" -log="${log}"`grep "^dhcp-option=option:router" "$DHCP_CONFIG_MAIN"`"\n" -log="${log}"`grep "^dhcp-range=" "$DHCP_CONFIG_MAIN"`"\n" -X -if [ "$log" != '\n\n\n' ] -then -X #Cleaning the existing dhcp confgiuration -X logger -t cloud "dnsmasq.sh: remvoing the primaryip confg from dnsmasq.conf and adding it to /etc/dnsmaq.d/multiple_ranges.conf" -X logger -t cloud "dnsmasq.sh: config removed from dnsmasq.conf is $log" -X sed -i -e '/dhcp-option=6/d' "$DHCP_CONFIG_MAIN" -X sed -i -e '/dhcp-option=option:router/d' "$DHCP_CONFIG_MAIN" -X sed -i -e '/^dhcp-range=/d' "$DHCP_CONFIG_MAIN" -fi -X -#wrting the new config into the config file. -echo -e "$dhcp_range" >> "$DHCP_CONFIG" -echo -e "$dhcp_gateway" >> "$DHCP_CONFIG" -echo -e "$dhcp_netmask" >> "$DHCP_CONFIG" -echo -e "$dns_option" >> "$DHCP_CONFIG" -X -X -#restart the dnsmasq -systemctl restart dnsmasq -result=$? -if [ "$result" -ne "0" ] -then -X logger -t cloud "dnsmasq.sh: could not configure dnsmasq" -X logger -t cloud "dnsmasq.sh: reverting to the old config" -X logger -t cloud "dnsmasq.sh: copying the failure config to `$DHCP_FAILURE_CONFIG` and `$DHCP_FAILURE_CONFIG_MAIN`" -X cp "$DHCP_CONFIG" "$DHCP_FAILURE_CONFIG" -X cp "$DHCP_CONFIG_MAIN" "$DHCP_FAILURE_CONFIG_MAIN" -X cp "$DHCP_CONFIG_BAK" "$DHCP_CONFIG" -X cp "$DHCP_CONFIG_MAIN_BAK" "$DHCP_CONFIG_MAIN" -X systemctl restart dnsmasq -X unlock_exit $result $lock $locked -fi -rm "$DHCP_CONFIG_BAK" -rm "$DHCP_CONFIG_MAIN_BAK" -unlock_exit $result $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/dnsmasq.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/dnsmasq.sh': 'MD5 check failed' - ) << \SHAR_EOF -d603da3043a61bea911e21fb4da8ded0 cloud_scripts/opt/cloud/bin/dnsmasq.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/dnsmasq.sh'` -ne 4359 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' is not 4359" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_dhcp.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_dhcp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_dhcp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_dhcp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_dhcp.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2P@96YT2!N;W0@ -M:6X@7,Z"B`@("`@("`@("`@(')E;6]V95]K97ES+F%D9"AK -M97DI"@H@("`@("`@(&9O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_dhcp.py': 'MD5 check failed' - ) << \SHAR_EOF -9b17e95a8fcb1cf185c9e74cc6ddecca cloud_scripts/opt/cloud/bin/cs_dhcp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_dhcp.py'` -ne 1533 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_dhcp.py' is not 1533" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_cmdline.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_cmdline.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_cmdline.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, cmdline): -X if 'redundant_router' in cmdline['cmd_line']: -X cmdline['cmd_line']['redundant_router'] = "true" -X else: -X cmdline['cmd_line']['redundant_router'] = "false" -X dbag['config'] = cmdline['cmd_line'] -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_cmdline.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_cmdline.py': 'MD5 check failed' - ) << \SHAR_EOF -a6290582c86832c4c94985580ceda8e5 cloud_scripts/opt/cloud/bin/cs_cmdline.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_cmdline.py'` -ne 1045 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' is not 1045" - fi -fi -# ============= cloud_scripts/root/reconfigLB.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/reconfigLB.sh' -then -${echo} "x - SKIPPING cloud_scripts/root/reconfigLB.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/reconfigLB.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/reconfigLB.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -ret=0 -X -new_config=$1 -X -# save previous state -X mv /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy.cfg.old -X -X mv $new_config /etc/haproxy/haproxy.cfg -X if haproxy -p /var/run/haproxy.pid -f /etc/haproxy/haproxy.cfg -sf $(cat /var/run/haproxy.pid); then -X logger -t cloud "New haproxy instance successfully loaded, stopping previous one." -X ret=0 -X else -X logger -t cloud "New instance failed to start, resuming previous one." -X mv /etc/haproxy/haproxy.cfg $new_config -X mv /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg -X haproxy -p /var/run/haproxy.pid -f /etc/haproxy/haproxy.cfg -sf $(cat /var/run/haproxy.pid) -X ret=1 -X fi -X -exit $ret -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/reconfigLB.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/root/reconfigLB.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/reconfigLB.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/reconfigLB.sh': 'MD5 check failed' - ) << \SHAR_EOF -d73e1491560b810ac47d1aaeb2b466ba cloud_scripts/root/reconfigLB.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/reconfigLB.sh'` -ne 1454 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/reconfigLB.sh' is not 1454" - fi -fi -# ============= cloud_scripts/root/monitorServices.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/monitorServices.py' -then -${echo} "x - SKIPPING cloud_scripts/root/monitorServices.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/monitorServices.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/monitorServices.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,L('!A=&@*9G)O;2!H96%L=&A?8VAE -M8VMS+G5T:6QI='D@:6UP;W)T(&=E=$AE86QT:$-H96-KWT* -M("`@('!A2`K)UTG*R(@(B`K -M("=;)RMP2LG72<@*R`B("(@*R!M -M2!O;F4@<&ED(&]R -M(&YO=`H@("`@:68@97AI=%-T871U6EN9R!F97<@;6]R92!T:6UEPH@("`@("`@("`@("`@("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EWT@(U-K:7`@WT*("`@(&9A:6QI;F=#:&5C:W,@/2!;70H@ -M("`@:68@8VAE8VM4>7!E(#T](")B87-I8R(Z"B`@("`@("`@;6]N:71297-U -M;'0L(&9A:6QI;F=#:&5C:W,@/2!M;VYI=%!R;V-E&-L=61E(#T@ -M:&-?9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K&-L=61E -M9%]H96%L=&A?8VAE8VMS(B!I;B!H8U]D871A(&5L7!E*0H@("`@("`@("`@("`@("`@:68@;&5N*')E="D@/3T@,#H*("`@("`@ -M("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@("`@("`@:68@(G-U -M8V-E7,N87)G=BD@/3T@,CH*("`@("`@("!I9B!S>7,N87)G=ELQ72`]/2`B -M861V86YC960B.@H@("`@("`@("`@("!M86EN*")A9'9A;F-E9"(I"B`@("`@ -M("`@96QI9B!S>7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@("`@("!M -M86EN*")B87-I8R(I"B`@("`@("`@96QS93H*("`@("`@("`@("`@<')I;G1D -M*")%7!E(&]F('1E7,N87)G=BD* -M("`@(&5L/dev/null 2>&1 || ${echo} 'cloud_scripts/root/monitorServices.py': 'MD5 check failed' - ) << \SHAR_EOF -d46009a10f68b7f2c57e43e215cba41c cloud_scripts/root/monitorServices.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/monitorServices.py'` -ne 12747 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/monitorServices.py' is not 12747" - fi -fi -# ============= cloud_scripts/root/health_checks/iptables_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/iptables_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/iptables_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/iptables_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/iptables_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W'!E8W1E9"`](%M="B`@("`@("`@9&5S=$EP(#T@<&]R=$9O'0L('-R8U!O2!I;B!I<%1A8FQE4QI'!E8W1E9#H*("`@("`@("`@("`@("`@("`@ -M("!I9B!I<%1A8FQE16YT'!E8W1E9$5N=')Y*2`]/2`M,3H* -M("`@("`@("`@("`@("`@("`@("`@("`@9F]U;F1!;&P@/2!&86QS90H@("`@ -M("`@("`@("`@("`@("`@("`@("!B4QI -M/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/iptables_check.py': 'MD5 check failed' - ) << \SHAR_EOF -36d30e9b9ff7842db6472b1f063bb076 cloud_scripts/root/health_checks/iptables_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/iptables_check.py'` -ne 3349 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/iptables_check.py' is not 3349" - fi -fi -# ============= cloud_scripts/root/health_checks/memory_usage_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/memory_usage_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/memory_usage_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/memory_usage_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/memory_usage_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W$UE;6]R>55S86=E(ETI"B`@("!C;60@/2`B9G)E92!\(&%W:R`G1DY2(#T] -M(#(@>R!P2!5$UE;6]R>55S86=E*2`K("(E(@H@("`@("`@("`@("!E>&ET*#$I"B`@ -M("`@("`@<')I;G0@(DUE;6]R>2!5/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/memory_usage_check.py': 'MD5 check failed' - ) << \SHAR_EOF -1d0f74928584f4e36af8d1d726fac4a4 cloud_scripts/root/health_checks/memory_usage_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/memory_usage_check.py'` -ne 1966 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/memory_usage_check.py' is not 1966" - fi -fi -# ============= cloud_scripts/root/health_checks/haproxy_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/haproxy_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/haproxy_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/haproxy_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/haproxy_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&-O;FXH -M:&%P41A=&$L(&AA0V9G4V5C=&EO;G,I.@H@("`@:68@(FUA>&-O;FXB -M(&EN(&AA<')O>'E$871A(&%N9"`B;6%X8V]N;B(@:6X@:&%#9F=396-T:6]N -M41A=&%;(FUA>&-O;FXB -M72`A/2!H84-F9U-E8W1I;VYS6R)G;&]B86PB75LB;6%X8V]N;B)=6S!=+G-T -M'E$871A -M+"!H84-F9U-E8W1I;VYS*3H*("`@(&-O41A=&$Z"B`@("`@("`@'!E8W1E9"`Z("(@*R!L8E-E8ULB86QG -M;W)I=&AM(ET@*R!<"B`@("`@("`@("`@("`@("`@("`@("`@("`@(B!B=70@ -M9F]U;F0@(B`K(&-F9U-E8W1I;VY;(F)A;&%N8V4B75LP72`K(")<;B(*("`@ -M("`@("`@("`@("`@("`@("!C;W)R96-T(#T@1F%L'!E8W1E9%-E'!E8W1E9%-E"!C;VX@86YD(&5A8V@@;&]A -M9"!B86QA;F-I;F<@41A=&$@/2!G971(96%L=&A#:&5C:W-$ -M871A*")H87!R;WAY1&%T82(I"B`@("!I9B!H87!R;WAY1&%T82!I'DN8V9G -M(BP@)W(G*2!A2]H87!R -M;WAY+F-F9R(*("`@("`@("!E>&ET*#$I"@H@("`@:&%#9F=396-T:6]NWT*("`@("`@("`@("`@8V]N=&EN=64*"B`@("`@("`@ -M:68@8W5R$-O;FX@ -M/2!C:&5C:TUA>&-O;FXH:&%P41A=&%;,%TL(&AA0V9G4V5C=&EO;G,I -M"B`@("!C:&5C:TQB4G5L97,@/2!C:&5C:TQO861"86QA;F-E*&AA<')O>'E$ -M871A+"!H84-F9U-E8W1I;VYS*0H*("`@(&EF(&-H96-K36%X0V]N;B!A;F0@ -M8VAE8VM,8E)U;&5S.@H@("`@("`@('!R:6YT(")!;&P@8VAE8VMS('!A&ET*#$I"@H* -M:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH*("`@(&EF(&QE;BAS>7,N87)G -M=BD@/3T@,B!A;F0@/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/haproxy_check.py': 'MD5 check failed' - ) << \SHAR_EOF -a6a55e4accdf61929c52391235dea744 cloud_scripts/root/health_checks/haproxy_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/haproxy_check.py'` -ne 5274 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/haproxy_check.py' is not 5274" - fi -fi -# ============= cloud_scripts/root/health_checks/router_version_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/router_version_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/router_version_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/router_version_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/router_version_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O -M'!E8W1E9#H@(B`K(%P*("`@("`@ -M("`@("`@("`@("`@97AP96-T960@*R`B+"!F;W5N9#H@(B`K(&9O=6YD"B`@ -M("`@("`@("`@('1E;7!L871E5F5R'!E8W1E -M9"`](&1A=&%;(G-C'!E8W1E9#H@(B`K(%P*("`@("`@ -M("`@("`@("`@("`@97AP96-T960@*R`B+"!F;W5N9#H@(B`K(&9O=6YD"B`@ -M("`@("`@("`@('-C/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/router_version_check.py': 'MD5 check failed' - ) << \SHAR_EOF -408778f28fd8559df294e18256af1f0b cloud_scripts/root/health_checks/router_version_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/router_version_check.py'` -ne 2773 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/router_version_check.py' is not 2773" - fi -fi -# ============= cloud_scripts/root/health_checks/utility/sharedFunctions.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/utility/sharedFunctions.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/utility/sharedFunctions.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import json -X -X -def getHealthChecksData(additionalDataKey=None): -X with open('/root/health_checks_data.json', 'r') as hc_data_file: -X hc_data = json.load(hc_data_file) -X -X # If no specific key is requested return all the data as JSON -X if additionalDataKey is None: -X return hc_data -X -X if additionalDataKey not in hc_data["health_checks_config"]: -X return None -X -X data = hc_data["health_checks_config"][additionalDataKey].strip().split(";") -X addData = [] -X for line in data: -X line = line.strip() -X if len(line) == 0: -X continue -X entries = line.split(',') -X d = {} -X for entry in entries: -X entry = entry.strip() -X if len(entry) == 0: -X continue -X keyVal = entry.split("=") -X if len(keyVal) == 2: -X d[keyVal[0].strip()] = keyVal[1].strip() -X if len(d) > 0: -X addData.append(d) -X -X return addData -X -X -def formatPort(portStart, portEnd, delim="-"): -X return portStart if portStart == portEnd else portStart + delim + portEnd -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/health_checks/utility/sharedFunctions.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/utility/sharedFunctions.py': 'MD5 check failed' - ) << \SHAR_EOF -4fa10a419db9715b34c7037bce5e6fe8 cloud_scripts/root/health_checks/utility/sharedFunctions.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/utility/sharedFunctions.py'` -ne 1865 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' is not 1865" - fi -fi -# ============= cloud_scripts/root/health_checks/utility/__init__.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/utility/__init__.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/utility/__init__.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/utility/__init__.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/utility/__init__.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/utility/__init__.py': 'MD5 check failed' - ) << \SHAR_EOF -ea0b11e040da094dd4f5628b467d5d88 cloud_scripts/root/health_checks/utility/__init__.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/utility/__init__.py'` -ne 864 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/utility/__init__.py' is not 864" - fi -fi -# ============= cloud_scripts/root/health_checks/disk_space_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/disk_space_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/disk_space_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/disk_space_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/disk_space_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O -MWT*("`@(&EF(&5N=')I97,@:7,@;F]T($YO;F4@86YD -M(&QE;BAE;G1R:65S*2`]/2`Q.@H@("`@("`@(&1A=&$@/2!E;G1R:65S6S!= -M"@H@("`@:68@(FUI;D1I/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/disk_space_check.py': 'MD5 check failed' - ) << \SHAR_EOF -9bbb07b130e3946c35263c2e970b59ba cloud_scripts/root/health_checks/disk_space_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/disk_space_check.py'` -ne 1626 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/disk_space_check.py' is not 1626" - fi -fi -# ============= cloud_scripts/root/health_checks/gateways_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/gateways_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/gateways_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/gateways_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/gateways_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,B*0H@("`@:68@9W=S(&ES($YO;F4@86YD(&QE;BAG=W,I(#T](#`Z"B`@ -M("`@("`@<')I;G0@(DYO(&=A=&5W87ES(&1A=&$@879A:6QA8FQE+"!S:VEP -M<&EN9R(*("`@("`@("!E>&ET*#`I"@H@("`@=6YR96%C:&%B;&5'871E5V%Y -M7,N87!P -M96YD*&=W*0H*("`@(&EF(&QE;BAU;G)E86-H86)L94=A=&5787ES*2`]/2`P -M.@H@("`@("`@('!R:6YT(")!;&P@(B`K('-T7,* -M("`@("`@("!E>&ET*#$I"@H*:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH* -M("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A;F0@/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/gateways_check.py': 'MD5 check failed' - ) << \SHAR_EOF -d1715f65dfe24b77c489d24fc1717bc9 cloud_scripts/root/health_checks/gateways_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/gateways_check.py'` -ne 1869 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/gateways_check.py' is not 1869" - fi -fi -# ============= cloud_scripts/root/health_checks/__init__.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/__init__.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/__init__.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/__init__.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/health_checks/__init__.py' && -#!/usr/bin/python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# Needed to expose utility as package outside for monitorServices.py. -# This directory should only contain executables for health checks. -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/__init__.py' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/root/health_checks/__init__.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/health_checks/__init__.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/__init__.py': 'MD5 check failed' - ) << \SHAR_EOF -fb151d74c97d6b3926d6b7a48eea3e56 cloud_scripts/root/health_checks/__init__.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/__init__.py'` -ne 942 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/__init__.py' is not 942" - fi -fi -# ============= cloud_scripts/root/health_checks/dns_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/dns_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/dns_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/dns_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/dns_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I"@H@("`@=VET:"!O<&5N*"/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/dns_check.py': 'MD5 check failed' - ) << \SHAR_EOF -b3192e74a4e52893fdeca4850eb096f4 cloud_scripts/root/health_checks/dns_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/dns_check.py'` -ne 1972 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/dns_check.py' is not 1972" - fi -fi -# ============= cloud_scripts/root/health_checks/cpu_usage_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/cpu_usage_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/cpu_usage_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/cpu_usage_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/cpu_usage_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W$-P=55S86=E(ETI"B`@("!C;60@/2`B=&]P("UB -M("UN,B`M<"`Q('P@9F=R97`@7")#<'4H7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@ -((&UA:6XH*0HR -` -end -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/cpu_usage_check.py' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/root/health_checks/cpu_usage_check.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/health_checks/cpu_usage_check.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/cpu_usage_check.py': 'MD5 check failed' - ) << \SHAR_EOF -faa54497a494f763c8f1a5a4d9b49c4f cloud_scripts/root/health_checks/cpu_usage_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/cpu_usage_check.py'` -ne 2078 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/cpu_usage_check.py' is not 2078" - fi -fi -# ============= cloud_scripts/root/health_checks/dhcp_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/dhcp_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/dhcp_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/dhcp_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/dhcp_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I"@H@("`@=VET:"!O<&5N*"'0G+"`G -M2`]($9A;'-E"B`@("`@("`@9F]R(&AO'0B"B`@("`@("`@97AI="@P*0H*"FEF(%]?;F%M -M95]?(#T](")?7VUA:6Y?7R(Z"B`@("!I9B!L96XH/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/dhcp_check.py': 'MD5 check failed' - ) << \SHAR_EOF -20e7a36b29f4160ae3e5814f042a8242 cloud_scripts/root/health_checks/dhcp_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/dhcp_check.py'` -ne 2386 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/dhcp_check.py' is not 2386" - fi -fi -# ============= cloud_scripts/root/func.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/func.sh' -then -${echo} "x - SKIPPING cloud_scripts/root/func.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/func.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/func.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# Only one lock is allowed: biglock -X -# getLockFile() parameters -# $1 lock filename -# $2 timeout seconds -X -#set -x -X -getCurrLock() { -X result=`ls $__LOCKDIR/*-$1.lock 2>/dev/null | head -n1` -X while [ $? -ne 0 ] -X do -X result=`ls $__LOCKDIR/*-$1.lock 2>/dev/null| head -n1` -X done -X echo $result -} -X -getLockFile() { -X lock=$1 -X -X __locked=0 -X __TS=`date +%s%N` -X __LOCKDIR="/tmp" -X __LOCKFILE="$__LOCKDIR/$__TS-$$-$lock.lock" -X -X if [ $2 ] -X then -X __TIMEOUT=$2 -X else -X __TIMEOUT=30 -X fi -X -X if [ -e $__LOCKFILE ] -X then -X logger -t cloud "Process $0 pid $$ want to get ECLUSIVE LOCK $lock RECURSIVELY!" -X psline=`ps u $$` -X logger -t cloud "Failed job detail: $psline" -X echo 0 -X return -X fi -X -X psline=`ps u $$` -X echo $psline > $__LOCKFILE -X if [ ! -e $__LOCKFILE ] -X then -X return -X fi -X -X for i in `seq 1 $(($__TIMEOUT * 10))` -X do -X currlock=$(getCurrLock $lock) -X if [ $currlock -ef $__LOCKFILE ] -X then -X __locked=1 -X break -X fi -X -X sleep 0.1 -X if [ $((i % 10)) -eq 0 ] -X then -X logger -t cloud "Process $0 pid $$ waiting for the lock $lock for another 1 second" -X fi -X done -X if [ $__locked -ne 1 ] -X then -X logger -t cloud "fail to acquire the lock $lock for process $0 pid $$ after $__TIMEOUT seconds time out!" -X cmd=`cat $currlock 2>/dev/null` -X if [ $? -eq 0 ] -X then -X logger -t cloud "waiting for process: $cmd" -X else -X logger -t cloud "didn't get info about process who we're waiting for" -X fi -X psline=`ps u $$` -X logger -t cloud "Failed job detail: $psline" -X rm $__LOCKFILE -X fi -X echo $__locked -} -X -# releaseLockFile() parameters -# $1 lock filename -# $2 locked(1) or not(0) -releaseLockFile() { -X __LOCKDIR="/tmp" -X __LOCKFILE="$__LOCKDIR/*-$$-$1.lock" -X __locked=$2 -X if [ "$__locked" == "1" ] -X then -X rm $__LOCKFILE -X fi -} -X -# releaseLockFile() parameters -# $1 exit value -# $2 lock filename -# $3 locked(1) or not(0) -unlock_exit() { -X releaseLockFile $2 $3 -X exit $1 -} -X -# calcuate the ip & network mask -rangecalc(){ -X local IFS='.' -X local -a oct mask ip -X -X read -ra oct <<<"$1" -X read -ra mask <<<"$2" -X for i in {0..3} -X do -X ip+=( "$(( oct[i] & mask[i] ))" ) -X done -X echo "${ip[*]}" -} -X -#get cidr of the nic -getcidr(){ -X local dev=$1 -X local mask=`ifconfig $dev|grep "Mask"|cut -d ":" -f 4` -X local cidrsize=`ip addr show $dev|grep inet|head -n 1|awk '{print $2}'|cut -d '/' -f 2` -X local ipaddr=`ip addr show $dev|grep inet|head -n 1|awk '{print $2}'|cut -d '/' -f 1` -X local base=$(rangecalc $ipaddr $mask) -X echo $base/$cidrsize -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/func.sh' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/root/func.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/func.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/func.sh': 'MD5 check failed' - ) << \SHAR_EOF -89141bce2eaa74a4a9a9788cae397be4 cloud_scripts/root/func.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/func.sh'` -ne 3567 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/func.sh' is not 3567" - fi -fi -# ============= cloud_scripts/root/clearUsageRules.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/clearUsageRules.sh' -then -${echo} "x - SKIPPING cloud_scripts/root/clearUsageRules.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/clearUsageRules.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/clearUsageRules.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -# clearUsageRules.sh - remove iptable rules for removed public interfaces -# @VERSION@ -X -if [ -f /root/removedVifs ] -then -X var=`cat /root/removedVifs` -X # loop through even vif to be cleared -X for i in $var; do -X # Make sure vif doesn't exist -X if [ ! -f /sys/class/net/$i ] -X then -X # remove rules -X iptables -D NETWORK_STATS -i eth0 -o $i > /dev/null; -X iptables -D NETWORK_STATS -i $i -o eth0 > /dev/null; -X iptables -D NETWORK_STATS -o $i ! -i eth0 -p tcp > /dev/null; -X iptables -D NETWORK_STATS -i $i ! -o eth0 -p tcp > /dev/null; -X fi -X done -rm /root/removedVifs -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/clearUsageRules.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/root/clearUsageRules.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/clearUsageRules.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/clearUsageRules.sh': 'MD5 check failed' - ) << \SHAR_EOF -f176fc60b3a7b07a47482d68528bb460 cloud_scripts/root/clearUsageRules.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/clearUsageRules.sh'` -ne 1461 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/clearUsageRules.sh' is not 1461" - fi -fi -# ============= cloud_scripts/var/www/html/latest/.htaccess ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/latest/.htaccess' -then -${echo} "x - SKIPPING cloud_scripts/var/www/html/latest/.htaccess (file already exists)" - -else -${echo} "x - extracting cloud_scripts/var/www/html/latest/.htaccess (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/latest/.htaccess' && -Options +FollowSymLinks -RewriteEngine On -X -#http:///latest/user-data and .../user-data/ (both yield user-data file) -#http:///latest/meta-data and .../meta-data/ (dir listing of meta-data) -RewriteRule ^user-data/?$ ../userdata/%{REMOTE_ADDR}/user-data [L,NC,QSA] -RewriteRule ^meta-data/?$ ../metadata/%{REMOTE_ADDR}/meta-data [L,NC,QSA] -X -#http:///latest/foo and .../foo/ (yield metadata/$IP/foo) -#are these used? -RewriteRule ^availability-zone/?$ ../metadata/%{REMOTE_ADDR}/availability-zone [L,NC,QSA] -RewriteRule ^cloud-identifier/?$ ../metadata/%{REMOTE_ADDR}/cloud-identifier [L,NC,QSA] -RewriteRule ^instance-id/?$ ../metadata/%{REMOTE_ADDR}/instance-id [L,NC,QSA] -RewriteRule ^local-hostname/?$ ../metadata/%{REMOTE_ADDR}/local-hostname [L,NC,QSA] -RewriteRule ^local-ipv4/?$ ../metadata/%{REMOTE_ADDR}/local-ipv4 [L,NC,QSA] -RewriteRule ^public-hostname/?$ ../metadata/%{REMOTE_ADDR}/public-hostname [L,NC,QSA] -RewriteRule ^public-ipv4/?$ ../metadata/%{REMOTE_ADDR}/public-ipv4 [L,NC,QSA] -RewriteRule ^public-keys/?$ ../metadata/%{REMOTE_ADDR}/public-keys [L,NC,QSA] -RewriteRule ^service-offering/?$ ../metadata/%{REMOTE_ADDR}/service-offering [L,NC,QSA] -RewriteRule ^vm-id/?$ ../metadata/%{REMOTE_ADDR}/vm-id [L,NC,QSA] -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/latest/.htaccess' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/var/www/html/latest/.htaccess' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/var/www/html/latest/.htaccess failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/latest/.htaccess': 'MD5 check failed' - ) << \SHAR_EOF -b20d7331940666e4f160df0a03678813 cloud_scripts/var/www/html/latest/.htaccess -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/latest/.htaccess'` -ne 1425 && \ - ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/latest/.htaccess' is not 1425" - fi -fi -# ============= cloud_scripts/var/www/html/userdata/.htaccess ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/userdata/.htaccess' -then -${echo} "x - SKIPPING cloud_scripts/var/www/html/userdata/.htaccess (file already exists)" - -else -${echo} "x - extracting cloud_scripts/var/www/html/userdata/.htaccess (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/userdata/.htaccess' && -Options -Indexes -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/userdata/.htaccess' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/var/www/html/userdata/.htaccess' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/var/www/html/userdata/.htaccess failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/userdata/.htaccess': 'MD5 check failed' - ) << \SHAR_EOF -7eb825c9c5f32d7efe110c8d7ed402dc cloud_scripts/var/www/html/userdata/.htaccess -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/userdata/.htaccess'` -ne 17 && \ - ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/userdata/.htaccess' is not 17" - fi -fi -# ============= cloud_scripts/etc/ipsec.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/ipsec.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/ipsec.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.conf' && -# ipsec.conf - strongSwan IPsec configuration file -X -config setup -X -include /etc/ipsec.d/*.conf -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/ipsec.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/ipsec.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.conf': 'MD5 check failed' - ) << \SHAR_EOF -da4dd5d331eed3e64a528dc648aa7cae cloud_scripts/etc/ipsec.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.conf'` -ne 94 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.conf' is not 94" - fi -fi -# ============= cloud_scripts/etc/systemd/journald.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/journald.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/journald.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/journald.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/journald.conf' && -[Journal] -Compress=yes -SystemMaxUse=40M -SystemMaxFileSize=10M -RuntimeMaxUse=20M -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/journald.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/journald.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/journald.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/journald.conf': 'MD5 check failed' - ) << \SHAR_EOF -ea3c97c4a558fbfdf53304f77275ef8a cloud_scripts/etc/systemd/journald.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/journald.conf'` -ne 80 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/journald.conf' is not 80" - fi -fi -# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service -M[[N_6U5N:71="D1E/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service': 'MD5 check failed' - ) << \SHAR_EOF -58d4e646ee66ac7c470796bd6ce9e2a6 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service'` -ne 156 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service' is not 156" - fi -fi -# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service -M[[N_6U5N:71="D1E/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service': 'MD5 check failed' - ) << \SHAR_EOF -027a172fad275171647740477b78ca93 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service'` -ne 143 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service' is not 143" - fi -fi -# ============= cloud_scripts/etc/systemd/system/cloud.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud.service' && -[Unit] -Description=CloudStack Agent service -After=cloud-early-config.service network.target cloud-postinit.service local-fs.target -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=simple -WorkingDirectory=/usr/local/cloud/systemvm -ExecStart=/usr/local/cloud/systemvm/_run.sh -Restart=on-failure -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/cloud.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud.service': 'MD5 check failed' - ) << \SHAR_EOF -b7eb67763e7d694ed98758faef961ac6 cloud_scripts/etc/systemd/system/cloud.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud.service'` -ne 298 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud.service' is not 298" - fi -fi -# ============= cloud_scripts/etc/systemd/system/open-vm-tools.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/open-vm-tools.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/open-vm-tools.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/open-vm-tools.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/open-vm-tools.service -M[[N_6U5N:71="D1E&5C4W1A/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/open-vm-tools.service': 'MD5 check failed' - ) << \SHAR_EOF -10af19a17cd3ee299f08c46bace0f56f cloud_scripts/etc/systemd/system/open-vm-tools.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/open-vm-tools.service'` -ne 280 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/open-vm-tools.service' is not 280" - fi -fi -# ============= cloud_scripts/etc/systemd/system/baremetal-vr.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/baremetal-vr.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/baremetal-vr.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/baremetal-vr.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/baremetal-vr.service' && -[Unit] -Description=CloudStack Baremetal VR service -After=network.target local-fs.target -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=simple -WorkingDirectory=/opt/cloud/bin -ExecStart=/usr/bin/python /opt/cloud/bin/baremetal-vr.py -Restart=on-failure -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/baremetal-vr.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/baremetal-vr.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/baremetal-vr.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/baremetal-vr.service': 'MD5 check failed' - ) << \SHAR_EOF -9fc2a325a709e7cf9ae4d4ec8b7e692a cloud_scripts/etc/systemd/system/baremetal-vr.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/baremetal-vr.service'` -ne 257 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/baremetal-vr.service' is not 257" - fi -fi -# ============= cloud_scripts/etc/systemd/system/xe-daemon.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/xe-daemon.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/xe-daemon.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/xe-daemon.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/xe-daemon.service -M[[N_6U5N:71="D1E&5N+FUO=6YT"D)E9F]R93UN971W;W)K+G1A -M2UC;VYF:6&5C -M4W1A&5C4W1A3UM=6QT:2UU/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/xe-daemon.service': 'MD5 check failed' - ) << \SHAR_EOF -51e30000a8c2d2a91ba1a372bc40a628 cloud_scripts/etc/systemd/system/xe-daemon.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/xe-daemon.service'` -ne 398 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/xe-daemon.service' is not 398" - fi -fi -# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service -M[[N_6U5N:71="D1E5]D865M;VX@+6X*"EM);G-T86QL70I786YT961">3UM=6QT:2UU -*/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service': 'MD5 check failed' - ) << \SHAR_EOF -b1d4d295d2f3dff1ed1e13835e365e86 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service'` -ne 190 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service' is not 190" - fi -fi -# ============= cloud_scripts/etc/systemd/system/cloud-early-config.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-early-config.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-early-config.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-early-config.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-early-config.service' && -[Unit] -Description=CloudStack post-boot patching service using cmdline -DefaultDependencies=no -X -Before=network-pre.target -Wants=network-pre.target -X -Requires=local-fs.target -After=local-fs.target -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=oneshot -ExecStart=/opt/cloud/bin/setup/cloud-early-config -RemainAfterExit=true -TimeoutStartSec=5min -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-early-config.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/cloud-early-config.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-early-config.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-early-config.service': 'MD5 check failed' - ) << \SHAR_EOF -60723561261aa16ed4477c5e02c52bcd cloud_scripts/etc/systemd/system/cloud-early-config.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-early-config.service'` -ne 348 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-early-config.service' is not 348" - fi -fi -# ============= cloud_scripts/etc/systemd/system/cloud-password-server@.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-password-server@.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-password-server@.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' && -[Unit] -Description=Cloud password server on %I -After=network.target local-fs.target -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=simple -WorkingDirectory=/opt/cloud/bin -ExecStart=/opt/cloud/bin/passwd_server_ip.py %I -Restart=on-failure -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-password-server@.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-password-server@.service': 'MD5 check failed' - ) << \SHAR_EOF -3edb13a39635749f16f0579b481c5f25 cloud_scripts/etc/systemd/system/cloud-password-server@.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-password-server@.service'` -ne 244 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' is not 244" - fi -fi -# ============= cloud_scripts/etc/systemd/system/cloud-postinit.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-postinit.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-postinit.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-postinit.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-postinit.service' && -[Unit] -Description=CloudStack post-patching init script -After=cloud-early-config.service network.target local-fs.target -Before=ssh.service -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=oneshot -ExecStart=/opt/cloud/bin/setup/postinit.sh -RemainAfterExit=true -TimeoutStartSec=10min -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-postinit.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/cloud-postinit.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-postinit.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-postinit.service': 'MD5 check failed' - ) << \SHAR_EOF -22b48cd2a7478d27cb155d32cc2610cb cloud_scripts/etc/systemd/system/cloud-postinit.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-postinit.service'` -ne 287 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-postinit.service' is not 287" - fi -fi -# ============= cloud_scripts/etc/iptables/rules ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/rules' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/rules (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/rules (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/rules' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT --A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT --A INPUT -i eth0 -p tcp -m state --state NEW --dport 8080 -j ACCEPT --A INPUT -i eth0 -p tcp -m state --state NEW --dport 80 -j ACCEPT --A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth0 -o eth2 -j ACCEPT --A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/rules' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/rules' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/rules failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/rules': 'MD5 check failed' - ) << \SHAR_EOF -e2be370a53cd4e436ce4c298b16ead21 cloud_scripts/etc/iptables/rules -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/rules'` -ne 1731 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/rules' is not 1731" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-consoleproxy ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-consoleproxy' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-consoleproxy (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-consoleproxy (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-consoleproxy' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] --A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp --icmp-type 13 -j DROP --A INPUT -p icmp -j ACCEPT --A INPUT -i eth1 -p tcp -m state --state NEW -m tcp --dport 3922 -j ACCEPT --A INPUT -i eth0 -p tcp -m state --state NEW -m tcp --dport 8001 -j ACCEPT --A INPUT -i eth1 -p tcp -m state --state NEW -m tcp --dport 8001 -j ACCEPT --A INPUT -i eth2 -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT --A INPUT -i eth2 -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-consoleproxy' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/iptables-consoleproxy' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-consoleproxy failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-consoleproxy': 'MD5 check failed' - ) << \SHAR_EOF -2840365dad7fe832ea35d8f72a3bfdca cloud_scripts/etc/iptables/iptables-consoleproxy -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-consoleproxy'` -ne 1601 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-consoleproxy' is not 1601" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-router ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-router' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-router (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-router (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-router' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] -:FW_EGRESS_RULES - [0:0] -:FW_OUTBOUND - [0:0] --A INPUT -d 224.0.0.18/32 -j ACCEPT --A INPUT -d 225.0.0.50/32 -j ACCEPT --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT --A INPUT -i eth1 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp -m state --state NEW --dport 80 -j ACCEPT --A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth0 -o eth0 -m state --state NEW -j ACCEPT --A FORWARD -i eth0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth0 -o eth2 -j FW_OUTBOUND --A FW_EGRESS_RULES -j ACCEPT --I FW_OUTBOUND -m state --state RELATED,ESTABLISHED -j ACCEPT --A FW_OUTBOUND -j FW_EGRESS_RULES -COMMIT -*mangle -:PREROUTING ACCEPT [0:0] -:INPUT ACCEPT [0:0] -:FORWARD ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] --A PREROUTING -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark --A POSTROUTING -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-router' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/iptables-router' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-router failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-router': 'MD5 check failed' - ) << \SHAR_EOF -aeabe6897f9969f64a87b793deee6500 cloud_scripts/etc/iptables/iptables-router -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-router'` -ne 2348 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-router' is not 2348" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-vpcrouter ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-vpcrouter' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-vpcrouter (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-vpcrouter (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-vpcrouter' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] --A INPUT -d 224.0.0.18/32 -j ACCEPT --A INPUT -d 225.0.0.50/32 -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT --A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT --A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT -COMMIT -*mangle -:PREROUTING ACCEPT [0:0] -:INPUT ACCEPT [0:0] -:FORWARD ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] --A OUTPUT -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-vpcrouter' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/iptables-vpcrouter' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-vpcrouter failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-vpcrouter': 'MD5 check failed' - ) << \SHAR_EOF -f3e4459f3b0eea8f2de2a6f01ef79866 cloud_scripts/etc/iptables/iptables-vpcrouter -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-vpcrouter'` -ne 1465 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-vpcrouter' is not 1465" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-dhcpsrvr ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-dhcpsrvr (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-dhcpsrvr (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] -:FW_EGRESS_RULES - [0:0] -:FW_OUTBOUND - [0:0] --A INPUT -d 224.0.0.18/32 -j ACCEPT --A INPUT -d 225.0.0.50/32 -j ACCEPT --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT --A INPUT -i eth1 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp -m state --state NEW --dport 80 -j ACCEPT --A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth0 -o eth0 -m state --state NEW -j ACCEPT --A FORWARD -i eth0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth0 -o eth2 -j FW_OUTBOUND --A FW_EGRESS_RULES -j ACCEPT --I FW_OUTBOUND -m state --state RELATED,ESTABLISHED -j ACCEPT --A FW_OUTBOUND -j FW_EGRESS_RULES -COMMIT -*mangle -:PREROUTING ACCEPT [0:0] -:INPUT ACCEPT [0:0] -:FORWARD ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] --A PREROUTING -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark --A POSTROUTING -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-dhcpsrvr failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-dhcpsrvr': 'MD5 check failed' - ) << \SHAR_EOF -aeabe6897f9969f64a87b793deee6500 cloud_scripts/etc/iptables/iptables-dhcpsrvr -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-dhcpsrvr'` -ne 2348 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' is not 2348" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-elbvm ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-elbvm' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-elbvm (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-elbvm (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-elbvm' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-elbvm' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/iptables/iptables-elbvm' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-elbvm failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-elbvm': 'MD5 check failed' - ) << \SHAR_EOF -7a950ed86376c0166c53943cdf68ccb2 cloud_scripts/etc/iptables/iptables-elbvm -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-elbvm'` -ne 1256 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-elbvm' is not 1256" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-secstorage ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-secstorage' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-secstorage (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-secstorage (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-secstorage' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] -:HTTP - [0:0] --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth3 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -p icmp --icmp-type 13 -j DROP --A INPUT -p icmp -j ACCEPT --A INPUT -i eth0 -p tcp -m state --state NEW --dport 3922 -j ACCEPT -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-secstorage' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/iptables/iptables-secstorage' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-secstorage failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-secstorage': 'MD5 check failed' - ) << \SHAR_EOF -d031185b81ee7ee008b80d434d44b61d cloud_scripts/etc/iptables/iptables-secstorage -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-secstorage'` -ne 1375 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-secstorage' is not 1375" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-ilbvm ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-ilbvm' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-ilbvm (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-ilbvm (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-ilbvm' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-ilbvm' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/iptables/iptables-ilbvm' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-ilbvm failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-ilbvm': 'MD5 check failed' - ) << \SHAR_EOF -85129e942bc07d1fb67e0e169238c345 cloud_scripts/etc/iptables/iptables-ilbvm -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-ilbvm'` -ne 1192 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-ilbvm' is not 1192" - fi -fi -# ============= cloud_scripts/etc/iptables/rt_tables_init ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/rt_tables_init' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/rt_tables_init (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/rt_tables_init (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/rt_tables_init' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -# -# reserved values -# -255 local -254 main -253 default -0 unspec -# -# local -# -#1 inr.ruhep -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/rt_tables_init' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/rt_tables_init' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/rt_tables_init failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/rt_tables_init': 'MD5 check failed' - ) << \SHAR_EOF -86477f42d18121a176751c7284251089 cloud_scripts/etc/iptables/rt_tables_init -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/rt_tables_init'` -ne 897 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/rt_tables_init' is not 897" - fi -fi -# ============= cloud_scripts/etc/sysctl.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/sysctl.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/sysctl.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/sysctl.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/sysctl.conf' && -# Kernel sysctl configuration file -# -# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and -# sysctl.conf(5) for more details. -# @VERSION@ -X -# Controls IP packet forwarding -net.ipv4.ip_forward = 1 -X -# Controls source route verification -net.ipv4.conf.default.rp_filter = 0 -X -# Do not accept source routing -net.ipv4.conf.default.accept_source_route = 0 -X -# Respect local interface in ARP interactions -net.ipv4.conf.default.arp_announce = 2 -net.ipv4.conf.default.arp_ignore = 2 -net.ipv4.conf.all.arp_announce = 2 -net.ipv4.conf.all.arp_ignore = 2 -X -# IPSec NETKEY -- avoid bogus redirects -net.ipv4.conf.all.accept_redirects = 0 -net.ipv4.conf.default.accept_redirects = 0 -net.ipv4.conf.all.send_redirects = 0 -net.ipv4.conf.default.send_redirects = 0 -net.ipv4.conf.all.secure_redirects = 0 -net.ipv4.conf.default.secure_redirects = 0 -X -# For smooth transition of the vip address in case of a keepalived failover -net.ipv4.ip_nonlocal_bind = 1 -X -# Controls the System Request debugging functionality of the kernel -kernel.sysrq = 0 -X -# Controls whether core dumps will append the PID to the core filename. -# Useful for debugging multi-threaded applications. -kernel.core_uses_pid = 1 -X -# A better way for the instance to die -kernel.panic = 10 -kernel.panic_on_oops = 1 -vm.panic_on_oom = 1 -X -# Controls the use of TCP syncookies -net.ipv4.tcp_syncookies = 1 -X -# disable tcp time stamps -net.ipv4.tcp_timestamps = 0 -X -net.ipv4.tcp_tw_reuse = 1 -net.ipv4.tcp_max_tw_buckets = 1000000 -net.core.somaxconn = 65535 -net.nf_conntrack_max = 1000000 -net.netfilter.nf_conntrack_max = 1000000 -X -# Disable IPv6 -net.ipv6.conf.all.disable_ipv6 = 1 -net.ipv6.conf.all.forwarding = 0 -net.ipv6.conf.all.accept_ra = 0 -net.ipv6.conf.all.accept_redirects = 0 -net.ipv6.conf.all.autoconf = 0 -X -# Minimum swappiness without disabling it -vm.swappiness=1 -X -# make the kernel more aggressive in reclaiming RAM from the disk and swap caches -vm.vfs_cache_pressure = 200 -X -# try to maintain 'free' memory thereby reducing the size of disk cache, hence reducing swapping. -vm.min_free_kbytes = 20480 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/sysctl.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/sysctl.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/sysctl.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/sysctl.conf': 'MD5 check failed' - ) << \SHAR_EOF -f1cef50b7a8a7cc7a7a24ff08cbea1f8 cloud_scripts/etc/sysctl.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/sysctl.conf'` -ne 2049 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/sysctl.conf' is not 2049" - fi -fi -# ============= cloud_scripts/etc/xl2tpd/xl2tpd.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/xl2tpd/xl2tpd.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/xl2tpd/xl2tpd.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' && -[lns default] -ip range = 10.1.9.2-10.1.9.8 -local ip = 10.1.9.1 -require chap = yes -refuse pap = yes -pppoptfile = /etc/ppp/options.xl2tpd -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/xl2tpd/xl2tpd.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/xl2tpd/xl2tpd.conf': 'MD5 check failed' - ) << \SHAR_EOF -060f03388ae34c64f85a45f47c9f6d48 cloud_scripts/etc/xl2tpd/xl2tpd.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/xl2tpd/xl2tpd.conf'` -ne 139 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' is not 139" - fi -fi -# ============= cloud_scripts/etc/dnsmasq.conf.tmpl ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/dnsmasq.conf.tmpl' -then -${echo} "x - SKIPPING cloud_scripts/etc/dnsmasq.conf.tmpl (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/dnsmasq.conf.tmpl (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/dnsmasq.conf.tmpl' && -# Configuration file for dnsmasq. -# -# Format is one option per line, legal options are the same -# as the long options legal on the command line. See -# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. -X -# Listen on this specific port instead of the standard DNS port -# (53). Setting this to zero completely disables DNS function, -# leaving only DHCP and/or TFTP. -#port=5353 -X -# The following two options make you a better netizen, since they -# tell dnsmasq to filter out queries which the public DNS cannot -# answer, and which load the servers (especially the root servers) -# unnecessarily. If you have a dial-on-demand link they also stop -# these requests from bringing up the link unnecessarily. -X -# Never forward plain names (without a dot or domain part) -domain-needed -# Never forward addresses in the non-routed address spaces. -bogus-priv -X -X -# Uncomment this to filter useless windows-originated DNS requests -# which can trigger dial-on-demand links needlessly. -# Note that (amongst other things) this blocks all SRV requests, -# so don't use it if you use eg Kerberos, SIP, XMMP or Google-talk. -# This option only affects forwarding, SRV records originating for -# dnsmasq (via srv-host= lines) are not suppressed by it. -# filterwin2k -X -# Change this line if you want dns to get its upstream servers from -# somewhere other that /etc/resolv.conf -resolv-file=/etc/dnsmasq-resolv.conf -X -# By default, dnsmasq will send queries to any of the upstream -# servers it knows about and tries to favour servers to are known -# to be up. Uncommenting this forces dnsmasq to try each query -# with each server strictly in the order they appear in -# /etc/resolv.conf -#strict-order -X -# If you don't want dnsmasq to read /etc/resolv.conf or any other -# file, getting its servers from this file instead (see below), then -# uncomment this. -#no-resolv -X -# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv -# files for changes and re-read them then uncomment this. -#no-poll -X -# Add other name servers here, with domain specs if they are for -# non-public domains. -#server=/localnet/192.168.0.1 -X -# Example of routing PTR queries to nameservers: this will send all -# address->name queries for 192.168.3/24 to nameserver 10.1.2.3 -#server=/3.168.192.in-addr.arpa/10.1.2.3 -X -# Add local-only domains here, queries in these domains are answered -# from /etc/hosts or DHCP only. -local=/2.vmops-test.vmops.com/ -X -# Add domains which you want to force to an IP address here. -# The example below send any host in double-click.net to a local -# web-server. -#address=/double-click.net/127.0.0.1 -X -# --address (and --server) work with IPv6 addresses too. -#address=/www.thekelleys.org.uk/fe80::20d:60ff:fe36:f83 -X -# You can control how dnsmasq talks to a server: this forces -# queries to 10.1.2.3 to be routed via eth1 -# server=10.1.2.3@eth1 -X -# and this sets the source (ie local) address used to talk to -# 10.1.2.3 to 192.168.1.1 port 55 (there must be a interface with that -# IP on the machine, obviously). -# server=10.1.2.3@192.168.1.1#55 -X -# If you want dnsmasq to change uid and gid to something other -# than the default, edit the following lines. -#user= -#group= -X -# If you want dnsmasq to listen for DHCP and DNS requests only on -# specified interfaces (and the loopback) give the name of the -# interface (eg eth0) here. -# Repeat the line for more than one interface. -#interface=eth0 -# Or you can specify which interface _not_ to listen on -except-interface=eth1 -except-interface=eth2 -except-interface=lo -# Or which to listen on by address (remember to include 127.0.0.1 if -# you use this.) -#listen-address= -# If you want dnsmasq to provide only DNS service on an interface, -# configure it as shown above, and then use the following line to -# disable DHCP and TFTP on it. -no-dhcp-interface=eth1 -no-dhcp-interface=eth2 -X -# On systems which support it, dnsmasq binds the wildcard address, -# even when it is listening on only some interfaces. It then discards -# requests that it shouldn't reply to. This has the advantage of -# working even when interfaces come and go and change address. If you -# want dnsmasq to really bind only the interfaces it is listening on, -# uncomment this option. About the only time you may need this is when -# running another nameserver on the same machine. -#bind-interfaces -X -# If you don't want dnsmasq to read /etc/hosts, uncomment the -# following line. -#no-hosts -# or if you want it to read another file, as well as /etc/hosts, use -# this. -#addn-hosts=/etc/banner_add_hosts -X -# Set this (and domain: see below) if you want to have a domain -# automatically added to simple names in a hosts-file. -expand-hosts -X -# Set the domain for dnsmasq. this is optional, but if it is set, it -# does the following things. -# 1) Allows DHCP hosts to have fully qualified domain names, as long -# as the domain part matches this setting. -# 2) Sets the "domain" DHCP option thereby potentially setting the -# domain of all systems configured by DHCP -# 3) Provides the domain part for "expand-hosts" -domain=2.vmops-test.vmops.com -X -# Set a different domain for a particular subnet -#domain=wireless.thekelleys.org.uk,192.168.2.0/24 -X -# Same idea, but range rather then subnet -#domain=reserved.thekelleys.org.uk,192.68.3.100,192.168.3.200 -X -# Uncomment this to enable the integrated DHCP server, you need -# to supply the range of addresses available for lease and optionally -# a lease time. If you have more than one network, you will need to -# repeat this for each network on which you want to supply DHCP -# service. -dhcp-range_ip4=10.1.1.1,static -dhcp-range_ip6=::1,static -dhcp-hostsfile=/etc/dhcphosts.txt -X -# This is an example of a DHCP range where the netmask is given. This -# is needed for networks we reach the dnsmasq DHCP server via a relay -# agent. If you don't know what a DHCP relay agent is, you probably -# don't need to worry about this. -#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h -X -# This is an example of a DHCP range which sets a tag, so that -# some DHCP options may be set only for this network. -#dhcp-range=set:red,192.168.0.50,192.168.0.150 -X -# Use this DHCP range only when the tag "green" is set. -#dhcp-range=tag:green,192.168.0.50,192.168.0.150,12h -X -# Specify a subnet which can't be used for dynamic address allocation, -# is available for hosts with matching --dhcp-host lines. Note that -# dhcp-host declarations will be ignored unless there is a dhcp-range -# of some type for the subnet in question. -# In this case the netmask is implied (it comes from the network -# configuration on the machine running dnsmasq) it is possible to give -# an explicit netmask instead. -#dhcp-range=192.168.0.0,static -X -# Enable DHCPv6. Note that the prefix-length does not need to be specified -# and defaults to 64 if missing/ -#dhcp-range=1234::2, 1234::500, 64, 12h -X -# Do Router Advertisements, BUT NOT DHCP for this subnet. -#dhcp-range=1234::, ra-only -X -# Do Router Advertisements, BUT NOT DHCP for this subnet, also try and -# add names to the DNS for the IPv6 address of SLAAC-configured dual-stack -# hosts. Use the DHCPv4 lease to derive the name, network segment and -# MAC address and assume that the host will also have an -# IPv6 address calculated using the SLAAC alogrithm. -#dhcp-range=1234::, ra-names -X -# Do Router Advertisements, BUT NOT DHCP for this subnet. -# Set the lifetime to 46 hours. (Note: minimum lifetime is 2 hours.) -#dhcp-range=1234::, ra-only, 48h -X -# Do DHCP and Router Advertisements for this subnet. Set the A bit in the RA -# so that clients can use SLAAC addresses as well as DHCP ones. -#dhcp-range=1234::2, 1234::500, slaac -X -# Do Router Advertisements and stateless DHCP for this subnet. Clients will -# not get addresses from DHCP, but they will get other configuration information. -# They will use SLAAC for addresses. -#dhcp-range=1234::, ra-stateless -X -# Do stateless DHCP, SLAAC, and generate DNS names for SLAAC addresses -# from DHCPv4 leases. -#dhcp-range=1234::, ra-stateless, ra-names -X -# Do router advertisements for all subnets where we're doing DHCPv6 -# Unless overriden by ra-stateless, ra-names, et al, the router -# advertisements will have the M and O bits set, so that the clients -# get addresses and configuration from DHCPv6, and the A bit reset, so the -# clients don't use SLAAC addresses. -#enable-ra -X -# Supply parameters for specified hosts using DHCP. There are lots -# of valid alternatives, so we will give examples of each. Note that -# IP addresses DO NOT have to be in the range given above, they just -# need to be on the same network. The order of the parameters in these -# do not matter, it's permissible to give name, address and MAC in any -# order. -X -# Always allocate the host with Ethernet address 11:22:33:44:55:66 -# The IP address 192.168.0.60 -#dhcp-host=11:22:33:44:55:66,192.168.0.60 -X -# Always set the name of the host with hardware address -# 11:22:33:44:55:66 to be "fred" -#dhcp-host=11:22:33:44:55:66,fred -X -# Always give the host with Ethernet address 11:22:33:44:55:66 -# the name fred and IP address 192.168.0.60 and lease time 45 minutes -#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m -X -# Give a host with Ethernet address 11:22:33:44:55:66 or -# 12:34:56:78:90:12 the IP address 192.168.0.60. Dnsmasq will assume -# that these two Ethernet interfaces will never be in use at the same -# time, and give the IP address to the second, even if it is already -# in use by the first. Useful for laptops with wired and wireless -# addresses. -#dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.60 -X -# Give the machine which says its name is "bert" IP address -# 192.168.0.70 and an infinite lease -#dhcp-host=bert,192.168.0.70,infinite -X -# Always give the host with client identifier 01:02:02:04 -# the IP address 192.168.0.60 -#dhcp-host=id:01:02:02:04,192.168.0.60 -X -# Always give the host with client identifier "marjorie" -# the IP address 192.168.0.60 -#dhcp-host=id:marjorie,192.168.0.60 -X -# Enable the address given for "judge" in /etc/hosts -# to be given to a machine presenting the name "judge" when -# it asks for a DHCP lease. -#dhcp-host=judge -X -# Never offer DHCP service to a machine whose Ethernet -# address is 11:22:33:44:55:66 -#dhcp-host=11:22:33:44:55:66,ignore -X -# Ignore any client-id presented by the machine with Ethernet -# address 11:22:33:44:55:66. This is useful to prevent a machine -# being treated differently when running under different OS's or -# between PXE boot and OS boot. -#dhcp-host=11:22:33:44:55:66,id:* -X -# Send extra options which are tagged as "red" to -# the machine with Ethernet address 11:22:33:44:55:66 -#dhcp-host=11:22:33:44:55:66,set:red -X -# Send extra options which are tagged as "red" to -# any machine with Ethernet address starting 11:22:33: -#dhcp-host=11:22:33:*:*:*,set:red -X -# Give a fixed IPv6 address and name to client with -# DUID 00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2 -# Note the MAC addresses CANNOT be used to identify DHCPv6 clients. -# Note also the they [] around the IPv6 address are obilgatory. -#dhcp-host=id:00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2, fred, [1234::5] -X -# Ignore any clients which are not specified in dhcp-host lines -# or /etc/ethers. Equivalent to ISC "deny unknown-clients". -# This relies on the special "known" tag which is set when -# a host is matched. -# -# When using bridged networks in ACS this prevents ack to DHCPINFORM etc. request -dhcp-ignore=tag:!known -X -# Send extra options which are tagged as "red" to any machine whose -# DHCP vendorclass string includes the substring "Linux" -#dhcp-vendorclass=set:red,Linux -X -# Send extra options which are tagged as "red" to any machine one -# of whose DHCP userclass strings includes the substring "accounts" -#dhcp-userclass=set:red,accounts -X -# Send extra options which are tagged as "red" to any machine whose -# MAC address matches the pattern. -#dhcp-mac=set:red,00:60:8C:*:*:* -X -# If this line is uncommented, dnsmasq will read /etc/ethers and act -# on the ethernet-address/IP pairs found there just as if they had -# been given as --dhcp-host options. Useful if you keep -# MAC-address/host mappings there for other purposes. -#read-ethers -X -# Send options to hosts which ask for a DHCP lease. -# See RFC 2132 for details of available options. -# Common options can be given to dnsmasq by name: -# run "dnsmasq --help dhcp" to get a list. -# Note that all the common settings, such as netmask and -# broadcast address, DNS server and default route, are given -# sane defaults by dnsmasq. You very likely will not need -# any dhcp-options. If you use Windows clients and Samba, there -# are some options which are recommended, they are detailed at the -# end of this section. -X -# Override the default route supplied by dnsmasq, which assumes the -# router is the same machine as the one running dnsmasq. -#dhcp-option=3,1.2.3.4 -X -# Do the same thing, but using the option name -#dhcp-option=option:router,1.2.3.4 -X -# Override the default route supplied by dnsmasq and send no default -# route at all. Note that this only works for the options sent by -# default (1, 3, 6, 12, 28) the same line will send a zero-length option -# for all other option numbers. -#dhcp-option=3 -X -# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 -#dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5 -X -# Send DHCPv6 option. Note [] around IPv6 addresses. -#dhcp-option=option6:dns-server,[1234::77],[1234::88] -X -# Send DHCPv6 option for namservers as the machine running -# dnsmasq and another. -#dhcp-option=option6:dns-server,[::],[1234::88] -X -# Set the NTP time server address to be the same machine as -# is running dnsmasq -#dhcp-option=42,0.0.0.0 -X -# Set the NIS domain name to "welly" -#dhcp-option=40,welly -X -# Set the default time-to-live to 50 -#dhcp-option=23,50 -X -# Set the "all subnets are local" flag -#dhcp-option=27,1 -X -# Set the domain -dhcp-option=15,"2.vmops-test.vmops.com" -X -# Send the etherboot magic flag and then etherboot options (a string). -#dhcp-option=128,e4:45:74:68:00:00 -#dhcp-option=129,NIC=eepro100 -X -# Specify an option which will only be sent to the "red" network -# (see dhcp-range for the declaration of the "red" network) -# Note that the tag: part must precede the option: part. -#dhcp-option = tag:red, option:ntp-server, 192.168.1.1 -X -# The following DHCP options set up dnsmasq in the same way as is specified -# for the ISC dhcpcd in -# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt -# adapted for a typical dnsmasq installation where the host running -# dnsmasq is also the host running samba. -# you may want to uncomment some or all of them if you use -# Windows clients and Samba. -#dhcp-option=19,0 # option ip-forwarding off -#dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) -#dhcp-option=45,0.0.0.0 # netbios datagram distribution server -#dhcp-option=46,8 # netbios node type -X -# Send an empty WPAD option. This may be REQUIRED to get windows 7 to behave. -#dhcp-option=252,"\n" -X -# Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client -# probably doesn't support this...... -#dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com -X -# Send RFC-3442 classless static routes (note the netmask encoding) -#dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8 -X -# Send vendor-class specific options encapsulated in DHCP option 43. -# The meaning of the options is defined by the vendor-class so -# options are sent only when the client supplied vendor class -# matches the class given here. (A substring match is OK, so "MSFT" -# matches "MSFT" and "MSFT 5.0"). This example sets the -# mtftp address to 0.0.0.0 for PXEClients. -#dhcp-option=vendor:PXEClient,1,0.0.0.0 -X -# Send microsoft-specific option to tell windows to release the DHCP lease -# when it shuts down. Note the "i" flag, to tell dnsmasq to send the -# value as a four-byte integer - that's what microsoft wants. See -# http://technet2.microsoft.com/WindowsServer/en/library/a70f1bb7-d2d4-49f0-96d6-4b7414ecfaae1033.mspx?mfr=true -dhcp-option=vendor:MSFT,2,1i -X -# Send the Encapsulated-vendor-class ID needed by some configurations of -# Etherboot to allow is to recognise the DHCP server. -#dhcp-option=vendor:Etherboot,60,"Etherboot" -X -# Send options to PXELinux. Note that we need to send the options even -# though they don't appear in the parameter request list, so we need -# to use dhcp-option-force here. -# See http://syslinux.zytor.com/pxe.php#special for details. -# Magic number - needed before anything else is recognised -#dhcp-option-force=208,f1:00:74:7e -# Configuration file name -#dhcp-option-force=209,configs/common -# Path prefix -#dhcp-option-force=210,/tftpboot/pxelinux/files/ -# Reboot time. (Note 'i' to send 32-bit value) -#dhcp-option-force=211,30i -X -# Set the boot filename for netboot/PXE. You will only need -# this is you want to boot machines over the network and you will need -# a TFTP server; either dnsmasq's built in TFTP server or an -# external one. (See below for how to enable the TFTP server.) -dhcp-boot=pxelinux.0 -X -# The same as above, but use custom tftp-server instead machine running dnsmasq -#dhcp-boot=pxelinux,server.name,192.168.1.100 -X -# Boot for Etherboot gPXE. The idea is to send two different -# filenames, the first loads gPXE, and the second tells gPXE what to -# load. The dhcp-match sets the gpxe tag for requests from gPXE. -#dhcp-match=set:gpxe,175 # gPXE sends a 175 option. -#dhcp-boot=tag:!gpxe,undionly.kpxe -#dhcp-boot=mybootimage -X -# Encapsulated options for Etherboot gPXE. All the options are -# encapsulated within option 175 -#dhcp-option=encap:175, 1, 5b # priority code -#dhcp-option=encap:175, 176, 1b # no-proxydhcp -#dhcp-option=encap:175, 177, string # bus-id -#dhcp-option=encap:175, 189, 1b # BIOS drive code -#dhcp-option=encap:175, 190, user # iSCSI username -#dhcp-option=encap:175, 191, pass # iSCSI password -X -# Test for the architecture of a netboot client. PXE clients are -# supposed to send their architecture as option 93. (See RFC 4578) -#dhcp-match=peecees, option:client-arch, 0 #x86-32 -#dhcp-match=itanics, option:client-arch, 2 #IA64 -#dhcp-match=hammers, option:client-arch, 6 #x86-64 -#dhcp-match=mactels, option:client-arch, 7 #EFI x86-64 -X -# Do real PXE, rather than just booting a single file, this is an -# alternative to dhcp-boot. -#pxe-prompt="What system shall I netboot?" -# or with timeout before first available action is taken: -#pxe-prompt="Press F8 for menu.", 60 -X -# Available boot services. for PXE. -#pxe-service=x86PC, "Boot from local disk" -X -# Loads /pxelinux.0 from dnsmasq TFTP server. -#pxe-service=x86PC, "Install Linux", pxelinux -X -# Loads /pxelinux.0 from TFTP server at 1.2.3.4. -# Beware this fails on old PXE ROMS. -#pxe-service=x86PC, "Install Linux", pxelinux, 1.2.3.4 -X -# Use bootserver on network, found my multicast or broadcast. -#pxe-service=x86PC, "Install windows from RIS server", 1 -X -# Use bootserver at a known IP address. -#pxe-service=x86PC, "Install windows from RIS server", 1, 1.2.3.4 -X -# If you have multicast-FTP available, -# information for that can be passed in a similar way using options 1 -# to 5. See page 19 of -# http://download.intel.com/design/archives/wfm/downloads/pxespec.pdf -X -X -# Enable dnsmasq's built-in TFTP server -enable-tftp -X -# Set the root directory for files available via FTP. -tftp-root=/opt/tftpboot -X -# Make the TFTP server more secure: with this set, only files owned by -# the user dnsmasq is running as will be send over the net. -#tftp-secure -X -# This option stops dnsmasq from negotiating a larger blocksize for TFTP -# transfers. It will slow things down, but may rescue some broken TFTP -# clients. -#tftp-no-blocksize -X -# Set the boot file name only when the "red" tag is set. -#dhcp-boot=net:red,pxelinux.red-net -X -# An example of dhcp-boot with an external TFTP server: the name and IP -# address of the server are given after the filename. -# Can fail with old PXE ROMS. Overridden by --pxe-service. -#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 -X -# If there are multiple external tftp servers having a same name -# (using /etc/hosts) then that name can be specified as the -# tftp_servername (the third option to dhcp-boot) and in that -# case dnsmasq resolves this name and returns the resultant IP -# addresses in round robin fasion. This facility can be used to -# load balance the tftp load among a set of servers. -#dhcp-boot=/var/ftpd/pxelinux.0,boothost,tftp_server_name -X -# Set the limit on DHCP leases, the default is 150 -dhcp-lease-max=2100 -X -# The DHCP server needs somewhere on disk to keep its lease database. -# This defaults to a sane location, but if you want to change it, use -# the line below. -#dhcp-leasefile=/var/lib/misc/dnsmasq.leases -leasefile-ro -X -# Set the DHCP server to authoritative mode. In this mode it will barge in -# and take over the lease for any client which broadcasts on the network, -# whether it has a record of the lease or not. This avoids long timeouts -# when a machine wakes up on a new network. DO NOT enable this if there's -# the slightest chance that you might end up accidentally configuring a DHCP -# server for your campus/company accidentally. The ISC server uses -# the same option, and this URL provides more information: -# http://www.isc.org/files/auth.html -#dhcp-authoritative -X -# Run an executable when a DHCP lease is created or destroyed. -# The arguments sent to the script are "add" or "del", -# then the MAC address, the IP address and finally the hostname -# if there is one. -#dhcp-script=/bin/echo -X -# Set the cachesize here. -#cache-size=150 -X -# If you want to disable negative caching, uncomment this. -#no-negcache -X -# Normally responses which come form /etc/hosts and the DHCP lease -# file have Time-To-Live set as zero, which conventionally means -# do not cache further. If you are happy to trade lower load on the -# server for potentially stale date, you can set a time-to-live (in -# seconds) here. -#local-ttl= -X -# If you want dnsmasq to detect attempts by Verisign to send queries -# to unregistered .com and .net hosts to its sitefinder service and -# have dnsmasq instead return the correct NXDOMAIN response, uncomment -# this line. You can add similar lines to do the same for other -# registries which have implemented wildcard A records. -#bogus-nxdomain=64.94.110.11 -X -# If you want to fix up DNS results from upstream servers, use the -# alias option. This only works for IPv4. -# This alias makes a result of 1.2.3.4 appear as 5.6.7.8 -#alias=1.2.3.4,5.6.7.8 -# and this maps 1.2.3.x to 5.6.7.x -#alias=1.2.3.0,5.6.7.0,255.255.255.0 -# and this maps 192.168.0.10->192.168.0.40 to 10.0.0.10->10.0.0.40 -#alias=192.168.0.10-192.168.0.40,10.0.0.0,255.255.255.0 -X -# Change these lines if you want dnsmasq to serve MX records. -X -# Return an MX record named "maildomain.com" with target -# servermachine.com and preference 50 -#mx-host=maildomain.com,servermachine.com,50 -X -# Set the default target for MX records created using the localmx option. -#mx-target=servermachine.com -X -# Return an MX record pointing to the mx-target for all local -# machines. -#localmx -X -# Return an MX record pointing to itself for all local machines. -#selfmx -X -# Change the following lines if you want dnsmasq to serve SRV -# records. These are useful if you want to serve ldap requests for -# Active Directory and other windows-originated DNS requests. -# See RFC 2782. -# You may add multiple srv-host lines. -# The fields are ,,,, -# If the domain part if missing from the name (so that is just has the -# service and protocol sections) then the domain given by the domain= -# config option is used. (Note that expand-hosts does not need to be -# set for this to work.) -X -# A SRV record sending LDAP for the example.com domain to -# ldapserver.example.com port 389 -#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389 -X -# A SRV record sending LDAP for the example.com domain to -# ldapserver.example.com port 389 (using domain=) -#domain=example.com -#srv-host=_ldap._tcp,ldapserver.example.com,389 -X -# Two SRV records for LDAP, each with different priorities -#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1 -#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2 -X -# A SRV record indicating that there is no LDAP server for the domain -# example.com -#srv-host=_ldap._tcp.example.com -X -# The following line shows how to make dnsmasq serve an arbitrary PTR -# record. This is useful for DNS-SD. (Note that the -# domain-name expansion done for SRV records _does_not -# occur for PTR records.) -#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services" -X -# Change the following lines to enable dnsmasq to serve TXT records. -# These are used for things like SPF and zeroconf. (Note that the -# domain-name expansion done for SRV records _does_not -# occur for TXT records.) -X -#Example SPF. -#txt-record=example.com,"v=spf1 a -all" -X -#Example zeroconf -#txt-record=_http._tcp.example.com,name=value,paper=A4 -X -# Provide an alias for a "local" DNS name. Note that this _only_ works -# for targets which are names from DHCP or /etc/hosts. Give host -# "bert" another name, bertrand -#cname=bertand,bert -X -# For debugging purposes, log each DNS query as it passes through -# dnsmasq. -#log-queries -X -# Log lots of extra information about DHCP transactions. -#log-dhcp -X -log-facility=/var/log/dnsmasq.log -X -# Include a another lot of configuration options. -#conf-file=/etc/dnsmasq.more.conf -conf-dir=/etc/dnsmasq.d -X -dhcp-optsfile=/etc/dhcpopts.txt -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/dnsmasq.conf.tmpl' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/dnsmasq.conf.tmpl' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/dnsmasq.conf.tmpl failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/dnsmasq.conf.tmpl': 'MD5 check failed' - ) << \SHAR_EOF -a0f6d4fbdef769352c0b4c6aee0e5b0b cloud_scripts/etc/dnsmasq.conf.tmpl -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/dnsmasq.conf.tmpl'` -ne 25321 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/dnsmasq.conf.tmpl' is not 25321" - fi -fi -# ============= cloud_scripts/etc/cron.daily/clear_cache ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cron.daily/clear_cache' -then -${echo} "x - SKIPPING cloud_scripts/etc/cron.daily/clear_cache (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/cron.daily/clear_cache (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cron.daily/clear_cache' && -#!/bin/bash -X -# clear memory cache to ultimately reduce swapping -X -sync && echo 1 > /proc/sys/vm/drop_caches -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cron.daily/clear_cache' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/cron.daily/clear_cache' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/cron.daily/clear_cache failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cron.daily/clear_cache': 'MD5 check failed' - ) << \SHAR_EOF -7935ce340439ae62c8f12f337d420207 cloud_scripts/etc/cron.daily/clear_cache -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/cron.daily/clear_cache'` -ne 107 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/cron.daily/clear_cache' is not 107" - fi -fi -# ============= cloud_scripts/etc/vmware-tools/tools.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/vmware-tools/tools.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/vmware-tools/tools.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/vmware-tools/tools.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/vmware-tools/tools.conf' && -[logging] -# Turns on logging globally. It can still be disabled for each domain. -# log = true -X -# Disables core dumps on fatal errors; they're enabled by default. -enableCoreDump = false -X -# Defines the "vmsvc" domain, logging to file -# vmsvc.level = message -vmsvc.handler = file -# Setup file rotation - keep 3 files -vmsvc.maxOldLogFiles = 2 -# Max log file size kept: 1 MB -vmsvc.maxLogSize = 1 -X -# Defines the "vmtoolsd" domain, and disable logging for it. -# vmtoolsd.level = none -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/vmware-tools/tools.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/vmware-tools/tools.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/vmware-tools/tools.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/vmware-tools/tools.conf': 'MD5 check failed' - ) << \SHAR_EOF -4d08804e1a2d4526faeec6404c18fabe cloud_scripts/etc/vmware-tools/tools.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/vmware-tools/tools.conf'` -ne 477 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/vmware-tools/tools.conf' is not 477" - fi -fi -# ============= cloud_scripts/etc/logrotate.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.conf' && -# rotate log files daily -daily -# keep 3 days worth -rotate 3 -# create new (empty) log files after rotating old ones -create -# use date as a suffix of the rotated file -#dateext -# max size 50M -size 50M -compress -# RPM packages drop log rotation information into this directory -include /etc/logrotate.d -# no packages own wtmp and btmp -- we'll rotate them here -/var/log/wtmp { -X monthly -X create 0664 root utmp -X rotate 1 -} -/var/log/btmp { -X missingok -X monthly -X create 0600 root utmp -X rotate 1 -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.conf': 'MD5 check failed' - ) << \SHAR_EOF -2430f483d055288c92deb28733562d8f cloud_scripts/etc/logrotate.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.conf'` -ne 507 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.conf' is not 507" - fi -fi -# ============= cloud_scripts/etc/ssh/sshd_config ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ssh/sshd_config' -then -${echo} "x - SKIPPING cloud_scripts/etc/ssh/sshd_config (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/ssh/sshd_config (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ssh/sshd_config' && -# $OpenBSD: sshd_config,v 1.75 2007/03/19 01:01:29 djm Exp $ -X -# This is the sshd server system-wide configuration file. See -# sshd_config(5) for more information. -X -# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin -X -# The strategy used for options in the default sshd_config shipped with -# OpenSSH is to specify options with their default value where -# possible, but leave them commented. Uncommented options change a -# default value. -X -Port 3922 -#AddressFamily any -#ListenAddress 0.0.0.0 -X -# Disable legacy (protocol version 1) support in the server for new -# installations. In future the default will change to require explicit -# activation of protocol 1 -Protocol 2 -X -# HostKey for protocol version 1 -#HostKey /etc/ssh/ssh_host_key -# HostKeys for protocol version 2 -#HostKey /etc/ssh/ssh_host_rsa_key -#HostKey /etc/ssh/ssh_host_dsa_key -X -# Lifetime and size of ephemeral version 1 server key -#KeyRegenerationInterval 1h -#ServerKeyBits 768 -X -# Logging -# obsoletes QuietMode and FascistLogging -#SyslogFacility AUTH -SyslogFacility AUTHPRIV -#LogLevel INFO -X -# Authentication: -X -#LoginGraceTime 2m -PermitRootLogin yes -#StrictModes yes -#MaxAuthTries 6 -X -#RSAAuthentication yes -PubkeyAuthentication yes -AuthorizedKeysFile .ssh/authorized_keys -X -# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts -#RhostsRSAAuthentication no -# similar for protocol version 2 -#HostbasedAuthentication no -# Change to yes if you don't trust ~/.ssh/known_hosts for -# RhostsRSAAuthentication and HostbasedAuthentication -#IgnoreUserKnownHosts no -# Don't read the user's ~/.rhosts and ~/.shosts files -#IgnoreRhosts yes -X -# To disable tunneled clear text passwords, change to no here! -#PermitEmptyPasswords no -PasswordAuthentication no -X -# Change to no to disable s/key passwords -#ChallengeResponseAuthentication yes -ChallengeResponseAuthentication no -X -# Kerberos options -#KerberosAuthentication no -#KerberosOrLocalPasswd yes -#KerberosTicketCleanup yes -#KerberosGetAFSToken no -X -# GSSAPI options -#GSSAPIAuthentication no -GSSAPIAuthentication no -#GSSAPICleanupCredentials yes -GSSAPICleanupCredentials yes -X -# Set this to 'yes' to enable PAM authentication, account processing, -# and session processing. If this is enabled, PAM authentication will -# be allowed through the ChallengeResponseAuthentication and -# PasswordAuthentication. Depending on your PAM configuration, -# PAM authentication via ChallengeResponseAuthentication may bypass -# the setting of "PermitRootLogin without-password". -# If you just want the PAM account and session checks to run without -# PAM authentication, then enable this but set PasswordAuthentication -# and ChallengeResponseAuthentication to 'no'. -#UsePAM no -UsePAM yes -X -# Accept locale-related environment variables -AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES -AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT -AcceptEnv LC_IDENTIFICATION LC_ALL -#AllowTcpForwarding yes -#GatewayPorts no -#X11Forwarding no -#X11Forwarding yes -#X11DisplayOffset 10 -#X11UseLocalhost yes -#PrintMotd yes -#PrintLastLog yes -TCPKeepAlive yes -#UseLogin no -#UsePrivilegeSeparation yes -#PermitUserEnvironment no -#Compression delayed -#ClientAliveInterval 0 -#ClientAliveCountMax 3 -#ShowPatchLevel no -UseDNS no -#PidFile /var/run/sshd.pid -#PermitTunnel no -X -MaxStartups 1000 -MaxSessions 1000 -X -# no default banner path -#Banner /some/path -X -# override default of no subsystems -Subsystem sftp /usr/lib/openssh/sftp-server -X -# Example of overriding settings on a per-user basis -#Match User anoncvs -# X11Forwarding no -# AllowTcpForwarding no -# ForceCommand cvs server -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ssh/sshd_config' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/ssh/sshd_config' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/ssh/sshd_config failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ssh/sshd_config': 'MD5 check failed' - ) << \SHAR_EOF -842613e1f724e90888a90882ed1a5684 cloud_scripts/etc/ssh/sshd_config -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/ssh/sshd_config'` -ne 3603 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/ssh/sshd_config' is not 3603" - fi -fi -# ============= cloud_scripts/etc/ppp/options.xl2tpd ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ppp/options.xl2tpd' -then -${echo} "x - SKIPPING cloud_scripts/etc/ppp/options.xl2tpd (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/ppp/options.xl2tpd (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ppp/options.xl2tpd' && -proxyarp -ipcp-accept-local -ipcp-accept-remote -noccp -idle 1800 -auth -mtu 1410 -mru 1410 -nodefaultroute -debug -connect-delay 5000 -ms-dns 10.1.1.1 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ppp/options.xl2tpd' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/ppp/options.xl2tpd' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/ppp/options.xl2tpd failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ppp/options.xl2tpd': 'MD5 check failed' - ) << \SHAR_EOF -80ba26ac087aaf7f13cdc1fa8f985d72 cloud_scripts/etc/ppp/options.xl2tpd -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/ppp/options.xl2tpd'` -ne 141 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/ppp/options.xl2tpd' is not 141" - fi -fi -# ============= cloud_scripts/etc/ipsec.d/l2tp.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.d/l2tp.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/ipsec.d/l2tp.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/ipsec.d/l2tp.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.d/l2tp.conf' && -#ipsec remote access vpn configuration -conn L2TP-PSK -X authby=secret -X rekey=no -X keyingtries=3 -X leftfirewall=yes -X type=transport -X # -X # ---------------------------------------------------------- -X # The VPN server. -X # -X # Allow incoming connections on the external network interface. -X # If you want to use a different interface or if there is no -X # defaultroute, you can use: left=your.ip.addr.ess -X # -X left=172.26.0.151 -X # -X leftprotoport=udp/l2tp -X # If you insist on supporting non-updated Windows clients, -X # you can use: leftprotoport=17/%any -X # -X # ---------------------------------------------------------- -X # The remote user(s). -X # -X # Allow incoming connections only from this IP address. -X right=%any -X # If you want to allow multiple connections from any IP address, -X # you can use: right=%any -X # -X rightprotoport=udp/%any -X # -X # ---------------------------------------------------------- -X # Change 'ignore' to 'add' to enable this configuration. -X # -X rightsubnetwithin=0.0.0.0/0 -X auto=route -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.d/l2tp.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/ipsec.d/l2tp.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/ipsec.d/l2tp.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.d/l2tp.conf': 'MD5 check failed' - ) << \SHAR_EOF -8ca6cb315858c9ccf8c91374c4f32def cloud_scripts/etc/ipsec.d/l2tp.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.d/l2tp.conf'` -ne 1234 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.d/l2tp.conf' is not 1234" - fi -fi -# ============= cloud_scripts/etc/rsyslog.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/rsyslog.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/rsyslog.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/rsyslog.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/rsyslog.conf' && -# /etc/rsyslog.conf Configuration file for rsyslog. -# -# For more information see -# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html -X -X -################# -#### MODULES #### -################# -X -$ModLoad imuxsock # provides support for local system logging -$ModLoad imklog # provides kernel logging support (previously done by rklogd) -#$ModLoad immark # provides --MARK-- message capability -X -# provides UDP syslog reception -$ModLoad imudp -$UDPServerRun 3914 -X -# provides TCP syslog reception -#$ModLoad imtcp -#$InputTCPServerRun 514 -X -X -########################### -#### GLOBAL DIRECTIVES #### -########################### -X -# -# Use traditional timestamp format. -# To enable high precision timestamps, comment out the following line. -# -$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat -X -# -# Set the default permissions for all log files. -# -$FileOwner root -$FileGroup adm -$FileCreateMode 0640 -$DirCreateMode 0755 -$Umask 0022 -X -# -# Include all config files in /etc/rsyslog.d/ -# -$IncludeConfig /etc/rsyslog.d/*.conf -X -X -############### -#### RULES #### -############### -X -# -# First some standard log files. Log by facility. -# -auth,authpriv.* /var/log/auth.log -#*.*;auth,authpriv.none -/var/log/syslog -cron.* /var/log/cron.log -daemon.* -/var/log/daemon.log -kern.* -/var/log/kern.log -lpr.* -/var/log/lpr.log -mail.* -/var/log/mail.log -#user.* -/var/log/user.log -X -# -# Logging for the mail system. Split it up so that -# it is easy to write scripts to parse these files. -# -mail.info -/var/log/mail.info -mail.warn -/var/log/mail.warn -mail.err /var/log/mail.err -X -# -# Logging for INN news system. -# -news.crit /var/log/news/news.crit -news.err /var/log/news/news.err -news.notice -/var/log/news/news.notice -X -# -# Some "catch-all" log files. -# -#*.=debug;\ -# auth,authpriv.none;\ -# news.none;mail.none -/var/log/debug -*.=info;*.=notice;*.=warn;\ -X auth,authpriv.none;\ -X cron.none,daemon.none;\ -X local0.none,daemon.none;\ -X mail.none,news.none -/var/log/messages -X -# -# Emergencies are sent to everybody logged in. -# -*.emerg :omusrmsg:* -X -# -# I like to have messages displayed on the console, but only on a virtual -# console I usually leave idle. -# -#daemon,mail.*;\ -# news.=crit;news.=err;news.=notice;\ -# *.=debug;*.=info;\ -# *.=notice;*.=warn /dev/tty8 -X -local0.* -/var/log/haproxy.log -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/rsyslog.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/rsyslog.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/rsyslog.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/rsyslog.conf': 'MD5 check failed' - ) << \SHAR_EOF -1ae97a7bb7bd89a2a7c2e9507bd5c95f cloud_scripts/etc/rsyslog.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/rsyslog.conf'` -ne 2298 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/rsyslog.conf' is not 2298" - fi -fi -# ============= cloud_scripts/etc/modprobe.d/pcspkr.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/modprobe.d/pcspkr.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/modprobe.d/pcspkr.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/modprobe.d/pcspkr.conf (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/modprobe.d/pcspkr.conf -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/modprobe.d/pcspkr.conf': 'MD5 check failed' - ) << \SHAR_EOF -6dc1a7a74dfa22c4f3b37e8700b61658 cloud_scripts/etc/modprobe.d/pcspkr.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/modprobe.d/pcspkr.conf'` -ne 801 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/modprobe.d/pcspkr.conf' is not 801" - fi -fi -# ============= cloud_scripts/etc/modprobe.d/aesni_intel.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/modprobe.d/aesni_intel.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/modprobe.d/aesni_intel.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -blacklist aesni_intel -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/modprobe.d/aesni_intel.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/modprobe.d/aesni_intel.conf': 'MD5 check failed' - ) << \SHAR_EOF -45027ef77fea6dd170da8ea5e1ad1268 cloud_scripts/etc/modprobe.d/aesni_intel.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/modprobe.d/aesni_intel.conf'` -ne 807 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' is not 807" - fi -fi -# ============= cloud_scripts/etc/cron.hourly/clear_cache ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cron.hourly/clear_cache' -then -${echo} "x - SKIPPING cloud_scripts/etc/cron.hourly/clear_cache (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/cron.hourly/clear_cache (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cron.hourly/clear_cache' && -#!/bin/bash -X -# clear memory cache to ultimately reduce swapping -X -phymem=$(free|awk '/^Mem:/{print $2}') -if [ $phymem -lt 513000 ]; then -X sync && echo 1 > /proc/sys/vm/drop_caches -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cron.hourly/clear_cache' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/cron.hourly/clear_cache' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/cron.hourly/clear_cache failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cron.hourly/clear_cache': 'MD5 check failed' - ) << \SHAR_EOF -648c036aba1a5d72010bf11e0ec95147 cloud_scripts/etc/cron.hourly/clear_cache -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/cron.hourly/clear_cache'` -ne 183 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/cron.hourly/clear_cache' is not 183" - fi -fi -# ============= cloud_scripts/etc/apache2/conf-enabled/security.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/security.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/security.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/security.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/security.conf' && -ServerTokens Prod -ServerSignature Off -TraceEnable Off -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/security.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/security.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/security.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/security.conf': 'MD5 check failed' - ) << \SHAR_EOF -73e01a3d1cf4f93cb11afb4eb1a6f252 cloud_scripts/etc/apache2/conf-enabled/security.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/security.conf'` -ne 54 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/security.conf' is not 54" - fi -fi -# ============= cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' && -# event MPM -# StartServers: initial number of server processes to start -# MinSpareThreads: minimum number of worker threads which are kept spare -# MaxSpareThreads: maximum number of worker threads which are kept spare -# ThreadsPerChild: constant number of worker threads in each server process -# MaxRequestWorkers: maximum number of worker threads -# MaxConnectionsPerChild: maximum number of requests a server process serves - -X StartServers 1 -X MinSpareThreads 25 -X MaxSpareThreads 75 -X ThreadLimit 64 -X ThreadsPerChild 25 -X MaxRequestWorkers 30 -X MaxConnectionsPerChild 1000 - -X -# vim: syntax=apache ts=4 sw=4 sts=4 sr noet -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf': 'MD5 check failed' - ) << \SHAR_EOF -b05dce38d6618734e7f49eddcb8ac131 cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf'` -ne 669 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' is not 669" - fi -fi -# ============= cloud_scripts/etc/apache2/httpd.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/httpd.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/apache2/httpd.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/apache2/httpd.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/httpd.conf' && -# Empty -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/httpd.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/apache2/httpd.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/apache2/httpd.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/httpd.conf': 'MD5 check failed' - ) << \SHAR_EOF -2402d4d5cd982d8b74e5c4d62ab0b20b cloud_scripts/etc/apache2/httpd.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/httpd.conf'` -ne 8 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/httpd.conf' is not 8" - fi -fi -# ============= cloud_scripts/etc/apache2/vhost.template ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/vhost.template' -then -${echo} "x - SKIPPING cloud_scripts/etc/apache2/vhost.template (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/apache2/vhost.template (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/apache2/vhost.template -M/%9I3X*"3Q$:7)E8W1O0H)"6%L;&]W(&9R -M;VT@86QL"@D\+T1I3X*"@E38W)I<'1!;&EA0H)"4%L;&]W(&9R;VT@86QL"@D\+T1I3X*"@E%T%004-(15],3T=?1$E2?2]ET%004-(15],3T=?1$E2?2]A8V-E&5S($UU;'1I5FEE=W,@1F]L;&]W4WEM3&EN:W,*("`@("`@("!!;&QO -M=T]V97)R:61E($YO;F4*("`@("`@("!/2!F3X*"CPO5FER='5A -M;$AO2`O/@H)"4]P=&EO;G,@1F]L;&]W -M4WEM3&EN:W,*"0E!;&QO=T]V97)R:61E($YO;F4*"3PO1&ER96-T;W)Y/@H) -M/$1I2`O=F%R+W=W=R]H=&UL/@H)"4]P=&EO;G,@26YD97AE6U,:6YK2`B+W5S&5S($UU;'1I5FEE=W,@1F]L;&]W -M4WEM3&EN:W,*"0E!;&QO=T]V97)R:61E($YO;F4*"0E/2!F3X*"@DC($EN8VQU9&4@0T]2 -M4R!C;VYF:6=U2!A;F0@8V5R=&EF:6-A=&4@87)E('-T;W)E9"!I;B!T:&4@2!A<'!E;F1E9"!T;R!T:&4@2!O;F4*"2,@("!H=6=E(&9I;&4@8V]N=&%I -M;FEN9R!A;&P@;V8@=&AE;2`H9FEL92!M=7-T(&)E(%!%32!E;F-O9&5D*0H) -M(R`@($YO=&4Z($EN2!O;F4@:'5G92!F:6QE(&-O;G1A:6YI -M;F<@86QL"@DC("`@;V8@=&AE;2`H9FEL92!M=7-T(&)E(%!%32!E;F-O9&5D -M*0H)(R`@($YO=&4Z($EN7!E2!T:&4@8V5R=&EF:6-A=&4*"2,@("!I2!A8V-E2!C;VUP;&5X(&)O;VQE86X@97AP"!I*$58 -M4'Q.54Q,*2\@7`H)(R`@("`@("`@("`@(&%N9"`E>U-33%]#3$E%3E1?4U]$ -M3E]/?2!E<2`B4VYA:V4@3VEL+"!,=&0N(B!<"@DC("`@("`@("`@("`@86YD -M("5[4U-,7T-,245.5%]37T1.7T]5?2!I;B![(E-T869F(BP@(D-!(BP@(D1E -M=B)](%P*"2,@("`@("`@("`@("!A;F0@)7M424U%7U=$05E](#X](#$@86YD -M("5[5$E-15]71$%9?2`\/2`U(%P*"2,@("`@("`@("`@("!A;F0@)7M424U% -M7TA/55)](#X](#@@86YD("5[5$E-15](3U52?2`\/2`R,"`@("`@("`I(%P* -M"2,@("`@("`@("`@(&]R("5[4D5-3U1%7T%$1%)](#U^(&TO7C$Y,EPN-S9< -M+C$V,EPN6S`M.5TK)"\*"2,\+TQO8V%T:6]N/@H*"2,@("!34TP@16YG:6YE -M($]P=&EO;G,Z"@DC("`@4V5T('9A2!E;G1R>2!I;B!T:&4@=7-E<@H)(R`@("`@9FEL92!N -M965D'AJ,S%:351:>FM602'!O7,@97AI'!O -M2X*"2,@("!O -M(%-T2!A;GDB('-I='5A=&EO;BP@:2YE -M+B!W:&5N(&ET(&%P<&QI97,@86-C97-S(&ES(&1E;FEE9`H)(R`@("`@86YD -M(&YO(&]T:&5R(&UO9'5L92!C86X@8VAA;F=E(&ET+@H)(R`@(&\@3W!T4F5N -M96=O=&EA=&4Z"@DC("`@("!4:&ES(&5N86)L97,@;W!T:6UI>F5D(%-33"!C -M;VYN96-T:6]N(')E;F5G;W1I871I;VX@:&%N9&QI;F<@=VAE;B!34TP*"2,@ -M("`@(&1I2!C;VYT -M97AT+@H)(U-33$]P=&EO;G,@*T9A:V5"87-I8T%U=&@@*T5X<&]R=$-E2!A;&5R="!B=70@9&]E6]U(&YE -M960@82!D:69F97)E;G0@2P@6]U('5S=6%L;'D@861D:71I;VYA;&QY('=A -M;G0@=&\@9&ES86)L90H)(R`@(&ME97`M86QI=F4@9F]R('1H;W-E(&-L:65N -M=',L('1O;RX@57-E('9A2!-4TE%(&]N(%=I;F1O=W,@6%`N -M"B`@("!,:7-T96X@,3`N,2XQ+C$Z.#0T,PH\+TEF36]D=6QE/@H*/$EF36]D -M=6QE(&UO9%]G;G5T;',N8SX*("`@($QI/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/vhost.template': 'MD5 check failed' - ) << \SHAR_EOF -e42ce7d6f871a7efa7a3c0e164f75dfc cloud_scripts/etc/apache2/vhost.template -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/vhost.template'` -ne 9955 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/vhost.template' is not 9955" - fi -fi -# ============= cloud_scripts/etc/vpcdnsmasq.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/vpcdnsmasq.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/vpcdnsmasq.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/vpcdnsmasq.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/vpcdnsmasq.conf' && -# Configuration file for dnsmasq. -# -# Format is one option per line, legal options are the same -# as the long options legal on the command line. See -# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. -X -# The following two options make you a better netizen, since they -# tell dnsmasq to filter out queries which the public DNS cannot -# answer, and which load the servers (especially the root servers) -# uneccessarily. If you have a dial-on-demand link they also stop -# these requests from bringing up the link uneccessarily. -X -# Never forward plain names (without a dot or domain part) -domain-needed -# Never forward addresses in the non-routed address spaces. -bogus-priv -X -X -# Uncomment this to filter useless windows-originated DNS requests -# which can trigger dial-on-demand links needlessly. -# Note that (amongst other things) this blocks all SRV requests, -# so don't use it if you use eg Kerberos. -# This option only affects forwarding, SRV records originating for -# dnsmasq (via srv-host= lines) are not suppressed by it. -#filterwin2k -X -# Change this line if you want dns to get its upstream servers from -# somewhere other that /etc/resolv.conf -resolv-file=/etc/dnsmasq-resolv.conf -X -# By default, dnsmasq will send queries to any of the upstream -# servers it knows about and tries to favour servers to are known -# to be up. Uncommenting this forces dnsmasq to try each query -# with each server strictly in the order they appear in -# /etc/resolv.conf -#strict-order -X -# If you don't want dnsmasq to read /etc/resolv.conf or any other -# file, getting its servers from this file instead (see below), then -# uncomment this. -#no-resolv -X -# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv -# files for changes and re-read them then uncomment this. -#no-poll -X -# Add other name servers here, with domain specs if they are for -# non-public domains. -#server=/localnet/192.168.0.1 -X -# Example of routing PTR queries to nameservers: this will send all -# address->name queries for 192.168.3/24 to nameserver 10.1.2.3 -#server=/3.168.192.in-addr.arpa/10.1.2.3 -X -# Add local-only domains here, queries in these domains are answered -# from /etc/hosts or DHCP only. -local=/2.vmops-test.vmops.com/ -X -# Add domains which you want to force to an IP address here. -# The example below send any host in doubleclick.net to a local -# webserver. -#address=/doubleclick.net/127.0.0.1 -X -# If you want dnsmasq to change uid and gid to something other -# than the default, edit the following lines. -#user= -#group= -X -# If you want dnsmasq to listen for DHCP and DNS requests only on -# specified interfaces (and the loopback) give the name of the -# interface (eg eth0) here. -# Repeat the line for more than one interface. -#interface=eth0 -X -# Or you can specify which interface _not_ to listen on -except-interface=lo -X -# Or which to listen on by address (remember to include 127.0.0.1 if -# you use this.) -#listen-address= -# If you want dnsmasq to provide only DNS service on an interface, -# configure it as shown above, and then use the following line to -# disable DHCP on it. -#no-dhcp-interface=eth1 -X -# On systems which support it, dnsmasq binds the wildcard address, -# even when it is listening on only some interfaces. It then discards -# requests that it shouldn't reply to. This has the advantage of -# working even when interfaces come and go and change address. If you -# want dnsmasq to really bind only the interfaces it is listening on, -# uncomment this option. About the only time you may need this is when -# running another nameserver on the same machine. -#bind-interfaces -X -# If you don't want dnsmasq to read /etc/hosts, uncomment the -# following line. -#no-hosts -# or if you want it to read another file, as well as /etc/hosts, use -# this. -#addn-hosts=/etc/banner_add_hosts -X -# Set this (and domain: see below) if you want to have a domain -# automatically added to simple names in a hosts-file. -expand-hosts -X -# Set the domain for dnsmasq. this is optional, but if it is set, it -# does the following things. -# 1) Allows DHCP hosts to have fully qualified domain names, as long -# as the domain part matches this setting. -# 2) Sets the "domain" DHCP option thereby potentially setting the -# domain of all systems configured by DHCP -# 3) Provides the domain part for "expand-hosts" -#domain=2.vmops-test.vmops.com -X -# Uncomment this to enable the integrated DHCP server, you need -# to supply the range of addresses available for lease and optionally -# a lease time. If you have more than one network, you will need to -# repeat this for each network on which you want to supply DHCP -# service. -#dhcp-range=10.1.1.1,static -#dhcp-range=10.0.0.1,10.255.255.255 -#dhcp-hostsfile=/etc/dhcphosts.txt -X -# This is an example of a DHCP range where the netmask is given. This -# is needed for networks we reach the dnsmasq DHCP server via a relay -# agent. If you don't know what a DHCP relay agent is, you probably -# don't need to worry about this. -#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h -X -# This is an example of a DHCP range with a network-id, so that -# some DHCP options may be set only for this network. -#dhcp-range=red,192.168.0.50,192.168.0.150 -X -# Supply parameters for specified hosts using DHCP. There are lots -# of valid alternatives, so we will give examples of each. Note that -# IP addresses DO NOT have to be in the range given above, they just -# need to be on the same network. The order of the parameters in these -# do not matter, it's permissble to give name,adddress and MAC in any order -X -# Always allocate the host with ethernet address 11:22:33:44:55:66 -# The IP address 192.168.0.60 -#dhcp-host=11:22:33:44:55:66,192.168.0.60 -X -# Always set the name of the host with hardware address -# 11:22:33:44:55:66 to be "fred" -#dhcp-host=11:22:33:44:55:66,fred -X -# Always give the host with ethernet address 11:22:33:44:55:66 -# the name fred and IP address 192.168.0.60 and lease time 45 minutes -#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m -X -# Give the machine which says it's name is "bert" IP address -# 192.168.0.70 and an infinite lease -#dhcp-host=bert,192.168.0.70,infinite -X -# Always give the host with client identifier 01:02:02:04 -# the IP address 192.168.0.60 -#dhcp-host=id:01:02:02:04,192.168.0.60 -X -# Always give the host with client identifier "marjorie" -# the IP address 192.168.0.60 -#dhcp-host=id:marjorie,192.168.0.60 -X -# Enable the address given for "judge" in /etc/hosts -# to be given to a machine presenting the name "judge" when -# it asks for a DHCP lease. -#dhcp-host=judge -X -# Never offer DHCP service to a machine whose ethernet -# address is 11:22:33:44:55:66 -#dhcp-host=11:22:33:44:55:66,ignore -X -# Ignore any client-id presented by the machine with ethernet -# address 11:22:33:44:55:66. This is useful to prevent a machine -# being treated differently when running under different OS's or -# between PXE boot and OS boot. -#dhcp-host=11:22:33:44:55:66,id:* -X -# Send extra options which are tagged as "red" to -# the machine with ethernet address 11:22:33:44:55:66 -#dhcp-host=11:22:33:44:55:66,net:red -X -# Send extra options which are tagged as "red" to -# any machine with ethernet address starting 11:22:33: -#dhcp-host=11:22:33:*:*:*,net:red -X -# Ignore any clients which are specified in dhcp-host lines -# or /etc/ethers. Equivalent to ISC "deny unkown-clients". -# This relies on the special "known" tag which is set when -# a host is matched. -#dhcp-ignore=#known -X -# Send extra options which are tagged as "red" to any machine whose -# DHCP vendorclass string includes the substring "Linux" -#dhcp-vendorclass=red,Linux -X -# Send extra options which are tagged as "red" to any machine one -# of whose DHCP userclass strings includes the substring "accounts" -#dhcp-userclass=red,accounts -X -# Send extra options which are tagged as "red" to any machine whose -# MAC address matches the pattern. -#dhcp-mac=red,00:60:8C:*:*:* -X -# If this line is uncommented, dnsmasq will read /etc/ethers and act -# on the ethernet-address/IP pairs found there just as if they had -# been given as --dhcp-host options. Useful if you keep -# MAC-address/host mappings there for other purposes. -#read-ethers -X -# Send options to hosts which ask for a DHCP lease. -# See RFC 2132 for details of available options. -# Common options can be given to dnsmasq by name: -# run "dnsmasq --help dhcp" to get a list. -# Note that all the common settings, such as netmask and -# broadcast address, DNS server and default route, are given -# sane defaults by dnsmasq. You very likely will not need -# any dhcp-options. If you use Windows clients and Samba, there -# are some options which are recommended, they are detailed at the -# end of this section. -X -# Override the default route supplied by dnsmasq, which assumes the -# router is the same machine as the one running dnsmasq. -#dhcp-option=3,1.2.3.4 -X -# Do the same thing, but using the option name -#dhcp-option=option:router,1.2.3.4 -X -# Override the default route supplied by dnsmasq and send no default -# route at all. Note that this only works for the options sent by -# default (1, 3, 6, 12, 28) the same line will send a zero-length option -# for all other option numbers. -#dhcp-option=3 -X -# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 -#dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5 -X -# Set the NTP time server address to be the same machine as -# is running dnsmasq -#dhcp-option=42,0.0.0.0 -X -# Set the NIS domain name to "welly" -#dhcp-option=40,welly -X -# Set the default time-to-live to 50 -#dhcp-option=23,50 -X -# Set the "all subnets are local" flag -#dhcp-option=27,1 -X -# Set the domain -dhcp-option=15,"2.vmops-test.vmops.com" -X -# Send the etherboot magic flag and then etherboot options (a string). -#dhcp-option=128,e4:45:74:68:00:00 -#dhcp-option=129,NIC=eepro100 -X -# Specify an option which will only be sent to the "red" network -# (see dhcp-range for the declaration of the "red" network) -# Note that the net: part must precede the option: part. -#dhcp-option = net:red, option:ntp-server, 192.168.1.1 -X -# The following DHCP options set up dnsmasq in the same way as is specified -# for the ISC dhcpcd in -# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt -# adapted for a typical dnsmasq installation where the host running -# dnsmasq is also the host running samba. -# you may want to uncomment them if you use Windows clients and Samba. -#dhcp-option=19,0 # option ip-forwarding off -#dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) -#dhcp-option=45,0.0.0.0 # netbios datagram distribution server -#dhcp-option=46,8 # netbios node type -#dhcp-option=47 # empty netbios scope. -X -# Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client -# probably doesn't support this...... -#dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com -X -# Send RFC-3442 classless static routes (note the netmask encoding) -#dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8 -X -# Send vendor-class specific options encapsulated in DHCP option 43. -# The meaning of the options is defined by the vendor-class so -# options are sent only when the client supplied vendor class -# matches the class given here. (A substring match is OK, so "MSFT" -# matches "MSFT" and "MSFT 5.0"). This example sets the -# mtftp address to 0.0.0.0 for PXEClients. -#dhcp-option=vendor:PXEClient,1,0.0.0.0 -X -# Send microsoft-specific option to tell windows to release the DHCP lease -# when it shuts down. Note the "i" flag, to tell dnsmasq to send the -# value as a four-byte integer - that's what microsoft wants. See -# http://technet2.microsoft.com/WindowsServer/en/library/a70f1bb7-d2d4-49f0-96d6-4b7414ecfaae1033.mspx?mfr=true -dhcp-option=vendor:MSFT,2,1i -X -# Send the Encapsulated-vendor-class ID needed by some configurations of -# Etherboot to allow is to recognise the DHCP server. -#dhcp-option=vendor:Etherboot,60,"Etherboot" -X -# Send options to PXELinux. Note that we need to send the options even -# though they don't appear in the parameter request list, so we need -# to use dhcp-option-force here. -# See http://syslinux.zytor.com/pxe.php#special for details. -# Magic number - needed before anything else is recognised -#dhcp-option-force=208,f1:00:74:7e -# Configuration file name -#dhcp-option-force=209,configs/common -# Path prefix -#dhcp-option-force=210,/tftpboot/pxelinux/files/ -# Reboot time. (Note 'i' to send 32-bit value) -#dhcp-option-force=211,30i -X -# Set the boot filename for BOOTP. You will only need -# this is you want to boot machines over the network and you will need -# a TFTP server; either dnsmasq's built in TFTP server or an -# external one. (See below for how to enable the TFTP server.) -#dhcp-boot=pxelinux.0 -X -# Enable dnsmasq's built-in TFTP server -#enable-tftp -X -# Set the root directory for files availble via FTP. -#tftp-root=/var/ftpd -X -# Make the TFTP server more secure: with this set, only files owned by -# the user dnsmasq is running as will be send over the net. -#tftp-secure -X -# Set the boot file name only when the "red" tag is set. -#dhcp-boot=net:red,pxelinux.red-net -X -# An example of dhcp-boot with an external server: the name and IP -# address of the server are given after the filename. -#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 -X -# Set the limit on DHCP leases, the default is 150 -dhcp-lease-max=2100 -X -# The DHCP server needs somewhere on disk to keep its lease database. -# This defaults to a sane location, but if you want to change it, use -# the line below. -#dhcp-leasefile=/var/lib/misc/dnsmasq.leases -leasefile-ro -X -# Set the DHCP server to authoritative mode. In this mode it will barge in -# and take over the lease for any client which broadcasts on the network, -# whether it has a record of the lease or not. This avoids long timeouts -# when a machine wakes up on a new network. DO NOT enable this if there's -# the slighest chance that you might end up accidentally configuring a DHCP -# server for your campus/company accidentally. The ISC server uses -# the same option, and this URL provides more information: -# http://www.isc.org/index.pl?/sw/dhcp/authoritative.php -#dhcp-authoritative -X -# Run an executable when a DHCP lease is created or destroyed. -# The arguments sent to the script are "add" or "del", -# then the MAC address, the IP address and finally the hostname -# if there is one. -#dhcp-script=/bin/echo -X -# Set the cachesize here. -#cache-size=150 -X -# If you want to disable negative caching, uncomment this. -#no-negcache -X -# Normally responses which come form /etc/hosts and the DHCP lease -# file have Time-To-Live set as zero, which conventionally means -# do not cache further. If you are happy to trade lower load on the -# server for potentially stale date, you can set a time-to-live (in -# seconds) here. -#local-ttl= -X -# If you want dnsmasq to detect attempts by Verisign to send queries -# to unregistered .com and .net hosts to its sitefinder service and -# have dnsmasq instead return the correct NXDOMAIN response, uncomment -# this line. You can add similar lines to do the same for other -# registries which have implemented wildcard A records. -#bogus-nxdomain=64.94.110.11 -X -# If you want to fix up DNS results from upstream servers, use the -# alias option. This only works for IPv4. -# This alias makes a result of 1.2.3.4 appear as 5.6.7.8 -#alias=1.2.3.4,5.6.7.8 -# and this maps 1.2.3.x to 5.6.7.x -#alias=1.2.3.0,5.6.7.0,255.255.255.0 -X -X -# Change these lines if you want dnsmasq to serve MX records. -X -# Return an MX record named "maildomain.com" with target -# servermachine.com and preference 50 -#mx-host=maildomain.com,servermachine.com,50 -X -# Set the default target for MX records created using the localmx option. -#mx-target=servermachine.com -X -# Return an MX record pointing to the mx-target for all local -# machines. -#localmx -X -# Return an MX record pointing to itself for all local machines. -#selfmx -X -# Change the following lines if you want dnsmasq to serve SRV -# records. These are useful if you want to serve ldap requests for -# Active Directory and other windows-originated DNS requests. -# See RFC 2782. -# You may add multiple srv-host lines. -# The fields are ,,,, -# If the domain part if missing from the name (so that is just has the -# service and protocol sections) then the domain given by the domain= -# config option is used. (Note that expand-hosts does not need to be -# set for this to work.) -X -# A SRV record sending LDAP for the example.com domain to -# ldapserver.example.com port 289 -#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389 -X -# A SRV record sending LDAP for the example.com domain to -# ldapserver.example.com port 289 (using domain=) -###domain=example.com -#srv-host=_ldap._tcp,ldapserver.example.com,389 -X -# Two SRV records for LDAP, each with different priorities -#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1 -#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2 -X -# A SRV record indicating that there is no LDAP server for the domain -# example.com -#srv-host=_ldap._tcp.example.com -X -# The following line shows how to make dnsmasq serve an arbitrary PTR -# record. This is useful for DNS-SD. (Note that the -# domain-name expansion done for SRV records _does_not -# occur for PTR records.) -#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services" -X -# Change the following lines to enable dnsmasq to serve TXT records. -# These are used for things like SPF and zeroconf. (Note that the -# domain-name expansion done for SRV records _does_not -# occur for TXT records.) -X -#Example SPF. -#txt-record=example.com,"v=spf1 a -all" -X -#Example zeroconf -#txt-record=_http._tcp.example.com,name=value,paper=A4 -X -X -# For debugging purposes, log each DNS query as it passes through -# dnsmasq. -#log-queries -X -# Log lots of extra information about DHCP transactions. -#log-dhcp -X -log-facility=/var/log/dnsmasq.log -X -# Include a another lot of configuration options. -#conf-file=/etc/dnsmasq.more.conf -conf-dir=/etc/dnsmasq.d -X -dhcp-optsfile=/etc/dhcpopts.txt -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/vpcdnsmasq.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/vpcdnsmasq.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/vpcdnsmasq.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/vpcdnsmasq.conf': 'MD5 check failed' - ) << \SHAR_EOF -0b53d152c88ebce3ee09d8e9c8addd6b cloud_scripts/etc/vpcdnsmasq.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/vpcdnsmasq.conf'` -ne 17942 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/vpcdnsmasq.conf' is not 17942" - fi -fi -# ============= cloud_scripts/etc/ipsec.secrets ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.secrets' -then -${echo} "x - SKIPPING cloud_scripts/etc/ipsec.secrets (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/ipsec.secrets (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.secrets' && -include /var/lib/strongswan/ipsec.conf.inc -include /etc/ipsec.d/ipsec.*.secrets -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.secrets' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/ipsec.secrets' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/ipsec.secrets failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.secrets': 'MD5 check failed' - ) << \SHAR_EOF -7ab0bddd5ec64ebda91cf3c5262fef2d cloud_scripts/etc/ipsec.secrets -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.secrets'` -ne 80 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.secrets' is not 80" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/dnsmasq ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/dnsmasq' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/dnsmasq (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/dnsmasq (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/dnsmasq' && -/var/log/dnsmasq.log { -X maxsize 10M -X missingok -X rotate 5 -X notifempty -X delaycompress -X sharedscripts -X postrotate -X [ ! -f /var/run/dnsmasq/dnsmasq.pid ] || kill -USR2 `cat /var/run/dnsmasq/dnsmasq.pid` -X endscript -X create 0640 dnsmasq root -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/dnsmasq' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/dnsmasq' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/dnsmasq failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/dnsmasq': 'MD5 check failed' - ) << \SHAR_EOF -e42458bd875605d1cd625f0596b38d4c cloud_scripts/etc/logrotate.d/dnsmasq -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/dnsmasq'` -ne 272 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/dnsmasq' is not 272" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/cloud ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/cloud' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/cloud (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/cloud (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/cloud' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -/var/log/cloud.log { -X rotate 10 -X maxsize 10M -X missingok -X notifempty -X compress -X # CLOUDSTACK-9155: We cannot tell the processes that are writing to this -X # file to use the new inode, so instead we copy the original file, truncate -X # it and keep the same inode. -X copytruncate -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/cloud' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/cloud' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/cloud failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/cloud': 'MD5 check failed' - ) << \SHAR_EOF -f83a4d4cf36adb81699ac5892bf6c6f5 cloud_scripts/etc/logrotate.d/cloud -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/cloud'` -ne 1124 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/cloud' is not 1124" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/conntrackd ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/conntrackd' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/conntrackd (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/conntrackd (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/conntrackd' && -/var/log/conntrackd-stats.log { -X maxsize 10M -X rotate 2 -X missingok -X compress -X delaycompress -X -X postrotate -X if [ -e /var/run/conntrackd.sock ]; then -X /usr/sbin/invoke-rc.d conntrackd restart > /dev/null -X fi -X endscript -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/conntrackd' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/conntrackd' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/conntrackd failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/conntrackd': 'MD5 check failed' - ) << \SHAR_EOF -334d9dd543fcb9c8682b4b8fc3987c4c cloud_scripts/etc/logrotate.d/conntrackd -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/conntrackd'` -ne 263 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/conntrackd' is not 263" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/monitor ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/monitor' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/monitor (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/monitor (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/monitor' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -/var/log/monitor.log { -X rotate 5 -X maxsize 10M -X missingok -X notifempty -X compress -X copytruncate -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/monitor' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/monitor' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/monitor failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/monitor': 'MD5 check failed' - ) << \SHAR_EOF -dbf4af64f49d5ffbf4a725cca714ccd0 cloud_scripts/etc/logrotate.d/monitor -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/monitor'` -ne 922 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/monitor' is not 922" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/routerServiceMonitor ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/routerServiceMonitor (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/routerServiceMonitor (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -/var/log/routerServiceMonitor.log { -X rotate 5 -X maxsize 10M -X missingok -X notifempty -X compress -X copytruncate -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/routerServiceMonitor failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/routerServiceMonitor': 'MD5 check failed' - ) << \SHAR_EOF -0f7968ad2bdbb870fa6a7f55565003c1 cloud_scripts/etc/logrotate.d/routerServiceMonitor -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/routerServiceMonitor'` -ne 935 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' is not 935" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/ppp ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/ppp' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/ppp (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/ppp (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/ppp' && -/var/log/ppp-connect-errors { -X maxsize 10M -X rotate 5 -X missingok -X notifempty -X compress -X nocreate -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/ppp' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/ppp' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/ppp failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/ppp': 'MD5 check failed' - ) << \SHAR_EOF -7d16a52cb372773845f812e51f52318f cloud_scripts/etc/logrotate.d/ppp -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/ppp'` -ne 98 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/ppp' is not 98" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/apache2 ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/apache2' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/apache2 (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/apache2 (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/apache2' && -/var/log/apache2/*.log { -X missingok -X copytruncate -X rotate 3 -X compress -X dateext -X maxsize 10M -X notifempty -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/apache2' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/apache2' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/apache2 failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/apache2': 'MD5 check failed' - ) << \SHAR_EOF -eefd54e0be665bd8a76a7aebee89d6d5 cloud_scripts/etc/logrotate.d/apache2 -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/apache2'` -ne 148 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/apache2' is not 148" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/rsyslog ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/rsyslog' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/rsyslog (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/rsyslog (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/rsyslog' && -/var/log/syslog -{ -X rotate 7 -X maxsize 10M -X missingok -X notifempty -X compress -X postrotate -X /usr/sbin/invoke-rc.d rsyslog rotate > /dev/null -X endscript -} -X -/var/log/mail.info -/var/log/mail.warn -/var/log/mail.err -/var/log/mail.log -/var/log/daemon.log -/var/log/kern.log -/var/log/auth.log -/var/log/user.log -/var/log/lpr.log -/var/log/cron.log -/var/log/debug -/var/log/messages -{ -X rotate 10 -X maxsize 10M -X missingok -X notifempty -X compress -X sharedscripts -X postrotate -X /usr/sbin/invoke-rc.d rsyslog rotate > /dev/null -X endscript -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/rsyslog' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/rsyslog' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/rsyslog failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/rsyslog': 'MD5 check failed' - ) << \SHAR_EOF -b4409ff800ad8ac42c79f412d6b90094 cloud_scripts/etc/logrotate.d/rsyslog -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/rsyslog'` -ne 517 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/rsyslog' is not 517" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/haproxy ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/haproxy' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/haproxy (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/haproxy (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/haproxy' && -/var/log/haproxy.log { -X rotate 5 -X missingok -X notifempty -X maxsize 10M -X postrotate -X /bin/kill -HUP `cat /var/run/rsyslog.pid 2> /dev/null` 2> /dev/null || true -X endscript -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/haproxy' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/haproxy' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/haproxy failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/haproxy': 'MD5 check failed' - ) << \SHAR_EOF -e584fdf0d2a25578f651fccce265ff09 cloud_scripts/etc/logrotate.d/haproxy -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/haproxy'` -ne 194 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/haproxy' is not 194" - fi -fi -# ============= cloud_scripts/etc/profile.d/cloud.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/profile.d/cloud.sh' -then -${echo} "x - SKIPPING cloud_scripts/etc/profile.d/cloud.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/profile.d/cloud.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/profile.d/cloud.sh' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -if [ "`id -u`" -eq 0 ]; then -X PATH=${PATH}:/opt/cloud/bin -fi -export PATH -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/profile.d/cloud.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/profile.d/cloud.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/profile.d/cloud.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/profile.d/cloud.sh': 'MD5 check failed' - ) << \SHAR_EOF -78e5d1f4d852b0af96f8b2efa5245c86 cloud_scripts/etc/profile.d/cloud.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/profile.d/cloud.sh'` -ne 861 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/profile.d/cloud.sh' is not 861" - fi -fi -# ============= cloud_scripts/etc/cloud-nic.rules ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cloud-nic.rules' -then -${echo} "x - SKIPPING cloud_scripts/etc/cloud-nic.rules (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/cloud-nic.rules (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cloud-nic.rules' && -SUBSYSTEM=="net" KERNEL=="eth*" RUN+="/opt/cloud/bin/cloud-nic.sh $env{ACTION} %k" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cloud-nic.rules' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/cloud-nic.rules' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/cloud-nic.rules failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cloud-nic.rules': 'MD5 check failed' - ) << \SHAR_EOF -4ffd506afaa6a69a55ba9ab6bbf706f5 cloud_scripts/etc/cloud-nic.rules -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/cloud-nic.rules'` -ne 83 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/cloud-nic.rules' is not 83" - fi -fi -# ============= cloud_scripts/etc/haproxy/haproxy.cfg ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/haproxy/haproxy.cfg' -then -${echo} "x - SKIPPING cloud_scripts/etc/haproxy/haproxy.cfg (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/haproxy/haproxy.cfg (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/haproxy/haproxy.cfg' && -global -X log 127.0.0.1:3914 local0 info -X chroot /var/lib/haproxy -X user haproxy -X group haproxy -X daemon -X -defaults -X log global -X mode tcp -X option dontlognull -X retries 3 -X option redispatch -X option forwardfor -X stats enable -X stats uri /admin?stats -X stats realm Haproxy\ Statistics -X stats auth admin1:AdMiN123 -X option forceclose -X timeout connect 5000 -X timeout client 50000 -X timeout server 50000 -X -X -listen cloud-default -X bind 0.0.0.0:35999 -X option transparent -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/haproxy/haproxy.cfg' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/haproxy/haproxy.cfg' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/haproxy/haproxy.cfg failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/haproxy/haproxy.cfg': 'MD5 check failed' - ) << \SHAR_EOF -a554fcecbaff9747723f9cd3aedf1ffd cloud_scripts/etc/haproxy/haproxy.cfg -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/haproxy/haproxy.cfg'` -ne 483 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/haproxy/haproxy.cfg' is not 483" - fi -fi -# ============= cloud_scripts/usr/share/cloud/cloud-scripts.tar ============== -if test ! -d 'cloud_scripts/usr/share/cloud'; then - mkdir 'cloud_scripts/usr/share/cloud' -if test $? -eq 0 -then ${echo} "x - created directory cloud_scripts/usr/share/cloud." -else ${echo} "x - failed to create directory cloud_scripts/usr/share/cloud." - exit 1 -fi -fi -if test -n "${keep_file}" && test -f 'cloud_scripts/usr/share/cloud/cloud-scripts.tar' -then -${echo} "x - SKIPPING cloud_scripts/usr/share/cloud/cloud-scripts.tar (file already exists)" - -else -${echo} "x - extracting cloud_scripts/usr/share/cloud/cloud-scripts.tar (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/usr/share/cloud/cloud-scripts.tar -M971C+P`````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````#`P,#`W-34`,#`P,37-T96U-87A& -M:6QE4VEZ93TQ,$T*4G5N=&EM94UA>%5S93TR,$T*```````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````971C+W-Y7-T -M96TO:'EP97)V+61A96UO;G,N:'8M=G-S+61A96UO;BYS97)V:6-E```````` -M````````````````````````````````````````````````````,#`P,#8T -M-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,S0`,3,V,C4Q-3`S,30`,#(S -M,37!E2!S97)V:6-E("A64U,I(&1A96UO;@H*6U-E&5C4W1A3UM=6QT:2UU7-T96UD+W-Y2UC;VYF -M:63TO=7-R+VQO8V%L+V-L;W5D+W-Y7-T96TO;W!E;BUV;2UT;V]L3UM=6QT:2UU3UM=6QT:2UU7-T96UD+W-Y&5N+FUO=6YT"D)E9F]R93UN971W;W)K+G1A2UC;VYF:6&5C4W1A&5C4W1A3UM=6QT:2UU7-T96TO:'EP97)V+61A96UO;G,N:'8M -M9F-O<'DM9&%E;6]N+G-E7!E2!S97)V:6-E("A&0T]062D@9&%E;6]N"D-O -M;F1I=&EO;E!A=&A%>&ES=',]+V1E=B]V;6)U0H*6U-E3UM=6QT:2UU7-T96TO8VQO=60M -M<&]S=&EN:70N2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N0`````````````````````````````````````````````` -M`````````````````````````````````````````#`P,#`V-#0`,#`P,36]U(&UA>2!N;W0@=7-E -M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI -M8V5N7!E(#$S("UJ($123U`*+4$@24Y0550@+7`@:6-M<"`M:B!!0T-%4%0* -M+4$@24Y0550@+6D@971H,2`M<"!T8W`@+6T@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* -M(R`@(&AT='`Z+R]W=W7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E -M<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H -M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N -M2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H -M92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R -M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T -M"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7-C=&P@8V]N9FEG=7)A -M=&EO;B!F:6QE"B,*(R!&;W(@8FEN87)Y('9A;'5E7-C=&PN -M8V]N9B@U*2!F;W(@;6]R92!D971A:6QS+@HC($!615)324].0`H*(R!#;VYT -M2!T:&5R -M96)Y(')E9'5C:6YG('1H92!S:7IE(&]F(&1I&PR='!D+WAL -M,G1P9"YC;VYF```````````````````````````````````````````````` -M````````````````````````````````````````````````````````,#`P -M,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,3,`,3,U-C$W,C4Q-3(` -M,#$T-#4U`"`P```````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````'5S=&%R("``9&%R65S"G!P<&]P=&9I;&4@/2`@("`O971C+W!P<"]O<'1I;VYS -M+GAL,G1P9`H````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````971C+V1N2!D:7-A8FQE -MF5N+"!S:6YC92!T:&5Y"B,@=&5L;"!D -M;G-M87-Q('1O(&9I;'1E2X@268@>6]U(&AA=F4@82!D:6%L+6]N+61E;6%N9"!L:6YK('1H97D@ -M86QS;R!S=&]P"B,@=&AE6]U('=A;G0@9&YS('1O(&=E="!I=',@=7!S=')E86T@2`@(&%P<&5A2!O=&AE<@HC(&9I -M;&4L(&=E='1I;F<@:71S('-E2!O;@HC('-P96-I9FEE9"!I;G1E -M&-E<'0M:6YT97)F86-E/65T:#$*97AC97!T+6EN -M=&5R9F%C93UE=&@R"F5X8V5P="UI;G1E6]U('=A;G0@9&YS;6%S<2!T;R!P6]U"B,@=V%N="!D;G-M -M87-Q('1O(')E86QL>2!B:6YD(&]N;'D@=&AE(&EN=&5R9F%C97,@:70@:7,@ -M;&ES=&5N:6YG(&]N+`HC('5N8V]M;65N="!T:&ES(&]P=&EO;BX@06)O=70@ -M=&AE(&]N;'D@=&EM92!Y;W4@;6%Y(&YE960@=&AI6]U('=A;G0@=&\@ -M:&%V92!A(&1O;6%I;@HC(&%U=&]M871I8V%L;'D@861D960@=&\@2!Q=6%L:69I -M960@9&]M86EN(&YA;65S+"!A7-T96US(&-O;F9I9W5R960@8GD@ -M1$A#4`HC(#,I(%!R;W9I9&5S('1H92!D;VUA:6X@<&%R="!F;W(@(F5X<&%N -M9"UH;W-T7,N;W)G+G5K+#$Y,BXQ-C@N,BXP -M+S(T"@HC(%-A;64@:61E82P@8G5T(')A;F=E(')A=&AE7,N;W)G+G5K+#$Y,BXV."XS -M+C$P,"PQ.3(N,38X+C,N,C`P"@HC(%5N8V]M;65N="!T:&ES('1O(&5N86)L -M92!T:&4@:6YT96=R871E9"!$2$-0('-E6]U(&YE960*(R!T;R!S -M=7!P;'D@=&AE(')A;F=E(&]F(&%D9')E2!$2$-0"B,@2!B92!S970@;VYL>2!F;W(@=&AI2!W:&5N('1H92!T86<@(F=R965N -M(B!I2!A('-U8FYE="!W:&EC:"!C -M86XG="!B92!U6YA;6EC(&%D9')E2!A;F0*(R!A9&0@;F%M97,@=&\@=&AE($1.4R!F;W(@=&AE($E0 -M=C8@861D2P@-#AH"@HC($1O($1(0U`@86YD(%)O=71E2!W:6QL('5S -M92!33$%!0R!F;W(@861D2!R82US=&%T96QE2!J -M=7-T"B,@;F5E9"!T;R!B92!O;B!T:&4@7,@9VEV92!T:&4@:&]S="!W:71H($5T -M:&5R;F5T(&%D9')E7,@9VEV92!T:&4@:&]S="!W -M:71H(&-L:65N="!I9&5N=&EF:65R(#`Q.C`R.C`R.C`T"B,@=&AE($E0(&%D -M9')E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ -M(G)E9"(@=&\*(R!T:&4@;6%C:&EN92!W:71H($5T:&5R;F5T(&%D9')E&5D($E0=C8@861D2!;72!A2X*(V1H8W`M:&]S=#UI9#HP,#HP,3HP -M,#HP,3HQ-CID,CHX,SIF8SHY,CID-#HQ.3IE,CID.#IB,BP@9G)E9"P@6S$R -M,S0Z.C5="@HC($EG;F]R92!A;GD@8VQI96YT2!M86-H:6YE('=H;W-E"B,@1$A#4"!V96YD;W)C;&%S -M'1R82!O<'1I -M;VYS('=H:6-H(&%R92!T86=G960@87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@ -M;VYE"B,@;V8@=VAO'1R82!O<'1I;VYS('=H:6-H(&%R -M92!T86=G960@87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO2!D;G-M -M87-Q(&%N9"!S96YD(&YO(&1E9F%U;'0*(R!R;W5T92!A="!A;&PN($YO=&4@ -M=&AA="!T:&ES(&]N;'D@=V]R:W,@9F]R('1H92!O<'1I;VYS('-E;G0@8GD* -M(R!D969A=6QT("@Q+"`S+"`V+"`Q,BP@,C@I('1H92!S86UE(&QI;F4@=VEL -M;"!S96YD(&$@>F5R;RUL96YG=&@@;W!T:6]N"B,@9F]R(&%L;"!O=&AE0H*(R!3970@=&AE(&1E9F%U;'0@=&EM92UT;RUL:79E -M('1O(#4P"B-D:&-P+6]P=&EO;CTR,RPU,`H*(R!3970@=&AE(")A;&P@2!A;B!O<'1I;VX@=VAI8V@@=VEL;"!O;FQY -M(&)E('-E;G0@=&\@=&AE(")R960B(&YE='=O2!A6]U -M(&UA>2!W86YT('1O('5N8V]M;65N="!S;VUE(&]R(&%L;"!O9B!T:&5M(&EF -M('EO=2!U7!E"@HC(%-E;F0@86X@96UP='D@5U!! -M1"!O<'1I;VXN(%1H:7,@;6%Y(&)E(%)%455)4D5$('1O(&=E="!W:6YD;W=S -M(#<@=&\@8F5H879E+@HC9&AC<"UO<'1I;VX],C4R+")<;B(*"B,@4V5N9"!2 -M1D,M,S,Y-R!$3E,@9&]M86EN('-E87)C:"!$2$-0(&]P=&EO;BX@5T%23DE. -M1SH@66]U71H:6YG(&5L&4@=&%G(&9O2YK<'AE"B-D:&-P+6)O;W0];7EB;V]T:6UA9V4*"B,@16YC87!S -M=6QA=&5D(&]P=&EO;G,@9F]R($5T:&5R8F]O="!G4%A%+B!!;&P@=&AE(&]P -M=&EO;G,@87)E"B,@96YC87!S=6QA=&5D('=I=&AI;B!O<'1I;VX@,32!C;V1E"B-D:&-P+6]P=&EO;CUE;F-A<#HQ-S4L(#$W-BP@,6(@("`@("`@ -M(R!N;RUP61H8W`*(V1H8W`M;W!T:6]N/65N8V%P.C$W-2P@,3#@V+3,R"B-D:&-P+6UA=&-H/6ET86YI8W,L(&]P=&EO;CIC;&EE;G0M87)C -M:"P@,B`C24$V-`HC9&AC<"UM871C:#UH86UM97)S+"!O<'1I;VXZ8VQI96YT -M+6%R8V@L(#8@(W@X-BTV-`HC9&AC<"UM871C:#UM86-T96QS+"!O<'1I;VXZ -M8VQI96YT+6%R8V@L(#<@(T5&22!X.#8M-C0*"B,@1&\@&4M<')O;7!T/2)0#@V4$,L("));G-T86QL($QI;G5X(BP@<'AE;&EN=7@*"B,@3&]A -M9',@/'1F='`M#@V4$,L("));G-T86QL($QI;G5X(BP@<'AE;&EN -M=7@L(#$N,BXS+C0*"B,@57-E(&)O;W1S97)V97(@;VX@;F5T=V]R:RP@9F]U -M;F0@;7D@;75L=&EC87-T(&]R(&)R;V%D8V%S="X*(W!X92US97)V:6-E/7@X -M-E!#+"`B26YS=&%L;"!W:6YD;W=S(&9R;VT@4DE3('-E#@V4$,L("));G-T86QL('=I;F1O=W,@9G)O;2!225,@2!F:6QE0HC('1H92!U&%M<&QE(&]F(&1H8W`M8F]O="!W:71H(&%N(&5X=&5R;F%L(%1& -M5%`@2`M+7!X92US97)V -M:6-E+@HC9&AC<"UB;V]T/2]V87(O9G1P9"]P>&5L:6YU>"XP+&)O;W1H;W-T -M+#$Y,BXQ-C@N,"XS"@HC($EF('1H97)E(&%R92!M=6QT:7!L92!E>'1E#TR,3`P"@HC(%1H92!$2$-0('-E6]U(&UI9VAT(&5N9"!U<"!A8V-I9&5N=&%L -M;'D@8V]N9FEG=7)I;F<@82!$2$-0"B,@2X@5&AE($E30R!S97)V97(@=7-E&5C=71A8FQE -M('=H96X@82!$2$-0(&QE87-E(&ES(&-R96%T960@;W(@9&5S=')O>65D+@HC -M(%1H92!A`HC86QI87,],2XR+C,N -M,"PU+C8N-RXP+#(U-2XR-34N,C4U+C`*(R!A;F0@=&AI"UT87)G970@9F]R(&%L;"!L;V-A;`HC(&UA8VAI;F5S+@HC;&]C86QM>`H* -M(R!2971U6]U('=A;G0@=&\@ -M3XL/'=E:6=H=#X*(R!)9B!T:&4@9&]M86EN('!A&%M<&QE+F-O;2!D;VUA:6X@=&\* -M(R!L9&%P&%M -M<&QE+F-O;2!D;VUA:6X@=&\*(R!L9&%P&%M<&QE+F-O;2PS -M.#DL,@H*(R!!(%-25B!R96-O'!A;G-I;VX@ -M9&]N92!F;W(@4U)6(')E8V]R9',@7V1O97-?;F]T"B,@;V-C=7(@9F]R(%!4 -M4B!R96-O'!A;G-I;VX@9&]N92!F;W(@4U)6 -M(')E8V]R9',@7V1O97-?;F]T"B,@;V-C=7(@9F]R(%185"!R96-O&%M<&QE(%-01BX*(W1X="UR96-O5\@=V]R:W,*(R!F;W(@=&%R9V5T3TO=F%R -M+VQO9R]D;G-M87-Q+FQO9PH*(R!);F-L=61E(&$@86YO=&AE'0*```````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````````971C+V-R;VXN9&%I -M;'DO```````````````````````````````````````````````````````` -M`````````````````````````````````````````````````````````#`P -M,#`W-34`,#`P,32]C;&5A2!C86-H92!T;R!U;'1I;6%T96QY(')E9'5C92!S=V%P<&EN9PH*7,O=FTO9')O<%]C86-H97,*```````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````````````````971C+W9M -M=V%R92UT;V]LF4@:V5P=#H@,2!-0@IV;7-V8RYM -M87A,;V=3:7IE(#T@,0H*(R!$969I;F5S('1H92`B=FUT;V]L"!S:7IE(#4P30IS:7IE(#4P30IC;VUP0HC3&ES=&5N061D7,@9F]R('!R;W1O8V]L('9E2`O971C+W-S:"]SF4@;V8@97!H -M96UE7-L;V=& -M86-I;&ET>2!!551("E-Y65S"D%U=&AO7,@:6X@+V5T8R]S65S(&EF('EO=2!D;VXG="!T'0@<&%S65S"D=34T%024-L96%N=7!#65S"@HC($%C8V5P="!L;V-A;&4M4]F9G-E="`Q,`HC6#$Q57-E3&]C86QH;W-T -M('EE65S"B-5&PR='!D```````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````,#`P,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,34`,3,U -M-C$W,C4Q-3(`,#$T-C`W`"`P```````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````'5S=&%R("``9&%R6]U('=A;G0@=&\@=7-E(&$@9&EF9F5R -M96YT(&EN=&5R9F%C92!O6]U(&EN2!F2!)4"!A9&1R97-S+`H@("`@("`@(",@>6]U(&-A;B!U7-L;V'-O8VL@(R!P7-T96T@;&]G9VEN9PHD36]D3&]A9"!I;6ML;V<@ -M("`C('!R;W9I9&5S(&ME2!R:VQO9V0I"B,D36]D3&]A9"!I;6UA7-L;V<@7-T96TN("!3<&QI="!I="!U<"!S;R!T:&%T"B,@:70@:7,@96%S>2!T -M;R!W2YL;V<* -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````````````````&5T8R]M;V1P -M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@ -M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2!C86-H92!T -M;R!U;'1I;6%T96QY(')E9'5C92!S=V%P<&EN9PH*<&AY;65M/20H9G)E97QA -M=VL@)R]>365M.B][<')I;G0@)#)])RD*:68@6R`D<&AY;65M("UL="`U,3,P -M,#`@73L@=&AE;@H@('-Y;F,@)B8@96-H;R`Q(#X@+W!R;V,O2YC;VYF```````````````````````````````````````````````` -M```````````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P -M,3$-O;FYE8W1I -M;VYS4&5R0VAI;&0@("`),3`P,`H\+TEF36]D=6QE/@H*(R!V:6TZ('-Y;G1A -M>#UA<&%C:&4@=',]-"!S=STT('-T6U,:6YK&5S($9O;&QO=U-Y;4QI;FMS($UU;'1I5FEE=W,*"0E!;&QO=T]V97)R:61E -M($%L;`H)"4]R9&5R(&%L;&]W+&1E;GD*"0EA;&QO=R!F&5C0T=)("U-=6QT:59I97=S -M("M3>6U,:6YK2QA;&QO=PH@("`@("`@($1E;GD@9G)O -M;2!A;&P*("`@("`@("!!;&QO=R!F3X*"3Q$:7)E8W1O0H)"6%L;&]W(&9R;VT@86QL"@D\+T1I3X*"@E38W)I -M<'1!;&EA0H)"4%L;&]W(&9R;VT@86QL"@D\ -M+T1I3X*"@E%T%004-(15],3T=?1$E2?2]ET%004-(15],3T=?1$E2 -M?2]S2QA;&QO=PH)"41E;GD@ -M9G)O;2!A;&P*"0E!;&QO=R!F2!T -M:&4*"2,@("!34TQ#97)T:69I8V%T949I;&4@9&ER96-T:79E(&ES(&YE961E -M9"X*"5-33$-E0H*"2,@("!397)V -M97(@0V5R=&EF:6-A=&4@0VAA:6XZ"@DC("`@4&]I;G0@4U-,0V5R=&EF:6-A -M=&5#:&%I;D9I;&4@870@82!F:6QE(&-O;G1A:6YI;F<@=&AE"@DC("`@8V]N -M8V%T96YA=&EO;B!O9B!014T@96YC;V1E9"!#02!C97)T:69I8V%T97,@=VAI -M8V@@9F]R;2!T:&4*"2,@("!C97)T:69I8V%T92!C:&%I;B!F;W(@=&AE('-E -M0H)(R`@('1H92!R969E -M2`H0T$I.@H)(R`@(%-E="!T:&4@0T$@8V5R=&EF:6-A -M=&4@=F5R:69I8V%T:6]N('!A=&@@=VAE6]U(&YE960@:&%S:"!S>6UL -M:6YK6UL:6YK7!E*3H* -M"2,@("!#;&EE;G0@8V5R=&EF:6-A=&4@=F5R:69I8V%T:6]N('1Y<&4@86YD -M(&1E<'1H+B`@5'EP97,@87)E"@DC("`@;F]N92P@;W!T:6]N86PL(')E<75I -M2!T;R!V97)I9GD@=&AE(&-E -M4-L:65N -M="!R97%U:7)E"@DC4U-,5F5R:69Y1&5P=&@@(#$P"@H)(R`@($%C8V5S6YT87@@:7,@80H)(R`@(&UI>'1UU-33%]#25!(15)]("%^(&TO7BA%6%!\3E5,3"DO(%P* -M"2,@("`@("`@("`@("!A;F0@)7M34TQ?0TQ)14Y47U-?1$Y?3WT@97$@(E-N -M86ME($]I;"P@3'1D+B(@7`H)(R`@("`@("`@("`@(&%N9"`E>U-33%]#3$E% -M3E1?4U]$3E]/57T@:6X@>R)3=&%F9B(L(")#02(L(")$978B?2!<"@DC("`@ -M("`@("`@("`@86YD("5[5$E-15]71$%9?2`^/2`Q(&%N9"`E>U1)345?5T1! -M67T@/#T@-2!<"@DC("`@("`@("`@("`@86YD("5[5$E-15](3U52?2`^/2`X -M(&%N9"`E>U1)345?2$]54GT@/#T@,C`@("`@("`@*2!<"@DC("`@("`@("`@ -M("!OU)%34]415]!1$12?2`]?B!M+UXQ.3)<+C2!E>&ES=&EN9R!W:&5N(&-L -M:65N=`H)(R`@("`@875T:&5N=&EC871I;VX@:7,@=7-E9"DN(%1H:7,@8V%N -M(&)E('5S960@=&\@:6UP;W)T('1H92!C97)T:69I8V%T97,*"2,@("`@(&EN -M=&\@0T=)('-C'!O'!E;G-I=F4@;W!E2!E;F%B;&5S('1H90H)(R`@("`@97AP;W)T871I;VX@9F]R -M($-'22!A;F0@4U-)(')E<75E'!O2`O=7-R+VQI8B]C9VDM8FEN/@H)"5-33$]P=&EO;G,@*U-T -M9$5N=E9A6]U(&-A;B!U6]U(')E8V5I=F4@ -M22]/(&5R2!A;&5R="!I2!F;W(@8G)O=W-E6]U(&MN;W<@=&AA="!T:&5I2X*"2,@("!. -M;W1I8V4Z($UO2!W86YT('1O(&1I2P@;VYE(&AA6]U(&IU2!A;'-O"B,@:&%V92!T;R!C -M:&%N9V4@=&AE(%9I6]U(&AA=F4@=7!GB!A;F0*(R!214%$ -M344N1&5B:6%N+F=Z"@I,:7-T96X@,3`N,2XQ+C$Z.#$X,`H*/$EF36]D=6QE -M(&UO9%]S0HC('1E;&P@ -M9&YS;6%S<2!T;R!F:6QT97(@;W5T('%U97)I97,@=VAI8V@@=&AE('!U8FQI -M8R!$3E,@8V%N;F]T"B,@86YS=V5R+"!A;F0@=VAI8V@@;&]A9"!T:&4@2!T:&4@2X*"B,@3F5V97(@9F]R=V%R9"!P;&%I -M;B!N86UE2X*(R!.;W1E('1H870@*&%M;VYG2!O9B!T:&4@=7!S=')E86T*(R!S97)V97)S(&ET(&MN -M;W=S(&%B;W5T(&%N9"!T2!E86-H('%U97)Y"B,@=VET:"`@96%C:"`@2`@:6X@('1H92`@;W)D97(@('1H97D@("!A<'!E87(@ -M("!I;@HC("]E=&,O2!A&%M<&QE(&]F(')O=71I;F<@4%12('%U97)I97,@=&\@ -M;F%M97-E2!D;VUA:6YS(&AE6]U('=A;G0@=&\@9F]R8V4@=&\@86X@ -M25`@861D&%M<&QE(&)E;&]W('-E;F0@86YY -M(&AO6]U('=A;G0@ -M9&YS;6%S<2!T;R!L:7-T96X@9F]R($1(0U`@86YD($1.4R!R97%U97-T&-E<'0M -M:6YT97)F86-E/6QO"@HC($]R('=H:6-H('1O(&QI2!A9&1R -M97-S("AR96UE;6)E2!$3E,@7-T96US('=H:6-H -M('-U<'!O6]U(&UA>2!N965D('1H:7,@:7,@=VAE;@HC(')U;FYI;F<@ -M86YO=&AE6]U(&1O;B=T('=A;G0@9&YS;6%S<2!T;R!R -M96%D("]E=&,O:&]S=',L('5N8V]M;65N="!T:&4*(R!F;VQL;W=I;F<@;&EN -M92X*(VYO+6AO6]U('=A;G0@:70@=&\@2!P;W1E;G1I86QL>2!S971T:6YG('1H90HC -M("`@(&1O;6%I;B!O9B!A;&P@'!A;F0M:&]S -M=',B"B-D;VUA:6X],BYV;6]P0HC(&$@;&5A6]U(&AA=F4@;6]R92!T:&%N(&]N92!N971W;W)K+"!Y;W4@ -M=VEL;"!N965D('1O"B,@2!P87)A;65T97)S(&9O&%M<&QE -M7,@7,@:70G -M2!T -M:&4@;6%C:&EN92!W:71H(&5T:&5R;F5T"B,@861D'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ -M(G)E9"(@=&\*(R!A;GD@;6%C:&EN92!W:71H(&5T:&5R;F5T(&%D9')E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ -M(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO"(*(V1H8W`M -M=F5N9&]R8VQA2!M86-H:6YE(&]N90HC -M(&]F('=H;W-E($1(0U`@=7-E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@ -M87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO2!N86UE.@HC(')U;B`B9&YS;6%S<2`M+6AE;'`@9&AC<"(@=&\@9V5T -M(&$@;&ES="X*(R!.;W1E('1H870@86QL('1H92!C;VUM;VX@2!D;G-M87-Q+B!9;W4@=F5R>2!L:6ME;'D@=VEL;"!N;W0@ -M;F5E9`HC(&%N>2!D:&-P+6]P=&EO;G,N($EF('EO=2!U2!A2!W;W)K0HC(&1E9F%U;'0@*#$L -M(#,L(#8L(#$R+"`R."D@=&AE('-A;64@;&EN92!W:6QL('-E;F0@82!Z97)O -M+6QE;F=T:"!O<'1I;VX*(R!F;W(@86QL(&]T:&5R(&]P=&EO;B!N=6UB97)S -M+@HC9&AC<"UO<'1I;VX],PH*(R!3970@=&AE($Y44"!T:6UE('-E0H*(R!3970@=&AE(&1E -M9F%U;'0@=&EM92UT;RUL:79E('1O(#4P"B-D:&-P+6]P=&EO;CTR,RPU,`H* -M(R!3970@=&AE(")A;&P@2!A;B!O<'1I -M;VX@=VAI8V@@=VEL;"!O;FQY(&)E('-E;G0@=&\@=&AE(")R960B(&YE='=O -M2!A6]U(&UA>2!W86YT('1O('5N8V]M;65N="!T:&5M -M(&EF('EO=2!U2!N971B:6]S('-C;W!E+@H*(R!396YD(%)&0RTS -M,SDW($1.4R!D;VUA:6X@2!W:&5N('1H92!C;&EE;G0@71E(&EN=&5G97(@+2!T:&%T)W,@=VAA="!M:6-R;W-O9G0@=V%N -M=',N(%-E90HC(&AT='`Z+R]T96-H;F5T,BYM:6-R;W-O9G0N8V]M+U=I;F1O -M=W-397)V97(O96XO;&EB2]A-S!F,6)B-RUD,F0T+30Y9C`M.39D-BTT -M8C2!S;VUE(&-O;F9I9W5R871I;VYS(&]F"B,@ -M171H97)B;V]T('1O(&%L;&]W(&ES('1O(')E8V]G;FES92!T:&4@1$A#4"!S -M97)V97(N"B-D:&-P+6]P=&EO;CUV96YD;W(Z171H97)B;V]T+#8P+")%=&AE -M"X@3F]T92!T:&%T -M('=E(&YE960@=&\@2!N965D"B,@=&AI2!F:6QE0HC('1H92!U&5L:6YU>"YR -M960M;F5T"@HC($%N(&5X86UP;&4@;V8@9&AC<"UB;V]T('=I=&@@86X@97AT -M97)N86P@2!C;&EE -M;G0@=VAI8V@@8G)O861C87-T6]U(&UI9VAT(&5N9"!U -M<"!A8V-I9&5N=&%L;'D@8V]N9FEG=7)I;F<@82!$2$-0"B,@2X@5&AE($E30R!S -M97)V97(@=7-E2!T:&4@:&]S=&YA;64*(R!I9B!T:&5R92!IF4@:&5R92X*(V-A8VAE -M+7-I>F4],34P"@HC($EF('EO=2!W86YT('1O(&1I2!R97-P;VYS97,@=VAI8V@@8V]M92!F;W)M("]E=&,O:&]S=',@86YD -M('1H92!$2$-0(&QE87-E"B,@9FEL92!H879E(%1I;64M5&\M3&EV92!S970@ -M87,@>F5R;RP@=VAI8V@@8V]N=F5N=&EO;F%L;'D@;65A;G,*(R!D;R!N;W0@ -M8V%C:&4@9G5R=&AE6]U(&%R92!H87!P>2!T;R!T6]U(&-A;B!S970@82!T:6UE+71O+6QI=F4@*&EN"B,@6]U('=A;G0@9&YS;6%S<2!T -M;R!D971E8W0@871T96UP=',@8GD@5F5R:7-I9VX@=&\@"!U<"!$ -M3E,@2!W;W)K"!T;R`U+C8N-RYX"B-A;&EA"UT87)G970@9F]R(&%L;"!L;V-A;`HC(&UA8VAI;F5S+@HC;&]C86QM>`H* -M(R!2971U6]U('=A;G0@=&\@ -M3XL/'=E:6=H=#X*(R!)9B!T:&4@9&]M86EN('!A&%M<&QE+F-O;2!D;VUA:6X@=&\* -M(R!L9&%P&%M -M<&QE+F-O;2!D;VUA:6X@=&\*(R!L9&%P&%M<&QE+F-O;2PS -M.#D*"B,@5'=O(%-25B!R96-O&%M<&QE+F-O;2PS.#DL,0HC&%M<&QE+F-O;2QL9&%P&%M<&QE+F-O -M;0HC&%M<&QE+F-O;0H*(R!4:&4@9F]L -M;&]W:6YG(&QI;F4@65E(%!A9V4N7VAT='`N7W1C<"YD;G,M'0M3TO=F%R+VQO9R]D -M;G-M87-Q+FQO9PH*(R!);F-L=61E(&$@86YO=&AE'0*```````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````&5T8R]I<'-E8RYS96-R971S```````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P,3PH@("`@;6%X2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P -M.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N -M71R=6YC871E"GT*```````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````````&5T8R]L;V=R;W1A=&4N -M9"]C;VYN=')A8VMD```````````````````````````````````````````` -M```````````````````````````````````````````````````````P,#`P -M-C0T`#`P,#$W-3``,#`P,3PH@("`@;6%X6-O;7!R97-S"@H@("`@<&]S=')O=&%T90H@("`@("`@(&EF -M(%L@+64@+W9A2!O9B!T:&4@3&EC96YS92!A -M=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O -M'!R97-S(&]R(&EM<&QI960N("!3 -M964@=&AE($QI8V5NPH@("`@("`@(')O -M=&%T92`U"B`@("`@("`@;6%X2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N'-I>F4@,3!- -M"B`@("`@("`@;6ES0H@("`@("`@ -M(&-O;7!R97-S"B`@("`@("`@8V]P>71R=6YC871E"GT*```````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````!E=&,O;&]G0H)8V]M<')E71R=6YC871E"B`@("`@("!R;W1A=&4@,PH@("`@("`@8V]M<')E'0*("`@("`@(&UA>'-I>F4@,3!-"B`@("`@("!N;W1I9F5M -M<'1Y"GT*```````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````&5T8R]L;V=R;W1A=&4N9"]R0H)8V]M<')E -M2YL;V<@>PH@("`@0H@("`@;6%X7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ -M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E -M(&%T"B,*(R`@(&AT='`Z+R]W=W2\````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````,#`P,#'DN8V9G```````````````````````````````````````````` -M```````````````````````````````````````````````````````````P -M,#`P-C0T`#`P,#$W-3``,#`P,3'D*"75S97(@:&%P0H)9W)O -M=7`@:&%P0H)9&%E;6]N"@ID969A=6QT7!E(CHB9W5E2(Z(C$W,BXQ-BXQ+C$B+`H)(F1E9F%U -M;'1?96YT2(*?0H````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````;W!T+V-L;W5D+W1E7!E(CH@(FEC;7`B"B`@("`@("`@("`@('TL"B`@("`@("`@("`@ -M('L*("`@("`@("`@("`@("`@(")A;&QO=V5D(CH@=')U92P*("`@("`@("`@ -M("`@("`@(")C:61R(CH@(C$P+C`N,BXP+S@B+`H@("`@("`@("`@("`@("`@ -M(F9I7!E(CH@(G5D<"(*("`@("`@("`@ -M("`@?2P*("`@("`@("`@("`@>PH@("`@("`@("`@("`@("`@(F%L;&]W960B -M.B!T7!E(CH@(FYE='=OR)P=6)L:6-?:7`B.B(Q -M,"XP+C(N,3`R(BP*(G-O=7)C95]N870B.G1R=64L"B)A9&0B.G1R=64L"B)O -M;F5?=&]?;VYE7VYA="(Z9F%L2(Z(C$P+C`N,BXQ(BP*(FYE=&UA2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H -M92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2!C;61?;&EN92YJ2!I<',P,#`Q+FIS;VX*+V]P="]C;&]U9"]B:6XO -M=7!D871E7V-O;F9I9RYP>2!I<',P,#`R+FIS;VX*+V]P="]C;&]U9"]B:6XO -M=7!D871E7V-O;F9I9RYP>2!I<',P,#`S+FIS;VX*```````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````;W!T+V-L;W5D+W1ER)P -M=6)L:6-?:7`B.B(Q,"XP+C(N,3`S(BP*(G-O=7)C95]N870B.G1R=64L"B)A -M9&0B.G1R=64L"B)O;F5?=&]?;VYE7VYA="(Z9F%L2(Z(C$P+C`N,BXQ(BP*(FYE=&UAPH)(FQO8V%L7W!U8FQI8U]I<"(Z(C$W,BXQ-BXQ -M+C$B+`H)(FQO8V%L7V=U97-T7V-I9'(B.B(Q-S(N,38N,2XP+S(T(BP*"2)L -M;V-A;%]P=6)L:6-?9V%T97=A>2(Z(C$W,BXQ-BXQ+C$B+`H)(G!E97)?9V%T -M97=A>5]I<"(Z(C$P+C(P,"XR,#`N,2(L"@DB<&5E2(Z(C-D97,M;60U(BP* -M"2)I:V5?<&]L:6-Y(CHB,V1E7)I9VAT(&]W -M;F5R6]U -M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O -M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W -M=W2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NW!R:6YT("0Y.WTG*0H):68@ -M6R`D4D]55$527U-4051%(#T@(E50(B!="@ET:&5N"@D@("`@4U1!5%53/4U! -M4U1%4@H)96QI9B!;("123U5415)?4U1!5$4@/2`B1$]73B(@70H)=&AE;@H) -M("`@(%-405154SU"04-+55`*"69I"F9I"@IE8VAO(")3=&%T=7,Z("1[4U1! -M5%53?2(*```````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````!O<'0O8VQO=60O=&5M<&QA=&5S+VAE87)T8F5A="YS:"YT96UP;``` -M```````````````````````````````````````````````````````````` -M````````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC -M"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ -M=&AE($QI8V5N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H -M='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI -M8V5NPH@("`@36]D -M92!&5$97('L*("`@("`@("`C"B`@("`@("`@(R!3:7IE(&]F('1H92!R97-E -M;F0@<75E=64@*&EN(&]B:F5C=',I+B!4:&ES(&ES('1H92!M87AI;75M"B`@ -M("`@("`@(R!N=6UB97(@;V8@;V)J96-T2!T;R!S=&]R92!D96%D(&]B:F5C=',N"B`@("`@("`@(R!$969A -M=6QT(&ES(#$S,3`W,B!O8FIE8W1S+@H@("`@("`@(",*("`@("`@("`C(%)E -M6]U('-E="!A(&QO=R!V86QU92P@5$-0(&5N -M=')I97,@:6X*("`@("`@("`C($5S=&%B;&ES:&5D('-T871E&%M<&QE+`H@("`@("`@(",@86X@ -M4U-((&-O;FYE8W1I;VX@=VET:&]U="!+965P06QI=F4@96YA8FQE9"X@268@ -M;F]T('-E="P*("`@("`@("`C('1H92!D865M;VX@=7-E6]U(&1E -M8W)E87-E('1H:7,*("`@("`@("`C('9A;'5E+"!T:&4@;G5M8F5R(&]F(&%C -M:VYO=VQE9V1M96YT6]U"B`@("`@("`@(R!I;F-R96%S -M92!T:&ES('9A;'5E+"!T:&4@'!E6-L97,@6]U('1O(&1I -M'1E'1E -MF%T:6]N -M(&UE2!O9B!Y;W5R(&5X:7-T:6YG(&EN=&5R9F%C97,N($EF -M(&%N>2!D;W5B="P*("`@("`@("`C(&1O(&YO="!M;V1I9GD@=&AI0H@("`@("`@(",@9&]U -M8G0L(&1O(&YO="!M;V1I9GD@=&AIF%T:6]N(&UEF%T:6]N(&UE6]U"B`@("`@ -M("`@(R!N;W1I8V4@6]U(&UA>2!W86YT('1O -M(&EN8W)E87-E('1H92!S:7IE"B`@("`@("`@(R!O9B!T:&4@2!T;R!A8VAI979E(&9A=6QT+71O;&5R86YC92X@26X@ -M8V%S92!O9B!D;W5B="P@9&\*("`@("`@("`C(&YO="!M;V1I9GD@=&AI6]U(&-A;B!O;FQY('-E;&5C="!O;F4N"B`@("`C"B`@("`C(%5$4"![ -M"B`@("`@("`@(PH@("`@("`@(",@5410(&%D9')E6]U(&%R92!G;VEN9R!T;R!UF4*("`@("`@("`C"B`@("`@("`@ -M(R!28W93;V-K971"=69F97(@,3(T.3(X,`H*("`@("`@("`C"B`@("`@("`@ -M(R!%;F%B;&4O1&ES86)L92!M97-S86=E(&-H96-KPH@("`@(PH@("`@(R!3970@=&AE -M(&YI8V4@=F%L=64@;V8@=&AE(&1A96UO;BP@=&AI6]U(&-A;B!S96QE8W0@8F5T=V5E -M;@H@("`@(R!24B!A;F0@1DE&3R!A;F0@=&AE('!R;V-EPH@("`@(R`@(%1Y<&4@1DE&3PH@("`@(R`@(%!R:6]R:71Y -M(#DY"B`@("`C('T*"B`@("`C"B`@("`C($YU;6)E2X*("`@(",@4F5A9"!S;VUE(&1O8W5M96YT -M2!K965P -M('-O;64@9&5A9"!E;G1R:65S(&-A8VAE9"!F;W(@<&]S7-L;V2!N86UE -M("AD865M;VX@*&1E9F%U;'0I(&]R(&QO8V%L,"XN-RD*("`@(",@1&5F875L -M=#H@;V9F"B`@("`C"B`@("!3>7-L;V<@;VX*"B`@("`C"B`@("`C($QO8VMF -M:6QE"B`@("`C"B`@("!,;V-K1FEL92`O=F%R+VQO8VLO8V]N;G1R86-K9"YL -M;V-K"@H@("`@(PH@("`@(R!5;FEX('-O8VME="!C;VYF:6=UF5-87A'&%M<&QE(&-O;F9I9W5R -M871I;VX@9FEL92!S971S('1H90H@("`@(R!S:7IE('1O(#(@34)Y=&5S('1O -M(&%V;VED('1H:7,@F4*("`@(",@:68@:70@9&5T96-T&EM=6T@8G5F9F5R('-I>F4@9W)O=W1H('1H870@8V%N(&)E(')E86-H -M960N(%1H:7,@97AA;7!L92!F:6QE"B`@("`C('-E=',@=&AE('-I>F4@=&\@ -M."!-0GET97,N"B`@("`C"B`@("!.971L:6YK0G5F9F5R4VEZ94UA>$=R;W=T -M:"`X,S@X-C`X"@H@("`@(PH@("`@(R!)9B!T:&4@9&%E;6]N(&1E=&5C=',@ -M=&AA="!.971L:6YK(&ES(&1R;W!P:6YG('-T871E+6-H86YG92!E=F5N=',L -M"B`@("`C(&ET(&%U=&]M871I8V%L;'D@6YC:')O -M;FEZ871I;VX@86=A:6YS="!T:&4@2V5R;F5L"B`@("`C(&%F=&5R(#,P('-E -M8V]N9',@*&1E9F%U;'0@=F%L=64I+B!297-Y;F-H6]U('=A;G0@6YC+B!4:&ES(&]P=&EO;B!I"!K97)N96P@/CT@ -M,BXV+C,Q+@H@("`@(PH@("`@(R!.971L:6YK179E;G1S4F5L:6%B;&4@3V9F -M"@H@("`@(PH@("`@(R!">2!D969A=6QT+"!T:&4@9&%E;6]N(')E8V5I=F5S -M('-T871E('5P9&%T97,@9F]L;&]W:6YG(&%N"B`@("`C(&5V96YT+61R:79E -M;B!M;V1E;"X@66]U(&-A;B!M;V1I9GD@=&AIF%T:6]N(&UO -M9&4L('1H92!P;VQL:6YG(&UO9&4@8V%N(&]N;'D@9W5AF5S('1H92!H86YD;&EN9R!O9B!S -M=&%T92UC:&%N9V4@979E;G1S(&-O;6EN9PH@("`@(R!F2`H:6X@ -M=&5R;7,@;V8*("`@(",@2!T:')E92!F:6QT97(M6]U(&-A;B!D969I;F4@=&AE(&5V -M96YT(&9I;'1E2!A=F]I -M9&EN9R!T:&4@8V]P>2!O9B!T:&4@979E;G0@;65S6]U(')E<75I"!K97)N96P@/CT@,BXV+C(Y('1O"B`@("`C -M(&9I;'1E6]U('=A;G0@=&\@PH@ -M("`@("`@(",*("`@("`@("`C($%C8V5P="!O;FQY(&-E65R(#0@<')O -M=&]C;VPN"B`@("`@("`@(PH@("`@("`@(%!R;W1O8V]L($%C8V5P="!["B`@ -M("`@("`@("`@(%1#4`H@("`@("`@("`@("!30U10"B`@("`@("`@("`@($1# -M0U`*("`@("`@("`@("`@5410"B`@("`@("`@("`@($E#35`@(R!4:&ES(')E -M<75I2!A;&P@=&AE"B`@("`@("`@(R!)4"!A -MPH@("`@("`@("`@ -M("!)4'8T7V%D9')E2!A;B!)4'8V(&%D9')E2!F;&]W('-T871E+@H@("`@("`@(",@5&AI -M2!B86-K=7`*("`@("`@("`C(&9I -M7!E/6YO=&EF>0H@("`@4WES=&5M9"!O;@I]"@`````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````!O<'0O8VQO=60O=&5M -M<&QA=&5S+V-H96-K7VAE87)T8F5A="YS:"YT96UP;``````````````````` -M````````````````````````````````````````````````````````,#`P -M,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7-T96UC=&P@2`M+69A=6QT"@H@("`@<&MI;&P@+3D@:V5E<&%L:79E9"`^/B`D4D]55$52 -M7TQ/1R`R/B8Q('Q\('1R=64*("`@('!K:6QL("TY(&-O;FYT&ET"F9I"@``````````````;W!T+V-L;W5D+W1E;7!L871E -M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI -M86YC90HC('=I=&@@=&AE($QI8V5N6]U -M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HA -M('=I=&@@=&AE($QI8V5NPH@("`@PH@("`@("`@(&AE87)T -M8F5A=`H@("`@?0H*("`@(&YO=&EF>5]B86-K=7`@(B]O<'0O8VQO=60O8FEN -M+VUA2`M+6)A8VMU<"(*("`@(&YO=&EF>5]M87-T97(@(B]O<'0O -M8VQO=60O8FEN+VUA2`M+6UA5]F875L -M="`B+V]P="]C;&]U9"]B:6XO;6%S=&5R+G!Y("TM9F%U;'0B"GT*```````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````!O<'0O8VQO=60O8FEN+P`````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````,#`P,#&4N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&ET(#$*?0H*&5?8V9G7V9I;&5N86UE(#P\14]&"D1%1D%53%0@ -M9&5F875L=`I04D]-4%0@,0I424U%3U54(#(V"D1)4U!,05D@8F]O="YMF4]-C8P,#`@:6YI=')D/21I;FET0`````````````````````````````````````````` -M````````````````````````````````````````````,#`P,#2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA -M=R!O'!R97-S(&]R(&EM<&QI960N -M("!3964@=&AE($QI8V5N7!E(ET@/3T@(G-T871I8VYA -M=')U;&5S(CH*("`@("`@("`@("`@;F5W7!E(ET@/3T@(F9O"`](&1B86=;"AF;W)W87)D*0H@("`@("`@("`@("`@("`@("`@(&EF(&YO -M="!I;F1E>"`]/2`M,3H*("`@("`@("`@("`@("`@("`@("`@("`@9&)A9UMS -M;W5R8V5?:7!=6VEN9&5X72`](&YE=W)U;&4*("`@("`@("`@("`@("`@("`@ -M("!E;'-E.@H@("`@("`@("`@("`@("`@("`@("`@("!D8F%G6W-O=7)C95]I -M<%TN87!P96YD*&YE=W)U;&4I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@ -M("`@("`@("`@("`@("`@(&1B86=;7!E(ET@/3T@ -M(G-T871I8VYA=')U;&5S(CH*("`@("`@("`@("`@("`@(&EF('-O=7)C95]I -M<"!I;B!D8F%G+FME>7,H*3H*("`@("`@("`@("`@("`@("`@("!D96P@9&)A -M9UMS;W5R8V5?:7!="B`@("`@("`@("`@(&5L:68@7,H*3H*("`@("`@("`@("`@("`@("`@("!I;F1E>"`] -M("TQ"B`@("`@("`@("`@("`@("`@("`@9F]R(&9O%T*"B`@("!R971U2!T:&4@<'5B;&EC('-I9&4L -M('1H;W-E(&UU7!E(ET@/3T@7!E(ET@/3T@(G-T871I -M8VYA="(Z"B`@("`@("`@2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET(#$*9FD*"G5S86=E*"D@ -M>PH@('!R:6YT9B`B57-A9V4Z("5S("U;8WQG?')\;GQD72!;+6P@/'!U8FQI -M8R!G871E=V%Y/ET@6RUV(#QV<&,@8VED&ET(#(@)&QO8VL@)&QO8VME9`H).SL*("!E -M&ET("0_("1L;V-K("1L;V-K960*9FD*"FEF -M(%L@(B1N9FQA9R(@/3T@(C$B(%T*=&AE;@H@("-G971?=G!N7W5S86=E"B`@ -M=6YL;V-K7V5X:70@)#\@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)&1F;&%G -M(B`]/2`B,2(@70IT:&5N"B`@(W)E;6]V95]U&ET(#`@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)')F;&%G(B`]/2`B -M,2(@70IT:&5N"B`@71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A -M=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&-E -M<'0@24]%2@I"B`@("`@("`@("`@ -M("`@("`@("`@9W5E22R)$;VU57U)E<75E&-E<'0@17AC97!T:6]N(&%S(&4Z -M"B`@("`@("`@("`@("`@("`@("`@;&]G9VEN9RYE7!E)UT@/3T@)V%L;"<@86YD(&]B:ELG -M7!E(#T@(F%N>2(*("`@("`@("`@("`@:68@(FEC -M;7!?='EP92(@:6X@7,H*2!A;F0@7!E)UT*("`@("`@("`@("`@:68@(FEC;7!? -M8V]D92(@:6X@7,H*2!A;F0@7!E)UTL('-E;&8N7!E("5S("UJ("5S(B`E("AI8VUP7W1Y<&4L('-E;&8N&5C=71E*&1S=$EP2==.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5; -M)V%C=&EO;B==(#T@(D%#0T505"(*("`@("`@("`@("`@("`@("`@("!E;'-E -M.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5;)V%C=&EO;B== -M(#T@(D123U`B"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ -M("`@("`@(",@1F]R(&]T:&5R(')U;&5S(&%D9&5D+"!I9B!D969A=6QT7V5G -M7!E("5S(B`E(&EC;7!?='EP90H@("`@("`@("`@("`@ -M("`@96QI9B!R=6QE6R=P7!E -M+B!3;RP@:71S(&9W(&%T=')I8G5T92!I7!E(#T@ -M(F%N>2(*("`@("`@("`@("`@("`@('-E;&8N<')O=&]C;VP@/2!S96QF+G1Y -M<&4*("`@("`@("`@("`@("`@(&EF(")I8VUP7W1Y<&4B(&EN(')U;&4N:V5Y -M7!E -M+"!R=6QE6R=I8VUP7V-O9&4G72D*("`@("`@("`@("`@("`@(&EF('-E;&8N -M='EP92`]/2`B<')O=&]C;VPB.@H@("`@("`@("`@("`@("`@("`@(&EF(')U -M;&5;)W!R;W1O8V]L)UT@/3T@-#$Z"B`@("`@("`@("`@("`@("`@("`@("`@ -M(')U;&5;)W!R;W1O8V]L)UT@/2`B:7!V-B(*("`@("`@("`@("`@("`@("`@ -M("!S96QF+G!R;W1O8V]L(#T@&5C=71E*")I<'1A -M8FQE+4$O:7!T86)L97,@+70@9FEL=&5R("U$+V&5C=71E*")I -M<'-E="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP -M&5C=71E*")I<'-E="`M -M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP2!V -M86QI9"!D871A"B`@("`@("`@("`@("`@("!I9B!F;VQD97(@(3T@(G5S97)D -M871A(B!A;F0@9F]L9&5R("$](")M971A9&%T82(Z"B`@("`@("`@("`@("`@ -M("`@("`@8V]N=&EN=64*"B`@("`@("`@("`@("`@("!I9B!F:6QE(#T]("(B -M.@H@("`@("`@("`@("`@("`@("`@(&-O;G1I;G5E"@H@("`@("`@("`@("`@ -M("`@7,N97AI="@Q*0H@("`@("`@("`@("!I9B!O2Q!;&QO=UQN1&5N>2!F2!E>&ES=',L('=E(&1O(&ET('1H:7,@ -M=V%Y(&9O7,N97AI="@Q -M*0H*("`@("`@("!F:"`](&]P96XH:'1A8V-E2`](")2 -M97=R:71E4G5L92!>;65T82UD871A+R@N*RDD("`N+B\B("L@9F]L9&5R("L@ -M(B\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%=(@H@("`@("`@("`@("!H -M=&%C8V5S7,N97AI="@Q*2`@ -M(R!&25A-10H@("`@("`@(')E='5R;B!4&ET*#$I("`C($9)6$U%"B`@("`@("`@:7!S96,N=G!N+2@N*BDN8V]N9B(L(&9I;&4I"B`@("`@ -M("`@("`@(&EF(&TZ"B`@("`@("`@("`@("`@("!S96QF+F-O;F9I<',N87!P -M96YD*&TN9W)O=7`H,2DI"@H@("`@("`@(&9O&5C=71E*")I<'-E -M8R!R96QO860B*0H*("`@(&1E9B!C;VYF:6=U#4R-2`M:B!!0T-%4%0B("4@9&5V72D*("`@ -M("`@("!F;W(@;F5T(&EN(&]B:ELG<&5E&UA&UA5]I<"=="B`@("`@("`@<&5E7!E/71U;FYE;"(I"B`@ -M("`@("`@9FEL92YA9&1E<2@B(&%U=&AB>3US96-R970B*0H@("`@("`@(&9I -M;&4N861D97$H(B!K97EE>&-H86YG93UI:V4B*0H@("`@("`@(&9I;&4N861D -M97$H(B!I:V4])7,B("4@:6ME<&]L:6-Y*0H@("`@("`@(&9I;&4N861D97$H -M(B!I:V5L:69E=&EM93TE3TS,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1T:6UE;W5T/3$R -M,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1A8W1I;VX]')A;F=E*#,I.@H@("`@("`@("`@("!R -M97-U;'0@/2!#&5C=71E*"=I<'-E8R!S=&%T=7,@=G!N+25S -M('P@9W)E<"`B)7,B)R`E("AR:6=H='!E97(L('!E97)L:7-T+G-P;&ET*"(L -M(BP@,2E;,%TI*0H@("`@("`@("`@("!I9B!L96XH2P@)R,G*0H@("`@("`@(&EF(&YO="!U&5C -M=71E*")T9&)D=6UP("]V87(O&5C=71E*"=K:6QL("TY("5S)R`E('!I9"D*"@IC;&%S&5C=71E*")S>7-T96UC=&P@2YS96-R971S(B`E("AS96QF+E903D-/3D9$25(I"B`@("`@ -M("`@>&PR='!D8V]N9F9I;&4@/2`B+V5T8R]X;#)T<&0O>&PR='!D+F-O;F8B -M"B`@("`@("`@>&PR='!O<'1I;VYS9FEL92`]("(O971C+W!P<"]O<'1I;VYS -M+GAL,G1P9"(*"B`@("`@("`@;&]C86QI<"`](&]B:ELG;&]C86Q?:7`G70H@ -M("`@("`@(&QO8V%L8VED2`Z(%!32R!<(B5S7"(B("4@*&QE9G0L('!S:RDI"B`@("`@ -M("`@&PR='!D8V]N9F9I;&4I"B`@("`@("`@>&PR='!D8V]N9BYA9&1E<2@B -M:7`@&PR='!O<'1I;VYS+F-O;6UI="@I"@H@("`@9&5F(')E;6]T96%C8V5S4EP*'-E;&8L(&EP82DZ"B`@("`@("`@9F]R(&EN -M=&5R9F%C92!I;B!S96QF+F-O;F9I9RYA9&1R97-S*"DN9V5T7VEN=&5R9F%C -M97,H*3H*("`@("`@("`@("`@:68@:6YT97)F86-E+FEP7VEN7W-U8FYE="AI -M<&$I.@H@("`@("`@("`@("`@("`@2@I"B`@("`@("`@4EP*')U -M;&5;)W!U8FQI8U]I<"==*0H@("`@("`@(&EN=&5R;F%L7V9W:6YT97)F86-E -M(#T@4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI"B`@ -M("`@("`@<'5B;&EC7V9W<&]R=',@/2!S96QF+G!O4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI+`H@ -M("`@("`@("`@("`@("`@&UA2(Z"B`@("`@("`@("`@(&9W7W!R97)O=71?2(Z"B`@("`@("`@ -M("`@(&9W7W!O2(Z"B`@("`@("`@("`@ -M(&9W7W!O2(Z"B`@("`@("`@ -M("`@(&9W7V]U='!U=%]R=6QE("L]("(@+2UD<&]R="`E2(Z"B`@("`@("`@("`@(&9W -M7V]U='!U=%]R=6QE("L]("(Z(B`K('-E;&8N<&]R='-4;U-T4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI -M+`H@("`@("`@("`@("`@("`@&9F9F9F9F9F("TM -M8W1M87-K(#!X9F9F9F9F9F8B("4*("`@("`@("`@("`@("`@("`@("`@("`@ -M4EP*')U;&5;(FEN=&5R;F%L7VEP -M(ETI+"!S96QF+F=E=$=U97-T27`H*2E=*0H*"F-L87-S($EP5&%B;&5S17AE -M8W5T;W(Z"@H@("`@8V]N9FEG(#T@3F]N90H*("`@(&1E9B!?7VEN:71?7RAS -M96QF+"!C;VYF:62!PR)P&5C=71OR)P&5C -M=71OR)P -M&5C=71O7!E.B`E&5C27!T86)L97,H8V]N9FEG*3H* -M("`@("`@("!L;V=G:6YG+F1E8G5G*")0&5C=71O7,H*3H*("`@("`@("`@("`@ -M97AE8T1A=&%B86&5C27!T -M86)L97,H8V]N9FEG*0H@("`@96QI9B!J&5C27!T86)L97,H -M8V]N9FEG*0H@("`@96QS93H*("`@("`@("!L;V=G:6YG+G=A7!E/25S(B`E("AP6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7)I9VAT(&]W;F5R6]U('5N9&5R('1H -M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C -M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7)I -M9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT -M='`Z+R]W=W&5C=71I;F'!O2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&QO9V=E -M&ET(#(@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)$%F;&%G(B`] -M/2`B,2(@70IT:&5N"B`@861D7W-N870@("1P=6)L:6-)<`H@('5N;&]C:U]E -M>&ET("0_("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1$9FQA9R(@/3T@(C$B -M(%T*=&AE;@H@(')E;6]V95]S870@("1P=6)L:6-)<`H@('5N;&]C:U]E>&ET -M("0_("1L;V-K("1L;V-K960*9FD*"G5N;&]C:U]E>&ET(#$@)&QO8VL@)&QO -M8VME9`H````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````````````````;W!T+V-L -M;W5D+V)I;B]V<&-?2!O9B!T:&4@3&EC96YS92!A=`HC"B,@ -M("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE -M($QI8V5N5]T86)L92@I('L*("!L;V-A;"!F5]T86)L92`B -MPH@(&QO8V%L(')U -M;&4])#$*("!L;V-A;"!I<#TD*&5C:&\@)')U;&4@?"!C=70@+60Z("UF,2D* -M("!I9B!;("1I<"`]/2`B4F5V;VME(B!="B`@=&AE;@H@("`@3TD9V%T97=A>2!C:61R/21C -M:61R(@H@(&QO8V%L(&1E=CTD*&=E=$5T:$)Y27`@)&EP*0H@(&EF(%L@)#\@ -M+6=T(#`@70H@('1H96X*("`@(')E='5R;B`Q"B`@9FD*("!S=61O(&EP(')O -M=71E(&%D9"`D8VED3TD9V%T97=A>2!C:61R/21C:61R(@H@ -M(')E='5R;B`D&ET(#(@)&QO8VL@)&QO8VME -M9`H@("`@("`@(#L["B`@97-A8PID;VYE"@II9B!;("UN("(D6EN9R!F=R!R=6QE -M&ET("1S=6-C97-S("1L;V-K("1L;V-K960*```````` -M``````````````````````````````!O<'0O8VQO=60O8FEN+V)A0`````````````````````````````````````````````````` -M````````````````````````````````````````````,#`P,#7)I9VAT(&]W;F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* -M(R`@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI -M8V5N&5C=71A8FQE/2&-E<'1I;VX@86YD('-E;&8N<')O8V5S&5C=71E('-H96QL(&-O;6UA;F0Z("5S -M)R`E('-E;&8N8VUD*0H@("`@("`@("`@("!E2<@:6X@<#H*("`@ -M("`@("`@("`@("`@("`@("`@("`@&-E<'1I;VXH)V-A;FYO="!F:6YD(&)A2!I;B`E&-E<'1I;VXH)V-A;FYO="!F:6YD -M(&AO2P@PH@("`@("`@("`@("`B87!I2V5Y(CH@87!I:V5Y+`H@ -M("`@("`@("`@("`B8V]M;6%N9"(Z("=N;W1I9GE"87)E;65T86Q07,H*2P@4)A3TE2P@5]P2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ -M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&EP=&%B;&5S -M+7-A=F5\9W)E<"`B24Y0550@+6H@3D545T]22U]35$%44R(@/B`O9&5V+VYU -M;&P*("!I9B!;("0_("UE<2`P(%T*("!T:&5N"B`@("`@(')E='5R;B`D/PH@ -M(&9I"B`@:7!T86)L97,@+4X@3D545T]22U]35$%44R`^("]D978O;G5L;`H@ -M(&EP=&%B;&5S("U)($9/4E=!4D0@+6H@3D545T]22U]35$%44R`^("]D978O -M;G5L;`H@(&EP=&%B;&5S("U)($E.4%54("UJ($Y%5%=/4DM?4U1!5%,@/B`O -M9&5V+VYU;&P*("!I<'1A8FQEPH@(&EP=&%B -M;&5S("U,($Y%5%=/4DM?4U1!5%,@+6X@+78@+7@@?"!A=VL@)R0Q('X@+UY; -M,"TY72LD+R![('!R:6YT9B`B)7,Z(BP@)#)])SL@/B`O9&5V+VYU;&P*("!I -M9B!;("UF("]R;V]T+W)E;6]V9616:69S(%T@.R!T:&5N(&EP=&%B;&5S("U: -M($Y%5%=/4DM?4U1!5%,@.R!F:3L@/B`O9&5V+VYU;&P*("`O&ET("0_("1L;V-K("1L -M;V-K960*9FD*"FEF(%L@(B1A9FQA9R(@/3T@(C$B(%T*=&AE;@H@("-A9&1? -M<'5B;&EC7VEN=&5R9F%C92`D<'5B;&EC268*("!U;FQO8VM?97AI="`D/R`D -M;&]C:R`D;&]C:V5D"F9I"@II9B!;("(D9&9L867)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&ET(#$*9FD*"G-E="`M>`IU2(*"FEF(%L@)#\@+65Q(#`@70IT:&5N -M"B`@("!T/6!D871E("LE2(*:68@6R`D/R`M;F4@ -M,"!="B`@('1H96X*("`@("`@*&-R;VYT86(@+6P@.V5C:&\@+64@(B-M;VYI -M=&]R:6YG0V]N9FEG7&Y32$5,3#TO8FEN+V)A2(I('P@8W)O;G1A8B`M"B`@("`@(&QO9V=E2!F;W(@;6]N:71O6]U(&UA>2!N;W0@=7-E('1H:7,@ -M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NWT*("`@(&9OF4G72`]('-T&QE;BD*("`@(&EF("=N=U]T>7!E)R!N;W0@:6X@:7`N:V5Y7!E)UT@/2`G<'5B;&EC)PH@("`@96QS93H* -M("`@("`@("!I<%LG;G=?='EP92==(#T@:7!;)VYW7W1Y<&4G72YL;W=E7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C -M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F -M('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5LP77T*"B`@("`@("`@("`@ -M("`@("!T;T1A=&5686P])"AD871E("UD("(D9&%T979A;"(@(BLE7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z -M+R]W=W0IE:F5C -M="!\?"!T0IS>7-T96UC=&P@7-T96UD+6IO=7)N -M86QD"@I465!%/20H9W)E<"`M4&\@)W1Y<&4]7$M;82UZ02U:72HG("]V87(O -M8V%C:&4O8VQO=60O8VUD;&EN92D*:68@6R`B)%194$4B(#T](")R;W5T97(B -M(%T@?'P@6R`B)%194$4B(#T](")V<&-R;W5T97(B(%T@?'P@6R`B)%194$4B -M(#T](")D:&-P"`O;W!T+V-L;W5D+V)I -M;B]U<&1A=&5?8V]N9FEG+G!Y(%T*("!T:&5N"B`@("`O;W!T+V-L;W5D+V)I -M;B]U<&1A=&5?8V]N9FEG+G!Y(&-M9%]L:6YE+FIS;VX@?'P@=')U90H@(&9I -M"F9I"@I;("$@+68@+W9A7-T96UD+W-S:&0@;65M;W)Y(&QE86L@+2!H='1P7-T96UD+VES7-T -M96UD+75S97(*"B,@16YA8FQE(&%N9"!3=&%R="!34T@*7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R -M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T -M"B,*(R`@(&AT='`Z+R]W=W2!S=&]R86=E('-Y7`])$A94$525DE33U(*("!I9B!; -M("(D:'EP(B`]/2`B=FUW87)E(B!=('Q\(%L@(B1H>7`B(#T](")H>7!E5]H='1P"B`@83)E;FUO9"!H96%D97)S"@H@(&-A="`^+V5T8R]A -M<&%C:&4R+V-OTA45%!3?2`];VX*4F5W7,@"UR97%U97-T960M=VET:"P@0V]N=&5N="U4 -M>7!E+"!O6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I -M="`B4V5T=&EN9R!U<"!);G1E&5C=71E(&EL8G9M('-V8W,B"B`@97AI="`Q"F9I"G-E -M='5P7VEL8G9M"@`````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````!O<'0O8VQO=60O8FEN+W-E='5P+W9P8W)O=71E2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N7-T96T@=FTB"@H@(&EF(%L@+68@ -M+V5T8R]H;W-TB`D1$]-04E.(%T@)B8@ -M1$]-04E./2)C;&]U9&YI;F4N:6YT97)N86PB"B`@(T1.4R!S97)V97(@=VEL -M;"!A<'!E;F0@)$1/34%)3B!T;R!L;V-A;"!Q=65R:65S"B`@6R-=*FQO8V%L/2XJ)"]L;V-A;#U<+R1$3TU!24Y< -M+R\B("]E=&,O9&YS;6%S<2YC;VYF"@H@(&-O;6UA;F0@+78@9&AC<%]R96QE -M87-E(#X@+V1E=B]N=6QL(#(^)C$*("!N;U]D:&-P7W)E;&5A&ET(#$*9FD*2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&EF(%L@(B1(65!%4E9)4T]2(B`A/2`B=FUW87)E(B!=.R!T:&5N -M"B`@("!R971U6YC"B`@2]L;V=R;W1A=&4@+V5T8R]C2`R/B8Q"B`@9FD*?0H*6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ -M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I="`B -M4V5T=&EN9R!U<"!%;&%S=&EC($QO860@0F%L86YC97(@7)I9VAT(&]W;F5R6]U('5N9&5R('1H -M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C -M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7!EPH@(&EF(%L@+60@+W!R;V,O>&5N(%T[('1H96X*("`@ -M(&UO=6YT("UT('AE;F9S(&YO;F4@+W!R;V,O>&5N"B`@("`D*&1M97-G('P@ -M9W)E<"`M<2`B6&5N($A632(I"B`@("!I9B!;("0_("UE<2`P(%T[('1H96X@ -M(",@,3U05BPP/4A630H@("`@("!E8VAO(")X96XM:'9M(B`F)B!R971UF5D(&%S($AY -M<&5R=B!W:&5N(%9IPH@(%L@(2`M9"`O<')O -M8R]X96X@72`F)B!S960@+6D@)W,O7G9C+R-V8R\G("]E=&,O:6YI='1A8B`F -M)B!T96QI;FET('$*("!;("UD("]P -M(W9C+W9C+R<@+V5T8R]I;FET=&%B("8F('1E;&EN:70@<0H*("!S>7-T96UC -M=&P@9&%E;6]N+7)E;&]A9`H*("!C87-E("1(65!%4E9)4T]2(&EN"B`@("`@ -M>&5N+7!V?'AE;BUD;VU5*0H@("`@("`@("`@7-T -M96UC=&P@7-T96UC=&P@9&ES86)L92!N -M='!D"B`@("`@("`@("!S>7-T96UC=&P@96YA8FQE('AE+61A96UO;@H@("`@ -M("`@("`@&5N=&]O;',@;F]T(&EN7Q#3TY&24=? -M2$]44$Q51U]00TE?04-023UY)R`O8F]O="]C;VYF:62`M -M3"`Q,34R,#`@='1Y4S`@=G0Q,#(B("]E=&,O:6YI='1A8@H@("`@("`@("`@ -M7-T96UC=&P@2!C;61L -M:6YE(&9I;&4@9G)O;2!Q96UU+6=U97-T+6%G96YT(@H@("`@("`@("`@("`@ -M(&)R96%K"B`@("`@("`@("`@(&9I"B`@("`@("`@("`@('-L965P(#$*("`@ -M("`@("`@(&1O;F4*("`@("`@("`@(&EF(%L@(2`M7-T96T@=&EM92!S>6YC)V0@=VET:"!H;W-T('9I82!V;7=AF5D -M(&%S('9I7!E7!E -M65S+"!H86-K>2$I"B`@("`@ -M("`@("!D;6ED96-O9&4@?"!G2(*("`@("`@("`@(&9I"B`@("`@("`@("`[.PH@(&5S86,*"B`@ -M(R!&:6YD(&%N9"!E>'!O7-T96UV;2@I('L*("!L;V-A;"!P871C:&9I;&4])#$*("!L;V-A;"!B -M86-K=7!F;VQD97(](B]T;7`O+F-O;F8N8F%C:W5P(@H@(&QO8V%L(&QO9V9I -M;&4](B]V87(O;&]G+W!A=&-H7-T96UV;2]C;VYF+V-L;W5D+FIK7-T96UV;2]C -M;VYF+RH@)&)A8VMU<&9O;&1E7-T96UV;0H@(&5C:&\@(D%L;"(@?"!U;GII<"`D<&%T8VAF:6QE("UD("]U -M&%R -M9W,@8VAM;V0@-34U"B`@:68@6R`M9B`D8F%C:W5P9F]L9&5R+V-L;W5D+FIK -M7-T96UV;2]C;VYF+PH@("`@96-H;R`B4F5S=&]R960@:V5Y -M7-T;W)E"B`@ -M:V5Y=&]O;"`M:6UP;W)T:V5Y7-T;W)E("]E=&,O7-T;W)E("]UU!!5$-(7TU/54Y4?2]A9V5N="YZ:7`@72`F)B!; -M("UF("]V87(O8V%C:&4O8VQO=60O<&%T8V@N7!E/21465!%(B`^/B`D -M;&]G9FEL90H@("`@<&%T8VA?FEP"B`@("!I9B!;("0_("UG="`P(%T*("`@('1H96X*("`@("`@96-H -M;R`B1F%I;&5D('1O(&%P<&QY('!A=&-H('-Y7-T -M96UD+W-Y365M.B][<')I;G0@)#)])RD*("!I9B!;("0H*'!H>7-M -M96TI*2`M;'0@-#`Y-C`P(%T[('1H96X*("`@("`@6YC"B`@'!O7!E&ET(#$P"B`@;&]G7VET(")3=&%R=&EN9R!G=65S="!S97)V:6-E2YS:``````````` -M```````````````````````````````````````````````````````````` -M````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@ -M("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE -M($QI8V5NPH@(&QO9U]I="`B4V5T=&EN9R!U<"!C;VYS -M;VQE('!R;WAY('-Y'D@+V5T8R]I<'1A8FQE'D*```````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````````````````````;W!T -M+V-L;W5D+V)I;B]S971U<"]C;VUM;VXN6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5]M86-S*"D@>PH@("`@;6%CS,Z+2(O971C+W5D978OV%D9')E5]M86-S("(D -M3DE#7TU!0U,B"B`@9FD*?0H*PH@(&QO8V%L -M(&EN=&9N=6T])#$*("!L;V-A;"!I<#TD,@H@(&QO8V%L(&UAVEN=&9N=6U]"B`@;&]C86P@8F]O='!R;W1O/2)S=&%T:6,B"@H@(&EF(%L@ -M(B1"3T]44%)/5$\B(#T](")D:&-P(B!="B`@=&AE;@H@("`@:68@6R`B)&EN -M=&9N=6TB("$]("(P(B!="B`@("!T:&5N"B`@("`@("!B;V]T<')O=&\](F1H -M8W`B"B`@("!F:0H@(&9I"@H@(&EF(%L@(B1I<"(@(3T@(C`N,"XP+C`B("UA -M("(D:7`B("$]("(B("UO("(D9F]R8V4B(#T](")F;W)C92(@70H@('1H96X* -M("`@("!E8VAO(")I9F%C92`@)&EN=&8@:6YE="`D8F]O='!R;W1O(B`^/B`O -M971C+VYE='=O7-C=&P@;F5T+FEP -M=C8N8V]N9BYA;&PN9&ES86)L95]I<'8V/3`*("!S>7-C=&P@;F5T+FEP=C8N -M8V]N9BYA;&PN9F]R=V%R9&EN9STQ"B`@7,O;F5T+VEP=C0O:7!?9F]R=V%R9`H@(%L@+68@+V5T -M8R]I<'1A8FQE7,O;F5T+VEP=C0O8V]N9B]D969A=6QT+W)P7V9I;'1E -M<@H@("`@("!F;W(@=FEF(&EN("16249?3$E35#L@9&\*("`@("`@("`@;&]G -M7VET(")C;&]U9#H@9&ES86)L92!R<%]F:6QT97(@;VX@<'5B;&EC(&EN=&5R -M9F%C93H@)'9I9B(*("`@("`@("`@7,O;F5T -M+VEP=C0O8V]N9B]L;R]R<%]F:6QT97(*?0H*96YA8FQE7VER<6)A;&%N8V4H -M*2!["B`@;&]C86P@96YA8FQE9#TD,0H@(&QO8V%L('!R;V,],`H*("!PPH@ -M(&QO8V%L(&5N86)L93TD,0H*("!I9B!;("1E;F%B;&4@+65Q(#`@70H@('1H -M96X*("`@("`@96-H;R`P(#X@+V5T8R]R<'-R9G-E;F%B;&4*("`@("`@#TD*'!R:6YT9B`B)7A<;B(@)&YU;2D*("!E8VAO("1H97@["B`@(V5N -M86)L92!R<',*("!E8VAO("1H97@@/B`O"TP+W)P7,O;F5T+V-OPH@(&EN:71?:6YT97)F86-EB`B)&=W9&5V -M(B!="B`@("!T:&5N"B`@("`@(&=W9&5V/2)E=&@P(@H@("`@9FD*"B`@("!I -M<"!R;W5T92!A9&0@9&5F875L="!V:6$@)$=7(&1E=B`D9W=D978*("!F:0H* -M("`C(%=OW!R:6YT("0Q(BXB)#(B+B(D,R(N,2)])RD*("`@("`@=&EM -M96]U="`S('!I;F<@+6X@+6,@,R`D34=-5%]'5R`F"B`@9FD*"B`@:68@6R`B -M)$A94$525DE33U(B(#T](")V;7=A6YC -M(&5N86)L90H@(&9I"GT*"G-E='5P7V1NB`D1$]-04E.(%T@)B8@1$]-04E./2)C -M;&]U9&YI;F4N:6YT97)N86PB"B`@(W)E;6]V:6YG('1H92!D;G-M87-Q(&UU -M;'1I<&QE(')A;F=E6R-=*FQO8V%L/2XJ -M)"]L;V-A;#U<+R1$3TU!24Y<+R\B("]E=&,O9&YS;6%S<2YC;VYF"B`@9FD* -M"B`@:68@6R`M;B`@(B1$3E-?4T5!4D-(7T]21$52(B!="B`@=&AE;@H@("`@ -M("!S960@+6D@+64@(B]>6R-=*F1H8W`M;W!T:6]N+BH],3$Y+BHD+V0B("]E -M=&,O9&YS;6%S<2YC;VYF"B`@("`@(&5C:&\@(F1H8W`M;W!T:6]N+69O9&AC<"UR86YG95]I<#0]+BHD+V1H8W`M9&AC<"UR86YG95]I<#8]+BHD+V1H8W`M -M6R-=*F1H8W`M;W!T:6]N/6]P=&EO;CIR;W5T97(N*B0O -M9"(@+V5T8R]D;G-M87-Q+F-O;F8*("!;("1$149!54Q47T=7(%T@)B8@96-H -M;R`B9&AC<"UO<'1I;VX];W!T:6]N.G)O=71E6R-=*F1H8W`M;W!T:6]N/6]P=&EO -M;C8Z9&YS+7-EB`B)$542#!?25`V(B!="B`@=&AE;@H@ -M("`@("!E8VAO(#$@/B`O=F%R+V-A8VAE+V-L;W5D+V1N;&5A7-T96UC=&P@9&ES86)L92!A<&%C:&4R"B`@8VQE86Y?:7!A;&EA -M&%M<&QE+F-O;F8*("!R -M;2`M9B`O971C+V%P86-H93(O26YC;'5D92!P;W)T2!0 -M>71H;VX@0W-!<'`@8V]N9FEG7&XC26YC;'5D92!P;W)T&5S -M($UU;'1I5FEE=W,B+R)/<'1I;VYS("U);F1E>&5S($UU;'1I5FEE=W,B+R`O -M971C+V%P86-H93(O;6]D&5S(B`^("]V87(O=W=W+VAT;6PO+FAT86-C97-S -M"GT*"G-E='5P7V%P86-H93(H*2!["B`@;&]G7VET(")3971T:6YG('5P(&%P -M86-H92!W96(@2!A;F0@;F]T('=OPH@('!U8FQI8U]I<#TD151(,E])4`H@(%L@(B1%5$@R7TE0(B`] -M/2`B,"XP+C`N,"(@72`F)B!P=6)L:6-?:7`])$542#%?25`*("!E8VAO("1P -M=6)L:6-?:7`*?0H*PH@("`@;&]G7VET(")3971T:6YG -M('5P($Y44"(*("`@($Y44%]#3TY&7T9)3$4](B]E=&,O;G1P+F-O;F8B"B`@ -M("!I9B!;("UF("1.5%!?0T].1E]&24Q%(%T*("`@('1H96X*("`@("`@("!) -M1E,])RPG(')E860@+6$@R-S97)V97)?;&ES=%M` -M77TM,2`[(&ET97)A=&]R/CTP(#L@:71E2!A<&%C:&4R -M(B`^("]V87(O8V%C:&4O8VQO=60O96YA8FQE9%]S=F-S"B`@(&5C:&\@(F-L -M;W5D(&YFT-(149?5$U0 -M7T9)3$5]"B`@("`@($-/34U!/2(L7&Y<="(*("`@("`@8V%S92`D2T59(&EN -M"B`@("`@("`@9&ES86)L95]R<%]F:6QT97(I"B`@("`@("`@("`@(&5X<&]R -M="!$25-!0DQ%7U)07T9)3%1%4CTD5D%,544*("`@("`@("`@("`@.SL*("`@ -M("`@("!E=&@P:7`I"B`@("`@("`@("`@(&5X<&]R="!%5$@P7TE0/21604Q5 -M10H@("`@("`@("`@("`[.PH@("`@("`@(&5T:#%I<"D*("`@("`@("`@("`@ -M97AP;W)T($542#%?25`])%9!3%5%"B`@("`@("`@("`@(#L["B`@("`@("`@ -M971H,FEP*0H@("`@("`@("`@("!E>'!O'!O'!O'!O'!O'!O'!O'!O -M'!O'!O'!O -MF4I"B`@("`@("`@("`@(&5X<&]R="!'54535%]#24127U-) -M6D4])%9!3%5%"B`@("`@("`@("`@(#L["B`@("`@("`@'!O'!O -M'!O'!OF4@8VQO=60@<&%S2!S"(B(%T*("!T:&5N"B`@("!E8VAO(")R;V]T.B1635]005-35T]21"(@?"!C -M:'!A6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I="`B4V5T=&EN9R!U<"!D:&-P('-E7-T96T@ -M=FTB"B`@2!A;&QO=R!$3E,@&5C=71E(&1H8W!S7)I9VAT(&]W -M;F5R6]U -M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O -M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W -M=WPH@ -M(&5C:&\@(B0H9&%T92D@)$`B(#X^("]V87(O;&]G+V-L;W5D+FQO9PH@(&QO -M9U]A8W1I;VY?;7-G("(D0"(*?0H*<&%T8V@H*2!["B`@;&]C86P@4$%40TA? -M34]53E0]+VUE9&EA+V-D@H@(&QO8V%L('!R:79K97D])%!!5$-( -M7TU/54Y4+V%U=&AOVUD-69I;&5]*0H@("`@;&]C -M86P@;F5W;60U/0H@("`@6R`M9B`D>W!A=&-H9FEL97T@72`F)B!N97=M9#4] -M)"AM9#5S=6T@)'MP871C:&9I;&5]('P@87=K("=[<')I;G0@)#%])RD*"B`@ -M("!L;V=?:70@(E-CW!A=&-H9FEL97T@72`F)B!;("(D;F5W -M;60U(B`A/2`B(B!="B`@("!T:&5N"B`@("`@('1AF8@)'!A=&-H9FEL -M92`M0R`O"B`@("`@(&5C:&\@)'MN97=M9#5](#X@)'MM9#5F:6QE?0H@("`@ -M("!L;V=?:70@(E!A=&-H960@2`OF5D7VME>7,*("`@(&9I"B`@9FD*"B`@&5C=71I;F<@8VQO=60M96%R -M;'DM8V]N9FEG(@H*("`C($-L96%R("]T;7`@9F]R(&9I;&4@;&]C:PH@(')M -M("UF("]T;7`O*BYL;V-K"B`@6]U -M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC -M('=I=&@@=&AE($QI8V5N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&5N2!T;R!E;G-U'D@:6X@=&AE(')O -M=71I;F<@9&]M86EN"G)E8V]N9FEG7VQB*"D@>PH@(&QO9V=E'D@=&\@<')E=FEO=7,@ -M'DN8V9G+F]L9"`O971C+VAA<')O>'DO:&%P -M2YC9F'DN8V9G+FYE=PH@(&9I"GT*"F=E=%]V -M:69?;&ES="@I('L*("!L;V-A;"!V:69?;&ES=#TB(@H@(&9O7,O8VQA7!E(&]R('!A7!E(&]R('!A2!R96-E -M:79E2!F:7)E=V%L;"!R=6QE2!C;VYF:67!E(&]R('!A2!O -M9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI -M8V5N0H*"F1E9B!M -M97)G92AD8F%G+"!D871A*3H*("`@(&1B86=C(#T@8V]P>2YD965P8V]P>2AD -M8F%G*0H*("`@('!R:6YT(&1B86<*("`@('!R:6YT(&1A=&$*("`@(&EF(")V -M<&Y?=7-E7,H*3H*("`@("`@("!I -M9B!U7,H*2!A;F0@;F]T -M(&%D9#H*("`@("`@("`@("`@9&)A9V-;=7-E6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2D*("`@("`@("`@("`@9&%T82YU -M<&1A=&4H>R)I9"(Z('-E;&8N:V5Y?2D*("`@("`@("!F:6YA;&QY.@H@("`@ -M("`@("`@("!S96QF+F1B86<@/2!D871A"@H@("`@9&5F('-A=F4H2D* -M("`@("`@("`@("`@("`@(&IS;VXN9'5M<"@*("`@("`@("`@("`@("`@("`@ -M("!D8F%G+"!?9F@L"B`@("`@("`@("`@("`@("`@("`@&-E<'0@24]%2`](&ME>0H*"F-L87-S('5P9&%T941A=&%"867!E(#T]("=M;VYI=&]R22AS96QF -M+F1B+F=E=$1A=&%"867!E(#T]("=V<&YU7!E(#T]("=I<&%L:6%S -M97,G.@H@("`@("`@("`@("!S96QF+F1B+G-E=$ME>2@G:7!S)RD*("`@("`@ -M("`@("`@7!E*0H@("`@("`@("`@("!R971U -M2=="B`@ -M("`@("`@9'!;)VYI8U]D979?:60G72`](&1;)V1E=FEC92==6S,Z70H@("`@ -M("`@(&1P6R=N=U]T>7!E)UT@/2`G9W5E4AA8VLN=7!D871E7VYE='=OR=I<%]A9&1R97-S)SH@6V1P72P@)W1Y<&4G.B`G -M:7!S)WTI"B`@("`@("`@:68@)V1O;6%I;E]N86UE)R!N;W0@:6X@9"YK97ES -M*"D@;W(@9%LG9&]M86EN7VYA;64G72`]/2`G)SH*("`@("`@("`@("`@9%LG -M9&]M86EN7VYA;64G72`](")C;&]U9&YI;F4N:6YT97)N86PB"@H@("`@("`@ -M(&0@/2!04AA8VLN=7!D871E7VYE='=O2AS96QF+"!D8F%G*3H*("`@("`@("!R971U2`]("=E=&@G("L@;G5M("L@)VEP)PH@("`@("`@(&1P(#T@>WT*("`@("`@ -M("!I9BAK97D@:6X@5T*("`@("`@("`@("`@9'!;)VYE=&UA7!E(#T] -M(")P=6)L:6,B.@H@("`@("`@("`@("`@("`@9'!;)V=A=&5W87DG72`]('-E -M;&8N<49I;&4N9&%T85LG8VUD7VQI;F4G75LG9V%T97=A>2=="B`@("`@("`@ -M("`@(&5L2==(#T@7!E)SH@)VEP -M2!T;R!D96%L('=I=&@@=&AIPH@("`@("`@("`@("`@("`@ -M)V%D9"7!E(#T@7!E(ET*("`@("`@("`@("`@=7!D871E1&%T84)A9RAS96QF*0H@ -M("`@("`@("`@("!R971U&-E<'1I;VX@97)R;W(@)WMEV9I;&5N86UE?22!B965N(&UO=F5D+B(N9F]R;6%T*&5RV9I;&5N86UE?27!E"@H@("`@9&5F(&=E=$1A=&$HB(*("`@("`@("!W:71H(&]P96XH -M;W)I9U!A=&@L("=R8B7,H*2!E;'-E(&1A -M=&%;)W!U8FQI8U]I<"=="@H@("`@("`@(&EN:71I86Q?9&%T82`](&-L5]I<"AI<"P@:6YI=&EA;%]D871A6R=C;VYF -M:62<@:6X@9&)A9ULG8V]N9FEG)UTN -M:V5Y5]I<"AC;',L(&EP+"!P5]I -M<"`]($9A;'-E"B`@("`@("`@:68@:7`@/3T@<')I=F%T95]G871E=V%Y7VEP -M.@H@("`@("`@("`@("!N97=?:7!?;6%T8VAE5]I<`H*("`@($!C;&%S0`````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````,#`P,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL -M92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2!S=&%T=7,*"F9R;VT@8W,N0W-#;VYF:6<@:6UP;W)T($-S -M0V]N9FEG"F9R;VT@;W!T<&%R7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R -M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T -M"B,*(R`@(&AT='`Z+R]W=WB`D,2!="G1H96X*("`@(&5C:&\@(D9A:6P@ -M=&\@9FEN9"!64$X@<&5E7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2`]('9P;ELG=G!N7W-E2!I;B!D -M8F%G+FME>7,H*2!A;F0@;F]T(&]P.@H@("`@("`@(&1E;"AD8F%G6VME>5TI -M"B`@("!E;'-E.@H@("`@("`@(&1B86=;:V5Y72`]('9P;@H@("`@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H -M='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI -M8V5N2`] -M(')O=71E6R=N971W;W)K)UT*("`@("`@("!D8F%G6VME>5T@/2!R;W5T90H@ -M("`@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R -M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T -M"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ -M=&AE($QI8V5N2`]('9P -M;ELG<&5E71H;VX*(R!, -M:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%3 -M1BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS -M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E -M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!F$EN"@H*<&%S&ES=',H9V5T5&]K96Y&:6QE*"DI.@H@("`@("`@('=I=&@@;W!E -M;BAG9714;VME;D9I;&4H*2P@)W(G*2!A2P@=F%L -M=64@/2!L:6YE+G-T7!E(#T@ -M7!E(#T]("=S96YD7VUY7W!A7-L;V7-L;V7-L;V7-L;V2!I -M<"]P87-S=V]R9%LE7-L;V7-L;V&-E<'0@2V5Y8F]A&-E<'1I -M;VXL(&4Z"B`@("`@("`@0`````````````````````````````````` -M`````````````````````````````````````````````````````````#`P -M,#`W-34`,#`P,36]U -M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC -M('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E -M<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NFEP7V9I;&4B"B`@("!E -M8VAO(")$96QE=&EN9R!D:6%G;F]S=&ECFEP7V9I;&4B -M"F5L6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ -M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N0H*"F1E9B!M97)G92AD8F%G+"!D871A*3H*("`@("(B(B!3:6UP;'D@ -M;W9E&ES='-I;F<@8F%G(&%S+"!T:&4@=VAO;&4@8V]N -M9FEG=7)A=&EO;B!I2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N4EP("@I -M>PH@(&QO8V%L(&EP/20Q"B`@9F]R(&1E=B!I;B!@;',@+3$@+W-Y6]U(&UA>2!N;W0@=7-E('1H -M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N -MWT*("`@("`@("!S96QF+F-H86YG960@/2!;70H@("`@("`@('-E -M;&8N9&5V:6YF;R`]($-S2&5L<&5R+F=E=%]D979I8V5?:6YF;R@I"B`@("`@ -M("`@2@I"B`@("`@("`@("`@(&5L2=="B`@("`@ -M("`@("`@('-L:6YE(#T@(F1H8W`M"P@:7`I"B`@("`@("`@("`@('-E;&8N -M8V]N9BYS96%R8V@H2D*("`@("`@("`@("`@ -M96QS93H*("`@("`@("`@("`@("`@(&QI&-E -M<'0@17AC97!T:6]N(&%S(&4Z"B`@("`@("`@("`@(&QO9V=I;F2!C;VYT2!R96-E:79E($1(0U!.04LN"B`@("`@ -M("`@(R!7:&5N(%9-(&ES(&5X<'5N9V5D+"!I=',@86-T:79E(&QE87-E(&%N -M9"!$2$-0+T1.4R!C;VYF:6<@:7,@<')O<&5R;'D@5LG;6%C7V%D9')E5LG9&5F875L=%]G871E=V%Y -M)UT*"B`@("!D968@861D7VAO6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7!E2`]($9A;'-E"B`@("`@("`@ -M9&5V(#T@)R<*("`@("`@("!F;W(@:6YT97)F86-E(&EN(&EN=&5R9F%C97,Z -M"B`@("`@("`@("`@(&EF(&1E=B`]/2!I;G1E&5C=71E*&-O;6UA;F0I"B`@("`@("`@("`@("`@("!I9B!D9795<#H*("`@ -M("`@("`@("`@("`@("`@("!L;V=G:6YG+FEN9F\H(D1E=FEC92`E65T+"!L970G -M5]I9E]N965D960H"B`@ -M("`@("`@("`@("`@("`B)7,O)7,B("4@*'-E;&8N0U-?5$5-4$Q!5$537T1) -M4BP@5]I9E]N965D960H"B`@("`@("`@("`@("(E -M&5C("1$045-3TX[+RTM97AE8R`D1$%%34].("TM("TM=G)R<#LO9R(@+V5T -M8R]I;FET+F0O:V5E<&%L:79E9"R(L(")] -M(BP@R(L(")](BP@6PH@("`@("`@("`@("`@("`@("`@ -M("`@(DE0=C1?861D&5C=71E*")R;2`M2`S,"!S96-O;F1S"B`@("`@("`@:&5A&ET:6YG -M(B`E("AE&5C=71E -M*"(E&PR='!D -M(BP@(G-T;W`B*0H@("`@("`@($-S2&5L<&5R+G-E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I -M<"@I*2YS=&]P*"D*"B`@("`@("`@&5C=71E*&-M9#(I"B`@("`@("`@("`@(&1E=B`] -M(&EN=&5R9F%C92YG971?9&5V:6-E*"D*"B`@("`@("`@8VUD(#T@(B5S("U# -M("5S(B`E("AS96QF+D-/3DY44D%#2T1?0DE.+"!S96QF+D-/3DY44D%#2T1? -M0T].1BD*("`@("`@("!#&5C=71E*"(E&PR='!D(BP@(G-T;W`B*0H*("`@ -M("`@("!I;G1E&5C=71E*&-M9"D*("`@("`@("`@("`@("`@(&QO9V=I -M;F2D*("`@("`@("`@ -M("`@("`@(&5X8V5P="!%>&-E<'1I;VXZ"B`@("`@("`@("`@("`@("`@("`@ -M;&]G9VEN9RYE&5C=71E*"(E&5C=71E*"(E&PR='!D(BP@(G)E -M2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@("`@ -M("`@("!I9B!G871E=V%Y.@H@("`@("`@("`@("`@("`@("`@(')O=71E+F%D -M9%]R;W5T92AD978L(&=A=&5W87DI"@H@("`@("`@("`@("`C(%1H92!F:7)S -M="!P=6)L:6,@:6YT97)F86-E(&AA&5C=71E -M*")A2!C;VYN=')A8VMD"B`@("`@("`@(B(B"B`@("`@("`@ -M;&EN97,@/2!;70H@("`@("`@(&QI;F5S+F%P<&5N9"@B7'1<=%QT25!V-%]A -M9&1R97-S("5S7&XB("4@(C$R-RXP+C`N,2(I"B`@("`@("`@;&EN97,N87!P -M96YD*")<=%QT7'1)4'8T7V%D9')E7!E(&%N9"!D96-I9&5S(&EF(&ET(&ES(&%N(&EN=&5R -M;F%L(&%D9')E0H@("`@("`@(%1H92!N97<@8V]D92!A -M;'-O(&=I=F5S('1H92!P;W-S:6)I;&ET>2!T;R!C;&]U9'-T86-K('1O(&AA -M=F4@82!H>6)R:60@9&5V:6-E"B`@("`@("`@=&AA="!C;W5L9"!F=6YC=&EO -M;B!A2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N -M;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B971H,2)]"@I3 -M5$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S:"`M8R`@)VEF -M(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@96QS92!E8VAO -M(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@(")V<&-R;W5T -M97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@6R`D,"`]/2!< -M(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ"B`@("`@("`@ -M("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@("`@("`@(&-M -M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U -M8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@("`@("`@;&]G -M9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S(B`E('-T871E -M7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X96-U=&4H7!E*"E=(&%N9"!S=&%T92`]/2`B -M34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE8W5T92AC;60I -M"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@("`@("`@(&5X -M96-U=&4H8VUD*0H*"F1E9B!I&5C=71E*")M;W5N="!T -M;7!F6XH=F%L*3H*("`@(&EF('9A;#H*("`@("`@("!R -M971U&5C=71E*")I<"!A9&1R('-H;W<@?&=R97`@+78@ -MWT*("`@("`@("`@("`@=&];)VEP)UT@ -M/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A;'-;+3%="B`@ -M("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@("(B(@H@("`@ -M9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G*")3879I;F<@ -M:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C=71E*")S>7-T -M96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I;F7-T96UC=&P@&5C=71E*")K:6QL("U(55`@)7,B -M("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D;G-M87-Q(BP@ -M(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O0`````````````````````````````````````````````` -M`````````````````````````````````````````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E -M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI -M8V5N'1D;G,H*3H*("`@("`@("`@("`@9&YS+F%P<&5N9"AS -M96QF+F1A=&%;)W)O=71E2==(#T@=F%L"@H@("`@9&5F(&=E=%]N971M87-K*'-E;&8I.@H@ -M("`@("`@(",@5V4@;F5E9"!T;R!F:7@@:70@<')O<&5R;'DN($D@:G5S="!A -M9&1E9"!T:&4@:68L(&%S($EA;B!D:60@:6X@&-E<'1I;VXN"B`@("`@("`@:68@)W)O=71E6]U -M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC -M('=I=&@@=&AE($QI8V5N"YS=')I -M<"@I(&9O2!A -M9'9A;F-E9"(L("TQ*0H@("`@("`@(&-R;VXN8V]M;6ET*"D*"B`@("!D968@ -M&-L=61E9%]H96%L=&A?8VAE8VMS(ET*("`@("`@("`@("`@:&-? -M9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K0`````````` -M```````````````````````````````````````````````````````````` -M`````````````````````#`P,#`W-34`,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N7,H*3H*("`@("`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@ -M("`@(R!P2!P&ES=',Z(')U;&4])7,@=&%B;&4])7,B+"!F=ULR72P@;F5W7W)U;&4N -M9V5T7W1A8FQE*"DI"B`@("`@("`@("`@(&5L2`](&9W6S)="B`@("`@("`@("`@("`@("!I9B!F=ULQ72`]/2`B9G)O;G0B -M.@H@("`@("`@("`@("`@("`@("`@(&-P>2`](&-P>2YR97!L86-E*"2DI"B`@("`@("`@("`@("`@("`C(%1H97)E(&%R92!S;VUE -M(&ES3H*("`@("`@("`@ -M("`@=&%B;&4@/2`G)PH@("`@("`@("`@("!F;W(@:2!I;B!O<&5N*"(O971C -M+VEP=&%B;&5S+VEP=&%B;&5S+25S(B`E('1Y<&4I.@H@("`@("`@("`@("`@ -M("`@:68@:2YS=&%R='-W:71H*""`]/2!R=6QE70H* -M"F-L87-S($-S3F5T9FEL=&5R*&]B:F5C="DZ"@H@("`@9&5F(%]?:6YI=%]? -M*'-E;&8I.@H@("`@("`@('-E;&8N7!E)RP@)RTM0`````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```P,#`P-S4U`#`P,#$W-3``,#`P,32!O9B!T:&4@3&EC96YS92!A=`HC"B,@ -M:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&ES=',L(&5L5]P87)A;2D*("`@("`@("!E;'-E -M.@H@("`@("`@("`@("!L;V=G:6YG+FEN9F\H(D%D9&EN9R!R;W5T93H@9&5V -M("(@*R!D978@*R`B('1A8FQE.B`B("L*("`@("`@("`@("`@("`@("`@("`@ -M("`@('1A8FQE("L@(B!N971W;W)K.B`B("L@861D2!P87)A;65T97(@5]P87)A;2D*("`@("`@("!E;'-E.@H@("`@("`@ -M("`@("!L;V=G:6YG+FEN9F\H(D%D9&EN9R!R;W5T93H@9&5V("(@*R!D978@ -M*R`B('1A8FQE.B`B("L*("`@("`@("`@("`@("`@("`@("`@("`@('1A8FQE -M("L@(B!N971W;W)K.B`B("L@861D2DZ"B`@("`@("`@(B(B("!!9&0@82!D969A=6QT(')O=71E"B`@("`@("`@ -M.G!A&-E<'1I;VXH(D=A=&5W87D@8V%N;F]T(&)E($YO;F4N(BD*"B`@ -M("`@("`@:68@0H@("`@("`@("`@("!L;V=G -M:6YG+FEN9F\H(D%D9&EN9R!D969A=6QT(')O=71E(BD*("`@("`@("`@("`@ -M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI -M86YC90HC('=I=&@@=&AE($QI8V5N0`````````````````````` -M```````````````````````````````````````````````````````````` -M`````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI -M86YC90HC('=I=&@@=&AE($QI8V5N'DO:&%P2YC9F'DO:&%P2YC9F2@I"B`@("`@("`@9F]R('@@:6X@8V]N9FEG.@H@("`@("`@("`@("!; -M9FEL93$N87!P96YD*'2A(05!23UA97T-/ -M3D9?5"P@2$%04D]865]#3TY&7U`I"@H@("`@("`@("`@("!P2!O9B!T:&4@3&EC96YS92!A=`HC -M"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG -M971?='EP92@I"B`@("`@("`@5]I9E]N965D960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L -M"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE -M,B]S:71E2DI"B`@("`@("`@("`@(&9I;&4N&5C=71E,B@B7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2AS96QF*3H*("`@("`@("!S96QF+F-O;F9I9R`](%M="B`@("`@("`@ -M"P@;&EN -M92!I;B!E;G5M97)A=&4H%T@/2!R97!L86-E("L@ -M(EQN(@H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!S96%R8V@H"P@;&EN92!I;B!E;G5M97)A=&4H -M"P@;&EN92!I;B!E;G5M97)A=&4H -M2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N0`````````````````````````````````````` -M````````````````````````````````````````````````````````,#`P -M,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N"`](&EN="@G)RYJ;VEN*%MD:6=I="!F;W(@9&EG:70@:6X@9&5V:6-E(&EF -M(&1I9VET+FES9&EG:70H*5TI*0H@("`@("`@("`@("`@("`@:68@9&5V:6-E -M7W-U9F9I>"`\(&QO=V5S=%]D979I8V4Z"B`@("`@("`@("`@("`@("`@("`@ -M;&]W97-T7V1E=FEC92`](&1E=FEC95]S=69F:7@*("`@("`@("`@("`@("`@ -M("`@("!G=65S=%]I;G1E5]C:61R*'-E;&8I.@H@("`@("`@ -M(')E='5R;B`B)7,O)7,B("4@*'-E;&8N9V5T7V=A=&5W87DH*2P@F4@:6X@8FETF4B -M*0H*("`@(&1E9B!G971?9&5V:6-E*'-E;&8I.@H@("`@("`@(')E='5R;B!S -M96QF+F=E=%]A='1R*")D979I8V4B*0H*("`@(&1E9B!G971?8VED7!E)UT@:6X@5E)24%]465!% -M4SH*("`@("`@("`@("`@7!E)UT@:6X@6R=G=65S="==.@H@("`@("`@("`@ -M("!R971U7!E)UT@:6X@6R=P=6)L -M:6,G73H*("`@("`@("`@("`@7-T -M96T*("`@("`@("`B(B(*("`@("`@("!S96QF+F1E=FQIWT*("`@("`@("!S96QF+F%D -M9')E7!E*"D@ -M:6X@6R)P=6)L:6,B72!A;F0@861D2)= -M*0H@("`@("`@("`@("`@("`@&UA7!E)UT*("`@("`@("!R971U&9F9F9F9F9F(ETI"@H@("`@("`@('-E;&8N9G7!E*"D@ -M:6X@6R)P=6)L:6,B73H*("`@("`@("`@("`@7!E*"D@:6X@ -M6R)P=6)L:6,B73H*("`@("`@("`@("`@#4R-"\P>&9F -M9F9F9F9F(B`E("AS96QF+F1E=BP@2)=(&%N9"!S96QF+F%D9')E2)=(&%N9"!S96QF+F%D9')E7!E*"D@:6X@6R)P -M=6)L:6,B72!A;F0@*&YO="!S96QF+F-O;F9I9RYI2!T -M:&4@;6%S=&5R(&)A8VMU<"!F=6YC=&EO;G,*("`@("`@("`@("`@("`@(&EF -M(&YO="!C;61L:6YE+FES7W)E9'5N9&%N="@I.@H@("`@("`@("`@("`@("`@ -M("`@(&EF(&UE=&AO9"`]/2`B861D(CH*("`@("`@("`@("`@("`@("`@("`@ -M("`@0W-087-S=V13=F,HWT*("`@("`@("!C -M;60@/2`H(FEP(&%D9'(@2!K965P86QI -M=F5D(&]R(&YO=`H@("`@("`@("(B(@H@("`@("`@(&EF(")N=U]T>7!E(B!I -M;B!S96QF+F%D9')E2==*0H@ -M("`@("`@(&EF(&YO="!S96QF+F-L+FES7W)E9'5N9&%N="@I(&%N9"`H;F]T -M('-E;&8N861D2==(&]R('-E;&8N861D2==(#T](").;VYE(BDZ"B`@("`@("`@("`@(&-M9"`](")A2!H87!P96X@8G5T(&1I9"`Z*0H@("`@ -M("`@(",@270@;65A;G,@86X@87!A8VAE(&9I;&4@9V]T(&]R<&AA;F5D(&%F -M=&5R(&$@9W5E2@I"@H@("`@9&5F -M(&ES7V=U97-T7V=A=&5W87DH7,O;F5T+V-O7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ -M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E -M(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O -M'!R97-S(&]R(&EM<&QI960N("!3 -M964@=&AE($QI8V5N"(I.@H@("`@("`@("`@("!I=&5M&5C -M=71E*")K:6QL("TY("5S(B`E('!I9"D*"B`@("!D968@9W)E<"AS96QF+"!S -M='(I.@H@("`@("`@(&9O"(I.@H@("`@("`@("`@("!I9B!I+F9I;F0H7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C -M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F -M('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L -M:6-A8FQE(&QA=R!O'!R97-S(&]R -M(&EM<&QI960N("!3964@=&AE($QI8V5N2!O -M9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI -M8V5NWT*("`@("`@("!S96QF+F1B(#T@1&%T -M84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF+F1B+G-A=F4HWT*("`@("`@ -M("!R971U&1I9V5S="@I"@H@("`@9&5F(&=E=%]G871E=V%Y -M*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I;B!S96QF+FED871A*"DZ -M"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A*"E;)V=A=&5W87DG70H@ -M("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G971?=7-E7V5X=%]D;G,H -M'1D;G,G -M70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G971?861V97)T7VEN -M="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN="<@:6X@0`````````````````````````````````````````````````````````` -M````````````````````````````````````````,#`P,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7!E&5C=71E*&-M9"D*("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")! -M9&1E9"!R=6QE("5S(&9O0`````````````````````````````````````````````` -M````````````````````````````````````````````````````````,#`P -M,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET*#(I -M"B`@("!F;W(@;W!T+"!A7,N97AI -M="@R*0H*("`@(&9O&ES=',H9&%T869I;&4I.@H@("`@("`@(&]S -M+G)E;6]V92AD871A9FEL92D*"@ID968@8W)E871E9FEL92AI<"P@9F]L9&5R -M+"!F:6QE+"!D871A*3H*("`@(&1E3H* -M("`@("`@("`@("`@;W,N;6%K961I2!E>&ES=',L('=E(&1O(&ET('1H:7,@=V%Y -M(&9O0H@("`@("`@("`@("!I9B!E+F5R&ET*#$I"B`@("`@("`@ -M:68@;W,N<&%T:"YE>&ES=',H;65T86UA;FEF97-T*3H*("`@("`@("`@("`@ -M9F@@/2!O<&5N*&UE=&%M86YI9F5S="P@(G(K82(I"B`@("`@("`@("`@(&5X -M9FQO8VLH9F@I"B`@("`@("`@("`@(&EF(&9I;&4@;F]T(&EN(&9H+G)E860H -M*3H*("`@("`@("`@("`@("`@(&9H+G=R:71E*&9I;&4@*R`G7&XG*0H@("`@ -M("`@("`@("!U;F9L;V-K*&9H*0H@("`@("`@("`@("!F:"YC;&]S92@I"B`@ -M("`@("`@96QS93H*("`@("`@("`@("`@9F@@/2!O<&5N*&UE=&%M86YI9F5S -M="P@(G&9L;V-K*&9H*0H@("`@("`@("`@("!F -M:"YW&9L;V-K*&9H*0H@("`@9F@N -M=W)I=&4H96YT3H*("`@("`@("!F -M;&]C:RAF:6QE+"!,3T-+7T58*0H@("`@97AC97!T($E/17)R;W(@87,@93H* -M("`@("`@("!P71H;VX*(R!,:6-E;G-E9"!T -M;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@ -M;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* -M(R`@(&AT='`Z+R]W=WFEP9FEL90H*"B,@0W)E871E('II<"!A -MFEP -M7V9I;&5S*&9I;&5S*3H*("`@(&9,:7-T(#T@9FEL97,*("`@(&-O;7!R97-S -M:6]N(#T@>FEP9FEL92Y:25!?1$5&3$%4140*("`@('1I;65?&5C=71E7W-H96QL7W-C3H*("`@("`@("`@ -M("`@("`@("`@("!Z9BYW3H*("`@("`@("!C;&5A;G5P*&9I;&5S7V9R;VU?F8N8VQO&5C=71E7W-H96QL -M7W-C&-E<'0@3U-%#H*("`@("`@("`@("`@9&5L971E7W1M<%]F:6QE7V-M9"`]("=R -M;2`M9B`E3H*("`@("`@("`@("`@9BYC;&]S92@I"B`@("!R971U"YS<&QI -M="AC;60I+"!S=&1E&-E<'0@3U-%&5C=71E(&)A'0H -M>FEP7V9I;&4L(&9I;&5S7V9O=6YD+"!F:6QE"YS<&QI="AC;&5A;G5P7V-M9"DI"@H* -M:68@7U]N86UE7U\@/3T@)U]?;6%I;E]?)SH*("`@(&9I;&5,:7-T(#T@7)I9VAT(&]W -M;F5R6]U -M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O -M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W -M=WW!R -M:6YT("0R.WTG('P@6]U(&UA>2!N -M;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@ -M=&AE($QI8V5N2!T;R!E;G-U2!T;R!I=',@<')E=FEO -M=7,@'D@=&\@<')E=FEO=7,@'DN8V9G+F]L9"`O971C+VAA<')O>'DO:&%P2YC9F'DN8V9G+FYE=PH@(&9I"GT*"@IL;V=G97(@+70@8VQO=60@(B0H8F%S -M96YA;64@)#`I.B!%;G1E'D*'D@2P@8V]N9FEG=7)I -M;F<@9FER97=A;&PB"@HC(&EP=&%B;&5S(&5N=')Y('1O(&5N'D@2`D861D961)<',@ -M)')E;6]V961)<',@)'-T871S27`*"FEF(%L@)#\@+6=T(#`@70IT:&5N"B`@ -M;&]G9V5R("UT(&-L;W5D(")&86EL960@=&\@87!P;'D@9FER97=A;&P@'D@8V]N9FEG(@H@(",@4F5S=&]R92!T:&4@3$(*("!R97-T;W)E7VQB -M"@H@(&QO9V=E&ET(#$@)&QO8VL@)&QO8VME -M9`IE;'-E"B`@(R!296UO=F4@8F%C:V5D=7`@:7!T86)L92!R=6QE6]U(&UA>2!N;W0@=7-E('1H:7,@ -M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E -M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI -M8V5N7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z -M+R]W=WPH@('-U9&\@:7!T86)L97,@+70@;6%N9VQE("U$(%!215)/ -M551)3D<@+6D@)&1E=B`M;2!S=&%T92`M+7-T871E($Y%5R`M:B!#3TY.34%2 -M2R`M+7-E="UM87)K("1T86)L94YO(#(^+V1E=B]N=6QL"@H@('-U9&\@:7`@ -MV1E=CHS?2DI"G1A8FQE3F%M93TB5&%B -M;&5?)&1E=B(*"FEF(%L@)&%C=&EO;B`]/2`G861D)R!="G1H96X*("!P;'5G -M7VYI8PIE;'-E"B`@=6YP;'5G7VYI8PIF:0H````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````&]P="]C;&]U9"]B:6XO:7!S96-T=6YN96PN6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC -M90HC('=I=&@@=&AE($QI8V5N#4R-2(*=G!N:6YM87)K/2(P>#4R-"(*"G5S86=E*"D@>PH@("`@<')I;G1F -M(")5'0@ -M:&]P/B`M3X@+6D@/&EK92!P;VQI -M8WD^("UT(#QI:V4@;&EF971I;64^("U4(#QEPH@('-U9&\@:7!T86)L97,MPH@(&1I2!<"B`@("!P:&%S93(@<&]L:6-Y -M/21ER1R:6=H=&YE='-](B`^/B`D=G!N8V]N -M9F9I;&4@)B8*("!S=61O(&5C:&\@(B`@='EP93UT=6YN96PB(#X^("1V<&YC -M;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!A=71H8GD]VEK96QI9F5T:6UE?7,B(#X^("1V<&YC;VYF9FEL92`F)@H@ -M('-U9&\@96-H;R`B("!E2(@/CX@)'9P;F-O;F9F:6QE -M("8F"B`@2!F;W(@'1H;W`](B1/4%1!4D&ET("1R970*```````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````;W!T+V-L;W5D+V)I;B]I<&%S2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&QO8V%L('!U8DEP -M/20H96-H;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?22!E>&ES -M=',B"GT*"F%D9%]V<&Y?8VAA:6Y?9F]R7VEP("@I('L*("!L;V-A;"!P=6)) -M<#TD*&5C:&\@)#$@?"!A=VL@+48G+R<@)WMPPH@(&QO8V%L('!U8DEP/20H96-H;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?2PH@(&QO8V%L -M('!U8DEP/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R -M:6YT("0Q?2W!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)A -MW!R:6YT("0R?2W!R:6YT("0R -M?25]R;W5T97-?9G)O;5]M86EN("1T86)L94YA;64*(R!.3U1%.B!T:&ES -M("!E;G1R>2!W:6QL(&)E(&1E;&5T960@:68@=&AE(&EN=&5R9F%C92!IW!R:6YT -M("0Q?2PH@(&EF(%L@(B1S9FQA9R(@/3T@(C`B -M(%T*("!T:&5N"B`@("!R971UW!R -M:6YT("0Q?2W!R:6YT("0R?22!I<"!I;F9O(&EN=&\@9FEL92P@ -M=7-E9"!O;B!R961U;F1A;G0@W!R:6YT("0Q?2&ES -M=&EN9TEP36%S:STD*'-U9&\@:7`@861DPH@(&QO8V%L('!U8DEP/20Q -M"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP -M/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)A&ES=&EN9TEP36%S:STD*'-U9&\@:7`@861DPH@("`@(V5N86)L92!R<',@ -M86YD(')F%QN(B`D;G5M*0H@("`@("`@("`@96-H -M;R`D:&5X.PH@("`@("`@("`@(V5N86)L92!R<',*("`@("`@("`@(&5C:&\@ -M)&AE>"`^("]S>7,O8VQA&ET -M("0_("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1!9FQA9R(@/3T@(C$B(%T* -M=&AE;@H@(&%D9%]A;E]I<"`@)'!U8FQI8TEP("`F)@H@(&%D9%]F=U]C:&%I -M;E]F;W)?:7`@)'!U8FQI8TEP"B`@=6YL;V-K7V5X:70@)#\@)&QO8VL@)&QO -M8VME9`IF:0H*:68@6R`B)&9F;&%G(B`]/2`B,2(@72`F)B!;("(D1&9L86&ET("0_("1L;V-K("1L;V-K960* -M9FD*"G5N;&]C:U]E>&ET(#`@)&QO8VL@)&QO8VME9`H````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````!O<'0O8VQO=60O8FEN+VQI;F5?961I="YP>0`````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````,#`P,#2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2UL:6YE(&5D:71I;F<@;V8@8V]N9FEG=7)A=&EO;B!F -M:6QE&%M<&QE('1H97)E)W,@82!D;W5B;&4@97-C87!E(&]F('1H92!B86-K2!M -M871C:&5D(&%L;"!F:6QE3H* -M("`@("XN+B`@(&]S+G5N;&EN:R@G9&]C=&5S="UV:&]S=',N8V]N9B55N=7-E9$QO8V%L"B`@ -M("`@("`@("`@('-T870@/2!.;VYE"B`@("`@("`@("`@('=I=&@@;W!E;BAS -M96QF+F9I;&5N86UE+"`G&-E<'1I;VXH -M(DUA9&4@=&]O(&UA;GD@961I=',B*0H@("`@("`@("`@("`@("`@("`@("`@ -M("`@("`@96QI9B!R96UA:6YI;F=?8V]U;G0@/3T@,#H*("`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@("`@("`@ -M("`@("`@("!C:&%N9V5D7VQI;F4L('-U8G,@/2!E9&ET+G!A='1E2AS96QF+F9I;&5N86UE+"!B86-K=7!?9FEL96YA;64I"B`@("`@("`@("`@ -M("`@("!O3H*("`@("`@("`@("`@:68@8VAA;F=E -M9%]F:6QE(&ES(&YO="!.;VYE.B`@("`@("`@("`@("`@("`@("`@("`@("`@ -M("`@("`C(&9A:6QE9"P@8VQE86X@=7`*("`@("`@("`@("`@("`@(&-H86YG -M961?9FEL92YC;&]S92@I"B`@("`@("`@("`@("`@("!O6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC -M90HC('=I=&@@=&AE($QI8V5N2!R=6QE2!O9B!T:&4@3&EC96YS92!A -M=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O -M'!R97-S(&]R(&EM<&QI960N("!3 -M964@=&AE($QI8V5N7,I.@H*("`@(&5X:7-T:6YG7VME>7,@/2!;70H@ -M("`@;F5W7V5T:%]K97D@/2!.;VYE"@H@("`@9F]R(&LQ+"!V,2!I;B!G=65S -M=&YE=%]D:6-T+FET97)I=&5M7,@ -M86YD(&QE;BAV,2D@/B`P.@H@("`@("`@("`@("!E>&ES=&EN9U]K97ES+F%P -M<&5N9"AK,2D*"B`@("!I9B!N;W0@97AI2`Z.B!296UO=FEN9R!G=65S="!N971W;W)K -M+BXN(BD*("`@("`@("!R971U2!T;R!B92!S -M971U<`H@("`@)R2!C;VYF:6=U&ES=',@/2!&86QS90H*("`@(&9O2!P2!C;VYF:6=U2`Z.B!02`Z.B!.;R!'=65S=$YE='=O7,N87)G -M=ELQ72D*("`@('!R;V-E7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=WPH@(&QO8V%L(%]P -M:60])"AP:61O9B!D;G-M87-Q*0H@(&9OW!R:6YT("0R?20H@(&EF(%L@)&EP -M=C0@70H@('1H96X*("`@(&5C:&\@(C`@)&UA8R`D:7!V-"`D:&]S="`J(B`^ -M/B`D1$A#4%],14%315,*("!F:0H@(&EF(%L@)&EP=C8@70H@('1H96X*("`@ -M(&5C:&\@(C`@)&1U:60@)&EP=C8@)&AO6]U(&UA>2!N -M;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@ -M=&AE($QI8V5N&-E<'0@3U-%6]U&-E<'1I;VX@;V-C=7)R960Z("5S(B`E(&4*("`@("`@("`@ -M("`@7!E(#T]("=T0`````````````` -M```````````````````````````````````````````````````````````` -M`````````````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ -M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&-L=61E9%]H96%L=&A?8VAE -M8VMS(ET@/2!D871A6R)E>&-L=61E9%]H96%L=&A?8VAE8VMS(ET*("`@(&EF -M(")H96%L=&A?8VAE8VMS7V-O;F9I9R(@:6X@9&%T83H*("`@("`@("!D8F%G -M6R)H96%L=&A?8VAE8VMS7V-O;F9I9R)=(#T@9&%T85LB:&5A;'1H7V-H96-K -M7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z -M+R]W=WW!R:6YT("0Q?2<*?0H* -M:7!T86)L97-?*"D@>PH@("!L;V-A;"!O<#TD,0H@("!L;V-A;"!P=6)L:6-? -M:7`])#(*("`@;&]C86P@:7-?=G!C/69A;'-E"B`@(&QO8V%L(&9O7-T96UC=&P@:7,M86-T -M:79E(&EPS$N+C5]"B`@("!D;PH@("`@("!L;V=G97(@+70@8VQO -M=60@(B0H8F%S96YA;64@)#`I.B!W86ET:6YG(&EP7-T96UC=&P@:7,M86-T:79E(&EP7-T96UC=&P@:7,M86-T:79E(&EP7-T96UC=&P@&PR='!D"B`@("`@("`@("`@("`@("`@("`@2`Z(%!32R!<(B1I<'-E8U]P -M&PR -M='!D"@H@("!I<'1A8FQEPH@("!L;V-A;"!P=6)L:6-?:7`])#$*"B`@(&EPPH@("!L;V-A;"!U/20Q"B`@(&QO -M8V%L('!A)'4@7"H@7"(D -M<&%S&ET(#(*"0D[.PH@(&5S86,*9&]N90H*:68@6R`B)&1E -M=B(@/3T@(B(@70IT:&5N"B`@("!D978](F5T:#(B"F9I"@II9B!;("(D8VED -M&ET(#(*6R`B)&-R96%T92(@/3T@(C$B(%T@)B8@6R`B)&QF;&%G -M)'!F;&%G)')F;&%G)'-F;&%G(B`A/2`B,3$Q,2(@72`F)B!U&ET(#(*"FEF(%L@(B1CW!R:6YT("0Q?27)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS -M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E -M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,@/2!;)V5T:#$G+"`G971H,B6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2!O9B!T:&4@ -M3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A -M8FQE(&QA=R!O2!O9B!T:&4@9&YS;6%S<2!F:6QE+@IC<"`B)$1( -M0U!?0T].1DE'7TU!24XB("`B)$1(0U!?0T].1DE'7TU!24Y?0D%+(@IC<"`B -M)$1(0U!?0T].1DE'(B`B)$1(0U!?0T].1DE'7T)!2R(*"B-E;7!T>2!T:&4@ -M8V]N9FEG(&9I;&4*96-H;R`^("1$2$-07T-/3D9)1PH*=F%R/2(D,2(*9&AC -M<%]R86YG93TB(@ID:&-P7V=A=&5W87D](B(*9&AC<%]N971M87-K/2(B"F1N -M'1?9&YS/20H96-H -M;R`B)$--1$Q)3D4B('P@9W)E<"`M;R`B=7-E97AT9&YS/71R=64B*0IW:&EL -M92!;("UN("(D=F%R(B!="F1O"B!V87(Q/20H96-H;R`D=F%R('P@8W5T("UF -M,2`M9"`B+2(I"B!R;W5T97)I<#TD*"!E8VAO("1V87(Q('P@8W5T("UF,2`M -M9"`B.B(@*0H@9V%T97=A>3TD*&5C:&\@)'9AV1H8W!?V1H8W!?;F5T;6%S:WTB)V1H8W`M;W!T:6]N/71A9SIR86YG -M92W9A -MVQO9WTB8&=R97`@(EYD:&-P+6]P=&EO;CTV(B`B)$1(0U!?0T].1DE'7TU! -M24XB8")<;B(*;&]G/2(D>VQO9WTB8&=R97`@(EYD:&-P+6]P=&EO;CUO<'1I -M;VXZVQO -M9WTB8&=R97`@(EYD:&-P+7)A;F=E/2(@(B1$2$-07T-/3D9)1U]-04E.(F`B -M7&XB"@II9B!;("(D;&]G(B`A/2`G7&Y<;EQN)R!="G1H96X*("-#;&5A;FEN -M9R!T:&4@97AI9&AC<"UR86YG93TO9"<@(B1$2$-07T-/3D9)1U]-04E.(@IF:0H*(W=R -M=&EN9R!T:&4@;F5W(&-O;F9I9R!I;G1O('1H92!C;VYF:6<@9FEL92X*96-H -M;R`M92`B)&1H8W!?&ET("1R -M97-U;'0@)&QO8VL@)&QO8VME9`H````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````````````````````!O -M<'0O8VQO=60O8FEN+V-S7V1H8W`N<'D````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7,@/2!S970H*0H@("`@("`@(&9O2`A/2`G -M:60G(&%N9"!E;G1R>5LG;6%C7V%D9')E7,N861D*&ME>2D* -M("`@("`@("`@("`@("`@(&)R96%K"@H@("`@("`@(&EF(&1A=&%;)W)E;6]V -M92==(&%N9"!K97D@;F]T(&EN(')E;6]V95]K97ES.@H@("`@("`@("`@("!R -M96UO=F5?:V5Y2!I -M;B!R96UO=F5?:V5Y5TI"@H@("`@("`@(&1B86=;9&%T85LG:7!V-%]A9&1R97-S)UU=(#T@9&%T -M80H*("`@(')E='5R;B!D8F%G"@```&]P="]C;&]U9"]B:6XO8W-?8VUD;&EN -M92YP>0`````````````````````````````````````````````````````` -M```````````````````````````````````````````P,#`P-S4U`#`P,#$W -M-3``,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ -M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E -M(&%T"B,*(R`@(&AT='`Z+R]W=W2!O9B!T:&4@ -M3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A -M8FQE(&QA=R!O'!R97-S(&]R(&EM -M<&QI960N("!3964@=&AE($QI8V5N'DN8V9G("]E=&,O:&%P2]H87!R;WAY+F-F9RYO;&0*"B`@;78@)&YE -M=U]C;VYF:6<@+V5T8R]H87!R;WAY+VAA<')O>'DN8V9G"B`@:68@:&%P2`M<"`O=F%R+W)U;B]H87!R;WAY+G!I9"`M9B`O971C+VAA<')O>'DO:&%P -M2YC9F<@+7-F("0H8V%T("]V87(O'DN<&ED*3L@=&AE -M;@H@("`@;&]G9V5R("UT(&-L;W5D(").97<@:&%P2!I;G-T86YC92!S -M=6-C97-S9G5L;'D@;&]A9&5D+"!S=&]P<&EN9R!P'DO:&%P2YC9F<@)&YE=U]C;VYF:6<* -M("`@(&UV("]E=&,O:&%P2]H87!R;WAY+F-F9RYO;&0@+V5T8R]H87!R -M;WAY+VAA<')O>'DN8V9G"B`@("!H87!R;WAY("UP("]V87(O'DN<&ED("UF("]E=&,O:&%P2]H87!R;WAY+F-F9R`M2YP:60I"B`@("!R970],0H@(&9I"@IE>&ET("1R -M970*```````````````````````````````````````````````````````` -M`````````````````````````````````````````````````````')O;W0O -M;6]N:71O71H;VX*(R!,:6-E;G-E9"!T;R!T -M:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE -M"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@ -M(&AT='`Z+R]W=WWT*("`@('!A2`K)UTG*R(@(B`K("=;)RMP2LG -M72<@*R`B("(@*R!M2!O;F4@<&ED(&]R(&YO=`H@("`@:68@97AI=%-T871U6EN9R!F97<@;6]R92!T:6UEWT*("`@(&9A:6QI -M;F=?PH@("`@("`@("`@("`@("`@ -M(G-U8V-EPH@("`@("`@("`@("`@ -M("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EWT@(U-K:7`@WT*("`@(&9A:6QI;F=# -M:&5C:W,@/2!;70H@("`@:68@8VAE8VM4>7!E(#T](")B87-I8R(Z"B`@("`@ -M("`@;6]N:71297-U;'0L(&9A:6QI;F=#:&5C:W,@/2!M;VYI=%!R;V-E&-L=61E(#T@:&-?9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!H8U]D871A(&5L7!E*0H@("`@("`@("`@("`@("`@:68@;&5N*')E="D@ -M/3T@,#H*("`@("`@("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@ -M("`@("`@:68@(G-U8V-E7,N87)G=BD@/3T@,CH*("`@("`@("!I9B!S>7,N -M87)G=ELQ72`]/2`B861V86YC960B.@H@("`@("`@("`@("!M86EN*")A9'9A -M;F-E9"(I"B`@("`@("`@96QI9B!S>7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@ -M("`@("`@("`@("!M86EN*")B87-I8R(I"B`@("`@("`@96QS93H*("`@("`@ -M("`@("`@<')I;G1D*")%7!E(&]F('1E7,N87)G=BD*("`@(&5L0`````` -M```````````````````````````````````````````````````````````` -M```````````````````P,#`P-C0T`#`P,#$W-3``,#`P,371H;VX*(R!,:6-E -M;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@ -M=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ -M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E -M(&%T"B,*(R`@(&AT='`Z+R]W=W'!E8W1E9"`](%M="B`@("`@("`@ -M9&5S=$EP(#T@<&]R=$9O'0L('-R8U!O2!I -M;B!I<%1A8FQE4QI'!E8W1E -M9#H*("`@("`@("`@("`@("`@("`@("!I9B!I<%1A8FQE16YT'!E8W1E9$5N=')Y*2`]/2`M,3H*("`@("`@("`@("`@("`@("`@("`@("`@ -M9F]U;F1!;&P@/2!&86QS90H@("`@("`@("`@("`@("`@("`@("`@("!B4QI2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA -M=R!O'!R97-S(&]R(&EM<&QI960N -M("!3964@=&AE($QI8V5N$UE;6]R>55S86=E(&EN(&AE86QT:%]C -M:&5C:W-?9&%T82`B("L@7`H@("`@("`@("`@("`@(")S>7-T96U4:')E&ET*#`I"@H@("`@;6%X365M;W)Y -M57-A9V4@/2!F;&]A="AD871A6R)M87A-96UO7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@ -M(&UA:6XH*0H````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M'E?8VAE8VLN<'D````````````` -M```````````````````````````````````````````````````````````` -M`````````````#`P,#`V-#0`,#`P,36]U(&UA>2!N;W0@=7-E('1H -M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N -M41A=&$@86YD(")M87AC;VYN -M(B!I;B!H84-F9U-E8W1I;VYS6R)G;&]B86PB73H*("`@("`@("!I9B!H87!R -M;WAY1&%T85LB;6%X8V]N;B)=("$](&AA0V9G4V5C=&EO;G-;(F=L;V)A;")= -M6R)M87AC;VYN(EU;,%TN'E$871A(BD*("`@(&EF(&AA -M<')O>'E$871A(&ES($YO;F4@;W(@;&5N*&AA<')O>'E$871A*2`]/2`P.@H@ -M("`@("`@('!R:6YT(").;R!D871A('!R;W9I9&5D('1O(&-H96-K+"!S:VEP -M<&EN9R(*("`@("`@("!E>&ET*#`I"@H@("`@=VET:"!O<&5N*"(O971C+VAA -M<')O>'DO:&%P2YC9FWT*("`@(&-UWT*("`@(&9O41A=&$L(&AA0V9G4V5C=&EO;G,I"@H@("`@:68@ -M8VAE8VM-87A#;VYN(&%N9"!C:&5C:TQB4G5L97,Z"B`@("`@("`@<')I;G0@ -M(D%L;"!C:&5C:W,@<&%S&ET*#`I"B`@("!E;'-E.@H@ -M("`@("`@(&5X:70H,2D*"@II9B!?7VYA;65?7R`]/2`B7U]M86EN7U\B.@H@ -M("`@:68@;&5N*'-Y7,N87)G=ELQ72`]/2`B -M861V86YC960B.@H@("`@("`@(&UA:6XH*0H````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&ET*#`I"@H@("`@=&5M<&QA=&5697)S:6]N36%T8VAE -M65T('-E='5P(&%T("(@*R!R96QE87-E1FEL92`K7`H@ -M("`@("`@("`@("`@("`@("`B+"!S:VEP<&EN9RXB"B`@("`@("`@96QI9B!E -M>'!E8W1E9"`A/2!F;W5N9#H*("`@("`@("`@("`@<')I;G0@(E1E;7!L871E -M(%9E'!E8W1E9"`K("(L(&9O=6YD.B`B("L@9F]U;F0*("`@("`@ -M("`@("`@=&5M<&QA=&5697)S:6]N36%T8VAE'!E8W1E9"`K("(L(&9O=6YD.B`B("L@9F]U;F0*("`@("`@ -M("`@("`@&ET*#$I"@H*:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH* -M("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A;F0@2\````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````,#`P,#0`````````````````````````` -M```````````````````````````````````````````````P,#`P-C0T`#`P -M,#$W-3``,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS -M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E -M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W3U.;VYE*3H*("`@('=I=&@@ -M;W!E;B@G+W)O;W0O:&5A;'1H7V-H96-K2!I2!I5TN2D@/3T@,#H*("`@("`@("`@("`@("`@(&-O;G1I -M;G5E"B`@("`@("`@("`@(&ME>59A;"`](&5N=')Y+G-P;&ET*"(](BD*("`@ -M("`@("`@("`@:68@;&5N*&ME>59A;"D@/3T@,CH*("`@("`@("`@("`@("`@ -M(&1;:V5Y5F%L6S!=+G-T2]?7VEN:71?7RYP>0`````````````````````````````````````````` -M````````````````````````````````````````,#`P,#8T-``P,#`Q-S4P -M`#`P,#$W-3``,#`P,#`P,#$U-#``,3,V,C4Q-3`S,30`,#$W-S8R`"`P```` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````'5S=&%R("``9&%R2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO -M2!A<'!L:6-A8FQE(&QA=R!O'!R -M97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N0`````````````````````````````````` -M````````````````````````````````````````````````,#`P,#8T-``P -M,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#,Q,S(`,3,V,C4Q-3`S,30`,#$W-S8Q -M`"`P```````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````'5S=&%R("``9&%R2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET -M*#`I"@H@("`@;6EN1&ES:TYE961E9"`](&9L;V%T*&1A=&%;(FUI;D1IF4I("\@,3`R-`H*("`@ -M(&EF("AF6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI -M86YC90HC('=I=&@@=&AE($QI8V5N2!I;7!O7,I(#T](#`Z"B`@("`@ -M("`@<')I;G0@(D%L;"`B("L@7,@ -M87)E(')E86-H86)L92!V:6$@<&EN9R(*("`@("`@("!E>&ET*#`I"B`@("!E -M;'-E.@H@("`@("`@('!R:6YT(")5;G)E86-H86)L92!G871E=V%Y7,N87)G=ELQ72`]/2`B8F%S:6,B -M.@H@("`@("`@(&UA:6XH*0H````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````')O;W0O:&5A;'1H7V-H96-K0`````````````````````````````````````````````````````````` -M```````````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P -M,371H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD -M871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C -M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F -M('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&5C=71A8FQE71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E -M($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H -M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C -M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I -M"@H@("`@=VET:"!O<&5N*"2!O -M9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A -M<'!L:6-A8FQE(&QA=R!O'!R97-S -M(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N$-P=55S86=E(&EN(&AE -M86QT:%]C:&5C:W-?9&%T82!S>7-T96U4:')E&ET*#`I"@H@("`@;6%X0W!U57-A9V4@/2!F;&]A="AD871A -M6R)M87A#<'55&ET*#`I"B`@("!E -M;'-E.@H@("`@("`@('!R:6YT(")&86EL960@=&\@&ET*#$I"@H*:68@7U]N86UE -M7U\@/3T@(E]?;6%I;E]?(CH*("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A -M;F0@0`````````````````````````````````````` -M````````````````````````````````````````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2`]('9-6R)M86-!9&1R97-S(ET@ -M*R`B("(@*R!V35LB:7`B72`K("(@(B`K('9-6R)V;4YA;64B70H@("`@("`@ -M(&9O=6YD16YT2`](%1R=64*("`@("`@("`@("`@("`@(&)R96%K"@H@("`@("`@("`@("!N -M;VY$969A=6QT4V5T(#T@(G-E=#HB("L@=DU;(FEP(ETN2`](%1R=64*("`@("`@ -M("`@("`@("`@(&)R96%K"@H@("`@("`@(&EF(&YO="!F;W5N9$5N=')Y.@H@ -M("`@("`@("`@("!F86EL961#:&5C:R`](%1R=64*("`@("`@("`@("`@9F%I -M;'5R94UE&ET*#$I"B`@("!E;'-E.@H@("`@("`@('!R -M:6YT(")!;&P@(B`K('-T7,N87)G=ELQ72`]/2`B861V86YC960B.@H@("`@("`@(&UA:6XH -M*0H````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````````````````!R;V]T -M+V9U;F,N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P -M.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N -M2!O;F4@;&]C:R!IPH@("`@ -MPH@("`@;&]C:STD,0H*("`@(%]?;&]C:V5D/3`*("`@ -M(%]?5%,]8&1A=&4@*R5S)4Y@"B`@("!?7TQ/0TM$25(](B]T;7`B"B`@("!? -M7TQ/0TM&24Q%/2(D7U],3T-+1$E2+R1?7U13+20D+21L;V-K+FQO8VLB"@H@ -M("`@:68@6R`D,B!="B`@("!T:&5N"B`@("`@("`@7U]424U%3U54/20R"B`@ -M("!E;'-E"B`@("`@("`@7U]424U%3U54/3,P"B`@("!F:0H*("`@(&EF(%L@ -M+64@)%]?3$]#2T9)3$4@70H@("`@=&AE;@H@("`@("`@(&QO9V=EPH@("`@7U],3T-+1$E2/2(O=&UP -M(@H@("`@7U],3T-+1DE,13TB)%]?3$]#2T1)4B\J+20D+20Q+FQO8VLB"B`@ -M("!?7VQO8VME9#TD,@H@("`@:68@6R`B)%]?;&]C:V5D(B`]/2`B,2(@70H@ -M("`@=&AE;@H@("`@("`@(')M("1?7TQ/0TM&24Q%"B`@("!F:0I]"@HC(')E -M;&5A&ET('9A;'5E"B,@ -M)#(@;&]C:R!F:6QE;F%M90HC("0S(&QO8VME9"@Q*2!OF4]8&EP(&%D9'(@2!O9B!T:&4@3&EC96YS92!A=`HC -M"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ -M=&AE($QI8V5N7,O8VQA;65T82UD871A+R@N*UM>+UTI+S\D("`N+B]M -M971A9&%T82\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%="@HC:'1T<#HO -M+SQR;W5T97))4#XO;&%T97-T+V9O;R!A;F0@+BXN+V9O;R\@*'EI96QD(&UE -M=&%D871A+R1)4"]F;V\I"B-A2UZ;VYE+S\D("`N+B]M971A9&%T82\E>U)%34]415]! -M1$12?2]A=F%I;&%B:6QI='DM>F]N92!;3"Q.0RQ14T%="E)E=W)I=&52=6QE -M(%YC;&]U9"UI9&5N=&EF:65R+S\D("`N+B]M971A9&%T82\E>U)%34]415]! -M1$12?2]C;&]U9"UI9&5N=&EF:65R(%M,+$Y#+%%305T*4F5WU)%34]415]!1$12?2]I -M;G-T86YC92UI9"!;3"Q.0RQ14T%="E)E=W)I=&52=6QE(%YL;V-A;"UH;W-T -M;F%M92\_)"`@+BXO;65T861A=&$O)7M214U/5$5?041$4GTO;&]C86PM:&]S -M=&YA;64@6TPL3D,L45-!70I297=R:71E4G5L92!>;&]C86PM:7!V-"\_)"`@ -M+BXO;65T861A=&$O)7M214U/5$5?041$4GTO;&]C86PM:7!V-"!;3"Q.0RQ1 -M4T%="E)E=W)I=&52=6QE(%YP=6)L:6,M:&]S=&YA;64O/R0@("XN+VUE=&%D -M871A+R5[4D5-3U1%7T%$1%)]+W!U8FQI8RUH;W-T;F%M92!;3"Q.0RQ14T%= -M"E)E=W)I=&52=6QE(%YP=6)L:6,M:7!V-"\_)"`@+BXO;65T861A=&$O)7M2 -M14U/5$5?041$4GTO<'5B;&EC+6EP=C0@6TPL3D,L45-!70I297=R:71E4G5L -M92!><'5B;&EC+6ME>7,O/R0@("XN+VUE=&%D871A+R5[4D5-3U1%7T%$1%)] -M+W!U8FQI8RUK97ES(%M,+$Y#+%%305T*4F5W=FTM:60O/R0@ -M("XN+VUE=&%D871A+R5[4D5-3U1%7T%$1%)]+W9M+6ED(%M,+$Y#+%%305T* -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````=F%R+W=W=R]H=&UL+W5S97)D871A+P`` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````````#`P,#`W-34`,#`P,3/dev/null 2>&1 || ${echo} 'cloud_scripts/usr/share/cloud/cloud-scripts.tar': 'MD5 check failed' - ) << \SHAR_EOF -6c9c71f04c38fbbe6031c09a732f525d cloud_scripts/usr/share/cloud/cloud-scripts.tar -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/usr/share/cloud/cloud-scripts.tar'` -ne 696320 && \ - ${echo} "restoration warning: size of 'cloud_scripts/usr/share/cloud/cloud-scripts.tar' is not 696320" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/ips0003.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0003.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0003.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0003.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0003.json' && -{"ip_address": -[{"public_ip":"10.0.3.10", -"source_nat":true, -"add":true, -"one_to_one_nat":false, -"first_i_p":false, -"gateway":"10.0.3.1", -"netmask":"255.255.255.0", -"vif_mac_address":"06:cb:aa:00:00:03", -"nic_dev_id":2, -"new_nic":false}], -"type":"ips"} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0003.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0003.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0003.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0003.json': 'MD5 check failed' - ) << \SHAR_EOF -e8113ca4dc70734a2e07e4cd5aa817e7 cloud_scripts/opt/cloud/testdata/ips0003.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0003.json'` -ne 253 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0003.json' is not 253" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/vmp0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/vmp0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/vmp0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/vmp0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/testdata/vmp0001.json -M>R)I<%]A9&1R97-S(CHB,3/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/vmp0001.json': 'MD5 check failed' - ) << \SHAR_EOF -a3150c6241b311cbfc2180be23d1ddee cloud_scripts/opt/cloud/testdata/vmp0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/vmp0001.json'` -ne 77 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/vmp0001.json' is not 77" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/gn0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/gn0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/gn0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/gn0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/gn0001.json' && -{"add":true, -"mac_address":"02:00:56:36:00:02", -"device":"eth3", -"router_guest_ip":"172.16.1.1", -"router_guest_gateway":"172.16.1.0", -"router_guest_netmask":"255.255.255.0", -"cidr":"24", -"dns":"8.8.8.8,8.8.8.4", -"domain_name":"devcloud.local", -"type":"guestnetwork"} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/gn0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/gn0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/gn0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/gn0001.json': 'MD5 check failed' - ) << \SHAR_EOF -e790842388eb0a3f86ea0dbbcf4608eb cloud_scripts/opt/cloud/testdata/gn0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/gn0001.json'` -ne 267 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/gn0001.json' is not 267" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/dhcp0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/dhcp0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/dhcp0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' && -{ -X "host_name":"VM-58976c22-0832-451e-9ab2-039e9f27e415", -X "mac_address":"02:00:26:c3:00:02", -X "ipv4_address":"172.16.1.102", -X "ipv6_duid":"00:03:00:01:02:00:26:c3:00:02", -X "default_gateway":"172.16.1.1", -X "default_entry":true, -X "type":"dhcpentry" -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/dhcp0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/dhcp0001.json': 'MD5 check failed' - ) << \SHAR_EOF -0f44da4132b56f2ece9b36bab3213f28 cloud_scripts/opt/cloud/testdata/dhcp0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/dhcp0001.json'` -ne 250 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' is not 250" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/acl0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/acl0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/acl0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/acl0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/acl0001.json' && -{ -X "eth2": { -X "device": "eth2", -X "egress_rules": [ -X { -X "allowed": false, -X "cidr": "10.0.6.0/8", -X "first_port": 60, -X "last_port": 60, -X "type": "tcp" -X } -X ], -X "ingress_rules": [ -X { -X "allowed": true, -X "cidr": "10.0.1.0/8", -X "protocol": 41, -X "type": "protocol" -X }, -X { -X "allowed": true, -X "cidr": "10.0.4.0/8", -X "type": "all" -X }, -X { -X "allowed": true, -X "cidr": "10.0.3.0/8", -X "icmp_code": -1, -X "icmp_type": -1, -X "type": "icmp" -X }, -X { -X "allowed": true, -X "cidr": "10.0.2.0/8", -X "first_port": 40, -X "last_port": 40, -X "type": "udp" -X }, -X { -X "allowed": true, -X "cidr": "10.0.1.0/8", -X "first_port": 30, -X "last_port": 30, -X "type": "tcp" -X } -X ], -X "mac_address": "02:00:0d:7b:00:04", -X "nic_ip": "172.16.1.1", -X "nic_netmask": "24", -X "private_gateway_acl": false, -X "type": "networkacl" -X }, -X "id": "networkacl" -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/acl0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/acl0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/acl0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/acl0001.json': 'MD5 check failed' - ) << \SHAR_EOF -1ea2a1b5d6a98bc6c0fc2375de284b17 cloud_scripts/opt/cloud/testdata/acl0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/acl0001.json'` -ne 1405 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/acl0001.json' is not 1405" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/README ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/README' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/README (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/README (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/README' && -Json file used to test the provisioning scripts on virtual appliances -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/README' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/README' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/README failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/README': 'MD5 check failed' - ) << \SHAR_EOF -13e5ecf4d998c3df3cf53485d6f46ee1 cloud_scripts/opt/cloud/testdata/README -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/README'` -ne 70 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/README' is not 70" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/ips0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0001.json' && -{"ip_address": -[{"public_ip":"10.0.2.102", -"source_nat":true, -"add":true, -"one_to_one_nat":false, -"first_i_p":false, -"gateway":"10.0.2.1", -"netmask":"255.255.255.0", -"vif_mac_address":"06:cb:aa:00:00:03", -"nic_dev_id":1, -"new_nic":false}], -"type":"ips"} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0001.json': 'MD5 check failed' - ) << \SHAR_EOF -6f7337aaa605096eef31300afba0f4af cloud_scripts/opt/cloud/testdata/ips0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0001.json'` -ne 254 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0001.json' is not 254" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/test.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/test.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/test.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/test.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/test.sh' && -#!/bin/sh -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -cp /opt/cloud/testdata/* /etc/cloudstack -/opt/cloud/bin/update_config.py cmd_line.json -/opt/cloud/bin/update_config.py gn0001.json -/opt/cloud/bin/update_config.py ips0001.json -/opt/cloud/bin/update_config.py ips0002.json -/opt/cloud/bin/update_config.py ips0003.json -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/test.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/testdata/test.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/test.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/test.sh': 'MD5 check failed' - ) << \SHAR_EOF -7fbb72051fd8d3b66fd481aa51d3debe cloud_scripts/opt/cloud/testdata/test.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/test.sh'` -ne 1062 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/test.sh' is not 1062" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/ips0002.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0002.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0002.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0002.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0002.json' && -{"ip_address": -[{"public_ip":"10.0.2.103", -"source_nat":true, -"add":true, -"one_to_one_nat":false, -"first_i_p":false, -"gateway":"10.0.2.1", -"netmask":"255.255.255.0", -"vif_mac_address":"06:cb:aa:00:00:03", -"nic_dev_id":1, -"new_nic":false}], -"type":"ips"} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0002.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0002.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0002.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0002.json': 'MD5 check failed' - ) << \SHAR_EOF -12aec2bca1d88c499ee0af39c2e20ea1 cloud_scripts/opt/cloud/testdata/ips0002.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0002.json'` -ne 254 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0002.json' is not 254" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/s2s0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/s2s0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/s2s0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/s2s0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/s2s0001.json' && -{ -X "local_public_ip":"172.16.1.1", -X "local_guest_cidr":"172.16.1.0/24", -X "local_public_gateway":"172.16.1.1", -X "peer_gateway_ip":"10.200.200.1", -X "peer_guest_cidr_list":"10.0.0.0/24", -X "esp_policy":"3des-md5", -X "ike_policy":"3des-md5", -X "ipsec_psk":"vpnblabla", -X "ike_lifetime":86400, -X "esp_lifetime":3600, -X "create":true, -X "dpd":false, -X "passive":false, -X "type":"site2sitevpn" -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/s2s0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/s2s0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/s2s0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/s2s0001.json': 'MD5 check failed' - ) << \SHAR_EOF -ff589cb7ab7721a270f4cc703719c917 cloud_scripts/opt/cloud/testdata/s2s0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/s2s0001.json'` -ne 380 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/s2s0001.json' is not 380" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -ip link|grep BROADCAST|grep -v eth0|grep -v eth1|cut -d ":" -f 2 > /tmp/iflist -while read i -do -X ip addr show $i|grep "inet " > /tmp/iplist_$i -X while read line -X do -X ip=`echo $line|cut -d " " -f 2|cut -d "/" -f 1` -X arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 -X arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 -X done < /tmp/iplist_$i -done < /tmp/iflist -sleep 1 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ': 'MD5 check failed' - ) << \SHAR_EOF -023d994f54c0955f160f127c1d85d6ae cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ'` -ne 1177 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' is not 1177" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/checkrouter.sh.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/checkrouter.sh.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/checkrouter.sh.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -STATUS=UNKNOWN -INTERFACE=eth1 -ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g') -if [ $ROUTER_TYPE = "router" ] -then -X ROUTER_STATE=$(ip addr | grep eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi') -X STATUS=$ROUTER_STATE -else -X ROUTER_STATE=$(ip addr | grep $INTERFACE | grep state | awk '{print $9;}') -X if [ $ROUTER_STATE = "UP" ] -X then -X STATUS=MASTER -X elif [ $ROUTER_STATE = "DOWN" ] -X then -X STATUS=BACKUP -X fi -fi -X -echo "Status: ${STATUS}" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/checkrouter.sh.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ': 'MD5 check failed' - ) << \SHAR_EOF -bbd331057760019d05ead01eec5e42aa cloud_scripts/opt/cloud/templates/checkrouter.sh.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ'` -ne 1357 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' is not 1357" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/heartbeat.sh.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/heartbeat.sh.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/heartbeat.sh.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -t=$(date +%s) -echo $t > /ramdisk/rrouter/keepalived.ts -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/heartbeat.sh.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ': 'MD5 check failed' - ) << \SHAR_EOF -c006a52c775a0418870c0c50f0131ee7 cloud_scripts/opt/cloud/templates/heartbeat.sh.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ'` -ne 853 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' is not 853" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/conntrackd.conf.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/conntrackd.conf.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/conntrackd.conf.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# Synchronizer settings -# -Sync { -X Mode FTFW { -X # -X # Size of the resend queue (in objects). This is the maximum -X # number of objects that can be stored waiting to be confirmed -X # via acknoledgment. If you keep this value low, the daemon -X # will have less chances to recover state-changes under message -X # omission. On the other hand, if you keep this value high, -X # the daemon will consume more memory to store dead objects. -X # Default is 131072 objects. -X # -X # ResendQueueSize 131072 -X -X # -X # This parameter allows you to set an initial fixed timeout -X # for the committed entries when this node goes from backup -X # to primary. This mechanism provides a way to purge entries -X # that were not recovered appropriately after the specified -X # fixed timeout. If you set a low value, TCP entries in -X # Established states with no traffic may hang. For example, -X # an SSH connection without KeepAlive enabled. If not set, -X # the daemon uses an approximate timeout value calculation -X # mechanism. By default, this option is not set. -X # -X # CommitTimeout 180 -X -X # -X # If the firewall replica goes from primary to backup, -X # the conntrackd -t command is invoked in the script. -X # This command schedules a flush of the table in N seconds. -X # This is useful to purge the connection tracking table of -X # zombie entries and avoid clashes with old entries if you -X # trigger several consecutive hand-overs. Default is 60 seconds. -X # -X # PurgeTimeout 60 -X -X # Set the acknowledgement window size. If you decrease this -X # value, the number of acknowlegdments increases. More -X # acknowledgments means more overhead as conntrackd has to -X # handle more control messages. On the other hand, if you -X # increase this value, the resend queue gets more populated. -X # This results in more overhead in the queue releasing. -X # The following value is based on some practical experiments -X # measuring the cycles spent by the acknowledgment handling -X # with oprofile. If not set, default window size is 300. -X # -X # ACKWindowSize 300 -X -X # -X # This clause allows you to disable the external cache. Thus, -X # the state entries are directly injected into the kernel -X # conntrack table. As a result, you save memory in user-space -X # but you consume slots in the kernel conntrack table for -X # backup state entries. Moreover, disabling the external cache -X # means more CPU consumption. You need a Linux kernel -X # >= 2.6.29 to use this feature. By default, this clause is -X # set off. If you are installing conntrackd for first time, -X # please read the user manual and I encourage you to consider -X # using the fail-over scripts instead of enabling this option! -X # -X # DisableExternalCache Off -X } -X -X # -X # Multicast IP and interface where messages are -X # broadcasted (dedicated link). IMPORTANT: Make sure -X # that iptables accepts traffic for destination -X # 225.0.0.50, eg: -X # -X # iptables -I INPUT -d 225.0.0.50 -j ACCEPT -X # iptables -I OUTPUT -d 225.0.0.50 -j ACCEPT -X # -X Multicast { -X # -X # Multicast address: The address that you use as destination -X # in the synchronization messages. You do not have to add -X # this IP to any of your existing interfaces. If any doubt, -X # do not modify this value. -X # -X IPv4_address 225.0.0.50 -X -X # -X # The multicast group that identifies the cluster. If any -X # doubt, do not modify this value. -X # -X Group 3780 -X -X # -X # IP address of the interface that you are going to use to -X # send the synchronization messages. Remember that you must -X # use a dedicated link for the synchronization messages. -X # -X IPv4_interface [LINK_IP] -X -X # -X # The name of the interface that you are going to use to -X # send the synchronization messages. -X # -X Interface [LINK_IF] -X -X # The multicast sender uses a buffer to enqueue the packets -X # that are going to be transmitted. The default size of this -X # socket buffer is available at /proc/sys/net/core/wmem_default. -X # This value determines the chances to have an overrun in the -X # sender queue. The overrun results packet loss, thus, losing -X # state information that would have to be retransmitted. If you -X # notice some packet loss, you may want to increase the size -X # of the sender buffer. The default size is usually around -X # ~100 KBytes which is fairly small for busy firewalls. -X # -X SndSocketBuffer 1249280 -X -X # The multicast receiver uses a buffer to enqueue the packets -X # that the socket is pending to handle. The default size of this -X # socket buffer is available at /proc/sys/net/core/rmem_default. -X # This value determines the chances to have an overrun in the -X # receiver queue. The overrun results packet loss, thus, losing -X # state information that would have to be retransmitted. If you -X # notice some packet loss, you may want to increase the size of -X # the receiver buffer. The default size is usually around -X # ~100 KBytes which is fairly small for busy firewalls. -X # -X RcvSocketBuffer 1249280 -X -X # -X # Enable/Disable message checksumming. This is a good -X # property to achieve fault-tolerance. In case of doubt, do -X # not modify this value. -X # -X Checksum on -X } -X # -X # You can specify more than one dedicated link. Thus, if one dedicated -X # link fails, conntrackd can fail-over to another. Note that adding -X # more than one dedicated link does not mean that state-updates will -X # be sent to all of them. There is only one active dedicated link at -X # a given moment. The `Default' keyword indicates that this interface -X # will be selected as the initial dedicated link. You can have -X # up to 4 redundant dedicated links. Note: Use different multicast -X # groups for every redundant link. -X # -X # Multicast Default { -X # IPv4_address 225.0.0.51 -X # Group 3781 -X # IPv4_interface 192.168.100.101 -X # Interface eth3 -X # # SndSocketBuffer 1249280 -X # # RcvSocketBuffer 1249280 -X # Checksum on -X # } -X -X # -X # You can use Unicast UDP instead of Multicast to propagate events. -X # Note that you cannot use unicast UDP and Multicast at the same -X # time, you can only select one. -X # -X # UDP { -X # -X # UDP address that this firewall uses to listen to events. -X # -X # IPv4_address 192.168.2.100 -X # -X # or you may want to use an IPv6 address: -X # -X # IPv6_address fe80::215:58ff:fe28:5a27 -X -X # -X # Destination UDP address that receives events, ie. the other -X # firewall's dedicated link address. -X # -X # IPv4_Destination_Address 192.168.2.101 -X # -X # or you may want to use an IPv6 address: -X # -X # IPv6_Destination_Address fe80::2d0:59ff:fe2a:775c -X -X # -X # UDP port used -X # -X # Port 3780 -X -X # -X # The name of the interface that you are going to use to -X # send the synchronization messages. -X # -X # Interface eth2 -X -X # -X # The sender socket buffer size -X # -X # SndSocketBuffer 1249280 -X -X # -X # The receiver socket buffer size -X # -X # RcvSocketBuffer 1249280 -X -X # -X # Enable/Disable message checksumming. -X # -X # Checksum on -X # } -X -} -X -# -# General settings -# -General { -X # -X # Set the nice value of the daemon, this value goes from -20 -X # (most favorable scheduling) to 19 (least favorable). Using a -X # very low value reduces the chances to lose state-change events. -X # Default is 0 but this example file sets it to most favourable -X # scheduling as this is generally a good idea. See man nice(1) for -X # more information. -X # -X Nice -20 -X -X # -X # Select a different scheduler for the daemon, you can select between -X # RR and FIFO and the process priority (minimum is 0, maximum is 99). -X # See man sched_setscheduler(2) for more information. Using a RT -X # scheduler reduces the chances to overrun the Netlink buffer. -X # -X # Scheduler { -X # Type FIFO -X # Priority 99 -X # } -X -X # -X # Number of buckets in the cache hashtable. The bigger it is, -X # the closer it gets to O(1) at the cost of consuming more memory. -X # Read some documents about tuning hashtables for further reference. -X # -X HashSize 32768 -X -X # -X # Maximum number of conntracks, it should be double of: -X # $ cat /proc/sys/net/netfilter/nf_conntrack_max -X # since the daemon may keep some dead entries cached for possible -X # retransmission during state synchronization. -X # -X HashLimit 131072 -X -X LogFile on -X -X # -X # Syslog: on, off or a facility name (daemon (default) or local0..7) -X # Default: off -X # -X Syslog on -X -X # -X # Lockfile -X # -X LockFile /var/lock/conntrackd.lock -X -X # -X # Unix socket configuration -X # -X UNIX { -X Path /var/run/conntrackd.sock -X Backlog 20 -X } -X -X SocketBufferSize 2097152 -X SocketBufferSizeMaxGrown 8388608 -X -X # -X # Netlink event socket buffer size. If you do not specify this clause, -X # the default buffer size value in /proc/net/core/rmem_default is -X # used. This default value is usually around 100 Kbytes which is -X # fairly small for busy firewalls. This leads to event message dropping -X # and high CPU consumption. This example configuration file sets the -X # size to 2 MBytes to avoid this sort of problems. -X # -X NetlinkBufferSize 2097152 -X -X # -X # The daemon doubles the size of the netlink event socket buffer size -X # if it detects netlink event message dropping. This clause sets the -X # maximum buffer size growth that can be reached. This example file -X # sets the size to 8 MBytes. -X # -X NetlinkBufferSizeMaxGrowth 8388608 -X -X # -X # If the daemon detects that Netlink is dropping state-change events, -X # it automatically schedules a resynchronization against the Kernel -X # after 30 seconds (default value). Resynchronizations are expensive -X # in terms of CPU consumption since the daemon has to get the full -X # kernel state-table and purge state-entries that do not exist anymore. -X # Be careful of setting a very small value here. You have the following -X # choices: On (enabled, use default 30 seconds value), Off (disabled) -X # or Value (in seconds, to set a specific amount of time). If not -X # specified, the daemon assumes that this option is enabled. -X # -X # NetlinkOverrunResync On -X -X # -X # If you want reliable event reporting over Netlink, set on this -X # option. If you set on this clause, it is a good idea to set off -X # NetlinkOverrunResync. This option is off by default and you need -X # a Linux kernel >= 2.6.31. -X # -X # NetlinkEventsReliable Off -X -X # -X # By default, the daemon receives state updates following an -X # event-driven model. You can modify this behaviour by switching to -X # polling mode with the PollSecs clause. This clause tells conntrackd -X # to dump the states in the kernel every N seconds. With regards to -X # synchronization mode, the polling mode can only guarantee that -X # long-lifetime states are recovered. The main advantage of this method -X # is the reduction in the state replication at the cost of reducing the -X # chances of recovering connections. -X # -X # PollSecs 15 -X -X # -X # The daemon prioritizes the handling of state-change events coming -X # from the core. With this clause, you can set the maximum number of -X # state-change events (those coming from kernel-space) that the daemon -X # will handle after which it will handle other events coming from the -X # network or userspace. A low value improves interactivity (in terms of -X # real-time behaviour) at the cost of extra CPU consumption. -X # Default (if not set) is 100. -X # -X # EventIterationLimit 100 -X -X # -X # Event filtering: This clause allows you to filter certain traffic, -X # There are currently three filter-sets: Protocol, Address and -X # State. The filter is attached to an action that can be: Accept or -X # Ignore. Thus, you can define the event filtering policy of the -X # filter-sets in positive or negative logic depending on your needs. -X # You can select if conntrackd filters the event messages from -X # user-space or kernel-space. The kernel-space event filtering -X # saves some CPU cycles by avoiding the copy of the event message -X # from kernel-space to user-space. The kernel-space event filtering -X # is prefered, however, you require a Linux kernel >= 2.6.29 to -X # filter from kernel-space. If you want to select kernel-space -X # event filtering, use the keyword 'Kernelspace' instead of -X # 'Userspace'. -X # -X Filter From Userspace { -X # -X # Accept only certain protocols: You may want to replicate -X # the state of flows depending on their layer 4 protocol. -X # -X Protocol Accept { -X TCP -X SCTP -X DCCP -X UDP -X ICMP # This requires a Linux kernel >= 2.6.31 -X } -X -X # -X # Ignore traffic for a certain set of IP's: Usually all the -X # IP assigned to the firewall since local traffic must be -X # ignored, only forwarded connections are worth to replicate. -X # Note that these values depends on the local IPs that are -X # assigned to the firewall. -X # -X Address Ignore { -X IPv4_address 127.0.0.1 # loopback -X IPv4_address [IGNORE_IP1] -X IPv4_address [IGNORE_IP2] -X IPv4_address [IGNORE_IP3] -X #IPv4_address 192.168.0.100 # virtual IP 1 -X #IPv4_address 192.168.1.100 # virtual IP 2 -X #IPv4_address 192.168.0.1 -X #IPv4_address 192.168.1.1 -X #IPv4_address 192.168.100.100 # dedicated link ip -X # -X # You can also specify networks in format IP/cidr. -X # IPv4_address 192.168.0.0/24 -X # -X # You can also specify an IPv6 address -X # IPv6_address ::1 -X } -X -X # -X # Uncomment this line below if you want to filter by flow state. -X # This option introduces a trade-off in the replication: it -X # reduces CPU consumption at the cost of having lazy backup -X # firewall replicas. The existing TCP states are: SYN_SENT, -X # SYN_RECV, ESTABLISHED, FIN_WAIT, CLOSE_WAIT, LAST_ACK, -X # TIME_WAIT, CLOSED, LISTEN. -X # -X # State Accept { -X # ESTABLISHED CLOSED TIME_WAIT CLOSE_WAIT for TCP -X # } -X } -X -X # default debian service unit file is of Type=notify -X Systemd on -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/conntrackd.conf.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ': 'MD5 check failed' - ) << \SHAR_EOF -13781a8581b74b0cf402c01264bdca48 cloud_scripts/opt/cloud/templates/conntrackd.conf.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ'` -ne 15888 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' is not 15888" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -ROUTER_BIN_PATH="/ramdisk/rrouter" -ROUTER_LOG="${ROUTER_BIN_PATH}/keepalived.log" -STRIKE_FILE="$ROUTER_BIN_PATH/keepalived.strikes" -TS_FILE="$ROUTER_BIN_PATH/keepalived.ts" -CT_FILE="$ROUTER_BIN_PATH/keepalived.ct" -X -checktime=$(date +%s) -hbtime=$(cat $TS_FILE) -diff=$(($checktime - $hbtime)) -X -lastcheck=0 -if [ -e $CT_FILE ] -then -X lastcheck=$(cat $CT_FILE 2>/dev/null) -fi -checkdiff=$(($checktime - $lastcheck)) -if [ $checkdiff -ge 0 ] && [ $checkdiff -lt 30 ] -then -X exit -fi -echo $checktime > $CT_FILE -X -s=0 -if [ $diff -gt 10 ] -then -X if [ -e $STRIKE_FILE ] -X then -X s=$(cat $STRIKE_FILE 2>/dev/null) -X fi -X s=$(($s+1)) -X echo $s > $STRIKE_FILE -X echo "Check time: $checktime, last heartbeat time: $hbtime, time diff: $diff, strike count: $s" >> $ROUTER_LOG -else -X rm -f $STRIKE_FILE -fi -X -if [ $s -gt 3 ] -then -X systemctl stop --now keepalived >> $ROUTER_LOG 2>&1 -X systemctl stop --now conntrackd >> $ROUTER_LOG 2>&1 -X -X #Set fault so we have the same effect as a KeepaliveD fault. -X python /opt/cloud/bin/master.py --fault -X -X pkill -9 keepalived >> $ROUTER_LOG 2>&1 || true -X pkill -9 conntrackd >> $ROUTER_LOG 2>&1 || true -X echo Status: FAULT \(keepalived process is dead\) >> $ROUTER_LOG -X exit -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ': 'MD5 check failed' - ) << \SHAR_EOF -7040d7485f89a97be367132d28af1267 cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ'` -ne 2037 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' is not 2037" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/check_bumpup.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/check_bumpup.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/check_bumpup.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -cat /tmp/rrouter_bumped -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/check_bumpup.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/check_bumpup.sh': 'MD5 check failed' - ) << \SHAR_EOF -ab6cbce5de505d137d05bcae1af8e18a cloud_scripts/opt/cloud/templates/check_bumpup.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/check_bumpup.sh'` -ne 822 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' is not 822" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/keepalived.conf.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/keepalived.conf.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/keepalived.conf.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' && -! Licensed to the Apache Software Foundation (ASF) under one -! or more contributor license agreements. See the NOTICE file -! distributed with this work for additional information -! regarding copyright ownership. The ASF licenses this file -! to you under the Apache License, Version 2.0 (the -! "License"); you may not use this file except in compliance -! with the License. You may obtain a copy of the License at -! -! http://www.apache.org/licenses/LICENSE-2.0 -! -! Unless required by applicable law or agreed to in writing, -! software distributed under the License is distributed on an -! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -! KIND, either express or implied. See the License for the -! specific language governing permissions and limitations -! under the License. -X -global_defs { -X router_id [ROUTER_ID] -} -X -vrrp_script heartbeat { -X script "[RROUTER_BIN_PATH]/heartbeat.sh" -X interval 5 -} -X -vrrp_instance inside_network { -X state BACKUP -X interface eth2 -X virtual_router_id 51 -X nopreempt -X -X advert_int 1 -X -X #use_vmac -X #vmac_xmit_base -X -X authentication { -X auth_type AH -X auth_pass PASS -X } -X -X virtual_ipaddress { -X [ROUTER_IP] brd [BOARDCAST] dev eth2 -X } -X -X track_script { -X heartbeat -X } -X -X notify_backup "/opt/cloud/bin/master.py --backup" -X notify_master "/opt/cloud/bin/master.py --master" -X notify_fault "/opt/cloud/bin/master.py --fault" -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/keepalived.conf.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ': 'MD5 check failed' - ) << \SHAR_EOF -464642e87bbb032071111b84f82ba135 cloud_scripts/opt/cloud/templates/keepalived.conf.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ'` -ne 1429 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' is not 1429" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/prepare_pxe.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/prepare_pxe.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/prepare_pxe.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' && -#!/bin/sh -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# # regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -X -set +u -X -err_exit() { -X echo $1 -X exit 1 -} -X -success() { -X exit 0 -} -X -TFTP_ROOT='/opt/tftpboot' -PXELINUX_CFG_DIR='/opt/tftpboot/pxelinux.cfg' -X -kernel_nfs_path=$1 -kernel_file_name=`basename $kernel_nfs_path` -initrd_nfs_path=$2 -initrd_file_name=`basename $initrd_nfs_path` -tmpt_uuid=$3 -pxe_cfg_filename=$4 -ks_file=$5 -X -kernel_path=$tmpt_uuid/$kernel_file_name -initrd_path=$tmpt_uuid/$initrd_file_name -X -cat > $PXELINUX_CFG_DIR/$pxe_cfg_filename </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh': 'MD5 check failed' - ) << \SHAR_EOF -8b495c4ea50905f4197974ee82e607ba cloud_scripts/opt/cloud/bin/prepare_pxe.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh'` -ne 1792 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' is not 1792" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_forwardingrules.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_forwardingrules.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_forwardingrules.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, rules): -X for rule in rules["rules"]: -X source_ip = rule["source_ip_address"] -X destination_ip = rule["destination_ip_address"] -X revoke = rule["revoke"] -X -X newrule = dict() -X newrule["public_ip"] = source_ip -X newrule["internal_ip"] = destination_ip -X -X if rules["type"] == "staticnatrules": -X newrule["type"] = "staticnat" -X elif rules["type"] == "forwardrules": -X newrule["type"] = "forward" -X newrule["public_ports"] = rule["source_port_range"] -X newrule["internal_ports"] = rule["destination_port_range"] -X newrule["protocol"] = rule["protocol"] -X -X if not revoke: -X if rules["type"] == "staticnatrules": -X dbag[source_ip] = [newrule] -X elif rules["type"] == "forwardrules": -X index = -1 -X if source_ip in dbag.keys(): -X for forward in dbag[source_ip]: -X if ruleCompare(forward, newrule): -X index = dbag[source_ip].index(forward) -X if not index == -1: -X dbag[source_ip][index] = newrule -X else: -X dbag[source_ip].append(newrule) -X else: -X dbag[source_ip] = [newrule] -X else: -X if rules["type"] == "staticnatrules": -X if source_ip in dbag.keys(): -X del dbag[source_ip] -X elif rules["type"] == "forwardrules": -X if source_ip in dbag.keys(): -X index = -1 -X for forward in dbag[source_ip]: -X if ruleCompare(forward, newrule): -X index = dbag[source_ip].index(forward) -X print "removing index %s" % str(index) -X if not index == -1: -X del dbag[source_ip][index] -X -X return dbag -X -X -# Compare function checks only the public side, those must be equal the internal details could change -def ruleCompare(ruleA, ruleB): -X if not ruleA["type"] == ruleB["type"]: -X return False -X if ruleA["type"] == "staticnat": -X return ruleA["public_ip"] == ruleB["public_ip"] -X elif ruleA["type"] == "forward": -X return ruleA["public_ip"] == ruleB["public_ip"] and ruleA["public_ports"] == ruleB["public_ports"] \ -X and ruleA["protocol"] == ruleB["protocol"] -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_forwardingrules.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py': 'MD5 check failed' - ) << \SHAR_EOF -278288da98263d674e9d0d0aecaca56d cloud_scripts/opt/cloud/bin/cs_forwardingrules.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py'` -ne 3239 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' is not 3239" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpc_netusage.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_netusage.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_netusage.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -source /root/func.sh -source /opt/cloud/bin/vpc_func.sh -X -vpnoutmark="0x525" -vpninmark="0x524" -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s -[c|g|r|n|d] [-l ] [-v ] \n" $(basename $0) >&2 -} -X -create_usage_rules () { -X iptables-save|grep "NETWORK_STATS_$ethDev" > /dev/null -X if [ $? -gt 0 ] -X then -X iptables -N NETWORK_STATS_$ethDev > /dev/null; -X iptables -I FORWARD -j NETWORK_STATS_$ethDev > /dev/null; -X iptables -A NETWORK_STATS_$ethDev -o $ethDev -s $vcidr > /dev/null; -X iptables -A NETWORK_STATS_$ethDev -i $ethDev -d $vcidr > /dev/null; -X fi -X return $? -} -X -create_vpn_usage_rules () { -X iptables-save|grep "VPN_STATS_$ethDev" > /dev/null -X if [ $? -gt 0 ] -X then -X iptables -t mangle -N VPN_STATS_$ethDev > /dev/null; -X iptables -t mangle -I FORWARD -j VPN_STATS_$ethDev > /dev/null; -X iptables -t mangle -A VPN_STATS_$ethDev -o $ethDev -m mark --mark $vpnoutmark > /dev/null; -X iptables -t mangle -A VPN_STATS_$ethDev -i $ethDev -m mark --mark $vpninmark > /dev/null; -X fi -X return $? -} -X -remove_usage_rules () { -X return 0 -} -X -get_usage () { -X iptables -L NETWORK_STATS_$ethDev -n -v -x 2> /dev/null | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null -X return 0 -} -X -get_vpn_usage () { -X iptables -t mangle -L VPN_STATS_$ethDev -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null -X if [ $? -gt 0 ] -X then -X printf $? -X return 1 -X fi -} -X -reset_usage () { -X iptables -Z NETWORK_STATS_$ethDev > /dev/null -X if [ $? -gt 0 -a $? -ne 2 ] -X then -X return 1 -X fi -} -X -#set -x -X -cflag= -gflag= -rflag= -lflag= -vflag= -nflag= -dflag= -X -while getopts 'cgndrl:v:' OPTION -do -X case $OPTION in -X c) cflag=1 -X ;; -X g) gflag=1 -X ;; -X r) rflag=1 -X ;; -X l) lflag=1 -X publicIp="$OPTARG" -X ;; -X v) vflag=1 -X vcidr="$OPTARG" -X ;; -X n) nflag=1 -X ;; -X d) dflag=1 -X ;; -X i) #Do nothing, since it's parameter for host script -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -ethDev=$(getEthByIp $publicIp) -if [ "$cflag" == "1" ] -then -X if [ "$ethDev" != "" ] -X then -X create_usage_rules -X create_vpn_usage_rules -X unlock_exit 0 $lock $locked -X fi -fi -X -if [ "$gflag" == "1" ] -then -X get_usage -X unlock_exit $? $lock $locked -fi -X -if [ "$nflag" == "1" ] -then -X #get_vpn_usage -X unlock_exit $? $lock $locked -fi -X -if [ "$dflag" == "1" ] -then -X #remove_usage_rules -X unlock_exit 0 $lock $locked -fi -X -if [ "$rflag" == "1" ] -then -X reset_usage -X unlock_exit $? $lock $locked -fi -X -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_netusage.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh': 'MD5 check failed' - ) << \SHAR_EOF -f3f8069de696e92a24cbc694275c0bd5 cloud_scripts/opt/cloud/bin/vpc_netusage.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh'` -ne 3377 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' is not 3377" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/configure.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/configure.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/configure.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/configure.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/configure.py -M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&-E<'0@24]%2@I"B`@("`@("`@ -M("`@("`@("`@("`@9W5E22R)$;VU57U)E<75E&-E<'0@17AC97!T:6]N(&%S -M(&4Z"B`@("`@("`@("`@("`@("`@("`@;&]G9VEN9RYE7!E)UT@/3T@)V%L;"<@86YD(&]B -M:ELG7!E(#T@(F%N>2(*("`@("`@("`@("`@:68@ -M(FEC;7!?='EP92(@:6X@7,H*2!A;F0@7!E)UT*("`@("`@("`@("`@:68@(FEC -M;7!?8V]D92(@:6X@7,H*2!A;F0@7!E)UTL('-E;&8N7!E("5S("UJ("5S(B`E("AI8VUP7W1Y<&4L('-E;&8N&5C=71E*&1S=$EP2==.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U -M;&5;)V%C=&EO;B==(#T@(D%#0T505"(*("`@("`@("`@("`@("`@("`@("!E -M;'-E.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5;)V%C=&EO -M;B==(#T@(D123U`B"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@ -M("`@("`@("`@(",@1F]R(&]T:&5R(')U;&5S(&%D9&5D+"!I9B!D969A=6QT -M7V5G7!E("5S(B`E(&EC;7!?='EP90H@("`@("`@("`@ -M("`@("`@96QI9B!R=6QE6R=P7!E+B!3;RP@:71S(&9W(&%T=')I8G5T92!I7!E -M(#T@(F%N>2(*("`@("`@("`@("`@("`@('-E;&8N<')O=&]C;VP@/2!S96QF -M+G1Y<&4*("`@("`@("`@("`@("`@(&EF(")I8VUP7W1Y<&4B(&EN(')U;&4N -M:V5Y7!E+"!R=6QE6R=I8VUP7V-O9&4G72D*("`@("`@("`@("`@("`@(&EF('-E -M;&8N='EP92`]/2`B<')O=&]C;VPB.@H@("`@("`@("`@("`@("`@("`@(&EF -M(')U;&5;)W!R;W1O8V]L)UT@/3T@-#$Z"B`@("`@("`@("`@("`@("`@("`@ -M("`@(')U;&5;)W!R;W1O8V]L)UT@/2`B:7!V-B(*("`@("`@("`@("`@("`@ -M("`@("!S96QF+G!R;W1O8V]L(#T@&5C=71E*")I -M<'1A8FQE+4$O:7!T86)L97,@+70@9FEL=&5R("U$+V&5C=71E -M*")I<'-E="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\ -M(&EP&5C=71E*")I<'-E -M="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP2!V86QI9"!D871A"B`@("`@("`@("`@("`@("!I9B!F;VQD97(@(3T@(G5S -M97)D871A(B!A;F0@9F]L9&5R("$](")M971A9&%T82(Z"B`@("`@("`@("`@ -M("`@("`@("`@8V]N=&EN=64*"B`@("`@("`@("`@("`@("!I9B!F:6QE(#T] -M("(B.@H@("`@("`@("`@("`@("`@("`@(&-O;G1I;G5E"@H@("`@("`@("`@ -M("`@("`@7,N97AI="@Q*0H@("`@("`@("`@("!I9B!O2Q!;&QO=UQN1&5N>2!F2!E>&ES=',L('=E(&1O(&ET('1H -M:7,@=V%Y(&9O7,N97AI -M="@Q*0H*("`@("`@("!F:"`](&]P96XH:'1A8V-E2`] -M(")297=R:71E4G5L92!>;65T82UD871A+R@N*RDD("`N+B\B("L@9F]L9&5R -M("L@(B\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%=(@H@("`@("`@("`@ -M("!H=&%C8V5S7,N97AI="@Q -M*2`@(R!&25A-10H@("`@("`@(')E='5R;B!4&ET*#$I("`C($9)6$U%"B`@("`@("`@:7!S96,N=G!N+2@N*BDN8V]N9B(L(&9I;&4I"B`@ -M("`@("`@("`@(&EF(&TZ"B`@("`@("`@("`@("`@("!S96QF+F-O;F9I<',N -M87!P96YD*&TN9W)O=7`H,2DI"@H@("`@("`@(&9O&5C=71E*")I -M<'-E8R!R96QO860B*0H*("`@(&1E9B!C;VYF:6=U#4R-2`M:B!!0T-%4%0B("4@9&5V72D* -M("`@("`@("!F;W(@;F5T(&EN(&]B:ELG<&5E&UA&UA5]I<"=="B`@("`@("`@<&5E7!E/71U;FYE;"(I -M"B`@("`@("`@9FEL92YA9&1E<2@B(&%U=&AB>3US96-R970B*0H@("`@("`@ -M(&9I;&4N861D97$H(B!K97EE>&-H86YG93UI:V4B*0H@("`@("`@(&9I;&4N -M861D97$H(B!I:V4])7,B("4@:6ME<&]L:6-Y*0H@("`@("`@(&9I;&4N861D -M97$H(B!I:V5L:69E=&EM93TE3TS,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1T:6UE;W5T -M/3$R,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1A8W1I;VX]')A;F=E*#,I.@H@("`@("`@("`@ -M("!R97-U;'0@/2!#&5C=71E*"=I<'-E8R!S=&%T=7,@=G!N -M+25S('P@9W)E<"`B)7,B)R`E("AR:6=H='!E97(L('!E97)L:7-T+G-P;&ET -M*"(L(BP@,2E;,%TI*0H@("`@("`@("`@("!I9B!L96XH2P@)R,G*0H@("`@("`@(&EF(&YO="!U&5C=71E*")T9&)D=6UP("]V87(O&5C=71E*"=K:6QL("TY("5S)R`E('!I9"D*"@IC;&%S -M&5C=71E*")S>7-T96UC=&P@2YS96-R971S(B`E("AS96QF+E903D-/3D9$25(I"B`@ -M("`@("`@>&PR='!D8V]N9F9I;&4@/2`B+V5T8R]X;#)T<&0O>&PR='!D+F-O -M;F8B"B`@("`@("`@>&PR='!O<'1I;VYS9FEL92`]("(O971C+W!P<"]O<'1I -M;VYS+GAL,G1P9"(*"B`@("`@("`@;&]C86QI<"`](&]B:ELG;&]C86Q?:7`G -M70H@("`@("`@(&QO8V%L8VED2`Z(%!32R!<(B5S7"(B("4@*&QE9G0L('!S:RDI"B`@ -M("`@("`@&PR='!D8V]N9F9I;&4I"B`@("`@("`@>&PR='!D8V]N9BYA9&1E -M<2@B:7`@&PR='!O<'1I;VYS+F-O;6UI="@I"@H@("`@9&5F(')E;6]T96%C8V5S -M2@I"B`@("`@("`@4EP -M*')U;&5;)W!U8FQI8U]I<"==*0H@("`@("`@(&EN=&5R;F%L7V9W:6YT97)F -M86-E(#T@4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI -M"B`@("`@("`@<'5B;&EC7V9W<&]R=',@/2!S96QF+G!O4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI -M+`H@("`@("`@("`@("`@("`@&UA2(Z"B`@("`@("`@("`@(&9W7W!R97)O=71? -M2(Z"B`@("`@ -M("`@("`@(&9W7W!O2(Z"B`@("`@("`@ -M("`@(&9W7W!O2(Z"B`@("`@ -M("`@("`@(&9W7V]U='!U=%]R=6QE("L]("(@+2UD<&]R="`E2(Z"B`@("`@("`@("`@ -M(&9W7V]U='!U=%]R=6QE("L]("(Z(B`K('-E;&8N<&]R='-4;U-T4EP*')U;&5;)VEN=&5R;F%L7VEP -M)UTI+`H@("`@("`@("`@("`@("`@&9F9F9F9F9F -M("TM8W1M87-K(#!X9F9F9F9F9F8B("4*("`@("`@("`@("`@("`@("`@("`@ -M("`@4EP*')U;&5;(FEN=&5R;F%L -M7VEP(ETI+"!S96QF+F=E=$=U97-T27`H*2E=*0H*"F-L87-S($EP5&%B;&5S -M17AE8W5T;W(Z"@H@("`@8V]N9FEG(#T@3F]N90H*("`@(&1E9B!?7VEN:71? -M7RAS96QF+"!C;VYF:62!PR)P&5C=71OR)P&5C=71OR)P&5C=71O7!E.B`E&5C27!T86)L97,H8V]N9FEG -M*3H*("`@("`@("!L;V=G:6YG+F1E8G5G*")0&5C=71O7,H*3H*("`@("`@("`@ -M("`@97AE8T1A=&%B86&5C -M27!T86)L97,H8V]N9FEG*0H@("`@96QI9B!J&5C27!T86)L -M97,H8V]N9FEG*0H@("`@96QS93H*("`@("`@("!L;V=G:6YG+G=A7!E/25S(B`E("AP/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/configure.py': 'MD5 check failed' - ) << \SHAR_EOF -8987217852a386250687dfce6d0b10be cloud_scripts/opt/cloud/bin/configure.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/configure.py'` -ne 45920 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/configure.py' is not 45920" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_vmp.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vmp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vmp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vmp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_vmp.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=WWT*("`@(')C6R=I9"==(#T@)W9M<&%S/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vmp.py': 'MD5 check failed' - ) << \SHAR_EOF -3e1ea6831cb27eedc825e25bf817cb9c cloud_scripts/opt/cloud/bin/cs_vmp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vmp.py'` -ne 1126 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vmp.py' is not 1126" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# getRouterMonitorResults.sh --- Send the monitor results to Management Server -X -if [ "$1" == "true" ] -then -X python /root/monitorServices.py > /dev/null -fi -X -printf "FAILING CHECKS:\n" -X -if [ -f /root/basic_failing_health_checks ] -then -X echo `cat /root/basic_failing_health_checks` -fi -X -if [ -f /root/advanced_failing_health_checks ] -then -X echo `cat /root/advanced_failing_health_checks` -fi -X -printf "MONITOR RESULTS:\n" -X -echo "{\"basic\":" -if [ -f /root/basic_monitor_results.json ] -then -X echo `cat /root/basic_monitor_results.json` -else -X echo "{}" -fi -echo ",\"advanced\":" -if [ -f /root/advanced_monitor_results.json ] -then -X echo `cat /root/advanced_monitor_results.json` -else -X echo "{}" -fi -X -echo "}" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh': 'MD5 check failed' - ) << \SHAR_EOF -35649a8a1a8339aaa42a311826699849 cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh'` -ne 1526 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' is not 1526" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vr_cfg.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vr_cfg.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vr_cfg.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -#set -x -X -cfg= -version= -log=/var/log/cloud.log -X -log_it() { -X logger -t cloud "$*" -X echo "$(date) : $*" >> $log -} -X -while getopts 'c:' OPTION; do -X case $OPTION in -X c) cfg="$OPTARG" ;; -esac; done -X -export DEFER_CONFIG=true -while read line; do -X #comment -X if [[ $line == \#* ]]; then -X continue -X -X elif [ "$line" == "" ]; then -X read line -X version=$line -X log_it "VR config: configuation format version $version" -X #skip -X read line -X -X elif [ "$line" == " -X read line -X log_it "VR config: execution success " -X -X elif [ "$line" == "" ]; then -X read line -X file=$line -X log_it "VR config: creating file: $file" -X rm -f $file -X while read -r line; do -X if [ "$line" == "" ]; then -X break -X fi -X echo $line >> $file -X done -X log_it "VR config: create file success" -X -X fi -X -done < $cfg -X -# archive the configuration file -mv $cfg /var/cache/cloud/processed/ -X -unset DEFER_CONFIG -# trigger finish_config() -if [ -f /etc/cloudstack/dhcpentry.json ]; then -X /opt/cloud/bin/configure.py vm_dhcp_entry.json -fi -if [ -f /etc/cloudstack/vmdata.json ]; then -X /opt/cloud/bin/configure.py vm_metadata.json -fi -X -# Flush kernel conntrack table -log_it "VR config: Flushing conntrack table" -conntrackd -d 2> /dev/null -if [ $? -eq 0 ]; then -X conntrackd -F -X conntrackd -k -else -X conntrackd -F -fi -log_it "VR config: Flushing conntrack table completed" -X -Xexit 0 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vr_cfg.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vr_cfg.sh': 'MD5 check failed' - ) << \SHAR_EOF -da02bd413616a9cc131fd039e627eb3e cloud_scripts/opt/cloud/bin/vr_cfg.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vr_cfg.sh'` -ne 2725 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' is not 2725" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpc_snat.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_snat.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_snat.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# @VERSION@ -X -source /root/func.sh -source /opt/cloud/bin/vpc_func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage:\n %s -A -l \n" $(basename $0) >&2 -X printf " %s -D -l \n" $(basename $0) >&2 -} -X -X -add_snat() { -X logger -t cloud "$(basename $0):Added SourceNAT $pubIp on interface $ethDev" -X vpccidr=$(getVPCcidr) -X sudo iptables -D FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT -X sudo iptables -A FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT -X sudo iptables -t nat -D POSTROUTING -j SNAT -o $ethDev --to-source $pubIp -X sudo iptables -t nat -A POSTROUTING -j SNAT -o $ethDev --to-source $pubIp -X return $? -} -remove_snat() { -X logger -t cloud "$(basename $0):Removing SourceNAT $pubIp on interface $ethDev" -X sudo iptables -t nat -D POSTROUTING -j SNAT -o $ethDev --to-source $pubIp -X return $? -} -X -#set -x -lflag=0 -cflag=0 -op="" -X -while getopts 'ADl:c:' OPTION -do -X case $OPTION in -X A) Aflag=1 -X op="-A" -X ;; -X D) Dflag=1 -X op="-D" -X ;; -X l) lflag=1 -X pubIp="$OPTARG" -X ;; -X c) cflag=1 -X ethDev="$OPTARG" -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [ "$Aflag$Dflag" != "1" ] -then -X usage -X unlock_exit 2 $lock $locked -fi -X -if [ "$lflag$cflag" != "11" ] -then -X usage -X unlock_exit 2 $lock $locked -fi -X -if [ "$Aflag" == "1" ] -then -X add_snat $publicIp -X unlock_exit $? $lock $locked -fi -X -if [ "$Dflag" == "1" ] -then -X remove_sat $publicIp -X unlock_exit $? $lock $locked -fi -X -unlock_exit 1 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_snat.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_snat.sh': 'MD5 check failed' - ) << \SHAR_EOF -23502a2ce3829fb787464124f13b9141 cloud_scripts/opt/cloud/bin/vpc_snat.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_snat.sh'` -ne 2346 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' is not 2346" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpc_staticroute.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_staticroute.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_staticroute.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# @VERSION@ -X -source /root/func.sh -source /opt/cloud/bin/vpc_func.sh -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s: -a < routes > \n" $(basename $0) >&2 -} -X -#set -x -X -flush_table_backup() { -X flush_table "static_route_back" -} -X -flush_table() { -X local tab=$1 -X sudo ip route flush table $tab -} -X -copy_table() { -X local from=$1 -X local to=$2 -X sudo ip route show table $from | while read route -X do -X sudo ip route add table $to $route -X done -} -X -backup_table() { -X flush_table "static_route_back" -X copy_table "static_route" "static_route_back" -X flush_table "static_route" -} -X -restore_table() { -X flush_table "static_route" -X copy_table "static_route_back" "static_route" -X flush_table "static_route_back" -} -X -static_route() { -X local rule=$1 -X local ip=$(echo $rule | cut -d: -f1) -X if [ $ip == "Revoke" ] -X then -X return 0 -X fi -X local gateway=$(echo $rule | cut -d: -f2) -X local cidr=$(echo $rule | cut -d: -f3) -X logger -t cloud "$(basename $0): static route: public ip=$ip \ -X gateway=$gateway cidr=$cidr" -X local dev=$(getEthByIp $ip) -X if [ $? -gt 0 ] -X then -X return 1 -X fi -X sudo ip route add $cidr dev $dev via $gateway table static_route &>/dev/null -X result=$? -X logger -t cloud "$(basename $0): done static route: public ip=$ip \ -X gateway=$gateway cidr=$cidr" -X return $result -} -X -gflag= -aflag= -while getopts 'a:' OPTION -X -do -X case $OPTION in -X a) aflag=1 -X rules="$OPTARG" -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [ -n "$rules" ] -then -X rules_list=$(echo $rules | cut -d, -f1- --output-delimiter=" ") -fi -X -success=0 -X -backup_table -X -for r in $rules_list -do -X static_route $r -X success=$? -X if [ $success -gt 0 ] -X then -X logger -t cloud "$(basename $0): failure to apply fw rules for guest network: $gcidr" -X break -X else -X logger -t cloud "$(basename $0): successful in applying fw rules for guest network: $gcidr" -X fi -done -X -if [ $success -gt 0 ] -then -X logger -t cloud "$(basename $0): restoring from backup for guest network: $gcidr" -X restore_table -else -X logger -t cloud "$(basename $0): deleting backup for guest network: $gcidr" -X flush_table_backup -fi -unlock_exit $success $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_staticroute.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh': 'MD5 check failed' - ) << \SHAR_EOF -4080c04ff7600874ef4a4364aefc4d18 cloud_scripts/opt/cloud/bin/vpc_staticroute.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh'` -ne 3043 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' is not 3043" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/baremetal-vr.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/baremetal-vr.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/baremetal-vr.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/baremetal-vr.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/baremetal-vr.py -M(TQI8V5N6ME>2<@:6X@<#H*("`@("`@("`@("`@("`@("`@("`@("`@ -M2`]('`N6ME>2!I;B`E0H*("`@(&1E -M9B!?9V5T7VUG;71?:7`H4)AFEP*')E<7,N:V5Y2P@:&%S:%-T5]P/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/baremetal-vr.py': 'MD5 check failed' - ) << \SHAR_EOF -f87e8890aa7ad3cc522c5c5ceb2fbf69 cloud_scripts/opt/cloud/bin/baremetal-vr.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/baremetal-vr.py'` -ne 5587 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/baremetal-vr.py' is not 5587" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_firewallrules.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_firewallrules.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_firewallrules.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import copy -X -X -def merge(dbag, data): -X dbagc = copy.deepcopy(dbag) -X if "rules" not in data: -X return dbagc -X for rule in data['rules']: -X id = str(rule['id']) -X if rule['revoked']: -X if id in dbagc.keys(): -X del(dbagc[id]) -X elif id not in dbagc.keys(): -X dbagc[id] = rule -X return dbagc -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_firewallrules.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py': 'MD5 check failed' - ) << \SHAR_EOF -6d3faf49679b84bf9a098eee6b630f69 cloud_scripts/opt/cloud/bin/cs_firewallrules.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py'` -ne 1141 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' is not 1141" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/netusage.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/netusage.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/netusage.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/netusage.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/netusage.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -X -# netusage.sh -- create iptable rules to gather network stats, running within DomR -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s -[c|g|r] [-[a|d] ]\n" $(basename $0) >&2 -} -X -create_usage_rules () { -X iptables-save|grep "INPUT -j NETWORK_STATS" > /dev/null -X if [ $? -eq 0 ] -X then -X return $? -X fi -X iptables -N NETWORK_STATS > /dev/null -X iptables -I FORWARD -j NETWORK_STATS > /dev/null -X iptables -I INPUT -j NETWORK_STATS > /dev/null -X iptables -I OUTPUT -j NETWORK_STATS > /dev/null -X iptables -A NETWORK_STATS -i eth0 -o eth2 > /dev/null -X iptables -A NETWORK_STATS -i eth2 -o eth0 > /dev/null -X iptables -A NETWORK_STATS -o eth2 ! -i eth0 -p tcp > /dev/null -X iptables -A NETWORK_STATS -i eth2 ! -o eth0 -p tcp > /dev/null -X return $? -} -X -add_public_interface () { -X local pubIf=$1 -X iptables-save|grep "NETWORK_STATS -i eth0 -o $pubIf" > /dev/null -X if [ $? -eq 0 ] -X then -X return $? -X fi -X iptables -A NETWORK_STATS -i eth0 -o $pubIf > /dev/null -X iptables -A NETWORK_STATS -i $pubIf -o eth0 > /dev/null -X iptables -A NETWORK_STATS -o $pubIf ! -i eth0 -p tcp > /dev/null -X iptables -A NETWORK_STATS -i $pubIf ! -o eth0 -p tcp > /dev/null -X return $? -} -X -delete_public_interface () { -X local pubIf=$1 -X echo $pubIf >> /root/removedVifs -X return $? -} -X -get_usage () { -X iptables -L NETWORK_STATS -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null -X if [ -f /root/removedVifs ] ; then iptables -Z NETWORK_STATS ; fi; > /dev/null -X /root/clearUsageRules.sh > /dev/null -X if [ $? -gt 0 -a $? -ne 2 ] -X then -X printf $? -X return 1 -X fi -} -X -reset_usage () { -X iptables -Z NETWORK_STATS > /dev/null -X if [ $? -gt 0 -a $? -ne 2 ] -X then -X return 1 -X fi -} -X -#set -x -X -cflag= -gflag= -rflag= -iflag= -aflag= -dflag= -X -while getopts 'cgria:d:' OPTION -do -X case $OPTION in -X c) cflag=1 -X ;; -X g) gflag=1 -X ;; -X r) rflag=1 -X ;; -X a) aflag=1 -X publicIf="$OPTARG" -X ;; -X d) dflag=1 -X publicIf="$OPTARG" -X ;; -X i) #Do nothing, since it's parameter for host script -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [ "$cflag" == "1" ] -then -X #create_usage_rules -X unlock_exit $? $lock $locked -fi -X -if [ "$gflag" == "1" ] -then -X get_usage -X unlock_exit $? $lock $locked -fi -X -if [ "$rflag" == "1" ] -then -X reset_usage -X unlock_exit $? $lock $locked -fi -X -if [ "$aflag" == "1" ] -then -X #add_public_interface $publicIf -X unlock_exit $? $lock $locked -fi -X -if [ "$dflag" == "1" ] -then -X #delete_public_interface $publicIf -X unlock_exit $? $lock $locked -fi -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/netusage.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/netusage.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/netusage.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/netusage.sh': 'MD5 check failed' - ) << \SHAR_EOF -2966c6cafee62e66ff903e53367b498b cloud_scripts/opt/cloud/bin/netusage.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/netusage.sh'` -ne 3478 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/netusage.sh' is not 3478" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/monitor_service.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/monitor_service.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/monitor_service.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/monitor_service.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/monitor_service.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -set -x -usage() { -X printf "Usage: %s: -c config string \n" $(basename $0) >&2 -} -X -configFile='/etc/monitor.conf' -X -create_config() { -services=$1; -services_list=$(echo $services | cut -d, -f1- --output-delimiter=" "); -X -echo "#Monitor services config" >$configFile -X -for s in $services_list -do -service=$(echo $s | cut -d: -f1); -processname=$(echo $s | cut -d: -f2); -service_name=$(echo $s | cut -d: -f3); -pidfile=$(echo $s | cut -d: -f4); -X -echo "$service" >> $configFile; -echo $processname >> $configFile -echo $service_name >> $configFile -echo $pidfile >> $configFile -X -done -X -} -X -config=$2 -if [ -n "$3" ] -then -X -#delete cron job before updating config file -crontab -l|grep "monitorServices.py" -X -if [ $? -eq 0 ] -then -X t=`date +%s`; -X touch /tmp/monitor-$t.txt; -X conf=/tmp/monitor-$t.txt -X crontab -l >$conf -X sed -i /#monitoringConfig/,+3d $conf -X crontab $conf -X rm $conf -fi -X -X -logger -t cloud "deleted crontab entry for monitoring services" -unlock_exit 0 $lock $locked -fi -X -create_config $config -X -#add cron job -crontab -l|grep "monitorServices.py" -if [ $? -ne 0 ] -X then -X (crontab -l ;echo -e "#monitoringConfig\nSHELL=/bin/bash\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n */3 * * * * /usr/bin/python /root/monitorServices.py") | crontab - -X logger -t cloud "added crontab entry for monitoring services" -fi -X -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/monitor_service.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/monitor_service.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/monitor_service.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/monitor_service.sh': 'MD5 check failed' - ) << \SHAR_EOF -3419e7baf45ac36d3d69ca71ef7ab978 cloud_scripts/opt/cloud/bin/monitor_service.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/monitor_service.sh'` -ne 2294 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/monitor_service.sh' is not 2294" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_ip.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_ip.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_ip.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_ip.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_ip.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N7!E)UT@/2!I<%LG;G=?='EP92==+FQO=V5R*"D*("`@(&EF(&EP -M6R=N=U]T>7!E)UT@/3T@)V-O;G1R;VPG.@H@("`@("`@(&1B86=;:7!;)V1E -M=FEC92==72`](%MI<%T*("`@(&5L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_ip.py': 'MD5 check failed' - ) << \SHAR_EOF -856c6261f2876c280c49fa486f4f7408 cloud_scripts/opt/cloud/bin/cs_ip.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_ip.py'` -ne 2581 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_ip.py' is not 2581" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/bumpup_priority.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/bumpup_priority.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/bumpup_priority.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -touch /tmp/rrouter_bumped -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/bumpup_priority.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh': 'MD5 check failed' - ) << \SHAR_EOF -35091259ed848a9f7270aca1a90e95af cloud_scripts/opt/cloud/bin/bumpup_priority.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh'` -ne 824 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' is not 824" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/getRouterAlerts.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/getRouterAlerts.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/getRouterAlerts.sh (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/getRouterAlerts.sh -M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5LP77T*"B`@("`@("`@("`@ -M("`@("!T;T1A=&5686P])"AD871E("UD("(D9&%T979A;"(@(BLE/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh': 'MD5 check failed' - ) << \SHAR_EOF -6c3803100b0923fd3f9017a0e09d6fd5 cloud_scripts/opt/cloud/bin/getRouterAlerts.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh'` -ne 1706 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh' is not 1706" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/postinit.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/postinit.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/postinit.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# This scripts before ssh.service but after cloud-early-config -X -# Eject cdrom if any -eject || true -X -# Restart journald for setting changes to apply -systemctl restart systemd-journald -X -TYPE=$(grep -Po 'type=\K[a-zA-Z]*' /var/cache/cloud/cmdline) -if [ "$TYPE" == "router" ] || [ "$TYPE" == "vpcrouter" ] || [ "$TYPE" == "dhcpsrvr" ] -then -X if [ -x /opt/cloud/bin/update_config.py ] -X then -X /opt/cloud/bin/update_config.py cmd_line.json || true -X fi -fi -X -[ ! -f /var/cache/cloud/enabled_svcs ] && touch /var/cache/cloud/enabled_svcs -for svc in $(cat /var/cache/cloud/enabled_svcs) -do -X systemctl enable --now --no-block $svc -done -X -[ ! -f /var/cache/cloud/disabled_svcs ] && touch /var/cache/cloud/disabled_svcs -for svc in $(cat /var/cache/cloud/disabled_svcs) -do -X systemctl disable --now --no-block $svc -done -X -# Restore the persistent iptables nat, rules and filters for IPv4 and IPv6 if they exist -ipv4="/etc/iptables/rules.v4" -if [ -e $ipv4 ] -then -X iptables-restore < $ipv4 -fi -X -ipv6="/etc/iptables/rules.v6" -if [ -e $ipv6 ] -then -X ip6tables-restore < $ipv6 -fi -X -# Patch known systemd/sshd memory leak - https://github.com/systemd/systemd/issues/8015#issuecomment-476160981 -echo '@include null' >> /etc/pam.d/systemd-user -X -# Enable and Start SSH -systemctl enable --now --no-block ssh -X -date > /var/cache/cloud/boot_up_done -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/postinit.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/postinit.sh': 'MD5 check failed' - ) << \SHAR_EOF -170afadf6f130e9cb697dca65a87aacb cloud_scripts/opt/cloud/bin/setup/postinit.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/postinit.sh'` -ne 2122 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' is not 2122" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/secstorage.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/secstorage.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/secstorage.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_secstorage() { -X log_it "Setting up secondary storage system vm" -X -X echo "cloud apache2 nfs-common portmap" > /var/cache/cloud/enabled_svcs -X echo "conntrackd keepalived haproxy dnsmasq" > /var/cache/cloud/disabled_svcs -X mkdir -p /var/log/cloud -X -X setup_common eth0 eth1 eth2 -X setup_storage_network -X setup_system_rfc1918_internal -X -X log_it "Setting up entry in hosts" -X sed -i /$NAME/d /etc/hosts -X public_ip=`getPublicIp` -X echo "$public_ip $NAME" >> /etc/hosts -X -X log_it "Applying iptables rules" -X cp /etc/iptables/iptables-secstorage /etc/iptables/rules.v4 -X -X log_it "Configuring sshd" -X local hyp=$HYPERVISOR -X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then -X setup_sshd $ETH1_IP "eth1" -X else -X setup_sshd $ETH0_IP "eth0" -X fi -X -X log_it "Configuring apache2" -X setup_apache2 $ETH2_IP -X -X # Deprecated, should move to Cs Python all of it -X sed -e "s///" \ -X -e "s///" \ -X -e "s/Listen .*:8180/Listen $ETH2_IP:80/g" \ -X -e "s/Listen .*:8443/Listen $ETH2_IP:443/g" /etc/apache2/vhost.template > /etc/apache2/sites-enabled/vhost-${ETH2_IP}.conf -X -X log_it "Setting up apache2 for post upload of volume/template" -X a2enmod proxy -X a2enmod proxy_http -X a2enmod headers -X -X cat >/etc/apache2/cors.conf </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh': 'MD5 check failed' - ) << \SHAR_EOF -14aea171a5e0fdfd3069bb96bde91e0b cloud_scripts/opt/cloud/bin/setup/secstorage.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh'` -ne 2720 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' is not 2720" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/ilbvm.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -ilbvm_svcs() { -X echo "haproxy" > /var/cache/cloud/enabled_svcs -X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs -} -X -setup_ilbvm() { -X log_it "Setting up Internal Load Balancer system vm" -X setup_common eth0 eth1 -X #eth0 = guest network, eth1=control network -X -X sed -i /$NAME/d /etc/hosts -X echo "$ETH0_IP $NAME" >> /etc/hosts -X -X cp /etc/iptables/iptables-ilbvm /etc/iptables/rules.v4 -X setup_sshd $ETH1_IP "eth1" -X -X enable_fwding 0 -X enable_irqbalance 1 -} -X -ilbvm_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute ilbvm svcs" -X exit 1 -fi -setup_ilbvm -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/ilbvm.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh': 'MD5 check failed' - ) << \SHAR_EOF -87c70bdf6c0d4d41f0ff87475494188f cloud_scripts/opt/cloud/bin/setup/ilbvm.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh'` -ne 1442 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' is not 1442" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_vpcrouter() { -X log_it "Setting up VPC virtual router system vm" -X -X if [ -f /etc/hosts ]; then -X grep -q $NAME /etc/hosts || echo "127.0.0.1 $NAME" >> /etc/hosts; -X fi -X -X cat > /etc/network/interfaces << EOF -auto lo eth0 -iface lo inet loopback -EOF -X setup_interface "0" $ETH0_IP $ETH0_MASK $GW -X -X echo $NAME > /etc/hostname -X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon -X hostnamectl set-hostname $NAME -X -X #Nameserver -X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries -X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries -X if [ -n "$internalNS1" ] -X then -X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS1" > /etc/resolv.conf -X fi -X -X if [ -n "$internalNS2" ] -X then -X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS2" >> /etc/resolv.conf -X fi -X if [ -n "$NS1" ] -X then -X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS1" >> /etc/resolv.conf -X fi -X -X if [ -n "$NS2" ] -X then -X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS2" >> /etc/resolv.conf -X fi -X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] -X then -X if [ "$HYPERVISOR" == "vmware" ] || [ "$HYPERVISOR" == "hyperv" ]; -X then -X ip route add $MGMTNET via $LOCAL_GW dev eth0 -X # workaround to activate vSwitch under VMware -X timeout 3 ping -n -c 3 $LOCAL_GW || true -X fi -X fi -X -X ip route delete default -X # create route table for static route -X -X sudo echo "252 static_route" >> /etc/iproute2/rt_tables 2>/dev/null -X sudo echo "251 static_route_back" >> /etc/iproute2/rt_tables 2>/dev/null -X sudo ip rule add from $VPCCIDR table static_route 2>/dev/null -X sudo ip rule add from $VPCCIDR table static_route_back 2>/dev/null -X -X setup_vpc_apache2 -X -X enable_irqbalance 1 -X enable_vpc_rpsrfs 1 -X disable_rpfilter -X enable_fwding 1 -X enable_passive_ftp 1 -X cp /etc/iptables/iptables-vpcrouter /etc/iptables/rules.v4 -X setup_sshd $ETH0_IP "eth0" -X cp /etc/vpcdnsmasq.conf /etc/dnsmasq.conf -X cp /etc/cloud-nic.rules /etc/udev/rules.d/cloud-nic.rules -X echo "" > /etc/dnsmasq.d/dhcphosts.txt -X echo "dhcp-hostsfile=/etc/dhcphosts.txt" > /etc/dnsmasq.d/cloud.conf -X -X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" -X #DNS server will append $DOMAIN to local queries -X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf -X #answer all local domain queries -X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf -X -X command -v dhcp_release > /dev/null 2>&1 -X no_dhcp_release=$? -X if [ $no_dhcp_release -eq 0 ] -X then -X echo 1 > /var/cache/cloud/dnsmasq_managed_lease -X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf -X else -X echo 0 > /var/cache/cloud/dnsmasq_managed_lease -X fi -X -X # Setup hourly logrotate -X if [ -f /etc/cron.daily/logrotate ]; then -X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 -X fi -} -X -routing_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute routing_svcs" -X exit 1 -fi -setup_vpcrouter -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh': 'MD5 check failed' - ) << \SHAR_EOF -811420d11f97b1d7237b964e8bbbdf5d cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh'` -ne 3885 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' is not 3885" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/router.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/router.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/router.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/router.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/router.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -check_reboot_vmware() { -X if [ "$HYPERVISOR" != "vmware" ]; then -X return -X fi -X -X if [ -n "$MGMTNET" ]; then -X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') -X if ping -n -c 1 -W 3 $MGMT_GW &> /dev/null; then -X log_it "Management gateway pingable, skipping VR reboot" -X return -X fi -X fi -X -X log_it "Management gateway not pingable, rebooting VR" -X sync -X reboot -} -X -setup_router() { -X # To save router public interface and gw ip information -X touch /var/cache/cloud/ifaceGwIp -X -X oldmd5= -X [ -f "/etc/udev/rules.d/70-persistent-net.rules" ] && oldmd5=$(md5sum "/etc/udev/rules.d/70-persistent-net.rules" | awk '{print $1}') -X -X if [ -n "$ETH2_IP" ]; then -X setup_common eth0 eth1 eth2 -X -X if [ -n "$EXTRA_PUBNICS" ]; then -X for ((i = 3; i < 3 + $EXTRA_PUBNICS; i++)); do -X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" -X done -X fi -X else -X setup_common eth0 eth1 -X if [ -n "$EXTRA_PUBNICS" ]; then -X for ((i = 2; i < 2 + $EXTRA_PUBNICS; i++)); do -X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" -X done -X fi -X fi -X -X log_it "Checking udev NIC assignment order changes" -X if [ "$NIC_MACS" != "" ] -X then -X init_interfaces_orderby_macs "$NIC_MACS" "/tmp/interfaces" "/tmp/udev-rules" -X newmd5=$(md5sum "/tmp/udev-rules" | awk '{print $1}') -X rm /tmp/interfaces -X rm /tmp/udev-rules -X -X if [ "$oldmd5" != "$newmd5" ] -X then -X log_it "Reloading udev for new udev NIC assignment" -X udevadm control --reload-rules && udevadm trigger -X check_reboot_vmware -X fi -X fi -X -X setup_aesni -X setup_dnsmasq -X setup_apache2 $ETH0_IP -X -X sed -i /$NAME/d /etc/hosts -X echo "$ETH0_IP $NAME" >> /etc/hosts -X -X enable_irqbalance 1 -X disable_rpfilter_domR -X enable_fwding 1 -X enable_rpsrfs 1 -X enable_passive_ftp 1 -X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 -X setup_sshd $ETH1_IP "eth1" -X -X # Only allow DNS service for current network -X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X -X # Setup hourly logrotate -X if [ -f /etc/cron.daily/logrotate ]; then -X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 -X fi -} -X -routing_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute routing_svcs" -X exit 1 -fi -setup_router -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/router.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/router.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/router.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/router.sh': 'MD5 check failed' - ) << \SHAR_EOF -2ae62d5d44c716730231c9d77618fe91 cloud_scripts/opt/cloud/bin/setup/router.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/router.sh'` -ne 3355 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/router.sh' is not 3355" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/elbvm.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/elbvm.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/elbvm.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -elbvm_svcs() { -X echo "haproxy" > /var/cache/cloud/enabled_svcs -X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs -} -X -setup_elbvm() { -X log_it "Setting up Elastic Load Balancer system vm" -X setup_common eth0 eth1 -X sed -i /$NAME/d /etc/hosts -X public_ip=$ETH2_IP -X [ "$ETH2_IP" == "0.0.0.0" ] || [ "$ETH2_IP" == "" ] && public_ip=$ETH0_IP -X echo "$public_ip $NAME" >> /etc/hosts -X -X cp /etc/iptables/iptables-elbvm /etc/iptables/rules.v4 -X if [ "$SSHONGUEST" == "true" ] -X then -X setup_sshd $ETH0_IP "eth0" -X else -X setup_sshd $ETH1_IP "eth1" -X fi -X -X enable_fwding 0 -X enable_irqbalance 0 -} -X -elbvm_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute elbvm svcs" -X exit 1 -fi -setup_elbvm -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/elbvm.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh': 'MD5 check failed' - ) << \SHAR_EOF -2d34615f1d40f6125a2205e6118ba07f cloud_scripts/opt/cloud/bin/setup/elbvm.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh'` -ne 1578 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' is not 1578" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/bootstrap.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" -CMDLINE=/var/cache/cloud/cmdline -X -rm -f /var/cache/cloud/enabled_svcs -rm -f /var/cache/cloud/disabled_svcs -X -X. /lib/lsb/init-functions -X -log_it() { -X echo "$(date) $@" >> /var/log/cloud.log -X log_action_msg "$@" -} -X -hypervisor() { -X if [ -d /proc/xen ]; then -X mount -t xenfs none /proc/xen -X $(dmesg | grep -q "Xen HVM") -X if [ $? -eq 0 ]; then # 1=PV,0=HVM -X echo "xen-hvm" && return 0 -X else -X echo "xen-pv" && return 0 -X fi -X fi -X -X [ -x /usr/sbin/virt-what ] && local facts=( $(virt-what) ) -X if [ "$facts" != "" ]; then -X # Xen HVM is recognized as Hyperv when Viridian extensions are enabled -X if [ "${facts[-1]}" == "xen-domU" ] && [ "${facts[0]}" == "hyperv" ]; then -X echo "xen-hvm" && return 0 -X else -X echo ${facts[-1]} && return 0 -X fi -X fi -X -X grep -q QEMU /proc/cpuinfo && echo "kvm" && return 0 -X grep -q QEMU /var/log/messages && echo "kvm" && return 0 -X -X vmware-checkvm &> /dev/null && echo "vmware" && return 0 -X -X echo "unknown" && return 1 -} -X -config_guest() { -X [ ! -d /proc/xen ] && sed -i 's/^vc/#vc/' /etc/inittab && telinit q -X [ -d /proc/xen ] && sed -i 's/^#vc/vc/' /etc/inittab && telinit q -X -X systemctl daemon-reload -X -X case $HYPERVISOR in -X xen-pv|xen-domU) -X systemctl stop ntpd -X systemctl disable ntpd -X systemctl enable xe-daemon -X systemctl start xe-daemon -X -X cat /proc/cmdline > $CMDLINE -X sed -i "s/%/ /g" $CMDLINE -X ;; -X xen-hvm) -X systemctl stop ntpd -X systemctl disable ntpd -X systemctl enable xe-daemon -X systemctl start xe-daemon -X -X if [ ! -f /usr/bin/xenstore-read ]; then -X log_it "ERROR: xentools not installed, cannot found xenstore-read" && exit 5 -X fi -X /usr/bin/xenstore-read vm-data/cloudstack/init > $CMDLINE -X sed -i "s/%/ /g" $CMDLINE -X ;; -X kvm) -X # Configure kvm hotplug support -X if grep -E 'CONFIG_HOTPLUG_PCI=y|CONFIG_HOTPLUG_PCI_ACPI=y' /boot/config-`uname -r`; then -X log_it "acpiphp and pci_hotplug module already compiled in" -X else -X modprobe acpiphp 2> /dev/null && log_it "acpiphp module loaded" || true -X modprobe pci_hotplug 2> /dev/null && log_it "pci_hotplug module loaded" || true -X fi -X -X sed -i -e "/^s0:2345:respawn.*/d" /etc/inittab -X sed -i -e "/6:23:respawn/a\s0:2345:respawn:/sbin/getty -L 115200 ttyS0 vt102" /etc/inittab -X systemctl enable qemu-guest-agent -X systemctl start qemu-guest-agent -X -X # Wait for $CMDLINE file to be written by the qemu-guest-agent -X for i in {1..60}; do -X if [ -s $CMDLINE ]; then -X log_it "Received a new non-empty cmdline file from qemu-guest-agent" -X break -X fi -X sleep 1 -X done -X if [ ! -s $CMDLINE ]; then -X log_it "Failed to receive the cmdline file via the qemu-guest-agent" -X fi -X ;; -X vmware) -X # system time sync'd with host via vmware tools -X systemctl stop ntpd -X systemctl disable ntpd -X systemctl enable open-vm-tools -X systemctl start open-vm-tools -X -X vmtoolsd --cmd 'machine.id.get' > $CMDLINE -X ;; -X virtualpc|hyperv) -X # Hyper-V is recognized as virtualpc hypervisor type. Boot args are passed using KVP Daemon -X systemctl enable hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service -X systemctl start hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service -X sleep 5 -X cp -f /var/opt/hyperv/.kvp_pool_0 $CMDLINE -X cat /dev/null > /var/opt/hyperv/.kvp_pool_0 -X ;; -X virtualbox) -X # Virtualbox is used to test the virtual router -X # get the commandline from a dmistring (yes, hacky!) -X dmidecode | grep cmdline | sed 's/^.*cmdline://' > $CMDLINE -X RV=$? -X if [ $RV -ne 0 ] ; then -X log_it "Failed to get cmdline from a virtualbox dmi property" -X fi -X ;; -X esac -X -X # Find and export guest type -X export TYPE=$(grep -Po 'type=\K[a-zA-Z]*' $CMDLINE) -} -X -patch_systemvm() { -X local patchfile=$1 -X local backupfolder="/tmp/.conf.backup" -X local logfile="/var/log/patchsystemvm.log" -X if [ -f /usr/local/cloud/systemvm/conf/cloud.jks ]; then -X rm -fr $backupfolder -X mkdir -p $backupfolder -X cp -r /usr/local/cloud/systemvm/conf/* $backupfolder/ -X fi -X rm /usr/local/cloud/systemvm -rf -X mkdir -p /usr/local/cloud/systemvm -X echo "All" | unzip $patchfile -d /usr/local/cloud/systemvm >$logfile 2>&1 -X find /usr/local/cloud/systemvm/ -name \*.sh | xargs chmod 555 -X if [ -f $backupfolder/cloud.jks ]; then -X cp -r $backupfolder/* /usr/local/cloud/systemvm/conf/ -X echo "Restored keystore file and certs using backup" >> $logfile -X fi -X rm -fr $backupfolder -X # Import global cacerts into 'cloud' service's keystore -X keytool -importkeystore -srckeystore /etc/ssl/certs/java/cacerts -destkeystore /usr/local/cloud/systemvm/certs/realhostip.keystore -srcstorepass changeit -deststorepass vmops.com -noprompt || true -X return 0 -} -X -patch() { -X local PATCH_MOUNT=/media/cdrom -X local logfile="/var/log/patchsystemvm.log" -X if [ "$TYPE" == "consoleproxy" ] || [ "$TYPE" == "secstorage" ] && [ -f ${PATCH_MOUNT}/agent.zip ] && [ -f /var/cache/cloud/patch.required ] -X then -X echo "Patching systemvm for cloud service with mount=$PATCH_MOUNT for type=$TYPE" >> $logfile -X patch_systemvm ${PATCH_MOUNT}/agent.zip -X if [ $? -gt 0 ] -X then -X echo "Failed to apply patch systemvm\n" >> $logfile -X exit 1 -X fi -X fi -X -X rm -f /var/cache/cloud/patch.required -X chmod -x /etc/systemd/system/cloud*.service -X systemctl daemon-reload -X umount $PATCH_MOUNT || true -X -X if [ -f /mnt/cmdline ]; then -X cat /mnt/cmdline > $CMDLINE -X fi -X return 0 -} -X -config_sysctl() { -X # When there is more memory reset the cache back pressure to default 100 -X physmem=$(free|awk '/^Mem:/{print $2}') -X if [ $((physmem)) -lt 409600 ]; then -X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 200" /etc/sysctl.conf -X else -X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 100" /etc/sysctl.conf -X fi -X -X sync -X sysctl -p -} -X -bootstrap() { -X log_it "Bootstrapping systemvm appliance" -X -X export HYPERVISOR=$(hypervisor) -X [ $? -ne 0 ] && log_it "Failed to detect hypervisor type, bailing out" && exit 10 -X log_it "Starting guest services for $HYPERVISOR" -X -X config_guest -X patch -X config_sysctl -X -X log_it "Configuring systemvm type=$TYPE" -X if [ -f "/opt/cloud/bin/setup/$TYPE.sh" ]; then -X /opt/cloud/bin/setup/$TYPE.sh -X else -X /opt/cloud/bin/setup/default.sh -X fi -X -X log_it "Finished setting up systemvm" -X exit 0 -} -X -bootstrap -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/bootstrap.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh': 'MD5 check failed' - ) << \SHAR_EOF -722a9c6abfff147c7727fdcd85c96767 cloud_scripts/opt/cloud/bin/setup/bootstrap.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh'` -ne 7721 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' is not 7721" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_console_proxy() { -X log_it "Setting up console proxy system vm" -X -X echo "cloud" > /var/cache/cloud/enabled_svcs -X echo "haproxy dnsmasq apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs -X mkdir -p /var/log/cloud -X -X setup_common eth0 eth1 eth2 -X setup_system_rfc1918_internal -X -X log_it "Setting up entry in hosts" -X sed -i /$NAME/d /etc/hosts -X public_ip=`getPublicIp` -X echo "$public_ip $NAME" >> /etc/hosts -X -X log_it "Applying iptables rules" -X cp /etc/iptables/iptables-consoleproxy /etc/iptables/rules.v4 -X -X log_it "Configuring sshd" -X local hyp=$HYPERVISOR -X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then -X setup_sshd $ETH1_IP "eth1" -X else -X setup_sshd $ETH0_IP "eth0" -X fi -X -X disable_rpfilter -X enable_fwding 0 -X enable_irqbalance 0 -X rm -f /etc/logrotate.d/cloud -} -X -setup_console_proxy -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh': 'MD5 check failed' - ) << \SHAR_EOF -44adac9bf5e54d4791da00e3d1bdaf46 cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh'` -ne 1658 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' is not 1658" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/common.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/common.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/common.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/common.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/common.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" -X -X. /lib/lsb/init-functions -X -log_it() { -X echo "$(date) $@" >> /var/log/cloud.log -X log_action_msg "$@" -} -X -init_interfaces_orderby_macs() { -X macs=( $(echo $1 | sed "s/|/ /g") ) -X total_nics=${#macs[@]} -X interface_file=${2:-"/etc/network/interfaces"} -X rule_file=${3:-"/etc/udev/rules.d/70-persistent-net.rules"} -X -X echo -n "auto lo" > $interface_file -X for((i=0; i> $interface_file -X fi -X done -X -X cat >> $interface_file << EOF -X -iface lo inet loopback -X -EOF -X -X echo "" > $rule_file -X for((i=0; i < ${#macs[@]}; i++)) -X do -X echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${macs[$i]}\", NAME=\"eth$i\"" >> $rule_file -X done -} -X -init_interfaces() { -X if [ "$NIC_MACS" == "" ] -X then -X cat > /etc/network/interfaces << EOF -auto lo $1 $2 $3 -iface lo inet loopback -X -EOF -X else -X init_interfaces_orderby_macs "$NIC_MACS" -X fi -} -X -setup_interface() { -X local intfnum=$1 -X local ip=$2 -X local mask=$3 -X local gw=$4 -X local force=$5 -X local intf=eth${intfnum} -X local bootproto="static" -X -X if [ "$BOOTPROTO" == "dhcp" ] -X then -X if [ "$intfnum" != "0" ] -X then -X bootproto="dhcp" -X fi -X fi -X -X if [ "$ip" != "0.0.0.0" -a "$ip" != "" -o "$force" == "force" ] -X then -X echo "iface $intf inet $bootproto" >> /etc/network/interfaces -X if [ "$bootproto" == "static" ] -X then -X echo " address $ip " >> /etc/network/interfaces -X echo " netmask $mask" >> /etc/network/interfaces -X fi -X fi -X -X if [ "$ip" == "0.0.0.0" -o "$ip" == "" ] -X then -X ifconfig $intf down -X fi -X -X if [ "$force" == "force" ] -X then -X ifdown $intf -X else -X ifdown $intf -X if [ "$RROUTER" != "1" -o "$1" != "2" ] -X then -X ifup $intf -X fi -X fi -} -X -setup_interface_ipv6() { -X sysctl net.ipv6.conf.all.disable_ipv6=0 -X sysctl net.ipv6.conf.all.forwarding=1 -X sysctl net.ipv6.conf.all.accept_ra=1 -X -X sed -i "s/net.ipv6.conf.all.disable_ipv6 =.*$/net.ipv6.conf.all.disable_ipv6 = 0/" /etc/sysctl.conf -X sed -i "s/net.ipv6.conf.all.forwarding =.*$/net.ipv6.conf.all.forwarding = 1/" /etc/sysctl.conf -X sed -i "s/net.ipv6.conf.all.accept_ra =.*$/net.ipv6.conf.all.accept_ra = 1/" /etc/sysctl.conf -X -X local intfnum=$1 -X local ipv6="$2" -X local prelen="$3" -X local intf=eth${intfnum} -X -X echo "iface $intf inet6 static" >> /etc/network/interfaces -X echo " address $ipv6 " >> /etc/network/interfaces -X echo " netmask $prelen" >> /etc/network/interfaces -X echo " accept_ra 1" >> /etc/network/interfaces -X ifdown $intf -X ifup $intf -} -X -X -enable_fwding() { -X local enabled=$1 -X log_it "cloud: enable_fwding = $1" -X log_it "enable_fwding = $1" -X echo "$1" > /proc/sys/net/ipv4/ip_forward -X [ -f /etc/iptables/iptables.conf ] && sed -i "s/ENABLE_ROUTING=.*$/ENABLE_ROUTING=$enabled/" /etc/iptables/iptables.conf && return -} -X -enable_passive_ftp() { -X log_it "cloud: enabling passive FTP for guest VMs" -X echo "$1" > /proc/sys/net/netfilter/nf_conntrack_helper -} -X -disable_rpfilter() { -X log_it "cloud: disable rp_filter" -X log_it "disable rpfilter" -X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf -} -X -get_public_vif_list() { -X local vif_list="" -X for i in /sys/class/net/eth*; do -X vif=$(basename $i); -X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] -X then -X vif_list="$vif_list $vif"; -X fi -X done -X -X echo $vif_list -} -X -disable_rpfilter_domR() { -X log_it "cloud: Tuning rp_filter on public interfaces" -X -X VIF_LIST=$(get_public_vif_list) -X log_it "rpfilter public interfaces : $VIF_LIST" -X if [ "$DISABLE_RP_FILTER" == "true" ] -X then -X log_it "cloud: disable rp_filter on public interfaces" -X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf -X echo "0" > /proc/sys/net/ipv4/conf/default/rp_filter -X for vif in $VIF_LIST; do -X log_it "cloud: disable rp_filter on public interface: $vif" -X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 0/" /etc/sysctl.conf -X echo "0" > /proc/sys/net/ipv4/conf/$vif/rp_filter -X done -X else -X log_it "cloud: enable rp_filter on public interfaces" -X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 1/" /etc/sysctl.conf -X echo "1" > /proc/sys/net/ipv4/conf/default/rp_filter -X for vif in $VIF_LIST; do -X log_it "cloud: enable rp_filter on public interface: $vif" -X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 1/" /etc/sysctl.conf -X echo "1" > /proc/sys/net/ipv4/conf/$vif/rp_filter -X done -X fi -X log_it "cloud: Enabling rp_filter on Non-public interfaces(eth0,eth1,lo)" -X echo "1" > /proc/sys/net/ipv4/conf/eth0/rp_filter -X echo "1" > /proc/sys/net/ipv4/conf/eth1/rp_filter -X echo "1" > /proc/sys/net/ipv4/conf/lo/rp_filter -} -X -enable_irqbalance() { -X local enabled=$1 -X local proc=0 -X -X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) -X if [ $proc -le 1 ] && [ $enabled -eq 1 ] -X then -X enabled=0 -X fi -X -X log_it "Processors = $proc Enable service ${svc} = $enabled" -X local cfg=/etc/default/irqbalance -X [ -f $cfg ] && sed -i "s/ENABLED=.*$/ENABLED=$enabled/" $cfg && return -} -X -enable_vpc_rpsrfs() { -X local enable=$1 -X if [ $enable -eq 0 ] -X then -X echo 0 > /etc/rpsrfsenable -X else -X echo 1 > /etc/rpsrfsenable -X fi -X -X return 0 -} -X -enable_rpsrfs() { -X local enable=$1 -X -X if [ $enable -eq 0 ] -X then -X echo 0 > /etc/rpsrfsenable -X return 0 -X fi -X -X if [ ! -f /sys/class/net/eth0/queues/rx-0/rps_cpus ] -X then -X echo "rps is not enabled in the kernel" -X echo 0 > /etc/rpsrfsenable -X return 0 -X fi -X -X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) -X if [ $proc -le 1 ] -X then -X echo 0 > /etc/rpsrfsenable -X return 0; -X fi -X -X echo 1 > /etc/rpsrfsenable -X num=1 -X num=$(($num<<$proc)) -X num=$(($num-1)); -X echo $num; -X hex=$(printf "%x\n" $num) -X echo $hex; -X #enable rps -X echo $hex > /sys/class/net/eth0/queues/rx-0/rps_cpus -X echo $hex > /sys/class/net/eth2/queues/rx-0/rps_cpus -X -X #enble rfs -X echo 256 > /proc/sys/net/core/rps_sock_flow_entries -X echo 256 > /sys/class/net/eth0/queues/rx-0/rps_flow_cnt -X echo 256 > /sys/class/net/eth2/queues/rx-0/rps_flow_cnt -} -X -setup_common() { -X init_interfaces $1 $2 $3 -X if [ -n "$ETH0_IP" ] -X then -X setup_interface "0" $ETH0_IP $ETH0_MASK $GW -X fi -X if [ -n "$ETH0_IP6" ] -X then -X setup_interface_ipv6 "0" $ETH0_IP6 $ETH0_IP6_PRELEN -X fi -X setup_interface "1" $ETH1_IP $ETH1_MASK $GW -X if [ -n "$ETH2_IP" ] -X then -X setup_interface "2" $ETH2_IP $ETH2_MASK $GW -X fi -X -X echo $NAME > /etc/hostname -X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon -X hostnamectl set-hostname $NAME -X -X #Nameserver -X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries -X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries -X if [ -n "$internalNS1" ] -X then -X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS1" > /etc/resolv.conf -X fi -X -X if [ -n "$internalNS2" ] -X then -X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS2" >> /etc/resolv.conf -X fi -X if [ -n "$NS1" ] -X then -X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS1" >> /etc/resolv.conf -X fi -X -X if [ -n "$NS2" ] -X then -X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS2" >> /etc/resolv.conf -X fi -X -X if [ -n "$IP6_NS1" ] -X then -X echo "nameserver $IP6_NS1" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $IP6_NS1" >> /etc/resolv.conf -X fi -X if [ -n "$IP6_NS2" ] -X then -X echo "nameserver $IP6_NS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $IP6_NS2" >> /etc/resolv.conf -X fi -X -X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] -X then -X ip route add $MGMTNET via $LOCAL_GW dev eth1 -X fi -X -X ip route delete default -X if [ "$RROUTER" != "1" ] -X then -X gwdev=$3 -X if [ -z "$gwdev" ] -X then -X gwdev="eth0" -X fi -X -X ip route add default via $GW dev $gwdev -X fi -X -X # Workaround to activate vSwitch under VMware -X timeout 3 ping -n -c 3 $GW & -X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] -X then -X timeout 3 ping -n -c 3 $LOCAL_GW & -X #This code is added to address ARP issue by pinging MGMT_GW -X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') -X timeout 3 ping -n -c 3 $MGMT_GW & -X fi -X -X if [ "$HYPERVISOR" == "vmware" ]; then -X ntpq -p &> /dev/null || vmware-toolbox-cmd timesync enable -X fi -} -X -setup_dnsmasq() { -X log_it "Setting up dnsmasq" -X -X touch /etc/dhcpopts.txt -X -X [ -z $DHCP_RANGE ] && [ $ETH0_IP ] && DHCP_RANGE=$ETH0_IP -X [ $ETH0_IP6 ] && DHCP_RANGE_IP6=$ETH0_IP6 -X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" -X #removing the dnsmasq multiple ranges config file. -X rm /etc/dnsmasq.d/multiple_ranges.conf -X -X #get the template -X cp /etc/dnsmasq.conf.tmpl /etc/dnsmasq.conf -X -X if [ -n "$DOMAIN" ] -X then -X #send domain name to dhcp clients -X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\"$DOMAIN\"/ /etc/dnsmasq.conf -X #DNS server will append $DOMAIN to local queries -X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf -X #answer all local domain queries -X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf -X fi -X -X if [ -n "$DNS_SEARCH_ORDER" ] -X then -X sed -i -e "/^[#]*dhcp-option.*=119.*$/d" /etc/dnsmasq.conf -X echo "dhcp-option-force=119,$DNS_SEARCH_ORDER" >> /etc/dnsmasq.conf -X # set the domain search order as a space seprated list for option 15 -X DNS_SEARCH_ORDER=$(echo $DNS_SEARCH_ORDER | sed 's/,/ /g') -X #send domain name to dhcp clients -X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\""$DNS_SEARCH_ORDER"\"/ /etc/dnsmasq.conf -X fi -X -X if [ $DHCP_RANGE ] -X then -X sed -i -e "s/^dhcp-range_ip4=.*$/dhcp-range=$DHCP_RANGE,static/" /etc/dnsmasq.conf -X else -X sed -i -e "s/^dhcp-range_ip4=.*$//" /etc/dnsmasq.conf -X fi -X if [ $DHCP_RANGE_IP6 ] -X then -X sed -i -e "s/^dhcp-range_ip6=.*$/dhcp-range=$DHCP_RANGE_IP6,static/" /etc/dnsmasq.conf -X # For nondefault6 tagged host, don't send dns-server information -X sed -i /nondefault6/d /etc/dnsmasq.conf -X echo "dhcp-option=nondefault6,option6:dns-server" >> /etc/dnsmasq.conf -X else -X sed -i -e "s/^dhcp-range_ip6=.*$//" /etc/dnsmasq.conf -X fi -X -X if [ "$RROUTER" == "1" ] -X then -X DEFAULT_GW=$GUEST_GW -X INTERNAL_DNS=$GUEST_GW -X else -X if [ "$TYPE" == "dhcpsrvr" ] -X then -X DEFAULT_GW=$GW -X else -X DEFAULT_GW=$ETH0_IP -X fi -X INTERNAL_DNS=$ETH0_IP -X fi -X sed -i -e "/^[#]*dhcp-option=option:router.*$/d" /etc/dnsmasq.conf -X [ $DEFAULT_GW ] && echo "dhcp-option=option:router,$DEFAULT_GW" >> /etc/dnsmasq.conf -X -X [ $ETH0_IP ] && [ $NS1 ] && NS="$NS1," -X [ $ETH0_IP ] && [ $NS2 ] && NS="$NS$NS2," -X [ $ETH0_IP6 ] && [ $IP6_NS1 ] && NS6="[$IP6_NS1]," -X [ $ETH0_IP6 ] && [ $IP6_NS2 ] && NS6="$NS6[$IP6_NS2]," -X #for now set up ourself as the dns server as well -X sed -i -e "/^[#]*dhcp-option=6,.*$/d" /etc/dnsmasq.conf -X sed -i -e "/^[#]*dhcp-option=option6:dns-server,.*$/d" /etc/dnsmasq.conf -X if [ "$USE_EXTERNAL_DNS" != "true" ] -X then -X [ $ETH0_IP ] && NS="$INTERNAL_DNS,$NS" -X [ $ETH0_IP6 ] && NS6="[::],$NS6" -X # enable dns -X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf -X else -X # disable dns -X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf -X echo "port=0" >> /etc/dnsmasq.conf -X fi -X NS=${NS%?} -X NS6=${NS6%?} -X [ $ETH0_IP ] && echo "dhcp-option=6,$NS" >> /etc/dnsmasq.conf -X [ $ETH0_IP6 ] && echo "dhcp-option=option6:dns-server,$NS6" >> /etc/dnsmasq.conf -X #adding the name data-server to the /etc/hosts for allowing the access to user-data service and ssh-key reset in every subnet. -X #removing the existing entires to avoid duplicates on restarts. -X sed -i '/data-server/d' /etc/hosts -X if [ -n "$ETH0_IP" ] -X then -X echo "$ETH0_IP data-server" >> /etc/hosts -X fi -X if [ -n "$ETH0_IP6" ] -X then -X echo "$ETH0_IP6 data-server" >> /etc/hosts -X fi -X #add the dhcp-client-update only if dnsmasq version is 2.6 and above -X dnsmasqVersion=$(dnsmasq -v | grep version -m 1 | grep -o "[[:digit:]]\.[[:digit:]]") -X major=$(echo "$dnsmasqVersion" | cut -d '.' -f 1) -X minor=$(echo "$dnsmasqVersion" | cut -d '.' -f 2) -X if [ "$major" -eq '2' -a "$minor" -ge '6' ] || [ "$major" -gt '2' ] -X then -X sed -i -e "/^dhcp-client-update/d" /etc/dnsmasq.conf -X echo 'dhcp-client-update' >> /etc/dnsmasq.conf -X fi -X -X command -v dhcp_release > /dev/null 2>&1 -X no_dhcp_release=$? -X if [ $no_dhcp_release -eq 0 -a -z "$ETH0_IP6" ] -X then -X echo 1 > /var/cache/cloud/dnsmasq_managed_lease -X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf -X else -X echo 0 > /var/cache/cloud/dnsmasq_managed_lease -X fi -} -X -setup_sshd(){ -X local ip=$1 -X local eth=$2 -X [ -f /etc/ssh/sshd_config ] && sed -i -e "s/^[#]*ListenAddress.*$/ListenAddress $ip/" /etc/ssh/sshd_config -X sed -i "/3922/s/eth./$eth/" /etc/iptables/rules.v4 -} -X -setup_vpc_apache2() { -X log_it "Setting up apache web server for VPC" -X systemctl disable apache2 -X clean_ipalias_config -X setup_apache2_common -} -X -clean_ipalias_config() { -X rm -f /etc/apache2/conf.d/ports.*.meta-data.conf -X rm -f /etc/apache2/sites-available/ipAlias* -X rm -f /etc/apache2/sites-enabled/ipAlias* -X rm -f /etc/apache2/conf.d/vhost*.conf -X rm -f /etc/apache2/ports.conf -X rm -f /etc/apache2/vhostexample.conf -X rm -f /etc/apache2/sites-available/* -X rm -f /etc/apache2/sites-enabled/* -X -X rm -rf /etc/failure_config -} -X -setup_apache2_common() { -X sed -i 's/^Include ports.conf.*/# CS: Done by Python CsApp config\n#Include ports.conf/g' /etc/apache2/apache2.conf -X # Disable listing of http://SSVM-IP/icons folder for security issue. see article http://www.i-lateral.com/tutorials/disabling-the-icons-folder-on-an-ubuntu-web-server/ -X [ -f /etc/apache2/mods-available/alias.conf ] && sed -i s/"Options Indexes MultiViews"/"Options -Indexes MultiViews"/ /etc/apache2/mods-available/alias.conf -X -X echo "Options -Indexes" > /var/www/html/.htaccess -} -X -setup_apache2() { -X log_it "Setting up apache web server" -X mkdir -p /var/www -X chown www-data:www-data -R /var/www -X clean_ipalias_config -X setup_apache2_common -X local ip=$1 -} -X -setup_aesni() { -X if [ `grep aes /proc/cpuinfo | wc -l` -gt 0 ] -X then -X modprobe aesni_intel -X fi -} -X -setup_storage_network() { -X if [ x"$STORAGE_IP" == "x" -o x"$STORAGE_NETMASK" == "x" ] -X then -X log_it "Incompleted parameters STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR. Cannot setup storage network" -X return -X fi -X -X echo "" >> /etc/network/interfaces -X echo "auto eth3" >> /etc/network/interfaces -X -X setup_interface "3" "$STORAGE_IP" "$STORAGE_NETMASK" -X [ -n "$MTU" ] && ifconfig eth3 mtu $MTU && echo " mtu $MTU" >> /etc/network/interfaces -X #ip route add "$STORAGE_CIDR" via "$STORAGE_IP" -X log_it "Successfully setup storage network with STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR" -} -X -setup_system_rfc1918_internal() { -X public_ip=`getPublicIp` -X echo "$public_ip" | grep -E "^((127\.)|(10\.)|(172\.1[6-9]\.)|(172\.2[0-9]\.)|(172\.3[0-1]\.)|(192\.168\.))" -X if [ "$?" == "0" ]; then -X log_it "Not setting up route of RFC1918 space to $LOCAL_GW befause $public_ip is RFC1918." -X else -X log_it "Setting up route of RFC1918 space to $LOCAL_GW" -X # Setup general route for RFC 1918 space, as otherwise it will be sent to -X # the public gateway and not work -X # More specific routes that may be set have preference over this generic route. -X ip route add 10.0.0.0/8 via $LOCAL_GW -X ip route add 172.16.0.0/12 via $LOCAL_GW -X ip route add 192.168.0.0/16 via $LOCAL_GW -X fi -} -X -getPublicIp() { -X public_ip=$ETH2_IP -X [ "$ETH2_IP" == "0.0.0.0" ] && public_ip=$ETH1_IP -X echo $public_ip -} -X -setup_ntp() { -X log_it "Setting up NTP" -X NTP_CONF_FILE="/etc/ntp.conf" -X if [ -f $NTP_CONF_FILE ] -X then -X IFS=',' read -a server_list <<< "$NTP_SERVER_LIST" -X for (( iterator=${#server_list[@]}-1 ; iterator>=0 ; iterator-- )) -X do -X server=$(echo ${server_list[iterator]} | tr -d '\r') -X PATTERN="server $server" -X if grep -q "^$PATTERN$" $NTP_CONF_FILE ; then -X sed -i "/^$PATTERN$/d" $NTP_CONF_FILE -X fi -X sed -i "0,/^server/s//$PATTERN\nserver/" $NTP_CONF_FILE -X done -X systemctl enable ntp -X else -X log_it "NTP configuration file not found" -X fi -} -X -routing_svcs() { -X echo "haproxy apache2" > /var/cache/cloud/enabled_svcs -X echo "cloud nfs-common portmap" > /var/cache/cloud/disabled_svcs -X if [ "$RROUTER" -eq "1" ] -X then -X echo "keepalived conntrackd" >> /var/cache/cloud/enabled_svcs -X echo "dnsmasq" >> /var/cache/cloud/disabled_svcs -X else -X echo "dnsmasq" >> /var/cache/cloud/enabled_svcs -X echo "keepalived conntrackd " >> /var/cache/cloud/disabled_svcs -X fi -} -X -parse_cmd_line() { -X CMDLINE=$(cat /var/cache/cloud/cmdline) -X TYPE="unknown" -X BOOTPROTO="static" -X DISABLE_RP_FILTER="false" -X STORAGE_IP="" -X STORAGE_NETMASK="" -X STORAGE_CIDR="" -X VM_PASSWORD="" -X -X CHEF_TMP_FILE=/tmp/cmdline.json -X COMMA="\t" -X echo -e "{\n\"type\": \"cmdline\"," > ${CHEF_TMP_FILE} -X echo -e "\"cmd_line\": {" >> ${CHEF_TMP_FILE} -X -X for i in $CMDLINE -X do -X # search for foo=bar pattern and cut out foo -X KEY=$(echo $i | cut -d= -f1) -X VALUE=$(echo $i | cut -d= -f2) -X echo -en ${COMMA} >> ${CHEF_TMP_FILE} -X # Two lines so values do not accidently interpretted as escapes!! -X echo -n \"${KEY}\"': '\"${VALUE}\" >> ${CHEF_TMP_FILE} -X COMMA=",\n\t" -X case $KEY in -X disable_rp_filter) -X export DISABLE_RP_FILTER=$VALUE -X ;; -X eth0ip) -X export ETH0_IP=$VALUE -X ;; -X eth1ip) -X export ETH1_IP=$VALUE -X ;; -X eth2ip) -X export ETH2_IP=$VALUE -X ;; -X host) -X export MGMT_HOST=$VALUE -X ;; -X gateway) -X export GW=$VALUE -X ;; -X ip6gateway) -X export IP6GW=$VALUE -X ;; -X eth0mask) -X export ETH0_MASK=$VALUE -X ;; -X eth1mask) -X export ETH1_MASK=$VALUE -X ;; -X eth2mask) -X export ETH2_MASK=$VALUE -X ;; -X eth0ip6) -X export ETH0_IP6=$VALUE -X ;; -X eth0ip6prelen) -X export ETH0_IP6_PRELEN=$VALUE -X ;; -X internaldns1) -X export internalNS1=$VALUE -X ;; -X internaldns2) -X export internalNS2=$VALUE -X ;; -X dns1) -X export NS1=$VALUE -X ;; -X dns2) -X export NS2=$VALUE -X ;; -X ip6dns1) -X export IP6_NS1=$VALUE -X ;; -X ip6dns2) -X export IP6_NS2=$VALUE -X ;; -X domain) -X export DOMAIN=$VALUE -X ;; -X dnssearchorder) -X export DNS_SEARCH_ORDER=$VALUE -X ;; -X useextdns) -X export USE_EXTERNAL_DNS=$VALUE -X ;; -X mgmtcidr) -X export MGMTNET=$VALUE -X ;; -X localgw) -X export LOCAL_GW=$VALUE -X ;; -X template) -X export TEMPLATE=$VALUE -X ;; -X sshonguest) -X export SSHONGUEST=$VALUE -X ;; -X name) -X export NAME=$VALUE -X ;; -X dhcprange) -X export DHCP_RANGE=$(echo $VALUE | tr ':' ',') -X ;; -X bootproto) -X export BOOTPROTO=$VALUE -X ;; -X type) -X export TYPE=$VALUE -X ;; -X defaultroute) -X export DEFAULTROUTE=$VALUE -X ;; -X redundant_router) -X export RROUTER=$VALUE -X ;; -X redundant_state) -X export RROUTER_STATE=$VALUE -X ;; -X guestgw) -X export GUEST_GW=$VALUE -X ;; -X guestbrd) -X export GUEST_BRD=$VALUE -X ;; -X guestcidrsize) -X export GUEST_CIDR_SIZE=$VALUE -X ;; -X router_pr) -X export ROUTER_PR=$VALUE -X ;; -X extra_pubnics) -X export EXTRA_PUBNICS=$VALUE -X ;; -X nic_macs) -X export NIC_MACS=$VALUE -X ;; -X mtu) -X export MTU=$VALUE -X ;; -X storageip) -X export STORAGE_IP=$VALUE -X ;; -X storagenetmask) -X export STORAGE_NETMASK=$VALUE -X ;; -X storagecidr) -X export STORAGE_CIDR=$VALUE -X ;; -X vmpassword) -X export VM_PASSWORD=$VALUE -X ;; -X vpccidr) -X export VPCCIDR=$VALUE -X ;; -X cidrsize) -X export CIDR_SIZE=$VALUE -X ;; -X advert_int) -X export ADVERT_INT=$VALUE -X ;; -X ntpserverlist) -X export NTP_SERVER_LIST=$VALUE -X ;; -X esac -X done -X echo -e "\n\t}\n}" >> ${CHEF_TMP_FILE} -X if [ "$TYPE" != "unknown" ] -X then -X mv ${CHEF_TMP_FILE} /var/cache/cloud/cmd_line.json -X fi -X -X [ $ETH0_IP ] && export LOCAL_ADDRS=$ETH0_IP -X [ $ETH0_IP6 ] && export LOCAL_ADDRS=$ETH0_IP6 -X [ $ETH0_IP ] && [ $ETH0_IP6 ] && export LOCAL_ADDRS="$ETH0_IP,$ETH0_IP6" -X -X # Randomize cloud password so only ssh login is allowed -X echo "cloud:`openssl rand -base64 32`" | chpasswd -X -X if [ x"$VM_PASSWORD" != x"" ] -X then -X echo "root:$VM_PASSWORD" | chpasswd -X fi -} -X -parse_cmd_line -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/common.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/common.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/common.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/common.sh': 'MD5 check failed' - ) << \SHAR_EOF -8754c81bacd82458e4ce221b476505ea cloud_scripts/opt/cloud/bin/setup/common.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/common.sh'` -ne 22472 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/common.sh' is not 22472" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -dhcpsrvr_svcs() { -X echo "dnsmasq apache2" > /var/cache/cloud/enabled_svcs -X echo "cloud nfs-common conntrackd keepalived haproxy portmap" > /var/cache/cloud/disabled_svcs -} -X -setup_dhcpsrvr() { -X log_it "Setting up dhcp server system vm" -X setup_common eth0 eth1 -X setup_dnsmasq -X setup_apache2 $ETH0_IP -X -X sed -i /$NAME/d /etc/hosts -X [ $ETH0_IP ] && echo "$ETH0_IP $NAME" >> /etc/hosts -X [ $ETH0_IP6 ] && echo "$ETH0_IP6 $NAME" >> /etc/hosts -X -X enable_irqbalance 0 -X enable_fwding 0 -X -X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 -X -X #Only allow DNS service for current network -X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X -X if [ "$SSHONGUEST" == "true" ] -X then -X setup_sshd $ETH0_IP "eth0" -X else -X setup_sshd $ETH1_IP "eth1" -X fi -} -X -dhcpsrvr_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute dhcpsrvr_svcs" -X exit 1 -fi -setup_dhcpsrvr -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh': 'MD5 check failed' - ) << \SHAR_EOF -08afc46420e5e388ba6be68cfdbd4a59 cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh'` -ne 1985 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' is not 1985" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/cloud-early-config ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/cloud-early-config (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/cloud-early-config (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" -X -# Clear boot up flag, it would be created by rc.local after boot up done -mkdir -p /var/cache/cloud -rm -f /var/cache/cloud/boot_up_done -X -[ -x /sbin/ifup ] || exit 0 -X -X. /lib/lsb/init-functions -X -log_it() { -X echo "$(date) $@" >> /var/log/cloud.log -X log_action_msg "$@" -} -X -patch() { -X local PATCH_MOUNT=/media/cdrom -X local patchfile=$PATCH_MOUNT/cloud-scripts.tgz -X local privkey=$PATCH_MOUNT/authorized_keys -X local md5file=/var/cache/cloud/cloud-scripts-signature -X local cdrom_dev= -X mkdir -p $PATCH_MOUNT -X -X if [ -e /dev/xvdd ]; then -X cdrom_dev=/dev/xvdd -X elif [ -e /dev/cdrom ]; then -X cdrom_dev=/dev/cdrom -X elif [ -e /dev/cdrom1 ]; then -X cdrom_dev=/dev/cdrom1 -X elif [ -e /dev/cdrom2 ]; then -X cdrom_dev=/dev/cdrom2 -X elif [ -e /dev/cdrom3 ]; then -X cdrom_dev=/dev/cdrom3 -X fi -X -X if [ -f /var/cache/cloud/authorized_keys ]; then -X privkey=/var/cache/cloud/authorized_keys -X fi -X -X if [ -n "$cdrom_dev" ]; then -X mount -o ro $cdrom_dev $PATCH_MOUNT -X local oldmd5= -X [ -f ${md5file} ] && oldmd5=$(cat ${md5file}) -X local newmd5= -X [ -f ${patchfile} ] && newmd5=$(md5sum ${patchfile} | awk '{print $1}') -X -X log_it "Scripts checksum detected: oldmd5=$oldmd5 newmd5=$newmd5" -X if [ "$oldmd5" != "$newmd5" ] && [ -f ${patchfile} ] && [ "$newmd5" != "" ] -X then -X tar xzf $patchfile -C / -X echo ${newmd5} > ${md5file} -X log_it "Patched scripts using $patchfile" -X touch /var/cache/cloud/patch.required -X fi -X -X if [ -f $privkey ]; then -X cp -f $privkey /root/.ssh/ -X chmod go-rwx /root/.ssh/authorized_keys -X fi -X fi -X -X return 0 -} -X -start() { -X log_it "Executing cloud-early-config" -X -X # Clear /tmp for file lock -X rm -f /tmp/*.lock -X rm -f /tmp/rrouter_bumped -X rm -f /root/.rnd -X echo "" > /root/.ssh/known_hosts -X -X patch -X sync -X /opt/cloud/bin/setup/bootstrap.sh -X -X log_it "Finished setting up systemvm" -X exit 0 -} -X -start -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/cloud-early-config failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config': 'MD5 check failed' - ) << \SHAR_EOF -c9e5973de3771fd5f5e9b490c60db970 cloud_scripts/opt/cloud/bin/setup/cloud-early-config -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config'` -ne 2765 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' is not 2765" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/default.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/default.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/default.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/default.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/default.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_default() { -X cat > /etc/network/interfaces << EOF -auto lo -iface lo inet loopback -EOF -X cp -f /etc/iptables/rt_tables_init /etc/iproute2/rt_tables -} -X -setup_default -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/default.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/default.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/default.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/default.sh': 'MD5 check failed' - ) << \SHAR_EOF -20e3a01cb77930eba6438de6d9a3f193 cloud_scripts/opt/cloud/bin/setup/default.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/default.sh'` -ne 1002 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/default.sh' is not 1002" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/loadbalancer.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/loadbalancer.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/loadbalancer.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -X -# $Id: loadbalancer.sh 9947 2010-06-25 19:34:24Z manuel $ $HeadURL: svn://svn.lab.vmops.com/repos/vmdev/java/patches/xenserver/root/loadbalancer.sh $ -# loadbalancer.sh -- reconfigure loadbalancer rules -# @VERSION@ -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s: -i -a -d -f -s \n" $(basename $0) >&2 -} -X -# set -x -X -# ensure that the nic has the public ip we are load balancing on -ip_entry() { -X local added=$1 -X local removed=$2 -X -X if [ "$added" == "none" ] -X then -X added="" -X fi -X -X if [ "$removed" == "none" ] -X then -X removed="" -X fi -X -X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") -X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") -X -X for i in $a -X do -X local pubIp=$(echo $i | cut -d: -f1) -X logger -t cloud "Adding public ip $pubIp for load balancing" -X for vif in $VIF_LIST; do -X sudo ip addr add dev $vif $pubIp/32 -X #ignore error since it is because the ip is already there -X done -X done -X -X for i in $r -X do -X logger -t cloud "Removing public ips for deleted loadbalancers" -X local pubIp=$(echo $i | cut -d: -f1) -X logger -t cloud "Removing public ip $pubIp for deleted loadbalancers" -X for vif in $VIF_LIST; do -X sudo ip addr del $pubIp/32 dev $vif -X done -X done -X -X return 0 -} -get_lb_vif_list() { -# add eth0 to the VIF_LIST if it is not there, this allows guest VMs to use the LB service. -X local lb_list="$VIF_LIST eth0"; -X lb_list=$(echo $lb_list | tr " " "\n" | sort | uniq | tr "\n" " ") -X echo $lb_list -} -fw_remove_backup() { -X local lb_vif_list=$(get_lb_vif_list) -X for vif in $lb_vif_list; do -X sudo iptables -F back_load_balancer_$vif 2> /dev/null -X sudo iptables -D INPUT -i $vif -p tcp -j back_load_balancer_$vif 2> /dev/null -X sudo iptables -X back_load_balancer_$vif 2> /dev/null -X done -X sudo iptables -F back_lb_stats 2> /dev/null -X sudo iptables -D INPUT -p tcp -j back_lb_stats 2> /dev/null -X sudo iptables -X back_lb_stats 2> /dev/null -} -fw_restore() { -X local lb_vif_list=$(get_lb_vif_list) -X for vif in $lb_vif_list; do -X sudo iptables -F load_balancer_$vif 2> /dev/null -X sudo iptables -D INPUT -i $vif -p tcp -j load_balancer_$vif 2> /dev/null -X sudo iptables -X load_balancer_$vif 2> /dev/null -X sudo iptables -E back_load_balancer_$vif load_balancer_$vif 2> /dev/null -X done -X sudo iptables -F lb_stats 2> /dev/null -X sudo iptables -D INPUT -p tcp -j lb_stats 2> /dev/null -X sudo iptables -X lb_stats 2> /dev/null -X sudo iptables -E back_lb_stats lb_stats 2> /dev/null -} -# firewall entry to ensure that haproxy can receive on specified port -fw_entry() { -X local added=$1 -X local removed=$2 -X local stats=$3 -X -X if [ "$added" == "none" ] -X then -X added="" -X fi -X -X if [ "$removed" == "none" ] -X then -X removed="" -X fi -X -X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") -X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") -X -# back up the iptable rules by renaming before creating new. -X local lb_vif_list=$(get_lb_vif_list) -X for vif in $lb_vif_list; do -X sudo iptables -E load_balancer_$vif back_load_balancer_$vif 2> /dev/null -X sudo iptables -N load_balancer_$vif 2> /dev/null -X sudo iptables -A INPUT -i $vif -p tcp -j load_balancer_$vif -X done -X sudo iptables -E lb_stats back_lb_stats 2> /dev/null -X sudo iptables -N lb_stats 2> /dev/null -X sudo iptables -A INPUT -p tcp -j lb_stats -X -X for i in $a -X do -X local pubIp=$(echo $i | cut -d: -f1) -X local dport=$(echo $i | cut -d: -f2) -X local lb_vif_list=$(get_lb_vif_list) -X for vif in $lb_vif_list; do -X -#TODO : The below delete will be used only when we upgrade the from older verion to the newer one , the below delete become obsolute in the future. -X sudo iptables -D INPUT -i $vif -p tcp -d $pubIp --dport $dport -j ACCEPT 2> /dev/null -X -X sudo iptables -A load_balancer_$vif -p tcp -d $pubIp --dport $dport -j ACCEPT -X -X if [ $? -gt 0 ] -X then -X return 1 -X fi -X done -X done -X local pubIp=$(echo $stats | cut -d: -f1) -X local dport=$(echo $stats | cut -d: -f2) -X local cidrs=$(echo $stats | cut -d: -f3 | sed 's/-/,/') -X sudo iptables -A lb_stats -s $cidrs -p tcp -m state --state NEW -d $pubIp --dport $dport -j ACCEPT -X -X -#TODO : The below delete in the for-loop will be used only when we upgrade the from older verion to the newer one , the below delete become obsolute in the future. -X for i in $r -X do -X local pubIp=$(echo $i | cut -d: -f1) -X local dport=$(echo $i | cut -d: -f2) -X -X for vif in $VIF_LIST; do -X sudo iptables -D INPUT -i $vif -p tcp -d $pubIp --dport $dport -j ACCEPT 2> /dev/null -X done -X done -X -X return 0 -} -X -#Hot reconfigure HA Proxy in the routing domain -reconfig_lb() { -X logger -t cloud "Reconfiguring loadbalancer using $1" -X /root/reconfigLB.sh $1 -X return $? -} -X -# Restore the HA Proxy to its previous state, and revert iptables rules on DomR -restore_lb() { -X logger -t cloud "Restoring HA Proxy to previous state" -X # Copy the old version of haproxy.cfg into the file that reconfigLB.sh uses -X cp /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg.new -X -X if [ $? -eq 0 ] -X then -X # Run reconfigLB.sh again -X /root/reconfigLB.sh /etc/haproxy/haproxy.cfg.new -X fi -} -X -get_vif_list() { -X local vif_list="" -X for i in /sys/class/net/eth*; do -X vif=$(basename $i); -X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] -X then -X vif_list="$vif_list $vif"; -X fi -X done -X if [ "$vif_list" == "" ] -X then -X vif_list="eth0" -X fi -X -X logger -t cloud "Loadbalancer public interfaces = $vif_list" -X echo $vif_list -} -X -mflag= -iflag= -aflag= -dflag= -fflag= -sflag= -X -while getopts 'i:a:d:f:s:' OPTION -do -X case $OPTION in -X i) iflag=1 -X domRIp="$OPTARG" -X ;; -X a) aflag=1 -X addedIps="$OPTARG" -X ;; -X d) dflag=1 -X removedIps="$OPTARG" -X ;; -X f) fflag=1 -X cfgfile="$OPTARG" -X ;; -X s) sflag=1 -X statsIp="$OPTARG" -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [ "$addedIps" == "" ] -then -X addedIps="none" -fi -X -X -if [ "$removedIps" == "" ] -then -X removedIps="none" -fi -X -VIF_LIST=$(get_vif_list) -X -X -if [ "$addedIps" == "" ] -then -X addedIps="none" -fi -X -if [ "$removedIps" == "" ] -then -X removedIps="none" -fi -X -#FIXME: make this explicit via check on vm type or passed in flag -if [ "$VIF_LIST" == "eth0" ] -then -X ip_entry $addedIps $removedIps -fi -X -# hot reconfigure haproxy -reconfig_lb $cfgfile -X -if [ $? -gt 0 ] -then -X logger -t cloud "Reconfiguring loadbalancer failed" -X #FIXME: make this explicit via check on vm type or passed in flag -X if [ "$VIF_LIST" == "eth0" ] -X then -X ip_entry $removedIps $addedIps -X fi -X unlock_exit 1 $lock $locked -fi -X -# iptables entry to ensure that haproxy receives traffic -fw_entry $addedIps $removedIps $statsIp -X -if [ $? -gt 0 ] -then -X logger -t cloud "Failed to apply firewall rules for load balancing, reverting HA Proxy config" -X # Restore the LB -X restore_lb -X -X logger -t cloud "Reverting firewall config" -X # Revert iptables rules on DomR -X fw_restore -X -X #FIXME: make this explicit via check on vm type or passed in flag -X if [ "$VIF_LIST" == "eth0" ] -X then -X logger -t cloud "Reverting ip address changes to eth0" -X ip_entry $removedIps $addedIps -X fi -X -X unlock_exit 1 $lock $locked -else -X # Remove backedup iptable rules -X fw_remove_backup -fi -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/loadbalancer.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/loadbalancer.sh': 'MD5 check failed' - ) << \SHAR_EOF -6da53e4d9dd0b11f6fa334c6f583f8cd cloud_scripts/opt/cloud/bin/loadbalancer.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/loadbalancer.sh'` -ne 8234 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' is not 8234" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/baremetal_snat.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/baremetal_snat.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/baremetal_snat.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' && -#!/bin/bash -X -#Licensed to the Apache Software Foundation (ASF) under one -#or more contributor license agreements. See the NOTICE file -#distributed with this work for additional information -#regarding copyright ownership. The ASF licenses this file -#to you under the Apache License, Version 2.0 (the -#"License"); you may not use this file except in compliance -#with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -#Unless required by applicable law or agreed to in writing, -#software distributed under the License is distributed on an -#"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -#KIND, either express or implied. See the License for the -#specific language governing permissions and limitations -#under the License. -X -set +u -X -mgmt_nic_ip=$1 -internal_server_ip=$2 -gateway_ip=$3 -X -ip route | grep "$internal_server_ip" > /dev/null -X -if [ $? -ne 0 ]; then -X ip route add $internal_server_ip via $gateway_ip -fi -X -iptables-save | grep -- "-A POSTROUTING -d $internal_server_ip" > /dev/null -X -if [ $? -ne 0 ]; then -X iptables -t nat -A POSTROUTING -d $internal_server_ip -j SNAT --to-source $mgmt_nic_ip -fi -X -X -iptables-save | grep -- "-A INPUT -i eth0 -p udp -m udp --dport 69 -j ACCEPT" > /dev/null -if [ $? -ne 0 ]; then -X iptables -I INPUT -i eth0 -p udp -m udp --dport 69 -j ACCEPT -fi -X -iptables-save | grep -- "-A FORWARD -i eth1 -o eth0 -j ACCEPT" > /dev/null -if [ $? -ne 0 ]; then -X iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT -fi -X -rule="-A FORWARD -d $internal_server_ip/32 -i eth0 -o eth1 -j ACCEPT" -iptables-save | grep -- "$rule" > /dev/null -if [ $? -ne 0 ]; then -X iptables -I FORWARD -d $internal_server_ip/32 -i eth0 -o eth1 -j ACCEPT -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/baremetal_snat.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh': 'MD5 check failed' - ) << \SHAR_EOF -acab3e2b25ee898e7dd05c4e77b15569 cloud_scripts/opt/cloud/bin/baremetal_snat.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh'` -ne 1717 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' is not 1717" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_vpnusers.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vpnusers.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vpnusers.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import copy -X -X -def merge(dbag, data): -X dbagc = copy.deepcopy(dbag) -X -X print dbag -X print data -X if "vpn_users" not in data: -X return dbagc -X -X # remove previously deleted user from the dict -X for user in dbagc.keys(): -X if user == 'id': -X continue -X userrec = dbagc[user] -X add = userrec['add'] -X if not add: -X del(dbagc[user]) -X -X for user in data['vpn_users']: -X username = user['user'] -X add = user['add'] -X if username not in dbagc.keys(): -X dbagc[username] = user -X elif username in dbagc.keys() and not add: -X dbagc[username] = user -X -X return dbagc -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_vpnusers.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py': 'MD5 check failed' - ) << \SHAR_EOF -d54ff81fd9901ecc0bfbe9528343e238 cloud_scripts/opt/cloud/bin/cs_vpnusers.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py'` -ne 1469 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' is not 1469" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/merge.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/merge.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/merge.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/merge.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/merge.py' && -#!/usr/bin/python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import json -import os -import uuid -import logging -import gzip -import shutil -import cs_ip -import cs_guestnetwork -import cs_cmdline -import cs_vmp -import cs_network_acl -import cs_firewallrules -import cs_loadbalancer -import cs_monitorservice -import cs_vmdata -import cs_dhcp -import cs_forwardingrules -import cs_site2sitevpn -import cs_remoteaccessvpn -import cs_vpnusers -import cs_staticroutes -X -X -class DataBag: -X -X DPATH = "/etc/cloudstack" -X -X def __init__(self): -X self.bdata = {} -X -X def load(self): -X data = self.bdata -X if not os.path.exists(self.DPATH): -X os.makedirs(self.DPATH) -X self.fpath = os.path.join(self.DPATH, self.key + '.json') -X -X try: -X with open(self.fpath, 'r') as _fh: -X logging.debug("Loading data bag type %s", self.key) -X data = json.load(_fh) -X except (IOError, ValueError): -X logging.debug("Caught load error, creating empty data bag type %s", self.key) -X data.update({"id": self.key}) -X finally: -X self.dbag = data -X -X def save(self, dbag): -X try: -X with open(self.fpath, 'w') as _fh: -X logging.debug("Writing data bag type %s", self.key) -X json.dump( -X dbag, _fh, -X sort_keys=True, -X indent=2 -X ) -X except IOError: -X logging.error("Could not write data bag %s", self.key) -X -X def getDataBag(self): -X return self.dbag -X -X def setKey(self, key): -X self.key = key -X -X -class updateDataBag: -X -X DPATH = "/etc/cloudstack" -X -X def __init__(self, qFile): -X self.qFile = qFile -X self.fpath = '' -X self.bdata = {} -X self.process() -X -X def process(self): -X self.db = DataBag() -X if (self.qFile.type == "staticnatrules" or self.qFile.type == "forwardrules"): -X self.db.setKey("forwardingrules") -X else: -X self.db.setKey(self.qFile.type) -X dbag = self.db.load() -X logging.info("Command of type %s received", self.qFile.type) -X -X if self.qFile.type == 'ips': -X dbag = self.processIP(self.db.getDataBag()) -X elif self.qFile.type == 'guestnetwork': -X dbag = self.processGuestNetwork(self.db.getDataBag()) -X elif self.qFile.type == 'cmdline': -X dbag = self.processCL(self.db.getDataBag()) -X elif self.qFile.type == 'vmpassword': -X dbag = self.processVMpassword(self.db.getDataBag()) -X elif self.qFile.type == 'networkacl': -X dbag = self.process_network_acl(self.db.getDataBag()) -X elif self.qFile.type == 'firewallrules': -X dbag = self.process_firewallrules(self.db.getDataBag()) -X elif self.qFile.type == 'loadbalancer': -X dbag = self.process_loadbalancer(self.db.getDataBag()) -X elif self.qFile.type == 'monitorservice': -X dbag = self.process_monitorservice(self.db.getDataBag()) -X elif self.qFile.type == 'vmdata': -X dbag = self.processVmData(self.db.getDataBag()) -X elif self.qFile.type == 'dhcpentry': -X dbag = self.process_dhcp_entry(self.db.getDataBag()) -X elif self.qFile.type == 'staticnatrules' or self.qFile.type == 'forwardrules': -X dbag = self.processForwardingRules(self.db.getDataBag()) -X elif self.qFile.type == 'site2sitevpn': -X dbag = self.process_site2sitevpn(self.db.getDataBag()) -X elif self.qFile.type == 'remoteaccessvpn': -X dbag = self.process_remoteaccessvpn(self.db.getDataBag()) -X elif self.qFile.type == 'vpnuserlist': -X dbag = self.process_vpnusers(self.db.getDataBag()) -X elif self.qFile.type == 'staticroutes': -X dbag = self.process_staticroutes(self.db.getDataBag()) -X elif self.qFile.type == 'ipaliases': -X self.db.setKey('ips') -X self.db.load() -X dbag = self.process_ipaliases(self.db.getDataBag()) -X elif self.qFile.type == 'dhcpconfig': -X logging.error("I don't think I need %s anymore", self.qFile.type) -X return -X else: -X logging.error("Error I do not know what to do with file of type %s", self.qFile.type) -X return -X self.db.save(dbag) -X -X def processGuestNetwork(self, dbag): -X d = self.qFile.data -X dp = {} -X dp['public_ip'] = d['router_guest_ip'] -X dp['netmask'] = d['router_guest_netmask'] -X dp['source_nat'] = False -X dp['add'] = d['add'] -X dp['one_to_one_nat'] = False -X dp['gateway'] = d['router_guest_gateway'] -X dp['nic_dev_id'] = d['device'][3:] -X dp['nw_type'] = 'guest' -X dp = PrivateGatewayHack.update_network_type_for_privategateway(dbag, dp) -X qf = QueueFile() -X qf.load({'ip_address': [dp], 'type': 'ips'}) -X if 'domain_name' not in d.keys() or d['domain_name'] == '': -X d['domain_name'] = "cloudnine.internal" -X -X d = PrivateGatewayHack.update_network_type_for_privategateway(dbag, d) -X return cs_guestnetwork.merge(dbag, d) -X -X def process_dhcp_entry(self, dbag): -X return cs_dhcp.merge(dbag, self.qFile.data) -X -X def process_site2sitevpn(self, dbag): -X return cs_site2sitevpn.merge(dbag, self.qFile.data) -X -X def process_remoteaccessvpn(self, dbag): -X return cs_remoteaccessvpn.merge(dbag, self.qFile.data) -X -X def process_vpnusers(self, dbag): -X return cs_vpnusers.merge(dbag, self.qFile.data) -X -X def process_network_acl(self, dbag): -X return cs_network_acl.merge(dbag, self.qFile.data) -X -X def process_firewallrules(self, dbag): -X return cs_firewallrules.merge(dbag, self.qFile.data) -X -X def process_loadbalancer(self, dbag): -X return cs_loadbalancer.merge(dbag, self.qFile.data) -X -X def process_monitorservice(self, dbag): -X return cs_monitorservice.merge(dbag, self.qFile.data) -X -X def process_staticroutes(self, dbag): -X return cs_staticroutes.merge(dbag, self.qFile.data) -X -X def processVMpassword(self, dbag): -X return cs_vmp.merge(dbag, self.qFile.data) -X -X def processForwardingRules(self, dbag): -X # to be used by both staticnat and portforwarding -X return cs_forwardingrules.merge(dbag, self.qFile.data) -X -X def processIP(self, dbag): -X for ip in self.qFile.data["ip_address"]: -X dbag = cs_ip.merge(dbag, ip) -X return dbag -X -X def processCL(self, dbag): -X # Convert the ip stuff to an ip object and pass that into cs_ip_merge -X # "eth0ip": "192.168.56.32", -X # "eth0mask": "255.255.255.0", -X self.newData = [] -X if (self.qFile.data['cmd_line']['type'] == "router"): -X self.processCLItem('0', "guest") -X self.processCLItem('1', "control") -X self.processCLItem('2', "public") -X elif (self.qFile.data['cmd_line']['type'] == "vpcrouter"): -X self.processCLItem('0', "control") -X elif (self.qFile.data['cmd_line']['type'] == "dhcpsrvr"): -X self.processCLItem('0', "guest") -X self.processCLItem('1', "control") -X elif (self.qFile.data['cmd_line']['type'] == "ilbvm"): -X self.processCLItem('0', "guest") -X self.processCLItem('1', "control") -X -X return cs_cmdline.merge(dbag, self.qFile.data) -X -X def processCLItem(self, num, nw_type): -X key = 'eth' + num + 'ip' -X dp = {} -X if(key in self.qFile.data['cmd_line']): -X dp['public_ip'] = self.qFile.data['cmd_line'][key] -X dp['netmask'] = self.qFile.data['cmd_line']['eth' + num + 'mask'] -X dp['source_nat'] = False -X dp['add'] = True -X dp['one_to_one_nat'] = False -X if nw_type == "public": -X dp['gateway'] = self.qFile.data['cmd_line']['gateway'] -X else: -X if('localgw' in self.qFile.data['cmd_line']): -X dp['gateway'] = self.qFile.data['cmd_line']['localgw'] -X else: -X dp['gateway'] = '' -X dp['nic_dev_id'] = num -X dp['nw_type'] = nw_type -X qf = QueueFile() -X qf.load({'ip_address': [dp], 'type': 'ips'}) -X -X def processVmData(self, dbag): -X cs_vmdata.merge(dbag, self.qFile.data) -X return dbag -X -X def process_ipaliases(self, dbag): -X nic_dev = None -X # Should be a way to deal with this better -X for intf, data in dbag.items(): -X if intf == 'id': -X continue -X elif any([net['nw_type'] == 'guest' for net in data]): -X nic_dev = intf -X break -X -X assert nic_dev is not None, 'Unable to determine Guest interface' -X -X nic_dev_id = nic_dev[3:] -X -X for alias in self.qFile.data['aliases']: -X ip = { -X 'add': not alias['revoke'], -X 'nw_type': 'guest', -X 'public_ip': alias['ip_address'], -X 'netmask': alias['netmask'], -X 'nic_dev_id': nic_dev_id -X } -X dbag = cs_ip.merge(dbag, ip) -X return dbag -X -X -class QueueFile: -X -X fileName = '' -X configCache = "/var/cache/cloud" -X keep = True -X data = {} -X -X def load(self, data): -X if data is not None: -X self.data = data -X self.type = self.data["type"] -X updateDataBag(self) -X return -X filename = '{cache_location}/{json_file}'.format(cache_location=self.configCache, json_file=self.fileName) -X try: -X handle = open(filename) -X except IOError as exception: -X error_message = ("Exception occurred with the following exception error '{error}'. Could not open '{filename}'. " -X "It seems that the file has already been moved.".format(error=exception, filename=filename)) -X logging.error(error_message) -X else: -X logging.info("Continuing with the processing of file '{filename}'".format(filename=filename)) -X -X self.data = json.load(handle) -X self.type = self.data["type"] -X handle.close() -X if self.keep: -X self.__moveFile(filename, self.configCache + "/processed") -X else: -X logging.debug("Processed file deleted: %s and not kept in /processed", filename) -X os.remove(filename) -X updateDataBag(self) -X -X def setFile(self, name): -X self.fileName = name -X -X def getType(self): -X return self.type -X -X def getData(self): -X return self.data -X -X def setPath(self, path): -X self.configCache = path -X -X def __moveFile(self, origPath, path): -X if not os.path.exists(path): -X os.makedirs(path) -X originalName = os.path.basename(origPath) -X if originalName.count(".") == 1: -X originalName += "." + str(uuid.uuid4()) -X zipped_file_name = path + "/" + originalName + ".gz" -X with open(origPath, 'rb') as f_in, gzip.open(zipped_file_name, 'wb') as f_out: -X shutil.copyfileobj(f_in, f_out) -X os.remove(origPath) -X -X logging.debug("Processed file written to %s", zipped_file_name) -X -X -class PrivateGatewayHack: -X -X @classmethod -X def update_network_type_for_privategateway(cls, dbag, data): -X ip = data['router_guest_ip'] if 'router_guest_ip' in data.keys() else data['public_ip'] -X -X initial_data = cls.load_inital_data() -X has_private_gw_ip = cls.if_config_has_privategateway(initial_data) -X private_gw_matches = 'privategateway' in initial_data['config'] and cls.ip_matches_private_gateway_ip(ip, initial_data['config']['privategateway']) -X -X if has_private_gw_ip and private_gw_matches: -X data['nw_type'] = "public" -X logging.debug("Updating nw_type for ip %s" % ip) -X else: -X logging.debug("Not updating nw_type for ip %s because has_private_gw_ip = %s and private_gw_matches = %s " % (ip, has_private_gw_ip, private_gw_matches)) -X return data -X -X @classmethod -X def if_config_has_privategateway(cls, dbag): -X return 'privategateway' in dbag['config'].keys() and dbag['config']['privategateway'] != "None" -X -X @classmethod -X def ip_matches_private_gateway_ip(cls, ip, private_gateway_ip): -X new_ip_matches_private_gateway_ip = False -X if ip == private_gateway_ip: -X new_ip_matches_private_gateway_ip = True -X return new_ip_matches_private_gateway_ip -X -X @classmethod -X def load_inital_data(cls): -X initial_data_bag = DataBag() -X initial_data_bag.setKey('cmdline') -X initial_data_bag.load() -X initial_data = initial_data_bag.getDataBag() -X logging.debug("Initial data = %s" % initial_data) -X -X return initial_data -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/merge.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/merge.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/merge.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/merge.py': 'MD5 check failed' - ) << \SHAR_EOF -dc7c85d58b4e5f38ae61c82679523884 cloud_scripts/opt/cloud/bin/merge.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/merge.py'` -ne 13492 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/merge.py' is not 13492" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/master.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/master.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/master.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/master.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/master.py -M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2!&875L="(I"BAO<'1I -M;VYS+"!A/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/master.py': 'MD5 check failed' - ) << \SHAR_EOF -602ac6725c182da5ffa17760b2fe3ba5 cloud_scripts/opt/cloud/bin/master.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/master.py'` -ne 2040 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/master.py' is not 2040" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/set_redundant.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/set_redundant.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/set_redundant.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/set_redundant.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/set_redundant.py -M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/set_redundant.py': 'MD5 check failed' - ) << \SHAR_EOF -648b240f11d938ebd185d0e2a75004b8 cloud_scripts/opt/cloud/bin/set_redundant.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/set_redundant.py'` -ne 1663 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/set_redundant.py' is not 1663" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/checks2svpn.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checks2svpn.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/checks2svpn.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -if [ -z $1 ] -then -X echo "Fail to find VPN peer address!" -X exit 1 -fi -X -ipsec status vpn-$1 > /tmp/vpn-$1.status -X -cat /tmp/vpn-$1.status | grep "ESTABLISHED" > /dev/null -ipsecok=$? -if [ $ipsecok -ne 0 ] -then -X echo -n "IPsec SA not found;" -X echo "Site-to-site VPN have not connected" -X exit 11 -fi -echo -n "IPsec SA found;" -echo "Site-to-site VPN have connected" -Xexit 0 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/checks2svpn.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checks2svpn.sh': 'MD5 check failed' - ) << \SHAR_EOF -8aed94140f491ae027b3b55e9b1535bb cloud_scripts/opt/cloud/bin/checks2svpn.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checks2svpn.sh'` -ne 1178 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' is not 1178" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, vpn): -X key = vpn['vpn_server_ip'] -X op = vpn['create'] -X if key in dbag.keys() and not op: -X del(dbag[key]) -X else: -X dbag[key] = vpn -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py': 'MD5 check failed' - ) << \SHAR_EOF -9945565c7eb92c9fd9aa85648f8c4352 cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py'` -ne 994 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' is not 994" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_staticroutes.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_staticroutes.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_staticroutes.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, staticroutes): -X for route in staticroutes['routes']: -X key = route['network'] -X dbag[key] = route -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_staticroutes.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py': 'MD5 check failed' - ) << \SHAR_EOF -c89832deefffed1dcc12b367d9f9062e cloud_scripts/opt/cloud/bin/cs_staticroutes.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py'` -ne 952 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' is not 952" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, vpn): -X key = vpn['peer_gateway_ip'] -X op = vpn['create'] -X if key in dbag.keys() and not op: -X del(dbag[key]) -X else: -X dbag[key] = vpn -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py': 'MD5 check failed' - ) << \SHAR_EOF -37138a9d2b00c0cd0488f03f0b1e1c34 cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py'` -ne 996 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' is not 996" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/passwd_server_ip.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/passwd_server_ip.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/passwd_server_ip.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/passwd_server_ip.py -M(R$O=7-R+V)I;B]E;G8@<'ET:&]N"B,@3&EC96YS960@=&\@=&AE($%P86-H -M92!3;V9T=V%R92!&;W5N9&%T:6]N("A!4T8I('5N9&5R(&]N90HC(&]R(&UO -M2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N5]P87-S=V]R9"<@/')O=71E$EN(",L -M($9O2AO3H*("`@("`@("!W:71H(&9I;&4H9V5T4&%S -M&-E<'0@24]%3H* -M("`@("`@("`@("`@=VET:"!F:6QE*&=E=%!A&-E -M<'0@24]%"<*("`@(&1E9B!D;U]'150H5]P87-S=V]R9"7!E(#T]("=S879E9%]P87-S=V]R9"7-L;VR=215%515-47TU%5$A/1"7!E)UTL"B`@("`@("`@("`@("`@ -M("`@("`@?2D*("`@("`@("!S96QF+G-E;F1?7-L;V6EN9R!T;R!S879E('!A7-L;V6EN9R!T;R!S879E('!A7-L -M;V7-L;V7-L;V7,N87)G=BD@/B`Q -M.@H@("`@("`@(&%D9')E7-L -M;V6)O87)D26YT97)R -M=7!T.@H@("`@("`@('-Y7-L;V&-E<'0@17AC97!T:6]N+"!E.@H@("`@("`@('-Y7-L;V&-E<'1I;VX@)7,@+2T@ -M9&EE9"<@)2!E*0H@("`@("`@('!A/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py': 'MD5 check failed' - ) << \SHAR_EOF -1d63c1d8b2e5a6a48d48d76228964aee cloud_scripts/opt/cloud/bin/passwd_server_ip.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py'` -ne 7020 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py' is not 7020" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_network_acl.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_network_acl.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_network_acl.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_network_acl.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_network_acl.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_network_acl.py': 'MD5 check failed' - ) << \SHAR_EOF -79760ec4739cb68a9a8bf86319a2dd65 cloud_scripts/opt/cloud/bin/cs_network_acl.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_network_acl.py'` -ne 881 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_network_acl.py' is not 881" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cleanup.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cleanup.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cleanup.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cleanup.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cleanup.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -#rm -rf $@ && echo $? -X -zip_file=$1 -if [ -e "$zip_file" ]; -then -X rm -rf "$zip_file" -X echo "Deleting diagnostics zip file $zip_file" -else -X echo "File $zip_file not found in vm " -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cleanup.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cleanup.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cleanup.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cleanup.sh': 'MD5 check failed' - ) << \SHAR_EOF -63ca1758ffda6344d2622a21f5fc15b9 cloud_scripts/opt/cloud/bin/cleanup.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cleanup.sh'` -ne 986 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cleanup.sh' is not 986" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_loadbalancer.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_loadbalancer.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_loadbalancer.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import copy -X -X -def merge(dbag, data): -X """ Simply overwrite the existsing bag as, the whole configuration is sent every time """ -X if "rules" not in data: -X return dbag -X dbag['config'] = data['rules'] -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_loadbalancer.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py': 'MD5 check failed' - ) << \SHAR_EOF -667380d51eaa9aade2317d66a11529aa cloud_scripts/opt/cloud/bin/cs_loadbalancer.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py'` -ne 1016 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' is not 1016" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpc_func.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_func.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_func.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_func.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_func.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# @VERSION@ -X -getEthByIp (){ -X local ip=$1 -X for dev in `ls -1 /sys/class/net | grep eth` -X do -X sudo ip addr show dev $dev | grep $ip\/ > /dev/null -X if [ $? -eq 0 ] -X then -X echo $dev -X return 0 -X fi -X done -X return 1 -} -X -getVPCcidr () { -X CMDLINE=$(cat /var/cache/cloud/cmdline) -X for i in $CMDLINE -X do -X # search for foo=bar pattern and cut out foo -X KEY=$(echo $i | cut -d= -f1) -X VALUE=$(echo $i | cut -d= -f2) -X if [ "$KEY" == "vpccidr" ] -X then -X echo "$VALUE" -X return 0 -X fi -X done -X return 1 -} -X -removeRulesForIp() { -X local ip=$1 -X iptables-save -t mangle | grep $ip | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t mangle $rule -X done -X iptables-save -t nat | grep $ip | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t nat $rule -X done -X iptables-save -t filter | grep $ip | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t filter $rule -X done -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_func.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_func.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_func.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_func.sh': 'MD5 check failed' - ) << \SHAR_EOF -bc1b0432818cc40ea79df6720e16ecad cloud_scripts/opt/cloud/bin/vpc_func.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_func.sh'` -ne 1849 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_func.sh' is not 1849" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsDhcp.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsDhcp.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N'0B"D1(0U!?3U!44R`]("(O971C+V1H8W!O<'1S -M+G1X="(*0TQ/541?0T].1B`]("(O971C+V1N"`](#`*("`@("`@("!L:7-T96Y?861D0H@("`@("`@("`@("!G871E=V%Y(#T@ -M)R<*("`@("`@("`@("`@:68@2`](&E;)V=A=&5W -M87DG70H@("`@("`@("`@("!S;&EN92`](")D:&-P+7)A;F=E/7-E=#II;G1E -M"P@9V%T97=A>2D*("`@("`@("`@("`@96QS93H*("`@ -M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UR86YG93US970Z:6YT97)F86-E -M+25S+25S+"5S+'-T871I8R(@)2`H9&5V:6-E+"!I9'@L(&EP*0H@("`@("`@ -M("`@("!S96QF+F-O;F8N"D*("`@("`@("`@("`@;&EN92`](")D:&-P+6]P -M=&EO;CUT86"P@9VXN9V5T7V1O;6%I;B@I*0H@("`@("`@("`@("!S96QF+F-O;F8N"!F;W(@>"!I;B!G;BYG971?9&YS*"D@:68@>%T*("`@ -M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C -M92TE"P@)RPG+FIO:6XH9&YS7VQI -M2`A/2`G,"XP+C`N,""D*("`@("`@("`@("`@("`@ -M(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C92TE"P@9V%T97=A>2D*("`@("`@("`@("`@("`@('-E -M;&8N8V]N9BYS96%R8V@H"P@;F5T;6%S:RD*("`@("`@("`@("`@"`K/2`Q"@H@("`@("`@(",@ -M3&ES=&5N($%D9')E3H*("`@ -M("`@("`@("`@;&]G9VEN9RYI;F9O*")!='1E;7!T:6YG('1O(&1E;&5T92!E -M;G1R:65S(&9R;VT@9&YS;6%S<2YL96%S97,@9FEL92!F;W(@5DUS('=H:6-H -M(&%R92!N;W0@;VX@9&AC<&AOW!R:6YT("0S?22DZ"B`@("`@("`@5LG:7!V-%]A -M9&1R97-S)UTL(&5N=')Y6R=H;W-T7VYA;64G72D*("`@("`@("`C($QE87-E -M('1I;64@'!U;F=E9"P@:71S(&%C=&EV -M92!L96%S92!A;F0@1$A#4"]$3E,@8V]N9FEG(&ES('!R;W!E2!I2!R=6YN:6YG(&EN('!R;V1U8W1I;VYS -M('-Y5LG:7!V-%]A9&1R -M97-S)UTL"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@ -M("`@("`@("`@("`@("!E;G1R>5LG:&]S=%]N86UE)UTL"B`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!L96%S -M92DI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L)7,B("4@ -M*'1A9RP@,RDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L -M)7,B("4@*'1A9RP@-BDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D -M9"@B)7,L)7,B("4@*'1A9RP@,34I*0H*("`@("`@("!I(#T@25!!9&1R97-S -M*&5N=')Y6R=I<'8T7V%D9')E2==(#T@96YT2=="@H@("`@9&5F(&%D9%]H;W-T*'-E;&8L(&EP+"!H;W-T -M/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py': 'MD5 check failed' - ) << \SHAR_EOF -bcf1831b38d86bf041523540fa8f821e cloud_scripts/opt/cloud/bin/cs/CsDhcp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py'` -ne 8809 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' is not 8809" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsRedundant.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsRedundant.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N7,N2`](%1R=64*"B`@ -M("`@("`@:68@;F]T(&ES1&5V:6-E4F5A9'DZ"B`@("`@("`@("`@(&QO9V=I -M;F5]I9E]N965D960H"B`@("`@("`@("`@("(E&5C("1$045-3TX@+2T@+2UVR(L(")](BP@6PH@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("`@("(@("`@("`@(&%U=&A?='EP92!!2"!< -M;B(L("(@("`@("`@(&%U=&A?<&%S2AC;VYN=')A8VMD7W1E;7!L871E7V-O;F8L(&-O;FYT0H@("`@("`@("(B(@H@("`@("`@(&ET97)A=&EO;G,@ -M/2`Q,`H@("`@("`@('1I;65?8F5T=V5E;B`](#$*"B`@("`@("`@9F]R(&ET -M97(@:6X@3H* -M("`@("`@("`@("`@("`@(',@/2!S;V-K970N2!R=6YN:6YG("@E9#HE2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I<"@I*2YS=&]P*"D* -M"B`@("`@("`@0W-(96QP97(N2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@ -M("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")!9&1I;F<@9V%T97=A>2`]/3X@ -M)7,@=&\@9&5V:6-E(#T]/B`E2P@9&5V*2D*("`@("`@ -M("`@("`@("`@("`@("!I9B!D978@/3T@0W-(96QP97(N4%5"3$E#7TE.5$52 -M1D%#15-;&5C -M=71E*"(E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I -M<"@I*2YR97-T87)T*"D*"B`@("`@("`@0W-(96QP97(N2D*"B`@("`@("`@("`@(",@5&AE(&9I -M2!I;G1E2!V'1E2!E=F5R(&)E(&]N92!A9&1R97-S(&EN -M(&$@5E!#('1H97)E(&-A;B!B92!M86YY"B`@("`@("`@5&AE(&YE=R!C;V1E -M(&%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py': 'MD5 check failed' - ) << \SHAR_EOF -6936e38f53736f7c5a04b255800a242d cloud_scripts/opt/cloud/bin/cs/CsRedundant.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py'` -ne 16789 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' is not 16789" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsHelper.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsHelper.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsHelper.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsHelper.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B -M971H,2)]"@I35$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S -M:"`M8R`@)VEF(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@ -M96QS92!E8VAO(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@ -M(")V<&-R;W5T97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@ -M6R`D,"`]/2!<(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ -M"B`@("`@("`@("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@ -M("`@("`@(&-M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@ -M("`@("`@;&]G9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S -M(B`E('-T871E7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X -M96-U=&4H7!E*"E=(&%N9"!S -M=&%T92`]/2`B34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE -M8W5T92AC;60I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ -M("`@("`@(&5X96-U=&4H8VUD*0H*"F1E9B!I&5C=71E -M*")M;W5N="!T;7!F6XH=F%L*3H*("`@(&EF('9A;#H* -M("`@("`@("!R971U&5C=71E*")I<"!A9&1R('-H;W<@ -M?&=R97`@+78@WT*("`@("`@("`@("`@ -M=&];)VEP)UT@/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A -M;'-;+3%="B`@("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@ -M("(B(@H@("`@9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G -M*")3879I;F<@:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C -M=71E*")S>7-T96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I -M;F7-T96UC=&P@&5C=71E*")K:6QL -M("U(55`@)7,B("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D -M;G-M87-Q(BP@(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py': 'MD5 check failed' - ) << \SHAR_EOF -9bdd1fdfea8177d3e408b2cc87e5d503 cloud_scripts/opt/cloud/bin/cs/CsHelper.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py'` -ne 7644 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' is not 7644" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5NWT*("`@("`@("!S96QF+F=U97-T(#T@5')U90H@("`@("`@ -M(&1B(#T@1&%T84)A9R@I"B`@("`@("`@9&(N7,H*2!A;F0@;&5N*&1B86=;9&5V:6-E -M72D@(3T@,#H*("`@("`@("`@("`@2==*0H*("`@ -M("`@("!I9B`G9&YS)R!I;B!S96QF+F1A=&$Z"B`@("`@("`@("`@(&1N'1E;F0H&-E<'1I;VXN"B`@("`@("`@:68@)W)O -M=71E"!I="!P2X@22!J=7-T(&%D -M9&5D('1H92!I9BP@87,@26%N(&1I9"!I;B!S;VUE(&]T:&5R(&9I;&5S+"!T -M;R!A=F]I9"!T:&4@97AC97!T:6]N+@H@("`@("`@(&EF("=R;W5T97)?9W5E -M2<@:6X@2=="B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py': 'MD5 check failed' - ) << \SHAR_EOF -98c84f4067412f263891f8293f185243 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py'` -ne 2545 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' is not 2545" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsMonitor.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N"!I;B!S96QF+F1B86=;)V-O;F9I9R==+G-P;&ET*"WT*("`@("`@("!H8U]D871A6R)H96%L=&A?8VAE8VMS7V)A&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!S96QF+F1B -M86&-L=61E9%]H96%L=&A?8VAE8VMS(ET@/2!;70H* -M("`@("`@("!I9B`B:&5A;'1H7V-H96-K/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py': 'MD5 check failed' - ) << \SHAR_EOF -d8f5dcf496dbc6d8508e40b906f48245 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py'` -ne 3681 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' is not 3681" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@ -M("`@("!S96QF+FQA2!E>&ES=',Z(')U;&4] -M)7,@=&%B;&4])7,@8VAA:6X])7,B+"!N97=?2`](&-P>2YR97!L86-E*"(M02`E&5C=71E,B@B:7!T86)L97,@+70@)7,@ -M)7,B("4@*&YE=U]R=6QE+F=E=%]T86)L92@I+"!C<'DI*0H@("`@("`@("`@ -M("`@("`@(R!4:&5R92!A"!I;B!T:&4@ -M9G)A;65W;W)K+@H@("`@("`@("`@("`@("`@:68@&5C=71E*")I<'1A8FQE7!E(#T@0W-#;61,:6YE*")C;61L:6YE(BDN9V5T7W1Y<&4H*0H* -M("`@("`@("!T7!E*3H*("`@("`@("`@("`@("`@(&EF(&DNFEP*&)I='-;,#HZ,ETL(&)I='-;,3HZ,ETI*0H@("`@("`@(&EF -M("(M02(@:6X@2!C;W)R96-T(&EP=&%B;&5S(&-O;6UA -M;F0@(B(B"B`@("`@("`@(R!/7,H*3H*("`@("`@("`@("`@("`@('!R:6YT86)L92`] -M(&LN=7)N($9A;'-E"B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py': 'MD5 check failed' - ) << \SHAR_EOF -7456b53eba9f115f9ad344bc1c01611d cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py'` -ne 11100 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' is not 11100" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsRoute.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRoute.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRoute.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import CsHelper -import logging -X -X -class CsRoute: -X -X """ Manage routes """ -X -X def __init__(self): -X self.table_prefix = "Table_" -X -X def get_tablename(self, name): -X return self.table_prefix + name -X -X def add_table(self, devicename): -X tablenumber = 100 + int(devicename[3:]) -X tablename = self.get_tablename(devicename) -X str = "%s %s" % (tablenumber, tablename) -X filename = "/etc/iproute2/rt_tables" -X logging.info("Adding route table: " + str + " to " + filename + " if not present ") -X if not CsHelper.definedinfile(filename, str): -X CsHelper.execute("sudo echo " + str + " >> /etc/iproute2/rt_tables") -X # remove "from all table tablename" if exists, else it will interfer with -X # routing of unintended traffic -X if self.findRule("from all lookup " + tablename): -X CsHelper.execute("sudo ip rule delete from all table " + tablename) -X -X def flush_table(self, tablename): -X CsHelper.execute("ip route flush table %s" % (tablename)) -X CsHelper.execute("ip route flush cache") -X -X def add_route(self, dev, address): -X """ Wrapper method that adds table name and device to route statement """ -X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 -X table = self.get_tablename(dev) -X -X if not table or not address: -X empty_param = "table" if not table else "address" -X logging.info("Empty parameter received %s while trying to add route, skipping" % empty_param) -X else: -X logging.info("Adding route: dev " + dev + " table: " + -X table + " network: " + address + " if not present") -X cmd = "default via %s table %s proto static" % (address, table) -X self.set_route(cmd) -X -X def add_network_route(self, dev, address): -X """ Wrapper method that adds table name and device to route statement """ -X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 -X table = self.get_tablename(dev) -X -X if not table or not address: -X empty_param = "table" if not table else "address" -X logging.info("Empty parameter received %s while trying to add network route, skipping" % empty_param) -X else: -X logging.info("Adding route: dev " + dev + " table: " + -X table + " network: " + address + " if not present") -X cmd = "throw %s table %s proto static" % (address, table) -X self.set_route(cmd) -X -X def set_route(self, cmd, method="add"): -X """ Add a route if it is not already defined """ -X found = False -X search = cmd -X if "throw" in search: -X search = search.replace("throw", "") -X for i in CsHelper.execute("ip route show " + search): -X found = True -X if not found and method == "add": -X logging.info("Add " + cmd) -X cmd = "ip route add " + cmd -X elif found and method == "delete": -X logging.info("Delete " + cmd) -X cmd = "ip route delete " + cmd -X else: -X return -X CsHelper.execute(cmd) -X -X def add_defaultroute(self, gateway): -X """ Add a default route -X :param str gateway -X :return: bool -X """ -X if not gateway: -X raise Exception("Gateway cannot be None.") -X -X if self.defaultroute_exists(): -X return False -X else: -X cmd = "default via " + gateway -X logging.info("Adding default route") -X self.set_route(cmd) -X return True -X -X def defaultroute_exists(self): -X """ Return True if a default route is present -X :return: bool -X """ -X logging.info("Checking if default ipv4 route is present") -X route_found = CsHelper.execute("ip -4 route list 0/0") -X -X if len(route_found) > 0: -X logging.info("Default route found: " + route_found[0]) -X return True -X else: -X logging.warn("No default route found!") -X return False -X -X def findRule(self, rule): -X for i in CsHelper.execute("ip rule show"): -X if rule in i.strip(): -X return True -X return False -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRoute.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py': 'MD5 check failed' - ) << \SHAR_EOF -4f2109aa1d89157e14817f90c676c2d3 cloud_scripts/opt/cloud/bin/cs/CsRoute.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py'` -ne 4989 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' is not 4989" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py -M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2==*0H@("`@("`@("`@ -M("!#&5C=71E*&-O;6UA;F0I"B`@("`@("`@96QS93H*("`@ -M("`@("`@("`@8V]M;6%N9"`](")I<"!R;W5T92!S:&]W('P@9W)E<"`EW!R:6YT("0Q+"`D,WTG(B`E(')O=71E6R=N971W;W)K)UT*("`@ -M("`@("`@("`@2==*0H@("`@("`@("`@("`@ -C("`@0W-(96QP97(N97AE8W5T92AR;W5T95]C;VUM86YD*0H@ -` -end -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py': 'MD5 check failed' - ) << \SHAR_EOF -f9f9db3a4543397153d69a62551a6c8c cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py'` -ne 1655 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' is not 1655" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N7,H*3H* -M("`@("`@("`@("`@"YS<&QI="@G7&XG*5T*"B`@("`@("`@9FEL -M93$N8V]M;6ET*"D*("`@("`@("!F:6QE,B`]($-S1FEL92A(05!23UA97T-/ -M3D9?4"D*("`@("`@("!I9B!N;W0@9FEL93(N8V]M<&%R92AF:6QE,2DZ"B`@ -M("`@("`@("`@($-S2&5L<&5R+F-O<'DH2$%04D]865]#3TY&7U0L($A!4%)/ -M6%E?0T].1E]0*0H*("`@("`@("`@("`@<')O8R`]($-S4')O8V5S2YP:60G72D*("`@("`@("`@("`@:68@;F]T('!R;V,N9FEN -M9"@I.@H@("`@("`@("`@("`@("`@;&]G9VEN9RYD96)U9R@B0W-,;V%D0F%L -M86YC97(Z.B!W:6QL(')E2$B*0H@("`@("`@("`@("`@ -M("`@0W-(96QP97(N2(L(")R97-T87)T(BD*("`@ -M("`@("`@("`@96QS93H*("`@("`@("`@("`@("`@(&QO9V=I;F2$B*0H@("`@ -M("`@("`@("`@("`@0W-(96QP97(N2(L(")R96QO -M860B*0H*("`@("`@("!A9&1?/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py': 'MD5 check failed' - ) << \SHAR_EOF -8f93571ff9b8f21c947e90193c3efa38 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py'` -ne 3393 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' is not 3393" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsApp.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsApp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsApp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsApp.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G -M871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG971?='EP92@I"B`@ -M("`@("`@5]I9E]N965D -M960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L"B`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE,B]S:71E2DI"B`@("`@("`@ -M("`@(&9I;&4N&5C=71E,B@B/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsApp.py': 'MD5 check failed' - ) << \SHAR_EOF -fa071a9d58a918b6a9d5e09ae10e3e11 cloud_scripts/opt/cloud/bin/cs/CsApp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsApp.py'` -ne 4159 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' is not 4159" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsFile.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsFile.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsFile.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import logging -import re -import copy -X -X -class CsFile: -X """ File editors """ -X -X def __init__(self, filename): -X self.filename = filename -X self.load() -X -X def load(self): -X self.new_config = [] -X self.config = [] -X try: -X for line in open(self.filename): -X self.new_config.append(line) -X except IOError: -X logging.debug("File %s does not exist" % self.filename) -X else: -X logging.debug("Reading file %s" % self.filename) -X self.config = list(self.new_config) -X -X def is_changed(self): -X if set(self.config) != set(self.new_config): -X return True -X else: -X return False -X -X def __len__(self): -X return len(self.config) -X -X def empty(self): -X self.config = [] -X self.new_config = [] -X -X def repopulate(self): -X self.new_config = [] -X -X def commit(self): -X if not self.is_changed(): -X logging.info("Nothing to commit. The %s file did not change" % self.filename) -X return False -X handle = open(self.filename, "w+") -X for line in self.new_config: -X handle.write(line) -X handle.close() -X logging.info("Wrote edited file %s" % self.filename) -X self.config = list(self.new_config) -X logging.info("Updated file in-cache configuration") -X return True -X -X def dump(self): -X for line in self.new_config: -X print line -X -X def addeq(self, string): -X """ Update a line in a file of the form token=something -X match on token= and replace something if needed -X Add line if token is not present -X """ -X token = string.split('=')[0] + '=' -X self.search(token, string) -X -X def append(self, string, where=-1): -X if where == -1: -X self.new_config.append("%s\n" % string) -X else: -X self.new_config.insert(where, "%s\n" % string) -X -X def add(self, string, where=-1): -X for index, line in enumerate(self.new_config): -X if line.strip() == string: -X return False -X if where == -1: -X self.new_config.append("%s\n" % string) -X else: -X self.new_config.insert(where, "%s\n" % string) -X return True -X -X def section(self, start, end, content): -X sind = -1 -X eind = -1 -X found = False -X for index, line in enumerate(self.new_config): -X if found and line.strip() == end: -X eind = index -X found = False -X if line.strip() == start: -X sind = index + 1 -X found = True -X if sind == -1: -X content.insert(0, start + "\n") -X content.append(end + "\n") -X self.new_config[sind:eind] = content -X -X def greplace(self, search, replace): -X logging.debug("Searching for %s and replacing with %s" % (search, replace)) -X self.new_config = [w.replace(search, replace) for w in self.new_config] -X -X def replaceIfFound(self, search, replace): -X found = False -X replace_filtered = replace -X if re.search("PSK \"", replace): -X replace_filtered = re.sub(r'".*"', '"****"', replace) -X logging.debug("Searching for %s and replacing with %s if found" % (search, replace_filtered)) -X for index, line in enumerate(self.new_config): -X if line.lstrip().startswith("#"): -X continue -X if re.search(search, line): -X if replace not in line: -X self.new_config[index] = replace + "\n" -X return False -X -X def search(self, search, replace): -X found = False -X replace_filtered = replace -X if re.search("PSK \"", replace): -X replace_filtered = re.sub(r'".*"', '"****"', replace) -X logging.debug("Searching for %s and replacing with %s" % (search, replace_filtered)) -X for index, line in enumerate(self.new_config): -X if line.lstrip().startswith("#"): -X continue -X if re.search(search, line): -X found = True -X if replace not in line: -X self.new_config[index] = replace + "\n" -X if not found: -X self.new_config.append(replace + "\n") -X return True -X return False -X -X def searchString(self, search, ignoreLinesStartWith): -X found = False -X logging.debug("Searching for %s string " % search) -X -X for index, line in enumerate(self.new_config): -X print ' line = ' + line -X if line.lstrip().startswith(ignoreLinesStartWith): -X continue -X if search in line: -X found = True -X break -X -X return found -X -X def deleteLine(self, search): -X found = False -X logging.debug("Searching for %s to remove the line " % search) -X temp_config = [] -X for index, line in enumerate(self.new_config): -X if line.lstrip().startswith("#"): -X continue -X if search not in line: -X temp_config.append(line) -X -X self.new_config = list(temp_config) -X -X def compare(self, o): -X result = (isinstance(o, self.__class__) and set(self.config) == set(o.config)) -X logging.debug("Comparison of CsFiles content is ==> %s" % result) -X return result -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsFile.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsFile.py': 'MD5 check failed' - ) << \SHAR_EOF -81531ddee205a5eb66bb44f400ab222c cloud_scripts/opt/cloud/bin/cs/CsFile.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsFile.py'` -ne 6133 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' is not 6133" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/__init__.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/__init__.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/__init__.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/__init__.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/__init__.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/__init__.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/__init__.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/__init__.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/__init__.py': 'MD5 check failed' - ) << \SHAR_EOF -33215d440d5ba5fa95b1ffa035d769e2 cloud_scripts/opt/cloud/bin/cs/__init__.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/__init__.py'` -ne 785 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/__init__.py' is not 785" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsAddress.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsAddress.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsAddress.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsAddress.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N`H@("`@("`@("`@("`@("`@("`@ -M(&=U97-T7VEN=&5R9F%C92`](&EN=&5R9F%C90H@("`@("`@("`@("`@("`@ -M("`@(&QO9V=I;F2!C;VYF:6=U2AS96QF*3H*("`@("`@("!I -M9B!S96QF+F-O;F9I9RYI2(I -M"B`@("`@("`@96QS93H*("`@("`@("`@("`@2@I+"!S96QF+F=E=%]S -M:7IE*"DI"@H@("`@9&5F(&=E=%]S:7IE*'-E;&8I.@H@("`@("`@("(B(B!2 -M971U7!E -M(B!I;B!S96QF+F%D9')E"@Q,#`@*R!I;G0H9&5V6S,Z72DI -M"B`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@("`@97AC97!T($5X8V5P=&EO;B!A -M&-E<'1I;VX@ -M;V-C=7)R960@/3T^("5S(B`E(&4I"@H@("`@("`@("`@("!S96QF+G!O7!E*"D@:6X@6R)C;VYT7!E*"D@:6X@ -M6R=P=6)L:6,G73H*("`@("`@("`@("`@("`@('-E;&8N7!E*"E=.@H@("`@("`@ -M("`@("`@("`@9V%T97=A>2`]('-T2@I*3H* -M("`@("`@("`@("`@("`@(')O=71E+F%D9%]D969A=6QT2@I*0H*("`@(&1E9B!S971?;6%R:RAS96QF*3H*("`@ -M("`@("!C;60@/2`B+4$@4%)%4D]55$E.1R`M:2`E7!E(&]F('1H92!)4`H@("`@("`@(&=U97-T"B`@("`@("`@8V]N -M=')O;`H@("`@("`@('!U8FQI8PH@("`@("`@("(B(@H@("`@("`@(&EF(")N -M=U]T>7!E(B!I;B!S96QF+F%D9')E&9F9F9F9F9F -M("TM8W1M87-K(#!X9F9F9F9F9F8B72D*"B`@("`@("`@&UA7!E*"D@:6X@6R)G=65S=")=.@H@("`@("`@("`@("!G=65S -M=$YE='=O&9F9F9F9F9F(ETI"B`@ -M("`@("`@("`@(&=U97-T3F5T=V]R:T-I9'(@/2!S96QF+F%D9')E#4R-2\P>&9F9F9F9F9F(B`E -M("AS96QF+F1E=BP@2)=("$](").;VYE(CH* -M("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@("`@("`@:68@ -M(FYE='=O7!E*"D@:6X@6R)P=6)L:6,B -M72!A;F0@(F=A=&5W87DB(&EN('-E;&8N861D2)=("$] -M(").;VYE(CH*("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@ -M("`@("`@("`@(&9O7!E(B!I;B!A9&1R97-S(&%N9"!A -M9&1R97-S6R)N=U]T>7!E(ET@/3T@(F=U97-T(CH*("`@("`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("!R;W5T92YA9&1?;F5T=V]R:U]R;W5T92AS96QF -M+F1E=BP@&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A8VAE(BD*"B`@("`@("`@ -M96QI9B!M971H;V0@/3T@(F1E;&5T92(Z"B`@("`@("`@("`@(",@=')E870@ -M=&AE(&QA&5C=71E*")S=61O(&EP(')U;&4@9&5L971E('1A8FQE("(@*R!T86)L94YA -M;64I"B`@("`@("`@("`@("`@("!#&5C=71E*")S=61O(&EP -M(')O=71E(&9L=7-H('1A8FQE("(@*R!T86)L94YA;64I"B`@("`@("`@("`@ -M("`@("!#&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A -M8VAE(BD*("`@("`@("`@("`@("`@($-S4G5L92AS96QF+F1E=BDN9&5L36%R -M:R@I"@H@("`@("`@('-E;&8N9G=?7!E('=I;&P@ -M;F\@;&]N9V5R(&)E(&MN;W=N"B`@("`@("`@:68@7!E*"D@/3T@(G!U8FQI8R(@86YD('-E;&8N8V]N9FEG+FES7W9P8R@I -M(&%N9"!M971H;V0@/3T@(F%D9"(Z"B`@("`@("`@("`@(&EF('-E;&8N861D -M7,H*3H*("`@("`@("`@ -M("`@7!E)UT@:6X@5E)2 -M4%]465!%4SH*("`@("`@("`@("`@7!E(B!I;B!S96QF+F%D9')E&5C=71E,BAC;60L($9A -M;'-E*0H*("`@(",@1&5L971E(&%N>2!I<',@=&AA="!A7,H*2!O2AS96QF+"!B862!F;W(@ -M7,O8VQA"TP+W)P&-E<'0@24]%/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py': 'MD5 check failed' - ) << \SHAR_EOF -5cebbbd106abd3eba7ee0e4d23277dda cloud_scripts/opt/cloud/bin/cs/CsAddress.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py'` -ne 29236 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' is not 29236" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsProcess.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsProcess.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsProcess.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import os -import re -import CsHelper -import logging -X -X -class CsProcess(object): -X """ Manipulate processes """ -X -X def __init__(self, search): -X self.search = search -X -X def start(self, thru, background=''): -X # if(background): -X # cmd = cmd + " &" -X logging.info("Started %s", " ".join(self.search)) -X os.system("%s %s %s" % (thru, " ".join(self.search), background)) -X -X def kill_all(self): -X pids = self.find_pid() -X for p in pids: -X CsHelper.execute("kill -9 %s" % p) -X -X def find_pid(self): -X self.pid = [] -X for i in CsHelper.execute("ps aux"): -X items = len(self.search) -X proc = re.split(r"\s+", i)[items*-1:] -X matches = len([m for m in proc if m in self.search]) -X if matches == items: -X self.pid.append(re.split(r"\s+", i)[1]) -X -X logging.debug("CsProcess:: Searching for process ==> %s and found PIDs ==> %s", self.search, self.pid) -X return self.pid -X -X def find(self): -X has_pid = len(self.find_pid()) > 0 -X return has_pid -X -X def kill(self, pid): -X if pid > 1: -X CsHelper.execute("kill -9 %s" % pid) -X -X def grep(self, str): -X for i in CsHelper.execute("ps aux"): -X if i.find(str) != -1: -X return re.split(r"\s+", i)[1] -X return -1 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsProcess.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py': 'MD5 check failed' - ) << \SHAR_EOF -75a4650fe1e521049e80d32a022d8689 cloud_scripts/opt/cloud/bin/cs/CsProcess.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py'` -ne 2156 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' is not 2156" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsConfig.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsConfig.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsConfig.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsConfig.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N7!E*"D@/3T@)W9P8W)O=71E'1D;G,H'1D;G,G+"`G9F%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py': 'MD5 check failed' - ) << \SHAR_EOF -836541a5b9cb1b2f9df5dad6bb806745 cloud_scripts/opt/cloud/bin/cs/CsConfig.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py'` -ne 3179 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' is not 3179" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsDatabag.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@("`@ -M("!S96QF+F1B(#T@1&%T84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF -M+F1B+G-A=F4HWT*("`@("`@("!R971U&1I9V5S="@I"@H@("`@ -M9&5F(&=E=%]G871E=V%Y*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I -M;B!S96QF+FED871A*"DZ"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A -M*"E;)V=A=&5W87DG70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G -M971?=7-E7V5X=%]D;G,H'1D;G,G70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E -M9B!G971?861V97)T7VEN="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN -M="<@:6X@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py': 'MD5 check failed' - ) << \SHAR_EOF -9e4de6e0a115a5e806e80dc151769b21 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py'` -ne 4808 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' is not 4808" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsRule.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRule.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRule.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import CsHelper -import logging -X -X -class CsRule: -X """ Manage iprules -X Supported Types: -X fwmark -X """ -X -X def __init__(self, dev): -X self.dev = dev -X self.tableNo = 100 + int(dev[3:]) -X self.table = "Table_%s" % (dev) -X -X def addRule(self, rule): -X if not self.findRule(rule + " lookup " + self.table): -X cmd = "ip rule add " + rule + " table " + self.table -X CsHelper.execute(cmd) -X logging.info("Added rule %s for %s" % (cmd, self.table)) -X -X def findRule(self, rule): -X for i in CsHelper.execute("ip rule show"): -X if rule in i.strip(): -X return True -X return False -X -X def addMark(self): -X if not self.findMark(): -X cmd = "ip rule add fwmark %s table %s" % (self.tableNo, self.table) -X CsHelper.execute(cmd) -X logging.info("Added fwmark rule for %s" % (self.table)) -X -X def delMark(self): -X if self.findMark(): -X cmd = "ip rule delete fwmark %s table %s" % (self.tableNo, self.table) -X CsHelper.execute(cmd) -X logging.info("Deleting fwmark rule for %s" % (self.table)) -X -X def findMark(self): -X srch = "from all fwmark %s lookup %s" % (hex(self.tableNo), self.table) -X for i in CsHelper.execute("ip rule show"): -X if srch in i.strip(): -X return True -X return False -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRule.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRule.py': 'MD5 check failed' - ) << \SHAR_EOF -78748432f1ac57194339aef8bdb7c9f8 cloud_scripts/opt/cloud/bin/cs/CsRule.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRule.py'` -ne 2192 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' is not 2192" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vmdata.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vmdata.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vmdata.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vmdata.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/vmdata.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&ET*#(I -M"@H@("`@9F]R(&EP(&EN(&IS;VY?9&%T83H*("`@("`@("!F;W(@:71E;2!I -M;B!J2!V86QI9"!D -M871A"B`@("`@("`@("`@(&EF(&9O;&1E&ES=',H;65T -M86UA;FEF97-T*3H*("`@("`@("!O2Q!;&QO=UQN1&5N -M>2!F&-E<'0@3U-%2!E>&ES=',L('=E(&1O(&ET('1H:7,@=V%Y(&9O -M7,N97AI="@Q*0H*("`@(&9H(#T@;W!E;BAH -M=&%C8V5S2`K("=<;B&9L;V-K*&9I;&4I.@H@("`@=')Y.@H@("`@("`@(&9L;V-K -M*&9I;&4L($Q/0TM?15@I"B`@("!E>&-E<'0@24]%7,N97AI="@Q -M*0H@("`@3H*("`@("`@("!F;&]C:RAF:6QE+"!,3T-+7U5.*0H@("`@97AC97!T($E/ -M17)R;W(@87,@93H*("`@("`@("!P7,N97AI="@Q*0H@("`@7,N87)G=ELQ.ETI"FYA -` -end -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vmdata.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vmdata.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vmdata.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vmdata.py': 'MD5 check failed' - ) << \SHAR_EOF -f585277ddefb989a0662db609bc199c7 cloud_scripts/opt/cloud/bin/vmdata.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vmdata.py'` -ne 4723 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vmdata.py' is not 4723" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/get_diagnostics_files.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/get_diagnostics_files.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/get_diagnostics_files.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' && -#!/usr/bin/env python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import logging -import os -import re -import shlex -import subprocess as sp -import sys -import time -import zipfile -X -X -# Create zip archive and append files for retrieval -def zip_files(files): -X fList = files -X compression = zipfile.ZIP_DEFLATED -X time_str = time.strftime("%Y%m%d-%H%M%S") -X zf_name = '/root/diagnostics_files_' + time_str + '.zip' -X zf = zipfile.ZipFile(zf_name, 'w', compression) -X -X ''' -X Initialize 3 empty arrays to collect found files, non-existent files -X and last one to collect temp files to be cleaned up when script exits -X ''' -X files_found_list = [] -X files_not_found_list = [] -X files_from_shell_commands = [] -X -X try: -X for f in fList: -X f = f.strip() -X -X if f in ('iptables', 'ipaddr', 'iprule', 'iproute'): -X f = execute_shell_script(f) -X files_from_shell_commands.append(f) -X -X if len(f) > 3 and f.startswith('[') and f.endswith(']'): -X f = execute_shell_script(f[1:-1]) -X files_from_shell_commands.append(f) -X -X if os.path.isfile(f): -X try: -X zf.write(f, f[f.rfind('/') + 1:]) -X except OSError or RuntimeError as e: -X files_not_found_list.append(f) -X else: -X files_found_list.append(f) -X finally: -X cleanup(files_from_shell_commands) -X generate_retrieved_files_txt(zf, files_found_list, files_not_found_list) -X zf.close() -X print zf_name -X -X -def get_cmd(script): -X if script is None or len(script) == 0: -X return None -X -X cmd = None -X if script == 'iptables': -X cmd = 'iptables-save' -X elif script == 'ipaddr': -X cmd = 'ip address' -X elif script == 'iprule': -X cmd = 'ip rule list' -X elif script == 'iproute': -X cmd = 'ip route show table all' -X else: -X cmd = '/opt/cloud/bin/' + script -X if not os.path.isfile(cmd.split(' ')[0]): -X cmd = None -X -X return cmd -X -X -def execute_shell_script(script): -X script = script.strip() -X outputfile = script + '.log' -X -X with open(outputfile, 'wb', 0) as f: -X try: -X cmd = get_cmd(script) -X if cmd is None: -X f.write('Unable to generate command for ' + script + ', perhaps missing file') -X else: -X p = sp.Popen(cmd, shell=True, stdout=sp.PIPE, stderr=sp.PIPE) -X stdout, stderr = p.communicate() -X return_code = p.returncode -X if return_code is 0: -X f.write(stdout) -X else: -X f.write(stderr) -X except OSError as ex: -X delete_tmp_file_cmd = 'rm -f %s' % outputfile -X sp.check_call(shlex.split(delete_tmp_file_cmd)) -X finally: -X f.close() -X return outputfile -X -X -def cleanup(file_list): -X files = ' '.join(file_list) -X cmd = 'rm -f %s' % files -X try: -X p = sp.Popen(shlex.split(cmd), stderr=sp.PIPE, stdout=sp.PIPE) -X p.communicate() -X except OSError as e: -X logging.debug("Failed to execute bash command") -X -X -def generate_retrieved_files_txt(zip_file, files_found, files_not_found): -X output_file = 'fileinfo.txt' -X try: -X with open(output_file, 'wb', 0) as man: -X for i in files_found: -X man.write(i + '\n') -X for j in files_not_found: -X man.write(j + 'File Not Found!!\n') -X zip_file.write(output_file, output_file) -X finally: -X cleanup_cmd = "rm -f %s" % output_file -X sp.check_call(shlex.split(cleanup_cmd)) -X -X -if __name__ == '__main__': -X fileList = sys.argv[1:] -X zip_files(fileList) -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/get_diagnostics_files.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py': 'MD5 check failed' - ) << \SHAR_EOF -f8b91c14af848f14696aa2c1193b0907 cloud_scripts/opt/cloud/bin/get_diagnostics_files.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py'` -ne 4478 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' is not 4478" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/checkrouter.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checkrouter.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checkrouter.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/checkrouter.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checkrouter.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -STATUS=UNKNOWN -X -if [ "$(systemctl is-active keepalived)" != "active" ] -then -X echo "Status: FAULT" -X exit -fi -X -ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g') -if [ "$ROUTER_TYPE" = "router" ] -then -X ROUTER_STATE=$(ip addr show dev eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi') -X STATUS=$ROUTER_STATE -else -X ROUTER_STATE=$(ip addr show dev eth1 | grep state | awk '{print $9;}') -X if [ "$ROUTER_STATE" = "UP" ] -X then -X STATUS=MASTER -X elif [ "$ROUTER_STATE" = "DOWN" ] -X then -X STATUS=BACKUP -X fi -fi -X -echo "Status: ${STATUS}" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checkrouter.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/checkrouter.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/checkrouter.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checkrouter.sh': 'MD5 check failed' - ) << \SHAR_EOF -b107b37bc85a7036ef9f4e81cf4ae8b2 cloud_scripts/opt/cloud/bin/checkrouter.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checkrouter.sh'` -ne 1445 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checkrouter.sh' is not 1445" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/ilb.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ilb.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ilb.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/ilb.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/ilb.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s: -a -d -f -s \n" $(basename $0) >&2 -} -X -#set -x -X -fw_remove_backup() { -X logger -t cloud "$(basename $0): Entering fw_remove_backup" -X local lb_vif_list=eth0 -X for vif in $lb_vif_list; do -X sudo iptables -F back_load_balancer_$vif 2> /dev/null -X sudo iptables -D INPUT -i $vif -p tcp -j back_load_balancer_$vif 2> /dev/null -X sudo iptables -X back_load_balancer_$vif 2> /dev/null -X done -X sudo iptables -F back_lb_stats 2> /dev/null -X sudo iptables -D INPUT -p tcp -j back_lb_stats 2> /dev/null -X sudo iptables -X back_lb_stats 2> /dev/null -} -X -fw_restore() { -X logger -t cloud "$(basename $0): Entering fw_restore" -X local lb_vif_list="eth0" -X for vif in $lb_vif_list; do -X sudo iptables -F load_balancer_$vif 2> /dev/null -X sudo iptables -D INPUT -i $vif -p tcp -j load_balancer_$vif 2> /dev/null -X sudo iptables -X load_balancer_$vif 2> /dev/null -X sudo iptables -E back_load_balancer_$vif load_balancer_$vif 2> /dev/null -X done -X sudo iptables -F lb_stats 2> /dev/null -X sudo iptables -D INPUT -p tcp -j lb_stats 2> /dev/null -X sudo iptables -X lb_stats 2> /dev/null -X sudo iptables -E back_lb_stats lb_stats 2> /dev/null -} -X -# firewall entry to ensure that haproxy can receive on specified port -fw_entry() { -X logger -t cloud "$(basename $0): Entering fw_entry" -X local added=$1 -X local removed=$2 -X local stats=$3 -X -X if [ "$added" == "none" ] -X then -X added="" -X fi -X -X if [ "$removed" == "none" ] -X then -X removed="" -X fi -X -X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") -X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") -X -# back up the iptable rules by renaming before creating new. -X local lb_vif_list=eth0 -X for vif in $lb_vif_list; do -X sudo iptables -E load_balancer_$vif back_load_balancer_$vif 2> /dev/null -X sudo iptables -N load_balancer_$vif 2> /dev/null -X sudo iptables -A INPUT -i $vif -p tcp -j load_balancer_$vif -X done -X sudo iptables -E lb_stats back_lb_stats 2> /dev/null -X sudo iptables -N lb_stats 2> /dev/null -X sudo iptables -A INPUT -p tcp -j lb_stats -X -X for i in $a -X do -X local pubIp=$(echo $i | cut -d: -f1) -X local dport=$(echo $i | cut -d: -f2) -X local lb_vif_list="eth0" -X for vif in $lb_vif_list; do -X sudo iptables -A load_balancer_$vif -p tcp -d $pubIp --dport $dport -j ACCEPT -X if [ $? -gt 0 ] -X then -X return 1 -X fi -X done -X done -X local pubIp=$(echo $stats | cut -d: -f1) -X local dport=$(echo $stats | cut -d: -f2) -X local cidrs=$(echo $stats | cut -d: -f3 | sed 's/-/,/') -X sudo iptables -A lb_stats -s $cidrs -p tcp -m state --state NEW -d $pubIp --dport $dport -j ACCEPT -X -X return 0 -} -X -#Hot reconfigure HA Proxy in the routing domain -reconfig_lb() { -X logger -t cloud "Reconfiguring ilb using $1" -X /root/reconfigLB.sh $1 -X return $? -} -X -# Restore the HA Proxy to its previous state, and revert iptables rules on loadbalancer -restore_lb() { -X logger -t cloud "Restoring HA Proxy to previous state" -X # Copy the old version of haproxy.cfg into the file that reconfigLB.sh uses -X cp /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg.new -X -X if [ $? -eq 0 ] -X then -X # Run reconfigLB.sh again -X /root/reconfigLB.sh /etc/haproxy/haproxy.cfg.new -X fi -} -X -X -logger -t cloud "$(basename $0): Entering $(dirname $0)/$(basename $0)" -X -iflag= -aflag= -dflag= -fflag= -sflag= -X -while getopts 'i:a:d:f:s:' OPTION -do -X case $OPTION in -X i) iflag=1 -X domRIp="$OPTARG" #unused but passed in -X ;; -X a) aflag=1 -X addedIps="$OPTARG" -X ;; -X d) dflag=1 -X removedIps="$OPTARG" -X ;; -X f) fflag=1 -X cfgfile="$OPTARG" -X ;; -X s) sflag=1 -X statsIp="$OPTARG" -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [[ "$aflag$dflag" != "1" && "$aflag$dflag" != "11" ]] -then -X usage -X unlock_exit 2 $lock $locked -fi -X -if [ "$addedIps" == "" ] -then -X addedIps="none" -fi -X -X -if [ "$removedIps" == "" ] -then -X removedIps="none" -fi -X -X -# hot reconfigure haproxy -reconfig_lb $cfgfile -X -if [ $? -gt 0 ] -then -X logger -t cloud "Reconfiguring ilb failed" -X unlock_exit 1 $lock $locked -fi -X -logger -t cloud "HAProxy reconfigured successfully, configuring firewall" -X -# iptables entry to ensure that haproxy receives traffic -fw_entry $addedIps $removedIps $statsIp -X -if [ $? -gt 0 ] -then -X logger -t cloud "Failed to apply firewall rules for internal load balancing, reverting HA Proxy config" -X # Restore the LB -X restore_lb -X -X logger -t cloud "Reverting firewall config" -X fw_restore -X -X unlock_exit 1 $lock $locked -else -X # Remove backedup iptable rules -X logger -t cloud "Firewall configured successfully, deleting backup firewall config" -X fw_remove_backup -fi -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/ilb.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/ilb.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/ilb.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ilb.sh': 'MD5 check failed' - ) << \SHAR_EOF -8b7374975ee7d7a5d73da78b60bd508c cloud_scripts/opt/cloud/bin/ilb.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ilb.sh'` -ne 5644 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ilb.sh' is not 5644" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -for i in $* -do -X info=`/opt/cloud/bin/checks2svpn.sh $i` -X ret=$? -X batchInfo+="$i:$ret:$info&" -done -echo -n $batchInfo -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh': 'MD5 check failed' - ) << \SHAR_EOF -36a25911b669737ea678011f72a6f3f9 cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh'` -ne 924 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' is not 924" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/savepassword.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/savepassword.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/savepassword.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/savepassword.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/savepassword.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# Usage -# save_password -v -p -X -while getopts 'v:p:' OPTION -do -X case $OPTION in -X v) VM_IP="$OPTARG" -X ;; -X p) PASSWORD="$OPTARG" -X ;; -X ?) echo "Incorrect usage" -X ;; -X esac -done -TOKEN_FILE="/tmp/passwdsrvrtoken" -TOKEN="" -if [ -f $TOKEN_FILE ]; then -X TOKEN=$(cat $TOKEN_FILE) -fi -ps aux | grep passwd_server_ip.py |grep -v grep 2>&1 > /dev/null -if [ $? -eq 0 ] -then -X ips=$(ip addr show | grep inet | awk '{print $2}') -X for ip in $ips; do -X server_ip=$(echo $ip | awk -F'/' '{print $1}') -X curl --header "DomU_Request: save_password" "http://$server_ip:8080/" -F "ip=$VM_IP" -F "password=$PASSWORD" -F "token=$TOKEN" >/dev/null 2>/dev/null & -X done -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/savepassword.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/savepassword.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/savepassword.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/savepassword.sh': 'MD5 check failed' - ) << \SHAR_EOF -edebd2c25984e1ed00b36e4f8d360a63 cloud_scripts/opt/cloud/bin/savepassword.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/savepassword.sh'` -ne 1525 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/savepassword.sh' is not 1525" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cloud-nic.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cloud-nic.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cloud-nic.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -plug_nic() { -X sudo echo "$tableNo $tableName" >> /etc/iproute2/rt_tables 2>/dev/null -X sudo ip rule add fwmark $tableNo table $tableName 2>/dev/null -X sudo ip route flush table $tableName -X sudo ip route flush cache -} -X -X -unplug_nic() { -X sudo iptables -t mangle -D PREROUTING -i $dev -m state --state NEW -j CONNMARK --set-mark $tableNo 2>/dev/null -X -X sudo ip rule del fwmark $tableNo 2>/dev/null -X sudo ip route flush table $tableName -X sudo sed -i /"$tableNo $tableName"/d /etc/iproute2/rt_tables 2>/dev/null -X sudo ip route flush cache -X # remove network usage rules -X sudo iptables -F NETWORK_STATS_$dev 2>/dev/null -X iptables-save | grep NETWORK_STATS_$dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables $rule -X done -X sudo iptables -X NETWORK_STATS_$dev 2>/dev/null -X # remove vpn network usage rules -X sudo iptables -t mangle -F VPN_STATS_$dev 2>/dev/null -X iptables-save -t mangle | grep VPN_STATS_$dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t mangle $rule -X done -X sudo iptables -t mangle -X VPN_STATS_$dev 2>/dev/null -X # remove rules on this dev -X iptables-save -t mangle | grep $dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t mangle $rule -X done -X iptables-save -t nat | grep $dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t nat $rule -X done -X iptables-save | grep $dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables $rule -X done -X # remove apache config for this eth -X rm -f /etc/apache2/conf.d/vhost$dev.conf -} -X -action=$1 -dev=$2 -tableNo=$((100+${dev:3})) -tableName="Table_$dev" -X -if [ $action == 'add' ] -then -X plug_nic -else -X unplug_nic -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cloud-nic.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cloud-nic.sh': 'MD5 check failed' - ) << \SHAR_EOF -6afed00cefb1dc06b8b4969c2c26933e cloud_scripts/opt/cloud/bin/cloud-nic.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cloud-nic.sh'` -ne 2632 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' is not 2632" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/ipsectunnel.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ipsectunnel.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/ipsectunnel.sh (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/ipsectunnel.sh -M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N#4R-2(*=G!N:6YM87)K/2(P>#4R-"(*"G5S86=E*"D@ -M>PH@("`@<')I;G1F(")5PH@('-U9&\@:7!T86)L -M97,MPH@(&1I2!<"B`@("!P -M:&%S93(@<&]L:6-Y/21ER1R:6=H=&YE='-] -M(B`^/B`D=G!N8V]N9F9I;&4@)B8*("!S=61O(&5C:&\@(B`@='EP93UT=6YN -M96PB(#X^("1V<&YC;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!A=71H8GD] -MVEK96QI9F5T:6UE?7,B(#X^("1V<&YC -M;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!E2(@/CX@ -M)'9P;F-O;F9F:6QE("8F"B`@2!F -M;W(@'1H;W`](B1/4%1!4D&ET("1R970* -` -end -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/ipsectunnel.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh': 'MD5 check failed' - ) << \SHAR_EOF -097a970ec94a68d965ffd7f446e3862d cloud_scripts/opt/cloud/bin/ipsectunnel.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh'` -ne 8769 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' is not 8769" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/ipassoc.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ipassoc.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ipassoc.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/ipassoc.sh (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/ipassoc.sh -M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N"`D("1(96%D55),.B!S=FXZ+R]S=FXN;&%B+G9M;W!S+F-O;2]R97!O2!E>&ES=',B"GT* -M"F1E;%]F=U]C:&%I;E]F;W)?:7`@*"D@>PH@(&QO8V%L('!U8DEP/20H96-H -M;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?2W!R:6YT("0R?2W!R:6YT("0R?2W!R:6YT("0Q?2PH@(&QO -M8V%L(&1E=CTB)#$B"B`@;&]C86P@:7`](B0R(@H@('-U9&\@:7`@861DW!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP/20Q -M"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0Q?22!F;W(@:7`@)'!U8DEP(&]N(&EN=&5R9F%C92`D971H1&5V(@H@("`@ -M(')E='5R;B`Q"B`@9FD*"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0R?2<@('P@9W)E<"`M=R`D -M:7!.;TUAW!R -M:6YT("0R?2#TD*'!R:6YT9B`B)7A<;B(@)&YU;2D*("`@("`@("`@ -M(&5C:&\@)&AE>#L*("`@("`@("`@("-E;F%B;&4@`IS -M9FQA9STP"FQF;&%G/0IF9FQA9ST*8V9L86<]"FYF;&%G/0IO<#TB(@H*:7-? -M;6%S=&5R/3`*:7-?&ET(#(@)&QO8VL@)&QO8VME9`H)"3L["B`@ -M97-A8PID;VYE"@H*:68@6R`B)$%F;&%G)$1F;&%G(B`A/2`B,2(@70IT:&5N -M"B`@("!U&ET("0_("1L;V-K -M("1L;V-K960*9FD*"FEF(%L@(B1F9FQA9R(@/3T@(C$B(%T@)B8@6R`B)$1F -M;&%G(B`]/2`B,2(@70IT:&5N"B`@&ET("0_ -M("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1$9FQA9R(@/3T@(C$B(%T*=&AE -M;@H@(')E;6]V95]A;E]I<"`@)'!U8FQI8TEP("8F"B`@9&5L7V9W7V-H86EN -M7V9O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ipassoc.sh': 'MD5 check failed' - ) << \SHAR_EOF -ad068a0cc84ded8f79c63ce3aced4586 cloud_scripts/opt/cloud/bin/ipassoc.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ipassoc.sh'` -ne 13401 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ipassoc.sh' is not 13401" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/line_edit.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/line_edit.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/line_edit.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/line_edit.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/line_edit.py' && -#!/usr/bin/python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import logging -import re -import shutil -import os -X -X -class LineEdit(object): -X """Helper for LineEditingFile that keeps track of one edit.""" -X def __init__(self, search, sub, *sub_args, **kwargs): -X if len(sub_args) > 0: -X sub = sub % sub_args -X flags = kwargs.get('flags', 0) -X self.pattern = re.compile(search, flags=flags) -X self.sub = sub -X self.count = kwargs.get('count', 0) # max subs to make -X self.subs = 0 # subs made so far -X -X -class LineEditingFile(object): -X """ -X Atomic, conservative, by-line editing of configuration files. -X -X Will not touch the file if there are no changes to do. -X Reasonably efficient for large files, though files with a long time -X before their first match will use memory. -X -X -X Given a vhosts file such as: -X >>> with open('doctest-vhosts.conf', 'w') as f: -X ... f.write(''' -X ... Listen foo:80 -X ... -X ... DocRoot /var/www -X ... -X ... -X ... Listen other:80 -X ... -X ... DocRoot /var/www -X ... -X ... ''') -X ... -X -X To replace the hostname for the first virtualhost entry: -X >>> new_hostname = 'fooooo' -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... f.replace(r'', '', new_hostname, count=1, flags=re.I) -X ... f.replace(r'Listen .*?:80', 'Listen %s:80', new_hostname, count=1, flags=re.I) -X ... -X -X Be careful with the matches! -X A second invocation of the same rule will edit the second vhost: -X >>> new_hostname = 'fooooo' -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... f.replace(r'', '', new_hostname, count=1, flags=re.I) -X ... -X -X To move all hosts from port 80 to port 8080: -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... f.replace(r'', '', flags=re.I) -X ... f.replace(r'Listen (.*?):80', 'Listen \\\\1:80', flags=re.I) -X ... -X -X (please note in this example there's a double escape of the backreference -X \\\\1, to make the example work with doctest) -X -X Since this example already matched all files, a second invocation does nothing: -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... f.replace(r'', '', flags=re.I) -X ... -X -X It's also acceptable to not make any edits at all: -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... pass -X ... -X -X You don't _have_ to use a with statement: -X >>> f = LineEditingFile('doctest-vhosts.conf') -X >>> f.replace(r'DocRoot /var/www', 'DocRoot /var/www/html', flags=re.I) -X >>> changes = f.commit() -X >>> print changes -X 2 -X >>> -X -X Cleanup of the example vhosts.conf: -X >>> # noinspection PyBroadException -X >>> try: -X ... os.unlink('doctest-vhosts.conf') -X ... os.unlink('doctest-vhosts.conf.bak') -X ... os.unlink('doctest-vhosts.conf.new') -X ... except: -X ... pass -X ... -X """ -X -X def __init__(self, filename): -X self.filename = filename -X self.changed = False -X self.edits = [] -X -X def __enter__(self): -X return self -X -X def replace(self, search, sub, *sub_args, **kwargs): -X edit = LineEdit(search, sub, *sub_args, **kwargs) -X self.edits.append(edit) -X -X # noinspection PyUnusedLocal -X def __exit__(self, exc, value, traceback): -X if exc is not None: -X return False # return false results in re-raise -X -X self.commit() -X -X def commit(self): -X changes = 0 -X changed_file = None -X changed_filename = self.filename + '.new' -X try: -X lines = [] -X backup_filename = self.filename + '.bak' -X # noinspection PyUnusedLocal -X stat = None -X with open(self.filename, 'r') as orig: -X stat = os.fstat(orig.fileno()) -X for line in orig: -X changed_line = line -X for edit in self.edits: -X remaining_count = 0 -X if edit.count != 0: -X remaining_count = edit.count - edit.subs -X if remaining_count < 0: -X raise Exception("Made too many edits") -X elif remaining_count == 0: -X continue -X changed_line, subs = edit.pattern.subn( -X edit.sub, line, remaining_count) -X if changed_line != line: -X if changed_file is None: -X logging.debug("Editing file %s" % self.filename) -X logging.debug(" - %s" % line[:-1]) -X logging.debug(" + %s" % changed_line[:-1]) -X changes += subs -X edit.subs += subs -X if changes == 0: # buffer until we find a change -X lines.append(changed_line) -X elif changed_file is None: # found first change, flush buffer -X changed_file = open(changed_filename, 'w') -X if hasattr(os, 'fchmod'): -X os.fchmod(changed_file.fileno(), # can cause OSError which aborts -X stat.st_mode) -X if hasattr(os, 'fchown'): -X os.fchown(changed_file.fileno(), # can cause OSError which aborts -X stat.st_uid, stat.st_gid) -X changed_file.writelines(lines) -X changed_file.write(changed_line) -X del lines # reclaim buffer memory -X else: # already flushed, just write -X changed_file.write(changed_line) -X -X if changes == 0: -X logging.info("No edits need for file %s" % -X self.filename) -X else: -X changed_file.close() -X changed_file = None -X if os.path.exists(backup_filename): # back up the original -X os.unlink(backup_filename) -X shutil.copy(self.filename, backup_filename) -X os.rename(changed_filename, self.filename) # the swap -X logging.info("Edited file %s (%d changes)" % -X (self.filename, changes)) -X finally: -X if changed_file is not None: # failed, clean up -X changed_file.close() -X os.unlink(changed_filename) -X return changes -X -X -if __name__ == "__main__": -X logging.basicConfig(level=logging.DEBUG) -X import doctest -X doctest.testmod() -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/line_edit.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/line_edit.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/line_edit.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/line_edit.py': 'MD5 check failed' - ) << \SHAR_EOF -4d05b8a011ff9c6132a3ca4ff477a161 cloud_scripts/opt/cloud/bin/line_edit.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/line_edit.py'` -ne 7961 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/line_edit.py' is not 7961" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/get_template_version.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/get_template_version.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/get_template_version.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/get_template_version.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/get_template_version.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# As the last command send to router before any rules operation, wait until boot up done -X -__TIMEOUT=240 -__FLAGFILE=/var/cache/cloud/boot_up_done -done=0 -for i in `seq 1 $(($__TIMEOUT * 10))` -do -X if [ -e $__FLAGFILE ] -X then -X done=1 -X break -X fi -X sleep 0.1 -X if [ $((i % 10)) -eq 0 ] -X then -X logger -t cloud "Waiting for VM boot up done for one second" -X fi -done -X -if [ -z $done ] -then -X # declare we failed booting process -X echo "Waited 60 seconds but boot up haven't been completed" -X exit -fi -X -release=`cat /etc/cloudstack-release` -sig=`cat /var/cache/cloud/cloud-scripts-signature` -echo "${release}&${sig}" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/get_template_version.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/get_template_version.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/get_template_version.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/get_template_version.sh': 'MD5 check failed' - ) << \SHAR_EOF -2234ad00c02a6be63cb0f4f876b8960b cloud_scripts/opt/cloud/bin/get_template_version.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/get_template_version.sh'` -ne 1449 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/get_template_version.sh' is not 1449" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/update_config.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/update_config.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/update_config.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/update_config.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/update_config.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,N87)G=BD*:68@87)G8R`A/2`R(&%N9"!A7,N97AI="@Q*0H*(R!&25A- -M12!W92!S:&]U;&0@9V5T('1H:7,@;&]C871I;VX@9G)O;2!A(&-O;F9I9W5R -M871I;VX@8VQA7,N97AI="AR971U -M2!S<&5E9&EN9R!U<"!L;V%D:6YG('1I;65S -M"B`@("!I9B!N;W0@*&]S+F5N=FER;VXN9V5T*"=$149%4E]#3TY&242YJ7,N87)G=ELQ -M72!O2`]($YO -M;F4*"B`@("!F;W(@:S$L('8Q(&EN(&=U97-T;F5T7V1I8W0N:71E7,N87!P96YD*&LQ*0H*("`@(&EF(&YO -M="!E>&ES=&EN9U]K97ES.@H@("`@("`@("2`Z -M.B!296-O;F9I9W5R:6YG(&=U97-T(&YE='=O&ES=&EN9U]K97ES.@H@("`@("`@("2!I;B!E>&ES=&EN9U]K97ES.@H@("`@("`@(&9O&ES=',@/2!4&ES=',Z"B`@("`@("`@("`@(&)R96%K -M"@H@("`@B(I*3H* -M("`@("`@("!S>7,N97AI="@P*0H@("`@;&]G9VEN9RYE2`Z.B!5;F%B;&4@=&\@7,N97AI="@Q -M*0H*(R!)9B!T:&4@9W5E2`Z.B!.;R!N965D('1O('!R;V-E/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/update_config.py': 'MD5 check failed' - ) << \SHAR_EOF -a2062b2b010940ea783d8256b807c488 cloud_scripts/opt/cloud/bin/update_config.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/update_config.py'` -ne 5136 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/update_config.py' is not 5136" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/edithosts.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/edithosts.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/edithosts.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/edithosts.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/edithosts.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -X -# edithosts.sh -- edit the dhcphosts file on the routing domain -X -usage() { -X printf "Usage: %s: -m -4 -6 -h -d -n -s -u [-N]\n" $(basename $0) >&2 -} -X -mac= -ipv4= -ipv6= -host= -dflt= -dns= -routes= -duid= -nondefault= -X -while getopts 'm:4:h:d:n:s:6:u:N' OPTION -do -X case $OPTION in -X m) mac="$OPTARG" -X ;; -X 4) ipv4="$OPTARG" -X ;; -X 6) ipv6="$OPTARG" -X ;; -X u) duid="$OPTARG" -X ;; -X h) host="$OPTARG" -X ;; -X d) dflt="$OPTARG" -X ;; -X n) dns="$OPTARG" -X ;; -X s) routes="$OPTARG" -X ;; -X N) nondefault=1 -X ;; -X ?) usage -X exit 2 -X ;; -X esac -done -X -DHCP_HOSTS=/etc/dhcphosts.txt -DHCP_OPTS=/etc/dhcpopts.txt -DHCP_LEASES=/var/lib/misc/dnsmasq.leases -HOSTS=/etc/hosts -X -source /root/func.sh -X -lock="biglock" -#default timeout value is 30 mins as DhcpEntryCommand is not synchronized on agent side any more, -#and multiple commands can be sent to the same VR at a time -locked=$(getLockFile $lock 1800) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -grep "redundant_router=1" /var/cache/cloud/cmdline > /dev/null -no_redundant=$? -X -dnsmasq_managed_lease=`cat /var/cache/cloud/dnsmasq_managed_lease` -X -wait_for_dnsmasq () { -X local _pid=$(pidof dnsmasq) -X for i in 0 1 2 3 4 5 6 7 8 9 10 -X do -X sleep 1 -X _pid=$(pidof dnsmasq) -X [ "$_pid" != "" ] && break; -X done -X [ "$_pid" != "" ] && return 0; -X logger -t cloud "edithosts: timed out waiting for dnsmasq to start" -X return 1 -} -X -if [ $dnsmasq_managed_lease ] -then -X #release previous dhcp lease if present -X logger -t cloud "edithosts: releasing $ipv4" -X dhcp_release $(ip route get "$ipv4/32" | grep " dev " | sed -e "s/^.* dev \([^ ]*\) .*$/\1/g") $ipv4 $(grep "$ipv4 " $DHCP_LEASES | awk '{print $2}') > /dev/null 2>&1 -X logger -t cloud "edithosts: released $ipv4" -fi -X -logger -t cloud "edithosts: update $mac $ipv4 $ipv6 $host to hosts" -X -[ ! -f $DHCP_HOSTS ] && touch $DHCP_HOSTS -[ ! -f $DHCP_OPTS ] && touch $DHCP_OPTS -[ ! -f $DHCP_LEASES ] && touch $DHCP_LEASES -X -#delete any previous entries from the dhcp hosts file -sed -i /$mac/d $DHCP_HOSTS -if [ $ipv4 ] -then -X sed -i /$ipv4,/d $DHCP_HOSTS -fi -if [ $ipv6 ] -then -X #searching with [$ipv6], matching other ip so using $ipv6], -X sed -i /$ipv6],/d $DHCP_HOSTS -fi -# don't want to do this in the future, we can have same VM with multiple nics/entries -sed -i /$host,/d $DHCP_HOSTS -X -#put in the new entry -if [ $ipv4 ] -then -X echo "$mac,$ipv4,$host,infinite" >>$DHCP_HOSTS -fi -if [ $ipv6 ] -then -X if [ $nondefault ] -X then -X echo "id:$duid,set:nondefault6,[$ipv6],$host,infinite" >>$DHCP_HOSTS -X else -X echo "id:$duid,[$ipv6],$host,infinite" >>$DHCP_HOSTS -X fi -fi -X -if [ $dnsmasq_managed_lease -eq 0 ] -then -X #delete leases to supplied mac and ip addresses -X if [ $ipv4 ] -X then -X sed -i /$mac/d $DHCP_LEASES -X sed -i /"$ipv4 "/d $DHCP_LEASES -X fi -X if [ $ipv6 ] -X then -X sed -i /$duid/d $DHCP_LEASES -X sed -i /"$ipv6 "/d $DHCP_LEASES -X fi -X sed -i /"$host "/d $DHCP_LEASES -X -X #put in the new entry -X if [ $ipv4 ] -X then -X echo "0 $mac $ipv4 $host *" >> $DHCP_LEASES -X fi -X if [ $ipv6 ] -X then -X echo "0 $duid $ipv6 $host *" >> $DHCP_LEASES -X fi -fi -X -#edit hosts file as well -if [ $ipv4 ] -then -X sed -i /"$ipv4 "/d $HOSTS -fi -if [ $ipv6 ] -then -X sed -i /"$ipv6 "/d $HOSTS -fi -sed -i /" $host$"/d $HOSTS -if [ $ipv4 ] -then -X echo "$ipv4 $host" >> $HOSTS -fi -if [ $ipv6 ] -then -X echo "$ipv6 $host" >> $HOSTS -fi -X -if [ "$dflt" != "" -a "$ipv4" != "" ] -then -X #make sure dnsmasq looks into options file -X sed -i /dhcp-optsfile/d /etc/dnsmasq.conf -X echo "dhcp-optsfile=$DHCP_OPTS" >> /etc/dnsmasq.conf -X -X tag=$(echo $ipv4 | tr '.' '_') -X sed -i /$tag,/d $DHCP_OPTS -X if [ "$dflt" == "0.0.0.0" ] -X then -X logger -t cloud "$0: unset default router for $ipv4" -X logger -t cloud "$0: unset dns server for $ipv4" -X echo "$tag,3" >> $DHCP_OPTS -X echo "$tag,6" >> $DHCP_OPTS -X echo "$tag,15" >> $DHCP_OPTS -X fi -X [ "$routes" != "" ] && echo "$tag,121,$routes" >> $DHCP_OPTS -X #delete entry we just put in because we need a tag -X sed -i /$ipv4,/d $DHCP_HOSTS -X #put it back with a tag -X echo "$mac,set:$tag,$ipv4,$host,infinite" >>$DHCP_HOSTS -fi -X -# make dnsmasq re-read files -pid=$(pidof dnsmasq) -if [ "$pid" != "" ] -then -X # use SIGHUP to avoid service outage if dhcp_release is available. -X if [ $dnsmasq_managed_lease ] -X then -X kill -HUP $pid -X else -X systemctl restart dnsmasq -X fi -else -X if [ $no_redundant -eq 1 ] -X then -X wait_for_dnsmasq -X else -X logger -t cloud "edithosts: skip wait dnsmasq due to redundant virtual router" -X fi -fi -X -ret=$? -unlock_exit $ret $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/edithosts.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/edithosts.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/edithosts.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/edithosts.sh': 'MD5 check failed' - ) << \SHAR_EOF -68e47d6a7efaacefbbaebf8b4e7408c3 cloud_scripts/opt/cloud/bin/edithosts.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/edithosts.sh'` -ne 5502 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/edithosts.sh' is not 5502" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/diagnostics.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/diagnostics.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/diagnostics.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/diagnostics.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/diagnostics.py' && -#!/usr/bin/env python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import shlex -import subprocess -import sys -X -X -def run_cmd(command): -X if command is not None: -X try: -X p = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE) -X stdout, stderr = p.communicate() -X return_code = p.returncode -X -X except OSError as e: -X stdout = "Check your command type" -X stderr = "Exception occurred: %s" % e -X return_code = 1 -X -X finally: -X print('%s&&' % stdout.strip()) -X print('%s&&' % stderr.strip()) -X print('%s' % return_code) -X -X -def get_command(): -X arguments = sys.argv -X cmd = " ".join(arguments[1:]) -X cmd_type = sys.argv[1] -X -X if cmd_type == 'ping': -X if '-c' in arguments: -X return cmd -X else: -X return cmd + " -c 4" -X -X elif cmd_type == 'traceroute': -X if '-m' in arguments: -X return cmd -X else: -X return cmd + " -m 20" -X -X elif cmd_type == 'arping': -X if '-c' in arguments: -X return cmd -X else: -X return cmd + " -c 4" -X -X else: -X return None -X -X -if __name__ == "__main__": -X command = get_command() -X run_cmd(command) -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/diagnostics.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/diagnostics.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/diagnostics.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/diagnostics.py': 'MD5 check failed' - ) << \SHAR_EOF -91a837e5bcafee663cbfb8532574405a cloud_scripts/opt/cloud/bin/diagnostics.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/diagnostics.py'` -ne 2012 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/diagnostics.py' is not 2012" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_monitorservice.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_monitorservice.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_monitorservice.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_monitorservice.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py': 'MD5 check failed' - ) << \SHAR_EOF -1121a063f2dbcfc1bdc426ceba249184 cloud_scripts/opt/cloud/bin/cs_monitorservice.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py'` -ne 1541 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py' is not 1541" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpn_l2tp.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpn_l2tp.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpn_l2tp.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -X -X -#set -x -usage() { -X printf "Usage:\n" -X printf "Create VPN : %s -c -r -l -p -s -i \n" $(basename $0) -X printf "Delete VPN : %s -d -l -s -D -C < local cidr> \n" $(basename $0) -X printf "Add VPN User : %s -u \n" $(basename $0) -X printf "Remote VPN User: %s -U /dev/null -X then -X is_vpc=true -X fi -X -X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 500 -j ACCEPT -X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 4500 -j ACCEPT -X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 1701 -j ACCEPT -X sudo iptables $op INPUT -i $dev -p ah -j ACCEPT -X sudo iptables $op INPUT -i $dev -p esp -j ACCEPT -X if $is_vpc -X then -X # Need to apply the following ACL rules as well. -X if sudo iptables -N VPN_FORWARD &> /dev/null -X then -X sudo iptables -I FORWARD -i ppp+ -j VPN_FORWARD -X sudo iptables -I FORWARD -o ppp+ -j VPN_FORWARD -X sudo iptables -A VPN_FORWARD -j DROP -X fi -X sudo iptables $op VPN_FORWARD -i ppp+ -o ppp+ -j RETURN -X sudo iptables $op VPN_FORWARD -i ppp+ -d $cidr -j RETURN -X sudo iptables $op VPN_FORWARD -s $cidr -o ppp+ -j RETURN -X else -X sudo iptables $op FORWARD -i ppp+ -d $cidr -j ACCEPT -X sudo iptables $op FORWARD -s $cidr -o ppp+ -j ACCEPT -X sudo iptables $op FORWARD -i ppp+ -o ppp+ -j ACCEPT -X fi -X sudo iptables $op INPUT -i ppp+ -m udp -p udp --dport 53 -j ACCEPT -X sudo iptables $op INPUT -i ppp+ -m tcp -p tcp --dport 53 -j ACCEPT -X sudo iptables -t nat $op PREROUTING -i ppp+ -p tcp -m tcp --dport 53 -j DNAT --to-destination $local_ip -X sudo iptables -t nat $op PREROUTING -i ppp+ -p udp -m udp --dport 53 -j DNAT --to-destination $local_ip -X -X if $is_vpc -X then -X return -X fi -X -X if sudo iptables -t mangle -N VPN_$public_ip &> /dev/null -X then -X logger -t cloud "$(basename $0): created VPN chain in PREROUTING mangle" -X sudo iptables -t mangle -I PREROUTING -d $public_ip -j VPN_$public_ip -X sudo iptables -t mangle -A VPN_$public_ip -j RETURN -X fi -X op2="-D" -X [ "$op" == "-A" ] && op2="-I" -X sudo iptables -t mangle $op VPN_$public_ip -p ah -j ACCEPT -X sudo iptables -t mangle $op VPN_$public_ip -p esp -j ACCEPT -} -X -start_ipsec() { -X systemctl is-active ipsec > /dev/null -X if [ $? -ne 0 ] -X then -X systemctl start ipsec > /dev/null -X #Wait until ipsec started, 5 seconds at most -X for i in {1..5} -X do -X logger -t cloud "$(basename $0): waiting ipsec start..." -X systemctl is-active ipsec > /dev/null -X result=$? -X if [ $result -eq 0 ] -X then -X break -X fi -X sleep 1 -X done -X fi -X systemctl is-active ipsec > /dev/null -X return $? -} -X -ipsec_server() { -X local op=$1 -X case $op in -X "start") start_ipsec -X sudo systemctl start xl2tpd -X ;; -X "stop") sudo systemctl stop xl2tpd -X ;; -X "restart") start_ipsec -X sudo ipsec auto --rereadall -X systemctl stop xl2tpd -X systemctl start xl2tpd -X ;; -X esac -} -X -create_l2tp_ipsec_vpn_server() { -X local ipsec_psk=$1 -X local public_ip=$2 -X local client_range=$3 -X local local_ip=$4 -X -X sed -i -e "s/left=.*$/left=$public_ip/" /etc/ipsec.d/l2tp.conf -X echo "$public_ip %any : PSK \"$ipsec_psk\"" > /etc/ipsec.d/ipsec.any.secrets -X sed -i -e "s/^ip range = .*$/ip range = $client_range/" /etc/xl2tpd/xl2tpd.conf -X sed -i -e "s/^local ip = .*$/local ip = $local_ip/" /etc/xl2tpd/xl2tpd.conf -X -X sed -i -e "s/^ms-dns.*$/ms-dns $local_ip/" /etc/ppp/options.xl2tpd -X -X iptables_ "-D" $public_ip -X iptables_ "-I" $public_ip -X -X ipsec_server "restart" -X -X ipsec auto --rereadsecrets -X ipsec auto --replace L2TP-PSK -} -X -destroy_l2tp_ipsec_vpn_server() { -X local public_ip=$1 -X -X ipsec auto --down L2TP-PSK -X -X iptables_ "-D" $public_ip -X -X ipsec_server "stop" -} -X -remove_l2tp_ipsec_user() { -X local u=$1 -X sed -i -e "/^$u .*$/d" /etc/ppp/chap-secrets -X if [ -x /usr/bin/tdbdump ]; then -X pid=$(tdbdump /var/run/pppd2.tdb | grep -w $u | awk -F';' '{print $4}' | awk -F= '{print $2}') -X [ "$pid" != "" ] && kill -9 $pid -X fi -X return 0 -} -X -add_l2tp_ipsec_user() { -X local u=$1 -X local passwd=$2 -X -X uptodate=$(grep "^$u \* \"$passwd\" \*$" /etc/ppp/chap-secrets) -X if [ "$uptodate" == "" ] -X then -X remove_l2tp_ipsec_user $u -X echo "$u * \"$passwd\" *" >> /etc/ppp/chap-secrets -X fi -} -X -rflag= -pflag= -lflag= -sflag= -create= -destroy= -useradd= -userdel= -dev= -cidr= -X -while getopts 'cdl:p:r:s:u:U:i:C:' OPTION -do -X case $OPTION in -X c) create=1 -X ;; -X d) destroy=1 -X ;; -X u) useradd=1 -X user_pwd="$OPTARG" -X ;; -X U) userdel=1 -X user="$OPTARG" -X ;; -X r) rflag=1 -X client_range="$OPTARG" -X ;; -X p) pflag=1 -X ipsec_psk="$OPTARG" -X ;; -X l) lflag=1 -X local_ip="$OPTARG" -X ;; -X s) sflag=1 -X server_ip="$OPTARG" -X ;; -X i) dev="$OPTARG" -X ;; -X C) cidr="$OPTARG" -X ;; -X ?) usage -X exit 2 -X ;; -X esac -done -X -if [ "$dev" == "" ] -then -X dev="eth2" -fi -X -if [ "$cidr" == "" ] -then -X cidr=$(get_intf_ip "eth0") -fi -X -[ "$create$destroy" == "11" ] || [ "$create$destroy$useradd$userdel" == "" ] && usage && exit 2 -[ "$create" == "1" ] && [ "$lflag$pflag$rflag$sflag" != "1111" ] && usage && exit 2 -X -if [ "$create" == "1" ]; then -X create_l2tp_ipsec_vpn_server $ipsec_psk $server_ip $client_range $local_ip -X exit $? -fi -X -if [ "$destroy" == "1" ]; then -X destroy_l2tp_ipsec_vpn_server $server_ip -X exit $? -fi -X -if [ "$useradd" == "1" ]; then -X u=$(echo $user_pwd | awk -F',' '{print $1}') -X pwd=$(echo $user_pwd | awk -F',' '{print $2}') -X add_l2tp_ipsec_user $u $pwd -X exit $? -fi -if [ "$userdel" == "1" ]; then -X remove_l2tp_ipsec_user $user -X exit $? -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpn_l2tp.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh': 'MD5 check failed' - ) << \SHAR_EOF -79e41044b43cc49c6b11859534bc454d cloud_scripts/opt/cloud/bin/vpn_l2tp.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh'` -ne 6986 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' is not 6986" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_guestnetwork.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_guestnetwork.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_guestnetwork.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -keys = ['eth1', 'eth2', 'eth3', 'eth4', 'eth5', 'eth6', 'eth7', 'eth8', 'eth9'] -X -X -def merge(dbag, gn): -X device = gn['device'] -X -X if not gn['add'] and device in dbag: -X -X if dbag[device]: -X device_to_die = dbag[device][0] -X try: -X dbag[device].remove(device_to_die) -X except ValueError, e: -X print "[WARN] cs_guestnetwork.py :: Error occurred removing item from databag. => %s" % device_to_die -X del(dbag[device]) -X else: -X del(dbag[device]) -X -X else: -X dbag.setdefault(device, []).append(gn) -X -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_guestnetwork.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py': 'MD5 check failed' - ) << \SHAR_EOF -599105da1bdfaced1f2c8078d3fbed19 cloud_scripts/opt/cloud/bin/cs_guestnetwork.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py'` -ne 1401 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' is not 1401" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_vmdata.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vmdata.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vmdata.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, metadata): -X dbag[metadata["vm_ip_address"]] = metadata["vm_metadata"] -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_vmdata.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vmdata.py': 'MD5 check failed' - ) << \SHAR_EOF -3ee2451cb48927d361f05bb5fe3df4ce cloud_scripts/opt/cloud/bin/cs_vmdata.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vmdata.py'` -ne 892 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' is not 892" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/dnsmasq.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/dnsmasq.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/dnsmasq.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -usage() { -X printf "Usage: %s: \n" $(basename $0) >&2 -} -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -#set -x -#backup the old config file -DHCP_CONFIG=/etc/dnsmasq.d/multiple_ranges.conf -DHCP_CONFIG_BAK=/etc/dnsmasq.d/multiple_ranges.conf.bak -DHCP_CONFIG_MAIN=/etc/dnsmasq.conf -DHCP_CONFIG_MAIN_BAK=/etc/dnsmasq.conf.bak -DHCP_FAILURE_CONFIG=/etc/multiple_ranges.conf.failure -DHCP_FAILURE_CONFIG_MAIN=/etc/dnsmasq.conf.failure -CMDLINE=$(cat /var/cache/cloud/cmdline | tr '\n' ' ') -X -#take a backup copy of the dnsmasq file. -cp "$DHCP_CONFIG_MAIN" "$DHCP_CONFIG_MAIN_BAK" -cp "$DHCP_CONFIG" "$DHCP_CONFIG_BAK" -X -#empty the config file -echo > $DHCP_CONFIG -X -var="$1" -dhcp_range="" -dhcp_gateway="" -dhcp_netmask="" -dns_option="" -dns_servers="" -count=0 -X -X -# fetching the dns Ips from the command line. -dns1=$(echo "$CMDLINE" | grep -o " dns1=[[:digit:]].* " | sed -e 's/dns1=//' | awk '{print $1}') -dns2=$(echo "$CMDLINE" | grep -o " dns2=[[:digit:]].* " | sed -e 's/dns2=//' | awk '{print $1}') -X -dns_servers="${dns1}" -if [ -n "$dns2" ] -then -dns_servers="${dns1},${dns2}" -fi -X -X -# check if useextdns is true -use_ext_dns=$(echo "$CMDLINE" | grep -o "useextdns=true") -while [ -n "$var" ] -do -X var1=$(echo $var | cut -f1 -d "-") -X routerip=$( echo $var1 | cut -f1 -d ":" ) -X gateway=$(echo $var1 | cut -f2 -d ":") -X netmask=$(echo $var1 | cut -f3 -d ":") -X start_ip_of_subnet=$(echo $var1 | cut -f4 -d ":") -X dhcp_range="${dhcp_range}"'dhcp-range=set:range'$count","$start_ip_of_subnet",static \n" -X dhcp_gateway="${dhcp_gateway}"'dhcp-option=tag:range'$count",3,"$gateway" \n" -X dhcp_netmask="${dhcp_netmask}"'dhcp-option=tag:range'$count",1,"$netmask" \n" -X if [ -n "$use_ext_dns" ] -X then -X dns_option="${dns_option}"'dhcp-option=tag:range'$count",6,"$dns_servers" \n" -X else -X dns_option="${dns_option}"'dhcp-option=tag:range'$count",6,$routerip"","$dns_servers" \n" -X fi -X var=$( echo $var | sed "s/${var1}-//" ) -X count=$[$count+1] -done -X -#logging the configuration being removed. -log="" -log="${log}"`grep "^dhcp-option=6" "$DHCP_CONFIG_MAIN"`"\n" -log="${log}"`grep "^dhcp-option=option:router" "$DHCP_CONFIG_MAIN"`"\n" -log="${log}"`grep "^dhcp-range=" "$DHCP_CONFIG_MAIN"`"\n" -X -if [ "$log" != '\n\n\n' ] -then -X #Cleaning the existing dhcp confgiuration -X logger -t cloud "dnsmasq.sh: remvoing the primaryip confg from dnsmasq.conf and adding it to /etc/dnsmaq.d/multiple_ranges.conf" -X logger -t cloud "dnsmasq.sh: config removed from dnsmasq.conf is $log" -X sed -i -e '/dhcp-option=6/d' "$DHCP_CONFIG_MAIN" -X sed -i -e '/dhcp-option=option:router/d' "$DHCP_CONFIG_MAIN" -X sed -i -e '/^dhcp-range=/d' "$DHCP_CONFIG_MAIN" -fi -X -#wrting the new config into the config file. -echo -e "$dhcp_range" >> "$DHCP_CONFIG" -echo -e "$dhcp_gateway" >> "$DHCP_CONFIG" -echo -e "$dhcp_netmask" >> "$DHCP_CONFIG" -echo -e "$dns_option" >> "$DHCP_CONFIG" -X -X -#restart the dnsmasq -systemctl restart dnsmasq -result=$? -if [ "$result" -ne "0" ] -then -X logger -t cloud "dnsmasq.sh: could not configure dnsmasq" -X logger -t cloud "dnsmasq.sh: reverting to the old config" -X logger -t cloud "dnsmasq.sh: copying the failure config to `$DHCP_FAILURE_CONFIG` and `$DHCP_FAILURE_CONFIG_MAIN`" -X cp "$DHCP_CONFIG" "$DHCP_FAILURE_CONFIG" -X cp "$DHCP_CONFIG_MAIN" "$DHCP_FAILURE_CONFIG_MAIN" -X cp "$DHCP_CONFIG_BAK" "$DHCP_CONFIG" -X cp "$DHCP_CONFIG_MAIN_BAK" "$DHCP_CONFIG_MAIN" -X systemctl restart dnsmasq -X unlock_exit $result $lock $locked -fi -rm "$DHCP_CONFIG_BAK" -rm "$DHCP_CONFIG_MAIN_BAK" -unlock_exit $result $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/dnsmasq.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/dnsmasq.sh': 'MD5 check failed' - ) << \SHAR_EOF -d603da3043a61bea911e21fb4da8ded0 cloud_scripts/opt/cloud/bin/dnsmasq.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/dnsmasq.sh'` -ne 4359 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' is not 4359" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_dhcp.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_dhcp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_dhcp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_dhcp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_dhcp.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2P@96YT2!N;W0@ -M:6X@7,Z"B`@("`@("`@("`@(')E;6]V95]K97ES+F%D9"AK -M97DI"@H@("`@("`@(&9O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_dhcp.py': 'MD5 check failed' - ) << \SHAR_EOF -9b17e95a8fcb1cf185c9e74cc6ddecca cloud_scripts/opt/cloud/bin/cs_dhcp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_dhcp.py'` -ne 1533 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_dhcp.py' is not 1533" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_cmdline.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_cmdline.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_cmdline.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, cmdline): -X if 'redundant_router' in cmdline['cmd_line']: -X cmdline['cmd_line']['redundant_router'] = "true" -X else: -X cmdline['cmd_line']['redundant_router'] = "false" -X dbag['config'] = cmdline['cmd_line'] -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_cmdline.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_cmdline.py': 'MD5 check failed' - ) << \SHAR_EOF -a6290582c86832c4c94985580ceda8e5 cloud_scripts/opt/cloud/bin/cs_cmdline.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_cmdline.py'` -ne 1045 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' is not 1045" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/ips0003.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0003.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0003.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0003.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0003.json' && -{"ip_address": -[{"public_ip":"10.0.3.10", -"source_nat":true, -"add":true, -"one_to_one_nat":false, -"first_i_p":false, -"gateway":"10.0.3.1", -"netmask":"255.255.255.0", -"vif_mac_address":"06:cb:aa:00:00:03", -"nic_dev_id":2, -"new_nic":false}], -"type":"ips"} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0003.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0003.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0003.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0003.json': 'MD5 check failed' - ) << \SHAR_EOF -e8113ca4dc70734a2e07e4cd5aa817e7 cloud_scripts/opt/cloud/testdata/ips0003.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0003.json'` -ne 253 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0003.json' is not 253" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/vmp0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/vmp0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/vmp0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/vmp0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/testdata/vmp0001.json -M>R)I<%]A9&1R97-S(CHB,3/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/vmp0001.json': 'MD5 check failed' - ) << \SHAR_EOF -a3150c6241b311cbfc2180be23d1ddee cloud_scripts/opt/cloud/testdata/vmp0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/vmp0001.json'` -ne 77 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/vmp0001.json' is not 77" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/gn0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/gn0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/gn0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/gn0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/gn0001.json' && -{"add":true, -"mac_address":"02:00:56:36:00:02", -"device":"eth3", -"router_guest_ip":"172.16.1.1", -"router_guest_gateway":"172.16.1.0", -"router_guest_netmask":"255.255.255.0", -"cidr":"24", -"dns":"8.8.8.8,8.8.8.4", -"domain_name":"devcloud.local", -"type":"guestnetwork"} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/gn0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/gn0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/gn0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/gn0001.json': 'MD5 check failed' - ) << \SHAR_EOF -e790842388eb0a3f86ea0dbbcf4608eb cloud_scripts/opt/cloud/testdata/gn0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/gn0001.json'` -ne 267 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/gn0001.json' is not 267" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/dhcp0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/dhcp0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/dhcp0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' && -{ -X "host_name":"VM-58976c22-0832-451e-9ab2-039e9f27e415", -X "mac_address":"02:00:26:c3:00:02", -X "ipv4_address":"172.16.1.102", -X "ipv6_duid":"00:03:00:01:02:00:26:c3:00:02", -X "default_gateway":"172.16.1.1", -X "default_entry":true, -X "type":"dhcpentry" -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/dhcp0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/dhcp0001.json': 'MD5 check failed' - ) << \SHAR_EOF -0f44da4132b56f2ece9b36bab3213f28 cloud_scripts/opt/cloud/testdata/dhcp0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/dhcp0001.json'` -ne 250 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' is not 250" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/acl0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/acl0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/acl0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/acl0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/acl0001.json' && -{ -X "eth2": { -X "device": "eth2", -X "egress_rules": [ -X { -X "allowed": false, -X "cidr": "10.0.6.0/8", -X "first_port": 60, -X "last_port": 60, -X "type": "tcp" -X } -X ], -X "ingress_rules": [ -X { -X "allowed": true, -X "cidr": "10.0.1.0/8", -X "protocol": 41, -X "type": "protocol" -X }, -X { -X "allowed": true, -X "cidr": "10.0.4.0/8", -X "type": "all" -X }, -X { -X "allowed": true, -X "cidr": "10.0.3.0/8", -X "icmp_code": -1, -X "icmp_type": -1, -X "type": "icmp" -X }, -X { -X "allowed": true, -X "cidr": "10.0.2.0/8", -X "first_port": 40, -X "last_port": 40, -X "type": "udp" -X }, -X { -X "allowed": true, -X "cidr": "10.0.1.0/8", -X "first_port": 30, -X "last_port": 30, -X "type": "tcp" -X } -X ], -X "mac_address": "02:00:0d:7b:00:04", -X "nic_ip": "172.16.1.1", -X "nic_netmask": "24", -X "private_gateway_acl": false, -X "type": "networkacl" -X }, -X "id": "networkacl" -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/acl0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/acl0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/acl0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/acl0001.json': 'MD5 check failed' - ) << \SHAR_EOF -1ea2a1b5d6a98bc6c0fc2375de284b17 cloud_scripts/opt/cloud/testdata/acl0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/acl0001.json'` -ne 1405 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/acl0001.json' is not 1405" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/README ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/README' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/README (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/README (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/README' && -Json file used to test the provisioning scripts on virtual appliances -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/README' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/README' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/README failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/README': 'MD5 check failed' - ) << \SHAR_EOF -13e5ecf4d998c3df3cf53485d6f46ee1 cloud_scripts/opt/cloud/testdata/README -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/README'` -ne 70 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/README' is not 70" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/ips0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0001.json' && -{"ip_address": -[{"public_ip":"10.0.2.102", -"source_nat":true, -"add":true, -"one_to_one_nat":false, -"first_i_p":false, -"gateway":"10.0.2.1", -"netmask":"255.255.255.0", -"vif_mac_address":"06:cb:aa:00:00:03", -"nic_dev_id":1, -"new_nic":false}], -"type":"ips"} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0001.json': 'MD5 check failed' - ) << \SHAR_EOF -6f7337aaa605096eef31300afba0f4af cloud_scripts/opt/cloud/testdata/ips0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0001.json'` -ne 254 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0001.json' is not 254" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/test.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/test.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/test.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/test.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/test.sh' && -#!/bin/sh -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -cp /opt/cloud/testdata/* /etc/cloudstack -/opt/cloud/bin/update_config.py cmd_line.json -/opt/cloud/bin/update_config.py gn0001.json -/opt/cloud/bin/update_config.py ips0001.json -/opt/cloud/bin/update_config.py ips0002.json -/opt/cloud/bin/update_config.py ips0003.json -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/test.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/testdata/test.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/test.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/test.sh': 'MD5 check failed' - ) << \SHAR_EOF -7fbb72051fd8d3b66fd481aa51d3debe cloud_scripts/opt/cloud/testdata/test.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/test.sh'` -ne 1062 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/test.sh' is not 1062" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/ips0002.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0002.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0002.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0002.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0002.json' && -{"ip_address": -[{"public_ip":"10.0.2.103", -"source_nat":true, -"add":true, -"one_to_one_nat":false, -"first_i_p":false, -"gateway":"10.0.2.1", -"netmask":"255.255.255.0", -"vif_mac_address":"06:cb:aa:00:00:03", -"nic_dev_id":1, -"new_nic":false}], -"type":"ips"} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0002.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0002.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0002.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0002.json': 'MD5 check failed' - ) << \SHAR_EOF -12aec2bca1d88c499ee0af39c2e20ea1 cloud_scripts/opt/cloud/testdata/ips0002.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0002.json'` -ne 254 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0002.json' is not 254" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/s2s0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/s2s0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/s2s0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/s2s0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/s2s0001.json' && -{ -X "local_public_ip":"172.16.1.1", -X "local_guest_cidr":"172.16.1.0/24", -X "local_public_gateway":"172.16.1.1", -X "peer_gateway_ip":"10.200.200.1", -X "peer_guest_cidr_list":"10.0.0.0/24", -X "esp_policy":"3des-md5", -X "ike_policy":"3des-md5", -X "ipsec_psk":"vpnblabla", -X "ike_lifetime":86400, -X "esp_lifetime":3600, -X "create":true, -X "dpd":false, -X "passive":false, -X "type":"site2sitevpn" -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/s2s0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/s2s0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/s2s0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/s2s0001.json': 'MD5 check failed' - ) << \SHAR_EOF -ff589cb7ab7721a270f4cc703719c917 cloud_scripts/opt/cloud/testdata/s2s0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/s2s0001.json'` -ne 380 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/s2s0001.json' is not 380" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -ip link|grep BROADCAST|grep -v eth0|grep -v eth1|cut -d ":" -f 2 > /tmp/iflist -while read i -do -X ip addr show $i|grep "inet " > /tmp/iplist_$i -X while read line -X do -X ip=`echo $line|cut -d " " -f 2|cut -d "/" -f 1` -X arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 -X arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 -X done < /tmp/iplist_$i -done < /tmp/iflist -sleep 1 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ': 'MD5 check failed' - ) << \SHAR_EOF -023d994f54c0955f160f127c1d85d6ae cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ'` -ne 1177 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' is not 1177" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/checkrouter.sh.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/checkrouter.sh.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/checkrouter.sh.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -STATUS=UNKNOWN -INTERFACE=eth1 -ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g') -if [ $ROUTER_TYPE = "router" ] -then -X ROUTER_STATE=$(ip addr | grep eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi') -X STATUS=$ROUTER_STATE -else -X ROUTER_STATE=$(ip addr | grep $INTERFACE | grep state | awk '{print $9;}') -X if [ $ROUTER_STATE = "UP" ] -X then -X STATUS=MASTER -X elif [ $ROUTER_STATE = "DOWN" ] -X then -X STATUS=BACKUP -X fi -fi -X -echo "Status: ${STATUS}" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/checkrouter.sh.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ': 'MD5 check failed' - ) << \SHAR_EOF -bbd331057760019d05ead01eec5e42aa cloud_scripts/opt/cloud/templates/checkrouter.sh.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ'` -ne 1357 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' is not 1357" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/heartbeat.sh.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/heartbeat.sh.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/heartbeat.sh.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -t=$(date +%s) -echo $t > /ramdisk/rrouter/keepalived.ts -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/heartbeat.sh.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ': 'MD5 check failed' - ) << \SHAR_EOF -c006a52c775a0418870c0c50f0131ee7 cloud_scripts/opt/cloud/templates/heartbeat.sh.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ'` -ne 853 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' is not 853" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/conntrackd.conf.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/conntrackd.conf.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/conntrackd.conf.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# Synchronizer settings -# -Sync { -X Mode FTFW { -X # -X # Size of the resend queue (in objects). This is the maximum -X # number of objects that can be stored waiting to be confirmed -X # via acknoledgment. If you keep this value low, the daemon -X # will have less chances to recover state-changes under message -X # omission. On the other hand, if you keep this value high, -X # the daemon will consume more memory to store dead objects. -X # Default is 131072 objects. -X # -X # ResendQueueSize 131072 -X -X # -X # This parameter allows you to set an initial fixed timeout -X # for the committed entries when this node goes from backup -X # to primary. This mechanism provides a way to purge entries -X # that were not recovered appropriately after the specified -X # fixed timeout. If you set a low value, TCP entries in -X # Established states with no traffic may hang. For example, -X # an SSH connection without KeepAlive enabled. If not set, -X # the daemon uses an approximate timeout value calculation -X # mechanism. By default, this option is not set. -X # -X # CommitTimeout 180 -X -X # -X # If the firewall replica goes from primary to backup, -X # the conntrackd -t command is invoked in the script. -X # This command schedules a flush of the table in N seconds. -X # This is useful to purge the connection tracking table of -X # zombie entries and avoid clashes with old entries if you -X # trigger several consecutive hand-overs. Default is 60 seconds. -X # -X # PurgeTimeout 60 -X -X # Set the acknowledgement window size. If you decrease this -X # value, the number of acknowlegdments increases. More -X # acknowledgments means more overhead as conntrackd has to -X # handle more control messages. On the other hand, if you -X # increase this value, the resend queue gets more populated. -X # This results in more overhead in the queue releasing. -X # The following value is based on some practical experiments -X # measuring the cycles spent by the acknowledgment handling -X # with oprofile. If not set, default window size is 300. -X # -X # ACKWindowSize 300 -X -X # -X # This clause allows you to disable the external cache. Thus, -X # the state entries are directly injected into the kernel -X # conntrack table. As a result, you save memory in user-space -X # but you consume slots in the kernel conntrack table for -X # backup state entries. Moreover, disabling the external cache -X # means more CPU consumption. You need a Linux kernel -X # >= 2.6.29 to use this feature. By default, this clause is -X # set off. If you are installing conntrackd for first time, -X # please read the user manual and I encourage you to consider -X # using the fail-over scripts instead of enabling this option! -X # -X # DisableExternalCache Off -X } -X -X # -X # Multicast IP and interface where messages are -X # broadcasted (dedicated link). IMPORTANT: Make sure -X # that iptables accepts traffic for destination -X # 225.0.0.50, eg: -X # -X # iptables -I INPUT -d 225.0.0.50 -j ACCEPT -X # iptables -I OUTPUT -d 225.0.0.50 -j ACCEPT -X # -X Multicast { -X # -X # Multicast address: The address that you use as destination -X # in the synchronization messages. You do not have to add -X # this IP to any of your existing interfaces. If any doubt, -X # do not modify this value. -X # -X IPv4_address 225.0.0.50 -X -X # -X # The multicast group that identifies the cluster. If any -X # doubt, do not modify this value. -X # -X Group 3780 -X -X # -X # IP address of the interface that you are going to use to -X # send the synchronization messages. Remember that you must -X # use a dedicated link for the synchronization messages. -X # -X IPv4_interface [LINK_IP] -X -X # -X # The name of the interface that you are going to use to -X # send the synchronization messages. -X # -X Interface [LINK_IF] -X -X # The multicast sender uses a buffer to enqueue the packets -X # that are going to be transmitted. The default size of this -X # socket buffer is available at /proc/sys/net/core/wmem_default. -X # This value determines the chances to have an overrun in the -X # sender queue. The overrun results packet loss, thus, losing -X # state information that would have to be retransmitted. If you -X # notice some packet loss, you may want to increase the size -X # of the sender buffer. The default size is usually around -X # ~100 KBytes which is fairly small for busy firewalls. -X # -X SndSocketBuffer 1249280 -X -X # The multicast receiver uses a buffer to enqueue the packets -X # that the socket is pending to handle. The default size of this -X # socket buffer is available at /proc/sys/net/core/rmem_default. -X # This value determines the chances to have an overrun in the -X # receiver queue. The overrun results packet loss, thus, losing -X # state information that would have to be retransmitted. If you -X # notice some packet loss, you may want to increase the size of -X # the receiver buffer. The default size is usually around -X # ~100 KBytes which is fairly small for busy firewalls. -X # -X RcvSocketBuffer 1249280 -X -X # -X # Enable/Disable message checksumming. This is a good -X # property to achieve fault-tolerance. In case of doubt, do -X # not modify this value. -X # -X Checksum on -X } -X # -X # You can specify more than one dedicated link. Thus, if one dedicated -X # link fails, conntrackd can fail-over to another. Note that adding -X # more than one dedicated link does not mean that state-updates will -X # be sent to all of them. There is only one active dedicated link at -X # a given moment. The `Default' keyword indicates that this interface -X # will be selected as the initial dedicated link. You can have -X # up to 4 redundant dedicated links. Note: Use different multicast -X # groups for every redundant link. -X # -X # Multicast Default { -X # IPv4_address 225.0.0.51 -X # Group 3781 -X # IPv4_interface 192.168.100.101 -X # Interface eth3 -X # # SndSocketBuffer 1249280 -X # # RcvSocketBuffer 1249280 -X # Checksum on -X # } -X -X # -X # You can use Unicast UDP instead of Multicast to propagate events. -X # Note that you cannot use unicast UDP and Multicast at the same -X # time, you can only select one. -X # -X # UDP { -X # -X # UDP address that this firewall uses to listen to events. -X # -X # IPv4_address 192.168.2.100 -X # -X # or you may want to use an IPv6 address: -X # -X # IPv6_address fe80::215:58ff:fe28:5a27 -X -X # -X # Destination UDP address that receives events, ie. the other -X # firewall's dedicated link address. -X # -X # IPv4_Destination_Address 192.168.2.101 -X # -X # or you may want to use an IPv6 address: -X # -X # IPv6_Destination_Address fe80::2d0:59ff:fe2a:775c -X -X # -X # UDP port used -X # -X # Port 3780 -X -X # -X # The name of the interface that you are going to use to -X # send the synchronization messages. -X # -X # Interface eth2 -X -X # -X # The sender socket buffer size -X # -X # SndSocketBuffer 1249280 -X -X # -X # The receiver socket buffer size -X # -X # RcvSocketBuffer 1249280 -X -X # -X # Enable/Disable message checksumming. -X # -X # Checksum on -X # } -X -} -X -# -# General settings -# -General { -X # -X # Set the nice value of the daemon, this value goes from -20 -X # (most favorable scheduling) to 19 (least favorable). Using a -X # very low value reduces the chances to lose state-change events. -X # Default is 0 but this example file sets it to most favourable -X # scheduling as this is generally a good idea. See man nice(1) for -X # more information. -X # -X Nice -20 -X -X # -X # Select a different scheduler for the daemon, you can select between -X # RR and FIFO and the process priority (minimum is 0, maximum is 99). -X # See man sched_setscheduler(2) for more information. Using a RT -X # scheduler reduces the chances to overrun the Netlink buffer. -X # -X # Scheduler { -X # Type FIFO -X # Priority 99 -X # } -X -X # -X # Number of buckets in the cache hashtable. The bigger it is, -X # the closer it gets to O(1) at the cost of consuming more memory. -X # Read some documents about tuning hashtables for further reference. -X # -X HashSize 32768 -X -X # -X # Maximum number of conntracks, it should be double of: -X # $ cat /proc/sys/net/netfilter/nf_conntrack_max -X # since the daemon may keep some dead entries cached for possible -X # retransmission during state synchronization. -X # -X HashLimit 131072 -X -X LogFile on -X -X # -X # Syslog: on, off or a facility name (daemon (default) or local0..7) -X # Default: off -X # -X Syslog on -X -X # -X # Lockfile -X # -X LockFile /var/lock/conntrackd.lock -X -X # -X # Unix socket configuration -X # -X UNIX { -X Path /var/run/conntrackd.sock -X Backlog 20 -X } -X -X SocketBufferSize 2097152 -X SocketBufferSizeMaxGrown 8388608 -X -X # -X # Netlink event socket buffer size. If you do not specify this clause, -X # the default buffer size value in /proc/net/core/rmem_default is -X # used. This default value is usually around 100 Kbytes which is -X # fairly small for busy firewalls. This leads to event message dropping -X # and high CPU consumption. This example configuration file sets the -X # size to 2 MBytes to avoid this sort of problems. -X # -X NetlinkBufferSize 2097152 -X -X # -X # The daemon doubles the size of the netlink event socket buffer size -X # if it detects netlink event message dropping. This clause sets the -X # maximum buffer size growth that can be reached. This example file -X # sets the size to 8 MBytes. -X # -X NetlinkBufferSizeMaxGrowth 8388608 -X -X # -X # If the daemon detects that Netlink is dropping state-change events, -X # it automatically schedules a resynchronization against the Kernel -X # after 30 seconds (default value). Resynchronizations are expensive -X # in terms of CPU consumption since the daemon has to get the full -X # kernel state-table and purge state-entries that do not exist anymore. -X # Be careful of setting a very small value here. You have the following -X # choices: On (enabled, use default 30 seconds value), Off (disabled) -X # or Value (in seconds, to set a specific amount of time). If not -X # specified, the daemon assumes that this option is enabled. -X # -X # NetlinkOverrunResync On -X -X # -X # If you want reliable event reporting over Netlink, set on this -X # option. If you set on this clause, it is a good idea to set off -X # NetlinkOverrunResync. This option is off by default and you need -X # a Linux kernel >= 2.6.31. -X # -X # NetlinkEventsReliable Off -X -X # -X # By default, the daemon receives state updates following an -X # event-driven model. You can modify this behaviour by switching to -X # polling mode with the PollSecs clause. This clause tells conntrackd -X # to dump the states in the kernel every N seconds. With regards to -X # synchronization mode, the polling mode can only guarantee that -X # long-lifetime states are recovered. The main advantage of this method -X # is the reduction in the state replication at the cost of reducing the -X # chances of recovering connections. -X # -X # PollSecs 15 -X -X # -X # The daemon prioritizes the handling of state-change events coming -X # from the core. With this clause, you can set the maximum number of -X # state-change events (those coming from kernel-space) that the daemon -X # will handle after which it will handle other events coming from the -X # network or userspace. A low value improves interactivity (in terms of -X # real-time behaviour) at the cost of extra CPU consumption. -X # Default (if not set) is 100. -X # -X # EventIterationLimit 100 -X -X # -X # Event filtering: This clause allows you to filter certain traffic, -X # There are currently three filter-sets: Protocol, Address and -X # State. The filter is attached to an action that can be: Accept or -X # Ignore. Thus, you can define the event filtering policy of the -X # filter-sets in positive or negative logic depending on your needs. -X # You can select if conntrackd filters the event messages from -X # user-space or kernel-space. The kernel-space event filtering -X # saves some CPU cycles by avoiding the copy of the event message -X # from kernel-space to user-space. The kernel-space event filtering -X # is prefered, however, you require a Linux kernel >= 2.6.29 to -X # filter from kernel-space. If you want to select kernel-space -X # event filtering, use the keyword 'Kernelspace' instead of -X # 'Userspace'. -X # -X Filter From Userspace { -X # -X # Accept only certain protocols: You may want to replicate -X # the state of flows depending on their layer 4 protocol. -X # -X Protocol Accept { -X TCP -X SCTP -X DCCP -X UDP -X ICMP # This requires a Linux kernel >= 2.6.31 -X } -X -X # -X # Ignore traffic for a certain set of IP's: Usually all the -X # IP assigned to the firewall since local traffic must be -X # ignored, only forwarded connections are worth to replicate. -X # Note that these values depends on the local IPs that are -X # assigned to the firewall. -X # -X Address Ignore { -X IPv4_address 127.0.0.1 # loopback -X IPv4_address [IGNORE_IP1] -X IPv4_address [IGNORE_IP2] -X IPv4_address [IGNORE_IP3] -X #IPv4_address 192.168.0.100 # virtual IP 1 -X #IPv4_address 192.168.1.100 # virtual IP 2 -X #IPv4_address 192.168.0.1 -X #IPv4_address 192.168.1.1 -X #IPv4_address 192.168.100.100 # dedicated link ip -X # -X # You can also specify networks in format IP/cidr. -X # IPv4_address 192.168.0.0/24 -X # -X # You can also specify an IPv6 address -X # IPv6_address ::1 -X } -X -X # -X # Uncomment this line below if you want to filter by flow state. -X # This option introduces a trade-off in the replication: it -X # reduces CPU consumption at the cost of having lazy backup -X # firewall replicas. The existing TCP states are: SYN_SENT, -X # SYN_RECV, ESTABLISHED, FIN_WAIT, CLOSE_WAIT, LAST_ACK, -X # TIME_WAIT, CLOSED, LISTEN. -X # -X # State Accept { -X # ESTABLISHED CLOSED TIME_WAIT CLOSE_WAIT for TCP -X # } -X } -X -X # default debian service unit file is of Type=notify -X Systemd on -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/conntrackd.conf.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ': 'MD5 check failed' - ) << \SHAR_EOF -13781a8581b74b0cf402c01264bdca48 cloud_scripts/opt/cloud/templates/conntrackd.conf.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ'` -ne 15888 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' is not 15888" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -ROUTER_BIN_PATH="/ramdisk/rrouter" -ROUTER_LOG="${ROUTER_BIN_PATH}/keepalived.log" -STRIKE_FILE="$ROUTER_BIN_PATH/keepalived.strikes" -TS_FILE="$ROUTER_BIN_PATH/keepalived.ts" -CT_FILE="$ROUTER_BIN_PATH/keepalived.ct" -X -checktime=$(date +%s) -hbtime=$(cat $TS_FILE) -diff=$(($checktime - $hbtime)) -X -lastcheck=0 -if [ -e $CT_FILE ] -then -X lastcheck=$(cat $CT_FILE 2>/dev/null) -fi -checkdiff=$(($checktime - $lastcheck)) -if [ $checkdiff -ge 0 ] && [ $checkdiff -lt 30 ] -then -X exit -fi -echo $checktime > $CT_FILE -X -s=0 -if [ $diff -gt 10 ] -then -X if [ -e $STRIKE_FILE ] -X then -X s=$(cat $STRIKE_FILE 2>/dev/null) -X fi -X s=$(($s+1)) -X echo $s > $STRIKE_FILE -X echo "Check time: $checktime, last heartbeat time: $hbtime, time diff: $diff, strike count: $s" >> $ROUTER_LOG -else -X rm -f $STRIKE_FILE -fi -X -if [ $s -gt 3 ] -then -X systemctl stop --now keepalived >> $ROUTER_LOG 2>&1 -X systemctl stop --now conntrackd >> $ROUTER_LOG 2>&1 -X -X #Set fault so we have the same effect as a KeepaliveD fault. -X python /opt/cloud/bin/master.py --fault -X -X pkill -9 keepalived >> $ROUTER_LOG 2>&1 || true -X pkill -9 conntrackd >> $ROUTER_LOG 2>&1 || true -X echo Status: FAULT \(keepalived process is dead\) >> $ROUTER_LOG -X exit -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ': 'MD5 check failed' - ) << \SHAR_EOF -7040d7485f89a97be367132d28af1267 cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ'` -ne 2037 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' is not 2037" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/check_bumpup.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/check_bumpup.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/check_bumpup.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -cat /tmp/rrouter_bumped -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/check_bumpup.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/check_bumpup.sh': 'MD5 check failed' - ) << \SHAR_EOF -ab6cbce5de505d137d05bcae1af8e18a cloud_scripts/opt/cloud/templates/check_bumpup.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/check_bumpup.sh'` -ne 822 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' is not 822" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/keepalived.conf.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/keepalived.conf.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/keepalived.conf.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' && -! Licensed to the Apache Software Foundation (ASF) under one -! or more contributor license agreements. See the NOTICE file -! distributed with this work for additional information -! regarding copyright ownership. The ASF licenses this file -! to you under the Apache License, Version 2.0 (the -! "License"); you may not use this file except in compliance -! with the License. You may obtain a copy of the License at -! -! http://www.apache.org/licenses/LICENSE-2.0 -! -! Unless required by applicable law or agreed to in writing, -! software distributed under the License is distributed on an -! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -! KIND, either express or implied. See the License for the -! specific language governing permissions and limitations -! under the License. -X -global_defs { -X router_id [ROUTER_ID] -} -X -vrrp_script heartbeat { -X script "[RROUTER_BIN_PATH]/heartbeat.sh" -X interval 5 -} -X -vrrp_instance inside_network { -X state BACKUP -X interface eth2 -X virtual_router_id 51 -X nopreempt -X -X advert_int 1 -X -X #use_vmac -X #vmac_xmit_base -X -X authentication { -X auth_type AH -X auth_pass PASS -X } -X -X virtual_ipaddress { -X [ROUTER_IP] brd [BOARDCAST] dev eth2 -X } -X -X track_script { -X heartbeat -X } -X -X notify_backup "/opt/cloud/bin/master.py --backup" -X notify_master "/opt/cloud/bin/master.py --master" -X notify_fault "/opt/cloud/bin/master.py --fault" -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/keepalived.conf.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ': 'MD5 check failed' - ) << \SHAR_EOF -464642e87bbb032071111b84f82ba135 cloud_scripts/opt/cloud/templates/keepalived.conf.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ'` -ne 1429 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' is not 1429" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/prepare_pxe.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/prepare_pxe.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/prepare_pxe.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' && -#!/bin/sh -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# # regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -X -set +u -X -err_exit() { -X echo $1 -X exit 1 -} -X -success() { -X exit 0 -} -X -TFTP_ROOT='/opt/tftpboot' -PXELINUX_CFG_DIR='/opt/tftpboot/pxelinux.cfg' -X -kernel_nfs_path=$1 -kernel_file_name=`basename $kernel_nfs_path` -initrd_nfs_path=$2 -initrd_file_name=`basename $initrd_nfs_path` -tmpt_uuid=$3 -pxe_cfg_filename=$4 -ks_file=$5 -X -kernel_path=$tmpt_uuid/$kernel_file_name -initrd_path=$tmpt_uuid/$initrd_file_name -X -cat > $PXELINUX_CFG_DIR/$pxe_cfg_filename </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh': 'MD5 check failed' - ) << \SHAR_EOF -8b495c4ea50905f4197974ee82e607ba cloud_scripts/opt/cloud/bin/prepare_pxe.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh'` -ne 1792 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' is not 1792" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_forwardingrules.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_forwardingrules.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_forwardingrules.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, rules): -X for rule in rules["rules"]: -X source_ip = rule["source_ip_address"] -X destination_ip = rule["destination_ip_address"] -X revoke = rule["revoke"] -X -X newrule = dict() -X newrule["public_ip"] = source_ip -X newrule["internal_ip"] = destination_ip -X -X if rules["type"] == "staticnatrules": -X newrule["type"] = "staticnat" -X elif rules["type"] == "forwardrules": -X newrule["type"] = "forward" -X newrule["public_ports"] = rule["source_port_range"] -X newrule["internal_ports"] = rule["destination_port_range"] -X newrule["protocol"] = rule["protocol"] -X -X if not revoke: -X if rules["type"] == "staticnatrules": -X dbag[source_ip] = [newrule] -X elif rules["type"] == "forwardrules": -X index = -1 -X if source_ip in dbag.keys(): -X for forward in dbag[source_ip]: -X if ruleCompare(forward, newrule): -X index = dbag[source_ip].index(forward) -X if not index == -1: -X dbag[source_ip][index] = newrule -X else: -X dbag[source_ip].append(newrule) -X else: -X dbag[source_ip] = [newrule] -X else: -X if rules["type"] == "staticnatrules": -X if source_ip in dbag.keys(): -X del dbag[source_ip] -X elif rules["type"] == "forwardrules": -X if source_ip in dbag.keys(): -X index = -1 -X for forward in dbag[source_ip]: -X if ruleCompare(forward, newrule): -X index = dbag[source_ip].index(forward) -X print "removing index %s" % str(index) -X if not index == -1: -X del dbag[source_ip][index] -X -X return dbag -X -X -# Compare function checks only the public side, those must be equal the internal details could change -def ruleCompare(ruleA, ruleB): -X if not ruleA["type"] == ruleB["type"]: -X return False -X if ruleA["type"] == "staticnat": -X return ruleA["public_ip"] == ruleB["public_ip"] -X elif ruleA["type"] == "forward": -X return ruleA["public_ip"] == ruleB["public_ip"] and ruleA["public_ports"] == ruleB["public_ports"] \ -X and ruleA["protocol"] == ruleB["protocol"] -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_forwardingrules.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py': 'MD5 check failed' - ) << \SHAR_EOF -278288da98263d674e9d0d0aecaca56d cloud_scripts/opt/cloud/bin/cs_forwardingrules.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py'` -ne 3239 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' is not 3239" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpc_netusage.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_netusage.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_netusage.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -source /root/func.sh -source /opt/cloud/bin/vpc_func.sh -X -vpnoutmark="0x525" -vpninmark="0x524" -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s -[c|g|r|n|d] [-l ] [-v ] \n" $(basename $0) >&2 -} -X -create_usage_rules () { -X iptables-save|grep "NETWORK_STATS_$ethDev" > /dev/null -X if [ $? -gt 0 ] -X then -X iptables -N NETWORK_STATS_$ethDev > /dev/null; -X iptables -I FORWARD -j NETWORK_STATS_$ethDev > /dev/null; -X iptables -A NETWORK_STATS_$ethDev -o $ethDev -s $vcidr > /dev/null; -X iptables -A NETWORK_STATS_$ethDev -i $ethDev -d $vcidr > /dev/null; -X fi -X return $? -} -X -create_vpn_usage_rules () { -X iptables-save|grep "VPN_STATS_$ethDev" > /dev/null -X if [ $? -gt 0 ] -X then -X iptables -t mangle -N VPN_STATS_$ethDev > /dev/null; -X iptables -t mangle -I FORWARD -j VPN_STATS_$ethDev > /dev/null; -X iptables -t mangle -A VPN_STATS_$ethDev -o $ethDev -m mark --mark $vpnoutmark > /dev/null; -X iptables -t mangle -A VPN_STATS_$ethDev -i $ethDev -m mark --mark $vpninmark > /dev/null; -X fi -X return $? -} -X -remove_usage_rules () { -X return 0 -} -X -get_usage () { -X iptables -L NETWORK_STATS_$ethDev -n -v -x 2> /dev/null | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null -X return 0 -} -X -get_vpn_usage () { -X iptables -t mangle -L VPN_STATS_$ethDev -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null -X if [ $? -gt 0 ] -X then -X printf $? -X return 1 -X fi -} -X -reset_usage () { -X iptables -Z NETWORK_STATS_$ethDev > /dev/null -X if [ $? -gt 0 -a $? -ne 2 ] -X then -X return 1 -X fi -} -X -#set -x -X -cflag= -gflag= -rflag= -lflag= -vflag= -nflag= -dflag= -X -while getopts 'cgndrl:v:' OPTION -do -X case $OPTION in -X c) cflag=1 -X ;; -X g) gflag=1 -X ;; -X r) rflag=1 -X ;; -X l) lflag=1 -X publicIp="$OPTARG" -X ;; -X v) vflag=1 -X vcidr="$OPTARG" -X ;; -X n) nflag=1 -X ;; -X d) dflag=1 -X ;; -X i) #Do nothing, since it's parameter for host script -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -ethDev=$(getEthByIp $publicIp) -if [ "$cflag" == "1" ] -then -X if [ "$ethDev" != "" ] -X then -X create_usage_rules -X create_vpn_usage_rules -X unlock_exit 0 $lock $locked -X fi -fi -X -if [ "$gflag" == "1" ] -then -X get_usage -X unlock_exit $? $lock $locked -fi -X -if [ "$nflag" == "1" ] -then -X #get_vpn_usage -X unlock_exit $? $lock $locked -fi -X -if [ "$dflag" == "1" ] -then -X #remove_usage_rules -X unlock_exit 0 $lock $locked -fi -X -if [ "$rflag" == "1" ] -then -X reset_usage -X unlock_exit $? $lock $locked -fi -X -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_netusage.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh': 'MD5 check failed' - ) << \SHAR_EOF -f3f8069de696e92a24cbc694275c0bd5 cloud_scripts/opt/cloud/bin/vpc_netusage.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh'` -ne 3377 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' is not 3377" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/configure.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/configure.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/configure.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/configure.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/configure.py -M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&-E<'0@24]%2@I"B`@("`@("`@ -M("`@("`@("`@("`@9W5E22R)$;VU57U)E<75E&-E<'0@17AC97!T:6]N(&%S -M(&4Z"B`@("`@("`@("`@("`@("`@("`@;&]G9VEN9RYE7!E)UT@/3T@)V%L;"<@86YD(&]B -M:ELG7!E(#T@(F%N>2(*("`@("`@("`@("`@:68@ -M(FEC;7!?='EP92(@:6X@7,H*2!A;F0@7!E)UT*("`@("`@("`@("`@:68@(FEC -M;7!?8V]D92(@:6X@7,H*2!A;F0@7!E)UTL('-E;&8N7!E("5S("UJ("5S(B`E("AI8VUP7W1Y<&4L('-E;&8N&5C=71E*&1S=$EP2==.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U -M;&5;)V%C=&EO;B==(#T@(D%#0T505"(*("`@("`@("`@("`@("`@("`@("!E -M;'-E.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5;)V%C=&EO -M;B==(#T@(D123U`B"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@ -M("`@("`@("`@(",@1F]R(&]T:&5R(')U;&5S(&%D9&5D+"!I9B!D969A=6QT -M7V5G7!E("5S(B`E(&EC;7!?='EP90H@("`@("`@("`@ -M("`@("`@96QI9B!R=6QE6R=P7!E+B!3;RP@:71S(&9W(&%T=')I8G5T92!I7!E -M(#T@(F%N>2(*("`@("`@("`@("`@("`@('-E;&8N<')O=&]C;VP@/2!S96QF -M+G1Y<&4*("`@("`@("`@("`@("`@(&EF(")I8VUP7W1Y<&4B(&EN(')U;&4N -M:V5Y7!E+"!R=6QE6R=I8VUP7V-O9&4G72D*("`@("`@("`@("`@("`@(&EF('-E -M;&8N='EP92`]/2`B<')O=&]C;VPB.@H@("`@("`@("`@("`@("`@("`@(&EF -M(')U;&5;)W!R;W1O8V]L)UT@/3T@-#$Z"B`@("`@("`@("`@("`@("`@("`@ -M("`@(')U;&5;)W!R;W1O8V]L)UT@/2`B:7!V-B(*("`@("`@("`@("`@("`@ -M("`@("!S96QF+G!R;W1O8V]L(#T@&5C=71E*")I -M<'1A8FQE+4$O:7!T86)L97,@+70@9FEL=&5R("U$+V&5C=71E -M*")I<'-E="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\ -M(&EP&5C=71E*")I<'-E -M="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP2!V86QI9"!D871A"B`@("`@("`@("`@("`@("!I9B!F;VQD97(@(3T@(G5S -M97)D871A(B!A;F0@9F]L9&5R("$](")M971A9&%T82(Z"B`@("`@("`@("`@ -M("`@("`@("`@8V]N=&EN=64*"B`@("`@("`@("`@("`@("!I9B!F:6QE(#T] -M("(B.@H@("`@("`@("`@("`@("`@("`@(&-O;G1I;G5E"@H@("`@("`@("`@ -M("`@("`@7,N97AI="@Q*0H@("`@("`@("`@("!I9B!O2Q!;&QO=UQN1&5N>2!F2!E>&ES=',L('=E(&1O(&ET('1H -M:7,@=V%Y(&9O7,N97AI -M="@Q*0H*("`@("`@("!F:"`](&]P96XH:'1A8V-E2`] -M(")297=R:71E4G5L92!>;65T82UD871A+R@N*RDD("`N+B\B("L@9F]L9&5R -M("L@(B\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%=(@H@("`@("`@("`@ -M("!H=&%C8V5S7,N97AI="@Q -M*2`@(R!&25A-10H@("`@("`@(')E='5R;B!4&ET*#$I("`C($9)6$U%"B`@("`@("`@:7!S96,N=G!N+2@N*BDN8V]N9B(L(&9I;&4I"B`@ -M("`@("`@("`@(&EF(&TZ"B`@("`@("`@("`@("`@("!S96QF+F-O;F9I<',N -M87!P96YD*&TN9W)O=7`H,2DI"@H@("`@("`@(&9O&5C=71E*")I -M<'-E8R!R96QO860B*0H*("`@(&1E9B!C;VYF:6=U#4R-2`M:B!!0T-%4%0B("4@9&5V72D* -M("`@("`@("!F;W(@;F5T(&EN(&]B:ELG<&5E&UA&UA5]I<"=="B`@("`@("`@<&5E7!E/71U;FYE;"(I -M"B`@("`@("`@9FEL92YA9&1E<2@B(&%U=&AB>3US96-R970B*0H@("`@("`@ -M(&9I;&4N861D97$H(B!K97EE>&-H86YG93UI:V4B*0H@("`@("`@(&9I;&4N -M861D97$H(B!I:V4])7,B("4@:6ME<&]L:6-Y*0H@("`@("`@(&9I;&4N861D -M97$H(B!I:V5L:69E=&EM93TE3TS,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1T:6UE;W5T -M/3$R,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1A8W1I;VX]')A;F=E*#,I.@H@("`@("`@("`@ -M("!R97-U;'0@/2!#&5C=71E*"=I<'-E8R!S=&%T=7,@=G!N -M+25S('P@9W)E<"`B)7,B)R`E("AR:6=H='!E97(L('!E97)L:7-T+G-P;&ET -M*"(L(BP@,2E;,%TI*0H@("`@("`@("`@("!I9B!L96XH2P@)R,G*0H@("`@("`@(&EF(&YO="!U&5C=71E*")T9&)D=6UP("]V87(O&5C=71E*"=K:6QL("TY("5S)R`E('!I9"D*"@IC;&%S -M&5C=71E*")S>7-T96UC=&P@2YS96-R971S(B`E("AS96QF+E903D-/3D9$25(I"B`@ -M("`@("`@>&PR='!D8V]N9F9I;&4@/2`B+V5T8R]X;#)T<&0O>&PR='!D+F-O -M;F8B"B`@("`@("`@>&PR='!O<'1I;VYS9FEL92`]("(O971C+W!P<"]O<'1I -M;VYS+GAL,G1P9"(*"B`@("`@("`@;&]C86QI<"`](&]B:ELG;&]C86Q?:7`G -M70H@("`@("`@(&QO8V%L8VED2`Z(%!32R!<(B5S7"(B("4@*&QE9G0L('!S:RDI"B`@ -M("`@("`@&PR='!D8V]N9F9I;&4I"B`@("`@("`@>&PR='!D8V]N9BYA9&1E -M<2@B:7`@&PR='!O<'1I;VYS+F-O;6UI="@I"@H@("`@9&5F(')E;6]T96%C8V5S -M2@I"B`@("`@("`@4EP -M*')U;&5;)W!U8FQI8U]I<"==*0H@("`@("`@(&EN=&5R;F%L7V9W:6YT97)F -M86-E(#T@4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI -M"B`@("`@("`@<'5B;&EC7V9W<&]R=',@/2!S96QF+G!O4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI -M+`H@("`@("`@("`@("`@("`@&UA2(Z"B`@("`@("`@("`@(&9W7W!R97)O=71? -M2(Z"B`@("`@ -M("`@("`@(&9W7W!O2(Z"B`@("`@("`@ -M("`@(&9W7W!O2(Z"B`@("`@ -M("`@("`@(&9W7V]U='!U=%]R=6QE("L]("(@+2UD<&]R="`E2(Z"B`@("`@("`@("`@ -M(&9W7V]U='!U=%]R=6QE("L]("(Z(B`K('-E;&8N<&]R='-4;U-T4EP*')U;&5;)VEN=&5R;F%L7VEP -M)UTI+`H@("`@("`@("`@("`@("`@&9F9F9F9F9F -M("TM8W1M87-K(#!X9F9F9F9F9F8B("4*("`@("`@("`@("`@("`@("`@("`@ -M("`@4EP*')U;&5;(FEN=&5R;F%L -M7VEP(ETI+"!S96QF+F=E=$=U97-T27`H*2E=*0H*"F-L87-S($EP5&%B;&5S -M17AE8W5T;W(Z"@H@("`@8V]N9FEG(#T@3F]N90H*("`@(&1E9B!?7VEN:71? -M7RAS96QF+"!C;VYF:62!PR)P&5C=71OR)P&5C=71OR)P&5C=71O7!E.B`E&5C27!T86)L97,H8V]N9FEG -M*3H*("`@("`@("!L;V=G:6YG+F1E8G5G*")0&5C=71O7,H*3H*("`@("`@("`@ -M("`@97AE8T1A=&%B86&5C -M27!T86)L97,H8V]N9FEG*0H@("`@96QI9B!J&5C27!T86)L -M97,H8V]N9FEG*0H@("`@96QS93H*("`@("`@("!L;V=G:6YG+G=A7!E/25S(B`E("AP/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/configure.py': 'MD5 check failed' - ) << \SHAR_EOF -8987217852a386250687dfce6d0b10be cloud_scripts/opt/cloud/bin/configure.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/configure.py'` -ne 45920 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/configure.py' is not 45920" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_vmp.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vmp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vmp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vmp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_vmp.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=WWT*("`@(')C6R=I9"==(#T@)W9M<&%S/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vmp.py': 'MD5 check failed' - ) << \SHAR_EOF -3e1ea6831cb27eedc825e25bf817cb9c cloud_scripts/opt/cloud/bin/cs_vmp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vmp.py'` -ne 1126 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vmp.py' is not 1126" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# getRouterMonitorResults.sh --- Send the monitor results to Management Server -X -if [ "$1" == "true" ] -then -X python /root/monitorServices.py > /dev/null -fi -X -printf "FAILING CHECKS:\n" -X -if [ -f /root/basic_failing_health_checks ] -then -X echo `cat /root/basic_failing_health_checks` -fi -X -if [ -f /root/advanced_failing_health_checks ] -then -X echo `cat /root/advanced_failing_health_checks` -fi -X -printf "MONITOR RESULTS:\n" -X -echo "{\"basic\":" -if [ -f /root/basic_monitor_results.json ] -then -X echo `cat /root/basic_monitor_results.json` -else -X echo "{}" -fi -echo ",\"advanced\":" -if [ -f /root/advanced_monitor_results.json ] -then -X echo `cat /root/advanced_monitor_results.json` -else -X echo "{}" -fi -X -echo "}" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh': 'MD5 check failed' - ) << \SHAR_EOF -35649a8a1a8339aaa42a311826699849 cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh'` -ne 1526 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' is not 1526" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vr_cfg.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vr_cfg.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vr_cfg.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -#set -x -X -cfg= -version= -log=/var/log/cloud.log -X -log_it() { -X logger -t cloud "$*" -X echo "$(date) : $*" >> $log -} -X -while getopts 'c:' OPTION; do -X case $OPTION in -X c) cfg="$OPTARG" ;; -esac; done -X -export DEFER_CONFIG=true -while read line; do -X #comment -X if [[ $line == \#* ]]; then -X continue -X -X elif [ "$line" == "" ]; then -X read line -X version=$line -X log_it "VR config: configuation format version $version" -X #skip -X read line -X -X elif [ "$line" == " -X read line -X log_it "VR config: execution success " -X -X elif [ "$line" == "" ]; then -X read line -X file=$line -X log_it "VR config: creating file: $file" -X rm -f $file -X while read -r line; do -X if [ "$line" == "" ]; then -X break -X fi -X echo $line >> $file -X done -X log_it "VR config: create file success" -X -X fi -X -done < $cfg -X -# archive the configuration file -mv $cfg /var/cache/cloud/processed/ -X -unset DEFER_CONFIG -# trigger finish_config() -if [ -f /etc/cloudstack/dhcpentry.json ]; then -X /opt/cloud/bin/configure.py vm_dhcp_entry.json -fi -if [ -f /etc/cloudstack/vmdata.json ]; then -X /opt/cloud/bin/configure.py vm_metadata.json -fi -X -# Flush kernel conntrack table -log_it "VR config: Flushing conntrack table" -conntrackd -d 2> /dev/null -if [ $? -eq 0 ]; then -X conntrackd -F -X conntrackd -k -else -X conntrackd -F -fi -log_it "VR config: Flushing conntrack table completed" -X -Xexit 0 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vr_cfg.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vr_cfg.sh': 'MD5 check failed' - ) << \SHAR_EOF -da02bd413616a9cc131fd039e627eb3e cloud_scripts/opt/cloud/bin/vr_cfg.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vr_cfg.sh'` -ne 2725 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' is not 2725" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpc_snat.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_snat.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_snat.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# @VERSION@ -X -source /root/func.sh -source /opt/cloud/bin/vpc_func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage:\n %s -A -l \n" $(basename $0) >&2 -X printf " %s -D -l \n" $(basename $0) >&2 -} -X -X -add_snat() { -X logger -t cloud "$(basename $0):Added SourceNAT $pubIp on interface $ethDev" -X vpccidr=$(getVPCcidr) -X sudo iptables -D FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT -X sudo iptables -A FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT -X sudo iptables -t nat -D POSTROUTING -j SNAT -o $ethDev --to-source $pubIp -X sudo iptables -t nat -A POSTROUTING -j SNAT -o $ethDev --to-source $pubIp -X return $? -} -remove_snat() { -X logger -t cloud "$(basename $0):Removing SourceNAT $pubIp on interface $ethDev" -X sudo iptables -t nat -D POSTROUTING -j SNAT -o $ethDev --to-source $pubIp -X return $? -} -X -#set -x -lflag=0 -cflag=0 -op="" -X -while getopts 'ADl:c:' OPTION -do -X case $OPTION in -X A) Aflag=1 -X op="-A" -X ;; -X D) Dflag=1 -X op="-D" -X ;; -X l) lflag=1 -X pubIp="$OPTARG" -X ;; -X c) cflag=1 -X ethDev="$OPTARG" -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [ "$Aflag$Dflag" != "1" ] -then -X usage -X unlock_exit 2 $lock $locked -fi -X -if [ "$lflag$cflag" != "11" ] -then -X usage -X unlock_exit 2 $lock $locked -fi -X -if [ "$Aflag" == "1" ] -then -X add_snat $publicIp -X unlock_exit $? $lock $locked -fi -X -if [ "$Dflag" == "1" ] -then -X remove_sat $publicIp -X unlock_exit $? $lock $locked -fi -X -unlock_exit 1 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_snat.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_snat.sh': 'MD5 check failed' - ) << \SHAR_EOF -23502a2ce3829fb787464124f13b9141 cloud_scripts/opt/cloud/bin/vpc_snat.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_snat.sh'` -ne 2346 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' is not 2346" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpc_staticroute.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_staticroute.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_staticroute.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# @VERSION@ -X -source /root/func.sh -source /opt/cloud/bin/vpc_func.sh -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s: -a < routes > \n" $(basename $0) >&2 -} -X -#set -x -X -flush_table_backup() { -X flush_table "static_route_back" -} -X -flush_table() { -X local tab=$1 -X sudo ip route flush table $tab -} -X -copy_table() { -X local from=$1 -X local to=$2 -X sudo ip route show table $from | while read route -X do -X sudo ip route add table $to $route -X done -} -X -backup_table() { -X flush_table "static_route_back" -X copy_table "static_route" "static_route_back" -X flush_table "static_route" -} -X -restore_table() { -X flush_table "static_route" -X copy_table "static_route_back" "static_route" -X flush_table "static_route_back" -} -X -static_route() { -X local rule=$1 -X local ip=$(echo $rule | cut -d: -f1) -X if [ $ip == "Revoke" ] -X then -X return 0 -X fi -X local gateway=$(echo $rule | cut -d: -f2) -X local cidr=$(echo $rule | cut -d: -f3) -X logger -t cloud "$(basename $0): static route: public ip=$ip \ -X gateway=$gateway cidr=$cidr" -X local dev=$(getEthByIp $ip) -X if [ $? -gt 0 ] -X then -X return 1 -X fi -X sudo ip route add $cidr dev $dev via $gateway table static_route &>/dev/null -X result=$? -X logger -t cloud "$(basename $0): done static route: public ip=$ip \ -X gateway=$gateway cidr=$cidr" -X return $result -} -X -gflag= -aflag= -while getopts 'a:' OPTION -X -do -X case $OPTION in -X a) aflag=1 -X rules="$OPTARG" -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [ -n "$rules" ] -then -X rules_list=$(echo $rules | cut -d, -f1- --output-delimiter=" ") -fi -X -success=0 -X -backup_table -X -for r in $rules_list -do -X static_route $r -X success=$? -X if [ $success -gt 0 ] -X then -X logger -t cloud "$(basename $0): failure to apply fw rules for guest network: $gcidr" -X break -X else -X logger -t cloud "$(basename $0): successful in applying fw rules for guest network: $gcidr" -X fi -done -X -if [ $success -gt 0 ] -then -X logger -t cloud "$(basename $0): restoring from backup for guest network: $gcidr" -X restore_table -else -X logger -t cloud "$(basename $0): deleting backup for guest network: $gcidr" -X flush_table_backup -fi -unlock_exit $success $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_staticroute.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh': 'MD5 check failed' - ) << \SHAR_EOF -4080c04ff7600874ef4a4364aefc4d18 cloud_scripts/opt/cloud/bin/vpc_staticroute.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh'` -ne 3043 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' is not 3043" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/baremetal-vr.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/baremetal-vr.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/baremetal-vr.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/baremetal-vr.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/baremetal-vr.py -M(TQI8V5N6ME>2<@:6X@<#H*("`@("`@("`@("`@("`@("`@("`@("`@ -M2`]('`N6ME>2!I;B`E0H*("`@(&1E -M9B!?9V5T7VUG;71?:7`H4)AFEP*')E<7,N:V5Y2P@:&%S:%-T5]P/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/baremetal-vr.py': 'MD5 check failed' - ) << \SHAR_EOF -f87e8890aa7ad3cc522c5c5ceb2fbf69 cloud_scripts/opt/cloud/bin/baremetal-vr.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/baremetal-vr.py'` -ne 5587 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/baremetal-vr.py' is not 5587" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_firewallrules.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_firewallrules.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_firewallrules.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import copy -X -X -def merge(dbag, data): -X dbagc = copy.deepcopy(dbag) -X if "rules" not in data: -X return dbagc -X for rule in data['rules']: -X id = str(rule['id']) -X if rule['revoked']: -X if id in dbagc.keys(): -X del(dbagc[id]) -X elif id not in dbagc.keys(): -X dbagc[id] = rule -X return dbagc -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_firewallrules.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py': 'MD5 check failed' - ) << \SHAR_EOF -6d3faf49679b84bf9a098eee6b630f69 cloud_scripts/opt/cloud/bin/cs_firewallrules.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py'` -ne 1141 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' is not 1141" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/netusage.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/netusage.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/netusage.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/netusage.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/netusage.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -X -# netusage.sh -- create iptable rules to gather network stats, running within DomR -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s -[c|g|r] [-[a|d] ]\n" $(basename $0) >&2 -} -X -create_usage_rules () { -X iptables-save|grep "INPUT -j NETWORK_STATS" > /dev/null -X if [ $? -eq 0 ] -X then -X return $? -X fi -X iptables -N NETWORK_STATS > /dev/null -X iptables -I FORWARD -j NETWORK_STATS > /dev/null -X iptables -I INPUT -j NETWORK_STATS > /dev/null -X iptables -I OUTPUT -j NETWORK_STATS > /dev/null -X iptables -A NETWORK_STATS -i eth0 -o eth2 > /dev/null -X iptables -A NETWORK_STATS -i eth2 -o eth0 > /dev/null -X iptables -A NETWORK_STATS -o eth2 ! -i eth0 -p tcp > /dev/null -X iptables -A NETWORK_STATS -i eth2 ! -o eth0 -p tcp > /dev/null -X return $? -} -X -add_public_interface () { -X local pubIf=$1 -X iptables-save|grep "NETWORK_STATS -i eth0 -o $pubIf" > /dev/null -X if [ $? -eq 0 ] -X then -X return $? -X fi -X iptables -A NETWORK_STATS -i eth0 -o $pubIf > /dev/null -X iptables -A NETWORK_STATS -i $pubIf -o eth0 > /dev/null -X iptables -A NETWORK_STATS -o $pubIf ! -i eth0 -p tcp > /dev/null -X iptables -A NETWORK_STATS -i $pubIf ! -o eth0 -p tcp > /dev/null -X return $? -} -X -delete_public_interface () { -X local pubIf=$1 -X echo $pubIf >> /root/removedVifs -X return $? -} -X -get_usage () { -X iptables -L NETWORK_STATS -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null -X if [ -f /root/removedVifs ] ; then iptables -Z NETWORK_STATS ; fi; > /dev/null -X /root/clearUsageRules.sh > /dev/null -X if [ $? -gt 0 -a $? -ne 2 ] -X then -X printf $? -X return 1 -X fi -} -X -reset_usage () { -X iptables -Z NETWORK_STATS > /dev/null -X if [ $? -gt 0 -a $? -ne 2 ] -X then -X return 1 -X fi -} -X -#set -x -X -cflag= -gflag= -rflag= -iflag= -aflag= -dflag= -X -while getopts 'cgria:d:' OPTION -do -X case $OPTION in -X c) cflag=1 -X ;; -X g) gflag=1 -X ;; -X r) rflag=1 -X ;; -X a) aflag=1 -X publicIf="$OPTARG" -X ;; -X d) dflag=1 -X publicIf="$OPTARG" -X ;; -X i) #Do nothing, since it's parameter for host script -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [ "$cflag" == "1" ] -then -X #create_usage_rules -X unlock_exit $? $lock $locked -fi -X -if [ "$gflag" == "1" ] -then -X get_usage -X unlock_exit $? $lock $locked -fi -X -if [ "$rflag" == "1" ] -then -X reset_usage -X unlock_exit $? $lock $locked -fi -X -if [ "$aflag" == "1" ] -then -X #add_public_interface $publicIf -X unlock_exit $? $lock $locked -fi -X -if [ "$dflag" == "1" ] -then -X #delete_public_interface $publicIf -X unlock_exit $? $lock $locked -fi -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/netusage.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/netusage.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/netusage.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/netusage.sh': 'MD5 check failed' - ) << \SHAR_EOF -2966c6cafee62e66ff903e53367b498b cloud_scripts/opt/cloud/bin/netusage.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/netusage.sh'` -ne 3478 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/netusage.sh' is not 3478" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/monitor_service.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/monitor_service.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/monitor_service.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/monitor_service.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/monitor_service.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -set -x -usage() { -X printf "Usage: %s: -c config string \n" $(basename $0) >&2 -} -X -configFile='/etc/monitor.conf' -X -create_config() { -services=$1; -services_list=$(echo $services | cut -d, -f1- --output-delimiter=" "); -X -echo "#Monitor services config" >$configFile -X -for s in $services_list -do -service=$(echo $s | cut -d: -f1); -processname=$(echo $s | cut -d: -f2); -service_name=$(echo $s | cut -d: -f3); -pidfile=$(echo $s | cut -d: -f4); -X -echo "$service" >> $configFile; -echo $processname >> $configFile -echo $service_name >> $configFile -echo $pidfile >> $configFile -X -done -X -} -X -config=$2 -if [ -n "$3" ] -then -X -#delete cron job before updating config file -crontab -l|grep "monitorServices.py" -X -if [ $? -eq 0 ] -then -X t=`date +%s`; -X touch /tmp/monitor-$t.txt; -X conf=/tmp/monitor-$t.txt -X crontab -l >$conf -X sed -i /#monitoringConfig/,+3d $conf -X crontab $conf -X rm $conf -fi -X -X -logger -t cloud "deleted crontab entry for monitoring services" -unlock_exit 0 $lock $locked -fi -X -create_config $config -X -#add cron job -crontab -l|grep "monitorServices.py" -if [ $? -ne 0 ] -X then -X (crontab -l ;echo -e "#monitoringConfig\nSHELL=/bin/bash\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n */3 * * * * /usr/bin/python /root/monitorServices.py") | crontab - -X logger -t cloud "added crontab entry for monitoring services" -fi -X -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/monitor_service.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/monitor_service.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/monitor_service.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/monitor_service.sh': 'MD5 check failed' - ) << \SHAR_EOF -3419e7baf45ac36d3d69ca71ef7ab978 cloud_scripts/opt/cloud/bin/monitor_service.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/monitor_service.sh'` -ne 2294 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/monitor_service.sh' is not 2294" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_ip.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_ip.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_ip.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_ip.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_ip.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N7!E)UT@/2!I<%LG;G=?='EP92==+FQO=V5R*"D*("`@(&EF(&EP -M6R=N=U]T>7!E)UT@/3T@)V-O;G1R;VPG.@H@("`@("`@(&1B86=;:7!;)V1E -M=FEC92==72`](%MI<%T*("`@(&5L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_ip.py': 'MD5 check failed' - ) << \SHAR_EOF -856c6261f2876c280c49fa486f4f7408 cloud_scripts/opt/cloud/bin/cs_ip.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_ip.py'` -ne 2581 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_ip.py' is not 2581" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/bumpup_priority.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/bumpup_priority.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/bumpup_priority.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -touch /tmp/rrouter_bumped -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/bumpup_priority.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh': 'MD5 check failed' - ) << \SHAR_EOF -35091259ed848a9f7270aca1a90e95af cloud_scripts/opt/cloud/bin/bumpup_priority.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh'` -ne 824 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' is not 824" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/getRouterAlerts.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/getRouterAlerts.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/getRouterAlerts.sh (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/getRouterAlerts.sh -M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5LP77T*"B`@("`@("`@("`@ -M("`@("!T;T1A=&5686P])"AD871E("UD("(D9&%T979A;"(@(BLE/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh': 'MD5 check failed' - ) << \SHAR_EOF -6c3803100b0923fd3f9017a0e09d6fd5 cloud_scripts/opt/cloud/bin/getRouterAlerts.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh'` -ne 1706 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh' is not 1706" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/postinit.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/postinit.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/postinit.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# This scripts before ssh.service but after cloud-early-config -X -# Eject cdrom if any -eject || true -X -# Restart journald for setting changes to apply -systemctl restart systemd-journald -X -TYPE=$(grep -Po 'type=\K[a-zA-Z]*' /var/cache/cloud/cmdline) -if [ "$TYPE" == "router" ] || [ "$TYPE" == "vpcrouter" ] || [ "$TYPE" == "dhcpsrvr" ] -then -X if [ -x /opt/cloud/bin/update_config.py ] -X then -X /opt/cloud/bin/update_config.py cmd_line.json || true -X fi -fi -X -[ ! -f /var/cache/cloud/enabled_svcs ] && touch /var/cache/cloud/enabled_svcs -for svc in $(cat /var/cache/cloud/enabled_svcs) -do -X systemctl enable --now --no-block $svc -done -X -[ ! -f /var/cache/cloud/disabled_svcs ] && touch /var/cache/cloud/disabled_svcs -for svc in $(cat /var/cache/cloud/disabled_svcs) -do -X systemctl disable --now --no-block $svc -done -X -# Restore the persistent iptables nat, rules and filters for IPv4 and IPv6 if they exist -ipv4="/etc/iptables/rules.v4" -if [ -e $ipv4 ] -then -X iptables-restore < $ipv4 -fi -X -ipv6="/etc/iptables/rules.v6" -if [ -e $ipv6 ] -then -X ip6tables-restore < $ipv6 -fi -X -# Patch known systemd/sshd memory leak - https://github.com/systemd/systemd/issues/8015#issuecomment-476160981 -echo '@include null' >> /etc/pam.d/systemd-user -X -# Enable and Start SSH -systemctl enable --now --no-block ssh -X -date > /var/cache/cloud/boot_up_done -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/postinit.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/postinit.sh': 'MD5 check failed' - ) << \SHAR_EOF -170afadf6f130e9cb697dca65a87aacb cloud_scripts/opt/cloud/bin/setup/postinit.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/postinit.sh'` -ne 2122 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' is not 2122" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/secstorage.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/secstorage.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/secstorage.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_secstorage() { -X log_it "Setting up secondary storage system vm" -X -X echo "cloud apache2 nfs-common portmap" > /var/cache/cloud/enabled_svcs -X echo "conntrackd keepalived haproxy dnsmasq" > /var/cache/cloud/disabled_svcs -X mkdir -p /var/log/cloud -X -X setup_common eth0 eth1 eth2 -X setup_storage_network -X setup_system_rfc1918_internal -X -X log_it "Setting up entry in hosts" -X sed -i /$NAME/d /etc/hosts -X public_ip=`getPublicIp` -X echo "$public_ip $NAME" >> /etc/hosts -X -X log_it "Applying iptables rules" -X cp /etc/iptables/iptables-secstorage /etc/iptables/rules.v4 -X -X log_it "Configuring sshd" -X local hyp=$HYPERVISOR -X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then -X setup_sshd $ETH1_IP "eth1" -X else -X setup_sshd $ETH0_IP "eth0" -X fi -X -X log_it "Configuring apache2" -X setup_apache2 $ETH2_IP -X -X # Deprecated, should move to Cs Python all of it -X sed -e "s///" \ -X -e "s///" \ -X -e "s/Listen .*:8180/Listen $ETH2_IP:80/g" \ -X -e "s/Listen .*:8443/Listen $ETH2_IP:443/g" /etc/apache2/vhost.template > /etc/apache2/sites-enabled/vhost-${ETH2_IP}.conf -X -X log_it "Setting up apache2 for post upload of volume/template" -X a2enmod proxy -X a2enmod proxy_http -X a2enmod headers -X -X cat >/etc/apache2/cors.conf </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh': 'MD5 check failed' - ) << \SHAR_EOF -14aea171a5e0fdfd3069bb96bde91e0b cloud_scripts/opt/cloud/bin/setup/secstorage.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh'` -ne 2720 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' is not 2720" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/ilbvm.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -ilbvm_svcs() { -X echo "haproxy" > /var/cache/cloud/enabled_svcs -X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs -} -X -setup_ilbvm() { -X log_it "Setting up Internal Load Balancer system vm" -X setup_common eth0 eth1 -X #eth0 = guest network, eth1=control network -X -X sed -i /$NAME/d /etc/hosts -X echo "$ETH0_IP $NAME" >> /etc/hosts -X -X cp /etc/iptables/iptables-ilbvm /etc/iptables/rules.v4 -X setup_sshd $ETH1_IP "eth1" -X -X enable_fwding 0 -X enable_irqbalance 1 -} -X -ilbvm_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute ilbvm svcs" -X exit 1 -fi -setup_ilbvm -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/ilbvm.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh': 'MD5 check failed' - ) << \SHAR_EOF -87c70bdf6c0d4d41f0ff87475494188f cloud_scripts/opt/cloud/bin/setup/ilbvm.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh'` -ne 1442 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' is not 1442" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_vpcrouter() { -X log_it "Setting up VPC virtual router system vm" -X -X if [ -f /etc/hosts ]; then -X grep -q $NAME /etc/hosts || echo "127.0.0.1 $NAME" >> /etc/hosts; -X fi -X -X cat > /etc/network/interfaces << EOF -auto lo eth0 -iface lo inet loopback -EOF -X setup_interface "0" $ETH0_IP $ETH0_MASK $GW -X -X echo $NAME > /etc/hostname -X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon -X hostnamectl set-hostname $NAME -X -X #Nameserver -X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries -X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries -X if [ -n "$internalNS1" ] -X then -X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS1" > /etc/resolv.conf -X fi -X -X if [ -n "$internalNS2" ] -X then -X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS2" >> /etc/resolv.conf -X fi -X if [ -n "$NS1" ] -X then -X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS1" >> /etc/resolv.conf -X fi -X -X if [ -n "$NS2" ] -X then -X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS2" >> /etc/resolv.conf -X fi -X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] -X then -X if [ "$HYPERVISOR" == "vmware" ] || [ "$HYPERVISOR" == "hyperv" ]; -X then -X ip route add $MGMTNET via $LOCAL_GW dev eth0 -X # workaround to activate vSwitch under VMware -X timeout 3 ping -n -c 3 $LOCAL_GW || true -X fi -X fi -X -X ip route delete default -X # create route table for static route -X -X sudo echo "252 static_route" >> /etc/iproute2/rt_tables 2>/dev/null -X sudo echo "251 static_route_back" >> /etc/iproute2/rt_tables 2>/dev/null -X sudo ip rule add from $VPCCIDR table static_route 2>/dev/null -X sudo ip rule add from $VPCCIDR table static_route_back 2>/dev/null -X -X setup_vpc_apache2 -X -X enable_irqbalance 1 -X enable_vpc_rpsrfs 1 -X disable_rpfilter -X enable_fwding 1 -X enable_passive_ftp 1 -X cp /etc/iptables/iptables-vpcrouter /etc/iptables/rules.v4 -X setup_sshd $ETH0_IP "eth0" -X cp /etc/vpcdnsmasq.conf /etc/dnsmasq.conf -X cp /etc/cloud-nic.rules /etc/udev/rules.d/cloud-nic.rules -X echo "" > /etc/dnsmasq.d/dhcphosts.txt -X echo "dhcp-hostsfile=/etc/dhcphosts.txt" > /etc/dnsmasq.d/cloud.conf -X -X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" -X #DNS server will append $DOMAIN to local queries -X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf -X #answer all local domain queries -X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf -X -X command -v dhcp_release > /dev/null 2>&1 -X no_dhcp_release=$? -X if [ $no_dhcp_release -eq 0 ] -X then -X echo 1 > /var/cache/cloud/dnsmasq_managed_lease -X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf -X else -X echo 0 > /var/cache/cloud/dnsmasq_managed_lease -X fi -X -X # Setup hourly logrotate -X if [ -f /etc/cron.daily/logrotate ]; then -X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 -X fi -} -X -routing_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute routing_svcs" -X exit 1 -fi -setup_vpcrouter -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh': 'MD5 check failed' - ) << \SHAR_EOF -811420d11f97b1d7237b964e8bbbdf5d cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh'` -ne 3885 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' is not 3885" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/router.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/router.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/router.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/router.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/router.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -check_reboot_vmware() { -X if [ "$HYPERVISOR" != "vmware" ]; then -X return -X fi -X -X if [ -n "$MGMTNET" ]; then -X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') -X if ping -n -c 1 -W 3 $MGMT_GW &> /dev/null; then -X log_it "Management gateway pingable, skipping VR reboot" -X return -X fi -X fi -X -X log_it "Management gateway not pingable, rebooting VR" -X sync -X reboot -} -X -setup_router() { -X # To save router public interface and gw ip information -X touch /var/cache/cloud/ifaceGwIp -X -X oldmd5= -X [ -f "/etc/udev/rules.d/70-persistent-net.rules" ] && oldmd5=$(md5sum "/etc/udev/rules.d/70-persistent-net.rules" | awk '{print $1}') -X -X if [ -n "$ETH2_IP" ]; then -X setup_common eth0 eth1 eth2 -X -X if [ -n "$EXTRA_PUBNICS" ]; then -X for ((i = 3; i < 3 + $EXTRA_PUBNICS; i++)); do -X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" -X done -X fi -X else -X setup_common eth0 eth1 -X if [ -n "$EXTRA_PUBNICS" ]; then -X for ((i = 2; i < 2 + $EXTRA_PUBNICS; i++)); do -X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" -X done -X fi -X fi -X -X log_it "Checking udev NIC assignment order changes" -X if [ "$NIC_MACS" != "" ] -X then -X init_interfaces_orderby_macs "$NIC_MACS" "/tmp/interfaces" "/tmp/udev-rules" -X newmd5=$(md5sum "/tmp/udev-rules" | awk '{print $1}') -X rm /tmp/interfaces -X rm /tmp/udev-rules -X -X if [ "$oldmd5" != "$newmd5" ] -X then -X log_it "Reloading udev for new udev NIC assignment" -X udevadm control --reload-rules && udevadm trigger -X check_reboot_vmware -X fi -X fi -X -X setup_aesni -X setup_dnsmasq -X setup_apache2 $ETH0_IP -X -X sed -i /$NAME/d /etc/hosts -X echo "$ETH0_IP $NAME" >> /etc/hosts -X -X enable_irqbalance 1 -X disable_rpfilter_domR -X enable_fwding 1 -X enable_rpsrfs 1 -X enable_passive_ftp 1 -X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 -X setup_sshd $ETH1_IP "eth1" -X -X # Only allow DNS service for current network -X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X -X # Setup hourly logrotate -X if [ -f /etc/cron.daily/logrotate ]; then -X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 -X fi -} -X -routing_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute routing_svcs" -X exit 1 -fi -setup_router -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/router.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/router.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/router.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/router.sh': 'MD5 check failed' - ) << \SHAR_EOF -2ae62d5d44c716730231c9d77618fe91 cloud_scripts/opt/cloud/bin/setup/router.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/router.sh'` -ne 3355 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/router.sh' is not 3355" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/elbvm.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/elbvm.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/elbvm.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -elbvm_svcs() { -X echo "haproxy" > /var/cache/cloud/enabled_svcs -X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs -} -X -setup_elbvm() { -X log_it "Setting up Elastic Load Balancer system vm" -X setup_common eth0 eth1 -X sed -i /$NAME/d /etc/hosts -X public_ip=$ETH2_IP -X [ "$ETH2_IP" == "0.0.0.0" ] || [ "$ETH2_IP" == "" ] && public_ip=$ETH0_IP -X echo "$public_ip $NAME" >> /etc/hosts -X -X cp /etc/iptables/iptables-elbvm /etc/iptables/rules.v4 -X if [ "$SSHONGUEST" == "true" ] -X then -X setup_sshd $ETH0_IP "eth0" -X else -X setup_sshd $ETH1_IP "eth1" -X fi -X -X enable_fwding 0 -X enable_irqbalance 0 -} -X -elbvm_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute elbvm svcs" -X exit 1 -fi -setup_elbvm -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/elbvm.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh': 'MD5 check failed' - ) << \SHAR_EOF -2d34615f1d40f6125a2205e6118ba07f cloud_scripts/opt/cloud/bin/setup/elbvm.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh'` -ne 1578 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' is not 1578" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/bootstrap.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" -CMDLINE=/var/cache/cloud/cmdline -X -rm -f /var/cache/cloud/enabled_svcs -rm -f /var/cache/cloud/disabled_svcs -X -X. /lib/lsb/init-functions -X -log_it() { -X echo "$(date) $@" >> /var/log/cloud.log -X log_action_msg "$@" -} -X -hypervisor() { -X if [ -d /proc/xen ]; then -X mount -t xenfs none /proc/xen -X $(dmesg | grep -q "Xen HVM") -X if [ $? -eq 0 ]; then # 1=PV,0=HVM -X echo "xen-hvm" && return 0 -X else -X echo "xen-pv" && return 0 -X fi -X fi -X -X [ -x /usr/sbin/virt-what ] && local facts=( $(virt-what) ) -X if [ "$facts" != "" ]; then -X # Xen HVM is recognized as Hyperv when Viridian extensions are enabled -X if [ "${facts[-1]}" == "xen-domU" ] && [ "${facts[0]}" == "hyperv" ]; then -X echo "xen-hvm" && return 0 -X else -X echo ${facts[-1]} && return 0 -X fi -X fi -X -X grep -q QEMU /proc/cpuinfo && echo "kvm" && return 0 -X grep -q QEMU /var/log/messages && echo "kvm" && return 0 -X -X vmware-checkvm &> /dev/null && echo "vmware" && return 0 -X -X echo "unknown" && return 1 -} -X -config_guest() { -X [ ! -d /proc/xen ] && sed -i 's/^vc/#vc/' /etc/inittab && telinit q -X [ -d /proc/xen ] && sed -i 's/^#vc/vc/' /etc/inittab && telinit q -X -X systemctl daemon-reload -X -X case $HYPERVISOR in -X xen-pv|xen-domU) -X systemctl stop ntpd -X systemctl disable ntpd -X systemctl enable xe-daemon -X systemctl start xe-daemon -X -X cat /proc/cmdline > $CMDLINE -X sed -i "s/%/ /g" $CMDLINE -X ;; -X xen-hvm) -X systemctl stop ntpd -X systemctl disable ntpd -X systemctl enable xe-daemon -X systemctl start xe-daemon -X -X if [ ! -f /usr/bin/xenstore-read ]; then -X log_it "ERROR: xentools not installed, cannot found xenstore-read" && exit 5 -X fi -X /usr/bin/xenstore-read vm-data/cloudstack/init > $CMDLINE -X sed -i "s/%/ /g" $CMDLINE -X ;; -X kvm) -X # Configure kvm hotplug support -X if grep -E 'CONFIG_HOTPLUG_PCI=y|CONFIG_HOTPLUG_PCI_ACPI=y' /boot/config-`uname -r`; then -X log_it "acpiphp and pci_hotplug module already compiled in" -X else -X modprobe acpiphp 2> /dev/null && log_it "acpiphp module loaded" || true -X modprobe pci_hotplug 2> /dev/null && log_it "pci_hotplug module loaded" || true -X fi -X -X sed -i -e "/^s0:2345:respawn.*/d" /etc/inittab -X sed -i -e "/6:23:respawn/a\s0:2345:respawn:/sbin/getty -L 115200 ttyS0 vt102" /etc/inittab -X systemctl enable qemu-guest-agent -X systemctl start qemu-guest-agent -X -X # Wait for $CMDLINE file to be written by the qemu-guest-agent -X for i in {1..60}; do -X if [ -s $CMDLINE ]; then -X log_it "Received a new non-empty cmdline file from qemu-guest-agent" -X break -X fi -X sleep 1 -X done -X if [ ! -s $CMDLINE ]; then -X log_it "Failed to receive the cmdline file via the qemu-guest-agent" -X fi -X ;; -X vmware) -X # system time sync'd with host via vmware tools -X systemctl stop ntpd -X systemctl disable ntpd -X systemctl enable open-vm-tools -X systemctl start open-vm-tools -X -X vmtoolsd --cmd 'machine.id.get' > $CMDLINE -X ;; -X virtualpc|hyperv) -X # Hyper-V is recognized as virtualpc hypervisor type. Boot args are passed using KVP Daemon -X systemctl enable hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service -X systemctl start hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service -X sleep 5 -X cp -f /var/opt/hyperv/.kvp_pool_0 $CMDLINE -X cat /dev/null > /var/opt/hyperv/.kvp_pool_0 -X ;; -X virtualbox) -X # Virtualbox is used to test the virtual router -X # get the commandline from a dmistring (yes, hacky!) -X dmidecode | grep cmdline | sed 's/^.*cmdline://' > $CMDLINE -X RV=$? -X if [ $RV -ne 0 ] ; then -X log_it "Failed to get cmdline from a virtualbox dmi property" -X fi -X ;; -X esac -X -X # Find and export guest type -X export TYPE=$(grep -Po 'type=\K[a-zA-Z]*' $CMDLINE) -} -X -patch_systemvm() { -X local patchfile=$1 -X local backupfolder="/tmp/.conf.backup" -X local logfile="/var/log/patchsystemvm.log" -X if [ -f /usr/local/cloud/systemvm/conf/cloud.jks ]; then -X rm -fr $backupfolder -X mkdir -p $backupfolder -X cp -r /usr/local/cloud/systemvm/conf/* $backupfolder/ -X fi -X rm /usr/local/cloud/systemvm -rf -X mkdir -p /usr/local/cloud/systemvm -X echo "All" | unzip $patchfile -d /usr/local/cloud/systemvm >$logfile 2>&1 -X find /usr/local/cloud/systemvm/ -name \*.sh | xargs chmod 555 -X if [ -f $backupfolder/cloud.jks ]; then -X cp -r $backupfolder/* /usr/local/cloud/systemvm/conf/ -X echo "Restored keystore file and certs using backup" >> $logfile -X fi -X rm -fr $backupfolder -X # Import global cacerts into 'cloud' service's keystore -X keytool -importkeystore -srckeystore /etc/ssl/certs/java/cacerts -destkeystore /usr/local/cloud/systemvm/certs/realhostip.keystore -srcstorepass changeit -deststorepass vmops.com -noprompt || true -X return 0 -} -X -patch() { -X local PATCH_MOUNT=/media/cdrom -X local logfile="/var/log/patchsystemvm.log" -X if [ "$TYPE" == "consoleproxy" ] || [ "$TYPE" == "secstorage" ] && [ -f ${PATCH_MOUNT}/agent.zip ] && [ -f /var/cache/cloud/patch.required ] -X then -X echo "Patching systemvm for cloud service with mount=$PATCH_MOUNT for type=$TYPE" >> $logfile -X patch_systemvm ${PATCH_MOUNT}/agent.zip -X if [ $? -gt 0 ] -X then -X echo "Failed to apply patch systemvm\n" >> $logfile -X exit 1 -X fi -X fi -X -X rm -f /var/cache/cloud/patch.required -X chmod -x /etc/systemd/system/cloud*.service -X systemctl daemon-reload -X umount $PATCH_MOUNT || true -X -X if [ -f /mnt/cmdline ]; then -X cat /mnt/cmdline > $CMDLINE -X fi -X return 0 -} -X -config_sysctl() { -X # When there is more memory reset the cache back pressure to default 100 -X physmem=$(free|awk '/^Mem:/{print $2}') -X if [ $((physmem)) -lt 409600 ]; then -X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 200" /etc/sysctl.conf -X else -X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 100" /etc/sysctl.conf -X fi -X -X sync -X sysctl -p -} -X -bootstrap() { -X log_it "Bootstrapping systemvm appliance" -X -X export HYPERVISOR=$(hypervisor) -X [ $? -ne 0 ] && log_it "Failed to detect hypervisor type, bailing out" && exit 10 -X log_it "Starting guest services for $HYPERVISOR" -X -X config_guest -X patch -X config_sysctl -X -X log_it "Configuring systemvm type=$TYPE" -X if [ -f "/opt/cloud/bin/setup/$TYPE.sh" ]; then -X /opt/cloud/bin/setup/$TYPE.sh -X else -X /opt/cloud/bin/setup/default.sh -X fi -X -X log_it "Finished setting up systemvm" -X exit 0 -} -X -bootstrap -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/bootstrap.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh': 'MD5 check failed' - ) << \SHAR_EOF -722a9c6abfff147c7727fdcd85c96767 cloud_scripts/opt/cloud/bin/setup/bootstrap.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh'` -ne 7721 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' is not 7721" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_console_proxy() { -X log_it "Setting up console proxy system vm" -X -X echo "cloud" > /var/cache/cloud/enabled_svcs -X echo "haproxy dnsmasq apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs -X mkdir -p /var/log/cloud -X -X setup_common eth0 eth1 eth2 -X setup_system_rfc1918_internal -X -X log_it "Setting up entry in hosts" -X sed -i /$NAME/d /etc/hosts -X public_ip=`getPublicIp` -X echo "$public_ip $NAME" >> /etc/hosts -X -X log_it "Applying iptables rules" -X cp /etc/iptables/iptables-consoleproxy /etc/iptables/rules.v4 -X -X log_it "Configuring sshd" -X local hyp=$HYPERVISOR -X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then -X setup_sshd $ETH1_IP "eth1" -X else -X setup_sshd $ETH0_IP "eth0" -X fi -X -X disable_rpfilter -X enable_fwding 0 -X enable_irqbalance 0 -X rm -f /etc/logrotate.d/cloud -} -X -setup_console_proxy -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh': 'MD5 check failed' - ) << \SHAR_EOF -44adac9bf5e54d4791da00e3d1bdaf46 cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh'` -ne 1658 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' is not 1658" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/common.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/common.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/common.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/common.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/common.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" -X -X. /lib/lsb/init-functions -X -log_it() { -X echo "$(date) $@" >> /var/log/cloud.log -X log_action_msg "$@" -} -X -init_interfaces_orderby_macs() { -X macs=( $(echo $1 | sed "s/|/ /g") ) -X total_nics=${#macs[@]} -X interface_file=${2:-"/etc/network/interfaces"} -X rule_file=${3:-"/etc/udev/rules.d/70-persistent-net.rules"} -X -X echo -n "auto lo" > $interface_file -X for((i=0; i> $interface_file -X fi -X done -X -X cat >> $interface_file << EOF -X -iface lo inet loopback -X -EOF -X -X echo "" > $rule_file -X for((i=0; i < ${#macs[@]}; i++)) -X do -X echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${macs[$i]}\", NAME=\"eth$i\"" >> $rule_file -X done -} -X -init_interfaces() { -X if [ "$NIC_MACS" == "" ] -X then -X cat > /etc/network/interfaces << EOF -auto lo $1 $2 $3 -iface lo inet loopback -X -EOF -X else -X init_interfaces_orderby_macs "$NIC_MACS" -X fi -} -X -setup_interface() { -X local intfnum=$1 -X local ip=$2 -X local mask=$3 -X local gw=$4 -X local force=$5 -X local intf=eth${intfnum} -X local bootproto="static" -X -X if [ "$BOOTPROTO" == "dhcp" ] -X then -X if [ "$intfnum" != "0" ] -X then -X bootproto="dhcp" -X fi -X fi -X -X if [ "$ip" != "0.0.0.0" -a "$ip" != "" -o "$force" == "force" ] -X then -X echo "iface $intf inet $bootproto" >> /etc/network/interfaces -X if [ "$bootproto" == "static" ] -X then -X echo " address $ip " >> /etc/network/interfaces -X echo " netmask $mask" >> /etc/network/interfaces -X fi -X fi -X -X if [ "$ip" == "0.0.0.0" -o "$ip" == "" ] -X then -X ifconfig $intf down -X fi -X -X if [ "$force" == "force" ] -X then -X ifdown $intf -X else -X ifdown $intf -X if [ "$RROUTER" != "1" -o "$1" != "2" ] -X then -X ifup $intf -X fi -X fi -} -X -setup_interface_ipv6() { -X sysctl net.ipv6.conf.all.disable_ipv6=0 -X sysctl net.ipv6.conf.all.forwarding=1 -X sysctl net.ipv6.conf.all.accept_ra=1 -X -X sed -i "s/net.ipv6.conf.all.disable_ipv6 =.*$/net.ipv6.conf.all.disable_ipv6 = 0/" /etc/sysctl.conf -X sed -i "s/net.ipv6.conf.all.forwarding =.*$/net.ipv6.conf.all.forwarding = 1/" /etc/sysctl.conf -X sed -i "s/net.ipv6.conf.all.accept_ra =.*$/net.ipv6.conf.all.accept_ra = 1/" /etc/sysctl.conf -X -X local intfnum=$1 -X local ipv6="$2" -X local prelen="$3" -X local intf=eth${intfnum} -X -X echo "iface $intf inet6 static" >> /etc/network/interfaces -X echo " address $ipv6 " >> /etc/network/interfaces -X echo " netmask $prelen" >> /etc/network/interfaces -X echo " accept_ra 1" >> /etc/network/interfaces -X ifdown $intf -X ifup $intf -} -X -X -enable_fwding() { -X local enabled=$1 -X log_it "cloud: enable_fwding = $1" -X log_it "enable_fwding = $1" -X echo "$1" > /proc/sys/net/ipv4/ip_forward -X [ -f /etc/iptables/iptables.conf ] && sed -i "s/ENABLE_ROUTING=.*$/ENABLE_ROUTING=$enabled/" /etc/iptables/iptables.conf && return -} -X -enable_passive_ftp() { -X log_it "cloud: enabling passive FTP for guest VMs" -X echo "$1" > /proc/sys/net/netfilter/nf_conntrack_helper -} -X -disable_rpfilter() { -X log_it "cloud: disable rp_filter" -X log_it "disable rpfilter" -X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf -} -X -get_public_vif_list() { -X local vif_list="" -X for i in /sys/class/net/eth*; do -X vif=$(basename $i); -X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] -X then -X vif_list="$vif_list $vif"; -X fi -X done -X -X echo $vif_list -} -X -disable_rpfilter_domR() { -X log_it "cloud: Tuning rp_filter on public interfaces" -X -X VIF_LIST=$(get_public_vif_list) -X log_it "rpfilter public interfaces : $VIF_LIST" -X if [ "$DISABLE_RP_FILTER" == "true" ] -X then -X log_it "cloud: disable rp_filter on public interfaces" -X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf -X echo "0" > /proc/sys/net/ipv4/conf/default/rp_filter -X for vif in $VIF_LIST; do -X log_it "cloud: disable rp_filter on public interface: $vif" -X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 0/" /etc/sysctl.conf -X echo "0" > /proc/sys/net/ipv4/conf/$vif/rp_filter -X done -X else -X log_it "cloud: enable rp_filter on public interfaces" -X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 1/" /etc/sysctl.conf -X echo "1" > /proc/sys/net/ipv4/conf/default/rp_filter -X for vif in $VIF_LIST; do -X log_it "cloud: enable rp_filter on public interface: $vif" -X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 1/" /etc/sysctl.conf -X echo "1" > /proc/sys/net/ipv4/conf/$vif/rp_filter -X done -X fi -X log_it "cloud: Enabling rp_filter on Non-public interfaces(eth0,eth1,lo)" -X echo "1" > /proc/sys/net/ipv4/conf/eth0/rp_filter -X echo "1" > /proc/sys/net/ipv4/conf/eth1/rp_filter -X echo "1" > /proc/sys/net/ipv4/conf/lo/rp_filter -} -X -enable_irqbalance() { -X local enabled=$1 -X local proc=0 -X -X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) -X if [ $proc -le 1 ] && [ $enabled -eq 1 ] -X then -X enabled=0 -X fi -X -X log_it "Processors = $proc Enable service ${svc} = $enabled" -X local cfg=/etc/default/irqbalance -X [ -f $cfg ] && sed -i "s/ENABLED=.*$/ENABLED=$enabled/" $cfg && return -} -X -enable_vpc_rpsrfs() { -X local enable=$1 -X if [ $enable -eq 0 ] -X then -X echo 0 > /etc/rpsrfsenable -X else -X echo 1 > /etc/rpsrfsenable -X fi -X -X return 0 -} -X -enable_rpsrfs() { -X local enable=$1 -X -X if [ $enable -eq 0 ] -X then -X echo 0 > /etc/rpsrfsenable -X return 0 -X fi -X -X if [ ! -f /sys/class/net/eth0/queues/rx-0/rps_cpus ] -X then -X echo "rps is not enabled in the kernel" -X echo 0 > /etc/rpsrfsenable -X return 0 -X fi -X -X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) -X if [ $proc -le 1 ] -X then -X echo 0 > /etc/rpsrfsenable -X return 0; -X fi -X -X echo 1 > /etc/rpsrfsenable -X num=1 -X num=$(($num<<$proc)) -X num=$(($num-1)); -X echo $num; -X hex=$(printf "%x\n" $num) -X echo $hex; -X #enable rps -X echo $hex > /sys/class/net/eth0/queues/rx-0/rps_cpus -X echo $hex > /sys/class/net/eth2/queues/rx-0/rps_cpus -X -X #enble rfs -X echo 256 > /proc/sys/net/core/rps_sock_flow_entries -X echo 256 > /sys/class/net/eth0/queues/rx-0/rps_flow_cnt -X echo 256 > /sys/class/net/eth2/queues/rx-0/rps_flow_cnt -} -X -setup_common() { -X init_interfaces $1 $2 $3 -X if [ -n "$ETH0_IP" ] -X then -X setup_interface "0" $ETH0_IP $ETH0_MASK $GW -X fi -X if [ -n "$ETH0_IP6" ] -X then -X setup_interface_ipv6 "0" $ETH0_IP6 $ETH0_IP6_PRELEN -X fi -X setup_interface "1" $ETH1_IP $ETH1_MASK $GW -X if [ -n "$ETH2_IP" ] -X then -X setup_interface "2" $ETH2_IP $ETH2_MASK $GW -X fi -X -X echo $NAME > /etc/hostname -X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon -X hostnamectl set-hostname $NAME -X -X #Nameserver -X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries -X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries -X if [ -n "$internalNS1" ] -X then -X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS1" > /etc/resolv.conf -X fi -X -X if [ -n "$internalNS2" ] -X then -X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS2" >> /etc/resolv.conf -X fi -X if [ -n "$NS1" ] -X then -X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS1" >> /etc/resolv.conf -X fi -X -X if [ -n "$NS2" ] -X then -X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS2" >> /etc/resolv.conf -X fi -X -X if [ -n "$IP6_NS1" ] -X then -X echo "nameserver $IP6_NS1" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $IP6_NS1" >> /etc/resolv.conf -X fi -X if [ -n "$IP6_NS2" ] -X then -X echo "nameserver $IP6_NS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $IP6_NS2" >> /etc/resolv.conf -X fi -X -X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] -X then -X ip route add $MGMTNET via $LOCAL_GW dev eth1 -X fi -X -X ip route delete default -X if [ "$RROUTER" != "1" ] -X then -X gwdev=$3 -X if [ -z "$gwdev" ] -X then -X gwdev="eth0" -X fi -X -X ip route add default via $GW dev $gwdev -X fi -X -X # Workaround to activate vSwitch under VMware -X timeout 3 ping -n -c 3 $GW & -X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] -X then -X timeout 3 ping -n -c 3 $LOCAL_GW & -X #This code is added to address ARP issue by pinging MGMT_GW -X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') -X timeout 3 ping -n -c 3 $MGMT_GW & -X fi -X -X if [ "$HYPERVISOR" == "vmware" ]; then -X ntpq -p &> /dev/null || vmware-toolbox-cmd timesync enable -X fi -} -X -setup_dnsmasq() { -X log_it "Setting up dnsmasq" -X -X touch /etc/dhcpopts.txt -X -X [ -z $DHCP_RANGE ] && [ $ETH0_IP ] && DHCP_RANGE=$ETH0_IP -X [ $ETH0_IP6 ] && DHCP_RANGE_IP6=$ETH0_IP6 -X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" -X #removing the dnsmasq multiple ranges config file. -X rm /etc/dnsmasq.d/multiple_ranges.conf -X -X #get the template -X cp /etc/dnsmasq.conf.tmpl /etc/dnsmasq.conf -X -X if [ -n "$DOMAIN" ] -X then -X #send domain name to dhcp clients -X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\"$DOMAIN\"/ /etc/dnsmasq.conf -X #DNS server will append $DOMAIN to local queries -X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf -X #answer all local domain queries -X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf -X fi -X -X if [ -n "$DNS_SEARCH_ORDER" ] -X then -X sed -i -e "/^[#]*dhcp-option.*=119.*$/d" /etc/dnsmasq.conf -X echo "dhcp-option-force=119,$DNS_SEARCH_ORDER" >> /etc/dnsmasq.conf -X # set the domain search order as a space seprated list for option 15 -X DNS_SEARCH_ORDER=$(echo $DNS_SEARCH_ORDER | sed 's/,/ /g') -X #send domain name to dhcp clients -X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\""$DNS_SEARCH_ORDER"\"/ /etc/dnsmasq.conf -X fi -X -X if [ $DHCP_RANGE ] -X then -X sed -i -e "s/^dhcp-range_ip4=.*$/dhcp-range=$DHCP_RANGE,static/" /etc/dnsmasq.conf -X else -X sed -i -e "s/^dhcp-range_ip4=.*$//" /etc/dnsmasq.conf -X fi -X if [ $DHCP_RANGE_IP6 ] -X then -X sed -i -e "s/^dhcp-range_ip6=.*$/dhcp-range=$DHCP_RANGE_IP6,static/" /etc/dnsmasq.conf -X # For nondefault6 tagged host, don't send dns-server information -X sed -i /nondefault6/d /etc/dnsmasq.conf -X echo "dhcp-option=nondefault6,option6:dns-server" >> /etc/dnsmasq.conf -X else -X sed -i -e "s/^dhcp-range_ip6=.*$//" /etc/dnsmasq.conf -X fi -X -X if [ "$RROUTER" == "1" ] -X then -X DEFAULT_GW=$GUEST_GW -X INTERNAL_DNS=$GUEST_GW -X else -X if [ "$TYPE" == "dhcpsrvr" ] -X then -X DEFAULT_GW=$GW -X else -X DEFAULT_GW=$ETH0_IP -X fi -X INTERNAL_DNS=$ETH0_IP -X fi -X sed -i -e "/^[#]*dhcp-option=option:router.*$/d" /etc/dnsmasq.conf -X [ $DEFAULT_GW ] && echo "dhcp-option=option:router,$DEFAULT_GW" >> /etc/dnsmasq.conf -X -X [ $ETH0_IP ] && [ $NS1 ] && NS="$NS1," -X [ $ETH0_IP ] && [ $NS2 ] && NS="$NS$NS2," -X [ $ETH0_IP6 ] && [ $IP6_NS1 ] && NS6="[$IP6_NS1]," -X [ $ETH0_IP6 ] && [ $IP6_NS2 ] && NS6="$NS6[$IP6_NS2]," -X #for now set up ourself as the dns server as well -X sed -i -e "/^[#]*dhcp-option=6,.*$/d" /etc/dnsmasq.conf -X sed -i -e "/^[#]*dhcp-option=option6:dns-server,.*$/d" /etc/dnsmasq.conf -X if [ "$USE_EXTERNAL_DNS" != "true" ] -X then -X [ $ETH0_IP ] && NS="$INTERNAL_DNS,$NS" -X [ $ETH0_IP6 ] && NS6="[::],$NS6" -X # enable dns -X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf -X else -X # disable dns -X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf -X echo "port=0" >> /etc/dnsmasq.conf -X fi -X NS=${NS%?} -X NS6=${NS6%?} -X [ $ETH0_IP ] && echo "dhcp-option=6,$NS" >> /etc/dnsmasq.conf -X [ $ETH0_IP6 ] && echo "dhcp-option=option6:dns-server,$NS6" >> /etc/dnsmasq.conf -X #adding the name data-server to the /etc/hosts for allowing the access to user-data service and ssh-key reset in every subnet. -X #removing the existing entires to avoid duplicates on restarts. -X sed -i '/data-server/d' /etc/hosts -X if [ -n "$ETH0_IP" ] -X then -X echo "$ETH0_IP data-server" >> /etc/hosts -X fi -X if [ -n "$ETH0_IP6" ] -X then -X echo "$ETH0_IP6 data-server" >> /etc/hosts -X fi -X #add the dhcp-client-update only if dnsmasq version is 2.6 and above -X dnsmasqVersion=$(dnsmasq -v | grep version -m 1 | grep -o "[[:digit:]]\.[[:digit:]]") -X major=$(echo "$dnsmasqVersion" | cut -d '.' -f 1) -X minor=$(echo "$dnsmasqVersion" | cut -d '.' -f 2) -X if [ "$major" -eq '2' -a "$minor" -ge '6' ] || [ "$major" -gt '2' ] -X then -X sed -i -e "/^dhcp-client-update/d" /etc/dnsmasq.conf -X echo 'dhcp-client-update' >> /etc/dnsmasq.conf -X fi -X -X command -v dhcp_release > /dev/null 2>&1 -X no_dhcp_release=$? -X if [ $no_dhcp_release -eq 0 -a -z "$ETH0_IP6" ] -X then -X echo 1 > /var/cache/cloud/dnsmasq_managed_lease -X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf -X else -X echo 0 > /var/cache/cloud/dnsmasq_managed_lease -X fi -} -X -setup_sshd(){ -X local ip=$1 -X local eth=$2 -X [ -f /etc/ssh/sshd_config ] && sed -i -e "s/^[#]*ListenAddress.*$/ListenAddress $ip/" /etc/ssh/sshd_config -X sed -i "/3922/s/eth./$eth/" /etc/iptables/rules.v4 -} -X -setup_vpc_apache2() { -X log_it "Setting up apache web server for VPC" -X systemctl disable apache2 -X clean_ipalias_config -X setup_apache2_common -} -X -clean_ipalias_config() { -X rm -f /etc/apache2/conf.d/ports.*.meta-data.conf -X rm -f /etc/apache2/sites-available/ipAlias* -X rm -f /etc/apache2/sites-enabled/ipAlias* -X rm -f /etc/apache2/conf.d/vhost*.conf -X rm -f /etc/apache2/ports.conf -X rm -f /etc/apache2/vhostexample.conf -X rm -f /etc/apache2/sites-available/* -X rm -f /etc/apache2/sites-enabled/* -X -X rm -rf /etc/failure_config -} -X -setup_apache2_common() { -X sed -i 's/^Include ports.conf.*/# CS: Done by Python CsApp config\n#Include ports.conf/g' /etc/apache2/apache2.conf -X # Disable listing of http://SSVM-IP/icons folder for security issue. see article http://www.i-lateral.com/tutorials/disabling-the-icons-folder-on-an-ubuntu-web-server/ -X [ -f /etc/apache2/mods-available/alias.conf ] && sed -i s/"Options Indexes MultiViews"/"Options -Indexes MultiViews"/ /etc/apache2/mods-available/alias.conf -X -X echo "Options -Indexes" > /var/www/html/.htaccess -} -X -setup_apache2() { -X log_it "Setting up apache web server" -X mkdir -p /var/www -X chown www-data:www-data -R /var/www -X clean_ipalias_config -X setup_apache2_common -X local ip=$1 -} -X -setup_aesni() { -X if [ `grep aes /proc/cpuinfo | wc -l` -gt 0 ] -X then -X modprobe aesni_intel -X fi -} -X -setup_storage_network() { -X if [ x"$STORAGE_IP" == "x" -o x"$STORAGE_NETMASK" == "x" ] -X then -X log_it "Incompleted parameters STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR. Cannot setup storage network" -X return -X fi -X -X echo "" >> /etc/network/interfaces -X echo "auto eth3" >> /etc/network/interfaces -X -X setup_interface "3" "$STORAGE_IP" "$STORAGE_NETMASK" -X [ -n "$MTU" ] && ifconfig eth3 mtu $MTU && echo " mtu $MTU" >> /etc/network/interfaces -X #ip route add "$STORAGE_CIDR" via "$STORAGE_IP" -X log_it "Successfully setup storage network with STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR" -} -X -setup_system_rfc1918_internal() { -X public_ip=`getPublicIp` -X echo "$public_ip" | grep -E "^((127\.)|(10\.)|(172\.1[6-9]\.)|(172\.2[0-9]\.)|(172\.3[0-1]\.)|(192\.168\.))" -X if [ "$?" == "0" ]; then -X log_it "Not setting up route of RFC1918 space to $LOCAL_GW befause $public_ip is RFC1918." -X else -X log_it "Setting up route of RFC1918 space to $LOCAL_GW" -X # Setup general route for RFC 1918 space, as otherwise it will be sent to -X # the public gateway and not work -X # More specific routes that may be set have preference over this generic route. -X ip route add 10.0.0.0/8 via $LOCAL_GW -X ip route add 172.16.0.0/12 via $LOCAL_GW -X ip route add 192.168.0.0/16 via $LOCAL_GW -X fi -} -X -getPublicIp() { -X public_ip=$ETH2_IP -X [ "$ETH2_IP" == "0.0.0.0" ] && public_ip=$ETH1_IP -X echo $public_ip -} -X -setup_ntp() { -X log_it "Setting up NTP" -X NTP_CONF_FILE="/etc/ntp.conf" -X if [ -f $NTP_CONF_FILE ] -X then -X IFS=',' read -a server_list <<< "$NTP_SERVER_LIST" -X for (( iterator=${#server_list[@]}-1 ; iterator>=0 ; iterator-- )) -X do -X server=$(echo ${server_list[iterator]} | tr -d '\r') -X PATTERN="server $server" -X if grep -q "^$PATTERN$" $NTP_CONF_FILE ; then -X sed -i "/^$PATTERN$/d" $NTP_CONF_FILE -X fi -X sed -i "0,/^server/s//$PATTERN\nserver/" $NTP_CONF_FILE -X done -X systemctl enable ntp -X else -X log_it "NTP configuration file not found" -X fi -} -X -routing_svcs() { -X echo "haproxy apache2" > /var/cache/cloud/enabled_svcs -X echo "cloud nfs-common portmap" > /var/cache/cloud/disabled_svcs -X if [ "$RROUTER" -eq "1" ] -X then -X echo "keepalived conntrackd" >> /var/cache/cloud/enabled_svcs -X echo "dnsmasq" >> /var/cache/cloud/disabled_svcs -X else -X echo "dnsmasq" >> /var/cache/cloud/enabled_svcs -X echo "keepalived conntrackd " >> /var/cache/cloud/disabled_svcs -X fi -} -X -parse_cmd_line() { -X CMDLINE=$(cat /var/cache/cloud/cmdline) -X TYPE="unknown" -X BOOTPROTO="static" -X DISABLE_RP_FILTER="false" -X STORAGE_IP="" -X STORAGE_NETMASK="" -X STORAGE_CIDR="" -X VM_PASSWORD="" -X -X CHEF_TMP_FILE=/tmp/cmdline.json -X COMMA="\t" -X echo -e "{\n\"type\": \"cmdline\"," > ${CHEF_TMP_FILE} -X echo -e "\"cmd_line\": {" >> ${CHEF_TMP_FILE} -X -X for i in $CMDLINE -X do -X # search for foo=bar pattern and cut out foo -X KEY=$(echo $i | cut -d= -f1) -X VALUE=$(echo $i | cut -d= -f2) -X echo -en ${COMMA} >> ${CHEF_TMP_FILE} -X # Two lines so values do not accidently interpretted as escapes!! -X echo -n \"${KEY}\"': '\"${VALUE}\" >> ${CHEF_TMP_FILE} -X COMMA=",\n\t" -X case $KEY in -X disable_rp_filter) -X export DISABLE_RP_FILTER=$VALUE -X ;; -X eth0ip) -X export ETH0_IP=$VALUE -X ;; -X eth1ip) -X export ETH1_IP=$VALUE -X ;; -X eth2ip) -X export ETH2_IP=$VALUE -X ;; -X host) -X export MGMT_HOST=$VALUE -X ;; -X gateway) -X export GW=$VALUE -X ;; -X ip6gateway) -X export IP6GW=$VALUE -X ;; -X eth0mask) -X export ETH0_MASK=$VALUE -X ;; -X eth1mask) -X export ETH1_MASK=$VALUE -X ;; -X eth2mask) -X export ETH2_MASK=$VALUE -X ;; -X eth0ip6) -X export ETH0_IP6=$VALUE -X ;; -X eth0ip6prelen) -X export ETH0_IP6_PRELEN=$VALUE -X ;; -X internaldns1) -X export internalNS1=$VALUE -X ;; -X internaldns2) -X export internalNS2=$VALUE -X ;; -X dns1) -X export NS1=$VALUE -X ;; -X dns2) -X export NS2=$VALUE -X ;; -X ip6dns1) -X export IP6_NS1=$VALUE -X ;; -X ip6dns2) -X export IP6_NS2=$VALUE -X ;; -X domain) -X export DOMAIN=$VALUE -X ;; -X dnssearchorder) -X export DNS_SEARCH_ORDER=$VALUE -X ;; -X useextdns) -X export USE_EXTERNAL_DNS=$VALUE -X ;; -X mgmtcidr) -X export MGMTNET=$VALUE -X ;; -X localgw) -X export LOCAL_GW=$VALUE -X ;; -X template) -X export TEMPLATE=$VALUE -X ;; -X sshonguest) -X export SSHONGUEST=$VALUE -X ;; -X name) -X export NAME=$VALUE -X ;; -X dhcprange) -X export DHCP_RANGE=$(echo $VALUE | tr ':' ',') -X ;; -X bootproto) -X export BOOTPROTO=$VALUE -X ;; -X type) -X export TYPE=$VALUE -X ;; -X defaultroute) -X export DEFAULTROUTE=$VALUE -X ;; -X redundant_router) -X export RROUTER=$VALUE -X ;; -X redundant_state) -X export RROUTER_STATE=$VALUE -X ;; -X guestgw) -X export GUEST_GW=$VALUE -X ;; -X guestbrd) -X export GUEST_BRD=$VALUE -X ;; -X guestcidrsize) -X export GUEST_CIDR_SIZE=$VALUE -X ;; -X router_pr) -X export ROUTER_PR=$VALUE -X ;; -X extra_pubnics) -X export EXTRA_PUBNICS=$VALUE -X ;; -X nic_macs) -X export NIC_MACS=$VALUE -X ;; -X mtu) -X export MTU=$VALUE -X ;; -X storageip) -X export STORAGE_IP=$VALUE -X ;; -X storagenetmask) -X export STORAGE_NETMASK=$VALUE -X ;; -X storagecidr) -X export STORAGE_CIDR=$VALUE -X ;; -X vmpassword) -X export VM_PASSWORD=$VALUE -X ;; -X vpccidr) -X export VPCCIDR=$VALUE -X ;; -X cidrsize) -X export CIDR_SIZE=$VALUE -X ;; -X advert_int) -X export ADVERT_INT=$VALUE -X ;; -X ntpserverlist) -X export NTP_SERVER_LIST=$VALUE -X ;; -X esac -X done -X echo -e "\n\t}\n}" >> ${CHEF_TMP_FILE} -X if [ "$TYPE" != "unknown" ] -X then -X mv ${CHEF_TMP_FILE} /var/cache/cloud/cmd_line.json -X fi -X -X [ $ETH0_IP ] && export LOCAL_ADDRS=$ETH0_IP -X [ $ETH0_IP6 ] && export LOCAL_ADDRS=$ETH0_IP6 -X [ $ETH0_IP ] && [ $ETH0_IP6 ] && export LOCAL_ADDRS="$ETH0_IP,$ETH0_IP6" -X -X # Randomize cloud password so only ssh login is allowed -X echo "cloud:`openssl rand -base64 32`" | chpasswd -X -X if [ x"$VM_PASSWORD" != x"" ] -X then -X echo "root:$VM_PASSWORD" | chpasswd -X fi -} -X -parse_cmd_line -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/common.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/common.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/common.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/common.sh': 'MD5 check failed' - ) << \SHAR_EOF -8754c81bacd82458e4ce221b476505ea cloud_scripts/opt/cloud/bin/setup/common.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/common.sh'` -ne 22472 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/common.sh' is not 22472" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -dhcpsrvr_svcs() { -X echo "dnsmasq apache2" > /var/cache/cloud/enabled_svcs -X echo "cloud nfs-common conntrackd keepalived haproxy portmap" > /var/cache/cloud/disabled_svcs -} -X -setup_dhcpsrvr() { -X log_it "Setting up dhcp server system vm" -X setup_common eth0 eth1 -X setup_dnsmasq -X setup_apache2 $ETH0_IP -X -X sed -i /$NAME/d /etc/hosts -X [ $ETH0_IP ] && echo "$ETH0_IP $NAME" >> /etc/hosts -X [ $ETH0_IP6 ] && echo "$ETH0_IP6 $NAME" >> /etc/hosts -X -X enable_irqbalance 0 -X enable_fwding 0 -X -X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 -X -X #Only allow DNS service for current network -X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X -X if [ "$SSHONGUEST" == "true" ] -X then -X setup_sshd $ETH0_IP "eth0" -X else -X setup_sshd $ETH1_IP "eth1" -X fi -} -X -dhcpsrvr_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute dhcpsrvr_svcs" -X exit 1 -fi -setup_dhcpsrvr -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh': 'MD5 check failed' - ) << \SHAR_EOF -08afc46420e5e388ba6be68cfdbd4a59 cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh'` -ne 1985 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' is not 1985" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/cloud-early-config ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/cloud-early-config (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/cloud-early-config (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" -X -# Clear boot up flag, it would be created by rc.local after boot up done -mkdir -p /var/cache/cloud -rm -f /var/cache/cloud/boot_up_done -X -[ -x /sbin/ifup ] || exit 0 -X -X. /lib/lsb/init-functions -X -log_it() { -X echo "$(date) $@" >> /var/log/cloud.log -X log_action_msg "$@" -} -X -patch() { -X local PATCH_MOUNT=/media/cdrom -X local patchfile=$PATCH_MOUNT/cloud-scripts.tgz -X local privkey=$PATCH_MOUNT/authorized_keys -X local md5file=/var/cache/cloud/cloud-scripts-signature -X local cdrom_dev= -X mkdir -p $PATCH_MOUNT -X -X if [ -e /dev/xvdd ]; then -X cdrom_dev=/dev/xvdd -X elif [ -e /dev/cdrom ]; then -X cdrom_dev=/dev/cdrom -X elif [ -e /dev/cdrom1 ]; then -X cdrom_dev=/dev/cdrom1 -X elif [ -e /dev/cdrom2 ]; then -X cdrom_dev=/dev/cdrom2 -X elif [ -e /dev/cdrom3 ]; then -X cdrom_dev=/dev/cdrom3 -X fi -X -X if [ -f /var/cache/cloud/authorized_keys ]; then -X privkey=/var/cache/cloud/authorized_keys -X fi -X -X if [ -n "$cdrom_dev" ]; then -X mount -o ro $cdrom_dev $PATCH_MOUNT -X local oldmd5= -X [ -f ${md5file} ] && oldmd5=$(cat ${md5file}) -X local newmd5= -X [ -f ${patchfile} ] && newmd5=$(md5sum ${patchfile} | awk '{print $1}') -X -X log_it "Scripts checksum detected: oldmd5=$oldmd5 newmd5=$newmd5" -X if [ "$oldmd5" != "$newmd5" ] && [ -f ${patchfile} ] && [ "$newmd5" != "" ] -X then -X tar xzf $patchfile -C / -X echo ${newmd5} > ${md5file} -X log_it "Patched scripts using $patchfile" -X touch /var/cache/cloud/patch.required -X fi -X -X if [ -f $privkey ]; then -X cp -f $privkey /root/.ssh/ -X chmod go-rwx /root/.ssh/authorized_keys -X fi -X fi -X -X return 0 -} -X -start() { -X log_it "Executing cloud-early-config" -X -X # Clear /tmp for file lock -X rm -f /tmp/*.lock -X rm -f /tmp/rrouter_bumped -X rm -f /root/.rnd -X echo "" > /root/.ssh/known_hosts -X -X patch -X sync -X /opt/cloud/bin/setup/bootstrap.sh -X -X log_it "Finished setting up systemvm" -X exit 0 -} -X -start -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/cloud-early-config failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config': 'MD5 check failed' - ) << \SHAR_EOF -c9e5973de3771fd5f5e9b490c60db970 cloud_scripts/opt/cloud/bin/setup/cloud-early-config -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config'` -ne 2765 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' is not 2765" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/default.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/default.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/default.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/default.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/default.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_default() { -X cat > /etc/network/interfaces << EOF -auto lo -iface lo inet loopback -EOF -X cp -f /etc/iptables/rt_tables_init /etc/iproute2/rt_tables -} -X -setup_default -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/default.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/default.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/default.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/default.sh': 'MD5 check failed' - ) << \SHAR_EOF -20e3a01cb77930eba6438de6d9a3f193 cloud_scripts/opt/cloud/bin/setup/default.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/default.sh'` -ne 1002 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/default.sh' is not 1002" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/loadbalancer.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/loadbalancer.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/loadbalancer.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -X -# $Id: loadbalancer.sh 9947 2010-06-25 19:34:24Z manuel $ $HeadURL: svn://svn.lab.vmops.com/repos/vmdev/java/patches/xenserver/root/loadbalancer.sh $ -# loadbalancer.sh -- reconfigure loadbalancer rules -# @VERSION@ -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s: -i -a -d -f -s \n" $(basename $0) >&2 -} -X -# set -x -X -# ensure that the nic has the public ip we are load balancing on -ip_entry() { -X local added=$1 -X local removed=$2 -X -X if [ "$added" == "none" ] -X then -X added="" -X fi -X -X if [ "$removed" == "none" ] -X then -X removed="" -X fi -X -X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") -X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") -X -X for i in $a -X do -X local pubIp=$(echo $i | cut -d: -f1) -X logger -t cloud "Adding public ip $pubIp for load balancing" -X for vif in $VIF_LIST; do -X sudo ip addr add dev $vif $pubIp/32 -X #ignore error since it is because the ip is already there -X done -X done -X -X for i in $r -X do -X logger -t cloud "Removing public ips for deleted loadbalancers" -X local pubIp=$(echo $i | cut -d: -f1) -X logger -t cloud "Removing public ip $pubIp for deleted loadbalancers" -X for vif in $VIF_LIST; do -X sudo ip addr del $pubIp/32 dev $vif -X done -X done -X -X return 0 -} -get_lb_vif_list() { -# add eth0 to the VIF_LIST if it is not there, this allows guest VMs to use the LB service. -X local lb_list="$VIF_LIST eth0"; -X lb_list=$(echo $lb_list | tr " " "\n" | sort | uniq | tr "\n" " ") -X echo $lb_list -} -fw_remove_backup() { -X local lb_vif_list=$(get_lb_vif_list) -X for vif in $lb_vif_list; do -X sudo iptables -F back_load_balancer_$vif 2> /dev/null -X sudo iptables -D INPUT -i $vif -p tcp -j back_load_balancer_$vif 2> /dev/null -X sudo iptables -X back_load_balancer_$vif 2> /dev/null -X done -X sudo iptables -F back_lb_stats 2> /dev/null -X sudo iptables -D INPUT -p tcp -j back_lb_stats 2> /dev/null -X sudo iptables -X back_lb_stats 2> /dev/null -} -fw_restore() { -X local lb_vif_list=$(get_lb_vif_list) -X for vif in $lb_vif_list; do -X sudo iptables -F load_balancer_$vif 2> /dev/null -X sudo iptables -D INPUT -i $vif -p tcp -j load_balancer_$vif 2> /dev/null -X sudo iptables -X load_balancer_$vif 2> /dev/null -X sudo iptables -E back_load_balancer_$vif load_balancer_$vif 2> /dev/null -X done -X sudo iptables -F lb_stats 2> /dev/null -X sudo iptables -D INPUT -p tcp -j lb_stats 2> /dev/null -X sudo iptables -X lb_stats 2> /dev/null -X sudo iptables -E back_lb_stats lb_stats 2> /dev/null -} -# firewall entry to ensure that haproxy can receive on specified port -fw_entry() { -X local added=$1 -X local removed=$2 -X local stats=$3 -X -X if [ "$added" == "none" ] -X then -X added="" -X fi -X -X if [ "$removed" == "none" ] -X then -X removed="" -X fi -X -X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") -X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") -X -# back up the iptable rules by renaming before creating new. -X local lb_vif_list=$(get_lb_vif_list) -X for vif in $lb_vif_list; do -X sudo iptables -E load_balancer_$vif back_load_balancer_$vif 2> /dev/null -X sudo iptables -N load_balancer_$vif 2> /dev/null -X sudo iptables -A INPUT -i $vif -p tcp -j load_balancer_$vif -X done -X sudo iptables -E lb_stats back_lb_stats 2> /dev/null -X sudo iptables -N lb_stats 2> /dev/null -X sudo iptables -A INPUT -p tcp -j lb_stats -X -X for i in $a -X do -X local pubIp=$(echo $i | cut -d: -f1) -X local dport=$(echo $i | cut -d: -f2) -X local lb_vif_list=$(get_lb_vif_list) -X for vif in $lb_vif_list; do -X -#TODO : The below delete will be used only when we upgrade the from older verion to the newer one , the below delete become obsolute in the future. -X sudo iptables -D INPUT -i $vif -p tcp -d $pubIp --dport $dport -j ACCEPT 2> /dev/null -X -X sudo iptables -A load_balancer_$vif -p tcp -d $pubIp --dport $dport -j ACCEPT -X -X if [ $? -gt 0 ] -X then -X return 1 -X fi -X done -X done -X local pubIp=$(echo $stats | cut -d: -f1) -X local dport=$(echo $stats | cut -d: -f2) -X local cidrs=$(echo $stats | cut -d: -f3 | sed 's/-/,/') -X sudo iptables -A lb_stats -s $cidrs -p tcp -m state --state NEW -d $pubIp --dport $dport -j ACCEPT -X -X -#TODO : The below delete in the for-loop will be used only when we upgrade the from older verion to the newer one , the below delete become obsolute in the future. -X for i in $r -X do -X local pubIp=$(echo $i | cut -d: -f1) -X local dport=$(echo $i | cut -d: -f2) -X -X for vif in $VIF_LIST; do -X sudo iptables -D INPUT -i $vif -p tcp -d $pubIp --dport $dport -j ACCEPT 2> /dev/null -X done -X done -X -X return 0 -} -X -#Hot reconfigure HA Proxy in the routing domain -reconfig_lb() { -X logger -t cloud "Reconfiguring loadbalancer using $1" -X /root/reconfigLB.sh $1 -X return $? -} -X -# Restore the HA Proxy to its previous state, and revert iptables rules on DomR -restore_lb() { -X logger -t cloud "Restoring HA Proxy to previous state" -X # Copy the old version of haproxy.cfg into the file that reconfigLB.sh uses -X cp /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg.new -X -X if [ $? -eq 0 ] -X then -X # Run reconfigLB.sh again -X /root/reconfigLB.sh /etc/haproxy/haproxy.cfg.new -X fi -} -X -get_vif_list() { -X local vif_list="" -X for i in /sys/class/net/eth*; do -X vif=$(basename $i); -X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] -X then -X vif_list="$vif_list $vif"; -X fi -X done -X if [ "$vif_list" == "" ] -X then -X vif_list="eth0" -X fi -X -X logger -t cloud "Loadbalancer public interfaces = $vif_list" -X echo $vif_list -} -X -mflag= -iflag= -aflag= -dflag= -fflag= -sflag= -X -while getopts 'i:a:d:f:s:' OPTION -do -X case $OPTION in -X i) iflag=1 -X domRIp="$OPTARG" -X ;; -X a) aflag=1 -X addedIps="$OPTARG" -X ;; -X d) dflag=1 -X removedIps="$OPTARG" -X ;; -X f) fflag=1 -X cfgfile="$OPTARG" -X ;; -X s) sflag=1 -X statsIp="$OPTARG" -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [ "$addedIps" == "" ] -then -X addedIps="none" -fi -X -X -if [ "$removedIps" == "" ] -then -X removedIps="none" -fi -X -VIF_LIST=$(get_vif_list) -X -X -if [ "$addedIps" == "" ] -then -X addedIps="none" -fi -X -if [ "$removedIps" == "" ] -then -X removedIps="none" -fi -X -#FIXME: make this explicit via check on vm type or passed in flag -if [ "$VIF_LIST" == "eth0" ] -then -X ip_entry $addedIps $removedIps -fi -X -# hot reconfigure haproxy -reconfig_lb $cfgfile -X -if [ $? -gt 0 ] -then -X logger -t cloud "Reconfiguring loadbalancer failed" -X #FIXME: make this explicit via check on vm type or passed in flag -X if [ "$VIF_LIST" == "eth0" ] -X then -X ip_entry $removedIps $addedIps -X fi -X unlock_exit 1 $lock $locked -fi -X -# iptables entry to ensure that haproxy receives traffic -fw_entry $addedIps $removedIps $statsIp -X -if [ $? -gt 0 ] -then -X logger -t cloud "Failed to apply firewall rules for load balancing, reverting HA Proxy config" -X # Restore the LB -X restore_lb -X -X logger -t cloud "Reverting firewall config" -X # Revert iptables rules on DomR -X fw_restore -X -X #FIXME: make this explicit via check on vm type or passed in flag -X if [ "$VIF_LIST" == "eth0" ] -X then -X logger -t cloud "Reverting ip address changes to eth0" -X ip_entry $removedIps $addedIps -X fi -X -X unlock_exit 1 $lock $locked -else -X # Remove backedup iptable rules -X fw_remove_backup -fi -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/loadbalancer.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/loadbalancer.sh': 'MD5 check failed' - ) << \SHAR_EOF -6da53e4d9dd0b11f6fa334c6f583f8cd cloud_scripts/opt/cloud/bin/loadbalancer.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/loadbalancer.sh'` -ne 8234 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' is not 8234" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/baremetal_snat.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/baremetal_snat.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/baremetal_snat.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' && -#!/bin/bash -X -#Licensed to the Apache Software Foundation (ASF) under one -#or more contributor license agreements. See the NOTICE file -#distributed with this work for additional information -#regarding copyright ownership. The ASF licenses this file -#to you under the Apache License, Version 2.0 (the -#"License"); you may not use this file except in compliance -#with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -#Unless required by applicable law or agreed to in writing, -#software distributed under the License is distributed on an -#"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -#KIND, either express or implied. See the License for the -#specific language governing permissions and limitations -#under the License. -X -set +u -X -mgmt_nic_ip=$1 -internal_server_ip=$2 -gateway_ip=$3 -X -ip route | grep "$internal_server_ip" > /dev/null -X -if [ $? -ne 0 ]; then -X ip route add $internal_server_ip via $gateway_ip -fi -X -iptables-save | grep -- "-A POSTROUTING -d $internal_server_ip" > /dev/null -X -if [ $? -ne 0 ]; then -X iptables -t nat -A POSTROUTING -d $internal_server_ip -j SNAT --to-source $mgmt_nic_ip -fi -X -X -iptables-save | grep -- "-A INPUT -i eth0 -p udp -m udp --dport 69 -j ACCEPT" > /dev/null -if [ $? -ne 0 ]; then -X iptables -I INPUT -i eth0 -p udp -m udp --dport 69 -j ACCEPT -fi -X -iptables-save | grep -- "-A FORWARD -i eth1 -o eth0 -j ACCEPT" > /dev/null -if [ $? -ne 0 ]; then -X iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT -fi -X -rule="-A FORWARD -d $internal_server_ip/32 -i eth0 -o eth1 -j ACCEPT" -iptables-save | grep -- "$rule" > /dev/null -if [ $? -ne 0 ]; then -X iptables -I FORWARD -d $internal_server_ip/32 -i eth0 -o eth1 -j ACCEPT -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/baremetal_snat.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh': 'MD5 check failed' - ) << \SHAR_EOF -acab3e2b25ee898e7dd05c4e77b15569 cloud_scripts/opt/cloud/bin/baremetal_snat.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh'` -ne 1717 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' is not 1717" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_vpnusers.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vpnusers.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vpnusers.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import copy -X -X -def merge(dbag, data): -X dbagc = copy.deepcopy(dbag) -X -X print dbag -X print data -X if "vpn_users" not in data: -X return dbagc -X -X # remove previously deleted user from the dict -X for user in dbagc.keys(): -X if user == 'id': -X continue -X userrec = dbagc[user] -X add = userrec['add'] -X if not add: -X del(dbagc[user]) -X -X for user in data['vpn_users']: -X username = user['user'] -X add = user['add'] -X if username not in dbagc.keys(): -X dbagc[username] = user -X elif username in dbagc.keys() and not add: -X dbagc[username] = user -X -X return dbagc -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_vpnusers.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py': 'MD5 check failed' - ) << \SHAR_EOF -d54ff81fd9901ecc0bfbe9528343e238 cloud_scripts/opt/cloud/bin/cs_vpnusers.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py'` -ne 1469 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' is not 1469" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/merge.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/merge.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/merge.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/merge.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/merge.py' && -#!/usr/bin/python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import json -import os -import uuid -import logging -import gzip -import shutil -import cs_ip -import cs_guestnetwork -import cs_cmdline -import cs_vmp -import cs_network_acl -import cs_firewallrules -import cs_loadbalancer -import cs_monitorservice -import cs_vmdata -import cs_dhcp -import cs_forwardingrules -import cs_site2sitevpn -import cs_remoteaccessvpn -import cs_vpnusers -import cs_staticroutes -X -X -class DataBag: -X -X DPATH = "/etc/cloudstack" -X -X def __init__(self): -X self.bdata = {} -X -X def load(self): -X data = self.bdata -X if not os.path.exists(self.DPATH): -X os.makedirs(self.DPATH) -X self.fpath = os.path.join(self.DPATH, self.key + '.json') -X -X try: -X with open(self.fpath, 'r') as _fh: -X logging.debug("Loading data bag type %s", self.key) -X data = json.load(_fh) -X except (IOError, ValueError): -X logging.debug("Caught load error, creating empty data bag type %s", self.key) -X data.update({"id": self.key}) -X finally: -X self.dbag = data -X -X def save(self, dbag): -X try: -X with open(self.fpath, 'w') as _fh: -X logging.debug("Writing data bag type %s", self.key) -X json.dump( -X dbag, _fh, -X sort_keys=True, -X indent=2 -X ) -X except IOError: -X logging.error("Could not write data bag %s", self.key) -X -X def getDataBag(self): -X return self.dbag -X -X def setKey(self, key): -X self.key = key -X -X -class updateDataBag: -X -X DPATH = "/etc/cloudstack" -X -X def __init__(self, qFile): -X self.qFile = qFile -X self.fpath = '' -X self.bdata = {} -X self.process() -X -X def process(self): -X self.db = DataBag() -X if (self.qFile.type == "staticnatrules" or self.qFile.type == "forwardrules"): -X self.db.setKey("forwardingrules") -X else: -X self.db.setKey(self.qFile.type) -X dbag = self.db.load() -X logging.info("Command of type %s received", self.qFile.type) -X -X if self.qFile.type == 'ips': -X dbag = self.processIP(self.db.getDataBag()) -X elif self.qFile.type == 'guestnetwork': -X dbag = self.processGuestNetwork(self.db.getDataBag()) -X elif self.qFile.type == 'cmdline': -X dbag = self.processCL(self.db.getDataBag()) -X elif self.qFile.type == 'vmpassword': -X dbag = self.processVMpassword(self.db.getDataBag()) -X elif self.qFile.type == 'networkacl': -X dbag = self.process_network_acl(self.db.getDataBag()) -X elif self.qFile.type == 'firewallrules': -X dbag = self.process_firewallrules(self.db.getDataBag()) -X elif self.qFile.type == 'loadbalancer': -X dbag = self.process_loadbalancer(self.db.getDataBag()) -X elif self.qFile.type == 'monitorservice': -X dbag = self.process_monitorservice(self.db.getDataBag()) -X elif self.qFile.type == 'vmdata': -X dbag = self.processVmData(self.db.getDataBag()) -X elif self.qFile.type == 'dhcpentry': -X dbag = self.process_dhcp_entry(self.db.getDataBag()) -X elif self.qFile.type == 'staticnatrules' or self.qFile.type == 'forwardrules': -X dbag = self.processForwardingRules(self.db.getDataBag()) -X elif self.qFile.type == 'site2sitevpn': -X dbag = self.process_site2sitevpn(self.db.getDataBag()) -X elif self.qFile.type == 'remoteaccessvpn': -X dbag = self.process_remoteaccessvpn(self.db.getDataBag()) -X elif self.qFile.type == 'vpnuserlist': -X dbag = self.process_vpnusers(self.db.getDataBag()) -X elif self.qFile.type == 'staticroutes': -X dbag = self.process_staticroutes(self.db.getDataBag()) -X elif self.qFile.type == 'ipaliases': -X self.db.setKey('ips') -X self.db.load() -X dbag = self.process_ipaliases(self.db.getDataBag()) -X elif self.qFile.type == 'dhcpconfig': -X logging.error("I don't think I need %s anymore", self.qFile.type) -X return -X else: -X logging.error("Error I do not know what to do with file of type %s", self.qFile.type) -X return -X self.db.save(dbag) -X -X def processGuestNetwork(self, dbag): -X d = self.qFile.data -X dp = {} -X dp['public_ip'] = d['router_guest_ip'] -X dp['netmask'] = d['router_guest_netmask'] -X dp['source_nat'] = False -X dp['add'] = d['add'] -X dp['one_to_one_nat'] = False -X dp['gateway'] = d['router_guest_gateway'] -X dp['nic_dev_id'] = d['device'][3:] -X dp['nw_type'] = 'guest' -X dp = PrivateGatewayHack.update_network_type_for_privategateway(dbag, dp) -X qf = QueueFile() -X qf.load({'ip_address': [dp], 'type': 'ips'}) -X if 'domain_name' not in d.keys() or d['domain_name'] == '': -X d['domain_name'] = "cloudnine.internal" -X -X d = PrivateGatewayHack.update_network_type_for_privategateway(dbag, d) -X return cs_guestnetwork.merge(dbag, d) -X -X def process_dhcp_entry(self, dbag): -X return cs_dhcp.merge(dbag, self.qFile.data) -X -X def process_site2sitevpn(self, dbag): -X return cs_site2sitevpn.merge(dbag, self.qFile.data) -X -X def process_remoteaccessvpn(self, dbag): -X return cs_remoteaccessvpn.merge(dbag, self.qFile.data) -X -X def process_vpnusers(self, dbag): -X return cs_vpnusers.merge(dbag, self.qFile.data) -X -X def process_network_acl(self, dbag): -X return cs_network_acl.merge(dbag, self.qFile.data) -X -X def process_firewallrules(self, dbag): -X return cs_firewallrules.merge(dbag, self.qFile.data) -X -X def process_loadbalancer(self, dbag): -X return cs_loadbalancer.merge(dbag, self.qFile.data) -X -X def process_monitorservice(self, dbag): -X return cs_monitorservice.merge(dbag, self.qFile.data) -X -X def process_staticroutes(self, dbag): -X return cs_staticroutes.merge(dbag, self.qFile.data) -X -X def processVMpassword(self, dbag): -X return cs_vmp.merge(dbag, self.qFile.data) -X -X def processForwardingRules(self, dbag): -X # to be used by both staticnat and portforwarding -X return cs_forwardingrules.merge(dbag, self.qFile.data) -X -X def processIP(self, dbag): -X for ip in self.qFile.data["ip_address"]: -X dbag = cs_ip.merge(dbag, ip) -X return dbag -X -X def processCL(self, dbag): -X # Convert the ip stuff to an ip object and pass that into cs_ip_merge -X # "eth0ip": "192.168.56.32", -X # "eth0mask": "255.255.255.0", -X self.newData = [] -X if (self.qFile.data['cmd_line']['type'] == "router"): -X self.processCLItem('0', "guest") -X self.processCLItem('1', "control") -X self.processCLItem('2', "public") -X elif (self.qFile.data['cmd_line']['type'] == "vpcrouter"): -X self.processCLItem('0', "control") -X elif (self.qFile.data['cmd_line']['type'] == "dhcpsrvr"): -X self.processCLItem('0', "guest") -X self.processCLItem('1', "control") -X elif (self.qFile.data['cmd_line']['type'] == "ilbvm"): -X self.processCLItem('0', "guest") -X self.processCLItem('1', "control") -X -X return cs_cmdline.merge(dbag, self.qFile.data) -X -X def processCLItem(self, num, nw_type): -X key = 'eth' + num + 'ip' -X dp = {} -X if(key in self.qFile.data['cmd_line']): -X dp['public_ip'] = self.qFile.data['cmd_line'][key] -X dp['netmask'] = self.qFile.data['cmd_line']['eth' + num + 'mask'] -X dp['source_nat'] = False -X dp['add'] = True -X dp['one_to_one_nat'] = False -X if nw_type == "public": -X dp['gateway'] = self.qFile.data['cmd_line']['gateway'] -X else: -X if('localgw' in self.qFile.data['cmd_line']): -X dp['gateway'] = self.qFile.data['cmd_line']['localgw'] -X else: -X dp['gateway'] = '' -X dp['nic_dev_id'] = num -X dp['nw_type'] = nw_type -X qf = QueueFile() -X qf.load({'ip_address': [dp], 'type': 'ips'}) -X -X def processVmData(self, dbag): -X cs_vmdata.merge(dbag, self.qFile.data) -X return dbag -X -X def process_ipaliases(self, dbag): -X nic_dev = None -X # Should be a way to deal with this better -X for intf, data in dbag.items(): -X if intf == 'id': -X continue -X elif any([net['nw_type'] == 'guest' for net in data]): -X nic_dev = intf -X break -X -X assert nic_dev is not None, 'Unable to determine Guest interface' -X -X nic_dev_id = nic_dev[3:] -X -X for alias in self.qFile.data['aliases']: -X ip = { -X 'add': not alias['revoke'], -X 'nw_type': 'guest', -X 'public_ip': alias['ip_address'], -X 'netmask': alias['netmask'], -X 'nic_dev_id': nic_dev_id -X } -X dbag = cs_ip.merge(dbag, ip) -X return dbag -X -X -class QueueFile: -X -X fileName = '' -X configCache = "/var/cache/cloud" -X keep = True -X data = {} -X -X def load(self, data): -X if data is not None: -X self.data = data -X self.type = self.data["type"] -X updateDataBag(self) -X return -X filename = '{cache_location}/{json_file}'.format(cache_location=self.configCache, json_file=self.fileName) -X try: -X handle = open(filename) -X except IOError as exception: -X error_message = ("Exception occurred with the following exception error '{error}'. Could not open '{filename}'. " -X "It seems that the file has already been moved.".format(error=exception, filename=filename)) -X logging.error(error_message) -X else: -X logging.info("Continuing with the processing of file '{filename}'".format(filename=filename)) -X -X self.data = json.load(handle) -X self.type = self.data["type"] -X handle.close() -X if self.keep: -X self.__moveFile(filename, self.configCache + "/processed") -X else: -X logging.debug("Processed file deleted: %s and not kept in /processed", filename) -X os.remove(filename) -X updateDataBag(self) -X -X def setFile(self, name): -X self.fileName = name -X -X def getType(self): -X return self.type -X -X def getData(self): -X return self.data -X -X def setPath(self, path): -X self.configCache = path -X -X def __moveFile(self, origPath, path): -X if not os.path.exists(path): -X os.makedirs(path) -X originalName = os.path.basename(origPath) -X if originalName.count(".") == 1: -X originalName += "." + str(uuid.uuid4()) -X zipped_file_name = path + "/" + originalName + ".gz" -X with open(origPath, 'rb') as f_in, gzip.open(zipped_file_name, 'wb') as f_out: -X shutil.copyfileobj(f_in, f_out) -X os.remove(origPath) -X -X logging.debug("Processed file written to %s", zipped_file_name) -X -X -class PrivateGatewayHack: -X -X @classmethod -X def update_network_type_for_privategateway(cls, dbag, data): -X ip = data['router_guest_ip'] if 'router_guest_ip' in data.keys() else data['public_ip'] -X -X initial_data = cls.load_inital_data() -X has_private_gw_ip = cls.if_config_has_privategateway(initial_data) -X private_gw_matches = 'privategateway' in initial_data['config'] and cls.ip_matches_private_gateway_ip(ip, initial_data['config']['privategateway']) -X -X if has_private_gw_ip and private_gw_matches: -X data['nw_type'] = "public" -X logging.debug("Updating nw_type for ip %s" % ip) -X else: -X logging.debug("Not updating nw_type for ip %s because has_private_gw_ip = %s and private_gw_matches = %s " % (ip, has_private_gw_ip, private_gw_matches)) -X return data -X -X @classmethod -X def if_config_has_privategateway(cls, dbag): -X return 'privategateway' in dbag['config'].keys() and dbag['config']['privategateway'] != "None" -X -X @classmethod -X def ip_matches_private_gateway_ip(cls, ip, private_gateway_ip): -X new_ip_matches_private_gateway_ip = False -X if ip == private_gateway_ip: -X new_ip_matches_private_gateway_ip = True -X return new_ip_matches_private_gateway_ip -X -X @classmethod -X def load_inital_data(cls): -X initial_data_bag = DataBag() -X initial_data_bag.setKey('cmdline') -X initial_data_bag.load() -X initial_data = initial_data_bag.getDataBag() -X logging.debug("Initial data = %s" % initial_data) -X -X return initial_data -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/merge.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/merge.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/merge.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/merge.py': 'MD5 check failed' - ) << \SHAR_EOF -dc7c85d58b4e5f38ae61c82679523884 cloud_scripts/opt/cloud/bin/merge.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/merge.py'` -ne 13492 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/merge.py' is not 13492" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/master.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/master.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/master.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/master.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/master.py -M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2!&875L="(I"BAO<'1I -M;VYS+"!A/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/master.py': 'MD5 check failed' - ) << \SHAR_EOF -602ac6725c182da5ffa17760b2fe3ba5 cloud_scripts/opt/cloud/bin/master.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/master.py'` -ne 2040 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/master.py' is not 2040" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/set_redundant.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/set_redundant.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/set_redundant.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/set_redundant.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/set_redundant.py -M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/set_redundant.py': 'MD5 check failed' - ) << \SHAR_EOF -648b240f11d938ebd185d0e2a75004b8 cloud_scripts/opt/cloud/bin/set_redundant.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/set_redundant.py'` -ne 1663 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/set_redundant.py' is not 1663" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/checks2svpn.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checks2svpn.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/checks2svpn.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -if [ -z $1 ] -then -X echo "Fail to find VPN peer address!" -X exit 1 -fi -X -ipsec status vpn-$1 > /tmp/vpn-$1.status -X -cat /tmp/vpn-$1.status | grep "ESTABLISHED" > /dev/null -ipsecok=$? -if [ $ipsecok -ne 0 ] -then -X echo -n "IPsec SA not found;" -X echo "Site-to-site VPN have not connected" -X exit 11 -fi -echo -n "IPsec SA found;" -echo "Site-to-site VPN have connected" -Xexit 0 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/checks2svpn.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checks2svpn.sh': 'MD5 check failed' - ) << \SHAR_EOF -8aed94140f491ae027b3b55e9b1535bb cloud_scripts/opt/cloud/bin/checks2svpn.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checks2svpn.sh'` -ne 1178 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' is not 1178" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, vpn): -X key = vpn['vpn_server_ip'] -X op = vpn['create'] -X if key in dbag.keys() and not op: -X del(dbag[key]) -X else: -X dbag[key] = vpn -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py': 'MD5 check failed' - ) << \SHAR_EOF -9945565c7eb92c9fd9aa85648f8c4352 cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py'` -ne 994 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' is not 994" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_staticroutes.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_staticroutes.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_staticroutes.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, staticroutes): -X for route in staticroutes['routes']: -X key = route['network'] -X dbag[key] = route -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_staticroutes.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py': 'MD5 check failed' - ) << \SHAR_EOF -c89832deefffed1dcc12b367d9f9062e cloud_scripts/opt/cloud/bin/cs_staticroutes.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py'` -ne 952 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' is not 952" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, vpn): -X key = vpn['peer_gateway_ip'] -X op = vpn['create'] -X if key in dbag.keys() and not op: -X del(dbag[key]) -X else: -X dbag[key] = vpn -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py': 'MD5 check failed' - ) << \SHAR_EOF -37138a9d2b00c0cd0488f03f0b1e1c34 cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py'` -ne 996 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' is not 996" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/passwd_server_ip.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/passwd_server_ip.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/passwd_server_ip.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/passwd_server_ip.py -M(R$O=7-R+V)I;B]E;G8@<'ET:&]N"B,@3&EC96YS960@=&\@=&AE($%P86-H -M92!3;V9T=V%R92!&;W5N9&%T:6]N("A!4T8I('5N9&5R(&]N90HC(&]R(&UO -M2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N5]P87-S=V]R9"<@/')O=71E$EN(",L -M($9O2AO3H*("`@("`@("!W:71H(&9I;&4H9V5T4&%S -M&-E<'0@24]%3H* -M("`@("`@("`@("`@=VET:"!F:6QE*&=E=%!A&-E -M<'0@24]%"<*("`@(&1E9B!D;U]'150H5]P87-S=V]R9"7!E(#T]("=S879E9%]P87-S=V]R9"7-L;VR=215%515-47TU%5$A/1"7!E)UTL"B`@("`@("`@("`@("`@ -M("`@("`@?2D*("`@("`@("!S96QF+G-E;F1?7-L;V6EN9R!T;R!S879E('!A7-L;V6EN9R!T;R!S879E('!A7-L -M;V7-L;V7-L;V7,N87)G=BD@/B`Q -M.@H@("`@("`@(&%D9')E7-L -M;V6)O87)D26YT97)R -M=7!T.@H@("`@("`@('-Y7-L;V&-E<'0@17AC97!T:6]N+"!E.@H@("`@("`@('-Y7-L;V&-E<'1I;VX@)7,@+2T@ -M9&EE9"<@)2!E*0H@("`@("`@('!A/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py': 'MD5 check failed' - ) << \SHAR_EOF -1d63c1d8b2e5a6a48d48d76228964aee cloud_scripts/opt/cloud/bin/passwd_server_ip.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py'` -ne 7020 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py' is not 7020" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_network_acl.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_network_acl.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_network_acl.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_network_acl.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_network_acl.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_network_acl.py': 'MD5 check failed' - ) << \SHAR_EOF -79760ec4739cb68a9a8bf86319a2dd65 cloud_scripts/opt/cloud/bin/cs_network_acl.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_network_acl.py'` -ne 881 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_network_acl.py' is not 881" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cleanup.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cleanup.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cleanup.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cleanup.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cleanup.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -#rm -rf $@ && echo $? -X -zip_file=$1 -if [ -e "$zip_file" ]; -then -X rm -rf "$zip_file" -X echo "Deleting diagnostics zip file $zip_file" -else -X echo "File $zip_file not found in vm " -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cleanup.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cleanup.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cleanup.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cleanup.sh': 'MD5 check failed' - ) << \SHAR_EOF -63ca1758ffda6344d2622a21f5fc15b9 cloud_scripts/opt/cloud/bin/cleanup.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cleanup.sh'` -ne 986 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cleanup.sh' is not 986" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_loadbalancer.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_loadbalancer.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_loadbalancer.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import copy -X -X -def merge(dbag, data): -X """ Simply overwrite the existsing bag as, the whole configuration is sent every time """ -X if "rules" not in data: -X return dbag -X dbag['config'] = data['rules'] -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_loadbalancer.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py': 'MD5 check failed' - ) << \SHAR_EOF -667380d51eaa9aade2317d66a11529aa cloud_scripts/opt/cloud/bin/cs_loadbalancer.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py'` -ne 1016 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' is not 1016" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpc_func.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_func.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_func.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_func.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_func.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# @VERSION@ -X -getEthByIp (){ -X local ip=$1 -X for dev in `ls -1 /sys/class/net | grep eth` -X do -X sudo ip addr show dev $dev | grep $ip\/ > /dev/null -X if [ $? -eq 0 ] -X then -X echo $dev -X return 0 -X fi -X done -X return 1 -} -X -getVPCcidr () { -X CMDLINE=$(cat /var/cache/cloud/cmdline) -X for i in $CMDLINE -X do -X # search for foo=bar pattern and cut out foo -X KEY=$(echo $i | cut -d= -f1) -X VALUE=$(echo $i | cut -d= -f2) -X if [ "$KEY" == "vpccidr" ] -X then -X echo "$VALUE" -X return 0 -X fi -X done -X return 1 -} -X -removeRulesForIp() { -X local ip=$1 -X iptables-save -t mangle | grep $ip | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t mangle $rule -X done -X iptables-save -t nat | grep $ip | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t nat $rule -X done -X iptables-save -t filter | grep $ip | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t filter $rule -X done -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_func.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_func.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_func.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_func.sh': 'MD5 check failed' - ) << \SHAR_EOF -bc1b0432818cc40ea79df6720e16ecad cloud_scripts/opt/cloud/bin/vpc_func.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_func.sh'` -ne 1849 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_func.sh' is not 1849" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsDhcp.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsDhcp.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N'0B"D1(0U!?3U!44R`]("(O971C+V1H8W!O<'1S -M+G1X="(*0TQ/541?0T].1B`]("(O971C+V1N"`](#`*("`@("`@("!L:7-T96Y?861D0H@("`@("`@("`@("!G871E=V%Y(#T@ -M)R<*("`@("`@("`@("`@:68@2`](&E;)V=A=&5W -M87DG70H@("`@("`@("`@("!S;&EN92`](")D:&-P+7)A;F=E/7-E=#II;G1E -M"P@9V%T97=A>2D*("`@("`@("`@("`@96QS93H*("`@ -M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UR86YG93US970Z:6YT97)F86-E -M+25S+25S+"5S+'-T871I8R(@)2`H9&5V:6-E+"!I9'@L(&EP*0H@("`@("`@ -M("`@("!S96QF+F-O;F8N"D*("`@("`@("`@("`@;&EN92`](")D:&-P+6]P -M=&EO;CUT86"P@9VXN9V5T7V1O;6%I;B@I*0H@("`@("`@("`@("!S96QF+F-O;F8N"!F;W(@>"!I;B!G;BYG971?9&YS*"D@:68@>%T*("`@ -M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C -M92TE"P@)RPG+FIO:6XH9&YS7VQI -M2`A/2`G,"XP+C`N,""D*("`@("`@("`@("`@("`@ -M(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C92TE"P@9V%T97=A>2D*("`@("`@("`@("`@("`@('-E -M;&8N8V]N9BYS96%R8V@H"P@;F5T;6%S:RD*("`@("`@("`@("`@"`K/2`Q"@H@("`@("`@(",@ -M3&ES=&5N($%D9')E3H*("`@ -M("`@("`@("`@;&]G9VEN9RYI;F9O*")!='1E;7!T:6YG('1O(&1E;&5T92!E -M;G1R:65S(&9R;VT@9&YS;6%S<2YL96%S97,@9FEL92!F;W(@5DUS('=H:6-H -M(&%R92!N;W0@;VX@9&AC<&AOW!R:6YT("0S?22DZ"B`@("`@("`@5LG:7!V-%]A -M9&1R97-S)UTL(&5N=')Y6R=H;W-T7VYA;64G72D*("`@("`@("`C($QE87-E -M('1I;64@'!U;F=E9"P@:71S(&%C=&EV -M92!L96%S92!A;F0@1$A#4"]$3E,@8V]N9FEG(&ES('!R;W!E2!I2!R=6YN:6YG(&EN('!R;V1U8W1I;VYS -M('-Y5LG:7!V-%]A9&1R -M97-S)UTL"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@ -M("`@("`@("`@("`@("!E;G1R>5LG:&]S=%]N86UE)UTL"B`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!L96%S -M92DI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L)7,B("4@ -M*'1A9RP@,RDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L -M)7,B("4@*'1A9RP@-BDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D -M9"@B)7,L)7,B("4@*'1A9RP@,34I*0H*("`@("`@("!I(#T@25!!9&1R97-S -M*&5N=')Y6R=I<'8T7V%D9')E2==(#T@96YT2=="@H@("`@9&5F(&%D9%]H;W-T*'-E;&8L(&EP+"!H;W-T -M/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py': 'MD5 check failed' - ) << \SHAR_EOF -bcf1831b38d86bf041523540fa8f821e cloud_scripts/opt/cloud/bin/cs/CsDhcp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py'` -ne 8809 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' is not 8809" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsRedundant.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsRedundant.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N7,N2`](%1R=64*"B`@ -M("`@("`@:68@;F]T(&ES1&5V:6-E4F5A9'DZ"B`@("`@("`@("`@(&QO9V=I -M;F5]I9E]N965D960H"B`@("`@("`@("`@("(E&5C("1$045-3TX@+2T@+2UVR(L(")](BP@6PH@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("`@("(@("`@("`@(&%U=&A?='EP92!!2"!< -M;B(L("(@("`@("`@(&%U=&A?<&%S2AC;VYN=')A8VMD7W1E;7!L871E7V-O;F8L(&-O;FYT0H@("`@("`@("(B(@H@("`@("`@(&ET97)A=&EO;G,@ -M/2`Q,`H@("`@("`@('1I;65?8F5T=V5E;B`](#$*"B`@("`@("`@9F]R(&ET -M97(@:6X@3H* -M("`@("`@("`@("`@("`@(',@/2!S;V-K970N2!R=6YN:6YG("@E9#HE2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I<"@I*2YS=&]P*"D* -M"B`@("`@("`@0W-(96QP97(N2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@ -M("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")!9&1I;F<@9V%T97=A>2`]/3X@ -M)7,@=&\@9&5V:6-E(#T]/B`E2P@9&5V*2D*("`@("`@ -M("`@("`@("`@("`@("!I9B!D978@/3T@0W-(96QP97(N4%5"3$E#7TE.5$52 -M1D%#15-;&5C -M=71E*"(E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I -M<"@I*2YR97-T87)T*"D*"B`@("`@("`@0W-(96QP97(N2D*"B`@("`@("`@("`@(",@5&AE(&9I -M2!I;G1E2!V'1E2!E=F5R(&)E(&]N92!A9&1R97-S(&EN -M(&$@5E!#('1H97)E(&-A;B!B92!M86YY"B`@("`@("`@5&AE(&YE=R!C;V1E -M(&%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py': 'MD5 check failed' - ) << \SHAR_EOF -6936e38f53736f7c5a04b255800a242d cloud_scripts/opt/cloud/bin/cs/CsRedundant.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py'` -ne 16789 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' is not 16789" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsHelper.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsHelper.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsHelper.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsHelper.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B -M971H,2)]"@I35$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S -M:"`M8R`@)VEF(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@ -M96QS92!E8VAO(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@ -M(")V<&-R;W5T97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@ -M6R`D,"`]/2!<(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ -M"B`@("`@("`@("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@ -M("`@("`@(&-M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@ -M("`@("`@;&]G9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S -M(B`E('-T871E7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X -M96-U=&4H7!E*"E=(&%N9"!S -M=&%T92`]/2`B34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE -M8W5T92AC;60I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ -M("`@("`@(&5X96-U=&4H8VUD*0H*"F1E9B!I&5C=71E -M*")M;W5N="!T;7!F6XH=F%L*3H*("`@(&EF('9A;#H* -M("`@("`@("!R971U&5C=71E*")I<"!A9&1R('-H;W<@ -M?&=R97`@+78@WT*("`@("`@("`@("`@ -M=&];)VEP)UT@/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A -M;'-;+3%="B`@("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@ -M("(B(@H@("`@9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G -M*")3879I;F<@:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C -M=71E*")S>7-T96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I -M;F7-T96UC=&P@&5C=71E*")K:6QL -M("U(55`@)7,B("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D -M;G-M87-Q(BP@(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py': 'MD5 check failed' - ) << \SHAR_EOF -9bdd1fdfea8177d3e408b2cc87e5d503 cloud_scripts/opt/cloud/bin/cs/CsHelper.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py'` -ne 7644 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' is not 7644" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5NWT*("`@("`@("!S96QF+F=U97-T(#T@5')U90H@("`@("`@ -M(&1B(#T@1&%T84)A9R@I"B`@("`@("`@9&(N7,H*2!A;F0@;&5N*&1B86=;9&5V:6-E -M72D@(3T@,#H*("`@("`@("`@("`@2==*0H*("`@ -M("`@("!I9B`G9&YS)R!I;B!S96QF+F1A=&$Z"B`@("`@("`@("`@(&1N'1E;F0H&-E<'1I;VXN"B`@("`@("`@:68@)W)O -M=71E"!I="!P2X@22!J=7-T(&%D -M9&5D('1H92!I9BP@87,@26%N(&1I9"!I;B!S;VUE(&]T:&5R(&9I;&5S+"!T -M;R!A=F]I9"!T:&4@97AC97!T:6]N+@H@("`@("`@(&EF("=R;W5T97)?9W5E -M2<@:6X@2=="B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py': 'MD5 check failed' - ) << \SHAR_EOF -98c84f4067412f263891f8293f185243 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py'` -ne 2545 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' is not 2545" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsMonitor.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N"!I;B!S96QF+F1B86=;)V-O;F9I9R==+G-P;&ET*"WT*("`@("`@("!H8U]D871A6R)H96%L=&A?8VAE8VMS7V)A&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!S96QF+F1B -M86&-L=61E9%]H96%L=&A?8VAE8VMS(ET@/2!;70H* -M("`@("`@("!I9B`B:&5A;'1H7V-H96-K/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py': 'MD5 check failed' - ) << \SHAR_EOF -d8f5dcf496dbc6d8508e40b906f48245 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py'` -ne 3681 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' is not 3681" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@ -M("`@("!S96QF+FQA2!E>&ES=',Z(')U;&4] -M)7,@=&%B;&4])7,@8VAA:6X])7,B+"!N97=?2`](&-P>2YR97!L86-E*"(M02`E&5C=71E,B@B:7!T86)L97,@+70@)7,@ -M)7,B("4@*&YE=U]R=6QE+F=E=%]T86)L92@I+"!C<'DI*0H@("`@("`@("`@ -M("`@("`@(R!4:&5R92!A"!I;B!T:&4@ -M9G)A;65W;W)K+@H@("`@("`@("`@("`@("`@:68@&5C=71E*")I<'1A8FQE7!E(#T@0W-#;61,:6YE*")C;61L:6YE(BDN9V5T7W1Y<&4H*0H* -M("`@("`@("!T7!E*3H*("`@("`@("`@("`@("`@(&EF(&DNFEP*&)I='-;,#HZ,ETL(&)I='-;,3HZ,ETI*0H@("`@("`@(&EF -M("(M02(@:6X@2!C;W)R96-T(&EP=&%B;&5S(&-O;6UA -M;F0@(B(B"B`@("`@("`@(R!/7,H*3H*("`@("`@("`@("`@("`@('!R:6YT86)L92`] -M(&LN=7)N($9A;'-E"B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py': 'MD5 check failed' - ) << \SHAR_EOF -7456b53eba9f115f9ad344bc1c01611d cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py'` -ne 11100 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' is not 11100" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsRoute.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRoute.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRoute.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import CsHelper -import logging -X -X -class CsRoute: -X -X """ Manage routes """ -X -X def __init__(self): -X self.table_prefix = "Table_" -X -X def get_tablename(self, name): -X return self.table_prefix + name -X -X def add_table(self, devicename): -X tablenumber = 100 + int(devicename[3:]) -X tablename = self.get_tablename(devicename) -X str = "%s %s" % (tablenumber, tablename) -X filename = "/etc/iproute2/rt_tables" -X logging.info("Adding route table: " + str + " to " + filename + " if not present ") -X if not CsHelper.definedinfile(filename, str): -X CsHelper.execute("sudo echo " + str + " >> /etc/iproute2/rt_tables") -X # remove "from all table tablename" if exists, else it will interfer with -X # routing of unintended traffic -X if self.findRule("from all lookup " + tablename): -X CsHelper.execute("sudo ip rule delete from all table " + tablename) -X -X def flush_table(self, tablename): -X CsHelper.execute("ip route flush table %s" % (tablename)) -X CsHelper.execute("ip route flush cache") -X -X def add_route(self, dev, address): -X """ Wrapper method that adds table name and device to route statement """ -X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 -X table = self.get_tablename(dev) -X -X if not table or not address: -X empty_param = "table" if not table else "address" -X logging.info("Empty parameter received %s while trying to add route, skipping" % empty_param) -X else: -X logging.info("Adding route: dev " + dev + " table: " + -X table + " network: " + address + " if not present") -X cmd = "default via %s table %s proto static" % (address, table) -X self.set_route(cmd) -X -X def add_network_route(self, dev, address): -X """ Wrapper method that adds table name and device to route statement """ -X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 -X table = self.get_tablename(dev) -X -X if not table or not address: -X empty_param = "table" if not table else "address" -X logging.info("Empty parameter received %s while trying to add network route, skipping" % empty_param) -X else: -X logging.info("Adding route: dev " + dev + " table: " + -X table + " network: " + address + " if not present") -X cmd = "throw %s table %s proto static" % (address, table) -X self.set_route(cmd) -X -X def set_route(self, cmd, method="add"): -X """ Add a route if it is not already defined """ -X found = False -X search = cmd -X if "throw" in search: -X search = search.replace("throw", "") -X for i in CsHelper.execute("ip route show " + search): -X found = True -X if not found and method == "add": -X logging.info("Add " + cmd) -X cmd = "ip route add " + cmd -X elif found and method == "delete": -X logging.info("Delete " + cmd) -X cmd = "ip route delete " + cmd -X else: -X return -X CsHelper.execute(cmd) -X -X def add_defaultroute(self, gateway): -X """ Add a default route -X :param str gateway -X :return: bool -X """ -X if not gateway: -X raise Exception("Gateway cannot be None.") -X -X if self.defaultroute_exists(): -X return False -X else: -X cmd = "default via " + gateway -X logging.info("Adding default route") -X self.set_route(cmd) -X return True -X -X def defaultroute_exists(self): -X """ Return True if a default route is present -X :return: bool -X """ -X logging.info("Checking if default ipv4 route is present") -X route_found = CsHelper.execute("ip -4 route list 0/0") -X -X if len(route_found) > 0: -X logging.info("Default route found: " + route_found[0]) -X return True -X else: -X logging.warn("No default route found!") -X return False -X -X def findRule(self, rule): -X for i in CsHelper.execute("ip rule show"): -X if rule in i.strip(): -X return True -X return False -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRoute.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py': 'MD5 check failed' - ) << \SHAR_EOF -4f2109aa1d89157e14817f90c676c2d3 cloud_scripts/opt/cloud/bin/cs/CsRoute.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py'` -ne 4989 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' is not 4989" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py -M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2==*0H@("`@("`@("`@ -M("!#&5C=71E*&-O;6UA;F0I"B`@("`@("`@96QS93H*("`@ -M("`@("`@("`@8V]M;6%N9"`](")I<"!R;W5T92!S:&]W('P@9W)E<"`EW!R:6YT("0Q+"`D,WTG(B`E(')O=71E6R=N971W;W)K)UT*("`@ -M("`@("`@("`@2==*0H@("`@("`@("`@("`@ -C("`@0W-(96QP97(N97AE8W5T92AR;W5T95]C;VUM86YD*0H@ -` -end -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py': 'MD5 check failed' - ) << \SHAR_EOF -f9f9db3a4543397153d69a62551a6c8c cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py'` -ne 1655 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' is not 1655" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N7,H*3H* -M("`@("`@("`@("`@"YS<&QI="@G7&XG*5T*"B`@("`@("`@9FEL -M93$N8V]M;6ET*"D*("`@("`@("!F:6QE,B`]($-S1FEL92A(05!23UA97T-/ -M3D9?4"D*("`@("`@("!I9B!N;W0@9FEL93(N8V]M<&%R92AF:6QE,2DZ"B`@ -M("`@("`@("`@($-S2&5L<&5R+F-O<'DH2$%04D]865]#3TY&7U0L($A!4%)/ -M6%E?0T].1E]0*0H*("`@("`@("`@("`@<')O8R`]($-S4')O8V5S2YP:60G72D*("`@("`@("`@("`@:68@;F]T('!R;V,N9FEN -M9"@I.@H@("`@("`@("`@("`@("`@;&]G9VEN9RYD96)U9R@B0W-,;V%D0F%L -M86YC97(Z.B!W:6QL(')E2$B*0H@("`@("`@("`@("`@ -M("`@0W-(96QP97(N2(L(")R97-T87)T(BD*("`@ -M("`@("`@("`@96QS93H*("`@("`@("`@("`@("`@(&QO9V=I;F2$B*0H@("`@ -M("`@("`@("`@("`@0W-(96QP97(N2(L(")R96QO -M860B*0H*("`@("`@("!A9&1?/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py': 'MD5 check failed' - ) << \SHAR_EOF -8f93571ff9b8f21c947e90193c3efa38 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py'` -ne 3393 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' is not 3393" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsApp.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsApp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsApp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsApp.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G -M871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG971?='EP92@I"B`@ -M("`@("`@5]I9E]N965D -M960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L"B`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE,B]S:71E2DI"B`@("`@("`@ -M("`@(&9I;&4N&5C=71E,B@B/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsApp.py': 'MD5 check failed' - ) << \SHAR_EOF -fa071a9d58a918b6a9d5e09ae10e3e11 cloud_scripts/opt/cloud/bin/cs/CsApp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsApp.py'` -ne 4159 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' is not 4159" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsFile.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsFile.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsFile.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import logging -import re -import copy -X -X -class CsFile: -X """ File editors """ -X -X def __init__(self, filename): -X self.filename = filename -X self.load() -X -X def load(self): -X self.new_config = [] -X self.config = [] -X try: -X for line in open(self.filename): -X self.new_config.append(line) -X except IOError: -X logging.debug("File %s does not exist" % self.filename) -X else: -X logging.debug("Reading file %s" % self.filename) -X self.config = list(self.new_config) -X -X def is_changed(self): -X if set(self.config) != set(self.new_config): -X return True -X else: -X return False -X -X def __len__(self): -X return len(self.config) -X -X def empty(self): -X self.config = [] -X self.new_config = [] -X -X def repopulate(self): -X self.new_config = [] -X -X def commit(self): -X if not self.is_changed(): -X logging.info("Nothing to commit. The %s file did not change" % self.filename) -X return False -X handle = open(self.filename, "w+") -X for line in self.new_config: -X handle.write(line) -X handle.close() -X logging.info("Wrote edited file %s" % self.filename) -X self.config = list(self.new_config) -X logging.info("Updated file in-cache configuration") -X return True -X -X def dump(self): -X for line in self.new_config: -X print line -X -X def addeq(self, string): -X """ Update a line in a file of the form token=something -X match on token= and replace something if needed -X Add line if token is not present -X """ -X token = string.split('=')[0] + '=' -X self.search(token, string) -X -X def append(self, string, where=-1): -X if where == -1: -X self.new_config.append("%s\n" % string) -X else: -X self.new_config.insert(where, "%s\n" % string) -X -X def add(self, string, where=-1): -X for index, line in enumerate(self.new_config): -X if line.strip() == string: -X return False -X if where == -1: -X self.new_config.append("%s\n" % string) -X else: -X self.new_config.insert(where, "%s\n" % string) -X return True -X -X def section(self, start, end, content): -X sind = -1 -X eind = -1 -X found = False -X for index, line in enumerate(self.new_config): -X if found and line.strip() == end: -X eind = index -X found = False -X if line.strip() == start: -X sind = index + 1 -X found = True -X if sind == -1: -X content.insert(0, start + "\n") -X content.append(end + "\n") -X self.new_config[sind:eind] = content -X -X def greplace(self, search, replace): -X logging.debug("Searching for %s and replacing with %s" % (search, replace)) -X self.new_config = [w.replace(search, replace) for w in self.new_config] -X -X def replaceIfFound(self, search, replace): -X found = False -X replace_filtered = replace -X if re.search("PSK \"", replace): -X replace_filtered = re.sub(r'".*"', '"****"', replace) -X logging.debug("Searching for %s and replacing with %s if found" % (search, replace_filtered)) -X for index, line in enumerate(self.new_config): -X if line.lstrip().startswith("#"): -X continue -X if re.search(search, line): -X if replace not in line: -X self.new_config[index] = replace + "\n" -X return False -X -X def search(self, search, replace): -X found = False -X replace_filtered = replace -X if re.search("PSK \"", replace): -X replace_filtered = re.sub(r'".*"', '"****"', replace) -X logging.debug("Searching for %s and replacing with %s" % (search, replace_filtered)) -X for index, line in enumerate(self.new_config): -X if line.lstrip().startswith("#"): -X continue -X if re.search(search, line): -X found = True -X if replace not in line: -X self.new_config[index] = replace + "\n" -X if not found: -X self.new_config.append(replace + "\n") -X return True -X return False -X -X def searchString(self, search, ignoreLinesStartWith): -X found = False -X logging.debug("Searching for %s string " % search) -X -X for index, line in enumerate(self.new_config): -X print ' line = ' + line -X if line.lstrip().startswith(ignoreLinesStartWith): -X continue -X if search in line: -X found = True -X break -X -X return found -X -X def deleteLine(self, search): -X found = False -X logging.debug("Searching for %s to remove the line " % search) -X temp_config = [] -X for index, line in enumerate(self.new_config): -X if line.lstrip().startswith("#"): -X continue -X if search not in line: -X temp_config.append(line) -X -X self.new_config = list(temp_config) -X -X def compare(self, o): -X result = (isinstance(o, self.__class__) and set(self.config) == set(o.config)) -X logging.debug("Comparison of CsFiles content is ==> %s" % result) -X return result -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsFile.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsFile.py': 'MD5 check failed' - ) << \SHAR_EOF -81531ddee205a5eb66bb44f400ab222c cloud_scripts/opt/cloud/bin/cs/CsFile.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsFile.py'` -ne 6133 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' is not 6133" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/__init__.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/__init__.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/__init__.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/__init__.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/__init__.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/__init__.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/__init__.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/__init__.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/__init__.py': 'MD5 check failed' - ) << \SHAR_EOF -33215d440d5ba5fa95b1ffa035d769e2 cloud_scripts/opt/cloud/bin/cs/__init__.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/__init__.py'` -ne 785 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/__init__.py' is not 785" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsAddress.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsAddress.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsAddress.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsAddress.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N`H@("`@("`@("`@("`@("`@("`@ -M(&=U97-T7VEN=&5R9F%C92`](&EN=&5R9F%C90H@("`@("`@("`@("`@("`@ -M("`@(&QO9V=I;F2!C;VYF:6=U2AS96QF*3H*("`@("`@("!I -M9B!S96QF+F-O;F9I9RYI2(I -M"B`@("`@("`@96QS93H*("`@("`@("`@("`@2@I+"!S96QF+F=E=%]S -M:7IE*"DI"@H@("`@9&5F(&=E=%]S:7IE*'-E;&8I.@H@("`@("`@("(B(B!2 -M971U7!E -M(B!I;B!S96QF+F%D9')E"@Q,#`@*R!I;G0H9&5V6S,Z72DI -M"B`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@("`@97AC97!T($5X8V5P=&EO;B!A -M&-E<'1I;VX@ -M;V-C=7)R960@/3T^("5S(B`E(&4I"@H@("`@("`@("`@("!S96QF+G!O7!E*"D@:6X@6R)C;VYT7!E*"D@:6X@ -M6R=P=6)L:6,G73H*("`@("`@("`@("`@("`@('-E;&8N7!E*"E=.@H@("`@("`@ -M("`@("`@("`@9V%T97=A>2`]('-T2@I*3H* -M("`@("`@("`@("`@("`@(')O=71E+F%D9%]D969A=6QT2@I*0H*("`@(&1E9B!S971?;6%R:RAS96QF*3H*("`@ -M("`@("!C;60@/2`B+4$@4%)%4D]55$E.1R`M:2`E7!E(&]F('1H92!)4`H@("`@("`@(&=U97-T"B`@("`@("`@8V]N -M=')O;`H@("`@("`@('!U8FQI8PH@("`@("`@("(B(@H@("`@("`@(&EF(")N -M=U]T>7!E(B!I;B!S96QF+F%D9')E&9F9F9F9F9F -M("TM8W1M87-K(#!X9F9F9F9F9F8B72D*"B`@("`@("`@&UA7!E*"D@:6X@6R)G=65S=")=.@H@("`@("`@("`@("!G=65S -M=$YE='=O&9F9F9F9F9F(ETI"B`@ -M("`@("`@("`@(&=U97-T3F5T=V]R:T-I9'(@/2!S96QF+F%D9')E#4R-2\P>&9F9F9F9F9F(B`E -M("AS96QF+F1E=BP@2)=("$](").;VYE(CH* -M("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@("`@("`@:68@ -M(FYE='=O7!E*"D@:6X@6R)P=6)L:6,B -M72!A;F0@(F=A=&5W87DB(&EN('-E;&8N861D2)=("$] -M(").;VYE(CH*("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@ -M("`@("`@("`@(&9O7!E(B!I;B!A9&1R97-S(&%N9"!A -M9&1R97-S6R)N=U]T>7!E(ET@/3T@(F=U97-T(CH*("`@("`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("!R;W5T92YA9&1?;F5T=V]R:U]R;W5T92AS96QF -M+F1E=BP@&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A8VAE(BD*"B`@("`@("`@ -M96QI9B!M971H;V0@/3T@(F1E;&5T92(Z"B`@("`@("`@("`@(",@=')E870@ -M=&AE(&QA&5C=71E*")S=61O(&EP(')U;&4@9&5L971E('1A8FQE("(@*R!T86)L94YA -M;64I"B`@("`@("`@("`@("`@("!#&5C=71E*")S=61O(&EP -M(')O=71E(&9L=7-H('1A8FQE("(@*R!T86)L94YA;64I"B`@("`@("`@("`@ -M("`@("!#&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A -M8VAE(BD*("`@("`@("`@("`@("`@($-S4G5L92AS96QF+F1E=BDN9&5L36%R -M:R@I"@H@("`@("`@('-E;&8N9G=?7!E('=I;&P@ -M;F\@;&]N9V5R(&)E(&MN;W=N"B`@("`@("`@:68@7!E*"D@/3T@(G!U8FQI8R(@86YD('-E;&8N8V]N9FEG+FES7W9P8R@I -M(&%N9"!M971H;V0@/3T@(F%D9"(Z"B`@("`@("`@("`@(&EF('-E;&8N861D -M7,H*3H*("`@("`@("`@ -M("`@7!E)UT@:6X@5E)2 -M4%]465!%4SH*("`@("`@("`@("`@7!E(B!I;B!S96QF+F%D9')E&5C=71E,BAC;60L($9A -M;'-E*0H*("`@(",@1&5L971E(&%N>2!I<',@=&AA="!A7,H*2!O2AS96QF+"!B862!F;W(@ -M7,O8VQA"TP+W)P&-E<'0@24]%/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py': 'MD5 check failed' - ) << \SHAR_EOF -5cebbbd106abd3eba7ee0e4d23277dda cloud_scripts/opt/cloud/bin/cs/CsAddress.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py'` -ne 29236 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' is not 29236" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsProcess.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsProcess.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsProcess.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import os -import re -import CsHelper -import logging -X -X -class CsProcess(object): -X """ Manipulate processes """ -X -X def __init__(self, search): -X self.search = search -X -X def start(self, thru, background=''): -X # if(background): -X # cmd = cmd + " &" -X logging.info("Started %s", " ".join(self.search)) -X os.system("%s %s %s" % (thru, " ".join(self.search), background)) -X -X def kill_all(self): -X pids = self.find_pid() -X for p in pids: -X CsHelper.execute("kill -9 %s" % p) -X -X def find_pid(self): -X self.pid = [] -X for i in CsHelper.execute("ps aux"): -X items = len(self.search) -X proc = re.split(r"\s+", i)[items*-1:] -X matches = len([m for m in proc if m in self.search]) -X if matches == items: -X self.pid.append(re.split(r"\s+", i)[1]) -X -X logging.debug("CsProcess:: Searching for process ==> %s and found PIDs ==> %s", self.search, self.pid) -X return self.pid -X -X def find(self): -X has_pid = len(self.find_pid()) > 0 -X return has_pid -X -X def kill(self, pid): -X if pid > 1: -X CsHelper.execute("kill -9 %s" % pid) -X -X def grep(self, str): -X for i in CsHelper.execute("ps aux"): -X if i.find(str) != -1: -X return re.split(r"\s+", i)[1] -X return -1 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsProcess.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py': 'MD5 check failed' - ) << \SHAR_EOF -75a4650fe1e521049e80d32a022d8689 cloud_scripts/opt/cloud/bin/cs/CsProcess.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py'` -ne 2156 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' is not 2156" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsConfig.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsConfig.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsConfig.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsConfig.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N7!E*"D@/3T@)W9P8W)O=71E'1D;G,H'1D;G,G+"`G9F%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py': 'MD5 check failed' - ) << \SHAR_EOF -836541a5b9cb1b2f9df5dad6bb806745 cloud_scripts/opt/cloud/bin/cs/CsConfig.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py'` -ne 3179 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' is not 3179" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsDatabag.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@("`@ -M("!S96QF+F1B(#T@1&%T84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF -M+F1B+G-A=F4HWT*("`@("`@("!R971U&1I9V5S="@I"@H@("`@ -M9&5F(&=E=%]G871E=V%Y*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I -M;B!S96QF+FED871A*"DZ"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A -M*"E;)V=A=&5W87DG70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G -M971?=7-E7V5X=%]D;G,H'1D;G,G70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E -M9B!G971?861V97)T7VEN="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN -M="<@:6X@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py': 'MD5 check failed' - ) << \SHAR_EOF -9e4de6e0a115a5e806e80dc151769b21 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py'` -ne 4808 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' is not 4808" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsRule.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRule.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRule.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import CsHelper -import logging -X -X -class CsRule: -X """ Manage iprules -X Supported Types: -X fwmark -X """ -X -X def __init__(self, dev): -X self.dev = dev -X self.tableNo = 100 + int(dev[3:]) -X self.table = "Table_%s" % (dev) -X -X def addRule(self, rule): -X if not self.findRule(rule + " lookup " + self.table): -X cmd = "ip rule add " + rule + " table " + self.table -X CsHelper.execute(cmd) -X logging.info("Added rule %s for %s" % (cmd, self.table)) -X -X def findRule(self, rule): -X for i in CsHelper.execute("ip rule show"): -X if rule in i.strip(): -X return True -X return False -X -X def addMark(self): -X if not self.findMark(): -X cmd = "ip rule add fwmark %s table %s" % (self.tableNo, self.table) -X CsHelper.execute(cmd) -X logging.info("Added fwmark rule for %s" % (self.table)) -X -X def delMark(self): -X if self.findMark(): -X cmd = "ip rule delete fwmark %s table %s" % (self.tableNo, self.table) -X CsHelper.execute(cmd) -X logging.info("Deleting fwmark rule for %s" % (self.table)) -X -X def findMark(self): -X srch = "from all fwmark %s lookup %s" % (hex(self.tableNo), self.table) -X for i in CsHelper.execute("ip rule show"): -X if srch in i.strip(): -X return True -X return False -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRule.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRule.py': 'MD5 check failed' - ) << \SHAR_EOF -78748432f1ac57194339aef8bdb7c9f8 cloud_scripts/opt/cloud/bin/cs/CsRule.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRule.py'` -ne 2192 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' is not 2192" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vmdata.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vmdata.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vmdata.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vmdata.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/vmdata.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&ET*#(I -M"@H@("`@9F]R(&EP(&EN(&IS;VY?9&%T83H*("`@("`@("!F;W(@:71E;2!I -M;B!J2!V86QI9"!D -M871A"B`@("`@("`@("`@(&EF(&9O;&1E&ES=',H;65T -M86UA;FEF97-T*3H*("`@("`@("!O2Q!;&QO=UQN1&5N -M>2!F&-E<'0@3U-%2!E>&ES=',L('=E(&1O(&ET('1H:7,@=V%Y(&9O -M7,N97AI="@Q*0H*("`@(&9H(#T@;W!E;BAH -M=&%C8V5S2`K("=<;B&9L;V-K*&9I;&4I.@H@("`@=')Y.@H@("`@("`@(&9L;V-K -M*&9I;&4L($Q/0TM?15@I"B`@("!E>&-E<'0@24]%7,N97AI="@Q -M*0H@("`@3H*("`@("`@("!F;&]C:RAF:6QE+"!,3T-+7U5.*0H@("`@97AC97!T($E/ -M17)R;W(@87,@93H*("`@("`@("!P7,N97AI="@Q*0H@("`@7,N87)G=ELQ.ETI"FYA -` -end -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vmdata.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vmdata.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vmdata.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vmdata.py': 'MD5 check failed' - ) << \SHAR_EOF -f585277ddefb989a0662db609bc199c7 cloud_scripts/opt/cloud/bin/vmdata.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vmdata.py'` -ne 4723 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vmdata.py' is not 4723" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/get_diagnostics_files.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/get_diagnostics_files.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/get_diagnostics_files.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' && -#!/usr/bin/env python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import logging -import os -import re -import shlex -import subprocess as sp -import sys -import time -import zipfile -X -X -# Create zip archive and append files for retrieval -def zip_files(files): -X fList = files -X compression = zipfile.ZIP_DEFLATED -X time_str = time.strftime("%Y%m%d-%H%M%S") -X zf_name = '/root/diagnostics_files_' + time_str + '.zip' -X zf = zipfile.ZipFile(zf_name, 'w', compression) -X -X ''' -X Initialize 3 empty arrays to collect found files, non-existent files -X and last one to collect temp files to be cleaned up when script exits -X ''' -X files_found_list = [] -X files_not_found_list = [] -X files_from_shell_commands = [] -X -X try: -X for f in fList: -X f = f.strip() -X -X if f in ('iptables', 'ipaddr', 'iprule', 'iproute'): -X f = execute_shell_script(f) -X files_from_shell_commands.append(f) -X -X if len(f) > 3 and f.startswith('[') and f.endswith(']'): -X f = execute_shell_script(f[1:-1]) -X files_from_shell_commands.append(f) -X -X if os.path.isfile(f): -X try: -X zf.write(f, f[f.rfind('/') + 1:]) -X except OSError or RuntimeError as e: -X files_not_found_list.append(f) -X else: -X files_found_list.append(f) -X finally: -X cleanup(files_from_shell_commands) -X generate_retrieved_files_txt(zf, files_found_list, files_not_found_list) -X zf.close() -X print zf_name -X -X -def get_cmd(script): -X if script is None or len(script) == 0: -X return None -X -X cmd = None -X if script == 'iptables': -X cmd = 'iptables-save' -X elif script == 'ipaddr': -X cmd = 'ip address' -X elif script == 'iprule': -X cmd = 'ip rule list' -X elif script == 'iproute': -X cmd = 'ip route show table all' -X else: -X cmd = '/opt/cloud/bin/' + script -X if not os.path.isfile(cmd.split(' ')[0]): -X cmd = None -X -X return cmd -X -X -def execute_shell_script(script): -X script = script.strip() -X outputfile = script + '.log' -X -X with open(outputfile, 'wb', 0) as f: -X try: -X cmd = get_cmd(script) -X if cmd is None: -X f.write('Unable to generate command for ' + script + ', perhaps missing file') -X else: -X p = sp.Popen(cmd, shell=True, stdout=sp.PIPE, stderr=sp.PIPE) -X stdout, stderr = p.communicate() -X return_code = p.returncode -X if return_code is 0: -X f.write(stdout) -X else: -X f.write(stderr) -X except OSError as ex: -X delete_tmp_file_cmd = 'rm -f %s' % outputfile -X sp.check_call(shlex.split(delete_tmp_file_cmd)) -X finally: -X f.close() -X return outputfile -X -X -def cleanup(file_list): -X files = ' '.join(file_list) -X cmd = 'rm -f %s' % files -X try: -X p = sp.Popen(shlex.split(cmd), stderr=sp.PIPE, stdout=sp.PIPE) -X p.communicate() -X except OSError as e: -X logging.debug("Failed to execute bash command") -X -X -def generate_retrieved_files_txt(zip_file, files_found, files_not_found): -X output_file = 'fileinfo.txt' -X try: -X with open(output_file, 'wb', 0) as man: -X for i in files_found: -X man.write(i + '\n') -X for j in files_not_found: -X man.write(j + 'File Not Found!!\n') -X zip_file.write(output_file, output_file) -X finally: -X cleanup_cmd = "rm -f %s" % output_file -X sp.check_call(shlex.split(cleanup_cmd)) -X -X -if __name__ == '__main__': -X fileList = sys.argv[1:] -X zip_files(fileList) -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/get_diagnostics_files.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py': 'MD5 check failed' - ) << \SHAR_EOF -f8b91c14af848f14696aa2c1193b0907 cloud_scripts/opt/cloud/bin/get_diagnostics_files.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py'` -ne 4478 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' is not 4478" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/checkrouter.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checkrouter.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checkrouter.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/checkrouter.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checkrouter.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -STATUS=UNKNOWN -X -if [ "$(systemctl is-active keepalived)" != "active" ] -then -X echo "Status: FAULT" -X exit -fi -X -ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g') -if [ "$ROUTER_TYPE" = "router" ] -then -X ROUTER_STATE=$(ip addr show dev eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi') -X STATUS=$ROUTER_STATE -else -X ROUTER_STATE=$(ip addr show dev eth1 | grep state | awk '{print $9;}') -X if [ "$ROUTER_STATE" = "UP" ] -X then -X STATUS=MASTER -X elif [ "$ROUTER_STATE" = "DOWN" ] -X then -X STATUS=BACKUP -X fi -fi -X -echo "Status: ${STATUS}" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checkrouter.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/checkrouter.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/checkrouter.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checkrouter.sh': 'MD5 check failed' - ) << \SHAR_EOF -b107b37bc85a7036ef9f4e81cf4ae8b2 cloud_scripts/opt/cloud/bin/checkrouter.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checkrouter.sh'` -ne 1445 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checkrouter.sh' is not 1445" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/ilb.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ilb.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ilb.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/ilb.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/ilb.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s: -a -d -f -s \n" $(basename $0) >&2 -} -X -#set -x -X -fw_remove_backup() { -X logger -t cloud "$(basename $0): Entering fw_remove_backup" -X local lb_vif_list=eth0 -X for vif in $lb_vif_list; do -X sudo iptables -F back_load_balancer_$vif 2> /dev/null -X sudo iptables -D INPUT -i $vif -p tcp -j back_load_balancer_$vif 2> /dev/null -X sudo iptables -X back_load_balancer_$vif 2> /dev/null -X done -X sudo iptables -F back_lb_stats 2> /dev/null -X sudo iptables -D INPUT -p tcp -j back_lb_stats 2> /dev/null -X sudo iptables -X back_lb_stats 2> /dev/null -} -X -fw_restore() { -X logger -t cloud "$(basename $0): Entering fw_restore" -X local lb_vif_list="eth0" -X for vif in $lb_vif_list; do -X sudo iptables -F load_balancer_$vif 2> /dev/null -X sudo iptables -D INPUT -i $vif -p tcp -j load_balancer_$vif 2> /dev/null -X sudo iptables -X load_balancer_$vif 2> /dev/null -X sudo iptables -E back_load_balancer_$vif load_balancer_$vif 2> /dev/null -X done -X sudo iptables -F lb_stats 2> /dev/null -X sudo iptables -D INPUT -p tcp -j lb_stats 2> /dev/null -X sudo iptables -X lb_stats 2> /dev/null -X sudo iptables -E back_lb_stats lb_stats 2> /dev/null -} -X -# firewall entry to ensure that haproxy can receive on specified port -fw_entry() { -X logger -t cloud "$(basename $0): Entering fw_entry" -X local added=$1 -X local removed=$2 -X local stats=$3 -X -X if [ "$added" == "none" ] -X then -X added="" -X fi -X -X if [ "$removed" == "none" ] -X then -X removed="" -X fi -X -X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") -X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") -X -# back up the iptable rules by renaming before creating new. -X local lb_vif_list=eth0 -X for vif in $lb_vif_list; do -X sudo iptables -E load_balancer_$vif back_load_balancer_$vif 2> /dev/null -X sudo iptables -N load_balancer_$vif 2> /dev/null -X sudo iptables -A INPUT -i $vif -p tcp -j load_balancer_$vif -X done -X sudo iptables -E lb_stats back_lb_stats 2> /dev/null -X sudo iptables -N lb_stats 2> /dev/null -X sudo iptables -A INPUT -p tcp -j lb_stats -X -X for i in $a -X do -X local pubIp=$(echo $i | cut -d: -f1) -X local dport=$(echo $i | cut -d: -f2) -X local lb_vif_list="eth0" -X for vif in $lb_vif_list; do -X sudo iptables -A load_balancer_$vif -p tcp -d $pubIp --dport $dport -j ACCEPT -X if [ $? -gt 0 ] -X then -X return 1 -X fi -X done -X done -X local pubIp=$(echo $stats | cut -d: -f1) -X local dport=$(echo $stats | cut -d: -f2) -X local cidrs=$(echo $stats | cut -d: -f3 | sed 's/-/,/') -X sudo iptables -A lb_stats -s $cidrs -p tcp -m state --state NEW -d $pubIp --dport $dport -j ACCEPT -X -X return 0 -} -X -#Hot reconfigure HA Proxy in the routing domain -reconfig_lb() { -X logger -t cloud "Reconfiguring ilb using $1" -X /root/reconfigLB.sh $1 -X return $? -} -X -# Restore the HA Proxy to its previous state, and revert iptables rules on loadbalancer -restore_lb() { -X logger -t cloud "Restoring HA Proxy to previous state" -X # Copy the old version of haproxy.cfg into the file that reconfigLB.sh uses -X cp /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg.new -X -X if [ $? -eq 0 ] -X then -X # Run reconfigLB.sh again -X /root/reconfigLB.sh /etc/haproxy/haproxy.cfg.new -X fi -} -X -X -logger -t cloud "$(basename $0): Entering $(dirname $0)/$(basename $0)" -X -iflag= -aflag= -dflag= -fflag= -sflag= -X -while getopts 'i:a:d:f:s:' OPTION -do -X case $OPTION in -X i) iflag=1 -X domRIp="$OPTARG" #unused but passed in -X ;; -X a) aflag=1 -X addedIps="$OPTARG" -X ;; -X d) dflag=1 -X removedIps="$OPTARG" -X ;; -X f) fflag=1 -X cfgfile="$OPTARG" -X ;; -X s) sflag=1 -X statsIp="$OPTARG" -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [[ "$aflag$dflag" != "1" && "$aflag$dflag" != "11" ]] -then -X usage -X unlock_exit 2 $lock $locked -fi -X -if [ "$addedIps" == "" ] -then -X addedIps="none" -fi -X -X -if [ "$removedIps" == "" ] -then -X removedIps="none" -fi -X -X -# hot reconfigure haproxy -reconfig_lb $cfgfile -X -if [ $? -gt 0 ] -then -X logger -t cloud "Reconfiguring ilb failed" -X unlock_exit 1 $lock $locked -fi -X -logger -t cloud "HAProxy reconfigured successfully, configuring firewall" -X -# iptables entry to ensure that haproxy receives traffic -fw_entry $addedIps $removedIps $statsIp -X -if [ $? -gt 0 ] -then -X logger -t cloud "Failed to apply firewall rules for internal load balancing, reverting HA Proxy config" -X # Restore the LB -X restore_lb -X -X logger -t cloud "Reverting firewall config" -X fw_restore -X -X unlock_exit 1 $lock $locked -else -X # Remove backedup iptable rules -X logger -t cloud "Firewall configured successfully, deleting backup firewall config" -X fw_remove_backup -fi -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/ilb.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/ilb.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/ilb.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ilb.sh': 'MD5 check failed' - ) << \SHAR_EOF -8b7374975ee7d7a5d73da78b60bd508c cloud_scripts/opt/cloud/bin/ilb.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ilb.sh'` -ne 5644 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ilb.sh' is not 5644" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -for i in $* -do -X info=`/opt/cloud/bin/checks2svpn.sh $i` -X ret=$? -X batchInfo+="$i:$ret:$info&" -done -echo -n $batchInfo -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh': 'MD5 check failed' - ) << \SHAR_EOF -36a25911b669737ea678011f72a6f3f9 cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh'` -ne 924 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' is not 924" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/savepassword.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/savepassword.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/savepassword.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/savepassword.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/savepassword.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# Usage -# save_password -v -p -X -while getopts 'v:p:' OPTION -do -X case $OPTION in -X v) VM_IP="$OPTARG" -X ;; -X p) PASSWORD="$OPTARG" -X ;; -X ?) echo "Incorrect usage" -X ;; -X esac -done -TOKEN_FILE="/tmp/passwdsrvrtoken" -TOKEN="" -if [ -f $TOKEN_FILE ]; then -X TOKEN=$(cat $TOKEN_FILE) -fi -ps aux | grep passwd_server_ip.py |grep -v grep 2>&1 > /dev/null -if [ $? -eq 0 ] -then -X ips=$(ip addr show | grep inet | awk '{print $2}') -X for ip in $ips; do -X server_ip=$(echo $ip | awk -F'/' '{print $1}') -X curl --header "DomU_Request: save_password" "http://$server_ip:8080/" -F "ip=$VM_IP" -F "password=$PASSWORD" -F "token=$TOKEN" >/dev/null 2>/dev/null & -X done -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/savepassword.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/savepassword.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/savepassword.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/savepassword.sh': 'MD5 check failed' - ) << \SHAR_EOF -edebd2c25984e1ed00b36e4f8d360a63 cloud_scripts/opt/cloud/bin/savepassword.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/savepassword.sh'` -ne 1525 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/savepassword.sh' is not 1525" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cloud-nic.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cloud-nic.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cloud-nic.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -plug_nic() { -X sudo echo "$tableNo $tableName" >> /etc/iproute2/rt_tables 2>/dev/null -X sudo ip rule add fwmark $tableNo table $tableName 2>/dev/null -X sudo ip route flush table $tableName -X sudo ip route flush cache -} -X -X -unplug_nic() { -X sudo iptables -t mangle -D PREROUTING -i $dev -m state --state NEW -j CONNMARK --set-mark $tableNo 2>/dev/null -X -X sudo ip rule del fwmark $tableNo 2>/dev/null -X sudo ip route flush table $tableName -X sudo sed -i /"$tableNo $tableName"/d /etc/iproute2/rt_tables 2>/dev/null -X sudo ip route flush cache -X # remove network usage rules -X sudo iptables -F NETWORK_STATS_$dev 2>/dev/null -X iptables-save | grep NETWORK_STATS_$dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables $rule -X done -X sudo iptables -X NETWORK_STATS_$dev 2>/dev/null -X # remove vpn network usage rules -X sudo iptables -t mangle -F VPN_STATS_$dev 2>/dev/null -X iptables-save -t mangle | grep VPN_STATS_$dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t mangle $rule -X done -X sudo iptables -t mangle -X VPN_STATS_$dev 2>/dev/null -X # remove rules on this dev -X iptables-save -t mangle | grep $dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t mangle $rule -X done -X iptables-save -t nat | grep $dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t nat $rule -X done -X iptables-save | grep $dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables $rule -X done -X # remove apache config for this eth -X rm -f /etc/apache2/conf.d/vhost$dev.conf -} -X -action=$1 -dev=$2 -tableNo=$((100+${dev:3})) -tableName="Table_$dev" -X -if [ $action == 'add' ] -then -X plug_nic -else -X unplug_nic -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cloud-nic.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cloud-nic.sh': 'MD5 check failed' - ) << \SHAR_EOF -6afed00cefb1dc06b8b4969c2c26933e cloud_scripts/opt/cloud/bin/cloud-nic.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cloud-nic.sh'` -ne 2632 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' is not 2632" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/ipsectunnel.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ipsectunnel.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/ipsectunnel.sh (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/ipsectunnel.sh -M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N#4R-2(*=G!N:6YM87)K/2(P>#4R-"(*"G5S86=E*"D@ -M>PH@("`@<')I;G1F(")5PH@('-U9&\@:7!T86)L -M97,MPH@(&1I2!<"B`@("!P -M:&%S93(@<&]L:6-Y/21ER1R:6=H=&YE='-] -M(B`^/B`D=G!N8V]N9F9I;&4@)B8*("!S=61O(&5C:&\@(B`@='EP93UT=6YN -M96PB(#X^("1V<&YC;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!A=71H8GD] -MVEK96QI9F5T:6UE?7,B(#X^("1V<&YC -M;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!E2(@/CX@ -M)'9P;F-O;F9F:6QE("8F"B`@2!F -M;W(@'1H;W`](B1/4%1!4D&ET("1R970* -` -end -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/ipsectunnel.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh': 'MD5 check failed' - ) << \SHAR_EOF -097a970ec94a68d965ffd7f446e3862d cloud_scripts/opt/cloud/bin/ipsectunnel.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh'` -ne 8769 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' is not 8769" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/ipassoc.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ipassoc.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ipassoc.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/ipassoc.sh (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/ipassoc.sh -M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N"`D("1(96%D55),.B!S=FXZ+R]S=FXN;&%B+G9M;W!S+F-O;2]R97!O2!E>&ES=',B"GT* -M"F1E;%]F=U]C:&%I;E]F;W)?:7`@*"D@>PH@(&QO8V%L('!U8DEP/20H96-H -M;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?2W!R:6YT("0R?2W!R:6YT("0R?2W!R:6YT("0Q?2PH@(&QO -M8V%L(&1E=CTB)#$B"B`@;&]C86P@:7`](B0R(@H@('-U9&\@:7`@861DW!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP/20Q -M"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0Q?22!F;W(@:7`@)'!U8DEP(&]N(&EN=&5R9F%C92`D971H1&5V(@H@("`@ -M(')E='5R;B`Q"B`@9FD*"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0R?2<@('P@9W)E<"`M=R`D -M:7!.;TUAW!R -M:6YT("0R?2#TD*'!R:6YT9B`B)7A<;B(@)&YU;2D*("`@("`@("`@ -M(&5C:&\@)&AE>#L*("`@("`@("`@("-E;F%B;&4@`IS -M9FQA9STP"FQF;&%G/0IF9FQA9ST*8V9L86<]"FYF;&%G/0IO<#TB(@H*:7-? -M;6%S=&5R/3`*:7-?&ET(#(@)&QO8VL@)&QO8VME9`H)"3L["B`@ -M97-A8PID;VYE"@H*:68@6R`B)$%F;&%G)$1F;&%G(B`A/2`B,2(@70IT:&5N -M"B`@("!U&ET("0_("1L;V-K -M("1L;V-K960*9FD*"FEF(%L@(B1F9FQA9R(@/3T@(C$B(%T@)B8@6R`B)$1F -M;&%G(B`]/2`B,2(@70IT:&5N"B`@&ET("0_ -M("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1$9FQA9R(@/3T@(C$B(%T*=&AE -M;@H@(')E;6]V95]A;E]I<"`@)'!U8FQI8TEP("8F"B`@9&5L7V9W7V-H86EN -M7V9O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ipassoc.sh': 'MD5 check failed' - ) << \SHAR_EOF -ad068a0cc84ded8f79c63ce3aced4586 cloud_scripts/opt/cloud/bin/ipassoc.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ipassoc.sh'` -ne 13401 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ipassoc.sh' is not 13401" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/line_edit.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/line_edit.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/line_edit.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/line_edit.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/line_edit.py' && -#!/usr/bin/python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import logging -import re -import shutil -import os -X -X -class LineEdit(object): -X """Helper for LineEditingFile that keeps track of one edit.""" -X def __init__(self, search, sub, *sub_args, **kwargs): -X if len(sub_args) > 0: -X sub = sub % sub_args -X flags = kwargs.get('flags', 0) -X self.pattern = re.compile(search, flags=flags) -X self.sub = sub -X self.count = kwargs.get('count', 0) # max subs to make -X self.subs = 0 # subs made so far -X -X -class LineEditingFile(object): -X """ -X Atomic, conservative, by-line editing of configuration files. -X -X Will not touch the file if there are no changes to do. -X Reasonably efficient for large files, though files with a long time -X before their first match will use memory. -X -X -X Given a vhosts file such as: -X >>> with open('doctest-vhosts.conf', 'w') as f: -X ... f.write(''' -X ... Listen foo:80 -X ... -X ... DocRoot /var/www -X ... -X ... -X ... Listen other:80 -X ... -X ... DocRoot /var/www -X ... -X ... ''') -X ... -X -X To replace the hostname for the first virtualhost entry: -X >>> new_hostname = 'fooooo' -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... f.replace(r'', '', new_hostname, count=1, flags=re.I) -X ... f.replace(r'Listen .*?:80', 'Listen %s:80', new_hostname, count=1, flags=re.I) -X ... -X -X Be careful with the matches! -X A second invocation of the same rule will edit the second vhost: -X >>> new_hostname = 'fooooo' -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... f.replace(r'', '', new_hostname, count=1, flags=re.I) -X ... -X -X To move all hosts from port 80 to port 8080: -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... f.replace(r'', '', flags=re.I) -X ... f.replace(r'Listen (.*?):80', 'Listen \\\\1:80', flags=re.I) -X ... -X -X (please note in this example there's a double escape of the backreference -X \\\\1, to make the example work with doctest) -X -X Since this example already matched all files, a second invocation does nothing: -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... f.replace(r'', '', flags=re.I) -X ... -X -X It's also acceptable to not make any edits at all: -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... pass -X ... -X -X You don't _have_ to use a with statement: -X >>> f = LineEditingFile('doctest-vhosts.conf') -X >>> f.replace(r'DocRoot /var/www', 'DocRoot /var/www/html', flags=re.I) -X >>> changes = f.commit() -X >>> print changes -X 2 -X >>> -X -X Cleanup of the example vhosts.conf: -X >>> # noinspection PyBroadException -X >>> try: -X ... os.unlink('doctest-vhosts.conf') -X ... os.unlink('doctest-vhosts.conf.bak') -X ... os.unlink('doctest-vhosts.conf.new') -X ... except: -X ... pass -X ... -X """ -X -X def __init__(self, filename): -X self.filename = filename -X self.changed = False -X self.edits = [] -X -X def __enter__(self): -X return self -X -X def replace(self, search, sub, *sub_args, **kwargs): -X edit = LineEdit(search, sub, *sub_args, **kwargs) -X self.edits.append(edit) -X -X # noinspection PyUnusedLocal -X def __exit__(self, exc, value, traceback): -X if exc is not None: -X return False # return false results in re-raise -X -X self.commit() -X -X def commit(self): -X changes = 0 -X changed_file = None -X changed_filename = self.filename + '.new' -X try: -X lines = [] -X backup_filename = self.filename + '.bak' -X # noinspection PyUnusedLocal -X stat = None -X with open(self.filename, 'r') as orig: -X stat = os.fstat(orig.fileno()) -X for line in orig: -X changed_line = line -X for edit in self.edits: -X remaining_count = 0 -X if edit.count != 0: -X remaining_count = edit.count - edit.subs -X if remaining_count < 0: -X raise Exception("Made too many edits") -X elif remaining_count == 0: -X continue -X changed_line, subs = edit.pattern.subn( -X edit.sub, line, remaining_count) -X if changed_line != line: -X if changed_file is None: -X logging.debug("Editing file %s" % self.filename) -X logging.debug(" - %s" % line[:-1]) -X logging.debug(" + %s" % changed_line[:-1]) -X changes += subs -X edit.subs += subs -X if changes == 0: # buffer until we find a change -X lines.append(changed_line) -X elif changed_file is None: # found first change, flush buffer -X changed_file = open(changed_filename, 'w') -X if hasattr(os, 'fchmod'): -X os.fchmod(changed_file.fileno(), # can cause OSError which aborts -X stat.st_mode) -X if hasattr(os, 'fchown'): -X os.fchown(changed_file.fileno(), # can cause OSError which aborts -X stat.st_uid, stat.st_gid) -X changed_file.writelines(lines) -X changed_file.write(changed_line) -X del lines # reclaim buffer memory -X else: # already flushed, just write -X changed_file.write(changed_line) -X -X if changes == 0: -X logging.info("No edits need for file %s" % -X self.filename) -X else: -X changed_file.close() -X changed_file = None -X if os.path.exists(backup_filename): # back up the original -X os.unlink(backup_filename) -X shutil.copy(self.filename, backup_filename) -X os.rename(changed_filename, self.filename) # the swap -X logging.info("Edited file %s (%d changes)" % -X (self.filename, changes)) -X finally: -X if changed_file is not None: # failed, clean up -X changed_file.close() -X os.unlink(changed_filename) -X return changes -X -X -if __name__ == "__main__": -X logging.basicConfig(level=logging.DEBUG) -X import doctest -X doctest.testmod() -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/line_edit.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/line_edit.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/line_edit.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/line_edit.py': 'MD5 check failed' - ) << \SHAR_EOF -4d05b8a011ff9c6132a3ca4ff477a161 cloud_scripts/opt/cloud/bin/line_edit.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/line_edit.py'` -ne 7961 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/line_edit.py' is not 7961" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/get_template_version.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/get_template_version.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/get_template_version.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/get_template_version.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/get_template_version.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# As the last command send to router before any rules operation, wait until boot up done -X -__TIMEOUT=240 -__FLAGFILE=/var/cache/cloud/boot_up_done -done=0 -for i in `seq 1 $(($__TIMEOUT * 10))` -do -X if [ -e $__FLAGFILE ] -X then -X done=1 -X break -X fi -X sleep 0.1 -X if [ $((i % 10)) -eq 0 ] -X then -X logger -t cloud "Waiting for VM boot up done for one second" -X fi -done -X -if [ -z $done ] -then -X # declare we failed booting process -X echo "Waited 60 seconds but boot up haven't been completed" -X exit -fi -X -release=`cat /etc/cloudstack-release` -sig=`cat /var/cache/cloud/cloud-scripts-signature` -echo "${release}&${sig}" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/get_template_version.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/get_template_version.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/get_template_version.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/get_template_version.sh': 'MD5 check failed' - ) << \SHAR_EOF -2234ad00c02a6be63cb0f4f876b8960b cloud_scripts/opt/cloud/bin/get_template_version.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/get_template_version.sh'` -ne 1449 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/get_template_version.sh' is not 1449" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/update_config.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/update_config.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/update_config.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/update_config.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/update_config.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,N87)G=BD*:68@87)G8R`A/2`R(&%N9"!A7,N97AI="@Q*0H*(R!&25A- -M12!W92!S:&]U;&0@9V5T('1H:7,@;&]C871I;VX@9G)O;2!A(&-O;F9I9W5R -M871I;VX@8VQA7,N97AI="AR971U -M2!S<&5E9&EN9R!U<"!L;V%D:6YG('1I;65S -M"B`@("!I9B!N;W0@*&]S+F5N=FER;VXN9V5T*"=$149%4E]#3TY&242YJ7,N87)G=ELQ -M72!O2`]($YO -M;F4*"B`@("!F;W(@:S$L('8Q(&EN(&=U97-T;F5T7V1I8W0N:71E7,N87!P96YD*&LQ*0H*("`@(&EF(&YO -M="!E>&ES=&EN9U]K97ES.@H@("`@("`@("2`Z -M.B!296-O;F9I9W5R:6YG(&=U97-T(&YE='=O&ES=&EN9U]K97ES.@H@("`@("`@("2!I;B!E>&ES=&EN9U]K97ES.@H@("`@("`@(&9O&ES=',@/2!4&ES=',Z"B`@("`@("`@("`@(&)R96%K -M"@H@("`@B(I*3H* -M("`@("`@("!S>7,N97AI="@P*0H@("`@;&]G9VEN9RYE2`Z.B!5;F%B;&4@=&\@7,N97AI="@Q -M*0H*(R!)9B!T:&4@9W5E2`Z.B!.;R!N965D('1O('!R;V-E/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/update_config.py': 'MD5 check failed' - ) << \SHAR_EOF -a2062b2b010940ea783d8256b807c488 cloud_scripts/opt/cloud/bin/update_config.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/update_config.py'` -ne 5136 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/update_config.py' is not 5136" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/edithosts.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/edithosts.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/edithosts.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/edithosts.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/edithosts.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -X -# edithosts.sh -- edit the dhcphosts file on the routing domain -X -usage() { -X printf "Usage: %s: -m -4 -6 -h -d -n -s -u [-N]\n" $(basename $0) >&2 -} -X -mac= -ipv4= -ipv6= -host= -dflt= -dns= -routes= -duid= -nondefault= -X -while getopts 'm:4:h:d:n:s:6:u:N' OPTION -do -X case $OPTION in -X m) mac="$OPTARG" -X ;; -X 4) ipv4="$OPTARG" -X ;; -X 6) ipv6="$OPTARG" -X ;; -X u) duid="$OPTARG" -X ;; -X h) host="$OPTARG" -X ;; -X d) dflt="$OPTARG" -X ;; -X n) dns="$OPTARG" -X ;; -X s) routes="$OPTARG" -X ;; -X N) nondefault=1 -X ;; -X ?) usage -X exit 2 -X ;; -X esac -done -X -DHCP_HOSTS=/etc/dhcphosts.txt -DHCP_OPTS=/etc/dhcpopts.txt -DHCP_LEASES=/var/lib/misc/dnsmasq.leases -HOSTS=/etc/hosts -X -source /root/func.sh -X -lock="biglock" -#default timeout value is 30 mins as DhcpEntryCommand is not synchronized on agent side any more, -#and multiple commands can be sent to the same VR at a time -locked=$(getLockFile $lock 1800) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -grep "redundant_router=1" /var/cache/cloud/cmdline > /dev/null -no_redundant=$? -X -dnsmasq_managed_lease=`cat /var/cache/cloud/dnsmasq_managed_lease` -X -wait_for_dnsmasq () { -X local _pid=$(pidof dnsmasq) -X for i in 0 1 2 3 4 5 6 7 8 9 10 -X do -X sleep 1 -X _pid=$(pidof dnsmasq) -X [ "$_pid" != "" ] && break; -X done -X [ "$_pid" != "" ] && return 0; -X logger -t cloud "edithosts: timed out waiting for dnsmasq to start" -X return 1 -} -X -if [ $dnsmasq_managed_lease ] -then -X #release previous dhcp lease if present -X logger -t cloud "edithosts: releasing $ipv4" -X dhcp_release $(ip route get "$ipv4/32" | grep " dev " | sed -e "s/^.* dev \([^ ]*\) .*$/\1/g") $ipv4 $(grep "$ipv4 " $DHCP_LEASES | awk '{print $2}') > /dev/null 2>&1 -X logger -t cloud "edithosts: released $ipv4" -fi -X -logger -t cloud "edithosts: update $mac $ipv4 $ipv6 $host to hosts" -X -[ ! -f $DHCP_HOSTS ] && touch $DHCP_HOSTS -[ ! -f $DHCP_OPTS ] && touch $DHCP_OPTS -[ ! -f $DHCP_LEASES ] && touch $DHCP_LEASES -X -#delete any previous entries from the dhcp hosts file -sed -i /$mac/d $DHCP_HOSTS -if [ $ipv4 ] -then -X sed -i /$ipv4,/d $DHCP_HOSTS -fi -if [ $ipv6 ] -then -X #searching with [$ipv6], matching other ip so using $ipv6], -X sed -i /$ipv6],/d $DHCP_HOSTS -fi -# don't want to do this in the future, we can have same VM with multiple nics/entries -sed -i /$host,/d $DHCP_HOSTS -X -#put in the new entry -if [ $ipv4 ] -then -X echo "$mac,$ipv4,$host,infinite" >>$DHCP_HOSTS -fi -if [ $ipv6 ] -then -X if [ $nondefault ] -X then -X echo "id:$duid,set:nondefault6,[$ipv6],$host,infinite" >>$DHCP_HOSTS -X else -X echo "id:$duid,[$ipv6],$host,infinite" >>$DHCP_HOSTS -X fi -fi -X -if [ $dnsmasq_managed_lease -eq 0 ] -then -X #delete leases to supplied mac and ip addresses -X if [ $ipv4 ] -X then -X sed -i /$mac/d $DHCP_LEASES -X sed -i /"$ipv4 "/d $DHCP_LEASES -X fi -X if [ $ipv6 ] -X then -X sed -i /$duid/d $DHCP_LEASES -X sed -i /"$ipv6 "/d $DHCP_LEASES -X fi -X sed -i /"$host "/d $DHCP_LEASES -X -X #put in the new entry -X if [ $ipv4 ] -X then -X echo "0 $mac $ipv4 $host *" >> $DHCP_LEASES -X fi -X if [ $ipv6 ] -X then -X echo "0 $duid $ipv6 $host *" >> $DHCP_LEASES -X fi -fi -X -#edit hosts file as well -if [ $ipv4 ] -then -X sed -i /"$ipv4 "/d $HOSTS -fi -if [ $ipv6 ] -then -X sed -i /"$ipv6 "/d $HOSTS -fi -sed -i /" $host$"/d $HOSTS -if [ $ipv4 ] -then -X echo "$ipv4 $host" >> $HOSTS -fi -if [ $ipv6 ] -then -X echo "$ipv6 $host" >> $HOSTS -fi -X -if [ "$dflt" != "" -a "$ipv4" != "" ] -then -X #make sure dnsmasq looks into options file -X sed -i /dhcp-optsfile/d /etc/dnsmasq.conf -X echo "dhcp-optsfile=$DHCP_OPTS" >> /etc/dnsmasq.conf -X -X tag=$(echo $ipv4 | tr '.' '_') -X sed -i /$tag,/d $DHCP_OPTS -X if [ "$dflt" == "0.0.0.0" ] -X then -X logger -t cloud "$0: unset default router for $ipv4" -X logger -t cloud "$0: unset dns server for $ipv4" -X echo "$tag,3" >> $DHCP_OPTS -X echo "$tag,6" >> $DHCP_OPTS -X echo "$tag,15" >> $DHCP_OPTS -X fi -X [ "$routes" != "" ] && echo "$tag,121,$routes" >> $DHCP_OPTS -X #delete entry we just put in because we need a tag -X sed -i /$ipv4,/d $DHCP_HOSTS -X #put it back with a tag -X echo "$mac,set:$tag,$ipv4,$host,infinite" >>$DHCP_HOSTS -fi -X -# make dnsmasq re-read files -pid=$(pidof dnsmasq) -if [ "$pid" != "" ] -then -X # use SIGHUP to avoid service outage if dhcp_release is available. -X if [ $dnsmasq_managed_lease ] -X then -X kill -HUP $pid -X else -X systemctl restart dnsmasq -X fi -else -X if [ $no_redundant -eq 1 ] -X then -X wait_for_dnsmasq -X else -X logger -t cloud "edithosts: skip wait dnsmasq due to redundant virtual router" -X fi -fi -X -ret=$? -unlock_exit $ret $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/edithosts.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/edithosts.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/edithosts.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/edithosts.sh': 'MD5 check failed' - ) << \SHAR_EOF -68e47d6a7efaacefbbaebf8b4e7408c3 cloud_scripts/opt/cloud/bin/edithosts.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/edithosts.sh'` -ne 5502 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/edithosts.sh' is not 5502" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/diagnostics.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/diagnostics.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/diagnostics.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/diagnostics.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/diagnostics.py' && -#!/usr/bin/env python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import shlex -import subprocess -import sys -X -X -def run_cmd(command): -X if command is not None: -X try: -X p = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE) -X stdout, stderr = p.communicate() -X return_code = p.returncode -X -X except OSError as e: -X stdout = "Check your command type" -X stderr = "Exception occurred: %s" % e -X return_code = 1 -X -X finally: -X print('%s&&' % stdout.strip()) -X print('%s&&' % stderr.strip()) -X print('%s' % return_code) -X -X -def get_command(): -X arguments = sys.argv -X cmd = " ".join(arguments[1:]) -X cmd_type = sys.argv[1] -X -X if cmd_type == 'ping': -X if '-c' in arguments: -X return cmd -X else: -X return cmd + " -c 4" -X -X elif cmd_type == 'traceroute': -X if '-m' in arguments: -X return cmd -X else: -X return cmd + " -m 20" -X -X elif cmd_type == 'arping': -X if '-c' in arguments: -X return cmd -X else: -X return cmd + " -c 4" -X -X else: -X return None -X -X -if __name__ == "__main__": -X command = get_command() -X run_cmd(command) -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/diagnostics.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/diagnostics.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/diagnostics.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/diagnostics.py': 'MD5 check failed' - ) << \SHAR_EOF -91a837e5bcafee663cbfb8532574405a cloud_scripts/opt/cloud/bin/diagnostics.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/diagnostics.py'` -ne 2012 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/diagnostics.py' is not 2012" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_monitorservice.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_monitorservice.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_monitorservice.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_monitorservice.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py': 'MD5 check failed' - ) << \SHAR_EOF -1121a063f2dbcfc1bdc426ceba249184 cloud_scripts/opt/cloud/bin/cs_monitorservice.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py'` -ne 1541 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py' is not 1541" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpn_l2tp.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpn_l2tp.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpn_l2tp.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -X -X -#set -x -usage() { -X printf "Usage:\n" -X printf "Create VPN : %s -c -r -l -p -s -i \n" $(basename $0) -X printf "Delete VPN : %s -d -l -s -D -C < local cidr> \n" $(basename $0) -X printf "Add VPN User : %s -u \n" $(basename $0) -X printf "Remote VPN User: %s -U /dev/null -X then -X is_vpc=true -X fi -X -X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 500 -j ACCEPT -X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 4500 -j ACCEPT -X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 1701 -j ACCEPT -X sudo iptables $op INPUT -i $dev -p ah -j ACCEPT -X sudo iptables $op INPUT -i $dev -p esp -j ACCEPT -X if $is_vpc -X then -X # Need to apply the following ACL rules as well. -X if sudo iptables -N VPN_FORWARD &> /dev/null -X then -X sudo iptables -I FORWARD -i ppp+ -j VPN_FORWARD -X sudo iptables -I FORWARD -o ppp+ -j VPN_FORWARD -X sudo iptables -A VPN_FORWARD -j DROP -X fi -X sudo iptables $op VPN_FORWARD -i ppp+ -o ppp+ -j RETURN -X sudo iptables $op VPN_FORWARD -i ppp+ -d $cidr -j RETURN -X sudo iptables $op VPN_FORWARD -s $cidr -o ppp+ -j RETURN -X else -X sudo iptables $op FORWARD -i ppp+ -d $cidr -j ACCEPT -X sudo iptables $op FORWARD -s $cidr -o ppp+ -j ACCEPT -X sudo iptables $op FORWARD -i ppp+ -o ppp+ -j ACCEPT -X fi -X sudo iptables $op INPUT -i ppp+ -m udp -p udp --dport 53 -j ACCEPT -X sudo iptables $op INPUT -i ppp+ -m tcp -p tcp --dport 53 -j ACCEPT -X sudo iptables -t nat $op PREROUTING -i ppp+ -p tcp -m tcp --dport 53 -j DNAT --to-destination $local_ip -X sudo iptables -t nat $op PREROUTING -i ppp+ -p udp -m udp --dport 53 -j DNAT --to-destination $local_ip -X -X if $is_vpc -X then -X return -X fi -X -X if sudo iptables -t mangle -N VPN_$public_ip &> /dev/null -X then -X logger -t cloud "$(basename $0): created VPN chain in PREROUTING mangle" -X sudo iptables -t mangle -I PREROUTING -d $public_ip -j VPN_$public_ip -X sudo iptables -t mangle -A VPN_$public_ip -j RETURN -X fi -X op2="-D" -X [ "$op" == "-A" ] && op2="-I" -X sudo iptables -t mangle $op VPN_$public_ip -p ah -j ACCEPT -X sudo iptables -t mangle $op VPN_$public_ip -p esp -j ACCEPT -} -X -start_ipsec() { -X systemctl is-active ipsec > /dev/null -X if [ $? -ne 0 ] -X then -X systemctl start ipsec > /dev/null -X #Wait until ipsec started, 5 seconds at most -X for i in {1..5} -X do -X logger -t cloud "$(basename $0): waiting ipsec start..." -X systemctl is-active ipsec > /dev/null -X result=$? -X if [ $result -eq 0 ] -X then -X break -X fi -X sleep 1 -X done -X fi -X systemctl is-active ipsec > /dev/null -X return $? -} -X -ipsec_server() { -X local op=$1 -X case $op in -X "start") start_ipsec -X sudo systemctl start xl2tpd -X ;; -X "stop") sudo systemctl stop xl2tpd -X ;; -X "restart") start_ipsec -X sudo ipsec auto --rereadall -X systemctl stop xl2tpd -X systemctl start xl2tpd -X ;; -X esac -} -X -create_l2tp_ipsec_vpn_server() { -X local ipsec_psk=$1 -X local public_ip=$2 -X local client_range=$3 -X local local_ip=$4 -X -X sed -i -e "s/left=.*$/left=$public_ip/" /etc/ipsec.d/l2tp.conf -X echo "$public_ip %any : PSK \"$ipsec_psk\"" > /etc/ipsec.d/ipsec.any.secrets -X sed -i -e "s/^ip range = .*$/ip range = $client_range/" /etc/xl2tpd/xl2tpd.conf -X sed -i -e "s/^local ip = .*$/local ip = $local_ip/" /etc/xl2tpd/xl2tpd.conf -X -X sed -i -e "s/^ms-dns.*$/ms-dns $local_ip/" /etc/ppp/options.xl2tpd -X -X iptables_ "-D" $public_ip -X iptables_ "-I" $public_ip -X -X ipsec_server "restart" -X -X ipsec auto --rereadsecrets -X ipsec auto --replace L2TP-PSK -} -X -destroy_l2tp_ipsec_vpn_server() { -X local public_ip=$1 -X -X ipsec auto --down L2TP-PSK -X -X iptables_ "-D" $public_ip -X -X ipsec_server "stop" -} -X -remove_l2tp_ipsec_user() { -X local u=$1 -X sed -i -e "/^$u .*$/d" /etc/ppp/chap-secrets -X if [ -x /usr/bin/tdbdump ]; then -X pid=$(tdbdump /var/run/pppd2.tdb | grep -w $u | awk -F';' '{print $4}' | awk -F= '{print $2}') -X [ "$pid" != "" ] && kill -9 $pid -X fi -X return 0 -} -X -add_l2tp_ipsec_user() { -X local u=$1 -X local passwd=$2 -X -X uptodate=$(grep "^$u \* \"$passwd\" \*$" /etc/ppp/chap-secrets) -X if [ "$uptodate" == "" ] -X then -X remove_l2tp_ipsec_user $u -X echo "$u * \"$passwd\" *" >> /etc/ppp/chap-secrets -X fi -} -X -rflag= -pflag= -lflag= -sflag= -create= -destroy= -useradd= -userdel= -dev= -cidr= -X -while getopts 'cdl:p:r:s:u:U:i:C:' OPTION -do -X case $OPTION in -X c) create=1 -X ;; -X d) destroy=1 -X ;; -X u) useradd=1 -X user_pwd="$OPTARG" -X ;; -X U) userdel=1 -X user="$OPTARG" -X ;; -X r) rflag=1 -X client_range="$OPTARG" -X ;; -X p) pflag=1 -X ipsec_psk="$OPTARG" -X ;; -X l) lflag=1 -X local_ip="$OPTARG" -X ;; -X s) sflag=1 -X server_ip="$OPTARG" -X ;; -X i) dev="$OPTARG" -X ;; -X C) cidr="$OPTARG" -X ;; -X ?) usage -X exit 2 -X ;; -X esac -done -X -if [ "$dev" == "" ] -then -X dev="eth2" -fi -X -if [ "$cidr" == "" ] -then -X cidr=$(get_intf_ip "eth0") -fi -X -[ "$create$destroy" == "11" ] || [ "$create$destroy$useradd$userdel" == "" ] && usage && exit 2 -[ "$create" == "1" ] && [ "$lflag$pflag$rflag$sflag" != "1111" ] && usage && exit 2 -X -if [ "$create" == "1" ]; then -X create_l2tp_ipsec_vpn_server $ipsec_psk $server_ip $client_range $local_ip -X exit $? -fi -X -if [ "$destroy" == "1" ]; then -X destroy_l2tp_ipsec_vpn_server $server_ip -X exit $? -fi -X -if [ "$useradd" == "1" ]; then -X u=$(echo $user_pwd | awk -F',' '{print $1}') -X pwd=$(echo $user_pwd | awk -F',' '{print $2}') -X add_l2tp_ipsec_user $u $pwd -X exit $? -fi -if [ "$userdel" == "1" ]; then -X remove_l2tp_ipsec_user $user -X exit $? -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpn_l2tp.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh': 'MD5 check failed' - ) << \SHAR_EOF -79e41044b43cc49c6b11859534bc454d cloud_scripts/opt/cloud/bin/vpn_l2tp.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh'` -ne 6986 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' is not 6986" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_guestnetwork.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_guestnetwork.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_guestnetwork.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -keys = ['eth1', 'eth2', 'eth3', 'eth4', 'eth5', 'eth6', 'eth7', 'eth8', 'eth9'] -X -X -def merge(dbag, gn): -X device = gn['device'] -X -X if not gn['add'] and device in dbag: -X -X if dbag[device]: -X device_to_die = dbag[device][0] -X try: -X dbag[device].remove(device_to_die) -X except ValueError, e: -X print "[WARN] cs_guestnetwork.py :: Error occurred removing item from databag. => %s" % device_to_die -X del(dbag[device]) -X else: -X del(dbag[device]) -X -X else: -X dbag.setdefault(device, []).append(gn) -X -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_guestnetwork.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py': 'MD5 check failed' - ) << \SHAR_EOF -599105da1bdfaced1f2c8078d3fbed19 cloud_scripts/opt/cloud/bin/cs_guestnetwork.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py'` -ne 1401 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' is not 1401" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_vmdata.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vmdata.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vmdata.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, metadata): -X dbag[metadata["vm_ip_address"]] = metadata["vm_metadata"] -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_vmdata.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vmdata.py': 'MD5 check failed' - ) << \SHAR_EOF -3ee2451cb48927d361f05bb5fe3df4ce cloud_scripts/opt/cloud/bin/cs_vmdata.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vmdata.py'` -ne 892 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' is not 892" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/dnsmasq.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/dnsmasq.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/dnsmasq.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -usage() { -X printf "Usage: %s: \n" $(basename $0) >&2 -} -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -#set -x -#backup the old config file -DHCP_CONFIG=/etc/dnsmasq.d/multiple_ranges.conf -DHCP_CONFIG_BAK=/etc/dnsmasq.d/multiple_ranges.conf.bak -DHCP_CONFIG_MAIN=/etc/dnsmasq.conf -DHCP_CONFIG_MAIN_BAK=/etc/dnsmasq.conf.bak -DHCP_FAILURE_CONFIG=/etc/multiple_ranges.conf.failure -DHCP_FAILURE_CONFIG_MAIN=/etc/dnsmasq.conf.failure -CMDLINE=$(cat /var/cache/cloud/cmdline | tr '\n' ' ') -X -#take a backup copy of the dnsmasq file. -cp "$DHCP_CONFIG_MAIN" "$DHCP_CONFIG_MAIN_BAK" -cp "$DHCP_CONFIG" "$DHCP_CONFIG_BAK" -X -#empty the config file -echo > $DHCP_CONFIG -X -var="$1" -dhcp_range="" -dhcp_gateway="" -dhcp_netmask="" -dns_option="" -dns_servers="" -count=0 -X -X -# fetching the dns Ips from the command line. -dns1=$(echo "$CMDLINE" | grep -o " dns1=[[:digit:]].* " | sed -e 's/dns1=//' | awk '{print $1}') -dns2=$(echo "$CMDLINE" | grep -o " dns2=[[:digit:]].* " | sed -e 's/dns2=//' | awk '{print $1}') -X -dns_servers="${dns1}" -if [ -n "$dns2" ] -then -dns_servers="${dns1},${dns2}" -fi -X -X -# check if useextdns is true -use_ext_dns=$(echo "$CMDLINE" | grep -o "useextdns=true") -while [ -n "$var" ] -do -X var1=$(echo $var | cut -f1 -d "-") -X routerip=$( echo $var1 | cut -f1 -d ":" ) -X gateway=$(echo $var1 | cut -f2 -d ":") -X netmask=$(echo $var1 | cut -f3 -d ":") -X start_ip_of_subnet=$(echo $var1 | cut -f4 -d ":") -X dhcp_range="${dhcp_range}"'dhcp-range=set:range'$count","$start_ip_of_subnet",static \n" -X dhcp_gateway="${dhcp_gateway}"'dhcp-option=tag:range'$count",3,"$gateway" \n" -X dhcp_netmask="${dhcp_netmask}"'dhcp-option=tag:range'$count",1,"$netmask" \n" -X if [ -n "$use_ext_dns" ] -X then -X dns_option="${dns_option}"'dhcp-option=tag:range'$count",6,"$dns_servers" \n" -X else -X dns_option="${dns_option}"'dhcp-option=tag:range'$count",6,$routerip"","$dns_servers" \n" -X fi -X var=$( echo $var | sed "s/${var1}-//" ) -X count=$[$count+1] -done -X -#logging the configuration being removed. -log="" -log="${log}"`grep "^dhcp-option=6" "$DHCP_CONFIG_MAIN"`"\n" -log="${log}"`grep "^dhcp-option=option:router" "$DHCP_CONFIG_MAIN"`"\n" -log="${log}"`grep "^dhcp-range=" "$DHCP_CONFIG_MAIN"`"\n" -X -if [ "$log" != '\n\n\n' ] -then -X #Cleaning the existing dhcp confgiuration -X logger -t cloud "dnsmasq.sh: remvoing the primaryip confg from dnsmasq.conf and adding it to /etc/dnsmaq.d/multiple_ranges.conf" -X logger -t cloud "dnsmasq.sh: config removed from dnsmasq.conf is $log" -X sed -i -e '/dhcp-option=6/d' "$DHCP_CONFIG_MAIN" -X sed -i -e '/dhcp-option=option:router/d' "$DHCP_CONFIG_MAIN" -X sed -i -e '/^dhcp-range=/d' "$DHCP_CONFIG_MAIN" -fi -X -#wrting the new config into the config file. -echo -e "$dhcp_range" >> "$DHCP_CONFIG" -echo -e "$dhcp_gateway" >> "$DHCP_CONFIG" -echo -e "$dhcp_netmask" >> "$DHCP_CONFIG" -echo -e "$dns_option" >> "$DHCP_CONFIG" -X -X -#restart the dnsmasq -systemctl restart dnsmasq -result=$? -if [ "$result" -ne "0" ] -then -X logger -t cloud "dnsmasq.sh: could not configure dnsmasq" -X logger -t cloud "dnsmasq.sh: reverting to the old config" -X logger -t cloud "dnsmasq.sh: copying the failure config to `$DHCP_FAILURE_CONFIG` and `$DHCP_FAILURE_CONFIG_MAIN`" -X cp "$DHCP_CONFIG" "$DHCP_FAILURE_CONFIG" -X cp "$DHCP_CONFIG_MAIN" "$DHCP_FAILURE_CONFIG_MAIN" -X cp "$DHCP_CONFIG_BAK" "$DHCP_CONFIG" -X cp "$DHCP_CONFIG_MAIN_BAK" "$DHCP_CONFIG_MAIN" -X systemctl restart dnsmasq -X unlock_exit $result $lock $locked -fi -rm "$DHCP_CONFIG_BAK" -rm "$DHCP_CONFIG_MAIN_BAK" -unlock_exit $result $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/dnsmasq.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/dnsmasq.sh': 'MD5 check failed' - ) << \SHAR_EOF -d603da3043a61bea911e21fb4da8ded0 cloud_scripts/opt/cloud/bin/dnsmasq.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/dnsmasq.sh'` -ne 4359 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' is not 4359" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_dhcp.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_dhcp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_dhcp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_dhcp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_dhcp.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2P@96YT2!N;W0@ -M:6X@7,Z"B`@("`@("`@("`@(')E;6]V95]K97ES+F%D9"AK -M97DI"@H@("`@("`@(&9O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_dhcp.py': 'MD5 check failed' - ) << \SHAR_EOF -9b17e95a8fcb1cf185c9e74cc6ddecca cloud_scripts/opt/cloud/bin/cs_dhcp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_dhcp.py'` -ne 1533 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_dhcp.py' is not 1533" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_cmdline.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_cmdline.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_cmdline.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, cmdline): -X if 'redundant_router' in cmdline['cmd_line']: -X cmdline['cmd_line']['redundant_router'] = "true" -X else: -X cmdline['cmd_line']['redundant_router'] = "false" -X dbag['config'] = cmdline['cmd_line'] -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_cmdline.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_cmdline.py': 'MD5 check failed' - ) << \SHAR_EOF -a6290582c86832c4c94985580ceda8e5 cloud_scripts/opt/cloud/bin/cs_cmdline.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_cmdline.py'` -ne 1045 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' is not 1045" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/ips0003.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0003.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0003.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0003.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0003.json' && -{"ip_address": -[{"public_ip":"10.0.3.10", -"source_nat":true, -"add":true, -"one_to_one_nat":false, -"first_i_p":false, -"gateway":"10.0.3.1", -"netmask":"255.255.255.0", -"vif_mac_address":"06:cb:aa:00:00:03", -"nic_dev_id":2, -"new_nic":false}], -"type":"ips"} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0003.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0003.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0003.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0003.json': 'MD5 check failed' - ) << \SHAR_EOF -e8113ca4dc70734a2e07e4cd5aa817e7 cloud_scripts/opt/cloud/testdata/ips0003.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0003.json'` -ne 253 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0003.json' is not 253" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/vmp0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/vmp0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/vmp0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/vmp0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/testdata/vmp0001.json -M>R)I<%]A9&1R97-S(CHB,3/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/vmp0001.json': 'MD5 check failed' - ) << \SHAR_EOF -a3150c6241b311cbfc2180be23d1ddee cloud_scripts/opt/cloud/testdata/vmp0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/vmp0001.json'` -ne 77 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/vmp0001.json' is not 77" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/gn0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/gn0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/gn0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/gn0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/gn0001.json' && -{"add":true, -"mac_address":"02:00:56:36:00:02", -"device":"eth3", -"router_guest_ip":"172.16.1.1", -"router_guest_gateway":"172.16.1.0", -"router_guest_netmask":"255.255.255.0", -"cidr":"24", -"dns":"8.8.8.8,8.8.8.4", -"domain_name":"devcloud.local", -"type":"guestnetwork"} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/gn0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/gn0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/gn0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/gn0001.json': 'MD5 check failed' - ) << \SHAR_EOF -e790842388eb0a3f86ea0dbbcf4608eb cloud_scripts/opt/cloud/testdata/gn0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/gn0001.json'` -ne 267 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/gn0001.json' is not 267" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/dhcp0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/dhcp0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/dhcp0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' && -{ -X "host_name":"VM-58976c22-0832-451e-9ab2-039e9f27e415", -X "mac_address":"02:00:26:c3:00:02", -X "ipv4_address":"172.16.1.102", -X "ipv6_duid":"00:03:00:01:02:00:26:c3:00:02", -X "default_gateway":"172.16.1.1", -X "default_entry":true, -X "type":"dhcpentry" -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/dhcp0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/dhcp0001.json': 'MD5 check failed' - ) << \SHAR_EOF -0f44da4132b56f2ece9b36bab3213f28 cloud_scripts/opt/cloud/testdata/dhcp0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/dhcp0001.json'` -ne 250 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' is not 250" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/acl0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/acl0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/acl0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/acl0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/acl0001.json' && -{ -X "eth2": { -X "device": "eth2", -X "egress_rules": [ -X { -X "allowed": false, -X "cidr": "10.0.6.0/8", -X "first_port": 60, -X "last_port": 60, -X "type": "tcp" -X } -X ], -X "ingress_rules": [ -X { -X "allowed": true, -X "cidr": "10.0.1.0/8", -X "protocol": 41, -X "type": "protocol" -X }, -X { -X "allowed": true, -X "cidr": "10.0.4.0/8", -X "type": "all" -X }, -X { -X "allowed": true, -X "cidr": "10.0.3.0/8", -X "icmp_code": -1, -X "icmp_type": -1, -X "type": "icmp" -X }, -X { -X "allowed": true, -X "cidr": "10.0.2.0/8", -X "first_port": 40, -X "last_port": 40, -X "type": "udp" -X }, -X { -X "allowed": true, -X "cidr": "10.0.1.0/8", -X "first_port": 30, -X "last_port": 30, -X "type": "tcp" -X } -X ], -X "mac_address": "02:00:0d:7b:00:04", -X "nic_ip": "172.16.1.1", -X "nic_netmask": "24", -X "private_gateway_acl": false, -X "type": "networkacl" -X }, -X "id": "networkacl" -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/acl0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/acl0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/acl0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/acl0001.json': 'MD5 check failed' - ) << \SHAR_EOF -1ea2a1b5d6a98bc6c0fc2375de284b17 cloud_scripts/opt/cloud/testdata/acl0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/acl0001.json'` -ne 1405 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/acl0001.json' is not 1405" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/README ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/README' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/README (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/README (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/README' && -Json file used to test the provisioning scripts on virtual appliances -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/README' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/README' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/README failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/README': 'MD5 check failed' - ) << \SHAR_EOF -13e5ecf4d998c3df3cf53485d6f46ee1 cloud_scripts/opt/cloud/testdata/README -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/README'` -ne 70 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/README' is not 70" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/ips0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0001.json' && -{"ip_address": -[{"public_ip":"10.0.2.102", -"source_nat":true, -"add":true, -"one_to_one_nat":false, -"first_i_p":false, -"gateway":"10.0.2.1", -"netmask":"255.255.255.0", -"vif_mac_address":"06:cb:aa:00:00:03", -"nic_dev_id":1, -"new_nic":false}], -"type":"ips"} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0001.json': 'MD5 check failed' - ) << \SHAR_EOF -6f7337aaa605096eef31300afba0f4af cloud_scripts/opt/cloud/testdata/ips0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0001.json'` -ne 254 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0001.json' is not 254" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/test.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/test.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/test.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/test.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/test.sh' && -#!/bin/sh -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -cp /opt/cloud/testdata/* /etc/cloudstack -/opt/cloud/bin/update_config.py cmd_line.json -/opt/cloud/bin/update_config.py gn0001.json -/opt/cloud/bin/update_config.py ips0001.json -/opt/cloud/bin/update_config.py ips0002.json -/opt/cloud/bin/update_config.py ips0003.json -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/test.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/testdata/test.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/test.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/test.sh': 'MD5 check failed' - ) << \SHAR_EOF -7fbb72051fd8d3b66fd481aa51d3debe cloud_scripts/opt/cloud/testdata/test.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/test.sh'` -ne 1062 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/test.sh' is not 1062" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/ips0002.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0002.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0002.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0002.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0002.json' && -{"ip_address": -[{"public_ip":"10.0.2.103", -"source_nat":true, -"add":true, -"one_to_one_nat":false, -"first_i_p":false, -"gateway":"10.0.2.1", -"netmask":"255.255.255.0", -"vif_mac_address":"06:cb:aa:00:00:03", -"nic_dev_id":1, -"new_nic":false}], -"type":"ips"} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0002.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0002.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0002.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0002.json': 'MD5 check failed' - ) << \SHAR_EOF -12aec2bca1d88c499ee0af39c2e20ea1 cloud_scripts/opt/cloud/testdata/ips0002.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0002.json'` -ne 254 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0002.json' is not 254" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/s2s0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/s2s0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/s2s0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/s2s0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/s2s0001.json' && -{ -X "local_public_ip":"172.16.1.1", -X "local_guest_cidr":"172.16.1.0/24", -X "local_public_gateway":"172.16.1.1", -X "peer_gateway_ip":"10.200.200.1", -X "peer_guest_cidr_list":"10.0.0.0/24", -X "esp_policy":"3des-md5", -X "ike_policy":"3des-md5", -X "ipsec_psk":"vpnblabla", -X "ike_lifetime":86400, -X "esp_lifetime":3600, -X "create":true, -X "dpd":false, -X "passive":false, -X "type":"site2sitevpn" -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/s2s0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/s2s0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/s2s0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/s2s0001.json': 'MD5 check failed' - ) << \SHAR_EOF -ff589cb7ab7721a270f4cc703719c917 cloud_scripts/opt/cloud/testdata/s2s0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/s2s0001.json'` -ne 380 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/s2s0001.json' is not 380" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/ips0003.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0003.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0003.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0003.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0003.json' && -{"ip_address": -[{"public_ip":"10.0.3.10", -"source_nat":true, -"add":true, -"one_to_one_nat":false, -"first_i_p":false, -"gateway":"10.0.3.1", -"netmask":"255.255.255.0", -"vif_mac_address":"06:cb:aa:00:00:03", -"nic_dev_id":2, -"new_nic":false}], -"type":"ips"} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0003.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0003.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0003.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0003.json': 'MD5 check failed' - ) << \SHAR_EOF -e8113ca4dc70734a2e07e4cd5aa817e7 cloud_scripts/opt/cloud/testdata/ips0003.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0003.json'` -ne 253 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0003.json' is not 253" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/vmp0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/vmp0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/vmp0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/vmp0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/testdata/vmp0001.json -M>R)I<%]A9&1R97-S(CHB,3/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/vmp0001.json': 'MD5 check failed' - ) << \SHAR_EOF -a3150c6241b311cbfc2180be23d1ddee cloud_scripts/opt/cloud/testdata/vmp0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/vmp0001.json'` -ne 77 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/vmp0001.json' is not 77" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/gn0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/gn0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/gn0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/gn0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/gn0001.json' && -{"add":true, -"mac_address":"02:00:56:36:00:02", -"device":"eth3", -"router_guest_ip":"172.16.1.1", -"router_guest_gateway":"172.16.1.0", -"router_guest_netmask":"255.255.255.0", -"cidr":"24", -"dns":"8.8.8.8,8.8.8.4", -"domain_name":"devcloud.local", -"type":"guestnetwork"} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/gn0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/gn0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/gn0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/gn0001.json': 'MD5 check failed' - ) << \SHAR_EOF -e790842388eb0a3f86ea0dbbcf4608eb cloud_scripts/opt/cloud/testdata/gn0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/gn0001.json'` -ne 267 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/gn0001.json' is not 267" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/dhcp0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/dhcp0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/dhcp0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' && -{ -X "host_name":"VM-58976c22-0832-451e-9ab2-039e9f27e415", -X "mac_address":"02:00:26:c3:00:02", -X "ipv4_address":"172.16.1.102", -X "ipv6_duid":"00:03:00:01:02:00:26:c3:00:02", -X "default_gateway":"172.16.1.1", -X "default_entry":true, -X "type":"dhcpentry" -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/dhcp0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/dhcp0001.json': 'MD5 check failed' - ) << \SHAR_EOF -0f44da4132b56f2ece9b36bab3213f28 cloud_scripts/opt/cloud/testdata/dhcp0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/dhcp0001.json'` -ne 250 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/dhcp0001.json' is not 250" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/acl0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/acl0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/acl0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/acl0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/acl0001.json' && -{ -X "eth2": { -X "device": "eth2", -X "egress_rules": [ -X { -X "allowed": false, -X "cidr": "10.0.6.0/8", -X "first_port": 60, -X "last_port": 60, -X "type": "tcp" -X } -X ], -X "ingress_rules": [ -X { -X "allowed": true, -X "cidr": "10.0.1.0/8", -X "protocol": 41, -X "type": "protocol" -X }, -X { -X "allowed": true, -X "cidr": "10.0.4.0/8", -X "type": "all" -X }, -X { -X "allowed": true, -X "cidr": "10.0.3.0/8", -X "icmp_code": -1, -X "icmp_type": -1, -X "type": "icmp" -X }, -X { -X "allowed": true, -X "cidr": "10.0.2.0/8", -X "first_port": 40, -X "last_port": 40, -X "type": "udp" -X }, -X { -X "allowed": true, -X "cidr": "10.0.1.0/8", -X "first_port": 30, -X "last_port": 30, -X "type": "tcp" -X } -X ], -X "mac_address": "02:00:0d:7b:00:04", -X "nic_ip": "172.16.1.1", -X "nic_netmask": "24", -X "private_gateway_acl": false, -X "type": "networkacl" -X }, -X "id": "networkacl" -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/acl0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/acl0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/acl0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/acl0001.json': 'MD5 check failed' - ) << \SHAR_EOF -1ea2a1b5d6a98bc6c0fc2375de284b17 cloud_scripts/opt/cloud/testdata/acl0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/acl0001.json'` -ne 1405 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/acl0001.json' is not 1405" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/README ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/README' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/README (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/README (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/README' && -Json file used to test the provisioning scripts on virtual appliances -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/README' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/README' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/README failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/README': 'MD5 check failed' - ) << \SHAR_EOF -13e5ecf4d998c3df3cf53485d6f46ee1 cloud_scripts/opt/cloud/testdata/README -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/README'` -ne 70 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/README' is not 70" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/ips0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0001.json' && -{"ip_address": -[{"public_ip":"10.0.2.102", -"source_nat":true, -"add":true, -"one_to_one_nat":false, -"first_i_p":false, -"gateway":"10.0.2.1", -"netmask":"255.255.255.0", -"vif_mac_address":"06:cb:aa:00:00:03", -"nic_dev_id":1, -"new_nic":false}], -"type":"ips"} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0001.json': 'MD5 check failed' - ) << \SHAR_EOF -6f7337aaa605096eef31300afba0f4af cloud_scripts/opt/cloud/testdata/ips0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0001.json'` -ne 254 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0001.json' is not 254" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/test.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/test.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/test.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/test.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/test.sh' && -#!/bin/sh -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -cp /opt/cloud/testdata/* /etc/cloudstack -/opt/cloud/bin/update_config.py cmd_line.json -/opt/cloud/bin/update_config.py gn0001.json -/opt/cloud/bin/update_config.py ips0001.json -/opt/cloud/bin/update_config.py ips0002.json -/opt/cloud/bin/update_config.py ips0003.json -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/test.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/testdata/test.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/test.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/test.sh': 'MD5 check failed' - ) << \SHAR_EOF -7fbb72051fd8d3b66fd481aa51d3debe cloud_scripts/opt/cloud/testdata/test.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/test.sh'` -ne 1062 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/test.sh' is not 1062" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/ips0002.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/ips0002.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/ips0002.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/ips0002.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/ips0002.json' && -{"ip_address": -[{"public_ip":"10.0.2.103", -"source_nat":true, -"add":true, -"one_to_one_nat":false, -"first_i_p":false, -"gateway":"10.0.2.1", -"netmask":"255.255.255.0", -"vif_mac_address":"06:cb:aa:00:00:03", -"nic_dev_id":1, -"new_nic":false}], -"type":"ips"} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/ips0002.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/ips0002.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/ips0002.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/ips0002.json': 'MD5 check failed' - ) << \SHAR_EOF -12aec2bca1d88c499ee0af39c2e20ea1 cloud_scripts/opt/cloud/testdata/ips0002.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/ips0002.json'` -ne 254 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/ips0002.json' is not 254" - fi -fi -# ============= cloud_scripts/opt/cloud/testdata/s2s0001.json ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/testdata/s2s0001.json' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/testdata/s2s0001.json (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/testdata/s2s0001.json (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/testdata/s2s0001.json' && -{ -X "local_public_ip":"172.16.1.1", -X "local_guest_cidr":"172.16.1.0/24", -X "local_public_gateway":"172.16.1.1", -X "peer_gateway_ip":"10.200.200.1", -X "peer_guest_cidr_list":"10.0.0.0/24", -X "esp_policy":"3des-md5", -X "ike_policy":"3des-md5", -X "ipsec_psk":"vpnblabla", -X "ike_lifetime":86400, -X "esp_lifetime":3600, -X "create":true, -X "dpd":false, -X "passive":false, -X "type":"site2sitevpn" -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/testdata/s2s0001.json' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/testdata/s2s0001.json' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/testdata/s2s0001.json failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/testdata/s2s0001.json': 'MD5 check failed' - ) << \SHAR_EOF -ff589cb7ab7721a270f4cc703719c917 cloud_scripts/opt/cloud/testdata/s2s0001.json -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/testdata/s2s0001.json'` -ne 380 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/testdata/s2s0001.json' is not 380" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -ip link|grep BROADCAST|grep -v eth0|grep -v eth1|cut -d ":" -f 2 > /tmp/iflist -while read i -do -X ip addr show $i|grep "inet " > /tmp/iplist_$i -X while read line -X do -X ip=`echo $line|cut -d " " -f 2|cut -d "/" -f 1` -X arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 -X arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 -X done < /tmp/iplist_$i -done < /tmp/iflist -sleep 1 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ': 'MD5 check failed' - ) << \SHAR_EOF -023d994f54c0955f160f127c1d85d6ae cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ'` -ne 1177 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' is not 1177" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/checkrouter.sh.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/checkrouter.sh.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/checkrouter.sh.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -STATUS=UNKNOWN -INTERFACE=eth1 -ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g') -if [ $ROUTER_TYPE = "router" ] -then -X ROUTER_STATE=$(ip addr | grep eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi') -X STATUS=$ROUTER_STATE -else -X ROUTER_STATE=$(ip addr | grep $INTERFACE | grep state | awk '{print $9;}') -X if [ $ROUTER_STATE = "UP" ] -X then -X STATUS=MASTER -X elif [ $ROUTER_STATE = "DOWN" ] -X then -X STATUS=BACKUP -X fi -fi -X -echo "Status: ${STATUS}" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/checkrouter.sh.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ': 'MD5 check failed' - ) << \SHAR_EOF -bbd331057760019d05ead01eec5e42aa cloud_scripts/opt/cloud/templates/checkrouter.sh.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ'` -ne 1357 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' is not 1357" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/heartbeat.sh.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/heartbeat.sh.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/heartbeat.sh.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -t=$(date +%s) -echo $t > /ramdisk/rrouter/keepalived.ts -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/heartbeat.sh.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ': 'MD5 check failed' - ) << \SHAR_EOF -c006a52c775a0418870c0c50f0131ee7 cloud_scripts/opt/cloud/templates/heartbeat.sh.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ'` -ne 853 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' is not 853" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/conntrackd.conf.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/conntrackd.conf.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/conntrackd.conf.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# Synchronizer settings -# -Sync { -X Mode FTFW { -X # -X # Size of the resend queue (in objects). This is the maximum -X # number of objects that can be stored waiting to be confirmed -X # via acknoledgment. If you keep this value low, the daemon -X # will have less chances to recover state-changes under message -X # omission. On the other hand, if you keep this value high, -X # the daemon will consume more memory to store dead objects. -X # Default is 131072 objects. -X # -X # ResendQueueSize 131072 -X -X # -X # This parameter allows you to set an initial fixed timeout -X # for the committed entries when this node goes from backup -X # to primary. This mechanism provides a way to purge entries -X # that were not recovered appropriately after the specified -X # fixed timeout. If you set a low value, TCP entries in -X # Established states with no traffic may hang. For example, -X # an SSH connection without KeepAlive enabled. If not set, -X # the daemon uses an approximate timeout value calculation -X # mechanism. By default, this option is not set. -X # -X # CommitTimeout 180 -X -X # -X # If the firewall replica goes from primary to backup, -X # the conntrackd -t command is invoked in the script. -X # This command schedules a flush of the table in N seconds. -X # This is useful to purge the connection tracking table of -X # zombie entries and avoid clashes with old entries if you -X # trigger several consecutive hand-overs. Default is 60 seconds. -X # -X # PurgeTimeout 60 -X -X # Set the acknowledgement window size. If you decrease this -X # value, the number of acknowlegdments increases. More -X # acknowledgments means more overhead as conntrackd has to -X # handle more control messages. On the other hand, if you -X # increase this value, the resend queue gets more populated. -X # This results in more overhead in the queue releasing. -X # The following value is based on some practical experiments -X # measuring the cycles spent by the acknowledgment handling -X # with oprofile. If not set, default window size is 300. -X # -X # ACKWindowSize 300 -X -X # -X # This clause allows you to disable the external cache. Thus, -X # the state entries are directly injected into the kernel -X # conntrack table. As a result, you save memory in user-space -X # but you consume slots in the kernel conntrack table for -X # backup state entries. Moreover, disabling the external cache -X # means more CPU consumption. You need a Linux kernel -X # >= 2.6.29 to use this feature. By default, this clause is -X # set off. If you are installing conntrackd for first time, -X # please read the user manual and I encourage you to consider -X # using the fail-over scripts instead of enabling this option! -X # -X # DisableExternalCache Off -X } -X -X # -X # Multicast IP and interface where messages are -X # broadcasted (dedicated link). IMPORTANT: Make sure -X # that iptables accepts traffic for destination -X # 225.0.0.50, eg: -X # -X # iptables -I INPUT -d 225.0.0.50 -j ACCEPT -X # iptables -I OUTPUT -d 225.0.0.50 -j ACCEPT -X # -X Multicast { -X # -X # Multicast address: The address that you use as destination -X # in the synchronization messages. You do not have to add -X # this IP to any of your existing interfaces. If any doubt, -X # do not modify this value. -X # -X IPv4_address 225.0.0.50 -X -X # -X # The multicast group that identifies the cluster. If any -X # doubt, do not modify this value. -X # -X Group 3780 -X -X # -X # IP address of the interface that you are going to use to -X # send the synchronization messages. Remember that you must -X # use a dedicated link for the synchronization messages. -X # -X IPv4_interface [LINK_IP] -X -X # -X # The name of the interface that you are going to use to -X # send the synchronization messages. -X # -X Interface [LINK_IF] -X -X # The multicast sender uses a buffer to enqueue the packets -X # that are going to be transmitted. The default size of this -X # socket buffer is available at /proc/sys/net/core/wmem_default. -X # This value determines the chances to have an overrun in the -X # sender queue. The overrun results packet loss, thus, losing -X # state information that would have to be retransmitted. If you -X # notice some packet loss, you may want to increase the size -X # of the sender buffer. The default size is usually around -X # ~100 KBytes which is fairly small for busy firewalls. -X # -X SndSocketBuffer 1249280 -X -X # The multicast receiver uses a buffer to enqueue the packets -X # that the socket is pending to handle. The default size of this -X # socket buffer is available at /proc/sys/net/core/rmem_default. -X # This value determines the chances to have an overrun in the -X # receiver queue. The overrun results packet loss, thus, losing -X # state information that would have to be retransmitted. If you -X # notice some packet loss, you may want to increase the size of -X # the receiver buffer. The default size is usually around -X # ~100 KBytes which is fairly small for busy firewalls. -X # -X RcvSocketBuffer 1249280 -X -X # -X # Enable/Disable message checksumming. This is a good -X # property to achieve fault-tolerance. In case of doubt, do -X # not modify this value. -X # -X Checksum on -X } -X # -X # You can specify more than one dedicated link. Thus, if one dedicated -X # link fails, conntrackd can fail-over to another. Note that adding -X # more than one dedicated link does not mean that state-updates will -X # be sent to all of them. There is only one active dedicated link at -X # a given moment. The `Default' keyword indicates that this interface -X # will be selected as the initial dedicated link. You can have -X # up to 4 redundant dedicated links. Note: Use different multicast -X # groups for every redundant link. -X # -X # Multicast Default { -X # IPv4_address 225.0.0.51 -X # Group 3781 -X # IPv4_interface 192.168.100.101 -X # Interface eth3 -X # # SndSocketBuffer 1249280 -X # # RcvSocketBuffer 1249280 -X # Checksum on -X # } -X -X # -X # You can use Unicast UDP instead of Multicast to propagate events. -X # Note that you cannot use unicast UDP and Multicast at the same -X # time, you can only select one. -X # -X # UDP { -X # -X # UDP address that this firewall uses to listen to events. -X # -X # IPv4_address 192.168.2.100 -X # -X # or you may want to use an IPv6 address: -X # -X # IPv6_address fe80::215:58ff:fe28:5a27 -X -X # -X # Destination UDP address that receives events, ie. the other -X # firewall's dedicated link address. -X # -X # IPv4_Destination_Address 192.168.2.101 -X # -X # or you may want to use an IPv6 address: -X # -X # IPv6_Destination_Address fe80::2d0:59ff:fe2a:775c -X -X # -X # UDP port used -X # -X # Port 3780 -X -X # -X # The name of the interface that you are going to use to -X # send the synchronization messages. -X # -X # Interface eth2 -X -X # -X # The sender socket buffer size -X # -X # SndSocketBuffer 1249280 -X -X # -X # The receiver socket buffer size -X # -X # RcvSocketBuffer 1249280 -X -X # -X # Enable/Disable message checksumming. -X # -X # Checksum on -X # } -X -} -X -# -# General settings -# -General { -X # -X # Set the nice value of the daemon, this value goes from -20 -X # (most favorable scheduling) to 19 (least favorable). Using a -X # very low value reduces the chances to lose state-change events. -X # Default is 0 but this example file sets it to most favourable -X # scheduling as this is generally a good idea. See man nice(1) for -X # more information. -X # -X Nice -20 -X -X # -X # Select a different scheduler for the daemon, you can select between -X # RR and FIFO and the process priority (minimum is 0, maximum is 99). -X # See man sched_setscheduler(2) for more information. Using a RT -X # scheduler reduces the chances to overrun the Netlink buffer. -X # -X # Scheduler { -X # Type FIFO -X # Priority 99 -X # } -X -X # -X # Number of buckets in the cache hashtable. The bigger it is, -X # the closer it gets to O(1) at the cost of consuming more memory. -X # Read some documents about tuning hashtables for further reference. -X # -X HashSize 32768 -X -X # -X # Maximum number of conntracks, it should be double of: -X # $ cat /proc/sys/net/netfilter/nf_conntrack_max -X # since the daemon may keep some dead entries cached for possible -X # retransmission during state synchronization. -X # -X HashLimit 131072 -X -X LogFile on -X -X # -X # Syslog: on, off or a facility name (daemon (default) or local0..7) -X # Default: off -X # -X Syslog on -X -X # -X # Lockfile -X # -X LockFile /var/lock/conntrackd.lock -X -X # -X # Unix socket configuration -X # -X UNIX { -X Path /var/run/conntrackd.sock -X Backlog 20 -X } -X -X SocketBufferSize 2097152 -X SocketBufferSizeMaxGrown 8388608 -X -X # -X # Netlink event socket buffer size. If you do not specify this clause, -X # the default buffer size value in /proc/net/core/rmem_default is -X # used. This default value is usually around 100 Kbytes which is -X # fairly small for busy firewalls. This leads to event message dropping -X # and high CPU consumption. This example configuration file sets the -X # size to 2 MBytes to avoid this sort of problems. -X # -X NetlinkBufferSize 2097152 -X -X # -X # The daemon doubles the size of the netlink event socket buffer size -X # if it detects netlink event message dropping. This clause sets the -X # maximum buffer size growth that can be reached. This example file -X # sets the size to 8 MBytes. -X # -X NetlinkBufferSizeMaxGrowth 8388608 -X -X # -X # If the daemon detects that Netlink is dropping state-change events, -X # it automatically schedules a resynchronization against the Kernel -X # after 30 seconds (default value). Resynchronizations are expensive -X # in terms of CPU consumption since the daemon has to get the full -X # kernel state-table and purge state-entries that do not exist anymore. -X # Be careful of setting a very small value here. You have the following -X # choices: On (enabled, use default 30 seconds value), Off (disabled) -X # or Value (in seconds, to set a specific amount of time). If not -X # specified, the daemon assumes that this option is enabled. -X # -X # NetlinkOverrunResync On -X -X # -X # If you want reliable event reporting over Netlink, set on this -X # option. If you set on this clause, it is a good idea to set off -X # NetlinkOverrunResync. This option is off by default and you need -X # a Linux kernel >= 2.6.31. -X # -X # NetlinkEventsReliable Off -X -X # -X # By default, the daemon receives state updates following an -X # event-driven model. You can modify this behaviour by switching to -X # polling mode with the PollSecs clause. This clause tells conntrackd -X # to dump the states in the kernel every N seconds. With regards to -X # synchronization mode, the polling mode can only guarantee that -X # long-lifetime states are recovered. The main advantage of this method -X # is the reduction in the state replication at the cost of reducing the -X # chances of recovering connections. -X # -X # PollSecs 15 -X -X # -X # The daemon prioritizes the handling of state-change events coming -X # from the core. With this clause, you can set the maximum number of -X # state-change events (those coming from kernel-space) that the daemon -X # will handle after which it will handle other events coming from the -X # network or userspace. A low value improves interactivity (in terms of -X # real-time behaviour) at the cost of extra CPU consumption. -X # Default (if not set) is 100. -X # -X # EventIterationLimit 100 -X -X # -X # Event filtering: This clause allows you to filter certain traffic, -X # There are currently three filter-sets: Protocol, Address and -X # State. The filter is attached to an action that can be: Accept or -X # Ignore. Thus, you can define the event filtering policy of the -X # filter-sets in positive or negative logic depending on your needs. -X # You can select if conntrackd filters the event messages from -X # user-space or kernel-space. The kernel-space event filtering -X # saves some CPU cycles by avoiding the copy of the event message -X # from kernel-space to user-space. The kernel-space event filtering -X # is prefered, however, you require a Linux kernel >= 2.6.29 to -X # filter from kernel-space. If you want to select kernel-space -X # event filtering, use the keyword 'Kernelspace' instead of -X # 'Userspace'. -X # -X Filter From Userspace { -X # -X # Accept only certain protocols: You may want to replicate -X # the state of flows depending on their layer 4 protocol. -X # -X Protocol Accept { -X TCP -X SCTP -X DCCP -X UDP -X ICMP # This requires a Linux kernel >= 2.6.31 -X } -X -X # -X # Ignore traffic for a certain set of IP's: Usually all the -X # IP assigned to the firewall since local traffic must be -X # ignored, only forwarded connections are worth to replicate. -X # Note that these values depends on the local IPs that are -X # assigned to the firewall. -X # -X Address Ignore { -X IPv4_address 127.0.0.1 # loopback -X IPv4_address [IGNORE_IP1] -X IPv4_address [IGNORE_IP2] -X IPv4_address [IGNORE_IP3] -X #IPv4_address 192.168.0.100 # virtual IP 1 -X #IPv4_address 192.168.1.100 # virtual IP 2 -X #IPv4_address 192.168.0.1 -X #IPv4_address 192.168.1.1 -X #IPv4_address 192.168.100.100 # dedicated link ip -X # -X # You can also specify networks in format IP/cidr. -X # IPv4_address 192.168.0.0/24 -X # -X # You can also specify an IPv6 address -X # IPv6_address ::1 -X } -X -X # -X # Uncomment this line below if you want to filter by flow state. -X # This option introduces a trade-off in the replication: it -X # reduces CPU consumption at the cost of having lazy backup -X # firewall replicas. The existing TCP states are: SYN_SENT, -X # SYN_RECV, ESTABLISHED, FIN_WAIT, CLOSE_WAIT, LAST_ACK, -X # TIME_WAIT, CLOSED, LISTEN. -X # -X # State Accept { -X # ESTABLISHED CLOSED TIME_WAIT CLOSE_WAIT for TCP -X # } -X } -X -X # default debian service unit file is of Type=notify -X Systemd on -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/conntrackd.conf.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ': 'MD5 check failed' - ) << \SHAR_EOF -13781a8581b74b0cf402c01264bdca48 cloud_scripts/opt/cloud/templates/conntrackd.conf.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ'` -ne 15888 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' is not 15888" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -ROUTER_BIN_PATH="/ramdisk/rrouter" -ROUTER_LOG="${ROUTER_BIN_PATH}/keepalived.log" -STRIKE_FILE="$ROUTER_BIN_PATH/keepalived.strikes" -TS_FILE="$ROUTER_BIN_PATH/keepalived.ts" -CT_FILE="$ROUTER_BIN_PATH/keepalived.ct" -X -checktime=$(date +%s) -hbtime=$(cat $TS_FILE) -diff=$(($checktime - $hbtime)) -X -lastcheck=0 -if [ -e $CT_FILE ] -then -X lastcheck=$(cat $CT_FILE 2>/dev/null) -fi -checkdiff=$(($checktime - $lastcheck)) -if [ $checkdiff -ge 0 ] && [ $checkdiff -lt 30 ] -then -X exit -fi -echo $checktime > $CT_FILE -X -s=0 -if [ $diff -gt 10 ] -then -X if [ -e $STRIKE_FILE ] -X then -X s=$(cat $STRIKE_FILE 2>/dev/null) -X fi -X s=$(($s+1)) -X echo $s > $STRIKE_FILE -X echo "Check time: $checktime, last heartbeat time: $hbtime, time diff: $diff, strike count: $s" >> $ROUTER_LOG -else -X rm -f $STRIKE_FILE -fi -X -if [ $s -gt 3 ] -then -X systemctl stop --now keepalived >> $ROUTER_LOG 2>&1 -X systemctl stop --now conntrackd >> $ROUTER_LOG 2>&1 -X -X #Set fault so we have the same effect as a KeepaliveD fault. -X python /opt/cloud/bin/master.py --fault -X -X pkill -9 keepalived >> $ROUTER_LOG 2>&1 || true -X pkill -9 conntrackd >> $ROUTER_LOG 2>&1 || true -X echo Status: FAULT \(keepalived process is dead\) >> $ROUTER_LOG -X exit -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ': 'MD5 check failed' - ) << \SHAR_EOF -7040d7485f89a97be367132d28af1267 cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ'` -ne 2037 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' is not 2037" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/check_bumpup.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/check_bumpup.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/check_bumpup.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -cat /tmp/rrouter_bumped -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/check_bumpup.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/check_bumpup.sh': 'MD5 check failed' - ) << \SHAR_EOF -ab6cbce5de505d137d05bcae1af8e18a cloud_scripts/opt/cloud/templates/check_bumpup.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/check_bumpup.sh'` -ne 822 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' is not 822" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/keepalived.conf.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/keepalived.conf.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/keepalived.conf.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' && -! Licensed to the Apache Software Foundation (ASF) under one -! or more contributor license agreements. See the NOTICE file -! distributed with this work for additional information -! regarding copyright ownership. The ASF licenses this file -! to you under the Apache License, Version 2.0 (the -! "License"); you may not use this file except in compliance -! with the License. You may obtain a copy of the License at -! -! http://www.apache.org/licenses/LICENSE-2.0 -! -! Unless required by applicable law or agreed to in writing, -! software distributed under the License is distributed on an -! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -! KIND, either express or implied. See the License for the -! specific language governing permissions and limitations -! under the License. -X -global_defs { -X router_id [ROUTER_ID] -} -X -vrrp_script heartbeat { -X script "[RROUTER_BIN_PATH]/heartbeat.sh" -X interval 5 -} -X -vrrp_instance inside_network { -X state BACKUP -X interface eth2 -X virtual_router_id 51 -X nopreempt -X -X advert_int 1 -X -X #use_vmac -X #vmac_xmit_base -X -X authentication { -X auth_type AH -X auth_pass PASS -X } -X -X virtual_ipaddress { -X [ROUTER_IP] brd [BOARDCAST] dev eth2 -X } -X -X track_script { -X heartbeat -X } -X -X notify_backup "/opt/cloud/bin/master.py --backup" -X notify_master "/opt/cloud/bin/master.py --master" -X notify_fault "/opt/cloud/bin/master.py --fault" -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/keepalived.conf.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ': 'MD5 check failed' - ) << \SHAR_EOF -464642e87bbb032071111b84f82ba135 cloud_scripts/opt/cloud/templates/keepalived.conf.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ'` -ne 1429 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' is not 1429" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -ip link|grep BROADCAST|grep -v eth0|grep -v eth1|cut -d ":" -f 2 > /tmp/iflist -while read i -do -X ip addr show $i|grep "inet " > /tmp/iplist_$i -X while read line -X do -X ip=`echo $line|cut -d " " -f 2|cut -d "/" -f 1` -X arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 -X arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 -X done < /tmp/iplist_$i -done < /tmp/iflist -sleep 1 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ': 'MD5 check failed' - ) << \SHAR_EOF -023d994f54c0955f160f127c1d85d6ae cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ'` -ne 1177 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/arping_gateways.sh.templ' is not 1177" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/checkrouter.sh.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/checkrouter.sh.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/checkrouter.sh.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -STATUS=UNKNOWN -INTERFACE=eth1 -ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g') -if [ $ROUTER_TYPE = "router" ] -then -X ROUTER_STATE=$(ip addr | grep eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi') -X STATUS=$ROUTER_STATE -else -X ROUTER_STATE=$(ip addr | grep $INTERFACE | grep state | awk '{print $9;}') -X if [ $ROUTER_STATE = "UP" ] -X then -X STATUS=MASTER -X elif [ $ROUTER_STATE = "DOWN" ] -X then -X STATUS=BACKUP -X fi -fi -X -echo "Status: ${STATUS}" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/checkrouter.sh.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ': 'MD5 check failed' - ) << \SHAR_EOF -bbd331057760019d05ead01eec5e42aa cloud_scripts/opt/cloud/templates/checkrouter.sh.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ'` -ne 1357 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/checkrouter.sh.templ' is not 1357" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/heartbeat.sh.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/heartbeat.sh.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/heartbeat.sh.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -t=$(date +%s) -echo $t > /ramdisk/rrouter/keepalived.ts -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/heartbeat.sh.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ': 'MD5 check failed' - ) << \SHAR_EOF -c006a52c775a0418870c0c50f0131ee7 cloud_scripts/opt/cloud/templates/heartbeat.sh.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ'` -ne 853 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/heartbeat.sh.templ' is not 853" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/conntrackd.conf.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/conntrackd.conf.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/conntrackd.conf.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# Synchronizer settings -# -Sync { -X Mode FTFW { -X # -X # Size of the resend queue (in objects). This is the maximum -X # number of objects that can be stored waiting to be confirmed -X # via acknoledgment. If you keep this value low, the daemon -X # will have less chances to recover state-changes under message -X # omission. On the other hand, if you keep this value high, -X # the daemon will consume more memory to store dead objects. -X # Default is 131072 objects. -X # -X # ResendQueueSize 131072 -X -X # -X # This parameter allows you to set an initial fixed timeout -X # for the committed entries when this node goes from backup -X # to primary. This mechanism provides a way to purge entries -X # that were not recovered appropriately after the specified -X # fixed timeout. If you set a low value, TCP entries in -X # Established states with no traffic may hang. For example, -X # an SSH connection without KeepAlive enabled. If not set, -X # the daemon uses an approximate timeout value calculation -X # mechanism. By default, this option is not set. -X # -X # CommitTimeout 180 -X -X # -X # If the firewall replica goes from primary to backup, -X # the conntrackd -t command is invoked in the script. -X # This command schedules a flush of the table in N seconds. -X # This is useful to purge the connection tracking table of -X # zombie entries and avoid clashes with old entries if you -X # trigger several consecutive hand-overs. Default is 60 seconds. -X # -X # PurgeTimeout 60 -X -X # Set the acknowledgement window size. If you decrease this -X # value, the number of acknowlegdments increases. More -X # acknowledgments means more overhead as conntrackd has to -X # handle more control messages. On the other hand, if you -X # increase this value, the resend queue gets more populated. -X # This results in more overhead in the queue releasing. -X # The following value is based on some practical experiments -X # measuring the cycles spent by the acknowledgment handling -X # with oprofile. If not set, default window size is 300. -X # -X # ACKWindowSize 300 -X -X # -X # This clause allows you to disable the external cache. Thus, -X # the state entries are directly injected into the kernel -X # conntrack table. As a result, you save memory in user-space -X # but you consume slots in the kernel conntrack table for -X # backup state entries. Moreover, disabling the external cache -X # means more CPU consumption. You need a Linux kernel -X # >= 2.6.29 to use this feature. By default, this clause is -X # set off. If you are installing conntrackd for first time, -X # please read the user manual and I encourage you to consider -X # using the fail-over scripts instead of enabling this option! -X # -X # DisableExternalCache Off -X } -X -X # -X # Multicast IP and interface where messages are -X # broadcasted (dedicated link). IMPORTANT: Make sure -X # that iptables accepts traffic for destination -X # 225.0.0.50, eg: -X # -X # iptables -I INPUT -d 225.0.0.50 -j ACCEPT -X # iptables -I OUTPUT -d 225.0.0.50 -j ACCEPT -X # -X Multicast { -X # -X # Multicast address: The address that you use as destination -X # in the synchronization messages. You do not have to add -X # this IP to any of your existing interfaces. If any doubt, -X # do not modify this value. -X # -X IPv4_address 225.0.0.50 -X -X # -X # The multicast group that identifies the cluster. If any -X # doubt, do not modify this value. -X # -X Group 3780 -X -X # -X # IP address of the interface that you are going to use to -X # send the synchronization messages. Remember that you must -X # use a dedicated link for the synchronization messages. -X # -X IPv4_interface [LINK_IP] -X -X # -X # The name of the interface that you are going to use to -X # send the synchronization messages. -X # -X Interface [LINK_IF] -X -X # The multicast sender uses a buffer to enqueue the packets -X # that are going to be transmitted. The default size of this -X # socket buffer is available at /proc/sys/net/core/wmem_default. -X # This value determines the chances to have an overrun in the -X # sender queue. The overrun results packet loss, thus, losing -X # state information that would have to be retransmitted. If you -X # notice some packet loss, you may want to increase the size -X # of the sender buffer. The default size is usually around -X # ~100 KBytes which is fairly small for busy firewalls. -X # -X SndSocketBuffer 1249280 -X -X # The multicast receiver uses a buffer to enqueue the packets -X # that the socket is pending to handle. The default size of this -X # socket buffer is available at /proc/sys/net/core/rmem_default. -X # This value determines the chances to have an overrun in the -X # receiver queue. The overrun results packet loss, thus, losing -X # state information that would have to be retransmitted. If you -X # notice some packet loss, you may want to increase the size of -X # the receiver buffer. The default size is usually around -X # ~100 KBytes which is fairly small for busy firewalls. -X # -X RcvSocketBuffer 1249280 -X -X # -X # Enable/Disable message checksumming. This is a good -X # property to achieve fault-tolerance. In case of doubt, do -X # not modify this value. -X # -X Checksum on -X } -X # -X # You can specify more than one dedicated link. Thus, if one dedicated -X # link fails, conntrackd can fail-over to another. Note that adding -X # more than one dedicated link does not mean that state-updates will -X # be sent to all of them. There is only one active dedicated link at -X # a given moment. The `Default' keyword indicates that this interface -X # will be selected as the initial dedicated link. You can have -X # up to 4 redundant dedicated links. Note: Use different multicast -X # groups for every redundant link. -X # -X # Multicast Default { -X # IPv4_address 225.0.0.51 -X # Group 3781 -X # IPv4_interface 192.168.100.101 -X # Interface eth3 -X # # SndSocketBuffer 1249280 -X # # RcvSocketBuffer 1249280 -X # Checksum on -X # } -X -X # -X # You can use Unicast UDP instead of Multicast to propagate events. -X # Note that you cannot use unicast UDP and Multicast at the same -X # time, you can only select one. -X # -X # UDP { -X # -X # UDP address that this firewall uses to listen to events. -X # -X # IPv4_address 192.168.2.100 -X # -X # or you may want to use an IPv6 address: -X # -X # IPv6_address fe80::215:58ff:fe28:5a27 -X -X # -X # Destination UDP address that receives events, ie. the other -X # firewall's dedicated link address. -X # -X # IPv4_Destination_Address 192.168.2.101 -X # -X # or you may want to use an IPv6 address: -X # -X # IPv6_Destination_Address fe80::2d0:59ff:fe2a:775c -X -X # -X # UDP port used -X # -X # Port 3780 -X -X # -X # The name of the interface that you are going to use to -X # send the synchronization messages. -X # -X # Interface eth2 -X -X # -X # The sender socket buffer size -X # -X # SndSocketBuffer 1249280 -X -X # -X # The receiver socket buffer size -X # -X # RcvSocketBuffer 1249280 -X -X # -X # Enable/Disable message checksumming. -X # -X # Checksum on -X # } -X -} -X -# -# General settings -# -General { -X # -X # Set the nice value of the daemon, this value goes from -20 -X # (most favorable scheduling) to 19 (least favorable). Using a -X # very low value reduces the chances to lose state-change events. -X # Default is 0 but this example file sets it to most favourable -X # scheduling as this is generally a good idea. See man nice(1) for -X # more information. -X # -X Nice -20 -X -X # -X # Select a different scheduler for the daemon, you can select between -X # RR and FIFO and the process priority (minimum is 0, maximum is 99). -X # See man sched_setscheduler(2) for more information. Using a RT -X # scheduler reduces the chances to overrun the Netlink buffer. -X # -X # Scheduler { -X # Type FIFO -X # Priority 99 -X # } -X -X # -X # Number of buckets in the cache hashtable. The bigger it is, -X # the closer it gets to O(1) at the cost of consuming more memory. -X # Read some documents about tuning hashtables for further reference. -X # -X HashSize 32768 -X -X # -X # Maximum number of conntracks, it should be double of: -X # $ cat /proc/sys/net/netfilter/nf_conntrack_max -X # since the daemon may keep some dead entries cached for possible -X # retransmission during state synchronization. -X # -X HashLimit 131072 -X -X LogFile on -X -X # -X # Syslog: on, off or a facility name (daemon (default) or local0..7) -X # Default: off -X # -X Syslog on -X -X # -X # Lockfile -X # -X LockFile /var/lock/conntrackd.lock -X -X # -X # Unix socket configuration -X # -X UNIX { -X Path /var/run/conntrackd.sock -X Backlog 20 -X } -X -X SocketBufferSize 2097152 -X SocketBufferSizeMaxGrown 8388608 -X -X # -X # Netlink event socket buffer size. If you do not specify this clause, -X # the default buffer size value in /proc/net/core/rmem_default is -X # used. This default value is usually around 100 Kbytes which is -X # fairly small for busy firewalls. This leads to event message dropping -X # and high CPU consumption. This example configuration file sets the -X # size to 2 MBytes to avoid this sort of problems. -X # -X NetlinkBufferSize 2097152 -X -X # -X # The daemon doubles the size of the netlink event socket buffer size -X # if it detects netlink event message dropping. This clause sets the -X # maximum buffer size growth that can be reached. This example file -X # sets the size to 8 MBytes. -X # -X NetlinkBufferSizeMaxGrowth 8388608 -X -X # -X # If the daemon detects that Netlink is dropping state-change events, -X # it automatically schedules a resynchronization against the Kernel -X # after 30 seconds (default value). Resynchronizations are expensive -X # in terms of CPU consumption since the daemon has to get the full -X # kernel state-table and purge state-entries that do not exist anymore. -X # Be careful of setting a very small value here. You have the following -X # choices: On (enabled, use default 30 seconds value), Off (disabled) -X # or Value (in seconds, to set a specific amount of time). If not -X # specified, the daemon assumes that this option is enabled. -X # -X # NetlinkOverrunResync On -X -X # -X # If you want reliable event reporting over Netlink, set on this -X # option. If you set on this clause, it is a good idea to set off -X # NetlinkOverrunResync. This option is off by default and you need -X # a Linux kernel >= 2.6.31. -X # -X # NetlinkEventsReliable Off -X -X # -X # By default, the daemon receives state updates following an -X # event-driven model. You can modify this behaviour by switching to -X # polling mode with the PollSecs clause. This clause tells conntrackd -X # to dump the states in the kernel every N seconds. With regards to -X # synchronization mode, the polling mode can only guarantee that -X # long-lifetime states are recovered. The main advantage of this method -X # is the reduction in the state replication at the cost of reducing the -X # chances of recovering connections. -X # -X # PollSecs 15 -X -X # -X # The daemon prioritizes the handling of state-change events coming -X # from the core. With this clause, you can set the maximum number of -X # state-change events (those coming from kernel-space) that the daemon -X # will handle after which it will handle other events coming from the -X # network or userspace. A low value improves interactivity (in terms of -X # real-time behaviour) at the cost of extra CPU consumption. -X # Default (if not set) is 100. -X # -X # EventIterationLimit 100 -X -X # -X # Event filtering: This clause allows you to filter certain traffic, -X # There are currently three filter-sets: Protocol, Address and -X # State. The filter is attached to an action that can be: Accept or -X # Ignore. Thus, you can define the event filtering policy of the -X # filter-sets in positive or negative logic depending on your needs. -X # You can select if conntrackd filters the event messages from -X # user-space or kernel-space. The kernel-space event filtering -X # saves some CPU cycles by avoiding the copy of the event message -X # from kernel-space to user-space. The kernel-space event filtering -X # is prefered, however, you require a Linux kernel >= 2.6.29 to -X # filter from kernel-space. If you want to select kernel-space -X # event filtering, use the keyword 'Kernelspace' instead of -X # 'Userspace'. -X # -X Filter From Userspace { -X # -X # Accept only certain protocols: You may want to replicate -X # the state of flows depending on their layer 4 protocol. -X # -X Protocol Accept { -X TCP -X SCTP -X DCCP -X UDP -X ICMP # This requires a Linux kernel >= 2.6.31 -X } -X -X # -X # Ignore traffic for a certain set of IP's: Usually all the -X # IP assigned to the firewall since local traffic must be -X # ignored, only forwarded connections are worth to replicate. -X # Note that these values depends on the local IPs that are -X # assigned to the firewall. -X # -X Address Ignore { -X IPv4_address 127.0.0.1 # loopback -X IPv4_address [IGNORE_IP1] -X IPv4_address [IGNORE_IP2] -X IPv4_address [IGNORE_IP3] -X #IPv4_address 192.168.0.100 # virtual IP 1 -X #IPv4_address 192.168.1.100 # virtual IP 2 -X #IPv4_address 192.168.0.1 -X #IPv4_address 192.168.1.1 -X #IPv4_address 192.168.100.100 # dedicated link ip -X # -X # You can also specify networks in format IP/cidr. -X # IPv4_address 192.168.0.0/24 -X # -X # You can also specify an IPv6 address -X # IPv6_address ::1 -X } -X -X # -X # Uncomment this line below if you want to filter by flow state. -X # This option introduces a trade-off in the replication: it -X # reduces CPU consumption at the cost of having lazy backup -X # firewall replicas. The existing TCP states are: SYN_SENT, -X # SYN_RECV, ESTABLISHED, FIN_WAIT, CLOSE_WAIT, LAST_ACK, -X # TIME_WAIT, CLOSED, LISTEN. -X # -X # State Accept { -X # ESTABLISHED CLOSED TIME_WAIT CLOSE_WAIT for TCP -X # } -X } -X -X # default debian service unit file is of Type=notify -X Systemd on -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/conntrackd.conf.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ': 'MD5 check failed' - ) << \SHAR_EOF -13781a8581b74b0cf402c01264bdca48 cloud_scripts/opt/cloud/templates/conntrackd.conf.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ'` -ne 15888 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/conntrackd.conf.templ' is not 15888" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -ROUTER_BIN_PATH="/ramdisk/rrouter" -ROUTER_LOG="${ROUTER_BIN_PATH}/keepalived.log" -STRIKE_FILE="$ROUTER_BIN_PATH/keepalived.strikes" -TS_FILE="$ROUTER_BIN_PATH/keepalived.ts" -CT_FILE="$ROUTER_BIN_PATH/keepalived.ct" -X -checktime=$(date +%s) -hbtime=$(cat $TS_FILE) -diff=$(($checktime - $hbtime)) -X -lastcheck=0 -if [ -e $CT_FILE ] -then -X lastcheck=$(cat $CT_FILE 2>/dev/null) -fi -checkdiff=$(($checktime - $lastcheck)) -if [ $checkdiff -ge 0 ] && [ $checkdiff -lt 30 ] -then -X exit -fi -echo $checktime > $CT_FILE -X -s=0 -if [ $diff -gt 10 ] -then -X if [ -e $STRIKE_FILE ] -X then -X s=$(cat $STRIKE_FILE 2>/dev/null) -X fi -X s=$(($s+1)) -X echo $s > $STRIKE_FILE -X echo "Check time: $checktime, last heartbeat time: $hbtime, time diff: $diff, strike count: $s" >> $ROUTER_LOG -else -X rm -f $STRIKE_FILE -fi -X -if [ $s -gt 3 ] -then -X systemctl stop --now keepalived >> $ROUTER_LOG 2>&1 -X systemctl stop --now conntrackd >> $ROUTER_LOG 2>&1 -X -X #Set fault so we have the same effect as a KeepaliveD fault. -X python /opt/cloud/bin/master.py --fault -X -X pkill -9 keepalived >> $ROUTER_LOG 2>&1 || true -X pkill -9 conntrackd >> $ROUTER_LOG 2>&1 || true -X echo Status: FAULT \(keepalived process is dead\) >> $ROUTER_LOG -X exit -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ': 'MD5 check failed' - ) << \SHAR_EOF -7040d7485f89a97be367132d28af1267 cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ'` -ne 2037 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/check_heartbeat.sh.templ' is not 2037" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/check_bumpup.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/check_bumpup.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/check_bumpup.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -cat /tmp/rrouter_bumped -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/check_bumpup.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/check_bumpup.sh': 'MD5 check failed' - ) << \SHAR_EOF -ab6cbce5de505d137d05bcae1af8e18a cloud_scripts/opt/cloud/templates/check_bumpup.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/check_bumpup.sh'` -ne 822 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/check_bumpup.sh' is not 822" - fi -fi -# ============= cloud_scripts/opt/cloud/templates/keepalived.conf.templ ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/templates/keepalived.conf.templ (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/templates/keepalived.conf.templ (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' && -! Licensed to the Apache Software Foundation (ASF) under one -! or more contributor license agreements. See the NOTICE file -! distributed with this work for additional information -! regarding copyright ownership. The ASF licenses this file -! to you under the Apache License, Version 2.0 (the -! "License"); you may not use this file except in compliance -! with the License. You may obtain a copy of the License at -! -! http://www.apache.org/licenses/LICENSE-2.0 -! -! Unless required by applicable law or agreed to in writing, -! software distributed under the License is distributed on an -! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -! KIND, either express or implied. See the License for the -! specific language governing permissions and limitations -! under the License. -X -global_defs { -X router_id [ROUTER_ID] -} -X -vrrp_script heartbeat { -X script "[RROUTER_BIN_PATH]/heartbeat.sh" -X interval 5 -} -X -vrrp_instance inside_network { -X state BACKUP -X interface eth2 -X virtual_router_id 51 -X nopreempt -X -X advert_int 1 -X -X #use_vmac -X #vmac_xmit_base -X -X authentication { -X auth_type AH -X auth_pass PASS -X } -X -X virtual_ipaddress { -X [ROUTER_IP] brd [BOARDCAST] dev eth2 -X } -X -X track_script { -X heartbeat -X } -X -X notify_backup "/opt/cloud/bin/master.py --backup" -X notify_master "/opt/cloud/bin/master.py --master" -X notify_fault "/opt/cloud/bin/master.py --fault" -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/templates/keepalived.conf.templ failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ': 'MD5 check failed' - ) << \SHAR_EOF -464642e87bbb032071111b84f82ba135 cloud_scripts/opt/cloud/templates/keepalived.conf.templ -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ'` -ne 1429 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/templates/keepalived.conf.templ' is not 1429" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/prepare_pxe.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/prepare_pxe.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/prepare_pxe.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' && -#!/bin/sh -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# # regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -X -set +u -X -err_exit() { -X echo $1 -X exit 1 -} -X -success() { -X exit 0 -} -X -TFTP_ROOT='/opt/tftpboot' -PXELINUX_CFG_DIR='/opt/tftpboot/pxelinux.cfg' -X -kernel_nfs_path=$1 -kernel_file_name=`basename $kernel_nfs_path` -initrd_nfs_path=$2 -initrd_file_name=`basename $initrd_nfs_path` -tmpt_uuid=$3 -pxe_cfg_filename=$4 -ks_file=$5 -X -kernel_path=$tmpt_uuid/$kernel_file_name -initrd_path=$tmpt_uuid/$initrd_file_name -X -cat > $PXELINUX_CFG_DIR/$pxe_cfg_filename </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh': 'MD5 check failed' - ) << \SHAR_EOF -8b495c4ea50905f4197974ee82e607ba cloud_scripts/opt/cloud/bin/prepare_pxe.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh'` -ne 1792 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' is not 1792" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_forwardingrules.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_forwardingrules.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_forwardingrules.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, rules): -X for rule in rules["rules"]: -X source_ip = rule["source_ip_address"] -X destination_ip = rule["destination_ip_address"] -X revoke = rule["revoke"] -X -X newrule = dict() -X newrule["public_ip"] = source_ip -X newrule["internal_ip"] = destination_ip -X -X if rules["type"] == "staticnatrules": -X newrule["type"] = "staticnat" -X elif rules["type"] == "forwardrules": -X newrule["type"] = "forward" -X newrule["public_ports"] = rule["source_port_range"] -X newrule["internal_ports"] = rule["destination_port_range"] -X newrule["protocol"] = rule["protocol"] -X -X if not revoke: -X if rules["type"] == "staticnatrules": -X dbag[source_ip] = [newrule] -X elif rules["type"] == "forwardrules": -X index = -1 -X if source_ip in dbag.keys(): -X for forward in dbag[source_ip]: -X if ruleCompare(forward, newrule): -X index = dbag[source_ip].index(forward) -X if not index == -1: -X dbag[source_ip][index] = newrule -X else: -X dbag[source_ip].append(newrule) -X else: -X dbag[source_ip] = [newrule] -X else: -X if rules["type"] == "staticnatrules": -X if source_ip in dbag.keys(): -X del dbag[source_ip] -X elif rules["type"] == "forwardrules": -X if source_ip in dbag.keys(): -X index = -1 -X for forward in dbag[source_ip]: -X if ruleCompare(forward, newrule): -X index = dbag[source_ip].index(forward) -X print "removing index %s" % str(index) -X if not index == -1: -X del dbag[source_ip][index] -X -X return dbag -X -X -# Compare function checks only the public side, those must be equal the internal details could change -def ruleCompare(ruleA, ruleB): -X if not ruleA["type"] == ruleB["type"]: -X return False -X if ruleA["type"] == "staticnat": -X return ruleA["public_ip"] == ruleB["public_ip"] -X elif ruleA["type"] == "forward": -X return ruleA["public_ip"] == ruleB["public_ip"] and ruleA["public_ports"] == ruleB["public_ports"] \ -X and ruleA["protocol"] == ruleB["protocol"] -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_forwardingrules.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py': 'MD5 check failed' - ) << \SHAR_EOF -278288da98263d674e9d0d0aecaca56d cloud_scripts/opt/cloud/bin/cs_forwardingrules.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py'` -ne 3239 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' is not 3239" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpc_netusage.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_netusage.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_netusage.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -source /root/func.sh -source /opt/cloud/bin/vpc_func.sh -X -vpnoutmark="0x525" -vpninmark="0x524" -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s -[c|g|r|n|d] [-l ] [-v ] \n" $(basename $0) >&2 -} -X -create_usage_rules () { -X iptables-save|grep "NETWORK_STATS_$ethDev" > /dev/null -X if [ $? -gt 0 ] -X then -X iptables -N NETWORK_STATS_$ethDev > /dev/null; -X iptables -I FORWARD -j NETWORK_STATS_$ethDev > /dev/null; -X iptables -A NETWORK_STATS_$ethDev -o $ethDev -s $vcidr > /dev/null; -X iptables -A NETWORK_STATS_$ethDev -i $ethDev -d $vcidr > /dev/null; -X fi -X return $? -} -X -create_vpn_usage_rules () { -X iptables-save|grep "VPN_STATS_$ethDev" > /dev/null -X if [ $? -gt 0 ] -X then -X iptables -t mangle -N VPN_STATS_$ethDev > /dev/null; -X iptables -t mangle -I FORWARD -j VPN_STATS_$ethDev > /dev/null; -X iptables -t mangle -A VPN_STATS_$ethDev -o $ethDev -m mark --mark $vpnoutmark > /dev/null; -X iptables -t mangle -A VPN_STATS_$ethDev -i $ethDev -m mark --mark $vpninmark > /dev/null; -X fi -X return $? -} -X -remove_usage_rules () { -X return 0 -} -X -get_usage () { -X iptables -L NETWORK_STATS_$ethDev -n -v -x 2> /dev/null | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null -X return 0 -} -X -get_vpn_usage () { -X iptables -t mangle -L VPN_STATS_$ethDev -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null -X if [ $? -gt 0 ] -X then -X printf $? -X return 1 -X fi -} -X -reset_usage () { -X iptables -Z NETWORK_STATS_$ethDev > /dev/null -X if [ $? -gt 0 -a $? -ne 2 ] -X then -X return 1 -X fi -} -X -#set -x -X -cflag= -gflag= -rflag= -lflag= -vflag= -nflag= -dflag= -X -while getopts 'cgndrl:v:' OPTION -do -X case $OPTION in -X c) cflag=1 -X ;; -X g) gflag=1 -X ;; -X r) rflag=1 -X ;; -X l) lflag=1 -X publicIp="$OPTARG" -X ;; -X v) vflag=1 -X vcidr="$OPTARG" -X ;; -X n) nflag=1 -X ;; -X d) dflag=1 -X ;; -X i) #Do nothing, since it's parameter for host script -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -ethDev=$(getEthByIp $publicIp) -if [ "$cflag" == "1" ] -then -X if [ "$ethDev" != "" ] -X then -X create_usage_rules -X create_vpn_usage_rules -X unlock_exit 0 $lock $locked -X fi -fi -X -if [ "$gflag" == "1" ] -then -X get_usage -X unlock_exit $? $lock $locked -fi -X -if [ "$nflag" == "1" ] -then -X #get_vpn_usage -X unlock_exit $? $lock $locked -fi -X -if [ "$dflag" == "1" ] -then -X #remove_usage_rules -X unlock_exit 0 $lock $locked -fi -X -if [ "$rflag" == "1" ] -then -X reset_usage -X unlock_exit $? $lock $locked -fi -X -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_netusage.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh': 'MD5 check failed' - ) << \SHAR_EOF -f3f8069de696e92a24cbc694275c0bd5 cloud_scripts/opt/cloud/bin/vpc_netusage.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh'` -ne 3377 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' is not 3377" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/configure.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/configure.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/configure.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/configure.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/configure.py -M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&-E<'0@24]%2@I"B`@("`@("`@ -M("`@("`@("`@("`@9W5E22R)$;VU57U)E<75E&-E<'0@17AC97!T:6]N(&%S -M(&4Z"B`@("`@("`@("`@("`@("`@("`@;&]G9VEN9RYE7!E)UT@/3T@)V%L;"<@86YD(&]B -M:ELG7!E(#T@(F%N>2(*("`@("`@("`@("`@:68@ -M(FEC;7!?='EP92(@:6X@7,H*2!A;F0@7!E)UT*("`@("`@("`@("`@:68@(FEC -M;7!?8V]D92(@:6X@7,H*2!A;F0@7!E)UTL('-E;&8N7!E("5S("UJ("5S(B`E("AI8VUP7W1Y<&4L('-E;&8N&5C=71E*&1S=$EP2==.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U -M;&5;)V%C=&EO;B==(#T@(D%#0T505"(*("`@("`@("`@("`@("`@("`@("!E -M;'-E.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5;)V%C=&EO -M;B==(#T@(D123U`B"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@ -M("`@("`@("`@(",@1F]R(&]T:&5R(')U;&5S(&%D9&5D+"!I9B!D969A=6QT -M7V5G7!E("5S(B`E(&EC;7!?='EP90H@("`@("`@("`@ -M("`@("`@96QI9B!R=6QE6R=P7!E+B!3;RP@:71S(&9W(&%T=')I8G5T92!I7!E -M(#T@(F%N>2(*("`@("`@("`@("`@("`@('-E;&8N<')O=&]C;VP@/2!S96QF -M+G1Y<&4*("`@("`@("`@("`@("`@(&EF(")I8VUP7W1Y<&4B(&EN(')U;&4N -M:V5Y7!E+"!R=6QE6R=I8VUP7V-O9&4G72D*("`@("`@("`@("`@("`@(&EF('-E -M;&8N='EP92`]/2`B<')O=&]C;VPB.@H@("`@("`@("`@("`@("`@("`@(&EF -M(')U;&5;)W!R;W1O8V]L)UT@/3T@-#$Z"B`@("`@("`@("`@("`@("`@("`@ -M("`@(')U;&5;)W!R;W1O8V]L)UT@/2`B:7!V-B(*("`@("`@("`@("`@("`@ -M("`@("!S96QF+G!R;W1O8V]L(#T@&5C=71E*")I -M<'1A8FQE+4$O:7!T86)L97,@+70@9FEL=&5R("U$+V&5C=71E -M*")I<'-E="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\ -M(&EP&5C=71E*")I<'-E -M="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP2!V86QI9"!D871A"B`@("`@("`@("`@("`@("!I9B!F;VQD97(@(3T@(G5S -M97)D871A(B!A;F0@9F]L9&5R("$](")M971A9&%T82(Z"B`@("`@("`@("`@ -M("`@("`@("`@8V]N=&EN=64*"B`@("`@("`@("`@("`@("!I9B!F:6QE(#T] -M("(B.@H@("`@("`@("`@("`@("`@("`@(&-O;G1I;G5E"@H@("`@("`@("`@ -M("`@("`@7,N97AI="@Q*0H@("`@("`@("`@("!I9B!O2Q!;&QO=UQN1&5N>2!F2!E>&ES=',L('=E(&1O(&ET('1H -M:7,@=V%Y(&9O7,N97AI -M="@Q*0H*("`@("`@("!F:"`](&]P96XH:'1A8V-E2`] -M(")297=R:71E4G5L92!>;65T82UD871A+R@N*RDD("`N+B\B("L@9F]L9&5R -M("L@(B\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%=(@H@("`@("`@("`@ -M("!H=&%C8V5S7,N97AI="@Q -M*2`@(R!&25A-10H@("`@("`@(')E='5R;B!4&ET*#$I("`C($9)6$U%"B`@("`@("`@:7!S96,N=G!N+2@N*BDN8V]N9B(L(&9I;&4I"B`@ -M("`@("`@("`@(&EF(&TZ"B`@("`@("`@("`@("`@("!S96QF+F-O;F9I<',N -M87!P96YD*&TN9W)O=7`H,2DI"@H@("`@("`@(&9O&5C=71E*")I -M<'-E8R!R96QO860B*0H*("`@(&1E9B!C;VYF:6=U#4R-2`M:B!!0T-%4%0B("4@9&5V72D* -M("`@("`@("!F;W(@;F5T(&EN(&]B:ELG<&5E&UA&UA5]I<"=="B`@("`@("`@<&5E7!E/71U;FYE;"(I -M"B`@("`@("`@9FEL92YA9&1E<2@B(&%U=&AB>3US96-R970B*0H@("`@("`@ -M(&9I;&4N861D97$H(B!K97EE>&-H86YG93UI:V4B*0H@("`@("`@(&9I;&4N -M861D97$H(B!I:V4])7,B("4@:6ME<&]L:6-Y*0H@("`@("`@(&9I;&4N861D -M97$H(B!I:V5L:69E=&EM93TE3TS,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1T:6UE;W5T -M/3$R,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1A8W1I;VX]')A;F=E*#,I.@H@("`@("`@("`@ -M("!R97-U;'0@/2!#&5C=71E*"=I<'-E8R!S=&%T=7,@=G!N -M+25S('P@9W)E<"`B)7,B)R`E("AR:6=H='!E97(L('!E97)L:7-T+G-P;&ET -M*"(L(BP@,2E;,%TI*0H@("`@("`@("`@("!I9B!L96XH2P@)R,G*0H@("`@("`@(&EF(&YO="!U&5C=71E*")T9&)D=6UP("]V87(O&5C=71E*"=K:6QL("TY("5S)R`E('!I9"D*"@IC;&%S -M&5C=71E*")S>7-T96UC=&P@2YS96-R971S(B`E("AS96QF+E903D-/3D9$25(I"B`@ -M("`@("`@>&PR='!D8V]N9F9I;&4@/2`B+V5T8R]X;#)T<&0O>&PR='!D+F-O -M;F8B"B`@("`@("`@>&PR='!O<'1I;VYS9FEL92`]("(O971C+W!P<"]O<'1I -M;VYS+GAL,G1P9"(*"B`@("`@("`@;&]C86QI<"`](&]B:ELG;&]C86Q?:7`G -M70H@("`@("`@(&QO8V%L8VED2`Z(%!32R!<(B5S7"(B("4@*&QE9G0L('!S:RDI"B`@ -M("`@("`@&PR='!D8V]N9F9I;&4I"B`@("`@("`@>&PR='!D8V]N9BYA9&1E -M<2@B:7`@&PR='!O<'1I;VYS+F-O;6UI="@I"@H@("`@9&5F(')E;6]T96%C8V5S -M2@I"B`@("`@("`@4EP -M*')U;&5;)W!U8FQI8U]I<"==*0H@("`@("`@(&EN=&5R;F%L7V9W:6YT97)F -M86-E(#T@4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI -M"B`@("`@("`@<'5B;&EC7V9W<&]R=',@/2!S96QF+G!O4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI -M+`H@("`@("`@("`@("`@("`@&UA2(Z"B`@("`@("`@("`@(&9W7W!R97)O=71? -M2(Z"B`@("`@ -M("`@("`@(&9W7W!O2(Z"B`@("`@("`@ -M("`@(&9W7W!O2(Z"B`@("`@ -M("`@("`@(&9W7V]U='!U=%]R=6QE("L]("(@+2UD<&]R="`E2(Z"B`@("`@("`@("`@ -M(&9W7V]U='!U=%]R=6QE("L]("(Z(B`K('-E;&8N<&]R='-4;U-T4EP*')U;&5;)VEN=&5R;F%L7VEP -M)UTI+`H@("`@("`@("`@("`@("`@&9F9F9F9F9F -M("TM8W1M87-K(#!X9F9F9F9F9F8B("4*("`@("`@("`@("`@("`@("`@("`@ -M("`@4EP*')U;&5;(FEN=&5R;F%L -M7VEP(ETI+"!S96QF+F=E=$=U97-T27`H*2E=*0H*"F-L87-S($EP5&%B;&5S -M17AE8W5T;W(Z"@H@("`@8V]N9FEG(#T@3F]N90H*("`@(&1E9B!?7VEN:71? -M7RAS96QF+"!C;VYF:62!PR)P&5C=71OR)P&5C=71OR)P&5C=71O7!E.B`E&5C27!T86)L97,H8V]N9FEG -M*3H*("`@("`@("!L;V=G:6YG+F1E8G5G*")0&5C=71O7,H*3H*("`@("`@("`@ -M("`@97AE8T1A=&%B86&5C -M27!T86)L97,H8V]N9FEG*0H@("`@96QI9B!J&5C27!T86)L -M97,H8V]N9FEG*0H@("`@96QS93H*("`@("`@("!L;V=G:6YG+G=A7!E/25S(B`E("AP/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/configure.py': 'MD5 check failed' - ) << \SHAR_EOF -8987217852a386250687dfce6d0b10be cloud_scripts/opt/cloud/bin/configure.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/configure.py'` -ne 45920 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/configure.py' is not 45920" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_vmp.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vmp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vmp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vmp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_vmp.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=WWT*("`@(')C6R=I9"==(#T@)W9M<&%S/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vmp.py': 'MD5 check failed' - ) << \SHAR_EOF -3e1ea6831cb27eedc825e25bf817cb9c cloud_scripts/opt/cloud/bin/cs_vmp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vmp.py'` -ne 1126 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vmp.py' is not 1126" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# getRouterMonitorResults.sh --- Send the monitor results to Management Server -X -if [ "$1" == "true" ] -then -X python /root/monitorServices.py > /dev/null -fi -X -printf "FAILING CHECKS:\n" -X -if [ -f /root/basic_failing_health_checks ] -then -X echo `cat /root/basic_failing_health_checks` -fi -X -if [ -f /root/advanced_failing_health_checks ] -then -X echo `cat /root/advanced_failing_health_checks` -fi -X -printf "MONITOR RESULTS:\n" -X -echo "{\"basic\":" -if [ -f /root/basic_monitor_results.json ] -then -X echo `cat /root/basic_monitor_results.json` -else -X echo "{}" -fi -echo ",\"advanced\":" -if [ -f /root/advanced_monitor_results.json ] -then -X echo `cat /root/advanced_monitor_results.json` -else -X echo "{}" -fi -X -echo "}" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh': 'MD5 check failed' - ) << \SHAR_EOF -35649a8a1a8339aaa42a311826699849 cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh'` -ne 1526 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' is not 1526" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vr_cfg.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vr_cfg.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vr_cfg.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -#set -x -X -cfg= -version= -log=/var/log/cloud.log -X -log_it() { -X logger -t cloud "$*" -X echo "$(date) : $*" >> $log -} -X -while getopts 'c:' OPTION; do -X case $OPTION in -X c) cfg="$OPTARG" ;; -esac; done -X -export DEFER_CONFIG=true -while read line; do -X #comment -X if [[ $line == \#* ]]; then -X continue -X -X elif [ "$line" == "" ]; then -X read line -X version=$line -X log_it "VR config: configuation format version $version" -X #skip -X read line -X -X elif [ "$line" == " -X read line -X log_it "VR config: execution success " -X -X elif [ "$line" == "" ]; then -X read line -X file=$line -X log_it "VR config: creating file: $file" -X rm -f $file -X while read -r line; do -X if [ "$line" == "" ]; then -X break -X fi -X echo $line >> $file -X done -X log_it "VR config: create file success" -X -X fi -X -done < $cfg -X -# archive the configuration file -mv $cfg /var/cache/cloud/processed/ -X -unset DEFER_CONFIG -# trigger finish_config() -if [ -f /etc/cloudstack/dhcpentry.json ]; then -X /opt/cloud/bin/configure.py vm_dhcp_entry.json -fi -if [ -f /etc/cloudstack/vmdata.json ]; then -X /opt/cloud/bin/configure.py vm_metadata.json -fi -X -# Flush kernel conntrack table -log_it "VR config: Flushing conntrack table" -conntrackd -d 2> /dev/null -if [ $? -eq 0 ]; then -X conntrackd -F -X conntrackd -k -else -X conntrackd -F -fi -log_it "VR config: Flushing conntrack table completed" -X -Xexit 0 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vr_cfg.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vr_cfg.sh': 'MD5 check failed' - ) << \SHAR_EOF -da02bd413616a9cc131fd039e627eb3e cloud_scripts/opt/cloud/bin/vr_cfg.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vr_cfg.sh'` -ne 2725 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' is not 2725" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpc_snat.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_snat.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_snat.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# @VERSION@ -X -source /root/func.sh -source /opt/cloud/bin/vpc_func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage:\n %s -A -l \n" $(basename $0) >&2 -X printf " %s -D -l \n" $(basename $0) >&2 -} -X -X -add_snat() { -X logger -t cloud "$(basename $0):Added SourceNAT $pubIp on interface $ethDev" -X vpccidr=$(getVPCcidr) -X sudo iptables -D FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT -X sudo iptables -A FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT -X sudo iptables -t nat -D POSTROUTING -j SNAT -o $ethDev --to-source $pubIp -X sudo iptables -t nat -A POSTROUTING -j SNAT -o $ethDev --to-source $pubIp -X return $? -} -remove_snat() { -X logger -t cloud "$(basename $0):Removing SourceNAT $pubIp on interface $ethDev" -X sudo iptables -t nat -D POSTROUTING -j SNAT -o $ethDev --to-source $pubIp -X return $? -} -X -#set -x -lflag=0 -cflag=0 -op="" -X -while getopts 'ADl:c:' OPTION -do -X case $OPTION in -X A) Aflag=1 -X op="-A" -X ;; -X D) Dflag=1 -X op="-D" -X ;; -X l) lflag=1 -X pubIp="$OPTARG" -X ;; -X c) cflag=1 -X ethDev="$OPTARG" -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [ "$Aflag$Dflag" != "1" ] -then -X usage -X unlock_exit 2 $lock $locked -fi -X -if [ "$lflag$cflag" != "11" ] -then -X usage -X unlock_exit 2 $lock $locked -fi -X -if [ "$Aflag" == "1" ] -then -X add_snat $publicIp -X unlock_exit $? $lock $locked -fi -X -if [ "$Dflag" == "1" ] -then -X remove_sat $publicIp -X unlock_exit $? $lock $locked -fi -X -unlock_exit 1 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_snat.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_snat.sh': 'MD5 check failed' - ) << \SHAR_EOF -23502a2ce3829fb787464124f13b9141 cloud_scripts/opt/cloud/bin/vpc_snat.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_snat.sh'` -ne 2346 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' is not 2346" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpc_staticroute.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_staticroute.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_staticroute.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# @VERSION@ -X -source /root/func.sh -source /opt/cloud/bin/vpc_func.sh -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s: -a < routes > \n" $(basename $0) >&2 -} -X -#set -x -X -flush_table_backup() { -X flush_table "static_route_back" -} -X -flush_table() { -X local tab=$1 -X sudo ip route flush table $tab -} -X -copy_table() { -X local from=$1 -X local to=$2 -X sudo ip route show table $from | while read route -X do -X sudo ip route add table $to $route -X done -} -X -backup_table() { -X flush_table "static_route_back" -X copy_table "static_route" "static_route_back" -X flush_table "static_route" -} -X -restore_table() { -X flush_table "static_route" -X copy_table "static_route_back" "static_route" -X flush_table "static_route_back" -} -X -static_route() { -X local rule=$1 -X local ip=$(echo $rule | cut -d: -f1) -X if [ $ip == "Revoke" ] -X then -X return 0 -X fi -X local gateway=$(echo $rule | cut -d: -f2) -X local cidr=$(echo $rule | cut -d: -f3) -X logger -t cloud "$(basename $0): static route: public ip=$ip \ -X gateway=$gateway cidr=$cidr" -X local dev=$(getEthByIp $ip) -X if [ $? -gt 0 ] -X then -X return 1 -X fi -X sudo ip route add $cidr dev $dev via $gateway table static_route &>/dev/null -X result=$? -X logger -t cloud "$(basename $0): done static route: public ip=$ip \ -X gateway=$gateway cidr=$cidr" -X return $result -} -X -gflag= -aflag= -while getopts 'a:' OPTION -X -do -X case $OPTION in -X a) aflag=1 -X rules="$OPTARG" -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [ -n "$rules" ] -then -X rules_list=$(echo $rules | cut -d, -f1- --output-delimiter=" ") -fi -X -success=0 -X -backup_table -X -for r in $rules_list -do -X static_route $r -X success=$? -X if [ $success -gt 0 ] -X then -X logger -t cloud "$(basename $0): failure to apply fw rules for guest network: $gcidr" -X break -X else -X logger -t cloud "$(basename $0): successful in applying fw rules for guest network: $gcidr" -X fi -done -X -if [ $success -gt 0 ] -then -X logger -t cloud "$(basename $0): restoring from backup for guest network: $gcidr" -X restore_table -else -X logger -t cloud "$(basename $0): deleting backup for guest network: $gcidr" -X flush_table_backup -fi -unlock_exit $success $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_staticroute.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh': 'MD5 check failed' - ) << \SHAR_EOF -4080c04ff7600874ef4a4364aefc4d18 cloud_scripts/opt/cloud/bin/vpc_staticroute.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh'` -ne 3043 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' is not 3043" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/baremetal-vr.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/baremetal-vr.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/baremetal-vr.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/baremetal-vr.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/baremetal-vr.py -M(TQI8V5N6ME>2<@:6X@<#H*("`@("`@("`@("`@("`@("`@("`@("`@ -M2`]('`N6ME>2!I;B`E0H*("`@(&1E -M9B!?9V5T7VUG;71?:7`H4)AFEP*')E<7,N:V5Y2P@:&%S:%-T5]P/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/baremetal-vr.py': 'MD5 check failed' - ) << \SHAR_EOF -f87e8890aa7ad3cc522c5c5ceb2fbf69 cloud_scripts/opt/cloud/bin/baremetal-vr.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/baremetal-vr.py'` -ne 5587 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/baremetal-vr.py' is not 5587" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_firewallrules.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_firewallrules.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_firewallrules.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import copy -X -X -def merge(dbag, data): -X dbagc = copy.deepcopy(dbag) -X if "rules" not in data: -X return dbagc -X for rule in data['rules']: -X id = str(rule['id']) -X if rule['revoked']: -X if id in dbagc.keys(): -X del(dbagc[id]) -X elif id not in dbagc.keys(): -X dbagc[id] = rule -X return dbagc -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_firewallrules.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py': 'MD5 check failed' - ) << \SHAR_EOF -6d3faf49679b84bf9a098eee6b630f69 cloud_scripts/opt/cloud/bin/cs_firewallrules.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py'` -ne 1141 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' is not 1141" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/netusage.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/netusage.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/netusage.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/netusage.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/netusage.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -X -# netusage.sh -- create iptable rules to gather network stats, running within DomR -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s -[c|g|r] [-[a|d] ]\n" $(basename $0) >&2 -} -X -create_usage_rules () { -X iptables-save|grep "INPUT -j NETWORK_STATS" > /dev/null -X if [ $? -eq 0 ] -X then -X return $? -X fi -X iptables -N NETWORK_STATS > /dev/null -X iptables -I FORWARD -j NETWORK_STATS > /dev/null -X iptables -I INPUT -j NETWORK_STATS > /dev/null -X iptables -I OUTPUT -j NETWORK_STATS > /dev/null -X iptables -A NETWORK_STATS -i eth0 -o eth2 > /dev/null -X iptables -A NETWORK_STATS -i eth2 -o eth0 > /dev/null -X iptables -A NETWORK_STATS -o eth2 ! -i eth0 -p tcp > /dev/null -X iptables -A NETWORK_STATS -i eth2 ! -o eth0 -p tcp > /dev/null -X return $? -} -X -add_public_interface () { -X local pubIf=$1 -X iptables-save|grep "NETWORK_STATS -i eth0 -o $pubIf" > /dev/null -X if [ $? -eq 0 ] -X then -X return $? -X fi -X iptables -A NETWORK_STATS -i eth0 -o $pubIf > /dev/null -X iptables -A NETWORK_STATS -i $pubIf -o eth0 > /dev/null -X iptables -A NETWORK_STATS -o $pubIf ! -i eth0 -p tcp > /dev/null -X iptables -A NETWORK_STATS -i $pubIf ! -o eth0 -p tcp > /dev/null -X return $? -} -X -delete_public_interface () { -X local pubIf=$1 -X echo $pubIf >> /root/removedVifs -X return $? -} -X -get_usage () { -X iptables -L NETWORK_STATS -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null -X if [ -f /root/removedVifs ] ; then iptables -Z NETWORK_STATS ; fi; > /dev/null -X /root/clearUsageRules.sh > /dev/null -X if [ $? -gt 0 -a $? -ne 2 ] -X then -X printf $? -X return 1 -X fi -} -X -reset_usage () { -X iptables -Z NETWORK_STATS > /dev/null -X if [ $? -gt 0 -a $? -ne 2 ] -X then -X return 1 -X fi -} -X -#set -x -X -cflag= -gflag= -rflag= -iflag= -aflag= -dflag= -X -while getopts 'cgria:d:' OPTION -do -X case $OPTION in -X c) cflag=1 -X ;; -X g) gflag=1 -X ;; -X r) rflag=1 -X ;; -X a) aflag=1 -X publicIf="$OPTARG" -X ;; -X d) dflag=1 -X publicIf="$OPTARG" -X ;; -X i) #Do nothing, since it's parameter for host script -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [ "$cflag" == "1" ] -then -X #create_usage_rules -X unlock_exit $? $lock $locked -fi -X -if [ "$gflag" == "1" ] -then -X get_usage -X unlock_exit $? $lock $locked -fi -X -if [ "$rflag" == "1" ] -then -X reset_usage -X unlock_exit $? $lock $locked -fi -X -if [ "$aflag" == "1" ] -then -X #add_public_interface $publicIf -X unlock_exit $? $lock $locked -fi -X -if [ "$dflag" == "1" ] -then -X #delete_public_interface $publicIf -X unlock_exit $? $lock $locked -fi -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/netusage.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/netusage.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/netusage.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/netusage.sh': 'MD5 check failed' - ) << \SHAR_EOF -2966c6cafee62e66ff903e53367b498b cloud_scripts/opt/cloud/bin/netusage.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/netusage.sh'` -ne 3478 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/netusage.sh' is not 3478" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/monitor_service.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/monitor_service.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/monitor_service.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/monitor_service.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/monitor_service.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -set -x -usage() { -X printf "Usage: %s: -c config string \n" $(basename $0) >&2 -} -X -configFile='/etc/monitor.conf' -X -create_config() { -services=$1; -services_list=$(echo $services | cut -d, -f1- --output-delimiter=" "); -X -echo "#Monitor services config" >$configFile -X -for s in $services_list -do -service=$(echo $s | cut -d: -f1); -processname=$(echo $s | cut -d: -f2); -service_name=$(echo $s | cut -d: -f3); -pidfile=$(echo $s | cut -d: -f4); -X -echo "$service" >> $configFile; -echo $processname >> $configFile -echo $service_name >> $configFile -echo $pidfile >> $configFile -X -done -X -} -X -config=$2 -if [ -n "$3" ] -then -X -#delete cron job before updating config file -crontab -l|grep "monitorServices.py" -X -if [ $? -eq 0 ] -then -X t=`date +%s`; -X touch /tmp/monitor-$t.txt; -X conf=/tmp/monitor-$t.txt -X crontab -l >$conf -X sed -i /#monitoringConfig/,+3d $conf -X crontab $conf -X rm $conf -fi -X -X -logger -t cloud "deleted crontab entry for monitoring services" -unlock_exit 0 $lock $locked -fi -X -create_config $config -X -#add cron job -crontab -l|grep "monitorServices.py" -if [ $? -ne 0 ] -X then -X (crontab -l ;echo -e "#monitoringConfig\nSHELL=/bin/bash\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n */3 * * * * /usr/bin/python /root/monitorServices.py") | crontab - -X logger -t cloud "added crontab entry for monitoring services" -fi -X -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/monitor_service.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/monitor_service.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/monitor_service.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/monitor_service.sh': 'MD5 check failed' - ) << \SHAR_EOF -3419e7baf45ac36d3d69ca71ef7ab978 cloud_scripts/opt/cloud/bin/monitor_service.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/monitor_service.sh'` -ne 2294 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/monitor_service.sh' is not 2294" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_ip.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_ip.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_ip.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_ip.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_ip.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N7!E)UT@/2!I<%LG;G=?='EP92==+FQO=V5R*"D*("`@(&EF(&EP -M6R=N=U]T>7!E)UT@/3T@)V-O;G1R;VPG.@H@("`@("`@(&1B86=;:7!;)V1E -M=FEC92==72`](%MI<%T*("`@(&5L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_ip.py': 'MD5 check failed' - ) << \SHAR_EOF -856c6261f2876c280c49fa486f4f7408 cloud_scripts/opt/cloud/bin/cs_ip.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_ip.py'` -ne 2581 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_ip.py' is not 2581" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/bumpup_priority.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/bumpup_priority.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/bumpup_priority.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -touch /tmp/rrouter_bumped -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/bumpup_priority.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh': 'MD5 check failed' - ) << \SHAR_EOF -35091259ed848a9f7270aca1a90e95af cloud_scripts/opt/cloud/bin/bumpup_priority.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh'` -ne 824 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' is not 824" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/getRouterAlerts.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/getRouterAlerts.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/getRouterAlerts.sh (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/getRouterAlerts.sh -M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5LP77T*"B`@("`@("`@("`@ -M("`@("!T;T1A=&5686P])"AD871E("UD("(D9&%T979A;"(@(BLE/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh': 'MD5 check failed' - ) << \SHAR_EOF -6c3803100b0923fd3f9017a0e09d6fd5 cloud_scripts/opt/cloud/bin/getRouterAlerts.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh'` -ne 1706 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh' is not 1706" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/postinit.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/postinit.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/postinit.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# This scripts before ssh.service but after cloud-early-config -X -# Eject cdrom if any -eject || true -X -# Restart journald for setting changes to apply -systemctl restart systemd-journald -X -TYPE=$(grep -Po 'type=\K[a-zA-Z]*' /var/cache/cloud/cmdline) -if [ "$TYPE" == "router" ] || [ "$TYPE" == "vpcrouter" ] || [ "$TYPE" == "dhcpsrvr" ] -then -X if [ -x /opt/cloud/bin/update_config.py ] -X then -X /opt/cloud/bin/update_config.py cmd_line.json || true -X fi -fi -X -[ ! -f /var/cache/cloud/enabled_svcs ] && touch /var/cache/cloud/enabled_svcs -for svc in $(cat /var/cache/cloud/enabled_svcs) -do -X systemctl enable --now --no-block $svc -done -X -[ ! -f /var/cache/cloud/disabled_svcs ] && touch /var/cache/cloud/disabled_svcs -for svc in $(cat /var/cache/cloud/disabled_svcs) -do -X systemctl disable --now --no-block $svc -done -X -# Restore the persistent iptables nat, rules and filters for IPv4 and IPv6 if they exist -ipv4="/etc/iptables/rules.v4" -if [ -e $ipv4 ] -then -X iptables-restore < $ipv4 -fi -X -ipv6="/etc/iptables/rules.v6" -if [ -e $ipv6 ] -then -X ip6tables-restore < $ipv6 -fi -X -# Patch known systemd/sshd memory leak - https://github.com/systemd/systemd/issues/8015#issuecomment-476160981 -echo '@include null' >> /etc/pam.d/systemd-user -X -# Enable and Start SSH -systemctl enable --now --no-block ssh -X -date > /var/cache/cloud/boot_up_done -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/postinit.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/postinit.sh': 'MD5 check failed' - ) << \SHAR_EOF -170afadf6f130e9cb697dca65a87aacb cloud_scripts/opt/cloud/bin/setup/postinit.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/postinit.sh'` -ne 2122 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' is not 2122" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/secstorage.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/secstorage.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/secstorage.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_secstorage() { -X log_it "Setting up secondary storage system vm" -X -X echo "cloud apache2 nfs-common portmap" > /var/cache/cloud/enabled_svcs -X echo "conntrackd keepalived haproxy dnsmasq" > /var/cache/cloud/disabled_svcs -X mkdir -p /var/log/cloud -X -X setup_common eth0 eth1 eth2 -X setup_storage_network -X setup_system_rfc1918_internal -X -X log_it "Setting up entry in hosts" -X sed -i /$NAME/d /etc/hosts -X public_ip=`getPublicIp` -X echo "$public_ip $NAME" >> /etc/hosts -X -X log_it "Applying iptables rules" -X cp /etc/iptables/iptables-secstorage /etc/iptables/rules.v4 -X -X log_it "Configuring sshd" -X local hyp=$HYPERVISOR -X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then -X setup_sshd $ETH1_IP "eth1" -X else -X setup_sshd $ETH0_IP "eth0" -X fi -X -X log_it "Configuring apache2" -X setup_apache2 $ETH2_IP -X -X # Deprecated, should move to Cs Python all of it -X sed -e "s///" \ -X -e "s///" \ -X -e "s/Listen .*:8180/Listen $ETH2_IP:80/g" \ -X -e "s/Listen .*:8443/Listen $ETH2_IP:443/g" /etc/apache2/vhost.template > /etc/apache2/sites-enabled/vhost-${ETH2_IP}.conf -X -X log_it "Setting up apache2 for post upload of volume/template" -X a2enmod proxy -X a2enmod proxy_http -X a2enmod headers -X -X cat >/etc/apache2/cors.conf </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh': 'MD5 check failed' - ) << \SHAR_EOF -14aea171a5e0fdfd3069bb96bde91e0b cloud_scripts/opt/cloud/bin/setup/secstorage.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh'` -ne 2720 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' is not 2720" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/ilbvm.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -ilbvm_svcs() { -X echo "haproxy" > /var/cache/cloud/enabled_svcs -X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs -} -X -setup_ilbvm() { -X log_it "Setting up Internal Load Balancer system vm" -X setup_common eth0 eth1 -X #eth0 = guest network, eth1=control network -X -X sed -i /$NAME/d /etc/hosts -X echo "$ETH0_IP $NAME" >> /etc/hosts -X -X cp /etc/iptables/iptables-ilbvm /etc/iptables/rules.v4 -X setup_sshd $ETH1_IP "eth1" -X -X enable_fwding 0 -X enable_irqbalance 1 -} -X -ilbvm_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute ilbvm svcs" -X exit 1 -fi -setup_ilbvm -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/ilbvm.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh': 'MD5 check failed' - ) << \SHAR_EOF -87c70bdf6c0d4d41f0ff87475494188f cloud_scripts/opt/cloud/bin/setup/ilbvm.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh'` -ne 1442 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' is not 1442" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_vpcrouter() { -X log_it "Setting up VPC virtual router system vm" -X -X if [ -f /etc/hosts ]; then -X grep -q $NAME /etc/hosts || echo "127.0.0.1 $NAME" >> /etc/hosts; -X fi -X -X cat > /etc/network/interfaces << EOF -auto lo eth0 -iface lo inet loopback -EOF -X setup_interface "0" $ETH0_IP $ETH0_MASK $GW -X -X echo $NAME > /etc/hostname -X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon -X hostnamectl set-hostname $NAME -X -X #Nameserver -X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries -X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries -X if [ -n "$internalNS1" ] -X then -X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS1" > /etc/resolv.conf -X fi -X -X if [ -n "$internalNS2" ] -X then -X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS2" >> /etc/resolv.conf -X fi -X if [ -n "$NS1" ] -X then -X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS1" >> /etc/resolv.conf -X fi -X -X if [ -n "$NS2" ] -X then -X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS2" >> /etc/resolv.conf -X fi -X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] -X then -X if [ "$HYPERVISOR" == "vmware" ] || [ "$HYPERVISOR" == "hyperv" ]; -X then -X ip route add $MGMTNET via $LOCAL_GW dev eth0 -X # workaround to activate vSwitch under VMware -X timeout 3 ping -n -c 3 $LOCAL_GW || true -X fi -X fi -X -X ip route delete default -X # create route table for static route -X -X sudo echo "252 static_route" >> /etc/iproute2/rt_tables 2>/dev/null -X sudo echo "251 static_route_back" >> /etc/iproute2/rt_tables 2>/dev/null -X sudo ip rule add from $VPCCIDR table static_route 2>/dev/null -X sudo ip rule add from $VPCCIDR table static_route_back 2>/dev/null -X -X setup_vpc_apache2 -X -X enable_irqbalance 1 -X enable_vpc_rpsrfs 1 -X disable_rpfilter -X enable_fwding 1 -X enable_passive_ftp 1 -X cp /etc/iptables/iptables-vpcrouter /etc/iptables/rules.v4 -X setup_sshd $ETH0_IP "eth0" -X cp /etc/vpcdnsmasq.conf /etc/dnsmasq.conf -X cp /etc/cloud-nic.rules /etc/udev/rules.d/cloud-nic.rules -X echo "" > /etc/dnsmasq.d/dhcphosts.txt -X echo "dhcp-hostsfile=/etc/dhcphosts.txt" > /etc/dnsmasq.d/cloud.conf -X -X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" -X #DNS server will append $DOMAIN to local queries -X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf -X #answer all local domain queries -X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf -X -X command -v dhcp_release > /dev/null 2>&1 -X no_dhcp_release=$? -X if [ $no_dhcp_release -eq 0 ] -X then -X echo 1 > /var/cache/cloud/dnsmasq_managed_lease -X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf -X else -X echo 0 > /var/cache/cloud/dnsmasq_managed_lease -X fi -X -X # Setup hourly logrotate -X if [ -f /etc/cron.daily/logrotate ]; then -X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 -X fi -} -X -routing_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute routing_svcs" -X exit 1 -fi -setup_vpcrouter -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh': 'MD5 check failed' - ) << \SHAR_EOF -811420d11f97b1d7237b964e8bbbdf5d cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh'` -ne 3885 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' is not 3885" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/router.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/router.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/router.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/router.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/router.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -check_reboot_vmware() { -X if [ "$HYPERVISOR" != "vmware" ]; then -X return -X fi -X -X if [ -n "$MGMTNET" ]; then -X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') -X if ping -n -c 1 -W 3 $MGMT_GW &> /dev/null; then -X log_it "Management gateway pingable, skipping VR reboot" -X return -X fi -X fi -X -X log_it "Management gateway not pingable, rebooting VR" -X sync -X reboot -} -X -setup_router() { -X # To save router public interface and gw ip information -X touch /var/cache/cloud/ifaceGwIp -X -X oldmd5= -X [ -f "/etc/udev/rules.d/70-persistent-net.rules" ] && oldmd5=$(md5sum "/etc/udev/rules.d/70-persistent-net.rules" | awk '{print $1}') -X -X if [ -n "$ETH2_IP" ]; then -X setup_common eth0 eth1 eth2 -X -X if [ -n "$EXTRA_PUBNICS" ]; then -X for ((i = 3; i < 3 + $EXTRA_PUBNICS; i++)); do -X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" -X done -X fi -X else -X setup_common eth0 eth1 -X if [ -n "$EXTRA_PUBNICS" ]; then -X for ((i = 2; i < 2 + $EXTRA_PUBNICS; i++)); do -X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" -X done -X fi -X fi -X -X log_it "Checking udev NIC assignment order changes" -X if [ "$NIC_MACS" != "" ] -X then -X init_interfaces_orderby_macs "$NIC_MACS" "/tmp/interfaces" "/tmp/udev-rules" -X newmd5=$(md5sum "/tmp/udev-rules" | awk '{print $1}') -X rm /tmp/interfaces -X rm /tmp/udev-rules -X -X if [ "$oldmd5" != "$newmd5" ] -X then -X log_it "Reloading udev for new udev NIC assignment" -X udevadm control --reload-rules && udevadm trigger -X check_reboot_vmware -X fi -X fi -X -X setup_aesni -X setup_dnsmasq -X setup_apache2 $ETH0_IP -X -X sed -i /$NAME/d /etc/hosts -X echo "$ETH0_IP $NAME" >> /etc/hosts -X -X enable_irqbalance 1 -X disable_rpfilter_domR -X enable_fwding 1 -X enable_rpsrfs 1 -X enable_passive_ftp 1 -X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 -X setup_sshd $ETH1_IP "eth1" -X -X # Only allow DNS service for current network -X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X -X # Setup hourly logrotate -X if [ -f /etc/cron.daily/logrotate ]; then -X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 -X fi -} -X -routing_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute routing_svcs" -X exit 1 -fi -setup_router -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/router.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/router.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/router.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/router.sh': 'MD5 check failed' - ) << \SHAR_EOF -2ae62d5d44c716730231c9d77618fe91 cloud_scripts/opt/cloud/bin/setup/router.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/router.sh'` -ne 3355 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/router.sh' is not 3355" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/elbvm.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/elbvm.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/elbvm.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -elbvm_svcs() { -X echo "haproxy" > /var/cache/cloud/enabled_svcs -X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs -} -X -setup_elbvm() { -X log_it "Setting up Elastic Load Balancer system vm" -X setup_common eth0 eth1 -X sed -i /$NAME/d /etc/hosts -X public_ip=$ETH2_IP -X [ "$ETH2_IP" == "0.0.0.0" ] || [ "$ETH2_IP" == "" ] && public_ip=$ETH0_IP -X echo "$public_ip $NAME" >> /etc/hosts -X -X cp /etc/iptables/iptables-elbvm /etc/iptables/rules.v4 -X if [ "$SSHONGUEST" == "true" ] -X then -X setup_sshd $ETH0_IP "eth0" -X else -X setup_sshd $ETH1_IP "eth1" -X fi -X -X enable_fwding 0 -X enable_irqbalance 0 -} -X -elbvm_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute elbvm svcs" -X exit 1 -fi -setup_elbvm -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/elbvm.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh': 'MD5 check failed' - ) << \SHAR_EOF -2d34615f1d40f6125a2205e6118ba07f cloud_scripts/opt/cloud/bin/setup/elbvm.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh'` -ne 1578 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' is not 1578" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/bootstrap.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" -CMDLINE=/var/cache/cloud/cmdline -X -rm -f /var/cache/cloud/enabled_svcs -rm -f /var/cache/cloud/disabled_svcs -X -X. /lib/lsb/init-functions -X -log_it() { -X echo "$(date) $@" >> /var/log/cloud.log -X log_action_msg "$@" -} -X -hypervisor() { -X if [ -d /proc/xen ]; then -X mount -t xenfs none /proc/xen -X $(dmesg | grep -q "Xen HVM") -X if [ $? -eq 0 ]; then # 1=PV,0=HVM -X echo "xen-hvm" && return 0 -X else -X echo "xen-pv" && return 0 -X fi -X fi -X -X [ -x /usr/sbin/virt-what ] && local facts=( $(virt-what) ) -X if [ "$facts" != "" ]; then -X # Xen HVM is recognized as Hyperv when Viridian extensions are enabled -X if [ "${facts[-1]}" == "xen-domU" ] && [ "${facts[0]}" == "hyperv" ]; then -X echo "xen-hvm" && return 0 -X else -X echo ${facts[-1]} && return 0 -X fi -X fi -X -X grep -q QEMU /proc/cpuinfo && echo "kvm" && return 0 -X grep -q QEMU /var/log/messages && echo "kvm" && return 0 -X -X vmware-checkvm &> /dev/null && echo "vmware" && return 0 -X -X echo "unknown" && return 1 -} -X -config_guest() { -X [ ! -d /proc/xen ] && sed -i 's/^vc/#vc/' /etc/inittab && telinit q -X [ -d /proc/xen ] && sed -i 's/^#vc/vc/' /etc/inittab && telinit q -X -X systemctl daemon-reload -X -X case $HYPERVISOR in -X xen-pv|xen-domU) -X systemctl stop ntpd -X systemctl disable ntpd -X systemctl enable xe-daemon -X systemctl start xe-daemon -X -X cat /proc/cmdline > $CMDLINE -X sed -i "s/%/ /g" $CMDLINE -X ;; -X xen-hvm) -X systemctl stop ntpd -X systemctl disable ntpd -X systemctl enable xe-daemon -X systemctl start xe-daemon -X -X if [ ! -f /usr/bin/xenstore-read ]; then -X log_it "ERROR: xentools not installed, cannot found xenstore-read" && exit 5 -X fi -X /usr/bin/xenstore-read vm-data/cloudstack/init > $CMDLINE -X sed -i "s/%/ /g" $CMDLINE -X ;; -X kvm) -X # Configure kvm hotplug support -X if grep -E 'CONFIG_HOTPLUG_PCI=y|CONFIG_HOTPLUG_PCI_ACPI=y' /boot/config-`uname -r`; then -X log_it "acpiphp and pci_hotplug module already compiled in" -X else -X modprobe acpiphp 2> /dev/null && log_it "acpiphp module loaded" || true -X modprobe pci_hotplug 2> /dev/null && log_it "pci_hotplug module loaded" || true -X fi -X -X sed -i -e "/^s0:2345:respawn.*/d" /etc/inittab -X sed -i -e "/6:23:respawn/a\s0:2345:respawn:/sbin/getty -L 115200 ttyS0 vt102" /etc/inittab -X systemctl enable qemu-guest-agent -X systemctl start qemu-guest-agent -X -X # Wait for $CMDLINE file to be written by the qemu-guest-agent -X for i in {1..60}; do -X if [ -s $CMDLINE ]; then -X log_it "Received a new non-empty cmdline file from qemu-guest-agent" -X break -X fi -X sleep 1 -X done -X if [ ! -s $CMDLINE ]; then -X log_it "Failed to receive the cmdline file via the qemu-guest-agent" -X fi -X ;; -X vmware) -X # system time sync'd with host via vmware tools -X systemctl stop ntpd -X systemctl disable ntpd -X systemctl enable open-vm-tools -X systemctl start open-vm-tools -X -X vmtoolsd --cmd 'machine.id.get' > $CMDLINE -X ;; -X virtualpc|hyperv) -X # Hyper-V is recognized as virtualpc hypervisor type. Boot args are passed using KVP Daemon -X systemctl enable hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service -X systemctl start hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service -X sleep 5 -X cp -f /var/opt/hyperv/.kvp_pool_0 $CMDLINE -X cat /dev/null > /var/opt/hyperv/.kvp_pool_0 -X ;; -X virtualbox) -X # Virtualbox is used to test the virtual router -X # get the commandline from a dmistring (yes, hacky!) -X dmidecode | grep cmdline | sed 's/^.*cmdline://' > $CMDLINE -X RV=$? -X if [ $RV -ne 0 ] ; then -X log_it "Failed to get cmdline from a virtualbox dmi property" -X fi -X ;; -X esac -X -X # Find and export guest type -X export TYPE=$(grep -Po 'type=\K[a-zA-Z]*' $CMDLINE) -} -X -patch_systemvm() { -X local patchfile=$1 -X local backupfolder="/tmp/.conf.backup" -X local logfile="/var/log/patchsystemvm.log" -X if [ -f /usr/local/cloud/systemvm/conf/cloud.jks ]; then -X rm -fr $backupfolder -X mkdir -p $backupfolder -X cp -r /usr/local/cloud/systemvm/conf/* $backupfolder/ -X fi -X rm /usr/local/cloud/systemvm -rf -X mkdir -p /usr/local/cloud/systemvm -X echo "All" | unzip $patchfile -d /usr/local/cloud/systemvm >$logfile 2>&1 -X find /usr/local/cloud/systemvm/ -name \*.sh | xargs chmod 555 -X if [ -f $backupfolder/cloud.jks ]; then -X cp -r $backupfolder/* /usr/local/cloud/systemvm/conf/ -X echo "Restored keystore file and certs using backup" >> $logfile -X fi -X rm -fr $backupfolder -X # Import global cacerts into 'cloud' service's keystore -X keytool -importkeystore -srckeystore /etc/ssl/certs/java/cacerts -destkeystore /usr/local/cloud/systemvm/certs/realhostip.keystore -srcstorepass changeit -deststorepass vmops.com -noprompt || true -X return 0 -} -X -patch() { -X local PATCH_MOUNT=/media/cdrom -X local logfile="/var/log/patchsystemvm.log" -X if [ "$TYPE" == "consoleproxy" ] || [ "$TYPE" == "secstorage" ] && [ -f ${PATCH_MOUNT}/agent.zip ] && [ -f /var/cache/cloud/patch.required ] -X then -X echo "Patching systemvm for cloud service with mount=$PATCH_MOUNT for type=$TYPE" >> $logfile -X patch_systemvm ${PATCH_MOUNT}/agent.zip -X if [ $? -gt 0 ] -X then -X echo "Failed to apply patch systemvm\n" >> $logfile -X exit 1 -X fi -X fi -X -X rm -f /var/cache/cloud/patch.required -X chmod -x /etc/systemd/system/cloud*.service -X systemctl daemon-reload -X umount $PATCH_MOUNT || true -X -X if [ -f /mnt/cmdline ]; then -X cat /mnt/cmdline > $CMDLINE -X fi -X return 0 -} -X -config_sysctl() { -X # When there is more memory reset the cache back pressure to default 100 -X physmem=$(free|awk '/^Mem:/{print $2}') -X if [ $((physmem)) -lt 409600 ]; then -X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 200" /etc/sysctl.conf -X else -X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 100" /etc/sysctl.conf -X fi -X -X sync -X sysctl -p -} -X -bootstrap() { -X log_it "Bootstrapping systemvm appliance" -X -X export HYPERVISOR=$(hypervisor) -X [ $? -ne 0 ] && log_it "Failed to detect hypervisor type, bailing out" && exit 10 -X log_it "Starting guest services for $HYPERVISOR" -X -X config_guest -X patch -X config_sysctl -X -X log_it "Configuring systemvm type=$TYPE" -X if [ -f "/opt/cloud/bin/setup/$TYPE.sh" ]; then -X /opt/cloud/bin/setup/$TYPE.sh -X else -X /opt/cloud/bin/setup/default.sh -X fi -X -X log_it "Finished setting up systemvm" -X exit 0 -} -X -bootstrap -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/bootstrap.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh': 'MD5 check failed' - ) << \SHAR_EOF -722a9c6abfff147c7727fdcd85c96767 cloud_scripts/opt/cloud/bin/setup/bootstrap.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh'` -ne 7721 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' is not 7721" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_console_proxy() { -X log_it "Setting up console proxy system vm" -X -X echo "cloud" > /var/cache/cloud/enabled_svcs -X echo "haproxy dnsmasq apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs -X mkdir -p /var/log/cloud -X -X setup_common eth0 eth1 eth2 -X setup_system_rfc1918_internal -X -X log_it "Setting up entry in hosts" -X sed -i /$NAME/d /etc/hosts -X public_ip=`getPublicIp` -X echo "$public_ip $NAME" >> /etc/hosts -X -X log_it "Applying iptables rules" -X cp /etc/iptables/iptables-consoleproxy /etc/iptables/rules.v4 -X -X log_it "Configuring sshd" -X local hyp=$HYPERVISOR -X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then -X setup_sshd $ETH1_IP "eth1" -X else -X setup_sshd $ETH0_IP "eth0" -X fi -X -X disable_rpfilter -X enable_fwding 0 -X enable_irqbalance 0 -X rm -f /etc/logrotate.d/cloud -} -X -setup_console_proxy -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh': 'MD5 check failed' - ) << \SHAR_EOF -44adac9bf5e54d4791da00e3d1bdaf46 cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh'` -ne 1658 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' is not 1658" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/common.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/common.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/common.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/common.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/common.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" -X -X. /lib/lsb/init-functions -X -log_it() { -X echo "$(date) $@" >> /var/log/cloud.log -X log_action_msg "$@" -} -X -init_interfaces_orderby_macs() { -X macs=( $(echo $1 | sed "s/|/ /g") ) -X total_nics=${#macs[@]} -X interface_file=${2:-"/etc/network/interfaces"} -X rule_file=${3:-"/etc/udev/rules.d/70-persistent-net.rules"} -X -X echo -n "auto lo" > $interface_file -X for((i=0; i> $interface_file -X fi -X done -X -X cat >> $interface_file << EOF -X -iface lo inet loopback -X -EOF -X -X echo "" > $rule_file -X for((i=0; i < ${#macs[@]}; i++)) -X do -X echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${macs[$i]}\", NAME=\"eth$i\"" >> $rule_file -X done -} -X -init_interfaces() { -X if [ "$NIC_MACS" == "" ] -X then -X cat > /etc/network/interfaces << EOF -auto lo $1 $2 $3 -iface lo inet loopback -X -EOF -X else -X init_interfaces_orderby_macs "$NIC_MACS" -X fi -} -X -setup_interface() { -X local intfnum=$1 -X local ip=$2 -X local mask=$3 -X local gw=$4 -X local force=$5 -X local intf=eth${intfnum} -X local bootproto="static" -X -X if [ "$BOOTPROTO" == "dhcp" ] -X then -X if [ "$intfnum" != "0" ] -X then -X bootproto="dhcp" -X fi -X fi -X -X if [ "$ip" != "0.0.0.0" -a "$ip" != "" -o "$force" == "force" ] -X then -X echo "iface $intf inet $bootproto" >> /etc/network/interfaces -X if [ "$bootproto" == "static" ] -X then -X echo " address $ip " >> /etc/network/interfaces -X echo " netmask $mask" >> /etc/network/interfaces -X fi -X fi -X -X if [ "$ip" == "0.0.0.0" -o "$ip" == "" ] -X then -X ifconfig $intf down -X fi -X -X if [ "$force" == "force" ] -X then -X ifdown $intf -X else -X ifdown $intf -X if [ "$RROUTER" != "1" -o "$1" != "2" ] -X then -X ifup $intf -X fi -X fi -} -X -setup_interface_ipv6() { -X sysctl net.ipv6.conf.all.disable_ipv6=0 -X sysctl net.ipv6.conf.all.forwarding=1 -X sysctl net.ipv6.conf.all.accept_ra=1 -X -X sed -i "s/net.ipv6.conf.all.disable_ipv6 =.*$/net.ipv6.conf.all.disable_ipv6 = 0/" /etc/sysctl.conf -X sed -i "s/net.ipv6.conf.all.forwarding =.*$/net.ipv6.conf.all.forwarding = 1/" /etc/sysctl.conf -X sed -i "s/net.ipv6.conf.all.accept_ra =.*$/net.ipv6.conf.all.accept_ra = 1/" /etc/sysctl.conf -X -X local intfnum=$1 -X local ipv6="$2" -X local prelen="$3" -X local intf=eth${intfnum} -X -X echo "iface $intf inet6 static" >> /etc/network/interfaces -X echo " address $ipv6 " >> /etc/network/interfaces -X echo " netmask $prelen" >> /etc/network/interfaces -X echo " accept_ra 1" >> /etc/network/interfaces -X ifdown $intf -X ifup $intf -} -X -X -enable_fwding() { -X local enabled=$1 -X log_it "cloud: enable_fwding = $1" -X log_it "enable_fwding = $1" -X echo "$1" > /proc/sys/net/ipv4/ip_forward -X [ -f /etc/iptables/iptables.conf ] && sed -i "s/ENABLE_ROUTING=.*$/ENABLE_ROUTING=$enabled/" /etc/iptables/iptables.conf && return -} -X -enable_passive_ftp() { -X log_it "cloud: enabling passive FTP for guest VMs" -X echo "$1" > /proc/sys/net/netfilter/nf_conntrack_helper -} -X -disable_rpfilter() { -X log_it "cloud: disable rp_filter" -X log_it "disable rpfilter" -X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf -} -X -get_public_vif_list() { -X local vif_list="" -X for i in /sys/class/net/eth*; do -X vif=$(basename $i); -X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] -X then -X vif_list="$vif_list $vif"; -X fi -X done -X -X echo $vif_list -} -X -disable_rpfilter_domR() { -X log_it "cloud: Tuning rp_filter on public interfaces" -X -X VIF_LIST=$(get_public_vif_list) -X log_it "rpfilter public interfaces : $VIF_LIST" -X if [ "$DISABLE_RP_FILTER" == "true" ] -X then -X log_it "cloud: disable rp_filter on public interfaces" -X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf -X echo "0" > /proc/sys/net/ipv4/conf/default/rp_filter -X for vif in $VIF_LIST; do -X log_it "cloud: disable rp_filter on public interface: $vif" -X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 0/" /etc/sysctl.conf -X echo "0" > /proc/sys/net/ipv4/conf/$vif/rp_filter -X done -X else -X log_it "cloud: enable rp_filter on public interfaces" -X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 1/" /etc/sysctl.conf -X echo "1" > /proc/sys/net/ipv4/conf/default/rp_filter -X for vif in $VIF_LIST; do -X log_it "cloud: enable rp_filter on public interface: $vif" -X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 1/" /etc/sysctl.conf -X echo "1" > /proc/sys/net/ipv4/conf/$vif/rp_filter -X done -X fi -X log_it "cloud: Enabling rp_filter on Non-public interfaces(eth0,eth1,lo)" -X echo "1" > /proc/sys/net/ipv4/conf/eth0/rp_filter -X echo "1" > /proc/sys/net/ipv4/conf/eth1/rp_filter -X echo "1" > /proc/sys/net/ipv4/conf/lo/rp_filter -} -X -enable_irqbalance() { -X local enabled=$1 -X local proc=0 -X -X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) -X if [ $proc -le 1 ] && [ $enabled -eq 1 ] -X then -X enabled=0 -X fi -X -X log_it "Processors = $proc Enable service ${svc} = $enabled" -X local cfg=/etc/default/irqbalance -X [ -f $cfg ] && sed -i "s/ENABLED=.*$/ENABLED=$enabled/" $cfg && return -} -X -enable_vpc_rpsrfs() { -X local enable=$1 -X if [ $enable -eq 0 ] -X then -X echo 0 > /etc/rpsrfsenable -X else -X echo 1 > /etc/rpsrfsenable -X fi -X -X return 0 -} -X -enable_rpsrfs() { -X local enable=$1 -X -X if [ $enable -eq 0 ] -X then -X echo 0 > /etc/rpsrfsenable -X return 0 -X fi -X -X if [ ! -f /sys/class/net/eth0/queues/rx-0/rps_cpus ] -X then -X echo "rps is not enabled in the kernel" -X echo 0 > /etc/rpsrfsenable -X return 0 -X fi -X -X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) -X if [ $proc -le 1 ] -X then -X echo 0 > /etc/rpsrfsenable -X return 0; -X fi -X -X echo 1 > /etc/rpsrfsenable -X num=1 -X num=$(($num<<$proc)) -X num=$(($num-1)); -X echo $num; -X hex=$(printf "%x\n" $num) -X echo $hex; -X #enable rps -X echo $hex > /sys/class/net/eth0/queues/rx-0/rps_cpus -X echo $hex > /sys/class/net/eth2/queues/rx-0/rps_cpus -X -X #enble rfs -X echo 256 > /proc/sys/net/core/rps_sock_flow_entries -X echo 256 > /sys/class/net/eth0/queues/rx-0/rps_flow_cnt -X echo 256 > /sys/class/net/eth2/queues/rx-0/rps_flow_cnt -} -X -setup_common() { -X init_interfaces $1 $2 $3 -X if [ -n "$ETH0_IP" ] -X then -X setup_interface "0" $ETH0_IP $ETH0_MASK $GW -X fi -X if [ -n "$ETH0_IP6" ] -X then -X setup_interface_ipv6 "0" $ETH0_IP6 $ETH0_IP6_PRELEN -X fi -X setup_interface "1" $ETH1_IP $ETH1_MASK $GW -X if [ -n "$ETH2_IP" ] -X then -X setup_interface "2" $ETH2_IP $ETH2_MASK $GW -X fi -X -X echo $NAME > /etc/hostname -X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon -X hostnamectl set-hostname $NAME -X -X #Nameserver -X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries -X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries -X if [ -n "$internalNS1" ] -X then -X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS1" > /etc/resolv.conf -X fi -X -X if [ -n "$internalNS2" ] -X then -X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS2" >> /etc/resolv.conf -X fi -X if [ -n "$NS1" ] -X then -X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS1" >> /etc/resolv.conf -X fi -X -X if [ -n "$NS2" ] -X then -X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS2" >> /etc/resolv.conf -X fi -X -X if [ -n "$IP6_NS1" ] -X then -X echo "nameserver $IP6_NS1" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $IP6_NS1" >> /etc/resolv.conf -X fi -X if [ -n "$IP6_NS2" ] -X then -X echo "nameserver $IP6_NS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $IP6_NS2" >> /etc/resolv.conf -X fi -X -X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] -X then -X ip route add $MGMTNET via $LOCAL_GW dev eth1 -X fi -X -X ip route delete default -X if [ "$RROUTER" != "1" ] -X then -X gwdev=$3 -X if [ -z "$gwdev" ] -X then -X gwdev="eth0" -X fi -X -X ip route add default via $GW dev $gwdev -X fi -X -X # Workaround to activate vSwitch under VMware -X timeout 3 ping -n -c 3 $GW & -X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] -X then -X timeout 3 ping -n -c 3 $LOCAL_GW & -X #This code is added to address ARP issue by pinging MGMT_GW -X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') -X timeout 3 ping -n -c 3 $MGMT_GW & -X fi -X -X if [ "$HYPERVISOR" == "vmware" ]; then -X ntpq -p &> /dev/null || vmware-toolbox-cmd timesync enable -X fi -} -X -setup_dnsmasq() { -X log_it "Setting up dnsmasq" -X -X touch /etc/dhcpopts.txt -X -X [ -z $DHCP_RANGE ] && [ $ETH0_IP ] && DHCP_RANGE=$ETH0_IP -X [ $ETH0_IP6 ] && DHCP_RANGE_IP6=$ETH0_IP6 -X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" -X #removing the dnsmasq multiple ranges config file. -X rm /etc/dnsmasq.d/multiple_ranges.conf -X -X #get the template -X cp /etc/dnsmasq.conf.tmpl /etc/dnsmasq.conf -X -X if [ -n "$DOMAIN" ] -X then -X #send domain name to dhcp clients -X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\"$DOMAIN\"/ /etc/dnsmasq.conf -X #DNS server will append $DOMAIN to local queries -X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf -X #answer all local domain queries -X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf -X fi -X -X if [ -n "$DNS_SEARCH_ORDER" ] -X then -X sed -i -e "/^[#]*dhcp-option.*=119.*$/d" /etc/dnsmasq.conf -X echo "dhcp-option-force=119,$DNS_SEARCH_ORDER" >> /etc/dnsmasq.conf -X # set the domain search order as a space seprated list for option 15 -X DNS_SEARCH_ORDER=$(echo $DNS_SEARCH_ORDER | sed 's/,/ /g') -X #send domain name to dhcp clients -X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\""$DNS_SEARCH_ORDER"\"/ /etc/dnsmasq.conf -X fi -X -X if [ $DHCP_RANGE ] -X then -X sed -i -e "s/^dhcp-range_ip4=.*$/dhcp-range=$DHCP_RANGE,static/" /etc/dnsmasq.conf -X else -X sed -i -e "s/^dhcp-range_ip4=.*$//" /etc/dnsmasq.conf -X fi -X if [ $DHCP_RANGE_IP6 ] -X then -X sed -i -e "s/^dhcp-range_ip6=.*$/dhcp-range=$DHCP_RANGE_IP6,static/" /etc/dnsmasq.conf -X # For nondefault6 tagged host, don't send dns-server information -X sed -i /nondefault6/d /etc/dnsmasq.conf -X echo "dhcp-option=nondefault6,option6:dns-server" >> /etc/dnsmasq.conf -X else -X sed -i -e "s/^dhcp-range_ip6=.*$//" /etc/dnsmasq.conf -X fi -X -X if [ "$RROUTER" == "1" ] -X then -X DEFAULT_GW=$GUEST_GW -X INTERNAL_DNS=$GUEST_GW -X else -X if [ "$TYPE" == "dhcpsrvr" ] -X then -X DEFAULT_GW=$GW -X else -X DEFAULT_GW=$ETH0_IP -X fi -X INTERNAL_DNS=$ETH0_IP -X fi -X sed -i -e "/^[#]*dhcp-option=option:router.*$/d" /etc/dnsmasq.conf -X [ $DEFAULT_GW ] && echo "dhcp-option=option:router,$DEFAULT_GW" >> /etc/dnsmasq.conf -X -X [ $ETH0_IP ] && [ $NS1 ] && NS="$NS1," -X [ $ETH0_IP ] && [ $NS2 ] && NS="$NS$NS2," -X [ $ETH0_IP6 ] && [ $IP6_NS1 ] && NS6="[$IP6_NS1]," -X [ $ETH0_IP6 ] && [ $IP6_NS2 ] && NS6="$NS6[$IP6_NS2]," -X #for now set up ourself as the dns server as well -X sed -i -e "/^[#]*dhcp-option=6,.*$/d" /etc/dnsmasq.conf -X sed -i -e "/^[#]*dhcp-option=option6:dns-server,.*$/d" /etc/dnsmasq.conf -X if [ "$USE_EXTERNAL_DNS" != "true" ] -X then -X [ $ETH0_IP ] && NS="$INTERNAL_DNS,$NS" -X [ $ETH0_IP6 ] && NS6="[::],$NS6" -X # enable dns -X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf -X else -X # disable dns -X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf -X echo "port=0" >> /etc/dnsmasq.conf -X fi -X NS=${NS%?} -X NS6=${NS6%?} -X [ $ETH0_IP ] && echo "dhcp-option=6,$NS" >> /etc/dnsmasq.conf -X [ $ETH0_IP6 ] && echo "dhcp-option=option6:dns-server,$NS6" >> /etc/dnsmasq.conf -X #adding the name data-server to the /etc/hosts for allowing the access to user-data service and ssh-key reset in every subnet. -X #removing the existing entires to avoid duplicates on restarts. -X sed -i '/data-server/d' /etc/hosts -X if [ -n "$ETH0_IP" ] -X then -X echo "$ETH0_IP data-server" >> /etc/hosts -X fi -X if [ -n "$ETH0_IP6" ] -X then -X echo "$ETH0_IP6 data-server" >> /etc/hosts -X fi -X #add the dhcp-client-update only if dnsmasq version is 2.6 and above -X dnsmasqVersion=$(dnsmasq -v | grep version -m 1 | grep -o "[[:digit:]]\.[[:digit:]]") -X major=$(echo "$dnsmasqVersion" | cut -d '.' -f 1) -X minor=$(echo "$dnsmasqVersion" | cut -d '.' -f 2) -X if [ "$major" -eq '2' -a "$minor" -ge '6' ] || [ "$major" -gt '2' ] -X then -X sed -i -e "/^dhcp-client-update/d" /etc/dnsmasq.conf -X echo 'dhcp-client-update' >> /etc/dnsmasq.conf -X fi -X -X command -v dhcp_release > /dev/null 2>&1 -X no_dhcp_release=$? -X if [ $no_dhcp_release -eq 0 -a -z "$ETH0_IP6" ] -X then -X echo 1 > /var/cache/cloud/dnsmasq_managed_lease -X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf -X else -X echo 0 > /var/cache/cloud/dnsmasq_managed_lease -X fi -} -X -setup_sshd(){ -X local ip=$1 -X local eth=$2 -X [ -f /etc/ssh/sshd_config ] && sed -i -e "s/^[#]*ListenAddress.*$/ListenAddress $ip/" /etc/ssh/sshd_config -X sed -i "/3922/s/eth./$eth/" /etc/iptables/rules.v4 -} -X -setup_vpc_apache2() { -X log_it "Setting up apache web server for VPC" -X systemctl disable apache2 -X clean_ipalias_config -X setup_apache2_common -} -X -clean_ipalias_config() { -X rm -f /etc/apache2/conf.d/ports.*.meta-data.conf -X rm -f /etc/apache2/sites-available/ipAlias* -X rm -f /etc/apache2/sites-enabled/ipAlias* -X rm -f /etc/apache2/conf.d/vhost*.conf -X rm -f /etc/apache2/ports.conf -X rm -f /etc/apache2/vhostexample.conf -X rm -f /etc/apache2/sites-available/* -X rm -f /etc/apache2/sites-enabled/* -X -X rm -rf /etc/failure_config -} -X -setup_apache2_common() { -X sed -i 's/^Include ports.conf.*/# CS: Done by Python CsApp config\n#Include ports.conf/g' /etc/apache2/apache2.conf -X # Disable listing of http://SSVM-IP/icons folder for security issue. see article http://www.i-lateral.com/tutorials/disabling-the-icons-folder-on-an-ubuntu-web-server/ -X [ -f /etc/apache2/mods-available/alias.conf ] && sed -i s/"Options Indexes MultiViews"/"Options -Indexes MultiViews"/ /etc/apache2/mods-available/alias.conf -X -X echo "Options -Indexes" > /var/www/html/.htaccess -} -X -setup_apache2() { -X log_it "Setting up apache web server" -X mkdir -p /var/www -X chown www-data:www-data -R /var/www -X clean_ipalias_config -X setup_apache2_common -X local ip=$1 -} -X -setup_aesni() { -X if [ `grep aes /proc/cpuinfo | wc -l` -gt 0 ] -X then -X modprobe aesni_intel -X fi -} -X -setup_storage_network() { -X if [ x"$STORAGE_IP" == "x" -o x"$STORAGE_NETMASK" == "x" ] -X then -X log_it "Incompleted parameters STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR. Cannot setup storage network" -X return -X fi -X -X echo "" >> /etc/network/interfaces -X echo "auto eth3" >> /etc/network/interfaces -X -X setup_interface "3" "$STORAGE_IP" "$STORAGE_NETMASK" -X [ -n "$MTU" ] && ifconfig eth3 mtu $MTU && echo " mtu $MTU" >> /etc/network/interfaces -X #ip route add "$STORAGE_CIDR" via "$STORAGE_IP" -X log_it "Successfully setup storage network with STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR" -} -X -setup_system_rfc1918_internal() { -X public_ip=`getPublicIp` -X echo "$public_ip" | grep -E "^((127\.)|(10\.)|(172\.1[6-9]\.)|(172\.2[0-9]\.)|(172\.3[0-1]\.)|(192\.168\.))" -X if [ "$?" == "0" ]; then -X log_it "Not setting up route of RFC1918 space to $LOCAL_GW befause $public_ip is RFC1918." -X else -X log_it "Setting up route of RFC1918 space to $LOCAL_GW" -X # Setup general route for RFC 1918 space, as otherwise it will be sent to -X # the public gateway and not work -X # More specific routes that may be set have preference over this generic route. -X ip route add 10.0.0.0/8 via $LOCAL_GW -X ip route add 172.16.0.0/12 via $LOCAL_GW -X ip route add 192.168.0.0/16 via $LOCAL_GW -X fi -} -X -getPublicIp() { -X public_ip=$ETH2_IP -X [ "$ETH2_IP" == "0.0.0.0" ] && public_ip=$ETH1_IP -X echo $public_ip -} -X -setup_ntp() { -X log_it "Setting up NTP" -X NTP_CONF_FILE="/etc/ntp.conf" -X if [ -f $NTP_CONF_FILE ] -X then -X IFS=',' read -a server_list <<< "$NTP_SERVER_LIST" -X for (( iterator=${#server_list[@]}-1 ; iterator>=0 ; iterator-- )) -X do -X server=$(echo ${server_list[iterator]} | tr -d '\r') -X PATTERN="server $server" -X if grep -q "^$PATTERN$" $NTP_CONF_FILE ; then -X sed -i "/^$PATTERN$/d" $NTP_CONF_FILE -X fi -X sed -i "0,/^server/s//$PATTERN\nserver/" $NTP_CONF_FILE -X done -X systemctl enable ntp -X else -X log_it "NTP configuration file not found" -X fi -} -X -routing_svcs() { -X echo "haproxy apache2" > /var/cache/cloud/enabled_svcs -X echo "cloud nfs-common portmap" > /var/cache/cloud/disabled_svcs -X if [ "$RROUTER" -eq "1" ] -X then -X echo "keepalived conntrackd" >> /var/cache/cloud/enabled_svcs -X echo "dnsmasq" >> /var/cache/cloud/disabled_svcs -X else -X echo "dnsmasq" >> /var/cache/cloud/enabled_svcs -X echo "keepalived conntrackd " >> /var/cache/cloud/disabled_svcs -X fi -} -X -parse_cmd_line() { -X CMDLINE=$(cat /var/cache/cloud/cmdline) -X TYPE="unknown" -X BOOTPROTO="static" -X DISABLE_RP_FILTER="false" -X STORAGE_IP="" -X STORAGE_NETMASK="" -X STORAGE_CIDR="" -X VM_PASSWORD="" -X -X CHEF_TMP_FILE=/tmp/cmdline.json -X COMMA="\t" -X echo -e "{\n\"type\": \"cmdline\"," > ${CHEF_TMP_FILE} -X echo -e "\"cmd_line\": {" >> ${CHEF_TMP_FILE} -X -X for i in $CMDLINE -X do -X # search for foo=bar pattern and cut out foo -X KEY=$(echo $i | cut -d= -f1) -X VALUE=$(echo $i | cut -d= -f2) -X echo -en ${COMMA} >> ${CHEF_TMP_FILE} -X # Two lines so values do not accidently interpretted as escapes!! -X echo -n \"${KEY}\"': '\"${VALUE}\" >> ${CHEF_TMP_FILE} -X COMMA=",\n\t" -X case $KEY in -X disable_rp_filter) -X export DISABLE_RP_FILTER=$VALUE -X ;; -X eth0ip) -X export ETH0_IP=$VALUE -X ;; -X eth1ip) -X export ETH1_IP=$VALUE -X ;; -X eth2ip) -X export ETH2_IP=$VALUE -X ;; -X host) -X export MGMT_HOST=$VALUE -X ;; -X gateway) -X export GW=$VALUE -X ;; -X ip6gateway) -X export IP6GW=$VALUE -X ;; -X eth0mask) -X export ETH0_MASK=$VALUE -X ;; -X eth1mask) -X export ETH1_MASK=$VALUE -X ;; -X eth2mask) -X export ETH2_MASK=$VALUE -X ;; -X eth0ip6) -X export ETH0_IP6=$VALUE -X ;; -X eth0ip6prelen) -X export ETH0_IP6_PRELEN=$VALUE -X ;; -X internaldns1) -X export internalNS1=$VALUE -X ;; -X internaldns2) -X export internalNS2=$VALUE -X ;; -X dns1) -X export NS1=$VALUE -X ;; -X dns2) -X export NS2=$VALUE -X ;; -X ip6dns1) -X export IP6_NS1=$VALUE -X ;; -X ip6dns2) -X export IP6_NS2=$VALUE -X ;; -X domain) -X export DOMAIN=$VALUE -X ;; -X dnssearchorder) -X export DNS_SEARCH_ORDER=$VALUE -X ;; -X useextdns) -X export USE_EXTERNAL_DNS=$VALUE -X ;; -X mgmtcidr) -X export MGMTNET=$VALUE -X ;; -X localgw) -X export LOCAL_GW=$VALUE -X ;; -X template) -X export TEMPLATE=$VALUE -X ;; -X sshonguest) -X export SSHONGUEST=$VALUE -X ;; -X name) -X export NAME=$VALUE -X ;; -X dhcprange) -X export DHCP_RANGE=$(echo $VALUE | tr ':' ',') -X ;; -X bootproto) -X export BOOTPROTO=$VALUE -X ;; -X type) -X export TYPE=$VALUE -X ;; -X defaultroute) -X export DEFAULTROUTE=$VALUE -X ;; -X redundant_router) -X export RROUTER=$VALUE -X ;; -X redundant_state) -X export RROUTER_STATE=$VALUE -X ;; -X guestgw) -X export GUEST_GW=$VALUE -X ;; -X guestbrd) -X export GUEST_BRD=$VALUE -X ;; -X guestcidrsize) -X export GUEST_CIDR_SIZE=$VALUE -X ;; -X router_pr) -X export ROUTER_PR=$VALUE -X ;; -X extra_pubnics) -X export EXTRA_PUBNICS=$VALUE -X ;; -X nic_macs) -X export NIC_MACS=$VALUE -X ;; -X mtu) -X export MTU=$VALUE -X ;; -X storageip) -X export STORAGE_IP=$VALUE -X ;; -X storagenetmask) -X export STORAGE_NETMASK=$VALUE -X ;; -X storagecidr) -X export STORAGE_CIDR=$VALUE -X ;; -X vmpassword) -X export VM_PASSWORD=$VALUE -X ;; -X vpccidr) -X export VPCCIDR=$VALUE -X ;; -X cidrsize) -X export CIDR_SIZE=$VALUE -X ;; -X advert_int) -X export ADVERT_INT=$VALUE -X ;; -X ntpserverlist) -X export NTP_SERVER_LIST=$VALUE -X ;; -X esac -X done -X echo -e "\n\t}\n}" >> ${CHEF_TMP_FILE} -X if [ "$TYPE" != "unknown" ] -X then -X mv ${CHEF_TMP_FILE} /var/cache/cloud/cmd_line.json -X fi -X -X [ $ETH0_IP ] && export LOCAL_ADDRS=$ETH0_IP -X [ $ETH0_IP6 ] && export LOCAL_ADDRS=$ETH0_IP6 -X [ $ETH0_IP ] && [ $ETH0_IP6 ] && export LOCAL_ADDRS="$ETH0_IP,$ETH0_IP6" -X -X # Randomize cloud password so only ssh login is allowed -X echo "cloud:`openssl rand -base64 32`" | chpasswd -X -X if [ x"$VM_PASSWORD" != x"" ] -X then -X echo "root:$VM_PASSWORD" | chpasswd -X fi -} -X -parse_cmd_line -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/common.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/common.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/common.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/common.sh': 'MD5 check failed' - ) << \SHAR_EOF -8754c81bacd82458e4ce221b476505ea cloud_scripts/opt/cloud/bin/setup/common.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/common.sh'` -ne 22472 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/common.sh' is not 22472" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -dhcpsrvr_svcs() { -X echo "dnsmasq apache2" > /var/cache/cloud/enabled_svcs -X echo "cloud nfs-common conntrackd keepalived haproxy portmap" > /var/cache/cloud/disabled_svcs -} -X -setup_dhcpsrvr() { -X log_it "Setting up dhcp server system vm" -X setup_common eth0 eth1 -X setup_dnsmasq -X setup_apache2 $ETH0_IP -X -X sed -i /$NAME/d /etc/hosts -X [ $ETH0_IP ] && echo "$ETH0_IP $NAME" >> /etc/hosts -X [ $ETH0_IP6 ] && echo "$ETH0_IP6 $NAME" >> /etc/hosts -X -X enable_irqbalance 0 -X enable_fwding 0 -X -X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 -X -X #Only allow DNS service for current network -X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X -X if [ "$SSHONGUEST" == "true" ] -X then -X setup_sshd $ETH0_IP "eth0" -X else -X setup_sshd $ETH1_IP "eth1" -X fi -} -X -dhcpsrvr_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute dhcpsrvr_svcs" -X exit 1 -fi -setup_dhcpsrvr -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh': 'MD5 check failed' - ) << \SHAR_EOF -08afc46420e5e388ba6be68cfdbd4a59 cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh'` -ne 1985 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' is not 1985" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/cloud-early-config ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/cloud-early-config (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/cloud-early-config (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" -X -# Clear boot up flag, it would be created by rc.local after boot up done -mkdir -p /var/cache/cloud -rm -f /var/cache/cloud/boot_up_done -X -[ -x /sbin/ifup ] || exit 0 -X -X. /lib/lsb/init-functions -X -log_it() { -X echo "$(date) $@" >> /var/log/cloud.log -X log_action_msg "$@" -} -X -patch() { -X local PATCH_MOUNT=/media/cdrom -X local patchfile=$PATCH_MOUNT/cloud-scripts.tgz -X local privkey=$PATCH_MOUNT/authorized_keys -X local md5file=/var/cache/cloud/cloud-scripts-signature -X local cdrom_dev= -X mkdir -p $PATCH_MOUNT -X -X if [ -e /dev/xvdd ]; then -X cdrom_dev=/dev/xvdd -X elif [ -e /dev/cdrom ]; then -X cdrom_dev=/dev/cdrom -X elif [ -e /dev/cdrom1 ]; then -X cdrom_dev=/dev/cdrom1 -X elif [ -e /dev/cdrom2 ]; then -X cdrom_dev=/dev/cdrom2 -X elif [ -e /dev/cdrom3 ]; then -X cdrom_dev=/dev/cdrom3 -X fi -X -X if [ -f /var/cache/cloud/authorized_keys ]; then -X privkey=/var/cache/cloud/authorized_keys -X fi -X -X if [ -n "$cdrom_dev" ]; then -X mount -o ro $cdrom_dev $PATCH_MOUNT -X local oldmd5= -X [ -f ${md5file} ] && oldmd5=$(cat ${md5file}) -X local newmd5= -X [ -f ${patchfile} ] && newmd5=$(md5sum ${patchfile} | awk '{print $1}') -X -X log_it "Scripts checksum detected: oldmd5=$oldmd5 newmd5=$newmd5" -X if [ "$oldmd5" != "$newmd5" ] && [ -f ${patchfile} ] && [ "$newmd5" != "" ] -X then -X tar xzf $patchfile -C / -X echo ${newmd5} > ${md5file} -X log_it "Patched scripts using $patchfile" -X touch /var/cache/cloud/patch.required -X fi -X -X if [ -f $privkey ]; then -X cp -f $privkey /root/.ssh/ -X chmod go-rwx /root/.ssh/authorized_keys -X fi -X fi -X -X return 0 -} -X -start() { -X log_it "Executing cloud-early-config" -X -X # Clear /tmp for file lock -X rm -f /tmp/*.lock -X rm -f /tmp/rrouter_bumped -X rm -f /root/.rnd -X echo "" > /root/.ssh/known_hosts -X -X patch -X sync -X /opt/cloud/bin/setup/bootstrap.sh -X -X log_it "Finished setting up systemvm" -X exit 0 -} -X -start -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/cloud-early-config failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config': 'MD5 check failed' - ) << \SHAR_EOF -c9e5973de3771fd5f5e9b490c60db970 cloud_scripts/opt/cloud/bin/setup/cloud-early-config -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config'` -ne 2765 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' is not 2765" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/default.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/default.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/default.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/default.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/default.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_default() { -X cat > /etc/network/interfaces << EOF -auto lo -iface lo inet loopback -EOF -X cp -f /etc/iptables/rt_tables_init /etc/iproute2/rt_tables -} -X -setup_default -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/default.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/default.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/default.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/default.sh': 'MD5 check failed' - ) << \SHAR_EOF -20e3a01cb77930eba6438de6d9a3f193 cloud_scripts/opt/cloud/bin/setup/default.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/default.sh'` -ne 1002 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/default.sh' is not 1002" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/loadbalancer.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/loadbalancer.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/loadbalancer.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -X -# $Id: loadbalancer.sh 9947 2010-06-25 19:34:24Z manuel $ $HeadURL: svn://svn.lab.vmops.com/repos/vmdev/java/patches/xenserver/root/loadbalancer.sh $ -# loadbalancer.sh -- reconfigure loadbalancer rules -# @VERSION@ -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s: -i -a -d -f -s \n" $(basename $0) >&2 -} -X -# set -x -X -# ensure that the nic has the public ip we are load balancing on -ip_entry() { -X local added=$1 -X local removed=$2 -X -X if [ "$added" == "none" ] -X then -X added="" -X fi -X -X if [ "$removed" == "none" ] -X then -X removed="" -X fi -X -X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") -X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") -X -X for i in $a -X do -X local pubIp=$(echo $i | cut -d: -f1) -X logger -t cloud "Adding public ip $pubIp for load balancing" -X for vif in $VIF_LIST; do -X sudo ip addr add dev $vif $pubIp/32 -X #ignore error since it is because the ip is already there -X done -X done -X -X for i in $r -X do -X logger -t cloud "Removing public ips for deleted loadbalancers" -X local pubIp=$(echo $i | cut -d: -f1) -X logger -t cloud "Removing public ip $pubIp for deleted loadbalancers" -X for vif in $VIF_LIST; do -X sudo ip addr del $pubIp/32 dev $vif -X done -X done -X -X return 0 -} -get_lb_vif_list() { -# add eth0 to the VIF_LIST if it is not there, this allows guest VMs to use the LB service. -X local lb_list="$VIF_LIST eth0"; -X lb_list=$(echo $lb_list | tr " " "\n" | sort | uniq | tr "\n" " ") -X echo $lb_list -} -fw_remove_backup() { -X local lb_vif_list=$(get_lb_vif_list) -X for vif in $lb_vif_list; do -X sudo iptables -F back_load_balancer_$vif 2> /dev/null -X sudo iptables -D INPUT -i $vif -p tcp -j back_load_balancer_$vif 2> /dev/null -X sudo iptables -X back_load_balancer_$vif 2> /dev/null -X done -X sudo iptables -F back_lb_stats 2> /dev/null -X sudo iptables -D INPUT -p tcp -j back_lb_stats 2> /dev/null -X sudo iptables -X back_lb_stats 2> /dev/null -} -fw_restore() { -X local lb_vif_list=$(get_lb_vif_list) -X for vif in $lb_vif_list; do -X sudo iptables -F load_balancer_$vif 2> /dev/null -X sudo iptables -D INPUT -i $vif -p tcp -j load_balancer_$vif 2> /dev/null -X sudo iptables -X load_balancer_$vif 2> /dev/null -X sudo iptables -E back_load_balancer_$vif load_balancer_$vif 2> /dev/null -X done -X sudo iptables -F lb_stats 2> /dev/null -X sudo iptables -D INPUT -p tcp -j lb_stats 2> /dev/null -X sudo iptables -X lb_stats 2> /dev/null -X sudo iptables -E back_lb_stats lb_stats 2> /dev/null -} -# firewall entry to ensure that haproxy can receive on specified port -fw_entry() { -X local added=$1 -X local removed=$2 -X local stats=$3 -X -X if [ "$added" == "none" ] -X then -X added="" -X fi -X -X if [ "$removed" == "none" ] -X then -X removed="" -X fi -X -X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") -X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") -X -# back up the iptable rules by renaming before creating new. -X local lb_vif_list=$(get_lb_vif_list) -X for vif in $lb_vif_list; do -X sudo iptables -E load_balancer_$vif back_load_balancer_$vif 2> /dev/null -X sudo iptables -N load_balancer_$vif 2> /dev/null -X sudo iptables -A INPUT -i $vif -p tcp -j load_balancer_$vif -X done -X sudo iptables -E lb_stats back_lb_stats 2> /dev/null -X sudo iptables -N lb_stats 2> /dev/null -X sudo iptables -A INPUT -p tcp -j lb_stats -X -X for i in $a -X do -X local pubIp=$(echo $i | cut -d: -f1) -X local dport=$(echo $i | cut -d: -f2) -X local lb_vif_list=$(get_lb_vif_list) -X for vif in $lb_vif_list; do -X -#TODO : The below delete will be used only when we upgrade the from older verion to the newer one , the below delete become obsolute in the future. -X sudo iptables -D INPUT -i $vif -p tcp -d $pubIp --dport $dport -j ACCEPT 2> /dev/null -X -X sudo iptables -A load_balancer_$vif -p tcp -d $pubIp --dport $dport -j ACCEPT -X -X if [ $? -gt 0 ] -X then -X return 1 -X fi -X done -X done -X local pubIp=$(echo $stats | cut -d: -f1) -X local dport=$(echo $stats | cut -d: -f2) -X local cidrs=$(echo $stats | cut -d: -f3 | sed 's/-/,/') -X sudo iptables -A lb_stats -s $cidrs -p tcp -m state --state NEW -d $pubIp --dport $dport -j ACCEPT -X -X -#TODO : The below delete in the for-loop will be used only when we upgrade the from older verion to the newer one , the below delete become obsolute in the future. -X for i in $r -X do -X local pubIp=$(echo $i | cut -d: -f1) -X local dport=$(echo $i | cut -d: -f2) -X -X for vif in $VIF_LIST; do -X sudo iptables -D INPUT -i $vif -p tcp -d $pubIp --dport $dport -j ACCEPT 2> /dev/null -X done -X done -X -X return 0 -} -X -#Hot reconfigure HA Proxy in the routing domain -reconfig_lb() { -X logger -t cloud "Reconfiguring loadbalancer using $1" -X /root/reconfigLB.sh $1 -X return $? -} -X -# Restore the HA Proxy to its previous state, and revert iptables rules on DomR -restore_lb() { -X logger -t cloud "Restoring HA Proxy to previous state" -X # Copy the old version of haproxy.cfg into the file that reconfigLB.sh uses -X cp /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg.new -X -X if [ $? -eq 0 ] -X then -X # Run reconfigLB.sh again -X /root/reconfigLB.sh /etc/haproxy/haproxy.cfg.new -X fi -} -X -get_vif_list() { -X local vif_list="" -X for i in /sys/class/net/eth*; do -X vif=$(basename $i); -X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] -X then -X vif_list="$vif_list $vif"; -X fi -X done -X if [ "$vif_list" == "" ] -X then -X vif_list="eth0" -X fi -X -X logger -t cloud "Loadbalancer public interfaces = $vif_list" -X echo $vif_list -} -X -mflag= -iflag= -aflag= -dflag= -fflag= -sflag= -X -while getopts 'i:a:d:f:s:' OPTION -do -X case $OPTION in -X i) iflag=1 -X domRIp="$OPTARG" -X ;; -X a) aflag=1 -X addedIps="$OPTARG" -X ;; -X d) dflag=1 -X removedIps="$OPTARG" -X ;; -X f) fflag=1 -X cfgfile="$OPTARG" -X ;; -X s) sflag=1 -X statsIp="$OPTARG" -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [ "$addedIps" == "" ] -then -X addedIps="none" -fi -X -X -if [ "$removedIps" == "" ] -then -X removedIps="none" -fi -X -VIF_LIST=$(get_vif_list) -X -X -if [ "$addedIps" == "" ] -then -X addedIps="none" -fi -X -if [ "$removedIps" == "" ] -then -X removedIps="none" -fi -X -#FIXME: make this explicit via check on vm type or passed in flag -if [ "$VIF_LIST" == "eth0" ] -then -X ip_entry $addedIps $removedIps -fi -X -# hot reconfigure haproxy -reconfig_lb $cfgfile -X -if [ $? -gt 0 ] -then -X logger -t cloud "Reconfiguring loadbalancer failed" -X #FIXME: make this explicit via check on vm type or passed in flag -X if [ "$VIF_LIST" == "eth0" ] -X then -X ip_entry $removedIps $addedIps -X fi -X unlock_exit 1 $lock $locked -fi -X -# iptables entry to ensure that haproxy receives traffic -fw_entry $addedIps $removedIps $statsIp -X -if [ $? -gt 0 ] -then -X logger -t cloud "Failed to apply firewall rules for load balancing, reverting HA Proxy config" -X # Restore the LB -X restore_lb -X -X logger -t cloud "Reverting firewall config" -X # Revert iptables rules on DomR -X fw_restore -X -X #FIXME: make this explicit via check on vm type or passed in flag -X if [ "$VIF_LIST" == "eth0" ] -X then -X logger -t cloud "Reverting ip address changes to eth0" -X ip_entry $removedIps $addedIps -X fi -X -X unlock_exit 1 $lock $locked -else -X # Remove backedup iptable rules -X fw_remove_backup -fi -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/loadbalancer.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/loadbalancer.sh': 'MD5 check failed' - ) << \SHAR_EOF -6da53e4d9dd0b11f6fa334c6f583f8cd cloud_scripts/opt/cloud/bin/loadbalancer.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/loadbalancer.sh'` -ne 8234 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' is not 8234" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/baremetal_snat.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/baremetal_snat.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/baremetal_snat.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' && -#!/bin/bash -X -#Licensed to the Apache Software Foundation (ASF) under one -#or more contributor license agreements. See the NOTICE file -#distributed with this work for additional information -#regarding copyright ownership. The ASF licenses this file -#to you under the Apache License, Version 2.0 (the -#"License"); you may not use this file except in compliance -#with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -#Unless required by applicable law or agreed to in writing, -#software distributed under the License is distributed on an -#"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -#KIND, either express or implied. See the License for the -#specific language governing permissions and limitations -#under the License. -X -set +u -X -mgmt_nic_ip=$1 -internal_server_ip=$2 -gateway_ip=$3 -X -ip route | grep "$internal_server_ip" > /dev/null -X -if [ $? -ne 0 ]; then -X ip route add $internal_server_ip via $gateway_ip -fi -X -iptables-save | grep -- "-A POSTROUTING -d $internal_server_ip" > /dev/null -X -if [ $? -ne 0 ]; then -X iptables -t nat -A POSTROUTING -d $internal_server_ip -j SNAT --to-source $mgmt_nic_ip -fi -X -X -iptables-save | grep -- "-A INPUT -i eth0 -p udp -m udp --dport 69 -j ACCEPT" > /dev/null -if [ $? -ne 0 ]; then -X iptables -I INPUT -i eth0 -p udp -m udp --dport 69 -j ACCEPT -fi -X -iptables-save | grep -- "-A FORWARD -i eth1 -o eth0 -j ACCEPT" > /dev/null -if [ $? -ne 0 ]; then -X iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT -fi -X -rule="-A FORWARD -d $internal_server_ip/32 -i eth0 -o eth1 -j ACCEPT" -iptables-save | grep -- "$rule" > /dev/null -if [ $? -ne 0 ]; then -X iptables -I FORWARD -d $internal_server_ip/32 -i eth0 -o eth1 -j ACCEPT -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/baremetal_snat.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh': 'MD5 check failed' - ) << \SHAR_EOF -acab3e2b25ee898e7dd05c4e77b15569 cloud_scripts/opt/cloud/bin/baremetal_snat.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh'` -ne 1717 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' is not 1717" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_vpnusers.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vpnusers.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vpnusers.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import copy -X -X -def merge(dbag, data): -X dbagc = copy.deepcopy(dbag) -X -X print dbag -X print data -X if "vpn_users" not in data: -X return dbagc -X -X # remove previously deleted user from the dict -X for user in dbagc.keys(): -X if user == 'id': -X continue -X userrec = dbagc[user] -X add = userrec['add'] -X if not add: -X del(dbagc[user]) -X -X for user in data['vpn_users']: -X username = user['user'] -X add = user['add'] -X if username not in dbagc.keys(): -X dbagc[username] = user -X elif username in dbagc.keys() and not add: -X dbagc[username] = user -X -X return dbagc -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_vpnusers.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py': 'MD5 check failed' - ) << \SHAR_EOF -d54ff81fd9901ecc0bfbe9528343e238 cloud_scripts/opt/cloud/bin/cs_vpnusers.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py'` -ne 1469 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' is not 1469" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/merge.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/merge.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/merge.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/merge.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/merge.py' && -#!/usr/bin/python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import json -import os -import uuid -import logging -import gzip -import shutil -import cs_ip -import cs_guestnetwork -import cs_cmdline -import cs_vmp -import cs_network_acl -import cs_firewallrules -import cs_loadbalancer -import cs_monitorservice -import cs_vmdata -import cs_dhcp -import cs_forwardingrules -import cs_site2sitevpn -import cs_remoteaccessvpn -import cs_vpnusers -import cs_staticroutes -X -X -class DataBag: -X -X DPATH = "/etc/cloudstack" -X -X def __init__(self): -X self.bdata = {} -X -X def load(self): -X data = self.bdata -X if not os.path.exists(self.DPATH): -X os.makedirs(self.DPATH) -X self.fpath = os.path.join(self.DPATH, self.key + '.json') -X -X try: -X with open(self.fpath, 'r') as _fh: -X logging.debug("Loading data bag type %s", self.key) -X data = json.load(_fh) -X except (IOError, ValueError): -X logging.debug("Caught load error, creating empty data bag type %s", self.key) -X data.update({"id": self.key}) -X finally: -X self.dbag = data -X -X def save(self, dbag): -X try: -X with open(self.fpath, 'w') as _fh: -X logging.debug("Writing data bag type %s", self.key) -X json.dump( -X dbag, _fh, -X sort_keys=True, -X indent=2 -X ) -X except IOError: -X logging.error("Could not write data bag %s", self.key) -X -X def getDataBag(self): -X return self.dbag -X -X def setKey(self, key): -X self.key = key -X -X -class updateDataBag: -X -X DPATH = "/etc/cloudstack" -X -X def __init__(self, qFile): -X self.qFile = qFile -X self.fpath = '' -X self.bdata = {} -X self.process() -X -X def process(self): -X self.db = DataBag() -X if (self.qFile.type == "staticnatrules" or self.qFile.type == "forwardrules"): -X self.db.setKey("forwardingrules") -X else: -X self.db.setKey(self.qFile.type) -X dbag = self.db.load() -X logging.info("Command of type %s received", self.qFile.type) -X -X if self.qFile.type == 'ips': -X dbag = self.processIP(self.db.getDataBag()) -X elif self.qFile.type == 'guestnetwork': -X dbag = self.processGuestNetwork(self.db.getDataBag()) -X elif self.qFile.type == 'cmdline': -X dbag = self.processCL(self.db.getDataBag()) -X elif self.qFile.type == 'vmpassword': -X dbag = self.processVMpassword(self.db.getDataBag()) -X elif self.qFile.type == 'networkacl': -X dbag = self.process_network_acl(self.db.getDataBag()) -X elif self.qFile.type == 'firewallrules': -X dbag = self.process_firewallrules(self.db.getDataBag()) -X elif self.qFile.type == 'loadbalancer': -X dbag = self.process_loadbalancer(self.db.getDataBag()) -X elif self.qFile.type == 'monitorservice': -X dbag = self.process_monitorservice(self.db.getDataBag()) -X elif self.qFile.type == 'vmdata': -X dbag = self.processVmData(self.db.getDataBag()) -X elif self.qFile.type == 'dhcpentry': -X dbag = self.process_dhcp_entry(self.db.getDataBag()) -X elif self.qFile.type == 'staticnatrules' or self.qFile.type == 'forwardrules': -X dbag = self.processForwardingRules(self.db.getDataBag()) -X elif self.qFile.type == 'site2sitevpn': -X dbag = self.process_site2sitevpn(self.db.getDataBag()) -X elif self.qFile.type == 'remoteaccessvpn': -X dbag = self.process_remoteaccessvpn(self.db.getDataBag()) -X elif self.qFile.type == 'vpnuserlist': -X dbag = self.process_vpnusers(self.db.getDataBag()) -X elif self.qFile.type == 'staticroutes': -X dbag = self.process_staticroutes(self.db.getDataBag()) -X elif self.qFile.type == 'ipaliases': -X self.db.setKey('ips') -X self.db.load() -X dbag = self.process_ipaliases(self.db.getDataBag()) -X elif self.qFile.type == 'dhcpconfig': -X logging.error("I don't think I need %s anymore", self.qFile.type) -X return -X else: -X logging.error("Error I do not know what to do with file of type %s", self.qFile.type) -X return -X self.db.save(dbag) -X -X def processGuestNetwork(self, dbag): -X d = self.qFile.data -X dp = {} -X dp['public_ip'] = d['router_guest_ip'] -X dp['netmask'] = d['router_guest_netmask'] -X dp['source_nat'] = False -X dp['add'] = d['add'] -X dp['one_to_one_nat'] = False -X dp['gateway'] = d['router_guest_gateway'] -X dp['nic_dev_id'] = d['device'][3:] -X dp['nw_type'] = 'guest' -X dp = PrivateGatewayHack.update_network_type_for_privategateway(dbag, dp) -X qf = QueueFile() -X qf.load({'ip_address': [dp], 'type': 'ips'}) -X if 'domain_name' not in d.keys() or d['domain_name'] == '': -X d['domain_name'] = "cloudnine.internal" -X -X d = PrivateGatewayHack.update_network_type_for_privategateway(dbag, d) -X return cs_guestnetwork.merge(dbag, d) -X -X def process_dhcp_entry(self, dbag): -X return cs_dhcp.merge(dbag, self.qFile.data) -X -X def process_site2sitevpn(self, dbag): -X return cs_site2sitevpn.merge(dbag, self.qFile.data) -X -X def process_remoteaccessvpn(self, dbag): -X return cs_remoteaccessvpn.merge(dbag, self.qFile.data) -X -X def process_vpnusers(self, dbag): -X return cs_vpnusers.merge(dbag, self.qFile.data) -X -X def process_network_acl(self, dbag): -X return cs_network_acl.merge(dbag, self.qFile.data) -X -X def process_firewallrules(self, dbag): -X return cs_firewallrules.merge(dbag, self.qFile.data) -X -X def process_loadbalancer(self, dbag): -X return cs_loadbalancer.merge(dbag, self.qFile.data) -X -X def process_monitorservice(self, dbag): -X return cs_monitorservice.merge(dbag, self.qFile.data) -X -X def process_staticroutes(self, dbag): -X return cs_staticroutes.merge(dbag, self.qFile.data) -X -X def processVMpassword(self, dbag): -X return cs_vmp.merge(dbag, self.qFile.data) -X -X def processForwardingRules(self, dbag): -X # to be used by both staticnat and portforwarding -X return cs_forwardingrules.merge(dbag, self.qFile.data) -X -X def processIP(self, dbag): -X for ip in self.qFile.data["ip_address"]: -X dbag = cs_ip.merge(dbag, ip) -X return dbag -X -X def processCL(self, dbag): -X # Convert the ip stuff to an ip object and pass that into cs_ip_merge -X # "eth0ip": "192.168.56.32", -X # "eth0mask": "255.255.255.0", -X self.newData = [] -X if (self.qFile.data['cmd_line']['type'] == "router"): -X self.processCLItem('0', "guest") -X self.processCLItem('1', "control") -X self.processCLItem('2', "public") -X elif (self.qFile.data['cmd_line']['type'] == "vpcrouter"): -X self.processCLItem('0', "control") -X elif (self.qFile.data['cmd_line']['type'] == "dhcpsrvr"): -X self.processCLItem('0', "guest") -X self.processCLItem('1', "control") -X elif (self.qFile.data['cmd_line']['type'] == "ilbvm"): -X self.processCLItem('0', "guest") -X self.processCLItem('1', "control") -X -X return cs_cmdline.merge(dbag, self.qFile.data) -X -X def processCLItem(self, num, nw_type): -X key = 'eth' + num + 'ip' -X dp = {} -X if(key in self.qFile.data['cmd_line']): -X dp['public_ip'] = self.qFile.data['cmd_line'][key] -X dp['netmask'] = self.qFile.data['cmd_line']['eth' + num + 'mask'] -X dp['source_nat'] = False -X dp['add'] = True -X dp['one_to_one_nat'] = False -X if nw_type == "public": -X dp['gateway'] = self.qFile.data['cmd_line']['gateway'] -X else: -X if('localgw' in self.qFile.data['cmd_line']): -X dp['gateway'] = self.qFile.data['cmd_line']['localgw'] -X else: -X dp['gateway'] = '' -X dp['nic_dev_id'] = num -X dp['nw_type'] = nw_type -X qf = QueueFile() -X qf.load({'ip_address': [dp], 'type': 'ips'}) -X -X def processVmData(self, dbag): -X cs_vmdata.merge(dbag, self.qFile.data) -X return dbag -X -X def process_ipaliases(self, dbag): -X nic_dev = None -X # Should be a way to deal with this better -X for intf, data in dbag.items(): -X if intf == 'id': -X continue -X elif any([net['nw_type'] == 'guest' for net in data]): -X nic_dev = intf -X break -X -X assert nic_dev is not None, 'Unable to determine Guest interface' -X -X nic_dev_id = nic_dev[3:] -X -X for alias in self.qFile.data['aliases']: -X ip = { -X 'add': not alias['revoke'], -X 'nw_type': 'guest', -X 'public_ip': alias['ip_address'], -X 'netmask': alias['netmask'], -X 'nic_dev_id': nic_dev_id -X } -X dbag = cs_ip.merge(dbag, ip) -X return dbag -X -X -class QueueFile: -X -X fileName = '' -X configCache = "/var/cache/cloud" -X keep = True -X data = {} -X -X def load(self, data): -X if data is not None: -X self.data = data -X self.type = self.data["type"] -X updateDataBag(self) -X return -X filename = '{cache_location}/{json_file}'.format(cache_location=self.configCache, json_file=self.fileName) -X try: -X handle = open(filename) -X except IOError as exception: -X error_message = ("Exception occurred with the following exception error '{error}'. Could not open '{filename}'. " -X "It seems that the file has already been moved.".format(error=exception, filename=filename)) -X logging.error(error_message) -X else: -X logging.info("Continuing with the processing of file '{filename}'".format(filename=filename)) -X -X self.data = json.load(handle) -X self.type = self.data["type"] -X handle.close() -X if self.keep: -X self.__moveFile(filename, self.configCache + "/processed") -X else: -X logging.debug("Processed file deleted: %s and not kept in /processed", filename) -X os.remove(filename) -X updateDataBag(self) -X -X def setFile(self, name): -X self.fileName = name -X -X def getType(self): -X return self.type -X -X def getData(self): -X return self.data -X -X def setPath(self, path): -X self.configCache = path -X -X def __moveFile(self, origPath, path): -X if not os.path.exists(path): -X os.makedirs(path) -X originalName = os.path.basename(origPath) -X if originalName.count(".") == 1: -X originalName += "." + str(uuid.uuid4()) -X zipped_file_name = path + "/" + originalName + ".gz" -X with open(origPath, 'rb') as f_in, gzip.open(zipped_file_name, 'wb') as f_out: -X shutil.copyfileobj(f_in, f_out) -X os.remove(origPath) -X -X logging.debug("Processed file written to %s", zipped_file_name) -X -X -class PrivateGatewayHack: -X -X @classmethod -X def update_network_type_for_privategateway(cls, dbag, data): -X ip = data['router_guest_ip'] if 'router_guest_ip' in data.keys() else data['public_ip'] -X -X initial_data = cls.load_inital_data() -X has_private_gw_ip = cls.if_config_has_privategateway(initial_data) -X private_gw_matches = 'privategateway' in initial_data['config'] and cls.ip_matches_private_gateway_ip(ip, initial_data['config']['privategateway']) -X -X if has_private_gw_ip and private_gw_matches: -X data['nw_type'] = "public" -X logging.debug("Updating nw_type for ip %s" % ip) -X else: -X logging.debug("Not updating nw_type for ip %s because has_private_gw_ip = %s and private_gw_matches = %s " % (ip, has_private_gw_ip, private_gw_matches)) -X return data -X -X @classmethod -X def if_config_has_privategateway(cls, dbag): -X return 'privategateway' in dbag['config'].keys() and dbag['config']['privategateway'] != "None" -X -X @classmethod -X def ip_matches_private_gateway_ip(cls, ip, private_gateway_ip): -X new_ip_matches_private_gateway_ip = False -X if ip == private_gateway_ip: -X new_ip_matches_private_gateway_ip = True -X return new_ip_matches_private_gateway_ip -X -X @classmethod -X def load_inital_data(cls): -X initial_data_bag = DataBag() -X initial_data_bag.setKey('cmdline') -X initial_data_bag.load() -X initial_data = initial_data_bag.getDataBag() -X logging.debug("Initial data = %s" % initial_data) -X -X return initial_data -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/merge.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/merge.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/merge.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/merge.py': 'MD5 check failed' - ) << \SHAR_EOF -dc7c85d58b4e5f38ae61c82679523884 cloud_scripts/opt/cloud/bin/merge.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/merge.py'` -ne 13492 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/merge.py' is not 13492" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/master.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/master.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/master.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/master.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/master.py -M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2!&875L="(I"BAO<'1I -M;VYS+"!A/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/master.py': 'MD5 check failed' - ) << \SHAR_EOF -602ac6725c182da5ffa17760b2fe3ba5 cloud_scripts/opt/cloud/bin/master.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/master.py'` -ne 2040 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/master.py' is not 2040" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/set_redundant.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/set_redundant.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/set_redundant.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/set_redundant.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/set_redundant.py -M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/set_redundant.py': 'MD5 check failed' - ) << \SHAR_EOF -648b240f11d938ebd185d0e2a75004b8 cloud_scripts/opt/cloud/bin/set_redundant.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/set_redundant.py'` -ne 1663 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/set_redundant.py' is not 1663" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/checks2svpn.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checks2svpn.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/checks2svpn.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -if [ -z $1 ] -then -X echo "Fail to find VPN peer address!" -X exit 1 -fi -X -ipsec status vpn-$1 > /tmp/vpn-$1.status -X -cat /tmp/vpn-$1.status | grep "ESTABLISHED" > /dev/null -ipsecok=$? -if [ $ipsecok -ne 0 ] -then -X echo -n "IPsec SA not found;" -X echo "Site-to-site VPN have not connected" -X exit 11 -fi -echo -n "IPsec SA found;" -echo "Site-to-site VPN have connected" -Xexit 0 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/checks2svpn.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checks2svpn.sh': 'MD5 check failed' - ) << \SHAR_EOF -8aed94140f491ae027b3b55e9b1535bb cloud_scripts/opt/cloud/bin/checks2svpn.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checks2svpn.sh'` -ne 1178 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' is not 1178" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, vpn): -X key = vpn['vpn_server_ip'] -X op = vpn['create'] -X if key in dbag.keys() and not op: -X del(dbag[key]) -X else: -X dbag[key] = vpn -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py': 'MD5 check failed' - ) << \SHAR_EOF -9945565c7eb92c9fd9aa85648f8c4352 cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py'` -ne 994 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' is not 994" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_staticroutes.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_staticroutes.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_staticroutes.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, staticroutes): -X for route in staticroutes['routes']: -X key = route['network'] -X dbag[key] = route -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_staticroutes.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py': 'MD5 check failed' - ) << \SHAR_EOF -c89832deefffed1dcc12b367d9f9062e cloud_scripts/opt/cloud/bin/cs_staticroutes.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py'` -ne 952 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' is not 952" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, vpn): -X key = vpn['peer_gateway_ip'] -X op = vpn['create'] -X if key in dbag.keys() and not op: -X del(dbag[key]) -X else: -X dbag[key] = vpn -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py': 'MD5 check failed' - ) << \SHAR_EOF -37138a9d2b00c0cd0488f03f0b1e1c34 cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py'` -ne 996 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' is not 996" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/passwd_server_ip.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/passwd_server_ip.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/passwd_server_ip.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/passwd_server_ip.py -M(R$O=7-R+V)I;B]E;G8@<'ET:&]N"B,@3&EC96YS960@=&\@=&AE($%P86-H -M92!3;V9T=V%R92!&;W5N9&%T:6]N("A!4T8I('5N9&5R(&]N90HC(&]R(&UO -M2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N5]P87-S=V]R9"<@/')O=71E$EN(",L -M($9O2AO3H*("`@("`@("!W:71H(&9I;&4H9V5T4&%S -M&-E<'0@24]%3H* -M("`@("`@("`@("`@=VET:"!F:6QE*&=E=%!A&-E -M<'0@24]%"<*("`@(&1E9B!D;U]'150H5]P87-S=V]R9"7!E(#T]("=S879E9%]P87-S=V]R9"7-L;VR=215%515-47TU%5$A/1"7!E)UTL"B`@("`@("`@("`@("`@ -M("`@("`@?2D*("`@("`@("!S96QF+G-E;F1?7-L;V6EN9R!T;R!S879E('!A7-L;V6EN9R!T;R!S879E('!A7-L -M;V7-L;V7-L;V7,N87)G=BD@/B`Q -M.@H@("`@("`@(&%D9')E7-L -M;V6)O87)D26YT97)R -M=7!T.@H@("`@("`@('-Y7-L;V&-E<'0@17AC97!T:6]N+"!E.@H@("`@("`@('-Y7-L;V&-E<'1I;VX@)7,@+2T@ -M9&EE9"<@)2!E*0H@("`@("`@('!A/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py': 'MD5 check failed' - ) << \SHAR_EOF -1d63c1d8b2e5a6a48d48d76228964aee cloud_scripts/opt/cloud/bin/passwd_server_ip.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py'` -ne 7020 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py' is not 7020" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_network_acl.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_network_acl.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_network_acl.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_network_acl.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_network_acl.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_network_acl.py': 'MD5 check failed' - ) << \SHAR_EOF -79760ec4739cb68a9a8bf86319a2dd65 cloud_scripts/opt/cloud/bin/cs_network_acl.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_network_acl.py'` -ne 881 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_network_acl.py' is not 881" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cleanup.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cleanup.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cleanup.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cleanup.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cleanup.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -#rm -rf $@ && echo $? -X -zip_file=$1 -if [ -e "$zip_file" ]; -then -X rm -rf "$zip_file" -X echo "Deleting diagnostics zip file $zip_file" -else -X echo "File $zip_file not found in vm " -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cleanup.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cleanup.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cleanup.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cleanup.sh': 'MD5 check failed' - ) << \SHAR_EOF -63ca1758ffda6344d2622a21f5fc15b9 cloud_scripts/opt/cloud/bin/cleanup.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cleanup.sh'` -ne 986 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cleanup.sh' is not 986" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_loadbalancer.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_loadbalancer.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_loadbalancer.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import copy -X -X -def merge(dbag, data): -X """ Simply overwrite the existsing bag as, the whole configuration is sent every time """ -X if "rules" not in data: -X return dbag -X dbag['config'] = data['rules'] -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_loadbalancer.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py': 'MD5 check failed' - ) << \SHAR_EOF -667380d51eaa9aade2317d66a11529aa cloud_scripts/opt/cloud/bin/cs_loadbalancer.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py'` -ne 1016 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' is not 1016" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpc_func.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_func.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_func.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_func.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_func.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# @VERSION@ -X -getEthByIp (){ -X local ip=$1 -X for dev in `ls -1 /sys/class/net | grep eth` -X do -X sudo ip addr show dev $dev | grep $ip\/ > /dev/null -X if [ $? -eq 0 ] -X then -X echo $dev -X return 0 -X fi -X done -X return 1 -} -X -getVPCcidr () { -X CMDLINE=$(cat /var/cache/cloud/cmdline) -X for i in $CMDLINE -X do -X # search for foo=bar pattern and cut out foo -X KEY=$(echo $i | cut -d= -f1) -X VALUE=$(echo $i | cut -d= -f2) -X if [ "$KEY" == "vpccidr" ] -X then -X echo "$VALUE" -X return 0 -X fi -X done -X return 1 -} -X -removeRulesForIp() { -X local ip=$1 -X iptables-save -t mangle | grep $ip | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t mangle $rule -X done -X iptables-save -t nat | grep $ip | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t nat $rule -X done -X iptables-save -t filter | grep $ip | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t filter $rule -X done -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_func.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_func.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_func.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_func.sh': 'MD5 check failed' - ) << \SHAR_EOF -bc1b0432818cc40ea79df6720e16ecad cloud_scripts/opt/cloud/bin/vpc_func.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_func.sh'` -ne 1849 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_func.sh' is not 1849" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsDhcp.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsDhcp.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N'0B"D1(0U!?3U!44R`]("(O971C+V1H8W!O<'1S -M+G1X="(*0TQ/541?0T].1B`]("(O971C+V1N"`](#`*("`@("`@("!L:7-T96Y?861D0H@("`@("`@("`@("!G871E=V%Y(#T@ -M)R<*("`@("`@("`@("`@:68@2`](&E;)V=A=&5W -M87DG70H@("`@("`@("`@("!S;&EN92`](")D:&-P+7)A;F=E/7-E=#II;G1E -M"P@9V%T97=A>2D*("`@("`@("`@("`@96QS93H*("`@ -M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UR86YG93US970Z:6YT97)F86-E -M+25S+25S+"5S+'-T871I8R(@)2`H9&5V:6-E+"!I9'@L(&EP*0H@("`@("`@ -M("`@("!S96QF+F-O;F8N"D*("`@("`@("`@("`@;&EN92`](")D:&-P+6]P -M=&EO;CUT86"P@9VXN9V5T7V1O;6%I;B@I*0H@("`@("`@("`@("!S96QF+F-O;F8N"!F;W(@>"!I;B!G;BYG971?9&YS*"D@:68@>%T*("`@ -M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C -M92TE"P@)RPG+FIO:6XH9&YS7VQI -M2`A/2`G,"XP+C`N,""D*("`@("`@("`@("`@("`@ -M(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C92TE"P@9V%T97=A>2D*("`@("`@("`@("`@("`@('-E -M;&8N8V]N9BYS96%R8V@H"P@;F5T;6%S:RD*("`@("`@("`@("`@"`K/2`Q"@H@("`@("`@(",@ -M3&ES=&5N($%D9')E3H*("`@ -M("`@("`@("`@;&]G9VEN9RYI;F9O*")!='1E;7!T:6YG('1O(&1E;&5T92!E -M;G1R:65S(&9R;VT@9&YS;6%S<2YL96%S97,@9FEL92!F;W(@5DUS('=H:6-H -M(&%R92!N;W0@;VX@9&AC<&AOW!R:6YT("0S?22DZ"B`@("`@("`@5LG:7!V-%]A -M9&1R97-S)UTL(&5N=')Y6R=H;W-T7VYA;64G72D*("`@("`@("`C($QE87-E -M('1I;64@'!U;F=E9"P@:71S(&%C=&EV -M92!L96%S92!A;F0@1$A#4"]$3E,@8V]N9FEG(&ES('!R;W!E2!I2!R=6YN:6YG(&EN('!R;V1U8W1I;VYS -M('-Y5LG:7!V-%]A9&1R -M97-S)UTL"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@ -M("`@("`@("`@("`@("!E;G1R>5LG:&]S=%]N86UE)UTL"B`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!L96%S -M92DI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L)7,B("4@ -M*'1A9RP@,RDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L -M)7,B("4@*'1A9RP@-BDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D -M9"@B)7,L)7,B("4@*'1A9RP@,34I*0H*("`@("`@("!I(#T@25!!9&1R97-S -M*&5N=')Y6R=I<'8T7V%D9')E2==(#T@96YT2=="@H@("`@9&5F(&%D9%]H;W-T*'-E;&8L(&EP+"!H;W-T -M/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py': 'MD5 check failed' - ) << \SHAR_EOF -bcf1831b38d86bf041523540fa8f821e cloud_scripts/opt/cloud/bin/cs/CsDhcp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py'` -ne 8809 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' is not 8809" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsRedundant.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsRedundant.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N7,N2`](%1R=64*"B`@ -M("`@("`@:68@;F]T(&ES1&5V:6-E4F5A9'DZ"B`@("`@("`@("`@(&QO9V=I -M;F5]I9E]N965D960H"B`@("`@("`@("`@("(E&5C("1$045-3TX@+2T@+2UVR(L(")](BP@6PH@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("`@("(@("`@("`@(&%U=&A?='EP92!!2"!< -M;B(L("(@("`@("`@(&%U=&A?<&%S2AC;VYN=')A8VMD7W1E;7!L871E7V-O;F8L(&-O;FYT0H@("`@("`@("(B(@H@("`@("`@(&ET97)A=&EO;G,@ -M/2`Q,`H@("`@("`@('1I;65?8F5T=V5E;B`](#$*"B`@("`@("`@9F]R(&ET -M97(@:6X@3H* -M("`@("`@("`@("`@("`@(',@/2!S;V-K970N2!R=6YN:6YG("@E9#HE2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I<"@I*2YS=&]P*"D* -M"B`@("`@("`@0W-(96QP97(N2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@ -M("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")!9&1I;F<@9V%T97=A>2`]/3X@ -M)7,@=&\@9&5V:6-E(#T]/B`E2P@9&5V*2D*("`@("`@ -M("`@("`@("`@("`@("!I9B!D978@/3T@0W-(96QP97(N4%5"3$E#7TE.5$52 -M1D%#15-;&5C -M=71E*"(E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I -M<"@I*2YR97-T87)T*"D*"B`@("`@("`@0W-(96QP97(N2D*"B`@("`@("`@("`@(",@5&AE(&9I -M2!I;G1E2!V'1E2!E=F5R(&)E(&]N92!A9&1R97-S(&EN -M(&$@5E!#('1H97)E(&-A;B!B92!M86YY"B`@("`@("`@5&AE(&YE=R!C;V1E -M(&%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py': 'MD5 check failed' - ) << \SHAR_EOF -6936e38f53736f7c5a04b255800a242d cloud_scripts/opt/cloud/bin/cs/CsRedundant.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py'` -ne 16789 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' is not 16789" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsHelper.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsHelper.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsHelper.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsHelper.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B -M971H,2)]"@I35$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S -M:"`M8R`@)VEF(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@ -M96QS92!E8VAO(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@ -M(")V<&-R;W5T97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@ -M6R`D,"`]/2!<(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ -M"B`@("`@("`@("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@ -M("`@("`@(&-M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@ -M("`@("`@;&]G9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S -M(B`E('-T871E7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X -M96-U=&4H7!E*"E=(&%N9"!S -M=&%T92`]/2`B34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE -M8W5T92AC;60I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ -M("`@("`@(&5X96-U=&4H8VUD*0H*"F1E9B!I&5C=71E -M*")M;W5N="!T;7!F6XH=F%L*3H*("`@(&EF('9A;#H* -M("`@("`@("!R971U&5C=71E*")I<"!A9&1R('-H;W<@ -M?&=R97`@+78@WT*("`@("`@("`@("`@ -M=&];)VEP)UT@/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A -M;'-;+3%="B`@("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@ -M("(B(@H@("`@9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G -M*")3879I;F<@:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C -M=71E*")S>7-T96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I -M;F7-T96UC=&P@&5C=71E*")K:6QL -M("U(55`@)7,B("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D -M;G-M87-Q(BP@(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py': 'MD5 check failed' - ) << \SHAR_EOF -9bdd1fdfea8177d3e408b2cc87e5d503 cloud_scripts/opt/cloud/bin/cs/CsHelper.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py'` -ne 7644 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' is not 7644" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5NWT*("`@("`@("!S96QF+F=U97-T(#T@5')U90H@("`@("`@ -M(&1B(#T@1&%T84)A9R@I"B`@("`@("`@9&(N7,H*2!A;F0@;&5N*&1B86=;9&5V:6-E -M72D@(3T@,#H*("`@("`@("`@("`@2==*0H*("`@ -M("`@("!I9B`G9&YS)R!I;B!S96QF+F1A=&$Z"B`@("`@("`@("`@(&1N'1E;F0H&-E<'1I;VXN"B`@("`@("`@:68@)W)O -M=71E"!I="!P2X@22!J=7-T(&%D -M9&5D('1H92!I9BP@87,@26%N(&1I9"!I;B!S;VUE(&]T:&5R(&9I;&5S+"!T -M;R!A=F]I9"!T:&4@97AC97!T:6]N+@H@("`@("`@(&EF("=R;W5T97)?9W5E -M2<@:6X@2=="B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py': 'MD5 check failed' - ) << \SHAR_EOF -98c84f4067412f263891f8293f185243 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py'` -ne 2545 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' is not 2545" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsMonitor.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N"!I;B!S96QF+F1B86=;)V-O;F9I9R==+G-P;&ET*"WT*("`@("`@("!H8U]D871A6R)H96%L=&A?8VAE8VMS7V)A&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!S96QF+F1B -M86&-L=61E9%]H96%L=&A?8VAE8VMS(ET@/2!;70H* -M("`@("`@("!I9B`B:&5A;'1H7V-H96-K/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py': 'MD5 check failed' - ) << \SHAR_EOF -d8f5dcf496dbc6d8508e40b906f48245 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py'` -ne 3681 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' is not 3681" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@ -M("`@("!S96QF+FQA2!E>&ES=',Z(')U;&4] -M)7,@=&%B;&4])7,@8VAA:6X])7,B+"!N97=?2`](&-P>2YR97!L86-E*"(M02`E&5C=71E,B@B:7!T86)L97,@+70@)7,@ -M)7,B("4@*&YE=U]R=6QE+F=E=%]T86)L92@I+"!C<'DI*0H@("`@("`@("`@ -M("`@("`@(R!4:&5R92!A"!I;B!T:&4@ -M9G)A;65W;W)K+@H@("`@("`@("`@("`@("`@:68@&5C=71E*")I<'1A8FQE7!E(#T@0W-#;61,:6YE*")C;61L:6YE(BDN9V5T7W1Y<&4H*0H* -M("`@("`@("!T7!E*3H*("`@("`@("`@("`@("`@(&EF(&DNFEP*&)I='-;,#HZ,ETL(&)I='-;,3HZ,ETI*0H@("`@("`@(&EF -M("(M02(@:6X@2!C;W)R96-T(&EP=&%B;&5S(&-O;6UA -M;F0@(B(B"B`@("`@("`@(R!/7,H*3H*("`@("`@("`@("`@("`@('!R:6YT86)L92`] -M(&LN=7)N($9A;'-E"B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py': 'MD5 check failed' - ) << \SHAR_EOF -7456b53eba9f115f9ad344bc1c01611d cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py'` -ne 11100 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' is not 11100" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsRoute.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRoute.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRoute.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import CsHelper -import logging -X -X -class CsRoute: -X -X """ Manage routes """ -X -X def __init__(self): -X self.table_prefix = "Table_" -X -X def get_tablename(self, name): -X return self.table_prefix + name -X -X def add_table(self, devicename): -X tablenumber = 100 + int(devicename[3:]) -X tablename = self.get_tablename(devicename) -X str = "%s %s" % (tablenumber, tablename) -X filename = "/etc/iproute2/rt_tables" -X logging.info("Adding route table: " + str + " to " + filename + " if not present ") -X if not CsHelper.definedinfile(filename, str): -X CsHelper.execute("sudo echo " + str + " >> /etc/iproute2/rt_tables") -X # remove "from all table tablename" if exists, else it will interfer with -X # routing of unintended traffic -X if self.findRule("from all lookup " + tablename): -X CsHelper.execute("sudo ip rule delete from all table " + tablename) -X -X def flush_table(self, tablename): -X CsHelper.execute("ip route flush table %s" % (tablename)) -X CsHelper.execute("ip route flush cache") -X -X def add_route(self, dev, address): -X """ Wrapper method that adds table name and device to route statement """ -X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 -X table = self.get_tablename(dev) -X -X if not table or not address: -X empty_param = "table" if not table else "address" -X logging.info("Empty parameter received %s while trying to add route, skipping" % empty_param) -X else: -X logging.info("Adding route: dev " + dev + " table: " + -X table + " network: " + address + " if not present") -X cmd = "default via %s table %s proto static" % (address, table) -X self.set_route(cmd) -X -X def add_network_route(self, dev, address): -X """ Wrapper method that adds table name and device to route statement """ -X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 -X table = self.get_tablename(dev) -X -X if not table or not address: -X empty_param = "table" if not table else "address" -X logging.info("Empty parameter received %s while trying to add network route, skipping" % empty_param) -X else: -X logging.info("Adding route: dev " + dev + " table: " + -X table + " network: " + address + " if not present") -X cmd = "throw %s table %s proto static" % (address, table) -X self.set_route(cmd) -X -X def set_route(self, cmd, method="add"): -X """ Add a route if it is not already defined """ -X found = False -X search = cmd -X if "throw" in search: -X search = search.replace("throw", "") -X for i in CsHelper.execute("ip route show " + search): -X found = True -X if not found and method == "add": -X logging.info("Add " + cmd) -X cmd = "ip route add " + cmd -X elif found and method == "delete": -X logging.info("Delete " + cmd) -X cmd = "ip route delete " + cmd -X else: -X return -X CsHelper.execute(cmd) -X -X def add_defaultroute(self, gateway): -X """ Add a default route -X :param str gateway -X :return: bool -X """ -X if not gateway: -X raise Exception("Gateway cannot be None.") -X -X if self.defaultroute_exists(): -X return False -X else: -X cmd = "default via " + gateway -X logging.info("Adding default route") -X self.set_route(cmd) -X return True -X -X def defaultroute_exists(self): -X """ Return True if a default route is present -X :return: bool -X """ -X logging.info("Checking if default ipv4 route is present") -X route_found = CsHelper.execute("ip -4 route list 0/0") -X -X if len(route_found) > 0: -X logging.info("Default route found: " + route_found[0]) -X return True -X else: -X logging.warn("No default route found!") -X return False -X -X def findRule(self, rule): -X for i in CsHelper.execute("ip rule show"): -X if rule in i.strip(): -X return True -X return False -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRoute.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py': 'MD5 check failed' - ) << \SHAR_EOF -4f2109aa1d89157e14817f90c676c2d3 cloud_scripts/opt/cloud/bin/cs/CsRoute.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py'` -ne 4989 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' is not 4989" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py -M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2==*0H@("`@("`@("`@ -M("!#&5C=71E*&-O;6UA;F0I"B`@("`@("`@96QS93H*("`@ -M("`@("`@("`@8V]M;6%N9"`](")I<"!R;W5T92!S:&]W('P@9W)E<"`EW!R:6YT("0Q+"`D,WTG(B`E(')O=71E6R=N971W;W)K)UT*("`@ -M("`@("`@("`@2==*0H@("`@("`@("`@("`@ -C("`@0W-(96QP97(N97AE8W5T92AR;W5T95]C;VUM86YD*0H@ -` -end -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py': 'MD5 check failed' - ) << \SHAR_EOF -f9f9db3a4543397153d69a62551a6c8c cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py'` -ne 1655 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' is not 1655" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N7,H*3H* -M("`@("`@("`@("`@"YS<&QI="@G7&XG*5T*"B`@("`@("`@9FEL -M93$N8V]M;6ET*"D*("`@("`@("!F:6QE,B`]($-S1FEL92A(05!23UA97T-/ -M3D9?4"D*("`@("`@("!I9B!N;W0@9FEL93(N8V]M<&%R92AF:6QE,2DZ"B`@ -M("`@("`@("`@($-S2&5L<&5R+F-O<'DH2$%04D]865]#3TY&7U0L($A!4%)/ -M6%E?0T].1E]0*0H*("`@("`@("`@("`@<')O8R`]($-S4')O8V5S2YP:60G72D*("`@("`@("`@("`@:68@;F]T('!R;V,N9FEN -M9"@I.@H@("`@("`@("`@("`@("`@;&]G9VEN9RYD96)U9R@B0W-,;V%D0F%L -M86YC97(Z.B!W:6QL(')E2$B*0H@("`@("`@("`@("`@ -M("`@0W-(96QP97(N2(L(")R97-T87)T(BD*("`@ -M("`@("`@("`@96QS93H*("`@("`@("`@("`@("`@(&QO9V=I;F2$B*0H@("`@ -M("`@("`@("`@("`@0W-(96QP97(N2(L(")R96QO -M860B*0H*("`@("`@("!A9&1?/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py': 'MD5 check failed' - ) << \SHAR_EOF -8f93571ff9b8f21c947e90193c3efa38 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py'` -ne 3393 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' is not 3393" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsApp.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsApp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsApp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsApp.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G -M871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG971?='EP92@I"B`@ -M("`@("`@5]I9E]N965D -M960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L"B`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE,B]S:71E2DI"B`@("`@("`@ -M("`@(&9I;&4N&5C=71E,B@B/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsApp.py': 'MD5 check failed' - ) << \SHAR_EOF -fa071a9d58a918b6a9d5e09ae10e3e11 cloud_scripts/opt/cloud/bin/cs/CsApp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsApp.py'` -ne 4159 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' is not 4159" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsFile.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsFile.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsFile.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import logging -import re -import copy -X -X -class CsFile: -X """ File editors """ -X -X def __init__(self, filename): -X self.filename = filename -X self.load() -X -X def load(self): -X self.new_config = [] -X self.config = [] -X try: -X for line in open(self.filename): -X self.new_config.append(line) -X except IOError: -X logging.debug("File %s does not exist" % self.filename) -X else: -X logging.debug("Reading file %s" % self.filename) -X self.config = list(self.new_config) -X -X def is_changed(self): -X if set(self.config) != set(self.new_config): -X return True -X else: -X return False -X -X def __len__(self): -X return len(self.config) -X -X def empty(self): -X self.config = [] -X self.new_config = [] -X -X def repopulate(self): -X self.new_config = [] -X -X def commit(self): -X if not self.is_changed(): -X logging.info("Nothing to commit. The %s file did not change" % self.filename) -X return False -X handle = open(self.filename, "w+") -X for line in self.new_config: -X handle.write(line) -X handle.close() -X logging.info("Wrote edited file %s" % self.filename) -X self.config = list(self.new_config) -X logging.info("Updated file in-cache configuration") -X return True -X -X def dump(self): -X for line in self.new_config: -X print line -X -X def addeq(self, string): -X """ Update a line in a file of the form token=something -X match on token= and replace something if needed -X Add line if token is not present -X """ -X token = string.split('=')[0] + '=' -X self.search(token, string) -X -X def append(self, string, where=-1): -X if where == -1: -X self.new_config.append("%s\n" % string) -X else: -X self.new_config.insert(where, "%s\n" % string) -X -X def add(self, string, where=-1): -X for index, line in enumerate(self.new_config): -X if line.strip() == string: -X return False -X if where == -1: -X self.new_config.append("%s\n" % string) -X else: -X self.new_config.insert(where, "%s\n" % string) -X return True -X -X def section(self, start, end, content): -X sind = -1 -X eind = -1 -X found = False -X for index, line in enumerate(self.new_config): -X if found and line.strip() == end: -X eind = index -X found = False -X if line.strip() == start: -X sind = index + 1 -X found = True -X if sind == -1: -X content.insert(0, start + "\n") -X content.append(end + "\n") -X self.new_config[sind:eind] = content -X -X def greplace(self, search, replace): -X logging.debug("Searching for %s and replacing with %s" % (search, replace)) -X self.new_config = [w.replace(search, replace) for w in self.new_config] -X -X def replaceIfFound(self, search, replace): -X found = False -X replace_filtered = replace -X if re.search("PSK \"", replace): -X replace_filtered = re.sub(r'".*"', '"****"', replace) -X logging.debug("Searching for %s and replacing with %s if found" % (search, replace_filtered)) -X for index, line in enumerate(self.new_config): -X if line.lstrip().startswith("#"): -X continue -X if re.search(search, line): -X if replace not in line: -X self.new_config[index] = replace + "\n" -X return False -X -X def search(self, search, replace): -X found = False -X replace_filtered = replace -X if re.search("PSK \"", replace): -X replace_filtered = re.sub(r'".*"', '"****"', replace) -X logging.debug("Searching for %s and replacing with %s" % (search, replace_filtered)) -X for index, line in enumerate(self.new_config): -X if line.lstrip().startswith("#"): -X continue -X if re.search(search, line): -X found = True -X if replace not in line: -X self.new_config[index] = replace + "\n" -X if not found: -X self.new_config.append(replace + "\n") -X return True -X return False -X -X def searchString(self, search, ignoreLinesStartWith): -X found = False -X logging.debug("Searching for %s string " % search) -X -X for index, line in enumerate(self.new_config): -X print ' line = ' + line -X if line.lstrip().startswith(ignoreLinesStartWith): -X continue -X if search in line: -X found = True -X break -X -X return found -X -X def deleteLine(self, search): -X found = False -X logging.debug("Searching for %s to remove the line " % search) -X temp_config = [] -X for index, line in enumerate(self.new_config): -X if line.lstrip().startswith("#"): -X continue -X if search not in line: -X temp_config.append(line) -X -X self.new_config = list(temp_config) -X -X def compare(self, o): -X result = (isinstance(o, self.__class__) and set(self.config) == set(o.config)) -X logging.debug("Comparison of CsFiles content is ==> %s" % result) -X return result -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsFile.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsFile.py': 'MD5 check failed' - ) << \SHAR_EOF -81531ddee205a5eb66bb44f400ab222c cloud_scripts/opt/cloud/bin/cs/CsFile.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsFile.py'` -ne 6133 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' is not 6133" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/__init__.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/__init__.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/__init__.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/__init__.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/__init__.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/__init__.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/__init__.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/__init__.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/__init__.py': 'MD5 check failed' - ) << \SHAR_EOF -33215d440d5ba5fa95b1ffa035d769e2 cloud_scripts/opt/cloud/bin/cs/__init__.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/__init__.py'` -ne 785 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/__init__.py' is not 785" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsAddress.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsAddress.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsAddress.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsAddress.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N`H@("`@("`@("`@("`@("`@("`@ -M(&=U97-T7VEN=&5R9F%C92`](&EN=&5R9F%C90H@("`@("`@("`@("`@("`@ -M("`@(&QO9V=I;F2!C;VYF:6=U2AS96QF*3H*("`@("`@("!I -M9B!S96QF+F-O;F9I9RYI2(I -M"B`@("`@("`@96QS93H*("`@("`@("`@("`@2@I+"!S96QF+F=E=%]S -M:7IE*"DI"@H@("`@9&5F(&=E=%]S:7IE*'-E;&8I.@H@("`@("`@("(B(B!2 -M971U7!E -M(B!I;B!S96QF+F%D9')E"@Q,#`@*R!I;G0H9&5V6S,Z72DI -M"B`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@("`@97AC97!T($5X8V5P=&EO;B!A -M&-E<'1I;VX@ -M;V-C=7)R960@/3T^("5S(B`E(&4I"@H@("`@("`@("`@("!S96QF+G!O7!E*"D@:6X@6R)C;VYT7!E*"D@:6X@ -M6R=P=6)L:6,G73H*("`@("`@("`@("`@("`@('-E;&8N7!E*"E=.@H@("`@("`@ -M("`@("`@("`@9V%T97=A>2`]('-T2@I*3H* -M("`@("`@("`@("`@("`@(')O=71E+F%D9%]D969A=6QT2@I*0H*("`@(&1E9B!S971?;6%R:RAS96QF*3H*("`@ -M("`@("!C;60@/2`B+4$@4%)%4D]55$E.1R`M:2`E7!E(&]F('1H92!)4`H@("`@("`@(&=U97-T"B`@("`@("`@8V]N -M=')O;`H@("`@("`@('!U8FQI8PH@("`@("`@("(B(@H@("`@("`@(&EF(")N -M=U]T>7!E(B!I;B!S96QF+F%D9')E&9F9F9F9F9F -M("TM8W1M87-K(#!X9F9F9F9F9F8B72D*"B`@("`@("`@&UA7!E*"D@:6X@6R)G=65S=")=.@H@("`@("`@("`@("!G=65S -M=$YE='=O&9F9F9F9F9F(ETI"B`@ -M("`@("`@("`@(&=U97-T3F5T=V]R:T-I9'(@/2!S96QF+F%D9')E#4R-2\P>&9F9F9F9F9F(B`E -M("AS96QF+F1E=BP@2)=("$](").;VYE(CH* -M("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@("`@("`@:68@ -M(FYE='=O7!E*"D@:6X@6R)P=6)L:6,B -M72!A;F0@(F=A=&5W87DB(&EN('-E;&8N861D2)=("$] -M(").;VYE(CH*("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@ -M("`@("`@("`@(&9O7!E(B!I;B!A9&1R97-S(&%N9"!A -M9&1R97-S6R)N=U]T>7!E(ET@/3T@(F=U97-T(CH*("`@("`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("!R;W5T92YA9&1?;F5T=V]R:U]R;W5T92AS96QF -M+F1E=BP@&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A8VAE(BD*"B`@("`@("`@ -M96QI9B!M971H;V0@/3T@(F1E;&5T92(Z"B`@("`@("`@("`@(",@=')E870@ -M=&AE(&QA&5C=71E*")S=61O(&EP(')U;&4@9&5L971E('1A8FQE("(@*R!T86)L94YA -M;64I"B`@("`@("`@("`@("`@("!#&5C=71E*")S=61O(&EP -M(')O=71E(&9L=7-H('1A8FQE("(@*R!T86)L94YA;64I"B`@("`@("`@("`@ -M("`@("!#&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A -M8VAE(BD*("`@("`@("`@("`@("`@($-S4G5L92AS96QF+F1E=BDN9&5L36%R -M:R@I"@H@("`@("`@('-E;&8N9G=?7!E('=I;&P@ -M;F\@;&]N9V5R(&)E(&MN;W=N"B`@("`@("`@:68@7!E*"D@/3T@(G!U8FQI8R(@86YD('-E;&8N8V]N9FEG+FES7W9P8R@I -M(&%N9"!M971H;V0@/3T@(F%D9"(Z"B`@("`@("`@("`@(&EF('-E;&8N861D -M7,H*3H*("`@("`@("`@ -M("`@7!E)UT@:6X@5E)2 -M4%]465!%4SH*("`@("`@("`@("`@7!E(B!I;B!S96QF+F%D9')E&5C=71E,BAC;60L($9A -M;'-E*0H*("`@(",@1&5L971E(&%N>2!I<',@=&AA="!A7,H*2!O2AS96QF+"!B862!F;W(@ -M7,O8VQA"TP+W)P&-E<'0@24]%/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py': 'MD5 check failed' - ) << \SHAR_EOF -5cebbbd106abd3eba7ee0e4d23277dda cloud_scripts/opt/cloud/bin/cs/CsAddress.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py'` -ne 29236 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' is not 29236" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsProcess.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsProcess.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsProcess.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import os -import re -import CsHelper -import logging -X -X -class CsProcess(object): -X """ Manipulate processes """ -X -X def __init__(self, search): -X self.search = search -X -X def start(self, thru, background=''): -X # if(background): -X # cmd = cmd + " &" -X logging.info("Started %s", " ".join(self.search)) -X os.system("%s %s %s" % (thru, " ".join(self.search), background)) -X -X def kill_all(self): -X pids = self.find_pid() -X for p in pids: -X CsHelper.execute("kill -9 %s" % p) -X -X def find_pid(self): -X self.pid = [] -X for i in CsHelper.execute("ps aux"): -X items = len(self.search) -X proc = re.split(r"\s+", i)[items*-1:] -X matches = len([m for m in proc if m in self.search]) -X if matches == items: -X self.pid.append(re.split(r"\s+", i)[1]) -X -X logging.debug("CsProcess:: Searching for process ==> %s and found PIDs ==> %s", self.search, self.pid) -X return self.pid -X -X def find(self): -X has_pid = len(self.find_pid()) > 0 -X return has_pid -X -X def kill(self, pid): -X if pid > 1: -X CsHelper.execute("kill -9 %s" % pid) -X -X def grep(self, str): -X for i in CsHelper.execute("ps aux"): -X if i.find(str) != -1: -X return re.split(r"\s+", i)[1] -X return -1 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsProcess.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py': 'MD5 check failed' - ) << \SHAR_EOF -75a4650fe1e521049e80d32a022d8689 cloud_scripts/opt/cloud/bin/cs/CsProcess.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py'` -ne 2156 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' is not 2156" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsConfig.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsConfig.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsConfig.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsConfig.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N7!E*"D@/3T@)W9P8W)O=71E'1D;G,H'1D;G,G+"`G9F%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py': 'MD5 check failed' - ) << \SHAR_EOF -836541a5b9cb1b2f9df5dad6bb806745 cloud_scripts/opt/cloud/bin/cs/CsConfig.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py'` -ne 3179 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' is not 3179" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsDatabag.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@("`@ -M("!S96QF+F1B(#T@1&%T84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF -M+F1B+G-A=F4HWT*("`@("`@("!R971U&1I9V5S="@I"@H@("`@ -M9&5F(&=E=%]G871E=V%Y*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I -M;B!S96QF+FED871A*"DZ"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A -M*"E;)V=A=&5W87DG70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G -M971?=7-E7V5X=%]D;G,H'1D;G,G70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E -M9B!G971?861V97)T7VEN="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN -M="<@:6X@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py': 'MD5 check failed' - ) << \SHAR_EOF -9e4de6e0a115a5e806e80dc151769b21 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py'` -ne 4808 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' is not 4808" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsRule.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRule.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRule.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import CsHelper -import logging -X -X -class CsRule: -X """ Manage iprules -X Supported Types: -X fwmark -X """ -X -X def __init__(self, dev): -X self.dev = dev -X self.tableNo = 100 + int(dev[3:]) -X self.table = "Table_%s" % (dev) -X -X def addRule(self, rule): -X if not self.findRule(rule + " lookup " + self.table): -X cmd = "ip rule add " + rule + " table " + self.table -X CsHelper.execute(cmd) -X logging.info("Added rule %s for %s" % (cmd, self.table)) -X -X def findRule(self, rule): -X for i in CsHelper.execute("ip rule show"): -X if rule in i.strip(): -X return True -X return False -X -X def addMark(self): -X if not self.findMark(): -X cmd = "ip rule add fwmark %s table %s" % (self.tableNo, self.table) -X CsHelper.execute(cmd) -X logging.info("Added fwmark rule for %s" % (self.table)) -X -X def delMark(self): -X if self.findMark(): -X cmd = "ip rule delete fwmark %s table %s" % (self.tableNo, self.table) -X CsHelper.execute(cmd) -X logging.info("Deleting fwmark rule for %s" % (self.table)) -X -X def findMark(self): -X srch = "from all fwmark %s lookup %s" % (hex(self.tableNo), self.table) -X for i in CsHelper.execute("ip rule show"): -X if srch in i.strip(): -X return True -X return False -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRule.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRule.py': 'MD5 check failed' - ) << \SHAR_EOF -78748432f1ac57194339aef8bdb7c9f8 cloud_scripts/opt/cloud/bin/cs/CsRule.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRule.py'` -ne 2192 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' is not 2192" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vmdata.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vmdata.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vmdata.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vmdata.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/vmdata.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&ET*#(I -M"@H@("`@9F]R(&EP(&EN(&IS;VY?9&%T83H*("`@("`@("!F;W(@:71E;2!I -M;B!J2!V86QI9"!D -M871A"B`@("`@("`@("`@(&EF(&9O;&1E&ES=',H;65T -M86UA;FEF97-T*3H*("`@("`@("!O2Q!;&QO=UQN1&5N -M>2!F&-E<'0@3U-%2!E>&ES=',L('=E(&1O(&ET('1H:7,@=V%Y(&9O -M7,N97AI="@Q*0H*("`@(&9H(#T@;W!E;BAH -M=&%C8V5S2`K("=<;B&9L;V-K*&9I;&4I.@H@("`@=')Y.@H@("`@("`@(&9L;V-K -M*&9I;&4L($Q/0TM?15@I"B`@("!E>&-E<'0@24]%7,N97AI="@Q -M*0H@("`@3H*("`@("`@("!F;&]C:RAF:6QE+"!,3T-+7U5.*0H@("`@97AC97!T($E/ -M17)R;W(@87,@93H*("`@("`@("!P7,N97AI="@Q*0H@("`@7,N87)G=ELQ.ETI"FYA -` -end -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vmdata.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vmdata.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vmdata.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vmdata.py': 'MD5 check failed' - ) << \SHAR_EOF -f585277ddefb989a0662db609bc199c7 cloud_scripts/opt/cloud/bin/vmdata.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vmdata.py'` -ne 4723 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vmdata.py' is not 4723" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/get_diagnostics_files.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/get_diagnostics_files.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/get_diagnostics_files.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' && -#!/usr/bin/env python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import logging -import os -import re -import shlex -import subprocess as sp -import sys -import time -import zipfile -X -X -# Create zip archive and append files for retrieval -def zip_files(files): -X fList = files -X compression = zipfile.ZIP_DEFLATED -X time_str = time.strftime("%Y%m%d-%H%M%S") -X zf_name = '/root/diagnostics_files_' + time_str + '.zip' -X zf = zipfile.ZipFile(zf_name, 'w', compression) -X -X ''' -X Initialize 3 empty arrays to collect found files, non-existent files -X and last one to collect temp files to be cleaned up when script exits -X ''' -X files_found_list = [] -X files_not_found_list = [] -X files_from_shell_commands = [] -X -X try: -X for f in fList: -X f = f.strip() -X -X if f in ('iptables', 'ipaddr', 'iprule', 'iproute'): -X f = execute_shell_script(f) -X files_from_shell_commands.append(f) -X -X if len(f) > 3 and f.startswith('[') and f.endswith(']'): -X f = execute_shell_script(f[1:-1]) -X files_from_shell_commands.append(f) -X -X if os.path.isfile(f): -X try: -X zf.write(f, f[f.rfind('/') + 1:]) -X except OSError or RuntimeError as e: -X files_not_found_list.append(f) -X else: -X files_found_list.append(f) -X finally: -X cleanup(files_from_shell_commands) -X generate_retrieved_files_txt(zf, files_found_list, files_not_found_list) -X zf.close() -X print zf_name -X -X -def get_cmd(script): -X if script is None or len(script) == 0: -X return None -X -X cmd = None -X if script == 'iptables': -X cmd = 'iptables-save' -X elif script == 'ipaddr': -X cmd = 'ip address' -X elif script == 'iprule': -X cmd = 'ip rule list' -X elif script == 'iproute': -X cmd = 'ip route show table all' -X else: -X cmd = '/opt/cloud/bin/' + script -X if not os.path.isfile(cmd.split(' ')[0]): -X cmd = None -X -X return cmd -X -X -def execute_shell_script(script): -X script = script.strip() -X outputfile = script + '.log' -X -X with open(outputfile, 'wb', 0) as f: -X try: -X cmd = get_cmd(script) -X if cmd is None: -X f.write('Unable to generate command for ' + script + ', perhaps missing file') -X else: -X p = sp.Popen(cmd, shell=True, stdout=sp.PIPE, stderr=sp.PIPE) -X stdout, stderr = p.communicate() -X return_code = p.returncode -X if return_code is 0: -X f.write(stdout) -X else: -X f.write(stderr) -X except OSError as ex: -X delete_tmp_file_cmd = 'rm -f %s' % outputfile -X sp.check_call(shlex.split(delete_tmp_file_cmd)) -X finally: -X f.close() -X return outputfile -X -X -def cleanup(file_list): -X files = ' '.join(file_list) -X cmd = 'rm -f %s' % files -X try: -X p = sp.Popen(shlex.split(cmd), stderr=sp.PIPE, stdout=sp.PIPE) -X p.communicate() -X except OSError as e: -X logging.debug("Failed to execute bash command") -X -X -def generate_retrieved_files_txt(zip_file, files_found, files_not_found): -X output_file = 'fileinfo.txt' -X try: -X with open(output_file, 'wb', 0) as man: -X for i in files_found: -X man.write(i + '\n') -X for j in files_not_found: -X man.write(j + 'File Not Found!!\n') -X zip_file.write(output_file, output_file) -X finally: -X cleanup_cmd = "rm -f %s" % output_file -X sp.check_call(shlex.split(cleanup_cmd)) -X -X -if __name__ == '__main__': -X fileList = sys.argv[1:] -X zip_files(fileList) -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/get_diagnostics_files.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py': 'MD5 check failed' - ) << \SHAR_EOF -f8b91c14af848f14696aa2c1193b0907 cloud_scripts/opt/cloud/bin/get_diagnostics_files.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py'` -ne 4478 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' is not 4478" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/checkrouter.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checkrouter.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checkrouter.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/checkrouter.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checkrouter.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -STATUS=UNKNOWN -X -if [ "$(systemctl is-active keepalived)" != "active" ] -then -X echo "Status: FAULT" -X exit -fi -X -ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g') -if [ "$ROUTER_TYPE" = "router" ] -then -X ROUTER_STATE=$(ip addr show dev eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi') -X STATUS=$ROUTER_STATE -else -X ROUTER_STATE=$(ip addr show dev eth1 | grep state | awk '{print $9;}') -X if [ "$ROUTER_STATE" = "UP" ] -X then -X STATUS=MASTER -X elif [ "$ROUTER_STATE" = "DOWN" ] -X then -X STATUS=BACKUP -X fi -fi -X -echo "Status: ${STATUS}" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checkrouter.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/checkrouter.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/checkrouter.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checkrouter.sh': 'MD5 check failed' - ) << \SHAR_EOF -b107b37bc85a7036ef9f4e81cf4ae8b2 cloud_scripts/opt/cloud/bin/checkrouter.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checkrouter.sh'` -ne 1445 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checkrouter.sh' is not 1445" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/ilb.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ilb.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ilb.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/ilb.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/ilb.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s: -a -d -f -s \n" $(basename $0) >&2 -} -X -#set -x -X -fw_remove_backup() { -X logger -t cloud "$(basename $0): Entering fw_remove_backup" -X local lb_vif_list=eth0 -X for vif in $lb_vif_list; do -X sudo iptables -F back_load_balancer_$vif 2> /dev/null -X sudo iptables -D INPUT -i $vif -p tcp -j back_load_balancer_$vif 2> /dev/null -X sudo iptables -X back_load_balancer_$vif 2> /dev/null -X done -X sudo iptables -F back_lb_stats 2> /dev/null -X sudo iptables -D INPUT -p tcp -j back_lb_stats 2> /dev/null -X sudo iptables -X back_lb_stats 2> /dev/null -} -X -fw_restore() { -X logger -t cloud "$(basename $0): Entering fw_restore" -X local lb_vif_list="eth0" -X for vif in $lb_vif_list; do -X sudo iptables -F load_balancer_$vif 2> /dev/null -X sudo iptables -D INPUT -i $vif -p tcp -j load_balancer_$vif 2> /dev/null -X sudo iptables -X load_balancer_$vif 2> /dev/null -X sudo iptables -E back_load_balancer_$vif load_balancer_$vif 2> /dev/null -X done -X sudo iptables -F lb_stats 2> /dev/null -X sudo iptables -D INPUT -p tcp -j lb_stats 2> /dev/null -X sudo iptables -X lb_stats 2> /dev/null -X sudo iptables -E back_lb_stats lb_stats 2> /dev/null -} -X -# firewall entry to ensure that haproxy can receive on specified port -fw_entry() { -X logger -t cloud "$(basename $0): Entering fw_entry" -X local added=$1 -X local removed=$2 -X local stats=$3 -X -X if [ "$added" == "none" ] -X then -X added="" -X fi -X -X if [ "$removed" == "none" ] -X then -X removed="" -X fi -X -X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") -X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") -X -# back up the iptable rules by renaming before creating new. -X local lb_vif_list=eth0 -X for vif in $lb_vif_list; do -X sudo iptables -E load_balancer_$vif back_load_balancer_$vif 2> /dev/null -X sudo iptables -N load_balancer_$vif 2> /dev/null -X sudo iptables -A INPUT -i $vif -p tcp -j load_balancer_$vif -X done -X sudo iptables -E lb_stats back_lb_stats 2> /dev/null -X sudo iptables -N lb_stats 2> /dev/null -X sudo iptables -A INPUT -p tcp -j lb_stats -X -X for i in $a -X do -X local pubIp=$(echo $i | cut -d: -f1) -X local dport=$(echo $i | cut -d: -f2) -X local lb_vif_list="eth0" -X for vif in $lb_vif_list; do -X sudo iptables -A load_balancer_$vif -p tcp -d $pubIp --dport $dport -j ACCEPT -X if [ $? -gt 0 ] -X then -X return 1 -X fi -X done -X done -X local pubIp=$(echo $stats | cut -d: -f1) -X local dport=$(echo $stats | cut -d: -f2) -X local cidrs=$(echo $stats | cut -d: -f3 | sed 's/-/,/') -X sudo iptables -A lb_stats -s $cidrs -p tcp -m state --state NEW -d $pubIp --dport $dport -j ACCEPT -X -X return 0 -} -X -#Hot reconfigure HA Proxy in the routing domain -reconfig_lb() { -X logger -t cloud "Reconfiguring ilb using $1" -X /root/reconfigLB.sh $1 -X return $? -} -X -# Restore the HA Proxy to its previous state, and revert iptables rules on loadbalancer -restore_lb() { -X logger -t cloud "Restoring HA Proxy to previous state" -X # Copy the old version of haproxy.cfg into the file that reconfigLB.sh uses -X cp /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg.new -X -X if [ $? -eq 0 ] -X then -X # Run reconfigLB.sh again -X /root/reconfigLB.sh /etc/haproxy/haproxy.cfg.new -X fi -} -X -X -logger -t cloud "$(basename $0): Entering $(dirname $0)/$(basename $0)" -X -iflag= -aflag= -dflag= -fflag= -sflag= -X -while getopts 'i:a:d:f:s:' OPTION -do -X case $OPTION in -X i) iflag=1 -X domRIp="$OPTARG" #unused but passed in -X ;; -X a) aflag=1 -X addedIps="$OPTARG" -X ;; -X d) dflag=1 -X removedIps="$OPTARG" -X ;; -X f) fflag=1 -X cfgfile="$OPTARG" -X ;; -X s) sflag=1 -X statsIp="$OPTARG" -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [[ "$aflag$dflag" != "1" && "$aflag$dflag" != "11" ]] -then -X usage -X unlock_exit 2 $lock $locked -fi -X -if [ "$addedIps" == "" ] -then -X addedIps="none" -fi -X -X -if [ "$removedIps" == "" ] -then -X removedIps="none" -fi -X -X -# hot reconfigure haproxy -reconfig_lb $cfgfile -X -if [ $? -gt 0 ] -then -X logger -t cloud "Reconfiguring ilb failed" -X unlock_exit 1 $lock $locked -fi -X -logger -t cloud "HAProxy reconfigured successfully, configuring firewall" -X -# iptables entry to ensure that haproxy receives traffic -fw_entry $addedIps $removedIps $statsIp -X -if [ $? -gt 0 ] -then -X logger -t cloud "Failed to apply firewall rules for internal load balancing, reverting HA Proxy config" -X # Restore the LB -X restore_lb -X -X logger -t cloud "Reverting firewall config" -X fw_restore -X -X unlock_exit 1 $lock $locked -else -X # Remove backedup iptable rules -X logger -t cloud "Firewall configured successfully, deleting backup firewall config" -X fw_remove_backup -fi -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/ilb.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/ilb.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/ilb.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ilb.sh': 'MD5 check failed' - ) << \SHAR_EOF -8b7374975ee7d7a5d73da78b60bd508c cloud_scripts/opt/cloud/bin/ilb.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ilb.sh'` -ne 5644 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ilb.sh' is not 5644" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -for i in $* -do -X info=`/opt/cloud/bin/checks2svpn.sh $i` -X ret=$? -X batchInfo+="$i:$ret:$info&" -done -echo -n $batchInfo -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh': 'MD5 check failed' - ) << \SHAR_EOF -36a25911b669737ea678011f72a6f3f9 cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh'` -ne 924 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' is not 924" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/savepassword.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/savepassword.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/savepassword.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/savepassword.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/savepassword.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# Usage -# save_password -v -p -X -while getopts 'v:p:' OPTION -do -X case $OPTION in -X v) VM_IP="$OPTARG" -X ;; -X p) PASSWORD="$OPTARG" -X ;; -X ?) echo "Incorrect usage" -X ;; -X esac -done -TOKEN_FILE="/tmp/passwdsrvrtoken" -TOKEN="" -if [ -f $TOKEN_FILE ]; then -X TOKEN=$(cat $TOKEN_FILE) -fi -ps aux | grep passwd_server_ip.py |grep -v grep 2>&1 > /dev/null -if [ $? -eq 0 ] -then -X ips=$(ip addr show | grep inet | awk '{print $2}') -X for ip in $ips; do -X server_ip=$(echo $ip | awk -F'/' '{print $1}') -X curl --header "DomU_Request: save_password" "http://$server_ip:8080/" -F "ip=$VM_IP" -F "password=$PASSWORD" -F "token=$TOKEN" >/dev/null 2>/dev/null & -X done -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/savepassword.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/savepassword.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/savepassword.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/savepassword.sh': 'MD5 check failed' - ) << \SHAR_EOF -edebd2c25984e1ed00b36e4f8d360a63 cloud_scripts/opt/cloud/bin/savepassword.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/savepassword.sh'` -ne 1525 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/savepassword.sh' is not 1525" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cloud-nic.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cloud-nic.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cloud-nic.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -plug_nic() { -X sudo echo "$tableNo $tableName" >> /etc/iproute2/rt_tables 2>/dev/null -X sudo ip rule add fwmark $tableNo table $tableName 2>/dev/null -X sudo ip route flush table $tableName -X sudo ip route flush cache -} -X -X -unplug_nic() { -X sudo iptables -t mangle -D PREROUTING -i $dev -m state --state NEW -j CONNMARK --set-mark $tableNo 2>/dev/null -X -X sudo ip rule del fwmark $tableNo 2>/dev/null -X sudo ip route flush table $tableName -X sudo sed -i /"$tableNo $tableName"/d /etc/iproute2/rt_tables 2>/dev/null -X sudo ip route flush cache -X # remove network usage rules -X sudo iptables -F NETWORK_STATS_$dev 2>/dev/null -X iptables-save | grep NETWORK_STATS_$dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables $rule -X done -X sudo iptables -X NETWORK_STATS_$dev 2>/dev/null -X # remove vpn network usage rules -X sudo iptables -t mangle -F VPN_STATS_$dev 2>/dev/null -X iptables-save -t mangle | grep VPN_STATS_$dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t mangle $rule -X done -X sudo iptables -t mangle -X VPN_STATS_$dev 2>/dev/null -X # remove rules on this dev -X iptables-save -t mangle | grep $dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t mangle $rule -X done -X iptables-save -t nat | grep $dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t nat $rule -X done -X iptables-save | grep $dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables $rule -X done -X # remove apache config for this eth -X rm -f /etc/apache2/conf.d/vhost$dev.conf -} -X -action=$1 -dev=$2 -tableNo=$((100+${dev:3})) -tableName="Table_$dev" -X -if [ $action == 'add' ] -then -X plug_nic -else -X unplug_nic -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cloud-nic.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cloud-nic.sh': 'MD5 check failed' - ) << \SHAR_EOF -6afed00cefb1dc06b8b4969c2c26933e cloud_scripts/opt/cloud/bin/cloud-nic.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cloud-nic.sh'` -ne 2632 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' is not 2632" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/ipsectunnel.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ipsectunnel.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/ipsectunnel.sh (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/ipsectunnel.sh -M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N#4R-2(*=G!N:6YM87)K/2(P>#4R-"(*"G5S86=E*"D@ -M>PH@("`@<')I;G1F(")5PH@('-U9&\@:7!T86)L -M97,MPH@(&1I2!<"B`@("!P -M:&%S93(@<&]L:6-Y/21ER1R:6=H=&YE='-] -M(B`^/B`D=G!N8V]N9F9I;&4@)B8*("!S=61O(&5C:&\@(B`@='EP93UT=6YN -M96PB(#X^("1V<&YC;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!A=71H8GD] -MVEK96QI9F5T:6UE?7,B(#X^("1V<&YC -M;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!E2(@/CX@ -M)'9P;F-O;F9F:6QE("8F"B`@2!F -M;W(@'1H;W`](B1/4%1!4D&ET("1R970* -` -end -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/ipsectunnel.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh': 'MD5 check failed' - ) << \SHAR_EOF -097a970ec94a68d965ffd7f446e3862d cloud_scripts/opt/cloud/bin/ipsectunnel.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh'` -ne 8769 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' is not 8769" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/ipassoc.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ipassoc.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ipassoc.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/ipassoc.sh (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/ipassoc.sh -M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N"`D("1(96%D55),.B!S=FXZ+R]S=FXN;&%B+G9M;W!S+F-O;2]R97!O2!E>&ES=',B"GT* -M"F1E;%]F=U]C:&%I;E]F;W)?:7`@*"D@>PH@(&QO8V%L('!U8DEP/20H96-H -M;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?2W!R:6YT("0R?2W!R:6YT("0R?2W!R:6YT("0Q?2PH@(&QO -M8V%L(&1E=CTB)#$B"B`@;&]C86P@:7`](B0R(@H@('-U9&\@:7`@861DW!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP/20Q -M"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0Q?22!F;W(@:7`@)'!U8DEP(&]N(&EN=&5R9F%C92`D971H1&5V(@H@("`@ -M(')E='5R;B`Q"B`@9FD*"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0R?2<@('P@9W)E<"`M=R`D -M:7!.;TUAW!R -M:6YT("0R?2#TD*'!R:6YT9B`B)7A<;B(@)&YU;2D*("`@("`@("`@ -M(&5C:&\@)&AE>#L*("`@("`@("`@("-E;F%B;&4@`IS -M9FQA9STP"FQF;&%G/0IF9FQA9ST*8V9L86<]"FYF;&%G/0IO<#TB(@H*:7-? -M;6%S=&5R/3`*:7-?&ET(#(@)&QO8VL@)&QO8VME9`H)"3L["B`@ -M97-A8PID;VYE"@H*:68@6R`B)$%F;&%G)$1F;&%G(B`A/2`B,2(@70IT:&5N -M"B`@("!U&ET("0_("1L;V-K -M("1L;V-K960*9FD*"FEF(%L@(B1F9FQA9R(@/3T@(C$B(%T@)B8@6R`B)$1F -M;&%G(B`]/2`B,2(@70IT:&5N"B`@&ET("0_ -M("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1$9FQA9R(@/3T@(C$B(%T*=&AE -M;@H@(')E;6]V95]A;E]I<"`@)'!U8FQI8TEP("8F"B`@9&5L7V9W7V-H86EN -M7V9O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ipassoc.sh': 'MD5 check failed' - ) << \SHAR_EOF -ad068a0cc84ded8f79c63ce3aced4586 cloud_scripts/opt/cloud/bin/ipassoc.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ipassoc.sh'` -ne 13401 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ipassoc.sh' is not 13401" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/line_edit.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/line_edit.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/line_edit.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/line_edit.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/line_edit.py' && -#!/usr/bin/python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import logging -import re -import shutil -import os -X -X -class LineEdit(object): -X """Helper for LineEditingFile that keeps track of one edit.""" -X def __init__(self, search, sub, *sub_args, **kwargs): -X if len(sub_args) > 0: -X sub = sub % sub_args -X flags = kwargs.get('flags', 0) -X self.pattern = re.compile(search, flags=flags) -X self.sub = sub -X self.count = kwargs.get('count', 0) # max subs to make -X self.subs = 0 # subs made so far -X -X -class LineEditingFile(object): -X """ -X Atomic, conservative, by-line editing of configuration files. -X -X Will not touch the file if there are no changes to do. -X Reasonably efficient for large files, though files with a long time -X before their first match will use memory. -X -X -X Given a vhosts file such as: -X >>> with open('doctest-vhosts.conf', 'w') as f: -X ... f.write(''' -X ... Listen foo:80 -X ... -X ... DocRoot /var/www -X ... -X ... -X ... Listen other:80 -X ... -X ... DocRoot /var/www -X ... -X ... ''') -X ... -X -X To replace the hostname for the first virtualhost entry: -X >>> new_hostname = 'fooooo' -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... f.replace(r'', '', new_hostname, count=1, flags=re.I) -X ... f.replace(r'Listen .*?:80', 'Listen %s:80', new_hostname, count=1, flags=re.I) -X ... -X -X Be careful with the matches! -X A second invocation of the same rule will edit the second vhost: -X >>> new_hostname = 'fooooo' -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... f.replace(r'', '', new_hostname, count=1, flags=re.I) -X ... -X -X To move all hosts from port 80 to port 8080: -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... f.replace(r'', '', flags=re.I) -X ... f.replace(r'Listen (.*?):80', 'Listen \\\\1:80', flags=re.I) -X ... -X -X (please note in this example there's a double escape of the backreference -X \\\\1, to make the example work with doctest) -X -X Since this example already matched all files, a second invocation does nothing: -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... f.replace(r'', '', flags=re.I) -X ... -X -X It's also acceptable to not make any edits at all: -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... pass -X ... -X -X You don't _have_ to use a with statement: -X >>> f = LineEditingFile('doctest-vhosts.conf') -X >>> f.replace(r'DocRoot /var/www', 'DocRoot /var/www/html', flags=re.I) -X >>> changes = f.commit() -X >>> print changes -X 2 -X >>> -X -X Cleanup of the example vhosts.conf: -X >>> # noinspection PyBroadException -X >>> try: -X ... os.unlink('doctest-vhosts.conf') -X ... os.unlink('doctest-vhosts.conf.bak') -X ... os.unlink('doctest-vhosts.conf.new') -X ... except: -X ... pass -X ... -X """ -X -X def __init__(self, filename): -X self.filename = filename -X self.changed = False -X self.edits = [] -X -X def __enter__(self): -X return self -X -X def replace(self, search, sub, *sub_args, **kwargs): -X edit = LineEdit(search, sub, *sub_args, **kwargs) -X self.edits.append(edit) -X -X # noinspection PyUnusedLocal -X def __exit__(self, exc, value, traceback): -X if exc is not None: -X return False # return false results in re-raise -X -X self.commit() -X -X def commit(self): -X changes = 0 -X changed_file = None -X changed_filename = self.filename + '.new' -X try: -X lines = [] -X backup_filename = self.filename + '.bak' -X # noinspection PyUnusedLocal -X stat = None -X with open(self.filename, 'r') as orig: -X stat = os.fstat(orig.fileno()) -X for line in orig: -X changed_line = line -X for edit in self.edits: -X remaining_count = 0 -X if edit.count != 0: -X remaining_count = edit.count - edit.subs -X if remaining_count < 0: -X raise Exception("Made too many edits") -X elif remaining_count == 0: -X continue -X changed_line, subs = edit.pattern.subn( -X edit.sub, line, remaining_count) -X if changed_line != line: -X if changed_file is None: -X logging.debug("Editing file %s" % self.filename) -X logging.debug(" - %s" % line[:-1]) -X logging.debug(" + %s" % changed_line[:-1]) -X changes += subs -X edit.subs += subs -X if changes == 0: # buffer until we find a change -X lines.append(changed_line) -X elif changed_file is None: # found first change, flush buffer -X changed_file = open(changed_filename, 'w') -X if hasattr(os, 'fchmod'): -X os.fchmod(changed_file.fileno(), # can cause OSError which aborts -X stat.st_mode) -X if hasattr(os, 'fchown'): -X os.fchown(changed_file.fileno(), # can cause OSError which aborts -X stat.st_uid, stat.st_gid) -X changed_file.writelines(lines) -X changed_file.write(changed_line) -X del lines # reclaim buffer memory -X else: # already flushed, just write -X changed_file.write(changed_line) -X -X if changes == 0: -X logging.info("No edits need for file %s" % -X self.filename) -X else: -X changed_file.close() -X changed_file = None -X if os.path.exists(backup_filename): # back up the original -X os.unlink(backup_filename) -X shutil.copy(self.filename, backup_filename) -X os.rename(changed_filename, self.filename) # the swap -X logging.info("Edited file %s (%d changes)" % -X (self.filename, changes)) -X finally: -X if changed_file is not None: # failed, clean up -X changed_file.close() -X os.unlink(changed_filename) -X return changes -X -X -if __name__ == "__main__": -X logging.basicConfig(level=logging.DEBUG) -X import doctest -X doctest.testmod() -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/line_edit.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/line_edit.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/line_edit.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/line_edit.py': 'MD5 check failed' - ) << \SHAR_EOF -4d05b8a011ff9c6132a3ca4ff477a161 cloud_scripts/opt/cloud/bin/line_edit.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/line_edit.py'` -ne 7961 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/line_edit.py' is not 7961" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/get_template_version.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/get_template_version.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/get_template_version.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/get_template_version.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/get_template_version.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# As the last command send to router before any rules operation, wait until boot up done -X -__TIMEOUT=240 -__FLAGFILE=/var/cache/cloud/boot_up_done -done=0 -for i in `seq 1 $(($__TIMEOUT * 10))` -do -X if [ -e $__FLAGFILE ] -X then -X done=1 -X break -X fi -X sleep 0.1 -X if [ $((i % 10)) -eq 0 ] -X then -X logger -t cloud "Waiting for VM boot up done for one second" -X fi -done -X -if [ -z $done ] -then -X # declare we failed booting process -X echo "Waited 60 seconds but boot up haven't been completed" -X exit -fi -X -release=`cat /etc/cloudstack-release` -sig=`cat /var/cache/cloud/cloud-scripts-signature` -echo "${release}&${sig}" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/get_template_version.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/get_template_version.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/get_template_version.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/get_template_version.sh': 'MD5 check failed' - ) << \SHAR_EOF -2234ad00c02a6be63cb0f4f876b8960b cloud_scripts/opt/cloud/bin/get_template_version.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/get_template_version.sh'` -ne 1449 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/get_template_version.sh' is not 1449" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/update_config.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/update_config.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/update_config.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/update_config.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/update_config.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,N87)G=BD*:68@87)G8R`A/2`R(&%N9"!A7,N97AI="@Q*0H*(R!&25A- -M12!W92!S:&]U;&0@9V5T('1H:7,@;&]C871I;VX@9G)O;2!A(&-O;F9I9W5R -M871I;VX@8VQA7,N97AI="AR971U -M2!S<&5E9&EN9R!U<"!L;V%D:6YG('1I;65S -M"B`@("!I9B!N;W0@*&]S+F5N=FER;VXN9V5T*"=$149%4E]#3TY&242YJ7,N87)G=ELQ -M72!O2`]($YO -M;F4*"B`@("!F;W(@:S$L('8Q(&EN(&=U97-T;F5T7V1I8W0N:71E7,N87!P96YD*&LQ*0H*("`@(&EF(&YO -M="!E>&ES=&EN9U]K97ES.@H@("`@("`@("2`Z -M.B!296-O;F9I9W5R:6YG(&=U97-T(&YE='=O&ES=&EN9U]K97ES.@H@("`@("`@("2!I;B!E>&ES=&EN9U]K97ES.@H@("`@("`@(&9O&ES=',@/2!4&ES=',Z"B`@("`@("`@("`@(&)R96%K -M"@H@("`@B(I*3H* -M("`@("`@("!S>7,N97AI="@P*0H@("`@;&]G9VEN9RYE2`Z.B!5;F%B;&4@=&\@7,N97AI="@Q -M*0H*(R!)9B!T:&4@9W5E2`Z.B!.;R!N965D('1O('!R;V-E/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/update_config.py': 'MD5 check failed' - ) << \SHAR_EOF -a2062b2b010940ea783d8256b807c488 cloud_scripts/opt/cloud/bin/update_config.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/update_config.py'` -ne 5136 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/update_config.py' is not 5136" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/edithosts.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/edithosts.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/edithosts.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/edithosts.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/edithosts.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -X -# edithosts.sh -- edit the dhcphosts file on the routing domain -X -usage() { -X printf "Usage: %s: -m -4 -6 -h -d -n -s -u [-N]\n" $(basename $0) >&2 -} -X -mac= -ipv4= -ipv6= -host= -dflt= -dns= -routes= -duid= -nondefault= -X -while getopts 'm:4:h:d:n:s:6:u:N' OPTION -do -X case $OPTION in -X m) mac="$OPTARG" -X ;; -X 4) ipv4="$OPTARG" -X ;; -X 6) ipv6="$OPTARG" -X ;; -X u) duid="$OPTARG" -X ;; -X h) host="$OPTARG" -X ;; -X d) dflt="$OPTARG" -X ;; -X n) dns="$OPTARG" -X ;; -X s) routes="$OPTARG" -X ;; -X N) nondefault=1 -X ;; -X ?) usage -X exit 2 -X ;; -X esac -done -X -DHCP_HOSTS=/etc/dhcphosts.txt -DHCP_OPTS=/etc/dhcpopts.txt -DHCP_LEASES=/var/lib/misc/dnsmasq.leases -HOSTS=/etc/hosts -X -source /root/func.sh -X -lock="biglock" -#default timeout value is 30 mins as DhcpEntryCommand is not synchronized on agent side any more, -#and multiple commands can be sent to the same VR at a time -locked=$(getLockFile $lock 1800) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -grep "redundant_router=1" /var/cache/cloud/cmdline > /dev/null -no_redundant=$? -X -dnsmasq_managed_lease=`cat /var/cache/cloud/dnsmasq_managed_lease` -X -wait_for_dnsmasq () { -X local _pid=$(pidof dnsmasq) -X for i in 0 1 2 3 4 5 6 7 8 9 10 -X do -X sleep 1 -X _pid=$(pidof dnsmasq) -X [ "$_pid" != "" ] && break; -X done -X [ "$_pid" != "" ] && return 0; -X logger -t cloud "edithosts: timed out waiting for dnsmasq to start" -X return 1 -} -X -if [ $dnsmasq_managed_lease ] -then -X #release previous dhcp lease if present -X logger -t cloud "edithosts: releasing $ipv4" -X dhcp_release $(ip route get "$ipv4/32" | grep " dev " | sed -e "s/^.* dev \([^ ]*\) .*$/\1/g") $ipv4 $(grep "$ipv4 " $DHCP_LEASES | awk '{print $2}') > /dev/null 2>&1 -X logger -t cloud "edithosts: released $ipv4" -fi -X -logger -t cloud "edithosts: update $mac $ipv4 $ipv6 $host to hosts" -X -[ ! -f $DHCP_HOSTS ] && touch $DHCP_HOSTS -[ ! -f $DHCP_OPTS ] && touch $DHCP_OPTS -[ ! -f $DHCP_LEASES ] && touch $DHCP_LEASES -X -#delete any previous entries from the dhcp hosts file -sed -i /$mac/d $DHCP_HOSTS -if [ $ipv4 ] -then -X sed -i /$ipv4,/d $DHCP_HOSTS -fi -if [ $ipv6 ] -then -X #searching with [$ipv6], matching other ip so using $ipv6], -X sed -i /$ipv6],/d $DHCP_HOSTS -fi -# don't want to do this in the future, we can have same VM with multiple nics/entries -sed -i /$host,/d $DHCP_HOSTS -X -#put in the new entry -if [ $ipv4 ] -then -X echo "$mac,$ipv4,$host,infinite" >>$DHCP_HOSTS -fi -if [ $ipv6 ] -then -X if [ $nondefault ] -X then -X echo "id:$duid,set:nondefault6,[$ipv6],$host,infinite" >>$DHCP_HOSTS -X else -X echo "id:$duid,[$ipv6],$host,infinite" >>$DHCP_HOSTS -X fi -fi -X -if [ $dnsmasq_managed_lease -eq 0 ] -then -X #delete leases to supplied mac and ip addresses -X if [ $ipv4 ] -X then -X sed -i /$mac/d $DHCP_LEASES -X sed -i /"$ipv4 "/d $DHCP_LEASES -X fi -X if [ $ipv6 ] -X then -X sed -i /$duid/d $DHCP_LEASES -X sed -i /"$ipv6 "/d $DHCP_LEASES -X fi -X sed -i /"$host "/d $DHCP_LEASES -X -X #put in the new entry -X if [ $ipv4 ] -X then -X echo "0 $mac $ipv4 $host *" >> $DHCP_LEASES -X fi -X if [ $ipv6 ] -X then -X echo "0 $duid $ipv6 $host *" >> $DHCP_LEASES -X fi -fi -X -#edit hosts file as well -if [ $ipv4 ] -then -X sed -i /"$ipv4 "/d $HOSTS -fi -if [ $ipv6 ] -then -X sed -i /"$ipv6 "/d $HOSTS -fi -sed -i /" $host$"/d $HOSTS -if [ $ipv4 ] -then -X echo "$ipv4 $host" >> $HOSTS -fi -if [ $ipv6 ] -then -X echo "$ipv6 $host" >> $HOSTS -fi -X -if [ "$dflt" != "" -a "$ipv4" != "" ] -then -X #make sure dnsmasq looks into options file -X sed -i /dhcp-optsfile/d /etc/dnsmasq.conf -X echo "dhcp-optsfile=$DHCP_OPTS" >> /etc/dnsmasq.conf -X -X tag=$(echo $ipv4 | tr '.' '_') -X sed -i /$tag,/d $DHCP_OPTS -X if [ "$dflt" == "0.0.0.0" ] -X then -X logger -t cloud "$0: unset default router for $ipv4" -X logger -t cloud "$0: unset dns server for $ipv4" -X echo "$tag,3" >> $DHCP_OPTS -X echo "$tag,6" >> $DHCP_OPTS -X echo "$tag,15" >> $DHCP_OPTS -X fi -X [ "$routes" != "" ] && echo "$tag,121,$routes" >> $DHCP_OPTS -X #delete entry we just put in because we need a tag -X sed -i /$ipv4,/d $DHCP_HOSTS -X #put it back with a tag -X echo "$mac,set:$tag,$ipv4,$host,infinite" >>$DHCP_HOSTS -fi -X -# make dnsmasq re-read files -pid=$(pidof dnsmasq) -if [ "$pid" != "" ] -then -X # use SIGHUP to avoid service outage if dhcp_release is available. -X if [ $dnsmasq_managed_lease ] -X then -X kill -HUP $pid -X else -X systemctl restart dnsmasq -X fi -else -X if [ $no_redundant -eq 1 ] -X then -X wait_for_dnsmasq -X else -X logger -t cloud "edithosts: skip wait dnsmasq due to redundant virtual router" -X fi -fi -X -ret=$? -unlock_exit $ret $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/edithosts.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/edithosts.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/edithosts.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/edithosts.sh': 'MD5 check failed' - ) << \SHAR_EOF -68e47d6a7efaacefbbaebf8b4e7408c3 cloud_scripts/opt/cloud/bin/edithosts.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/edithosts.sh'` -ne 5502 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/edithosts.sh' is not 5502" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/diagnostics.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/diagnostics.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/diagnostics.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/diagnostics.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/diagnostics.py' && -#!/usr/bin/env python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import shlex -import subprocess -import sys -X -X -def run_cmd(command): -X if command is not None: -X try: -X p = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE) -X stdout, stderr = p.communicate() -X return_code = p.returncode -X -X except OSError as e: -X stdout = "Check your command type" -X stderr = "Exception occurred: %s" % e -X return_code = 1 -X -X finally: -X print('%s&&' % stdout.strip()) -X print('%s&&' % stderr.strip()) -X print('%s' % return_code) -X -X -def get_command(): -X arguments = sys.argv -X cmd = " ".join(arguments[1:]) -X cmd_type = sys.argv[1] -X -X if cmd_type == 'ping': -X if '-c' in arguments: -X return cmd -X else: -X return cmd + " -c 4" -X -X elif cmd_type == 'traceroute': -X if '-m' in arguments: -X return cmd -X else: -X return cmd + " -m 20" -X -X elif cmd_type == 'arping': -X if '-c' in arguments: -X return cmd -X else: -X return cmd + " -c 4" -X -X else: -X return None -X -X -if __name__ == "__main__": -X command = get_command() -X run_cmd(command) -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/diagnostics.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/diagnostics.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/diagnostics.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/diagnostics.py': 'MD5 check failed' - ) << \SHAR_EOF -91a837e5bcafee663cbfb8532574405a cloud_scripts/opt/cloud/bin/diagnostics.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/diagnostics.py'` -ne 2012 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/diagnostics.py' is not 2012" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_monitorservice.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_monitorservice.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_monitorservice.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_monitorservice.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py': 'MD5 check failed' - ) << \SHAR_EOF -1121a063f2dbcfc1bdc426ceba249184 cloud_scripts/opt/cloud/bin/cs_monitorservice.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py'` -ne 1541 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py' is not 1541" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpn_l2tp.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpn_l2tp.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpn_l2tp.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -X -X -#set -x -usage() { -X printf "Usage:\n" -X printf "Create VPN : %s -c -r -l -p -s -i \n" $(basename $0) -X printf "Delete VPN : %s -d -l -s -D -C < local cidr> \n" $(basename $0) -X printf "Add VPN User : %s -u \n" $(basename $0) -X printf "Remote VPN User: %s -U /dev/null -X then -X is_vpc=true -X fi -X -X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 500 -j ACCEPT -X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 4500 -j ACCEPT -X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 1701 -j ACCEPT -X sudo iptables $op INPUT -i $dev -p ah -j ACCEPT -X sudo iptables $op INPUT -i $dev -p esp -j ACCEPT -X if $is_vpc -X then -X # Need to apply the following ACL rules as well. -X if sudo iptables -N VPN_FORWARD &> /dev/null -X then -X sudo iptables -I FORWARD -i ppp+ -j VPN_FORWARD -X sudo iptables -I FORWARD -o ppp+ -j VPN_FORWARD -X sudo iptables -A VPN_FORWARD -j DROP -X fi -X sudo iptables $op VPN_FORWARD -i ppp+ -o ppp+ -j RETURN -X sudo iptables $op VPN_FORWARD -i ppp+ -d $cidr -j RETURN -X sudo iptables $op VPN_FORWARD -s $cidr -o ppp+ -j RETURN -X else -X sudo iptables $op FORWARD -i ppp+ -d $cidr -j ACCEPT -X sudo iptables $op FORWARD -s $cidr -o ppp+ -j ACCEPT -X sudo iptables $op FORWARD -i ppp+ -o ppp+ -j ACCEPT -X fi -X sudo iptables $op INPUT -i ppp+ -m udp -p udp --dport 53 -j ACCEPT -X sudo iptables $op INPUT -i ppp+ -m tcp -p tcp --dport 53 -j ACCEPT -X sudo iptables -t nat $op PREROUTING -i ppp+ -p tcp -m tcp --dport 53 -j DNAT --to-destination $local_ip -X sudo iptables -t nat $op PREROUTING -i ppp+ -p udp -m udp --dport 53 -j DNAT --to-destination $local_ip -X -X if $is_vpc -X then -X return -X fi -X -X if sudo iptables -t mangle -N VPN_$public_ip &> /dev/null -X then -X logger -t cloud "$(basename $0): created VPN chain in PREROUTING mangle" -X sudo iptables -t mangle -I PREROUTING -d $public_ip -j VPN_$public_ip -X sudo iptables -t mangle -A VPN_$public_ip -j RETURN -X fi -X op2="-D" -X [ "$op" == "-A" ] && op2="-I" -X sudo iptables -t mangle $op VPN_$public_ip -p ah -j ACCEPT -X sudo iptables -t mangle $op VPN_$public_ip -p esp -j ACCEPT -} -X -start_ipsec() { -X systemctl is-active ipsec > /dev/null -X if [ $? -ne 0 ] -X then -X systemctl start ipsec > /dev/null -X #Wait until ipsec started, 5 seconds at most -X for i in {1..5} -X do -X logger -t cloud "$(basename $0): waiting ipsec start..." -X systemctl is-active ipsec > /dev/null -X result=$? -X if [ $result -eq 0 ] -X then -X break -X fi -X sleep 1 -X done -X fi -X systemctl is-active ipsec > /dev/null -X return $? -} -X -ipsec_server() { -X local op=$1 -X case $op in -X "start") start_ipsec -X sudo systemctl start xl2tpd -X ;; -X "stop") sudo systemctl stop xl2tpd -X ;; -X "restart") start_ipsec -X sudo ipsec auto --rereadall -X systemctl stop xl2tpd -X systemctl start xl2tpd -X ;; -X esac -} -X -create_l2tp_ipsec_vpn_server() { -X local ipsec_psk=$1 -X local public_ip=$2 -X local client_range=$3 -X local local_ip=$4 -X -X sed -i -e "s/left=.*$/left=$public_ip/" /etc/ipsec.d/l2tp.conf -X echo "$public_ip %any : PSK \"$ipsec_psk\"" > /etc/ipsec.d/ipsec.any.secrets -X sed -i -e "s/^ip range = .*$/ip range = $client_range/" /etc/xl2tpd/xl2tpd.conf -X sed -i -e "s/^local ip = .*$/local ip = $local_ip/" /etc/xl2tpd/xl2tpd.conf -X -X sed -i -e "s/^ms-dns.*$/ms-dns $local_ip/" /etc/ppp/options.xl2tpd -X -X iptables_ "-D" $public_ip -X iptables_ "-I" $public_ip -X -X ipsec_server "restart" -X -X ipsec auto --rereadsecrets -X ipsec auto --replace L2TP-PSK -} -X -destroy_l2tp_ipsec_vpn_server() { -X local public_ip=$1 -X -X ipsec auto --down L2TP-PSK -X -X iptables_ "-D" $public_ip -X -X ipsec_server "stop" -} -X -remove_l2tp_ipsec_user() { -X local u=$1 -X sed -i -e "/^$u .*$/d" /etc/ppp/chap-secrets -X if [ -x /usr/bin/tdbdump ]; then -X pid=$(tdbdump /var/run/pppd2.tdb | grep -w $u | awk -F';' '{print $4}' | awk -F= '{print $2}') -X [ "$pid" != "" ] && kill -9 $pid -X fi -X return 0 -} -X -add_l2tp_ipsec_user() { -X local u=$1 -X local passwd=$2 -X -X uptodate=$(grep "^$u \* \"$passwd\" \*$" /etc/ppp/chap-secrets) -X if [ "$uptodate" == "" ] -X then -X remove_l2tp_ipsec_user $u -X echo "$u * \"$passwd\" *" >> /etc/ppp/chap-secrets -X fi -} -X -rflag= -pflag= -lflag= -sflag= -create= -destroy= -useradd= -userdel= -dev= -cidr= -X -while getopts 'cdl:p:r:s:u:U:i:C:' OPTION -do -X case $OPTION in -X c) create=1 -X ;; -X d) destroy=1 -X ;; -X u) useradd=1 -X user_pwd="$OPTARG" -X ;; -X U) userdel=1 -X user="$OPTARG" -X ;; -X r) rflag=1 -X client_range="$OPTARG" -X ;; -X p) pflag=1 -X ipsec_psk="$OPTARG" -X ;; -X l) lflag=1 -X local_ip="$OPTARG" -X ;; -X s) sflag=1 -X server_ip="$OPTARG" -X ;; -X i) dev="$OPTARG" -X ;; -X C) cidr="$OPTARG" -X ;; -X ?) usage -X exit 2 -X ;; -X esac -done -X -if [ "$dev" == "" ] -then -X dev="eth2" -fi -X -if [ "$cidr" == "" ] -then -X cidr=$(get_intf_ip "eth0") -fi -X -[ "$create$destroy" == "11" ] || [ "$create$destroy$useradd$userdel" == "" ] && usage && exit 2 -[ "$create" == "1" ] && [ "$lflag$pflag$rflag$sflag" != "1111" ] && usage && exit 2 -X -if [ "$create" == "1" ]; then -X create_l2tp_ipsec_vpn_server $ipsec_psk $server_ip $client_range $local_ip -X exit $? -fi -X -if [ "$destroy" == "1" ]; then -X destroy_l2tp_ipsec_vpn_server $server_ip -X exit $? -fi -X -if [ "$useradd" == "1" ]; then -X u=$(echo $user_pwd | awk -F',' '{print $1}') -X pwd=$(echo $user_pwd | awk -F',' '{print $2}') -X add_l2tp_ipsec_user $u $pwd -X exit $? -fi -if [ "$userdel" == "1" ]; then -X remove_l2tp_ipsec_user $user -X exit $? -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpn_l2tp.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh': 'MD5 check failed' - ) << \SHAR_EOF -79e41044b43cc49c6b11859534bc454d cloud_scripts/opt/cloud/bin/vpn_l2tp.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh'` -ne 6986 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' is not 6986" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_guestnetwork.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_guestnetwork.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_guestnetwork.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -keys = ['eth1', 'eth2', 'eth3', 'eth4', 'eth5', 'eth6', 'eth7', 'eth8', 'eth9'] -X -X -def merge(dbag, gn): -X device = gn['device'] -X -X if not gn['add'] and device in dbag: -X -X if dbag[device]: -X device_to_die = dbag[device][0] -X try: -X dbag[device].remove(device_to_die) -X except ValueError, e: -X print "[WARN] cs_guestnetwork.py :: Error occurred removing item from databag. => %s" % device_to_die -X del(dbag[device]) -X else: -X del(dbag[device]) -X -X else: -X dbag.setdefault(device, []).append(gn) -X -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_guestnetwork.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py': 'MD5 check failed' - ) << \SHAR_EOF -599105da1bdfaced1f2c8078d3fbed19 cloud_scripts/opt/cloud/bin/cs_guestnetwork.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py'` -ne 1401 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' is not 1401" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_vmdata.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vmdata.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vmdata.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, metadata): -X dbag[metadata["vm_ip_address"]] = metadata["vm_metadata"] -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_vmdata.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vmdata.py': 'MD5 check failed' - ) << \SHAR_EOF -3ee2451cb48927d361f05bb5fe3df4ce cloud_scripts/opt/cloud/bin/cs_vmdata.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vmdata.py'` -ne 892 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' is not 892" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/dnsmasq.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/dnsmasq.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/dnsmasq.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -usage() { -X printf "Usage: %s: \n" $(basename $0) >&2 -} -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -#set -x -#backup the old config file -DHCP_CONFIG=/etc/dnsmasq.d/multiple_ranges.conf -DHCP_CONFIG_BAK=/etc/dnsmasq.d/multiple_ranges.conf.bak -DHCP_CONFIG_MAIN=/etc/dnsmasq.conf -DHCP_CONFIG_MAIN_BAK=/etc/dnsmasq.conf.bak -DHCP_FAILURE_CONFIG=/etc/multiple_ranges.conf.failure -DHCP_FAILURE_CONFIG_MAIN=/etc/dnsmasq.conf.failure -CMDLINE=$(cat /var/cache/cloud/cmdline | tr '\n' ' ') -X -#take a backup copy of the dnsmasq file. -cp "$DHCP_CONFIG_MAIN" "$DHCP_CONFIG_MAIN_BAK" -cp "$DHCP_CONFIG" "$DHCP_CONFIG_BAK" -X -#empty the config file -echo > $DHCP_CONFIG -X -var="$1" -dhcp_range="" -dhcp_gateway="" -dhcp_netmask="" -dns_option="" -dns_servers="" -count=0 -X -X -# fetching the dns Ips from the command line. -dns1=$(echo "$CMDLINE" | grep -o " dns1=[[:digit:]].* " | sed -e 's/dns1=//' | awk '{print $1}') -dns2=$(echo "$CMDLINE" | grep -o " dns2=[[:digit:]].* " | sed -e 's/dns2=//' | awk '{print $1}') -X -dns_servers="${dns1}" -if [ -n "$dns2" ] -then -dns_servers="${dns1},${dns2}" -fi -X -X -# check if useextdns is true -use_ext_dns=$(echo "$CMDLINE" | grep -o "useextdns=true") -while [ -n "$var" ] -do -X var1=$(echo $var | cut -f1 -d "-") -X routerip=$( echo $var1 | cut -f1 -d ":" ) -X gateway=$(echo $var1 | cut -f2 -d ":") -X netmask=$(echo $var1 | cut -f3 -d ":") -X start_ip_of_subnet=$(echo $var1 | cut -f4 -d ":") -X dhcp_range="${dhcp_range}"'dhcp-range=set:range'$count","$start_ip_of_subnet",static \n" -X dhcp_gateway="${dhcp_gateway}"'dhcp-option=tag:range'$count",3,"$gateway" \n" -X dhcp_netmask="${dhcp_netmask}"'dhcp-option=tag:range'$count",1,"$netmask" \n" -X if [ -n "$use_ext_dns" ] -X then -X dns_option="${dns_option}"'dhcp-option=tag:range'$count",6,"$dns_servers" \n" -X else -X dns_option="${dns_option}"'dhcp-option=tag:range'$count",6,$routerip"","$dns_servers" \n" -X fi -X var=$( echo $var | sed "s/${var1}-//" ) -X count=$[$count+1] -done -X -#logging the configuration being removed. -log="" -log="${log}"`grep "^dhcp-option=6" "$DHCP_CONFIG_MAIN"`"\n" -log="${log}"`grep "^dhcp-option=option:router" "$DHCP_CONFIG_MAIN"`"\n" -log="${log}"`grep "^dhcp-range=" "$DHCP_CONFIG_MAIN"`"\n" -X -if [ "$log" != '\n\n\n' ] -then -X #Cleaning the existing dhcp confgiuration -X logger -t cloud "dnsmasq.sh: remvoing the primaryip confg from dnsmasq.conf and adding it to /etc/dnsmaq.d/multiple_ranges.conf" -X logger -t cloud "dnsmasq.sh: config removed from dnsmasq.conf is $log" -X sed -i -e '/dhcp-option=6/d' "$DHCP_CONFIG_MAIN" -X sed -i -e '/dhcp-option=option:router/d' "$DHCP_CONFIG_MAIN" -X sed -i -e '/^dhcp-range=/d' "$DHCP_CONFIG_MAIN" -fi -X -#wrting the new config into the config file. -echo -e "$dhcp_range" >> "$DHCP_CONFIG" -echo -e "$dhcp_gateway" >> "$DHCP_CONFIG" -echo -e "$dhcp_netmask" >> "$DHCP_CONFIG" -echo -e "$dns_option" >> "$DHCP_CONFIG" -X -X -#restart the dnsmasq -systemctl restart dnsmasq -result=$? -if [ "$result" -ne "0" ] -then -X logger -t cloud "dnsmasq.sh: could not configure dnsmasq" -X logger -t cloud "dnsmasq.sh: reverting to the old config" -X logger -t cloud "dnsmasq.sh: copying the failure config to `$DHCP_FAILURE_CONFIG` and `$DHCP_FAILURE_CONFIG_MAIN`" -X cp "$DHCP_CONFIG" "$DHCP_FAILURE_CONFIG" -X cp "$DHCP_CONFIG_MAIN" "$DHCP_FAILURE_CONFIG_MAIN" -X cp "$DHCP_CONFIG_BAK" "$DHCP_CONFIG" -X cp "$DHCP_CONFIG_MAIN_BAK" "$DHCP_CONFIG_MAIN" -X systemctl restart dnsmasq -X unlock_exit $result $lock $locked -fi -rm "$DHCP_CONFIG_BAK" -rm "$DHCP_CONFIG_MAIN_BAK" -unlock_exit $result $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/dnsmasq.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/dnsmasq.sh': 'MD5 check failed' - ) << \SHAR_EOF -d603da3043a61bea911e21fb4da8ded0 cloud_scripts/opt/cloud/bin/dnsmasq.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/dnsmasq.sh'` -ne 4359 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' is not 4359" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_dhcp.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_dhcp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_dhcp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_dhcp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_dhcp.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2P@96YT2!N;W0@ -M:6X@7,Z"B`@("`@("`@("`@(')E;6]V95]K97ES+F%D9"AK -M97DI"@H@("`@("`@(&9O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_dhcp.py': 'MD5 check failed' - ) << \SHAR_EOF -9b17e95a8fcb1cf185c9e74cc6ddecca cloud_scripts/opt/cloud/bin/cs_dhcp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_dhcp.py'` -ne 1533 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_dhcp.py' is not 1533" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_cmdline.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_cmdline.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_cmdline.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, cmdline): -X if 'redundant_router' in cmdline['cmd_line']: -X cmdline['cmd_line']['redundant_router'] = "true" -X else: -X cmdline['cmd_line']['redundant_router'] = "false" -X dbag['config'] = cmdline['cmd_line'] -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_cmdline.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_cmdline.py': 'MD5 check failed' - ) << \SHAR_EOF -a6290582c86832c4c94985580ceda8e5 cloud_scripts/opt/cloud/bin/cs_cmdline.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_cmdline.py'` -ne 1045 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' is not 1045" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/prepare_pxe.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/prepare_pxe.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/prepare_pxe.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' && -#!/bin/sh -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# # regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -X -set +u -X -err_exit() { -X echo $1 -X exit 1 -} -X -success() { -X exit 0 -} -X -TFTP_ROOT='/opt/tftpboot' -PXELINUX_CFG_DIR='/opt/tftpboot/pxelinux.cfg' -X -kernel_nfs_path=$1 -kernel_file_name=`basename $kernel_nfs_path` -initrd_nfs_path=$2 -initrd_file_name=`basename $initrd_nfs_path` -tmpt_uuid=$3 -pxe_cfg_filename=$4 -ks_file=$5 -X -kernel_path=$tmpt_uuid/$kernel_file_name -initrd_path=$tmpt_uuid/$initrd_file_name -X -cat > $PXELINUX_CFG_DIR/$pxe_cfg_filename </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh': 'MD5 check failed' - ) << \SHAR_EOF -8b495c4ea50905f4197974ee82e607ba cloud_scripts/opt/cloud/bin/prepare_pxe.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh'` -ne 1792 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/prepare_pxe.sh' is not 1792" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_forwardingrules.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_forwardingrules.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_forwardingrules.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, rules): -X for rule in rules["rules"]: -X source_ip = rule["source_ip_address"] -X destination_ip = rule["destination_ip_address"] -X revoke = rule["revoke"] -X -X newrule = dict() -X newrule["public_ip"] = source_ip -X newrule["internal_ip"] = destination_ip -X -X if rules["type"] == "staticnatrules": -X newrule["type"] = "staticnat" -X elif rules["type"] == "forwardrules": -X newrule["type"] = "forward" -X newrule["public_ports"] = rule["source_port_range"] -X newrule["internal_ports"] = rule["destination_port_range"] -X newrule["protocol"] = rule["protocol"] -X -X if not revoke: -X if rules["type"] == "staticnatrules": -X dbag[source_ip] = [newrule] -X elif rules["type"] == "forwardrules": -X index = -1 -X if source_ip in dbag.keys(): -X for forward in dbag[source_ip]: -X if ruleCompare(forward, newrule): -X index = dbag[source_ip].index(forward) -X if not index == -1: -X dbag[source_ip][index] = newrule -X else: -X dbag[source_ip].append(newrule) -X else: -X dbag[source_ip] = [newrule] -X else: -X if rules["type"] == "staticnatrules": -X if source_ip in dbag.keys(): -X del dbag[source_ip] -X elif rules["type"] == "forwardrules": -X if source_ip in dbag.keys(): -X index = -1 -X for forward in dbag[source_ip]: -X if ruleCompare(forward, newrule): -X index = dbag[source_ip].index(forward) -X print "removing index %s" % str(index) -X if not index == -1: -X del dbag[source_ip][index] -X -X return dbag -X -X -# Compare function checks only the public side, those must be equal the internal details could change -def ruleCompare(ruleA, ruleB): -X if not ruleA["type"] == ruleB["type"]: -X return False -X if ruleA["type"] == "staticnat": -X return ruleA["public_ip"] == ruleB["public_ip"] -X elif ruleA["type"] == "forward": -X return ruleA["public_ip"] == ruleB["public_ip"] and ruleA["public_ports"] == ruleB["public_ports"] \ -X and ruleA["protocol"] == ruleB["protocol"] -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_forwardingrules.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py': 'MD5 check failed' - ) << \SHAR_EOF -278288da98263d674e9d0d0aecaca56d cloud_scripts/opt/cloud/bin/cs_forwardingrules.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py'` -ne 3239 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_forwardingrules.py' is not 3239" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpc_netusage.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_netusage.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_netusage.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -source /root/func.sh -source /opt/cloud/bin/vpc_func.sh -X -vpnoutmark="0x525" -vpninmark="0x524" -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s -[c|g|r|n|d] [-l ] [-v ] \n" $(basename $0) >&2 -} -X -create_usage_rules () { -X iptables-save|grep "NETWORK_STATS_$ethDev" > /dev/null -X if [ $? -gt 0 ] -X then -X iptables -N NETWORK_STATS_$ethDev > /dev/null; -X iptables -I FORWARD -j NETWORK_STATS_$ethDev > /dev/null; -X iptables -A NETWORK_STATS_$ethDev -o $ethDev -s $vcidr > /dev/null; -X iptables -A NETWORK_STATS_$ethDev -i $ethDev -d $vcidr > /dev/null; -X fi -X return $? -} -X -create_vpn_usage_rules () { -X iptables-save|grep "VPN_STATS_$ethDev" > /dev/null -X if [ $? -gt 0 ] -X then -X iptables -t mangle -N VPN_STATS_$ethDev > /dev/null; -X iptables -t mangle -I FORWARD -j VPN_STATS_$ethDev > /dev/null; -X iptables -t mangle -A VPN_STATS_$ethDev -o $ethDev -m mark --mark $vpnoutmark > /dev/null; -X iptables -t mangle -A VPN_STATS_$ethDev -i $ethDev -m mark --mark $vpninmark > /dev/null; -X fi -X return $? -} -X -remove_usage_rules () { -X return 0 -} -X -get_usage () { -X iptables -L NETWORK_STATS_$ethDev -n -v -x 2> /dev/null | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null -X return 0 -} -X -get_vpn_usage () { -X iptables -t mangle -L VPN_STATS_$ethDev -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null -X if [ $? -gt 0 ] -X then -X printf $? -X return 1 -X fi -} -X -reset_usage () { -X iptables -Z NETWORK_STATS_$ethDev > /dev/null -X if [ $? -gt 0 -a $? -ne 2 ] -X then -X return 1 -X fi -} -X -#set -x -X -cflag= -gflag= -rflag= -lflag= -vflag= -nflag= -dflag= -X -while getopts 'cgndrl:v:' OPTION -do -X case $OPTION in -X c) cflag=1 -X ;; -X g) gflag=1 -X ;; -X r) rflag=1 -X ;; -X l) lflag=1 -X publicIp="$OPTARG" -X ;; -X v) vflag=1 -X vcidr="$OPTARG" -X ;; -X n) nflag=1 -X ;; -X d) dflag=1 -X ;; -X i) #Do nothing, since it's parameter for host script -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -ethDev=$(getEthByIp $publicIp) -if [ "$cflag" == "1" ] -then -X if [ "$ethDev" != "" ] -X then -X create_usage_rules -X create_vpn_usage_rules -X unlock_exit 0 $lock $locked -X fi -fi -X -if [ "$gflag" == "1" ] -then -X get_usage -X unlock_exit $? $lock $locked -fi -X -if [ "$nflag" == "1" ] -then -X #get_vpn_usage -X unlock_exit $? $lock $locked -fi -X -if [ "$dflag" == "1" ] -then -X #remove_usage_rules -X unlock_exit 0 $lock $locked -fi -X -if [ "$rflag" == "1" ] -then -X reset_usage -X unlock_exit $? $lock $locked -fi -X -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_netusage.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh': 'MD5 check failed' - ) << \SHAR_EOF -f3f8069de696e92a24cbc694275c0bd5 cloud_scripts/opt/cloud/bin/vpc_netusage.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh'` -ne 3377 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_netusage.sh' is not 3377" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/configure.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/configure.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/configure.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/configure.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/configure.py -M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&-E<'0@24]%2@I"B`@("`@("`@ -M("`@("`@("`@("`@9W5E22R)$;VU57U)E<75E&-E<'0@17AC97!T:6]N(&%S -M(&4Z"B`@("`@("`@("`@("`@("`@("`@;&]G9VEN9RYE7!E)UT@/3T@)V%L;"<@86YD(&]B -M:ELG7!E(#T@(F%N>2(*("`@("`@("`@("`@:68@ -M(FEC;7!?='EP92(@:6X@7,H*2!A;F0@7!E)UT*("`@("`@("`@("`@:68@(FEC -M;7!?8V]D92(@:6X@7,H*2!A;F0@7!E)UTL('-E;&8N7!E("5S("UJ("5S(B`E("AI8VUP7W1Y<&4L('-E;&8N&5C=71E*&1S=$EP2==.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U -M;&5;)V%C=&EO;B==(#T@(D%#0T505"(*("`@("`@("`@("`@("`@("`@("!E -M;'-E.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5;)V%C=&EO -M;B==(#T@(D123U`B"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@ -M("`@("`@("`@(",@1F]R(&]T:&5R(')U;&5S(&%D9&5D+"!I9B!D969A=6QT -M7V5G7!E("5S(B`E(&EC;7!?='EP90H@("`@("`@("`@ -M("`@("`@96QI9B!R=6QE6R=P7!E+B!3;RP@:71S(&9W(&%T=')I8G5T92!I7!E -M(#T@(F%N>2(*("`@("`@("`@("`@("`@('-E;&8N<')O=&]C;VP@/2!S96QF -M+G1Y<&4*("`@("`@("`@("`@("`@(&EF(")I8VUP7W1Y<&4B(&EN(')U;&4N -M:V5Y7!E+"!R=6QE6R=I8VUP7V-O9&4G72D*("`@("`@("`@("`@("`@(&EF('-E -M;&8N='EP92`]/2`B<')O=&]C;VPB.@H@("`@("`@("`@("`@("`@("`@(&EF -M(')U;&5;)W!R;W1O8V]L)UT@/3T@-#$Z"B`@("`@("`@("`@("`@("`@("`@ -M("`@(')U;&5;)W!R;W1O8V]L)UT@/2`B:7!V-B(*("`@("`@("`@("`@("`@ -M("`@("!S96QF+G!R;W1O8V]L(#T@&5C=71E*")I -M<'1A8FQE+4$O:7!T86)L97,@+70@9FEL=&5R("U$+V&5C=71E -M*")I<'-E="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\ -M(&EP&5C=71E*")I<'-E -M="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP2!V86QI9"!D871A"B`@("`@("`@("`@("`@("!I9B!F;VQD97(@(3T@(G5S -M97)D871A(B!A;F0@9F]L9&5R("$](")M971A9&%T82(Z"B`@("`@("`@("`@ -M("`@("`@("`@8V]N=&EN=64*"B`@("`@("`@("`@("`@("!I9B!F:6QE(#T] -M("(B.@H@("`@("`@("`@("`@("`@("`@(&-O;G1I;G5E"@H@("`@("`@("`@ -M("`@("`@7,N97AI="@Q*0H@("`@("`@("`@("!I9B!O2Q!;&QO=UQN1&5N>2!F2!E>&ES=',L('=E(&1O(&ET('1H -M:7,@=V%Y(&9O7,N97AI -M="@Q*0H*("`@("`@("!F:"`](&]P96XH:'1A8V-E2`] -M(")297=R:71E4G5L92!>;65T82UD871A+R@N*RDD("`N+B\B("L@9F]L9&5R -M("L@(B\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%=(@H@("`@("`@("`@ -M("!H=&%C8V5S7,N97AI="@Q -M*2`@(R!&25A-10H@("`@("`@(')E='5R;B!4&ET*#$I("`C($9)6$U%"B`@("`@("`@:7!S96,N=G!N+2@N*BDN8V]N9B(L(&9I;&4I"B`@ -M("`@("`@("`@(&EF(&TZ"B`@("`@("`@("`@("`@("!S96QF+F-O;F9I<',N -M87!P96YD*&TN9W)O=7`H,2DI"@H@("`@("`@(&9O&5C=71E*")I -M<'-E8R!R96QO860B*0H*("`@(&1E9B!C;VYF:6=U#4R-2`M:B!!0T-%4%0B("4@9&5V72D* -M("`@("`@("!F;W(@;F5T(&EN(&]B:ELG<&5E&UA&UA5]I<"=="B`@("`@("`@<&5E7!E/71U;FYE;"(I -M"B`@("`@("`@9FEL92YA9&1E<2@B(&%U=&AB>3US96-R970B*0H@("`@("`@ -M(&9I;&4N861D97$H(B!K97EE>&-H86YG93UI:V4B*0H@("`@("`@(&9I;&4N -M861D97$H(B!I:V4])7,B("4@:6ME<&]L:6-Y*0H@("`@("`@(&9I;&4N861D -M97$H(B!I:V5L:69E=&EM93TE3TS,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1T:6UE;W5T -M/3$R,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1A8W1I;VX]')A;F=E*#,I.@H@("`@("`@("`@ -M("!R97-U;'0@/2!#&5C=71E*"=I<'-E8R!S=&%T=7,@=G!N -M+25S('P@9W)E<"`B)7,B)R`E("AR:6=H='!E97(L('!E97)L:7-T+G-P;&ET -M*"(L(BP@,2E;,%TI*0H@("`@("`@("`@("!I9B!L96XH2P@)R,G*0H@("`@("`@(&EF(&YO="!U&5C=71E*")T9&)D=6UP("]V87(O&5C=71E*"=K:6QL("TY("5S)R`E('!I9"D*"@IC;&%S -M&5C=71E*")S>7-T96UC=&P@2YS96-R971S(B`E("AS96QF+E903D-/3D9$25(I"B`@ -M("`@("`@>&PR='!D8V]N9F9I;&4@/2`B+V5T8R]X;#)T<&0O>&PR='!D+F-O -M;F8B"B`@("`@("`@>&PR='!O<'1I;VYS9FEL92`]("(O971C+W!P<"]O<'1I -M;VYS+GAL,G1P9"(*"B`@("`@("`@;&]C86QI<"`](&]B:ELG;&]C86Q?:7`G -M70H@("`@("`@(&QO8V%L8VED2`Z(%!32R!<(B5S7"(B("4@*&QE9G0L('!S:RDI"B`@ -M("`@("`@&PR='!D8V]N9F9I;&4I"B`@("`@("`@>&PR='!D8V]N9BYA9&1E -M<2@B:7`@&PR='!O<'1I;VYS+F-O;6UI="@I"@H@("`@9&5F(')E;6]T96%C8V5S -M2@I"B`@("`@("`@4EP -M*')U;&5;)W!U8FQI8U]I<"==*0H@("`@("`@(&EN=&5R;F%L7V9W:6YT97)F -M86-E(#T@4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI -M"B`@("`@("`@<'5B;&EC7V9W<&]R=',@/2!S96QF+G!O4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI -M+`H@("`@("`@("`@("`@("`@&UA2(Z"B`@("`@("`@("`@(&9W7W!R97)O=71? -M2(Z"B`@("`@ -M("`@("`@(&9W7W!O2(Z"B`@("`@("`@ -M("`@(&9W7W!O2(Z"B`@("`@ -M("`@("`@(&9W7V]U='!U=%]R=6QE("L]("(@+2UD<&]R="`E2(Z"B`@("`@("`@("`@ -M(&9W7V]U='!U=%]R=6QE("L]("(Z(B`K('-E;&8N<&]R='-4;U-T4EP*')U;&5;)VEN=&5R;F%L7VEP -M)UTI+`H@("`@("`@("`@("`@("`@&9F9F9F9F9F -M("TM8W1M87-K(#!X9F9F9F9F9F8B("4*("`@("`@("`@("`@("`@("`@("`@ -M("`@4EP*')U;&5;(FEN=&5R;F%L -M7VEP(ETI+"!S96QF+F=E=$=U97-T27`H*2E=*0H*"F-L87-S($EP5&%B;&5S -M17AE8W5T;W(Z"@H@("`@8V]N9FEG(#T@3F]N90H*("`@(&1E9B!?7VEN:71? -M7RAS96QF+"!C;VYF:62!PR)P&5C=71OR)P&5C=71OR)P&5C=71O7!E.B`E&5C27!T86)L97,H8V]N9FEG -M*3H*("`@("`@("!L;V=G:6YG+F1E8G5G*")0&5C=71O7,H*3H*("`@("`@("`@ -M("`@97AE8T1A=&%B86&5C -M27!T86)L97,H8V]N9FEG*0H@("`@96QI9B!J&5C27!T86)L -M97,H8V]N9FEG*0H@("`@96QS93H*("`@("`@("!L;V=G:6YG+G=A7!E/25S(B`E("AP/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/configure.py': 'MD5 check failed' - ) << \SHAR_EOF -8987217852a386250687dfce6d0b10be cloud_scripts/opt/cloud/bin/configure.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/configure.py'` -ne 45920 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/configure.py' is not 45920" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_vmp.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vmp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vmp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vmp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_vmp.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=WWT*("`@(')C6R=I9"==(#T@)W9M<&%S/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vmp.py': 'MD5 check failed' - ) << \SHAR_EOF -3e1ea6831cb27eedc825e25bf817cb9c cloud_scripts/opt/cloud/bin/cs_vmp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vmp.py'` -ne 1126 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vmp.py' is not 1126" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# getRouterMonitorResults.sh --- Send the monitor results to Management Server -X -if [ "$1" == "true" ] -then -X python /root/monitorServices.py > /dev/null -fi -X -printf "FAILING CHECKS:\n" -X -if [ -f /root/basic_failing_health_checks ] -then -X echo `cat /root/basic_failing_health_checks` -fi -X -if [ -f /root/advanced_failing_health_checks ] -then -X echo `cat /root/advanced_failing_health_checks` -fi -X -printf "MONITOR RESULTS:\n" -X -echo "{\"basic\":" -if [ -f /root/basic_monitor_results.json ] -then -X echo `cat /root/basic_monitor_results.json` -else -X echo "{}" -fi -echo ",\"advanced\":" -if [ -f /root/advanced_monitor_results.json ] -then -X echo `cat /root/advanced_monitor_results.json` -else -X echo "{}" -fi -X -echo "}" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh': 'MD5 check failed' - ) << \SHAR_EOF -35649a8a1a8339aaa42a311826699849 cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh'` -ne 1526 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/getRouterMonitorResults.sh' is not 1526" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vr_cfg.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vr_cfg.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vr_cfg.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -#set -x -X -cfg= -version= -log=/var/log/cloud.log -X -log_it() { -X logger -t cloud "$*" -X echo "$(date) : $*" >> $log -} -X -while getopts 'c:' OPTION; do -X case $OPTION in -X c) cfg="$OPTARG" ;; -esac; done -X -export DEFER_CONFIG=true -while read line; do -X #comment -X if [[ $line == \#* ]]; then -X continue -X -X elif [ "$line" == "" ]; then -X read line -X version=$line -X log_it "VR config: configuation format version $version" -X #skip -X read line -X -X elif [ "$line" == " -X read line -X log_it "VR config: execution success " -X -X elif [ "$line" == "" ]; then -X read line -X file=$line -X log_it "VR config: creating file: $file" -X rm -f $file -X while read -r line; do -X if [ "$line" == "" ]; then -X break -X fi -X echo $line >> $file -X done -X log_it "VR config: create file success" -X -X fi -X -done < $cfg -X -# archive the configuration file -mv $cfg /var/cache/cloud/processed/ -X -unset DEFER_CONFIG -# trigger finish_config() -if [ -f /etc/cloudstack/dhcpentry.json ]; then -X /opt/cloud/bin/configure.py vm_dhcp_entry.json -fi -if [ -f /etc/cloudstack/vmdata.json ]; then -X /opt/cloud/bin/configure.py vm_metadata.json -fi -X -# Flush kernel conntrack table -log_it "VR config: Flushing conntrack table" -conntrackd -d 2> /dev/null -if [ $? -eq 0 ]; then -X conntrackd -F -X conntrackd -k -else -X conntrackd -F -fi -log_it "VR config: Flushing conntrack table completed" -X -Xexit 0 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vr_cfg.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vr_cfg.sh': 'MD5 check failed' - ) << \SHAR_EOF -da02bd413616a9cc131fd039e627eb3e cloud_scripts/opt/cloud/bin/vr_cfg.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vr_cfg.sh'` -ne 2725 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vr_cfg.sh' is not 2725" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpc_snat.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_snat.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_snat.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# @VERSION@ -X -source /root/func.sh -source /opt/cloud/bin/vpc_func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage:\n %s -A -l \n" $(basename $0) >&2 -X printf " %s -D -l \n" $(basename $0) >&2 -} -X -X -add_snat() { -X logger -t cloud "$(basename $0):Added SourceNAT $pubIp on interface $ethDev" -X vpccidr=$(getVPCcidr) -X sudo iptables -D FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT -X sudo iptables -A FORWARD -s $vpccidr ! -d $vpccidr -j ACCEPT -X sudo iptables -t nat -D POSTROUTING -j SNAT -o $ethDev --to-source $pubIp -X sudo iptables -t nat -A POSTROUTING -j SNAT -o $ethDev --to-source $pubIp -X return $? -} -remove_snat() { -X logger -t cloud "$(basename $0):Removing SourceNAT $pubIp on interface $ethDev" -X sudo iptables -t nat -D POSTROUTING -j SNAT -o $ethDev --to-source $pubIp -X return $? -} -X -#set -x -lflag=0 -cflag=0 -op="" -X -while getopts 'ADl:c:' OPTION -do -X case $OPTION in -X A) Aflag=1 -X op="-A" -X ;; -X D) Dflag=1 -X op="-D" -X ;; -X l) lflag=1 -X pubIp="$OPTARG" -X ;; -X c) cflag=1 -X ethDev="$OPTARG" -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [ "$Aflag$Dflag" != "1" ] -then -X usage -X unlock_exit 2 $lock $locked -fi -X -if [ "$lflag$cflag" != "11" ] -then -X usage -X unlock_exit 2 $lock $locked -fi -X -if [ "$Aflag" == "1" ] -then -X add_snat $publicIp -X unlock_exit $? $lock $locked -fi -X -if [ "$Dflag" == "1" ] -then -X remove_sat $publicIp -X unlock_exit $? $lock $locked -fi -X -unlock_exit 1 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_snat.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_snat.sh': 'MD5 check failed' - ) << \SHAR_EOF -23502a2ce3829fb787464124f13b9141 cloud_scripts/opt/cloud/bin/vpc_snat.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_snat.sh'` -ne 2346 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_snat.sh' is not 2346" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpc_staticroute.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_staticroute.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_staticroute.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# @VERSION@ -X -source /root/func.sh -source /opt/cloud/bin/vpc_func.sh -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s: -a < routes > \n" $(basename $0) >&2 -} -X -#set -x -X -flush_table_backup() { -X flush_table "static_route_back" -} -X -flush_table() { -X local tab=$1 -X sudo ip route flush table $tab -} -X -copy_table() { -X local from=$1 -X local to=$2 -X sudo ip route show table $from | while read route -X do -X sudo ip route add table $to $route -X done -} -X -backup_table() { -X flush_table "static_route_back" -X copy_table "static_route" "static_route_back" -X flush_table "static_route" -} -X -restore_table() { -X flush_table "static_route" -X copy_table "static_route_back" "static_route" -X flush_table "static_route_back" -} -X -static_route() { -X local rule=$1 -X local ip=$(echo $rule | cut -d: -f1) -X if [ $ip == "Revoke" ] -X then -X return 0 -X fi -X local gateway=$(echo $rule | cut -d: -f2) -X local cidr=$(echo $rule | cut -d: -f3) -X logger -t cloud "$(basename $0): static route: public ip=$ip \ -X gateway=$gateway cidr=$cidr" -X local dev=$(getEthByIp $ip) -X if [ $? -gt 0 ] -X then -X return 1 -X fi -X sudo ip route add $cidr dev $dev via $gateway table static_route &>/dev/null -X result=$? -X logger -t cloud "$(basename $0): done static route: public ip=$ip \ -X gateway=$gateway cidr=$cidr" -X return $result -} -X -gflag= -aflag= -while getopts 'a:' OPTION -X -do -X case $OPTION in -X a) aflag=1 -X rules="$OPTARG" -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [ -n "$rules" ] -then -X rules_list=$(echo $rules | cut -d, -f1- --output-delimiter=" ") -fi -X -success=0 -X -backup_table -X -for r in $rules_list -do -X static_route $r -X success=$? -X if [ $success -gt 0 ] -X then -X logger -t cloud "$(basename $0): failure to apply fw rules for guest network: $gcidr" -X break -X else -X logger -t cloud "$(basename $0): successful in applying fw rules for guest network: $gcidr" -X fi -done -X -if [ $success -gt 0 ] -then -X logger -t cloud "$(basename $0): restoring from backup for guest network: $gcidr" -X restore_table -else -X logger -t cloud "$(basename $0): deleting backup for guest network: $gcidr" -X flush_table_backup -fi -unlock_exit $success $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_staticroute.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh': 'MD5 check failed' - ) << \SHAR_EOF -4080c04ff7600874ef4a4364aefc4d18 cloud_scripts/opt/cloud/bin/vpc_staticroute.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh'` -ne 3043 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_staticroute.sh' is not 3043" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/baremetal-vr.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/baremetal-vr.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/baremetal-vr.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/baremetal-vr.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/baremetal-vr.py -M(TQI8V5N6ME>2<@:6X@<#H*("`@("`@("`@("`@("`@("`@("`@("`@ -M2`]('`N6ME>2!I;B`E0H*("`@(&1E -M9B!?9V5T7VUG;71?:7`H4)AFEP*')E<7,N:V5Y2P@:&%S:%-T5]P/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/baremetal-vr.py': 'MD5 check failed' - ) << \SHAR_EOF -f87e8890aa7ad3cc522c5c5ceb2fbf69 cloud_scripts/opt/cloud/bin/baremetal-vr.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/baremetal-vr.py'` -ne 5587 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/baremetal-vr.py' is not 5587" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_firewallrules.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_firewallrules.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_firewallrules.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import copy -X -X -def merge(dbag, data): -X dbagc = copy.deepcopy(dbag) -X if "rules" not in data: -X return dbagc -X for rule in data['rules']: -X id = str(rule['id']) -X if rule['revoked']: -X if id in dbagc.keys(): -X del(dbagc[id]) -X elif id not in dbagc.keys(): -X dbagc[id] = rule -X return dbagc -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_firewallrules.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py': 'MD5 check failed' - ) << \SHAR_EOF -6d3faf49679b84bf9a098eee6b630f69 cloud_scripts/opt/cloud/bin/cs_firewallrules.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py'` -ne 1141 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_firewallrules.py' is not 1141" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/netusage.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/netusage.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/netusage.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/netusage.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/netusage.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -X -# netusage.sh -- create iptable rules to gather network stats, running within DomR -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s -[c|g|r] [-[a|d] ]\n" $(basename $0) >&2 -} -X -create_usage_rules () { -X iptables-save|grep "INPUT -j NETWORK_STATS" > /dev/null -X if [ $? -eq 0 ] -X then -X return $? -X fi -X iptables -N NETWORK_STATS > /dev/null -X iptables -I FORWARD -j NETWORK_STATS > /dev/null -X iptables -I INPUT -j NETWORK_STATS > /dev/null -X iptables -I OUTPUT -j NETWORK_STATS > /dev/null -X iptables -A NETWORK_STATS -i eth0 -o eth2 > /dev/null -X iptables -A NETWORK_STATS -i eth2 -o eth0 > /dev/null -X iptables -A NETWORK_STATS -o eth2 ! -i eth0 -p tcp > /dev/null -X iptables -A NETWORK_STATS -i eth2 ! -o eth0 -p tcp > /dev/null -X return $? -} -X -add_public_interface () { -X local pubIf=$1 -X iptables-save|grep "NETWORK_STATS -i eth0 -o $pubIf" > /dev/null -X if [ $? -eq 0 ] -X then -X return $? -X fi -X iptables -A NETWORK_STATS -i eth0 -o $pubIf > /dev/null -X iptables -A NETWORK_STATS -i $pubIf -o eth0 > /dev/null -X iptables -A NETWORK_STATS -o $pubIf ! -i eth0 -p tcp > /dev/null -X iptables -A NETWORK_STATS -i $pubIf ! -o eth0 -p tcp > /dev/null -X return $? -} -X -delete_public_interface () { -X local pubIf=$1 -X echo $pubIf >> /root/removedVifs -X return $? -} -X -get_usage () { -X iptables -L NETWORK_STATS -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null -X if [ -f /root/removedVifs ] ; then iptables -Z NETWORK_STATS ; fi; > /dev/null -X /root/clearUsageRules.sh > /dev/null -X if [ $? -gt 0 -a $? -ne 2 ] -X then -X printf $? -X return 1 -X fi -} -X -reset_usage () { -X iptables -Z NETWORK_STATS > /dev/null -X if [ $? -gt 0 -a $? -ne 2 ] -X then -X return 1 -X fi -} -X -#set -x -X -cflag= -gflag= -rflag= -iflag= -aflag= -dflag= -X -while getopts 'cgria:d:' OPTION -do -X case $OPTION in -X c) cflag=1 -X ;; -X g) gflag=1 -X ;; -X r) rflag=1 -X ;; -X a) aflag=1 -X publicIf="$OPTARG" -X ;; -X d) dflag=1 -X publicIf="$OPTARG" -X ;; -X i) #Do nothing, since it's parameter for host script -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [ "$cflag" == "1" ] -then -X #create_usage_rules -X unlock_exit $? $lock $locked -fi -X -if [ "$gflag" == "1" ] -then -X get_usage -X unlock_exit $? $lock $locked -fi -X -if [ "$rflag" == "1" ] -then -X reset_usage -X unlock_exit $? $lock $locked -fi -X -if [ "$aflag" == "1" ] -then -X #add_public_interface $publicIf -X unlock_exit $? $lock $locked -fi -X -if [ "$dflag" == "1" ] -then -X #delete_public_interface $publicIf -X unlock_exit $? $lock $locked -fi -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/netusage.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/netusage.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/netusage.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/netusage.sh': 'MD5 check failed' - ) << \SHAR_EOF -2966c6cafee62e66ff903e53367b498b cloud_scripts/opt/cloud/bin/netusage.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/netusage.sh'` -ne 3478 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/netusage.sh' is not 3478" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/monitor_service.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/monitor_service.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/monitor_service.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/monitor_service.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/monitor_service.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -set -x -usage() { -X printf "Usage: %s: -c config string \n" $(basename $0) >&2 -} -X -configFile='/etc/monitor.conf' -X -create_config() { -services=$1; -services_list=$(echo $services | cut -d, -f1- --output-delimiter=" "); -X -echo "#Monitor services config" >$configFile -X -for s in $services_list -do -service=$(echo $s | cut -d: -f1); -processname=$(echo $s | cut -d: -f2); -service_name=$(echo $s | cut -d: -f3); -pidfile=$(echo $s | cut -d: -f4); -X -echo "$service" >> $configFile; -echo $processname >> $configFile -echo $service_name >> $configFile -echo $pidfile >> $configFile -X -done -X -} -X -config=$2 -if [ -n "$3" ] -then -X -#delete cron job before updating config file -crontab -l|grep "monitorServices.py" -X -if [ $? -eq 0 ] -then -X t=`date +%s`; -X touch /tmp/monitor-$t.txt; -X conf=/tmp/monitor-$t.txt -X crontab -l >$conf -X sed -i /#monitoringConfig/,+3d $conf -X crontab $conf -X rm $conf -fi -X -X -logger -t cloud "deleted crontab entry for monitoring services" -unlock_exit 0 $lock $locked -fi -X -create_config $config -X -#add cron job -crontab -l|grep "monitorServices.py" -if [ $? -ne 0 ] -X then -X (crontab -l ;echo -e "#monitoringConfig\nSHELL=/bin/bash\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n */3 * * * * /usr/bin/python /root/monitorServices.py") | crontab - -X logger -t cloud "added crontab entry for monitoring services" -fi -X -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/monitor_service.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/monitor_service.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/monitor_service.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/monitor_service.sh': 'MD5 check failed' - ) << \SHAR_EOF -3419e7baf45ac36d3d69ca71ef7ab978 cloud_scripts/opt/cloud/bin/monitor_service.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/monitor_service.sh'` -ne 2294 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/monitor_service.sh' is not 2294" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_ip.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_ip.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_ip.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_ip.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_ip.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N7!E)UT@/2!I<%LG;G=?='EP92==+FQO=V5R*"D*("`@(&EF(&EP -M6R=N=U]T>7!E)UT@/3T@)V-O;G1R;VPG.@H@("`@("`@(&1B86=;:7!;)V1E -M=FEC92==72`](%MI<%T*("`@(&5L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_ip.py': 'MD5 check failed' - ) << \SHAR_EOF -856c6261f2876c280c49fa486f4f7408 cloud_scripts/opt/cloud/bin/cs_ip.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_ip.py'` -ne 2581 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_ip.py' is not 2581" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/bumpup_priority.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/bumpup_priority.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/bumpup_priority.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -touch /tmp/rrouter_bumped -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/bumpup_priority.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh': 'MD5 check failed' - ) << \SHAR_EOF -35091259ed848a9f7270aca1a90e95af cloud_scripts/opt/cloud/bin/bumpup_priority.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh'` -ne 824 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/bumpup_priority.sh' is not 824" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/getRouterAlerts.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/getRouterAlerts.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/getRouterAlerts.sh (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/getRouterAlerts.sh -M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5LP77T*"B`@("`@("`@("`@ -M("`@("!T;T1A=&5686P])"AD871E("UD("(D9&%T979A;"(@(BLE/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh': 'MD5 check failed' - ) << \SHAR_EOF -6c3803100b0923fd3f9017a0e09d6fd5 cloud_scripts/opt/cloud/bin/getRouterAlerts.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh'` -ne 1706 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/getRouterAlerts.sh' is not 1706" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/postinit.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/postinit.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/postinit.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# This scripts before ssh.service but after cloud-early-config -X -# Eject cdrom if any -eject || true -X -# Restart journald for setting changes to apply -systemctl restart systemd-journald -X -TYPE=$(grep -Po 'type=\K[a-zA-Z]*' /var/cache/cloud/cmdline) -if [ "$TYPE" == "router" ] || [ "$TYPE" == "vpcrouter" ] || [ "$TYPE" == "dhcpsrvr" ] -then -X if [ -x /opt/cloud/bin/update_config.py ] -X then -X /opt/cloud/bin/update_config.py cmd_line.json || true -X fi -fi -X -[ ! -f /var/cache/cloud/enabled_svcs ] && touch /var/cache/cloud/enabled_svcs -for svc in $(cat /var/cache/cloud/enabled_svcs) -do -X systemctl enable --now --no-block $svc -done -X -[ ! -f /var/cache/cloud/disabled_svcs ] && touch /var/cache/cloud/disabled_svcs -for svc in $(cat /var/cache/cloud/disabled_svcs) -do -X systemctl disable --now --no-block $svc -done -X -# Restore the persistent iptables nat, rules and filters for IPv4 and IPv6 if they exist -ipv4="/etc/iptables/rules.v4" -if [ -e $ipv4 ] -then -X iptables-restore < $ipv4 -fi -X -ipv6="/etc/iptables/rules.v6" -if [ -e $ipv6 ] -then -X ip6tables-restore < $ipv6 -fi -X -# Patch known systemd/sshd memory leak - https://github.com/systemd/systemd/issues/8015#issuecomment-476160981 -echo '@include null' >> /etc/pam.d/systemd-user -X -# Enable and Start SSH -systemctl enable --now --no-block ssh -X -date > /var/cache/cloud/boot_up_done -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/postinit.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/postinit.sh': 'MD5 check failed' - ) << \SHAR_EOF -170afadf6f130e9cb697dca65a87aacb cloud_scripts/opt/cloud/bin/setup/postinit.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/postinit.sh'` -ne 2122 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' is not 2122" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/secstorage.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/secstorage.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/secstorage.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_secstorage() { -X log_it "Setting up secondary storage system vm" -X -X echo "cloud apache2 nfs-common portmap" > /var/cache/cloud/enabled_svcs -X echo "conntrackd keepalived haproxy dnsmasq" > /var/cache/cloud/disabled_svcs -X mkdir -p /var/log/cloud -X -X setup_common eth0 eth1 eth2 -X setup_storage_network -X setup_system_rfc1918_internal -X -X log_it "Setting up entry in hosts" -X sed -i /$NAME/d /etc/hosts -X public_ip=`getPublicIp` -X echo "$public_ip $NAME" >> /etc/hosts -X -X log_it "Applying iptables rules" -X cp /etc/iptables/iptables-secstorage /etc/iptables/rules.v4 -X -X log_it "Configuring sshd" -X local hyp=$HYPERVISOR -X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then -X setup_sshd $ETH1_IP "eth1" -X else -X setup_sshd $ETH0_IP "eth0" -X fi -X -X log_it "Configuring apache2" -X setup_apache2 $ETH2_IP -X -X # Deprecated, should move to Cs Python all of it -X sed -e "s///" \ -X -e "s///" \ -X -e "s/Listen .*:8180/Listen $ETH2_IP:80/g" \ -X -e "s/Listen .*:8443/Listen $ETH2_IP:443/g" /etc/apache2/vhost.template > /etc/apache2/sites-enabled/vhost-${ETH2_IP}.conf -X -X log_it "Setting up apache2 for post upload of volume/template" -X a2enmod proxy -X a2enmod proxy_http -X a2enmod headers -X -X cat >/etc/apache2/cors.conf </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh': 'MD5 check failed' - ) << \SHAR_EOF -14aea171a5e0fdfd3069bb96bde91e0b cloud_scripts/opt/cloud/bin/setup/secstorage.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh'` -ne 2720 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' is not 2720" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/ilbvm.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -ilbvm_svcs() { -X echo "haproxy" > /var/cache/cloud/enabled_svcs -X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs -} -X -setup_ilbvm() { -X log_it "Setting up Internal Load Balancer system vm" -X setup_common eth0 eth1 -X #eth0 = guest network, eth1=control network -X -X sed -i /$NAME/d /etc/hosts -X echo "$ETH0_IP $NAME" >> /etc/hosts -X -X cp /etc/iptables/iptables-ilbvm /etc/iptables/rules.v4 -X setup_sshd $ETH1_IP "eth1" -X -X enable_fwding 0 -X enable_irqbalance 1 -} -X -ilbvm_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute ilbvm svcs" -X exit 1 -fi -setup_ilbvm -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/ilbvm.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh': 'MD5 check failed' - ) << \SHAR_EOF -87c70bdf6c0d4d41f0ff87475494188f cloud_scripts/opt/cloud/bin/setup/ilbvm.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh'` -ne 1442 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' is not 1442" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_vpcrouter() { -X log_it "Setting up VPC virtual router system vm" -X -X if [ -f /etc/hosts ]; then -X grep -q $NAME /etc/hosts || echo "127.0.0.1 $NAME" >> /etc/hosts; -X fi -X -X cat > /etc/network/interfaces << EOF -auto lo eth0 -iface lo inet loopback -EOF -X setup_interface "0" $ETH0_IP $ETH0_MASK $GW -X -X echo $NAME > /etc/hostname -X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon -X hostnamectl set-hostname $NAME -X -X #Nameserver -X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries -X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries -X if [ -n "$internalNS1" ] -X then -X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS1" > /etc/resolv.conf -X fi -X -X if [ -n "$internalNS2" ] -X then -X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS2" >> /etc/resolv.conf -X fi -X if [ -n "$NS1" ] -X then -X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS1" >> /etc/resolv.conf -X fi -X -X if [ -n "$NS2" ] -X then -X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS2" >> /etc/resolv.conf -X fi -X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] -X then -X if [ "$HYPERVISOR" == "vmware" ] || [ "$HYPERVISOR" == "hyperv" ]; -X then -X ip route add $MGMTNET via $LOCAL_GW dev eth0 -X # workaround to activate vSwitch under VMware -X timeout 3 ping -n -c 3 $LOCAL_GW || true -X fi -X fi -X -X ip route delete default -X # create route table for static route -X -X sudo echo "252 static_route" >> /etc/iproute2/rt_tables 2>/dev/null -X sudo echo "251 static_route_back" >> /etc/iproute2/rt_tables 2>/dev/null -X sudo ip rule add from $VPCCIDR table static_route 2>/dev/null -X sudo ip rule add from $VPCCIDR table static_route_back 2>/dev/null -X -X setup_vpc_apache2 -X -X enable_irqbalance 1 -X enable_vpc_rpsrfs 1 -X disable_rpfilter -X enable_fwding 1 -X enable_passive_ftp 1 -X cp /etc/iptables/iptables-vpcrouter /etc/iptables/rules.v4 -X setup_sshd $ETH0_IP "eth0" -X cp /etc/vpcdnsmasq.conf /etc/dnsmasq.conf -X cp /etc/cloud-nic.rules /etc/udev/rules.d/cloud-nic.rules -X echo "" > /etc/dnsmasq.d/dhcphosts.txt -X echo "dhcp-hostsfile=/etc/dhcphosts.txt" > /etc/dnsmasq.d/cloud.conf -X -X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" -X #DNS server will append $DOMAIN to local queries -X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf -X #answer all local domain queries -X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf -X -X command -v dhcp_release > /dev/null 2>&1 -X no_dhcp_release=$? -X if [ $no_dhcp_release -eq 0 ] -X then -X echo 1 > /var/cache/cloud/dnsmasq_managed_lease -X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf -X else -X echo 0 > /var/cache/cloud/dnsmasq_managed_lease -X fi -X -X # Setup hourly logrotate -X if [ -f /etc/cron.daily/logrotate ]; then -X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 -X fi -} -X -routing_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute routing_svcs" -X exit 1 -fi -setup_vpcrouter -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh': 'MD5 check failed' - ) << \SHAR_EOF -811420d11f97b1d7237b964e8bbbdf5d cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh'` -ne 3885 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' is not 3885" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/router.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/router.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/router.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/router.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/router.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -check_reboot_vmware() { -X if [ "$HYPERVISOR" != "vmware" ]; then -X return -X fi -X -X if [ -n "$MGMTNET" ]; then -X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') -X if ping -n -c 1 -W 3 $MGMT_GW &> /dev/null; then -X log_it "Management gateway pingable, skipping VR reboot" -X return -X fi -X fi -X -X log_it "Management gateway not pingable, rebooting VR" -X sync -X reboot -} -X -setup_router() { -X # To save router public interface and gw ip information -X touch /var/cache/cloud/ifaceGwIp -X -X oldmd5= -X [ -f "/etc/udev/rules.d/70-persistent-net.rules" ] && oldmd5=$(md5sum "/etc/udev/rules.d/70-persistent-net.rules" | awk '{print $1}') -X -X if [ -n "$ETH2_IP" ]; then -X setup_common eth0 eth1 eth2 -X -X if [ -n "$EXTRA_PUBNICS" ]; then -X for ((i = 3; i < 3 + $EXTRA_PUBNICS; i++)); do -X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" -X done -X fi -X else -X setup_common eth0 eth1 -X if [ -n "$EXTRA_PUBNICS" ]; then -X for ((i = 2; i < 2 + $EXTRA_PUBNICS; i++)); do -X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" -X done -X fi -X fi -X -X log_it "Checking udev NIC assignment order changes" -X if [ "$NIC_MACS" != "" ] -X then -X init_interfaces_orderby_macs "$NIC_MACS" "/tmp/interfaces" "/tmp/udev-rules" -X newmd5=$(md5sum "/tmp/udev-rules" | awk '{print $1}') -X rm /tmp/interfaces -X rm /tmp/udev-rules -X -X if [ "$oldmd5" != "$newmd5" ] -X then -X log_it "Reloading udev for new udev NIC assignment" -X udevadm control --reload-rules && udevadm trigger -X check_reboot_vmware -X fi -X fi -X -X setup_aesni -X setup_dnsmasq -X setup_apache2 $ETH0_IP -X -X sed -i /$NAME/d /etc/hosts -X echo "$ETH0_IP $NAME" >> /etc/hosts -X -X enable_irqbalance 1 -X disable_rpfilter_domR -X enable_fwding 1 -X enable_rpsrfs 1 -X enable_passive_ftp 1 -X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 -X setup_sshd $ETH1_IP "eth1" -X -X # Only allow DNS service for current network -X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X -X # Setup hourly logrotate -X if [ -f /etc/cron.daily/logrotate ]; then -X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 -X fi -} -X -routing_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute routing_svcs" -X exit 1 -fi -setup_router -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/router.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/router.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/router.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/router.sh': 'MD5 check failed' - ) << \SHAR_EOF -2ae62d5d44c716730231c9d77618fe91 cloud_scripts/opt/cloud/bin/setup/router.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/router.sh'` -ne 3355 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/router.sh' is not 3355" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/elbvm.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/elbvm.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/elbvm.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -elbvm_svcs() { -X echo "haproxy" > /var/cache/cloud/enabled_svcs -X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs -} -X -setup_elbvm() { -X log_it "Setting up Elastic Load Balancer system vm" -X setup_common eth0 eth1 -X sed -i /$NAME/d /etc/hosts -X public_ip=$ETH2_IP -X [ "$ETH2_IP" == "0.0.0.0" ] || [ "$ETH2_IP" == "" ] && public_ip=$ETH0_IP -X echo "$public_ip $NAME" >> /etc/hosts -X -X cp /etc/iptables/iptables-elbvm /etc/iptables/rules.v4 -X if [ "$SSHONGUEST" == "true" ] -X then -X setup_sshd $ETH0_IP "eth0" -X else -X setup_sshd $ETH1_IP "eth1" -X fi -X -X enable_fwding 0 -X enable_irqbalance 0 -} -X -elbvm_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute elbvm svcs" -X exit 1 -fi -setup_elbvm -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/elbvm.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh': 'MD5 check failed' - ) << \SHAR_EOF -2d34615f1d40f6125a2205e6118ba07f cloud_scripts/opt/cloud/bin/setup/elbvm.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh'` -ne 1578 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' is not 1578" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/bootstrap.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" -CMDLINE=/var/cache/cloud/cmdline -X -rm -f /var/cache/cloud/enabled_svcs -rm -f /var/cache/cloud/disabled_svcs -X -X. /lib/lsb/init-functions -X -log_it() { -X echo "$(date) $@" >> /var/log/cloud.log -X log_action_msg "$@" -} -X -hypervisor() { -X if [ -d /proc/xen ]; then -X mount -t xenfs none /proc/xen -X $(dmesg | grep -q "Xen HVM") -X if [ $? -eq 0 ]; then # 1=PV,0=HVM -X echo "xen-hvm" && return 0 -X else -X echo "xen-pv" && return 0 -X fi -X fi -X -X [ -x /usr/sbin/virt-what ] && local facts=( $(virt-what) ) -X if [ "$facts" != "" ]; then -X # Xen HVM is recognized as Hyperv when Viridian extensions are enabled -X if [ "${facts[-1]}" == "xen-domU" ] && [ "${facts[0]}" == "hyperv" ]; then -X echo "xen-hvm" && return 0 -X else -X echo ${facts[-1]} && return 0 -X fi -X fi -X -X grep -q QEMU /proc/cpuinfo && echo "kvm" && return 0 -X grep -q QEMU /var/log/messages && echo "kvm" && return 0 -X -X vmware-checkvm &> /dev/null && echo "vmware" && return 0 -X -X echo "unknown" && return 1 -} -X -config_guest() { -X [ ! -d /proc/xen ] && sed -i 's/^vc/#vc/' /etc/inittab && telinit q -X [ -d /proc/xen ] && sed -i 's/^#vc/vc/' /etc/inittab && telinit q -X -X systemctl daemon-reload -X -X case $HYPERVISOR in -X xen-pv|xen-domU) -X systemctl stop ntpd -X systemctl disable ntpd -X systemctl enable xe-daemon -X systemctl start xe-daemon -X -X cat /proc/cmdline > $CMDLINE -X sed -i "s/%/ /g" $CMDLINE -X ;; -X xen-hvm) -X systemctl stop ntpd -X systemctl disable ntpd -X systemctl enable xe-daemon -X systemctl start xe-daemon -X -X if [ ! -f /usr/bin/xenstore-read ]; then -X log_it "ERROR: xentools not installed, cannot found xenstore-read" && exit 5 -X fi -X /usr/bin/xenstore-read vm-data/cloudstack/init > $CMDLINE -X sed -i "s/%/ /g" $CMDLINE -X ;; -X kvm) -X # Configure kvm hotplug support -X if grep -E 'CONFIG_HOTPLUG_PCI=y|CONFIG_HOTPLUG_PCI_ACPI=y' /boot/config-`uname -r`; then -X log_it "acpiphp and pci_hotplug module already compiled in" -X else -X modprobe acpiphp 2> /dev/null && log_it "acpiphp module loaded" || true -X modprobe pci_hotplug 2> /dev/null && log_it "pci_hotplug module loaded" || true -X fi -X -X sed -i -e "/^s0:2345:respawn.*/d" /etc/inittab -X sed -i -e "/6:23:respawn/a\s0:2345:respawn:/sbin/getty -L 115200 ttyS0 vt102" /etc/inittab -X systemctl enable qemu-guest-agent -X systemctl start qemu-guest-agent -X -X # Wait for $CMDLINE file to be written by the qemu-guest-agent -X for i in {1..60}; do -X if [ -s $CMDLINE ]; then -X log_it "Received a new non-empty cmdline file from qemu-guest-agent" -X break -X fi -X sleep 1 -X done -X if [ ! -s $CMDLINE ]; then -X log_it "Failed to receive the cmdline file via the qemu-guest-agent" -X fi -X ;; -X vmware) -X # system time sync'd with host via vmware tools -X systemctl stop ntpd -X systemctl disable ntpd -X systemctl enable open-vm-tools -X systemctl start open-vm-tools -X -X vmtoolsd --cmd 'machine.id.get' > $CMDLINE -X ;; -X virtualpc|hyperv) -X # Hyper-V is recognized as virtualpc hypervisor type. Boot args are passed using KVP Daemon -X systemctl enable hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service -X systemctl start hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service -X sleep 5 -X cp -f /var/opt/hyperv/.kvp_pool_0 $CMDLINE -X cat /dev/null > /var/opt/hyperv/.kvp_pool_0 -X ;; -X virtualbox) -X # Virtualbox is used to test the virtual router -X # get the commandline from a dmistring (yes, hacky!) -X dmidecode | grep cmdline | sed 's/^.*cmdline://' > $CMDLINE -X RV=$? -X if [ $RV -ne 0 ] ; then -X log_it "Failed to get cmdline from a virtualbox dmi property" -X fi -X ;; -X esac -X -X # Find and export guest type -X export TYPE=$(grep -Po 'type=\K[a-zA-Z]*' $CMDLINE) -} -X -patch_systemvm() { -X local patchfile=$1 -X local backupfolder="/tmp/.conf.backup" -X local logfile="/var/log/patchsystemvm.log" -X if [ -f /usr/local/cloud/systemvm/conf/cloud.jks ]; then -X rm -fr $backupfolder -X mkdir -p $backupfolder -X cp -r /usr/local/cloud/systemvm/conf/* $backupfolder/ -X fi -X rm /usr/local/cloud/systemvm -rf -X mkdir -p /usr/local/cloud/systemvm -X echo "All" | unzip $patchfile -d /usr/local/cloud/systemvm >$logfile 2>&1 -X find /usr/local/cloud/systemvm/ -name \*.sh | xargs chmod 555 -X if [ -f $backupfolder/cloud.jks ]; then -X cp -r $backupfolder/* /usr/local/cloud/systemvm/conf/ -X echo "Restored keystore file and certs using backup" >> $logfile -X fi -X rm -fr $backupfolder -X # Import global cacerts into 'cloud' service's keystore -X keytool -importkeystore -srckeystore /etc/ssl/certs/java/cacerts -destkeystore /usr/local/cloud/systemvm/certs/realhostip.keystore -srcstorepass changeit -deststorepass vmops.com -noprompt || true -X return 0 -} -X -patch() { -X local PATCH_MOUNT=/media/cdrom -X local logfile="/var/log/patchsystemvm.log" -X if [ "$TYPE" == "consoleproxy" ] || [ "$TYPE" == "secstorage" ] && [ -f ${PATCH_MOUNT}/agent.zip ] && [ -f /var/cache/cloud/patch.required ] -X then -X echo "Patching systemvm for cloud service with mount=$PATCH_MOUNT for type=$TYPE" >> $logfile -X patch_systemvm ${PATCH_MOUNT}/agent.zip -X if [ $? -gt 0 ] -X then -X echo "Failed to apply patch systemvm\n" >> $logfile -X exit 1 -X fi -X fi -X -X rm -f /var/cache/cloud/patch.required -X chmod -x /etc/systemd/system/cloud*.service -X systemctl daemon-reload -X umount $PATCH_MOUNT || true -X -X if [ -f /mnt/cmdline ]; then -X cat /mnt/cmdline > $CMDLINE -X fi -X return 0 -} -X -config_sysctl() { -X # When there is more memory reset the cache back pressure to default 100 -X physmem=$(free|awk '/^Mem:/{print $2}') -X if [ $((physmem)) -lt 409600 ]; then -X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 200" /etc/sysctl.conf -X else -X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 100" /etc/sysctl.conf -X fi -X -X sync -X sysctl -p -} -X -bootstrap() { -X log_it "Bootstrapping systemvm appliance" -X -X export HYPERVISOR=$(hypervisor) -X [ $? -ne 0 ] && log_it "Failed to detect hypervisor type, bailing out" && exit 10 -X log_it "Starting guest services for $HYPERVISOR" -X -X config_guest -X patch -X config_sysctl -X -X log_it "Configuring systemvm type=$TYPE" -X if [ -f "/opt/cloud/bin/setup/$TYPE.sh" ]; then -X /opt/cloud/bin/setup/$TYPE.sh -X else -X /opt/cloud/bin/setup/default.sh -X fi -X -X log_it "Finished setting up systemvm" -X exit 0 -} -X -bootstrap -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/bootstrap.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh': 'MD5 check failed' - ) << \SHAR_EOF -722a9c6abfff147c7727fdcd85c96767 cloud_scripts/opt/cloud/bin/setup/bootstrap.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh'` -ne 7721 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' is not 7721" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_console_proxy() { -X log_it "Setting up console proxy system vm" -X -X echo "cloud" > /var/cache/cloud/enabled_svcs -X echo "haproxy dnsmasq apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs -X mkdir -p /var/log/cloud -X -X setup_common eth0 eth1 eth2 -X setup_system_rfc1918_internal -X -X log_it "Setting up entry in hosts" -X sed -i /$NAME/d /etc/hosts -X public_ip=`getPublicIp` -X echo "$public_ip $NAME" >> /etc/hosts -X -X log_it "Applying iptables rules" -X cp /etc/iptables/iptables-consoleproxy /etc/iptables/rules.v4 -X -X log_it "Configuring sshd" -X local hyp=$HYPERVISOR -X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then -X setup_sshd $ETH1_IP "eth1" -X else -X setup_sshd $ETH0_IP "eth0" -X fi -X -X disable_rpfilter -X enable_fwding 0 -X enable_irqbalance 0 -X rm -f /etc/logrotate.d/cloud -} -X -setup_console_proxy -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh': 'MD5 check failed' - ) << \SHAR_EOF -44adac9bf5e54d4791da00e3d1bdaf46 cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh'` -ne 1658 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' is not 1658" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/common.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/common.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/common.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/common.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/common.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" -X -X. /lib/lsb/init-functions -X -log_it() { -X echo "$(date) $@" >> /var/log/cloud.log -X log_action_msg "$@" -} -X -init_interfaces_orderby_macs() { -X macs=( $(echo $1 | sed "s/|/ /g") ) -X total_nics=${#macs[@]} -X interface_file=${2:-"/etc/network/interfaces"} -X rule_file=${3:-"/etc/udev/rules.d/70-persistent-net.rules"} -X -X echo -n "auto lo" > $interface_file -X for((i=0; i> $interface_file -X fi -X done -X -X cat >> $interface_file << EOF -X -iface lo inet loopback -X -EOF -X -X echo "" > $rule_file -X for((i=0; i < ${#macs[@]}; i++)) -X do -X echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${macs[$i]}\", NAME=\"eth$i\"" >> $rule_file -X done -} -X -init_interfaces() { -X if [ "$NIC_MACS" == "" ] -X then -X cat > /etc/network/interfaces << EOF -auto lo $1 $2 $3 -iface lo inet loopback -X -EOF -X else -X init_interfaces_orderby_macs "$NIC_MACS" -X fi -} -X -setup_interface() { -X local intfnum=$1 -X local ip=$2 -X local mask=$3 -X local gw=$4 -X local force=$5 -X local intf=eth${intfnum} -X local bootproto="static" -X -X if [ "$BOOTPROTO" == "dhcp" ] -X then -X if [ "$intfnum" != "0" ] -X then -X bootproto="dhcp" -X fi -X fi -X -X if [ "$ip" != "0.0.0.0" -a "$ip" != "" -o "$force" == "force" ] -X then -X echo "iface $intf inet $bootproto" >> /etc/network/interfaces -X if [ "$bootproto" == "static" ] -X then -X echo " address $ip " >> /etc/network/interfaces -X echo " netmask $mask" >> /etc/network/interfaces -X fi -X fi -X -X if [ "$ip" == "0.0.0.0" -o "$ip" == "" ] -X then -X ifconfig $intf down -X fi -X -X if [ "$force" == "force" ] -X then -X ifdown $intf -X else -X ifdown $intf -X if [ "$RROUTER" != "1" -o "$1" != "2" ] -X then -X ifup $intf -X fi -X fi -} -X -setup_interface_ipv6() { -X sysctl net.ipv6.conf.all.disable_ipv6=0 -X sysctl net.ipv6.conf.all.forwarding=1 -X sysctl net.ipv6.conf.all.accept_ra=1 -X -X sed -i "s/net.ipv6.conf.all.disable_ipv6 =.*$/net.ipv6.conf.all.disable_ipv6 = 0/" /etc/sysctl.conf -X sed -i "s/net.ipv6.conf.all.forwarding =.*$/net.ipv6.conf.all.forwarding = 1/" /etc/sysctl.conf -X sed -i "s/net.ipv6.conf.all.accept_ra =.*$/net.ipv6.conf.all.accept_ra = 1/" /etc/sysctl.conf -X -X local intfnum=$1 -X local ipv6="$2" -X local prelen="$3" -X local intf=eth${intfnum} -X -X echo "iface $intf inet6 static" >> /etc/network/interfaces -X echo " address $ipv6 " >> /etc/network/interfaces -X echo " netmask $prelen" >> /etc/network/interfaces -X echo " accept_ra 1" >> /etc/network/interfaces -X ifdown $intf -X ifup $intf -} -X -X -enable_fwding() { -X local enabled=$1 -X log_it "cloud: enable_fwding = $1" -X log_it "enable_fwding = $1" -X echo "$1" > /proc/sys/net/ipv4/ip_forward -X [ -f /etc/iptables/iptables.conf ] && sed -i "s/ENABLE_ROUTING=.*$/ENABLE_ROUTING=$enabled/" /etc/iptables/iptables.conf && return -} -X -enable_passive_ftp() { -X log_it "cloud: enabling passive FTP for guest VMs" -X echo "$1" > /proc/sys/net/netfilter/nf_conntrack_helper -} -X -disable_rpfilter() { -X log_it "cloud: disable rp_filter" -X log_it "disable rpfilter" -X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf -} -X -get_public_vif_list() { -X local vif_list="" -X for i in /sys/class/net/eth*; do -X vif=$(basename $i); -X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] -X then -X vif_list="$vif_list $vif"; -X fi -X done -X -X echo $vif_list -} -X -disable_rpfilter_domR() { -X log_it "cloud: Tuning rp_filter on public interfaces" -X -X VIF_LIST=$(get_public_vif_list) -X log_it "rpfilter public interfaces : $VIF_LIST" -X if [ "$DISABLE_RP_FILTER" == "true" ] -X then -X log_it "cloud: disable rp_filter on public interfaces" -X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf -X echo "0" > /proc/sys/net/ipv4/conf/default/rp_filter -X for vif in $VIF_LIST; do -X log_it "cloud: disable rp_filter on public interface: $vif" -X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 0/" /etc/sysctl.conf -X echo "0" > /proc/sys/net/ipv4/conf/$vif/rp_filter -X done -X else -X log_it "cloud: enable rp_filter on public interfaces" -X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 1/" /etc/sysctl.conf -X echo "1" > /proc/sys/net/ipv4/conf/default/rp_filter -X for vif in $VIF_LIST; do -X log_it "cloud: enable rp_filter on public interface: $vif" -X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 1/" /etc/sysctl.conf -X echo "1" > /proc/sys/net/ipv4/conf/$vif/rp_filter -X done -X fi -X log_it "cloud: Enabling rp_filter on Non-public interfaces(eth0,eth1,lo)" -X echo "1" > /proc/sys/net/ipv4/conf/eth0/rp_filter -X echo "1" > /proc/sys/net/ipv4/conf/eth1/rp_filter -X echo "1" > /proc/sys/net/ipv4/conf/lo/rp_filter -} -X -enable_irqbalance() { -X local enabled=$1 -X local proc=0 -X -X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) -X if [ $proc -le 1 ] && [ $enabled -eq 1 ] -X then -X enabled=0 -X fi -X -X log_it "Processors = $proc Enable service ${svc} = $enabled" -X local cfg=/etc/default/irqbalance -X [ -f $cfg ] && sed -i "s/ENABLED=.*$/ENABLED=$enabled/" $cfg && return -} -X -enable_vpc_rpsrfs() { -X local enable=$1 -X if [ $enable -eq 0 ] -X then -X echo 0 > /etc/rpsrfsenable -X else -X echo 1 > /etc/rpsrfsenable -X fi -X -X return 0 -} -X -enable_rpsrfs() { -X local enable=$1 -X -X if [ $enable -eq 0 ] -X then -X echo 0 > /etc/rpsrfsenable -X return 0 -X fi -X -X if [ ! -f /sys/class/net/eth0/queues/rx-0/rps_cpus ] -X then -X echo "rps is not enabled in the kernel" -X echo 0 > /etc/rpsrfsenable -X return 0 -X fi -X -X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) -X if [ $proc -le 1 ] -X then -X echo 0 > /etc/rpsrfsenable -X return 0; -X fi -X -X echo 1 > /etc/rpsrfsenable -X num=1 -X num=$(($num<<$proc)) -X num=$(($num-1)); -X echo $num; -X hex=$(printf "%x\n" $num) -X echo $hex; -X #enable rps -X echo $hex > /sys/class/net/eth0/queues/rx-0/rps_cpus -X echo $hex > /sys/class/net/eth2/queues/rx-0/rps_cpus -X -X #enble rfs -X echo 256 > /proc/sys/net/core/rps_sock_flow_entries -X echo 256 > /sys/class/net/eth0/queues/rx-0/rps_flow_cnt -X echo 256 > /sys/class/net/eth2/queues/rx-0/rps_flow_cnt -} -X -setup_common() { -X init_interfaces $1 $2 $3 -X if [ -n "$ETH0_IP" ] -X then -X setup_interface "0" $ETH0_IP $ETH0_MASK $GW -X fi -X if [ -n "$ETH0_IP6" ] -X then -X setup_interface_ipv6 "0" $ETH0_IP6 $ETH0_IP6_PRELEN -X fi -X setup_interface "1" $ETH1_IP $ETH1_MASK $GW -X if [ -n "$ETH2_IP" ] -X then -X setup_interface "2" $ETH2_IP $ETH2_MASK $GW -X fi -X -X echo $NAME > /etc/hostname -X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon -X hostnamectl set-hostname $NAME -X -X #Nameserver -X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries -X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries -X if [ -n "$internalNS1" ] -X then -X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS1" > /etc/resolv.conf -X fi -X -X if [ -n "$internalNS2" ] -X then -X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS2" >> /etc/resolv.conf -X fi -X if [ -n "$NS1" ] -X then -X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS1" >> /etc/resolv.conf -X fi -X -X if [ -n "$NS2" ] -X then -X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS2" >> /etc/resolv.conf -X fi -X -X if [ -n "$IP6_NS1" ] -X then -X echo "nameserver $IP6_NS1" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $IP6_NS1" >> /etc/resolv.conf -X fi -X if [ -n "$IP6_NS2" ] -X then -X echo "nameserver $IP6_NS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $IP6_NS2" >> /etc/resolv.conf -X fi -X -X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] -X then -X ip route add $MGMTNET via $LOCAL_GW dev eth1 -X fi -X -X ip route delete default -X if [ "$RROUTER" != "1" ] -X then -X gwdev=$3 -X if [ -z "$gwdev" ] -X then -X gwdev="eth0" -X fi -X -X ip route add default via $GW dev $gwdev -X fi -X -X # Workaround to activate vSwitch under VMware -X timeout 3 ping -n -c 3 $GW & -X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] -X then -X timeout 3 ping -n -c 3 $LOCAL_GW & -X #This code is added to address ARP issue by pinging MGMT_GW -X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') -X timeout 3 ping -n -c 3 $MGMT_GW & -X fi -X -X if [ "$HYPERVISOR" == "vmware" ]; then -X ntpq -p &> /dev/null || vmware-toolbox-cmd timesync enable -X fi -} -X -setup_dnsmasq() { -X log_it "Setting up dnsmasq" -X -X touch /etc/dhcpopts.txt -X -X [ -z $DHCP_RANGE ] && [ $ETH0_IP ] && DHCP_RANGE=$ETH0_IP -X [ $ETH0_IP6 ] && DHCP_RANGE_IP6=$ETH0_IP6 -X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" -X #removing the dnsmasq multiple ranges config file. -X rm /etc/dnsmasq.d/multiple_ranges.conf -X -X #get the template -X cp /etc/dnsmasq.conf.tmpl /etc/dnsmasq.conf -X -X if [ -n "$DOMAIN" ] -X then -X #send domain name to dhcp clients -X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\"$DOMAIN\"/ /etc/dnsmasq.conf -X #DNS server will append $DOMAIN to local queries -X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf -X #answer all local domain queries -X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf -X fi -X -X if [ -n "$DNS_SEARCH_ORDER" ] -X then -X sed -i -e "/^[#]*dhcp-option.*=119.*$/d" /etc/dnsmasq.conf -X echo "dhcp-option-force=119,$DNS_SEARCH_ORDER" >> /etc/dnsmasq.conf -X # set the domain search order as a space seprated list for option 15 -X DNS_SEARCH_ORDER=$(echo $DNS_SEARCH_ORDER | sed 's/,/ /g') -X #send domain name to dhcp clients -X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\""$DNS_SEARCH_ORDER"\"/ /etc/dnsmasq.conf -X fi -X -X if [ $DHCP_RANGE ] -X then -X sed -i -e "s/^dhcp-range_ip4=.*$/dhcp-range=$DHCP_RANGE,static/" /etc/dnsmasq.conf -X else -X sed -i -e "s/^dhcp-range_ip4=.*$//" /etc/dnsmasq.conf -X fi -X if [ $DHCP_RANGE_IP6 ] -X then -X sed -i -e "s/^dhcp-range_ip6=.*$/dhcp-range=$DHCP_RANGE_IP6,static/" /etc/dnsmasq.conf -X # For nondefault6 tagged host, don't send dns-server information -X sed -i /nondefault6/d /etc/dnsmasq.conf -X echo "dhcp-option=nondefault6,option6:dns-server" >> /etc/dnsmasq.conf -X else -X sed -i -e "s/^dhcp-range_ip6=.*$//" /etc/dnsmasq.conf -X fi -X -X if [ "$RROUTER" == "1" ] -X then -X DEFAULT_GW=$GUEST_GW -X INTERNAL_DNS=$GUEST_GW -X else -X if [ "$TYPE" == "dhcpsrvr" ] -X then -X DEFAULT_GW=$GW -X else -X DEFAULT_GW=$ETH0_IP -X fi -X INTERNAL_DNS=$ETH0_IP -X fi -X sed -i -e "/^[#]*dhcp-option=option:router.*$/d" /etc/dnsmasq.conf -X [ $DEFAULT_GW ] && echo "dhcp-option=option:router,$DEFAULT_GW" >> /etc/dnsmasq.conf -X -X [ $ETH0_IP ] && [ $NS1 ] && NS="$NS1," -X [ $ETH0_IP ] && [ $NS2 ] && NS="$NS$NS2," -X [ $ETH0_IP6 ] && [ $IP6_NS1 ] && NS6="[$IP6_NS1]," -X [ $ETH0_IP6 ] && [ $IP6_NS2 ] && NS6="$NS6[$IP6_NS2]," -X #for now set up ourself as the dns server as well -X sed -i -e "/^[#]*dhcp-option=6,.*$/d" /etc/dnsmasq.conf -X sed -i -e "/^[#]*dhcp-option=option6:dns-server,.*$/d" /etc/dnsmasq.conf -X if [ "$USE_EXTERNAL_DNS" != "true" ] -X then -X [ $ETH0_IP ] && NS="$INTERNAL_DNS,$NS" -X [ $ETH0_IP6 ] && NS6="[::],$NS6" -X # enable dns -X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf -X else -X # disable dns -X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf -X echo "port=0" >> /etc/dnsmasq.conf -X fi -X NS=${NS%?} -X NS6=${NS6%?} -X [ $ETH0_IP ] && echo "dhcp-option=6,$NS" >> /etc/dnsmasq.conf -X [ $ETH0_IP6 ] && echo "dhcp-option=option6:dns-server,$NS6" >> /etc/dnsmasq.conf -X #adding the name data-server to the /etc/hosts for allowing the access to user-data service and ssh-key reset in every subnet. -X #removing the existing entires to avoid duplicates on restarts. -X sed -i '/data-server/d' /etc/hosts -X if [ -n "$ETH0_IP" ] -X then -X echo "$ETH0_IP data-server" >> /etc/hosts -X fi -X if [ -n "$ETH0_IP6" ] -X then -X echo "$ETH0_IP6 data-server" >> /etc/hosts -X fi -X #add the dhcp-client-update only if dnsmasq version is 2.6 and above -X dnsmasqVersion=$(dnsmasq -v | grep version -m 1 | grep -o "[[:digit:]]\.[[:digit:]]") -X major=$(echo "$dnsmasqVersion" | cut -d '.' -f 1) -X minor=$(echo "$dnsmasqVersion" | cut -d '.' -f 2) -X if [ "$major" -eq '2' -a "$minor" -ge '6' ] || [ "$major" -gt '2' ] -X then -X sed -i -e "/^dhcp-client-update/d" /etc/dnsmasq.conf -X echo 'dhcp-client-update' >> /etc/dnsmasq.conf -X fi -X -X command -v dhcp_release > /dev/null 2>&1 -X no_dhcp_release=$? -X if [ $no_dhcp_release -eq 0 -a -z "$ETH0_IP6" ] -X then -X echo 1 > /var/cache/cloud/dnsmasq_managed_lease -X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf -X else -X echo 0 > /var/cache/cloud/dnsmasq_managed_lease -X fi -} -X -setup_sshd(){ -X local ip=$1 -X local eth=$2 -X [ -f /etc/ssh/sshd_config ] && sed -i -e "s/^[#]*ListenAddress.*$/ListenAddress $ip/" /etc/ssh/sshd_config -X sed -i "/3922/s/eth./$eth/" /etc/iptables/rules.v4 -} -X -setup_vpc_apache2() { -X log_it "Setting up apache web server for VPC" -X systemctl disable apache2 -X clean_ipalias_config -X setup_apache2_common -} -X -clean_ipalias_config() { -X rm -f /etc/apache2/conf.d/ports.*.meta-data.conf -X rm -f /etc/apache2/sites-available/ipAlias* -X rm -f /etc/apache2/sites-enabled/ipAlias* -X rm -f /etc/apache2/conf.d/vhost*.conf -X rm -f /etc/apache2/ports.conf -X rm -f /etc/apache2/vhostexample.conf -X rm -f /etc/apache2/sites-available/* -X rm -f /etc/apache2/sites-enabled/* -X -X rm -rf /etc/failure_config -} -X -setup_apache2_common() { -X sed -i 's/^Include ports.conf.*/# CS: Done by Python CsApp config\n#Include ports.conf/g' /etc/apache2/apache2.conf -X # Disable listing of http://SSVM-IP/icons folder for security issue. see article http://www.i-lateral.com/tutorials/disabling-the-icons-folder-on-an-ubuntu-web-server/ -X [ -f /etc/apache2/mods-available/alias.conf ] && sed -i s/"Options Indexes MultiViews"/"Options -Indexes MultiViews"/ /etc/apache2/mods-available/alias.conf -X -X echo "Options -Indexes" > /var/www/html/.htaccess -} -X -setup_apache2() { -X log_it "Setting up apache web server" -X mkdir -p /var/www -X chown www-data:www-data -R /var/www -X clean_ipalias_config -X setup_apache2_common -X local ip=$1 -} -X -setup_aesni() { -X if [ `grep aes /proc/cpuinfo | wc -l` -gt 0 ] -X then -X modprobe aesni_intel -X fi -} -X -setup_storage_network() { -X if [ x"$STORAGE_IP" == "x" -o x"$STORAGE_NETMASK" == "x" ] -X then -X log_it "Incompleted parameters STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR. Cannot setup storage network" -X return -X fi -X -X echo "" >> /etc/network/interfaces -X echo "auto eth3" >> /etc/network/interfaces -X -X setup_interface "3" "$STORAGE_IP" "$STORAGE_NETMASK" -X [ -n "$MTU" ] && ifconfig eth3 mtu $MTU && echo " mtu $MTU" >> /etc/network/interfaces -X #ip route add "$STORAGE_CIDR" via "$STORAGE_IP" -X log_it "Successfully setup storage network with STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR" -} -X -setup_system_rfc1918_internal() { -X public_ip=`getPublicIp` -X echo "$public_ip" | grep -E "^((127\.)|(10\.)|(172\.1[6-9]\.)|(172\.2[0-9]\.)|(172\.3[0-1]\.)|(192\.168\.))" -X if [ "$?" == "0" ]; then -X log_it "Not setting up route of RFC1918 space to $LOCAL_GW befause $public_ip is RFC1918." -X else -X log_it "Setting up route of RFC1918 space to $LOCAL_GW" -X # Setup general route for RFC 1918 space, as otherwise it will be sent to -X # the public gateway and not work -X # More specific routes that may be set have preference over this generic route. -X ip route add 10.0.0.0/8 via $LOCAL_GW -X ip route add 172.16.0.0/12 via $LOCAL_GW -X ip route add 192.168.0.0/16 via $LOCAL_GW -X fi -} -X -getPublicIp() { -X public_ip=$ETH2_IP -X [ "$ETH2_IP" == "0.0.0.0" ] && public_ip=$ETH1_IP -X echo $public_ip -} -X -setup_ntp() { -X log_it "Setting up NTP" -X NTP_CONF_FILE="/etc/ntp.conf" -X if [ -f $NTP_CONF_FILE ] -X then -X IFS=',' read -a server_list <<< "$NTP_SERVER_LIST" -X for (( iterator=${#server_list[@]}-1 ; iterator>=0 ; iterator-- )) -X do -X server=$(echo ${server_list[iterator]} | tr -d '\r') -X PATTERN="server $server" -X if grep -q "^$PATTERN$" $NTP_CONF_FILE ; then -X sed -i "/^$PATTERN$/d" $NTP_CONF_FILE -X fi -X sed -i "0,/^server/s//$PATTERN\nserver/" $NTP_CONF_FILE -X done -X systemctl enable ntp -X else -X log_it "NTP configuration file not found" -X fi -} -X -routing_svcs() { -X echo "haproxy apache2" > /var/cache/cloud/enabled_svcs -X echo "cloud nfs-common portmap" > /var/cache/cloud/disabled_svcs -X if [ "$RROUTER" -eq "1" ] -X then -X echo "keepalived conntrackd" >> /var/cache/cloud/enabled_svcs -X echo "dnsmasq" >> /var/cache/cloud/disabled_svcs -X else -X echo "dnsmasq" >> /var/cache/cloud/enabled_svcs -X echo "keepalived conntrackd " >> /var/cache/cloud/disabled_svcs -X fi -} -X -parse_cmd_line() { -X CMDLINE=$(cat /var/cache/cloud/cmdline) -X TYPE="unknown" -X BOOTPROTO="static" -X DISABLE_RP_FILTER="false" -X STORAGE_IP="" -X STORAGE_NETMASK="" -X STORAGE_CIDR="" -X VM_PASSWORD="" -X -X CHEF_TMP_FILE=/tmp/cmdline.json -X COMMA="\t" -X echo -e "{\n\"type\": \"cmdline\"," > ${CHEF_TMP_FILE} -X echo -e "\"cmd_line\": {" >> ${CHEF_TMP_FILE} -X -X for i in $CMDLINE -X do -X # search for foo=bar pattern and cut out foo -X KEY=$(echo $i | cut -d= -f1) -X VALUE=$(echo $i | cut -d= -f2) -X echo -en ${COMMA} >> ${CHEF_TMP_FILE} -X # Two lines so values do not accidently interpretted as escapes!! -X echo -n \"${KEY}\"': '\"${VALUE}\" >> ${CHEF_TMP_FILE} -X COMMA=",\n\t" -X case $KEY in -X disable_rp_filter) -X export DISABLE_RP_FILTER=$VALUE -X ;; -X eth0ip) -X export ETH0_IP=$VALUE -X ;; -X eth1ip) -X export ETH1_IP=$VALUE -X ;; -X eth2ip) -X export ETH2_IP=$VALUE -X ;; -X host) -X export MGMT_HOST=$VALUE -X ;; -X gateway) -X export GW=$VALUE -X ;; -X ip6gateway) -X export IP6GW=$VALUE -X ;; -X eth0mask) -X export ETH0_MASK=$VALUE -X ;; -X eth1mask) -X export ETH1_MASK=$VALUE -X ;; -X eth2mask) -X export ETH2_MASK=$VALUE -X ;; -X eth0ip6) -X export ETH0_IP6=$VALUE -X ;; -X eth0ip6prelen) -X export ETH0_IP6_PRELEN=$VALUE -X ;; -X internaldns1) -X export internalNS1=$VALUE -X ;; -X internaldns2) -X export internalNS2=$VALUE -X ;; -X dns1) -X export NS1=$VALUE -X ;; -X dns2) -X export NS2=$VALUE -X ;; -X ip6dns1) -X export IP6_NS1=$VALUE -X ;; -X ip6dns2) -X export IP6_NS2=$VALUE -X ;; -X domain) -X export DOMAIN=$VALUE -X ;; -X dnssearchorder) -X export DNS_SEARCH_ORDER=$VALUE -X ;; -X useextdns) -X export USE_EXTERNAL_DNS=$VALUE -X ;; -X mgmtcidr) -X export MGMTNET=$VALUE -X ;; -X localgw) -X export LOCAL_GW=$VALUE -X ;; -X template) -X export TEMPLATE=$VALUE -X ;; -X sshonguest) -X export SSHONGUEST=$VALUE -X ;; -X name) -X export NAME=$VALUE -X ;; -X dhcprange) -X export DHCP_RANGE=$(echo $VALUE | tr ':' ',') -X ;; -X bootproto) -X export BOOTPROTO=$VALUE -X ;; -X type) -X export TYPE=$VALUE -X ;; -X defaultroute) -X export DEFAULTROUTE=$VALUE -X ;; -X redundant_router) -X export RROUTER=$VALUE -X ;; -X redundant_state) -X export RROUTER_STATE=$VALUE -X ;; -X guestgw) -X export GUEST_GW=$VALUE -X ;; -X guestbrd) -X export GUEST_BRD=$VALUE -X ;; -X guestcidrsize) -X export GUEST_CIDR_SIZE=$VALUE -X ;; -X router_pr) -X export ROUTER_PR=$VALUE -X ;; -X extra_pubnics) -X export EXTRA_PUBNICS=$VALUE -X ;; -X nic_macs) -X export NIC_MACS=$VALUE -X ;; -X mtu) -X export MTU=$VALUE -X ;; -X storageip) -X export STORAGE_IP=$VALUE -X ;; -X storagenetmask) -X export STORAGE_NETMASK=$VALUE -X ;; -X storagecidr) -X export STORAGE_CIDR=$VALUE -X ;; -X vmpassword) -X export VM_PASSWORD=$VALUE -X ;; -X vpccidr) -X export VPCCIDR=$VALUE -X ;; -X cidrsize) -X export CIDR_SIZE=$VALUE -X ;; -X advert_int) -X export ADVERT_INT=$VALUE -X ;; -X ntpserverlist) -X export NTP_SERVER_LIST=$VALUE -X ;; -X esac -X done -X echo -e "\n\t}\n}" >> ${CHEF_TMP_FILE} -X if [ "$TYPE" != "unknown" ] -X then -X mv ${CHEF_TMP_FILE} /var/cache/cloud/cmd_line.json -X fi -X -X [ $ETH0_IP ] && export LOCAL_ADDRS=$ETH0_IP -X [ $ETH0_IP6 ] && export LOCAL_ADDRS=$ETH0_IP6 -X [ $ETH0_IP ] && [ $ETH0_IP6 ] && export LOCAL_ADDRS="$ETH0_IP,$ETH0_IP6" -X -X # Randomize cloud password so only ssh login is allowed -X echo "cloud:`openssl rand -base64 32`" | chpasswd -X -X if [ x"$VM_PASSWORD" != x"" ] -X then -X echo "root:$VM_PASSWORD" | chpasswd -X fi -} -X -parse_cmd_line -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/common.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/common.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/common.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/common.sh': 'MD5 check failed' - ) << \SHAR_EOF -8754c81bacd82458e4ce221b476505ea cloud_scripts/opt/cloud/bin/setup/common.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/common.sh'` -ne 22472 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/common.sh' is not 22472" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -dhcpsrvr_svcs() { -X echo "dnsmasq apache2" > /var/cache/cloud/enabled_svcs -X echo "cloud nfs-common conntrackd keepalived haproxy portmap" > /var/cache/cloud/disabled_svcs -} -X -setup_dhcpsrvr() { -X log_it "Setting up dhcp server system vm" -X setup_common eth0 eth1 -X setup_dnsmasq -X setup_apache2 $ETH0_IP -X -X sed -i /$NAME/d /etc/hosts -X [ $ETH0_IP ] && echo "$ETH0_IP $NAME" >> /etc/hosts -X [ $ETH0_IP6 ] && echo "$ETH0_IP6 $NAME" >> /etc/hosts -X -X enable_irqbalance 0 -X enable_fwding 0 -X -X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 -X -X #Only allow DNS service for current network -X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X -X if [ "$SSHONGUEST" == "true" ] -X then -X setup_sshd $ETH0_IP "eth0" -X else -X setup_sshd $ETH1_IP "eth1" -X fi -} -X -dhcpsrvr_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute dhcpsrvr_svcs" -X exit 1 -fi -setup_dhcpsrvr -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh': 'MD5 check failed' - ) << \SHAR_EOF -08afc46420e5e388ba6be68cfdbd4a59 cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh'` -ne 1985 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' is not 1985" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/cloud-early-config ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/cloud-early-config (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/cloud-early-config (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" -X -# Clear boot up flag, it would be created by rc.local after boot up done -mkdir -p /var/cache/cloud -rm -f /var/cache/cloud/boot_up_done -X -[ -x /sbin/ifup ] || exit 0 -X -X. /lib/lsb/init-functions -X -log_it() { -X echo "$(date) $@" >> /var/log/cloud.log -X log_action_msg "$@" -} -X -patch() { -X local PATCH_MOUNT=/media/cdrom -X local patchfile=$PATCH_MOUNT/cloud-scripts.tgz -X local privkey=$PATCH_MOUNT/authorized_keys -X local md5file=/var/cache/cloud/cloud-scripts-signature -X local cdrom_dev= -X mkdir -p $PATCH_MOUNT -X -X if [ -e /dev/xvdd ]; then -X cdrom_dev=/dev/xvdd -X elif [ -e /dev/cdrom ]; then -X cdrom_dev=/dev/cdrom -X elif [ -e /dev/cdrom1 ]; then -X cdrom_dev=/dev/cdrom1 -X elif [ -e /dev/cdrom2 ]; then -X cdrom_dev=/dev/cdrom2 -X elif [ -e /dev/cdrom3 ]; then -X cdrom_dev=/dev/cdrom3 -X fi -X -X if [ -f /var/cache/cloud/authorized_keys ]; then -X privkey=/var/cache/cloud/authorized_keys -X fi -X -X if [ -n "$cdrom_dev" ]; then -X mount -o ro $cdrom_dev $PATCH_MOUNT -X local oldmd5= -X [ -f ${md5file} ] && oldmd5=$(cat ${md5file}) -X local newmd5= -X [ -f ${patchfile} ] && newmd5=$(md5sum ${patchfile} | awk '{print $1}') -X -X log_it "Scripts checksum detected: oldmd5=$oldmd5 newmd5=$newmd5" -X if [ "$oldmd5" != "$newmd5" ] && [ -f ${patchfile} ] && [ "$newmd5" != "" ] -X then -X tar xzf $patchfile -C / -X echo ${newmd5} > ${md5file} -X log_it "Patched scripts using $patchfile" -X touch /var/cache/cloud/patch.required -X fi -X -X if [ -f $privkey ]; then -X cp -f $privkey /root/.ssh/ -X chmod go-rwx /root/.ssh/authorized_keys -X fi -X fi -X -X return 0 -} -X -start() { -X log_it "Executing cloud-early-config" -X -X # Clear /tmp for file lock -X rm -f /tmp/*.lock -X rm -f /tmp/rrouter_bumped -X rm -f /root/.rnd -X echo "" > /root/.ssh/known_hosts -X -X patch -X sync -X /opt/cloud/bin/setup/bootstrap.sh -X -X log_it "Finished setting up systemvm" -X exit 0 -} -X -start -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/cloud-early-config failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config': 'MD5 check failed' - ) << \SHAR_EOF -c9e5973de3771fd5f5e9b490c60db970 cloud_scripts/opt/cloud/bin/setup/cloud-early-config -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config'` -ne 2765 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' is not 2765" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/default.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/default.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/default.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/default.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/default.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_default() { -X cat > /etc/network/interfaces << EOF -auto lo -iface lo inet loopback -EOF -X cp -f /etc/iptables/rt_tables_init /etc/iproute2/rt_tables -} -X -setup_default -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/default.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/default.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/default.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/default.sh': 'MD5 check failed' - ) << \SHAR_EOF -20e3a01cb77930eba6438de6d9a3f193 cloud_scripts/opt/cloud/bin/setup/default.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/default.sh'` -ne 1002 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/default.sh' is not 1002" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/postinit.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/postinit.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/postinit.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# This scripts before ssh.service but after cloud-early-config -X -# Eject cdrom if any -eject || true -X -# Restart journald for setting changes to apply -systemctl restart systemd-journald -X -TYPE=$(grep -Po 'type=\K[a-zA-Z]*' /var/cache/cloud/cmdline) -if [ "$TYPE" == "router" ] || [ "$TYPE" == "vpcrouter" ] || [ "$TYPE" == "dhcpsrvr" ] -then -X if [ -x /opt/cloud/bin/update_config.py ] -X then -X /opt/cloud/bin/update_config.py cmd_line.json || true -X fi -fi -X -[ ! -f /var/cache/cloud/enabled_svcs ] && touch /var/cache/cloud/enabled_svcs -for svc in $(cat /var/cache/cloud/enabled_svcs) -do -X systemctl enable --now --no-block $svc -done -X -[ ! -f /var/cache/cloud/disabled_svcs ] && touch /var/cache/cloud/disabled_svcs -for svc in $(cat /var/cache/cloud/disabled_svcs) -do -X systemctl disable --now --no-block $svc -done -X -# Restore the persistent iptables nat, rules and filters for IPv4 and IPv6 if they exist -ipv4="/etc/iptables/rules.v4" -if [ -e $ipv4 ] -then -X iptables-restore < $ipv4 -fi -X -ipv6="/etc/iptables/rules.v6" -if [ -e $ipv6 ] -then -X ip6tables-restore < $ipv6 -fi -X -# Patch known systemd/sshd memory leak - https://github.com/systemd/systemd/issues/8015#issuecomment-476160981 -echo '@include null' >> /etc/pam.d/systemd-user -X -# Enable and Start SSH -systemctl enable --now --no-block ssh -X -date > /var/cache/cloud/boot_up_done -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/postinit.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/postinit.sh': 'MD5 check failed' - ) << \SHAR_EOF -170afadf6f130e9cb697dca65a87aacb cloud_scripts/opt/cloud/bin/setup/postinit.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/postinit.sh'` -ne 2122 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/postinit.sh' is not 2122" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/secstorage.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/secstorage.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/secstorage.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_secstorage() { -X log_it "Setting up secondary storage system vm" -X -X echo "cloud apache2 nfs-common portmap" > /var/cache/cloud/enabled_svcs -X echo "conntrackd keepalived haproxy dnsmasq" > /var/cache/cloud/disabled_svcs -X mkdir -p /var/log/cloud -X -X setup_common eth0 eth1 eth2 -X setup_storage_network -X setup_system_rfc1918_internal -X -X log_it "Setting up entry in hosts" -X sed -i /$NAME/d /etc/hosts -X public_ip=`getPublicIp` -X echo "$public_ip $NAME" >> /etc/hosts -X -X log_it "Applying iptables rules" -X cp /etc/iptables/iptables-secstorage /etc/iptables/rules.v4 -X -X log_it "Configuring sshd" -X local hyp=$HYPERVISOR -X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then -X setup_sshd $ETH1_IP "eth1" -X else -X setup_sshd $ETH0_IP "eth0" -X fi -X -X log_it "Configuring apache2" -X setup_apache2 $ETH2_IP -X -X # Deprecated, should move to Cs Python all of it -X sed -e "s///" \ -X -e "s///" \ -X -e "s/Listen .*:8180/Listen $ETH2_IP:80/g" \ -X -e "s/Listen .*:8443/Listen $ETH2_IP:443/g" /etc/apache2/vhost.template > /etc/apache2/sites-enabled/vhost-${ETH2_IP}.conf -X -X log_it "Setting up apache2 for post upload of volume/template" -X a2enmod proxy -X a2enmod proxy_http -X a2enmod headers -X -X cat >/etc/apache2/cors.conf </dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh': 'MD5 check failed' - ) << \SHAR_EOF -14aea171a5e0fdfd3069bb96bde91e0b cloud_scripts/opt/cloud/bin/setup/secstorage.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh'` -ne 2720 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/secstorage.sh' is not 2720" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/ilbvm.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/ilbvm.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -ilbvm_svcs() { -X echo "haproxy" > /var/cache/cloud/enabled_svcs -X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs -} -X -setup_ilbvm() { -X log_it "Setting up Internal Load Balancer system vm" -X setup_common eth0 eth1 -X #eth0 = guest network, eth1=control network -X -X sed -i /$NAME/d /etc/hosts -X echo "$ETH0_IP $NAME" >> /etc/hosts -X -X cp /etc/iptables/iptables-ilbvm /etc/iptables/rules.v4 -X setup_sshd $ETH1_IP "eth1" -X -X enable_fwding 0 -X enable_irqbalance 1 -} -X -ilbvm_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute ilbvm svcs" -X exit 1 -fi -setup_ilbvm -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/ilbvm.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh': 'MD5 check failed' - ) << \SHAR_EOF -87c70bdf6c0d4d41f0ff87475494188f cloud_scripts/opt/cloud/bin/setup/ilbvm.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh'` -ne 1442 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/ilbvm.sh' is not 1442" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_vpcrouter() { -X log_it "Setting up VPC virtual router system vm" -X -X if [ -f /etc/hosts ]; then -X grep -q $NAME /etc/hosts || echo "127.0.0.1 $NAME" >> /etc/hosts; -X fi -X -X cat > /etc/network/interfaces << EOF -auto lo eth0 -iface lo inet loopback -EOF -X setup_interface "0" $ETH0_IP $ETH0_MASK $GW -X -X echo $NAME > /etc/hostname -X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon -X hostnamectl set-hostname $NAME -X -X #Nameserver -X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries -X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries -X if [ -n "$internalNS1" ] -X then -X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS1" > /etc/resolv.conf -X fi -X -X if [ -n "$internalNS2" ] -X then -X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS2" >> /etc/resolv.conf -X fi -X if [ -n "$NS1" ] -X then -X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS1" >> /etc/resolv.conf -X fi -X -X if [ -n "$NS2" ] -X then -X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS2" >> /etc/resolv.conf -X fi -X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] -X then -X if [ "$HYPERVISOR" == "vmware" ] || [ "$HYPERVISOR" == "hyperv" ]; -X then -X ip route add $MGMTNET via $LOCAL_GW dev eth0 -X # workaround to activate vSwitch under VMware -X timeout 3 ping -n -c 3 $LOCAL_GW || true -X fi -X fi -X -X ip route delete default -X # create route table for static route -X -X sudo echo "252 static_route" >> /etc/iproute2/rt_tables 2>/dev/null -X sudo echo "251 static_route_back" >> /etc/iproute2/rt_tables 2>/dev/null -X sudo ip rule add from $VPCCIDR table static_route 2>/dev/null -X sudo ip rule add from $VPCCIDR table static_route_back 2>/dev/null -X -X setup_vpc_apache2 -X -X enable_irqbalance 1 -X enable_vpc_rpsrfs 1 -X disable_rpfilter -X enable_fwding 1 -X enable_passive_ftp 1 -X cp /etc/iptables/iptables-vpcrouter /etc/iptables/rules.v4 -X setup_sshd $ETH0_IP "eth0" -X cp /etc/vpcdnsmasq.conf /etc/dnsmasq.conf -X cp /etc/cloud-nic.rules /etc/udev/rules.d/cloud-nic.rules -X echo "" > /etc/dnsmasq.d/dhcphosts.txt -X echo "dhcp-hostsfile=/etc/dhcphosts.txt" > /etc/dnsmasq.d/cloud.conf -X -X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" -X #DNS server will append $DOMAIN to local queries -X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf -X #answer all local domain queries -X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf -X -X command -v dhcp_release > /dev/null 2>&1 -X no_dhcp_release=$? -X if [ $no_dhcp_release -eq 0 ] -X then -X echo 1 > /var/cache/cloud/dnsmasq_managed_lease -X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf -X else -X echo 0 > /var/cache/cloud/dnsmasq_managed_lease -X fi -X -X # Setup hourly logrotate -X if [ -f /etc/cron.daily/logrotate ]; then -X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 -X fi -} -X -routing_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute routing_svcs" -X exit 1 -fi -setup_vpcrouter -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh': 'MD5 check failed' - ) << \SHAR_EOF -811420d11f97b1d7237b964e8bbbdf5d cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh'` -ne 3885 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/vpcrouter.sh' is not 3885" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/router.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/router.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/router.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/router.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/router.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -check_reboot_vmware() { -X if [ "$HYPERVISOR" != "vmware" ]; then -X return -X fi -X -X if [ -n "$MGMTNET" ]; then -X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') -X if ping -n -c 1 -W 3 $MGMT_GW &> /dev/null; then -X log_it "Management gateway pingable, skipping VR reboot" -X return -X fi -X fi -X -X log_it "Management gateway not pingable, rebooting VR" -X sync -X reboot -} -X -setup_router() { -X # To save router public interface and gw ip information -X touch /var/cache/cloud/ifaceGwIp -X -X oldmd5= -X [ -f "/etc/udev/rules.d/70-persistent-net.rules" ] && oldmd5=$(md5sum "/etc/udev/rules.d/70-persistent-net.rules" | awk '{print $1}') -X -X if [ -n "$ETH2_IP" ]; then -X setup_common eth0 eth1 eth2 -X -X if [ -n "$EXTRA_PUBNICS" ]; then -X for ((i = 3; i < 3 + $EXTRA_PUBNICS; i++)); do -X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" -X done -X fi -X else -X setup_common eth0 eth1 -X if [ -n "$EXTRA_PUBNICS" ]; then -X for ((i = 2; i < 2 + $EXTRA_PUBNICS; i++)); do -X setup_interface "$i" "0.0.0.0" "255.255.255.255" $GW "force" -X done -X fi -X fi -X -X log_it "Checking udev NIC assignment order changes" -X if [ "$NIC_MACS" != "" ] -X then -X init_interfaces_orderby_macs "$NIC_MACS" "/tmp/interfaces" "/tmp/udev-rules" -X newmd5=$(md5sum "/tmp/udev-rules" | awk '{print $1}') -X rm /tmp/interfaces -X rm /tmp/udev-rules -X -X if [ "$oldmd5" != "$newmd5" ] -X then -X log_it "Reloading udev for new udev NIC assignment" -X udevadm control --reload-rules && udevadm trigger -X check_reboot_vmware -X fi -X fi -X -X setup_aesni -X setup_dnsmasq -X setup_apache2 $ETH0_IP -X -X sed -i /$NAME/d /etc/hosts -X echo "$ETH0_IP $NAME" >> /etc/hosts -X -X enable_irqbalance 1 -X disable_rpfilter_domR -X enable_fwding 1 -X enable_rpsrfs 1 -X enable_passive_ftp 1 -X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 -X setup_sshd $ETH1_IP "eth1" -X -X # Only allow DNS service for current network -X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X -X # Setup hourly logrotate -X if [ -f /etc/cron.daily/logrotate ]; then -X mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 -X fi -} -X -routing_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute routing_svcs" -X exit 1 -fi -setup_router -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/router.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/router.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/router.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/router.sh': 'MD5 check failed' - ) << \SHAR_EOF -2ae62d5d44c716730231c9d77618fe91 cloud_scripts/opt/cloud/bin/setup/router.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/router.sh'` -ne 3355 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/router.sh' is not 3355" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/elbvm.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/elbvm.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/elbvm.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -elbvm_svcs() { -X echo "haproxy" > /var/cache/cloud/enabled_svcs -X echo "cloud dnsmasq conntrackd keepalived apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs -} -X -setup_elbvm() { -X log_it "Setting up Elastic Load Balancer system vm" -X setup_common eth0 eth1 -X sed -i /$NAME/d /etc/hosts -X public_ip=$ETH2_IP -X [ "$ETH2_IP" == "0.0.0.0" ] || [ "$ETH2_IP" == "" ] && public_ip=$ETH0_IP -X echo "$public_ip $NAME" >> /etc/hosts -X -X cp /etc/iptables/iptables-elbvm /etc/iptables/rules.v4 -X if [ "$SSHONGUEST" == "true" ] -X then -X setup_sshd $ETH0_IP "eth0" -X else -X setup_sshd $ETH1_IP "eth1" -X fi -X -X enable_fwding 0 -X enable_irqbalance 0 -} -X -elbvm_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute elbvm svcs" -X exit 1 -fi -setup_elbvm -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/elbvm.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh': 'MD5 check failed' - ) << \SHAR_EOF -2d34615f1d40f6125a2205e6118ba07f cloud_scripts/opt/cloud/bin/setup/elbvm.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh'` -ne 1578 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/elbvm.sh' is not 1578" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/bootstrap.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/bootstrap.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" -CMDLINE=/var/cache/cloud/cmdline -X -rm -f /var/cache/cloud/enabled_svcs -rm -f /var/cache/cloud/disabled_svcs -X -X. /lib/lsb/init-functions -X -log_it() { -X echo "$(date) $@" >> /var/log/cloud.log -X log_action_msg "$@" -} -X -hypervisor() { -X if [ -d /proc/xen ]; then -X mount -t xenfs none /proc/xen -X $(dmesg | grep -q "Xen HVM") -X if [ $? -eq 0 ]; then # 1=PV,0=HVM -X echo "xen-hvm" && return 0 -X else -X echo "xen-pv" && return 0 -X fi -X fi -X -X [ -x /usr/sbin/virt-what ] && local facts=( $(virt-what) ) -X if [ "$facts" != "" ]; then -X # Xen HVM is recognized as Hyperv when Viridian extensions are enabled -X if [ "${facts[-1]}" == "xen-domU" ] && [ "${facts[0]}" == "hyperv" ]; then -X echo "xen-hvm" && return 0 -X else -X echo ${facts[-1]} && return 0 -X fi -X fi -X -X grep -q QEMU /proc/cpuinfo && echo "kvm" && return 0 -X grep -q QEMU /var/log/messages && echo "kvm" && return 0 -X -X vmware-checkvm &> /dev/null && echo "vmware" && return 0 -X -X echo "unknown" && return 1 -} -X -config_guest() { -X [ ! -d /proc/xen ] && sed -i 's/^vc/#vc/' /etc/inittab && telinit q -X [ -d /proc/xen ] && sed -i 's/^#vc/vc/' /etc/inittab && telinit q -X -X systemctl daemon-reload -X -X case $HYPERVISOR in -X xen-pv|xen-domU) -X systemctl stop ntpd -X systemctl disable ntpd -X systemctl enable xe-daemon -X systemctl start xe-daemon -X -X cat /proc/cmdline > $CMDLINE -X sed -i "s/%/ /g" $CMDLINE -X ;; -X xen-hvm) -X systemctl stop ntpd -X systemctl disable ntpd -X systemctl enable xe-daemon -X systemctl start xe-daemon -X -X if [ ! -f /usr/bin/xenstore-read ]; then -X log_it "ERROR: xentools not installed, cannot found xenstore-read" && exit 5 -X fi -X /usr/bin/xenstore-read vm-data/cloudstack/init > $CMDLINE -X sed -i "s/%/ /g" $CMDLINE -X ;; -X kvm) -X # Configure kvm hotplug support -X if grep -E 'CONFIG_HOTPLUG_PCI=y|CONFIG_HOTPLUG_PCI_ACPI=y' /boot/config-`uname -r`; then -X log_it "acpiphp and pci_hotplug module already compiled in" -X else -X modprobe acpiphp 2> /dev/null && log_it "acpiphp module loaded" || true -X modprobe pci_hotplug 2> /dev/null && log_it "pci_hotplug module loaded" || true -X fi -X -X sed -i -e "/^s0:2345:respawn.*/d" /etc/inittab -X sed -i -e "/6:23:respawn/a\s0:2345:respawn:/sbin/getty -L 115200 ttyS0 vt102" /etc/inittab -X systemctl enable qemu-guest-agent -X systemctl start qemu-guest-agent -X -X # Wait for $CMDLINE file to be written by the qemu-guest-agent -X for i in {1..60}; do -X if [ -s $CMDLINE ]; then -X log_it "Received a new non-empty cmdline file from qemu-guest-agent" -X break -X fi -X sleep 1 -X done -X if [ ! -s $CMDLINE ]; then -X log_it "Failed to receive the cmdline file via the qemu-guest-agent" -X fi -X ;; -X vmware) -X # system time sync'd with host via vmware tools -X systemctl stop ntpd -X systemctl disable ntpd -X systemctl enable open-vm-tools -X systemctl start open-vm-tools -X -X vmtoolsd --cmd 'machine.id.get' > $CMDLINE -X ;; -X virtualpc|hyperv) -X # Hyper-V is recognized as virtualpc hypervisor type. Boot args are passed using KVP Daemon -X systemctl enable hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service -X systemctl start hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service -X sleep 5 -X cp -f /var/opt/hyperv/.kvp_pool_0 $CMDLINE -X cat /dev/null > /var/opt/hyperv/.kvp_pool_0 -X ;; -X virtualbox) -X # Virtualbox is used to test the virtual router -X # get the commandline from a dmistring (yes, hacky!) -X dmidecode | grep cmdline | sed 's/^.*cmdline://' > $CMDLINE -X RV=$? -X if [ $RV -ne 0 ] ; then -X log_it "Failed to get cmdline from a virtualbox dmi property" -X fi -X ;; -X esac -X -X # Find and export guest type -X export TYPE=$(grep -Po 'type=\K[a-zA-Z]*' $CMDLINE) -} -X -patch_systemvm() { -X local patchfile=$1 -X local backupfolder="/tmp/.conf.backup" -X local logfile="/var/log/patchsystemvm.log" -X if [ -f /usr/local/cloud/systemvm/conf/cloud.jks ]; then -X rm -fr $backupfolder -X mkdir -p $backupfolder -X cp -r /usr/local/cloud/systemvm/conf/* $backupfolder/ -X fi -X rm /usr/local/cloud/systemvm -rf -X mkdir -p /usr/local/cloud/systemvm -X echo "All" | unzip $patchfile -d /usr/local/cloud/systemvm >$logfile 2>&1 -X find /usr/local/cloud/systemvm/ -name \*.sh | xargs chmod 555 -X if [ -f $backupfolder/cloud.jks ]; then -X cp -r $backupfolder/* /usr/local/cloud/systemvm/conf/ -X echo "Restored keystore file and certs using backup" >> $logfile -X fi -X rm -fr $backupfolder -X # Import global cacerts into 'cloud' service's keystore -X keytool -importkeystore -srckeystore /etc/ssl/certs/java/cacerts -destkeystore /usr/local/cloud/systemvm/certs/realhostip.keystore -srcstorepass changeit -deststorepass vmops.com -noprompt || true -X return 0 -} -X -patch() { -X local PATCH_MOUNT=/media/cdrom -X local logfile="/var/log/patchsystemvm.log" -X if [ "$TYPE" == "consoleproxy" ] || [ "$TYPE" == "secstorage" ] && [ -f ${PATCH_MOUNT}/agent.zip ] && [ -f /var/cache/cloud/patch.required ] -X then -X echo "Patching systemvm for cloud service with mount=$PATCH_MOUNT for type=$TYPE" >> $logfile -X patch_systemvm ${PATCH_MOUNT}/agent.zip -X if [ $? -gt 0 ] -X then -X echo "Failed to apply patch systemvm\n" >> $logfile -X exit 1 -X fi -X fi -X -X rm -f /var/cache/cloud/patch.required -X chmod -x /etc/systemd/system/cloud*.service -X systemctl daemon-reload -X umount $PATCH_MOUNT || true -X -X if [ -f /mnt/cmdline ]; then -X cat /mnt/cmdline > $CMDLINE -X fi -X return 0 -} -X -config_sysctl() { -X # When there is more memory reset the cache back pressure to default 100 -X physmem=$(free|awk '/^Mem:/{print $2}') -X if [ $((physmem)) -lt 409600 ]; then -X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 200" /etc/sysctl.conf -X else -X sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 100" /etc/sysctl.conf -X fi -X -X sync -X sysctl -p -} -X -bootstrap() { -X log_it "Bootstrapping systemvm appliance" -X -X export HYPERVISOR=$(hypervisor) -X [ $? -ne 0 ] && log_it "Failed to detect hypervisor type, bailing out" && exit 10 -X log_it "Starting guest services for $HYPERVISOR" -X -X config_guest -X patch -X config_sysctl -X -X log_it "Configuring systemvm type=$TYPE" -X if [ -f "/opt/cloud/bin/setup/$TYPE.sh" ]; then -X /opt/cloud/bin/setup/$TYPE.sh -X else -X /opt/cloud/bin/setup/default.sh -X fi -X -X log_it "Finished setting up systemvm" -X exit 0 -} -X -bootstrap -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/bootstrap.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh': 'MD5 check failed' - ) << \SHAR_EOF -722a9c6abfff147c7727fdcd85c96767 cloud_scripts/opt/cloud/bin/setup/bootstrap.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh'` -ne 7721 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/bootstrap.sh' is not 7721" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_console_proxy() { -X log_it "Setting up console proxy system vm" -X -X echo "cloud" > /var/cache/cloud/enabled_svcs -X echo "haproxy dnsmasq apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs -X mkdir -p /var/log/cloud -X -X setup_common eth0 eth1 eth2 -X setup_system_rfc1918_internal -X -X log_it "Setting up entry in hosts" -X sed -i /$NAME/d /etc/hosts -X public_ip=`getPublicIp` -X echo "$public_ip $NAME" >> /etc/hosts -X -X log_it "Applying iptables rules" -X cp /etc/iptables/iptables-consoleproxy /etc/iptables/rules.v4 -X -X log_it "Configuring sshd" -X local hyp=$HYPERVISOR -X if [ "$hyp" == "vmware" ] || [ "$hyp" == "hyperv" ]; then -X setup_sshd $ETH1_IP "eth1" -X else -X setup_sshd $ETH0_IP "eth0" -X fi -X -X disable_rpfilter -X enable_fwding 0 -X enable_irqbalance 0 -X rm -f /etc/logrotate.d/cloud -} -X -setup_console_proxy -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh': 'MD5 check failed' - ) << \SHAR_EOF -44adac9bf5e54d4791da00e3d1bdaf46 cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh'` -ne 1658 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/consoleproxy.sh' is not 1658" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/common.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/common.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/common.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/common.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/common.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" -X -X. /lib/lsb/init-functions -X -log_it() { -X echo "$(date) $@" >> /var/log/cloud.log -X log_action_msg "$@" -} -X -init_interfaces_orderby_macs() { -X macs=( $(echo $1 | sed "s/|/ /g") ) -X total_nics=${#macs[@]} -X interface_file=${2:-"/etc/network/interfaces"} -X rule_file=${3:-"/etc/udev/rules.d/70-persistent-net.rules"} -X -X echo -n "auto lo" > $interface_file -X for((i=0; i> $interface_file -X fi -X done -X -X cat >> $interface_file << EOF -X -iface lo inet loopback -X -EOF -X -X echo "" > $rule_file -X for((i=0; i < ${#macs[@]}; i++)) -X do -X echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${macs[$i]}\", NAME=\"eth$i\"" >> $rule_file -X done -} -X -init_interfaces() { -X if [ "$NIC_MACS" == "" ] -X then -X cat > /etc/network/interfaces << EOF -auto lo $1 $2 $3 -iface lo inet loopback -X -EOF -X else -X init_interfaces_orderby_macs "$NIC_MACS" -X fi -} -X -setup_interface() { -X local intfnum=$1 -X local ip=$2 -X local mask=$3 -X local gw=$4 -X local force=$5 -X local intf=eth${intfnum} -X local bootproto="static" -X -X if [ "$BOOTPROTO" == "dhcp" ] -X then -X if [ "$intfnum" != "0" ] -X then -X bootproto="dhcp" -X fi -X fi -X -X if [ "$ip" != "0.0.0.0" -a "$ip" != "" -o "$force" == "force" ] -X then -X echo "iface $intf inet $bootproto" >> /etc/network/interfaces -X if [ "$bootproto" == "static" ] -X then -X echo " address $ip " >> /etc/network/interfaces -X echo " netmask $mask" >> /etc/network/interfaces -X fi -X fi -X -X if [ "$ip" == "0.0.0.0" -o "$ip" == "" ] -X then -X ifconfig $intf down -X fi -X -X if [ "$force" == "force" ] -X then -X ifdown $intf -X else -X ifdown $intf -X if [ "$RROUTER" != "1" -o "$1" != "2" ] -X then -X ifup $intf -X fi -X fi -} -X -setup_interface_ipv6() { -X sysctl net.ipv6.conf.all.disable_ipv6=0 -X sysctl net.ipv6.conf.all.forwarding=1 -X sysctl net.ipv6.conf.all.accept_ra=1 -X -X sed -i "s/net.ipv6.conf.all.disable_ipv6 =.*$/net.ipv6.conf.all.disable_ipv6 = 0/" /etc/sysctl.conf -X sed -i "s/net.ipv6.conf.all.forwarding =.*$/net.ipv6.conf.all.forwarding = 1/" /etc/sysctl.conf -X sed -i "s/net.ipv6.conf.all.accept_ra =.*$/net.ipv6.conf.all.accept_ra = 1/" /etc/sysctl.conf -X -X local intfnum=$1 -X local ipv6="$2" -X local prelen="$3" -X local intf=eth${intfnum} -X -X echo "iface $intf inet6 static" >> /etc/network/interfaces -X echo " address $ipv6 " >> /etc/network/interfaces -X echo " netmask $prelen" >> /etc/network/interfaces -X echo " accept_ra 1" >> /etc/network/interfaces -X ifdown $intf -X ifup $intf -} -X -X -enable_fwding() { -X local enabled=$1 -X log_it "cloud: enable_fwding = $1" -X log_it "enable_fwding = $1" -X echo "$1" > /proc/sys/net/ipv4/ip_forward -X [ -f /etc/iptables/iptables.conf ] && sed -i "s/ENABLE_ROUTING=.*$/ENABLE_ROUTING=$enabled/" /etc/iptables/iptables.conf && return -} -X -enable_passive_ftp() { -X log_it "cloud: enabling passive FTP for guest VMs" -X echo "$1" > /proc/sys/net/netfilter/nf_conntrack_helper -} -X -disable_rpfilter() { -X log_it "cloud: disable rp_filter" -X log_it "disable rpfilter" -X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf -} -X -get_public_vif_list() { -X local vif_list="" -X for i in /sys/class/net/eth*; do -X vif=$(basename $i); -X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] -X then -X vif_list="$vif_list $vif"; -X fi -X done -X -X echo $vif_list -} -X -disable_rpfilter_domR() { -X log_it "cloud: Tuning rp_filter on public interfaces" -X -X VIF_LIST=$(get_public_vif_list) -X log_it "rpfilter public interfaces : $VIF_LIST" -X if [ "$DISABLE_RP_FILTER" == "true" ] -X then -X log_it "cloud: disable rp_filter on public interfaces" -X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf -X echo "0" > /proc/sys/net/ipv4/conf/default/rp_filter -X for vif in $VIF_LIST; do -X log_it "cloud: disable rp_filter on public interface: $vif" -X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 0/" /etc/sysctl.conf -X echo "0" > /proc/sys/net/ipv4/conf/$vif/rp_filter -X done -X else -X log_it "cloud: enable rp_filter on public interfaces" -X sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 1/" /etc/sysctl.conf -X echo "1" > /proc/sys/net/ipv4/conf/default/rp_filter -X for vif in $VIF_LIST; do -X log_it "cloud: enable rp_filter on public interface: $vif" -X sed -i "s/net.ipv4.conf.$vif.rp_filter.*$/net.ipv4.conf.$vif.rp_filter = 1/" /etc/sysctl.conf -X echo "1" > /proc/sys/net/ipv4/conf/$vif/rp_filter -X done -X fi -X log_it "cloud: Enabling rp_filter on Non-public interfaces(eth0,eth1,lo)" -X echo "1" > /proc/sys/net/ipv4/conf/eth0/rp_filter -X echo "1" > /proc/sys/net/ipv4/conf/eth1/rp_filter -X echo "1" > /proc/sys/net/ipv4/conf/lo/rp_filter -} -X -enable_irqbalance() { -X local enabled=$1 -X local proc=0 -X -X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) -X if [ $proc -le 1 ] && [ $enabled -eq 1 ] -X then -X enabled=0 -X fi -X -X log_it "Processors = $proc Enable service ${svc} = $enabled" -X local cfg=/etc/default/irqbalance -X [ -f $cfg ] && sed -i "s/ENABLED=.*$/ENABLED=$enabled/" $cfg && return -} -X -enable_vpc_rpsrfs() { -X local enable=$1 -X if [ $enable -eq 0 ] -X then -X echo 0 > /etc/rpsrfsenable -X else -X echo 1 > /etc/rpsrfsenable -X fi -X -X return 0 -} -X -enable_rpsrfs() { -X local enable=$1 -X -X if [ $enable -eq 0 ] -X then -X echo 0 > /etc/rpsrfsenable -X return 0 -X fi -X -X if [ ! -f /sys/class/net/eth0/queues/rx-0/rps_cpus ] -X then -X echo "rps is not enabled in the kernel" -X echo 0 > /etc/rpsrfsenable -X return 0 -X fi -X -X proc=$(cat /proc/cpuinfo | grep "processor" | wc -l) -X if [ $proc -le 1 ] -X then -X echo 0 > /etc/rpsrfsenable -X return 0; -X fi -X -X echo 1 > /etc/rpsrfsenable -X num=1 -X num=$(($num<<$proc)) -X num=$(($num-1)); -X echo $num; -X hex=$(printf "%x\n" $num) -X echo $hex; -X #enable rps -X echo $hex > /sys/class/net/eth0/queues/rx-0/rps_cpus -X echo $hex > /sys/class/net/eth2/queues/rx-0/rps_cpus -X -X #enble rfs -X echo 256 > /proc/sys/net/core/rps_sock_flow_entries -X echo 256 > /sys/class/net/eth0/queues/rx-0/rps_flow_cnt -X echo 256 > /sys/class/net/eth2/queues/rx-0/rps_flow_cnt -} -X -setup_common() { -X init_interfaces $1 $2 $3 -X if [ -n "$ETH0_IP" ] -X then -X setup_interface "0" $ETH0_IP $ETH0_MASK $GW -X fi -X if [ -n "$ETH0_IP6" ] -X then -X setup_interface_ipv6 "0" $ETH0_IP6 $ETH0_IP6_PRELEN -X fi -X setup_interface "1" $ETH1_IP $ETH1_MASK $GW -X if [ -n "$ETH2_IP" ] -X then -X setup_interface "2" $ETH2_IP $ETH2_MASK $GW -X fi -X -X echo $NAME > /etc/hostname -X echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon -X hostnamectl set-hostname $NAME -X -X #Nameserver -X sed -i -e "/^nameserver.*$/d" /etc/resolv.conf # remove previous entries -X sed -i -e "/^nameserver.*$/d" /etc/dnsmasq-resolv.conf # remove previous entries -X if [ -n "$internalNS1" ] -X then -X echo "nameserver $internalNS1" > /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS1" > /etc/resolv.conf -X fi -X -X if [ -n "$internalNS2" ] -X then -X echo "nameserver $internalNS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $internalNS2" >> /etc/resolv.conf -X fi -X if [ -n "$NS1" ] -X then -X echo "nameserver $NS1" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS1" >> /etc/resolv.conf -X fi -X -X if [ -n "$NS2" ] -X then -X echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $NS2" >> /etc/resolv.conf -X fi -X -X if [ -n "$IP6_NS1" ] -X then -X echo "nameserver $IP6_NS1" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $IP6_NS1" >> /etc/resolv.conf -X fi -X if [ -n "$IP6_NS2" ] -X then -X echo "nameserver $IP6_NS2" >> /etc/dnsmasq-resolv.conf -X echo "nameserver $IP6_NS2" >> /etc/resolv.conf -X fi -X -X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] -X then -X ip route add $MGMTNET via $LOCAL_GW dev eth1 -X fi -X -X ip route delete default -X if [ "$RROUTER" != "1" ] -X then -X gwdev=$3 -X if [ -z "$gwdev" ] -X then -X gwdev="eth0" -X fi -X -X ip route add default via $GW dev $gwdev -X fi -X -X # Workaround to activate vSwitch under VMware -X timeout 3 ping -n -c 3 $GW & -X if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] -X then -X timeout 3 ping -n -c 3 $LOCAL_GW & -X #This code is added to address ARP issue by pinging MGMT_GW -X MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}') -X timeout 3 ping -n -c 3 $MGMT_GW & -X fi -X -X if [ "$HYPERVISOR" == "vmware" ]; then -X ntpq -p &> /dev/null || vmware-toolbox-cmd timesync enable -X fi -} -X -setup_dnsmasq() { -X log_it "Setting up dnsmasq" -X -X touch /etc/dhcpopts.txt -X -X [ -z $DHCP_RANGE ] && [ $ETH0_IP ] && DHCP_RANGE=$ETH0_IP -X [ $ETH0_IP6 ] && DHCP_RANGE_IP6=$ETH0_IP6 -X [ -z $DOMAIN ] && DOMAIN="cloudnine.internal" -X #removing the dnsmasq multiple ranges config file. -X rm /etc/dnsmasq.d/multiple_ranges.conf -X -X #get the template -X cp /etc/dnsmasq.conf.tmpl /etc/dnsmasq.conf -X -X if [ -n "$DOMAIN" ] -X then -X #send domain name to dhcp clients -X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\"$DOMAIN\"/ /etc/dnsmasq.conf -X #DNS server will append $DOMAIN to local queries -X sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf -X #answer all local domain queries -X sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf -X fi -X -X if [ -n "$DNS_SEARCH_ORDER" ] -X then -X sed -i -e "/^[#]*dhcp-option.*=119.*$/d" /etc/dnsmasq.conf -X echo "dhcp-option-force=119,$DNS_SEARCH_ORDER" >> /etc/dnsmasq.conf -X # set the domain search order as a space seprated list for option 15 -X DNS_SEARCH_ORDER=$(echo $DNS_SEARCH_ORDER | sed 's/,/ /g') -X #send domain name to dhcp clients -X sed -i s/[#]*dhcp-option=15.*$/dhcp-option=15,\""$DNS_SEARCH_ORDER"\"/ /etc/dnsmasq.conf -X fi -X -X if [ $DHCP_RANGE ] -X then -X sed -i -e "s/^dhcp-range_ip4=.*$/dhcp-range=$DHCP_RANGE,static/" /etc/dnsmasq.conf -X else -X sed -i -e "s/^dhcp-range_ip4=.*$//" /etc/dnsmasq.conf -X fi -X if [ $DHCP_RANGE_IP6 ] -X then -X sed -i -e "s/^dhcp-range_ip6=.*$/dhcp-range=$DHCP_RANGE_IP6,static/" /etc/dnsmasq.conf -X # For nondefault6 tagged host, don't send dns-server information -X sed -i /nondefault6/d /etc/dnsmasq.conf -X echo "dhcp-option=nondefault6,option6:dns-server" >> /etc/dnsmasq.conf -X else -X sed -i -e "s/^dhcp-range_ip6=.*$//" /etc/dnsmasq.conf -X fi -X -X if [ "$RROUTER" == "1" ] -X then -X DEFAULT_GW=$GUEST_GW -X INTERNAL_DNS=$GUEST_GW -X else -X if [ "$TYPE" == "dhcpsrvr" ] -X then -X DEFAULT_GW=$GW -X else -X DEFAULT_GW=$ETH0_IP -X fi -X INTERNAL_DNS=$ETH0_IP -X fi -X sed -i -e "/^[#]*dhcp-option=option:router.*$/d" /etc/dnsmasq.conf -X [ $DEFAULT_GW ] && echo "dhcp-option=option:router,$DEFAULT_GW" >> /etc/dnsmasq.conf -X -X [ $ETH0_IP ] && [ $NS1 ] && NS="$NS1," -X [ $ETH0_IP ] && [ $NS2 ] && NS="$NS$NS2," -X [ $ETH0_IP6 ] && [ $IP6_NS1 ] && NS6="[$IP6_NS1]," -X [ $ETH0_IP6 ] && [ $IP6_NS2 ] && NS6="$NS6[$IP6_NS2]," -X #for now set up ourself as the dns server as well -X sed -i -e "/^[#]*dhcp-option=6,.*$/d" /etc/dnsmasq.conf -X sed -i -e "/^[#]*dhcp-option=option6:dns-server,.*$/d" /etc/dnsmasq.conf -X if [ "$USE_EXTERNAL_DNS" != "true" ] -X then -X [ $ETH0_IP ] && NS="$INTERNAL_DNS,$NS" -X [ $ETH0_IP6 ] && NS6="[::],$NS6" -X # enable dns -X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf -X else -X # disable dns -X sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf -X echo "port=0" >> /etc/dnsmasq.conf -X fi -X NS=${NS%?} -X NS6=${NS6%?} -X [ $ETH0_IP ] && echo "dhcp-option=6,$NS" >> /etc/dnsmasq.conf -X [ $ETH0_IP6 ] && echo "dhcp-option=option6:dns-server,$NS6" >> /etc/dnsmasq.conf -X #adding the name data-server to the /etc/hosts for allowing the access to user-data service and ssh-key reset in every subnet. -X #removing the existing entires to avoid duplicates on restarts. -X sed -i '/data-server/d' /etc/hosts -X if [ -n "$ETH0_IP" ] -X then -X echo "$ETH0_IP data-server" >> /etc/hosts -X fi -X if [ -n "$ETH0_IP6" ] -X then -X echo "$ETH0_IP6 data-server" >> /etc/hosts -X fi -X #add the dhcp-client-update only if dnsmasq version is 2.6 and above -X dnsmasqVersion=$(dnsmasq -v | grep version -m 1 | grep -o "[[:digit:]]\.[[:digit:]]") -X major=$(echo "$dnsmasqVersion" | cut -d '.' -f 1) -X minor=$(echo "$dnsmasqVersion" | cut -d '.' -f 2) -X if [ "$major" -eq '2' -a "$minor" -ge '6' ] || [ "$major" -gt '2' ] -X then -X sed -i -e "/^dhcp-client-update/d" /etc/dnsmasq.conf -X echo 'dhcp-client-update' >> /etc/dnsmasq.conf -X fi -X -X command -v dhcp_release > /dev/null 2>&1 -X no_dhcp_release=$? -X if [ $no_dhcp_release -eq 0 -a -z "$ETH0_IP6" ] -X then -X echo 1 > /var/cache/cloud/dnsmasq_managed_lease -X sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf -X else -X echo 0 > /var/cache/cloud/dnsmasq_managed_lease -X fi -} -X -setup_sshd(){ -X local ip=$1 -X local eth=$2 -X [ -f /etc/ssh/sshd_config ] && sed -i -e "s/^[#]*ListenAddress.*$/ListenAddress $ip/" /etc/ssh/sshd_config -X sed -i "/3922/s/eth./$eth/" /etc/iptables/rules.v4 -} -X -setup_vpc_apache2() { -X log_it "Setting up apache web server for VPC" -X systemctl disable apache2 -X clean_ipalias_config -X setup_apache2_common -} -X -clean_ipalias_config() { -X rm -f /etc/apache2/conf.d/ports.*.meta-data.conf -X rm -f /etc/apache2/sites-available/ipAlias* -X rm -f /etc/apache2/sites-enabled/ipAlias* -X rm -f /etc/apache2/conf.d/vhost*.conf -X rm -f /etc/apache2/ports.conf -X rm -f /etc/apache2/vhostexample.conf -X rm -f /etc/apache2/sites-available/* -X rm -f /etc/apache2/sites-enabled/* -X -X rm -rf /etc/failure_config -} -X -setup_apache2_common() { -X sed -i 's/^Include ports.conf.*/# CS: Done by Python CsApp config\n#Include ports.conf/g' /etc/apache2/apache2.conf -X # Disable listing of http://SSVM-IP/icons folder for security issue. see article http://www.i-lateral.com/tutorials/disabling-the-icons-folder-on-an-ubuntu-web-server/ -X [ -f /etc/apache2/mods-available/alias.conf ] && sed -i s/"Options Indexes MultiViews"/"Options -Indexes MultiViews"/ /etc/apache2/mods-available/alias.conf -X -X echo "Options -Indexes" > /var/www/html/.htaccess -} -X -setup_apache2() { -X log_it "Setting up apache web server" -X mkdir -p /var/www -X chown www-data:www-data -R /var/www -X clean_ipalias_config -X setup_apache2_common -X local ip=$1 -} -X -setup_aesni() { -X if [ `grep aes /proc/cpuinfo | wc -l` -gt 0 ] -X then -X modprobe aesni_intel -X fi -} -X -setup_storage_network() { -X if [ x"$STORAGE_IP" == "x" -o x"$STORAGE_NETMASK" == "x" ] -X then -X log_it "Incompleted parameters STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR. Cannot setup storage network" -X return -X fi -X -X echo "" >> /etc/network/interfaces -X echo "auto eth3" >> /etc/network/interfaces -X -X setup_interface "3" "$STORAGE_IP" "$STORAGE_NETMASK" -X [ -n "$MTU" ] && ifconfig eth3 mtu $MTU && echo " mtu $MTU" >> /etc/network/interfaces -X #ip route add "$STORAGE_CIDR" via "$STORAGE_IP" -X log_it "Successfully setup storage network with STORAGE_IP:$STORAGE_IP, STORAGE_NETMASK:$STORAGE_NETMASK, STORAGE_CIDR:$STORAGE_CIDR" -} -X -setup_system_rfc1918_internal() { -X public_ip=`getPublicIp` -X echo "$public_ip" | grep -E "^((127\.)|(10\.)|(172\.1[6-9]\.)|(172\.2[0-9]\.)|(172\.3[0-1]\.)|(192\.168\.))" -X if [ "$?" == "0" ]; then -X log_it "Not setting up route of RFC1918 space to $LOCAL_GW befause $public_ip is RFC1918." -X else -X log_it "Setting up route of RFC1918 space to $LOCAL_GW" -X # Setup general route for RFC 1918 space, as otherwise it will be sent to -X # the public gateway and not work -X # More specific routes that may be set have preference over this generic route. -X ip route add 10.0.0.0/8 via $LOCAL_GW -X ip route add 172.16.0.0/12 via $LOCAL_GW -X ip route add 192.168.0.0/16 via $LOCAL_GW -X fi -} -X -getPublicIp() { -X public_ip=$ETH2_IP -X [ "$ETH2_IP" == "0.0.0.0" ] && public_ip=$ETH1_IP -X echo $public_ip -} -X -setup_ntp() { -X log_it "Setting up NTP" -X NTP_CONF_FILE="/etc/ntp.conf" -X if [ -f $NTP_CONF_FILE ] -X then -X IFS=',' read -a server_list <<< "$NTP_SERVER_LIST" -X for (( iterator=${#server_list[@]}-1 ; iterator>=0 ; iterator-- )) -X do -X server=$(echo ${server_list[iterator]} | tr -d '\r') -X PATTERN="server $server" -X if grep -q "^$PATTERN$" $NTP_CONF_FILE ; then -X sed -i "/^$PATTERN$/d" $NTP_CONF_FILE -X fi -X sed -i "0,/^server/s//$PATTERN\nserver/" $NTP_CONF_FILE -X done -X systemctl enable ntp -X else -X log_it "NTP configuration file not found" -X fi -} -X -routing_svcs() { -X echo "haproxy apache2" > /var/cache/cloud/enabled_svcs -X echo "cloud nfs-common portmap" > /var/cache/cloud/disabled_svcs -X if [ "$RROUTER" -eq "1" ] -X then -X echo "keepalived conntrackd" >> /var/cache/cloud/enabled_svcs -X echo "dnsmasq" >> /var/cache/cloud/disabled_svcs -X else -X echo "dnsmasq" >> /var/cache/cloud/enabled_svcs -X echo "keepalived conntrackd " >> /var/cache/cloud/disabled_svcs -X fi -} -X -parse_cmd_line() { -X CMDLINE=$(cat /var/cache/cloud/cmdline) -X TYPE="unknown" -X BOOTPROTO="static" -X DISABLE_RP_FILTER="false" -X STORAGE_IP="" -X STORAGE_NETMASK="" -X STORAGE_CIDR="" -X VM_PASSWORD="" -X -X CHEF_TMP_FILE=/tmp/cmdline.json -X COMMA="\t" -X echo -e "{\n\"type\": \"cmdline\"," > ${CHEF_TMP_FILE} -X echo -e "\"cmd_line\": {" >> ${CHEF_TMP_FILE} -X -X for i in $CMDLINE -X do -X # search for foo=bar pattern and cut out foo -X KEY=$(echo $i | cut -d= -f1) -X VALUE=$(echo $i | cut -d= -f2) -X echo -en ${COMMA} >> ${CHEF_TMP_FILE} -X # Two lines so values do not accidently interpretted as escapes!! -X echo -n \"${KEY}\"': '\"${VALUE}\" >> ${CHEF_TMP_FILE} -X COMMA=",\n\t" -X case $KEY in -X disable_rp_filter) -X export DISABLE_RP_FILTER=$VALUE -X ;; -X eth0ip) -X export ETH0_IP=$VALUE -X ;; -X eth1ip) -X export ETH1_IP=$VALUE -X ;; -X eth2ip) -X export ETH2_IP=$VALUE -X ;; -X host) -X export MGMT_HOST=$VALUE -X ;; -X gateway) -X export GW=$VALUE -X ;; -X ip6gateway) -X export IP6GW=$VALUE -X ;; -X eth0mask) -X export ETH0_MASK=$VALUE -X ;; -X eth1mask) -X export ETH1_MASK=$VALUE -X ;; -X eth2mask) -X export ETH2_MASK=$VALUE -X ;; -X eth0ip6) -X export ETH0_IP6=$VALUE -X ;; -X eth0ip6prelen) -X export ETH0_IP6_PRELEN=$VALUE -X ;; -X internaldns1) -X export internalNS1=$VALUE -X ;; -X internaldns2) -X export internalNS2=$VALUE -X ;; -X dns1) -X export NS1=$VALUE -X ;; -X dns2) -X export NS2=$VALUE -X ;; -X ip6dns1) -X export IP6_NS1=$VALUE -X ;; -X ip6dns2) -X export IP6_NS2=$VALUE -X ;; -X domain) -X export DOMAIN=$VALUE -X ;; -X dnssearchorder) -X export DNS_SEARCH_ORDER=$VALUE -X ;; -X useextdns) -X export USE_EXTERNAL_DNS=$VALUE -X ;; -X mgmtcidr) -X export MGMTNET=$VALUE -X ;; -X localgw) -X export LOCAL_GW=$VALUE -X ;; -X template) -X export TEMPLATE=$VALUE -X ;; -X sshonguest) -X export SSHONGUEST=$VALUE -X ;; -X name) -X export NAME=$VALUE -X ;; -X dhcprange) -X export DHCP_RANGE=$(echo $VALUE | tr ':' ',') -X ;; -X bootproto) -X export BOOTPROTO=$VALUE -X ;; -X type) -X export TYPE=$VALUE -X ;; -X defaultroute) -X export DEFAULTROUTE=$VALUE -X ;; -X redundant_router) -X export RROUTER=$VALUE -X ;; -X redundant_state) -X export RROUTER_STATE=$VALUE -X ;; -X guestgw) -X export GUEST_GW=$VALUE -X ;; -X guestbrd) -X export GUEST_BRD=$VALUE -X ;; -X guestcidrsize) -X export GUEST_CIDR_SIZE=$VALUE -X ;; -X router_pr) -X export ROUTER_PR=$VALUE -X ;; -X extra_pubnics) -X export EXTRA_PUBNICS=$VALUE -X ;; -X nic_macs) -X export NIC_MACS=$VALUE -X ;; -X mtu) -X export MTU=$VALUE -X ;; -X storageip) -X export STORAGE_IP=$VALUE -X ;; -X storagenetmask) -X export STORAGE_NETMASK=$VALUE -X ;; -X storagecidr) -X export STORAGE_CIDR=$VALUE -X ;; -X vmpassword) -X export VM_PASSWORD=$VALUE -X ;; -X vpccidr) -X export VPCCIDR=$VALUE -X ;; -X cidrsize) -X export CIDR_SIZE=$VALUE -X ;; -X advert_int) -X export ADVERT_INT=$VALUE -X ;; -X ntpserverlist) -X export NTP_SERVER_LIST=$VALUE -X ;; -X esac -X done -X echo -e "\n\t}\n}" >> ${CHEF_TMP_FILE} -X if [ "$TYPE" != "unknown" ] -X then -X mv ${CHEF_TMP_FILE} /var/cache/cloud/cmd_line.json -X fi -X -X [ $ETH0_IP ] && export LOCAL_ADDRS=$ETH0_IP -X [ $ETH0_IP6 ] && export LOCAL_ADDRS=$ETH0_IP6 -X [ $ETH0_IP ] && [ $ETH0_IP6 ] && export LOCAL_ADDRS="$ETH0_IP,$ETH0_IP6" -X -X # Randomize cloud password so only ssh login is allowed -X echo "cloud:`openssl rand -base64 32`" | chpasswd -X -X if [ x"$VM_PASSWORD" != x"" ] -X then -X echo "root:$VM_PASSWORD" | chpasswd -X fi -} -X -parse_cmd_line -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/common.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/common.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/common.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/common.sh': 'MD5 check failed' - ) << \SHAR_EOF -8754c81bacd82458e4ce221b476505ea cloud_scripts/opt/cloud/bin/setup/common.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/common.sh'` -ne 22472 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/common.sh' is not 22472" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -dhcpsrvr_svcs() { -X echo "dnsmasq apache2" > /var/cache/cloud/enabled_svcs -X echo "cloud nfs-common conntrackd keepalived haproxy portmap" > /var/cache/cloud/disabled_svcs -} -X -setup_dhcpsrvr() { -X log_it "Setting up dhcp server system vm" -X setup_common eth0 eth1 -X setup_dnsmasq -X setup_apache2 $ETH0_IP -X -X sed -i /$NAME/d /etc/hosts -X [ $ETH0_IP ] && echo "$ETH0_IP $NAME" >> /etc/hosts -X [ $ETH0_IP6 ] && echo "$ETH0_IP6 $NAME" >> /etc/hosts -X -X enable_irqbalance 0 -X enable_fwding 0 -X -X cp /etc/iptables/iptables-router /etc/iptables/rules.v4 -X -X #Only allow DNS service for current network -X sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 -X -X if [ "$SSHONGUEST" == "true" ] -X then -X setup_sshd $ETH0_IP "eth0" -X else -X setup_sshd $ETH1_IP "eth1" -X fi -} -X -dhcpsrvr_svcs -if [ $? -gt 0 ] -then -X log_it "Failed to execute dhcpsrvr_svcs" -X exit 1 -fi -setup_dhcpsrvr -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh': 'MD5 check failed' - ) << \SHAR_EOF -08afc46420e5e388ba6be68cfdbd4a59 cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh'` -ne 1985 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/dhcpsrvr.sh' is not 1985" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/cloud-early-config ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/cloud-early-config (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/cloud-early-config (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" -X -# Clear boot up flag, it would be created by rc.local after boot up done -mkdir -p /var/cache/cloud -rm -f /var/cache/cloud/boot_up_done -X -[ -x /sbin/ifup ] || exit 0 -X -X. /lib/lsb/init-functions -X -log_it() { -X echo "$(date) $@" >> /var/log/cloud.log -X log_action_msg "$@" -} -X -patch() { -X local PATCH_MOUNT=/media/cdrom -X local patchfile=$PATCH_MOUNT/cloud-scripts.tgz -X local privkey=$PATCH_MOUNT/authorized_keys -X local md5file=/var/cache/cloud/cloud-scripts-signature -X local cdrom_dev= -X mkdir -p $PATCH_MOUNT -X -X if [ -e /dev/xvdd ]; then -X cdrom_dev=/dev/xvdd -X elif [ -e /dev/cdrom ]; then -X cdrom_dev=/dev/cdrom -X elif [ -e /dev/cdrom1 ]; then -X cdrom_dev=/dev/cdrom1 -X elif [ -e /dev/cdrom2 ]; then -X cdrom_dev=/dev/cdrom2 -X elif [ -e /dev/cdrom3 ]; then -X cdrom_dev=/dev/cdrom3 -X fi -X -X if [ -f /var/cache/cloud/authorized_keys ]; then -X privkey=/var/cache/cloud/authorized_keys -X fi -X -X if [ -n "$cdrom_dev" ]; then -X mount -o ro $cdrom_dev $PATCH_MOUNT -X local oldmd5= -X [ -f ${md5file} ] && oldmd5=$(cat ${md5file}) -X local newmd5= -X [ -f ${patchfile} ] && newmd5=$(md5sum ${patchfile} | awk '{print $1}') -X -X log_it "Scripts checksum detected: oldmd5=$oldmd5 newmd5=$newmd5" -X if [ "$oldmd5" != "$newmd5" ] && [ -f ${patchfile} ] && [ "$newmd5" != "" ] -X then -X tar xzf $patchfile -C / -X echo ${newmd5} > ${md5file} -X log_it "Patched scripts using $patchfile" -X touch /var/cache/cloud/patch.required -X fi -X -X if [ -f $privkey ]; then -X cp -f $privkey /root/.ssh/ -X chmod go-rwx /root/.ssh/authorized_keys -X fi -X fi -X -X return 0 -} -X -start() { -X log_it "Executing cloud-early-config" -X -X # Clear /tmp for file lock -X rm -f /tmp/*.lock -X rm -f /tmp/rrouter_bumped -X rm -f /root/.rnd -X echo "" > /root/.ssh/known_hosts -X -X patch -X sync -X /opt/cloud/bin/setup/bootstrap.sh -X -X log_it "Finished setting up systemvm" -X exit 0 -} -X -start -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/cloud-early-config failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config': 'MD5 check failed' - ) << \SHAR_EOF -c9e5973de3771fd5f5e9b490c60db970 cloud_scripts/opt/cloud/bin/setup/cloud-early-config -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config'` -ne 2765 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/cloud-early-config' is not 2765" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/setup/default.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/setup/default.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/setup/default.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/setup/default.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/setup/default.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X. /opt/cloud/bin/setup/common.sh -X -setup_default() { -X cat > /etc/network/interfaces << EOF -auto lo -iface lo inet loopback -EOF -X cp -f /etc/iptables/rt_tables_init /etc/iproute2/rt_tables -} -X -setup_default -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/setup/default.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/setup/default.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/setup/default.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/setup/default.sh': 'MD5 check failed' - ) << \SHAR_EOF -20e3a01cb77930eba6438de6d9a3f193 cloud_scripts/opt/cloud/bin/setup/default.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/setup/default.sh'` -ne 1002 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/setup/default.sh' is not 1002" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/loadbalancer.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/loadbalancer.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/loadbalancer.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -X -# $Id: loadbalancer.sh 9947 2010-06-25 19:34:24Z manuel $ $HeadURL: svn://svn.lab.vmops.com/repos/vmdev/java/patches/xenserver/root/loadbalancer.sh $ -# loadbalancer.sh -- reconfigure loadbalancer rules -# @VERSION@ -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s: -i -a -d -f -s \n" $(basename $0) >&2 -} -X -# set -x -X -# ensure that the nic has the public ip we are load balancing on -ip_entry() { -X local added=$1 -X local removed=$2 -X -X if [ "$added" == "none" ] -X then -X added="" -X fi -X -X if [ "$removed" == "none" ] -X then -X removed="" -X fi -X -X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") -X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") -X -X for i in $a -X do -X local pubIp=$(echo $i | cut -d: -f1) -X logger -t cloud "Adding public ip $pubIp for load balancing" -X for vif in $VIF_LIST; do -X sudo ip addr add dev $vif $pubIp/32 -X #ignore error since it is because the ip is already there -X done -X done -X -X for i in $r -X do -X logger -t cloud "Removing public ips for deleted loadbalancers" -X local pubIp=$(echo $i | cut -d: -f1) -X logger -t cloud "Removing public ip $pubIp for deleted loadbalancers" -X for vif in $VIF_LIST; do -X sudo ip addr del $pubIp/32 dev $vif -X done -X done -X -X return 0 -} -get_lb_vif_list() { -# add eth0 to the VIF_LIST if it is not there, this allows guest VMs to use the LB service. -X local lb_list="$VIF_LIST eth0"; -X lb_list=$(echo $lb_list | tr " " "\n" | sort | uniq | tr "\n" " ") -X echo $lb_list -} -fw_remove_backup() { -X local lb_vif_list=$(get_lb_vif_list) -X for vif in $lb_vif_list; do -X sudo iptables -F back_load_balancer_$vif 2> /dev/null -X sudo iptables -D INPUT -i $vif -p tcp -j back_load_balancer_$vif 2> /dev/null -X sudo iptables -X back_load_balancer_$vif 2> /dev/null -X done -X sudo iptables -F back_lb_stats 2> /dev/null -X sudo iptables -D INPUT -p tcp -j back_lb_stats 2> /dev/null -X sudo iptables -X back_lb_stats 2> /dev/null -} -fw_restore() { -X local lb_vif_list=$(get_lb_vif_list) -X for vif in $lb_vif_list; do -X sudo iptables -F load_balancer_$vif 2> /dev/null -X sudo iptables -D INPUT -i $vif -p tcp -j load_balancer_$vif 2> /dev/null -X sudo iptables -X load_balancer_$vif 2> /dev/null -X sudo iptables -E back_load_balancer_$vif load_balancer_$vif 2> /dev/null -X done -X sudo iptables -F lb_stats 2> /dev/null -X sudo iptables -D INPUT -p tcp -j lb_stats 2> /dev/null -X sudo iptables -X lb_stats 2> /dev/null -X sudo iptables -E back_lb_stats lb_stats 2> /dev/null -} -# firewall entry to ensure that haproxy can receive on specified port -fw_entry() { -X local added=$1 -X local removed=$2 -X local stats=$3 -X -X if [ "$added" == "none" ] -X then -X added="" -X fi -X -X if [ "$removed" == "none" ] -X then -X removed="" -X fi -X -X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") -X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") -X -# back up the iptable rules by renaming before creating new. -X local lb_vif_list=$(get_lb_vif_list) -X for vif in $lb_vif_list; do -X sudo iptables -E load_balancer_$vif back_load_balancer_$vif 2> /dev/null -X sudo iptables -N load_balancer_$vif 2> /dev/null -X sudo iptables -A INPUT -i $vif -p tcp -j load_balancer_$vif -X done -X sudo iptables -E lb_stats back_lb_stats 2> /dev/null -X sudo iptables -N lb_stats 2> /dev/null -X sudo iptables -A INPUT -p tcp -j lb_stats -X -X for i in $a -X do -X local pubIp=$(echo $i | cut -d: -f1) -X local dport=$(echo $i | cut -d: -f2) -X local lb_vif_list=$(get_lb_vif_list) -X for vif in $lb_vif_list; do -X -#TODO : The below delete will be used only when we upgrade the from older verion to the newer one , the below delete become obsolute in the future. -X sudo iptables -D INPUT -i $vif -p tcp -d $pubIp --dport $dport -j ACCEPT 2> /dev/null -X -X sudo iptables -A load_balancer_$vif -p tcp -d $pubIp --dport $dport -j ACCEPT -X -X if [ $? -gt 0 ] -X then -X return 1 -X fi -X done -X done -X local pubIp=$(echo $stats | cut -d: -f1) -X local dport=$(echo $stats | cut -d: -f2) -X local cidrs=$(echo $stats | cut -d: -f3 | sed 's/-/,/') -X sudo iptables -A lb_stats -s $cidrs -p tcp -m state --state NEW -d $pubIp --dport $dport -j ACCEPT -X -X -#TODO : The below delete in the for-loop will be used only when we upgrade the from older verion to the newer one , the below delete become obsolute in the future. -X for i in $r -X do -X local pubIp=$(echo $i | cut -d: -f1) -X local dport=$(echo $i | cut -d: -f2) -X -X for vif in $VIF_LIST; do -X sudo iptables -D INPUT -i $vif -p tcp -d $pubIp --dport $dport -j ACCEPT 2> /dev/null -X done -X done -X -X return 0 -} -X -#Hot reconfigure HA Proxy in the routing domain -reconfig_lb() { -X logger -t cloud "Reconfiguring loadbalancer using $1" -X /root/reconfigLB.sh $1 -X return $? -} -X -# Restore the HA Proxy to its previous state, and revert iptables rules on DomR -restore_lb() { -X logger -t cloud "Restoring HA Proxy to previous state" -X # Copy the old version of haproxy.cfg into the file that reconfigLB.sh uses -X cp /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg.new -X -X if [ $? -eq 0 ] -X then -X # Run reconfigLB.sh again -X /root/reconfigLB.sh /etc/haproxy/haproxy.cfg.new -X fi -} -X -get_vif_list() { -X local vif_list="" -X for i in /sys/class/net/eth*; do -X vif=$(basename $i); -X if [ "$vif" != "eth0" ] && [ "$vif" != "eth1" ] -X then -X vif_list="$vif_list $vif"; -X fi -X done -X if [ "$vif_list" == "" ] -X then -X vif_list="eth0" -X fi -X -X logger -t cloud "Loadbalancer public interfaces = $vif_list" -X echo $vif_list -} -X -mflag= -iflag= -aflag= -dflag= -fflag= -sflag= -X -while getopts 'i:a:d:f:s:' OPTION -do -X case $OPTION in -X i) iflag=1 -X domRIp="$OPTARG" -X ;; -X a) aflag=1 -X addedIps="$OPTARG" -X ;; -X d) dflag=1 -X removedIps="$OPTARG" -X ;; -X f) fflag=1 -X cfgfile="$OPTARG" -X ;; -X s) sflag=1 -X statsIp="$OPTARG" -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [ "$addedIps" == "" ] -then -X addedIps="none" -fi -X -X -if [ "$removedIps" == "" ] -then -X removedIps="none" -fi -X -VIF_LIST=$(get_vif_list) -X -X -if [ "$addedIps" == "" ] -then -X addedIps="none" -fi -X -if [ "$removedIps" == "" ] -then -X removedIps="none" -fi -X -#FIXME: make this explicit via check on vm type or passed in flag -if [ "$VIF_LIST" == "eth0" ] -then -X ip_entry $addedIps $removedIps -fi -X -# hot reconfigure haproxy -reconfig_lb $cfgfile -X -if [ $? -gt 0 ] -then -X logger -t cloud "Reconfiguring loadbalancer failed" -X #FIXME: make this explicit via check on vm type or passed in flag -X if [ "$VIF_LIST" == "eth0" ] -X then -X ip_entry $removedIps $addedIps -X fi -X unlock_exit 1 $lock $locked -fi -X -# iptables entry to ensure that haproxy receives traffic -fw_entry $addedIps $removedIps $statsIp -X -if [ $? -gt 0 ] -then -X logger -t cloud "Failed to apply firewall rules for load balancing, reverting HA Proxy config" -X # Restore the LB -X restore_lb -X -X logger -t cloud "Reverting firewall config" -X # Revert iptables rules on DomR -X fw_restore -X -X #FIXME: make this explicit via check on vm type or passed in flag -X if [ "$VIF_LIST" == "eth0" ] -X then -X logger -t cloud "Reverting ip address changes to eth0" -X ip_entry $removedIps $addedIps -X fi -X -X unlock_exit 1 $lock $locked -else -X # Remove backedup iptable rules -X fw_remove_backup -fi -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/loadbalancer.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/loadbalancer.sh': 'MD5 check failed' - ) << \SHAR_EOF -6da53e4d9dd0b11f6fa334c6f583f8cd cloud_scripts/opt/cloud/bin/loadbalancer.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/loadbalancer.sh'` -ne 8234 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/loadbalancer.sh' is not 8234" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/baremetal_snat.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/baremetal_snat.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/baremetal_snat.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' && -#!/bin/bash -X -#Licensed to the Apache Software Foundation (ASF) under one -#or more contributor license agreements. See the NOTICE file -#distributed with this work for additional information -#regarding copyright ownership. The ASF licenses this file -#to you under the Apache License, Version 2.0 (the -#"License"); you may not use this file except in compliance -#with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -#Unless required by applicable law or agreed to in writing, -#software distributed under the License is distributed on an -#"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -#KIND, either express or implied. See the License for the -#specific language governing permissions and limitations -#under the License. -X -set +u -X -mgmt_nic_ip=$1 -internal_server_ip=$2 -gateway_ip=$3 -X -ip route | grep "$internal_server_ip" > /dev/null -X -if [ $? -ne 0 ]; then -X ip route add $internal_server_ip via $gateway_ip -fi -X -iptables-save | grep -- "-A POSTROUTING -d $internal_server_ip" > /dev/null -X -if [ $? -ne 0 ]; then -X iptables -t nat -A POSTROUTING -d $internal_server_ip -j SNAT --to-source $mgmt_nic_ip -fi -X -X -iptables-save | grep -- "-A INPUT -i eth0 -p udp -m udp --dport 69 -j ACCEPT" > /dev/null -if [ $? -ne 0 ]; then -X iptables -I INPUT -i eth0 -p udp -m udp --dport 69 -j ACCEPT -fi -X -iptables-save | grep -- "-A FORWARD -i eth1 -o eth0 -j ACCEPT" > /dev/null -if [ $? -ne 0 ]; then -X iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT -fi -X -rule="-A FORWARD -d $internal_server_ip/32 -i eth0 -o eth1 -j ACCEPT" -iptables-save | grep -- "$rule" > /dev/null -if [ $? -ne 0 ]; then -X iptables -I FORWARD -d $internal_server_ip/32 -i eth0 -o eth1 -j ACCEPT -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/baremetal_snat.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh': 'MD5 check failed' - ) << \SHAR_EOF -acab3e2b25ee898e7dd05c4e77b15569 cloud_scripts/opt/cloud/bin/baremetal_snat.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh'` -ne 1717 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/baremetal_snat.sh' is not 1717" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_vpnusers.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vpnusers.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vpnusers.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import copy -X -X -def merge(dbag, data): -X dbagc = copy.deepcopy(dbag) -X -X print dbag -X print data -X if "vpn_users" not in data: -X return dbagc -X -X # remove previously deleted user from the dict -X for user in dbagc.keys(): -X if user == 'id': -X continue -X userrec = dbagc[user] -X add = userrec['add'] -X if not add: -X del(dbagc[user]) -X -X for user in data['vpn_users']: -X username = user['user'] -X add = user['add'] -X if username not in dbagc.keys(): -X dbagc[username] = user -X elif username in dbagc.keys() and not add: -X dbagc[username] = user -X -X return dbagc -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_vpnusers.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py': 'MD5 check failed' - ) << \SHAR_EOF -d54ff81fd9901ecc0bfbe9528343e238 cloud_scripts/opt/cloud/bin/cs_vpnusers.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py'` -ne 1469 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vpnusers.py' is not 1469" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/merge.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/merge.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/merge.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/merge.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/merge.py' && -#!/usr/bin/python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import json -import os -import uuid -import logging -import gzip -import shutil -import cs_ip -import cs_guestnetwork -import cs_cmdline -import cs_vmp -import cs_network_acl -import cs_firewallrules -import cs_loadbalancer -import cs_monitorservice -import cs_vmdata -import cs_dhcp -import cs_forwardingrules -import cs_site2sitevpn -import cs_remoteaccessvpn -import cs_vpnusers -import cs_staticroutes -X -X -class DataBag: -X -X DPATH = "/etc/cloudstack" -X -X def __init__(self): -X self.bdata = {} -X -X def load(self): -X data = self.bdata -X if not os.path.exists(self.DPATH): -X os.makedirs(self.DPATH) -X self.fpath = os.path.join(self.DPATH, self.key + '.json') -X -X try: -X with open(self.fpath, 'r') as _fh: -X logging.debug("Loading data bag type %s", self.key) -X data = json.load(_fh) -X except (IOError, ValueError): -X logging.debug("Caught load error, creating empty data bag type %s", self.key) -X data.update({"id": self.key}) -X finally: -X self.dbag = data -X -X def save(self, dbag): -X try: -X with open(self.fpath, 'w') as _fh: -X logging.debug("Writing data bag type %s", self.key) -X json.dump( -X dbag, _fh, -X sort_keys=True, -X indent=2 -X ) -X except IOError: -X logging.error("Could not write data bag %s", self.key) -X -X def getDataBag(self): -X return self.dbag -X -X def setKey(self, key): -X self.key = key -X -X -class updateDataBag: -X -X DPATH = "/etc/cloudstack" -X -X def __init__(self, qFile): -X self.qFile = qFile -X self.fpath = '' -X self.bdata = {} -X self.process() -X -X def process(self): -X self.db = DataBag() -X if (self.qFile.type == "staticnatrules" or self.qFile.type == "forwardrules"): -X self.db.setKey("forwardingrules") -X else: -X self.db.setKey(self.qFile.type) -X dbag = self.db.load() -X logging.info("Command of type %s received", self.qFile.type) -X -X if self.qFile.type == 'ips': -X dbag = self.processIP(self.db.getDataBag()) -X elif self.qFile.type == 'guestnetwork': -X dbag = self.processGuestNetwork(self.db.getDataBag()) -X elif self.qFile.type == 'cmdline': -X dbag = self.processCL(self.db.getDataBag()) -X elif self.qFile.type == 'vmpassword': -X dbag = self.processVMpassword(self.db.getDataBag()) -X elif self.qFile.type == 'networkacl': -X dbag = self.process_network_acl(self.db.getDataBag()) -X elif self.qFile.type == 'firewallrules': -X dbag = self.process_firewallrules(self.db.getDataBag()) -X elif self.qFile.type == 'loadbalancer': -X dbag = self.process_loadbalancer(self.db.getDataBag()) -X elif self.qFile.type == 'monitorservice': -X dbag = self.process_monitorservice(self.db.getDataBag()) -X elif self.qFile.type == 'vmdata': -X dbag = self.processVmData(self.db.getDataBag()) -X elif self.qFile.type == 'dhcpentry': -X dbag = self.process_dhcp_entry(self.db.getDataBag()) -X elif self.qFile.type == 'staticnatrules' or self.qFile.type == 'forwardrules': -X dbag = self.processForwardingRules(self.db.getDataBag()) -X elif self.qFile.type == 'site2sitevpn': -X dbag = self.process_site2sitevpn(self.db.getDataBag()) -X elif self.qFile.type == 'remoteaccessvpn': -X dbag = self.process_remoteaccessvpn(self.db.getDataBag()) -X elif self.qFile.type == 'vpnuserlist': -X dbag = self.process_vpnusers(self.db.getDataBag()) -X elif self.qFile.type == 'staticroutes': -X dbag = self.process_staticroutes(self.db.getDataBag()) -X elif self.qFile.type == 'ipaliases': -X self.db.setKey('ips') -X self.db.load() -X dbag = self.process_ipaliases(self.db.getDataBag()) -X elif self.qFile.type == 'dhcpconfig': -X logging.error("I don't think I need %s anymore", self.qFile.type) -X return -X else: -X logging.error("Error I do not know what to do with file of type %s", self.qFile.type) -X return -X self.db.save(dbag) -X -X def processGuestNetwork(self, dbag): -X d = self.qFile.data -X dp = {} -X dp['public_ip'] = d['router_guest_ip'] -X dp['netmask'] = d['router_guest_netmask'] -X dp['source_nat'] = False -X dp['add'] = d['add'] -X dp['one_to_one_nat'] = False -X dp['gateway'] = d['router_guest_gateway'] -X dp['nic_dev_id'] = d['device'][3:] -X dp['nw_type'] = 'guest' -X dp = PrivateGatewayHack.update_network_type_for_privategateway(dbag, dp) -X qf = QueueFile() -X qf.load({'ip_address': [dp], 'type': 'ips'}) -X if 'domain_name' not in d.keys() or d['domain_name'] == '': -X d['domain_name'] = "cloudnine.internal" -X -X d = PrivateGatewayHack.update_network_type_for_privategateway(dbag, d) -X return cs_guestnetwork.merge(dbag, d) -X -X def process_dhcp_entry(self, dbag): -X return cs_dhcp.merge(dbag, self.qFile.data) -X -X def process_site2sitevpn(self, dbag): -X return cs_site2sitevpn.merge(dbag, self.qFile.data) -X -X def process_remoteaccessvpn(self, dbag): -X return cs_remoteaccessvpn.merge(dbag, self.qFile.data) -X -X def process_vpnusers(self, dbag): -X return cs_vpnusers.merge(dbag, self.qFile.data) -X -X def process_network_acl(self, dbag): -X return cs_network_acl.merge(dbag, self.qFile.data) -X -X def process_firewallrules(self, dbag): -X return cs_firewallrules.merge(dbag, self.qFile.data) -X -X def process_loadbalancer(self, dbag): -X return cs_loadbalancer.merge(dbag, self.qFile.data) -X -X def process_monitorservice(self, dbag): -X return cs_monitorservice.merge(dbag, self.qFile.data) -X -X def process_staticroutes(self, dbag): -X return cs_staticroutes.merge(dbag, self.qFile.data) -X -X def processVMpassword(self, dbag): -X return cs_vmp.merge(dbag, self.qFile.data) -X -X def processForwardingRules(self, dbag): -X # to be used by both staticnat and portforwarding -X return cs_forwardingrules.merge(dbag, self.qFile.data) -X -X def processIP(self, dbag): -X for ip in self.qFile.data["ip_address"]: -X dbag = cs_ip.merge(dbag, ip) -X return dbag -X -X def processCL(self, dbag): -X # Convert the ip stuff to an ip object and pass that into cs_ip_merge -X # "eth0ip": "192.168.56.32", -X # "eth0mask": "255.255.255.0", -X self.newData = [] -X if (self.qFile.data['cmd_line']['type'] == "router"): -X self.processCLItem('0', "guest") -X self.processCLItem('1', "control") -X self.processCLItem('2', "public") -X elif (self.qFile.data['cmd_line']['type'] == "vpcrouter"): -X self.processCLItem('0', "control") -X elif (self.qFile.data['cmd_line']['type'] == "dhcpsrvr"): -X self.processCLItem('0', "guest") -X self.processCLItem('1', "control") -X elif (self.qFile.data['cmd_line']['type'] == "ilbvm"): -X self.processCLItem('0', "guest") -X self.processCLItem('1', "control") -X -X return cs_cmdline.merge(dbag, self.qFile.data) -X -X def processCLItem(self, num, nw_type): -X key = 'eth' + num + 'ip' -X dp = {} -X if(key in self.qFile.data['cmd_line']): -X dp['public_ip'] = self.qFile.data['cmd_line'][key] -X dp['netmask'] = self.qFile.data['cmd_line']['eth' + num + 'mask'] -X dp['source_nat'] = False -X dp['add'] = True -X dp['one_to_one_nat'] = False -X if nw_type == "public": -X dp['gateway'] = self.qFile.data['cmd_line']['gateway'] -X else: -X if('localgw' in self.qFile.data['cmd_line']): -X dp['gateway'] = self.qFile.data['cmd_line']['localgw'] -X else: -X dp['gateway'] = '' -X dp['nic_dev_id'] = num -X dp['nw_type'] = nw_type -X qf = QueueFile() -X qf.load({'ip_address': [dp], 'type': 'ips'}) -X -X def processVmData(self, dbag): -X cs_vmdata.merge(dbag, self.qFile.data) -X return dbag -X -X def process_ipaliases(self, dbag): -X nic_dev = None -X # Should be a way to deal with this better -X for intf, data in dbag.items(): -X if intf == 'id': -X continue -X elif any([net['nw_type'] == 'guest' for net in data]): -X nic_dev = intf -X break -X -X assert nic_dev is not None, 'Unable to determine Guest interface' -X -X nic_dev_id = nic_dev[3:] -X -X for alias in self.qFile.data['aliases']: -X ip = { -X 'add': not alias['revoke'], -X 'nw_type': 'guest', -X 'public_ip': alias['ip_address'], -X 'netmask': alias['netmask'], -X 'nic_dev_id': nic_dev_id -X } -X dbag = cs_ip.merge(dbag, ip) -X return dbag -X -X -class QueueFile: -X -X fileName = '' -X configCache = "/var/cache/cloud" -X keep = True -X data = {} -X -X def load(self, data): -X if data is not None: -X self.data = data -X self.type = self.data["type"] -X updateDataBag(self) -X return -X filename = '{cache_location}/{json_file}'.format(cache_location=self.configCache, json_file=self.fileName) -X try: -X handle = open(filename) -X except IOError as exception: -X error_message = ("Exception occurred with the following exception error '{error}'. Could not open '{filename}'. " -X "It seems that the file has already been moved.".format(error=exception, filename=filename)) -X logging.error(error_message) -X else: -X logging.info("Continuing with the processing of file '{filename}'".format(filename=filename)) -X -X self.data = json.load(handle) -X self.type = self.data["type"] -X handle.close() -X if self.keep: -X self.__moveFile(filename, self.configCache + "/processed") -X else: -X logging.debug("Processed file deleted: %s and not kept in /processed", filename) -X os.remove(filename) -X updateDataBag(self) -X -X def setFile(self, name): -X self.fileName = name -X -X def getType(self): -X return self.type -X -X def getData(self): -X return self.data -X -X def setPath(self, path): -X self.configCache = path -X -X def __moveFile(self, origPath, path): -X if not os.path.exists(path): -X os.makedirs(path) -X originalName = os.path.basename(origPath) -X if originalName.count(".") == 1: -X originalName += "." + str(uuid.uuid4()) -X zipped_file_name = path + "/" + originalName + ".gz" -X with open(origPath, 'rb') as f_in, gzip.open(zipped_file_name, 'wb') as f_out: -X shutil.copyfileobj(f_in, f_out) -X os.remove(origPath) -X -X logging.debug("Processed file written to %s", zipped_file_name) -X -X -class PrivateGatewayHack: -X -X @classmethod -X def update_network_type_for_privategateway(cls, dbag, data): -X ip = data['router_guest_ip'] if 'router_guest_ip' in data.keys() else data['public_ip'] -X -X initial_data = cls.load_inital_data() -X has_private_gw_ip = cls.if_config_has_privategateway(initial_data) -X private_gw_matches = 'privategateway' in initial_data['config'] and cls.ip_matches_private_gateway_ip(ip, initial_data['config']['privategateway']) -X -X if has_private_gw_ip and private_gw_matches: -X data['nw_type'] = "public" -X logging.debug("Updating nw_type for ip %s" % ip) -X else: -X logging.debug("Not updating nw_type for ip %s because has_private_gw_ip = %s and private_gw_matches = %s " % (ip, has_private_gw_ip, private_gw_matches)) -X return data -X -X @classmethod -X def if_config_has_privategateway(cls, dbag): -X return 'privategateway' in dbag['config'].keys() and dbag['config']['privategateway'] != "None" -X -X @classmethod -X def ip_matches_private_gateway_ip(cls, ip, private_gateway_ip): -X new_ip_matches_private_gateway_ip = False -X if ip == private_gateway_ip: -X new_ip_matches_private_gateway_ip = True -X return new_ip_matches_private_gateway_ip -X -X @classmethod -X def load_inital_data(cls): -X initial_data_bag = DataBag() -X initial_data_bag.setKey('cmdline') -X initial_data_bag.load() -X initial_data = initial_data_bag.getDataBag() -X logging.debug("Initial data = %s" % initial_data) -X -X return initial_data -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/merge.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/merge.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/merge.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/merge.py': 'MD5 check failed' - ) << \SHAR_EOF -dc7c85d58b4e5f38ae61c82679523884 cloud_scripts/opt/cloud/bin/merge.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/merge.py'` -ne 13492 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/merge.py' is not 13492" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/master.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/master.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/master.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/master.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/master.py -M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2!&875L="(I"BAO<'1I -M;VYS+"!A/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/master.py': 'MD5 check failed' - ) << \SHAR_EOF -602ac6725c182da5ffa17760b2fe3ba5 cloud_scripts/opt/cloud/bin/master.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/master.py'` -ne 2040 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/master.py' is not 2040" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/set_redundant.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/set_redundant.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/set_redundant.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/set_redundant.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/set_redundant.py -M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/set_redundant.py': 'MD5 check failed' - ) << \SHAR_EOF -648b240f11d938ebd185d0e2a75004b8 cloud_scripts/opt/cloud/bin/set_redundant.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/set_redundant.py'` -ne 1663 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/set_redundant.py' is not 1663" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/checks2svpn.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checks2svpn.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/checks2svpn.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -if [ -z $1 ] -then -X echo "Fail to find VPN peer address!" -X exit 1 -fi -X -ipsec status vpn-$1 > /tmp/vpn-$1.status -X -cat /tmp/vpn-$1.status | grep "ESTABLISHED" > /dev/null -ipsecok=$? -if [ $ipsecok -ne 0 ] -then -X echo -n "IPsec SA not found;" -X echo "Site-to-site VPN have not connected" -X exit 11 -fi -echo -n "IPsec SA found;" -echo "Site-to-site VPN have connected" -Xexit 0 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/checks2svpn.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checks2svpn.sh': 'MD5 check failed' - ) << \SHAR_EOF -8aed94140f491ae027b3b55e9b1535bb cloud_scripts/opt/cloud/bin/checks2svpn.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checks2svpn.sh'` -ne 1178 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checks2svpn.sh' is not 1178" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, vpn): -X key = vpn['vpn_server_ip'] -X op = vpn['create'] -X if key in dbag.keys() and not op: -X del(dbag[key]) -X else: -X dbag[key] = vpn -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py': 'MD5 check failed' - ) << \SHAR_EOF -9945565c7eb92c9fd9aa85648f8c4352 cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py'` -ne 994 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_remoteaccessvpn.py' is not 994" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_staticroutes.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_staticroutes.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_staticroutes.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, staticroutes): -X for route in staticroutes['routes']: -X key = route['network'] -X dbag[key] = route -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_staticroutes.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py': 'MD5 check failed' - ) << \SHAR_EOF -c89832deefffed1dcc12b367d9f9062e cloud_scripts/opt/cloud/bin/cs_staticroutes.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py'` -ne 952 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_staticroutes.py' is not 952" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, vpn): -X key = vpn['peer_gateway_ip'] -X op = vpn['create'] -X if key in dbag.keys() and not op: -X del(dbag[key]) -X else: -X dbag[key] = vpn -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py': 'MD5 check failed' - ) << \SHAR_EOF -37138a9d2b00c0cd0488f03f0b1e1c34 cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py'` -ne 996 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_site2sitevpn.py' is not 996" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/passwd_server_ip.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/passwd_server_ip.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/passwd_server_ip.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/passwd_server_ip.py -M(R$O=7-R+V)I;B]E;G8@<'ET:&]N"B,@3&EC96YS960@=&\@=&AE($%P86-H -M92!3;V9T=V%R92!&;W5N9&%T:6]N("A!4T8I('5N9&5R(&]N90HC(&]R(&UO -M2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N5]P87-S=V]R9"<@/')O=71E$EN(",L -M($9O2AO3H*("`@("`@("!W:71H(&9I;&4H9V5T4&%S -M&-E<'0@24]%3H* -M("`@("`@("`@("`@=VET:"!F:6QE*&=E=%!A&-E -M<'0@24]%"<*("`@(&1E9B!D;U]'150H5]P87-S=V]R9"7!E(#T]("=S879E9%]P87-S=V]R9"7-L;VR=215%515-47TU%5$A/1"7!E)UTL"B`@("`@("`@("`@("`@ -M("`@("`@?2D*("`@("`@("!S96QF+G-E;F1?7-L;V6EN9R!T;R!S879E('!A7-L;V6EN9R!T;R!S879E('!A7-L -M;V7-L;V7-L;V7,N87)G=BD@/B`Q -M.@H@("`@("`@(&%D9')E7-L -M;V6)O87)D26YT97)R -M=7!T.@H@("`@("`@('-Y7-L;V&-E<'0@17AC97!T:6]N+"!E.@H@("`@("`@('-Y7-L;V&-E<'1I;VX@)7,@+2T@ -M9&EE9"<@)2!E*0H@("`@("`@('!A/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py': 'MD5 check failed' - ) << \SHAR_EOF -1d63c1d8b2e5a6a48d48d76228964aee cloud_scripts/opt/cloud/bin/passwd_server_ip.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py'` -ne 7020 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/passwd_server_ip.py' is not 7020" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_network_acl.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_network_acl.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_network_acl.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_network_acl.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_network_acl.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_network_acl.py': 'MD5 check failed' - ) << \SHAR_EOF -79760ec4739cb68a9a8bf86319a2dd65 cloud_scripts/opt/cloud/bin/cs_network_acl.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_network_acl.py'` -ne 881 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_network_acl.py' is not 881" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cleanup.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cleanup.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cleanup.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cleanup.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cleanup.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -#rm -rf $@ && echo $? -X -zip_file=$1 -if [ -e "$zip_file" ]; -then -X rm -rf "$zip_file" -X echo "Deleting diagnostics zip file $zip_file" -else -X echo "File $zip_file not found in vm " -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cleanup.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cleanup.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cleanup.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cleanup.sh': 'MD5 check failed' - ) << \SHAR_EOF -63ca1758ffda6344d2622a21f5fc15b9 cloud_scripts/opt/cloud/bin/cleanup.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cleanup.sh'` -ne 986 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cleanup.sh' is not 986" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_loadbalancer.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_loadbalancer.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_loadbalancer.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import copy -X -X -def merge(dbag, data): -X """ Simply overwrite the existsing bag as, the whole configuration is sent every time """ -X if "rules" not in data: -X return dbag -X dbag['config'] = data['rules'] -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_loadbalancer.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py': 'MD5 check failed' - ) << \SHAR_EOF -667380d51eaa9aade2317d66a11529aa cloud_scripts/opt/cloud/bin/cs_loadbalancer.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py'` -ne 1016 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_loadbalancer.py' is not 1016" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpc_func.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpc_func.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpc_func.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpc_func.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpc_func.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# @VERSION@ -X -getEthByIp (){ -X local ip=$1 -X for dev in `ls -1 /sys/class/net | grep eth` -X do -X sudo ip addr show dev $dev | grep $ip\/ > /dev/null -X if [ $? -eq 0 ] -X then -X echo $dev -X return 0 -X fi -X done -X return 1 -} -X -getVPCcidr () { -X CMDLINE=$(cat /var/cache/cloud/cmdline) -X for i in $CMDLINE -X do -X # search for foo=bar pattern and cut out foo -X KEY=$(echo $i | cut -d= -f1) -X VALUE=$(echo $i | cut -d= -f2) -X if [ "$KEY" == "vpccidr" ] -X then -X echo "$VALUE" -X return 0 -X fi -X done -X return 1 -} -X -removeRulesForIp() { -X local ip=$1 -X iptables-save -t mangle | grep $ip | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t mangle $rule -X done -X iptables-save -t nat | grep $ip | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t nat $rule -X done -X iptables-save -t filter | grep $ip | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t filter $rule -X done -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpc_func.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpc_func.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpc_func.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpc_func.sh': 'MD5 check failed' - ) << \SHAR_EOF -bc1b0432818cc40ea79df6720e16ecad cloud_scripts/opt/cloud/bin/vpc_func.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpc_func.sh'` -ne 1849 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpc_func.sh' is not 1849" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsDhcp.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsDhcp.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N'0B"D1(0U!?3U!44R`]("(O971C+V1H8W!O<'1S -M+G1X="(*0TQ/541?0T].1B`]("(O971C+V1N"`](#`*("`@("`@("!L:7-T96Y?861D0H@("`@("`@("`@("!G871E=V%Y(#T@ -M)R<*("`@("`@("`@("`@:68@2`](&E;)V=A=&5W -M87DG70H@("`@("`@("`@("!S;&EN92`](")D:&-P+7)A;F=E/7-E=#II;G1E -M"P@9V%T97=A>2D*("`@("`@("`@("`@96QS93H*("`@ -M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UR86YG93US970Z:6YT97)F86-E -M+25S+25S+"5S+'-T871I8R(@)2`H9&5V:6-E+"!I9'@L(&EP*0H@("`@("`@ -M("`@("!S96QF+F-O;F8N"D*("`@("`@("`@("`@;&EN92`](")D:&-P+6]P -M=&EO;CUT86"P@9VXN9V5T7V1O;6%I;B@I*0H@("`@("`@("`@("!S96QF+F-O;F8N"!F;W(@>"!I;B!G;BYG971?9&YS*"D@:68@>%T*("`@ -M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C -M92TE"P@)RPG+FIO:6XH9&YS7VQI -M2`A/2`G,"XP+C`N,""D*("`@("`@("`@("`@("`@ -M(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C92TE"P@9V%T97=A>2D*("`@("`@("`@("`@("`@('-E -M;&8N8V]N9BYS96%R8V@H"P@;F5T;6%S:RD*("`@("`@("`@("`@"`K/2`Q"@H@("`@("`@(",@ -M3&ES=&5N($%D9')E3H*("`@ -M("`@("`@("`@;&]G9VEN9RYI;F9O*")!='1E;7!T:6YG('1O(&1E;&5T92!E -M;G1R:65S(&9R;VT@9&YS;6%S<2YL96%S97,@9FEL92!F;W(@5DUS('=H:6-H -M(&%R92!N;W0@;VX@9&AC<&AOW!R:6YT("0S?22DZ"B`@("`@("`@5LG:7!V-%]A -M9&1R97-S)UTL(&5N=')Y6R=H;W-T7VYA;64G72D*("`@("`@("`C($QE87-E -M('1I;64@'!U;F=E9"P@:71S(&%C=&EV -M92!L96%S92!A;F0@1$A#4"]$3E,@8V]N9FEG(&ES('!R;W!E2!I2!R=6YN:6YG(&EN('!R;V1U8W1I;VYS -M('-Y5LG:7!V-%]A9&1R -M97-S)UTL"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@ -M("`@("`@("`@("`@("!E;G1R>5LG:&]S=%]N86UE)UTL"B`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!L96%S -M92DI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L)7,B("4@ -M*'1A9RP@,RDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L -M)7,B("4@*'1A9RP@-BDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D -M9"@B)7,L)7,B("4@*'1A9RP@,34I*0H*("`@("`@("!I(#T@25!!9&1R97-S -M*&5N=')Y6R=I<'8T7V%D9')E2==(#T@96YT2=="@H@("`@9&5F(&%D9%]H;W-T*'-E;&8L(&EP+"!H;W-T -M/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py': 'MD5 check failed' - ) << \SHAR_EOF -bcf1831b38d86bf041523540fa8f821e cloud_scripts/opt/cloud/bin/cs/CsDhcp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py'` -ne 8809 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' is not 8809" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsRedundant.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsRedundant.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N7,N2`](%1R=64*"B`@ -M("`@("`@:68@;F]T(&ES1&5V:6-E4F5A9'DZ"B`@("`@("`@("`@(&QO9V=I -M;F5]I9E]N965D960H"B`@("`@("`@("`@("(E&5C("1$045-3TX@+2T@+2UVR(L(")](BP@6PH@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("`@("(@("`@("`@(&%U=&A?='EP92!!2"!< -M;B(L("(@("`@("`@(&%U=&A?<&%S2AC;VYN=')A8VMD7W1E;7!L871E7V-O;F8L(&-O;FYT0H@("`@("`@("(B(@H@("`@("`@(&ET97)A=&EO;G,@ -M/2`Q,`H@("`@("`@('1I;65?8F5T=V5E;B`](#$*"B`@("`@("`@9F]R(&ET -M97(@:6X@3H* -M("`@("`@("`@("`@("`@(',@/2!S;V-K970N2!R=6YN:6YG("@E9#HE2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I<"@I*2YS=&]P*"D* -M"B`@("`@("`@0W-(96QP97(N2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@ -M("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")!9&1I;F<@9V%T97=A>2`]/3X@ -M)7,@=&\@9&5V:6-E(#T]/B`E2P@9&5V*2D*("`@("`@ -M("`@("`@("`@("`@("!I9B!D978@/3T@0W-(96QP97(N4%5"3$E#7TE.5$52 -M1D%#15-;&5C -M=71E*"(E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I -M<"@I*2YR97-T87)T*"D*"B`@("`@("`@0W-(96QP97(N2D*"B`@("`@("`@("`@(",@5&AE(&9I -M2!I;G1E2!V'1E2!E=F5R(&)E(&]N92!A9&1R97-S(&EN -M(&$@5E!#('1H97)E(&-A;B!B92!M86YY"B`@("`@("`@5&AE(&YE=R!C;V1E -M(&%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py': 'MD5 check failed' - ) << \SHAR_EOF -6936e38f53736f7c5a04b255800a242d cloud_scripts/opt/cloud/bin/cs/CsRedundant.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py'` -ne 16789 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' is not 16789" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsHelper.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsHelper.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsHelper.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsHelper.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B -M971H,2)]"@I35$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S -M:"`M8R`@)VEF(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@ -M96QS92!E8VAO(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@ -M(")V<&-R;W5T97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@ -M6R`D,"`]/2!<(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ -M"B`@("`@("`@("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@ -M("`@("`@(&-M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@ -M("`@("`@;&]G9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S -M(B`E('-T871E7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X -M96-U=&4H7!E*"E=(&%N9"!S -M=&%T92`]/2`B34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE -M8W5T92AC;60I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ -M("`@("`@(&5X96-U=&4H8VUD*0H*"F1E9B!I&5C=71E -M*")M;W5N="!T;7!F6XH=F%L*3H*("`@(&EF('9A;#H* -M("`@("`@("!R971U&5C=71E*")I<"!A9&1R('-H;W<@ -M?&=R97`@+78@WT*("`@("`@("`@("`@ -M=&];)VEP)UT@/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A -M;'-;+3%="B`@("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@ -M("(B(@H@("`@9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G -M*")3879I;F<@:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C -M=71E*")S>7-T96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I -M;F7-T96UC=&P@&5C=71E*")K:6QL -M("U(55`@)7,B("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D -M;G-M87-Q(BP@(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py': 'MD5 check failed' - ) << \SHAR_EOF -9bdd1fdfea8177d3e408b2cc87e5d503 cloud_scripts/opt/cloud/bin/cs/CsHelper.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py'` -ne 7644 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' is not 7644" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5NWT*("`@("`@("!S96QF+F=U97-T(#T@5')U90H@("`@("`@ -M(&1B(#T@1&%T84)A9R@I"B`@("`@("`@9&(N7,H*2!A;F0@;&5N*&1B86=;9&5V:6-E -M72D@(3T@,#H*("`@("`@("`@("`@2==*0H*("`@ -M("`@("!I9B`G9&YS)R!I;B!S96QF+F1A=&$Z"B`@("`@("`@("`@(&1N'1E;F0H&-E<'1I;VXN"B`@("`@("`@:68@)W)O -M=71E"!I="!P2X@22!J=7-T(&%D -M9&5D('1H92!I9BP@87,@26%N(&1I9"!I;B!S;VUE(&]T:&5R(&9I;&5S+"!T -M;R!A=F]I9"!T:&4@97AC97!T:6]N+@H@("`@("`@(&EF("=R;W5T97)?9W5E -M2<@:6X@2=="B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py': 'MD5 check failed' - ) << \SHAR_EOF -98c84f4067412f263891f8293f185243 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py'` -ne 2545 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' is not 2545" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsMonitor.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N"!I;B!S96QF+F1B86=;)V-O;F9I9R==+G-P;&ET*"WT*("`@("`@("!H8U]D871A6R)H96%L=&A?8VAE8VMS7V)A&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!S96QF+F1B -M86&-L=61E9%]H96%L=&A?8VAE8VMS(ET@/2!;70H* -M("`@("`@("!I9B`B:&5A;'1H7V-H96-K/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py': 'MD5 check failed' - ) << \SHAR_EOF -d8f5dcf496dbc6d8508e40b906f48245 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py'` -ne 3681 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' is not 3681" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@ -M("`@("!S96QF+FQA2!E>&ES=',Z(')U;&4] -M)7,@=&%B;&4])7,@8VAA:6X])7,B+"!N97=?2`](&-P>2YR97!L86-E*"(M02`E&5C=71E,B@B:7!T86)L97,@+70@)7,@ -M)7,B("4@*&YE=U]R=6QE+F=E=%]T86)L92@I+"!C<'DI*0H@("`@("`@("`@ -M("`@("`@(R!4:&5R92!A"!I;B!T:&4@ -M9G)A;65W;W)K+@H@("`@("`@("`@("`@("`@:68@&5C=71E*")I<'1A8FQE7!E(#T@0W-#;61,:6YE*")C;61L:6YE(BDN9V5T7W1Y<&4H*0H* -M("`@("`@("!T7!E*3H*("`@("`@("`@("`@("`@(&EF(&DNFEP*&)I='-;,#HZ,ETL(&)I='-;,3HZ,ETI*0H@("`@("`@(&EF -M("(M02(@:6X@2!C;W)R96-T(&EP=&%B;&5S(&-O;6UA -M;F0@(B(B"B`@("`@("`@(R!/7,H*3H*("`@("`@("`@("`@("`@('!R:6YT86)L92`] -M(&LN=7)N($9A;'-E"B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py': 'MD5 check failed' - ) << \SHAR_EOF -7456b53eba9f115f9ad344bc1c01611d cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py'` -ne 11100 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' is not 11100" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsRoute.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRoute.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRoute.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import CsHelper -import logging -X -X -class CsRoute: -X -X """ Manage routes """ -X -X def __init__(self): -X self.table_prefix = "Table_" -X -X def get_tablename(self, name): -X return self.table_prefix + name -X -X def add_table(self, devicename): -X tablenumber = 100 + int(devicename[3:]) -X tablename = self.get_tablename(devicename) -X str = "%s %s" % (tablenumber, tablename) -X filename = "/etc/iproute2/rt_tables" -X logging.info("Adding route table: " + str + " to " + filename + " if not present ") -X if not CsHelper.definedinfile(filename, str): -X CsHelper.execute("sudo echo " + str + " >> /etc/iproute2/rt_tables") -X # remove "from all table tablename" if exists, else it will interfer with -X # routing of unintended traffic -X if self.findRule("from all lookup " + tablename): -X CsHelper.execute("sudo ip rule delete from all table " + tablename) -X -X def flush_table(self, tablename): -X CsHelper.execute("ip route flush table %s" % (tablename)) -X CsHelper.execute("ip route flush cache") -X -X def add_route(self, dev, address): -X """ Wrapper method that adds table name and device to route statement """ -X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 -X table = self.get_tablename(dev) -X -X if not table or not address: -X empty_param = "table" if not table else "address" -X logging.info("Empty parameter received %s while trying to add route, skipping" % empty_param) -X else: -X logging.info("Adding route: dev " + dev + " table: " + -X table + " network: " + address + " if not present") -X cmd = "default via %s table %s proto static" % (address, table) -X self.set_route(cmd) -X -X def add_network_route(self, dev, address): -X """ Wrapper method that adds table name and device to route statement """ -X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 -X table = self.get_tablename(dev) -X -X if not table or not address: -X empty_param = "table" if not table else "address" -X logging.info("Empty parameter received %s while trying to add network route, skipping" % empty_param) -X else: -X logging.info("Adding route: dev " + dev + " table: " + -X table + " network: " + address + " if not present") -X cmd = "throw %s table %s proto static" % (address, table) -X self.set_route(cmd) -X -X def set_route(self, cmd, method="add"): -X """ Add a route if it is not already defined """ -X found = False -X search = cmd -X if "throw" in search: -X search = search.replace("throw", "") -X for i in CsHelper.execute("ip route show " + search): -X found = True -X if not found and method == "add": -X logging.info("Add " + cmd) -X cmd = "ip route add " + cmd -X elif found and method == "delete": -X logging.info("Delete " + cmd) -X cmd = "ip route delete " + cmd -X else: -X return -X CsHelper.execute(cmd) -X -X def add_defaultroute(self, gateway): -X """ Add a default route -X :param str gateway -X :return: bool -X """ -X if not gateway: -X raise Exception("Gateway cannot be None.") -X -X if self.defaultroute_exists(): -X return False -X else: -X cmd = "default via " + gateway -X logging.info("Adding default route") -X self.set_route(cmd) -X return True -X -X def defaultroute_exists(self): -X """ Return True if a default route is present -X :return: bool -X """ -X logging.info("Checking if default ipv4 route is present") -X route_found = CsHelper.execute("ip -4 route list 0/0") -X -X if len(route_found) > 0: -X logging.info("Default route found: " + route_found[0]) -X return True -X else: -X logging.warn("No default route found!") -X return False -X -X def findRule(self, rule): -X for i in CsHelper.execute("ip rule show"): -X if rule in i.strip(): -X return True -X return False -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRoute.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py': 'MD5 check failed' - ) << \SHAR_EOF -4f2109aa1d89157e14817f90c676c2d3 cloud_scripts/opt/cloud/bin/cs/CsRoute.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py'` -ne 4989 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' is not 4989" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py -M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2==*0H@("`@("`@("`@ -M("!#&5C=71E*&-O;6UA;F0I"B`@("`@("`@96QS93H*("`@ -M("`@("`@("`@8V]M;6%N9"`](")I<"!R;W5T92!S:&]W('P@9W)E<"`EW!R:6YT("0Q+"`D,WTG(B`E(')O=71E6R=N971W;W)K)UT*("`@ -M("`@("`@("`@2==*0H@("`@("`@("`@("`@ -C("`@0W-(96QP97(N97AE8W5T92AR;W5T95]C;VUM86YD*0H@ -` -end -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py': 'MD5 check failed' - ) << \SHAR_EOF -f9f9db3a4543397153d69a62551a6c8c cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py'` -ne 1655 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' is not 1655" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N7,H*3H* -M("`@("`@("`@("`@"YS<&QI="@G7&XG*5T*"B`@("`@("`@9FEL -M93$N8V]M;6ET*"D*("`@("`@("!F:6QE,B`]($-S1FEL92A(05!23UA97T-/ -M3D9?4"D*("`@("`@("!I9B!N;W0@9FEL93(N8V]M<&%R92AF:6QE,2DZ"B`@ -M("`@("`@("`@($-S2&5L<&5R+F-O<'DH2$%04D]865]#3TY&7U0L($A!4%)/ -M6%E?0T].1E]0*0H*("`@("`@("`@("`@<')O8R`]($-S4')O8V5S2YP:60G72D*("`@("`@("`@("`@:68@;F]T('!R;V,N9FEN -M9"@I.@H@("`@("`@("`@("`@("`@;&]G9VEN9RYD96)U9R@B0W-,;V%D0F%L -M86YC97(Z.B!W:6QL(')E2$B*0H@("`@("`@("`@("`@ -M("`@0W-(96QP97(N2(L(")R97-T87)T(BD*("`@ -M("`@("`@("`@96QS93H*("`@("`@("`@("`@("`@(&QO9V=I;F2$B*0H@("`@ -M("`@("`@("`@("`@0W-(96QP97(N2(L(")R96QO -M860B*0H*("`@("`@("!A9&1?/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py': 'MD5 check failed' - ) << \SHAR_EOF -8f93571ff9b8f21c947e90193c3efa38 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py'` -ne 3393 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' is not 3393" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsApp.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsApp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsApp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsApp.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G -M871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG971?='EP92@I"B`@ -M("`@("`@5]I9E]N965D -M960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L"B`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE,B]S:71E2DI"B`@("`@("`@ -M("`@(&9I;&4N&5C=71E,B@B/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsApp.py': 'MD5 check failed' - ) << \SHAR_EOF -fa071a9d58a918b6a9d5e09ae10e3e11 cloud_scripts/opt/cloud/bin/cs/CsApp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsApp.py'` -ne 4159 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' is not 4159" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsFile.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsFile.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsFile.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import logging -import re -import copy -X -X -class CsFile: -X """ File editors """ -X -X def __init__(self, filename): -X self.filename = filename -X self.load() -X -X def load(self): -X self.new_config = [] -X self.config = [] -X try: -X for line in open(self.filename): -X self.new_config.append(line) -X except IOError: -X logging.debug("File %s does not exist" % self.filename) -X else: -X logging.debug("Reading file %s" % self.filename) -X self.config = list(self.new_config) -X -X def is_changed(self): -X if set(self.config) != set(self.new_config): -X return True -X else: -X return False -X -X def __len__(self): -X return len(self.config) -X -X def empty(self): -X self.config = [] -X self.new_config = [] -X -X def repopulate(self): -X self.new_config = [] -X -X def commit(self): -X if not self.is_changed(): -X logging.info("Nothing to commit. The %s file did not change" % self.filename) -X return False -X handle = open(self.filename, "w+") -X for line in self.new_config: -X handle.write(line) -X handle.close() -X logging.info("Wrote edited file %s" % self.filename) -X self.config = list(self.new_config) -X logging.info("Updated file in-cache configuration") -X return True -X -X def dump(self): -X for line in self.new_config: -X print line -X -X def addeq(self, string): -X """ Update a line in a file of the form token=something -X match on token= and replace something if needed -X Add line if token is not present -X """ -X token = string.split('=')[0] + '=' -X self.search(token, string) -X -X def append(self, string, where=-1): -X if where == -1: -X self.new_config.append("%s\n" % string) -X else: -X self.new_config.insert(where, "%s\n" % string) -X -X def add(self, string, where=-1): -X for index, line in enumerate(self.new_config): -X if line.strip() == string: -X return False -X if where == -1: -X self.new_config.append("%s\n" % string) -X else: -X self.new_config.insert(where, "%s\n" % string) -X return True -X -X def section(self, start, end, content): -X sind = -1 -X eind = -1 -X found = False -X for index, line in enumerate(self.new_config): -X if found and line.strip() == end: -X eind = index -X found = False -X if line.strip() == start: -X sind = index + 1 -X found = True -X if sind == -1: -X content.insert(0, start + "\n") -X content.append(end + "\n") -X self.new_config[sind:eind] = content -X -X def greplace(self, search, replace): -X logging.debug("Searching for %s and replacing with %s" % (search, replace)) -X self.new_config = [w.replace(search, replace) for w in self.new_config] -X -X def replaceIfFound(self, search, replace): -X found = False -X replace_filtered = replace -X if re.search("PSK \"", replace): -X replace_filtered = re.sub(r'".*"', '"****"', replace) -X logging.debug("Searching for %s and replacing with %s if found" % (search, replace_filtered)) -X for index, line in enumerate(self.new_config): -X if line.lstrip().startswith("#"): -X continue -X if re.search(search, line): -X if replace not in line: -X self.new_config[index] = replace + "\n" -X return False -X -X def search(self, search, replace): -X found = False -X replace_filtered = replace -X if re.search("PSK \"", replace): -X replace_filtered = re.sub(r'".*"', '"****"', replace) -X logging.debug("Searching for %s and replacing with %s" % (search, replace_filtered)) -X for index, line in enumerate(self.new_config): -X if line.lstrip().startswith("#"): -X continue -X if re.search(search, line): -X found = True -X if replace not in line: -X self.new_config[index] = replace + "\n" -X if not found: -X self.new_config.append(replace + "\n") -X return True -X return False -X -X def searchString(self, search, ignoreLinesStartWith): -X found = False -X logging.debug("Searching for %s string " % search) -X -X for index, line in enumerate(self.new_config): -X print ' line = ' + line -X if line.lstrip().startswith(ignoreLinesStartWith): -X continue -X if search in line: -X found = True -X break -X -X return found -X -X def deleteLine(self, search): -X found = False -X logging.debug("Searching for %s to remove the line " % search) -X temp_config = [] -X for index, line in enumerate(self.new_config): -X if line.lstrip().startswith("#"): -X continue -X if search not in line: -X temp_config.append(line) -X -X self.new_config = list(temp_config) -X -X def compare(self, o): -X result = (isinstance(o, self.__class__) and set(self.config) == set(o.config)) -X logging.debug("Comparison of CsFiles content is ==> %s" % result) -X return result -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsFile.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsFile.py': 'MD5 check failed' - ) << \SHAR_EOF -81531ddee205a5eb66bb44f400ab222c cloud_scripts/opt/cloud/bin/cs/CsFile.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsFile.py'` -ne 6133 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' is not 6133" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/__init__.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/__init__.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/__init__.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/__init__.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/__init__.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/__init__.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/__init__.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/__init__.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/__init__.py': 'MD5 check failed' - ) << \SHAR_EOF -33215d440d5ba5fa95b1ffa035d769e2 cloud_scripts/opt/cloud/bin/cs/__init__.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/__init__.py'` -ne 785 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/__init__.py' is not 785" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsAddress.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsAddress.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsAddress.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsAddress.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N`H@("`@("`@("`@("`@("`@("`@ -M(&=U97-T7VEN=&5R9F%C92`](&EN=&5R9F%C90H@("`@("`@("`@("`@("`@ -M("`@(&QO9V=I;F2!C;VYF:6=U2AS96QF*3H*("`@("`@("!I -M9B!S96QF+F-O;F9I9RYI2(I -M"B`@("`@("`@96QS93H*("`@("`@("`@("`@2@I+"!S96QF+F=E=%]S -M:7IE*"DI"@H@("`@9&5F(&=E=%]S:7IE*'-E;&8I.@H@("`@("`@("(B(B!2 -M971U7!E -M(B!I;B!S96QF+F%D9')E"@Q,#`@*R!I;G0H9&5V6S,Z72DI -M"B`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@("`@97AC97!T($5X8V5P=&EO;B!A -M&-E<'1I;VX@ -M;V-C=7)R960@/3T^("5S(B`E(&4I"@H@("`@("`@("`@("!S96QF+G!O7!E*"D@:6X@6R)C;VYT7!E*"D@:6X@ -M6R=P=6)L:6,G73H*("`@("`@("`@("`@("`@('-E;&8N7!E*"E=.@H@("`@("`@ -M("`@("`@("`@9V%T97=A>2`]('-T2@I*3H* -M("`@("`@("`@("`@("`@(')O=71E+F%D9%]D969A=6QT2@I*0H*("`@(&1E9B!S971?;6%R:RAS96QF*3H*("`@ -M("`@("!C;60@/2`B+4$@4%)%4D]55$E.1R`M:2`E7!E(&]F('1H92!)4`H@("`@("`@(&=U97-T"B`@("`@("`@8V]N -M=')O;`H@("`@("`@('!U8FQI8PH@("`@("`@("(B(@H@("`@("`@(&EF(")N -M=U]T>7!E(B!I;B!S96QF+F%D9')E&9F9F9F9F9F -M("TM8W1M87-K(#!X9F9F9F9F9F8B72D*"B`@("`@("`@&UA7!E*"D@:6X@6R)G=65S=")=.@H@("`@("`@("`@("!G=65S -M=$YE='=O&9F9F9F9F9F(ETI"B`@ -M("`@("`@("`@(&=U97-T3F5T=V]R:T-I9'(@/2!S96QF+F%D9')E#4R-2\P>&9F9F9F9F9F(B`E -M("AS96QF+F1E=BP@2)=("$](").;VYE(CH* -M("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@("`@("`@:68@ -M(FYE='=O7!E*"D@:6X@6R)P=6)L:6,B -M72!A;F0@(F=A=&5W87DB(&EN('-E;&8N861D2)=("$] -M(").;VYE(CH*("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@ -M("`@("`@("`@(&9O7!E(B!I;B!A9&1R97-S(&%N9"!A -M9&1R97-S6R)N=U]T>7!E(ET@/3T@(F=U97-T(CH*("`@("`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("!R;W5T92YA9&1?;F5T=V]R:U]R;W5T92AS96QF -M+F1E=BP@&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A8VAE(BD*"B`@("`@("`@ -M96QI9B!M971H;V0@/3T@(F1E;&5T92(Z"B`@("`@("`@("`@(",@=')E870@ -M=&AE(&QA&5C=71E*")S=61O(&EP(')U;&4@9&5L971E('1A8FQE("(@*R!T86)L94YA -M;64I"B`@("`@("`@("`@("`@("!#&5C=71E*")S=61O(&EP -M(')O=71E(&9L=7-H('1A8FQE("(@*R!T86)L94YA;64I"B`@("`@("`@("`@ -M("`@("!#&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A -M8VAE(BD*("`@("`@("`@("`@("`@($-S4G5L92AS96QF+F1E=BDN9&5L36%R -M:R@I"@H@("`@("`@('-E;&8N9G=?7!E('=I;&P@ -M;F\@;&]N9V5R(&)E(&MN;W=N"B`@("`@("`@:68@7!E*"D@/3T@(G!U8FQI8R(@86YD('-E;&8N8V]N9FEG+FES7W9P8R@I -M(&%N9"!M971H;V0@/3T@(F%D9"(Z"B`@("`@("`@("`@(&EF('-E;&8N861D -M7,H*3H*("`@("`@("`@ -M("`@7!E)UT@:6X@5E)2 -M4%]465!%4SH*("`@("`@("`@("`@7!E(B!I;B!S96QF+F%D9')E&5C=71E,BAC;60L($9A -M;'-E*0H*("`@(",@1&5L971E(&%N>2!I<',@=&AA="!A7,H*2!O2AS96QF+"!B862!F;W(@ -M7,O8VQA"TP+W)P&-E<'0@24]%/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py': 'MD5 check failed' - ) << \SHAR_EOF -5cebbbd106abd3eba7ee0e4d23277dda cloud_scripts/opt/cloud/bin/cs/CsAddress.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py'` -ne 29236 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' is not 29236" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsProcess.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsProcess.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsProcess.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import os -import re -import CsHelper -import logging -X -X -class CsProcess(object): -X """ Manipulate processes """ -X -X def __init__(self, search): -X self.search = search -X -X def start(self, thru, background=''): -X # if(background): -X # cmd = cmd + " &" -X logging.info("Started %s", " ".join(self.search)) -X os.system("%s %s %s" % (thru, " ".join(self.search), background)) -X -X def kill_all(self): -X pids = self.find_pid() -X for p in pids: -X CsHelper.execute("kill -9 %s" % p) -X -X def find_pid(self): -X self.pid = [] -X for i in CsHelper.execute("ps aux"): -X items = len(self.search) -X proc = re.split(r"\s+", i)[items*-1:] -X matches = len([m for m in proc if m in self.search]) -X if matches == items: -X self.pid.append(re.split(r"\s+", i)[1]) -X -X logging.debug("CsProcess:: Searching for process ==> %s and found PIDs ==> %s", self.search, self.pid) -X return self.pid -X -X def find(self): -X has_pid = len(self.find_pid()) > 0 -X return has_pid -X -X def kill(self, pid): -X if pid > 1: -X CsHelper.execute("kill -9 %s" % pid) -X -X def grep(self, str): -X for i in CsHelper.execute("ps aux"): -X if i.find(str) != -1: -X return re.split(r"\s+", i)[1] -X return -1 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsProcess.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py': 'MD5 check failed' - ) << \SHAR_EOF -75a4650fe1e521049e80d32a022d8689 cloud_scripts/opt/cloud/bin/cs/CsProcess.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py'` -ne 2156 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' is not 2156" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsConfig.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsConfig.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsConfig.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsConfig.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N7!E*"D@/3T@)W9P8W)O=71E'1D;G,H'1D;G,G+"`G9F%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py': 'MD5 check failed' - ) << \SHAR_EOF -836541a5b9cb1b2f9df5dad6bb806745 cloud_scripts/opt/cloud/bin/cs/CsConfig.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py'` -ne 3179 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' is not 3179" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsDatabag.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@("`@ -M("!S96QF+F1B(#T@1&%T84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF -M+F1B+G-A=F4HWT*("`@("`@("!R971U&1I9V5S="@I"@H@("`@ -M9&5F(&=E=%]G871E=V%Y*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I -M;B!S96QF+FED871A*"DZ"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A -M*"E;)V=A=&5W87DG70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G -M971?=7-E7V5X=%]D;G,H'1D;G,G70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E -M9B!G971?861V97)T7VEN="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN -M="<@:6X@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py': 'MD5 check failed' - ) << \SHAR_EOF -9e4de6e0a115a5e806e80dc151769b21 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py'` -ne 4808 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' is not 4808" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsRule.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRule.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRule.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import CsHelper -import logging -X -X -class CsRule: -X """ Manage iprules -X Supported Types: -X fwmark -X """ -X -X def __init__(self, dev): -X self.dev = dev -X self.tableNo = 100 + int(dev[3:]) -X self.table = "Table_%s" % (dev) -X -X def addRule(self, rule): -X if not self.findRule(rule + " lookup " + self.table): -X cmd = "ip rule add " + rule + " table " + self.table -X CsHelper.execute(cmd) -X logging.info("Added rule %s for %s" % (cmd, self.table)) -X -X def findRule(self, rule): -X for i in CsHelper.execute("ip rule show"): -X if rule in i.strip(): -X return True -X return False -X -X def addMark(self): -X if not self.findMark(): -X cmd = "ip rule add fwmark %s table %s" % (self.tableNo, self.table) -X CsHelper.execute(cmd) -X logging.info("Added fwmark rule for %s" % (self.table)) -X -X def delMark(self): -X if self.findMark(): -X cmd = "ip rule delete fwmark %s table %s" % (self.tableNo, self.table) -X CsHelper.execute(cmd) -X logging.info("Deleting fwmark rule for %s" % (self.table)) -X -X def findMark(self): -X srch = "from all fwmark %s lookup %s" % (hex(self.tableNo), self.table) -X for i in CsHelper.execute("ip rule show"): -X if srch in i.strip(): -X return True -X return False -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRule.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRule.py': 'MD5 check failed' - ) << \SHAR_EOF -78748432f1ac57194339aef8bdb7c9f8 cloud_scripts/opt/cloud/bin/cs/CsRule.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRule.py'` -ne 2192 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' is not 2192" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsDhcp.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDhcp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsDhcp.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N'0B"D1(0U!?3U!44R`]("(O971C+V1H8W!O<'1S -M+G1X="(*0TQ/541?0T].1B`]("(O971C+V1N"`](#`*("`@("`@("!L:7-T96Y?861D0H@("`@("`@("`@("!G871E=V%Y(#T@ -M)R<*("`@("`@("`@("`@:68@2`](&E;)V=A=&5W -M87DG70H@("`@("`@("`@("!S;&EN92`](")D:&-P+7)A;F=E/7-E=#II;G1E -M"P@9V%T97=A>2D*("`@("`@("`@("`@96QS93H*("`@ -M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UR86YG93US970Z:6YT97)F86-E -M+25S+25S+"5S+'-T871I8R(@)2`H9&5V:6-E+"!I9'@L(&EP*0H@("`@("`@ -M("`@("!S96QF+F-O;F8N"D*("`@("`@("`@("`@;&EN92`](")D:&-P+6]P -M=&EO;CUT86"P@9VXN9V5T7V1O;6%I;B@I*0H@("`@("`@("`@("!S96QF+F-O;F8N"!F;W(@>"!I;B!G;BYG971?9&YS*"D@:68@>%T*("`@ -M("`@("`@("`@("`@(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C -M92TE"P@)RPG+FIO:6XH9&YS7VQI -M2`A/2`G,"XP+C`N,""D*("`@("`@("`@("`@("`@ -M(&QI;F4@/2`B9&AC<"UO<'1I;VX]=&%G.FEN=&5R9F%C92TE"P@9V%T97=A>2D*("`@("`@("`@("`@("`@('-E -M;&8N8V]N9BYS96%R8V@H"P@;F5T;6%S:RD*("`@("`@("`@("`@"`K/2`Q"@H@("`@("`@(",@ -M3&ES=&5N($%D9')E3H*("`@ -M("`@("`@("`@;&]G9VEN9RYI;F9O*")!='1E;7!T:6YG('1O(&1E;&5T92!E -M;G1R:65S(&9R;VT@9&YS;6%S<2YL96%S97,@9FEL92!F;W(@5DUS('=H:6-H -M(&%R92!N;W0@;VX@9&AC<&AOW!R:6YT("0S?22DZ"B`@("`@("`@5LG:7!V-%]A -M9&1R97-S)UTL(&5N=')Y6R=H;W-T7VYA;64G72D*("`@("`@("`C($QE87-E -M('1I;64@'!U;F=E9"P@:71S(&%C=&EV -M92!L96%S92!A;F0@1$A#4"]$3E,@8V]N9FEG(&ES('!R;W!E2!I2!R=6YN:6YG(&EN('!R;V1U8W1I;VYS -M('-Y5LG:7!V-%]A9&1R -M97-S)UTL"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@ -M("`@("`@("`@("`@("!E;G1R>5LG:&]S=%]N86UE)UTL"B`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!L96%S -M92DI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L)7,B("4@ -M*'1A9RP@,RDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D9"@B)7,L -M)7,B("4@*'1A9RP@-BDI"B`@("`@("`@("`@('-E;&8N9&AC<%]O<'1S+F%D -M9"@B)7,L)7,B("4@*'1A9RP@,34I*0H*("`@("`@("!I(#T@25!!9&1R97-S -M*&5N=')Y6R=I<'8T7V%D9')E2==(#T@96YT2=="@H@("`@9&5F(&%D9%]H;W-T*'-E;&8L(&EP+"!H;W-T -M/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py': 'MD5 check failed' - ) << \SHAR_EOF -bcf1831b38d86bf041523540fa8f821e cloud_scripts/opt/cloud/bin/cs/CsDhcp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py'` -ne 8809 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDhcp.py' is not 8809" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsRedundant.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRedundant.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsRedundant.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N7,N2`](%1R=64*"B`@ -M("`@("`@:68@;F]T(&ES1&5V:6-E4F5A9'DZ"B`@("`@("`@("`@(&QO9V=I -M;F5]I9E]N965D960H"B`@("`@("`@("`@("(E&5C("1$045-3TX@+2T@+2UVR(L(")](BP@6PH@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("`@("(@("`@("`@(&%U=&A?='EP92!!2"!< -M;B(L("(@("`@("`@(&%U=&A?<&%S2AC;VYN=')A8VMD7W1E;7!L871E7V-O;F8L(&-O;FYT0H@("`@("`@("(B(@H@("`@("`@(&ET97)A=&EO;G,@ -M/2`Q,`H@("`@("`@('1I;65?8F5T=V5E;B`](#$*"B`@("`@("`@9F]R(&ET -M97(@:6X@3H* -M("`@("`@("`@("`@("`@(',@/2!S;V-K970N2!R=6YN:6YG("@E9#HE2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I<"@I*2YS=&]P*"D* -M"B`@("`@("`@0W-(96QP97(N2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@ -M("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")!9&1I;F<@9V%T97=A>2`]/3X@ -M)7,@=&\@9&5V:6-E(#T]/B`E2P@9&5V*2D*("`@("`@ -M("`@("`@("`@("`@("!I9B!D978@/3T@0W-(96QP97(N4%5"3$E#7TE.5$52 -M1D%#15-;&5C -M=71E*"(E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I -M<"@I*2YR97-T87)T*"D*"B`@("`@("`@0W-(96QP97(N2D*"B`@("`@("`@("`@(",@5&AE(&9I -M2!I;G1E2!V'1E2!E=F5R(&)E(&]N92!A9&1R97-S(&EN -M(&$@5E!#('1H97)E(&-A;B!B92!M86YY"B`@("`@("`@5&AE(&YE=R!C;V1E -M(&%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py': 'MD5 check failed' - ) << \SHAR_EOF -6936e38f53736f7c5a04b255800a242d cloud_scripts/opt/cloud/bin/cs/CsRedundant.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py'` -ne 16789 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRedundant.py' is not 16789" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsHelper.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsHelper.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsHelper.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsHelper.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B -M971H,2)]"@I35$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S -M:"`M8R`@)VEF(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@ -M96QS92!E8VAO(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@ -M(")V<&-R;W5T97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@ -M6R`D,"`]/2!<(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ -M"B`@("`@("`@("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@ -M("`@("`@(&-M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@ -M("`@("`@;&]G9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S -M(B`E('-T871E7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X -M96-U=&4H7!E*"E=(&%N9"!S -M=&%T92`]/2`B34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE -M8W5T92AC;60I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ -M("`@("`@(&5X96-U=&4H8VUD*0H*"F1E9B!I&5C=71E -M*")M;W5N="!T;7!F6XH=F%L*3H*("`@(&EF('9A;#H* -M("`@("`@("!R971U&5C=71E*")I<"!A9&1R('-H;W<@ -M?&=R97`@+78@WT*("`@("`@("`@("`@ -M=&];)VEP)UT@/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A -M;'-;+3%="B`@("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@ -M("(B(@H@("`@9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G -M*")3879I;F<@:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C -M=71E*")S>7-T96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I -M;F7-T96UC=&P@&5C=71E*")K:6QL -M("U(55`@)7,B("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D -M;G-M87-Q(BP@(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py': 'MD5 check failed' - ) << \SHAR_EOF -9bdd1fdfea8177d3e408b2cc87e5d503 cloud_scripts/opt/cloud/bin/cs/CsHelper.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py'` -ne 7644 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsHelper.py' is not 7644" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5NWT*("`@("`@("!S96QF+F=U97-T(#T@5')U90H@("`@("`@ -M(&1B(#T@1&%T84)A9R@I"B`@("`@("`@9&(N7,H*2!A;F0@;&5N*&1B86=;9&5V:6-E -M72D@(3T@,#H*("`@("`@("`@("`@2==*0H*("`@ -M("`@("!I9B`G9&YS)R!I;B!S96QF+F1A=&$Z"B`@("`@("`@("`@(&1N'1E;F0H&-E<'1I;VXN"B`@("`@("`@:68@)W)O -M=71E"!I="!P2X@22!J=7-T(&%D -M9&5D('1H92!I9BP@87,@26%N(&1I9"!I;B!S;VUE(&]T:&5R(&9I;&5S+"!T -M;R!A=F]I9"!T:&4@97AC97!T:6]N+@H@("`@("`@(&EF("=R;W5T97)?9W5E -M2<@:6X@2=="B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py': 'MD5 check failed' - ) << \SHAR_EOF -98c84f4067412f263891f8293f185243 cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py'` -ne 2545 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsGuestNetwork.py' is not 2545" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsMonitor.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsMonitor.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N"!I;B!S96QF+F1B86=;)V-O;F9I9R==+G-P;&ET*"WT*("`@("`@("!H8U]D871A6R)H96%L=&A?8VAE8VMS7V)A&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!S96QF+F1B -M86&-L=61E9%]H96%L=&A?8VAE8VMS(ET@/2!;70H* -M("`@("`@("!I9B`B:&5A;'1H7V-H96-K/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py': 'MD5 check failed' - ) << \SHAR_EOF -d8f5dcf496dbc6d8508e40b906f48245 cloud_scripts/opt/cloud/bin/cs/CsMonitor.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py'` -ne 3681 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsMonitor.py' is not 3681" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@ -M("`@("!S96QF+FQA2!E>&ES=',Z(')U;&4] -M)7,@=&%B;&4])7,@8VAA:6X])7,B+"!N97=?2`](&-P>2YR97!L86-E*"(M02`E&5C=71E,B@B:7!T86)L97,@+70@)7,@ -M)7,B("4@*&YE=U]R=6QE+F=E=%]T86)L92@I+"!C<'DI*0H@("`@("`@("`@ -M("`@("`@(R!4:&5R92!A"!I;B!T:&4@ -M9G)A;65W;W)K+@H@("`@("`@("`@("`@("`@:68@&5C=71E*")I<'1A8FQE7!E(#T@0W-#;61,:6YE*")C;61L:6YE(BDN9V5T7W1Y<&4H*0H* -M("`@("`@("!T7!E*3H*("`@("`@("`@("`@("`@(&EF(&DNFEP*&)I='-;,#HZ,ETL(&)I='-;,3HZ,ETI*0H@("`@("`@(&EF -M("(M02(@:6X@2!C;W)R96-T(&EP=&%B;&5S(&-O;6UA -M;F0@(B(B"B`@("`@("`@(R!/7,H*3H*("`@("`@("`@("`@("`@('!R:6YT86)L92`] -M(&LN=7)N($9A;'-E"B`@("`@("`@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py': 'MD5 check failed' - ) << \SHAR_EOF -7456b53eba9f115f9ad344bc1c01611d cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py'` -ne 11100 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsNetfilter.py' is not 11100" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsRoute.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRoute.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRoute.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import CsHelper -import logging -X -X -class CsRoute: -X -X """ Manage routes """ -X -X def __init__(self): -X self.table_prefix = "Table_" -X -X def get_tablename(self, name): -X return self.table_prefix + name -X -X def add_table(self, devicename): -X tablenumber = 100 + int(devicename[3:]) -X tablename = self.get_tablename(devicename) -X str = "%s %s" % (tablenumber, tablename) -X filename = "/etc/iproute2/rt_tables" -X logging.info("Adding route table: " + str + " to " + filename + " if not present ") -X if not CsHelper.definedinfile(filename, str): -X CsHelper.execute("sudo echo " + str + " >> /etc/iproute2/rt_tables") -X # remove "from all table tablename" if exists, else it will interfer with -X # routing of unintended traffic -X if self.findRule("from all lookup " + tablename): -X CsHelper.execute("sudo ip rule delete from all table " + tablename) -X -X def flush_table(self, tablename): -X CsHelper.execute("ip route flush table %s" % (tablename)) -X CsHelper.execute("ip route flush cache") -X -X def add_route(self, dev, address): -X """ Wrapper method that adds table name and device to route statement """ -X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 -X table = self.get_tablename(dev) -X -X if not table or not address: -X empty_param = "table" if not table else "address" -X logging.info("Empty parameter received %s while trying to add route, skipping" % empty_param) -X else: -X logging.info("Adding route: dev " + dev + " table: " + -X table + " network: " + address + " if not present") -X cmd = "default via %s table %s proto static" % (address, table) -X self.set_route(cmd) -X -X def add_network_route(self, dev, address): -X """ Wrapper method that adds table name and device to route statement """ -X # ip route add dev eth1 table Table_eth1 10.0.2.0/24 -X table = self.get_tablename(dev) -X -X if not table or not address: -X empty_param = "table" if not table else "address" -X logging.info("Empty parameter received %s while trying to add network route, skipping" % empty_param) -X else: -X logging.info("Adding route: dev " + dev + " table: " + -X table + " network: " + address + " if not present") -X cmd = "throw %s table %s proto static" % (address, table) -X self.set_route(cmd) -X -X def set_route(self, cmd, method="add"): -X """ Add a route if it is not already defined """ -X found = False -X search = cmd -X if "throw" in search: -X search = search.replace("throw", "") -X for i in CsHelper.execute("ip route show " + search): -X found = True -X if not found and method == "add": -X logging.info("Add " + cmd) -X cmd = "ip route add " + cmd -X elif found and method == "delete": -X logging.info("Delete " + cmd) -X cmd = "ip route delete " + cmd -X else: -X return -X CsHelper.execute(cmd) -X -X def add_defaultroute(self, gateway): -X """ Add a default route -X :param str gateway -X :return: bool -X """ -X if not gateway: -X raise Exception("Gateway cannot be None.") -X -X if self.defaultroute_exists(): -X return False -X else: -X cmd = "default via " + gateway -X logging.info("Adding default route") -X self.set_route(cmd) -X return True -X -X def defaultroute_exists(self): -X """ Return True if a default route is present -X :return: bool -X """ -X logging.info("Checking if default ipv4 route is present") -X route_found = CsHelper.execute("ip -4 route list 0/0") -X -X if len(route_found) > 0: -X logging.info("Default route found: " + route_found[0]) -X return True -X else: -X logging.warn("No default route found!") -X return False -X -X def findRule(self, rule): -X for i in CsHelper.execute("ip rule show"): -X if rule in i.strip(): -X return True -X return False -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRoute.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py': 'MD5 check failed' - ) << \SHAR_EOF -4f2109aa1d89157e14817f90c676c2d3 cloud_scripts/opt/cloud/bin/cs/CsRoute.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py'` -ne 4989 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRoute.py' is not 4989" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py -M(R$O=7-R+V)I;B]P>71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2==*0H@("`@("`@("`@ -M("!#&5C=71E*&-O;6UA;F0I"B`@("`@("`@96QS93H*("`@ -M("`@("`@("`@8V]M;6%N9"`](")I<"!R;W5T92!S:&]W('P@9W)E<"`EW!R:6YT("0Q+"`D,WTG(B`E(')O=71E6R=N971W;W)K)UT*("`@ -M("`@("`@("`@2==*0H@("`@("`@("`@("`@ -C("`@0W-(96QP97(N97AE8W5T92AR;W5T95]C;VUM86YD*0H@ -` -end -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py': 'MD5 check failed' - ) << \SHAR_EOF -f9f9db3a4543397153d69a62551a6c8c cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py'` -ne 1655 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsStaticRoutes.py' is not 1655" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N7,H*3H* -M("`@("`@("`@("`@"YS<&QI="@G7&XG*5T*"B`@("`@("`@9FEL -M93$N8V]M;6ET*"D*("`@("`@("!F:6QE,B`]($-S1FEL92A(05!23UA97T-/ -M3D9?4"D*("`@("`@("!I9B!N;W0@9FEL93(N8V]M<&%R92AF:6QE,2DZ"B`@ -M("`@("`@("`@($-S2&5L<&5R+F-O<'DH2$%04D]865]#3TY&7U0L($A!4%)/ -M6%E?0T].1E]0*0H*("`@("`@("`@("`@<')O8R`]($-S4')O8V5S2YP:60G72D*("`@("`@("`@("`@:68@;F]T('!R;V,N9FEN -M9"@I.@H@("`@("`@("`@("`@("`@;&]G9VEN9RYD96)U9R@B0W-,;V%D0F%L -M86YC97(Z.B!W:6QL(')E2$B*0H@("`@("`@("`@("`@ -M("`@0W-(96QP97(N2(L(")R97-T87)T(BD*("`@ -M("`@("`@("`@96QS93H*("`@("`@("`@("`@("`@(&QO9V=I;F2$B*0H@("`@ -M("`@("`@("`@("`@0W-(96QP97(N2(L(")R96QO -M860B*0H*("`@("`@("!A9&1?/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py': 'MD5 check failed' - ) << \SHAR_EOF -8f93571ff9b8f21c947e90193c3efa38 cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py'` -ne 3393 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsLoadBalancer.py' is not 3393" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsApp.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsApp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsApp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsApp.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G -M871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG971?='EP92@I"B`@ -M("`@("`@5]I9E]N965D -M960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L"B`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE,B]S:71E2DI"B`@("`@("`@ -M("`@(&9I;&4N&5C=71E,B@B/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsApp.py': 'MD5 check failed' - ) << \SHAR_EOF -fa071a9d58a918b6a9d5e09ae10e3e11 cloud_scripts/opt/cloud/bin/cs/CsApp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsApp.py'` -ne 4159 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsApp.py' is not 4159" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsFile.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsFile.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsFile.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import logging -import re -import copy -X -X -class CsFile: -X """ File editors """ -X -X def __init__(self, filename): -X self.filename = filename -X self.load() -X -X def load(self): -X self.new_config = [] -X self.config = [] -X try: -X for line in open(self.filename): -X self.new_config.append(line) -X except IOError: -X logging.debug("File %s does not exist" % self.filename) -X else: -X logging.debug("Reading file %s" % self.filename) -X self.config = list(self.new_config) -X -X def is_changed(self): -X if set(self.config) != set(self.new_config): -X return True -X else: -X return False -X -X def __len__(self): -X return len(self.config) -X -X def empty(self): -X self.config = [] -X self.new_config = [] -X -X def repopulate(self): -X self.new_config = [] -X -X def commit(self): -X if not self.is_changed(): -X logging.info("Nothing to commit. The %s file did not change" % self.filename) -X return False -X handle = open(self.filename, "w+") -X for line in self.new_config: -X handle.write(line) -X handle.close() -X logging.info("Wrote edited file %s" % self.filename) -X self.config = list(self.new_config) -X logging.info("Updated file in-cache configuration") -X return True -X -X def dump(self): -X for line in self.new_config: -X print line -X -X def addeq(self, string): -X """ Update a line in a file of the form token=something -X match on token= and replace something if needed -X Add line if token is not present -X """ -X token = string.split('=')[0] + '=' -X self.search(token, string) -X -X def append(self, string, where=-1): -X if where == -1: -X self.new_config.append("%s\n" % string) -X else: -X self.new_config.insert(where, "%s\n" % string) -X -X def add(self, string, where=-1): -X for index, line in enumerate(self.new_config): -X if line.strip() == string: -X return False -X if where == -1: -X self.new_config.append("%s\n" % string) -X else: -X self.new_config.insert(where, "%s\n" % string) -X return True -X -X def section(self, start, end, content): -X sind = -1 -X eind = -1 -X found = False -X for index, line in enumerate(self.new_config): -X if found and line.strip() == end: -X eind = index -X found = False -X if line.strip() == start: -X sind = index + 1 -X found = True -X if sind == -1: -X content.insert(0, start + "\n") -X content.append(end + "\n") -X self.new_config[sind:eind] = content -X -X def greplace(self, search, replace): -X logging.debug("Searching for %s and replacing with %s" % (search, replace)) -X self.new_config = [w.replace(search, replace) for w in self.new_config] -X -X def replaceIfFound(self, search, replace): -X found = False -X replace_filtered = replace -X if re.search("PSK \"", replace): -X replace_filtered = re.sub(r'".*"', '"****"', replace) -X logging.debug("Searching for %s and replacing with %s if found" % (search, replace_filtered)) -X for index, line in enumerate(self.new_config): -X if line.lstrip().startswith("#"): -X continue -X if re.search(search, line): -X if replace not in line: -X self.new_config[index] = replace + "\n" -X return False -X -X def search(self, search, replace): -X found = False -X replace_filtered = replace -X if re.search("PSK \"", replace): -X replace_filtered = re.sub(r'".*"', '"****"', replace) -X logging.debug("Searching for %s and replacing with %s" % (search, replace_filtered)) -X for index, line in enumerate(self.new_config): -X if line.lstrip().startswith("#"): -X continue -X if re.search(search, line): -X found = True -X if replace not in line: -X self.new_config[index] = replace + "\n" -X if not found: -X self.new_config.append(replace + "\n") -X return True -X return False -X -X def searchString(self, search, ignoreLinesStartWith): -X found = False -X logging.debug("Searching for %s string " % search) -X -X for index, line in enumerate(self.new_config): -X print ' line = ' + line -X if line.lstrip().startswith(ignoreLinesStartWith): -X continue -X if search in line: -X found = True -X break -X -X return found -X -X def deleteLine(self, search): -X found = False -X logging.debug("Searching for %s to remove the line " % search) -X temp_config = [] -X for index, line in enumerate(self.new_config): -X if line.lstrip().startswith("#"): -X continue -X if search not in line: -X temp_config.append(line) -X -X self.new_config = list(temp_config) -X -X def compare(self, o): -X result = (isinstance(o, self.__class__) and set(self.config) == set(o.config)) -X logging.debug("Comparison of CsFiles content is ==> %s" % result) -X return result -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsFile.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsFile.py': 'MD5 check failed' - ) << \SHAR_EOF -81531ddee205a5eb66bb44f400ab222c cloud_scripts/opt/cloud/bin/cs/CsFile.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsFile.py'` -ne 6133 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsFile.py' is not 6133" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/__init__.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/__init__.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/__init__.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/__init__.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/__init__.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/__init__.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/__init__.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/__init__.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/__init__.py': 'MD5 check failed' - ) << \SHAR_EOF -33215d440d5ba5fa95b1ffa035d769e2 cloud_scripts/opt/cloud/bin/cs/__init__.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/__init__.py'` -ne 785 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/__init__.py' is not 785" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsAddress.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsAddress.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsAddress.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsAddress.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N`H@("`@("`@("`@("`@("`@("`@ -M(&=U97-T7VEN=&5R9F%C92`](&EN=&5R9F%C90H@("`@("`@("`@("`@("`@ -M("`@(&QO9V=I;F2!C;VYF:6=U2AS96QF*3H*("`@("`@("!I -M9B!S96QF+F-O;F9I9RYI2(I -M"B`@("`@("`@96QS93H*("`@("`@("`@("`@2@I+"!S96QF+F=E=%]S -M:7IE*"DI"@H@("`@9&5F(&=E=%]S:7IE*'-E;&8I.@H@("`@("`@("(B(B!2 -M971U7!E -M(B!I;B!S96QF+F%D9')E"@Q,#`@*R!I;G0H9&5V6S,Z72DI -M"B`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@("`@97AC97!T($5X8V5P=&EO;B!A -M&-E<'1I;VX@ -M;V-C=7)R960@/3T^("5S(B`E(&4I"@H@("`@("`@("`@("!S96QF+G!O7!E*"D@:6X@6R)C;VYT7!E*"D@:6X@ -M6R=P=6)L:6,G73H*("`@("`@("`@("`@("`@('-E;&8N7!E*"E=.@H@("`@("`@ -M("`@("`@("`@9V%T97=A>2`]('-T2@I*3H* -M("`@("`@("`@("`@("`@(')O=71E+F%D9%]D969A=6QT2@I*0H*("`@(&1E9B!S971?;6%R:RAS96QF*3H*("`@ -M("`@("!C;60@/2`B+4$@4%)%4D]55$E.1R`M:2`E7!E(&]F('1H92!)4`H@("`@("`@(&=U97-T"B`@("`@("`@8V]N -M=')O;`H@("`@("`@('!U8FQI8PH@("`@("`@("(B(@H@("`@("`@(&EF(")N -M=U]T>7!E(B!I;B!S96QF+F%D9')E&9F9F9F9F9F -M("TM8W1M87-K(#!X9F9F9F9F9F8B72D*"B`@("`@("`@&UA7!E*"D@:6X@6R)G=65S=")=.@H@("`@("`@("`@("!G=65S -M=$YE='=O&9F9F9F9F9F(ETI"B`@ -M("`@("`@("`@(&=U97-T3F5T=V]R:T-I9'(@/2!S96QF+F%D9')E#4R-2\P>&9F9F9F9F9F(B`E -M("AS96QF+F1E=BP@2)=("$](").;VYE(CH* -M("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@("`@("`@:68@ -M(FYE='=O7!E*"D@:6X@6R)P=6)L:6,B -M72!A;F0@(F=A=&5W87DB(&EN('-E;&8N861D2)=("$] -M(").;VYE(CH*("`@("`@("`@("`@("`@("`@("!R;W5T92YA9&1?2)=*0H@("`@("`@("`@ -M("`@("`@("`@(&9O7!E(B!I;B!A9&1R97-S(&%N9"!A -M9&1R97-S6R)N=U]T>7!E(ET@/3T@(F=U97-T(CH*("`@("`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("!R;W5T92YA9&1?;F5T=V]R:U]R;W5T92AS96QF -M+F1E=BP@&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A8VAE(BD*"B`@("`@("`@ -M96QI9B!M971H;V0@/3T@(F1E;&5T92(Z"B`@("`@("`@("`@(",@=')E870@ -M=&AE(&QA&5C=71E*")S=61O(&EP(')U;&4@9&5L971E('1A8FQE("(@*R!T86)L94YA -M;64I"B`@("`@("`@("`@("`@("!#&5C=71E*")S=61O(&EP -M(')O=71E(&9L=7-H('1A8FQE("(@*R!T86)L94YA;64I"B`@("`@("`@("`@ -M("`@("!#&5C=71E*")S=61O(&EP(')O=71E(&9L=7-H(&-A -M8VAE(BD*("`@("`@("`@("`@("`@($-S4G5L92AS96QF+F1E=BDN9&5L36%R -M:R@I"@H@("`@("`@('-E;&8N9G=?7!E('=I;&P@ -M;F\@;&]N9V5R(&)E(&MN;W=N"B`@("`@("`@:68@7!E*"D@/3T@(G!U8FQI8R(@86YD('-E;&8N8V]N9FEG+FES7W9P8R@I -M(&%N9"!M971H;V0@/3T@(F%D9"(Z"B`@("`@("`@("`@(&EF('-E;&8N861D -M7,H*3H*("`@("`@("`@ -M("`@7!E)UT@:6X@5E)2 -M4%]465!%4SH*("`@("`@("`@("`@7!E(B!I;B!S96QF+F%D9')E&5C=71E,BAC;60L($9A -M;'-E*0H*("`@(",@1&5L971E(&%N>2!I<',@=&AA="!A7,H*2!O2AS96QF+"!B862!F;W(@ -M7,O8VQA"TP+W)P&-E<'0@24]%/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py': 'MD5 check failed' - ) << \SHAR_EOF -5cebbbd106abd3eba7ee0e4d23277dda cloud_scripts/opt/cloud/bin/cs/CsAddress.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py'` -ne 29236 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsAddress.py' is not 29236" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsProcess.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsProcess.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsProcess.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import os -import re -import CsHelper -import logging -X -X -class CsProcess(object): -X """ Manipulate processes """ -X -X def __init__(self, search): -X self.search = search -X -X def start(self, thru, background=''): -X # if(background): -X # cmd = cmd + " &" -X logging.info("Started %s", " ".join(self.search)) -X os.system("%s %s %s" % (thru, " ".join(self.search), background)) -X -X def kill_all(self): -X pids = self.find_pid() -X for p in pids: -X CsHelper.execute("kill -9 %s" % p) -X -X def find_pid(self): -X self.pid = [] -X for i in CsHelper.execute("ps aux"): -X items = len(self.search) -X proc = re.split(r"\s+", i)[items*-1:] -X matches = len([m for m in proc if m in self.search]) -X if matches == items: -X self.pid.append(re.split(r"\s+", i)[1]) -X -X logging.debug("CsProcess:: Searching for process ==> %s and found PIDs ==> %s", self.search, self.pid) -X return self.pid -X -X def find(self): -X has_pid = len(self.find_pid()) > 0 -X return has_pid -X -X def kill(self, pid): -X if pid > 1: -X CsHelper.execute("kill -9 %s" % pid) -X -X def grep(self, str): -X for i in CsHelper.execute("ps aux"): -X if i.find(str) != -1: -X return re.split(r"\s+", i)[1] -X return -1 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsProcess.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py': 'MD5 check failed' - ) << \SHAR_EOF -75a4650fe1e521049e80d32a022d8689 cloud_scripts/opt/cloud/bin/cs/CsProcess.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py'` -ne 2156 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsProcess.py' is not 2156" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsConfig.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsConfig.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsConfig.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsConfig.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5N7!E*"D@/3T@)W9P8W)O=71E'1D;G,H'1D;G,G+"`G9F%L/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py': 'MD5 check failed' - ) << \SHAR_EOF -836541a5b9cb1b2f9df5dad6bb806745 cloud_scripts/opt/cloud/bin/cs/CsConfig.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py'` -ne 3179 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsConfig.py' is not 3179" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsDatabag.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsDatabag.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py -M(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W -M=RYA<&%C:&4N;W)G+VQI8V5NWT*("`@("`@ -M("!S96QF+F1B(#T@1&%T84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF -M+F1B+G-A=F4HWT*("`@("`@("!R971U&1I9V5S="@I"@H@("`@ -M9&5F(&=E=%]G871E=V%Y*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I -M;B!S96QF+FED871A*"DZ"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A -M*"E;)V=A=&5W87DG70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G -M971?=7-E7V5X=%]D;G,H'1D;G,G70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E -M9B!G971?861V97)T7VEN="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN -M="<@:6X@/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py': 'MD5 check failed' - ) << \SHAR_EOF -9e4de6e0a115a5e806e80dc151769b21 cloud_scripts/opt/cloud/bin/cs/CsDatabag.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py'` -ne 4808 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsDatabag.py' is not 4808" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs/CsRule.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs/CsRule.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs/CsRule.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' && -# -- coding: utf-8 -- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import CsHelper -import logging -X -X -class CsRule: -X """ Manage iprules -X Supported Types: -X fwmark -X """ -X -X def __init__(self, dev): -X self.dev = dev -X self.tableNo = 100 + int(dev[3:]) -X self.table = "Table_%s" % (dev) -X -X def addRule(self, rule): -X if not self.findRule(rule + " lookup " + self.table): -X cmd = "ip rule add " + rule + " table " + self.table -X CsHelper.execute(cmd) -X logging.info("Added rule %s for %s" % (cmd, self.table)) -X -X def findRule(self, rule): -X for i in CsHelper.execute("ip rule show"): -X if rule in i.strip(): -X return True -X return False -X -X def addMark(self): -X if not self.findMark(): -X cmd = "ip rule add fwmark %s table %s" % (self.tableNo, self.table) -X CsHelper.execute(cmd) -X logging.info("Added fwmark rule for %s" % (self.table)) -X -X def delMark(self): -X if self.findMark(): -X cmd = "ip rule delete fwmark %s table %s" % (self.tableNo, self.table) -X CsHelper.execute(cmd) -X logging.info("Deleting fwmark rule for %s" % (self.table)) -X -X def findMark(self): -X srch = "from all fwmark %s lookup %s" % (hex(self.tableNo), self.table) -X for i in CsHelper.execute("ip rule show"): -X if srch in i.strip(): -X return True -X return False -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs/CsRule.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs/CsRule.py': 'MD5 check failed' - ) << \SHAR_EOF -78748432f1ac57194339aef8bdb7c9f8 cloud_scripts/opt/cloud/bin/cs/CsRule.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs/CsRule.py'` -ne 2192 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs/CsRule.py' is not 2192" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vmdata.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vmdata.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vmdata.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vmdata.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/vmdata.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&ET*#(I -M"@H@("`@9F]R(&EP(&EN(&IS;VY?9&%T83H*("`@("`@("!F;W(@:71E;2!I -M;B!J2!V86QI9"!D -M871A"B`@("`@("`@("`@(&EF(&9O;&1E&ES=',H;65T -M86UA;FEF97-T*3H*("`@("`@("!O2Q!;&QO=UQN1&5N -M>2!F&-E<'0@3U-%2!E>&ES=',L('=E(&1O(&ET('1H:7,@=V%Y(&9O -M7,N97AI="@Q*0H*("`@(&9H(#T@;W!E;BAH -M=&%C8V5S2`K("=<;B&9L;V-K*&9I;&4I.@H@("`@=')Y.@H@("`@("`@(&9L;V-K -M*&9I;&4L($Q/0TM?15@I"B`@("!E>&-E<'0@24]%7,N97AI="@Q -M*0H@("`@3H*("`@("`@("!F;&]C:RAF:6QE+"!,3T-+7U5.*0H@("`@97AC97!T($E/ -M17)R;W(@87,@93H*("`@("`@("!P7,N97AI="@Q*0H@("`@7,N87)G=ELQ.ETI"FYA -` -end -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vmdata.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vmdata.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vmdata.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vmdata.py': 'MD5 check failed' - ) << \SHAR_EOF -f585277ddefb989a0662db609bc199c7 cloud_scripts/opt/cloud/bin/vmdata.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vmdata.py'` -ne 4723 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vmdata.py' is not 4723" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/get_diagnostics_files.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/get_diagnostics_files.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/get_diagnostics_files.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' && -#!/usr/bin/env python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import logging -import os -import re -import shlex -import subprocess as sp -import sys -import time -import zipfile -X -X -# Create zip archive and append files for retrieval -def zip_files(files): -X fList = files -X compression = zipfile.ZIP_DEFLATED -X time_str = time.strftime("%Y%m%d-%H%M%S") -X zf_name = '/root/diagnostics_files_' + time_str + '.zip' -X zf = zipfile.ZipFile(zf_name, 'w', compression) -X -X ''' -X Initialize 3 empty arrays to collect found files, non-existent files -X and last one to collect temp files to be cleaned up when script exits -X ''' -X files_found_list = [] -X files_not_found_list = [] -X files_from_shell_commands = [] -X -X try: -X for f in fList: -X f = f.strip() -X -X if f in ('iptables', 'ipaddr', 'iprule', 'iproute'): -X f = execute_shell_script(f) -X files_from_shell_commands.append(f) -X -X if len(f) > 3 and f.startswith('[') and f.endswith(']'): -X f = execute_shell_script(f[1:-1]) -X files_from_shell_commands.append(f) -X -X if os.path.isfile(f): -X try: -X zf.write(f, f[f.rfind('/') + 1:]) -X except OSError or RuntimeError as e: -X files_not_found_list.append(f) -X else: -X files_found_list.append(f) -X finally: -X cleanup(files_from_shell_commands) -X generate_retrieved_files_txt(zf, files_found_list, files_not_found_list) -X zf.close() -X print zf_name -X -X -def get_cmd(script): -X if script is None or len(script) == 0: -X return None -X -X cmd = None -X if script == 'iptables': -X cmd = 'iptables-save' -X elif script == 'ipaddr': -X cmd = 'ip address' -X elif script == 'iprule': -X cmd = 'ip rule list' -X elif script == 'iproute': -X cmd = 'ip route show table all' -X else: -X cmd = '/opt/cloud/bin/' + script -X if not os.path.isfile(cmd.split(' ')[0]): -X cmd = None -X -X return cmd -X -X -def execute_shell_script(script): -X script = script.strip() -X outputfile = script + '.log' -X -X with open(outputfile, 'wb', 0) as f: -X try: -X cmd = get_cmd(script) -X if cmd is None: -X f.write('Unable to generate command for ' + script + ', perhaps missing file') -X else: -X p = sp.Popen(cmd, shell=True, stdout=sp.PIPE, stderr=sp.PIPE) -X stdout, stderr = p.communicate() -X return_code = p.returncode -X if return_code is 0: -X f.write(stdout) -X else: -X f.write(stderr) -X except OSError as ex: -X delete_tmp_file_cmd = 'rm -f %s' % outputfile -X sp.check_call(shlex.split(delete_tmp_file_cmd)) -X finally: -X f.close() -X return outputfile -X -X -def cleanup(file_list): -X files = ' '.join(file_list) -X cmd = 'rm -f %s' % files -X try: -X p = sp.Popen(shlex.split(cmd), stderr=sp.PIPE, stdout=sp.PIPE) -X p.communicate() -X except OSError as e: -X logging.debug("Failed to execute bash command") -X -X -def generate_retrieved_files_txt(zip_file, files_found, files_not_found): -X output_file = 'fileinfo.txt' -X try: -X with open(output_file, 'wb', 0) as man: -X for i in files_found: -X man.write(i + '\n') -X for j in files_not_found: -X man.write(j + 'File Not Found!!\n') -X zip_file.write(output_file, output_file) -X finally: -X cleanup_cmd = "rm -f %s" % output_file -X sp.check_call(shlex.split(cleanup_cmd)) -X -X -if __name__ == '__main__': -X fileList = sys.argv[1:] -X zip_files(fileList) -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/get_diagnostics_files.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py': 'MD5 check failed' - ) << \SHAR_EOF -f8b91c14af848f14696aa2c1193b0907 cloud_scripts/opt/cloud/bin/get_diagnostics_files.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py'` -ne 4478 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/get_diagnostics_files.py' is not 4478" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/checkrouter.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checkrouter.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checkrouter.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/checkrouter.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checkrouter.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -STATUS=UNKNOWN -X -if [ "$(systemctl is-active keepalived)" != "active" ] -then -X echo "Status: FAULT" -X exit -fi -X -ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g') -if [ "$ROUTER_TYPE" = "router" ] -then -X ROUTER_STATE=$(ip addr show dev eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi') -X STATUS=$ROUTER_STATE -else -X ROUTER_STATE=$(ip addr show dev eth1 | grep state | awk '{print $9;}') -X if [ "$ROUTER_STATE" = "UP" ] -X then -X STATUS=MASTER -X elif [ "$ROUTER_STATE" = "DOWN" ] -X then -X STATUS=BACKUP -X fi -fi -X -echo "Status: ${STATUS}" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checkrouter.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/checkrouter.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/checkrouter.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checkrouter.sh': 'MD5 check failed' - ) << \SHAR_EOF -b107b37bc85a7036ef9f4e81cf4ae8b2 cloud_scripts/opt/cloud/bin/checkrouter.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checkrouter.sh'` -ne 1445 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checkrouter.sh' is not 1445" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/ilb.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ilb.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ilb.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/ilb.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/ilb.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -usage() { -X printf "Usage: %s: -a -d -f -s \n" $(basename $0) >&2 -} -X -#set -x -X -fw_remove_backup() { -X logger -t cloud "$(basename $0): Entering fw_remove_backup" -X local lb_vif_list=eth0 -X for vif in $lb_vif_list; do -X sudo iptables -F back_load_balancer_$vif 2> /dev/null -X sudo iptables -D INPUT -i $vif -p tcp -j back_load_balancer_$vif 2> /dev/null -X sudo iptables -X back_load_balancer_$vif 2> /dev/null -X done -X sudo iptables -F back_lb_stats 2> /dev/null -X sudo iptables -D INPUT -p tcp -j back_lb_stats 2> /dev/null -X sudo iptables -X back_lb_stats 2> /dev/null -} -X -fw_restore() { -X logger -t cloud "$(basename $0): Entering fw_restore" -X local lb_vif_list="eth0" -X for vif in $lb_vif_list; do -X sudo iptables -F load_balancer_$vif 2> /dev/null -X sudo iptables -D INPUT -i $vif -p tcp -j load_balancer_$vif 2> /dev/null -X sudo iptables -X load_balancer_$vif 2> /dev/null -X sudo iptables -E back_load_balancer_$vif load_balancer_$vif 2> /dev/null -X done -X sudo iptables -F lb_stats 2> /dev/null -X sudo iptables -D INPUT -p tcp -j lb_stats 2> /dev/null -X sudo iptables -X lb_stats 2> /dev/null -X sudo iptables -E back_lb_stats lb_stats 2> /dev/null -} -X -# firewall entry to ensure that haproxy can receive on specified port -fw_entry() { -X logger -t cloud "$(basename $0): Entering fw_entry" -X local added=$1 -X local removed=$2 -X local stats=$3 -X -X if [ "$added" == "none" ] -X then -X added="" -X fi -X -X if [ "$removed" == "none" ] -X then -X removed="" -X fi -X -X local a=$(echo $added | cut -d, -f1- --output-delimiter=" ") -X local r=$(echo $removed | cut -d, -f1- --output-delimiter=" ") -X -# back up the iptable rules by renaming before creating new. -X local lb_vif_list=eth0 -X for vif in $lb_vif_list; do -X sudo iptables -E load_balancer_$vif back_load_balancer_$vif 2> /dev/null -X sudo iptables -N load_balancer_$vif 2> /dev/null -X sudo iptables -A INPUT -i $vif -p tcp -j load_balancer_$vif -X done -X sudo iptables -E lb_stats back_lb_stats 2> /dev/null -X sudo iptables -N lb_stats 2> /dev/null -X sudo iptables -A INPUT -p tcp -j lb_stats -X -X for i in $a -X do -X local pubIp=$(echo $i | cut -d: -f1) -X local dport=$(echo $i | cut -d: -f2) -X local lb_vif_list="eth0" -X for vif in $lb_vif_list; do -X sudo iptables -A load_balancer_$vif -p tcp -d $pubIp --dport $dport -j ACCEPT -X if [ $? -gt 0 ] -X then -X return 1 -X fi -X done -X done -X local pubIp=$(echo $stats | cut -d: -f1) -X local dport=$(echo $stats | cut -d: -f2) -X local cidrs=$(echo $stats | cut -d: -f3 | sed 's/-/,/') -X sudo iptables -A lb_stats -s $cidrs -p tcp -m state --state NEW -d $pubIp --dport $dport -j ACCEPT -X -X return 0 -} -X -#Hot reconfigure HA Proxy in the routing domain -reconfig_lb() { -X logger -t cloud "Reconfiguring ilb using $1" -X /root/reconfigLB.sh $1 -X return $? -} -X -# Restore the HA Proxy to its previous state, and revert iptables rules on loadbalancer -restore_lb() { -X logger -t cloud "Restoring HA Proxy to previous state" -X # Copy the old version of haproxy.cfg into the file that reconfigLB.sh uses -X cp /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg.new -X -X if [ $? -eq 0 ] -X then -X # Run reconfigLB.sh again -X /root/reconfigLB.sh /etc/haproxy/haproxy.cfg.new -X fi -} -X -X -logger -t cloud "$(basename $0): Entering $(dirname $0)/$(basename $0)" -X -iflag= -aflag= -dflag= -fflag= -sflag= -X -while getopts 'i:a:d:f:s:' OPTION -do -X case $OPTION in -X i) iflag=1 -X domRIp="$OPTARG" #unused but passed in -X ;; -X a) aflag=1 -X addedIps="$OPTARG" -X ;; -X d) dflag=1 -X removedIps="$OPTARG" -X ;; -X f) fflag=1 -X cfgfile="$OPTARG" -X ;; -X s) sflag=1 -X statsIp="$OPTARG" -X ;; -X ?) usage -X unlock_exit 2 $lock $locked -X ;; -X esac -done -X -if [[ "$aflag$dflag" != "1" && "$aflag$dflag" != "11" ]] -then -X usage -X unlock_exit 2 $lock $locked -fi -X -if [ "$addedIps" == "" ] -then -X addedIps="none" -fi -X -X -if [ "$removedIps" == "" ] -then -X removedIps="none" -fi -X -X -# hot reconfigure haproxy -reconfig_lb $cfgfile -X -if [ $? -gt 0 ] -then -X logger -t cloud "Reconfiguring ilb failed" -X unlock_exit 1 $lock $locked -fi -X -logger -t cloud "HAProxy reconfigured successfully, configuring firewall" -X -# iptables entry to ensure that haproxy receives traffic -fw_entry $addedIps $removedIps $statsIp -X -if [ $? -gt 0 ] -then -X logger -t cloud "Failed to apply firewall rules for internal load balancing, reverting HA Proxy config" -X # Restore the LB -X restore_lb -X -X logger -t cloud "Reverting firewall config" -X fw_restore -X -X unlock_exit 1 $lock $locked -else -X # Remove backedup iptable rules -X logger -t cloud "Firewall configured successfully, deleting backup firewall config" -X fw_remove_backup -fi -X -unlock_exit 0 $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/ilb.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/ilb.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/ilb.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ilb.sh': 'MD5 check failed' - ) << \SHAR_EOF -8b7374975ee7d7a5d73da78b60bd508c cloud_scripts/opt/cloud/bin/ilb.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ilb.sh'` -ne 5644 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ilb.sh' is not 5644" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -for i in $* -do -X info=`/opt/cloud/bin/checks2svpn.sh $i` -X ret=$? -X batchInfo+="$i:$ret:$info&" -done -echo -n $batchInfo -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh': 'MD5 check failed' - ) << \SHAR_EOF -36a25911b669737ea678011f72a6f3f9 cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh'` -ne 924 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/checkbatchs2svpn.sh' is not 924" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/savepassword.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/savepassword.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/savepassword.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/savepassword.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/savepassword.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# Usage -# save_password -v -p -X -while getopts 'v:p:' OPTION -do -X case $OPTION in -X v) VM_IP="$OPTARG" -X ;; -X p) PASSWORD="$OPTARG" -X ;; -X ?) echo "Incorrect usage" -X ;; -X esac -done -TOKEN_FILE="/tmp/passwdsrvrtoken" -TOKEN="" -if [ -f $TOKEN_FILE ]; then -X TOKEN=$(cat $TOKEN_FILE) -fi -ps aux | grep passwd_server_ip.py |grep -v grep 2>&1 > /dev/null -if [ $? -eq 0 ] -then -X ips=$(ip addr show | grep inet | awk '{print $2}') -X for ip in $ips; do -X server_ip=$(echo $ip | awk -F'/' '{print $1}') -X curl --header "DomU_Request: save_password" "http://$server_ip:8080/" -F "ip=$VM_IP" -F "password=$PASSWORD" -F "token=$TOKEN" >/dev/null 2>/dev/null & -X done -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/savepassword.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/savepassword.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/savepassword.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/savepassword.sh': 'MD5 check failed' - ) << \SHAR_EOF -edebd2c25984e1ed00b36e4f8d360a63 cloud_scripts/opt/cloud/bin/savepassword.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/savepassword.sh'` -ne 1525 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/savepassword.sh' is not 1525" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cloud-nic.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cloud-nic.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cloud-nic.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -plug_nic() { -X sudo echo "$tableNo $tableName" >> /etc/iproute2/rt_tables 2>/dev/null -X sudo ip rule add fwmark $tableNo table $tableName 2>/dev/null -X sudo ip route flush table $tableName -X sudo ip route flush cache -} -X -X -unplug_nic() { -X sudo iptables -t mangle -D PREROUTING -i $dev -m state --state NEW -j CONNMARK --set-mark $tableNo 2>/dev/null -X -X sudo ip rule del fwmark $tableNo 2>/dev/null -X sudo ip route flush table $tableName -X sudo sed -i /"$tableNo $tableName"/d /etc/iproute2/rt_tables 2>/dev/null -X sudo ip route flush cache -X # remove network usage rules -X sudo iptables -F NETWORK_STATS_$dev 2>/dev/null -X iptables-save | grep NETWORK_STATS_$dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables $rule -X done -X sudo iptables -X NETWORK_STATS_$dev 2>/dev/null -X # remove vpn network usage rules -X sudo iptables -t mangle -F VPN_STATS_$dev 2>/dev/null -X iptables-save -t mangle | grep VPN_STATS_$dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t mangle $rule -X done -X sudo iptables -t mangle -X VPN_STATS_$dev 2>/dev/null -X # remove rules on this dev -X iptables-save -t mangle | grep $dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t mangle $rule -X done -X iptables-save -t nat | grep $dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables -t nat $rule -X done -X iptables-save | grep $dev | grep "\-A" | while read rule -X do -X rule=$(echo $rule | sed 's/\-A/\-D/') -X sudo iptables $rule -X done -X # remove apache config for this eth -X rm -f /etc/apache2/conf.d/vhost$dev.conf -} -X -action=$1 -dev=$2 -tableNo=$((100+${dev:3})) -tableName="Table_$dev" -X -if [ $action == 'add' ] -then -X plug_nic -else -X unplug_nic -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cloud-nic.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cloud-nic.sh': 'MD5 check failed' - ) << \SHAR_EOF -6afed00cefb1dc06b8b4969c2c26933e cloud_scripts/opt/cloud/bin/cloud-nic.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cloud-nic.sh'` -ne 2632 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cloud-nic.sh' is not 2632" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/ipsectunnel.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ipsectunnel.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/ipsectunnel.sh (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/ipsectunnel.sh -M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N#4R-2(*=G!N:6YM87)K/2(P>#4R-"(*"G5S86=E*"D@ -M>PH@("`@<')I;G1F(")5PH@('-U9&\@:7!T86)L -M97,MPH@(&1I2!<"B`@("!P -M:&%S93(@<&]L:6-Y/21ER1R:6=H=&YE='-] -M(B`^/B`D=G!N8V]N9F9I;&4@)B8*("!S=61O(&5C:&\@(B`@='EP93UT=6YN -M96PB(#X^("1V<&YC;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!A=71H8GD] -MVEK96QI9F5T:6UE?7,B(#X^("1V<&YC -M;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!E2(@/CX@ -M)'9P;F-O;F9F:6QE("8F"B`@2!F -M;W(@'1H;W`](B1/4%1!4D&ET("1R970* -` -end -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/ipsectunnel.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh': 'MD5 check failed' - ) << \SHAR_EOF -097a970ec94a68d965ffd7f446e3862d cloud_scripts/opt/cloud/bin/ipsectunnel.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh'` -ne 8769 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ipsectunnel.sh' is not 8769" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/ipassoc.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/ipassoc.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/ipassoc.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/ipassoc.sh (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/ipassoc.sh -M(R$O=7-R+V)I;B]E;G8@8F%S:`HC($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N"`D("1(96%D55),.B!S=FXZ+R]S=FXN;&%B+G9M;W!S+F-O;2]R97!O2!E>&ES=',B"GT* -M"F1E;%]F=U]C:&%I;E]F;W)?:7`@*"D@>PH@(&QO8V%L('!U8DEP/20H96-H -M;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?2W!R:6YT("0R?2W!R:6YT("0R?2W!R:6YT("0Q?2PH@(&QO -M8V%L(&1E=CTB)#$B"B`@;&]C86P@:7`](B0R(@H@('-U9&\@:7`@861DW!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP/20Q -M"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0Q?22!F;W(@:7`@)'!U8DEP(&]N(&EN=&5R9F%C92`D971H1&5V(@H@("`@ -M(')E='5R;B`Q"B`@9FD*"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0R?2<@('P@9W)E<"`M=R`D -M:7!.;TUAW!R -M:6YT("0R?2#TD*'!R:6YT9B`B)7A<;B(@)&YU;2D*("`@("`@("`@ -M(&5C:&\@)&AE>#L*("`@("`@("`@("-E;F%B;&4@`IS -M9FQA9STP"FQF;&%G/0IF9FQA9ST*8V9L86<]"FYF;&%G/0IO<#TB(@H*:7-? -M;6%S=&5R/3`*:7-?&ET(#(@)&QO8VL@)&QO8VME9`H)"3L["B`@ -M97-A8PID;VYE"@H*:68@6R`B)$%F;&%G)$1F;&%G(B`A/2`B,2(@70IT:&5N -M"B`@("!U&ET("0_("1L;V-K -M("1L;V-K960*9FD*"FEF(%L@(B1F9FQA9R(@/3T@(C$B(%T@)B8@6R`B)$1F -M;&%G(B`]/2`B,2(@70IT:&5N"B`@&ET("0_ -M("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1$9FQA9R(@/3T@(C$B(%T*=&AE -M;@H@(')E;6]V95]A;E]I<"`@)'!U8FQI8TEP("8F"B`@9&5L7V9W7V-H86EN -M7V9O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/ipassoc.sh': 'MD5 check failed' - ) << \SHAR_EOF -ad068a0cc84ded8f79c63ce3aced4586 cloud_scripts/opt/cloud/bin/ipassoc.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/ipassoc.sh'` -ne 13401 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/ipassoc.sh' is not 13401" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/line_edit.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/line_edit.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/line_edit.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/line_edit.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/line_edit.py' && -#!/usr/bin/python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import logging -import re -import shutil -import os -X -X -class LineEdit(object): -X """Helper for LineEditingFile that keeps track of one edit.""" -X def __init__(self, search, sub, *sub_args, **kwargs): -X if len(sub_args) > 0: -X sub = sub % sub_args -X flags = kwargs.get('flags', 0) -X self.pattern = re.compile(search, flags=flags) -X self.sub = sub -X self.count = kwargs.get('count', 0) # max subs to make -X self.subs = 0 # subs made so far -X -X -class LineEditingFile(object): -X """ -X Atomic, conservative, by-line editing of configuration files. -X -X Will not touch the file if there are no changes to do. -X Reasonably efficient for large files, though files with a long time -X before their first match will use memory. -X -X -X Given a vhosts file such as: -X >>> with open('doctest-vhosts.conf', 'w') as f: -X ... f.write(''' -X ... Listen foo:80 -X ... -X ... DocRoot /var/www -X ... -X ... -X ... Listen other:80 -X ... -X ... DocRoot /var/www -X ... -X ... ''') -X ... -X -X To replace the hostname for the first virtualhost entry: -X >>> new_hostname = 'fooooo' -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... f.replace(r'', '', new_hostname, count=1, flags=re.I) -X ... f.replace(r'Listen .*?:80', 'Listen %s:80', new_hostname, count=1, flags=re.I) -X ... -X -X Be careful with the matches! -X A second invocation of the same rule will edit the second vhost: -X >>> new_hostname = 'fooooo' -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... f.replace(r'', '', new_hostname, count=1, flags=re.I) -X ... -X -X To move all hosts from port 80 to port 8080: -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... f.replace(r'', '', flags=re.I) -X ... f.replace(r'Listen (.*?):80', 'Listen \\\\1:80', flags=re.I) -X ... -X -X (please note in this example there's a double escape of the backreference -X \\\\1, to make the example work with doctest) -X -X Since this example already matched all files, a second invocation does nothing: -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... f.replace(r'', '', flags=re.I) -X ... -X -X It's also acceptable to not make any edits at all: -X >>> with LineEditingFile('doctest-vhosts.conf') as f: -X ... pass -X ... -X -X You don't _have_ to use a with statement: -X >>> f = LineEditingFile('doctest-vhosts.conf') -X >>> f.replace(r'DocRoot /var/www', 'DocRoot /var/www/html', flags=re.I) -X >>> changes = f.commit() -X >>> print changes -X 2 -X >>> -X -X Cleanup of the example vhosts.conf: -X >>> # noinspection PyBroadException -X >>> try: -X ... os.unlink('doctest-vhosts.conf') -X ... os.unlink('doctest-vhosts.conf.bak') -X ... os.unlink('doctest-vhosts.conf.new') -X ... except: -X ... pass -X ... -X """ -X -X def __init__(self, filename): -X self.filename = filename -X self.changed = False -X self.edits = [] -X -X def __enter__(self): -X return self -X -X def replace(self, search, sub, *sub_args, **kwargs): -X edit = LineEdit(search, sub, *sub_args, **kwargs) -X self.edits.append(edit) -X -X # noinspection PyUnusedLocal -X def __exit__(self, exc, value, traceback): -X if exc is not None: -X return False # return false results in re-raise -X -X self.commit() -X -X def commit(self): -X changes = 0 -X changed_file = None -X changed_filename = self.filename + '.new' -X try: -X lines = [] -X backup_filename = self.filename + '.bak' -X # noinspection PyUnusedLocal -X stat = None -X with open(self.filename, 'r') as orig: -X stat = os.fstat(orig.fileno()) -X for line in orig: -X changed_line = line -X for edit in self.edits: -X remaining_count = 0 -X if edit.count != 0: -X remaining_count = edit.count - edit.subs -X if remaining_count < 0: -X raise Exception("Made too many edits") -X elif remaining_count == 0: -X continue -X changed_line, subs = edit.pattern.subn( -X edit.sub, line, remaining_count) -X if changed_line != line: -X if changed_file is None: -X logging.debug("Editing file %s" % self.filename) -X logging.debug(" - %s" % line[:-1]) -X logging.debug(" + %s" % changed_line[:-1]) -X changes += subs -X edit.subs += subs -X if changes == 0: # buffer until we find a change -X lines.append(changed_line) -X elif changed_file is None: # found first change, flush buffer -X changed_file = open(changed_filename, 'w') -X if hasattr(os, 'fchmod'): -X os.fchmod(changed_file.fileno(), # can cause OSError which aborts -X stat.st_mode) -X if hasattr(os, 'fchown'): -X os.fchown(changed_file.fileno(), # can cause OSError which aborts -X stat.st_uid, stat.st_gid) -X changed_file.writelines(lines) -X changed_file.write(changed_line) -X del lines # reclaim buffer memory -X else: # already flushed, just write -X changed_file.write(changed_line) -X -X if changes == 0: -X logging.info("No edits need for file %s" % -X self.filename) -X else: -X changed_file.close() -X changed_file = None -X if os.path.exists(backup_filename): # back up the original -X os.unlink(backup_filename) -X shutil.copy(self.filename, backup_filename) -X os.rename(changed_filename, self.filename) # the swap -X logging.info("Edited file %s (%d changes)" % -X (self.filename, changes)) -X finally: -X if changed_file is not None: # failed, clean up -X changed_file.close() -X os.unlink(changed_filename) -X return changes -X -X -if __name__ == "__main__": -X logging.basicConfig(level=logging.DEBUG) -X import doctest -X doctest.testmod() -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/line_edit.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/line_edit.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/line_edit.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/line_edit.py': 'MD5 check failed' - ) << \SHAR_EOF -4d05b8a011ff9c6132a3ca4ff477a161 cloud_scripts/opt/cloud/bin/line_edit.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/line_edit.py'` -ne 7961 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/line_edit.py' is not 7961" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/get_template_version.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/get_template_version.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/get_template_version.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/get_template_version.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/get_template_version.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# As the last command send to router before any rules operation, wait until boot up done -X -__TIMEOUT=240 -__FLAGFILE=/var/cache/cloud/boot_up_done -done=0 -for i in `seq 1 $(($__TIMEOUT * 10))` -do -X if [ -e $__FLAGFILE ] -X then -X done=1 -X break -X fi -X sleep 0.1 -X if [ $((i % 10)) -eq 0 ] -X then -X logger -t cloud "Waiting for VM boot up done for one second" -X fi -done -X -if [ -z $done ] -then -X # declare we failed booting process -X echo "Waited 60 seconds but boot up haven't been completed" -X exit -fi -X -release=`cat /etc/cloudstack-release` -sig=`cat /var/cache/cloud/cloud-scripts-signature` -echo "${release}&${sig}" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/get_template_version.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/get_template_version.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/get_template_version.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/get_template_version.sh': 'MD5 check failed' - ) << \SHAR_EOF -2234ad00c02a6be63cb0f4f876b8960b cloud_scripts/opt/cloud/bin/get_template_version.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/get_template_version.sh'` -ne 1449 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/get_template_version.sh' is not 1449" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/update_config.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/update_config.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/update_config.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/update_config.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/update_config.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,N87)G=BD*:68@87)G8R`A/2`R(&%N9"!A7,N97AI="@Q*0H*(R!&25A- -M12!W92!S:&]U;&0@9V5T('1H:7,@;&]C871I;VX@9G)O;2!A(&-O;F9I9W5R -M871I;VX@8VQA7,N97AI="AR971U -M2!S<&5E9&EN9R!U<"!L;V%D:6YG('1I;65S -M"B`@("!I9B!N;W0@*&]S+F5N=FER;VXN9V5T*"=$149%4E]#3TY&242YJ7,N87)G=ELQ -M72!O2`]($YO -M;F4*"B`@("!F;W(@:S$L('8Q(&EN(&=U97-T;F5T7V1I8W0N:71E7,N87!P96YD*&LQ*0H*("`@(&EF(&YO -M="!E>&ES=&EN9U]K97ES.@H@("`@("`@("2`Z -M.B!296-O;F9I9W5R:6YG(&=U97-T(&YE='=O&ES=&EN9U]K97ES.@H@("`@("`@("2!I;B!E>&ES=&EN9U]K97ES.@H@("`@("`@(&9O&ES=',@/2!4&ES=',Z"B`@("`@("`@("`@(&)R96%K -M"@H@("`@B(I*3H* -M("`@("`@("!S>7,N97AI="@P*0H@("`@;&]G9VEN9RYE2`Z.B!5;F%B;&4@=&\@7,N97AI="@Q -M*0H*(R!)9B!T:&4@9W5E2`Z.B!.;R!N965D('1O('!R;V-E/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/update_config.py': 'MD5 check failed' - ) << \SHAR_EOF -a2062b2b010940ea783d8256b807c488 cloud_scripts/opt/cloud/bin/update_config.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/update_config.py'` -ne 5136 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/update_config.py' is not 5136" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/edithosts.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/edithosts.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/edithosts.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/edithosts.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/edithosts.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -X -# edithosts.sh -- edit the dhcphosts file on the routing domain -X -usage() { -X printf "Usage: %s: -m -4 -6 -h -d -n -s -u [-N]\n" $(basename $0) >&2 -} -X -mac= -ipv4= -ipv6= -host= -dflt= -dns= -routes= -duid= -nondefault= -X -while getopts 'm:4:h:d:n:s:6:u:N' OPTION -do -X case $OPTION in -X m) mac="$OPTARG" -X ;; -X 4) ipv4="$OPTARG" -X ;; -X 6) ipv6="$OPTARG" -X ;; -X u) duid="$OPTARG" -X ;; -X h) host="$OPTARG" -X ;; -X d) dflt="$OPTARG" -X ;; -X n) dns="$OPTARG" -X ;; -X s) routes="$OPTARG" -X ;; -X N) nondefault=1 -X ;; -X ?) usage -X exit 2 -X ;; -X esac -done -X -DHCP_HOSTS=/etc/dhcphosts.txt -DHCP_OPTS=/etc/dhcpopts.txt -DHCP_LEASES=/var/lib/misc/dnsmasq.leases -HOSTS=/etc/hosts -X -source /root/func.sh -X -lock="biglock" -#default timeout value is 30 mins as DhcpEntryCommand is not synchronized on agent side any more, -#and multiple commands can be sent to the same VR at a time -locked=$(getLockFile $lock 1800) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -grep "redundant_router=1" /var/cache/cloud/cmdline > /dev/null -no_redundant=$? -X -dnsmasq_managed_lease=`cat /var/cache/cloud/dnsmasq_managed_lease` -X -wait_for_dnsmasq () { -X local _pid=$(pidof dnsmasq) -X for i in 0 1 2 3 4 5 6 7 8 9 10 -X do -X sleep 1 -X _pid=$(pidof dnsmasq) -X [ "$_pid" != "" ] && break; -X done -X [ "$_pid" != "" ] && return 0; -X logger -t cloud "edithosts: timed out waiting for dnsmasq to start" -X return 1 -} -X -if [ $dnsmasq_managed_lease ] -then -X #release previous dhcp lease if present -X logger -t cloud "edithosts: releasing $ipv4" -X dhcp_release $(ip route get "$ipv4/32" | grep " dev " | sed -e "s/^.* dev \([^ ]*\) .*$/\1/g") $ipv4 $(grep "$ipv4 " $DHCP_LEASES | awk '{print $2}') > /dev/null 2>&1 -X logger -t cloud "edithosts: released $ipv4" -fi -X -logger -t cloud "edithosts: update $mac $ipv4 $ipv6 $host to hosts" -X -[ ! -f $DHCP_HOSTS ] && touch $DHCP_HOSTS -[ ! -f $DHCP_OPTS ] && touch $DHCP_OPTS -[ ! -f $DHCP_LEASES ] && touch $DHCP_LEASES -X -#delete any previous entries from the dhcp hosts file -sed -i /$mac/d $DHCP_HOSTS -if [ $ipv4 ] -then -X sed -i /$ipv4,/d $DHCP_HOSTS -fi -if [ $ipv6 ] -then -X #searching with [$ipv6], matching other ip so using $ipv6], -X sed -i /$ipv6],/d $DHCP_HOSTS -fi -# don't want to do this in the future, we can have same VM with multiple nics/entries -sed -i /$host,/d $DHCP_HOSTS -X -#put in the new entry -if [ $ipv4 ] -then -X echo "$mac,$ipv4,$host,infinite" >>$DHCP_HOSTS -fi -if [ $ipv6 ] -then -X if [ $nondefault ] -X then -X echo "id:$duid,set:nondefault6,[$ipv6],$host,infinite" >>$DHCP_HOSTS -X else -X echo "id:$duid,[$ipv6],$host,infinite" >>$DHCP_HOSTS -X fi -fi -X -if [ $dnsmasq_managed_lease -eq 0 ] -then -X #delete leases to supplied mac and ip addresses -X if [ $ipv4 ] -X then -X sed -i /$mac/d $DHCP_LEASES -X sed -i /"$ipv4 "/d $DHCP_LEASES -X fi -X if [ $ipv6 ] -X then -X sed -i /$duid/d $DHCP_LEASES -X sed -i /"$ipv6 "/d $DHCP_LEASES -X fi -X sed -i /"$host "/d $DHCP_LEASES -X -X #put in the new entry -X if [ $ipv4 ] -X then -X echo "0 $mac $ipv4 $host *" >> $DHCP_LEASES -X fi -X if [ $ipv6 ] -X then -X echo "0 $duid $ipv6 $host *" >> $DHCP_LEASES -X fi -fi -X -#edit hosts file as well -if [ $ipv4 ] -then -X sed -i /"$ipv4 "/d $HOSTS -fi -if [ $ipv6 ] -then -X sed -i /"$ipv6 "/d $HOSTS -fi -sed -i /" $host$"/d $HOSTS -if [ $ipv4 ] -then -X echo "$ipv4 $host" >> $HOSTS -fi -if [ $ipv6 ] -then -X echo "$ipv6 $host" >> $HOSTS -fi -X -if [ "$dflt" != "" -a "$ipv4" != "" ] -then -X #make sure dnsmasq looks into options file -X sed -i /dhcp-optsfile/d /etc/dnsmasq.conf -X echo "dhcp-optsfile=$DHCP_OPTS" >> /etc/dnsmasq.conf -X -X tag=$(echo $ipv4 | tr '.' '_') -X sed -i /$tag,/d $DHCP_OPTS -X if [ "$dflt" == "0.0.0.0" ] -X then -X logger -t cloud "$0: unset default router for $ipv4" -X logger -t cloud "$0: unset dns server for $ipv4" -X echo "$tag,3" >> $DHCP_OPTS -X echo "$tag,6" >> $DHCP_OPTS -X echo "$tag,15" >> $DHCP_OPTS -X fi -X [ "$routes" != "" ] && echo "$tag,121,$routes" >> $DHCP_OPTS -X #delete entry we just put in because we need a tag -X sed -i /$ipv4,/d $DHCP_HOSTS -X #put it back with a tag -X echo "$mac,set:$tag,$ipv4,$host,infinite" >>$DHCP_HOSTS -fi -X -# make dnsmasq re-read files -pid=$(pidof dnsmasq) -if [ "$pid" != "" ] -then -X # use SIGHUP to avoid service outage if dhcp_release is available. -X if [ $dnsmasq_managed_lease ] -X then -X kill -HUP $pid -X else -X systemctl restart dnsmasq -X fi -else -X if [ $no_redundant -eq 1 ] -X then -X wait_for_dnsmasq -X else -X logger -t cloud "edithosts: skip wait dnsmasq due to redundant virtual router" -X fi -fi -X -ret=$? -unlock_exit $ret $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/edithosts.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/edithosts.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/edithosts.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/edithosts.sh': 'MD5 check failed' - ) << \SHAR_EOF -68e47d6a7efaacefbbaebf8b4e7408c3 cloud_scripts/opt/cloud/bin/edithosts.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/edithosts.sh'` -ne 5502 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/edithosts.sh' is not 5502" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/diagnostics.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/diagnostics.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/diagnostics.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/diagnostics.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/diagnostics.py' && -#!/usr/bin/env python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import shlex -import subprocess -import sys -X -X -def run_cmd(command): -X if command is not None: -X try: -X p = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE) -X stdout, stderr = p.communicate() -X return_code = p.returncode -X -X except OSError as e: -X stdout = "Check your command type" -X stderr = "Exception occurred: %s" % e -X return_code = 1 -X -X finally: -X print('%s&&' % stdout.strip()) -X print('%s&&' % stderr.strip()) -X print('%s' % return_code) -X -X -def get_command(): -X arguments = sys.argv -X cmd = " ".join(arguments[1:]) -X cmd_type = sys.argv[1] -X -X if cmd_type == 'ping': -X if '-c' in arguments: -X return cmd -X else: -X return cmd + " -c 4" -X -X elif cmd_type == 'traceroute': -X if '-m' in arguments: -X return cmd -X else: -X return cmd + " -m 20" -X -X elif cmd_type == 'arping': -X if '-c' in arguments: -X return cmd -X else: -X return cmd + " -c 4" -X -X else: -X return None -X -X -if __name__ == "__main__": -X command = get_command() -X run_cmd(command) -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/diagnostics.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/diagnostics.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/diagnostics.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/diagnostics.py': 'MD5 check failed' - ) << \SHAR_EOF -91a837e5bcafee663cbfb8532574405a cloud_scripts/opt/cloud/bin/diagnostics.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/diagnostics.py'` -ne 2012 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/diagnostics.py' is not 2012" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_monitorservice.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_monitorservice.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_monitorservice.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_monitorservice.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py': 'MD5 check failed' - ) << \SHAR_EOF -1121a063f2dbcfc1bdc426ceba249184 cloud_scripts/opt/cloud/bin/cs_monitorservice.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py'` -ne 1541 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_monitorservice.py' is not 1541" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/vpn_l2tp.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/vpn_l2tp.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/vpn_l2tp.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -X -X -#set -x -usage() { -X printf "Usage:\n" -X printf "Create VPN : %s -c -r -l -p -s -i \n" $(basename $0) -X printf "Delete VPN : %s -d -l -s -D -C < local cidr> \n" $(basename $0) -X printf "Add VPN User : %s -u \n" $(basename $0) -X printf "Remote VPN User: %s -U /dev/null -X then -X is_vpc=true -X fi -X -X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 500 -j ACCEPT -X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 4500 -j ACCEPT -X sudo iptables $op INPUT -i $dev --dst $public_ip -p udp -m udp --dport 1701 -j ACCEPT -X sudo iptables $op INPUT -i $dev -p ah -j ACCEPT -X sudo iptables $op INPUT -i $dev -p esp -j ACCEPT -X if $is_vpc -X then -X # Need to apply the following ACL rules as well. -X if sudo iptables -N VPN_FORWARD &> /dev/null -X then -X sudo iptables -I FORWARD -i ppp+ -j VPN_FORWARD -X sudo iptables -I FORWARD -o ppp+ -j VPN_FORWARD -X sudo iptables -A VPN_FORWARD -j DROP -X fi -X sudo iptables $op VPN_FORWARD -i ppp+ -o ppp+ -j RETURN -X sudo iptables $op VPN_FORWARD -i ppp+ -d $cidr -j RETURN -X sudo iptables $op VPN_FORWARD -s $cidr -o ppp+ -j RETURN -X else -X sudo iptables $op FORWARD -i ppp+ -d $cidr -j ACCEPT -X sudo iptables $op FORWARD -s $cidr -o ppp+ -j ACCEPT -X sudo iptables $op FORWARD -i ppp+ -o ppp+ -j ACCEPT -X fi -X sudo iptables $op INPUT -i ppp+ -m udp -p udp --dport 53 -j ACCEPT -X sudo iptables $op INPUT -i ppp+ -m tcp -p tcp --dport 53 -j ACCEPT -X sudo iptables -t nat $op PREROUTING -i ppp+ -p tcp -m tcp --dport 53 -j DNAT --to-destination $local_ip -X sudo iptables -t nat $op PREROUTING -i ppp+ -p udp -m udp --dport 53 -j DNAT --to-destination $local_ip -X -X if $is_vpc -X then -X return -X fi -X -X if sudo iptables -t mangle -N VPN_$public_ip &> /dev/null -X then -X logger -t cloud "$(basename $0): created VPN chain in PREROUTING mangle" -X sudo iptables -t mangle -I PREROUTING -d $public_ip -j VPN_$public_ip -X sudo iptables -t mangle -A VPN_$public_ip -j RETURN -X fi -X op2="-D" -X [ "$op" == "-A" ] && op2="-I" -X sudo iptables -t mangle $op VPN_$public_ip -p ah -j ACCEPT -X sudo iptables -t mangle $op VPN_$public_ip -p esp -j ACCEPT -} -X -start_ipsec() { -X systemctl is-active ipsec > /dev/null -X if [ $? -ne 0 ] -X then -X systemctl start ipsec > /dev/null -X #Wait until ipsec started, 5 seconds at most -X for i in {1..5} -X do -X logger -t cloud "$(basename $0): waiting ipsec start..." -X systemctl is-active ipsec > /dev/null -X result=$? -X if [ $result -eq 0 ] -X then -X break -X fi -X sleep 1 -X done -X fi -X systemctl is-active ipsec > /dev/null -X return $? -} -X -ipsec_server() { -X local op=$1 -X case $op in -X "start") start_ipsec -X sudo systemctl start xl2tpd -X ;; -X "stop") sudo systemctl stop xl2tpd -X ;; -X "restart") start_ipsec -X sudo ipsec auto --rereadall -X systemctl stop xl2tpd -X systemctl start xl2tpd -X ;; -X esac -} -X -create_l2tp_ipsec_vpn_server() { -X local ipsec_psk=$1 -X local public_ip=$2 -X local client_range=$3 -X local local_ip=$4 -X -X sed -i -e "s/left=.*$/left=$public_ip/" /etc/ipsec.d/l2tp.conf -X echo "$public_ip %any : PSK \"$ipsec_psk\"" > /etc/ipsec.d/ipsec.any.secrets -X sed -i -e "s/^ip range = .*$/ip range = $client_range/" /etc/xl2tpd/xl2tpd.conf -X sed -i -e "s/^local ip = .*$/local ip = $local_ip/" /etc/xl2tpd/xl2tpd.conf -X -X sed -i -e "s/^ms-dns.*$/ms-dns $local_ip/" /etc/ppp/options.xl2tpd -X -X iptables_ "-D" $public_ip -X iptables_ "-I" $public_ip -X -X ipsec_server "restart" -X -X ipsec auto --rereadsecrets -X ipsec auto --replace L2TP-PSK -} -X -destroy_l2tp_ipsec_vpn_server() { -X local public_ip=$1 -X -X ipsec auto --down L2TP-PSK -X -X iptables_ "-D" $public_ip -X -X ipsec_server "stop" -} -X -remove_l2tp_ipsec_user() { -X local u=$1 -X sed -i -e "/^$u .*$/d" /etc/ppp/chap-secrets -X if [ -x /usr/bin/tdbdump ]; then -X pid=$(tdbdump /var/run/pppd2.tdb | grep -w $u | awk -F';' '{print $4}' | awk -F= '{print $2}') -X [ "$pid" != "" ] && kill -9 $pid -X fi -X return 0 -} -X -add_l2tp_ipsec_user() { -X local u=$1 -X local passwd=$2 -X -X uptodate=$(grep "^$u \* \"$passwd\" \*$" /etc/ppp/chap-secrets) -X if [ "$uptodate" == "" ] -X then -X remove_l2tp_ipsec_user $u -X echo "$u * \"$passwd\" *" >> /etc/ppp/chap-secrets -X fi -} -X -rflag= -pflag= -lflag= -sflag= -create= -destroy= -useradd= -userdel= -dev= -cidr= -X -while getopts 'cdl:p:r:s:u:U:i:C:' OPTION -do -X case $OPTION in -X c) create=1 -X ;; -X d) destroy=1 -X ;; -X u) useradd=1 -X user_pwd="$OPTARG" -X ;; -X U) userdel=1 -X user="$OPTARG" -X ;; -X r) rflag=1 -X client_range="$OPTARG" -X ;; -X p) pflag=1 -X ipsec_psk="$OPTARG" -X ;; -X l) lflag=1 -X local_ip="$OPTARG" -X ;; -X s) sflag=1 -X server_ip="$OPTARG" -X ;; -X i) dev="$OPTARG" -X ;; -X C) cidr="$OPTARG" -X ;; -X ?) usage -X exit 2 -X ;; -X esac -done -X -if [ "$dev" == "" ] -then -X dev="eth2" -fi -X -if [ "$cidr" == "" ] -then -X cidr=$(get_intf_ip "eth0") -fi -X -[ "$create$destroy" == "11" ] || [ "$create$destroy$useradd$userdel" == "" ] && usage && exit 2 -[ "$create" == "1" ] && [ "$lflag$pflag$rflag$sflag" != "1111" ] && usage && exit 2 -X -if [ "$create" == "1" ]; then -X create_l2tp_ipsec_vpn_server $ipsec_psk $server_ip $client_range $local_ip -X exit $? -fi -X -if [ "$destroy" == "1" ]; then -X destroy_l2tp_ipsec_vpn_server $server_ip -X exit $? -fi -X -if [ "$useradd" == "1" ]; then -X u=$(echo $user_pwd | awk -F',' '{print $1}') -X pwd=$(echo $user_pwd | awk -F',' '{print $2}') -X add_l2tp_ipsec_user $u $pwd -X exit $? -fi -if [ "$userdel" == "1" ]; then -X remove_l2tp_ipsec_user $user -X exit $? -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/vpn_l2tp.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh': 'MD5 check failed' - ) << \SHAR_EOF -79e41044b43cc49c6b11859534bc454d cloud_scripts/opt/cloud/bin/vpn_l2tp.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh'` -ne 6986 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/vpn_l2tp.sh' is not 6986" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_guestnetwork.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_guestnetwork.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_guestnetwork.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -keys = ['eth1', 'eth2', 'eth3', 'eth4', 'eth5', 'eth6', 'eth7', 'eth8', 'eth9'] -X -X -def merge(dbag, gn): -X device = gn['device'] -X -X if not gn['add'] and device in dbag: -X -X if dbag[device]: -X device_to_die = dbag[device][0] -X try: -X dbag[device].remove(device_to_die) -X except ValueError, e: -X print "[WARN] cs_guestnetwork.py :: Error occurred removing item from databag. => %s" % device_to_die -X del(dbag[device]) -X else: -X del(dbag[device]) -X -X else: -X dbag.setdefault(device, []).append(gn) -X -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_guestnetwork.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py': 'MD5 check failed' - ) << \SHAR_EOF -599105da1bdfaced1f2c8078d3fbed19 cloud_scripts/opt/cloud/bin/cs_guestnetwork.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py'` -ne 1401 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_guestnetwork.py' is not 1401" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_vmdata.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_vmdata.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_vmdata.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, metadata): -X dbag[metadata["vm_ip_address"]] = metadata["vm_metadata"] -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_vmdata.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_vmdata.py': 'MD5 check failed' - ) << \SHAR_EOF -3ee2451cb48927d361f05bb5fe3df4ce cloud_scripts/opt/cloud/bin/cs_vmdata.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_vmdata.py'` -ne 892 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_vmdata.py' is not 892" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/dnsmasq.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/dnsmasq.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/dnsmasq.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -usage() { -X printf "Usage: %s: \n" $(basename $0) >&2 -} -X -source /root/func.sh -X -lock="biglock" -locked=$(getLockFile $lock) -if [ "$locked" != "1" ] -then -X exit 1 -fi -X -#set -x -#backup the old config file -DHCP_CONFIG=/etc/dnsmasq.d/multiple_ranges.conf -DHCP_CONFIG_BAK=/etc/dnsmasq.d/multiple_ranges.conf.bak -DHCP_CONFIG_MAIN=/etc/dnsmasq.conf -DHCP_CONFIG_MAIN_BAK=/etc/dnsmasq.conf.bak -DHCP_FAILURE_CONFIG=/etc/multiple_ranges.conf.failure -DHCP_FAILURE_CONFIG_MAIN=/etc/dnsmasq.conf.failure -CMDLINE=$(cat /var/cache/cloud/cmdline | tr '\n' ' ') -X -#take a backup copy of the dnsmasq file. -cp "$DHCP_CONFIG_MAIN" "$DHCP_CONFIG_MAIN_BAK" -cp "$DHCP_CONFIG" "$DHCP_CONFIG_BAK" -X -#empty the config file -echo > $DHCP_CONFIG -X -var="$1" -dhcp_range="" -dhcp_gateway="" -dhcp_netmask="" -dns_option="" -dns_servers="" -count=0 -X -X -# fetching the dns Ips from the command line. -dns1=$(echo "$CMDLINE" | grep -o " dns1=[[:digit:]].* " | sed -e 's/dns1=//' | awk '{print $1}') -dns2=$(echo "$CMDLINE" | grep -o " dns2=[[:digit:]].* " | sed -e 's/dns2=//' | awk '{print $1}') -X -dns_servers="${dns1}" -if [ -n "$dns2" ] -then -dns_servers="${dns1},${dns2}" -fi -X -X -# check if useextdns is true -use_ext_dns=$(echo "$CMDLINE" | grep -o "useextdns=true") -while [ -n "$var" ] -do -X var1=$(echo $var | cut -f1 -d "-") -X routerip=$( echo $var1 | cut -f1 -d ":" ) -X gateway=$(echo $var1 | cut -f2 -d ":") -X netmask=$(echo $var1 | cut -f3 -d ":") -X start_ip_of_subnet=$(echo $var1 | cut -f4 -d ":") -X dhcp_range="${dhcp_range}"'dhcp-range=set:range'$count","$start_ip_of_subnet",static \n" -X dhcp_gateway="${dhcp_gateway}"'dhcp-option=tag:range'$count",3,"$gateway" \n" -X dhcp_netmask="${dhcp_netmask}"'dhcp-option=tag:range'$count",1,"$netmask" \n" -X if [ -n "$use_ext_dns" ] -X then -X dns_option="${dns_option}"'dhcp-option=tag:range'$count",6,"$dns_servers" \n" -X else -X dns_option="${dns_option}"'dhcp-option=tag:range'$count",6,$routerip"","$dns_servers" \n" -X fi -X var=$( echo $var | sed "s/${var1}-//" ) -X count=$[$count+1] -done -X -#logging the configuration being removed. -log="" -log="${log}"`grep "^dhcp-option=6" "$DHCP_CONFIG_MAIN"`"\n" -log="${log}"`grep "^dhcp-option=option:router" "$DHCP_CONFIG_MAIN"`"\n" -log="${log}"`grep "^dhcp-range=" "$DHCP_CONFIG_MAIN"`"\n" -X -if [ "$log" != '\n\n\n' ] -then -X #Cleaning the existing dhcp confgiuration -X logger -t cloud "dnsmasq.sh: remvoing the primaryip confg from dnsmasq.conf and adding it to /etc/dnsmaq.d/multiple_ranges.conf" -X logger -t cloud "dnsmasq.sh: config removed from dnsmasq.conf is $log" -X sed -i -e '/dhcp-option=6/d' "$DHCP_CONFIG_MAIN" -X sed -i -e '/dhcp-option=option:router/d' "$DHCP_CONFIG_MAIN" -X sed -i -e '/^dhcp-range=/d' "$DHCP_CONFIG_MAIN" -fi -X -#wrting the new config into the config file. -echo -e "$dhcp_range" >> "$DHCP_CONFIG" -echo -e "$dhcp_gateway" >> "$DHCP_CONFIG" -echo -e "$dhcp_netmask" >> "$DHCP_CONFIG" -echo -e "$dns_option" >> "$DHCP_CONFIG" -X -X -#restart the dnsmasq -systemctl restart dnsmasq -result=$? -if [ "$result" -ne "0" ] -then -X logger -t cloud "dnsmasq.sh: could not configure dnsmasq" -X logger -t cloud "dnsmasq.sh: reverting to the old config" -X logger -t cloud "dnsmasq.sh: copying the failure config to `$DHCP_FAILURE_CONFIG` and `$DHCP_FAILURE_CONFIG_MAIN`" -X cp "$DHCP_CONFIG" "$DHCP_FAILURE_CONFIG" -X cp "$DHCP_CONFIG_MAIN" "$DHCP_FAILURE_CONFIG_MAIN" -X cp "$DHCP_CONFIG_BAK" "$DHCP_CONFIG" -X cp "$DHCP_CONFIG_MAIN_BAK" "$DHCP_CONFIG_MAIN" -X systemctl restart dnsmasq -X unlock_exit $result $lock $locked -fi -rm "$DHCP_CONFIG_BAK" -rm "$DHCP_CONFIG_MAIN_BAK" -unlock_exit $result $lock $locked -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/dnsmasq.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/dnsmasq.sh': 'MD5 check failed' - ) << \SHAR_EOF -d603da3043a61bea911e21fb4da8ded0 cloud_scripts/opt/cloud/bin/dnsmasq.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/dnsmasq.sh'` -ne 4359 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/dnsmasq.sh' is not 4359" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_dhcp.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_dhcp.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_dhcp.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_dhcp.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/opt/cloud/bin/cs_dhcp.py -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2P@96YT2!N;W0@ -M:6X@7,Z"B`@("`@("`@("`@(')E;6]V95]K97ES+F%D9"AK -M97DI"@H@("`@("`@(&9O/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_dhcp.py': 'MD5 check failed' - ) << \SHAR_EOF -9b17e95a8fcb1cf185c9e74cc6ddecca cloud_scripts/opt/cloud/bin/cs_dhcp.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_dhcp.py'` -ne 1533 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_dhcp.py' is not 1533" - fi -fi -# ============= cloud_scripts/opt/cloud/bin/cs_cmdline.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' -then -${echo} "x - SKIPPING cloud_scripts/opt/cloud/bin/cs_cmdline.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/opt/cloud/bin/cs_cmdline.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -def merge(dbag, cmdline): -X if 'redundant_router' in cmdline['cmd_line']: -X cmdline['cmd_line']['redundant_router'] = "true" -X else: -X cmdline['cmd_line']['redundant_router'] = "false" -X dbag['config'] = cmdline['cmd_line'] -X return dbag -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/opt/cloud/bin/cs_cmdline.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/opt/cloud/bin/cs_cmdline.py': 'MD5 check failed' - ) << \SHAR_EOF -a6290582c86832c4c94985580ceda8e5 cloud_scripts/opt/cloud/bin/cs_cmdline.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/opt/cloud/bin/cs_cmdline.py'` -ne 1045 && \ - ${echo} "restoration warning: size of 'cloud_scripts/opt/cloud/bin/cs_cmdline.py' is not 1045" - fi -fi -# ============= cloud_scripts/root/reconfigLB.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/reconfigLB.sh' -then -${echo} "x - SKIPPING cloud_scripts/root/reconfigLB.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/reconfigLB.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/reconfigLB.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -ret=0 -X -new_config=$1 -X -# save previous state -X mv /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy.cfg.old -X -X mv $new_config /etc/haproxy/haproxy.cfg -X if haproxy -p /var/run/haproxy.pid -f /etc/haproxy/haproxy.cfg -sf $(cat /var/run/haproxy.pid); then -X logger -t cloud "New haproxy instance successfully loaded, stopping previous one." -X ret=0 -X else -X logger -t cloud "New instance failed to start, resuming previous one." -X mv /etc/haproxy/haproxy.cfg $new_config -X mv /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg -X haproxy -p /var/run/haproxy.pid -f /etc/haproxy/haproxy.cfg -sf $(cat /var/run/haproxy.pid) -X ret=1 -X fi -X -exit $ret -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/reconfigLB.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/root/reconfigLB.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/reconfigLB.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/reconfigLB.sh': 'MD5 check failed' - ) << \SHAR_EOF -d73e1491560b810ac47d1aaeb2b466ba cloud_scripts/root/reconfigLB.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/reconfigLB.sh'` -ne 1454 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/reconfigLB.sh' is not 1454" - fi -fi -# ============= cloud_scripts/root/monitorServices.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/monitorServices.py' -then -${echo} "x - SKIPPING cloud_scripts/root/monitorServices.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/monitorServices.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/monitorServices.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,L('!A=&@*9G)O;2!H96%L=&A?8VAE -M8VMS+G5T:6QI='D@:6UP;W)T(&=E=$AE86QT:$-H96-KWT* -M("`@('!A2`K)UTG*R(@(B`K -M("=;)RMP2LG72<@*R`B("(@*R!M -M2!O;F4@<&ED(&]R -M(&YO=`H@("`@:68@97AI=%-T871U6EN9R!F97<@;6]R92!T:6UEPH@("`@("`@("`@("`@("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EWT@(U-K:7`@WT*("`@(&9A:6QI;F=#:&5C:W,@/2!;70H@ -M("`@:68@8VAE8VM4>7!E(#T](")B87-I8R(Z"B`@("`@("`@;6]N:71297-U -M;'0L(&9A:6QI;F=#:&5C:W,@/2!M;VYI=%!R;V-E&-L=61E(#T@ -M:&-?9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K&-L=61E -M9%]H96%L=&A?8VAE8VMS(B!I;B!H8U]D871A(&5L7!E*0H@("`@("`@("`@("`@("`@:68@;&5N*')E="D@/3T@,#H*("`@("`@ -M("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@("`@("`@:68@(G-U -M8V-E7,N87)G=BD@/3T@,CH*("`@("`@("!I9B!S>7,N87)G=ELQ72`]/2`B -M861V86YC960B.@H@("`@("`@("`@("!M86EN*")A9'9A;F-E9"(I"B`@("`@ -M("`@96QI9B!S>7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@("`@("!M -M86EN*")B87-I8R(I"B`@("`@("`@96QS93H*("`@("`@("`@("`@<')I;G1D -M*")%7!E(&]F('1E7,N87)G=BD* -M("`@(&5L/dev/null 2>&1 || ${echo} 'cloud_scripts/root/monitorServices.py': 'MD5 check failed' - ) << \SHAR_EOF -d46009a10f68b7f2c57e43e215cba41c cloud_scripts/root/monitorServices.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/monitorServices.py'` -ne 12747 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/monitorServices.py' is not 12747" - fi -fi -# ============= cloud_scripts/root/health_checks/iptables_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/iptables_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/iptables_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/iptables_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/iptables_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W'!E8W1E9"`](%M="B`@("`@("`@9&5S=$EP(#T@<&]R=$9O'0L('-R8U!O2!I;B!I<%1A8FQE4QI'!E8W1E9#H*("`@("`@("`@("`@("`@("`@ -M("!I9B!I<%1A8FQE16YT'!E8W1E9$5N=')Y*2`]/2`M,3H* -M("`@("`@("`@("`@("`@("`@("`@("`@9F]U;F1!;&P@/2!&86QS90H@("`@ -M("`@("`@("`@("`@("`@("`@("!B4QI -M/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/iptables_check.py': 'MD5 check failed' - ) << \SHAR_EOF -36d30e9b9ff7842db6472b1f063bb076 cloud_scripts/root/health_checks/iptables_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/iptables_check.py'` -ne 3349 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/iptables_check.py' is not 3349" - fi -fi -# ============= cloud_scripts/root/health_checks/memory_usage_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/memory_usage_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/memory_usage_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/memory_usage_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/memory_usage_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W$UE;6]R>55S86=E(ETI"B`@("!C;60@/2`B9G)E92!\(&%W:R`G1DY2(#T] -M(#(@>R!P2!5$UE;6]R>55S86=E*2`K("(E(@H@("`@("`@("`@("!E>&ET*#$I"B`@ -M("`@("`@<')I;G0@(DUE;6]R>2!5/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/memory_usage_check.py': 'MD5 check failed' - ) << \SHAR_EOF -1d0f74928584f4e36af8d1d726fac4a4 cloud_scripts/root/health_checks/memory_usage_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/memory_usage_check.py'` -ne 1966 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/memory_usage_check.py' is not 1966" - fi -fi -# ============= cloud_scripts/root/health_checks/haproxy_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/haproxy_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/haproxy_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/haproxy_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/haproxy_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&-O;FXH -M:&%P41A=&$L(&AA0V9G4V5C=&EO;G,I.@H@("`@:68@(FUA>&-O;FXB -M(&EN(&AA<')O>'E$871A(&%N9"`B;6%X8V]N;B(@:6X@:&%#9F=396-T:6]N -M41A=&%;(FUA>&-O;FXB -M72`A/2!H84-F9U-E8W1I;VYS6R)G;&]B86PB75LB;6%X8V]N;B)=6S!=+G-T -M'E$871A -M+"!H84-F9U-E8W1I;VYS*3H*("`@(&-O41A=&$Z"B`@("`@("`@'!E8W1E9"`Z("(@*R!L8E-E8ULB86QG -M;W)I=&AM(ET@*R!<"B`@("`@("`@("`@("`@("`@("`@("`@("`@(B!B=70@ -M9F]U;F0@(B`K(&-F9U-E8W1I;VY;(F)A;&%N8V4B75LP72`K(")<;B(*("`@ -M("`@("`@("`@("`@("`@("!C;W)R96-T(#T@1F%L'!E8W1E9%-E'!E8W1E9%-E"!C;VX@86YD(&5A8V@@;&]A -M9"!B86QA;F-I;F<@41A=&$@/2!G971(96%L=&A#:&5C:W-$ -M871A*")H87!R;WAY1&%T82(I"B`@("!I9B!H87!R;WAY1&%T82!I'DN8V9G -M(BP@)W(G*2!A2]H87!R -M;WAY+F-F9R(*("`@("`@("!E>&ET*#$I"@H@("`@:&%#9F=396-T:6]NWT*("`@("`@("`@("`@8V]N=&EN=64*"B`@("`@("`@ -M:68@8W5R$-O;FX@ -M/2!C:&5C:TUA>&-O;FXH:&%P41A=&%;,%TL(&AA0V9G4V5C=&EO;G,I -M"B`@("!C:&5C:TQB4G5L97,@/2!C:&5C:TQO861"86QA;F-E*&AA<')O>'E$ -M871A+"!H84-F9U-E8W1I;VYS*0H*("`@(&EF(&-H96-K36%X0V]N;B!A;F0@ -M8VAE8VM,8E)U;&5S.@H@("`@("`@('!R:6YT(")!;&P@8VAE8VMS('!A&ET*#$I"@H* -M:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH*("`@(&EF(&QE;BAS>7,N87)G -M=BD@/3T@,B!A;F0@/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/haproxy_check.py': 'MD5 check failed' - ) << \SHAR_EOF -a6a55e4accdf61929c52391235dea744 cloud_scripts/root/health_checks/haproxy_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/haproxy_check.py'` -ne 5274 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/haproxy_check.py' is not 5274" - fi -fi -# ============= cloud_scripts/root/health_checks/router_version_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/router_version_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/router_version_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/router_version_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/router_version_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O -M'!E8W1E9#H@(B`K(%P*("`@("`@ -M("`@("`@("`@("`@97AP96-T960@*R`B+"!F;W5N9#H@(B`K(&9O=6YD"B`@ -M("`@("`@("`@('1E;7!L871E5F5R'!E8W1E -M9"`](&1A=&%;(G-C'!E8W1E9#H@(B`K(%P*("`@("`@ -M("`@("`@("`@("`@97AP96-T960@*R`B+"!F;W5N9#H@(B`K(&9O=6YD"B`@ -M("`@("`@("`@('-C/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/router_version_check.py': 'MD5 check failed' - ) << \SHAR_EOF -408778f28fd8559df294e18256af1f0b cloud_scripts/root/health_checks/router_version_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/router_version_check.py'` -ne 2773 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/router_version_check.py' is not 2773" - fi -fi -# ============= cloud_scripts/root/health_checks/utility/sharedFunctions.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/utility/sharedFunctions.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/utility/sharedFunctions.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import json -X -X -def getHealthChecksData(additionalDataKey=None): -X with open('/root/health_checks_data.json', 'r') as hc_data_file: -X hc_data = json.load(hc_data_file) -X -X # If no specific key is requested return all the data as JSON -X if additionalDataKey is None: -X return hc_data -X -X if additionalDataKey not in hc_data["health_checks_config"]: -X return None -X -X data = hc_data["health_checks_config"][additionalDataKey].strip().split(";") -X addData = [] -X for line in data: -X line = line.strip() -X if len(line) == 0: -X continue -X entries = line.split(',') -X d = {} -X for entry in entries: -X entry = entry.strip() -X if len(entry) == 0: -X continue -X keyVal = entry.split("=") -X if len(keyVal) == 2: -X d[keyVal[0].strip()] = keyVal[1].strip() -X if len(d) > 0: -X addData.append(d) -X -X return addData -X -X -def formatPort(portStart, portEnd, delim="-"): -X return portStart if portStart == portEnd else portStart + delim + portEnd -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/health_checks/utility/sharedFunctions.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/utility/sharedFunctions.py': 'MD5 check failed' - ) << \SHAR_EOF -4fa10a419db9715b34c7037bce5e6fe8 cloud_scripts/root/health_checks/utility/sharedFunctions.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/utility/sharedFunctions.py'` -ne 1865 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' is not 1865" - fi -fi -# ============= cloud_scripts/root/health_checks/utility/__init__.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/utility/__init__.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/utility/__init__.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/utility/__init__.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/utility/__init__.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/utility/__init__.py': 'MD5 check failed' - ) << \SHAR_EOF -ea0b11e040da094dd4f5628b467d5d88 cloud_scripts/root/health_checks/utility/__init__.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/utility/__init__.py'` -ne 864 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/utility/__init__.py' is not 864" - fi -fi -# ============= cloud_scripts/root/health_checks/disk_space_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/disk_space_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/disk_space_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/disk_space_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/disk_space_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O -MWT*("`@(&EF(&5N=')I97,@:7,@;F]T($YO;F4@86YD -M(&QE;BAE;G1R:65S*2`]/2`Q.@H@("`@("`@(&1A=&$@/2!E;G1R:65S6S!= -M"@H@("`@:68@(FUI;D1I/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/disk_space_check.py': 'MD5 check failed' - ) << \SHAR_EOF -9bbb07b130e3946c35263c2e970b59ba cloud_scripts/root/health_checks/disk_space_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/disk_space_check.py'` -ne 1626 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/disk_space_check.py' is not 1626" - fi -fi -# ============= cloud_scripts/root/health_checks/gateways_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/gateways_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/gateways_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/gateways_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/gateways_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,B*0H@("`@:68@9W=S(&ES($YO;F4@86YD(&QE;BAG=W,I(#T](#`Z"B`@ -M("`@("`@<')I;G0@(DYO(&=A=&5W87ES(&1A=&$@879A:6QA8FQE+"!S:VEP -M<&EN9R(*("`@("`@("!E>&ET*#`I"@H@("`@=6YR96%C:&%B;&5'871E5V%Y -M7,N87!P -M96YD*&=W*0H*("`@(&EF(&QE;BAU;G)E86-H86)L94=A=&5787ES*2`]/2`P -M.@H@("`@("`@('!R:6YT(")!;&P@(B`K('-T7,* -M("`@("`@("!E>&ET*#$I"@H*:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH* -M("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A;F0@/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/gateways_check.py': 'MD5 check failed' - ) << \SHAR_EOF -d1715f65dfe24b77c489d24fc1717bc9 cloud_scripts/root/health_checks/gateways_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/gateways_check.py'` -ne 1869 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/gateways_check.py' is not 1869" - fi -fi -# ============= cloud_scripts/root/health_checks/__init__.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/__init__.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/__init__.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/__init__.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/health_checks/__init__.py' && -#!/usr/bin/python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# Needed to expose utility as package outside for monitorServices.py. -# This directory should only contain executables for health checks. -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/__init__.py' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/root/health_checks/__init__.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/health_checks/__init__.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/__init__.py': 'MD5 check failed' - ) << \SHAR_EOF -fb151d74c97d6b3926d6b7a48eea3e56 cloud_scripts/root/health_checks/__init__.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/__init__.py'` -ne 942 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/__init__.py' is not 942" - fi -fi -# ============= cloud_scripts/root/health_checks/dns_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/dns_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/dns_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/dns_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/dns_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I"@H@("`@=VET:"!O<&5N*"/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/dns_check.py': 'MD5 check failed' - ) << \SHAR_EOF -b3192e74a4e52893fdeca4850eb096f4 cloud_scripts/root/health_checks/dns_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/dns_check.py'` -ne 1972 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/dns_check.py' is not 1972" - fi -fi -# ============= cloud_scripts/root/health_checks/cpu_usage_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/cpu_usage_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/cpu_usage_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/cpu_usage_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/cpu_usage_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W$-P=55S86=E(ETI"B`@("!C;60@/2`B=&]P("UB -M("UN,B`M<"`Q('P@9F=R97`@7")#<'4H7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@ -((&UA:6XH*0HR -` -end -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/cpu_usage_check.py' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/root/health_checks/cpu_usage_check.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/health_checks/cpu_usage_check.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/cpu_usage_check.py': 'MD5 check failed' - ) << \SHAR_EOF -faa54497a494f763c8f1a5a4d9b49c4f cloud_scripts/root/health_checks/cpu_usage_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/cpu_usage_check.py'` -ne 2078 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/cpu_usage_check.py' is not 2078" - fi -fi -# ============= cloud_scripts/root/health_checks/dhcp_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/dhcp_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/dhcp_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/dhcp_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/dhcp_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I"@H@("`@=VET:"!O<&5N*"'0G+"`G -M2`]($9A;'-E"B`@("`@("`@9F]R(&AO'0B"B`@("`@("`@97AI="@P*0H*"FEF(%]?;F%M -M95]?(#T](")?7VUA:6Y?7R(Z"B`@("!I9B!L96XH/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/dhcp_check.py': 'MD5 check failed' - ) << \SHAR_EOF -20e7a36b29f4160ae3e5814f042a8242 cloud_scripts/root/health_checks/dhcp_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/dhcp_check.py'` -ne 2386 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/dhcp_check.py' is not 2386" - fi -fi -# ============= cloud_scripts/root/func.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/func.sh' -then -${echo} "x - SKIPPING cloud_scripts/root/func.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/func.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/func.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# Only one lock is allowed: biglock -X -# getLockFile() parameters -# $1 lock filename -# $2 timeout seconds -X -#set -x -X -getCurrLock() { -X result=`ls $__LOCKDIR/*-$1.lock 2>/dev/null | head -n1` -X while [ $? -ne 0 ] -X do -X result=`ls $__LOCKDIR/*-$1.lock 2>/dev/null| head -n1` -X done -X echo $result -} -X -getLockFile() { -X lock=$1 -X -X __locked=0 -X __TS=`date +%s%N` -X __LOCKDIR="/tmp" -X __LOCKFILE="$__LOCKDIR/$__TS-$$-$lock.lock" -X -X if [ $2 ] -X then -X __TIMEOUT=$2 -X else -X __TIMEOUT=30 -X fi -X -X if [ -e $__LOCKFILE ] -X then -X logger -t cloud "Process $0 pid $$ want to get ECLUSIVE LOCK $lock RECURSIVELY!" -X psline=`ps u $$` -X logger -t cloud "Failed job detail: $psline" -X echo 0 -X return -X fi -X -X psline=`ps u $$` -X echo $psline > $__LOCKFILE -X if [ ! -e $__LOCKFILE ] -X then -X return -X fi -X -X for i in `seq 1 $(($__TIMEOUT * 10))` -X do -X currlock=$(getCurrLock $lock) -X if [ $currlock -ef $__LOCKFILE ] -X then -X __locked=1 -X break -X fi -X -X sleep 0.1 -X if [ $((i % 10)) -eq 0 ] -X then -X logger -t cloud "Process $0 pid $$ waiting for the lock $lock for another 1 second" -X fi -X done -X if [ $__locked -ne 1 ] -X then -X logger -t cloud "fail to acquire the lock $lock for process $0 pid $$ after $__TIMEOUT seconds time out!" -X cmd=`cat $currlock 2>/dev/null` -X if [ $? -eq 0 ] -X then -X logger -t cloud "waiting for process: $cmd" -X else -X logger -t cloud "didn't get info about process who we're waiting for" -X fi -X psline=`ps u $$` -X logger -t cloud "Failed job detail: $psline" -X rm $__LOCKFILE -X fi -X echo $__locked -} -X -# releaseLockFile() parameters -# $1 lock filename -# $2 locked(1) or not(0) -releaseLockFile() { -X __LOCKDIR="/tmp" -X __LOCKFILE="$__LOCKDIR/*-$$-$1.lock" -X __locked=$2 -X if [ "$__locked" == "1" ] -X then -X rm $__LOCKFILE -X fi -} -X -# releaseLockFile() parameters -# $1 exit value -# $2 lock filename -# $3 locked(1) or not(0) -unlock_exit() { -X releaseLockFile $2 $3 -X exit $1 -} -X -# calcuate the ip & network mask -rangecalc(){ -X local IFS='.' -X local -a oct mask ip -X -X read -ra oct <<<"$1" -X read -ra mask <<<"$2" -X for i in {0..3} -X do -X ip+=( "$(( oct[i] & mask[i] ))" ) -X done -X echo "${ip[*]}" -} -X -#get cidr of the nic -getcidr(){ -X local dev=$1 -X local mask=`ifconfig $dev|grep "Mask"|cut -d ":" -f 4` -X local cidrsize=`ip addr show $dev|grep inet|head -n 1|awk '{print $2}'|cut -d '/' -f 2` -X local ipaddr=`ip addr show $dev|grep inet|head -n 1|awk '{print $2}'|cut -d '/' -f 1` -X local base=$(rangecalc $ipaddr $mask) -X echo $base/$cidrsize -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/func.sh' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/root/func.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/func.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/func.sh': 'MD5 check failed' - ) << \SHAR_EOF -89141bce2eaa74a4a9a9788cae397be4 cloud_scripts/root/func.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/func.sh'` -ne 3567 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/func.sh' is not 3567" - fi -fi -# ============= cloud_scripts/root/clearUsageRules.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/clearUsageRules.sh' -then -${echo} "x - SKIPPING cloud_scripts/root/clearUsageRules.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/clearUsageRules.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/clearUsageRules.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -# clearUsageRules.sh - remove iptable rules for removed public interfaces -# @VERSION@ -X -if [ -f /root/removedVifs ] -then -X var=`cat /root/removedVifs` -X # loop through even vif to be cleared -X for i in $var; do -X # Make sure vif doesn't exist -X if [ ! -f /sys/class/net/$i ] -X then -X # remove rules -X iptables -D NETWORK_STATS -i eth0 -o $i > /dev/null; -X iptables -D NETWORK_STATS -i $i -o eth0 > /dev/null; -X iptables -D NETWORK_STATS -o $i ! -i eth0 -p tcp > /dev/null; -X iptables -D NETWORK_STATS -i $i ! -o eth0 -p tcp > /dev/null; -X fi -X done -rm /root/removedVifs -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/clearUsageRules.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/root/clearUsageRules.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/clearUsageRules.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/clearUsageRules.sh': 'MD5 check failed' - ) << \SHAR_EOF -f176fc60b3a7b07a47482d68528bb460 cloud_scripts/root/clearUsageRules.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/clearUsageRules.sh'` -ne 1461 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/clearUsageRules.sh' is not 1461" - fi -fi -# ============= cloud_scripts/root/reconfigLB.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/reconfigLB.sh' -then -${echo} "x - SKIPPING cloud_scripts/root/reconfigLB.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/reconfigLB.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/reconfigLB.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -ret=0 -X -new_config=$1 -X -# save previous state -X mv /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy.cfg.old -X -X mv $new_config /etc/haproxy/haproxy.cfg -X if haproxy -p /var/run/haproxy.pid -f /etc/haproxy/haproxy.cfg -sf $(cat /var/run/haproxy.pid); then -X logger -t cloud "New haproxy instance successfully loaded, stopping previous one." -X ret=0 -X else -X logger -t cloud "New instance failed to start, resuming previous one." -X mv /etc/haproxy/haproxy.cfg $new_config -X mv /etc/haproxy/haproxy.cfg.old /etc/haproxy/haproxy.cfg -X haproxy -p /var/run/haproxy.pid -f /etc/haproxy/haproxy.cfg -sf $(cat /var/run/haproxy.pid) -X ret=1 -X fi -X -exit $ret -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/reconfigLB.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/root/reconfigLB.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/reconfigLB.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/reconfigLB.sh': 'MD5 check failed' - ) << \SHAR_EOF -d73e1491560b810ac47d1aaeb2b466ba cloud_scripts/root/reconfigLB.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/reconfigLB.sh'` -ne 1454 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/reconfigLB.sh' is not 1454" - fi -fi -# ============= cloud_scripts/root/monitorServices.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/monitorServices.py' -then -${echo} "x - SKIPPING cloud_scripts/root/monitorServices.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/monitorServices.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/monitorServices.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,L('!A=&@*9G)O;2!H96%L=&A?8VAE -M8VMS+G5T:6QI='D@:6UP;W)T(&=E=$AE86QT:$-H96-KWT* -M("`@('!A2`K)UTG*R(@(B`K -M("=;)RMP2LG72<@*R`B("(@*R!M -M2!O;F4@<&ED(&]R -M(&YO=`H@("`@:68@97AI=%-T871U6EN9R!F97<@;6]R92!T:6UEPH@("`@("`@("`@("`@("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EWT@(U-K:7`@WT*("`@(&9A:6QI;F=#:&5C:W,@/2!;70H@ -M("`@:68@8VAE8VM4>7!E(#T](")B87-I8R(Z"B`@("`@("`@;6]N:71297-U -M;'0L(&9A:6QI;F=#:&5C:W,@/2!M;VYI=%!R;V-E&-L=61E(#T@ -M:&-?9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K&-L=61E -M9%]H96%L=&A?8VAE8VMS(B!I;B!H8U]D871A(&5L7!E*0H@("`@("`@("`@("`@("`@:68@;&5N*')E="D@/3T@,#H*("`@("`@ -M("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@("`@("`@:68@(G-U -M8V-E7,N87)G=BD@/3T@,CH*("`@("`@("!I9B!S>7,N87)G=ELQ72`]/2`B -M861V86YC960B.@H@("`@("`@("`@("!M86EN*")A9'9A;F-E9"(I"B`@("`@ -M("`@96QI9B!S>7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@("`@("!M -M86EN*")B87-I8R(I"B`@("`@("`@96QS93H*("`@("`@("`@("`@<')I;G1D -M*")%7!E(&]F('1E7,N87)G=BD* -M("`@(&5L/dev/null 2>&1 || ${echo} 'cloud_scripts/root/monitorServices.py': 'MD5 check failed' - ) << \SHAR_EOF -d46009a10f68b7f2c57e43e215cba41c cloud_scripts/root/monitorServices.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/monitorServices.py'` -ne 12747 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/monitorServices.py' is not 12747" - fi -fi -# ============= cloud_scripts/root/health_checks/iptables_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/iptables_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/iptables_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/iptables_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/iptables_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W'!E8W1E9"`](%M="B`@("`@("`@9&5S=$EP(#T@<&]R=$9O'0L('-R8U!O2!I;B!I<%1A8FQE4QI'!E8W1E9#H*("`@("`@("`@("`@("`@("`@ -M("!I9B!I<%1A8FQE16YT'!E8W1E9$5N=')Y*2`]/2`M,3H* -M("`@("`@("`@("`@("`@("`@("`@("`@9F]U;F1!;&P@/2!&86QS90H@("`@ -M("`@("`@("`@("`@("`@("`@("!B4QI -M/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/iptables_check.py': 'MD5 check failed' - ) << \SHAR_EOF -36d30e9b9ff7842db6472b1f063bb076 cloud_scripts/root/health_checks/iptables_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/iptables_check.py'` -ne 3349 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/iptables_check.py' is not 3349" - fi -fi -# ============= cloud_scripts/root/health_checks/memory_usage_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/memory_usage_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/memory_usage_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/memory_usage_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/memory_usage_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W$UE;6]R>55S86=E(ETI"B`@("!C;60@/2`B9G)E92!\(&%W:R`G1DY2(#T] -M(#(@>R!P2!5$UE;6]R>55S86=E*2`K("(E(@H@("`@("`@("`@("!E>&ET*#$I"B`@ -M("`@("`@<')I;G0@(DUE;6]R>2!5/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/memory_usage_check.py': 'MD5 check failed' - ) << \SHAR_EOF -1d0f74928584f4e36af8d1d726fac4a4 cloud_scripts/root/health_checks/memory_usage_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/memory_usage_check.py'` -ne 1966 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/memory_usage_check.py' is not 1966" - fi -fi -# ============= cloud_scripts/root/health_checks/haproxy_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/haproxy_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/haproxy_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/haproxy_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/haproxy_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&-O;FXH -M:&%P41A=&$L(&AA0V9G4V5C=&EO;G,I.@H@("`@:68@(FUA>&-O;FXB -M(&EN(&AA<')O>'E$871A(&%N9"`B;6%X8V]N;B(@:6X@:&%#9F=396-T:6]N -M41A=&%;(FUA>&-O;FXB -M72`A/2!H84-F9U-E8W1I;VYS6R)G;&]B86PB75LB;6%X8V]N;B)=6S!=+G-T -M'E$871A -M+"!H84-F9U-E8W1I;VYS*3H*("`@(&-O41A=&$Z"B`@("`@("`@'!E8W1E9"`Z("(@*R!L8E-E8ULB86QG -M;W)I=&AM(ET@*R!<"B`@("`@("`@("`@("`@("`@("`@("`@("`@(B!B=70@ -M9F]U;F0@(B`K(&-F9U-E8W1I;VY;(F)A;&%N8V4B75LP72`K(")<;B(*("`@ -M("`@("`@("`@("`@("`@("!C;W)R96-T(#T@1F%L'!E8W1E9%-E'!E8W1E9%-E"!C;VX@86YD(&5A8V@@;&]A -M9"!B86QA;F-I;F<@41A=&$@/2!G971(96%L=&A#:&5C:W-$ -M871A*")H87!R;WAY1&%T82(I"B`@("!I9B!H87!R;WAY1&%T82!I'DN8V9G -M(BP@)W(G*2!A2]H87!R -M;WAY+F-F9R(*("`@("`@("!E>&ET*#$I"@H@("`@:&%#9F=396-T:6]NWT*("`@("`@("`@("`@8V]N=&EN=64*"B`@("`@("`@ -M:68@8W5R$-O;FX@ -M/2!C:&5C:TUA>&-O;FXH:&%P41A=&%;,%TL(&AA0V9G4V5C=&EO;G,I -M"B`@("!C:&5C:TQB4G5L97,@/2!C:&5C:TQO861"86QA;F-E*&AA<')O>'E$ -M871A+"!H84-F9U-E8W1I;VYS*0H*("`@(&EF(&-H96-K36%X0V]N;B!A;F0@ -M8VAE8VM,8E)U;&5S.@H@("`@("`@('!R:6YT(")!;&P@8VAE8VMS('!A&ET*#$I"@H* -M:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH*("`@(&EF(&QE;BAS>7,N87)G -M=BD@/3T@,B!A;F0@/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/haproxy_check.py': 'MD5 check failed' - ) << \SHAR_EOF -a6a55e4accdf61929c52391235dea744 cloud_scripts/root/health_checks/haproxy_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/haproxy_check.py'` -ne 5274 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/haproxy_check.py' is not 5274" - fi -fi -# ============= cloud_scripts/root/health_checks/router_version_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/router_version_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/router_version_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/router_version_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/router_version_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O -M'!E8W1E9#H@(B`K(%P*("`@("`@ -M("`@("`@("`@("`@97AP96-T960@*R`B+"!F;W5N9#H@(B`K(&9O=6YD"B`@ -M("`@("`@("`@('1E;7!L871E5F5R'!E8W1E -M9"`](&1A=&%;(G-C'!E8W1E9#H@(B`K(%P*("`@("`@ -M("`@("`@("`@("`@97AP96-T960@*R`B+"!F;W5N9#H@(B`K(&9O=6YD"B`@ -M("`@("`@("`@('-C/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/router_version_check.py': 'MD5 check failed' - ) << \SHAR_EOF -408778f28fd8559df294e18256af1f0b cloud_scripts/root/health_checks/router_version_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/router_version_check.py'` -ne 2773 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/router_version_check.py' is not 2773" - fi -fi -# ============= cloud_scripts/root/health_checks/utility/sharedFunctions.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/utility/sharedFunctions.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/utility/sharedFunctions.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import json -X -X -def getHealthChecksData(additionalDataKey=None): -X with open('/root/health_checks_data.json', 'r') as hc_data_file: -X hc_data = json.load(hc_data_file) -X -X # If no specific key is requested return all the data as JSON -X if additionalDataKey is None: -X return hc_data -X -X if additionalDataKey not in hc_data["health_checks_config"]: -X return None -X -X data = hc_data["health_checks_config"][additionalDataKey].strip().split(";") -X addData = [] -X for line in data: -X line = line.strip() -X if len(line) == 0: -X continue -X entries = line.split(',') -X d = {} -X for entry in entries: -X entry = entry.strip() -X if len(entry) == 0: -X continue -X keyVal = entry.split("=") -X if len(keyVal) == 2: -X d[keyVal[0].strip()] = keyVal[1].strip() -X if len(d) > 0: -X addData.append(d) -X -X return addData -X -X -def formatPort(portStart, portEnd, delim="-"): -X return portStart if portStart == portEnd else portStart + delim + portEnd -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/health_checks/utility/sharedFunctions.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/utility/sharedFunctions.py': 'MD5 check failed' - ) << \SHAR_EOF -4fa10a419db9715b34c7037bce5e6fe8 cloud_scripts/root/health_checks/utility/sharedFunctions.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/utility/sharedFunctions.py'` -ne 1865 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' is not 1865" - fi -fi -# ============= cloud_scripts/root/health_checks/utility/__init__.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/utility/__init__.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/utility/__init__.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/utility/__init__.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/utility/__init__.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/utility/__init__.py': 'MD5 check failed' - ) << \SHAR_EOF -ea0b11e040da094dd4f5628b467d5d88 cloud_scripts/root/health_checks/utility/__init__.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/utility/__init__.py'` -ne 864 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/utility/__init__.py' is not 864" - fi -fi -# ============= cloud_scripts/root/health_checks/disk_space_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/disk_space_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/disk_space_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/disk_space_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/disk_space_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O -MWT*("`@(&EF(&5N=')I97,@:7,@;F]T($YO;F4@86YD -M(&QE;BAE;G1R:65S*2`]/2`Q.@H@("`@("`@(&1A=&$@/2!E;G1R:65S6S!= -M"@H@("`@:68@(FUI;D1I/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/disk_space_check.py': 'MD5 check failed' - ) << \SHAR_EOF -9bbb07b130e3946c35263c2e970b59ba cloud_scripts/root/health_checks/disk_space_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/disk_space_check.py'` -ne 1626 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/disk_space_check.py' is not 1626" - fi -fi -# ============= cloud_scripts/root/health_checks/gateways_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/gateways_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/gateways_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/gateways_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/gateways_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,B*0H@("`@:68@9W=S(&ES($YO;F4@86YD(&QE;BAG=W,I(#T](#`Z"B`@ -M("`@("`@<')I;G0@(DYO(&=A=&5W87ES(&1A=&$@879A:6QA8FQE+"!S:VEP -M<&EN9R(*("`@("`@("!E>&ET*#`I"@H@("`@=6YR96%C:&%B;&5'871E5V%Y -M7,N87!P -M96YD*&=W*0H*("`@(&EF(&QE;BAU;G)E86-H86)L94=A=&5787ES*2`]/2`P -M.@H@("`@("`@('!R:6YT(")!;&P@(B`K('-T7,* -M("`@("`@("!E>&ET*#$I"@H*:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH* -M("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A;F0@/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/gateways_check.py': 'MD5 check failed' - ) << \SHAR_EOF -d1715f65dfe24b77c489d24fc1717bc9 cloud_scripts/root/health_checks/gateways_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/gateways_check.py'` -ne 1869 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/gateways_check.py' is not 1869" - fi -fi -# ============= cloud_scripts/root/health_checks/__init__.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/__init__.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/__init__.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/__init__.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/health_checks/__init__.py' && -#!/usr/bin/python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# Needed to expose utility as package outside for monitorServices.py. -# This directory should only contain executables for health checks. -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/__init__.py' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/root/health_checks/__init__.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/health_checks/__init__.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/__init__.py': 'MD5 check failed' - ) << \SHAR_EOF -fb151d74c97d6b3926d6b7a48eea3e56 cloud_scripts/root/health_checks/__init__.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/__init__.py'` -ne 942 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/__init__.py' is not 942" - fi -fi -# ============= cloud_scripts/root/health_checks/dns_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/dns_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/dns_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/dns_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/dns_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I"@H@("`@=VET:"!O<&5N*"/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/dns_check.py': 'MD5 check failed' - ) << \SHAR_EOF -b3192e74a4e52893fdeca4850eb096f4 cloud_scripts/root/health_checks/dns_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/dns_check.py'` -ne 1972 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/dns_check.py' is not 1972" - fi -fi -# ============= cloud_scripts/root/health_checks/cpu_usage_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/cpu_usage_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/cpu_usage_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/cpu_usage_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/cpu_usage_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W$-P=55S86=E(ETI"B`@("!C;60@/2`B=&]P("UB -M("UN,B`M<"`Q('P@9F=R97`@7")#<'4H7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@ -((&UA:6XH*0HR -` -end -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/cpu_usage_check.py' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/root/health_checks/cpu_usage_check.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/health_checks/cpu_usage_check.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/cpu_usage_check.py': 'MD5 check failed' - ) << \SHAR_EOF -faa54497a494f763c8f1a5a4d9b49c4f cloud_scripts/root/health_checks/cpu_usage_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/cpu_usage_check.py'` -ne 2078 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/cpu_usage_check.py' is not 2078" - fi -fi -# ============= cloud_scripts/root/health_checks/dhcp_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/dhcp_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/dhcp_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/dhcp_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/dhcp_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I"@H@("`@=VET:"!O<&5N*"'0G+"`G -M2`]($9A;'-E"B`@("`@("`@9F]R(&AO'0B"B`@("`@("`@97AI="@P*0H*"FEF(%]?;F%M -M95]?(#T](")?7VUA:6Y?7R(Z"B`@("!I9B!L96XH/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/dhcp_check.py': 'MD5 check failed' - ) << \SHAR_EOF -20e7a36b29f4160ae3e5814f042a8242 cloud_scripts/root/health_checks/dhcp_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/dhcp_check.py'` -ne 2386 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/dhcp_check.py' is not 2386" - fi -fi -# ============= cloud_scripts/root/health_checks/iptables_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/iptables_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/iptables_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/iptables_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/iptables_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W'!E8W1E9"`](%M="B`@("`@("`@9&5S=$EP(#T@<&]R=$9O'0L('-R8U!O2!I;B!I<%1A8FQE4QI'!E8W1E9#H*("`@("`@("`@("`@("`@("`@ -M("!I9B!I<%1A8FQE16YT'!E8W1E9$5N=')Y*2`]/2`M,3H* -M("`@("`@("`@("`@("`@("`@("`@("`@9F]U;F1!;&P@/2!&86QS90H@("`@ -M("`@("`@("`@("`@("`@("`@("!B4QI -M/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/iptables_check.py': 'MD5 check failed' - ) << \SHAR_EOF -36d30e9b9ff7842db6472b1f063bb076 cloud_scripts/root/health_checks/iptables_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/iptables_check.py'` -ne 3349 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/iptables_check.py' is not 3349" - fi -fi -# ============= cloud_scripts/root/health_checks/memory_usage_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/memory_usage_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/memory_usage_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/memory_usage_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/memory_usage_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W$UE;6]R>55S86=E(ETI"B`@("!C;60@/2`B9G)E92!\(&%W:R`G1DY2(#T] -M(#(@>R!P2!5$UE;6]R>55S86=E*2`K("(E(@H@("`@("`@("`@("!E>&ET*#$I"B`@ -M("`@("`@<')I;G0@(DUE;6]R>2!5/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/memory_usage_check.py': 'MD5 check failed' - ) << \SHAR_EOF -1d0f74928584f4e36af8d1d726fac4a4 cloud_scripts/root/health_checks/memory_usage_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/memory_usage_check.py'` -ne 1966 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/memory_usage_check.py' is not 1966" - fi -fi -# ============= cloud_scripts/root/health_checks/haproxy_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/haproxy_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/haproxy_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/haproxy_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/haproxy_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&-O;FXH -M:&%P41A=&$L(&AA0V9G4V5C=&EO;G,I.@H@("`@:68@(FUA>&-O;FXB -M(&EN(&AA<')O>'E$871A(&%N9"`B;6%X8V]N;B(@:6X@:&%#9F=396-T:6]N -M41A=&%;(FUA>&-O;FXB -M72`A/2!H84-F9U-E8W1I;VYS6R)G;&]B86PB75LB;6%X8V]N;B)=6S!=+G-T -M'E$871A -M+"!H84-F9U-E8W1I;VYS*3H*("`@(&-O41A=&$Z"B`@("`@("`@'!E8W1E9"`Z("(@*R!L8E-E8ULB86QG -M;W)I=&AM(ET@*R!<"B`@("`@("`@("`@("`@("`@("`@("`@("`@(B!B=70@ -M9F]U;F0@(B`K(&-F9U-E8W1I;VY;(F)A;&%N8V4B75LP72`K(")<;B(*("`@ -M("`@("`@("`@("`@("`@("!C;W)R96-T(#T@1F%L'!E8W1E9%-E'!E8W1E9%-E"!C;VX@86YD(&5A8V@@;&]A -M9"!B86QA;F-I;F<@41A=&$@/2!G971(96%L=&A#:&5C:W-$ -M871A*")H87!R;WAY1&%T82(I"B`@("!I9B!H87!R;WAY1&%T82!I'DN8V9G -M(BP@)W(G*2!A2]H87!R -M;WAY+F-F9R(*("`@("`@("!E>&ET*#$I"@H@("`@:&%#9F=396-T:6]NWT*("`@("`@("`@("`@8V]N=&EN=64*"B`@("`@("`@ -M:68@8W5R$-O;FX@ -M/2!C:&5C:TUA>&-O;FXH:&%P41A=&%;,%TL(&AA0V9G4V5C=&EO;G,I -M"B`@("!C:&5C:TQB4G5L97,@/2!C:&5C:TQO861"86QA;F-E*&AA<')O>'E$ -M871A+"!H84-F9U-E8W1I;VYS*0H*("`@(&EF(&-H96-K36%X0V]N;B!A;F0@ -M8VAE8VM,8E)U;&5S.@H@("`@("`@('!R:6YT(")!;&P@8VAE8VMS('!A&ET*#$I"@H* -M:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH*("`@(&EF(&QE;BAS>7,N87)G -M=BD@/3T@,B!A;F0@/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/haproxy_check.py': 'MD5 check failed' - ) << \SHAR_EOF -a6a55e4accdf61929c52391235dea744 cloud_scripts/root/health_checks/haproxy_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/haproxy_check.py'` -ne 5274 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/haproxy_check.py' is not 5274" - fi -fi -# ============= cloud_scripts/root/health_checks/router_version_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/router_version_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/router_version_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/router_version_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/router_version_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O -M'!E8W1E9#H@(B`K(%P*("`@("`@ -M("`@("`@("`@("`@97AP96-T960@*R`B+"!F;W5N9#H@(B`K(&9O=6YD"B`@ -M("`@("`@("`@('1E;7!L871E5F5R'!E8W1E -M9"`](&1A=&%;(G-C'!E8W1E9#H@(B`K(%P*("`@("`@ -M("`@("`@("`@("`@97AP96-T960@*R`B+"!F;W5N9#H@(B`K(&9O=6YD"B`@ -M("`@("`@("`@('-C/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/router_version_check.py': 'MD5 check failed' - ) << \SHAR_EOF -408778f28fd8559df294e18256af1f0b cloud_scripts/root/health_checks/router_version_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/router_version_check.py'` -ne 2773 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/router_version_check.py' is not 2773" - fi -fi -# ============= cloud_scripts/root/health_checks/utility/sharedFunctions.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/utility/sharedFunctions.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/utility/sharedFunctions.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import json -X -X -def getHealthChecksData(additionalDataKey=None): -X with open('/root/health_checks_data.json', 'r') as hc_data_file: -X hc_data = json.load(hc_data_file) -X -X # If no specific key is requested return all the data as JSON -X if additionalDataKey is None: -X return hc_data -X -X if additionalDataKey not in hc_data["health_checks_config"]: -X return None -X -X data = hc_data["health_checks_config"][additionalDataKey].strip().split(";") -X addData = [] -X for line in data: -X line = line.strip() -X if len(line) == 0: -X continue -X entries = line.split(',') -X d = {} -X for entry in entries: -X entry = entry.strip() -X if len(entry) == 0: -X continue -X keyVal = entry.split("=") -X if len(keyVal) == 2: -X d[keyVal[0].strip()] = keyVal[1].strip() -X if len(d) > 0: -X addData.append(d) -X -X return addData -X -X -def formatPort(portStart, portEnd, delim="-"): -X return portStart if portStart == portEnd else portStart + delim + portEnd -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/health_checks/utility/sharedFunctions.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/utility/sharedFunctions.py': 'MD5 check failed' - ) << \SHAR_EOF -4fa10a419db9715b34c7037bce5e6fe8 cloud_scripts/root/health_checks/utility/sharedFunctions.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/utility/sharedFunctions.py'` -ne 1865 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' is not 1865" - fi -fi -# ============= cloud_scripts/root/health_checks/utility/__init__.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/utility/__init__.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/utility/__init__.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/utility/__init__.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/utility/__init__.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/utility/__init__.py': 'MD5 check failed' - ) << \SHAR_EOF -ea0b11e040da094dd4f5628b467d5d88 cloud_scripts/root/health_checks/utility/__init__.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/utility/__init__.py'` -ne 864 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/utility/__init__.py' is not 864" - fi -fi -# ============= cloud_scripts/root/health_checks/utility/sharedFunctions.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/utility/sharedFunctions.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/utility/sharedFunctions.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -import json -X -X -def getHealthChecksData(additionalDataKey=None): -X with open('/root/health_checks_data.json', 'r') as hc_data_file: -X hc_data = json.load(hc_data_file) -X -X # If no specific key is requested return all the data as JSON -X if additionalDataKey is None: -X return hc_data -X -X if additionalDataKey not in hc_data["health_checks_config"]: -X return None -X -X data = hc_data["health_checks_config"][additionalDataKey].strip().split(";") -X addData = [] -X for line in data: -X line = line.strip() -X if len(line) == 0: -X continue -X entries = line.split(',') -X d = {} -X for entry in entries: -X entry = entry.strip() -X if len(entry) == 0: -X continue -X keyVal = entry.split("=") -X if len(keyVal) == 2: -X d[keyVal[0].strip()] = keyVal[1].strip() -X if len(d) > 0: -X addData.append(d) -X -X return addData -X -X -def formatPort(portStart, portEnd, delim="-"): -X return portStart if portStart == portEnd else portStart + delim + portEnd -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/health_checks/utility/sharedFunctions.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/utility/sharedFunctions.py': 'MD5 check failed' - ) << \SHAR_EOF -4fa10a419db9715b34c7037bce5e6fe8 cloud_scripts/root/health_checks/utility/sharedFunctions.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/utility/sharedFunctions.py'` -ne 1865 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/utility/sharedFunctions.py' is not 1865" - fi -fi -# ============= cloud_scripts/root/health_checks/utility/__init__.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/utility/__init__.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/utility/__init__.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/utility/__init__.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/utility/__init__.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/utility/__init__.py': 'MD5 check failed' - ) << \SHAR_EOF -ea0b11e040da094dd4f5628b467d5d88 cloud_scripts/root/health_checks/utility/__init__.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/utility/__init__.py'` -ne 864 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/utility/__init__.py' is not 864" - fi -fi -# ============= cloud_scripts/root/health_checks/disk_space_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/disk_space_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/disk_space_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/disk_space_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/disk_space_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O -MWT*("`@(&EF(&5N=')I97,@:7,@;F]T($YO;F4@86YD -M(&QE;BAE;G1R:65S*2`]/2`Q.@H@("`@("`@(&1A=&$@/2!E;G1R:65S6S!= -M"@H@("`@:68@(FUI;D1I/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/disk_space_check.py': 'MD5 check failed' - ) << \SHAR_EOF -9bbb07b130e3946c35263c2e970b59ba cloud_scripts/root/health_checks/disk_space_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/disk_space_check.py'` -ne 1626 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/disk_space_check.py' is not 1626" - fi -fi -# ============= cloud_scripts/root/health_checks/gateways_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/gateways_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/gateways_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/gateways_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/gateways_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,B*0H@("`@:68@9W=S(&ES($YO;F4@86YD(&QE;BAG=W,I(#T](#`Z"B`@ -M("`@("`@<')I;G0@(DYO(&=A=&5W87ES(&1A=&$@879A:6QA8FQE+"!S:VEP -M<&EN9R(*("`@("`@("!E>&ET*#`I"@H@("`@=6YR96%C:&%B;&5'871E5V%Y -M7,N87!P -M96YD*&=W*0H*("`@(&EF(&QE;BAU;G)E86-H86)L94=A=&5787ES*2`]/2`P -M.@H@("`@("`@('!R:6YT(")!;&P@(B`K('-T7,* -M("`@("`@("!E>&ET*#$I"@H*:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH* -M("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A;F0@/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/gateways_check.py': 'MD5 check failed' - ) << \SHAR_EOF -d1715f65dfe24b77c489d24fc1717bc9 cloud_scripts/root/health_checks/gateways_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/gateways_check.py'` -ne 1869 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/gateways_check.py' is not 1869" - fi -fi -# ============= cloud_scripts/root/health_checks/__init__.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/__init__.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/__init__.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/__init__.py (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/health_checks/__init__.py' && -#!/usr/bin/python -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# Needed to expose utility as package outside for monitorServices.py. -# This directory should only contain executables for health checks. -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/__init__.py' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/root/health_checks/__init__.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/health_checks/__init__.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/__init__.py': 'MD5 check failed' - ) << \SHAR_EOF -fb151d74c97d6b3926d6b7a48eea3e56 cloud_scripts/root/health_checks/__init__.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/__init__.py'` -ne 942 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/__init__.py' is not 942" - fi -fi -# ============= cloud_scripts/root/health_checks/dns_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/dns_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/dns_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/dns_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/dns_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I"@H@("`@=VET:"!O<&5N*"/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/dns_check.py': 'MD5 check failed' - ) << \SHAR_EOF -b3192e74a4e52893fdeca4850eb096f4 cloud_scripts/root/health_checks/dns_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/dns_check.py'` -ne 1972 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/dns_check.py' is not 1972" - fi -fi -# ============= cloud_scripts/root/health_checks/cpu_usage_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/cpu_usage_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/cpu_usage_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/cpu_usage_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/cpu_usage_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W$-P=55S86=E(ETI"B`@("!C;60@/2`B=&]P("UB -M("UN,B`M<"`Q('P@9F=R97`@7")#<'4H7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@ -((&UA:6XH*0HR -` -end -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/health_checks/cpu_usage_check.py' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/root/health_checks/cpu_usage_check.py' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/health_checks/cpu_usage_check.py failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/cpu_usage_check.py': 'MD5 check failed' - ) << \SHAR_EOF -faa54497a494f763c8f1a5a4d9b49c4f cloud_scripts/root/health_checks/cpu_usage_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/cpu_usage_check.py'` -ne 2078 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/cpu_usage_check.py' is not 2078" - fi -fi -# ============= cloud_scripts/root/health_checks/dhcp_check.py ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/health_checks/dhcp_check.py' -then -${echo} "x - SKIPPING cloud_scripts/root/health_checks/dhcp_check.py (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/health_checks/dhcp_check.py (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/root/health_checks/dhcp_check.py -M(R$O=7-R+V)I;B]P>71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O -M9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C -M;VYT7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I"@H@("`@=VET:"!O<&5N*"'0G+"`G -M2`]($9A;'-E"B`@("`@("`@9F]R(&AO'0B"B`@("`@("`@97AI="@P*0H*"FEF(%]?;F%M -M95]?(#T](")?7VUA:6Y?7R(Z"B`@("!I9B!L96XH/dev/null 2>&1 || ${echo} 'cloud_scripts/root/health_checks/dhcp_check.py': 'MD5 check failed' - ) << \SHAR_EOF -20e7a36b29f4160ae3e5814f042a8242 cloud_scripts/root/health_checks/dhcp_check.py -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/health_checks/dhcp_check.py'` -ne 2386 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/health_checks/dhcp_check.py' is not 2386" - fi -fi -# ============= cloud_scripts/root/func.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/func.sh' -then -${echo} "x - SKIPPING cloud_scripts/root/func.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/func.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/func.sh' && -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -# Only one lock is allowed: biglock -X -# getLockFile() parameters -# $1 lock filename -# $2 timeout seconds -X -#set -x -X -getCurrLock() { -X result=`ls $__LOCKDIR/*-$1.lock 2>/dev/null | head -n1` -X while [ $? -ne 0 ] -X do -X result=`ls $__LOCKDIR/*-$1.lock 2>/dev/null| head -n1` -X done -X echo $result -} -X -getLockFile() { -X lock=$1 -X -X __locked=0 -X __TS=`date +%s%N` -X __LOCKDIR="/tmp" -X __LOCKFILE="$__LOCKDIR/$__TS-$$-$lock.lock" -X -X if [ $2 ] -X then -X __TIMEOUT=$2 -X else -X __TIMEOUT=30 -X fi -X -X if [ -e $__LOCKFILE ] -X then -X logger -t cloud "Process $0 pid $$ want to get ECLUSIVE LOCK $lock RECURSIVELY!" -X psline=`ps u $$` -X logger -t cloud "Failed job detail: $psline" -X echo 0 -X return -X fi -X -X psline=`ps u $$` -X echo $psline > $__LOCKFILE -X if [ ! -e $__LOCKFILE ] -X then -X return -X fi -X -X for i in `seq 1 $(($__TIMEOUT * 10))` -X do -X currlock=$(getCurrLock $lock) -X if [ $currlock -ef $__LOCKFILE ] -X then -X __locked=1 -X break -X fi -X -X sleep 0.1 -X if [ $((i % 10)) -eq 0 ] -X then -X logger -t cloud "Process $0 pid $$ waiting for the lock $lock for another 1 second" -X fi -X done -X if [ $__locked -ne 1 ] -X then -X logger -t cloud "fail to acquire the lock $lock for process $0 pid $$ after $__TIMEOUT seconds time out!" -X cmd=`cat $currlock 2>/dev/null` -X if [ $? -eq 0 ] -X then -X logger -t cloud "waiting for process: $cmd" -X else -X logger -t cloud "didn't get info about process who we're waiting for" -X fi -X psline=`ps u $$` -X logger -t cloud "Failed job detail: $psline" -X rm $__LOCKFILE -X fi -X echo $__locked -} -X -# releaseLockFile() parameters -# $1 lock filename -# $2 locked(1) or not(0) -releaseLockFile() { -X __LOCKDIR="/tmp" -X __LOCKFILE="$__LOCKDIR/*-$$-$1.lock" -X __locked=$2 -X if [ "$__locked" == "1" ] -X then -X rm $__LOCKFILE -X fi -} -X -# releaseLockFile() parameters -# $1 exit value -# $2 lock filename -# $3 locked(1) or not(0) -unlock_exit() { -X releaseLockFile $2 $3 -X exit $1 -} -X -# calcuate the ip & network mask -rangecalc(){ -X local IFS='.' -X local -a oct mask ip -X -X read -ra oct <<<"$1" -X read -ra mask <<<"$2" -X for i in {0..3} -X do -X ip+=( "$(( oct[i] & mask[i] ))" ) -X done -X echo "${ip[*]}" -} -X -#get cidr of the nic -getcidr(){ -X local dev=$1 -X local mask=`ifconfig $dev|grep "Mask"|cut -d ":" -f 4` -X local cidrsize=`ip addr show $dev|grep inet|head -n 1|awk '{print $2}'|cut -d '/' -f 2` -X local ipaddr=`ip addr show $dev|grep inet|head -n 1|awk '{print $2}'|cut -d '/' -f 1` -X local base=$(rangecalc $ipaddr $mask) -X echo $base/$cidrsize -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/func.sh' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/root/func.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/func.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/func.sh': 'MD5 check failed' - ) << \SHAR_EOF -89141bce2eaa74a4a9a9788cae397be4 cloud_scripts/root/func.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/func.sh'` -ne 3567 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/func.sh' is not 3567" - fi -fi -# ============= cloud_scripts/root/clearUsageRules.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/root/clearUsageRules.sh' -then -${echo} "x - SKIPPING cloud_scripts/root/clearUsageRules.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/root/clearUsageRules.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/root/clearUsageRules.sh' && -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -# clearUsageRules.sh - remove iptable rules for removed public interfaces -# @VERSION@ -X -if [ -f /root/removedVifs ] -then -X var=`cat /root/removedVifs` -X # loop through even vif to be cleared -X for i in $var; do -X # Make sure vif doesn't exist -X if [ ! -f /sys/class/net/$i ] -X then -X # remove rules -X iptables -D NETWORK_STATS -i eth0 -o $i > /dev/null; -X iptables -D NETWORK_STATS -i $i -o eth0 > /dev/null; -X iptables -D NETWORK_STATS -o $i ! -i eth0 -p tcp > /dev/null; -X iptables -D NETWORK_STATS -i $i ! -o eth0 -p tcp > /dev/null; -X fi -X done -rm /root/removedVifs -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/root/clearUsageRules.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/root/clearUsageRules.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/root/clearUsageRules.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/root/clearUsageRules.sh': 'MD5 check failed' - ) << \SHAR_EOF -f176fc60b3a7b07a47482d68528bb460 cloud_scripts/root/clearUsageRules.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/root/clearUsageRules.sh'` -ne 1461 && \ - ${echo} "restoration warning: size of 'cloud_scripts/root/clearUsageRules.sh' is not 1461" - fi -fi -# ============= cloud_scripts/var/www/html/latest/.htaccess ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/latest/.htaccess' -then -${echo} "x - SKIPPING cloud_scripts/var/www/html/latest/.htaccess (file already exists)" - -else -${echo} "x - extracting cloud_scripts/var/www/html/latest/.htaccess (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/latest/.htaccess' && -Options +FollowSymLinks -RewriteEngine On -X -#http:///latest/user-data and .../user-data/ (both yield user-data file) -#http:///latest/meta-data and .../meta-data/ (dir listing of meta-data) -RewriteRule ^user-data/?$ ../userdata/%{REMOTE_ADDR}/user-data [L,NC,QSA] -RewriteRule ^meta-data/?$ ../metadata/%{REMOTE_ADDR}/meta-data [L,NC,QSA] -X -#http:///latest/foo and .../foo/ (yield metadata/$IP/foo) -#are these used? -RewriteRule ^availability-zone/?$ ../metadata/%{REMOTE_ADDR}/availability-zone [L,NC,QSA] -RewriteRule ^cloud-identifier/?$ ../metadata/%{REMOTE_ADDR}/cloud-identifier [L,NC,QSA] -RewriteRule ^instance-id/?$ ../metadata/%{REMOTE_ADDR}/instance-id [L,NC,QSA] -RewriteRule ^local-hostname/?$ ../metadata/%{REMOTE_ADDR}/local-hostname [L,NC,QSA] -RewriteRule ^local-ipv4/?$ ../metadata/%{REMOTE_ADDR}/local-ipv4 [L,NC,QSA] -RewriteRule ^public-hostname/?$ ../metadata/%{REMOTE_ADDR}/public-hostname [L,NC,QSA] -RewriteRule ^public-ipv4/?$ ../metadata/%{REMOTE_ADDR}/public-ipv4 [L,NC,QSA] -RewriteRule ^public-keys/?$ ../metadata/%{REMOTE_ADDR}/public-keys [L,NC,QSA] -RewriteRule ^service-offering/?$ ../metadata/%{REMOTE_ADDR}/service-offering [L,NC,QSA] -RewriteRule ^vm-id/?$ ../metadata/%{REMOTE_ADDR}/vm-id [L,NC,QSA] -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/latest/.htaccess' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/var/www/html/latest/.htaccess' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/var/www/html/latest/.htaccess failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/latest/.htaccess': 'MD5 check failed' - ) << \SHAR_EOF -b20d7331940666e4f160df0a03678813 cloud_scripts/var/www/html/latest/.htaccess -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/latest/.htaccess'` -ne 1425 && \ - ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/latest/.htaccess' is not 1425" - fi -fi -# ============= cloud_scripts/var/www/html/userdata/.htaccess ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/userdata/.htaccess' -then -${echo} "x - SKIPPING cloud_scripts/var/www/html/userdata/.htaccess (file already exists)" - -else -${echo} "x - extracting cloud_scripts/var/www/html/userdata/.htaccess (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/userdata/.htaccess' && -Options -Indexes -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/userdata/.htaccess' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/var/www/html/userdata/.htaccess' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/var/www/html/userdata/.htaccess failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/userdata/.htaccess': 'MD5 check failed' - ) << \SHAR_EOF -7eb825c9c5f32d7efe110c8d7ed402dc cloud_scripts/var/www/html/userdata/.htaccess -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/userdata/.htaccess'` -ne 17 && \ - ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/userdata/.htaccess' is not 17" - fi -fi -# ============= cloud_scripts/var/www/html/latest/.htaccess ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/latest/.htaccess' -then -${echo} "x - SKIPPING cloud_scripts/var/www/html/latest/.htaccess (file already exists)" - -else -${echo} "x - extracting cloud_scripts/var/www/html/latest/.htaccess (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/latest/.htaccess' && -Options +FollowSymLinks -RewriteEngine On -X -#http:///latest/user-data and .../user-data/ (both yield user-data file) -#http:///latest/meta-data and .../meta-data/ (dir listing of meta-data) -RewriteRule ^user-data/?$ ../userdata/%{REMOTE_ADDR}/user-data [L,NC,QSA] -RewriteRule ^meta-data/?$ ../metadata/%{REMOTE_ADDR}/meta-data [L,NC,QSA] -X -#http:///latest/foo and .../foo/ (yield metadata/$IP/foo) -#are these used? -RewriteRule ^availability-zone/?$ ../metadata/%{REMOTE_ADDR}/availability-zone [L,NC,QSA] -RewriteRule ^cloud-identifier/?$ ../metadata/%{REMOTE_ADDR}/cloud-identifier [L,NC,QSA] -RewriteRule ^instance-id/?$ ../metadata/%{REMOTE_ADDR}/instance-id [L,NC,QSA] -RewriteRule ^local-hostname/?$ ../metadata/%{REMOTE_ADDR}/local-hostname [L,NC,QSA] -RewriteRule ^local-ipv4/?$ ../metadata/%{REMOTE_ADDR}/local-ipv4 [L,NC,QSA] -RewriteRule ^public-hostname/?$ ../metadata/%{REMOTE_ADDR}/public-hostname [L,NC,QSA] -RewriteRule ^public-ipv4/?$ ../metadata/%{REMOTE_ADDR}/public-ipv4 [L,NC,QSA] -RewriteRule ^public-keys/?$ ../metadata/%{REMOTE_ADDR}/public-keys [L,NC,QSA] -RewriteRule ^service-offering/?$ ../metadata/%{REMOTE_ADDR}/service-offering [L,NC,QSA] -RewriteRule ^vm-id/?$ ../metadata/%{REMOTE_ADDR}/vm-id [L,NC,QSA] -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/latest/.htaccess' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/var/www/html/latest/.htaccess' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/var/www/html/latest/.htaccess failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/latest/.htaccess': 'MD5 check failed' - ) << \SHAR_EOF -b20d7331940666e4f160df0a03678813 cloud_scripts/var/www/html/latest/.htaccess -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/latest/.htaccess'` -ne 1425 && \ - ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/latest/.htaccess' is not 1425" - fi -fi -# ============= cloud_scripts/var/www/html/userdata/.htaccess ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/userdata/.htaccess' -then -${echo} "x - SKIPPING cloud_scripts/var/www/html/userdata/.htaccess (file already exists)" - -else -${echo} "x - extracting cloud_scripts/var/www/html/userdata/.htaccess (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/userdata/.htaccess' && -Options -Indexes -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/userdata/.htaccess' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/var/www/html/userdata/.htaccess' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/var/www/html/userdata/.htaccess failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/userdata/.htaccess': 'MD5 check failed' - ) << \SHAR_EOF -7eb825c9c5f32d7efe110c8d7ed402dc cloud_scripts/var/www/html/userdata/.htaccess -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/userdata/.htaccess'` -ne 17 && \ - ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/userdata/.htaccess' is not 17" - fi -fi -# ============= cloud_scripts/var/www/html/latest/.htaccess ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/latest/.htaccess' -then -${echo} "x - SKIPPING cloud_scripts/var/www/html/latest/.htaccess (file already exists)" - -else -${echo} "x - extracting cloud_scripts/var/www/html/latest/.htaccess (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/latest/.htaccess' && -Options +FollowSymLinks -RewriteEngine On -X -#http:///latest/user-data and .../user-data/ (both yield user-data file) -#http:///latest/meta-data and .../meta-data/ (dir listing of meta-data) -RewriteRule ^user-data/?$ ../userdata/%{REMOTE_ADDR}/user-data [L,NC,QSA] -RewriteRule ^meta-data/?$ ../metadata/%{REMOTE_ADDR}/meta-data [L,NC,QSA] -X -#http:///latest/foo and .../foo/ (yield metadata/$IP/foo) -#are these used? -RewriteRule ^availability-zone/?$ ../metadata/%{REMOTE_ADDR}/availability-zone [L,NC,QSA] -RewriteRule ^cloud-identifier/?$ ../metadata/%{REMOTE_ADDR}/cloud-identifier [L,NC,QSA] -RewriteRule ^instance-id/?$ ../metadata/%{REMOTE_ADDR}/instance-id [L,NC,QSA] -RewriteRule ^local-hostname/?$ ../metadata/%{REMOTE_ADDR}/local-hostname [L,NC,QSA] -RewriteRule ^local-ipv4/?$ ../metadata/%{REMOTE_ADDR}/local-ipv4 [L,NC,QSA] -RewriteRule ^public-hostname/?$ ../metadata/%{REMOTE_ADDR}/public-hostname [L,NC,QSA] -RewriteRule ^public-ipv4/?$ ../metadata/%{REMOTE_ADDR}/public-ipv4 [L,NC,QSA] -RewriteRule ^public-keys/?$ ../metadata/%{REMOTE_ADDR}/public-keys [L,NC,QSA] -RewriteRule ^service-offering/?$ ../metadata/%{REMOTE_ADDR}/service-offering [L,NC,QSA] -RewriteRule ^vm-id/?$ ../metadata/%{REMOTE_ADDR}/vm-id [L,NC,QSA] -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/latest/.htaccess' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/var/www/html/latest/.htaccess' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/var/www/html/latest/.htaccess failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/latest/.htaccess': 'MD5 check failed' - ) << \SHAR_EOF -b20d7331940666e4f160df0a03678813 cloud_scripts/var/www/html/latest/.htaccess -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/latest/.htaccess'` -ne 1425 && \ - ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/latest/.htaccess' is not 1425" - fi -fi -# ============= cloud_scripts/var/www/html/userdata/.htaccess ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/userdata/.htaccess' -then -${echo} "x - SKIPPING cloud_scripts/var/www/html/userdata/.htaccess (file already exists)" - -else -${echo} "x - extracting cloud_scripts/var/www/html/userdata/.htaccess (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/userdata/.htaccess' && -Options -Indexes -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/userdata/.htaccess' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/var/www/html/userdata/.htaccess' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/var/www/html/userdata/.htaccess failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/userdata/.htaccess': 'MD5 check failed' - ) << \SHAR_EOF -7eb825c9c5f32d7efe110c8d7ed402dc cloud_scripts/var/www/html/userdata/.htaccess -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/userdata/.htaccess'` -ne 17 && \ - ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/userdata/.htaccess' is not 17" - fi -fi -# ============= cloud_scripts/var/www/html/latest/.htaccess ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/latest/.htaccess' -then -${echo} "x - SKIPPING cloud_scripts/var/www/html/latest/.htaccess (file already exists)" - -else -${echo} "x - extracting cloud_scripts/var/www/html/latest/.htaccess (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/latest/.htaccess' && -Options +FollowSymLinks -RewriteEngine On -X -#http:///latest/user-data and .../user-data/ (both yield user-data file) -#http:///latest/meta-data and .../meta-data/ (dir listing of meta-data) -RewriteRule ^user-data/?$ ../userdata/%{REMOTE_ADDR}/user-data [L,NC,QSA] -RewriteRule ^meta-data/?$ ../metadata/%{REMOTE_ADDR}/meta-data [L,NC,QSA] -X -#http:///latest/foo and .../foo/ (yield metadata/$IP/foo) -#are these used? -RewriteRule ^availability-zone/?$ ../metadata/%{REMOTE_ADDR}/availability-zone [L,NC,QSA] -RewriteRule ^cloud-identifier/?$ ../metadata/%{REMOTE_ADDR}/cloud-identifier [L,NC,QSA] -RewriteRule ^instance-id/?$ ../metadata/%{REMOTE_ADDR}/instance-id [L,NC,QSA] -RewriteRule ^local-hostname/?$ ../metadata/%{REMOTE_ADDR}/local-hostname [L,NC,QSA] -RewriteRule ^local-ipv4/?$ ../metadata/%{REMOTE_ADDR}/local-ipv4 [L,NC,QSA] -RewriteRule ^public-hostname/?$ ../metadata/%{REMOTE_ADDR}/public-hostname [L,NC,QSA] -RewriteRule ^public-ipv4/?$ ../metadata/%{REMOTE_ADDR}/public-ipv4 [L,NC,QSA] -RewriteRule ^public-keys/?$ ../metadata/%{REMOTE_ADDR}/public-keys [L,NC,QSA] -RewriteRule ^service-offering/?$ ../metadata/%{REMOTE_ADDR}/service-offering [L,NC,QSA] -RewriteRule ^vm-id/?$ ../metadata/%{REMOTE_ADDR}/vm-id [L,NC,QSA] -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/latest/.htaccess' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/var/www/html/latest/.htaccess' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/var/www/html/latest/.htaccess failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/latest/.htaccess': 'MD5 check failed' - ) << \SHAR_EOF -b20d7331940666e4f160df0a03678813 cloud_scripts/var/www/html/latest/.htaccess -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/latest/.htaccess'` -ne 1425 && \ - ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/latest/.htaccess' is not 1425" - fi -fi -# ============= cloud_scripts/var/www/html/latest/.htaccess ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/latest/.htaccess' -then -${echo} "x - SKIPPING cloud_scripts/var/www/html/latest/.htaccess (file already exists)" - -else -${echo} "x - extracting cloud_scripts/var/www/html/latest/.htaccess (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/latest/.htaccess' && -Options +FollowSymLinks -RewriteEngine On -X -#http:///latest/user-data and .../user-data/ (both yield user-data file) -#http:///latest/meta-data and .../meta-data/ (dir listing of meta-data) -RewriteRule ^user-data/?$ ../userdata/%{REMOTE_ADDR}/user-data [L,NC,QSA] -RewriteRule ^meta-data/?$ ../metadata/%{REMOTE_ADDR}/meta-data [L,NC,QSA] -X -#http:///latest/foo and .../foo/ (yield metadata/$IP/foo) -#are these used? -RewriteRule ^availability-zone/?$ ../metadata/%{REMOTE_ADDR}/availability-zone [L,NC,QSA] -RewriteRule ^cloud-identifier/?$ ../metadata/%{REMOTE_ADDR}/cloud-identifier [L,NC,QSA] -RewriteRule ^instance-id/?$ ../metadata/%{REMOTE_ADDR}/instance-id [L,NC,QSA] -RewriteRule ^local-hostname/?$ ../metadata/%{REMOTE_ADDR}/local-hostname [L,NC,QSA] -RewriteRule ^local-ipv4/?$ ../metadata/%{REMOTE_ADDR}/local-ipv4 [L,NC,QSA] -RewriteRule ^public-hostname/?$ ../metadata/%{REMOTE_ADDR}/public-hostname [L,NC,QSA] -RewriteRule ^public-ipv4/?$ ../metadata/%{REMOTE_ADDR}/public-ipv4 [L,NC,QSA] -RewriteRule ^public-keys/?$ ../metadata/%{REMOTE_ADDR}/public-keys [L,NC,QSA] -RewriteRule ^service-offering/?$ ../metadata/%{REMOTE_ADDR}/service-offering [L,NC,QSA] -RewriteRule ^vm-id/?$ ../metadata/%{REMOTE_ADDR}/vm-id [L,NC,QSA] -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/latest/.htaccess' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/var/www/html/latest/.htaccess' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/var/www/html/latest/.htaccess failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/latest/.htaccess': 'MD5 check failed' - ) << \SHAR_EOF -b20d7331940666e4f160df0a03678813 cloud_scripts/var/www/html/latest/.htaccess -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/latest/.htaccess'` -ne 1425 && \ - ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/latest/.htaccess' is not 1425" - fi -fi -# ============= cloud_scripts/var/www/html/userdata/.htaccess ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/userdata/.htaccess' -then -${echo} "x - SKIPPING cloud_scripts/var/www/html/userdata/.htaccess (file already exists)" - -else -${echo} "x - extracting cloud_scripts/var/www/html/userdata/.htaccess (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/userdata/.htaccess' && -Options -Indexes -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/userdata/.htaccess' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/var/www/html/userdata/.htaccess' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/var/www/html/userdata/.htaccess failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/userdata/.htaccess': 'MD5 check failed' - ) << \SHAR_EOF -7eb825c9c5f32d7efe110c8d7ed402dc cloud_scripts/var/www/html/userdata/.htaccess -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/userdata/.htaccess'` -ne 17 && \ - ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/userdata/.htaccess' is not 17" - fi -fi -# ============= cloud_scripts/var/www/html/userdata/.htaccess ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/var/www/html/userdata/.htaccess' -then -${echo} "x - SKIPPING cloud_scripts/var/www/html/userdata/.htaccess (file already exists)" - -else -${echo} "x - extracting cloud_scripts/var/www/html/userdata/.htaccess (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/var/www/html/userdata/.htaccess' && -Options -Indexes -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/var/www/html/userdata/.htaccess' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/var/www/html/userdata/.htaccess' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/var/www/html/userdata/.htaccess failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/var/www/html/userdata/.htaccess': 'MD5 check failed' - ) << \SHAR_EOF -7eb825c9c5f32d7efe110c8d7ed402dc cloud_scripts/var/www/html/userdata/.htaccess -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/var/www/html/userdata/.htaccess'` -ne 17 && \ - ${echo} "restoration warning: size of 'cloud_scripts/var/www/html/userdata/.htaccess' is not 17" - fi -fi -# ============= cloud_scripts/etc/ipsec.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/ipsec.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/ipsec.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.conf' && -# ipsec.conf - strongSwan IPsec configuration file -X -config setup -X -include /etc/ipsec.d/*.conf -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/ipsec.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/ipsec.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.conf': 'MD5 check failed' - ) << \SHAR_EOF -da4dd5d331eed3e64a528dc648aa7cae cloud_scripts/etc/ipsec.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.conf'` -ne 94 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.conf' is not 94" - fi -fi -# ============= cloud_scripts/etc/systemd/journald.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/journald.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/journald.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/journald.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/journald.conf' && -[Journal] -Compress=yes -SystemMaxUse=40M -SystemMaxFileSize=10M -RuntimeMaxUse=20M -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/journald.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/journald.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/journald.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/journald.conf': 'MD5 check failed' - ) << \SHAR_EOF -ea3c97c4a558fbfdf53304f77275ef8a cloud_scripts/etc/systemd/journald.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/journald.conf'` -ne 80 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/journald.conf' is not 80" - fi -fi -# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service -M[[N_6U5N:71="D1E/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service': 'MD5 check failed' - ) << \SHAR_EOF -58d4e646ee66ac7c470796bd6ce9e2a6 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service'` -ne 156 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service' is not 156" - fi -fi -# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service -M[[N_6U5N:71="D1E/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service': 'MD5 check failed' - ) << \SHAR_EOF -027a172fad275171647740477b78ca93 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service'` -ne 143 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service' is not 143" - fi -fi -# ============= cloud_scripts/etc/systemd/system/cloud.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud.service' && -[Unit] -Description=CloudStack Agent service -After=cloud-early-config.service network.target cloud-postinit.service local-fs.target -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=simple -WorkingDirectory=/usr/local/cloud/systemvm -ExecStart=/usr/local/cloud/systemvm/_run.sh -Restart=on-failure -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/cloud.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud.service': 'MD5 check failed' - ) << \SHAR_EOF -b7eb67763e7d694ed98758faef961ac6 cloud_scripts/etc/systemd/system/cloud.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud.service'` -ne 298 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud.service' is not 298" - fi -fi -# ============= cloud_scripts/etc/systemd/system/open-vm-tools.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/open-vm-tools.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/open-vm-tools.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/open-vm-tools.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/open-vm-tools.service -M[[N_6U5N:71="D1E&5C4W1A/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/open-vm-tools.service': 'MD5 check failed' - ) << \SHAR_EOF -10af19a17cd3ee299f08c46bace0f56f cloud_scripts/etc/systemd/system/open-vm-tools.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/open-vm-tools.service'` -ne 280 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/open-vm-tools.service' is not 280" - fi -fi -# ============= cloud_scripts/etc/systemd/system/baremetal-vr.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/baremetal-vr.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/baremetal-vr.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/baremetal-vr.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/baremetal-vr.service' && -[Unit] -Description=CloudStack Baremetal VR service -After=network.target local-fs.target -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=simple -WorkingDirectory=/opt/cloud/bin -ExecStart=/usr/bin/python /opt/cloud/bin/baremetal-vr.py -Restart=on-failure -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/baremetal-vr.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/baremetal-vr.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/baremetal-vr.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/baremetal-vr.service': 'MD5 check failed' - ) << \SHAR_EOF -9fc2a325a709e7cf9ae4d4ec8b7e692a cloud_scripts/etc/systemd/system/baremetal-vr.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/baremetal-vr.service'` -ne 257 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/baremetal-vr.service' is not 257" - fi -fi -# ============= cloud_scripts/etc/systemd/system/xe-daemon.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/xe-daemon.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/xe-daemon.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/xe-daemon.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/xe-daemon.service -M[[N_6U5N:71="D1E&5N+FUO=6YT"D)E9F]R93UN971W;W)K+G1A -M2UC;VYF:6&5C -M4W1A&5C4W1A3UM=6QT:2UU/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/xe-daemon.service': 'MD5 check failed' - ) << \SHAR_EOF -51e30000a8c2d2a91ba1a372bc40a628 cloud_scripts/etc/systemd/system/xe-daemon.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/xe-daemon.service'` -ne 398 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/xe-daemon.service' is not 398" - fi -fi -# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service -M[[N_6U5N:71="D1E5]D865M;VX@+6X*"EM);G-T86QL70I786YT961">3UM=6QT:2UU -*/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service': 'MD5 check failed' - ) << \SHAR_EOF -b1d4d295d2f3dff1ed1e13835e365e86 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service'` -ne 190 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service' is not 190" - fi -fi -# ============= cloud_scripts/etc/systemd/system/cloud-early-config.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-early-config.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-early-config.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-early-config.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-early-config.service' && -[Unit] -Description=CloudStack post-boot patching service using cmdline -DefaultDependencies=no -X -Before=network-pre.target -Wants=network-pre.target -X -Requires=local-fs.target -After=local-fs.target -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=oneshot -ExecStart=/opt/cloud/bin/setup/cloud-early-config -RemainAfterExit=true -TimeoutStartSec=5min -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-early-config.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/cloud-early-config.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-early-config.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-early-config.service': 'MD5 check failed' - ) << \SHAR_EOF -60723561261aa16ed4477c5e02c52bcd cloud_scripts/etc/systemd/system/cloud-early-config.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-early-config.service'` -ne 348 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-early-config.service' is not 348" - fi -fi -# ============= cloud_scripts/etc/systemd/system/cloud-password-server@.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-password-server@.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-password-server@.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' && -[Unit] -Description=Cloud password server on %I -After=network.target local-fs.target -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=simple -WorkingDirectory=/opt/cloud/bin -ExecStart=/opt/cloud/bin/passwd_server_ip.py %I -Restart=on-failure -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-password-server@.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-password-server@.service': 'MD5 check failed' - ) << \SHAR_EOF -3edb13a39635749f16f0579b481c5f25 cloud_scripts/etc/systemd/system/cloud-password-server@.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-password-server@.service'` -ne 244 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' is not 244" - fi -fi -# ============= cloud_scripts/etc/systemd/system/cloud-postinit.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-postinit.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-postinit.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-postinit.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-postinit.service' && -[Unit] -Description=CloudStack post-patching init script -After=cloud-early-config.service network.target local-fs.target -Before=ssh.service -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=oneshot -ExecStart=/opt/cloud/bin/setup/postinit.sh -RemainAfterExit=true -TimeoutStartSec=10min -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-postinit.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/cloud-postinit.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-postinit.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-postinit.service': 'MD5 check failed' - ) << \SHAR_EOF -22b48cd2a7478d27cb155d32cc2610cb cloud_scripts/etc/systemd/system/cloud-postinit.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-postinit.service'` -ne 287 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-postinit.service' is not 287" - fi -fi -# ============= cloud_scripts/etc/iptables/rules ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/rules' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/rules (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/rules (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/rules' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT --A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT --A INPUT -i eth0 -p tcp -m state --state NEW --dport 8080 -j ACCEPT --A INPUT -i eth0 -p tcp -m state --state NEW --dport 80 -j ACCEPT --A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth0 -o eth2 -j ACCEPT --A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/rules' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/rules' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/rules failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/rules': 'MD5 check failed' - ) << \SHAR_EOF -e2be370a53cd4e436ce4c298b16ead21 cloud_scripts/etc/iptables/rules -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/rules'` -ne 1731 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/rules' is not 1731" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-consoleproxy ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-consoleproxy' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-consoleproxy (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-consoleproxy (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-consoleproxy' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] --A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp --icmp-type 13 -j DROP --A INPUT -p icmp -j ACCEPT --A INPUT -i eth1 -p tcp -m state --state NEW -m tcp --dport 3922 -j ACCEPT --A INPUT -i eth0 -p tcp -m state --state NEW -m tcp --dport 8001 -j ACCEPT --A INPUT -i eth1 -p tcp -m state --state NEW -m tcp --dport 8001 -j ACCEPT --A INPUT -i eth2 -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT --A INPUT -i eth2 -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-consoleproxy' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/iptables-consoleproxy' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-consoleproxy failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-consoleproxy': 'MD5 check failed' - ) << \SHAR_EOF -2840365dad7fe832ea35d8f72a3bfdca cloud_scripts/etc/iptables/iptables-consoleproxy -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-consoleproxy'` -ne 1601 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-consoleproxy' is not 1601" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-router ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-router' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-router (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-router (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-router' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] -:FW_EGRESS_RULES - [0:0] -:FW_OUTBOUND - [0:0] --A INPUT -d 224.0.0.18/32 -j ACCEPT --A INPUT -d 225.0.0.50/32 -j ACCEPT --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT --A INPUT -i eth1 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp -m state --state NEW --dport 80 -j ACCEPT --A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth0 -o eth0 -m state --state NEW -j ACCEPT --A FORWARD -i eth0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth0 -o eth2 -j FW_OUTBOUND --A FW_EGRESS_RULES -j ACCEPT --I FW_OUTBOUND -m state --state RELATED,ESTABLISHED -j ACCEPT --A FW_OUTBOUND -j FW_EGRESS_RULES -COMMIT -*mangle -:PREROUTING ACCEPT [0:0] -:INPUT ACCEPT [0:0] -:FORWARD ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] --A PREROUTING -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark --A POSTROUTING -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-router' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/iptables-router' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-router failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-router': 'MD5 check failed' - ) << \SHAR_EOF -aeabe6897f9969f64a87b793deee6500 cloud_scripts/etc/iptables/iptables-router -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-router'` -ne 2348 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-router' is not 2348" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-vpcrouter ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-vpcrouter' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-vpcrouter (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-vpcrouter (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-vpcrouter' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] --A INPUT -d 224.0.0.18/32 -j ACCEPT --A INPUT -d 225.0.0.50/32 -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT --A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT --A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT -COMMIT -*mangle -:PREROUTING ACCEPT [0:0] -:INPUT ACCEPT [0:0] -:FORWARD ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] --A OUTPUT -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-vpcrouter' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/iptables-vpcrouter' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-vpcrouter failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-vpcrouter': 'MD5 check failed' - ) << \SHAR_EOF -f3e4459f3b0eea8f2de2a6f01ef79866 cloud_scripts/etc/iptables/iptables-vpcrouter -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-vpcrouter'` -ne 1465 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-vpcrouter' is not 1465" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-dhcpsrvr ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-dhcpsrvr (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-dhcpsrvr (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] -:FW_EGRESS_RULES - [0:0] -:FW_OUTBOUND - [0:0] --A INPUT -d 224.0.0.18/32 -j ACCEPT --A INPUT -d 225.0.0.50/32 -j ACCEPT --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT --A INPUT -i eth1 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp -m state --state NEW --dport 80 -j ACCEPT --A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth0 -o eth0 -m state --state NEW -j ACCEPT --A FORWARD -i eth0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth0 -o eth2 -j FW_OUTBOUND --A FW_EGRESS_RULES -j ACCEPT --I FW_OUTBOUND -m state --state RELATED,ESTABLISHED -j ACCEPT --A FW_OUTBOUND -j FW_EGRESS_RULES -COMMIT -*mangle -:PREROUTING ACCEPT [0:0] -:INPUT ACCEPT [0:0] -:FORWARD ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] --A PREROUTING -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark --A POSTROUTING -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-dhcpsrvr failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-dhcpsrvr': 'MD5 check failed' - ) << \SHAR_EOF -aeabe6897f9969f64a87b793deee6500 cloud_scripts/etc/iptables/iptables-dhcpsrvr -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-dhcpsrvr'` -ne 2348 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' is not 2348" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-elbvm ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-elbvm' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-elbvm (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-elbvm (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-elbvm' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-elbvm' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/iptables/iptables-elbvm' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-elbvm failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-elbvm': 'MD5 check failed' - ) << \SHAR_EOF -7a950ed86376c0166c53943cdf68ccb2 cloud_scripts/etc/iptables/iptables-elbvm -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-elbvm'` -ne 1256 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-elbvm' is not 1256" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-secstorage ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-secstorage' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-secstorage (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-secstorage (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-secstorage' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] -:HTTP - [0:0] --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth3 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -p icmp --icmp-type 13 -j DROP --A INPUT -p icmp -j ACCEPT --A INPUT -i eth0 -p tcp -m state --state NEW --dport 3922 -j ACCEPT -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-secstorage' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/iptables/iptables-secstorage' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-secstorage failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-secstorage': 'MD5 check failed' - ) << \SHAR_EOF -d031185b81ee7ee008b80d434d44b61d cloud_scripts/etc/iptables/iptables-secstorage -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-secstorage'` -ne 1375 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-secstorage' is not 1375" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-ilbvm ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-ilbvm' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-ilbvm (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-ilbvm (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-ilbvm' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-ilbvm' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/iptables/iptables-ilbvm' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-ilbvm failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-ilbvm': 'MD5 check failed' - ) << \SHAR_EOF -85129e942bc07d1fb67e0e169238c345 cloud_scripts/etc/iptables/iptables-ilbvm -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-ilbvm'` -ne 1192 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-ilbvm' is not 1192" - fi -fi -# ============= cloud_scripts/etc/iptables/rt_tables_init ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/rt_tables_init' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/rt_tables_init (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/rt_tables_init (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/rt_tables_init' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -# -# reserved values -# -255 local -254 main -253 default -0 unspec -# -# local -# -#1 inr.ruhep -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/rt_tables_init' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/rt_tables_init' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/rt_tables_init failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/rt_tables_init': 'MD5 check failed' - ) << \SHAR_EOF -86477f42d18121a176751c7284251089 cloud_scripts/etc/iptables/rt_tables_init -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/rt_tables_init'` -ne 897 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/rt_tables_init' is not 897" - fi -fi -# ============= cloud_scripts/etc/sysctl.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/sysctl.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/sysctl.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/sysctl.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/sysctl.conf' && -# Kernel sysctl configuration file -# -# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and -# sysctl.conf(5) for more details. -# @VERSION@ -X -# Controls IP packet forwarding -net.ipv4.ip_forward = 1 -X -# Controls source route verification -net.ipv4.conf.default.rp_filter = 0 -X -# Do not accept source routing -net.ipv4.conf.default.accept_source_route = 0 -X -# Respect local interface in ARP interactions -net.ipv4.conf.default.arp_announce = 2 -net.ipv4.conf.default.arp_ignore = 2 -net.ipv4.conf.all.arp_announce = 2 -net.ipv4.conf.all.arp_ignore = 2 -X -# IPSec NETKEY -- avoid bogus redirects -net.ipv4.conf.all.accept_redirects = 0 -net.ipv4.conf.default.accept_redirects = 0 -net.ipv4.conf.all.send_redirects = 0 -net.ipv4.conf.default.send_redirects = 0 -net.ipv4.conf.all.secure_redirects = 0 -net.ipv4.conf.default.secure_redirects = 0 -X -# For smooth transition of the vip address in case of a keepalived failover -net.ipv4.ip_nonlocal_bind = 1 -X -# Controls the System Request debugging functionality of the kernel -kernel.sysrq = 0 -X -# Controls whether core dumps will append the PID to the core filename. -# Useful for debugging multi-threaded applications. -kernel.core_uses_pid = 1 -X -# A better way for the instance to die -kernel.panic = 10 -kernel.panic_on_oops = 1 -vm.panic_on_oom = 1 -X -# Controls the use of TCP syncookies -net.ipv4.tcp_syncookies = 1 -X -# disable tcp time stamps -net.ipv4.tcp_timestamps = 0 -X -net.ipv4.tcp_tw_reuse = 1 -net.ipv4.tcp_max_tw_buckets = 1000000 -net.core.somaxconn = 65535 -net.nf_conntrack_max = 1000000 -net.netfilter.nf_conntrack_max = 1000000 -X -# Disable IPv6 -net.ipv6.conf.all.disable_ipv6 = 1 -net.ipv6.conf.all.forwarding = 0 -net.ipv6.conf.all.accept_ra = 0 -net.ipv6.conf.all.accept_redirects = 0 -net.ipv6.conf.all.autoconf = 0 -X -# Minimum swappiness without disabling it -vm.swappiness=1 -X -# make the kernel more aggressive in reclaiming RAM from the disk and swap caches -vm.vfs_cache_pressure = 200 -X -# try to maintain 'free' memory thereby reducing the size of disk cache, hence reducing swapping. -vm.min_free_kbytes = 20480 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/sysctl.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/sysctl.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/sysctl.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/sysctl.conf': 'MD5 check failed' - ) << \SHAR_EOF -f1cef50b7a8a7cc7a7a24ff08cbea1f8 cloud_scripts/etc/sysctl.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/sysctl.conf'` -ne 2049 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/sysctl.conf' is not 2049" - fi -fi -# ============= cloud_scripts/etc/xl2tpd/xl2tpd.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/xl2tpd/xl2tpd.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/xl2tpd/xl2tpd.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' && -[lns default] -ip range = 10.1.9.2-10.1.9.8 -local ip = 10.1.9.1 -require chap = yes -refuse pap = yes -pppoptfile = /etc/ppp/options.xl2tpd -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/xl2tpd/xl2tpd.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/xl2tpd/xl2tpd.conf': 'MD5 check failed' - ) << \SHAR_EOF -060f03388ae34c64f85a45f47c9f6d48 cloud_scripts/etc/xl2tpd/xl2tpd.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/xl2tpd/xl2tpd.conf'` -ne 139 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' is not 139" - fi -fi -# ============= cloud_scripts/etc/dnsmasq.conf.tmpl ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/dnsmasq.conf.tmpl' -then -${echo} "x - SKIPPING cloud_scripts/etc/dnsmasq.conf.tmpl (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/dnsmasq.conf.tmpl (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/dnsmasq.conf.tmpl' && -# Configuration file for dnsmasq. -# -# Format is one option per line, legal options are the same -# as the long options legal on the command line. See -# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. -X -# Listen on this specific port instead of the standard DNS port -# (53). Setting this to zero completely disables DNS function, -# leaving only DHCP and/or TFTP. -#port=5353 -X -# The following two options make you a better netizen, since they -# tell dnsmasq to filter out queries which the public DNS cannot -# answer, and which load the servers (especially the root servers) -# unnecessarily. If you have a dial-on-demand link they also stop -# these requests from bringing up the link unnecessarily. -X -# Never forward plain names (without a dot or domain part) -domain-needed -# Never forward addresses in the non-routed address spaces. -bogus-priv -X -X -# Uncomment this to filter useless windows-originated DNS requests -# which can trigger dial-on-demand links needlessly. -# Note that (amongst other things) this blocks all SRV requests, -# so don't use it if you use eg Kerberos, SIP, XMMP or Google-talk. -# This option only affects forwarding, SRV records originating for -# dnsmasq (via srv-host= lines) are not suppressed by it. -# filterwin2k -X -# Change this line if you want dns to get its upstream servers from -# somewhere other that /etc/resolv.conf -resolv-file=/etc/dnsmasq-resolv.conf -X -# By default, dnsmasq will send queries to any of the upstream -# servers it knows about and tries to favour servers to are known -# to be up. Uncommenting this forces dnsmasq to try each query -# with each server strictly in the order they appear in -# /etc/resolv.conf -#strict-order -X -# If you don't want dnsmasq to read /etc/resolv.conf or any other -# file, getting its servers from this file instead (see below), then -# uncomment this. -#no-resolv -X -# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv -# files for changes and re-read them then uncomment this. -#no-poll -X -# Add other name servers here, with domain specs if they are for -# non-public domains. -#server=/localnet/192.168.0.1 -X -# Example of routing PTR queries to nameservers: this will send all -# address->name queries for 192.168.3/24 to nameserver 10.1.2.3 -#server=/3.168.192.in-addr.arpa/10.1.2.3 -X -# Add local-only domains here, queries in these domains are answered -# from /etc/hosts or DHCP only. -local=/2.vmops-test.vmops.com/ -X -# Add domains which you want to force to an IP address here. -# The example below send any host in double-click.net to a local -# web-server. -#address=/double-click.net/127.0.0.1 -X -# --address (and --server) work with IPv6 addresses too. -#address=/www.thekelleys.org.uk/fe80::20d:60ff:fe36:f83 -X -# You can control how dnsmasq talks to a server: this forces -# queries to 10.1.2.3 to be routed via eth1 -# server=10.1.2.3@eth1 -X -# and this sets the source (ie local) address used to talk to -# 10.1.2.3 to 192.168.1.1 port 55 (there must be a interface with that -# IP on the machine, obviously). -# server=10.1.2.3@192.168.1.1#55 -X -# If you want dnsmasq to change uid and gid to something other -# than the default, edit the following lines. -#user= -#group= -X -# If you want dnsmasq to listen for DHCP and DNS requests only on -# specified interfaces (and the loopback) give the name of the -# interface (eg eth0) here. -# Repeat the line for more than one interface. -#interface=eth0 -# Or you can specify which interface _not_ to listen on -except-interface=eth1 -except-interface=eth2 -except-interface=lo -# Or which to listen on by address (remember to include 127.0.0.1 if -# you use this.) -#listen-address= -# If you want dnsmasq to provide only DNS service on an interface, -# configure it as shown above, and then use the following line to -# disable DHCP and TFTP on it. -no-dhcp-interface=eth1 -no-dhcp-interface=eth2 -X -# On systems which support it, dnsmasq binds the wildcard address, -# even when it is listening on only some interfaces. It then discards -# requests that it shouldn't reply to. This has the advantage of -# working even when interfaces come and go and change address. If you -# want dnsmasq to really bind only the interfaces it is listening on, -# uncomment this option. About the only time you may need this is when -# running another nameserver on the same machine. -#bind-interfaces -X -# If you don't want dnsmasq to read /etc/hosts, uncomment the -# following line. -#no-hosts -# or if you want it to read another file, as well as /etc/hosts, use -# this. -#addn-hosts=/etc/banner_add_hosts -X -# Set this (and domain: see below) if you want to have a domain -# automatically added to simple names in a hosts-file. -expand-hosts -X -# Set the domain for dnsmasq. this is optional, but if it is set, it -# does the following things. -# 1) Allows DHCP hosts to have fully qualified domain names, as long -# as the domain part matches this setting. -# 2) Sets the "domain" DHCP option thereby potentially setting the -# domain of all systems configured by DHCP -# 3) Provides the domain part for "expand-hosts" -domain=2.vmops-test.vmops.com -X -# Set a different domain for a particular subnet -#domain=wireless.thekelleys.org.uk,192.168.2.0/24 -X -# Same idea, but range rather then subnet -#domain=reserved.thekelleys.org.uk,192.68.3.100,192.168.3.200 -X -# Uncomment this to enable the integrated DHCP server, you need -# to supply the range of addresses available for lease and optionally -# a lease time. If you have more than one network, you will need to -# repeat this for each network on which you want to supply DHCP -# service. -dhcp-range_ip4=10.1.1.1,static -dhcp-range_ip6=::1,static -dhcp-hostsfile=/etc/dhcphosts.txt -X -# This is an example of a DHCP range where the netmask is given. This -# is needed for networks we reach the dnsmasq DHCP server via a relay -# agent. If you don't know what a DHCP relay agent is, you probably -# don't need to worry about this. -#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h -X -# This is an example of a DHCP range which sets a tag, so that -# some DHCP options may be set only for this network. -#dhcp-range=set:red,192.168.0.50,192.168.0.150 -X -# Use this DHCP range only when the tag "green" is set. -#dhcp-range=tag:green,192.168.0.50,192.168.0.150,12h -X -# Specify a subnet which can't be used for dynamic address allocation, -# is available for hosts with matching --dhcp-host lines. Note that -# dhcp-host declarations will be ignored unless there is a dhcp-range -# of some type for the subnet in question. -# In this case the netmask is implied (it comes from the network -# configuration on the machine running dnsmasq) it is possible to give -# an explicit netmask instead. -#dhcp-range=192.168.0.0,static -X -# Enable DHCPv6. Note that the prefix-length does not need to be specified -# and defaults to 64 if missing/ -#dhcp-range=1234::2, 1234::500, 64, 12h -X -# Do Router Advertisements, BUT NOT DHCP for this subnet. -#dhcp-range=1234::, ra-only -X -# Do Router Advertisements, BUT NOT DHCP for this subnet, also try and -# add names to the DNS for the IPv6 address of SLAAC-configured dual-stack -# hosts. Use the DHCPv4 lease to derive the name, network segment and -# MAC address and assume that the host will also have an -# IPv6 address calculated using the SLAAC alogrithm. -#dhcp-range=1234::, ra-names -X -# Do Router Advertisements, BUT NOT DHCP for this subnet. -# Set the lifetime to 46 hours. (Note: minimum lifetime is 2 hours.) -#dhcp-range=1234::, ra-only, 48h -X -# Do DHCP and Router Advertisements for this subnet. Set the A bit in the RA -# so that clients can use SLAAC addresses as well as DHCP ones. -#dhcp-range=1234::2, 1234::500, slaac -X -# Do Router Advertisements and stateless DHCP for this subnet. Clients will -# not get addresses from DHCP, but they will get other configuration information. -# They will use SLAAC for addresses. -#dhcp-range=1234::, ra-stateless -X -# Do stateless DHCP, SLAAC, and generate DNS names for SLAAC addresses -# from DHCPv4 leases. -#dhcp-range=1234::, ra-stateless, ra-names -X -# Do router advertisements for all subnets where we're doing DHCPv6 -# Unless overriden by ra-stateless, ra-names, et al, the router -# advertisements will have the M and O bits set, so that the clients -# get addresses and configuration from DHCPv6, and the A bit reset, so the -# clients don't use SLAAC addresses. -#enable-ra -X -# Supply parameters for specified hosts using DHCP. There are lots -# of valid alternatives, so we will give examples of each. Note that -# IP addresses DO NOT have to be in the range given above, they just -# need to be on the same network. The order of the parameters in these -# do not matter, it's permissible to give name, address and MAC in any -# order. -X -# Always allocate the host with Ethernet address 11:22:33:44:55:66 -# The IP address 192.168.0.60 -#dhcp-host=11:22:33:44:55:66,192.168.0.60 -X -# Always set the name of the host with hardware address -# 11:22:33:44:55:66 to be "fred" -#dhcp-host=11:22:33:44:55:66,fred -X -# Always give the host with Ethernet address 11:22:33:44:55:66 -# the name fred and IP address 192.168.0.60 and lease time 45 minutes -#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m -X -# Give a host with Ethernet address 11:22:33:44:55:66 or -# 12:34:56:78:90:12 the IP address 192.168.0.60. Dnsmasq will assume -# that these two Ethernet interfaces will never be in use at the same -# time, and give the IP address to the second, even if it is already -# in use by the first. Useful for laptops with wired and wireless -# addresses. -#dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.60 -X -# Give the machine which says its name is "bert" IP address -# 192.168.0.70 and an infinite lease -#dhcp-host=bert,192.168.0.70,infinite -X -# Always give the host with client identifier 01:02:02:04 -# the IP address 192.168.0.60 -#dhcp-host=id:01:02:02:04,192.168.0.60 -X -# Always give the host with client identifier "marjorie" -# the IP address 192.168.0.60 -#dhcp-host=id:marjorie,192.168.0.60 -X -# Enable the address given for "judge" in /etc/hosts -# to be given to a machine presenting the name "judge" when -# it asks for a DHCP lease. -#dhcp-host=judge -X -# Never offer DHCP service to a machine whose Ethernet -# address is 11:22:33:44:55:66 -#dhcp-host=11:22:33:44:55:66,ignore -X -# Ignore any client-id presented by the machine with Ethernet -# address 11:22:33:44:55:66. This is useful to prevent a machine -# being treated differently when running under different OS's or -# between PXE boot and OS boot. -#dhcp-host=11:22:33:44:55:66,id:* -X -# Send extra options which are tagged as "red" to -# the machine with Ethernet address 11:22:33:44:55:66 -#dhcp-host=11:22:33:44:55:66,set:red -X -# Send extra options which are tagged as "red" to -# any machine with Ethernet address starting 11:22:33: -#dhcp-host=11:22:33:*:*:*,set:red -X -# Give a fixed IPv6 address and name to client with -# DUID 00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2 -# Note the MAC addresses CANNOT be used to identify DHCPv6 clients. -# Note also the they [] around the IPv6 address are obilgatory. -#dhcp-host=id:00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2, fred, [1234::5] -X -# Ignore any clients which are not specified in dhcp-host lines -# or /etc/ethers. Equivalent to ISC "deny unknown-clients". -# This relies on the special "known" tag which is set when -# a host is matched. -# -# When using bridged networks in ACS this prevents ack to DHCPINFORM etc. request -dhcp-ignore=tag:!known -X -# Send extra options which are tagged as "red" to any machine whose -# DHCP vendorclass string includes the substring "Linux" -#dhcp-vendorclass=set:red,Linux -X -# Send extra options which are tagged as "red" to any machine one -# of whose DHCP userclass strings includes the substring "accounts" -#dhcp-userclass=set:red,accounts -X -# Send extra options which are tagged as "red" to any machine whose -# MAC address matches the pattern. -#dhcp-mac=set:red,00:60:8C:*:*:* -X -# If this line is uncommented, dnsmasq will read /etc/ethers and act -# on the ethernet-address/IP pairs found there just as if they had -# been given as --dhcp-host options. Useful if you keep -# MAC-address/host mappings there for other purposes. -#read-ethers -X -# Send options to hosts which ask for a DHCP lease. -# See RFC 2132 for details of available options. -# Common options can be given to dnsmasq by name: -# run "dnsmasq --help dhcp" to get a list. -# Note that all the common settings, such as netmask and -# broadcast address, DNS server and default route, are given -# sane defaults by dnsmasq. You very likely will not need -# any dhcp-options. If you use Windows clients and Samba, there -# are some options which are recommended, they are detailed at the -# end of this section. -X -# Override the default route supplied by dnsmasq, which assumes the -# router is the same machine as the one running dnsmasq. -#dhcp-option=3,1.2.3.4 -X -# Do the same thing, but using the option name -#dhcp-option=option:router,1.2.3.4 -X -# Override the default route supplied by dnsmasq and send no default -# route at all. Note that this only works for the options sent by -# default (1, 3, 6, 12, 28) the same line will send a zero-length option -# for all other option numbers. -#dhcp-option=3 -X -# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 -#dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5 -X -# Send DHCPv6 option. Note [] around IPv6 addresses. -#dhcp-option=option6:dns-server,[1234::77],[1234::88] -X -# Send DHCPv6 option for namservers as the machine running -# dnsmasq and another. -#dhcp-option=option6:dns-server,[::],[1234::88] -X -# Set the NTP time server address to be the same machine as -# is running dnsmasq -#dhcp-option=42,0.0.0.0 -X -# Set the NIS domain name to "welly" -#dhcp-option=40,welly -X -# Set the default time-to-live to 50 -#dhcp-option=23,50 -X -# Set the "all subnets are local" flag -#dhcp-option=27,1 -X -# Set the domain -dhcp-option=15,"2.vmops-test.vmops.com" -X -# Send the etherboot magic flag and then etherboot options (a string). -#dhcp-option=128,e4:45:74:68:00:00 -#dhcp-option=129,NIC=eepro100 -X -# Specify an option which will only be sent to the "red" network -# (see dhcp-range for the declaration of the "red" network) -# Note that the tag: part must precede the option: part. -#dhcp-option = tag:red, option:ntp-server, 192.168.1.1 -X -# The following DHCP options set up dnsmasq in the same way as is specified -# for the ISC dhcpcd in -# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt -# adapted for a typical dnsmasq installation where the host running -# dnsmasq is also the host running samba. -# you may want to uncomment some or all of them if you use -# Windows clients and Samba. -#dhcp-option=19,0 # option ip-forwarding off -#dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) -#dhcp-option=45,0.0.0.0 # netbios datagram distribution server -#dhcp-option=46,8 # netbios node type -X -# Send an empty WPAD option. This may be REQUIRED to get windows 7 to behave. -#dhcp-option=252,"\n" -X -# Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client -# probably doesn't support this...... -#dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com -X -# Send RFC-3442 classless static routes (note the netmask encoding) -#dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8 -X -# Send vendor-class specific options encapsulated in DHCP option 43. -# The meaning of the options is defined by the vendor-class so -# options are sent only when the client supplied vendor class -# matches the class given here. (A substring match is OK, so "MSFT" -# matches "MSFT" and "MSFT 5.0"). This example sets the -# mtftp address to 0.0.0.0 for PXEClients. -#dhcp-option=vendor:PXEClient,1,0.0.0.0 -X -# Send microsoft-specific option to tell windows to release the DHCP lease -# when it shuts down. Note the "i" flag, to tell dnsmasq to send the -# value as a four-byte integer - that's what microsoft wants. See -# http://technet2.microsoft.com/WindowsServer/en/library/a70f1bb7-d2d4-49f0-96d6-4b7414ecfaae1033.mspx?mfr=true -dhcp-option=vendor:MSFT,2,1i -X -# Send the Encapsulated-vendor-class ID needed by some configurations of -# Etherboot to allow is to recognise the DHCP server. -#dhcp-option=vendor:Etherboot,60,"Etherboot" -X -# Send options to PXELinux. Note that we need to send the options even -# though they don't appear in the parameter request list, so we need -# to use dhcp-option-force here. -# See http://syslinux.zytor.com/pxe.php#special for details. -# Magic number - needed before anything else is recognised -#dhcp-option-force=208,f1:00:74:7e -# Configuration file name -#dhcp-option-force=209,configs/common -# Path prefix -#dhcp-option-force=210,/tftpboot/pxelinux/files/ -# Reboot time. (Note 'i' to send 32-bit value) -#dhcp-option-force=211,30i -X -# Set the boot filename for netboot/PXE. You will only need -# this is you want to boot machines over the network and you will need -# a TFTP server; either dnsmasq's built in TFTP server or an -# external one. (See below for how to enable the TFTP server.) -dhcp-boot=pxelinux.0 -X -# The same as above, but use custom tftp-server instead machine running dnsmasq -#dhcp-boot=pxelinux,server.name,192.168.1.100 -X -# Boot for Etherboot gPXE. The idea is to send two different -# filenames, the first loads gPXE, and the second tells gPXE what to -# load. The dhcp-match sets the gpxe tag for requests from gPXE. -#dhcp-match=set:gpxe,175 # gPXE sends a 175 option. -#dhcp-boot=tag:!gpxe,undionly.kpxe -#dhcp-boot=mybootimage -X -# Encapsulated options for Etherboot gPXE. All the options are -# encapsulated within option 175 -#dhcp-option=encap:175, 1, 5b # priority code -#dhcp-option=encap:175, 176, 1b # no-proxydhcp -#dhcp-option=encap:175, 177, string # bus-id -#dhcp-option=encap:175, 189, 1b # BIOS drive code -#dhcp-option=encap:175, 190, user # iSCSI username -#dhcp-option=encap:175, 191, pass # iSCSI password -X -# Test for the architecture of a netboot client. PXE clients are -# supposed to send their architecture as option 93. (See RFC 4578) -#dhcp-match=peecees, option:client-arch, 0 #x86-32 -#dhcp-match=itanics, option:client-arch, 2 #IA64 -#dhcp-match=hammers, option:client-arch, 6 #x86-64 -#dhcp-match=mactels, option:client-arch, 7 #EFI x86-64 -X -# Do real PXE, rather than just booting a single file, this is an -# alternative to dhcp-boot. -#pxe-prompt="What system shall I netboot?" -# or with timeout before first available action is taken: -#pxe-prompt="Press F8 for menu.", 60 -X -# Available boot services. for PXE. -#pxe-service=x86PC, "Boot from local disk" -X -# Loads /pxelinux.0 from dnsmasq TFTP server. -#pxe-service=x86PC, "Install Linux", pxelinux -X -# Loads /pxelinux.0 from TFTP server at 1.2.3.4. -# Beware this fails on old PXE ROMS. -#pxe-service=x86PC, "Install Linux", pxelinux, 1.2.3.4 -X -# Use bootserver on network, found my multicast or broadcast. -#pxe-service=x86PC, "Install windows from RIS server", 1 -X -# Use bootserver at a known IP address. -#pxe-service=x86PC, "Install windows from RIS server", 1, 1.2.3.4 -X -# If you have multicast-FTP available, -# information for that can be passed in a similar way using options 1 -# to 5. See page 19 of -# http://download.intel.com/design/archives/wfm/downloads/pxespec.pdf -X -X -# Enable dnsmasq's built-in TFTP server -enable-tftp -X -# Set the root directory for files available via FTP. -tftp-root=/opt/tftpboot -X -# Make the TFTP server more secure: with this set, only files owned by -# the user dnsmasq is running as will be send over the net. -#tftp-secure -X -# This option stops dnsmasq from negotiating a larger blocksize for TFTP -# transfers. It will slow things down, but may rescue some broken TFTP -# clients. -#tftp-no-blocksize -X -# Set the boot file name only when the "red" tag is set. -#dhcp-boot=net:red,pxelinux.red-net -X -# An example of dhcp-boot with an external TFTP server: the name and IP -# address of the server are given after the filename. -# Can fail with old PXE ROMS. Overridden by --pxe-service. -#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 -X -# If there are multiple external tftp servers having a same name -# (using /etc/hosts) then that name can be specified as the -# tftp_servername (the third option to dhcp-boot) and in that -# case dnsmasq resolves this name and returns the resultant IP -# addresses in round robin fasion. This facility can be used to -# load balance the tftp load among a set of servers. -#dhcp-boot=/var/ftpd/pxelinux.0,boothost,tftp_server_name -X -# Set the limit on DHCP leases, the default is 150 -dhcp-lease-max=2100 -X -# The DHCP server needs somewhere on disk to keep its lease database. -# This defaults to a sane location, but if you want to change it, use -# the line below. -#dhcp-leasefile=/var/lib/misc/dnsmasq.leases -leasefile-ro -X -# Set the DHCP server to authoritative mode. In this mode it will barge in -# and take over the lease for any client which broadcasts on the network, -# whether it has a record of the lease or not. This avoids long timeouts -# when a machine wakes up on a new network. DO NOT enable this if there's -# the slightest chance that you might end up accidentally configuring a DHCP -# server for your campus/company accidentally. The ISC server uses -# the same option, and this URL provides more information: -# http://www.isc.org/files/auth.html -#dhcp-authoritative -X -# Run an executable when a DHCP lease is created or destroyed. -# The arguments sent to the script are "add" or "del", -# then the MAC address, the IP address and finally the hostname -# if there is one. -#dhcp-script=/bin/echo -X -# Set the cachesize here. -#cache-size=150 -X -# If you want to disable negative caching, uncomment this. -#no-negcache -X -# Normally responses which come form /etc/hosts and the DHCP lease -# file have Time-To-Live set as zero, which conventionally means -# do not cache further. If you are happy to trade lower load on the -# server for potentially stale date, you can set a time-to-live (in -# seconds) here. -#local-ttl= -X -# If you want dnsmasq to detect attempts by Verisign to send queries -# to unregistered .com and .net hosts to its sitefinder service and -# have dnsmasq instead return the correct NXDOMAIN response, uncomment -# this line. You can add similar lines to do the same for other -# registries which have implemented wildcard A records. -#bogus-nxdomain=64.94.110.11 -X -# If you want to fix up DNS results from upstream servers, use the -# alias option. This only works for IPv4. -# This alias makes a result of 1.2.3.4 appear as 5.6.7.8 -#alias=1.2.3.4,5.6.7.8 -# and this maps 1.2.3.x to 5.6.7.x -#alias=1.2.3.0,5.6.7.0,255.255.255.0 -# and this maps 192.168.0.10->192.168.0.40 to 10.0.0.10->10.0.0.40 -#alias=192.168.0.10-192.168.0.40,10.0.0.0,255.255.255.0 -X -# Change these lines if you want dnsmasq to serve MX records. -X -# Return an MX record named "maildomain.com" with target -# servermachine.com and preference 50 -#mx-host=maildomain.com,servermachine.com,50 -X -# Set the default target for MX records created using the localmx option. -#mx-target=servermachine.com -X -# Return an MX record pointing to the mx-target for all local -# machines. -#localmx -X -# Return an MX record pointing to itself for all local machines. -#selfmx -X -# Change the following lines if you want dnsmasq to serve SRV -# records. These are useful if you want to serve ldap requests for -# Active Directory and other windows-originated DNS requests. -# See RFC 2782. -# You may add multiple srv-host lines. -# The fields are ,,,, -# If the domain part if missing from the name (so that is just has the -# service and protocol sections) then the domain given by the domain= -# config option is used. (Note that expand-hosts does not need to be -# set for this to work.) -X -# A SRV record sending LDAP for the example.com domain to -# ldapserver.example.com port 389 -#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389 -X -# A SRV record sending LDAP for the example.com domain to -# ldapserver.example.com port 389 (using domain=) -#domain=example.com -#srv-host=_ldap._tcp,ldapserver.example.com,389 -X -# Two SRV records for LDAP, each with different priorities -#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1 -#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2 -X -# A SRV record indicating that there is no LDAP server for the domain -# example.com -#srv-host=_ldap._tcp.example.com -X -# The following line shows how to make dnsmasq serve an arbitrary PTR -# record. This is useful for DNS-SD. (Note that the -# domain-name expansion done for SRV records _does_not -# occur for PTR records.) -#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services" -X -# Change the following lines to enable dnsmasq to serve TXT records. -# These are used for things like SPF and zeroconf. (Note that the -# domain-name expansion done for SRV records _does_not -# occur for TXT records.) -X -#Example SPF. -#txt-record=example.com,"v=spf1 a -all" -X -#Example zeroconf -#txt-record=_http._tcp.example.com,name=value,paper=A4 -X -# Provide an alias for a "local" DNS name. Note that this _only_ works -# for targets which are names from DHCP or /etc/hosts. Give host -# "bert" another name, bertrand -#cname=bertand,bert -X -# For debugging purposes, log each DNS query as it passes through -# dnsmasq. -#log-queries -X -# Log lots of extra information about DHCP transactions. -#log-dhcp -X -log-facility=/var/log/dnsmasq.log -X -# Include a another lot of configuration options. -#conf-file=/etc/dnsmasq.more.conf -conf-dir=/etc/dnsmasq.d -X -dhcp-optsfile=/etc/dhcpopts.txt -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/dnsmasq.conf.tmpl' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/dnsmasq.conf.tmpl' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/dnsmasq.conf.tmpl failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/dnsmasq.conf.tmpl': 'MD5 check failed' - ) << \SHAR_EOF -a0f6d4fbdef769352c0b4c6aee0e5b0b cloud_scripts/etc/dnsmasq.conf.tmpl -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/dnsmasq.conf.tmpl'` -ne 25321 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/dnsmasq.conf.tmpl' is not 25321" - fi -fi -# ============= cloud_scripts/etc/cron.daily/clear_cache ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cron.daily/clear_cache' -then -${echo} "x - SKIPPING cloud_scripts/etc/cron.daily/clear_cache (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/cron.daily/clear_cache (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cron.daily/clear_cache' && -#!/bin/bash -X -# clear memory cache to ultimately reduce swapping -X -sync && echo 1 > /proc/sys/vm/drop_caches -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cron.daily/clear_cache' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/cron.daily/clear_cache' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/cron.daily/clear_cache failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cron.daily/clear_cache': 'MD5 check failed' - ) << \SHAR_EOF -7935ce340439ae62c8f12f337d420207 cloud_scripts/etc/cron.daily/clear_cache -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/cron.daily/clear_cache'` -ne 107 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/cron.daily/clear_cache' is not 107" - fi -fi -# ============= cloud_scripts/etc/vmware-tools/tools.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/vmware-tools/tools.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/vmware-tools/tools.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/vmware-tools/tools.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/vmware-tools/tools.conf' && -[logging] -# Turns on logging globally. It can still be disabled for each domain. -# log = true -X -# Disables core dumps on fatal errors; they're enabled by default. -enableCoreDump = false -X -# Defines the "vmsvc" domain, logging to file -# vmsvc.level = message -vmsvc.handler = file -# Setup file rotation - keep 3 files -vmsvc.maxOldLogFiles = 2 -# Max log file size kept: 1 MB -vmsvc.maxLogSize = 1 -X -# Defines the "vmtoolsd" domain, and disable logging for it. -# vmtoolsd.level = none -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/vmware-tools/tools.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/vmware-tools/tools.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/vmware-tools/tools.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/vmware-tools/tools.conf': 'MD5 check failed' - ) << \SHAR_EOF -4d08804e1a2d4526faeec6404c18fabe cloud_scripts/etc/vmware-tools/tools.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/vmware-tools/tools.conf'` -ne 477 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/vmware-tools/tools.conf' is not 477" - fi -fi -# ============= cloud_scripts/etc/logrotate.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.conf' && -# rotate log files daily -daily -# keep 3 days worth -rotate 3 -# create new (empty) log files after rotating old ones -create -# use date as a suffix of the rotated file -#dateext -# max size 50M -size 50M -compress -# RPM packages drop log rotation information into this directory -include /etc/logrotate.d -# no packages own wtmp and btmp -- we'll rotate them here -/var/log/wtmp { -X monthly -X create 0664 root utmp -X rotate 1 -} -/var/log/btmp { -X missingok -X monthly -X create 0600 root utmp -X rotate 1 -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.conf': 'MD5 check failed' - ) << \SHAR_EOF -2430f483d055288c92deb28733562d8f cloud_scripts/etc/logrotate.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.conf'` -ne 507 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.conf' is not 507" - fi -fi -# ============= cloud_scripts/etc/ssh/sshd_config ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ssh/sshd_config' -then -${echo} "x - SKIPPING cloud_scripts/etc/ssh/sshd_config (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/ssh/sshd_config (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ssh/sshd_config' && -# $OpenBSD: sshd_config,v 1.75 2007/03/19 01:01:29 djm Exp $ -X -# This is the sshd server system-wide configuration file. See -# sshd_config(5) for more information. -X -# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin -X -# The strategy used for options in the default sshd_config shipped with -# OpenSSH is to specify options with their default value where -# possible, but leave them commented. Uncommented options change a -# default value. -X -Port 3922 -#AddressFamily any -#ListenAddress 0.0.0.0 -X -# Disable legacy (protocol version 1) support in the server for new -# installations. In future the default will change to require explicit -# activation of protocol 1 -Protocol 2 -X -# HostKey for protocol version 1 -#HostKey /etc/ssh/ssh_host_key -# HostKeys for protocol version 2 -#HostKey /etc/ssh/ssh_host_rsa_key -#HostKey /etc/ssh/ssh_host_dsa_key -X -# Lifetime and size of ephemeral version 1 server key -#KeyRegenerationInterval 1h -#ServerKeyBits 768 -X -# Logging -# obsoletes QuietMode and FascistLogging -#SyslogFacility AUTH -SyslogFacility AUTHPRIV -#LogLevel INFO -X -# Authentication: -X -#LoginGraceTime 2m -PermitRootLogin yes -#StrictModes yes -#MaxAuthTries 6 -X -#RSAAuthentication yes -PubkeyAuthentication yes -AuthorizedKeysFile .ssh/authorized_keys -X -# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts -#RhostsRSAAuthentication no -# similar for protocol version 2 -#HostbasedAuthentication no -# Change to yes if you don't trust ~/.ssh/known_hosts for -# RhostsRSAAuthentication and HostbasedAuthentication -#IgnoreUserKnownHosts no -# Don't read the user's ~/.rhosts and ~/.shosts files -#IgnoreRhosts yes -X -# To disable tunneled clear text passwords, change to no here! -#PermitEmptyPasswords no -PasswordAuthentication no -X -# Change to no to disable s/key passwords -#ChallengeResponseAuthentication yes -ChallengeResponseAuthentication no -X -# Kerberos options -#KerberosAuthentication no -#KerberosOrLocalPasswd yes -#KerberosTicketCleanup yes -#KerberosGetAFSToken no -X -# GSSAPI options -#GSSAPIAuthentication no -GSSAPIAuthentication no -#GSSAPICleanupCredentials yes -GSSAPICleanupCredentials yes -X -# Set this to 'yes' to enable PAM authentication, account processing, -# and session processing. If this is enabled, PAM authentication will -# be allowed through the ChallengeResponseAuthentication and -# PasswordAuthentication. Depending on your PAM configuration, -# PAM authentication via ChallengeResponseAuthentication may bypass -# the setting of "PermitRootLogin without-password". -# If you just want the PAM account and session checks to run without -# PAM authentication, then enable this but set PasswordAuthentication -# and ChallengeResponseAuthentication to 'no'. -#UsePAM no -UsePAM yes -X -# Accept locale-related environment variables -AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES -AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT -AcceptEnv LC_IDENTIFICATION LC_ALL -#AllowTcpForwarding yes -#GatewayPorts no -#X11Forwarding no -#X11Forwarding yes -#X11DisplayOffset 10 -#X11UseLocalhost yes -#PrintMotd yes -#PrintLastLog yes -TCPKeepAlive yes -#UseLogin no -#UsePrivilegeSeparation yes -#PermitUserEnvironment no -#Compression delayed -#ClientAliveInterval 0 -#ClientAliveCountMax 3 -#ShowPatchLevel no -UseDNS no -#PidFile /var/run/sshd.pid -#PermitTunnel no -X -MaxStartups 1000 -MaxSessions 1000 -X -# no default banner path -#Banner /some/path -X -# override default of no subsystems -Subsystem sftp /usr/lib/openssh/sftp-server -X -# Example of overriding settings on a per-user basis -#Match User anoncvs -# X11Forwarding no -# AllowTcpForwarding no -# ForceCommand cvs server -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ssh/sshd_config' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/ssh/sshd_config' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/ssh/sshd_config failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ssh/sshd_config': 'MD5 check failed' - ) << \SHAR_EOF -842613e1f724e90888a90882ed1a5684 cloud_scripts/etc/ssh/sshd_config -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/ssh/sshd_config'` -ne 3603 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/ssh/sshd_config' is not 3603" - fi -fi -# ============= cloud_scripts/etc/ppp/options.xl2tpd ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ppp/options.xl2tpd' -then -${echo} "x - SKIPPING cloud_scripts/etc/ppp/options.xl2tpd (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/ppp/options.xl2tpd (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ppp/options.xl2tpd' && -proxyarp -ipcp-accept-local -ipcp-accept-remote -noccp -idle 1800 -auth -mtu 1410 -mru 1410 -nodefaultroute -debug -connect-delay 5000 -ms-dns 10.1.1.1 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ppp/options.xl2tpd' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/ppp/options.xl2tpd' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/ppp/options.xl2tpd failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ppp/options.xl2tpd': 'MD5 check failed' - ) << \SHAR_EOF -80ba26ac087aaf7f13cdc1fa8f985d72 cloud_scripts/etc/ppp/options.xl2tpd -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/ppp/options.xl2tpd'` -ne 141 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/ppp/options.xl2tpd' is not 141" - fi -fi -# ============= cloud_scripts/etc/ipsec.d/l2tp.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.d/l2tp.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/ipsec.d/l2tp.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/ipsec.d/l2tp.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.d/l2tp.conf' && -#ipsec remote access vpn configuration -conn L2TP-PSK -X authby=secret -X rekey=no -X keyingtries=3 -X leftfirewall=yes -X type=transport -X # -X # ---------------------------------------------------------- -X # The VPN server. -X # -X # Allow incoming connections on the external network interface. -X # If you want to use a different interface or if there is no -X # defaultroute, you can use: left=your.ip.addr.ess -X # -X left=172.26.0.151 -X # -X leftprotoport=udp/l2tp -X # If you insist on supporting non-updated Windows clients, -X # you can use: leftprotoport=17/%any -X # -X # ---------------------------------------------------------- -X # The remote user(s). -X # -X # Allow incoming connections only from this IP address. -X right=%any -X # If you want to allow multiple connections from any IP address, -X # you can use: right=%any -X # -X rightprotoport=udp/%any -X # -X # ---------------------------------------------------------- -X # Change 'ignore' to 'add' to enable this configuration. -X # -X rightsubnetwithin=0.0.0.0/0 -X auto=route -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.d/l2tp.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/ipsec.d/l2tp.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/ipsec.d/l2tp.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.d/l2tp.conf': 'MD5 check failed' - ) << \SHAR_EOF -8ca6cb315858c9ccf8c91374c4f32def cloud_scripts/etc/ipsec.d/l2tp.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.d/l2tp.conf'` -ne 1234 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.d/l2tp.conf' is not 1234" - fi -fi -# ============= cloud_scripts/etc/rsyslog.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/rsyslog.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/rsyslog.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/rsyslog.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/rsyslog.conf' && -# /etc/rsyslog.conf Configuration file for rsyslog. -# -# For more information see -# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html -X -X -################# -#### MODULES #### -################# -X -$ModLoad imuxsock # provides support for local system logging -$ModLoad imklog # provides kernel logging support (previously done by rklogd) -#$ModLoad immark # provides --MARK-- message capability -X -# provides UDP syslog reception -$ModLoad imudp -$UDPServerRun 3914 -X -# provides TCP syslog reception -#$ModLoad imtcp -#$InputTCPServerRun 514 -X -X -########################### -#### GLOBAL DIRECTIVES #### -########################### -X -# -# Use traditional timestamp format. -# To enable high precision timestamps, comment out the following line. -# -$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat -X -# -# Set the default permissions for all log files. -# -$FileOwner root -$FileGroup adm -$FileCreateMode 0640 -$DirCreateMode 0755 -$Umask 0022 -X -# -# Include all config files in /etc/rsyslog.d/ -# -$IncludeConfig /etc/rsyslog.d/*.conf -X -X -############### -#### RULES #### -############### -X -# -# First some standard log files. Log by facility. -# -auth,authpriv.* /var/log/auth.log -#*.*;auth,authpriv.none -/var/log/syslog -cron.* /var/log/cron.log -daemon.* -/var/log/daemon.log -kern.* -/var/log/kern.log -lpr.* -/var/log/lpr.log -mail.* -/var/log/mail.log -#user.* -/var/log/user.log -X -# -# Logging for the mail system. Split it up so that -# it is easy to write scripts to parse these files. -# -mail.info -/var/log/mail.info -mail.warn -/var/log/mail.warn -mail.err /var/log/mail.err -X -# -# Logging for INN news system. -# -news.crit /var/log/news/news.crit -news.err /var/log/news/news.err -news.notice -/var/log/news/news.notice -X -# -# Some "catch-all" log files. -# -#*.=debug;\ -# auth,authpriv.none;\ -# news.none;mail.none -/var/log/debug -*.=info;*.=notice;*.=warn;\ -X auth,authpriv.none;\ -X cron.none,daemon.none;\ -X local0.none,daemon.none;\ -X mail.none,news.none -/var/log/messages -X -# -# Emergencies are sent to everybody logged in. -# -*.emerg :omusrmsg:* -X -# -# I like to have messages displayed on the console, but only on a virtual -# console I usually leave idle. -# -#daemon,mail.*;\ -# news.=crit;news.=err;news.=notice;\ -# *.=debug;*.=info;\ -# *.=notice;*.=warn /dev/tty8 -X -local0.* -/var/log/haproxy.log -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/rsyslog.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/rsyslog.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/rsyslog.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/rsyslog.conf': 'MD5 check failed' - ) << \SHAR_EOF -1ae97a7bb7bd89a2a7c2e9507bd5c95f cloud_scripts/etc/rsyslog.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/rsyslog.conf'` -ne 2298 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/rsyslog.conf' is not 2298" - fi -fi -# ============= cloud_scripts/etc/modprobe.d/pcspkr.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/modprobe.d/pcspkr.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/modprobe.d/pcspkr.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/modprobe.d/pcspkr.conf (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/modprobe.d/pcspkr.conf -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/modprobe.d/pcspkr.conf': 'MD5 check failed' - ) << \SHAR_EOF -6dc1a7a74dfa22c4f3b37e8700b61658 cloud_scripts/etc/modprobe.d/pcspkr.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/modprobe.d/pcspkr.conf'` -ne 801 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/modprobe.d/pcspkr.conf' is not 801" - fi -fi -# ============= cloud_scripts/etc/modprobe.d/aesni_intel.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/modprobe.d/aesni_intel.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/modprobe.d/aesni_intel.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -blacklist aesni_intel -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/modprobe.d/aesni_intel.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/modprobe.d/aesni_intel.conf': 'MD5 check failed' - ) << \SHAR_EOF -45027ef77fea6dd170da8ea5e1ad1268 cloud_scripts/etc/modprobe.d/aesni_intel.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/modprobe.d/aesni_intel.conf'` -ne 807 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' is not 807" - fi -fi -# ============= cloud_scripts/etc/cron.hourly/clear_cache ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cron.hourly/clear_cache' -then -${echo} "x - SKIPPING cloud_scripts/etc/cron.hourly/clear_cache (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/cron.hourly/clear_cache (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cron.hourly/clear_cache' && -#!/bin/bash -X -# clear memory cache to ultimately reduce swapping -X -phymem=$(free|awk '/^Mem:/{print $2}') -if [ $phymem -lt 513000 ]; then -X sync && echo 1 > /proc/sys/vm/drop_caches -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cron.hourly/clear_cache' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/cron.hourly/clear_cache' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/cron.hourly/clear_cache failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cron.hourly/clear_cache': 'MD5 check failed' - ) << \SHAR_EOF -648c036aba1a5d72010bf11e0ec95147 cloud_scripts/etc/cron.hourly/clear_cache -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/cron.hourly/clear_cache'` -ne 183 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/cron.hourly/clear_cache' is not 183" - fi -fi -# ============= cloud_scripts/etc/apache2/conf-enabled/security.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/security.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/security.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/security.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/security.conf' && -ServerTokens Prod -ServerSignature Off -TraceEnable Off -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/security.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/security.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/security.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/security.conf': 'MD5 check failed' - ) << \SHAR_EOF -73e01a3d1cf4f93cb11afb4eb1a6f252 cloud_scripts/etc/apache2/conf-enabled/security.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/security.conf'` -ne 54 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/security.conf' is not 54" - fi -fi -# ============= cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' && -# event MPM -# StartServers: initial number of server processes to start -# MinSpareThreads: minimum number of worker threads which are kept spare -# MaxSpareThreads: maximum number of worker threads which are kept spare -# ThreadsPerChild: constant number of worker threads in each server process -# MaxRequestWorkers: maximum number of worker threads -# MaxConnectionsPerChild: maximum number of requests a server process serves - -X StartServers 1 -X MinSpareThreads 25 -X MaxSpareThreads 75 -X ThreadLimit 64 -X ThreadsPerChild 25 -X MaxRequestWorkers 30 -X MaxConnectionsPerChild 1000 - -X -# vim: syntax=apache ts=4 sw=4 sts=4 sr noet -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf': 'MD5 check failed' - ) << \SHAR_EOF -b05dce38d6618734e7f49eddcb8ac131 cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf'` -ne 669 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' is not 669" - fi -fi -# ============= cloud_scripts/etc/apache2/httpd.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/httpd.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/apache2/httpd.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/apache2/httpd.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/httpd.conf' && -# Empty -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/httpd.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/apache2/httpd.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/apache2/httpd.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/httpd.conf': 'MD5 check failed' - ) << \SHAR_EOF -2402d4d5cd982d8b74e5c4d62ab0b20b cloud_scripts/etc/apache2/httpd.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/httpd.conf'` -ne 8 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/httpd.conf' is not 8" - fi -fi -# ============= cloud_scripts/etc/apache2/vhost.template ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/vhost.template' -then -${echo} "x - SKIPPING cloud_scripts/etc/apache2/vhost.template (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/apache2/vhost.template (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/apache2/vhost.template -M/%9I3X*"3Q$:7)E8W1O0H)"6%L;&]W(&9R -M;VT@86QL"@D\+T1I3X*"@E38W)I<'1!;&EA0H)"4%L;&]W(&9R;VT@86QL"@D\+T1I3X*"@E%T%004-(15],3T=?1$E2?2]ET%004-(15],3T=?1$E2?2]A8V-E&5S($UU;'1I5FEE=W,@1F]L;&]W4WEM3&EN:W,*("`@("`@("!!;&QO -M=T]V97)R:61E($YO;F4*("`@("`@("!/2!F3X*"CPO5FER='5A -M;$AO2`O/@H)"4]P=&EO;G,@1F]L;&]W -M4WEM3&EN:W,*"0E!;&QO=T]V97)R:61E($YO;F4*"3PO1&ER96-T;W)Y/@H) -M/$1I2`O=F%R+W=W=R]H=&UL/@H)"4]P=&EO;G,@26YD97AE6U,:6YK2`B+W5S&5S($UU;'1I5FEE=W,@1F]L;&]W -M4WEM3&EN:W,*"0E!;&QO=T]V97)R:61E($YO;F4*"0E/2!F3X*"@DC($EN8VQU9&4@0T]2 -M4R!C;VYF:6=U2!A;F0@8V5R=&EF:6-A=&4@87)E('-T;W)E9"!I;B!T:&4@2!A<'!E;F1E9"!T;R!T:&4@2!O;F4*"2,@("!H=6=E(&9I;&4@8V]N=&%I -M;FEN9R!A;&P@;V8@=&AE;2`H9FEL92!M=7-T(&)E(%!%32!E;F-O9&5D*0H) -M(R`@($YO=&4Z($EN2!O;F4@:'5G92!F:6QE(&-O;G1A:6YI -M;F<@86QL"@DC("`@;V8@=&AE;2`H9FEL92!M=7-T(&)E(%!%32!E;F-O9&5D -M*0H)(R`@($YO=&4Z($EN7!E2!T:&4@8V5R=&EF:6-A=&4*"2,@("!I2!A8V-E2!C;VUP;&5X(&)O;VQE86X@97AP"!I*$58 -M4'Q.54Q,*2\@7`H)(R`@("`@("`@("`@(&%N9"`E>U-33%]#3$E%3E1?4U]$ -M3E]/?2!E<2`B4VYA:V4@3VEL+"!,=&0N(B!<"@DC("`@("`@("`@("`@86YD -M("5[4U-,7T-,245.5%]37T1.7T]5?2!I;B![(E-T869F(BP@(D-!(BP@(D1E -M=B)](%P*"2,@("`@("`@("`@("!A;F0@)7M424U%7U=$05E](#X](#$@86YD -M("5[5$E-15]71$%9?2`\/2`U(%P*"2,@("`@("`@("`@("!A;F0@)7M424U% -M7TA/55)](#X](#@@86YD("5[5$E-15](3U52?2`\/2`R,"`@("`@("`I(%P* -M"2,@("`@("`@("`@(&]R("5[4D5-3U1%7T%$1%)](#U^(&TO7C$Y,EPN-S9< -M+C$V,EPN6S`M.5TK)"\*"2,\+TQO8V%T:6]N/@H*"2,@("!34TP@16YG:6YE -M($]P=&EO;G,Z"@DC("`@4V5T('9A2!E;G1R>2!I;B!T:&4@=7-E<@H)(R`@("`@9FEL92!N -M965D'AJ,S%:351:>FM602'!O7,@97AI'!O -M2X*"2,@("!O -M(%-T2!A;GDB('-I='5A=&EO;BP@:2YE -M+B!W:&5N(&ET(&%P<&QI97,@86-C97-S(&ES(&1E;FEE9`H)(R`@("`@86YD -M(&YO(&]T:&5R(&UO9'5L92!C86X@8VAA;F=E(&ET+@H)(R`@(&\@3W!T4F5N -M96=O=&EA=&4Z"@DC("`@("!4:&ES(&5N86)L97,@;W!T:6UI>F5D(%-33"!C -M;VYN96-T:6]N(')E;F5G;W1I871I;VX@:&%N9&QI;F<@=VAE;B!34TP*"2,@ -M("`@(&1I2!C;VYT -M97AT+@H)(U-33$]P=&EO;G,@*T9A:V5"87-I8T%U=&@@*T5X<&]R=$-E2!A;&5R="!B=70@9&]E6]U(&YE -M960@82!D:69F97)E;G0@2P@6]U('5S=6%L;'D@861D:71I;VYA;&QY('=A -M;G0@=&\@9&ES86)L90H)(R`@(&ME97`M86QI=F4@9F]R('1H;W-E(&-L:65N -M=',L('1O;RX@57-E('9A2!-4TE%(&]N(%=I;F1O=W,@6%`N -M"B`@("!,:7-T96X@,3`N,2XQ+C$Z.#0T,PH\+TEF36]D=6QE/@H*/$EF36]D -M=6QE(&UO9%]G;G5T;',N8SX*("`@($QI/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/vhost.template': 'MD5 check failed' - ) << \SHAR_EOF -e42ce7d6f871a7efa7a3c0e164f75dfc cloud_scripts/etc/apache2/vhost.template -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/vhost.template'` -ne 9955 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/vhost.template' is not 9955" - fi -fi -# ============= cloud_scripts/etc/vpcdnsmasq.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/vpcdnsmasq.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/vpcdnsmasq.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/vpcdnsmasq.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/vpcdnsmasq.conf' && -# Configuration file for dnsmasq. -# -# Format is one option per line, legal options are the same -# as the long options legal on the command line. See -# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. -X -# The following two options make you a better netizen, since they -# tell dnsmasq to filter out queries which the public DNS cannot -# answer, and which load the servers (especially the root servers) -# uneccessarily. If you have a dial-on-demand link they also stop -# these requests from bringing up the link uneccessarily. -X -# Never forward plain names (without a dot or domain part) -domain-needed -# Never forward addresses in the non-routed address spaces. -bogus-priv -X -X -# Uncomment this to filter useless windows-originated DNS requests -# which can trigger dial-on-demand links needlessly. -# Note that (amongst other things) this blocks all SRV requests, -# so don't use it if you use eg Kerberos. -# This option only affects forwarding, SRV records originating for -# dnsmasq (via srv-host= lines) are not suppressed by it. -#filterwin2k -X -# Change this line if you want dns to get its upstream servers from -# somewhere other that /etc/resolv.conf -resolv-file=/etc/dnsmasq-resolv.conf -X -# By default, dnsmasq will send queries to any of the upstream -# servers it knows about and tries to favour servers to are known -# to be up. Uncommenting this forces dnsmasq to try each query -# with each server strictly in the order they appear in -# /etc/resolv.conf -#strict-order -X -# If you don't want dnsmasq to read /etc/resolv.conf or any other -# file, getting its servers from this file instead (see below), then -# uncomment this. -#no-resolv -X -# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv -# files for changes and re-read them then uncomment this. -#no-poll -X -# Add other name servers here, with domain specs if they are for -# non-public domains. -#server=/localnet/192.168.0.1 -X -# Example of routing PTR queries to nameservers: this will send all -# address->name queries for 192.168.3/24 to nameserver 10.1.2.3 -#server=/3.168.192.in-addr.arpa/10.1.2.3 -X -# Add local-only domains here, queries in these domains are answered -# from /etc/hosts or DHCP only. -local=/2.vmops-test.vmops.com/ -X -# Add domains which you want to force to an IP address here. -# The example below send any host in doubleclick.net to a local -# webserver. -#address=/doubleclick.net/127.0.0.1 -X -# If you want dnsmasq to change uid and gid to something other -# than the default, edit the following lines. -#user= -#group= -X -# If you want dnsmasq to listen for DHCP and DNS requests only on -# specified interfaces (and the loopback) give the name of the -# interface (eg eth0) here. -# Repeat the line for more than one interface. -#interface=eth0 -X -# Or you can specify which interface _not_ to listen on -except-interface=lo -X -# Or which to listen on by address (remember to include 127.0.0.1 if -# you use this.) -#listen-address= -# If you want dnsmasq to provide only DNS service on an interface, -# configure it as shown above, and then use the following line to -# disable DHCP on it. -#no-dhcp-interface=eth1 -X -# On systems which support it, dnsmasq binds the wildcard address, -# even when it is listening on only some interfaces. It then discards -# requests that it shouldn't reply to. This has the advantage of -# working even when interfaces come and go and change address. If you -# want dnsmasq to really bind only the interfaces it is listening on, -# uncomment this option. About the only time you may need this is when -# running another nameserver on the same machine. -#bind-interfaces -X -# If you don't want dnsmasq to read /etc/hosts, uncomment the -# following line. -#no-hosts -# or if you want it to read another file, as well as /etc/hosts, use -# this. -#addn-hosts=/etc/banner_add_hosts -X -# Set this (and domain: see below) if you want to have a domain -# automatically added to simple names in a hosts-file. -expand-hosts -X -# Set the domain for dnsmasq. this is optional, but if it is set, it -# does the following things. -# 1) Allows DHCP hosts to have fully qualified domain names, as long -# as the domain part matches this setting. -# 2) Sets the "domain" DHCP option thereby potentially setting the -# domain of all systems configured by DHCP -# 3) Provides the domain part for "expand-hosts" -#domain=2.vmops-test.vmops.com -X -# Uncomment this to enable the integrated DHCP server, you need -# to supply the range of addresses available for lease and optionally -# a lease time. If you have more than one network, you will need to -# repeat this for each network on which you want to supply DHCP -# service. -#dhcp-range=10.1.1.1,static -#dhcp-range=10.0.0.1,10.255.255.255 -#dhcp-hostsfile=/etc/dhcphosts.txt -X -# This is an example of a DHCP range where the netmask is given. This -# is needed for networks we reach the dnsmasq DHCP server via a relay -# agent. If you don't know what a DHCP relay agent is, you probably -# don't need to worry about this. -#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h -X -# This is an example of a DHCP range with a network-id, so that -# some DHCP options may be set only for this network. -#dhcp-range=red,192.168.0.50,192.168.0.150 -X -# Supply parameters for specified hosts using DHCP. There are lots -# of valid alternatives, so we will give examples of each. Note that -# IP addresses DO NOT have to be in the range given above, they just -# need to be on the same network. The order of the parameters in these -# do not matter, it's permissble to give name,adddress and MAC in any order -X -# Always allocate the host with ethernet address 11:22:33:44:55:66 -# The IP address 192.168.0.60 -#dhcp-host=11:22:33:44:55:66,192.168.0.60 -X -# Always set the name of the host with hardware address -# 11:22:33:44:55:66 to be "fred" -#dhcp-host=11:22:33:44:55:66,fred -X -# Always give the host with ethernet address 11:22:33:44:55:66 -# the name fred and IP address 192.168.0.60 and lease time 45 minutes -#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m -X -# Give the machine which says it's name is "bert" IP address -# 192.168.0.70 and an infinite lease -#dhcp-host=bert,192.168.0.70,infinite -X -# Always give the host with client identifier 01:02:02:04 -# the IP address 192.168.0.60 -#dhcp-host=id:01:02:02:04,192.168.0.60 -X -# Always give the host with client identifier "marjorie" -# the IP address 192.168.0.60 -#dhcp-host=id:marjorie,192.168.0.60 -X -# Enable the address given for "judge" in /etc/hosts -# to be given to a machine presenting the name "judge" when -# it asks for a DHCP lease. -#dhcp-host=judge -X -# Never offer DHCP service to a machine whose ethernet -# address is 11:22:33:44:55:66 -#dhcp-host=11:22:33:44:55:66,ignore -X -# Ignore any client-id presented by the machine with ethernet -# address 11:22:33:44:55:66. This is useful to prevent a machine -# being treated differently when running under different OS's or -# between PXE boot and OS boot. -#dhcp-host=11:22:33:44:55:66,id:* -X -# Send extra options which are tagged as "red" to -# the machine with ethernet address 11:22:33:44:55:66 -#dhcp-host=11:22:33:44:55:66,net:red -X -# Send extra options which are tagged as "red" to -# any machine with ethernet address starting 11:22:33: -#dhcp-host=11:22:33:*:*:*,net:red -X -# Ignore any clients which are specified in dhcp-host lines -# or /etc/ethers. Equivalent to ISC "deny unkown-clients". -# This relies on the special "known" tag which is set when -# a host is matched. -#dhcp-ignore=#known -X -# Send extra options which are tagged as "red" to any machine whose -# DHCP vendorclass string includes the substring "Linux" -#dhcp-vendorclass=red,Linux -X -# Send extra options which are tagged as "red" to any machine one -# of whose DHCP userclass strings includes the substring "accounts" -#dhcp-userclass=red,accounts -X -# Send extra options which are tagged as "red" to any machine whose -# MAC address matches the pattern. -#dhcp-mac=red,00:60:8C:*:*:* -X -# If this line is uncommented, dnsmasq will read /etc/ethers and act -# on the ethernet-address/IP pairs found there just as if they had -# been given as --dhcp-host options. Useful if you keep -# MAC-address/host mappings there for other purposes. -#read-ethers -X -# Send options to hosts which ask for a DHCP lease. -# See RFC 2132 for details of available options. -# Common options can be given to dnsmasq by name: -# run "dnsmasq --help dhcp" to get a list. -# Note that all the common settings, such as netmask and -# broadcast address, DNS server and default route, are given -# sane defaults by dnsmasq. You very likely will not need -# any dhcp-options. If you use Windows clients and Samba, there -# are some options which are recommended, they are detailed at the -# end of this section. -X -# Override the default route supplied by dnsmasq, which assumes the -# router is the same machine as the one running dnsmasq. -#dhcp-option=3,1.2.3.4 -X -# Do the same thing, but using the option name -#dhcp-option=option:router,1.2.3.4 -X -# Override the default route supplied by dnsmasq and send no default -# route at all. Note that this only works for the options sent by -# default (1, 3, 6, 12, 28) the same line will send a zero-length option -# for all other option numbers. -#dhcp-option=3 -X -# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 -#dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5 -X -# Set the NTP time server address to be the same machine as -# is running dnsmasq -#dhcp-option=42,0.0.0.0 -X -# Set the NIS domain name to "welly" -#dhcp-option=40,welly -X -# Set the default time-to-live to 50 -#dhcp-option=23,50 -X -# Set the "all subnets are local" flag -#dhcp-option=27,1 -X -# Set the domain -dhcp-option=15,"2.vmops-test.vmops.com" -X -# Send the etherboot magic flag and then etherboot options (a string). -#dhcp-option=128,e4:45:74:68:00:00 -#dhcp-option=129,NIC=eepro100 -X -# Specify an option which will only be sent to the "red" network -# (see dhcp-range for the declaration of the "red" network) -# Note that the net: part must precede the option: part. -#dhcp-option = net:red, option:ntp-server, 192.168.1.1 -X -# The following DHCP options set up dnsmasq in the same way as is specified -# for the ISC dhcpcd in -# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt -# adapted for a typical dnsmasq installation where the host running -# dnsmasq is also the host running samba. -# you may want to uncomment them if you use Windows clients and Samba. -#dhcp-option=19,0 # option ip-forwarding off -#dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) -#dhcp-option=45,0.0.0.0 # netbios datagram distribution server -#dhcp-option=46,8 # netbios node type -#dhcp-option=47 # empty netbios scope. -X -# Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client -# probably doesn't support this...... -#dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com -X -# Send RFC-3442 classless static routes (note the netmask encoding) -#dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8 -X -# Send vendor-class specific options encapsulated in DHCP option 43. -# The meaning of the options is defined by the vendor-class so -# options are sent only when the client supplied vendor class -# matches the class given here. (A substring match is OK, so "MSFT" -# matches "MSFT" and "MSFT 5.0"). This example sets the -# mtftp address to 0.0.0.0 for PXEClients. -#dhcp-option=vendor:PXEClient,1,0.0.0.0 -X -# Send microsoft-specific option to tell windows to release the DHCP lease -# when it shuts down. Note the "i" flag, to tell dnsmasq to send the -# value as a four-byte integer - that's what microsoft wants. See -# http://technet2.microsoft.com/WindowsServer/en/library/a70f1bb7-d2d4-49f0-96d6-4b7414ecfaae1033.mspx?mfr=true -dhcp-option=vendor:MSFT,2,1i -X -# Send the Encapsulated-vendor-class ID needed by some configurations of -# Etherboot to allow is to recognise the DHCP server. -#dhcp-option=vendor:Etherboot,60,"Etherboot" -X -# Send options to PXELinux. Note that we need to send the options even -# though they don't appear in the parameter request list, so we need -# to use dhcp-option-force here. -# See http://syslinux.zytor.com/pxe.php#special for details. -# Magic number - needed before anything else is recognised -#dhcp-option-force=208,f1:00:74:7e -# Configuration file name -#dhcp-option-force=209,configs/common -# Path prefix -#dhcp-option-force=210,/tftpboot/pxelinux/files/ -# Reboot time. (Note 'i' to send 32-bit value) -#dhcp-option-force=211,30i -X -# Set the boot filename for BOOTP. You will only need -# this is you want to boot machines over the network and you will need -# a TFTP server; either dnsmasq's built in TFTP server or an -# external one. (See below for how to enable the TFTP server.) -#dhcp-boot=pxelinux.0 -X -# Enable dnsmasq's built-in TFTP server -#enable-tftp -X -# Set the root directory for files availble via FTP. -#tftp-root=/var/ftpd -X -# Make the TFTP server more secure: with this set, only files owned by -# the user dnsmasq is running as will be send over the net. -#tftp-secure -X -# Set the boot file name only when the "red" tag is set. -#dhcp-boot=net:red,pxelinux.red-net -X -# An example of dhcp-boot with an external server: the name and IP -# address of the server are given after the filename. -#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 -X -# Set the limit on DHCP leases, the default is 150 -dhcp-lease-max=2100 -X -# The DHCP server needs somewhere on disk to keep its lease database. -# This defaults to a sane location, but if you want to change it, use -# the line below. -#dhcp-leasefile=/var/lib/misc/dnsmasq.leases -leasefile-ro -X -# Set the DHCP server to authoritative mode. In this mode it will barge in -# and take over the lease for any client which broadcasts on the network, -# whether it has a record of the lease or not. This avoids long timeouts -# when a machine wakes up on a new network. DO NOT enable this if there's -# the slighest chance that you might end up accidentally configuring a DHCP -# server for your campus/company accidentally. The ISC server uses -# the same option, and this URL provides more information: -# http://www.isc.org/index.pl?/sw/dhcp/authoritative.php -#dhcp-authoritative -X -# Run an executable when a DHCP lease is created or destroyed. -# The arguments sent to the script are "add" or "del", -# then the MAC address, the IP address and finally the hostname -# if there is one. -#dhcp-script=/bin/echo -X -# Set the cachesize here. -#cache-size=150 -X -# If you want to disable negative caching, uncomment this. -#no-negcache -X -# Normally responses which come form /etc/hosts and the DHCP lease -# file have Time-To-Live set as zero, which conventionally means -# do not cache further. If you are happy to trade lower load on the -# server for potentially stale date, you can set a time-to-live (in -# seconds) here. -#local-ttl= -X -# If you want dnsmasq to detect attempts by Verisign to send queries -# to unregistered .com and .net hosts to its sitefinder service and -# have dnsmasq instead return the correct NXDOMAIN response, uncomment -# this line. You can add similar lines to do the same for other -# registries which have implemented wildcard A records. -#bogus-nxdomain=64.94.110.11 -X -# If you want to fix up DNS results from upstream servers, use the -# alias option. This only works for IPv4. -# This alias makes a result of 1.2.3.4 appear as 5.6.7.8 -#alias=1.2.3.4,5.6.7.8 -# and this maps 1.2.3.x to 5.6.7.x -#alias=1.2.3.0,5.6.7.0,255.255.255.0 -X -X -# Change these lines if you want dnsmasq to serve MX records. -X -# Return an MX record named "maildomain.com" with target -# servermachine.com and preference 50 -#mx-host=maildomain.com,servermachine.com,50 -X -# Set the default target for MX records created using the localmx option. -#mx-target=servermachine.com -X -# Return an MX record pointing to the mx-target for all local -# machines. -#localmx -X -# Return an MX record pointing to itself for all local machines. -#selfmx -X -# Change the following lines if you want dnsmasq to serve SRV -# records. These are useful if you want to serve ldap requests for -# Active Directory and other windows-originated DNS requests. -# See RFC 2782. -# You may add multiple srv-host lines. -# The fields are ,,,, -# If the domain part if missing from the name (so that is just has the -# service and protocol sections) then the domain given by the domain= -# config option is used. (Note that expand-hosts does not need to be -# set for this to work.) -X -# A SRV record sending LDAP for the example.com domain to -# ldapserver.example.com port 289 -#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389 -X -# A SRV record sending LDAP for the example.com domain to -# ldapserver.example.com port 289 (using domain=) -###domain=example.com -#srv-host=_ldap._tcp,ldapserver.example.com,389 -X -# Two SRV records for LDAP, each with different priorities -#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1 -#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2 -X -# A SRV record indicating that there is no LDAP server for the domain -# example.com -#srv-host=_ldap._tcp.example.com -X -# The following line shows how to make dnsmasq serve an arbitrary PTR -# record. This is useful for DNS-SD. (Note that the -# domain-name expansion done for SRV records _does_not -# occur for PTR records.) -#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services" -X -# Change the following lines to enable dnsmasq to serve TXT records. -# These are used for things like SPF and zeroconf. (Note that the -# domain-name expansion done for SRV records _does_not -# occur for TXT records.) -X -#Example SPF. -#txt-record=example.com,"v=spf1 a -all" -X -#Example zeroconf -#txt-record=_http._tcp.example.com,name=value,paper=A4 -X -X -# For debugging purposes, log each DNS query as it passes through -# dnsmasq. -#log-queries -X -# Log lots of extra information about DHCP transactions. -#log-dhcp -X -log-facility=/var/log/dnsmasq.log -X -# Include a another lot of configuration options. -#conf-file=/etc/dnsmasq.more.conf -conf-dir=/etc/dnsmasq.d -X -dhcp-optsfile=/etc/dhcpopts.txt -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/vpcdnsmasq.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/vpcdnsmasq.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/vpcdnsmasq.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/vpcdnsmasq.conf': 'MD5 check failed' - ) << \SHAR_EOF -0b53d152c88ebce3ee09d8e9c8addd6b cloud_scripts/etc/vpcdnsmasq.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/vpcdnsmasq.conf'` -ne 17942 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/vpcdnsmasq.conf' is not 17942" - fi -fi -# ============= cloud_scripts/etc/ipsec.secrets ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.secrets' -then -${echo} "x - SKIPPING cloud_scripts/etc/ipsec.secrets (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/ipsec.secrets (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.secrets' && -include /var/lib/strongswan/ipsec.conf.inc -include /etc/ipsec.d/ipsec.*.secrets -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.secrets' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/ipsec.secrets' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/ipsec.secrets failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.secrets': 'MD5 check failed' - ) << \SHAR_EOF -7ab0bddd5ec64ebda91cf3c5262fef2d cloud_scripts/etc/ipsec.secrets -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.secrets'` -ne 80 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.secrets' is not 80" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/dnsmasq ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/dnsmasq' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/dnsmasq (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/dnsmasq (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/dnsmasq' && -/var/log/dnsmasq.log { -X maxsize 10M -X missingok -X rotate 5 -X notifempty -X delaycompress -X sharedscripts -X postrotate -X [ ! -f /var/run/dnsmasq/dnsmasq.pid ] || kill -USR2 `cat /var/run/dnsmasq/dnsmasq.pid` -X endscript -X create 0640 dnsmasq root -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/dnsmasq' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/dnsmasq' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/dnsmasq failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/dnsmasq': 'MD5 check failed' - ) << \SHAR_EOF -e42458bd875605d1cd625f0596b38d4c cloud_scripts/etc/logrotate.d/dnsmasq -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/dnsmasq'` -ne 272 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/dnsmasq' is not 272" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/cloud ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/cloud' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/cloud (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/cloud (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/cloud' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -/var/log/cloud.log { -X rotate 10 -X maxsize 10M -X missingok -X notifempty -X compress -X # CLOUDSTACK-9155: We cannot tell the processes that are writing to this -X # file to use the new inode, so instead we copy the original file, truncate -X # it and keep the same inode. -X copytruncate -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/cloud' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/cloud' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/cloud failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/cloud': 'MD5 check failed' - ) << \SHAR_EOF -f83a4d4cf36adb81699ac5892bf6c6f5 cloud_scripts/etc/logrotate.d/cloud -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/cloud'` -ne 1124 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/cloud' is not 1124" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/conntrackd ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/conntrackd' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/conntrackd (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/conntrackd (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/conntrackd' && -/var/log/conntrackd-stats.log { -X maxsize 10M -X rotate 2 -X missingok -X compress -X delaycompress -X -X postrotate -X if [ -e /var/run/conntrackd.sock ]; then -X /usr/sbin/invoke-rc.d conntrackd restart > /dev/null -X fi -X endscript -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/conntrackd' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/conntrackd' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/conntrackd failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/conntrackd': 'MD5 check failed' - ) << \SHAR_EOF -334d9dd543fcb9c8682b4b8fc3987c4c cloud_scripts/etc/logrotate.d/conntrackd -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/conntrackd'` -ne 263 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/conntrackd' is not 263" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/monitor ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/monitor' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/monitor (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/monitor (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/monitor' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -/var/log/monitor.log { -X rotate 5 -X maxsize 10M -X missingok -X notifempty -X compress -X copytruncate -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/monitor' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/monitor' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/monitor failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/monitor': 'MD5 check failed' - ) << \SHAR_EOF -dbf4af64f49d5ffbf4a725cca714ccd0 cloud_scripts/etc/logrotate.d/monitor -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/monitor'` -ne 922 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/monitor' is not 922" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/routerServiceMonitor ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/routerServiceMonitor (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/routerServiceMonitor (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -/var/log/routerServiceMonitor.log { -X rotate 5 -X maxsize 10M -X missingok -X notifempty -X compress -X copytruncate -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/routerServiceMonitor failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/routerServiceMonitor': 'MD5 check failed' - ) << \SHAR_EOF -0f7968ad2bdbb870fa6a7f55565003c1 cloud_scripts/etc/logrotate.d/routerServiceMonitor -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/routerServiceMonitor'` -ne 935 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' is not 935" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/ppp ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/ppp' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/ppp (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/ppp (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/ppp' && -/var/log/ppp-connect-errors { -X maxsize 10M -X rotate 5 -X missingok -X notifempty -X compress -X nocreate -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/ppp' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/ppp' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/ppp failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/ppp': 'MD5 check failed' - ) << \SHAR_EOF -7d16a52cb372773845f812e51f52318f cloud_scripts/etc/logrotate.d/ppp -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/ppp'` -ne 98 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/ppp' is not 98" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/apache2 ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/apache2' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/apache2 (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/apache2 (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/apache2' && -/var/log/apache2/*.log { -X missingok -X copytruncate -X rotate 3 -X compress -X dateext -X maxsize 10M -X notifempty -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/apache2' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/apache2' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/apache2 failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/apache2': 'MD5 check failed' - ) << \SHAR_EOF -eefd54e0be665bd8a76a7aebee89d6d5 cloud_scripts/etc/logrotate.d/apache2 -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/apache2'` -ne 148 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/apache2' is not 148" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/rsyslog ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/rsyslog' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/rsyslog (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/rsyslog (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/rsyslog' && -/var/log/syslog -{ -X rotate 7 -X maxsize 10M -X missingok -X notifempty -X compress -X postrotate -X /usr/sbin/invoke-rc.d rsyslog rotate > /dev/null -X endscript -} -X -/var/log/mail.info -/var/log/mail.warn -/var/log/mail.err -/var/log/mail.log -/var/log/daemon.log -/var/log/kern.log -/var/log/auth.log -/var/log/user.log -/var/log/lpr.log -/var/log/cron.log -/var/log/debug -/var/log/messages -{ -X rotate 10 -X maxsize 10M -X missingok -X notifempty -X compress -X sharedscripts -X postrotate -X /usr/sbin/invoke-rc.d rsyslog rotate > /dev/null -X endscript -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/rsyslog' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/rsyslog' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/rsyslog failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/rsyslog': 'MD5 check failed' - ) << \SHAR_EOF -b4409ff800ad8ac42c79f412d6b90094 cloud_scripts/etc/logrotate.d/rsyslog -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/rsyslog'` -ne 517 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/rsyslog' is not 517" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/haproxy ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/haproxy' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/haproxy (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/haproxy (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/haproxy' && -/var/log/haproxy.log { -X rotate 5 -X missingok -X notifempty -X maxsize 10M -X postrotate -X /bin/kill -HUP `cat /var/run/rsyslog.pid 2> /dev/null` 2> /dev/null || true -X endscript -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/haproxy' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/haproxy' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/haproxy failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/haproxy': 'MD5 check failed' - ) << \SHAR_EOF -e584fdf0d2a25578f651fccce265ff09 cloud_scripts/etc/logrotate.d/haproxy -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/haproxy'` -ne 194 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/haproxy' is not 194" - fi -fi -# ============= cloud_scripts/etc/profile.d/cloud.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/profile.d/cloud.sh' -then -${echo} "x - SKIPPING cloud_scripts/etc/profile.d/cloud.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/profile.d/cloud.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/profile.d/cloud.sh' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -if [ "`id -u`" -eq 0 ]; then -X PATH=${PATH}:/opt/cloud/bin -fi -export PATH -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/profile.d/cloud.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/profile.d/cloud.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/profile.d/cloud.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/profile.d/cloud.sh': 'MD5 check failed' - ) << \SHAR_EOF -78e5d1f4d852b0af96f8b2efa5245c86 cloud_scripts/etc/profile.d/cloud.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/profile.d/cloud.sh'` -ne 861 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/profile.d/cloud.sh' is not 861" - fi -fi -# ============= cloud_scripts/etc/cloud-nic.rules ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cloud-nic.rules' -then -${echo} "x - SKIPPING cloud_scripts/etc/cloud-nic.rules (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/cloud-nic.rules (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cloud-nic.rules' && -SUBSYSTEM=="net" KERNEL=="eth*" RUN+="/opt/cloud/bin/cloud-nic.sh $env{ACTION} %k" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cloud-nic.rules' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/cloud-nic.rules' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/cloud-nic.rules failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cloud-nic.rules': 'MD5 check failed' - ) << \SHAR_EOF -4ffd506afaa6a69a55ba9ab6bbf706f5 cloud_scripts/etc/cloud-nic.rules -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/cloud-nic.rules'` -ne 83 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/cloud-nic.rules' is not 83" - fi -fi -# ============= cloud_scripts/etc/haproxy/haproxy.cfg ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/haproxy/haproxy.cfg' -then -${echo} "x - SKIPPING cloud_scripts/etc/haproxy/haproxy.cfg (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/haproxy/haproxy.cfg (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/haproxy/haproxy.cfg' && -global -X log 127.0.0.1:3914 local0 info -X chroot /var/lib/haproxy -X user haproxy -X group haproxy -X daemon -X -defaults -X log global -X mode tcp -X option dontlognull -X retries 3 -X option redispatch -X option forwardfor -X stats enable -X stats uri /admin?stats -X stats realm Haproxy\ Statistics -X stats auth admin1:AdMiN123 -X option forceclose -X timeout connect 5000 -X timeout client 50000 -X timeout server 50000 -X -X -listen cloud-default -X bind 0.0.0.0:35999 -X option transparent -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/haproxy/haproxy.cfg' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/haproxy/haproxy.cfg' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/haproxy/haproxy.cfg failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/haproxy/haproxy.cfg': 'MD5 check failed' - ) << \SHAR_EOF -a554fcecbaff9747723f9cd3aedf1ffd cloud_scripts/etc/haproxy/haproxy.cfg -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/haproxy/haproxy.cfg'` -ne 483 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/haproxy/haproxy.cfg' is not 483" - fi -fi -# ============= cloud_scripts/etc/ipsec.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/ipsec.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/ipsec.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.conf' && -# ipsec.conf - strongSwan IPsec configuration file -X -config setup -X -include /etc/ipsec.d/*.conf -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/ipsec.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/ipsec.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.conf': 'MD5 check failed' - ) << \SHAR_EOF -da4dd5d331eed3e64a528dc648aa7cae cloud_scripts/etc/ipsec.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.conf'` -ne 94 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.conf' is not 94" - fi -fi -# ============= cloud_scripts/etc/systemd/journald.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/journald.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/journald.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/journald.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/journald.conf' && -[Journal] -Compress=yes -SystemMaxUse=40M -SystemMaxFileSize=10M -RuntimeMaxUse=20M -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/journald.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/journald.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/journald.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/journald.conf': 'MD5 check failed' - ) << \SHAR_EOF -ea3c97c4a558fbfdf53304f77275ef8a cloud_scripts/etc/systemd/journald.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/journald.conf'` -ne 80 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/journald.conf' is not 80" - fi -fi -# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service -M[[N_6U5N:71="D1E/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service': 'MD5 check failed' - ) << \SHAR_EOF -58d4e646ee66ac7c470796bd6ce9e2a6 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service'` -ne 156 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service' is not 156" - fi -fi -# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service -M[[N_6U5N:71="D1E/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service': 'MD5 check failed' - ) << \SHAR_EOF -027a172fad275171647740477b78ca93 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service'` -ne 143 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service' is not 143" - fi -fi -# ============= cloud_scripts/etc/systemd/system/cloud.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud.service' && -[Unit] -Description=CloudStack Agent service -After=cloud-early-config.service network.target cloud-postinit.service local-fs.target -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=simple -WorkingDirectory=/usr/local/cloud/systemvm -ExecStart=/usr/local/cloud/systemvm/_run.sh -Restart=on-failure -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/cloud.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud.service': 'MD5 check failed' - ) << \SHAR_EOF -b7eb67763e7d694ed98758faef961ac6 cloud_scripts/etc/systemd/system/cloud.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud.service'` -ne 298 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud.service' is not 298" - fi -fi -# ============= cloud_scripts/etc/systemd/system/open-vm-tools.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/open-vm-tools.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/open-vm-tools.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/open-vm-tools.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/open-vm-tools.service -M[[N_6U5N:71="D1E&5C4W1A/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/open-vm-tools.service': 'MD5 check failed' - ) << \SHAR_EOF -10af19a17cd3ee299f08c46bace0f56f cloud_scripts/etc/systemd/system/open-vm-tools.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/open-vm-tools.service'` -ne 280 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/open-vm-tools.service' is not 280" - fi -fi -# ============= cloud_scripts/etc/systemd/system/baremetal-vr.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/baremetal-vr.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/baremetal-vr.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/baremetal-vr.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/baremetal-vr.service' && -[Unit] -Description=CloudStack Baremetal VR service -After=network.target local-fs.target -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=simple -WorkingDirectory=/opt/cloud/bin -ExecStart=/usr/bin/python /opt/cloud/bin/baremetal-vr.py -Restart=on-failure -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/baremetal-vr.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/baremetal-vr.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/baremetal-vr.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/baremetal-vr.service': 'MD5 check failed' - ) << \SHAR_EOF -9fc2a325a709e7cf9ae4d4ec8b7e692a cloud_scripts/etc/systemd/system/baremetal-vr.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/baremetal-vr.service'` -ne 257 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/baremetal-vr.service' is not 257" - fi -fi -# ============= cloud_scripts/etc/systemd/system/xe-daemon.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/xe-daemon.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/xe-daemon.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/xe-daemon.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/xe-daemon.service -M[[N_6U5N:71="D1E&5N+FUO=6YT"D)E9F]R93UN971W;W)K+G1A -M2UC;VYF:6&5C -M4W1A&5C4W1A3UM=6QT:2UU/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/xe-daemon.service': 'MD5 check failed' - ) << \SHAR_EOF -51e30000a8c2d2a91ba1a372bc40a628 cloud_scripts/etc/systemd/system/xe-daemon.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/xe-daemon.service'` -ne 398 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/xe-daemon.service' is not 398" - fi -fi -# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service -M[[N_6U5N:71="D1E5]D865M;VX@+6X*"EM);G-T86QL70I786YT961">3UM=6QT:2UU -*/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service': 'MD5 check failed' - ) << \SHAR_EOF -b1d4d295d2f3dff1ed1e13835e365e86 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service'` -ne 190 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service' is not 190" - fi -fi -# ============= cloud_scripts/etc/systemd/system/cloud-early-config.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-early-config.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-early-config.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-early-config.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-early-config.service' && -[Unit] -Description=CloudStack post-boot patching service using cmdline -DefaultDependencies=no -X -Before=network-pre.target -Wants=network-pre.target -X -Requires=local-fs.target -After=local-fs.target -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=oneshot -ExecStart=/opt/cloud/bin/setup/cloud-early-config -RemainAfterExit=true -TimeoutStartSec=5min -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-early-config.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/cloud-early-config.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-early-config.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-early-config.service': 'MD5 check failed' - ) << \SHAR_EOF -60723561261aa16ed4477c5e02c52bcd cloud_scripts/etc/systemd/system/cloud-early-config.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-early-config.service'` -ne 348 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-early-config.service' is not 348" - fi -fi -# ============= cloud_scripts/etc/systemd/system/cloud-password-server@.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-password-server@.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-password-server@.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' && -[Unit] -Description=Cloud password server on %I -After=network.target local-fs.target -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=simple -WorkingDirectory=/opt/cloud/bin -ExecStart=/opt/cloud/bin/passwd_server_ip.py %I -Restart=on-failure -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-password-server@.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-password-server@.service': 'MD5 check failed' - ) << \SHAR_EOF -3edb13a39635749f16f0579b481c5f25 cloud_scripts/etc/systemd/system/cloud-password-server@.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-password-server@.service'` -ne 244 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' is not 244" - fi -fi -# ============= cloud_scripts/etc/systemd/system/cloud-postinit.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-postinit.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-postinit.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-postinit.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-postinit.service' && -[Unit] -Description=CloudStack post-patching init script -After=cloud-early-config.service network.target local-fs.target -Before=ssh.service -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=oneshot -ExecStart=/opt/cloud/bin/setup/postinit.sh -RemainAfterExit=true -TimeoutStartSec=10min -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-postinit.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/cloud-postinit.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-postinit.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-postinit.service': 'MD5 check failed' - ) << \SHAR_EOF -22b48cd2a7478d27cb155d32cc2610cb cloud_scripts/etc/systemd/system/cloud-postinit.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-postinit.service'` -ne 287 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-postinit.service' is not 287" - fi -fi -# ============= cloud_scripts/etc/systemd/journald.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/journald.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/journald.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/journald.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/journald.conf' && -[Journal] -Compress=yes -SystemMaxUse=40M -SystemMaxFileSize=10M -RuntimeMaxUse=20M -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/journald.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/journald.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/journald.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/journald.conf': 'MD5 check failed' - ) << \SHAR_EOF -ea3c97c4a558fbfdf53304f77275ef8a cloud_scripts/etc/systemd/journald.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/journald.conf'` -ne 80 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/journald.conf' is not 80" - fi -fi -# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service -M[[N_6U5N:71="D1E/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service': 'MD5 check failed' - ) << \SHAR_EOF -58d4e646ee66ac7c470796bd6ce9e2a6 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service'` -ne 156 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service' is not 156" - fi -fi -# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service -M[[N_6U5N:71="D1E/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service': 'MD5 check failed' - ) << \SHAR_EOF -027a172fad275171647740477b78ca93 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service'` -ne 143 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service' is not 143" - fi -fi -# ============= cloud_scripts/etc/systemd/system/cloud.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud.service' && -[Unit] -Description=CloudStack Agent service -After=cloud-early-config.service network.target cloud-postinit.service local-fs.target -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=simple -WorkingDirectory=/usr/local/cloud/systemvm -ExecStart=/usr/local/cloud/systemvm/_run.sh -Restart=on-failure -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/cloud.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud.service': 'MD5 check failed' - ) << \SHAR_EOF -b7eb67763e7d694ed98758faef961ac6 cloud_scripts/etc/systemd/system/cloud.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud.service'` -ne 298 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud.service' is not 298" - fi -fi -# ============= cloud_scripts/etc/systemd/system/open-vm-tools.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/open-vm-tools.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/open-vm-tools.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/open-vm-tools.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/open-vm-tools.service -M[[N_6U5N:71="D1E&5C4W1A/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/open-vm-tools.service': 'MD5 check failed' - ) << \SHAR_EOF -10af19a17cd3ee299f08c46bace0f56f cloud_scripts/etc/systemd/system/open-vm-tools.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/open-vm-tools.service'` -ne 280 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/open-vm-tools.service' is not 280" - fi -fi -# ============= cloud_scripts/etc/systemd/system/baremetal-vr.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/baremetal-vr.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/baremetal-vr.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/baremetal-vr.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/baremetal-vr.service' && -[Unit] -Description=CloudStack Baremetal VR service -After=network.target local-fs.target -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=simple -WorkingDirectory=/opt/cloud/bin -ExecStart=/usr/bin/python /opt/cloud/bin/baremetal-vr.py -Restart=on-failure -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/baremetal-vr.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/baremetal-vr.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/baremetal-vr.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/baremetal-vr.service': 'MD5 check failed' - ) << \SHAR_EOF -9fc2a325a709e7cf9ae4d4ec8b7e692a cloud_scripts/etc/systemd/system/baremetal-vr.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/baremetal-vr.service'` -ne 257 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/baremetal-vr.service' is not 257" - fi -fi -# ============= cloud_scripts/etc/systemd/system/xe-daemon.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/xe-daemon.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/xe-daemon.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/xe-daemon.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/xe-daemon.service -M[[N_6U5N:71="D1E&5N+FUO=6YT"D)E9F]R93UN971W;W)K+G1A -M2UC;VYF:6&5C -M4W1A&5C4W1A3UM=6QT:2UU/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/xe-daemon.service': 'MD5 check failed' - ) << \SHAR_EOF -51e30000a8c2d2a91ba1a372bc40a628 cloud_scripts/etc/systemd/system/xe-daemon.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/xe-daemon.service'` -ne 398 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/xe-daemon.service' is not 398" - fi -fi -# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service -M[[N_6U5N:71="D1E5]D865M;VX@+6X*"EM);G-T86QL70I786YT961">3UM=6QT:2UU -*/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service': 'MD5 check failed' - ) << \SHAR_EOF -b1d4d295d2f3dff1ed1e13835e365e86 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service'` -ne 190 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service' is not 190" - fi -fi -# ============= cloud_scripts/etc/systemd/system/cloud-early-config.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-early-config.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-early-config.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-early-config.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-early-config.service' && -[Unit] -Description=CloudStack post-boot patching service using cmdline -DefaultDependencies=no -X -Before=network-pre.target -Wants=network-pre.target -X -Requires=local-fs.target -After=local-fs.target -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=oneshot -ExecStart=/opt/cloud/bin/setup/cloud-early-config -RemainAfterExit=true -TimeoutStartSec=5min -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-early-config.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/cloud-early-config.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-early-config.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-early-config.service': 'MD5 check failed' - ) << \SHAR_EOF -60723561261aa16ed4477c5e02c52bcd cloud_scripts/etc/systemd/system/cloud-early-config.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-early-config.service'` -ne 348 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-early-config.service' is not 348" - fi -fi -# ============= cloud_scripts/etc/systemd/system/cloud-password-server@.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-password-server@.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-password-server@.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' && -[Unit] -Description=Cloud password server on %I -After=network.target local-fs.target -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=simple -WorkingDirectory=/opt/cloud/bin -ExecStart=/opt/cloud/bin/passwd_server_ip.py %I -Restart=on-failure -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-password-server@.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-password-server@.service': 'MD5 check failed' - ) << \SHAR_EOF -3edb13a39635749f16f0579b481c5f25 cloud_scripts/etc/systemd/system/cloud-password-server@.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-password-server@.service'` -ne 244 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' is not 244" - fi -fi -# ============= cloud_scripts/etc/systemd/system/cloud-postinit.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-postinit.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-postinit.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-postinit.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-postinit.service' && -[Unit] -Description=CloudStack post-patching init script -After=cloud-early-config.service network.target local-fs.target -Before=ssh.service -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=oneshot -ExecStart=/opt/cloud/bin/setup/postinit.sh -RemainAfterExit=true -TimeoutStartSec=10min -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-postinit.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/cloud-postinit.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-postinit.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-postinit.service': 'MD5 check failed' - ) << \SHAR_EOF -22b48cd2a7478d27cb155d32cc2610cb cloud_scripts/etc/systemd/system/cloud-postinit.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-postinit.service'` -ne 287 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-postinit.service' is not 287" - fi -fi -# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service -M[[N_6U5N:71="D1E/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service': 'MD5 check failed' - ) << \SHAR_EOF -58d4e646ee66ac7c470796bd6ce9e2a6 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service'` -ne 156 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-vss-daemon.service' is not 156" - fi -fi -# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service -M[[N_6U5N:71="D1E/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service': 'MD5 check failed' - ) << \SHAR_EOF -027a172fad275171647740477b78ca93 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service'` -ne 143 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-kvp-daemon.service' is not 143" - fi -fi -# ============= cloud_scripts/etc/systemd/system/cloud.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud.service' && -[Unit] -Description=CloudStack Agent service -After=cloud-early-config.service network.target cloud-postinit.service local-fs.target -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=simple -WorkingDirectory=/usr/local/cloud/systemvm -ExecStart=/usr/local/cloud/systemvm/_run.sh -Restart=on-failure -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/cloud.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud.service': 'MD5 check failed' - ) << \SHAR_EOF -b7eb67763e7d694ed98758faef961ac6 cloud_scripts/etc/systemd/system/cloud.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud.service'` -ne 298 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud.service' is not 298" - fi -fi -# ============= cloud_scripts/etc/systemd/system/open-vm-tools.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/open-vm-tools.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/open-vm-tools.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/open-vm-tools.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/open-vm-tools.service -M[[N_6U5N:71="D1E&5C4W1A/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/open-vm-tools.service': 'MD5 check failed' - ) << \SHAR_EOF -10af19a17cd3ee299f08c46bace0f56f cloud_scripts/etc/systemd/system/open-vm-tools.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/open-vm-tools.service'` -ne 280 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/open-vm-tools.service' is not 280" - fi -fi -# ============= cloud_scripts/etc/systemd/system/baremetal-vr.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/baremetal-vr.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/baremetal-vr.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/baremetal-vr.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/baremetal-vr.service' && -[Unit] -Description=CloudStack Baremetal VR service -After=network.target local-fs.target -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=simple -WorkingDirectory=/opt/cloud/bin -ExecStart=/usr/bin/python /opt/cloud/bin/baremetal-vr.py -Restart=on-failure -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/baremetal-vr.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/baremetal-vr.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/baremetal-vr.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/baremetal-vr.service': 'MD5 check failed' - ) << \SHAR_EOF -9fc2a325a709e7cf9ae4d4ec8b7e692a cloud_scripts/etc/systemd/system/baremetal-vr.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/baremetal-vr.service'` -ne 257 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/baremetal-vr.service' is not 257" - fi -fi -# ============= cloud_scripts/etc/systemd/system/xe-daemon.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/xe-daemon.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/xe-daemon.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/xe-daemon.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/xe-daemon.service -M[[N_6U5N:71="D1E&5N+FUO=6YT"D)E9F]R93UN971W;W)K+G1A -M2UC;VYF:6&5C -M4W1A&5C4W1A3UM=6QT:2UU/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/xe-daemon.service': 'MD5 check failed' - ) << \SHAR_EOF -51e30000a8c2d2a91ba1a372bc40a628 cloud_scripts/etc/systemd/system/xe-daemon.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/xe-daemon.service'` -ne 398 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/xe-daemon.service' is not 398" - fi -fi -# ============= cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service -M[[N_6U5N:71="D1E5]D865M;VX@+6X*"EM);G-T86QL70I786YT961">3UM=6QT:2UU -*/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service': 'MD5 check failed' - ) << \SHAR_EOF -b1d4d295d2f3dff1ed1e13835e365e86 cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service'` -ne 190 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/hyperv-daemons.hv-fcopy-daemon.service' is not 190" - fi -fi -# ============= cloud_scripts/etc/systemd/system/cloud-early-config.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-early-config.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-early-config.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-early-config.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-early-config.service' && -[Unit] -Description=CloudStack post-boot patching service using cmdline -DefaultDependencies=no -X -Before=network-pre.target -Wants=network-pre.target -X -Requires=local-fs.target -After=local-fs.target -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=oneshot -ExecStart=/opt/cloud/bin/setup/cloud-early-config -RemainAfterExit=true -TimeoutStartSec=5min -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-early-config.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/cloud-early-config.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-early-config.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-early-config.service': 'MD5 check failed' - ) << \SHAR_EOF -60723561261aa16ed4477c5e02c52bcd cloud_scripts/etc/systemd/system/cloud-early-config.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-early-config.service'` -ne 348 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-early-config.service' is not 348" - fi -fi -# ============= cloud_scripts/etc/systemd/system/cloud-password-server@.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-password-server@.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-password-server@.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' && -[Unit] -Description=Cloud password server on %I -After=network.target local-fs.target -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=simple -WorkingDirectory=/opt/cloud/bin -ExecStart=/opt/cloud/bin/passwd_server_ip.py %I -Restart=on-failure -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-password-server@.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-password-server@.service': 'MD5 check failed' - ) << \SHAR_EOF -3edb13a39635749f16f0579b481c5f25 cloud_scripts/etc/systemd/system/cloud-password-server@.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-password-server@.service'` -ne 244 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-password-server@.service' is not 244" - fi -fi -# ============= cloud_scripts/etc/systemd/system/cloud-postinit.service ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/systemd/system/cloud-postinit.service' -then -${echo} "x - SKIPPING cloud_scripts/etc/systemd/system/cloud-postinit.service (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/systemd/system/cloud-postinit.service (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/systemd/system/cloud-postinit.service' && -[Unit] -Description=CloudStack post-patching init script -After=cloud-early-config.service network.target local-fs.target -Before=ssh.service -X -[Install] -WantedBy=multi-user.target -X -[Service] -Type=oneshot -ExecStart=/opt/cloud/bin/setup/postinit.sh -RemainAfterExit=true -TimeoutStartSec=10min -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/systemd/system/cloud-postinit.service' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/systemd/system/cloud-postinit.service' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/systemd/system/cloud-postinit.service failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/systemd/system/cloud-postinit.service': 'MD5 check failed' - ) << \SHAR_EOF -22b48cd2a7478d27cb155d32cc2610cb cloud_scripts/etc/systemd/system/cloud-postinit.service -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/systemd/system/cloud-postinit.service'` -ne 287 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/systemd/system/cloud-postinit.service' is not 287" - fi -fi -# ============= cloud_scripts/etc/iptables/rules ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/rules' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/rules (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/rules (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/rules' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT --A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT --A INPUT -i eth0 -p tcp -m state --state NEW --dport 8080 -j ACCEPT --A INPUT -i eth0 -p tcp -m state --state NEW --dport 80 -j ACCEPT --A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth0 -o eth2 -j ACCEPT --A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/rules' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/rules' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/rules failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/rules': 'MD5 check failed' - ) << \SHAR_EOF -e2be370a53cd4e436ce4c298b16ead21 cloud_scripts/etc/iptables/rules -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/rules'` -ne 1731 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/rules' is not 1731" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-consoleproxy ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-consoleproxy' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-consoleproxy (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-consoleproxy (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-consoleproxy' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] --A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp --icmp-type 13 -j DROP --A INPUT -p icmp -j ACCEPT --A INPUT -i eth1 -p tcp -m state --state NEW -m tcp --dport 3922 -j ACCEPT --A INPUT -i eth0 -p tcp -m state --state NEW -m tcp --dport 8001 -j ACCEPT --A INPUT -i eth1 -p tcp -m state --state NEW -m tcp --dport 8001 -j ACCEPT --A INPUT -i eth2 -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT --A INPUT -i eth2 -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-consoleproxy' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/iptables-consoleproxy' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-consoleproxy failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-consoleproxy': 'MD5 check failed' - ) << \SHAR_EOF -2840365dad7fe832ea35d8f72a3bfdca cloud_scripts/etc/iptables/iptables-consoleproxy -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-consoleproxy'` -ne 1601 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-consoleproxy' is not 1601" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-router ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-router' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-router (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-router (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-router' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] -:FW_EGRESS_RULES - [0:0] -:FW_OUTBOUND - [0:0] --A INPUT -d 224.0.0.18/32 -j ACCEPT --A INPUT -d 225.0.0.50/32 -j ACCEPT --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT --A INPUT -i eth1 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp -m state --state NEW --dport 80 -j ACCEPT --A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth0 -o eth0 -m state --state NEW -j ACCEPT --A FORWARD -i eth0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth0 -o eth2 -j FW_OUTBOUND --A FW_EGRESS_RULES -j ACCEPT --I FW_OUTBOUND -m state --state RELATED,ESTABLISHED -j ACCEPT --A FW_OUTBOUND -j FW_EGRESS_RULES -COMMIT -*mangle -:PREROUTING ACCEPT [0:0] -:INPUT ACCEPT [0:0] -:FORWARD ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] --A PREROUTING -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark --A POSTROUTING -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-router' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/iptables-router' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-router failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-router': 'MD5 check failed' - ) << \SHAR_EOF -aeabe6897f9969f64a87b793deee6500 cloud_scripts/etc/iptables/iptables-router -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-router'` -ne 2348 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-router' is not 2348" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-vpcrouter ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-vpcrouter' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-vpcrouter (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-vpcrouter (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-vpcrouter' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] --A INPUT -d 224.0.0.18/32 -j ACCEPT --A INPUT -d 225.0.0.50/32 -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT --A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT --A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT -COMMIT -*mangle -:PREROUTING ACCEPT [0:0] -:INPUT ACCEPT [0:0] -:FORWARD ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] --A OUTPUT -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-vpcrouter' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/iptables-vpcrouter' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-vpcrouter failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-vpcrouter': 'MD5 check failed' - ) << \SHAR_EOF -f3e4459f3b0eea8f2de2a6f01ef79866 cloud_scripts/etc/iptables/iptables-vpcrouter -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-vpcrouter'` -ne 1465 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-vpcrouter' is not 1465" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-dhcpsrvr ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-dhcpsrvr (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-dhcpsrvr (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] -:FW_EGRESS_RULES - [0:0] -:FW_OUTBOUND - [0:0] --A INPUT -d 224.0.0.18/32 -j ACCEPT --A INPUT -d 225.0.0.50/32 -j ACCEPT --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT --A INPUT -i eth1 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp -m state --state NEW --dport 80 -j ACCEPT --A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth0 -o eth0 -m state --state NEW -j ACCEPT --A FORWARD -i eth0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth0 -o eth2 -j FW_OUTBOUND --A FW_EGRESS_RULES -j ACCEPT --I FW_OUTBOUND -m state --state RELATED,ESTABLISHED -j ACCEPT --A FW_OUTBOUND -j FW_EGRESS_RULES -COMMIT -*mangle -:PREROUTING ACCEPT [0:0] -:INPUT ACCEPT [0:0] -:FORWARD ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] --A PREROUTING -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark --A POSTROUTING -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-dhcpsrvr failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-dhcpsrvr': 'MD5 check failed' - ) << \SHAR_EOF -aeabe6897f9969f64a87b793deee6500 cloud_scripts/etc/iptables/iptables-dhcpsrvr -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-dhcpsrvr'` -ne 2348 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' is not 2348" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-elbvm ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-elbvm' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-elbvm (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-elbvm (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-elbvm' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-elbvm' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/iptables/iptables-elbvm' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-elbvm failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-elbvm': 'MD5 check failed' - ) << \SHAR_EOF -7a950ed86376c0166c53943cdf68ccb2 cloud_scripts/etc/iptables/iptables-elbvm -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-elbvm'` -ne 1256 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-elbvm' is not 1256" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-secstorage ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-secstorage' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-secstorage (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-secstorage (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-secstorage' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] -:HTTP - [0:0] --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth3 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -p icmp --icmp-type 13 -j DROP --A INPUT -p icmp -j ACCEPT --A INPUT -i eth0 -p tcp -m state --state NEW --dport 3922 -j ACCEPT -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-secstorage' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/iptables/iptables-secstorage' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-secstorage failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-secstorage': 'MD5 check failed' - ) << \SHAR_EOF -d031185b81ee7ee008b80d434d44b61d cloud_scripts/etc/iptables/iptables-secstorage -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-secstorage'` -ne 1375 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-secstorage' is not 1375" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-ilbvm ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-ilbvm' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-ilbvm (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-ilbvm (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-ilbvm' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-ilbvm' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/iptables/iptables-ilbvm' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-ilbvm failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-ilbvm': 'MD5 check failed' - ) << \SHAR_EOF -85129e942bc07d1fb67e0e169238c345 cloud_scripts/etc/iptables/iptables-ilbvm -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-ilbvm'` -ne 1192 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-ilbvm' is not 1192" - fi -fi -# ============= cloud_scripts/etc/iptables/rt_tables_init ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/rt_tables_init' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/rt_tables_init (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/rt_tables_init (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/rt_tables_init' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -# -# reserved values -# -255 local -254 main -253 default -0 unspec -# -# local -# -#1 inr.ruhep -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/rt_tables_init' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/rt_tables_init' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/rt_tables_init failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/rt_tables_init': 'MD5 check failed' - ) << \SHAR_EOF -86477f42d18121a176751c7284251089 cloud_scripts/etc/iptables/rt_tables_init -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/rt_tables_init'` -ne 897 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/rt_tables_init' is not 897" - fi -fi -# ============= cloud_scripts/etc/iptables/rules ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/rules' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/rules (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/rules (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/rules' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT --A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT --A INPUT -i eth0 -p tcp -m state --state NEW --dport 8080 -j ACCEPT --A INPUT -i eth0 -p tcp -m state --state NEW --dport 80 -j ACCEPT --A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth0 -o eth2 -j ACCEPT --A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/rules' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/rules' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/rules failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/rules': 'MD5 check failed' - ) << \SHAR_EOF -e2be370a53cd4e436ce4c298b16ead21 cloud_scripts/etc/iptables/rules -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/rules'` -ne 1731 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/rules' is not 1731" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-consoleproxy ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-consoleproxy' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-consoleproxy (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-consoleproxy (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-consoleproxy' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] --A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp --icmp-type 13 -j DROP --A INPUT -p icmp -j ACCEPT --A INPUT -i eth1 -p tcp -m state --state NEW -m tcp --dport 3922 -j ACCEPT --A INPUT -i eth0 -p tcp -m state --state NEW -m tcp --dport 8001 -j ACCEPT --A INPUT -i eth1 -p tcp -m state --state NEW -m tcp --dport 8001 -j ACCEPT --A INPUT -i eth2 -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT --A INPUT -i eth2 -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-consoleproxy' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/iptables-consoleproxy' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-consoleproxy failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-consoleproxy': 'MD5 check failed' - ) << \SHAR_EOF -2840365dad7fe832ea35d8f72a3bfdca cloud_scripts/etc/iptables/iptables-consoleproxy -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-consoleproxy'` -ne 1601 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-consoleproxy' is not 1601" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-router ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-router' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-router (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-router (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-router' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] -:FW_EGRESS_RULES - [0:0] -:FW_OUTBOUND - [0:0] --A INPUT -d 224.0.0.18/32 -j ACCEPT --A INPUT -d 225.0.0.50/32 -j ACCEPT --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT --A INPUT -i eth1 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp -m state --state NEW --dport 80 -j ACCEPT --A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth0 -o eth0 -m state --state NEW -j ACCEPT --A FORWARD -i eth0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth0 -o eth2 -j FW_OUTBOUND --A FW_EGRESS_RULES -j ACCEPT --I FW_OUTBOUND -m state --state RELATED,ESTABLISHED -j ACCEPT --A FW_OUTBOUND -j FW_EGRESS_RULES -COMMIT -*mangle -:PREROUTING ACCEPT [0:0] -:INPUT ACCEPT [0:0] -:FORWARD ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] --A PREROUTING -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark --A POSTROUTING -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-router' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/iptables-router' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-router failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-router': 'MD5 check failed' - ) << \SHAR_EOF -aeabe6897f9969f64a87b793deee6500 cloud_scripts/etc/iptables/iptables-router -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-router'` -ne 2348 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-router' is not 2348" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-vpcrouter ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-vpcrouter' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-vpcrouter (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-vpcrouter (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-vpcrouter' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] --A INPUT -d 224.0.0.18/32 -j ACCEPT --A INPUT -d 225.0.0.50/32 -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT --A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT --A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT -COMMIT -*mangle -:PREROUTING ACCEPT [0:0] -:INPUT ACCEPT [0:0] -:FORWARD ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] --A OUTPUT -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-vpcrouter' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/iptables-vpcrouter' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-vpcrouter failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-vpcrouter': 'MD5 check failed' - ) << \SHAR_EOF -f3e4459f3b0eea8f2de2a6f01ef79866 cloud_scripts/etc/iptables/iptables-vpcrouter -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-vpcrouter'` -ne 1465 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-vpcrouter' is not 1465" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-dhcpsrvr ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-dhcpsrvr (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-dhcpsrvr (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] -:FW_EGRESS_RULES - [0:0] -:FW_OUTBOUND - [0:0] --A INPUT -d 224.0.0.18/32 -j ACCEPT --A INPUT -d 225.0.0.50/32 -j ACCEPT --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT --A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT --A INPUT -i eth1 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp -m state --state NEW --dport 80 -j ACCEPT --A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth0 -o eth0 -m state --state NEW -j ACCEPT --A FORWARD -i eth0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i eth0 -o eth2 -j FW_OUTBOUND --A FW_EGRESS_RULES -j ACCEPT --I FW_OUTBOUND -m state --state RELATED,ESTABLISHED -j ACCEPT --A FW_OUTBOUND -j FW_EGRESS_RULES -COMMIT -*mangle -:PREROUTING ACCEPT [0:0] -:INPUT ACCEPT [0:0] -:FORWARD ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] --A PREROUTING -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark --A POSTROUTING -p udp -m udp --dport bootpc -j CHECKSUM --checksum-fill -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-dhcpsrvr failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-dhcpsrvr': 'MD5 check failed' - ) << \SHAR_EOF -aeabe6897f9969f64a87b793deee6500 cloud_scripts/etc/iptables/iptables-dhcpsrvr -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-dhcpsrvr'` -ne 2348 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-dhcpsrvr' is not 2348" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-elbvm ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-elbvm' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-elbvm (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-elbvm (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-elbvm' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-elbvm' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/iptables/iptables-elbvm' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-elbvm failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-elbvm': 'MD5 check failed' - ) << \SHAR_EOF -7a950ed86376c0166c53943cdf68ccb2 cloud_scripts/etc/iptables/iptables-elbvm -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-elbvm'` -ne 1256 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-elbvm' is not 1256" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-secstorage ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-secstorage' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-secstorage (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-secstorage (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-secstorage' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] -:HTTP - [0:0] --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth3 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -p icmp --icmp-type 13 -j DROP --A INPUT -p icmp -j ACCEPT --A INPUT -i eth0 -p tcp -m state --state NEW --dport 3922 -j ACCEPT -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-secstorage' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/iptables/iptables-secstorage' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-secstorage failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-secstorage': 'MD5 check failed' - ) << \SHAR_EOF -d031185b81ee7ee008b80d434d44b61d cloud_scripts/etc/iptables/iptables-secstorage -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-secstorage'` -ne 1375 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-secstorage' is not 1375" - fi -fi -# ============= cloud_scripts/etc/iptables/iptables-ilbvm ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/iptables-ilbvm' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/iptables-ilbvm (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/iptables-ilbvm (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/iptables-ilbvm' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -*nat -:PREROUTING ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -COMMIT -*filter -:INPUT DROP [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [0:0] --A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT --A INPUT -p icmp -j ACCEPT --A INPUT -i lo -j ACCEPT --A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT -COMMIT -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/iptables-ilbvm' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/iptables/iptables-ilbvm' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/iptables-ilbvm failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/iptables-ilbvm': 'MD5 check failed' - ) << \SHAR_EOF -85129e942bc07d1fb67e0e169238c345 cloud_scripts/etc/iptables/iptables-ilbvm -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/iptables-ilbvm'` -ne 1192 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/iptables-ilbvm' is not 1192" - fi -fi -# ============= cloud_scripts/etc/iptables/rt_tables_init ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/iptables/rt_tables_init' -then -${echo} "x - SKIPPING cloud_scripts/etc/iptables/rt_tables_init (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/iptables/rt_tables_init (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/iptables/rt_tables_init' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -# -# reserved values -# -255 local -254 main -253 default -0 unspec -# -# local -# -#1 inr.ruhep -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/iptables/rt_tables_init' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/iptables/rt_tables_init' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/iptables/rt_tables_init failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/iptables/rt_tables_init': 'MD5 check failed' - ) << \SHAR_EOF -86477f42d18121a176751c7284251089 cloud_scripts/etc/iptables/rt_tables_init -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/iptables/rt_tables_init'` -ne 897 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/iptables/rt_tables_init' is not 897" - fi -fi -# ============= cloud_scripts/etc/sysctl.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/sysctl.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/sysctl.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/sysctl.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/sysctl.conf' && -# Kernel sysctl configuration file -# -# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and -# sysctl.conf(5) for more details. -# @VERSION@ -X -# Controls IP packet forwarding -net.ipv4.ip_forward = 1 -X -# Controls source route verification -net.ipv4.conf.default.rp_filter = 0 -X -# Do not accept source routing -net.ipv4.conf.default.accept_source_route = 0 -X -# Respect local interface in ARP interactions -net.ipv4.conf.default.arp_announce = 2 -net.ipv4.conf.default.arp_ignore = 2 -net.ipv4.conf.all.arp_announce = 2 -net.ipv4.conf.all.arp_ignore = 2 -X -# IPSec NETKEY -- avoid bogus redirects -net.ipv4.conf.all.accept_redirects = 0 -net.ipv4.conf.default.accept_redirects = 0 -net.ipv4.conf.all.send_redirects = 0 -net.ipv4.conf.default.send_redirects = 0 -net.ipv4.conf.all.secure_redirects = 0 -net.ipv4.conf.default.secure_redirects = 0 -X -# For smooth transition of the vip address in case of a keepalived failover -net.ipv4.ip_nonlocal_bind = 1 -X -# Controls the System Request debugging functionality of the kernel -kernel.sysrq = 0 -X -# Controls whether core dumps will append the PID to the core filename. -# Useful for debugging multi-threaded applications. -kernel.core_uses_pid = 1 -X -# A better way for the instance to die -kernel.panic = 10 -kernel.panic_on_oops = 1 -vm.panic_on_oom = 1 -X -# Controls the use of TCP syncookies -net.ipv4.tcp_syncookies = 1 -X -# disable tcp time stamps -net.ipv4.tcp_timestamps = 0 -X -net.ipv4.tcp_tw_reuse = 1 -net.ipv4.tcp_max_tw_buckets = 1000000 -net.core.somaxconn = 65535 -net.nf_conntrack_max = 1000000 -net.netfilter.nf_conntrack_max = 1000000 -X -# Disable IPv6 -net.ipv6.conf.all.disable_ipv6 = 1 -net.ipv6.conf.all.forwarding = 0 -net.ipv6.conf.all.accept_ra = 0 -net.ipv6.conf.all.accept_redirects = 0 -net.ipv6.conf.all.autoconf = 0 -X -# Minimum swappiness without disabling it -vm.swappiness=1 -X -# make the kernel more aggressive in reclaiming RAM from the disk and swap caches -vm.vfs_cache_pressure = 200 -X -# try to maintain 'free' memory thereby reducing the size of disk cache, hence reducing swapping. -vm.min_free_kbytes = 20480 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/sysctl.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/sysctl.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/sysctl.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/sysctl.conf': 'MD5 check failed' - ) << \SHAR_EOF -f1cef50b7a8a7cc7a7a24ff08cbea1f8 cloud_scripts/etc/sysctl.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/sysctl.conf'` -ne 2049 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/sysctl.conf' is not 2049" - fi -fi -# ============= cloud_scripts/etc/xl2tpd/xl2tpd.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/xl2tpd/xl2tpd.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/xl2tpd/xl2tpd.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' && -[lns default] -ip range = 10.1.9.2-10.1.9.8 -local ip = 10.1.9.1 -require chap = yes -refuse pap = yes -pppoptfile = /etc/ppp/options.xl2tpd -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/xl2tpd/xl2tpd.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/xl2tpd/xl2tpd.conf': 'MD5 check failed' - ) << \SHAR_EOF -060f03388ae34c64f85a45f47c9f6d48 cloud_scripts/etc/xl2tpd/xl2tpd.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/xl2tpd/xl2tpd.conf'` -ne 139 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' is not 139" - fi -fi -# ============= cloud_scripts/etc/xl2tpd/xl2tpd.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/xl2tpd/xl2tpd.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/xl2tpd/xl2tpd.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' && -[lns default] -ip range = 10.1.9.2-10.1.9.8 -local ip = 10.1.9.1 -require chap = yes -refuse pap = yes -pppoptfile = /etc/ppp/options.xl2tpd -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/xl2tpd/xl2tpd.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/xl2tpd/xl2tpd.conf': 'MD5 check failed' - ) << \SHAR_EOF -060f03388ae34c64f85a45f47c9f6d48 cloud_scripts/etc/xl2tpd/xl2tpd.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/xl2tpd/xl2tpd.conf'` -ne 139 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/xl2tpd/xl2tpd.conf' is not 139" - fi -fi -# ============= cloud_scripts/etc/dnsmasq.conf.tmpl ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/dnsmasq.conf.tmpl' -then -${echo} "x - SKIPPING cloud_scripts/etc/dnsmasq.conf.tmpl (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/dnsmasq.conf.tmpl (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/dnsmasq.conf.tmpl' && -# Configuration file for dnsmasq. -# -# Format is one option per line, legal options are the same -# as the long options legal on the command line. See -# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. -X -# Listen on this specific port instead of the standard DNS port -# (53). Setting this to zero completely disables DNS function, -# leaving only DHCP and/or TFTP. -#port=5353 -X -# The following two options make you a better netizen, since they -# tell dnsmasq to filter out queries which the public DNS cannot -# answer, and which load the servers (especially the root servers) -# unnecessarily. If you have a dial-on-demand link they also stop -# these requests from bringing up the link unnecessarily. -X -# Never forward plain names (without a dot or domain part) -domain-needed -# Never forward addresses in the non-routed address spaces. -bogus-priv -X -X -# Uncomment this to filter useless windows-originated DNS requests -# which can trigger dial-on-demand links needlessly. -# Note that (amongst other things) this blocks all SRV requests, -# so don't use it if you use eg Kerberos, SIP, XMMP or Google-talk. -# This option only affects forwarding, SRV records originating for -# dnsmasq (via srv-host= lines) are not suppressed by it. -# filterwin2k -X -# Change this line if you want dns to get its upstream servers from -# somewhere other that /etc/resolv.conf -resolv-file=/etc/dnsmasq-resolv.conf -X -# By default, dnsmasq will send queries to any of the upstream -# servers it knows about and tries to favour servers to are known -# to be up. Uncommenting this forces dnsmasq to try each query -# with each server strictly in the order they appear in -# /etc/resolv.conf -#strict-order -X -# If you don't want dnsmasq to read /etc/resolv.conf or any other -# file, getting its servers from this file instead (see below), then -# uncomment this. -#no-resolv -X -# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv -# files for changes and re-read them then uncomment this. -#no-poll -X -# Add other name servers here, with domain specs if they are for -# non-public domains. -#server=/localnet/192.168.0.1 -X -# Example of routing PTR queries to nameservers: this will send all -# address->name queries for 192.168.3/24 to nameserver 10.1.2.3 -#server=/3.168.192.in-addr.arpa/10.1.2.3 -X -# Add local-only domains here, queries in these domains are answered -# from /etc/hosts or DHCP only. -local=/2.vmops-test.vmops.com/ -X -# Add domains which you want to force to an IP address here. -# The example below send any host in double-click.net to a local -# web-server. -#address=/double-click.net/127.0.0.1 -X -# --address (and --server) work with IPv6 addresses too. -#address=/www.thekelleys.org.uk/fe80::20d:60ff:fe36:f83 -X -# You can control how dnsmasq talks to a server: this forces -# queries to 10.1.2.3 to be routed via eth1 -# server=10.1.2.3@eth1 -X -# and this sets the source (ie local) address used to talk to -# 10.1.2.3 to 192.168.1.1 port 55 (there must be a interface with that -# IP on the machine, obviously). -# server=10.1.2.3@192.168.1.1#55 -X -# If you want dnsmasq to change uid and gid to something other -# than the default, edit the following lines. -#user= -#group= -X -# If you want dnsmasq to listen for DHCP and DNS requests only on -# specified interfaces (and the loopback) give the name of the -# interface (eg eth0) here. -# Repeat the line for more than one interface. -#interface=eth0 -# Or you can specify which interface _not_ to listen on -except-interface=eth1 -except-interface=eth2 -except-interface=lo -# Or which to listen on by address (remember to include 127.0.0.1 if -# you use this.) -#listen-address= -# If you want dnsmasq to provide only DNS service on an interface, -# configure it as shown above, and then use the following line to -# disable DHCP and TFTP on it. -no-dhcp-interface=eth1 -no-dhcp-interface=eth2 -X -# On systems which support it, dnsmasq binds the wildcard address, -# even when it is listening on only some interfaces. It then discards -# requests that it shouldn't reply to. This has the advantage of -# working even when interfaces come and go and change address. If you -# want dnsmasq to really bind only the interfaces it is listening on, -# uncomment this option. About the only time you may need this is when -# running another nameserver on the same machine. -#bind-interfaces -X -# If you don't want dnsmasq to read /etc/hosts, uncomment the -# following line. -#no-hosts -# or if you want it to read another file, as well as /etc/hosts, use -# this. -#addn-hosts=/etc/banner_add_hosts -X -# Set this (and domain: see below) if you want to have a domain -# automatically added to simple names in a hosts-file. -expand-hosts -X -# Set the domain for dnsmasq. this is optional, but if it is set, it -# does the following things. -# 1) Allows DHCP hosts to have fully qualified domain names, as long -# as the domain part matches this setting. -# 2) Sets the "domain" DHCP option thereby potentially setting the -# domain of all systems configured by DHCP -# 3) Provides the domain part for "expand-hosts" -domain=2.vmops-test.vmops.com -X -# Set a different domain for a particular subnet -#domain=wireless.thekelleys.org.uk,192.168.2.0/24 -X -# Same idea, but range rather then subnet -#domain=reserved.thekelleys.org.uk,192.68.3.100,192.168.3.200 -X -# Uncomment this to enable the integrated DHCP server, you need -# to supply the range of addresses available for lease and optionally -# a lease time. If you have more than one network, you will need to -# repeat this for each network on which you want to supply DHCP -# service. -dhcp-range_ip4=10.1.1.1,static -dhcp-range_ip6=::1,static -dhcp-hostsfile=/etc/dhcphosts.txt -X -# This is an example of a DHCP range where the netmask is given. This -# is needed for networks we reach the dnsmasq DHCP server via a relay -# agent. If you don't know what a DHCP relay agent is, you probably -# don't need to worry about this. -#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h -X -# This is an example of a DHCP range which sets a tag, so that -# some DHCP options may be set only for this network. -#dhcp-range=set:red,192.168.0.50,192.168.0.150 -X -# Use this DHCP range only when the tag "green" is set. -#dhcp-range=tag:green,192.168.0.50,192.168.0.150,12h -X -# Specify a subnet which can't be used for dynamic address allocation, -# is available for hosts with matching --dhcp-host lines. Note that -# dhcp-host declarations will be ignored unless there is a dhcp-range -# of some type for the subnet in question. -# In this case the netmask is implied (it comes from the network -# configuration on the machine running dnsmasq) it is possible to give -# an explicit netmask instead. -#dhcp-range=192.168.0.0,static -X -# Enable DHCPv6. Note that the prefix-length does not need to be specified -# and defaults to 64 if missing/ -#dhcp-range=1234::2, 1234::500, 64, 12h -X -# Do Router Advertisements, BUT NOT DHCP for this subnet. -#dhcp-range=1234::, ra-only -X -# Do Router Advertisements, BUT NOT DHCP for this subnet, also try and -# add names to the DNS for the IPv6 address of SLAAC-configured dual-stack -# hosts. Use the DHCPv4 lease to derive the name, network segment and -# MAC address and assume that the host will also have an -# IPv6 address calculated using the SLAAC alogrithm. -#dhcp-range=1234::, ra-names -X -# Do Router Advertisements, BUT NOT DHCP for this subnet. -# Set the lifetime to 46 hours. (Note: minimum lifetime is 2 hours.) -#dhcp-range=1234::, ra-only, 48h -X -# Do DHCP and Router Advertisements for this subnet. Set the A bit in the RA -# so that clients can use SLAAC addresses as well as DHCP ones. -#dhcp-range=1234::2, 1234::500, slaac -X -# Do Router Advertisements and stateless DHCP for this subnet. Clients will -# not get addresses from DHCP, but they will get other configuration information. -# They will use SLAAC for addresses. -#dhcp-range=1234::, ra-stateless -X -# Do stateless DHCP, SLAAC, and generate DNS names for SLAAC addresses -# from DHCPv4 leases. -#dhcp-range=1234::, ra-stateless, ra-names -X -# Do router advertisements for all subnets where we're doing DHCPv6 -# Unless overriden by ra-stateless, ra-names, et al, the router -# advertisements will have the M and O bits set, so that the clients -# get addresses and configuration from DHCPv6, and the A bit reset, so the -# clients don't use SLAAC addresses. -#enable-ra -X -# Supply parameters for specified hosts using DHCP. There are lots -# of valid alternatives, so we will give examples of each. Note that -# IP addresses DO NOT have to be in the range given above, they just -# need to be on the same network. The order of the parameters in these -# do not matter, it's permissible to give name, address and MAC in any -# order. -X -# Always allocate the host with Ethernet address 11:22:33:44:55:66 -# The IP address 192.168.0.60 -#dhcp-host=11:22:33:44:55:66,192.168.0.60 -X -# Always set the name of the host with hardware address -# 11:22:33:44:55:66 to be "fred" -#dhcp-host=11:22:33:44:55:66,fred -X -# Always give the host with Ethernet address 11:22:33:44:55:66 -# the name fred and IP address 192.168.0.60 and lease time 45 minutes -#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m -X -# Give a host with Ethernet address 11:22:33:44:55:66 or -# 12:34:56:78:90:12 the IP address 192.168.0.60. Dnsmasq will assume -# that these two Ethernet interfaces will never be in use at the same -# time, and give the IP address to the second, even if it is already -# in use by the first. Useful for laptops with wired and wireless -# addresses. -#dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.60 -X -# Give the machine which says its name is "bert" IP address -# 192.168.0.70 and an infinite lease -#dhcp-host=bert,192.168.0.70,infinite -X -# Always give the host with client identifier 01:02:02:04 -# the IP address 192.168.0.60 -#dhcp-host=id:01:02:02:04,192.168.0.60 -X -# Always give the host with client identifier "marjorie" -# the IP address 192.168.0.60 -#dhcp-host=id:marjorie,192.168.0.60 -X -# Enable the address given for "judge" in /etc/hosts -# to be given to a machine presenting the name "judge" when -# it asks for a DHCP lease. -#dhcp-host=judge -X -# Never offer DHCP service to a machine whose Ethernet -# address is 11:22:33:44:55:66 -#dhcp-host=11:22:33:44:55:66,ignore -X -# Ignore any client-id presented by the machine with Ethernet -# address 11:22:33:44:55:66. This is useful to prevent a machine -# being treated differently when running under different OS's or -# between PXE boot and OS boot. -#dhcp-host=11:22:33:44:55:66,id:* -X -# Send extra options which are tagged as "red" to -# the machine with Ethernet address 11:22:33:44:55:66 -#dhcp-host=11:22:33:44:55:66,set:red -X -# Send extra options which are tagged as "red" to -# any machine with Ethernet address starting 11:22:33: -#dhcp-host=11:22:33:*:*:*,set:red -X -# Give a fixed IPv6 address and name to client with -# DUID 00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2 -# Note the MAC addresses CANNOT be used to identify DHCPv6 clients. -# Note also the they [] around the IPv6 address are obilgatory. -#dhcp-host=id:00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2, fred, [1234::5] -X -# Ignore any clients which are not specified in dhcp-host lines -# or /etc/ethers. Equivalent to ISC "deny unknown-clients". -# This relies on the special "known" tag which is set when -# a host is matched. -# -# When using bridged networks in ACS this prevents ack to DHCPINFORM etc. request -dhcp-ignore=tag:!known -X -# Send extra options which are tagged as "red" to any machine whose -# DHCP vendorclass string includes the substring "Linux" -#dhcp-vendorclass=set:red,Linux -X -# Send extra options which are tagged as "red" to any machine one -# of whose DHCP userclass strings includes the substring "accounts" -#dhcp-userclass=set:red,accounts -X -# Send extra options which are tagged as "red" to any machine whose -# MAC address matches the pattern. -#dhcp-mac=set:red,00:60:8C:*:*:* -X -# If this line is uncommented, dnsmasq will read /etc/ethers and act -# on the ethernet-address/IP pairs found there just as if they had -# been given as --dhcp-host options. Useful if you keep -# MAC-address/host mappings there for other purposes. -#read-ethers -X -# Send options to hosts which ask for a DHCP lease. -# See RFC 2132 for details of available options. -# Common options can be given to dnsmasq by name: -# run "dnsmasq --help dhcp" to get a list. -# Note that all the common settings, such as netmask and -# broadcast address, DNS server and default route, are given -# sane defaults by dnsmasq. You very likely will not need -# any dhcp-options. If you use Windows clients and Samba, there -# are some options which are recommended, they are detailed at the -# end of this section. -X -# Override the default route supplied by dnsmasq, which assumes the -# router is the same machine as the one running dnsmasq. -#dhcp-option=3,1.2.3.4 -X -# Do the same thing, but using the option name -#dhcp-option=option:router,1.2.3.4 -X -# Override the default route supplied by dnsmasq and send no default -# route at all. Note that this only works for the options sent by -# default (1, 3, 6, 12, 28) the same line will send a zero-length option -# for all other option numbers. -#dhcp-option=3 -X -# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 -#dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5 -X -# Send DHCPv6 option. Note [] around IPv6 addresses. -#dhcp-option=option6:dns-server,[1234::77],[1234::88] -X -# Send DHCPv6 option for namservers as the machine running -# dnsmasq and another. -#dhcp-option=option6:dns-server,[::],[1234::88] -X -# Set the NTP time server address to be the same machine as -# is running dnsmasq -#dhcp-option=42,0.0.0.0 -X -# Set the NIS domain name to "welly" -#dhcp-option=40,welly -X -# Set the default time-to-live to 50 -#dhcp-option=23,50 -X -# Set the "all subnets are local" flag -#dhcp-option=27,1 -X -# Set the domain -dhcp-option=15,"2.vmops-test.vmops.com" -X -# Send the etherboot magic flag and then etherboot options (a string). -#dhcp-option=128,e4:45:74:68:00:00 -#dhcp-option=129,NIC=eepro100 -X -# Specify an option which will only be sent to the "red" network -# (see dhcp-range for the declaration of the "red" network) -# Note that the tag: part must precede the option: part. -#dhcp-option = tag:red, option:ntp-server, 192.168.1.1 -X -# The following DHCP options set up dnsmasq in the same way as is specified -# for the ISC dhcpcd in -# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt -# adapted for a typical dnsmasq installation where the host running -# dnsmasq is also the host running samba. -# you may want to uncomment some or all of them if you use -# Windows clients and Samba. -#dhcp-option=19,0 # option ip-forwarding off -#dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) -#dhcp-option=45,0.0.0.0 # netbios datagram distribution server -#dhcp-option=46,8 # netbios node type -X -# Send an empty WPAD option. This may be REQUIRED to get windows 7 to behave. -#dhcp-option=252,"\n" -X -# Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client -# probably doesn't support this...... -#dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com -X -# Send RFC-3442 classless static routes (note the netmask encoding) -#dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8 -X -# Send vendor-class specific options encapsulated in DHCP option 43. -# The meaning of the options is defined by the vendor-class so -# options are sent only when the client supplied vendor class -# matches the class given here. (A substring match is OK, so "MSFT" -# matches "MSFT" and "MSFT 5.0"). This example sets the -# mtftp address to 0.0.0.0 for PXEClients. -#dhcp-option=vendor:PXEClient,1,0.0.0.0 -X -# Send microsoft-specific option to tell windows to release the DHCP lease -# when it shuts down. Note the "i" flag, to tell dnsmasq to send the -# value as a four-byte integer - that's what microsoft wants. See -# http://technet2.microsoft.com/WindowsServer/en/library/a70f1bb7-d2d4-49f0-96d6-4b7414ecfaae1033.mspx?mfr=true -dhcp-option=vendor:MSFT,2,1i -X -# Send the Encapsulated-vendor-class ID needed by some configurations of -# Etherboot to allow is to recognise the DHCP server. -#dhcp-option=vendor:Etherboot,60,"Etherboot" -X -# Send options to PXELinux. Note that we need to send the options even -# though they don't appear in the parameter request list, so we need -# to use dhcp-option-force here. -# See http://syslinux.zytor.com/pxe.php#special for details. -# Magic number - needed before anything else is recognised -#dhcp-option-force=208,f1:00:74:7e -# Configuration file name -#dhcp-option-force=209,configs/common -# Path prefix -#dhcp-option-force=210,/tftpboot/pxelinux/files/ -# Reboot time. (Note 'i' to send 32-bit value) -#dhcp-option-force=211,30i -X -# Set the boot filename for netboot/PXE. You will only need -# this is you want to boot machines over the network and you will need -# a TFTP server; either dnsmasq's built in TFTP server or an -# external one. (See below for how to enable the TFTP server.) -dhcp-boot=pxelinux.0 -X -# The same as above, but use custom tftp-server instead machine running dnsmasq -#dhcp-boot=pxelinux,server.name,192.168.1.100 -X -# Boot for Etherboot gPXE. The idea is to send two different -# filenames, the first loads gPXE, and the second tells gPXE what to -# load. The dhcp-match sets the gpxe tag for requests from gPXE. -#dhcp-match=set:gpxe,175 # gPXE sends a 175 option. -#dhcp-boot=tag:!gpxe,undionly.kpxe -#dhcp-boot=mybootimage -X -# Encapsulated options for Etherboot gPXE. All the options are -# encapsulated within option 175 -#dhcp-option=encap:175, 1, 5b # priority code -#dhcp-option=encap:175, 176, 1b # no-proxydhcp -#dhcp-option=encap:175, 177, string # bus-id -#dhcp-option=encap:175, 189, 1b # BIOS drive code -#dhcp-option=encap:175, 190, user # iSCSI username -#dhcp-option=encap:175, 191, pass # iSCSI password -X -# Test for the architecture of a netboot client. PXE clients are -# supposed to send their architecture as option 93. (See RFC 4578) -#dhcp-match=peecees, option:client-arch, 0 #x86-32 -#dhcp-match=itanics, option:client-arch, 2 #IA64 -#dhcp-match=hammers, option:client-arch, 6 #x86-64 -#dhcp-match=mactels, option:client-arch, 7 #EFI x86-64 -X -# Do real PXE, rather than just booting a single file, this is an -# alternative to dhcp-boot. -#pxe-prompt="What system shall I netboot?" -# or with timeout before first available action is taken: -#pxe-prompt="Press F8 for menu.", 60 -X -# Available boot services. for PXE. -#pxe-service=x86PC, "Boot from local disk" -X -# Loads /pxelinux.0 from dnsmasq TFTP server. -#pxe-service=x86PC, "Install Linux", pxelinux -X -# Loads /pxelinux.0 from TFTP server at 1.2.3.4. -# Beware this fails on old PXE ROMS. -#pxe-service=x86PC, "Install Linux", pxelinux, 1.2.3.4 -X -# Use bootserver on network, found my multicast or broadcast. -#pxe-service=x86PC, "Install windows from RIS server", 1 -X -# Use bootserver at a known IP address. -#pxe-service=x86PC, "Install windows from RIS server", 1, 1.2.3.4 -X -# If you have multicast-FTP available, -# information for that can be passed in a similar way using options 1 -# to 5. See page 19 of -# http://download.intel.com/design/archives/wfm/downloads/pxespec.pdf -X -X -# Enable dnsmasq's built-in TFTP server -enable-tftp -X -# Set the root directory for files available via FTP. -tftp-root=/opt/tftpboot -X -# Make the TFTP server more secure: with this set, only files owned by -# the user dnsmasq is running as will be send over the net. -#tftp-secure -X -# This option stops dnsmasq from negotiating a larger blocksize for TFTP -# transfers. It will slow things down, but may rescue some broken TFTP -# clients. -#tftp-no-blocksize -X -# Set the boot file name only when the "red" tag is set. -#dhcp-boot=net:red,pxelinux.red-net -X -# An example of dhcp-boot with an external TFTP server: the name and IP -# address of the server are given after the filename. -# Can fail with old PXE ROMS. Overridden by --pxe-service. -#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 -X -# If there are multiple external tftp servers having a same name -# (using /etc/hosts) then that name can be specified as the -# tftp_servername (the third option to dhcp-boot) and in that -# case dnsmasq resolves this name and returns the resultant IP -# addresses in round robin fasion. This facility can be used to -# load balance the tftp load among a set of servers. -#dhcp-boot=/var/ftpd/pxelinux.0,boothost,tftp_server_name -X -# Set the limit on DHCP leases, the default is 150 -dhcp-lease-max=2100 -X -# The DHCP server needs somewhere on disk to keep its lease database. -# This defaults to a sane location, but if you want to change it, use -# the line below. -#dhcp-leasefile=/var/lib/misc/dnsmasq.leases -leasefile-ro -X -# Set the DHCP server to authoritative mode. In this mode it will barge in -# and take over the lease for any client which broadcasts on the network, -# whether it has a record of the lease or not. This avoids long timeouts -# when a machine wakes up on a new network. DO NOT enable this if there's -# the slightest chance that you might end up accidentally configuring a DHCP -# server for your campus/company accidentally. The ISC server uses -# the same option, and this URL provides more information: -# http://www.isc.org/files/auth.html -#dhcp-authoritative -X -# Run an executable when a DHCP lease is created or destroyed. -# The arguments sent to the script are "add" or "del", -# then the MAC address, the IP address and finally the hostname -# if there is one. -#dhcp-script=/bin/echo -X -# Set the cachesize here. -#cache-size=150 -X -# If you want to disable negative caching, uncomment this. -#no-negcache -X -# Normally responses which come form /etc/hosts and the DHCP lease -# file have Time-To-Live set as zero, which conventionally means -# do not cache further. If you are happy to trade lower load on the -# server for potentially stale date, you can set a time-to-live (in -# seconds) here. -#local-ttl= -X -# If you want dnsmasq to detect attempts by Verisign to send queries -# to unregistered .com and .net hosts to its sitefinder service and -# have dnsmasq instead return the correct NXDOMAIN response, uncomment -# this line. You can add similar lines to do the same for other -# registries which have implemented wildcard A records. -#bogus-nxdomain=64.94.110.11 -X -# If you want to fix up DNS results from upstream servers, use the -# alias option. This only works for IPv4. -# This alias makes a result of 1.2.3.4 appear as 5.6.7.8 -#alias=1.2.3.4,5.6.7.8 -# and this maps 1.2.3.x to 5.6.7.x -#alias=1.2.3.0,5.6.7.0,255.255.255.0 -# and this maps 192.168.0.10->192.168.0.40 to 10.0.0.10->10.0.0.40 -#alias=192.168.0.10-192.168.0.40,10.0.0.0,255.255.255.0 -X -# Change these lines if you want dnsmasq to serve MX records. -X -# Return an MX record named "maildomain.com" with target -# servermachine.com and preference 50 -#mx-host=maildomain.com,servermachine.com,50 -X -# Set the default target for MX records created using the localmx option. -#mx-target=servermachine.com -X -# Return an MX record pointing to the mx-target for all local -# machines. -#localmx -X -# Return an MX record pointing to itself for all local machines. -#selfmx -X -# Change the following lines if you want dnsmasq to serve SRV -# records. These are useful if you want to serve ldap requests for -# Active Directory and other windows-originated DNS requests. -# See RFC 2782. -# You may add multiple srv-host lines. -# The fields are ,,,, -# If the domain part if missing from the name (so that is just has the -# service and protocol sections) then the domain given by the domain= -# config option is used. (Note that expand-hosts does not need to be -# set for this to work.) -X -# A SRV record sending LDAP for the example.com domain to -# ldapserver.example.com port 389 -#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389 -X -# A SRV record sending LDAP for the example.com domain to -# ldapserver.example.com port 389 (using domain=) -#domain=example.com -#srv-host=_ldap._tcp,ldapserver.example.com,389 -X -# Two SRV records for LDAP, each with different priorities -#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1 -#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2 -X -# A SRV record indicating that there is no LDAP server for the domain -# example.com -#srv-host=_ldap._tcp.example.com -X -# The following line shows how to make dnsmasq serve an arbitrary PTR -# record. This is useful for DNS-SD. (Note that the -# domain-name expansion done for SRV records _does_not -# occur for PTR records.) -#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services" -X -# Change the following lines to enable dnsmasq to serve TXT records. -# These are used for things like SPF and zeroconf. (Note that the -# domain-name expansion done for SRV records _does_not -# occur for TXT records.) -X -#Example SPF. -#txt-record=example.com,"v=spf1 a -all" -X -#Example zeroconf -#txt-record=_http._tcp.example.com,name=value,paper=A4 -X -# Provide an alias for a "local" DNS name. Note that this _only_ works -# for targets which are names from DHCP or /etc/hosts. Give host -# "bert" another name, bertrand -#cname=bertand,bert -X -# For debugging purposes, log each DNS query as it passes through -# dnsmasq. -#log-queries -X -# Log lots of extra information about DHCP transactions. -#log-dhcp -X -log-facility=/var/log/dnsmasq.log -X -# Include a another lot of configuration options. -#conf-file=/etc/dnsmasq.more.conf -conf-dir=/etc/dnsmasq.d -X -dhcp-optsfile=/etc/dhcpopts.txt -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/dnsmasq.conf.tmpl' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/dnsmasq.conf.tmpl' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/dnsmasq.conf.tmpl failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/dnsmasq.conf.tmpl': 'MD5 check failed' - ) << \SHAR_EOF -a0f6d4fbdef769352c0b4c6aee0e5b0b cloud_scripts/etc/dnsmasq.conf.tmpl -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/dnsmasq.conf.tmpl'` -ne 25321 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/dnsmasq.conf.tmpl' is not 25321" - fi -fi -# ============= cloud_scripts/etc/cron.daily/clear_cache ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cron.daily/clear_cache' -then -${echo} "x - SKIPPING cloud_scripts/etc/cron.daily/clear_cache (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/cron.daily/clear_cache (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cron.daily/clear_cache' && -#!/bin/bash -X -# clear memory cache to ultimately reduce swapping -X -sync && echo 1 > /proc/sys/vm/drop_caches -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cron.daily/clear_cache' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/cron.daily/clear_cache' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/cron.daily/clear_cache failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cron.daily/clear_cache': 'MD5 check failed' - ) << \SHAR_EOF -7935ce340439ae62c8f12f337d420207 cloud_scripts/etc/cron.daily/clear_cache -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/cron.daily/clear_cache'` -ne 107 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/cron.daily/clear_cache' is not 107" - fi -fi -# ============= cloud_scripts/etc/cron.daily/clear_cache ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cron.daily/clear_cache' -then -${echo} "x - SKIPPING cloud_scripts/etc/cron.daily/clear_cache (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/cron.daily/clear_cache (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cron.daily/clear_cache' && -#!/bin/bash -X -# clear memory cache to ultimately reduce swapping -X -sync && echo 1 > /proc/sys/vm/drop_caches -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cron.daily/clear_cache' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/cron.daily/clear_cache' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/cron.daily/clear_cache failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cron.daily/clear_cache': 'MD5 check failed' - ) << \SHAR_EOF -7935ce340439ae62c8f12f337d420207 cloud_scripts/etc/cron.daily/clear_cache -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/cron.daily/clear_cache'` -ne 107 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/cron.daily/clear_cache' is not 107" - fi -fi -# ============= cloud_scripts/etc/vmware-tools/tools.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/vmware-tools/tools.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/vmware-tools/tools.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/vmware-tools/tools.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/vmware-tools/tools.conf' && -[logging] -# Turns on logging globally. It can still be disabled for each domain. -# log = true -X -# Disables core dumps on fatal errors; they're enabled by default. -enableCoreDump = false -X -# Defines the "vmsvc" domain, logging to file -# vmsvc.level = message -vmsvc.handler = file -# Setup file rotation - keep 3 files -vmsvc.maxOldLogFiles = 2 -# Max log file size kept: 1 MB -vmsvc.maxLogSize = 1 -X -# Defines the "vmtoolsd" domain, and disable logging for it. -# vmtoolsd.level = none -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/vmware-tools/tools.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/vmware-tools/tools.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/vmware-tools/tools.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/vmware-tools/tools.conf': 'MD5 check failed' - ) << \SHAR_EOF -4d08804e1a2d4526faeec6404c18fabe cloud_scripts/etc/vmware-tools/tools.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/vmware-tools/tools.conf'` -ne 477 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/vmware-tools/tools.conf' is not 477" - fi -fi -# ============= cloud_scripts/etc/vmware-tools/tools.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/vmware-tools/tools.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/vmware-tools/tools.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/vmware-tools/tools.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/vmware-tools/tools.conf' && -[logging] -# Turns on logging globally. It can still be disabled for each domain. -# log = true -X -# Disables core dumps on fatal errors; they're enabled by default. -enableCoreDump = false -X -# Defines the "vmsvc" domain, logging to file -# vmsvc.level = message -vmsvc.handler = file -# Setup file rotation - keep 3 files -vmsvc.maxOldLogFiles = 2 -# Max log file size kept: 1 MB -vmsvc.maxLogSize = 1 -X -# Defines the "vmtoolsd" domain, and disable logging for it. -# vmtoolsd.level = none -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/vmware-tools/tools.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/vmware-tools/tools.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/vmware-tools/tools.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/vmware-tools/tools.conf': 'MD5 check failed' - ) << \SHAR_EOF -4d08804e1a2d4526faeec6404c18fabe cloud_scripts/etc/vmware-tools/tools.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/vmware-tools/tools.conf'` -ne 477 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/vmware-tools/tools.conf' is not 477" - fi -fi -# ============= cloud_scripts/etc/logrotate.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.conf' && -# rotate log files daily -daily -# keep 3 days worth -rotate 3 -# create new (empty) log files after rotating old ones -create -# use date as a suffix of the rotated file -#dateext -# max size 50M -size 50M -compress -# RPM packages drop log rotation information into this directory -include /etc/logrotate.d -# no packages own wtmp and btmp -- we'll rotate them here -/var/log/wtmp { -X monthly -X create 0664 root utmp -X rotate 1 -} -/var/log/btmp { -X missingok -X monthly -X create 0600 root utmp -X rotate 1 -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.conf': 'MD5 check failed' - ) << \SHAR_EOF -2430f483d055288c92deb28733562d8f cloud_scripts/etc/logrotate.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.conf'` -ne 507 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.conf' is not 507" - fi -fi -# ============= cloud_scripts/etc/ssh/sshd_config ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ssh/sshd_config' -then -${echo} "x - SKIPPING cloud_scripts/etc/ssh/sshd_config (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/ssh/sshd_config (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ssh/sshd_config' && -# $OpenBSD: sshd_config,v 1.75 2007/03/19 01:01:29 djm Exp $ -X -# This is the sshd server system-wide configuration file. See -# sshd_config(5) for more information. -X -# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin -X -# The strategy used for options in the default sshd_config shipped with -# OpenSSH is to specify options with their default value where -# possible, but leave them commented. Uncommented options change a -# default value. -X -Port 3922 -#AddressFamily any -#ListenAddress 0.0.0.0 -X -# Disable legacy (protocol version 1) support in the server for new -# installations. In future the default will change to require explicit -# activation of protocol 1 -Protocol 2 -X -# HostKey for protocol version 1 -#HostKey /etc/ssh/ssh_host_key -# HostKeys for protocol version 2 -#HostKey /etc/ssh/ssh_host_rsa_key -#HostKey /etc/ssh/ssh_host_dsa_key -X -# Lifetime and size of ephemeral version 1 server key -#KeyRegenerationInterval 1h -#ServerKeyBits 768 -X -# Logging -# obsoletes QuietMode and FascistLogging -#SyslogFacility AUTH -SyslogFacility AUTHPRIV -#LogLevel INFO -X -# Authentication: -X -#LoginGraceTime 2m -PermitRootLogin yes -#StrictModes yes -#MaxAuthTries 6 -X -#RSAAuthentication yes -PubkeyAuthentication yes -AuthorizedKeysFile .ssh/authorized_keys -X -# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts -#RhostsRSAAuthentication no -# similar for protocol version 2 -#HostbasedAuthentication no -# Change to yes if you don't trust ~/.ssh/known_hosts for -# RhostsRSAAuthentication and HostbasedAuthentication -#IgnoreUserKnownHosts no -# Don't read the user's ~/.rhosts and ~/.shosts files -#IgnoreRhosts yes -X -# To disable tunneled clear text passwords, change to no here! -#PermitEmptyPasswords no -PasswordAuthentication no -X -# Change to no to disable s/key passwords -#ChallengeResponseAuthentication yes -ChallengeResponseAuthentication no -X -# Kerberos options -#KerberosAuthentication no -#KerberosOrLocalPasswd yes -#KerberosTicketCleanup yes -#KerberosGetAFSToken no -X -# GSSAPI options -#GSSAPIAuthentication no -GSSAPIAuthentication no -#GSSAPICleanupCredentials yes -GSSAPICleanupCredentials yes -X -# Set this to 'yes' to enable PAM authentication, account processing, -# and session processing. If this is enabled, PAM authentication will -# be allowed through the ChallengeResponseAuthentication and -# PasswordAuthentication. Depending on your PAM configuration, -# PAM authentication via ChallengeResponseAuthentication may bypass -# the setting of "PermitRootLogin without-password". -# If you just want the PAM account and session checks to run without -# PAM authentication, then enable this but set PasswordAuthentication -# and ChallengeResponseAuthentication to 'no'. -#UsePAM no -UsePAM yes -X -# Accept locale-related environment variables -AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES -AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT -AcceptEnv LC_IDENTIFICATION LC_ALL -#AllowTcpForwarding yes -#GatewayPorts no -#X11Forwarding no -#X11Forwarding yes -#X11DisplayOffset 10 -#X11UseLocalhost yes -#PrintMotd yes -#PrintLastLog yes -TCPKeepAlive yes -#UseLogin no -#UsePrivilegeSeparation yes -#PermitUserEnvironment no -#Compression delayed -#ClientAliveInterval 0 -#ClientAliveCountMax 3 -#ShowPatchLevel no -UseDNS no -#PidFile /var/run/sshd.pid -#PermitTunnel no -X -MaxStartups 1000 -MaxSessions 1000 -X -# no default banner path -#Banner /some/path -X -# override default of no subsystems -Subsystem sftp /usr/lib/openssh/sftp-server -X -# Example of overriding settings on a per-user basis -#Match User anoncvs -# X11Forwarding no -# AllowTcpForwarding no -# ForceCommand cvs server -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ssh/sshd_config' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/ssh/sshd_config' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/ssh/sshd_config failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ssh/sshd_config': 'MD5 check failed' - ) << \SHAR_EOF -842613e1f724e90888a90882ed1a5684 cloud_scripts/etc/ssh/sshd_config -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/ssh/sshd_config'` -ne 3603 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/ssh/sshd_config' is not 3603" - fi -fi -# ============= cloud_scripts/etc/ssh/sshd_config ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ssh/sshd_config' -then -${echo} "x - SKIPPING cloud_scripts/etc/ssh/sshd_config (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/ssh/sshd_config (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ssh/sshd_config' && -# $OpenBSD: sshd_config,v 1.75 2007/03/19 01:01:29 djm Exp $ -X -# This is the sshd server system-wide configuration file. See -# sshd_config(5) for more information. -X -# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin -X -# The strategy used for options in the default sshd_config shipped with -# OpenSSH is to specify options with their default value where -# possible, but leave them commented. Uncommented options change a -# default value. -X -Port 3922 -#AddressFamily any -#ListenAddress 0.0.0.0 -X -# Disable legacy (protocol version 1) support in the server for new -# installations. In future the default will change to require explicit -# activation of protocol 1 -Protocol 2 -X -# HostKey for protocol version 1 -#HostKey /etc/ssh/ssh_host_key -# HostKeys for protocol version 2 -#HostKey /etc/ssh/ssh_host_rsa_key -#HostKey /etc/ssh/ssh_host_dsa_key -X -# Lifetime and size of ephemeral version 1 server key -#KeyRegenerationInterval 1h -#ServerKeyBits 768 -X -# Logging -# obsoletes QuietMode and FascistLogging -#SyslogFacility AUTH -SyslogFacility AUTHPRIV -#LogLevel INFO -X -# Authentication: -X -#LoginGraceTime 2m -PermitRootLogin yes -#StrictModes yes -#MaxAuthTries 6 -X -#RSAAuthentication yes -PubkeyAuthentication yes -AuthorizedKeysFile .ssh/authorized_keys -X -# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts -#RhostsRSAAuthentication no -# similar for protocol version 2 -#HostbasedAuthentication no -# Change to yes if you don't trust ~/.ssh/known_hosts for -# RhostsRSAAuthentication and HostbasedAuthentication -#IgnoreUserKnownHosts no -# Don't read the user's ~/.rhosts and ~/.shosts files -#IgnoreRhosts yes -X -# To disable tunneled clear text passwords, change to no here! -#PermitEmptyPasswords no -PasswordAuthentication no -X -# Change to no to disable s/key passwords -#ChallengeResponseAuthentication yes -ChallengeResponseAuthentication no -X -# Kerberos options -#KerberosAuthentication no -#KerberosOrLocalPasswd yes -#KerberosTicketCleanup yes -#KerberosGetAFSToken no -X -# GSSAPI options -#GSSAPIAuthentication no -GSSAPIAuthentication no -#GSSAPICleanupCredentials yes -GSSAPICleanupCredentials yes -X -# Set this to 'yes' to enable PAM authentication, account processing, -# and session processing. If this is enabled, PAM authentication will -# be allowed through the ChallengeResponseAuthentication and -# PasswordAuthentication. Depending on your PAM configuration, -# PAM authentication via ChallengeResponseAuthentication may bypass -# the setting of "PermitRootLogin without-password". -# If you just want the PAM account and session checks to run without -# PAM authentication, then enable this but set PasswordAuthentication -# and ChallengeResponseAuthentication to 'no'. -#UsePAM no -UsePAM yes -X -# Accept locale-related environment variables -AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES -AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT -AcceptEnv LC_IDENTIFICATION LC_ALL -#AllowTcpForwarding yes -#GatewayPorts no -#X11Forwarding no -#X11Forwarding yes -#X11DisplayOffset 10 -#X11UseLocalhost yes -#PrintMotd yes -#PrintLastLog yes -TCPKeepAlive yes -#UseLogin no -#UsePrivilegeSeparation yes -#PermitUserEnvironment no -#Compression delayed -#ClientAliveInterval 0 -#ClientAliveCountMax 3 -#ShowPatchLevel no -UseDNS no -#PidFile /var/run/sshd.pid -#PermitTunnel no -X -MaxStartups 1000 -MaxSessions 1000 -X -# no default banner path -#Banner /some/path -X -# override default of no subsystems -Subsystem sftp /usr/lib/openssh/sftp-server -X -# Example of overriding settings on a per-user basis -#Match User anoncvs -# X11Forwarding no -# AllowTcpForwarding no -# ForceCommand cvs server -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ssh/sshd_config' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/ssh/sshd_config' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/ssh/sshd_config failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ssh/sshd_config': 'MD5 check failed' - ) << \SHAR_EOF -842613e1f724e90888a90882ed1a5684 cloud_scripts/etc/ssh/sshd_config -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/ssh/sshd_config'` -ne 3603 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/ssh/sshd_config' is not 3603" - fi -fi -# ============= cloud_scripts/etc/ppp/options.xl2tpd ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ppp/options.xl2tpd' -then -${echo} "x - SKIPPING cloud_scripts/etc/ppp/options.xl2tpd (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/ppp/options.xl2tpd (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ppp/options.xl2tpd' && -proxyarp -ipcp-accept-local -ipcp-accept-remote -noccp -idle 1800 -auth -mtu 1410 -mru 1410 -nodefaultroute -debug -connect-delay 5000 -ms-dns 10.1.1.1 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ppp/options.xl2tpd' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/ppp/options.xl2tpd' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/ppp/options.xl2tpd failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ppp/options.xl2tpd': 'MD5 check failed' - ) << \SHAR_EOF -80ba26ac087aaf7f13cdc1fa8f985d72 cloud_scripts/etc/ppp/options.xl2tpd -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/ppp/options.xl2tpd'` -ne 141 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/ppp/options.xl2tpd' is not 141" - fi -fi -# ============= cloud_scripts/etc/ppp/options.xl2tpd ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ppp/options.xl2tpd' -then -${echo} "x - SKIPPING cloud_scripts/etc/ppp/options.xl2tpd (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/ppp/options.xl2tpd (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ppp/options.xl2tpd' && -proxyarp -ipcp-accept-local -ipcp-accept-remote -noccp -idle 1800 -auth -mtu 1410 -mru 1410 -nodefaultroute -debug -connect-delay 5000 -ms-dns 10.1.1.1 -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ppp/options.xl2tpd' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/ppp/options.xl2tpd' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/ppp/options.xl2tpd failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ppp/options.xl2tpd': 'MD5 check failed' - ) << \SHAR_EOF -80ba26ac087aaf7f13cdc1fa8f985d72 cloud_scripts/etc/ppp/options.xl2tpd -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/ppp/options.xl2tpd'` -ne 141 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/ppp/options.xl2tpd' is not 141" - fi -fi -# ============= cloud_scripts/etc/ipsec.d/l2tp.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.d/l2tp.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/ipsec.d/l2tp.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/ipsec.d/l2tp.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.d/l2tp.conf' && -#ipsec remote access vpn configuration -conn L2TP-PSK -X authby=secret -X rekey=no -X keyingtries=3 -X leftfirewall=yes -X type=transport -X # -X # ---------------------------------------------------------- -X # The VPN server. -X # -X # Allow incoming connections on the external network interface. -X # If you want to use a different interface or if there is no -X # defaultroute, you can use: left=your.ip.addr.ess -X # -X left=172.26.0.151 -X # -X leftprotoport=udp/l2tp -X # If you insist on supporting non-updated Windows clients, -X # you can use: leftprotoport=17/%any -X # -X # ---------------------------------------------------------- -X # The remote user(s). -X # -X # Allow incoming connections only from this IP address. -X right=%any -X # If you want to allow multiple connections from any IP address, -X # you can use: right=%any -X # -X rightprotoport=udp/%any -X # -X # ---------------------------------------------------------- -X # Change 'ignore' to 'add' to enable this configuration. -X # -X rightsubnetwithin=0.0.0.0/0 -X auto=route -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.d/l2tp.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/ipsec.d/l2tp.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/ipsec.d/l2tp.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.d/l2tp.conf': 'MD5 check failed' - ) << \SHAR_EOF -8ca6cb315858c9ccf8c91374c4f32def cloud_scripts/etc/ipsec.d/l2tp.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.d/l2tp.conf'` -ne 1234 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.d/l2tp.conf' is not 1234" - fi -fi -# ============= cloud_scripts/etc/ipsec.d/l2tp.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.d/l2tp.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/ipsec.d/l2tp.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/ipsec.d/l2tp.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.d/l2tp.conf' && -#ipsec remote access vpn configuration -conn L2TP-PSK -X authby=secret -X rekey=no -X keyingtries=3 -X leftfirewall=yes -X type=transport -X # -X # ---------------------------------------------------------- -X # The VPN server. -X # -X # Allow incoming connections on the external network interface. -X # If you want to use a different interface or if there is no -X # defaultroute, you can use: left=your.ip.addr.ess -X # -X left=172.26.0.151 -X # -X leftprotoport=udp/l2tp -X # If you insist on supporting non-updated Windows clients, -X # you can use: leftprotoport=17/%any -X # -X # ---------------------------------------------------------- -X # The remote user(s). -X # -X # Allow incoming connections only from this IP address. -X right=%any -X # If you want to allow multiple connections from any IP address, -X # you can use: right=%any -X # -X rightprotoport=udp/%any -X # -X # ---------------------------------------------------------- -X # Change 'ignore' to 'add' to enable this configuration. -X # -X rightsubnetwithin=0.0.0.0/0 -X auto=route -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.d/l2tp.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/ipsec.d/l2tp.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/ipsec.d/l2tp.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.d/l2tp.conf': 'MD5 check failed' - ) << \SHAR_EOF -8ca6cb315858c9ccf8c91374c4f32def cloud_scripts/etc/ipsec.d/l2tp.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.d/l2tp.conf'` -ne 1234 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.d/l2tp.conf' is not 1234" - fi -fi -# ============= cloud_scripts/etc/rsyslog.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/rsyslog.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/rsyslog.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/rsyslog.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/rsyslog.conf' && -# /etc/rsyslog.conf Configuration file for rsyslog. -# -# For more information see -# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html -X -X -################# -#### MODULES #### -################# -X -$ModLoad imuxsock # provides support for local system logging -$ModLoad imklog # provides kernel logging support (previously done by rklogd) -#$ModLoad immark # provides --MARK-- message capability -X -# provides UDP syslog reception -$ModLoad imudp -$UDPServerRun 3914 -X -# provides TCP syslog reception -#$ModLoad imtcp -#$InputTCPServerRun 514 -X -X -########################### -#### GLOBAL DIRECTIVES #### -########################### -X -# -# Use traditional timestamp format. -# To enable high precision timestamps, comment out the following line. -# -$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat -X -# -# Set the default permissions for all log files. -# -$FileOwner root -$FileGroup adm -$FileCreateMode 0640 -$DirCreateMode 0755 -$Umask 0022 -X -# -# Include all config files in /etc/rsyslog.d/ -# -$IncludeConfig /etc/rsyslog.d/*.conf -X -X -############### -#### RULES #### -############### -X -# -# First some standard log files. Log by facility. -# -auth,authpriv.* /var/log/auth.log -#*.*;auth,authpriv.none -/var/log/syslog -cron.* /var/log/cron.log -daemon.* -/var/log/daemon.log -kern.* -/var/log/kern.log -lpr.* -/var/log/lpr.log -mail.* -/var/log/mail.log -#user.* -/var/log/user.log -X -# -# Logging for the mail system. Split it up so that -# it is easy to write scripts to parse these files. -# -mail.info -/var/log/mail.info -mail.warn -/var/log/mail.warn -mail.err /var/log/mail.err -X -# -# Logging for INN news system. -# -news.crit /var/log/news/news.crit -news.err /var/log/news/news.err -news.notice -/var/log/news/news.notice -X -# -# Some "catch-all" log files. -# -#*.=debug;\ -# auth,authpriv.none;\ -# news.none;mail.none -/var/log/debug -*.=info;*.=notice;*.=warn;\ -X auth,authpriv.none;\ -X cron.none,daemon.none;\ -X local0.none,daemon.none;\ -X mail.none,news.none -/var/log/messages -X -# -# Emergencies are sent to everybody logged in. -# -*.emerg :omusrmsg:* -X -# -# I like to have messages displayed on the console, but only on a virtual -# console I usually leave idle. -# -#daemon,mail.*;\ -# news.=crit;news.=err;news.=notice;\ -# *.=debug;*.=info;\ -# *.=notice;*.=warn /dev/tty8 -X -local0.* -/var/log/haproxy.log -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/rsyslog.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/rsyslog.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/rsyslog.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/rsyslog.conf': 'MD5 check failed' - ) << \SHAR_EOF -1ae97a7bb7bd89a2a7c2e9507bd5c95f cloud_scripts/etc/rsyslog.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/rsyslog.conf'` -ne 2298 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/rsyslog.conf' is not 2298" - fi -fi -# ============= cloud_scripts/etc/modprobe.d/pcspkr.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/modprobe.d/pcspkr.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/modprobe.d/pcspkr.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/modprobe.d/pcspkr.conf (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/modprobe.d/pcspkr.conf -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/modprobe.d/pcspkr.conf': 'MD5 check failed' - ) << \SHAR_EOF -6dc1a7a74dfa22c4f3b37e8700b61658 cloud_scripts/etc/modprobe.d/pcspkr.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/modprobe.d/pcspkr.conf'` -ne 801 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/modprobe.d/pcspkr.conf' is not 801" - fi -fi -# ============= cloud_scripts/etc/modprobe.d/aesni_intel.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/modprobe.d/aesni_intel.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/modprobe.d/aesni_intel.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -blacklist aesni_intel -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/modprobe.d/aesni_intel.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/modprobe.d/aesni_intel.conf': 'MD5 check failed' - ) << \SHAR_EOF -45027ef77fea6dd170da8ea5e1ad1268 cloud_scripts/etc/modprobe.d/aesni_intel.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/modprobe.d/aesni_intel.conf'` -ne 807 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' is not 807" - fi -fi -# ============= cloud_scripts/etc/modprobe.d/pcspkr.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/modprobe.d/pcspkr.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/modprobe.d/pcspkr.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/modprobe.d/pcspkr.conf (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/modprobe.d/pcspkr.conf -M(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@ -M*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/modprobe.d/pcspkr.conf': 'MD5 check failed' - ) << \SHAR_EOF -6dc1a7a74dfa22c4f3b37e8700b61658 cloud_scripts/etc/modprobe.d/pcspkr.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/modprobe.d/pcspkr.conf'` -ne 801 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/modprobe.d/pcspkr.conf' is not 801" - fi -fi -# ============= cloud_scripts/etc/modprobe.d/aesni_intel.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/modprobe.d/aesni_intel.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/modprobe.d/aesni_intel.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -blacklist aesni_intel -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/modprobe.d/aesni_intel.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/modprobe.d/aesni_intel.conf': 'MD5 check failed' - ) << \SHAR_EOF -45027ef77fea6dd170da8ea5e1ad1268 cloud_scripts/etc/modprobe.d/aesni_intel.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/modprobe.d/aesni_intel.conf'` -ne 807 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/modprobe.d/aesni_intel.conf' is not 807" - fi -fi -# ============= cloud_scripts/etc/cron.hourly/clear_cache ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cron.hourly/clear_cache' -then -${echo} "x - SKIPPING cloud_scripts/etc/cron.hourly/clear_cache (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/cron.hourly/clear_cache (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cron.hourly/clear_cache' && -#!/bin/bash -X -# clear memory cache to ultimately reduce swapping -X -phymem=$(free|awk '/^Mem:/{print $2}') -if [ $phymem -lt 513000 ]; then -X sync && echo 1 > /proc/sys/vm/drop_caches -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cron.hourly/clear_cache' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/cron.hourly/clear_cache' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/cron.hourly/clear_cache failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cron.hourly/clear_cache': 'MD5 check failed' - ) << \SHAR_EOF -648c036aba1a5d72010bf11e0ec95147 cloud_scripts/etc/cron.hourly/clear_cache -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/cron.hourly/clear_cache'` -ne 183 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/cron.hourly/clear_cache' is not 183" - fi -fi -# ============= cloud_scripts/etc/cron.hourly/clear_cache ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cron.hourly/clear_cache' -then -${echo} "x - SKIPPING cloud_scripts/etc/cron.hourly/clear_cache (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/cron.hourly/clear_cache (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cron.hourly/clear_cache' && -#!/bin/bash -X -# clear memory cache to ultimately reduce swapping -X -phymem=$(free|awk '/^Mem:/{print $2}') -if [ $phymem -lt 513000 ]; then -X sync && echo 1 > /proc/sys/vm/drop_caches -fi -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cron.hourly/clear_cache' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/cron.hourly/clear_cache' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/cron.hourly/clear_cache failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cron.hourly/clear_cache': 'MD5 check failed' - ) << \SHAR_EOF -648c036aba1a5d72010bf11e0ec95147 cloud_scripts/etc/cron.hourly/clear_cache -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/cron.hourly/clear_cache'` -ne 183 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/cron.hourly/clear_cache' is not 183" - fi -fi -# ============= cloud_scripts/etc/apache2/conf-enabled/security.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/security.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/security.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/security.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/security.conf' && -ServerTokens Prod -ServerSignature Off -TraceEnable Off -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/security.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/security.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/security.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/security.conf': 'MD5 check failed' - ) << \SHAR_EOF -73e01a3d1cf4f93cb11afb4eb1a6f252 cloud_scripts/etc/apache2/conf-enabled/security.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/security.conf'` -ne 54 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/security.conf' is not 54" - fi -fi -# ============= cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' && -# event MPM -# StartServers: initial number of server processes to start -# MinSpareThreads: minimum number of worker threads which are kept spare -# MaxSpareThreads: maximum number of worker threads which are kept spare -# ThreadsPerChild: constant number of worker threads in each server process -# MaxRequestWorkers: maximum number of worker threads -# MaxConnectionsPerChild: maximum number of requests a server process serves - -X StartServers 1 -X MinSpareThreads 25 -X MaxSpareThreads 75 -X ThreadLimit 64 -X ThreadsPerChild 25 -X MaxRequestWorkers 30 -X MaxConnectionsPerChild 1000 - -X -# vim: syntax=apache ts=4 sw=4 sts=4 sr noet -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf': 'MD5 check failed' - ) << \SHAR_EOF -b05dce38d6618734e7f49eddcb8ac131 cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf'` -ne 669 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' is not 669" - fi -fi -# ============= cloud_scripts/etc/apache2/httpd.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/httpd.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/apache2/httpd.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/apache2/httpd.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/httpd.conf' && -# Empty -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/httpd.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/apache2/httpd.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/apache2/httpd.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/httpd.conf': 'MD5 check failed' - ) << \SHAR_EOF -2402d4d5cd982d8b74e5c4d62ab0b20b cloud_scripts/etc/apache2/httpd.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/httpd.conf'` -ne 8 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/httpd.conf' is not 8" - fi -fi -# ============= cloud_scripts/etc/apache2/vhost.template ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/vhost.template' -then -${echo} "x - SKIPPING cloud_scripts/etc/apache2/vhost.template (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/apache2/vhost.template (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/apache2/vhost.template -M/%9I3X*"3Q$:7)E8W1O0H)"6%L;&]W(&9R -M;VT@86QL"@D\+T1I3X*"@E38W)I<'1!;&EA0H)"4%L;&]W(&9R;VT@86QL"@D\+T1I3X*"@E%T%004-(15],3T=?1$E2?2]ET%004-(15],3T=?1$E2?2]A8V-E&5S($UU;'1I5FEE=W,@1F]L;&]W4WEM3&EN:W,*("`@("`@("!!;&QO -M=T]V97)R:61E($YO;F4*("`@("`@("!/2!F3X*"CPO5FER='5A -M;$AO2`O/@H)"4]P=&EO;G,@1F]L;&]W -M4WEM3&EN:W,*"0E!;&QO=T]V97)R:61E($YO;F4*"3PO1&ER96-T;W)Y/@H) -M/$1I2`O=F%R+W=W=R]H=&UL/@H)"4]P=&EO;G,@26YD97AE6U,:6YK2`B+W5S&5S($UU;'1I5FEE=W,@1F]L;&]W -M4WEM3&EN:W,*"0E!;&QO=T]V97)R:61E($YO;F4*"0E/2!F3X*"@DC($EN8VQU9&4@0T]2 -M4R!C;VYF:6=U2!A;F0@8V5R=&EF:6-A=&4@87)E('-T;W)E9"!I;B!T:&4@2!A<'!E;F1E9"!T;R!T:&4@2!O;F4*"2,@("!H=6=E(&9I;&4@8V]N=&%I -M;FEN9R!A;&P@;V8@=&AE;2`H9FEL92!M=7-T(&)E(%!%32!E;F-O9&5D*0H) -M(R`@($YO=&4Z($EN2!O;F4@:'5G92!F:6QE(&-O;G1A:6YI -M;F<@86QL"@DC("`@;V8@=&AE;2`H9FEL92!M=7-T(&)E(%!%32!E;F-O9&5D -M*0H)(R`@($YO=&4Z($EN7!E2!T:&4@8V5R=&EF:6-A=&4*"2,@("!I2!A8V-E2!C;VUP;&5X(&)O;VQE86X@97AP"!I*$58 -M4'Q.54Q,*2\@7`H)(R`@("`@("`@("`@(&%N9"`E>U-33%]#3$E%3E1?4U]$ -M3E]/?2!E<2`B4VYA:V4@3VEL+"!,=&0N(B!<"@DC("`@("`@("`@("`@86YD -M("5[4U-,7T-,245.5%]37T1.7T]5?2!I;B![(E-T869F(BP@(D-!(BP@(D1E -M=B)](%P*"2,@("`@("`@("`@("!A;F0@)7M424U%7U=$05E](#X](#$@86YD -M("5[5$E-15]71$%9?2`\/2`U(%P*"2,@("`@("`@("`@("!A;F0@)7M424U% -M7TA/55)](#X](#@@86YD("5[5$E-15](3U52?2`\/2`R,"`@("`@("`I(%P* -M"2,@("`@("`@("`@(&]R("5[4D5-3U1%7T%$1%)](#U^(&TO7C$Y,EPN-S9< -M+C$V,EPN6S`M.5TK)"\*"2,\+TQO8V%T:6]N/@H*"2,@("!34TP@16YG:6YE -M($]P=&EO;G,Z"@DC("`@4V5T('9A2!E;G1R>2!I;B!T:&4@=7-E<@H)(R`@("`@9FEL92!N -M965D'AJ,S%:351:>FM602'!O7,@97AI'!O -M2X*"2,@("!O -M(%-T2!A;GDB('-I='5A=&EO;BP@:2YE -M+B!W:&5N(&ET(&%P<&QI97,@86-C97-S(&ES(&1E;FEE9`H)(R`@("`@86YD -M(&YO(&]T:&5R(&UO9'5L92!C86X@8VAA;F=E(&ET+@H)(R`@(&\@3W!T4F5N -M96=O=&EA=&4Z"@DC("`@("!4:&ES(&5N86)L97,@;W!T:6UI>F5D(%-33"!C -M;VYN96-T:6]N(')E;F5G;W1I871I;VX@:&%N9&QI;F<@=VAE;B!34TP*"2,@ -M("`@(&1I2!C;VYT -M97AT+@H)(U-33$]P=&EO;G,@*T9A:V5"87-I8T%U=&@@*T5X<&]R=$-E2!A;&5R="!B=70@9&]E6]U(&YE -M960@82!D:69F97)E;G0@2P@6]U('5S=6%L;'D@861D:71I;VYA;&QY('=A -M;G0@=&\@9&ES86)L90H)(R`@(&ME97`M86QI=F4@9F]R('1H;W-E(&-L:65N -M=',L('1O;RX@57-E('9A2!-4TE%(&]N(%=I;F1O=W,@6%`N -M"B`@("!,:7-T96X@,3`N,2XQ+C$Z.#0T,PH\+TEF36]D=6QE/@H*/$EF36]D -M=6QE(&UO9%]G;G5T;',N8SX*("`@($QI/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/vhost.template': 'MD5 check failed' - ) << \SHAR_EOF -e42ce7d6f871a7efa7a3c0e164f75dfc cloud_scripts/etc/apache2/vhost.template -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/vhost.template'` -ne 9955 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/vhost.template' is not 9955" - fi -fi -# ============= cloud_scripts/etc/apache2/conf-enabled/security.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/security.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/security.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/security.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/security.conf' && -ServerTokens Prod -ServerSignature Off -TraceEnable Off -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/security.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/security.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/security.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/security.conf': 'MD5 check failed' - ) << \SHAR_EOF -73e01a3d1cf4f93cb11afb4eb1a6f252 cloud_scripts/etc/apache2/conf-enabled/security.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/security.conf'` -ne 54 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/security.conf' is not 54" - fi -fi -# ============= cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' && -# event MPM -# StartServers: initial number of server processes to start -# MinSpareThreads: minimum number of worker threads which are kept spare -# MaxSpareThreads: maximum number of worker threads which are kept spare -# ThreadsPerChild: constant number of worker threads in each server process -# MaxRequestWorkers: maximum number of worker threads -# MaxConnectionsPerChild: maximum number of requests a server process serves - -X StartServers 1 -X MinSpareThreads 25 -X MaxSpareThreads 75 -X ThreadLimit 64 -X ThreadsPerChild 25 -X MaxRequestWorkers 30 -X MaxConnectionsPerChild 1000 - -X -# vim: syntax=apache ts=4 sw=4 sts=4 sr noet -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf': 'MD5 check failed' - ) << \SHAR_EOF -b05dce38d6618734e7f49eddcb8ac131 cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf'` -ne 669 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' is not 669" - fi -fi -# ============= cloud_scripts/etc/apache2/conf-enabled/security.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/security.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/security.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/security.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/security.conf' && -ServerTokens Prod -ServerSignature Off -TraceEnable Off -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/security.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/security.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/security.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/security.conf': 'MD5 check failed' - ) << \SHAR_EOF -73e01a3d1cf4f93cb11afb4eb1a6f252 cloud_scripts/etc/apache2/conf-enabled/security.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/security.conf'` -ne 54 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/security.conf' is not 54" - fi -fi -# ============= cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' && -# event MPM -# StartServers: initial number of server processes to start -# MinSpareThreads: minimum number of worker threads which are kept spare -# MaxSpareThreads: maximum number of worker threads which are kept spare -# ThreadsPerChild: constant number of worker threads in each server process -# MaxRequestWorkers: maximum number of worker threads -# MaxConnectionsPerChild: maximum number of requests a server process serves - -X StartServers 1 -X MinSpareThreads 25 -X MaxSpareThreads 75 -X ThreadLimit 64 -X ThreadsPerChild 25 -X MaxRequestWorkers 30 -X MaxConnectionsPerChild 1000 - -X -# vim: syntax=apache ts=4 sw=4 sts=4 sr noet -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf': 'MD5 check failed' - ) << \SHAR_EOF -b05dce38d6618734e7f49eddcb8ac131 cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf'` -ne 669 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' is not 669" - fi -fi -# ============= cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' && -# event MPM -# StartServers: initial number of server processes to start -# MinSpareThreads: minimum number of worker threads which are kept spare -# MaxSpareThreads: maximum number of worker threads which are kept spare -# ThreadsPerChild: constant number of worker threads in each server process -# MaxRequestWorkers: maximum number of worker threads -# MaxConnectionsPerChild: maximum number of requests a server process serves - -X StartServers 1 -X MinSpareThreads 25 -X MaxSpareThreads 75 -X ThreadLimit 64 -X ThreadsPerChild 25 -X MaxRequestWorkers 30 -X MaxConnectionsPerChild 1000 - -X -# vim: syntax=apache ts=4 sw=4 sts=4 sr noet -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf': 'MD5 check failed' - ) << \SHAR_EOF -b05dce38d6618734e7f49eddcb8ac131 cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf'` -ne 669 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/conf-enabled/mods-enabled/mpm_event.conf' is not 669" - fi -fi -# ============= cloud_scripts/etc/apache2/httpd.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/httpd.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/apache2/httpd.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/apache2/httpd.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/apache2/httpd.conf' && -# Empty -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/apache2/httpd.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/apache2/httpd.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/apache2/httpd.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/httpd.conf': 'MD5 check failed' - ) << \SHAR_EOF -2402d4d5cd982d8b74e5c4d62ab0b20b cloud_scripts/etc/apache2/httpd.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/httpd.conf'` -ne 8 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/httpd.conf' is not 8" - fi -fi -# ============= cloud_scripts/etc/apache2/vhost.template ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/apache2/vhost.template' -then -${echo} "x - SKIPPING cloud_scripts/etc/apache2/vhost.template (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/apache2/vhost.template (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/etc/apache2/vhost.template -M/%9I3X*"3Q$:7)E8W1O0H)"6%L;&]W(&9R -M;VT@86QL"@D\+T1I3X*"@E38W)I<'1!;&EA0H)"4%L;&]W(&9R;VT@86QL"@D\+T1I3X*"@E%T%004-(15],3T=?1$E2?2]ET%004-(15],3T=?1$E2?2]A8V-E&5S($UU;'1I5FEE=W,@1F]L;&]W4WEM3&EN:W,*("`@("`@("!!;&QO -M=T]V97)R:61E($YO;F4*("`@("`@("!/2!F3X*"CPO5FER='5A -M;$AO2`O/@H)"4]P=&EO;G,@1F]L;&]W -M4WEM3&EN:W,*"0E!;&QO=T]V97)R:61E($YO;F4*"3PO1&ER96-T;W)Y/@H) -M/$1I2`O=F%R+W=W=R]H=&UL/@H)"4]P=&EO;G,@26YD97AE6U,:6YK2`B+W5S&5S($UU;'1I5FEE=W,@1F]L;&]W -M4WEM3&EN:W,*"0E!;&QO=T]V97)R:61E($YO;F4*"0E/2!F3X*"@DC($EN8VQU9&4@0T]2 -M4R!C;VYF:6=U2!A;F0@8V5R=&EF:6-A=&4@87)E('-T;W)E9"!I;B!T:&4@2!A<'!E;F1E9"!T;R!T:&4@2!O;F4*"2,@("!H=6=E(&9I;&4@8V]N=&%I -M;FEN9R!A;&P@;V8@=&AE;2`H9FEL92!M=7-T(&)E(%!%32!E;F-O9&5D*0H) -M(R`@($YO=&4Z($EN2!O;F4@:'5G92!F:6QE(&-O;G1A:6YI -M;F<@86QL"@DC("`@;V8@=&AE;2`H9FEL92!M=7-T(&)E(%!%32!E;F-O9&5D -M*0H)(R`@($YO=&4Z($EN7!E2!T:&4@8V5R=&EF:6-A=&4*"2,@("!I2!A8V-E2!C;VUP;&5X(&)O;VQE86X@97AP"!I*$58 -M4'Q.54Q,*2\@7`H)(R`@("`@("`@("`@(&%N9"`E>U-33%]#3$E%3E1?4U]$ -M3E]/?2!E<2`B4VYA:V4@3VEL+"!,=&0N(B!<"@DC("`@("`@("`@("`@86YD -M("5[4U-,7T-,245.5%]37T1.7T]5?2!I;B![(E-T869F(BP@(D-!(BP@(D1E -M=B)](%P*"2,@("`@("`@("`@("!A;F0@)7M424U%7U=$05E](#X](#$@86YD -M("5[5$E-15]71$%9?2`\/2`U(%P*"2,@("`@("`@("`@("!A;F0@)7M424U% -M7TA/55)](#X](#@@86YD("5[5$E-15](3U52?2`\/2`R,"`@("`@("`I(%P* -M"2,@("`@("`@("`@(&]R("5[4D5-3U1%7T%$1%)](#U^(&TO7C$Y,EPN-S9< -M+C$V,EPN6S`M.5TK)"\*"2,\+TQO8V%T:6]N/@H*"2,@("!34TP@16YG:6YE -M($]P=&EO;G,Z"@DC("`@4V5T('9A2!E;G1R>2!I;B!T:&4@=7-E<@H)(R`@("`@9FEL92!N -M965D'AJ,S%:351:>FM602'!O7,@97AI'!O -M2X*"2,@("!O -M(%-T2!A;GDB('-I='5A=&EO;BP@:2YE -M+B!W:&5N(&ET(&%P<&QI97,@86-C97-S(&ES(&1E;FEE9`H)(R`@("`@86YD -M(&YO(&]T:&5R(&UO9'5L92!C86X@8VAA;F=E(&ET+@H)(R`@(&\@3W!T4F5N -M96=O=&EA=&4Z"@DC("`@("!4:&ES(&5N86)L97,@;W!T:6UI>F5D(%-33"!C -M;VYN96-T:6]N(')E;F5G;W1I871I;VX@:&%N9&QI;F<@=VAE;B!34TP*"2,@ -M("`@(&1I2!C;VYT -M97AT+@H)(U-33$]P=&EO;G,@*T9A:V5"87-I8T%U=&@@*T5X<&]R=$-E2!A;&5R="!B=70@9&]E6]U(&YE -M960@82!D:69F97)E;G0@2P@6]U('5S=6%L;'D@861D:71I;VYA;&QY('=A -M;G0@=&\@9&ES86)L90H)(R`@(&ME97`M86QI=F4@9F]R('1H;W-E(&-L:65N -M=',L('1O;RX@57-E('9A2!-4TE%(&]N(%=I;F1O=W,@6%`N -M"B`@("!,:7-T96X@,3`N,2XQ+C$Z.#0T,PH\+TEF36]D=6QE/@H*/$EF36]D -M=6QE(&UO9%]G;G5T;',N8SX*("`@($QI/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/apache2/vhost.template': 'MD5 check failed' - ) << \SHAR_EOF -e42ce7d6f871a7efa7a3c0e164f75dfc cloud_scripts/etc/apache2/vhost.template -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/apache2/vhost.template'` -ne 9955 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/apache2/vhost.template' is not 9955" - fi -fi -# ============= cloud_scripts/etc/vpcdnsmasq.conf ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/vpcdnsmasq.conf' -then -${echo} "x - SKIPPING cloud_scripts/etc/vpcdnsmasq.conf (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/vpcdnsmasq.conf (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/vpcdnsmasq.conf' && -# Configuration file for dnsmasq. -# -# Format is one option per line, legal options are the same -# as the long options legal on the command line. See -# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. -X -# The following two options make you a better netizen, since they -# tell dnsmasq to filter out queries which the public DNS cannot -# answer, and which load the servers (especially the root servers) -# uneccessarily. If you have a dial-on-demand link they also stop -# these requests from bringing up the link uneccessarily. -X -# Never forward plain names (without a dot or domain part) -domain-needed -# Never forward addresses in the non-routed address spaces. -bogus-priv -X -X -# Uncomment this to filter useless windows-originated DNS requests -# which can trigger dial-on-demand links needlessly. -# Note that (amongst other things) this blocks all SRV requests, -# so don't use it if you use eg Kerberos. -# This option only affects forwarding, SRV records originating for -# dnsmasq (via srv-host= lines) are not suppressed by it. -#filterwin2k -X -# Change this line if you want dns to get its upstream servers from -# somewhere other that /etc/resolv.conf -resolv-file=/etc/dnsmasq-resolv.conf -X -# By default, dnsmasq will send queries to any of the upstream -# servers it knows about and tries to favour servers to are known -# to be up. Uncommenting this forces dnsmasq to try each query -# with each server strictly in the order they appear in -# /etc/resolv.conf -#strict-order -X -# If you don't want dnsmasq to read /etc/resolv.conf or any other -# file, getting its servers from this file instead (see below), then -# uncomment this. -#no-resolv -X -# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv -# files for changes and re-read them then uncomment this. -#no-poll -X -# Add other name servers here, with domain specs if they are for -# non-public domains. -#server=/localnet/192.168.0.1 -X -# Example of routing PTR queries to nameservers: this will send all -# address->name queries for 192.168.3/24 to nameserver 10.1.2.3 -#server=/3.168.192.in-addr.arpa/10.1.2.3 -X -# Add local-only domains here, queries in these domains are answered -# from /etc/hosts or DHCP only. -local=/2.vmops-test.vmops.com/ -X -# Add domains which you want to force to an IP address here. -# The example below send any host in doubleclick.net to a local -# webserver. -#address=/doubleclick.net/127.0.0.1 -X -# If you want dnsmasq to change uid and gid to something other -# than the default, edit the following lines. -#user= -#group= -X -# If you want dnsmasq to listen for DHCP and DNS requests only on -# specified interfaces (and the loopback) give the name of the -# interface (eg eth0) here. -# Repeat the line for more than one interface. -#interface=eth0 -X -# Or you can specify which interface _not_ to listen on -except-interface=lo -X -# Or which to listen on by address (remember to include 127.0.0.1 if -# you use this.) -#listen-address= -# If you want dnsmasq to provide only DNS service on an interface, -# configure it as shown above, and then use the following line to -# disable DHCP on it. -#no-dhcp-interface=eth1 -X -# On systems which support it, dnsmasq binds the wildcard address, -# even when it is listening on only some interfaces. It then discards -# requests that it shouldn't reply to. This has the advantage of -# working even when interfaces come and go and change address. If you -# want dnsmasq to really bind only the interfaces it is listening on, -# uncomment this option. About the only time you may need this is when -# running another nameserver on the same machine. -#bind-interfaces -X -# If you don't want dnsmasq to read /etc/hosts, uncomment the -# following line. -#no-hosts -# or if you want it to read another file, as well as /etc/hosts, use -# this. -#addn-hosts=/etc/banner_add_hosts -X -# Set this (and domain: see below) if you want to have a domain -# automatically added to simple names in a hosts-file. -expand-hosts -X -# Set the domain for dnsmasq. this is optional, but if it is set, it -# does the following things. -# 1) Allows DHCP hosts to have fully qualified domain names, as long -# as the domain part matches this setting. -# 2) Sets the "domain" DHCP option thereby potentially setting the -# domain of all systems configured by DHCP -# 3) Provides the domain part for "expand-hosts" -#domain=2.vmops-test.vmops.com -X -# Uncomment this to enable the integrated DHCP server, you need -# to supply the range of addresses available for lease and optionally -# a lease time. If you have more than one network, you will need to -# repeat this for each network on which you want to supply DHCP -# service. -#dhcp-range=10.1.1.1,static -#dhcp-range=10.0.0.1,10.255.255.255 -#dhcp-hostsfile=/etc/dhcphosts.txt -X -# This is an example of a DHCP range where the netmask is given. This -# is needed for networks we reach the dnsmasq DHCP server via a relay -# agent. If you don't know what a DHCP relay agent is, you probably -# don't need to worry about this. -#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h -X -# This is an example of a DHCP range with a network-id, so that -# some DHCP options may be set only for this network. -#dhcp-range=red,192.168.0.50,192.168.0.150 -X -# Supply parameters for specified hosts using DHCP. There are lots -# of valid alternatives, so we will give examples of each. Note that -# IP addresses DO NOT have to be in the range given above, they just -# need to be on the same network. The order of the parameters in these -# do not matter, it's permissble to give name,adddress and MAC in any order -X -# Always allocate the host with ethernet address 11:22:33:44:55:66 -# The IP address 192.168.0.60 -#dhcp-host=11:22:33:44:55:66,192.168.0.60 -X -# Always set the name of the host with hardware address -# 11:22:33:44:55:66 to be "fred" -#dhcp-host=11:22:33:44:55:66,fred -X -# Always give the host with ethernet address 11:22:33:44:55:66 -# the name fred and IP address 192.168.0.60 and lease time 45 minutes -#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m -X -# Give the machine which says it's name is "bert" IP address -# 192.168.0.70 and an infinite lease -#dhcp-host=bert,192.168.0.70,infinite -X -# Always give the host with client identifier 01:02:02:04 -# the IP address 192.168.0.60 -#dhcp-host=id:01:02:02:04,192.168.0.60 -X -# Always give the host with client identifier "marjorie" -# the IP address 192.168.0.60 -#dhcp-host=id:marjorie,192.168.0.60 -X -# Enable the address given for "judge" in /etc/hosts -# to be given to a machine presenting the name "judge" when -# it asks for a DHCP lease. -#dhcp-host=judge -X -# Never offer DHCP service to a machine whose ethernet -# address is 11:22:33:44:55:66 -#dhcp-host=11:22:33:44:55:66,ignore -X -# Ignore any client-id presented by the machine with ethernet -# address 11:22:33:44:55:66. This is useful to prevent a machine -# being treated differently when running under different OS's or -# between PXE boot and OS boot. -#dhcp-host=11:22:33:44:55:66,id:* -X -# Send extra options which are tagged as "red" to -# the machine with ethernet address 11:22:33:44:55:66 -#dhcp-host=11:22:33:44:55:66,net:red -X -# Send extra options which are tagged as "red" to -# any machine with ethernet address starting 11:22:33: -#dhcp-host=11:22:33:*:*:*,net:red -X -# Ignore any clients which are specified in dhcp-host lines -# or /etc/ethers. Equivalent to ISC "deny unkown-clients". -# This relies on the special "known" tag which is set when -# a host is matched. -#dhcp-ignore=#known -X -# Send extra options which are tagged as "red" to any machine whose -# DHCP vendorclass string includes the substring "Linux" -#dhcp-vendorclass=red,Linux -X -# Send extra options which are tagged as "red" to any machine one -# of whose DHCP userclass strings includes the substring "accounts" -#dhcp-userclass=red,accounts -X -# Send extra options which are tagged as "red" to any machine whose -# MAC address matches the pattern. -#dhcp-mac=red,00:60:8C:*:*:* -X -# If this line is uncommented, dnsmasq will read /etc/ethers and act -# on the ethernet-address/IP pairs found there just as if they had -# been given as --dhcp-host options. Useful if you keep -# MAC-address/host mappings there for other purposes. -#read-ethers -X -# Send options to hosts which ask for a DHCP lease. -# See RFC 2132 for details of available options. -# Common options can be given to dnsmasq by name: -# run "dnsmasq --help dhcp" to get a list. -# Note that all the common settings, such as netmask and -# broadcast address, DNS server and default route, are given -# sane defaults by dnsmasq. You very likely will not need -# any dhcp-options. If you use Windows clients and Samba, there -# are some options which are recommended, they are detailed at the -# end of this section. -X -# Override the default route supplied by dnsmasq, which assumes the -# router is the same machine as the one running dnsmasq. -#dhcp-option=3,1.2.3.4 -X -# Do the same thing, but using the option name -#dhcp-option=option:router,1.2.3.4 -X -# Override the default route supplied by dnsmasq and send no default -# route at all. Note that this only works for the options sent by -# default (1, 3, 6, 12, 28) the same line will send a zero-length option -# for all other option numbers. -#dhcp-option=3 -X -# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 -#dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5 -X -# Set the NTP time server address to be the same machine as -# is running dnsmasq -#dhcp-option=42,0.0.0.0 -X -# Set the NIS domain name to "welly" -#dhcp-option=40,welly -X -# Set the default time-to-live to 50 -#dhcp-option=23,50 -X -# Set the "all subnets are local" flag -#dhcp-option=27,1 -X -# Set the domain -dhcp-option=15,"2.vmops-test.vmops.com" -X -# Send the etherboot magic flag and then etherboot options (a string). -#dhcp-option=128,e4:45:74:68:00:00 -#dhcp-option=129,NIC=eepro100 -X -# Specify an option which will only be sent to the "red" network -# (see dhcp-range for the declaration of the "red" network) -# Note that the net: part must precede the option: part. -#dhcp-option = net:red, option:ntp-server, 192.168.1.1 -X -# The following DHCP options set up dnsmasq in the same way as is specified -# for the ISC dhcpcd in -# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt -# adapted for a typical dnsmasq installation where the host running -# dnsmasq is also the host running samba. -# you may want to uncomment them if you use Windows clients and Samba. -#dhcp-option=19,0 # option ip-forwarding off -#dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) -#dhcp-option=45,0.0.0.0 # netbios datagram distribution server -#dhcp-option=46,8 # netbios node type -#dhcp-option=47 # empty netbios scope. -X -# Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client -# probably doesn't support this...... -#dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com -X -# Send RFC-3442 classless static routes (note the netmask encoding) -#dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8 -X -# Send vendor-class specific options encapsulated in DHCP option 43. -# The meaning of the options is defined by the vendor-class so -# options are sent only when the client supplied vendor class -# matches the class given here. (A substring match is OK, so "MSFT" -# matches "MSFT" and "MSFT 5.0"). This example sets the -# mtftp address to 0.0.0.0 for PXEClients. -#dhcp-option=vendor:PXEClient,1,0.0.0.0 -X -# Send microsoft-specific option to tell windows to release the DHCP lease -# when it shuts down. Note the "i" flag, to tell dnsmasq to send the -# value as a four-byte integer - that's what microsoft wants. See -# http://technet2.microsoft.com/WindowsServer/en/library/a70f1bb7-d2d4-49f0-96d6-4b7414ecfaae1033.mspx?mfr=true -dhcp-option=vendor:MSFT,2,1i -X -# Send the Encapsulated-vendor-class ID needed by some configurations of -# Etherboot to allow is to recognise the DHCP server. -#dhcp-option=vendor:Etherboot,60,"Etherboot" -X -# Send options to PXELinux. Note that we need to send the options even -# though they don't appear in the parameter request list, so we need -# to use dhcp-option-force here. -# See http://syslinux.zytor.com/pxe.php#special for details. -# Magic number - needed before anything else is recognised -#dhcp-option-force=208,f1:00:74:7e -# Configuration file name -#dhcp-option-force=209,configs/common -# Path prefix -#dhcp-option-force=210,/tftpboot/pxelinux/files/ -# Reboot time. (Note 'i' to send 32-bit value) -#dhcp-option-force=211,30i -X -# Set the boot filename for BOOTP. You will only need -# this is you want to boot machines over the network and you will need -# a TFTP server; either dnsmasq's built in TFTP server or an -# external one. (See below for how to enable the TFTP server.) -#dhcp-boot=pxelinux.0 -X -# Enable dnsmasq's built-in TFTP server -#enable-tftp -X -# Set the root directory for files availble via FTP. -#tftp-root=/var/ftpd -X -# Make the TFTP server more secure: with this set, only files owned by -# the user dnsmasq is running as will be send over the net. -#tftp-secure -X -# Set the boot file name only when the "red" tag is set. -#dhcp-boot=net:red,pxelinux.red-net -X -# An example of dhcp-boot with an external server: the name and IP -# address of the server are given after the filename. -#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 -X -# Set the limit on DHCP leases, the default is 150 -dhcp-lease-max=2100 -X -# The DHCP server needs somewhere on disk to keep its lease database. -# This defaults to a sane location, but if you want to change it, use -# the line below. -#dhcp-leasefile=/var/lib/misc/dnsmasq.leases -leasefile-ro -X -# Set the DHCP server to authoritative mode. In this mode it will barge in -# and take over the lease for any client which broadcasts on the network, -# whether it has a record of the lease or not. This avoids long timeouts -# when a machine wakes up on a new network. DO NOT enable this if there's -# the slighest chance that you might end up accidentally configuring a DHCP -# server for your campus/company accidentally. The ISC server uses -# the same option, and this URL provides more information: -# http://www.isc.org/index.pl?/sw/dhcp/authoritative.php -#dhcp-authoritative -X -# Run an executable when a DHCP lease is created or destroyed. -# The arguments sent to the script are "add" or "del", -# then the MAC address, the IP address and finally the hostname -# if there is one. -#dhcp-script=/bin/echo -X -# Set the cachesize here. -#cache-size=150 -X -# If you want to disable negative caching, uncomment this. -#no-negcache -X -# Normally responses which come form /etc/hosts and the DHCP lease -# file have Time-To-Live set as zero, which conventionally means -# do not cache further. If you are happy to trade lower load on the -# server for potentially stale date, you can set a time-to-live (in -# seconds) here. -#local-ttl= -X -# If you want dnsmasq to detect attempts by Verisign to send queries -# to unregistered .com and .net hosts to its sitefinder service and -# have dnsmasq instead return the correct NXDOMAIN response, uncomment -# this line. You can add similar lines to do the same for other -# registries which have implemented wildcard A records. -#bogus-nxdomain=64.94.110.11 -X -# If you want to fix up DNS results from upstream servers, use the -# alias option. This only works for IPv4. -# This alias makes a result of 1.2.3.4 appear as 5.6.7.8 -#alias=1.2.3.4,5.6.7.8 -# and this maps 1.2.3.x to 5.6.7.x -#alias=1.2.3.0,5.6.7.0,255.255.255.0 -X -X -# Change these lines if you want dnsmasq to serve MX records. -X -# Return an MX record named "maildomain.com" with target -# servermachine.com and preference 50 -#mx-host=maildomain.com,servermachine.com,50 -X -# Set the default target for MX records created using the localmx option. -#mx-target=servermachine.com -X -# Return an MX record pointing to the mx-target for all local -# machines. -#localmx -X -# Return an MX record pointing to itself for all local machines. -#selfmx -X -# Change the following lines if you want dnsmasq to serve SRV -# records. These are useful if you want to serve ldap requests for -# Active Directory and other windows-originated DNS requests. -# See RFC 2782. -# You may add multiple srv-host lines. -# The fields are ,,,, -# If the domain part if missing from the name (so that is just has the -# service and protocol sections) then the domain given by the domain= -# config option is used. (Note that expand-hosts does not need to be -# set for this to work.) -X -# A SRV record sending LDAP for the example.com domain to -# ldapserver.example.com port 289 -#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389 -X -# A SRV record sending LDAP for the example.com domain to -# ldapserver.example.com port 289 (using domain=) -###domain=example.com -#srv-host=_ldap._tcp,ldapserver.example.com,389 -X -# Two SRV records for LDAP, each with different priorities -#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1 -#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2 -X -# A SRV record indicating that there is no LDAP server for the domain -# example.com -#srv-host=_ldap._tcp.example.com -X -# The following line shows how to make dnsmasq serve an arbitrary PTR -# record. This is useful for DNS-SD. (Note that the -# domain-name expansion done for SRV records _does_not -# occur for PTR records.) -#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services" -X -# Change the following lines to enable dnsmasq to serve TXT records. -# These are used for things like SPF and zeroconf. (Note that the -# domain-name expansion done for SRV records _does_not -# occur for TXT records.) -X -#Example SPF. -#txt-record=example.com,"v=spf1 a -all" -X -#Example zeroconf -#txt-record=_http._tcp.example.com,name=value,paper=A4 -X -X -# For debugging purposes, log each DNS query as it passes through -# dnsmasq. -#log-queries -X -# Log lots of extra information about DHCP transactions. -#log-dhcp -X -log-facility=/var/log/dnsmasq.log -X -# Include a another lot of configuration options. -#conf-file=/etc/dnsmasq.more.conf -conf-dir=/etc/dnsmasq.d -X -dhcp-optsfile=/etc/dhcpopts.txt -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/vpcdnsmasq.conf' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/vpcdnsmasq.conf' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/vpcdnsmasq.conf failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/vpcdnsmasq.conf': 'MD5 check failed' - ) << \SHAR_EOF -0b53d152c88ebce3ee09d8e9c8addd6b cloud_scripts/etc/vpcdnsmasq.conf -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/vpcdnsmasq.conf'` -ne 17942 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/vpcdnsmasq.conf' is not 17942" - fi -fi -# ============= cloud_scripts/etc/ipsec.secrets ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/ipsec.secrets' -then -${echo} "x - SKIPPING cloud_scripts/etc/ipsec.secrets (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/ipsec.secrets (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/ipsec.secrets' && -include /var/lib/strongswan/ipsec.conf.inc -include /etc/ipsec.d/ipsec.*.secrets -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/ipsec.secrets' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/ipsec.secrets' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/ipsec.secrets failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/ipsec.secrets': 'MD5 check failed' - ) << \SHAR_EOF -7ab0bddd5ec64ebda91cf3c5262fef2d cloud_scripts/etc/ipsec.secrets -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/ipsec.secrets'` -ne 80 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/ipsec.secrets' is not 80" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/dnsmasq ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/dnsmasq' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/dnsmasq (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/dnsmasq (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/dnsmasq' && -/var/log/dnsmasq.log { -X maxsize 10M -X missingok -X rotate 5 -X notifempty -X delaycompress -X sharedscripts -X postrotate -X [ ! -f /var/run/dnsmasq/dnsmasq.pid ] || kill -USR2 `cat /var/run/dnsmasq/dnsmasq.pid` -X endscript -X create 0640 dnsmasq root -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/dnsmasq' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/dnsmasq' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/dnsmasq failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/dnsmasq': 'MD5 check failed' - ) << \SHAR_EOF -e42458bd875605d1cd625f0596b38d4c cloud_scripts/etc/logrotate.d/dnsmasq -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/dnsmasq'` -ne 272 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/dnsmasq' is not 272" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/cloud ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/cloud' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/cloud (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/cloud (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/cloud' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -/var/log/cloud.log { -X rotate 10 -X maxsize 10M -X missingok -X notifempty -X compress -X # CLOUDSTACK-9155: We cannot tell the processes that are writing to this -X # file to use the new inode, so instead we copy the original file, truncate -X # it and keep the same inode. -X copytruncate -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/cloud' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/cloud' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/cloud failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/cloud': 'MD5 check failed' - ) << \SHAR_EOF -f83a4d4cf36adb81699ac5892bf6c6f5 cloud_scripts/etc/logrotate.d/cloud -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/cloud'` -ne 1124 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/cloud' is not 1124" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/conntrackd ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/conntrackd' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/conntrackd (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/conntrackd (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/conntrackd' && -/var/log/conntrackd-stats.log { -X maxsize 10M -X rotate 2 -X missingok -X compress -X delaycompress -X -X postrotate -X if [ -e /var/run/conntrackd.sock ]; then -X /usr/sbin/invoke-rc.d conntrackd restart > /dev/null -X fi -X endscript -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/conntrackd' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/conntrackd' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/conntrackd failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/conntrackd': 'MD5 check failed' - ) << \SHAR_EOF -334d9dd543fcb9c8682b4b8fc3987c4c cloud_scripts/etc/logrotate.d/conntrackd -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/conntrackd'` -ne 263 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/conntrackd' is not 263" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/monitor ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/monitor' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/monitor (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/monitor (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/monitor' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -/var/log/monitor.log { -X rotate 5 -X maxsize 10M -X missingok -X notifempty -X compress -X copytruncate -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/monitor' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/monitor' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/monitor failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/monitor': 'MD5 check failed' - ) << \SHAR_EOF -dbf4af64f49d5ffbf4a725cca714ccd0 cloud_scripts/etc/logrotate.d/monitor -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/monitor'` -ne 922 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/monitor' is not 922" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/routerServiceMonitor ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/routerServiceMonitor (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/routerServiceMonitor (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -/var/log/routerServiceMonitor.log { -X rotate 5 -X maxsize 10M -X missingok -X notifempty -X compress -X copytruncate -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/routerServiceMonitor failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/routerServiceMonitor': 'MD5 check failed' - ) << \SHAR_EOF -0f7968ad2bdbb870fa6a7f55565003c1 cloud_scripts/etc/logrotate.d/routerServiceMonitor -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/routerServiceMonitor'` -ne 935 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' is not 935" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/ppp ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/ppp' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/ppp (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/ppp (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/ppp' && -/var/log/ppp-connect-errors { -X maxsize 10M -X rotate 5 -X missingok -X notifempty -X compress -X nocreate -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/ppp' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/ppp' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/ppp failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/ppp': 'MD5 check failed' - ) << \SHAR_EOF -7d16a52cb372773845f812e51f52318f cloud_scripts/etc/logrotate.d/ppp -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/ppp'` -ne 98 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/ppp' is not 98" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/apache2 ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/apache2' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/apache2 (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/apache2 (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/apache2' && -/var/log/apache2/*.log { -X missingok -X copytruncate -X rotate 3 -X compress -X dateext -X maxsize 10M -X notifempty -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/apache2' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/apache2' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/apache2 failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/apache2': 'MD5 check failed' - ) << \SHAR_EOF -eefd54e0be665bd8a76a7aebee89d6d5 cloud_scripts/etc/logrotate.d/apache2 -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/apache2'` -ne 148 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/apache2' is not 148" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/rsyslog ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/rsyslog' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/rsyslog (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/rsyslog (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/rsyslog' && -/var/log/syslog -{ -X rotate 7 -X maxsize 10M -X missingok -X notifempty -X compress -X postrotate -X /usr/sbin/invoke-rc.d rsyslog rotate > /dev/null -X endscript -} -X -/var/log/mail.info -/var/log/mail.warn -/var/log/mail.err -/var/log/mail.log -/var/log/daemon.log -/var/log/kern.log -/var/log/auth.log -/var/log/user.log -/var/log/lpr.log -/var/log/cron.log -/var/log/debug -/var/log/messages -{ -X rotate 10 -X maxsize 10M -X missingok -X notifempty -X compress -X sharedscripts -X postrotate -X /usr/sbin/invoke-rc.d rsyslog rotate > /dev/null -X endscript -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/rsyslog' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/rsyslog' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/rsyslog failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/rsyslog': 'MD5 check failed' - ) << \SHAR_EOF -b4409ff800ad8ac42c79f412d6b90094 cloud_scripts/etc/logrotate.d/rsyslog -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/rsyslog'` -ne 517 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/rsyslog' is not 517" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/haproxy ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/haproxy' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/haproxy (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/haproxy (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/haproxy' && -/var/log/haproxy.log { -X rotate 5 -X missingok -X notifempty -X maxsize 10M -X postrotate -X /bin/kill -HUP `cat /var/run/rsyslog.pid 2> /dev/null` 2> /dev/null || true -X endscript -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/haproxy' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/haproxy' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/haproxy failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/haproxy': 'MD5 check failed' - ) << \SHAR_EOF -e584fdf0d2a25578f651fccce265ff09 cloud_scripts/etc/logrotate.d/haproxy -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/haproxy'` -ne 194 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/haproxy' is not 194" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/dnsmasq ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/dnsmasq' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/dnsmasq (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/dnsmasq (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/dnsmasq' && -/var/log/dnsmasq.log { -X maxsize 10M -X missingok -X rotate 5 -X notifempty -X delaycompress -X sharedscripts -X postrotate -X [ ! -f /var/run/dnsmasq/dnsmasq.pid ] || kill -USR2 `cat /var/run/dnsmasq/dnsmasq.pid` -X endscript -X create 0640 dnsmasq root -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/dnsmasq' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/dnsmasq' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/dnsmasq failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/dnsmasq': 'MD5 check failed' - ) << \SHAR_EOF -e42458bd875605d1cd625f0596b38d4c cloud_scripts/etc/logrotate.d/dnsmasq -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/dnsmasq'` -ne 272 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/dnsmasq' is not 272" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/cloud ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/cloud' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/cloud (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/cloud (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/cloud' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -/var/log/cloud.log { -X rotate 10 -X maxsize 10M -X missingok -X notifempty -X compress -X # CLOUDSTACK-9155: We cannot tell the processes that are writing to this -X # file to use the new inode, so instead we copy the original file, truncate -X # it and keep the same inode. -X copytruncate -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/cloud' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/cloud' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/cloud failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/cloud': 'MD5 check failed' - ) << \SHAR_EOF -f83a4d4cf36adb81699ac5892bf6c6f5 cloud_scripts/etc/logrotate.d/cloud -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/cloud'` -ne 1124 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/cloud' is not 1124" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/conntrackd ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/conntrackd' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/conntrackd (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/conntrackd (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/conntrackd' && -/var/log/conntrackd-stats.log { -X maxsize 10M -X rotate 2 -X missingok -X compress -X delaycompress -X -X postrotate -X if [ -e /var/run/conntrackd.sock ]; then -X /usr/sbin/invoke-rc.d conntrackd restart > /dev/null -X fi -X endscript -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/conntrackd' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/conntrackd' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/conntrackd failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/conntrackd': 'MD5 check failed' - ) << \SHAR_EOF -334d9dd543fcb9c8682b4b8fc3987c4c cloud_scripts/etc/logrotate.d/conntrackd -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/conntrackd'` -ne 263 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/conntrackd' is not 263" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/monitor ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/monitor' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/monitor (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/monitor (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/monitor' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -/var/log/monitor.log { -X rotate 5 -X maxsize 10M -X missingok -X notifempty -X compress -X copytruncate -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/monitor' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/monitor' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/monitor failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/monitor': 'MD5 check failed' - ) << \SHAR_EOF -dbf4af64f49d5ffbf4a725cca714ccd0 cloud_scripts/etc/logrotate.d/monitor -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/monitor'` -ne 922 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/monitor' is not 922" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/routerServiceMonitor ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/routerServiceMonitor (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/routerServiceMonitor (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -/var/log/routerServiceMonitor.log { -X rotate 5 -X maxsize 10M -X missingok -X notifempty -X compress -X copytruncate -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/routerServiceMonitor failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/routerServiceMonitor': 'MD5 check failed' - ) << \SHAR_EOF -0f7968ad2bdbb870fa6a7f55565003c1 cloud_scripts/etc/logrotate.d/routerServiceMonitor -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/routerServiceMonitor'` -ne 935 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/routerServiceMonitor' is not 935" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/ppp ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/ppp' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/ppp (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/ppp (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/ppp' && -/var/log/ppp-connect-errors { -X maxsize 10M -X rotate 5 -X missingok -X notifempty -X compress -X nocreate -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/ppp' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/ppp' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/ppp failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/ppp': 'MD5 check failed' - ) << \SHAR_EOF -7d16a52cb372773845f812e51f52318f cloud_scripts/etc/logrotate.d/ppp -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/ppp'` -ne 98 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/ppp' is not 98" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/apache2 ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/apache2' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/apache2 (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/apache2 (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/apache2' && -/var/log/apache2/*.log { -X missingok -X copytruncate -X rotate 3 -X compress -X dateext -X maxsize 10M -X notifempty -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/apache2' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/apache2' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/apache2 failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/apache2': 'MD5 check failed' - ) << \SHAR_EOF -eefd54e0be665bd8a76a7aebee89d6d5 cloud_scripts/etc/logrotate.d/apache2 -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/apache2'` -ne 148 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/apache2' is not 148" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/rsyslog ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/rsyslog' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/rsyslog (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/rsyslog (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/rsyslog' && -/var/log/syslog -{ -X rotate 7 -X maxsize 10M -X missingok -X notifempty -X compress -X postrotate -X /usr/sbin/invoke-rc.d rsyslog rotate > /dev/null -X endscript -} -X -/var/log/mail.info -/var/log/mail.warn -/var/log/mail.err -/var/log/mail.log -/var/log/daemon.log -/var/log/kern.log -/var/log/auth.log -/var/log/user.log -/var/log/lpr.log -/var/log/cron.log -/var/log/debug -/var/log/messages -{ -X rotate 10 -X maxsize 10M -X missingok -X notifempty -X compress -X sharedscripts -X postrotate -X /usr/sbin/invoke-rc.d rsyslog rotate > /dev/null -X endscript -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/rsyslog' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/rsyslog' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/rsyslog failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/rsyslog': 'MD5 check failed' - ) << \SHAR_EOF -b4409ff800ad8ac42c79f412d6b90094 cloud_scripts/etc/logrotate.d/rsyslog -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/rsyslog'` -ne 517 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/rsyslog' is not 517" - fi -fi -# ============= cloud_scripts/etc/logrotate.d/haproxy ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/logrotate.d/haproxy' -then -${echo} "x - SKIPPING cloud_scripts/etc/logrotate.d/haproxy (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/logrotate.d/haproxy (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/logrotate.d/haproxy' && -/var/log/haproxy.log { -X rotate 5 -X missingok -X notifempty -X maxsize 10M -X postrotate -X /bin/kill -HUP `cat /var/run/rsyslog.pid 2> /dev/null` 2> /dev/null || true -X endscript -} -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/logrotate.d/haproxy' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/logrotate.d/haproxy' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/logrotate.d/haproxy failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/logrotate.d/haproxy': 'MD5 check failed' - ) << \SHAR_EOF -e584fdf0d2a25578f651fccce265ff09 cloud_scripts/etc/logrotate.d/haproxy -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/logrotate.d/haproxy'` -ne 194 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/logrotate.d/haproxy' is not 194" - fi -fi -# ============= cloud_scripts/etc/profile.d/cloud.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/profile.d/cloud.sh' -then -${echo} "x - SKIPPING cloud_scripts/etc/profile.d/cloud.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/profile.d/cloud.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/profile.d/cloud.sh' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -if [ "`id -u`" -eq 0 ]; then -X PATH=${PATH}:/opt/cloud/bin -fi -export PATH -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/profile.d/cloud.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/profile.d/cloud.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/profile.d/cloud.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/profile.d/cloud.sh': 'MD5 check failed' - ) << \SHAR_EOF -78e5d1f4d852b0af96f8b2efa5245c86 cloud_scripts/etc/profile.d/cloud.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/profile.d/cloud.sh'` -ne 861 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/profile.d/cloud.sh' is not 861" - fi -fi -# ============= cloud_scripts/etc/profile.d/cloud.sh ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/profile.d/cloud.sh' -then -${echo} "x - SKIPPING cloud_scripts/etc/profile.d/cloud.sh (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/profile.d/cloud.sh (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/profile.d/cloud.sh' && -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -X -X -if [ "`id -u`" -eq 0 ]; then -X PATH=${PATH}:/opt/cloud/bin -fi -export PATH -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/profile.d/cloud.sh' - eval "${shar_touch}") && \ - chmod 0755 'cloud_scripts/etc/profile.d/cloud.sh' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/profile.d/cloud.sh failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/profile.d/cloud.sh': 'MD5 check failed' - ) << \SHAR_EOF -78e5d1f4d852b0af96f8b2efa5245c86 cloud_scripts/etc/profile.d/cloud.sh -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/profile.d/cloud.sh'` -ne 861 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/profile.d/cloud.sh' is not 861" - fi -fi -# ============= cloud_scripts/etc/cloud-nic.rules ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/cloud-nic.rules' -then -${echo} "x - SKIPPING cloud_scripts/etc/cloud-nic.rules (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/cloud-nic.rules (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/cloud-nic.rules' && -SUBSYSTEM=="net" KERNEL=="eth*" RUN+="/opt/cloud/bin/cloud-nic.sh $env{ACTION} %k" -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/cloud-nic.rules' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/cloud-nic.rules' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/cloud-nic.rules failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/cloud-nic.rules': 'MD5 check failed' - ) << \SHAR_EOF -4ffd506afaa6a69a55ba9ab6bbf706f5 cloud_scripts/etc/cloud-nic.rules -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/cloud-nic.rules'` -ne 83 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/cloud-nic.rules' is not 83" - fi -fi -# ============= cloud_scripts/etc/haproxy/haproxy.cfg ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/haproxy/haproxy.cfg' -then -${echo} "x - SKIPPING cloud_scripts/etc/haproxy/haproxy.cfg (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/haproxy/haproxy.cfg (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/haproxy/haproxy.cfg' && -global -X log 127.0.0.1:3914 local0 info -X chroot /var/lib/haproxy -X user haproxy -X group haproxy -X daemon -X -defaults -X log global -X mode tcp -X option dontlognull -X retries 3 -X option redispatch -X option forwardfor -X stats enable -X stats uri /admin?stats -X stats realm Haproxy\ Statistics -X stats auth admin1:AdMiN123 -X option forceclose -X timeout connect 5000 -X timeout client 50000 -X timeout server 50000 -X -X -listen cloud-default -X bind 0.0.0.0:35999 -X option transparent -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/haproxy/haproxy.cfg' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/haproxy/haproxy.cfg' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/haproxy/haproxy.cfg failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/haproxy/haproxy.cfg': 'MD5 check failed' - ) << \SHAR_EOF -a554fcecbaff9747723f9cd3aedf1ffd cloud_scripts/etc/haproxy/haproxy.cfg -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/haproxy/haproxy.cfg'` -ne 483 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/haproxy/haproxy.cfg' is not 483" - fi -fi -# ============= cloud_scripts/etc/haproxy/haproxy.cfg ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/etc/haproxy/haproxy.cfg' -then -${echo} "x - SKIPPING cloud_scripts/etc/haproxy/haproxy.cfg (file already exists)" - -else -${echo} "x - extracting cloud_scripts/etc/haproxy/haproxy.cfg (text)" - sed 's/^X//' << 'SHAR_EOF' > 'cloud_scripts/etc/haproxy/haproxy.cfg' && -global -X log 127.0.0.1:3914 local0 info -X chroot /var/lib/haproxy -X user haproxy -X group haproxy -X daemon -X -defaults -X log global -X mode tcp -X option dontlognull -X retries 3 -X option redispatch -X option forwardfor -X stats enable -X stats uri /admin?stats -X stats realm Haproxy\ Statistics -X stats auth admin1:AdMiN123 -X option forceclose -X timeout connect 5000 -X timeout client 50000 -X timeout server 50000 -X -X -listen cloud-default -X bind 0.0.0.0:35999 -X option transparent -SHAR_EOF - (set 20 20 02 27 09 37 09 'cloud_scripts/etc/haproxy/haproxy.cfg' - eval "${shar_touch}") && \ - chmod 0644 'cloud_scripts/etc/haproxy/haproxy.cfg' -if test $? -ne 0 -then ${echo} "restore of cloud_scripts/etc/haproxy/haproxy.cfg failed" -fi - if ${md5check} - then ( - ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'cloud_scripts/etc/haproxy/haproxy.cfg': 'MD5 check failed' - ) << \SHAR_EOF -a554fcecbaff9747723f9cd3aedf1ffd cloud_scripts/etc/haproxy/haproxy.cfg -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/etc/haproxy/haproxy.cfg'` -ne 483 && \ - ${echo} "restoration warning: size of 'cloud_scripts/etc/haproxy/haproxy.cfg' is not 483" - fi -fi -# ============= cloud_scripts/usr/share/cloud/cloud-scripts.tar ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/usr/share/cloud/cloud-scripts.tar' -then -${echo} "x - SKIPPING cloud_scripts/usr/share/cloud/cloud-scripts.tar (file already exists)" - -else -${echo} "x - extracting cloud_scripts/usr/share/cloud/cloud-scripts.tar (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/usr/share/cloud/cloud-scripts.tar -M971C+P`````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````#`P,#`W-34`,#`P,37-T96U-87A& -M:6QE4VEZ93TQ,$T*4G5N=&EM94UA>%5S93TR,$T*```````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````971C+W-Y7-T -M96TO:'EP97)V+61A96UO;G,N:'8M=G-S+61A96UO;BYS97)V:6-E```````` -M````````````````````````````````````````````````````,#`P,#8T -M-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,S0`,3,V,C4Q-3`S,30`,#(S -M,37!E2!S97)V:6-E("A64U,I(&1A96UO;@H*6U-E&5C4W1A3UM=6QT:2UU7-T96UD+W-Y2UC;VYF -M:63TO=7-R+VQO8V%L+V-L;W5D+W-Y7-T96TO;W!E;BUV;2UT;V]L3UM=6QT:2UU3UM=6QT:2UU7-T96UD+W-Y&5N+FUO=6YT"D)E9F]R93UN971W;W)K+G1A2UC;VYF:6&5C4W1A&5C4W1A3UM=6QT:2UU7-T96TO:'EP97)V+61A96UO;G,N:'8M -M9F-O<'DM9&%E;6]N+G-E7!E2!S97)V:6-E("A&0T]062D@9&%E;6]N"D-O -M;F1I=&EO;E!A=&A%>&ES=',]+V1E=B]V;6)U0H*6U-E3UM=6QT:2UU7-T96TO8VQO=60M -M<&]S=&EN:70N2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N0`````````````````````````````````````````````` -M`````````````````````````````````````````#`P,#`V-#0`,#`P,36]U(&UA>2!N;W0@=7-E -M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI -M8V5N7!E(#$S("UJ($123U`*+4$@24Y0550@+7`@:6-M<"`M:B!!0T-%4%0* -M+4$@24Y0550@+6D@971H,2`M<"!T8W`@+6T@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* -M(R`@(&AT='`Z+R]W=W7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E -M<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H -M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N -M2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H -M92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R -M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T -M"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7-C=&P@8V]N9FEG=7)A -M=&EO;B!F:6QE"B,*(R!&;W(@8FEN87)Y('9A;'5E7-C=&PN -M8V]N9B@U*2!F;W(@;6]R92!D971A:6QS+@HC($!615)324].0`H*(R!#;VYT -M2!T:&5R -M96)Y(')E9'5C:6YG('1H92!S:7IE(&]F(&1I&PR='!D+WAL -M,G1P9"YC;VYF```````````````````````````````````````````````` -M````````````````````````````````````````````````````````,#`P -M,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,3,`,3,U-C$W,C4Q-3(` -M,#$T-#4U`"`P```````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````'5S=&%R("``9&%R65S"G!P<&]P=&9I;&4@/2`@("`O971C+W!P<"]O<'1I;VYS -M+GAL,G1P9`H````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````971C+V1N2!D:7-A8FQE -MF5N+"!S:6YC92!T:&5Y"B,@=&5L;"!D -M;G-M87-Q('1O(&9I;'1E2X@268@>6]U(&AA=F4@82!D:6%L+6]N+61E;6%N9"!L:6YK('1H97D@ -M86QS;R!S=&]P"B,@=&AE6]U('=A;G0@9&YS('1O(&=E="!I=',@=7!S=')E86T@2`@(&%P<&5A2!O=&AE<@HC(&9I -M;&4L(&=E='1I;F<@:71S('-E2!O;@HC('-P96-I9FEE9"!I;G1E -M&-E<'0M:6YT97)F86-E/65T:#$*97AC97!T+6EN -M=&5R9F%C93UE=&@R"F5X8V5P="UI;G1E6]U('=A;G0@9&YS;6%S<2!T;R!P6]U"B,@=V%N="!D;G-M -M87-Q('1O(')E86QL>2!B:6YD(&]N;'D@=&AE(&EN=&5R9F%C97,@:70@:7,@ -M;&ES=&5N:6YG(&]N+`HC('5N8V]M;65N="!T:&ES(&]P=&EO;BX@06)O=70@ -M=&AE(&]N;'D@=&EM92!Y;W4@;6%Y(&YE960@=&AI6]U('=A;G0@=&\@ -M:&%V92!A(&1O;6%I;@HC(&%U=&]M871I8V%L;'D@861D960@=&\@2!Q=6%L:69I -M960@9&]M86EN(&YA;65S+"!A7-T96US(&-O;F9I9W5R960@8GD@ -M1$A#4`HC(#,I(%!R;W9I9&5S('1H92!D;VUA:6X@<&%R="!F;W(@(F5X<&%N -M9"UH;W-T7,N;W)G+G5K+#$Y,BXQ-C@N,BXP -M+S(T"@HC(%-A;64@:61E82P@8G5T(')A;F=E(')A=&AE7,N;W)G+G5K+#$Y,BXV."XS -M+C$P,"PQ.3(N,38X+C,N,C`P"@HC(%5N8V]M;65N="!T:&ES('1O(&5N86)L -M92!T:&4@:6YT96=R871E9"!$2$-0('-E6]U(&YE960*(R!T;R!S -M=7!P;'D@=&AE(')A;F=E(&]F(&%D9')E2!$2$-0"B,@2!B92!S970@;VYL>2!F;W(@=&AI2!W:&5N('1H92!T86<@(F=R965N -M(B!I2!A('-U8FYE="!W:&EC:"!C -M86XG="!B92!U6YA;6EC(&%D9')E2!A;F0*(R!A9&0@;F%M97,@=&\@=&AE($1.4R!F;W(@=&AE($E0 -M=C8@861D2P@-#AH"@HC($1O($1(0U`@86YD(%)O=71E2!W:6QL('5S -M92!33$%!0R!F;W(@861D2!R82US=&%T96QE2!J -M=7-T"B,@;F5E9"!T;R!B92!O;B!T:&4@7,@9VEV92!T:&4@:&]S="!W:71H($5T -M:&5R;F5T(&%D9')E7,@9VEV92!T:&4@:&]S="!W -M:71H(&-L:65N="!I9&5N=&EF:65R(#`Q.C`R.C`R.C`T"B,@=&AE($E0(&%D -M9')E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ -M(G)E9"(@=&\*(R!T:&4@;6%C:&EN92!W:71H($5T:&5R;F5T(&%D9')E&5D($E0=C8@861D2!;72!A2X*(V1H8W`M:&]S=#UI9#HP,#HP,3HP -M,#HP,3HQ-CID,CHX,SIF8SHY,CID-#HQ.3IE,CID.#IB,BP@9G)E9"P@6S$R -M,S0Z.C5="@HC($EG;F]R92!A;GD@8VQI96YT2!M86-H:6YE('=H;W-E"B,@1$A#4"!V96YD;W)C;&%S -M'1R82!O<'1I -M;VYS('=H:6-H(&%R92!T86=G960@87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@ -M;VYE"B,@;V8@=VAO'1R82!O<'1I;VYS('=H:6-H(&%R -M92!T86=G960@87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO2!D;G-M -M87-Q(&%N9"!S96YD(&YO(&1E9F%U;'0*(R!R;W5T92!A="!A;&PN($YO=&4@ -M=&AA="!T:&ES(&]N;'D@=V]R:W,@9F]R('1H92!O<'1I;VYS('-E;G0@8GD* -M(R!D969A=6QT("@Q+"`S+"`V+"`Q,BP@,C@I('1H92!S86UE(&QI;F4@=VEL -M;"!S96YD(&$@>F5R;RUL96YG=&@@;W!T:6]N"B,@9F]R(&%L;"!O=&AE0H*(R!3970@=&AE(&1E9F%U;'0@=&EM92UT;RUL:79E -M('1O(#4P"B-D:&-P+6]P=&EO;CTR,RPU,`H*(R!3970@=&AE(")A;&P@2!A;B!O<'1I;VX@=VAI8V@@=VEL;"!O;FQY -M(&)E('-E;G0@=&\@=&AE(")R960B(&YE='=O2!A6]U -M(&UA>2!W86YT('1O('5N8V]M;65N="!S;VUE(&]R(&%L;"!O9B!T:&5M(&EF -M('EO=2!U7!E"@HC(%-E;F0@86X@96UP='D@5U!! -M1"!O<'1I;VXN(%1H:7,@;6%Y(&)E(%)%455)4D5$('1O(&=E="!W:6YD;W=S -M(#<@=&\@8F5H879E+@HC9&AC<"UO<'1I;VX],C4R+")<;B(*"B,@4V5N9"!2 -M1D,M,S,Y-R!$3E,@9&]M86EN('-E87)C:"!$2$-0(&]P=&EO;BX@5T%23DE. -M1SH@66]U71H:6YG(&5L&4@=&%G(&9O2YK<'AE"B-D:&-P+6)O;W0];7EB;V]T:6UA9V4*"B,@16YC87!S -M=6QA=&5D(&]P=&EO;G,@9F]R($5T:&5R8F]O="!G4%A%+B!!;&P@=&AE(&]P -M=&EO;G,@87)E"B,@96YC87!S=6QA=&5D('=I=&AI;B!O<'1I;VX@,32!C;V1E"B-D:&-P+6]P=&EO;CUE;F-A<#HQ-S4L(#$W-BP@,6(@("`@("`@ -M(R!N;RUP61H8W`*(V1H8W`M;W!T:6]N/65N8V%P.C$W-2P@,3#@V+3,R"B-D:&-P+6UA=&-H/6ET86YI8W,L(&]P=&EO;CIC;&EE;G0M87)C -M:"P@,B`C24$V-`HC9&AC<"UM871C:#UH86UM97)S+"!O<'1I;VXZ8VQI96YT -M+6%R8V@L(#8@(W@X-BTV-`HC9&AC<"UM871C:#UM86-T96QS+"!O<'1I;VXZ -M8VQI96YT+6%R8V@L(#<@(T5&22!X.#8M-C0*"B,@1&\@&4M<')O;7!T/2)0#@V4$,L("));G-T86QL($QI;G5X(BP@<'AE;&EN=7@*"B,@3&]A -M9',@/'1F='`M#@V4$,L("));G-T86QL($QI;G5X(BP@<'AE;&EN -M=7@L(#$N,BXS+C0*"B,@57-E(&)O;W1S97)V97(@;VX@;F5T=V]R:RP@9F]U -M;F0@;7D@;75L=&EC87-T(&]R(&)R;V%D8V%S="X*(W!X92US97)V:6-E/7@X -M-E!#+"`B26YS=&%L;"!W:6YD;W=S(&9R;VT@4DE3('-E#@V4$,L("));G-T86QL('=I;F1O=W,@9G)O;2!225,@2!F:6QE0HC('1H92!U&%M<&QE(&]F(&1H8W`M8F]O="!W:71H(&%N(&5X=&5R;F%L(%1& -M5%`@2`M+7!X92US97)V -M:6-E+@HC9&AC<"UB;V]T/2]V87(O9G1P9"]P>&5L:6YU>"XP+&)O;W1H;W-T -M+#$Y,BXQ-C@N,"XS"@HC($EF('1H97)E(&%R92!M=6QT:7!L92!E>'1E#TR,3`P"@HC(%1H92!$2$-0('-E6]U(&UI9VAT(&5N9"!U<"!A8V-I9&5N=&%L -M;'D@8V]N9FEG=7)I;F<@82!$2$-0"B,@2X@5&AE($E30R!S97)V97(@=7-E&5C=71A8FQE -M('=H96X@82!$2$-0(&QE87-E(&ES(&-R96%T960@;W(@9&5S=')O>65D+@HC -M(%1H92!A`HC86QI87,],2XR+C,N -M,"PU+C8N-RXP+#(U-2XR-34N,C4U+C`*(R!A;F0@=&AI"UT87)G970@9F]R(&%L;"!L;V-A;`HC(&UA8VAI;F5S+@HC;&]C86QM>`H* -M(R!2971U6]U('=A;G0@=&\@ -M3XL/'=E:6=H=#X*(R!)9B!T:&4@9&]M86EN('!A&%M<&QE+F-O;2!D;VUA:6X@=&\* -M(R!L9&%P&%M -M<&QE+F-O;2!D;VUA:6X@=&\*(R!L9&%P&%M<&QE+F-O;2PS -M.#DL,@H*(R!!(%-25B!R96-O'!A;G-I;VX@ -M9&]N92!F;W(@4U)6(')E8V]R9',@7V1O97-?;F]T"B,@;V-C=7(@9F]R(%!4 -M4B!R96-O'!A;G-I;VX@9&]N92!F;W(@4U)6 -M(')E8V]R9',@7V1O97-?;F]T"B,@;V-C=7(@9F]R(%185"!R96-O&%M<&QE(%-01BX*(W1X="UR96-O5\@=V]R:W,*(R!F;W(@=&%R9V5T3TO=F%R -M+VQO9R]D;G-M87-Q+FQO9PH*(R!);F-L=61E(&$@86YO=&AE'0*```````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````````971C+V-R;VXN9&%I -M;'DO```````````````````````````````````````````````````````` -M`````````````````````````````````````````````````````````#`P -M,#`W-34`,#`P,32]C;&5A2!C86-H92!T;R!U;'1I;6%T96QY(')E9'5C92!S=V%P<&EN9PH*7,O=FTO9')O<%]C86-H97,*```````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````````````````971C+W9M -M=V%R92UT;V]LF4@:V5P=#H@,2!-0@IV;7-V8RYM -M87A,;V=3:7IE(#T@,0H*(R!$969I;F5S('1H92`B=FUT;V]L"!S:7IE(#4P30IS:7IE(#4P30IC;VUP0HC3&ES=&5N061D7,@9F]R('!R;W1O8V]L('9E2`O971C+W-S:"]SF4@;V8@97!H -M96UE7-L;V=& -M86-I;&ET>2!!551("E-Y65S"D%U=&AO7,@:6X@+V5T8R]S65S(&EF('EO=2!D;VXG="!T'0@<&%S65S"D=34T%024-L96%N=7!#65S"@HC($%C8V5P="!L;V-A;&4M4]F9G-E="`Q,`HC6#$Q57-E3&]C86QH;W-T -M('EE65S"B-5&PR='!D```````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````,#`P,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,34`,3,U -M-C$W,C4Q-3(`,#$T-C`W`"`P```````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````'5S=&%R("``9&%R6]U('=A;G0@=&\@=7-E(&$@9&EF9F5R -M96YT(&EN=&5R9F%C92!O6]U(&EN2!F2!)4"!A9&1R97-S+`H@("`@("`@(",@>6]U(&-A;B!U7-L;V'-O8VL@(R!P7-T96T@;&]G9VEN9PHD36]D3&]A9"!I;6ML;V<@ -M("`C('!R;W9I9&5S(&ME2!R:VQO9V0I"B,D36]D3&]A9"!I;6UA7-L;V<@7-T96TN("!3<&QI="!I="!U<"!S;R!T:&%T"B,@:70@:7,@96%S>2!T -M;R!W2YL;V<* -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````````````````&5T8R]M;V1P -M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@ -M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2!C86-H92!T -M;R!U;'1I;6%T96QY(')E9'5C92!S=V%P<&EN9PH*<&AY;65M/20H9G)E97QA -M=VL@)R]>365M.B][<')I;G0@)#)])RD*:68@6R`D<&AY;65M("UL="`U,3,P -M,#`@73L@=&AE;@H@('-Y;F,@)B8@96-H;R`Q(#X@+W!R;V,O2YC;VYF```````````````````````````````````````````````` -M```````````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P -M,3$-O;FYE8W1I -M;VYS4&5R0VAI;&0@("`),3`P,`H\+TEF36]D=6QE/@H*(R!V:6TZ('-Y;G1A -M>#UA<&%C:&4@=',]-"!S=STT('-T6U,:6YK&5S($9O;&QO=U-Y;4QI;FMS($UU;'1I5FEE=W,*"0E!;&QO=T]V97)R:61E -M($%L;`H)"4]R9&5R(&%L;&]W+&1E;GD*"0EA;&QO=R!F&5C0T=)("U-=6QT:59I97=S -M("M3>6U,:6YK2QA;&QO=PH@("`@("`@($1E;GD@9G)O -M;2!A;&P*("`@("`@("!!;&QO=R!F3X*"3Q$:7)E8W1O0H)"6%L;&]W(&9R;VT@86QL"@D\+T1I3X*"@E38W)I -M<'1!;&EA0H)"4%L;&]W(&9R;VT@86QL"@D\ -M+T1I3X*"@E%T%004-(15],3T=?1$E2?2]ET%004-(15],3T=?1$E2 -M?2]S2QA;&QO=PH)"41E;GD@ -M9G)O;2!A;&P*"0E!;&QO=R!F2!T -M:&4*"2,@("!34TQ#97)T:69I8V%T949I;&4@9&ER96-T:79E(&ES(&YE961E -M9"X*"5-33$-E0H*"2,@("!397)V -M97(@0V5R=&EF:6-A=&4@0VAA:6XZ"@DC("`@4&]I;G0@4U-,0V5R=&EF:6-A -M=&5#:&%I;D9I;&4@870@82!F:6QE(&-O;G1A:6YI;F<@=&AE"@DC("`@8V]N -M8V%T96YA=&EO;B!O9B!014T@96YC;V1E9"!#02!C97)T:69I8V%T97,@=VAI -M8V@@9F]R;2!T:&4*"2,@("!C97)T:69I8V%T92!C:&%I;B!F;W(@=&AE('-E -M0H)(R`@('1H92!R969E -M2`H0T$I.@H)(R`@(%-E="!T:&4@0T$@8V5R=&EF:6-A -M=&4@=F5R:69I8V%T:6]N('!A=&@@=VAE6]U(&YE960@:&%S:"!S>6UL -M:6YK6UL:6YK7!E*3H* -M"2,@("!#;&EE;G0@8V5R=&EF:6-A=&4@=F5R:69I8V%T:6]N('1Y<&4@86YD -M(&1E<'1H+B`@5'EP97,@87)E"@DC("`@;F]N92P@;W!T:6]N86PL(')E<75I -M2!T;R!V97)I9GD@=&AE(&-E -M4-L:65N -M="!R97%U:7)E"@DC4U-,5F5R:69Y1&5P=&@@(#$P"@H)(R`@($%C8V5S6YT87@@:7,@80H)(R`@(&UI>'1UU-33%]#25!(15)]("%^(&TO7BA%6%!\3E5,3"DO(%P* -M"2,@("`@("`@("`@("!A;F0@)7M34TQ?0TQ)14Y47U-?1$Y?3WT@97$@(E-N -M86ME($]I;"P@3'1D+B(@7`H)(R`@("`@("`@("`@(&%N9"`E>U-33%]#3$E% -M3E1?4U]$3E]/57T@:6X@>R)3=&%F9B(L(")#02(L(")$978B?2!<"@DC("`@ -M("`@("`@("`@86YD("5[5$E-15]71$%9?2`^/2`Q(&%N9"`E>U1)345?5T1! -M67T@/#T@-2!<"@DC("`@("`@("`@("`@86YD("5[5$E-15](3U52?2`^/2`X -M(&%N9"`E>U1)345?2$]54GT@/#T@,C`@("`@("`@*2!<"@DC("`@("`@("`@ -M("!OU)%34]415]!1$12?2`]?B!M+UXQ.3)<+C2!E>&ES=&EN9R!W:&5N(&-L -M:65N=`H)(R`@("`@875T:&5N=&EC871I;VX@:7,@=7-E9"DN(%1H:7,@8V%N -M(&)E('5S960@=&\@:6UP;W)T('1H92!C97)T:69I8V%T97,*"2,@("`@(&EN -M=&\@0T=)('-C'!O'!E;G-I=F4@;W!E2!E;F%B;&5S('1H90H)(R`@("`@97AP;W)T871I;VX@9F]R -M($-'22!A;F0@4U-)(')E<75E'!O2`O=7-R+VQI8B]C9VDM8FEN/@H)"5-33$]P=&EO;G,@*U-T -M9$5N=E9A6]U(&-A;B!U6]U(')E8V5I=F4@ -M22]/(&5R2!A;&5R="!I2!F;W(@8G)O=W-E6]U(&MN;W<@=&AA="!T:&5I2X*"2,@("!. -M;W1I8V4Z($UO2!W86YT('1O(&1I2P@;VYE(&AA6]U(&IU2!A;'-O"B,@:&%V92!T;R!C -M:&%N9V4@=&AE(%9I6]U(&AA=F4@=7!GB!A;F0*(R!214%$ -M344N1&5B:6%N+F=Z"@I,:7-T96X@,3`N,2XQ+C$Z.#$X,`H*/$EF36]D=6QE -M(&UO9%]S0HC('1E;&P@ -M9&YS;6%S<2!T;R!F:6QT97(@;W5T('%U97)I97,@=VAI8V@@=&AE('!U8FQI -M8R!$3E,@8V%N;F]T"B,@86YS=V5R+"!A;F0@=VAI8V@@;&]A9"!T:&4@2!T:&4@2X*"B,@3F5V97(@9F]R=V%R9"!P;&%I -M;B!N86UE2X*(R!.;W1E('1H870@*&%M;VYG2!O9B!T:&4@=7!S=')E86T*(R!S97)V97)S(&ET(&MN -M;W=S(&%B;W5T(&%N9"!T2!E86-H('%U97)Y"B,@=VET:"`@96%C:"`@2`@:6X@('1H92`@;W)D97(@('1H97D@("!A<'!E87(@ -M("!I;@HC("]E=&,O2!A&%M<&QE(&]F(')O=71I;F<@4%12('%U97)I97,@=&\@ -M;F%M97-E2!D;VUA:6YS(&AE6]U('=A;G0@=&\@9F]R8V4@=&\@86X@ -M25`@861D&%M<&QE(&)E;&]W('-E;F0@86YY -M(&AO6]U('=A;G0@ -M9&YS;6%S<2!T;R!L:7-T96X@9F]R($1(0U`@86YD($1.4R!R97%U97-T&-E<'0M -M:6YT97)F86-E/6QO"@HC($]R('=H:6-H('1O(&QI2!A9&1R -M97-S("AR96UE;6)E2!$3E,@7-T96US('=H:6-H -M('-U<'!O6]U(&UA>2!N965D('1H:7,@:7,@=VAE;@HC(')U;FYI;F<@ -M86YO=&AE6]U(&1O;B=T('=A;G0@9&YS;6%S<2!T;R!R -M96%D("]E=&,O:&]S=',L('5N8V]M;65N="!T:&4*(R!F;VQL;W=I;F<@;&EN -M92X*(VYO+6AO6]U('=A;G0@:70@=&\@2!P;W1E;G1I86QL>2!S971T:6YG('1H90HC -M("`@(&1O;6%I;B!O9B!A;&P@'!A;F0M:&]S -M=',B"B-D;VUA:6X],BYV;6]P0HC(&$@;&5A6]U(&AA=F4@;6]R92!T:&%N(&]N92!N971W;W)K+"!Y;W4@ -M=VEL;"!N965D('1O"B,@2!P87)A;65T97)S(&9O&%M<&QE -M7,@7,@:70G -M2!T -M:&4@;6%C:&EN92!W:71H(&5T:&5R;F5T"B,@861D'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ -M(G)E9"(@=&\*(R!A;GD@;6%C:&EN92!W:71H(&5T:&5R;F5T(&%D9')E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ -M(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO"(*(V1H8W`M -M=F5N9&]R8VQA2!M86-H:6YE(&]N90HC -M(&]F('=H;W-E($1(0U`@=7-E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@ -M87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO2!N86UE.@HC(')U;B`B9&YS;6%S<2`M+6AE;'`@9&AC<"(@=&\@9V5T -M(&$@;&ES="X*(R!.;W1E('1H870@86QL('1H92!C;VUM;VX@2!D;G-M87-Q+B!9;W4@=F5R>2!L:6ME;'D@=VEL;"!N;W0@ -M;F5E9`HC(&%N>2!D:&-P+6]P=&EO;G,N($EF('EO=2!U2!A2!W;W)K0HC(&1E9F%U;'0@*#$L -M(#,L(#8L(#$R+"`R."D@=&AE('-A;64@;&EN92!W:6QL('-E;F0@82!Z97)O -M+6QE;F=T:"!O<'1I;VX*(R!F;W(@86QL(&]T:&5R(&]P=&EO;B!N=6UB97)S -M+@HC9&AC<"UO<'1I;VX],PH*(R!3970@=&AE($Y44"!T:6UE('-E0H*(R!3970@=&AE(&1E -M9F%U;'0@=&EM92UT;RUL:79E('1O(#4P"B-D:&-P+6]P=&EO;CTR,RPU,`H* -M(R!3970@=&AE(")A;&P@2!A;B!O<'1I -M;VX@=VAI8V@@=VEL;"!O;FQY(&)E('-E;G0@=&\@=&AE(")R960B(&YE='=O -M2!A6]U(&UA>2!W86YT('1O('5N8V]M;65N="!T:&5M -M(&EF('EO=2!U2!N971B:6]S('-C;W!E+@H*(R!396YD(%)&0RTS -M,SDW($1.4R!D;VUA:6X@2!W:&5N('1H92!C;&EE;G0@71E(&EN=&5G97(@+2!T:&%T)W,@=VAA="!M:6-R;W-O9G0@=V%N -M=',N(%-E90HC(&AT='`Z+R]T96-H;F5T,BYM:6-R;W-O9G0N8V]M+U=I;F1O -M=W-397)V97(O96XO;&EB2]A-S!F,6)B-RUD,F0T+30Y9C`M.39D-BTT -M8C2!S;VUE(&-O;F9I9W5R871I;VYS(&]F"B,@ -M171H97)B;V]T('1O(&%L;&]W(&ES('1O(')E8V]G;FES92!T:&4@1$A#4"!S -M97)V97(N"B-D:&-P+6]P=&EO;CUV96YD;W(Z171H97)B;V]T+#8P+")%=&AE -M"X@3F]T92!T:&%T -M('=E(&YE960@=&\@2!N965D"B,@=&AI2!F:6QE0HC('1H92!U&5L:6YU>"YR -M960M;F5T"@HC($%N(&5X86UP;&4@;V8@9&AC<"UB;V]T('=I=&@@86X@97AT -M97)N86P@2!C;&EE -M;G0@=VAI8V@@8G)O861C87-T6]U(&UI9VAT(&5N9"!U -M<"!A8V-I9&5N=&%L;'D@8V]N9FEG=7)I;F<@82!$2$-0"B,@2X@5&AE($E30R!S -M97)V97(@=7-E2!T:&4@:&]S=&YA;64*(R!I9B!T:&5R92!IF4@:&5R92X*(V-A8VAE -M+7-I>F4],34P"@HC($EF('EO=2!W86YT('1O(&1I2!R97-P;VYS97,@=VAI8V@@8V]M92!F;W)M("]E=&,O:&]S=',@86YD -M('1H92!$2$-0(&QE87-E"B,@9FEL92!H879E(%1I;64M5&\M3&EV92!S970@ -M87,@>F5R;RP@=VAI8V@@8V]N=F5N=&EO;F%L;'D@;65A;G,*(R!D;R!N;W0@ -M8V%C:&4@9G5R=&AE6]U(&%R92!H87!P>2!T;R!T6]U(&-A;B!S970@82!T:6UE+71O+6QI=F4@*&EN"B,@6]U('=A;G0@9&YS;6%S<2!T -M;R!D971E8W0@871T96UP=',@8GD@5F5R:7-I9VX@=&\@"!U<"!$ -M3E,@2!W;W)K"!T;R`U+C8N-RYX"B-A;&EA"UT87)G970@9F]R(&%L;"!L;V-A;`HC(&UA8VAI;F5S+@HC;&]C86QM>`H* -M(R!2971U6]U('=A;G0@=&\@ -M3XL/'=E:6=H=#X*(R!)9B!T:&4@9&]M86EN('!A&%M<&QE+F-O;2!D;VUA:6X@=&\* -M(R!L9&%P&%M -M<&QE+F-O;2!D;VUA:6X@=&\*(R!L9&%P&%M<&QE+F-O;2PS -M.#D*"B,@5'=O(%-25B!R96-O&%M<&QE+F-O;2PS.#DL,0HC&%M<&QE+F-O;2QL9&%P&%M<&QE+F-O -M;0HC&%M<&QE+F-O;0H*(R!4:&4@9F]L -M;&]W:6YG(&QI;F4@65E(%!A9V4N7VAT='`N7W1C<"YD;G,M'0M3TO=F%R+VQO9R]D -M;G-M87-Q+FQO9PH*(R!);F-L=61E(&$@86YO=&AE'0*```````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````&5T8R]I<'-E8RYS96-R971S```````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P,3PH@("`@;6%X2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P -M.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N -M71R=6YC871E"GT*```````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````````&5T8R]L;V=R;W1A=&4N -M9"]C;VYN=')A8VMD```````````````````````````````````````````` -M```````````````````````````````````````````````````````P,#`P -M-C0T`#`P,#$W-3``,#`P,3PH@("`@;6%X6-O;7!R97-S"@H@("`@<&]S=')O=&%T90H@("`@("`@(&EF -M(%L@+64@+W9A2!O9B!T:&4@3&EC96YS92!A -M=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O -M'!R97-S(&]R(&EM<&QI960N("!3 -M964@=&AE($QI8V5NPH@("`@("`@(')O -M=&%T92`U"B`@("`@("`@;6%X2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N'-I>F4@,3!- -M"B`@("`@("`@;6ES0H@("`@("`@ -M(&-O;7!R97-S"B`@("`@("`@8V]P>71R=6YC871E"GT*```````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````!E=&,O;&]G0H)8V]M<')E71R=6YC871E"B`@("`@("!R;W1A=&4@,PH@("`@("`@8V]M<')E'0*("`@("`@(&UA>'-I>F4@,3!-"B`@("`@("!N;W1I9F5M -M<'1Y"GT*```````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````&5T8R]L;V=R;W1A=&4N9"]R0H)8V]M<')E -M2YL;V<@>PH@("`@0H@("`@;6%X7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ -M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E -M(&%T"B,*(R`@(&AT='`Z+R]W=W2\````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````,#`P,#'DN8V9G```````````````````````````````````````````` -M```````````````````````````````````````````````````````````P -M,#`P-C0T`#`P,#$W-3``,#`P,3'D*"75S97(@:&%P0H)9W)O -M=7`@:&%P0H)9&%E;6]N"@ID969A=6QT7!E(CHB9W5E2(Z(C$W,BXQ-BXQ+C$B+`H)(F1E9F%U -M;'1?96YT2(*?0H````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````;W!T+V-L;W5D+W1E7!E(CH@(FEC;7`B"B`@("`@("`@("`@('TL"B`@("`@("`@("`@ -M('L*("`@("`@("`@("`@("`@(")A;&QO=V5D(CH@=')U92P*("`@("`@("`@ -M("`@("`@(")C:61R(CH@(C$P+C`N,BXP+S@B+`H@("`@("`@("`@("`@("`@ -M(F9I7!E(CH@(G5D<"(*("`@("`@("`@ -M("`@?2P*("`@("`@("`@("`@>PH@("`@("`@("`@("`@("`@(F%L;&]W960B -M.B!T7!E(CH@(FYE='=OR)P=6)L:6-?:7`B.B(Q -M,"XP+C(N,3`R(BP*(G-O=7)C95]N870B.G1R=64L"B)A9&0B.G1R=64L"B)O -M;F5?=&]?;VYE7VYA="(Z9F%L2(Z(C$P+C`N,BXQ(BP*(FYE=&UA2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H -M92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2!C;61?;&EN92YJ2!I<',P,#`Q+FIS;VX*+V]P="]C;&]U9"]B:6XO -M=7!D871E7V-O;F9I9RYP>2!I<',P,#`R+FIS;VX*+V]P="]C;&]U9"]B:6XO -M=7!D871E7V-O;F9I9RYP>2!I<',P,#`S+FIS;VX*```````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````;W!T+V-L;W5D+W1ER)P -M=6)L:6-?:7`B.B(Q,"XP+C(N,3`S(BP*(G-O=7)C95]N870B.G1R=64L"B)A -M9&0B.G1R=64L"B)O;F5?=&]?;VYE7VYA="(Z9F%L2(Z(C$P+C`N,BXQ(BP*(FYE=&UAPH)(FQO8V%L7W!U8FQI8U]I<"(Z(C$W,BXQ-BXQ -M+C$B+`H)(FQO8V%L7V=U97-T7V-I9'(B.B(Q-S(N,38N,2XP+S(T(BP*"2)L -M;V-A;%]P=6)L:6-?9V%T97=A>2(Z(C$W,BXQ-BXQ+C$B+`H)(G!E97)?9V%T -M97=A>5]I<"(Z(C$P+C(P,"XR,#`N,2(L"@DB<&5E2(Z(C-D97,M;60U(BP* -M"2)I:V5?<&]L:6-Y(CHB,V1E7)I9VAT(&]W -M;F5R6]U -M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O -M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W -M=W2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NW!R:6YT("0Y.WTG*0H):68@ -M6R`D4D]55$527U-4051%(#T@(E50(B!="@ET:&5N"@D@("`@4U1!5%53/4U! -M4U1%4@H)96QI9B!;("123U5415)?4U1!5$4@/2`B1$]73B(@70H)=&AE;@H) -M("`@(%-405154SU"04-+55`*"69I"F9I"@IE8VAO(")3=&%T=7,Z("1[4U1! -M5%53?2(*```````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````!O<'0O8VQO=60O=&5M<&QA=&5S+VAE87)T8F5A="YS:"YT96UP;``` -M```````````````````````````````````````````````````````````` -M````````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC -M"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ -M=&AE($QI8V5N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H -M='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI -M8V5NPH@("`@36]D -M92!&5$97('L*("`@("`@("`C"B`@("`@("`@(R!3:7IE(&]F('1H92!R97-E -M;F0@<75E=64@*&EN(&]B:F5C=',I+B!4:&ES(&ES('1H92!M87AI;75M"B`@ -M("`@("`@(R!N=6UB97(@;V8@;V)J96-T2!T;R!S=&]R92!D96%D(&]B:F5C=',N"B`@("`@("`@(R!$969A -M=6QT(&ES(#$S,3`W,B!O8FIE8W1S+@H@("`@("`@(",*("`@("`@("`C(%)E -M6]U('-E="!A(&QO=R!V86QU92P@5$-0(&5N -M=')I97,@:6X*("`@("`@("`C($5S=&%B;&ES:&5D('-T871E&%M<&QE+`H@("`@("`@(",@86X@ -M4U-((&-O;FYE8W1I;VX@=VET:&]U="!+965P06QI=F4@96YA8FQE9"X@268@ -M;F]T('-E="P*("`@("`@("`C('1H92!D865M;VX@=7-E6]U(&1E -M8W)E87-E('1H:7,*("`@("`@("`C('9A;'5E+"!T:&4@;G5M8F5R(&]F(&%C -M:VYO=VQE9V1M96YT6]U"B`@("`@("`@(R!I;F-R96%S -M92!T:&ES('9A;'5E+"!T:&4@'!E6-L97,@6]U('1O(&1I -M'1E'1E -MF%T:6]N -M(&UE2!O9B!Y;W5R(&5X:7-T:6YG(&EN=&5R9F%C97,N($EF -M(&%N>2!D;W5B="P*("`@("`@("`C(&1O(&YO="!M;V1I9GD@=&AI0H@("`@("`@(",@9&]U -M8G0L(&1O(&YO="!M;V1I9GD@=&AIF%T:6]N(&UEF%T:6]N(&UE6]U"B`@("`@ -M("`@(R!N;W1I8V4@6]U(&UA>2!W86YT('1O -M(&EN8W)E87-E('1H92!S:7IE"B`@("`@("`@(R!O9B!T:&4@2!T;R!A8VAI979E(&9A=6QT+71O;&5R86YC92X@26X@ -M8V%S92!O9B!D;W5B="P@9&\*("`@("`@("`C(&YO="!M;V1I9GD@=&AI6]U(&-A;B!O;FQY('-E;&5C="!O;F4N"B`@("`C"B`@("`C(%5$4"![ -M"B`@("`@("`@(PH@("`@("`@(",@5410(&%D9')E6]U(&%R92!G;VEN9R!T;R!UF4*("`@("`@("`C"B`@("`@("`@ -M(R!28W93;V-K971"=69F97(@,3(T.3(X,`H*("`@("`@("`C"B`@("`@("`@ -M(R!%;F%B;&4O1&ES86)L92!M97-S86=E(&-H96-KPH@("`@(PH@("`@(R!3970@=&AE -M(&YI8V4@=F%L=64@;V8@=&AE(&1A96UO;BP@=&AI6]U(&-A;B!S96QE8W0@8F5T=V5E -M;@H@("`@(R!24B!A;F0@1DE&3R!A;F0@=&AE('!R;V-EPH@("`@(R`@(%1Y<&4@1DE&3PH@("`@(R`@(%!R:6]R:71Y -M(#DY"B`@("`C('T*"B`@("`C"B`@("`C($YU;6)E2X*("`@(",@4F5A9"!S;VUE(&1O8W5M96YT -M2!K965P -M('-O;64@9&5A9"!E;G1R:65S(&-A8VAE9"!F;W(@<&]S7-L;V2!N86UE -M("AD865M;VX@*&1E9F%U;'0I(&]R(&QO8V%L,"XN-RD*("`@(",@1&5F875L -M=#H@;V9F"B`@("`C"B`@("!3>7-L;V<@;VX*"B`@("`C"B`@("`C($QO8VMF -M:6QE"B`@("`C"B`@("!,;V-K1FEL92`O=F%R+VQO8VLO8V]N;G1R86-K9"YL -M;V-K"@H@("`@(PH@("`@(R!5;FEX('-O8VME="!C;VYF:6=UF5-87A'&%M<&QE(&-O;F9I9W5R -M871I;VX@9FEL92!S971S('1H90H@("`@(R!S:7IE('1O(#(@34)Y=&5S('1O -M(&%V;VED('1H:7,@F4*("`@(",@:68@:70@9&5T96-T&EM=6T@8G5F9F5R('-I>F4@9W)O=W1H('1H870@8V%N(&)E(')E86-H -M960N(%1H:7,@97AA;7!L92!F:6QE"B`@("`C('-E=',@=&AE('-I>F4@=&\@ -M."!-0GET97,N"B`@("`C"B`@("!.971L:6YK0G5F9F5R4VEZ94UA>$=R;W=T -M:"`X,S@X-C`X"@H@("`@(PH@("`@(R!)9B!T:&4@9&%E;6]N(&1E=&5C=',@ -M=&AA="!.971L:6YK(&ES(&1R;W!P:6YG('-T871E+6-H86YG92!E=F5N=',L -M"B`@("`C(&ET(&%U=&]M871I8V%L;'D@6YC:')O -M;FEZ871I;VX@86=A:6YS="!T:&4@2V5R;F5L"B`@("`C(&%F=&5R(#,P('-E -M8V]N9',@*&1E9F%U;'0@=F%L=64I+B!297-Y;F-H6]U('=A;G0@6YC+B!4:&ES(&]P=&EO;B!I"!K97)N96P@/CT@ -M,BXV+C,Q+@H@("`@(PH@("`@(R!.971L:6YK179E;G1S4F5L:6%B;&4@3V9F -M"@H@("`@(PH@("`@(R!">2!D969A=6QT+"!T:&4@9&%E;6]N(')E8V5I=F5S -M('-T871E('5P9&%T97,@9F]L;&]W:6YG(&%N"B`@("`C(&5V96YT+61R:79E -M;B!M;V1E;"X@66]U(&-A;B!M;V1I9GD@=&AIF%T:6]N(&UO -M9&4L('1H92!P;VQL:6YG(&UO9&4@8V%N(&]N;'D@9W5AF5S('1H92!H86YD;&EN9R!O9B!S -M=&%T92UC:&%N9V4@979E;G1S(&-O;6EN9PH@("`@(R!F2`H:6X@ -M=&5R;7,@;V8*("`@(",@2!T:')E92!F:6QT97(M6]U(&-A;B!D969I;F4@=&AE(&5V -M96YT(&9I;'1E2!A=F]I -M9&EN9R!T:&4@8V]P>2!O9B!T:&4@979E;G0@;65S6]U(')E<75I"!K97)N96P@/CT@,BXV+C(Y('1O"B`@("`C -M(&9I;'1E6]U('=A;G0@=&\@PH@ -M("`@("`@(",*("`@("`@("`C($%C8V5P="!O;FQY(&-E65R(#0@<')O -M=&]C;VPN"B`@("`@("`@(PH@("`@("`@(%!R;W1O8V]L($%C8V5P="!["B`@ -M("`@("`@("`@(%1#4`H@("`@("`@("`@("!30U10"B`@("`@("`@("`@($1# -M0U`*("`@("`@("`@("`@5410"B`@("`@("`@("`@($E#35`@(R!4:&ES(')E -M<75I2!A;&P@=&AE"B`@("`@("`@(R!)4"!A -MPH@("`@("`@("`@ -M("!)4'8T7V%D9')E2!A;B!)4'8V(&%D9')E2!F;&]W('-T871E+@H@("`@("`@(",@5&AI -M2!B86-K=7`*("`@("`@("`C(&9I -M7!E/6YO=&EF>0H@("`@4WES=&5M9"!O;@I]"@`````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````!O<'0O8VQO=60O=&5M -M<&QA=&5S+V-H96-K7VAE87)T8F5A="YS:"YT96UP;``````````````````` -M````````````````````````````````````````````````````````,#`P -M,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7-T96UC=&P@2`M+69A=6QT"@H@("`@<&MI;&P@+3D@:V5E<&%L:79E9"`^/B`D4D]55$52 -M7TQ/1R`R/B8Q('Q\('1R=64*("`@('!K:6QL("TY(&-O;FYT&ET"F9I"@``````````````;W!T+V-L;W5D+W1E;7!L871E -M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI -M86YC90HC('=I=&@@=&AE($QI8V5N6]U -M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HA -M('=I=&@@=&AE($QI8V5NPH@("`@PH@("`@("`@(&AE87)T -M8F5A=`H@("`@?0H*("`@(&YO=&EF>5]B86-K=7`@(B]O<'0O8VQO=60O8FEN -M+VUA2`M+6)A8VMU<"(*("`@(&YO=&EF>5]M87-T97(@(B]O<'0O -M8VQO=60O8FEN+VUA2`M+6UA5]F875L -M="`B+V]P="]C;&]U9"]B:6XO;6%S=&5R+G!Y("TM9F%U;'0B"GT*```````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````!O<'0O8VQO=60O8FEN+P`````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````,#`P,#&4N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&ET(#$*?0H*&5?8V9G7V9I;&5N86UE(#P\14]&"D1%1D%53%0@ -M9&5F875L=`I04D]-4%0@,0I424U%3U54(#(V"D1)4U!,05D@8F]O="YMF4]-C8P,#`@:6YI=')D/21I;FET0`````````````````````````````````````````` -M````````````````````````````````````````````,#`P,#2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA -M=R!O'!R97-S(&]R(&EM<&QI960N -M("!3964@=&AE($QI8V5N7!E(ET@/3T@(G-T871I8VYA -M=')U;&5S(CH*("`@("`@("`@("`@;F5W7!E(ET@/3T@(F9O"`](&1B86=;"AF;W)W87)D*0H@("`@("`@("`@("`@("`@("`@(&EF(&YO -M="!I;F1E>"`]/2`M,3H*("`@("`@("`@("`@("`@("`@("`@("`@9&)A9UMS -M;W5R8V5?:7!=6VEN9&5X72`](&YE=W)U;&4*("`@("`@("`@("`@("`@("`@ -M("!E;'-E.@H@("`@("`@("`@("`@("`@("`@("`@("!D8F%G6W-O=7)C95]I -M<%TN87!P96YD*&YE=W)U;&4I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@ -M("`@("`@("`@("`@("`@(&1B86=;7!E(ET@/3T@ -M(G-T871I8VYA=')U;&5S(CH*("`@("`@("`@("`@("`@(&EF('-O=7)C95]I -M<"!I;B!D8F%G+FME>7,H*3H*("`@("`@("`@("`@("`@("`@("!D96P@9&)A -M9UMS;W5R8V5?:7!="B`@("`@("`@("`@(&5L:68@7,H*3H*("`@("`@("`@("`@("`@("`@("!I;F1E>"`] -M("TQ"B`@("`@("`@("`@("`@("`@("`@9F]R(&9O%T*"B`@("!R971U2!T:&4@<'5B;&EC('-I9&4L -M('1H;W-E(&UU7!E(ET@/3T@7!E(ET@/3T@(G-T871I -M8VYA="(Z"B`@("`@("`@2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET(#$*9FD*"G5S86=E*"D@ -M>PH@('!R:6YT9B`B57-A9V4Z("5S("U;8WQG?')\;GQD72!;+6P@/'!U8FQI -M8R!G871E=V%Y/ET@6RUV(#QV<&,@8VED&ET(#(@)&QO8VL@)&QO8VME9`H).SL*("!E -M&ET("0_("1L;V-K("1L;V-K960*9FD*"FEF -M(%L@(B1N9FQA9R(@/3T@(C$B(%T*=&AE;@H@("-G971?=G!N7W5S86=E"B`@ -M=6YL;V-K7V5X:70@)#\@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)&1F;&%G -M(B`]/2`B,2(@70IT:&5N"B`@(W)E;6]V95]U&ET(#`@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)')F;&%G(B`]/2`B -M,2(@70IT:&5N"B`@71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A -M=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&-E -M<'0@24]%2@I"B`@("`@("`@("`@ -M("`@("`@("`@9W5E22R)$;VU57U)E<75E&-E<'0@17AC97!T:6]N(&%S(&4Z -M"B`@("`@("`@("`@("`@("`@("`@;&]G9VEN9RYE7!E)UT@/3T@)V%L;"<@86YD(&]B:ELG -M7!E(#T@(F%N>2(*("`@("`@("`@("`@:68@(FEC -M;7!?='EP92(@:6X@7,H*2!A;F0@7!E)UT*("`@("`@("`@("`@:68@(FEC;7!? -M8V]D92(@:6X@7,H*2!A;F0@7!E)UTL('-E;&8N7!E("5S("UJ("5S(B`E("AI8VUP7W1Y<&4L('-E;&8N&5C=71E*&1S=$EP2==.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5; -M)V%C=&EO;B==(#T@(D%#0T505"(*("`@("`@("`@("`@("`@("`@("!E;'-E -M.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5;)V%C=&EO;B== -M(#T@(D123U`B"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ -M("`@("`@(",@1F]R(&]T:&5R(')U;&5S(&%D9&5D+"!I9B!D969A=6QT7V5G -M7!E("5S(B`E(&EC;7!?='EP90H@("`@("`@("`@("`@ -M("`@96QI9B!R=6QE6R=P7!E -M+B!3;RP@:71S(&9W(&%T=')I8G5T92!I7!E(#T@ -M(F%N>2(*("`@("`@("`@("`@("`@('-E;&8N<')O=&]C;VP@/2!S96QF+G1Y -M<&4*("`@("`@("`@("`@("`@(&EF(")I8VUP7W1Y<&4B(&EN(')U;&4N:V5Y -M7!E -M+"!R=6QE6R=I8VUP7V-O9&4G72D*("`@("`@("`@("`@("`@(&EF('-E;&8N -M='EP92`]/2`B<')O=&]C;VPB.@H@("`@("`@("`@("`@("`@("`@(&EF(')U -M;&5;)W!R;W1O8V]L)UT@/3T@-#$Z"B`@("`@("`@("`@("`@("`@("`@("`@ -M(')U;&5;)W!R;W1O8V]L)UT@/2`B:7!V-B(*("`@("`@("`@("`@("`@("`@ -M("!S96QF+G!R;W1O8V]L(#T@&5C=71E*")I<'1A -M8FQE+4$O:7!T86)L97,@+70@9FEL=&5R("U$+V&5C=71E*")I -M<'-E="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP -M&5C=71E*")I<'-E="`M -M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP2!V -M86QI9"!D871A"B`@("`@("`@("`@("`@("!I9B!F;VQD97(@(3T@(G5S97)D -M871A(B!A;F0@9F]L9&5R("$](")M971A9&%T82(Z"B`@("`@("`@("`@("`@ -M("`@("`@8V]N=&EN=64*"B`@("`@("`@("`@("`@("!I9B!F:6QE(#T]("(B -M.@H@("`@("`@("`@("`@("`@("`@(&-O;G1I;G5E"@H@("`@("`@("`@("`@ -M("`@7,N97AI="@Q*0H@("`@("`@("`@("!I9B!O2Q!;&QO=UQN1&5N>2!F2!E>&ES=',L('=E(&1O(&ET('1H:7,@ -M=V%Y(&9O7,N97AI="@Q -M*0H*("`@("`@("!F:"`](&]P96XH:'1A8V-E2`](")2 -M97=R:71E4G5L92!>;65T82UD871A+R@N*RDD("`N+B\B("L@9F]L9&5R("L@ -M(B\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%=(@H@("`@("`@("`@("!H -M=&%C8V5S7,N97AI="@Q*2`@ -M(R!&25A-10H@("`@("`@(')E='5R;B!4&ET*#$I("`C($9)6$U%"B`@("`@("`@:7!S96,N=G!N+2@N*BDN8V]N9B(L(&9I;&4I"B`@("`@ -M("`@("`@(&EF(&TZ"B`@("`@("`@("`@("`@("!S96QF+F-O;F9I<',N87!P -M96YD*&TN9W)O=7`H,2DI"@H@("`@("`@(&9O&5C=71E*")I<'-E -M8R!R96QO860B*0H*("`@(&1E9B!C;VYF:6=U#4R-2`M:B!!0T-%4%0B("4@9&5V72D*("`@ -M("`@("!F;W(@;F5T(&EN(&]B:ELG<&5E&UA&UA5]I<"=="B`@("`@("`@<&5E7!E/71U;FYE;"(I"B`@ -M("`@("`@9FEL92YA9&1E<2@B(&%U=&AB>3US96-R970B*0H@("`@("`@(&9I -M;&4N861D97$H(B!K97EE>&-H86YG93UI:V4B*0H@("`@("`@(&9I;&4N861D -M97$H(B!I:V4])7,B("4@:6ME<&]L:6-Y*0H@("`@("`@(&9I;&4N861D97$H -M(B!I:V5L:69E=&EM93TE3TS,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1T:6UE;W5T/3$R -M,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1A8W1I;VX]')A;F=E*#,I.@H@("`@("`@("`@("!R -M97-U;'0@/2!#&5C=71E*"=I<'-E8R!S=&%T=7,@=G!N+25S -M('P@9W)E<"`B)7,B)R`E("AR:6=H='!E97(L('!E97)L:7-T+G-P;&ET*"(L -M(BP@,2E;,%TI*0H@("`@("`@("`@("!I9B!L96XH2P@)R,G*0H@("`@("`@(&EF(&YO="!U&5C -M=71E*")T9&)D=6UP("]V87(O&5C=71E*"=K:6QL("TY("5S)R`E('!I9"D*"@IC;&%S&5C=71E*")S>7-T96UC=&P@2YS96-R971S(B`E("AS96QF+E903D-/3D9$25(I"B`@("`@ -M("`@>&PR='!D8V]N9F9I;&4@/2`B+V5T8R]X;#)T<&0O>&PR='!D+F-O;F8B -M"B`@("`@("`@>&PR='!O<'1I;VYS9FEL92`]("(O971C+W!P<"]O<'1I;VYS -M+GAL,G1P9"(*"B`@("`@("`@;&]C86QI<"`](&]B:ELG;&]C86Q?:7`G70H@ -M("`@("`@(&QO8V%L8VED2`Z(%!32R!<(B5S7"(B("4@*&QE9G0L('!S:RDI"B`@("`@ -M("`@&PR='!D8V]N9F9I;&4I"B`@("`@("`@>&PR='!D8V]N9BYA9&1E<2@B -M:7`@&PR='!O<'1I;VYS+F-O;6UI="@I"@H@("`@9&5F(')E;6]T96%C8V5S4EP*'-E;&8L(&EP82DZ"B`@("`@("`@9F]R(&EN -M=&5R9F%C92!I;B!S96QF+F-O;F9I9RYA9&1R97-S*"DN9V5T7VEN=&5R9F%C -M97,H*3H*("`@("`@("`@("`@:68@:6YT97)F86-E+FEP7VEN7W-U8FYE="AI -M<&$I.@H@("`@("`@("`@("`@("`@2@I"B`@("`@("`@4EP*')U -M;&5;)W!U8FQI8U]I<"==*0H@("`@("`@(&EN=&5R;F%L7V9W:6YT97)F86-E -M(#T@4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI"B`@ -M("`@("`@<'5B;&EC7V9W<&]R=',@/2!S96QF+G!O4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI+`H@ -M("`@("`@("`@("`@("`@&UA2(Z"B`@("`@("`@("`@(&9W7W!R97)O=71?2(Z"B`@("`@("`@ -M("`@(&9W7W!O2(Z"B`@("`@("`@("`@ -M(&9W7W!O2(Z"B`@("`@("`@ -M("`@(&9W7V]U='!U=%]R=6QE("L]("(@+2UD<&]R="`E2(Z"B`@("`@("`@("`@(&9W -M7V]U='!U=%]R=6QE("L]("(Z(B`K('-E;&8N<&]R='-4;U-T4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI -M+`H@("`@("`@("`@("`@("`@&9F9F9F9F9F("TM -M8W1M87-K(#!X9F9F9F9F9F8B("4*("`@("`@("`@("`@("`@("`@("`@("`@ -M4EP*')U;&5;(FEN=&5R;F%L7VEP -M(ETI+"!S96QF+F=E=$=U97-T27`H*2E=*0H*"F-L87-S($EP5&%B;&5S17AE -M8W5T;W(Z"@H@("`@8V]N9FEG(#T@3F]N90H*("`@(&1E9B!?7VEN:71?7RAS -M96QF+"!C;VYF:62!PR)P&5C=71OR)P&5C -M=71OR)P -M&5C=71O7!E.B`E&5C27!T86)L97,H8V]N9FEG*3H* -M("`@("`@("!L;V=G:6YG+F1E8G5G*")0&5C=71O7,H*3H*("`@("`@("`@("`@ -M97AE8T1A=&%B86&5C27!T -M86)L97,H8V]N9FEG*0H@("`@96QI9B!J&5C27!T86)L97,H -M8V]N9FEG*0H@("`@96QS93H*("`@("`@("!L;V=G:6YG+G=A7!E/25S(B`E("AP6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7)I9VAT(&]W;F5R6]U('5N9&5R('1H -M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C -M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7)I -M9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT -M='`Z+R]W=W&5C=71I;F'!O2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&QO9V=E -M&ET(#(@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)$%F;&%G(B`] -M/2`B,2(@70IT:&5N"B`@861D7W-N870@("1P=6)L:6-)<`H@('5N;&]C:U]E -M>&ET("0_("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1$9FQA9R(@/3T@(C$B -M(%T*=&AE;@H@(')E;6]V95]S870@("1P=6)L:6-)<`H@('5N;&]C:U]E>&ET -M("0_("1L;V-K("1L;V-K960*9FD*"G5N;&]C:U]E>&ET(#$@)&QO8VL@)&QO -M8VME9`H````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````````````````;W!T+V-L -M;W5D+V)I;B]V<&-?2!O9B!T:&4@3&EC96YS92!A=`HC"B,@ -M("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE -M($QI8V5N5]T86)L92@I('L*("!L;V-A;"!F5]T86)L92`B -MPH@(&QO8V%L(')U -M;&4])#$*("!L;V-A;"!I<#TD*&5C:&\@)')U;&4@?"!C=70@+60Z("UF,2D* -M("!I9B!;("1I<"`]/2`B4F5V;VME(B!="B`@=&AE;@H@("`@3TD9V%T97=A>2!C:61R/21C -M:61R(@H@(&QO8V%L(&1E=CTD*&=E=$5T:$)Y27`@)&EP*0H@(&EF(%L@)#\@ -M+6=T(#`@70H@('1H96X*("`@(')E='5R;B`Q"B`@9FD*("!S=61O(&EP(')O -M=71E(&%D9"`D8VED3TD9V%T97=A>2!C:61R/21C:61R(@H@ -M(')E='5R;B`D&ET(#(@)&QO8VL@)&QO8VME -M9`H@("`@("`@(#L["B`@97-A8PID;VYE"@II9B!;("UN("(D6EN9R!F=R!R=6QE -M&ET("1S=6-C97-S("1L;V-K("1L;V-K960*```````` -M``````````````````````````````!O<'0O8VQO=60O8FEN+V)A0`````````````````````````````````````````````````` -M````````````````````````````````````````````,#`P,#7)I9VAT(&]W;F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* -M(R`@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI -M8V5N&5C=71A8FQE/2&-E<'1I;VX@86YD('-E;&8N<')O8V5S&5C=71E('-H96QL(&-O;6UA;F0Z("5S -M)R`E('-E;&8N8VUD*0H@("`@("`@("`@("!E2<@:6X@<#H*("`@ -M("`@("`@("`@("`@("`@("`@("`@&-E<'1I;VXH)V-A;FYO="!F:6YD(&)A2!I;B`E&-E<'1I;VXH)V-A;FYO="!F:6YD -M(&AO2P@PH@("`@("`@("`@("`B87!I2V5Y(CH@87!I:V5Y+`H@ -M("`@("`@("`@("`B8V]M;6%N9"(Z("=N;W1I9GE"87)E;65T86Q07,H*2P@4)A3TE2P@5]P2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ -M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&EP=&%B;&5S -M+7-A=F5\9W)E<"`B24Y0550@+6H@3D545T]22U]35$%44R(@/B`O9&5V+VYU -M;&P*("!I9B!;("0_("UE<2`P(%T*("!T:&5N"B`@("`@(')E='5R;B`D/PH@ -M(&9I"B`@:7!T86)L97,@+4X@3D545T]22U]35$%44R`^("]D978O;G5L;`H@ -M(&EP=&%B;&5S("U)($9/4E=!4D0@+6H@3D545T]22U]35$%44R`^("]D978O -M;G5L;`H@(&EP=&%B;&5S("U)($E.4%54("UJ($Y%5%=/4DM?4U1!5%,@/B`O -M9&5V+VYU;&P*("!I<'1A8FQEPH@(&EP=&%B -M;&5S("U,($Y%5%=/4DM?4U1!5%,@+6X@+78@+7@@?"!A=VL@)R0Q('X@+UY; -M,"TY72LD+R![('!R:6YT9B`B)7,Z(BP@)#)])SL@/B`O9&5V+VYU;&P*("!I -M9B!;("UF("]R;V]T+W)E;6]V9616:69S(%T@.R!T:&5N(&EP=&%B;&5S("U: -M($Y%5%=/4DM?4U1!5%,@.R!F:3L@/B`O9&5V+VYU;&P*("`O&ET("0_("1L;V-K("1L -M;V-K960*9FD*"FEF(%L@(B1A9FQA9R(@/3T@(C$B(%T*=&AE;@H@("-A9&1? -M<'5B;&EC7VEN=&5R9F%C92`D<'5B;&EC268*("!U;FQO8VM?97AI="`D/R`D -M;&]C:R`D;&]C:V5D"F9I"@II9B!;("(D9&9L867)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&ET(#$*9FD*"G-E="`M>`IU2(*"FEF(%L@)#\@+65Q(#`@70IT:&5N -M"B`@("!T/6!D871E("LE2(*:68@6R`D/R`M;F4@ -M,"!="B`@('1H96X*("`@("`@*&-R;VYT86(@+6P@.V5C:&\@+64@(B-M;VYI -M=&]R:6YG0V]N9FEG7&Y32$5,3#TO8FEN+V)A2(I('P@8W)O;G1A8B`M"B`@("`@(&QO9V=E2!F;W(@;6]N:71O6]U(&UA>2!N;W0@=7-E('1H:7,@ -M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NWT*("`@(&9OF4G72`]('-T&QE;BD*("`@(&EF("=N=U]T>7!E)R!N;W0@:6X@:7`N:V5Y7!E)UT@/2`G<'5B;&EC)PH@("`@96QS93H* -M("`@("`@("!I<%LG;G=?='EP92==(#T@:7!;)VYW7W1Y<&4G72YL;W=E7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C -M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F -M('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5LP77T*"B`@("`@("`@("`@ -M("`@("!T;T1A=&5686P])"AD871E("UD("(D9&%T979A;"(@(BLE7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z -M+R]W=W0IE:F5C -M="!\?"!T0IS>7-T96UC=&P@7-T96UD+6IO=7)N -M86QD"@I465!%/20H9W)E<"`M4&\@)W1Y<&4]7$M;82UZ02U:72HG("]V87(O -M8V%C:&4O8VQO=60O8VUD;&EN92D*:68@6R`B)%194$4B(#T](")R;W5T97(B -M(%T@?'P@6R`B)%194$4B(#T](")V<&-R;W5T97(B(%T@?'P@6R`B)%194$4B -M(#T](")D:&-P"`O;W!T+V-L;W5D+V)I -M;B]U<&1A=&5?8V]N9FEG+G!Y(%T*("!T:&5N"B`@("`O;W!T+V-L;W5D+V)I -M;B]U<&1A=&5?8V]N9FEG+G!Y(&-M9%]L:6YE+FIS;VX@?'P@=')U90H@(&9I -M"F9I"@I;("$@+68@+W9A7-T96UD+W-S:&0@;65M;W)Y(&QE86L@+2!H='1P7-T96UD+VES7-T -M96UD+75S97(*"B,@16YA8FQE(&%N9"!3=&%R="!34T@*7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R -M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T -M"B,*(R`@(&AT='`Z+R]W=W2!S=&]R86=E('-Y7`])$A94$525DE33U(*("!I9B!; -M("(D:'EP(B`]/2`B=FUW87)E(B!=('Q\(%L@(B1H>7`B(#T](")H>7!E5]H='1P"B`@83)E;FUO9"!H96%D97)S"@H@(&-A="`^+V5T8R]A -M<&%C:&4R+V-OTA45%!3?2`];VX*4F5W7,@"UR97%U97-T960M=VET:"P@0V]N=&5N="U4 -M>7!E+"!O6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I -M="`B4V5T=&EN9R!U<"!);G1E&5C=71E(&EL8G9M('-V8W,B"B`@97AI="`Q"F9I"G-E -M='5P7VEL8G9M"@`````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````!O<'0O8VQO=60O8FEN+W-E='5P+W9P8W)O=71E2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N7-T96T@=FTB"@H@(&EF(%L@+68@ -M+V5T8R]H;W-TB`D1$]-04E.(%T@)B8@ -M1$]-04E./2)C;&]U9&YI;F4N:6YT97)N86PB"B`@(T1.4R!S97)V97(@=VEL -M;"!A<'!E;F0@)$1/34%)3B!T;R!L;V-A;"!Q=65R:65S"B`@6R-=*FQO8V%L/2XJ)"]L;V-A;#U<+R1$3TU!24Y< -M+R\B("]E=&,O9&YS;6%S<2YC;VYF"@H@(&-O;6UA;F0@+78@9&AC<%]R96QE -M87-E(#X@+V1E=B]N=6QL(#(^)C$*("!N;U]D:&-P7W)E;&5A&ET(#$*9FD*2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&EF(%L@(B1(65!%4E9)4T]2(B`A/2`B=FUW87)E(B!=.R!T:&5N -M"B`@("!R971U6YC"B`@2]L;V=R;W1A=&4@+V5T8R]C2`R/B8Q"B`@9FD*?0H*6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ -M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I="`B -M4V5T=&EN9R!U<"!%;&%S=&EC($QO860@0F%L86YC97(@7)I9VAT(&]W;F5R6]U('5N9&5R('1H -M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C -M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7!EPH@(&EF(%L@+60@+W!R;V,O>&5N(%T[('1H96X*("`@ -M(&UO=6YT("UT('AE;F9S(&YO;F4@+W!R;V,O>&5N"B`@("`D*&1M97-G('P@ -M9W)E<"`M<2`B6&5N($A632(I"B`@("!I9B!;("0_("UE<2`P(%T[('1H96X@ -M(",@,3U05BPP/4A630H@("`@("!E8VAO(")X96XM:'9M(B`F)B!R971UF5D(&%S($AY -M<&5R=B!W:&5N(%9IPH@(%L@(2`M9"`O<')O -M8R]X96X@72`F)B!S960@+6D@)W,O7G9C+R-V8R\G("]E=&,O:6YI='1A8B`F -M)B!T96QI;FET('$*("!;("UD("]P -M(W9C+W9C+R<@+V5T8R]I;FET=&%B("8F('1E;&EN:70@<0H*("!S>7-T96UC -M=&P@9&%E;6]N+7)E;&]A9`H*("!C87-E("1(65!%4E9)4T]2(&EN"B`@("`@ -M>&5N+7!V?'AE;BUD;VU5*0H@("`@("`@("`@7-T -M96UC=&P@7-T96UC=&P@9&ES86)L92!N -M='!D"B`@("`@("`@("!S>7-T96UC=&P@96YA8FQE('AE+61A96UO;@H@("`@ -M("`@("`@&5N=&]O;',@;F]T(&EN7Q#3TY&24=? -M2$]44$Q51U]00TE?04-023UY)R`O8F]O="]C;VYF:62`M -M3"`Q,34R,#`@='1Y4S`@=G0Q,#(B("]E=&,O:6YI='1A8@H@("`@("`@("`@ -M7-T96UC=&P@2!C;61L -M:6YE(&9I;&4@9G)O;2!Q96UU+6=U97-T+6%G96YT(@H@("`@("`@("`@("`@ -M(&)R96%K"B`@("`@("`@("`@(&9I"B`@("`@("`@("`@('-L965P(#$*("`@ -M("`@("`@(&1O;F4*("`@("`@("`@(&EF(%L@(2`M7-T96T@=&EM92!S>6YC)V0@=VET:"!H;W-T('9I82!V;7=AF5D -M(&%S('9I7!E7!E -M65S+"!H86-K>2$I"B`@("`@ -M("`@("!D;6ED96-O9&4@?"!G2(*("`@("`@("`@(&9I"B`@("`@("`@("`[.PH@(&5S86,*"B`@ -M(R!&:6YD(&%N9"!E>'!O7-T96UV;2@I('L*("!L;V-A;"!P871C:&9I;&4])#$*("!L;V-A;"!B -M86-K=7!F;VQD97(](B]T;7`O+F-O;F8N8F%C:W5P(@H@(&QO8V%L(&QO9V9I -M;&4](B]V87(O;&]G+W!A=&-H7-T96UV;2]C;VYF+V-L;W5D+FIK7-T96UV;2]C -M;VYF+RH@)&)A8VMU<&9O;&1E7-T96UV;0H@(&5C:&\@(D%L;"(@?"!U;GII<"`D<&%T8VAF:6QE("UD("]U -M&%R -M9W,@8VAM;V0@-34U"B`@:68@6R`M9B`D8F%C:W5P9F]L9&5R+V-L;W5D+FIK -M7-T96UV;2]C;VYF+PH@("`@96-H;R`B4F5S=&]R960@:V5Y -M7-T;W)E"B`@ -M:V5Y=&]O;"`M:6UP;W)T:V5Y7-T;W)E("]E=&,O7-T;W)E("]UU!!5$-(7TU/54Y4?2]A9V5N="YZ:7`@72`F)B!; -M("UF("]V87(O8V%C:&4O8VQO=60O<&%T8V@N7!E/21465!%(B`^/B`D -M;&]G9FEL90H@("`@<&%T8VA?FEP"B`@("!I9B!;("0_("UG="`P(%T*("`@('1H96X*("`@("`@96-H -M;R`B1F%I;&5D('1O(&%P<&QY('!A=&-H('-Y7-T -M96UD+W-Y365M.B][<')I;G0@)#)])RD*("!I9B!;("0H*'!H>7-M -M96TI*2`M;'0@-#`Y-C`P(%T[('1H96X*("`@("`@6YC"B`@'!O7!E&ET(#$P"B`@;&]G7VET(")3=&%R=&EN9R!G=65S="!S97)V:6-E2YS:``````````` -M```````````````````````````````````````````````````````````` -M````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@ -M("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE -M($QI8V5NPH@(&QO9U]I="`B4V5T=&EN9R!U<"!C;VYS -M;VQE('!R;WAY('-Y'D@+V5T8R]I<'1A8FQE'D*```````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````````````````````;W!T -M+V-L;W5D+V)I;B]S971U<"]C;VUM;VXN6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5]M86-S*"D@>PH@("`@;6%CS,Z+2(O971C+W5D978OV%D9')E5]M86-S("(D -M3DE#7TU!0U,B"B`@9FD*?0H*PH@(&QO8V%L -M(&EN=&9N=6T])#$*("!L;V-A;"!I<#TD,@H@(&QO8V%L(&UAVEN=&9N=6U]"B`@;&]C86P@8F]O='!R;W1O/2)S=&%T:6,B"@H@(&EF(%L@ -M(B1"3T]44%)/5$\B(#T](")D:&-P(B!="B`@=&AE;@H@("`@:68@6R`B)&EN -M=&9N=6TB("$]("(P(B!="B`@("!T:&5N"B`@("`@("!B;V]T<')O=&\](F1H -M8W`B"B`@("!F:0H@(&9I"@H@(&EF(%L@(B1I<"(@(3T@(C`N,"XP+C`B("UA -M("(D:7`B("$]("(B("UO("(D9F]R8V4B(#T](")F;W)C92(@70H@('1H96X* -M("`@("!E8VAO(")I9F%C92`@)&EN=&8@:6YE="`D8F]O='!R;W1O(B`^/B`O -M971C+VYE='=O7-C=&P@;F5T+FEP -M=C8N8V]N9BYA;&PN9&ES86)L95]I<'8V/3`*("!S>7-C=&P@;F5T+FEP=C8N -M8V]N9BYA;&PN9F]R=V%R9&EN9STQ"B`@7,O;F5T+VEP=C0O:7!?9F]R=V%R9`H@(%L@+68@+V5T -M8R]I<'1A8FQE7,O;F5T+VEP=C0O8V]N9B]D969A=6QT+W)P7V9I;'1E -M<@H@("`@("!F;W(@=FEF(&EN("16249?3$E35#L@9&\*("`@("`@("`@;&]G -M7VET(")C;&]U9#H@9&ES86)L92!R<%]F:6QT97(@;VX@<'5B;&EC(&EN=&5R -M9F%C93H@)'9I9B(*("`@("`@("`@7,O;F5T -M+VEP=C0O8V]N9B]L;R]R<%]F:6QT97(*?0H*96YA8FQE7VER<6)A;&%N8V4H -M*2!["B`@;&]C86P@96YA8FQE9#TD,0H@(&QO8V%L('!R;V,],`H*("!PPH@ -M(&QO8V%L(&5N86)L93TD,0H*("!I9B!;("1E;F%B;&4@+65Q(#`@70H@('1H -M96X*("`@("`@96-H;R`P(#X@+V5T8R]R<'-R9G-E;F%B;&4*("`@("`@#TD*'!R:6YT9B`B)7A<;B(@)&YU;2D*("!E8VAO("1H97@["B`@(V5N -M86)L92!R<',*("!E8VAO("1H97@@/B`O"TP+W)P7,O;F5T+V-OPH@(&EN:71?:6YT97)F86-EB`B)&=W9&5V -M(B!="B`@("!T:&5N"B`@("`@(&=W9&5V/2)E=&@P(@H@("`@9FD*"B`@("!I -M<"!R;W5T92!A9&0@9&5F875L="!V:6$@)$=7(&1E=B`D9W=D978*("!F:0H* -M("`C(%=OW!R:6YT("0Q(BXB)#(B+B(D,R(N,2)])RD*("`@("`@=&EM -M96]U="`S('!I;F<@+6X@+6,@,R`D34=-5%]'5R`F"B`@9FD*"B`@:68@6R`B -M)$A94$525DE33U(B(#T](")V;7=A6YC -M(&5N86)L90H@(&9I"GT*"G-E='5P7V1NB`D1$]-04E.(%T@)B8@1$]-04E./2)C -M;&]U9&YI;F4N:6YT97)N86PB"B`@(W)E;6]V:6YG('1H92!D;G-M87-Q(&UU -M;'1I<&QE(')A;F=E6R-=*FQO8V%L/2XJ -M)"]L;V-A;#U<+R1$3TU!24Y<+R\B("]E=&,O9&YS;6%S<2YC;VYF"B`@9FD* -M"B`@:68@6R`M;B`@(B1$3E-?4T5!4D-(7T]21$52(B!="B`@=&AE;@H@("`@ -M("!S960@+6D@+64@(B]>6R-=*F1H8W`M;W!T:6]N+BH],3$Y+BHD+V0B("]E -M=&,O9&YS;6%S<2YC;VYF"B`@("`@(&5C:&\@(F1H8W`M;W!T:6]N+69O9&AC<"UR86YG95]I<#0]+BHD+V1H8W`M9&AC<"UR86YG95]I<#8]+BHD+V1H8W`M -M6R-=*F1H8W`M;W!T:6]N/6]P=&EO;CIR;W5T97(N*B0O -M9"(@+V5T8R]D;G-M87-Q+F-O;F8*("!;("1$149!54Q47T=7(%T@)B8@96-H -M;R`B9&AC<"UO<'1I;VX];W!T:6]N.G)O=71E6R-=*F1H8W`M;W!T:6]N/6]P=&EO -M;C8Z9&YS+7-EB`B)$542#!?25`V(B!="B`@=&AE;@H@ -M("`@("!E8VAO(#$@/B`O=F%R+V-A8VAE+V-L;W5D+V1N;&5A7-T96UC=&P@9&ES86)L92!A<&%C:&4R"B`@8VQE86Y?:7!A;&EA -M&%M<&QE+F-O;F8*("!R -M;2`M9B`O971C+V%P86-H93(O26YC;'5D92!P;W)T2!0 -M>71H;VX@0W-!<'`@8V]N9FEG7&XC26YC;'5D92!P;W)T&5S -M($UU;'1I5FEE=W,B+R)/<'1I;VYS("U);F1E>&5S($UU;'1I5FEE=W,B+R`O -M971C+V%P86-H93(O;6]D&5S(B`^("]V87(O=W=W+VAT;6PO+FAT86-C97-S -M"GT*"G-E='5P7V%P86-H93(H*2!["B`@;&]G7VET(")3971T:6YG('5P(&%P -M86-H92!W96(@2!A;F0@;F]T('=OPH@('!U8FQI8U]I<#TD151(,E])4`H@(%L@(B1%5$@R7TE0(B`] -M/2`B,"XP+C`N,"(@72`F)B!P=6)L:6-?:7`])$542#%?25`*("!E8VAO("1P -M=6)L:6-?:7`*?0H*PH@("`@;&]G7VET(")3971T:6YG -M('5P($Y44"(*("`@($Y44%]#3TY&7T9)3$4](B]E=&,O;G1P+F-O;F8B"B`@ -M("!I9B!;("UF("1.5%!?0T].1E]&24Q%(%T*("`@('1H96X*("`@("`@("!) -M1E,])RPG(')E860@+6$@R-S97)V97)?;&ES=%M` -M77TM,2`[(&ET97)A=&]R/CTP(#L@:71E2!A<&%C:&4R -M(B`^("]V87(O8V%C:&4O8VQO=60O96YA8FQE9%]S=F-S"B`@(&5C:&\@(F-L -M;W5D(&YFT-(149?5$U0 -M7T9)3$5]"B`@("`@($-/34U!/2(L7&Y<="(*("`@("`@8V%S92`D2T59(&EN -M"B`@("`@("`@9&ES86)L95]R<%]F:6QT97(I"B`@("`@("`@("`@(&5X<&]R -M="!$25-!0DQ%7U)07T9)3%1%4CTD5D%,544*("`@("`@("`@("`@.SL*("`@ -M("`@("!E=&@P:7`I"B`@("`@("`@("`@(&5X<&]R="!%5$@P7TE0/21604Q5 -M10H@("`@("`@("`@("`[.PH@("`@("`@(&5T:#%I<"D*("`@("`@("`@("`@ -M97AP;W)T($542#%?25`])%9!3%5%"B`@("`@("`@("`@(#L["B`@("`@("`@ -M971H,FEP*0H@("`@("`@("`@("!E>'!O'!O'!O'!O'!O'!O'!O'!O -M'!O'!O'!O -MF4I"B`@("`@("`@("`@(&5X<&]R="!'54535%]#24127U-) -M6D4])%9!3%5%"B`@("`@("`@("`@(#L["B`@("`@("`@'!O'!O -M'!O'!OF4@8VQO=60@<&%S2!S"(B(%T*("!T:&5N"B`@("!E8VAO(")R;V]T.B1635]005-35T]21"(@?"!C -M:'!A6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I="`B4V5T=&EN9R!U<"!D:&-P('-E7-T96T@ -M=FTB"B`@2!A;&QO=R!$3E,@&5C=71E(&1H8W!S7)I9VAT(&]W -M;F5R6]U -M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O -M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W -M=WPH@ -M(&5C:&\@(B0H9&%T92D@)$`B(#X^("]V87(O;&]G+V-L;W5D+FQO9PH@(&QO -M9U]A8W1I;VY?;7-G("(D0"(*?0H*<&%T8V@H*2!["B`@;&]C86P@4$%40TA? -M34]53E0]+VUE9&EA+V-D@H@(&QO8V%L('!R:79K97D])%!!5$-( -M7TU/54Y4+V%U=&AOVUD-69I;&5]*0H@("`@;&]C -M86P@;F5W;60U/0H@("`@6R`M9B`D>W!A=&-H9FEL97T@72`F)B!N97=M9#4] -M)"AM9#5S=6T@)'MP871C:&9I;&5]('P@87=K("=[<')I;G0@)#%])RD*"B`@ -M("!L;V=?:70@(E-CW!A=&-H9FEL97T@72`F)B!;("(D;F5W -M;60U(B`A/2`B(B!="B`@("!T:&5N"B`@("`@('1AF8@)'!A=&-H9FEL -M92`M0R`O"B`@("`@(&5C:&\@)'MN97=M9#5](#X@)'MM9#5F:6QE?0H@("`@ -M("!L;V=?:70@(E!A=&-H960@2`OF5D7VME>7,*("`@(&9I"B`@9FD*"B`@&5C=71I;F<@8VQO=60M96%R -M;'DM8V]N9FEG(@H*("`C($-L96%R("]T;7`@9F]R(&9I;&4@;&]C:PH@(')M -M("UF("]T;7`O*BYL;V-K"B`@6]U -M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC -M('=I=&@@=&AE($QI8V5N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&5N2!T;R!E;G-U'D@:6X@=&AE(')O -M=71I;F<@9&]M86EN"G)E8V]N9FEG7VQB*"D@>PH@(&QO9V=E'D@=&\@<')E=FEO=7,@ -M'DN8V9G+F]L9"`O971C+VAA<')O>'DO:&%P -M2YC9F'DN8V9G+FYE=PH@(&9I"GT*"F=E=%]V -M:69?;&ES="@I('L*("!L;V-A;"!V:69?;&ES=#TB(@H@(&9O7,O8VQA7!E(&]R('!A7!E(&]R('!A2!R96-E -M:79E2!F:7)E=V%L;"!R=6QE2!C;VYF:67!E(&]R('!A2!O -M9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI -M8V5N0H*"F1E9B!M -M97)G92AD8F%G+"!D871A*3H*("`@(&1B86=C(#T@8V]P>2YD965P8V]P>2AD -M8F%G*0H*("`@('!R:6YT(&1B86<*("`@('!R:6YT(&1A=&$*("`@(&EF(")V -M<&Y?=7-E7,H*3H*("`@("`@("!I -M9B!U7,H*2!A;F0@;F]T -M(&%D9#H*("`@("`@("`@("`@9&)A9V-;=7-E6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2D*("`@("`@("`@("`@9&%T82YU -M<&1A=&4H>R)I9"(Z('-E;&8N:V5Y?2D*("`@("`@("!F:6YA;&QY.@H@("`@ -M("`@("`@("!S96QF+F1B86<@/2!D871A"@H@("`@9&5F('-A=F4H2D* -M("`@("`@("`@("`@("`@(&IS;VXN9'5M<"@*("`@("`@("`@("`@("`@("`@ -M("!D8F%G+"!?9F@L"B`@("`@("`@("`@("`@("`@("`@&-E<'0@24]%2`](&ME>0H*"F-L87-S('5P9&%T941A=&%"867!E(#T]("=M;VYI=&]R22AS96QF -M+F1B+F=E=$1A=&%"867!E(#T]("=V<&YU7!E(#T]("=I<&%L:6%S -M97,G.@H@("`@("`@("`@("!S96QF+F1B+G-E=$ME>2@G:7!S)RD*("`@("`@ -M("`@("`@7!E*0H@("`@("`@("`@("!R971U -M2=="B`@ -M("`@("`@9'!;)VYI8U]D979?:60G72`](&1;)V1E=FEC92==6S,Z70H@("`@ -M("`@(&1P6R=N=U]T>7!E)UT@/2`G9W5E4AA8VLN=7!D871E7VYE='=OR=I<%]A9&1R97-S)SH@6V1P72P@)W1Y<&4G.B`G -M:7!S)WTI"B`@("`@("`@:68@)V1O;6%I;E]N86UE)R!N;W0@:6X@9"YK97ES -M*"D@;W(@9%LG9&]M86EN7VYA;64G72`]/2`G)SH*("`@("`@("`@("`@9%LG -M9&]M86EN7VYA;64G72`](")C;&]U9&YI;F4N:6YT97)N86PB"@H@("`@("`@ -M(&0@/2!04AA8VLN=7!D871E7VYE='=O2AS96QF+"!D8F%G*3H*("`@("`@("!R971U2`]("=E=&@G("L@;G5M("L@)VEP)PH@("`@("`@(&1P(#T@>WT*("`@("`@ -M("!I9BAK97D@:6X@5T*("`@("`@("`@("`@9'!;)VYE=&UA7!E(#T] -M(")P=6)L:6,B.@H@("`@("`@("`@("`@("`@9'!;)V=A=&5W87DG72`]('-E -M;&8N<49I;&4N9&%T85LG8VUD7VQI;F4G75LG9V%T97=A>2=="B`@("`@("`@ -M("`@(&5L2==(#T@7!E)SH@)VEP -M2!T;R!D96%L('=I=&@@=&AIPH@("`@("`@("`@("`@("`@ -M)V%D9"7!E(#T@7!E(ET*("`@("`@("`@("`@=7!D871E1&%T84)A9RAS96QF*0H@ -M("`@("`@("`@("!R971U&-E<'1I;VX@97)R;W(@)WMEV9I;&5N86UE?22!B965N(&UO=F5D+B(N9F]R;6%T*&5RV9I;&5N86UE?27!E"@H@("`@9&5F(&=E=$1A=&$HB(*("`@("`@("!W:71H(&]P96XH -M;W)I9U!A=&@L("=R8B7,H*2!E;'-E(&1A -M=&%;)W!U8FQI8U]I<"=="@H@("`@("`@(&EN:71I86Q?9&%T82`](&-L5]I<"AI<"P@:6YI=&EA;%]D871A6R=C;VYF -M:62<@:6X@9&)A9ULG8V]N9FEG)UTN -M:V5Y5]I<"AC;',L(&EP+"!P5]I -M<"`]($9A;'-E"B`@("`@("`@:68@:7`@/3T@<')I=F%T95]G871E=V%Y7VEP -M.@H@("`@("`@("`@("!N97=?:7!?;6%T8VAE5]I<`H*("`@($!C;&%S0`````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````,#`P,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL -M92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2!S=&%T=7,*"F9R;VT@8W,N0W-#;VYF:6<@:6UP;W)T($-S -M0V]N9FEG"F9R;VT@;W!T<&%R7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R -M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T -M"B,*(R`@(&AT='`Z+R]W=WB`D,2!="G1H96X*("`@(&5C:&\@(D9A:6P@ -M=&\@9FEN9"!64$X@<&5E7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2`]('9P;ELG=G!N7W-E2!I;B!D -M8F%G+FME>7,H*2!A;F0@;F]T(&]P.@H@("`@("`@(&1E;"AD8F%G6VME>5TI -M"B`@("!E;'-E.@H@("`@("`@(&1B86=;:V5Y72`]('9P;@H@("`@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H -M='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI -M8V5N2`] -M(')O=71E6R=N971W;W)K)UT*("`@("`@("!D8F%G6VME>5T@/2!R;W5T90H@ -M("`@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R -M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T -M"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ -M=&AE($QI8V5N2`]('9P -M;ELG<&5E71H;VX*(R!, -M:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%3 -M1BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS -M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E -M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!F$EN"@H*<&%S&ES=',H9V5T5&]K96Y&:6QE*"DI.@H@("`@("`@('=I=&@@;W!E -M;BAG9714;VME;D9I;&4H*2P@)W(G*2!A2P@=F%L -M=64@/2!L:6YE+G-T7!E(#T@ -M7!E(#T]("=S96YD7VUY7W!A7-L;V7-L;V7-L;V7-L;V2!I -M<"]P87-S=V]R9%LE7-L;V7-L;V&-E<'0@2V5Y8F]A&-E<'1I -M;VXL(&4Z"B`@("`@("`@0`````````````````````````````````` -M`````````````````````````````````````````````````````````#`P -M,#`W-34`,#`P,36]U -M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC -M('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E -M<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NFEP7V9I;&4B"B`@("!E -M8VAO(")$96QE=&EN9R!D:6%G;F]S=&ECFEP7V9I;&4B -M"F5L6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ -M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N0H*"F1E9B!M97)G92AD8F%G+"!D871A*3H*("`@("(B(B!3:6UP;'D@ -M;W9E&ES='-I;F<@8F%G(&%S+"!T:&4@=VAO;&4@8V]N -M9FEG=7)A=&EO;B!I2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N4EP("@I -M>PH@(&QO8V%L(&EP/20Q"B`@9F]R(&1E=B!I;B!@;',@+3$@+W-Y6]U(&UA>2!N;W0@=7-E('1H -M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N -MWT*("`@("`@("!S96QF+F-H86YG960@/2!;70H@("`@("`@('-E -M;&8N9&5V:6YF;R`]($-S2&5L<&5R+F=E=%]D979I8V5?:6YF;R@I"B`@("`@ -M("`@2@I"B`@("`@("`@("`@(&5L2=="B`@("`@ -M("`@("`@('-L:6YE(#T@(F1H8W`M"P@:7`I"B`@("`@("`@("`@('-E;&8N -M8V]N9BYS96%R8V@H2D*("`@("`@("`@("`@ -M96QS93H*("`@("`@("`@("`@("`@(&QI&-E -M<'0@17AC97!T:6]N(&%S(&4Z"B`@("`@("`@("`@(&QO9V=I;F2!C;VYT2!R96-E:79E($1(0U!.04LN"B`@("`@ -M("`@(R!7:&5N(%9-(&ES(&5X<'5N9V5D+"!I=',@86-T:79E(&QE87-E(&%N -M9"!$2$-0+T1.4R!C;VYF:6<@:7,@<')O<&5R;'D@5LG;6%C7V%D9')E5LG9&5F875L=%]G871E=V%Y -M)UT*"B`@("!D968@861D7VAO6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7!E2`]($9A;'-E"B`@("`@("`@ -M9&5V(#T@)R<*("`@("`@("!F;W(@:6YT97)F86-E(&EN(&EN=&5R9F%C97,Z -M"B`@("`@("`@("`@(&EF(&1E=B`]/2!I;G1E&5C=71E*&-O;6UA;F0I"B`@("`@("`@("`@("`@("!I9B!D9795<#H*("`@ -M("`@("`@("`@("`@("`@("!L;V=G:6YG+FEN9F\H(D1E=FEC92`E65T+"!L970G -M5]I9E]N965D960H"B`@ -M("`@("`@("`@("`@("`B)7,O)7,B("4@*'-E;&8N0U-?5$5-4$Q!5$537T1) -M4BP@5]I9E]N965D960H"B`@("`@("`@("`@("(E -M&5C("1$045-3TX[+RTM97AE8R`D1$%%34].("TM("TM=G)R<#LO9R(@+V5T -M8R]I;FET+F0O:V5E<&%L:79E9"R(L(")] -M(BP@R(L(")](BP@6PH@("`@("`@("`@("`@("`@("`@ -M("`@(DE0=C1?861D&5C=71E*")R;2`M2`S,"!S96-O;F1S"B`@("`@("`@:&5A&ET:6YG -M(B`E("AE&5C=71E -M*"(E&PR='!D -M(BP@(G-T;W`B*0H@("`@("`@($-S2&5L<&5R+G-E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I -M<"@I*2YS=&]P*"D*"B`@("`@("`@&5C=71E*&-M9#(I"B`@("`@("`@("`@(&1E=B`] -M(&EN=&5R9F%C92YG971?9&5V:6-E*"D*"B`@("`@("`@8VUD(#T@(B5S("U# -M("5S(B`E("AS96QF+D-/3DY44D%#2T1?0DE.+"!S96QF+D-/3DY44D%#2T1? -M0T].1BD*("`@("`@("!#&5C=71E*"(E&PR='!D(BP@(G-T;W`B*0H*("`@ -M("`@("!I;G1E&5C=71E*&-M9"D*("`@("`@("`@("`@("`@(&QO9V=I -M;F2D*("`@("`@("`@ -M("`@("`@(&5X8V5P="!%>&-E<'1I;VXZ"B`@("`@("`@("`@("`@("`@("`@ -M;&]G9VEN9RYE&5C=71E*"(E&5C=71E*"(E&PR='!D(BP@(G)E -M2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@("`@ -M("`@("!I9B!G871E=V%Y.@H@("`@("`@("`@("`@("`@("`@(')O=71E+F%D -M9%]R;W5T92AD978L(&=A=&5W87DI"@H@("`@("`@("`@("`C(%1H92!F:7)S -M="!P=6)L:6,@:6YT97)F86-E(&AA&5C=71E -M*")A2!C;VYN=')A8VMD"B`@("`@("`@(B(B"B`@("`@("`@ -M;&EN97,@/2!;70H@("`@("`@(&QI;F5S+F%P<&5N9"@B7'1<=%QT25!V-%]A -M9&1R97-S("5S7&XB("4@(C$R-RXP+C`N,2(I"B`@("`@("`@;&EN97,N87!P -M96YD*")<=%QT7'1)4'8T7V%D9')E7!E(&%N9"!D96-I9&5S(&EF(&ET(&ES(&%N(&EN=&5R -M;F%L(&%D9')E0H@("`@("`@(%1H92!N97<@8V]D92!A -M;'-O(&=I=F5S('1H92!P;W-S:6)I;&ET>2!T;R!C;&]U9'-T86-K('1O(&AA -M=F4@82!H>6)R:60@9&5V:6-E"B`@("`@("`@=&AA="!C;W5L9"!F=6YC=&EO -M;B!A2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N -M;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B971H,2)]"@I3 -M5$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S:"`M8R`@)VEF -M(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@96QS92!E8VAO -M(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@(")V<&-R;W5T -M97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@6R`D,"`]/2!< -M(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ"B`@("`@("`@ -M("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@("`@("`@(&-M -M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U -M8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@("`@("`@;&]G -M9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S(B`E('-T871E -M7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X96-U=&4H7!E*"E=(&%N9"!S=&%T92`]/2`B -M34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE8W5T92AC;60I -M"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@("`@("`@(&5X -M96-U=&4H8VUD*0H*"F1E9B!I&5C=71E*")M;W5N="!T -M;7!F6XH=F%L*3H*("`@(&EF('9A;#H*("`@("`@("!R -M971U&5C=71E*")I<"!A9&1R('-H;W<@?&=R97`@+78@ -MWT*("`@("`@("`@("`@=&];)VEP)UT@ -M/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A;'-;+3%="B`@ -M("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@("(B(@H@("`@ -M9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G*")3879I;F<@ -M:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C=71E*")S>7-T -M96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I;F7-T96UC=&P@&5C=71E*")K:6QL("U(55`@)7,B -M("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D;G-M87-Q(BP@ -M(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O0`````````````````````````````````````````````` -M`````````````````````````````````````````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E -M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI -M8V5N'1D;G,H*3H*("`@("`@("`@("`@9&YS+F%P<&5N9"AS -M96QF+F1A=&%;)W)O=71E2==(#T@=F%L"@H@("`@9&5F(&=E=%]N971M87-K*'-E;&8I.@H@ -M("`@("`@(",@5V4@;F5E9"!T;R!F:7@@:70@<')O<&5R;'DN($D@:G5S="!A -M9&1E9"!T:&4@:68L(&%S($EA;B!D:60@:6X@&-E<'1I;VXN"B`@("`@("`@:68@)W)O=71E6]U -M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC -M('=I=&@@=&AE($QI8V5N"YS=')I -M<"@I(&9O2!A -M9'9A;F-E9"(L("TQ*0H@("`@("`@(&-R;VXN8V]M;6ET*"D*"B`@("!D968@ -M&-L=61E9%]H96%L=&A?8VAE8VMS(ET*("`@("`@("`@("`@:&-? -M9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K0`````````` -M```````````````````````````````````````````````````````````` -M`````````````````````#`P,#`W-34`,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N7,H*3H*("`@("`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@ -M("`@(R!P2!P&ES=',Z(')U;&4])7,@=&%B;&4])7,B+"!F=ULR72P@;F5W7W)U;&4N -M9V5T7W1A8FQE*"DI"B`@("`@("`@("`@(&5L2`](&9W6S)="B`@("`@("`@("`@("`@("!I9B!F=ULQ72`]/2`B9G)O;G0B -M.@H@("`@("`@("`@("`@("`@("`@(&-P>2`](&-P>2YR97!L86-E*"2DI"B`@("`@("`@("`@("`@("`C(%1H97)E(&%R92!S;VUE -M(&ES3H*("`@("`@("`@ -M("`@=&%B;&4@/2`G)PH@("`@("`@("`@("!F;W(@:2!I;B!O<&5N*"(O971C -M+VEP=&%B;&5S+VEP=&%B;&5S+25S(B`E('1Y<&4I.@H@("`@("`@("`@("`@ -M("`@:68@:2YS=&%R='-W:71H*""`]/2!R=6QE70H* -M"F-L87-S($-S3F5T9FEL=&5R*&]B:F5C="DZ"@H@("`@9&5F(%]?:6YI=%]? -M*'-E;&8I.@H@("`@("`@('-E;&8N7!E)RP@)RTM0`````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```P,#`P-S4U`#`P,#$W-3``,#`P,32!O9B!T:&4@3&EC96YS92!A=`HC"B,@ -M:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&ES=',L(&5L5]P87)A;2D*("`@("`@("!E;'-E -M.@H@("`@("`@("`@("!L;V=G:6YG+FEN9F\H(D%D9&EN9R!R;W5T93H@9&5V -M("(@*R!D978@*R`B('1A8FQE.B`B("L*("`@("`@("`@("`@("`@("`@("`@ -M("`@('1A8FQE("L@(B!N971W;W)K.B`B("L@861D2!P87)A;65T97(@5]P87)A;2D*("`@("`@("!E;'-E.@H@("`@("`@ -M("`@("!L;V=G:6YG+FEN9F\H(D%D9&EN9R!R;W5T93H@9&5V("(@*R!D978@ -M*R`B('1A8FQE.B`B("L*("`@("`@("`@("`@("`@("`@("`@("`@('1A8FQE -M("L@(B!N971W;W)K.B`B("L@861D2DZ"B`@("`@("`@(B(B("!!9&0@82!D969A=6QT(')O=71E"B`@("`@("`@ -M.G!A&-E<'1I;VXH(D=A=&5W87D@8V%N;F]T(&)E($YO;F4N(BD*"B`@ -M("`@("`@:68@0H@("`@("`@("`@("!L;V=G -M:6YG+FEN9F\H(D%D9&EN9R!D969A=6QT(')O=71E(BD*("`@("`@("`@("`@ -M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI -M86YC90HC('=I=&@@=&AE($QI8V5N0`````````````````````` -M```````````````````````````````````````````````````````````` -M`````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI -M86YC90HC('=I=&@@=&AE($QI8V5N'DO:&%P2YC9F'DO:&%P2YC9F2@I"B`@("`@("`@9F]R('@@:6X@8V]N9FEG.@H@("`@("`@("`@("!; -M9FEL93$N87!P96YD*'2A(05!23UA97T-/ -M3D9?5"P@2$%04D]865]#3TY&7U`I"@H@("`@("`@("`@("!P2!O9B!T:&4@3&EC96YS92!A=`HC -M"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG -M971?='EP92@I"B`@("`@("`@5]I9E]N965D960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L -M"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE -M,B]S:71E2DI"B`@("`@("`@("`@(&9I;&4N&5C=71E,B@B7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2AS96QF*3H*("`@("`@("!S96QF+F-O;F9I9R`](%M="B`@("`@("`@ -M"P@;&EN -M92!I;B!E;G5M97)A=&4H%T@/2!R97!L86-E("L@ -M(EQN(@H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!S96%R8V@H"P@;&EN92!I;B!E;G5M97)A=&4H -M"P@;&EN92!I;B!E;G5M97)A=&4H -M2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N0`````````````````````````````````````` -M````````````````````````````````````````````````````````,#`P -M,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N"`](&EN="@G)RYJ;VEN*%MD:6=I="!F;W(@9&EG:70@:6X@9&5V:6-E(&EF -M(&1I9VET+FES9&EG:70H*5TI*0H@("`@("`@("`@("`@("`@:68@9&5V:6-E -M7W-U9F9I>"`\(&QO=V5S=%]D979I8V4Z"B`@("`@("`@("`@("`@("`@("`@ -M;&]W97-T7V1E=FEC92`](&1E=FEC95]S=69F:7@*("`@("`@("`@("`@("`@ -M("`@("!G=65S=%]I;G1E5]C:61R*'-E;&8I.@H@("`@("`@ -M(')E='5R;B`B)7,O)7,B("4@*'-E;&8N9V5T7V=A=&5W87DH*2P@F4@:6X@8FETF4B -M*0H*("`@(&1E9B!G971?9&5V:6-E*'-E;&8I.@H@("`@("`@(')E='5R;B!S -M96QF+F=E=%]A='1R*")D979I8V4B*0H*("`@(&1E9B!G971?8VED7!E)UT@:6X@5E)24%]465!% -M4SH*("`@("`@("`@("`@7!E)UT@:6X@6R=G=65S="==.@H@("`@("`@("`@ -M("!R971U7!E)UT@:6X@6R=P=6)L -M:6,G73H*("`@("`@("`@("`@7-T -M96T*("`@("`@("`B(B(*("`@("`@("!S96QF+F1E=FQIWT*("`@("`@("!S96QF+F%D -M9')E7!E*"D@ -M:6X@6R)P=6)L:6,B72!A;F0@861D2)= -M*0H@("`@("`@("`@("`@("`@&UA7!E)UT*("`@("`@("!R971U&9F9F9F9F9F(ETI"@H@("`@("`@('-E;&8N9G7!E*"D@ -M:6X@6R)P=6)L:6,B73H*("`@("`@("`@("`@7!E*"D@:6X@ -M6R)P=6)L:6,B73H*("`@("`@("`@("`@#4R-"\P>&9F -M9F9F9F9F(B`E("AS96QF+F1E=BP@2)=(&%N9"!S96QF+F%D9')E2)=(&%N9"!S96QF+F%D9')E7!E*"D@:6X@6R)P -M=6)L:6,B72!A;F0@*&YO="!S96QF+F-O;F9I9RYI2!T -M:&4@;6%S=&5R(&)A8VMU<"!F=6YC=&EO;G,*("`@("`@("`@("`@("`@(&EF -M(&YO="!C;61L:6YE+FES7W)E9'5N9&%N="@I.@H@("`@("`@("`@("`@("`@ -M("`@(&EF(&UE=&AO9"`]/2`B861D(CH*("`@("`@("`@("`@("`@("`@("`@ -M("`@0W-087-S=V13=F,HWT*("`@("`@("!C -M;60@/2`H(FEP(&%D9'(@2!K965P86QI -M=F5D(&]R(&YO=`H@("`@("`@("(B(@H@("`@("`@(&EF(")N=U]T>7!E(B!I -M;B!S96QF+F%D9')E2==*0H@ -M("`@("`@(&EF(&YO="!S96QF+F-L+FES7W)E9'5N9&%N="@I(&%N9"`H;F]T -M('-E;&8N861D2==(&]R('-E;&8N861D2==(#T](").;VYE(BDZ"B`@("`@("`@("`@(&-M9"`](")A2!H87!P96X@8G5T(&1I9"`Z*0H@("`@ -M("`@(",@270@;65A;G,@86X@87!A8VAE(&9I;&4@9V]T(&]R<&AA;F5D(&%F -M=&5R(&$@9W5E2@I"@H@("`@9&5F -M(&ES7V=U97-T7V=A=&5W87DH7,O;F5T+V-O7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ -M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E -M(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O -M'!R97-S(&]R(&EM<&QI960N("!3 -M964@=&AE($QI8V5N"(I.@H@("`@("`@("`@("!I=&5M&5C -M=71E*")K:6QL("TY("5S(B`E('!I9"D*"B`@("!D968@9W)E<"AS96QF+"!S -M='(I.@H@("`@("`@(&9O"(I.@H@("`@("`@("`@("!I9B!I+F9I;F0H7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C -M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F -M('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L -M:6-A8FQE(&QA=R!O'!R97-S(&]R -M(&EM<&QI960N("!3964@=&AE($QI8V5N2!O -M9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI -M8V5NWT*("`@("`@("!S96QF+F1B(#T@1&%T -M84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF+F1B+G-A=F4HWT*("`@("`@ -M("!R971U&1I9V5S="@I"@H@("`@9&5F(&=E=%]G871E=V%Y -M*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I;B!S96QF+FED871A*"DZ -M"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A*"E;)V=A=&5W87DG70H@ -M("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G971?=7-E7V5X=%]D;G,H -M'1D;G,G -M70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G971?861V97)T7VEN -M="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN="<@:6X@0`````````````````````````````````````````````````````````` -M````````````````````````````````````````,#`P,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7!E&5C=71E*&-M9"D*("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")! -M9&1E9"!R=6QE("5S(&9O0`````````````````````````````````````````````` -M````````````````````````````````````````````````````````,#`P -M,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET*#(I -M"B`@("!F;W(@;W!T+"!A7,N97AI -M="@R*0H*("`@(&9O&ES=',H9&%T869I;&4I.@H@("`@("`@(&]S -M+G)E;6]V92AD871A9FEL92D*"@ID968@8W)E871E9FEL92AI<"P@9F]L9&5R -M+"!F:6QE+"!D871A*3H*("`@(&1E3H* -M("`@("`@("`@("`@;W,N;6%K961I2!E>&ES=',L('=E(&1O(&ET('1H:7,@=V%Y -M(&9O0H@("`@("`@("`@("!I9B!E+F5R&ET*#$I"B`@("`@("`@ -M:68@;W,N<&%T:"YE>&ES=',H;65T86UA;FEF97-T*3H*("`@("`@("`@("`@ -M9F@@/2!O<&5N*&UE=&%M86YI9F5S="P@(G(K82(I"B`@("`@("`@("`@(&5X -M9FQO8VLH9F@I"B`@("`@("`@("`@(&EF(&9I;&4@;F]T(&EN(&9H+G)E860H -M*3H*("`@("`@("`@("`@("`@(&9H+G=R:71E*&9I;&4@*R`G7&XG*0H@("`@ -M("`@("`@("!U;F9L;V-K*&9H*0H@("`@("`@("`@("!F:"YC;&]S92@I"B`@ -M("`@("`@96QS93H*("`@("`@("`@("`@9F@@/2!O<&5N*&UE=&%M86YI9F5S -M="P@(G&9L;V-K*&9H*0H@("`@("`@("`@("!F -M:"YW&9L;V-K*&9H*0H@("`@9F@N -M=W)I=&4H96YT3H*("`@("`@("!F -M;&]C:RAF:6QE+"!,3T-+7T58*0H@("`@97AC97!T($E/17)R;W(@87,@93H* -M("`@("`@("!P71H;VX*(R!,:6-E;G-E9"!T -M;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@ -M;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* -M(R`@(&AT='`Z+R]W=WFEP9FEL90H*"B,@0W)E871E('II<"!A -MFEP -M7V9I;&5S*&9I;&5S*3H*("`@(&9,:7-T(#T@9FEL97,*("`@(&-O;7!R97-S -M:6]N(#T@>FEP9FEL92Y:25!?1$5&3$%4140*("`@('1I;65?&5C=71E7W-H96QL7W-C3H*("`@("`@("`@ -M("`@("`@("`@("!Z9BYW3H*("`@("`@("!C;&5A;G5P*&9I;&5S7V9R;VU?F8N8VQO&5C=71E7W-H96QL -M7W-C&-E<'0@3U-%#H*("`@("`@("`@("`@9&5L971E7W1M<%]F:6QE7V-M9"`]("=R -M;2`M9B`E3H*("`@("`@("`@("`@9BYC;&]S92@I"B`@("!R971U"YS<&QI -M="AC;60I+"!S=&1E&-E<'0@3U-%&5C=71E(&)A'0H -M>FEP7V9I;&4L(&9I;&5S7V9O=6YD+"!F:6QE"YS<&QI="AC;&5A;G5P7V-M9"DI"@H* -M:68@7U]N86UE7U\@/3T@)U]?;6%I;E]?)SH*("`@(&9I;&5,:7-T(#T@7)I9VAT(&]W -M;F5R6]U -M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O -M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W -M=WW!R -M:6YT("0R.WTG('P@6]U(&UA>2!N -M;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@ -M=&AE($QI8V5N2!T;R!E;G-U2!T;R!I=',@<')E=FEO -M=7,@'D@=&\@<')E=FEO=7,@'DN8V9G+F]L9"`O971C+VAA<')O>'DO:&%P2YC9F'DN8V9G+FYE=PH@(&9I"GT*"@IL;V=G97(@+70@8VQO=60@(B0H8F%S -M96YA;64@)#`I.B!%;G1E'D*'D@2P@8V]N9FEG=7)I -M;F<@9FER97=A;&PB"@HC(&EP=&%B;&5S(&5N=')Y('1O(&5N'D@2`D861D961)<',@ -M)')E;6]V961)<',@)'-T871S27`*"FEF(%L@)#\@+6=T(#`@70IT:&5N"B`@ -M;&]G9V5R("UT(&-L;W5D(")&86EL960@=&\@87!P;'D@9FER97=A;&P@'D@8V]N9FEG(@H@(",@4F5S=&]R92!T:&4@3$(*("!R97-T;W)E7VQB -M"@H@(&QO9V=E&ET(#$@)&QO8VL@)&QO8VME -M9`IE;'-E"B`@(R!296UO=F4@8F%C:V5D=7`@:7!T86)L92!R=6QE6]U(&UA>2!N;W0@=7-E('1H:7,@ -M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E -M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI -M8V5N7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z -M+R]W=WPH@('-U9&\@:7!T86)L97,@+70@;6%N9VQE("U$(%!215)/ -M551)3D<@+6D@)&1E=B`M;2!S=&%T92`M+7-T871E($Y%5R`M:B!#3TY.34%2 -M2R`M+7-E="UM87)K("1T86)L94YO(#(^+V1E=B]N=6QL"@H@('-U9&\@:7`@ -MV1E=CHS?2DI"G1A8FQE3F%M93TB5&%B -M;&5?)&1E=B(*"FEF(%L@)&%C=&EO;B`]/2`G861D)R!="G1H96X*("!P;'5G -M7VYI8PIE;'-E"B`@=6YP;'5G7VYI8PIF:0H````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````&]P="]C;&]U9"]B:6XO:7!S96-T=6YN96PN6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC -M90HC('=I=&@@=&AE($QI8V5N#4R-2(*=G!N:6YM87)K/2(P>#4R-"(*"G5S86=E*"D@>PH@("`@<')I;G1F -M(")5'0@ -M:&]P/B`M3X@+6D@/&EK92!P;VQI -M8WD^("UT(#QI:V4@;&EF971I;64^("U4(#QEPH@('-U9&\@:7!T86)L97,MPH@(&1I2!<"B`@("!P:&%S93(@<&]L:6-Y -M/21ER1R:6=H=&YE='-](B`^/B`D=G!N8V]N -M9F9I;&4@)B8*("!S=61O(&5C:&\@(B`@='EP93UT=6YN96PB(#X^("1V<&YC -M;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!A=71H8GD]VEK96QI9F5T:6UE?7,B(#X^("1V<&YC;VYF9FEL92`F)@H@ -M('-U9&\@96-H;R`B("!E2(@/CX@)'9P;F-O;F9F:6QE -M("8F"B`@2!F;W(@'1H;W`](B1/4%1!4D&ET("1R970*```````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````;W!T+V-L;W5D+V)I;B]I<&%S2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&QO8V%L('!U8DEP -M/20H96-H;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?22!E>&ES -M=',B"GT*"F%D9%]V<&Y?8VAA:6Y?9F]R7VEP("@I('L*("!L;V-A;"!P=6)) -M<#TD*&5C:&\@)#$@?"!A=VL@+48G+R<@)WMPPH@(&QO8V%L('!U8DEP/20H96-H;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?2PH@(&QO8V%L -M('!U8DEP/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R -M:6YT("0Q?2W!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)A -MW!R:6YT("0R?2W!R:6YT("0R -M?25]R;W5T97-?9G)O;5]M86EN("1T86)L94YA;64*(R!.3U1%.B!T:&ES -M("!E;G1R>2!W:6QL(&)E(&1E;&5T960@:68@=&AE(&EN=&5R9F%C92!IW!R:6YT -M("0Q?2PH@(&EF(%L@(B1S9FQA9R(@/3T@(C`B -M(%T*("!T:&5N"B`@("!R971UW!R -M:6YT("0Q?2W!R:6YT("0R?22!I<"!I;F9O(&EN=&\@9FEL92P@ -M=7-E9"!O;B!R961U;F1A;G0@W!R:6YT("0Q?2&ES -M=&EN9TEP36%S:STD*'-U9&\@:7`@861DPH@(&QO8V%L('!U8DEP/20Q -M"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP -M/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)A&ES=&EN9TEP36%S:STD*'-U9&\@:7`@861DPH@("`@(V5N86)L92!R<',@ -M86YD(')F%QN(B`D;G5M*0H@("`@("`@("`@96-H -M;R`D:&5X.PH@("`@("`@("`@(V5N86)L92!R<',*("`@("`@("`@(&5C:&\@ -M)&AE>"`^("]S>7,O8VQA&ET -M("0_("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1!9FQA9R(@/3T@(C$B(%T* -M=&AE;@H@(&%D9%]A;E]I<"`@)'!U8FQI8TEP("`F)@H@(&%D9%]F=U]C:&%I -M;E]F;W)?:7`@)'!U8FQI8TEP"B`@=6YL;V-K7V5X:70@)#\@)&QO8VL@)&QO -M8VME9`IF:0H*:68@6R`B)&9F;&%G(B`]/2`B,2(@72`F)B!;("(D1&9L86&ET("0_("1L;V-K("1L;V-K960* -M9FD*"G5N;&]C:U]E>&ET(#`@)&QO8VL@)&QO8VME9`H````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````!O<'0O8VQO=60O8FEN+VQI;F5?961I="YP>0`````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````,#`P,#2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2UL:6YE(&5D:71I;F<@;V8@8V]N9FEG=7)A=&EO;B!F -M:6QE&%M<&QE('1H97)E)W,@82!D;W5B;&4@97-C87!E(&]F('1H92!B86-K2!M -M871C:&5D(&%L;"!F:6QE3H* -M("`@("XN+B`@(&]S+G5N;&EN:R@G9&]C=&5S="UV:&]S=',N8V]N9B55N=7-E9$QO8V%L"B`@ -M("`@("`@("`@('-T870@/2!.;VYE"B`@("`@("`@("`@('=I=&@@;W!E;BAS -M96QF+F9I;&5N86UE+"`G&-E<'1I;VXH -M(DUA9&4@=&]O(&UA;GD@961I=',B*0H@("`@("`@("`@("`@("`@("`@("`@ -M("`@("`@96QI9B!R96UA:6YI;F=?8V]U;G0@/3T@,#H*("`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@("`@("`@ -M("`@("`@("!C:&%N9V5D7VQI;F4L('-U8G,@/2!E9&ET+G!A='1E2AS96QF+F9I;&5N86UE+"!B86-K=7!?9FEL96YA;64I"B`@("`@("`@("`@ -M("`@("!O3H*("`@("`@("`@("`@:68@8VAA;F=E -M9%]F:6QE(&ES(&YO="!.;VYE.B`@("`@("`@("`@("`@("`@("`@("`@("`@ -M("`@("`C(&9A:6QE9"P@8VQE86X@=7`*("`@("`@("`@("`@("`@(&-H86YG -M961?9FEL92YC;&]S92@I"B`@("`@("`@("`@("`@("!O6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC -M90HC('=I=&@@=&AE($QI8V5N2!R=6QE2!O9B!T:&4@3&EC96YS92!A -M=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O -M'!R97-S(&]R(&EM<&QI960N("!3 -M964@=&AE($QI8V5N7,I.@H*("`@(&5X:7-T:6YG7VME>7,@/2!;70H@ -M("`@;F5W7V5T:%]K97D@/2!.;VYE"@H@("`@9F]R(&LQ+"!V,2!I;B!G=65S -M=&YE=%]D:6-T+FET97)I=&5M7,@ -M86YD(&QE;BAV,2D@/B`P.@H@("`@("`@("`@("!E>&ES=&EN9U]K97ES+F%P -M<&5N9"AK,2D*"B`@("!I9B!N;W0@97AI2`Z.B!296UO=FEN9R!G=65S="!N971W;W)K -M+BXN(BD*("`@("`@("!R971U2!T;R!B92!S -M971U<`H@("`@)R2!C;VYF:6=U&ES=',@/2!&86QS90H*("`@(&9O2!P2!C;VYF:6=U2`Z.B!02`Z.B!.;R!'=65S=$YE='=O7,N87)G -M=ELQ72D*("`@('!R;V-E7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=WPH@(&QO8V%L(%]P -M:60])"AP:61O9B!D;G-M87-Q*0H@(&9OW!R:6YT("0R?20H@(&EF(%L@)&EP -M=C0@70H@('1H96X*("`@(&5C:&\@(C`@)&UA8R`D:7!V-"`D:&]S="`J(B`^ -M/B`D1$A#4%],14%315,*("!F:0H@(&EF(%L@)&EP=C8@70H@('1H96X*("`@ -M(&5C:&\@(C`@)&1U:60@)&EP=C8@)&AO6]U(&UA>2!N -M;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@ -M=&AE($QI8V5N&-E<'0@3U-%6]U&-E<'1I;VX@;V-C=7)R960Z("5S(B`E(&4*("`@("`@("`@ -M("`@7!E(#T]("=T0`````````````` -M```````````````````````````````````````````````````````````` -M`````````````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ -M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&-L=61E9%]H96%L=&A?8VAE -M8VMS(ET@/2!D871A6R)E>&-L=61E9%]H96%L=&A?8VAE8VMS(ET*("`@(&EF -M(")H96%L=&A?8VAE8VMS7V-O;F9I9R(@:6X@9&%T83H*("`@("`@("!D8F%G -M6R)H96%L=&A?8VAE8VMS7V-O;F9I9R)=(#T@9&%T85LB:&5A;'1H7V-H96-K -M7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z -M+R]W=WW!R:6YT("0Q?2<*?0H* -M:7!T86)L97-?*"D@>PH@("!L;V-A;"!O<#TD,0H@("!L;V-A;"!P=6)L:6-? -M:7`])#(*("`@;&]C86P@:7-?=G!C/69A;'-E"B`@(&QO8V%L(&9O7-T96UC=&P@:7,M86-T -M:79E(&EPS$N+C5]"B`@("!D;PH@("`@("!L;V=G97(@+70@8VQO -M=60@(B0H8F%S96YA;64@)#`I.B!W86ET:6YG(&EP7-T96UC=&P@:7,M86-T:79E(&EP7-T96UC=&P@:7,M86-T:79E(&EP7-T96UC=&P@&PR='!D"B`@("`@("`@("`@("`@("`@("`@2`Z(%!32R!<(B1I<'-E8U]P -M&PR -M='!D"@H@("!I<'1A8FQEPH@("!L;V-A;"!P=6)L:6-?:7`])#$*"B`@(&EPPH@("!L;V-A;"!U/20Q"B`@(&QO -M8V%L('!A)'4@7"H@7"(D -M<&%S&ET(#(*"0D[.PH@(&5S86,*9&]N90H*:68@6R`B)&1E -M=B(@/3T@(B(@70IT:&5N"B`@("!D978](F5T:#(B"F9I"@II9B!;("(D8VED -M&ET(#(*6R`B)&-R96%T92(@/3T@(C$B(%T@)B8@6R`B)&QF;&%G -M)'!F;&%G)')F;&%G)'-F;&%G(B`A/2`B,3$Q,2(@72`F)B!U&ET(#(*"FEF(%L@(B1CW!R:6YT("0Q?27)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS -M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E -M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,@/2!;)V5T:#$G+"`G971H,B6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2!O9B!T:&4@ -M3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A -M8FQE(&QA=R!O2!O9B!T:&4@9&YS;6%S<2!F:6QE+@IC<"`B)$1( -M0U!?0T].1DE'7TU!24XB("`B)$1(0U!?0T].1DE'7TU!24Y?0D%+(@IC<"`B -M)$1(0U!?0T].1DE'(B`B)$1(0U!?0T].1DE'7T)!2R(*"B-E;7!T>2!T:&4@ -M8V]N9FEG(&9I;&4*96-H;R`^("1$2$-07T-/3D9)1PH*=F%R/2(D,2(*9&AC -M<%]R86YG93TB(@ID:&-P7V=A=&5W87D](B(*9&AC<%]N971M87-K/2(B"F1N -M'1?9&YS/20H96-H -M;R`B)$--1$Q)3D4B('P@9W)E<"`M;R`B=7-E97AT9&YS/71R=64B*0IW:&EL -M92!;("UN("(D=F%R(B!="F1O"B!V87(Q/20H96-H;R`D=F%R('P@8W5T("UF -M,2`M9"`B+2(I"B!R;W5T97)I<#TD*"!E8VAO("1V87(Q('P@8W5T("UF,2`M -M9"`B.B(@*0H@9V%T97=A>3TD*&5C:&\@)'9AV1H8W!?V1H8W!?;F5T;6%S:WTB)V1H8W`M;W!T:6]N/71A9SIR86YG -M92W9A -MVQO9WTB8&=R97`@(EYD:&-P+6]P=&EO;CTV(B`B)$1(0U!?0T].1DE'7TU! -M24XB8")<;B(*;&]G/2(D>VQO9WTB8&=R97`@(EYD:&-P+6]P=&EO;CUO<'1I -M;VXZVQO -M9WTB8&=R97`@(EYD:&-P+7)A;F=E/2(@(B1$2$-07T-/3D9)1U]-04E.(F`B -M7&XB"@II9B!;("(D;&]G(B`A/2`G7&Y<;EQN)R!="G1H96X*("-#;&5A;FEN -M9R!T:&4@97AI9&AC<"UR86YG93TO9"<@(B1$2$-07T-/3D9)1U]-04E.(@IF:0H*(W=R -M=&EN9R!T:&4@;F5W(&-O;F9I9R!I;G1O('1H92!C;VYF:6<@9FEL92X*96-H -M;R`M92`B)&1H8W!?&ET("1R -M97-U;'0@)&QO8VL@)&QO8VME9`H````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````````````````````!O -M<'0O8VQO=60O8FEN+V-S7V1H8W`N<'D````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7,@/2!S970H*0H@("`@("`@(&9O2`A/2`G -M:60G(&%N9"!E;G1R>5LG;6%C7V%D9')E7,N861D*&ME>2D* -M("`@("`@("`@("`@("`@(&)R96%K"@H@("`@("`@(&EF(&1A=&%;)W)E;6]V -M92==(&%N9"!K97D@;F]T(&EN(')E;6]V95]K97ES.@H@("`@("`@("`@("!R -M96UO=F5?:V5Y2!I -M;B!R96UO=F5?:V5Y5TI"@H@("`@("`@(&1B86=;9&%T85LG:7!V-%]A9&1R97-S)UU=(#T@9&%T -M80H*("`@(')E='5R;B!D8F%G"@```&]P="]C;&]U9"]B:6XO8W-?8VUD;&EN -M92YP>0`````````````````````````````````````````````````````` -M```````````````````````````````````````````P,#`P-S4U`#`P,#$W -M-3``,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ -M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E -M(&%T"B,*(R`@(&AT='`Z+R]W=W2!O9B!T:&4@ -M3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A -M8FQE(&QA=R!O'!R97-S(&]R(&EM -M<&QI960N("!3964@=&AE($QI8V5N'DN8V9G("]E=&,O:&%P2]H87!R;WAY+F-F9RYO;&0*"B`@;78@)&YE -M=U]C;VYF:6<@+V5T8R]H87!R;WAY+VAA<')O>'DN8V9G"B`@:68@:&%P2`M<"`O=F%R+W)U;B]H87!R;WAY+G!I9"`M9B`O971C+VAA<')O>'DO:&%P -M2YC9F<@+7-F("0H8V%T("]V87(O'DN<&ED*3L@=&AE -M;@H@("`@;&]G9V5R("UT(&-L;W5D(").97<@:&%P2!I;G-T86YC92!S -M=6-C97-S9G5L;'D@;&]A9&5D+"!S=&]P<&EN9R!P'DO:&%P2YC9F<@)&YE=U]C;VYF:6<* -M("`@(&UV("]E=&,O:&%P2]H87!R;WAY+F-F9RYO;&0@+V5T8R]H87!R -M;WAY+VAA<')O>'DN8V9G"B`@("!H87!R;WAY("UP("]V87(O'DN<&ED("UF("]E=&,O:&%P2]H87!R;WAY+F-F9R`M2YP:60I"B`@("!R970],0H@(&9I"@IE>&ET("1R -M970*```````````````````````````````````````````````````````` -M`````````````````````````````````````````````````````')O;W0O -M;6]N:71O71H;VX*(R!,:6-E;G-E9"!T;R!T -M:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE -M"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@ -M(&AT='`Z+R]W=WWT*("`@('!A2`K)UTG*R(@(B`K("=;)RMP2LG -M72<@*R`B("(@*R!M2!O;F4@<&ED(&]R(&YO=`H@("`@:68@97AI=%-T871U6EN9R!F97<@;6]R92!T:6UEWT*("`@(&9A:6QI -M;F=?PH@("`@("`@("`@("`@("`@ -M(G-U8V-EPH@("`@("`@("`@("`@ -M("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EWT@(U-K:7`@WT*("`@(&9A:6QI;F=# -M:&5C:W,@/2!;70H@("`@:68@8VAE8VM4>7!E(#T](")B87-I8R(Z"B`@("`@ -M("`@;6]N:71297-U;'0L(&9A:6QI;F=#:&5C:W,@/2!M;VYI=%!R;V-E&-L=61E(#T@:&-?9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!H8U]D871A(&5L7!E*0H@("`@("`@("`@("`@("`@:68@;&5N*')E="D@ -M/3T@,#H*("`@("`@("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@ -M("`@("`@:68@(G-U8V-E7,N87)G=BD@/3T@,CH*("`@("`@("!I9B!S>7,N -M87)G=ELQ72`]/2`B861V86YC960B.@H@("`@("`@("`@("!M86EN*")A9'9A -M;F-E9"(I"B`@("`@("`@96QI9B!S>7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@ -M("`@("`@("`@("!M86EN*")B87-I8R(I"B`@("`@("`@96QS93H*("`@("`@ -M("`@("`@<')I;G1D*")%7!E(&]F('1E7,N87)G=BD*("`@(&5L0`````` -M```````````````````````````````````````````````````````````` -M```````````````````P,#`P-C0T`#`P,#$W-3``,#`P,371H;VX*(R!,:6-E -M;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@ -M=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ -M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E -M(&%T"B,*(R`@(&AT='`Z+R]W=W'!E8W1E9"`](%M="B`@("`@("`@ -M9&5S=$EP(#T@<&]R=$9O'0L('-R8U!O2!I -M;B!I<%1A8FQE4QI'!E8W1E -M9#H*("`@("`@("`@("`@("`@("`@("!I9B!I<%1A8FQE16YT'!E8W1E9$5N=')Y*2`]/2`M,3H*("`@("`@("`@("`@("`@("`@("`@("`@ -M9F]U;F1!;&P@/2!&86QS90H@("`@("`@("`@("`@("`@("`@("`@("!B4QI2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA -M=R!O'!R97-S(&]R(&EM<&QI960N -M("!3964@=&AE($QI8V5N$UE;6]R>55S86=E(&EN(&AE86QT:%]C -M:&5C:W-?9&%T82`B("L@7`H@("`@("`@("`@("`@(")S>7-T96U4:')E&ET*#`I"@H@("`@;6%X365M;W)Y -M57-A9V4@/2!F;&]A="AD871A6R)M87A-96UO7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@ -M(&UA:6XH*0H````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M'E?8VAE8VLN<'D````````````` -M```````````````````````````````````````````````````````````` -M`````````````#`P,#`V-#0`,#`P,36]U(&UA>2!N;W0@=7-E('1H -M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N -M41A=&$@86YD(")M87AC;VYN -M(B!I;B!H84-F9U-E8W1I;VYS6R)G;&]B86PB73H*("`@("`@("!I9B!H87!R -M;WAY1&%T85LB;6%X8V]N;B)=("$](&AA0V9G4V5C=&EO;G-;(F=L;V)A;")= -M6R)M87AC;VYN(EU;,%TN'E$871A(BD*("`@(&EF(&AA -M<')O>'E$871A(&ES($YO;F4@;W(@;&5N*&AA<')O>'E$871A*2`]/2`P.@H@ -M("`@("`@('!R:6YT(").;R!D871A('!R;W9I9&5D('1O(&-H96-K+"!S:VEP -M<&EN9R(*("`@("`@("!E>&ET*#`I"@H@("`@=VET:"!O<&5N*"(O971C+VAA -M<')O>'DO:&%P2YC9FWT*("`@(&-UWT*("`@(&9O41A=&$L(&AA0V9G4V5C=&EO;G,I"@H@("`@:68@ -M8VAE8VM-87A#;VYN(&%N9"!C:&5C:TQB4G5L97,Z"B`@("`@("`@<')I;G0@ -M(D%L;"!C:&5C:W,@<&%S&ET*#`I"B`@("!E;'-E.@H@ -M("`@("`@(&5X:70H,2D*"@II9B!?7VYA;65?7R`]/2`B7U]M86EN7U\B.@H@ -M("`@:68@;&5N*'-Y7,N87)G=ELQ72`]/2`B -M861V86YC960B.@H@("`@("`@(&UA:6XH*0H````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&ET*#`I"@H@("`@=&5M<&QA=&5697)S:6]N36%T8VAE -M65T('-E='5P(&%T("(@*R!R96QE87-E1FEL92`K7`H@ -M("`@("`@("`@("`@("`@("`B+"!S:VEP<&EN9RXB"B`@("`@("`@96QI9B!E -M>'!E8W1E9"`A/2!F;W5N9#H*("`@("`@("`@("`@<')I;G0@(E1E;7!L871E -M(%9E'!E8W1E9"`K("(L(&9O=6YD.B`B("L@9F]U;F0*("`@("`@ -M("`@("`@=&5M<&QA=&5697)S:6]N36%T8VAE'!E8W1E9"`K("(L(&9O=6YD.B`B("L@9F]U;F0*("`@("`@ -M("`@("`@&ET*#$I"@H*:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH* -M("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A;F0@2\````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````,#`P,#0`````````````````````````` -M```````````````````````````````````````````````P,#`P-C0T`#`P -M,#$W-3``,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS -M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E -M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W3U.;VYE*3H*("`@('=I=&@@ -M;W!E;B@G+W)O;W0O:&5A;'1H7V-H96-K2!I2!I5TN2D@/3T@,#H*("`@("`@("`@("`@("`@(&-O;G1I -M;G5E"B`@("`@("`@("`@(&ME>59A;"`](&5N=')Y+G-P;&ET*"(](BD*("`@ -M("`@("`@("`@:68@;&5N*&ME>59A;"D@/3T@,CH*("`@("`@("`@("`@("`@ -M(&1;:V5Y5F%L6S!=+G-T2]?7VEN:71?7RYP>0`````````````````````````````````````````` -M````````````````````````````````````````,#`P,#8T-``P,#`Q-S4P -M`#`P,#$W-3``,#`P,#`P,#$U-#``,3,V,C4Q-3`S,30`,#$W-S8R`"`P```` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````'5S=&%R("``9&%R2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO -M2!A<'!L:6-A8FQE(&QA=R!O'!R -M97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N0`````````````````````````````````` -M````````````````````````````````````````````````,#`P,#8T-``P -M,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#,Q,S(`,3,V,C4Q-3`S,30`,#$W-S8Q -M`"`P```````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````'5S=&%R("``9&%R2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET -M*#`I"@H@("`@;6EN1&ES:TYE961E9"`](&9L;V%T*&1A=&%;(FUI;D1IF4I("\@,3`R-`H*("`@ -M(&EF("AF6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI -M86YC90HC('=I=&@@=&AE($QI8V5N2!I;7!O7,I(#T](#`Z"B`@("`@ -M("`@<')I;G0@(D%L;"`B("L@7,@ -M87)E(')E86-H86)L92!V:6$@<&EN9R(*("`@("`@("!E>&ET*#`I"B`@("!E -M;'-E.@H@("`@("`@('!R:6YT(")5;G)E86-H86)L92!G871E=V%Y7,N87)G=ELQ72`]/2`B8F%S:6,B -M.@H@("`@("`@(&UA:6XH*0H````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````')O;W0O:&5A;'1H7V-H96-K0`````````````````````````````````````````````````````````` -M```````````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P -M,371H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD -M871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C -M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F -M('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&5C=71A8FQE71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E -M($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H -M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C -M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I -M"@H@("`@=VET:"!O<&5N*"2!O -M9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A -M<'!L:6-A8FQE(&QA=R!O'!R97-S -M(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N$-P=55S86=E(&EN(&AE -M86QT:%]C:&5C:W-?9&%T82!S>7-T96U4:')E&ET*#`I"@H@("`@;6%X0W!U57-A9V4@/2!F;&]A="AD871A -M6R)M87A#<'55&ET*#`I"B`@("!E -M;'-E.@H@("`@("`@('!R:6YT(")&86EL960@=&\@&ET*#$I"@H*:68@7U]N86UE -M7U\@/3T@(E]?;6%I;E]?(CH*("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A -M;F0@0`````````````````````````````````````` -M````````````````````````````````````````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2`]('9-6R)M86-!9&1R97-S(ET@ -M*R`B("(@*R!V35LB:7`B72`K("(@(B`K('9-6R)V;4YA;64B70H@("`@("`@ -M(&9O=6YD16YT2`](%1R=64*("`@("`@("`@("`@("`@(&)R96%K"@H@("`@("`@("`@("!N -M;VY$969A=6QT4V5T(#T@(G-E=#HB("L@=DU;(FEP(ETN2`](%1R=64*("`@("`@ -M("`@("`@("`@(&)R96%K"@H@("`@("`@(&EF(&YO="!F;W5N9$5N=')Y.@H@ -M("`@("`@("`@("!F86EL961#:&5C:R`](%1R=64*("`@("`@("`@("`@9F%I -M;'5R94UE&ET*#$I"B`@("!E;'-E.@H@("`@("`@('!R -M:6YT(")!;&P@(B`K('-T7,N87)G=ELQ72`]/2`B861V86YC960B.@H@("`@("`@(&UA:6XH -M*0H````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````````````````!R;V]T -M+V9U;F,N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P -M.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N -M2!O;F4@;&]C:R!IPH@("`@ -MPH@("`@;&]C:STD,0H*("`@(%]?;&]C:V5D/3`*("`@ -M(%]?5%,]8&1A=&4@*R5S)4Y@"B`@("!?7TQ/0TM$25(](B]T;7`B"B`@("!? -M7TQ/0TM&24Q%/2(D7U],3T-+1$E2+R1?7U13+20D+21L;V-K+FQO8VLB"@H@ -M("`@:68@6R`D,B!="B`@("!T:&5N"B`@("`@("`@7U]424U%3U54/20R"B`@ -M("!E;'-E"B`@("`@("`@7U]424U%3U54/3,P"B`@("!F:0H*("`@(&EF(%L@ -M+64@)%]?3$]#2T9)3$4@70H@("`@=&AE;@H@("`@("`@(&QO9V=EPH@("`@7U],3T-+1$E2/2(O=&UP -M(@H@("`@7U],3T-+1DE,13TB)%]?3$]#2T1)4B\J+20D+20Q+FQO8VLB"B`@ -M("!?7VQO8VME9#TD,@H@("`@:68@6R`B)%]?;&]C:V5D(B`]/2`B,2(@70H@ -M("`@=&AE;@H@("`@("`@(')M("1?7TQ/0TM&24Q%"B`@("!F:0I]"@HC(')E -M;&5A&ET('9A;'5E"B,@ -M)#(@;&]C:R!F:6QE;F%M90HC("0S(&QO8VME9"@Q*2!OF4]8&EP(&%D9'(@2!O9B!T:&4@3&EC96YS92!A=`HC -M"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ -M=&AE($QI8V5N7,O8VQA;65T82UD871A+R@N*UM>+UTI+S\D("`N+B]M -M971A9&%T82\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%="@HC:'1T<#HO -M+SQR;W5T97))4#XO;&%T97-T+V9O;R!A;F0@+BXN+V9O;R\@*'EI96QD(&UE -M=&%D871A+R1)4"]F;V\I"B-A2UZ;VYE+S\D("`N+B]M971A9&%T82\E>U)%34]415]! -M1$12?2]A=F%I;&%B:6QI='DM>F]N92!;3"Q.0RQ14T%="E)E=W)I=&52=6QE -M(%YC;&]U9"UI9&5N=&EF:65R+S\D("`N+B]M971A9&%T82\E>U)%34]415]! -M1$12?2]C;&]U9"UI9&5N=&EF:65R(%M,+$Y#+%%305T*4F5WU)%34]415]!1$12?2]I -M;G-T86YC92UI9"!;3"Q.0RQ14T%="E)E=W)I=&52=6QE(%YL;V-A;"UH;W-T -M;F%M92\_)"`@+BXO;65T861A=&$O)7M214U/5$5?041$4GTO;&]C86PM:&]S -M=&YA;64@6TPL3D,L45-!70I297=R:71E4G5L92!>;&]C86PM:7!V-"\_)"`@ -M+BXO;65T861A=&$O)7M214U/5$5?041$4GTO;&]C86PM:7!V-"!;3"Q.0RQ1 -M4T%="E)E=W)I=&52=6QE(%YP=6)L:6,M:&]S=&YA;64O/R0@("XN+VUE=&%D -M871A+R5[4D5-3U1%7T%$1%)]+W!U8FQI8RUH;W-T;F%M92!;3"Q.0RQ14T%= -M"E)E=W)I=&52=6QE(%YP=6)L:6,M:7!V-"\_)"`@+BXO;65T861A=&$O)7M2 -M14U/5$5?041$4GTO<'5B;&EC+6EP=C0@6TPL3D,L45-!70I297=R:71E4G5L -M92!><'5B;&EC+6ME>7,O/R0@("XN+VUE=&%D871A+R5[4D5-3U1%7T%$1%)] -M+W!U8FQI8RUK97ES(%M,+$Y#+%%305T*4F5W=FTM:60O/R0@ -M("XN+VUE=&%D871A+R5[4D5-3U1%7T%$1%)]+W9M+6ED(%M,+$Y#+%%305T* -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````=F%R+W=W=R]H=&UL+W5S97)D871A+P`` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````````#`P,#`W-34`,#`P,3/dev/null 2>&1 || ${echo} 'cloud_scripts/usr/share/cloud/cloud-scripts.tar': 'MD5 check failed' - ) << \SHAR_EOF -6c9c71f04c38fbbe6031c09a732f525d cloud_scripts/usr/share/cloud/cloud-scripts.tar -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/usr/share/cloud/cloud-scripts.tar'` -ne 696320 && \ - ${echo} "restoration warning: size of 'cloud_scripts/usr/share/cloud/cloud-scripts.tar' is not 696320" - fi -fi -# ============= cloud_scripts/usr/share/cloud/cloud-scripts.tar ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/usr/share/cloud/cloud-scripts.tar' -then -${echo} "x - SKIPPING cloud_scripts/usr/share/cloud/cloud-scripts.tar (file already exists)" - -else -${echo} "x - extracting cloud_scripts/usr/share/cloud/cloud-scripts.tar (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/usr/share/cloud/cloud-scripts.tar -M971C+P`````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````#`P,#`W-34`,#`P,37-T96U-87A& -M:6QE4VEZ93TQ,$T*4G5N=&EM94UA>%5S93TR,$T*```````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````971C+W-Y7-T -M96TO:'EP97)V+61A96UO;G,N:'8M=G-S+61A96UO;BYS97)V:6-E```````` -M````````````````````````````````````````````````````,#`P,#8T -M-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,S0`,3,V,C4Q-3`S,30`,#(S -M,37!E2!S97)V:6-E("A64U,I(&1A96UO;@H*6U-E&5C4W1A3UM=6QT:2UU7-T96UD+W-Y2UC;VYF -M:63TO=7-R+VQO8V%L+V-L;W5D+W-Y7-T96TO;W!E;BUV;2UT;V]L3UM=6QT:2UU3UM=6QT:2UU7-T96UD+W-Y&5N+FUO=6YT"D)E9F]R93UN971W;W)K+G1A2UC;VYF:6&5C4W1A&5C4W1A3UM=6QT:2UU7-T96TO:'EP97)V+61A96UO;G,N:'8M -M9F-O<'DM9&%E;6]N+G-E7!E2!S97)V:6-E("A&0T]062D@9&%E;6]N"D-O -M;F1I=&EO;E!A=&A%>&ES=',]+V1E=B]V;6)U0H*6U-E3UM=6QT:2UU7-T96TO8VQO=60M -M<&]S=&EN:70N2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N0`````````````````````````````````````````````` -M`````````````````````````````````````````#`P,#`V-#0`,#`P,36]U(&UA>2!N;W0@=7-E -M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI -M8V5N7!E(#$S("UJ($123U`*+4$@24Y0550@+7`@:6-M<"`M:B!!0T-%4%0* -M+4$@24Y0550@+6D@971H,2`M<"!T8W`@+6T@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* -M(R`@(&AT='`Z+R]W=W7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E -M<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H -M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N -M2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H -M92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R -M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T -M"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7-C=&P@8V]N9FEG=7)A -M=&EO;B!F:6QE"B,*(R!&;W(@8FEN87)Y('9A;'5E7-C=&PN -M8V]N9B@U*2!F;W(@;6]R92!D971A:6QS+@HC($!615)324].0`H*(R!#;VYT -M2!T:&5R -M96)Y(')E9'5C:6YG('1H92!S:7IE(&]F(&1I&PR='!D+WAL -M,G1P9"YC;VYF```````````````````````````````````````````````` -M````````````````````````````````````````````````````````,#`P -M,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,3,`,3,U-C$W,C4Q-3(` -M,#$T-#4U`"`P```````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````'5S=&%R("``9&%R65S"G!P<&]P=&9I;&4@/2`@("`O971C+W!P<"]O<'1I;VYS -M+GAL,G1P9`H````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````971C+V1N2!D:7-A8FQE -MF5N+"!S:6YC92!T:&5Y"B,@=&5L;"!D -M;G-M87-Q('1O(&9I;'1E2X@268@>6]U(&AA=F4@82!D:6%L+6]N+61E;6%N9"!L:6YK('1H97D@ -M86QS;R!S=&]P"B,@=&AE6]U('=A;G0@9&YS('1O(&=E="!I=',@=7!S=')E86T@2`@(&%P<&5A2!O=&AE<@HC(&9I -M;&4L(&=E='1I;F<@:71S('-E2!O;@HC('-P96-I9FEE9"!I;G1E -M&-E<'0M:6YT97)F86-E/65T:#$*97AC97!T+6EN -M=&5R9F%C93UE=&@R"F5X8V5P="UI;G1E6]U('=A;G0@9&YS;6%S<2!T;R!P6]U"B,@=V%N="!D;G-M -M87-Q('1O(')E86QL>2!B:6YD(&]N;'D@=&AE(&EN=&5R9F%C97,@:70@:7,@ -M;&ES=&5N:6YG(&]N+`HC('5N8V]M;65N="!T:&ES(&]P=&EO;BX@06)O=70@ -M=&AE(&]N;'D@=&EM92!Y;W4@;6%Y(&YE960@=&AI6]U('=A;G0@=&\@ -M:&%V92!A(&1O;6%I;@HC(&%U=&]M871I8V%L;'D@861D960@=&\@2!Q=6%L:69I -M960@9&]M86EN(&YA;65S+"!A7-T96US(&-O;F9I9W5R960@8GD@ -M1$A#4`HC(#,I(%!R;W9I9&5S('1H92!D;VUA:6X@<&%R="!F;W(@(F5X<&%N -M9"UH;W-T7,N;W)G+G5K+#$Y,BXQ-C@N,BXP -M+S(T"@HC(%-A;64@:61E82P@8G5T(')A;F=E(')A=&AE7,N;W)G+G5K+#$Y,BXV."XS -M+C$P,"PQ.3(N,38X+C,N,C`P"@HC(%5N8V]M;65N="!T:&ES('1O(&5N86)L -M92!T:&4@:6YT96=R871E9"!$2$-0('-E6]U(&YE960*(R!T;R!S -M=7!P;'D@=&AE(')A;F=E(&]F(&%D9')E2!$2$-0"B,@2!B92!S970@;VYL>2!F;W(@=&AI2!W:&5N('1H92!T86<@(F=R965N -M(B!I2!A('-U8FYE="!W:&EC:"!C -M86XG="!B92!U6YA;6EC(&%D9')E2!A;F0*(R!A9&0@;F%M97,@=&\@=&AE($1.4R!F;W(@=&AE($E0 -M=C8@861D2P@-#AH"@HC($1O($1(0U`@86YD(%)O=71E2!W:6QL('5S -M92!33$%!0R!F;W(@861D2!R82US=&%T96QE2!J -M=7-T"B,@;F5E9"!T;R!B92!O;B!T:&4@7,@9VEV92!T:&4@:&]S="!W:71H($5T -M:&5R;F5T(&%D9')E7,@9VEV92!T:&4@:&]S="!W -M:71H(&-L:65N="!I9&5N=&EF:65R(#`Q.C`R.C`R.C`T"B,@=&AE($E0(&%D -M9')E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ -M(G)E9"(@=&\*(R!T:&4@;6%C:&EN92!W:71H($5T:&5R;F5T(&%D9')E&5D($E0=C8@861D2!;72!A2X*(V1H8W`M:&]S=#UI9#HP,#HP,3HP -M,#HP,3HQ-CID,CHX,SIF8SHY,CID-#HQ.3IE,CID.#IB,BP@9G)E9"P@6S$R -M,S0Z.C5="@HC($EG;F]R92!A;GD@8VQI96YT2!M86-H:6YE('=H;W-E"B,@1$A#4"!V96YD;W)C;&%S -M'1R82!O<'1I -M;VYS('=H:6-H(&%R92!T86=G960@87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@ -M;VYE"B,@;V8@=VAO'1R82!O<'1I;VYS('=H:6-H(&%R -M92!T86=G960@87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO2!D;G-M -M87-Q(&%N9"!S96YD(&YO(&1E9F%U;'0*(R!R;W5T92!A="!A;&PN($YO=&4@ -M=&AA="!T:&ES(&]N;'D@=V]R:W,@9F]R('1H92!O<'1I;VYS('-E;G0@8GD* -M(R!D969A=6QT("@Q+"`S+"`V+"`Q,BP@,C@I('1H92!S86UE(&QI;F4@=VEL -M;"!S96YD(&$@>F5R;RUL96YG=&@@;W!T:6]N"B,@9F]R(&%L;"!O=&AE0H*(R!3970@=&AE(&1E9F%U;'0@=&EM92UT;RUL:79E -M('1O(#4P"B-D:&-P+6]P=&EO;CTR,RPU,`H*(R!3970@=&AE(")A;&P@2!A;B!O<'1I;VX@=VAI8V@@=VEL;"!O;FQY -M(&)E('-E;G0@=&\@=&AE(")R960B(&YE='=O2!A6]U -M(&UA>2!W86YT('1O('5N8V]M;65N="!S;VUE(&]R(&%L;"!O9B!T:&5M(&EF -M('EO=2!U7!E"@HC(%-E;F0@86X@96UP='D@5U!! -M1"!O<'1I;VXN(%1H:7,@;6%Y(&)E(%)%455)4D5$('1O(&=E="!W:6YD;W=S -M(#<@=&\@8F5H879E+@HC9&AC<"UO<'1I;VX],C4R+")<;B(*"B,@4V5N9"!2 -M1D,M,S,Y-R!$3E,@9&]M86EN('-E87)C:"!$2$-0(&]P=&EO;BX@5T%23DE. -M1SH@66]U71H:6YG(&5L&4@=&%G(&9O2YK<'AE"B-D:&-P+6)O;W0];7EB;V]T:6UA9V4*"B,@16YC87!S -M=6QA=&5D(&]P=&EO;G,@9F]R($5T:&5R8F]O="!G4%A%+B!!;&P@=&AE(&]P -M=&EO;G,@87)E"B,@96YC87!S=6QA=&5D('=I=&AI;B!O<'1I;VX@,32!C;V1E"B-D:&-P+6]P=&EO;CUE;F-A<#HQ-S4L(#$W-BP@,6(@("`@("`@ -M(R!N;RUP61H8W`*(V1H8W`M;W!T:6]N/65N8V%P.C$W-2P@,3#@V+3,R"B-D:&-P+6UA=&-H/6ET86YI8W,L(&]P=&EO;CIC;&EE;G0M87)C -M:"P@,B`C24$V-`HC9&AC<"UM871C:#UH86UM97)S+"!O<'1I;VXZ8VQI96YT -M+6%R8V@L(#8@(W@X-BTV-`HC9&AC<"UM871C:#UM86-T96QS+"!O<'1I;VXZ -M8VQI96YT+6%R8V@L(#<@(T5&22!X.#8M-C0*"B,@1&\@&4M<')O;7!T/2)0#@V4$,L("));G-T86QL($QI;G5X(BP@<'AE;&EN=7@*"B,@3&]A -M9',@/'1F='`M#@V4$,L("));G-T86QL($QI;G5X(BP@<'AE;&EN -M=7@L(#$N,BXS+C0*"B,@57-E(&)O;W1S97)V97(@;VX@;F5T=V]R:RP@9F]U -M;F0@;7D@;75L=&EC87-T(&]R(&)R;V%D8V%S="X*(W!X92US97)V:6-E/7@X -M-E!#+"`B26YS=&%L;"!W:6YD;W=S(&9R;VT@4DE3('-E#@V4$,L("));G-T86QL('=I;F1O=W,@9G)O;2!225,@2!F:6QE0HC('1H92!U&%M<&QE(&]F(&1H8W`M8F]O="!W:71H(&%N(&5X=&5R;F%L(%1& -M5%`@2`M+7!X92US97)V -M:6-E+@HC9&AC<"UB;V]T/2]V87(O9G1P9"]P>&5L:6YU>"XP+&)O;W1H;W-T -M+#$Y,BXQ-C@N,"XS"@HC($EF('1H97)E(&%R92!M=6QT:7!L92!E>'1E#TR,3`P"@HC(%1H92!$2$-0('-E6]U(&UI9VAT(&5N9"!U<"!A8V-I9&5N=&%L -M;'D@8V]N9FEG=7)I;F<@82!$2$-0"B,@2X@5&AE($E30R!S97)V97(@=7-E&5C=71A8FQE -M('=H96X@82!$2$-0(&QE87-E(&ES(&-R96%T960@;W(@9&5S=')O>65D+@HC -M(%1H92!A`HC86QI87,],2XR+C,N -M,"PU+C8N-RXP+#(U-2XR-34N,C4U+C`*(R!A;F0@=&AI"UT87)G970@9F]R(&%L;"!L;V-A;`HC(&UA8VAI;F5S+@HC;&]C86QM>`H* -M(R!2971U6]U('=A;G0@=&\@ -M3XL/'=E:6=H=#X*(R!)9B!T:&4@9&]M86EN('!A&%M<&QE+F-O;2!D;VUA:6X@=&\* -M(R!L9&%P&%M -M<&QE+F-O;2!D;VUA:6X@=&\*(R!L9&%P&%M<&QE+F-O;2PS -M.#DL,@H*(R!!(%-25B!R96-O'!A;G-I;VX@ -M9&]N92!F;W(@4U)6(')E8V]R9',@7V1O97-?;F]T"B,@;V-C=7(@9F]R(%!4 -M4B!R96-O'!A;G-I;VX@9&]N92!F;W(@4U)6 -M(')E8V]R9',@7V1O97-?;F]T"B,@;V-C=7(@9F]R(%185"!R96-O&%M<&QE(%-01BX*(W1X="UR96-O5\@=V]R:W,*(R!F;W(@=&%R9V5T3TO=F%R -M+VQO9R]D;G-M87-Q+FQO9PH*(R!);F-L=61E(&$@86YO=&AE'0*```````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````````971C+V-R;VXN9&%I -M;'DO```````````````````````````````````````````````````````` -M`````````````````````````````````````````````````````````#`P -M,#`W-34`,#`P,32]C;&5A2!C86-H92!T;R!U;'1I;6%T96QY(')E9'5C92!S=V%P<&EN9PH*7,O=FTO9')O<%]C86-H97,*```````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````````````````971C+W9M -M=V%R92UT;V]LF4@:V5P=#H@,2!-0@IV;7-V8RYM -M87A,;V=3:7IE(#T@,0H*(R!$969I;F5S('1H92`B=FUT;V]L"!S:7IE(#4P30IS:7IE(#4P30IC;VUP0HC3&ES=&5N061D7,@9F]R('!R;W1O8V]L('9E2`O971C+W-S:"]SF4@;V8@97!H -M96UE7-L;V=& -M86-I;&ET>2!!551("E-Y65S"D%U=&AO7,@:6X@+V5T8R]S65S(&EF('EO=2!D;VXG="!T'0@<&%S65S"D=34T%024-L96%N=7!#65S"@HC($%C8V5P="!L;V-A;&4M4]F9G-E="`Q,`HC6#$Q57-E3&]C86QH;W-T -M('EE65S"B-5&PR='!D```````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````,#`P,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,34`,3,U -M-C$W,C4Q-3(`,#$T-C`W`"`P```````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````'5S=&%R("``9&%R6]U('=A;G0@=&\@=7-E(&$@9&EF9F5R -M96YT(&EN=&5R9F%C92!O6]U(&EN2!F2!)4"!A9&1R97-S+`H@("`@("`@(",@>6]U(&-A;B!U7-L;V'-O8VL@(R!P7-T96T@;&]G9VEN9PHD36]D3&]A9"!I;6ML;V<@ -M("`C('!R;W9I9&5S(&ME2!R:VQO9V0I"B,D36]D3&]A9"!I;6UA7-L;V<@7-T96TN("!3<&QI="!I="!U<"!S;R!T:&%T"B,@:70@:7,@96%S>2!T -M;R!W2YL;V<* -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````````````````&5T8R]M;V1P -M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@ -M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2!C86-H92!T -M;R!U;'1I;6%T96QY(')E9'5C92!S=V%P<&EN9PH*<&AY;65M/20H9G)E97QA -M=VL@)R]>365M.B][<')I;G0@)#)])RD*:68@6R`D<&AY;65M("UL="`U,3,P -M,#`@73L@=&AE;@H@('-Y;F,@)B8@96-H;R`Q(#X@+W!R;V,O2YC;VYF```````````````````````````````````````````````` -M```````````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P -M,3$-O;FYE8W1I -M;VYS4&5R0VAI;&0@("`),3`P,`H\+TEF36]D=6QE/@H*(R!V:6TZ('-Y;G1A -M>#UA<&%C:&4@=',]-"!S=STT('-T6U,:6YK&5S($9O;&QO=U-Y;4QI;FMS($UU;'1I5FEE=W,*"0E!;&QO=T]V97)R:61E -M($%L;`H)"4]R9&5R(&%L;&]W+&1E;GD*"0EA;&QO=R!F&5C0T=)("U-=6QT:59I97=S -M("M3>6U,:6YK2QA;&QO=PH@("`@("`@($1E;GD@9G)O -M;2!A;&P*("`@("`@("!!;&QO=R!F3X*"3Q$:7)E8W1O0H)"6%L;&]W(&9R;VT@86QL"@D\+T1I3X*"@E38W)I -M<'1!;&EA0H)"4%L;&]W(&9R;VT@86QL"@D\ -M+T1I3X*"@E%T%004-(15],3T=?1$E2?2]ET%004-(15],3T=?1$E2 -M?2]S2QA;&QO=PH)"41E;GD@ -M9G)O;2!A;&P*"0E!;&QO=R!F2!T -M:&4*"2,@("!34TQ#97)T:69I8V%T949I;&4@9&ER96-T:79E(&ES(&YE961E -M9"X*"5-33$-E0H*"2,@("!397)V -M97(@0V5R=&EF:6-A=&4@0VAA:6XZ"@DC("`@4&]I;G0@4U-,0V5R=&EF:6-A -M=&5#:&%I;D9I;&4@870@82!F:6QE(&-O;G1A:6YI;F<@=&AE"@DC("`@8V]N -M8V%T96YA=&EO;B!O9B!014T@96YC;V1E9"!#02!C97)T:69I8V%T97,@=VAI -M8V@@9F]R;2!T:&4*"2,@("!C97)T:69I8V%T92!C:&%I;B!F;W(@=&AE('-E -M0H)(R`@('1H92!R969E -M2`H0T$I.@H)(R`@(%-E="!T:&4@0T$@8V5R=&EF:6-A -M=&4@=F5R:69I8V%T:6]N('!A=&@@=VAE6]U(&YE960@:&%S:"!S>6UL -M:6YK6UL:6YK7!E*3H* -M"2,@("!#;&EE;G0@8V5R=&EF:6-A=&4@=F5R:69I8V%T:6]N('1Y<&4@86YD -M(&1E<'1H+B`@5'EP97,@87)E"@DC("`@;F]N92P@;W!T:6]N86PL(')E<75I -M2!T;R!V97)I9GD@=&AE(&-E -M4-L:65N -M="!R97%U:7)E"@DC4U-,5F5R:69Y1&5P=&@@(#$P"@H)(R`@($%C8V5S6YT87@@:7,@80H)(R`@(&UI>'1UU-33%]#25!(15)]("%^(&TO7BA%6%!\3E5,3"DO(%P* -M"2,@("`@("`@("`@("!A;F0@)7M34TQ?0TQ)14Y47U-?1$Y?3WT@97$@(E-N -M86ME($]I;"P@3'1D+B(@7`H)(R`@("`@("`@("`@(&%N9"`E>U-33%]#3$E% -M3E1?4U]$3E]/57T@:6X@>R)3=&%F9B(L(")#02(L(")$978B?2!<"@DC("`@ -M("`@("`@("`@86YD("5[5$E-15]71$%9?2`^/2`Q(&%N9"`E>U1)345?5T1! -M67T@/#T@-2!<"@DC("`@("`@("`@("`@86YD("5[5$E-15](3U52?2`^/2`X -M(&%N9"`E>U1)345?2$]54GT@/#T@,C`@("`@("`@*2!<"@DC("`@("`@("`@ -M("!OU)%34]415]!1$12?2`]?B!M+UXQ.3)<+C2!E>&ES=&EN9R!W:&5N(&-L -M:65N=`H)(R`@("`@875T:&5N=&EC871I;VX@:7,@=7-E9"DN(%1H:7,@8V%N -M(&)E('5S960@=&\@:6UP;W)T('1H92!C97)T:69I8V%T97,*"2,@("`@(&EN -M=&\@0T=)('-C'!O'!E;G-I=F4@;W!E2!E;F%B;&5S('1H90H)(R`@("`@97AP;W)T871I;VX@9F]R -M($-'22!A;F0@4U-)(')E<75E'!O2`O=7-R+VQI8B]C9VDM8FEN/@H)"5-33$]P=&EO;G,@*U-T -M9$5N=E9A6]U(&-A;B!U6]U(')E8V5I=F4@ -M22]/(&5R2!A;&5R="!I2!F;W(@8G)O=W-E6]U(&MN;W<@=&AA="!T:&5I2X*"2,@("!. -M;W1I8V4Z($UO2!W86YT('1O(&1I2P@;VYE(&AA6]U(&IU2!A;'-O"B,@:&%V92!T;R!C -M:&%N9V4@=&AE(%9I6]U(&AA=F4@=7!GB!A;F0*(R!214%$ -M344N1&5B:6%N+F=Z"@I,:7-T96X@,3`N,2XQ+C$Z.#$X,`H*/$EF36]D=6QE -M(&UO9%]S0HC('1E;&P@ -M9&YS;6%S<2!T;R!F:6QT97(@;W5T('%U97)I97,@=VAI8V@@=&AE('!U8FQI -M8R!$3E,@8V%N;F]T"B,@86YS=V5R+"!A;F0@=VAI8V@@;&]A9"!T:&4@2!T:&4@2X*"B,@3F5V97(@9F]R=V%R9"!P;&%I -M;B!N86UE2X*(R!.;W1E('1H870@*&%M;VYG2!O9B!T:&4@=7!S=')E86T*(R!S97)V97)S(&ET(&MN -M;W=S(&%B;W5T(&%N9"!T2!E86-H('%U97)Y"B,@=VET:"`@96%C:"`@2`@:6X@('1H92`@;W)D97(@('1H97D@("!A<'!E87(@ -M("!I;@HC("]E=&,O2!A&%M<&QE(&]F(')O=71I;F<@4%12('%U97)I97,@=&\@ -M;F%M97-E2!D;VUA:6YS(&AE6]U('=A;G0@=&\@9F]R8V4@=&\@86X@ -M25`@861D&%M<&QE(&)E;&]W('-E;F0@86YY -M(&AO6]U('=A;G0@ -M9&YS;6%S<2!T;R!L:7-T96X@9F]R($1(0U`@86YD($1.4R!R97%U97-T&-E<'0M -M:6YT97)F86-E/6QO"@HC($]R('=H:6-H('1O(&QI2!A9&1R -M97-S("AR96UE;6)E2!$3E,@7-T96US('=H:6-H -M('-U<'!O6]U(&UA>2!N965D('1H:7,@:7,@=VAE;@HC(')U;FYI;F<@ -M86YO=&AE6]U(&1O;B=T('=A;G0@9&YS;6%S<2!T;R!R -M96%D("]E=&,O:&]S=',L('5N8V]M;65N="!T:&4*(R!F;VQL;W=I;F<@;&EN -M92X*(VYO+6AO6]U('=A;G0@:70@=&\@2!P;W1E;G1I86QL>2!S971T:6YG('1H90HC -M("`@(&1O;6%I;B!O9B!A;&P@'!A;F0M:&]S -M=',B"B-D;VUA:6X],BYV;6]P0HC(&$@;&5A6]U(&AA=F4@;6]R92!T:&%N(&]N92!N971W;W)K+"!Y;W4@ -M=VEL;"!N965D('1O"B,@2!P87)A;65T97)S(&9O&%M<&QE -M7,@7,@:70G -M2!T -M:&4@;6%C:&EN92!W:71H(&5T:&5R;F5T"B,@861D'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ -M(G)E9"(@=&\*(R!A;GD@;6%C:&EN92!W:71H(&5T:&5R;F5T(&%D9')E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ -M(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO"(*(V1H8W`M -M=F5N9&]R8VQA2!M86-H:6YE(&]N90HC -M(&]F('=H;W-E($1(0U`@=7-E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@ -M87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO2!N86UE.@HC(')U;B`B9&YS;6%S<2`M+6AE;'`@9&AC<"(@=&\@9V5T -M(&$@;&ES="X*(R!.;W1E('1H870@86QL('1H92!C;VUM;VX@2!D;G-M87-Q+B!9;W4@=F5R>2!L:6ME;'D@=VEL;"!N;W0@ -M;F5E9`HC(&%N>2!D:&-P+6]P=&EO;G,N($EF('EO=2!U2!A2!W;W)K0HC(&1E9F%U;'0@*#$L -M(#,L(#8L(#$R+"`R."D@=&AE('-A;64@;&EN92!W:6QL('-E;F0@82!Z97)O -M+6QE;F=T:"!O<'1I;VX*(R!F;W(@86QL(&]T:&5R(&]P=&EO;B!N=6UB97)S -M+@HC9&AC<"UO<'1I;VX],PH*(R!3970@=&AE($Y44"!T:6UE('-E0H*(R!3970@=&AE(&1E -M9F%U;'0@=&EM92UT;RUL:79E('1O(#4P"B-D:&-P+6]P=&EO;CTR,RPU,`H* -M(R!3970@=&AE(")A;&P@2!A;B!O<'1I -M;VX@=VAI8V@@=VEL;"!O;FQY(&)E('-E;G0@=&\@=&AE(")R960B(&YE='=O -M2!A6]U(&UA>2!W86YT('1O('5N8V]M;65N="!T:&5M -M(&EF('EO=2!U2!N971B:6]S('-C;W!E+@H*(R!396YD(%)&0RTS -M,SDW($1.4R!D;VUA:6X@2!W:&5N('1H92!C;&EE;G0@71E(&EN=&5G97(@+2!T:&%T)W,@=VAA="!M:6-R;W-O9G0@=V%N -M=',N(%-E90HC(&AT='`Z+R]T96-H;F5T,BYM:6-R;W-O9G0N8V]M+U=I;F1O -M=W-397)V97(O96XO;&EB2]A-S!F,6)B-RUD,F0T+30Y9C`M.39D-BTT -M8C2!S;VUE(&-O;F9I9W5R871I;VYS(&]F"B,@ -M171H97)B;V]T('1O(&%L;&]W(&ES('1O(')E8V]G;FES92!T:&4@1$A#4"!S -M97)V97(N"B-D:&-P+6]P=&EO;CUV96YD;W(Z171H97)B;V]T+#8P+")%=&AE -M"X@3F]T92!T:&%T -M('=E(&YE960@=&\@2!N965D"B,@=&AI2!F:6QE0HC('1H92!U&5L:6YU>"YR -M960M;F5T"@HC($%N(&5X86UP;&4@;V8@9&AC<"UB;V]T('=I=&@@86X@97AT -M97)N86P@2!C;&EE -M;G0@=VAI8V@@8G)O861C87-T6]U(&UI9VAT(&5N9"!U -M<"!A8V-I9&5N=&%L;'D@8V]N9FEG=7)I;F<@82!$2$-0"B,@2X@5&AE($E30R!S -M97)V97(@=7-E2!T:&4@:&]S=&YA;64*(R!I9B!T:&5R92!IF4@:&5R92X*(V-A8VAE -M+7-I>F4],34P"@HC($EF('EO=2!W86YT('1O(&1I2!R97-P;VYS97,@=VAI8V@@8V]M92!F;W)M("]E=&,O:&]S=',@86YD -M('1H92!$2$-0(&QE87-E"B,@9FEL92!H879E(%1I;64M5&\M3&EV92!S970@ -M87,@>F5R;RP@=VAI8V@@8V]N=F5N=&EO;F%L;'D@;65A;G,*(R!D;R!N;W0@ -M8V%C:&4@9G5R=&AE6]U(&%R92!H87!P>2!T;R!T6]U(&-A;B!S970@82!T:6UE+71O+6QI=F4@*&EN"B,@6]U('=A;G0@9&YS;6%S<2!T -M;R!D971E8W0@871T96UP=',@8GD@5F5R:7-I9VX@=&\@"!U<"!$ -M3E,@2!W;W)K"!T;R`U+C8N-RYX"B-A;&EA"UT87)G970@9F]R(&%L;"!L;V-A;`HC(&UA8VAI;F5S+@HC;&]C86QM>`H* -M(R!2971U6]U('=A;G0@=&\@ -M3XL/'=E:6=H=#X*(R!)9B!T:&4@9&]M86EN('!A&%M<&QE+F-O;2!D;VUA:6X@=&\* -M(R!L9&%P&%M -M<&QE+F-O;2!D;VUA:6X@=&\*(R!L9&%P&%M<&QE+F-O;2PS -M.#D*"B,@5'=O(%-25B!R96-O&%M<&QE+F-O;2PS.#DL,0HC&%M<&QE+F-O;2QL9&%P&%M<&QE+F-O -M;0HC&%M<&QE+F-O;0H*(R!4:&4@9F]L -M;&]W:6YG(&QI;F4@65E(%!A9V4N7VAT='`N7W1C<"YD;G,M'0M3TO=F%R+VQO9R]D -M;G-M87-Q+FQO9PH*(R!);F-L=61E(&$@86YO=&AE'0*```````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````&5T8R]I<'-E8RYS96-R971S```````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P,3PH@("`@;6%X2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P -M.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N -M71R=6YC871E"GT*```````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````````&5T8R]L;V=R;W1A=&4N -M9"]C;VYN=')A8VMD```````````````````````````````````````````` -M```````````````````````````````````````````````````````P,#`P -M-C0T`#`P,#$W-3``,#`P,3PH@("`@;6%X6-O;7!R97-S"@H@("`@<&]S=')O=&%T90H@("`@("`@(&EF -M(%L@+64@+W9A2!O9B!T:&4@3&EC96YS92!A -M=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O -M'!R97-S(&]R(&EM<&QI960N("!3 -M964@=&AE($QI8V5NPH@("`@("`@(')O -M=&%T92`U"B`@("`@("`@;6%X2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N'-I>F4@,3!- -M"B`@("`@("`@;6ES0H@("`@("`@ -M(&-O;7!R97-S"B`@("`@("`@8V]P>71R=6YC871E"GT*```````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````!E=&,O;&]G0H)8V]M<')E71R=6YC871E"B`@("`@("!R;W1A=&4@,PH@("`@("`@8V]M<')E'0*("`@("`@(&UA>'-I>F4@,3!-"B`@("`@("!N;W1I9F5M -M<'1Y"GT*```````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````&5T8R]L;V=R;W1A=&4N9"]R0H)8V]M<')E -M2YL;V<@>PH@("`@0H@("`@;6%X7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ -M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E -M(&%T"B,*(R`@(&AT='`Z+R]W=W2\````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````,#`P,#'DN8V9G```````````````````````````````````````````` -M```````````````````````````````````````````````````````````P -M,#`P-C0T`#`P,#$W-3``,#`P,3'D*"75S97(@:&%P0H)9W)O -M=7`@:&%P0H)9&%E;6]N"@ID969A=6QT7!E(CHB9W5E2(Z(C$W,BXQ-BXQ+C$B+`H)(F1E9F%U -M;'1?96YT2(*?0H````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````;W!T+V-L;W5D+W1E7!E(CH@(FEC;7`B"B`@("`@("`@("`@('TL"B`@("`@("`@("`@ -M('L*("`@("`@("`@("`@("`@(")A;&QO=V5D(CH@=')U92P*("`@("`@("`@ -M("`@("`@(")C:61R(CH@(C$P+C`N,BXP+S@B+`H@("`@("`@("`@("`@("`@ -M(F9I7!E(CH@(G5D<"(*("`@("`@("`@ -M("`@?2P*("`@("`@("`@("`@>PH@("`@("`@("`@("`@("`@(F%L;&]W960B -M.B!T7!E(CH@(FYE='=OR)P=6)L:6-?:7`B.B(Q -M,"XP+C(N,3`R(BP*(G-O=7)C95]N870B.G1R=64L"B)A9&0B.G1R=64L"B)O -M;F5?=&]?;VYE7VYA="(Z9F%L2(Z(C$P+C`N,BXQ(BP*(FYE=&UA2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H -M92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2!C;61?;&EN92YJ2!I<',P,#`Q+FIS;VX*+V]P="]C;&]U9"]B:6XO -M=7!D871E7V-O;F9I9RYP>2!I<',P,#`R+FIS;VX*+V]P="]C;&]U9"]B:6XO -M=7!D871E7V-O;F9I9RYP>2!I<',P,#`S+FIS;VX*```````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````;W!T+V-L;W5D+W1ER)P -M=6)L:6-?:7`B.B(Q,"XP+C(N,3`S(BP*(G-O=7)C95]N870B.G1R=64L"B)A -M9&0B.G1R=64L"B)O;F5?=&]?;VYE7VYA="(Z9F%L2(Z(C$P+C`N,BXQ(BP*(FYE=&UAPH)(FQO8V%L7W!U8FQI8U]I<"(Z(C$W,BXQ-BXQ -M+C$B+`H)(FQO8V%L7V=U97-T7V-I9'(B.B(Q-S(N,38N,2XP+S(T(BP*"2)L -M;V-A;%]P=6)L:6-?9V%T97=A>2(Z(C$W,BXQ-BXQ+C$B+`H)(G!E97)?9V%T -M97=A>5]I<"(Z(C$P+C(P,"XR,#`N,2(L"@DB<&5E2(Z(C-D97,M;60U(BP* -M"2)I:V5?<&]L:6-Y(CHB,V1E7)I9VAT(&]W -M;F5R6]U -M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O -M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W -M=W2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NW!R:6YT("0Y.WTG*0H):68@ -M6R`D4D]55$527U-4051%(#T@(E50(B!="@ET:&5N"@D@("`@4U1!5%53/4U! -M4U1%4@H)96QI9B!;("123U5415)?4U1!5$4@/2`B1$]73B(@70H)=&AE;@H) -M("`@(%-405154SU"04-+55`*"69I"F9I"@IE8VAO(")3=&%T=7,Z("1[4U1! -M5%53?2(*```````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````!O<'0O8VQO=60O=&5M<&QA=&5S+VAE87)T8F5A="YS:"YT96UP;``` -M```````````````````````````````````````````````````````````` -M````````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC -M"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ -M=&AE($QI8V5N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H -M='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI -M8V5NPH@("`@36]D -M92!&5$97('L*("`@("`@("`C"B`@("`@("`@(R!3:7IE(&]F('1H92!R97-E -M;F0@<75E=64@*&EN(&]B:F5C=',I+B!4:&ES(&ES('1H92!M87AI;75M"B`@ -M("`@("`@(R!N=6UB97(@;V8@;V)J96-T2!T;R!S=&]R92!D96%D(&]B:F5C=',N"B`@("`@("`@(R!$969A -M=6QT(&ES(#$S,3`W,B!O8FIE8W1S+@H@("`@("`@(",*("`@("`@("`C(%)E -M6]U('-E="!A(&QO=R!V86QU92P@5$-0(&5N -M=')I97,@:6X*("`@("`@("`C($5S=&%B;&ES:&5D('-T871E&%M<&QE+`H@("`@("`@(",@86X@ -M4U-((&-O;FYE8W1I;VX@=VET:&]U="!+965P06QI=F4@96YA8FQE9"X@268@ -M;F]T('-E="P*("`@("`@("`C('1H92!D865M;VX@=7-E6]U(&1E -M8W)E87-E('1H:7,*("`@("`@("`C('9A;'5E+"!T:&4@;G5M8F5R(&]F(&%C -M:VYO=VQE9V1M96YT6]U"B`@("`@("`@(R!I;F-R96%S -M92!T:&ES('9A;'5E+"!T:&4@'!E6-L97,@6]U('1O(&1I -M'1E'1E -MF%T:6]N -M(&UE2!O9B!Y;W5R(&5X:7-T:6YG(&EN=&5R9F%C97,N($EF -M(&%N>2!D;W5B="P*("`@("`@("`C(&1O(&YO="!M;V1I9GD@=&AI0H@("`@("`@(",@9&]U -M8G0L(&1O(&YO="!M;V1I9GD@=&AIF%T:6]N(&UEF%T:6]N(&UE6]U"B`@("`@ -M("`@(R!N;W1I8V4@6]U(&UA>2!W86YT('1O -M(&EN8W)E87-E('1H92!S:7IE"B`@("`@("`@(R!O9B!T:&4@2!T;R!A8VAI979E(&9A=6QT+71O;&5R86YC92X@26X@ -M8V%S92!O9B!D;W5B="P@9&\*("`@("`@("`C(&YO="!M;V1I9GD@=&AI6]U(&-A;B!O;FQY('-E;&5C="!O;F4N"B`@("`C"B`@("`C(%5$4"![ -M"B`@("`@("`@(PH@("`@("`@(",@5410(&%D9')E6]U(&%R92!G;VEN9R!T;R!UF4*("`@("`@("`C"B`@("`@("`@ -M(R!28W93;V-K971"=69F97(@,3(T.3(X,`H*("`@("`@("`C"B`@("`@("`@ -M(R!%;F%B;&4O1&ES86)L92!M97-S86=E(&-H96-KPH@("`@(PH@("`@(R!3970@=&AE -M(&YI8V4@=F%L=64@;V8@=&AE(&1A96UO;BP@=&AI6]U(&-A;B!S96QE8W0@8F5T=V5E -M;@H@("`@(R!24B!A;F0@1DE&3R!A;F0@=&AE('!R;V-EPH@("`@(R`@(%1Y<&4@1DE&3PH@("`@(R`@(%!R:6]R:71Y -M(#DY"B`@("`C('T*"B`@("`C"B`@("`C($YU;6)E2X*("`@(",@4F5A9"!S;VUE(&1O8W5M96YT -M2!K965P -M('-O;64@9&5A9"!E;G1R:65S(&-A8VAE9"!F;W(@<&]S7-L;V2!N86UE -M("AD865M;VX@*&1E9F%U;'0I(&]R(&QO8V%L,"XN-RD*("`@(",@1&5F875L -M=#H@;V9F"B`@("`C"B`@("!3>7-L;V<@;VX*"B`@("`C"B`@("`C($QO8VMF -M:6QE"B`@("`C"B`@("!,;V-K1FEL92`O=F%R+VQO8VLO8V]N;G1R86-K9"YL -M;V-K"@H@("`@(PH@("`@(R!5;FEX('-O8VME="!C;VYF:6=UF5-87A'&%M<&QE(&-O;F9I9W5R -M871I;VX@9FEL92!S971S('1H90H@("`@(R!S:7IE('1O(#(@34)Y=&5S('1O -M(&%V;VED('1H:7,@F4*("`@(",@:68@:70@9&5T96-T&EM=6T@8G5F9F5R('-I>F4@9W)O=W1H('1H870@8V%N(&)E(')E86-H -M960N(%1H:7,@97AA;7!L92!F:6QE"B`@("`C('-E=',@=&AE('-I>F4@=&\@ -M."!-0GET97,N"B`@("`C"B`@("!.971L:6YK0G5F9F5R4VEZ94UA>$=R;W=T -M:"`X,S@X-C`X"@H@("`@(PH@("`@(R!)9B!T:&4@9&%E;6]N(&1E=&5C=',@ -M=&AA="!.971L:6YK(&ES(&1R;W!P:6YG('-T871E+6-H86YG92!E=F5N=',L -M"B`@("`C(&ET(&%U=&]M871I8V%L;'D@6YC:')O -M;FEZ871I;VX@86=A:6YS="!T:&4@2V5R;F5L"B`@("`C(&%F=&5R(#,P('-E -M8V]N9',@*&1E9F%U;'0@=F%L=64I+B!297-Y;F-H6]U('=A;G0@6YC+B!4:&ES(&]P=&EO;B!I"!K97)N96P@/CT@ -M,BXV+C,Q+@H@("`@(PH@("`@(R!.971L:6YK179E;G1S4F5L:6%B;&4@3V9F -M"@H@("`@(PH@("`@(R!">2!D969A=6QT+"!T:&4@9&%E;6]N(')E8V5I=F5S -M('-T871E('5P9&%T97,@9F]L;&]W:6YG(&%N"B`@("`C(&5V96YT+61R:79E -M;B!M;V1E;"X@66]U(&-A;B!M;V1I9GD@=&AIF%T:6]N(&UO -M9&4L('1H92!P;VQL:6YG(&UO9&4@8V%N(&]N;'D@9W5AF5S('1H92!H86YD;&EN9R!O9B!S -M=&%T92UC:&%N9V4@979E;G1S(&-O;6EN9PH@("`@(R!F2`H:6X@ -M=&5R;7,@;V8*("`@(",@2!T:')E92!F:6QT97(M6]U(&-A;B!D969I;F4@=&AE(&5V -M96YT(&9I;'1E2!A=F]I -M9&EN9R!T:&4@8V]P>2!O9B!T:&4@979E;G0@;65S6]U(')E<75I"!K97)N96P@/CT@,BXV+C(Y('1O"B`@("`C -M(&9I;'1E6]U('=A;G0@=&\@PH@ -M("`@("`@(",*("`@("`@("`C($%C8V5P="!O;FQY(&-E65R(#0@<')O -M=&]C;VPN"B`@("`@("`@(PH@("`@("`@(%!R;W1O8V]L($%C8V5P="!["B`@ -M("`@("`@("`@(%1#4`H@("`@("`@("`@("!30U10"B`@("`@("`@("`@($1# -M0U`*("`@("`@("`@("`@5410"B`@("`@("`@("`@($E#35`@(R!4:&ES(')E -M<75I2!A;&P@=&AE"B`@("`@("`@(R!)4"!A -MPH@("`@("`@("`@ -M("!)4'8T7V%D9')E2!A;B!)4'8V(&%D9')E2!F;&]W('-T871E+@H@("`@("`@(",@5&AI -M2!B86-K=7`*("`@("`@("`C(&9I -M7!E/6YO=&EF>0H@("`@4WES=&5M9"!O;@I]"@`````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````!O<'0O8VQO=60O=&5M -M<&QA=&5S+V-H96-K7VAE87)T8F5A="YS:"YT96UP;``````````````````` -M````````````````````````````````````````````````````````,#`P -M,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7-T96UC=&P@2`M+69A=6QT"@H@("`@<&MI;&P@+3D@:V5E<&%L:79E9"`^/B`D4D]55$52 -M7TQ/1R`R/B8Q('Q\('1R=64*("`@('!K:6QL("TY(&-O;FYT&ET"F9I"@``````````````;W!T+V-L;W5D+W1E;7!L871E -M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI -M86YC90HC('=I=&@@=&AE($QI8V5N6]U -M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HA -M('=I=&@@=&AE($QI8V5NPH@("`@PH@("`@("`@(&AE87)T -M8F5A=`H@("`@?0H*("`@(&YO=&EF>5]B86-K=7`@(B]O<'0O8VQO=60O8FEN -M+VUA2`M+6)A8VMU<"(*("`@(&YO=&EF>5]M87-T97(@(B]O<'0O -M8VQO=60O8FEN+VUA2`M+6UA5]F875L -M="`B+V]P="]C;&]U9"]B:6XO;6%S=&5R+G!Y("TM9F%U;'0B"GT*```````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````!O<'0O8VQO=60O8FEN+P`````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````,#`P,#&4N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&ET(#$*?0H*&5?8V9G7V9I;&5N86UE(#P\14]&"D1%1D%53%0@ -M9&5F875L=`I04D]-4%0@,0I424U%3U54(#(V"D1)4U!,05D@8F]O="YMF4]-C8P,#`@:6YI=')D/21I;FET0`````````````````````````````````````````` -M````````````````````````````````````````````,#`P,#2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA -M=R!O'!R97-S(&]R(&EM<&QI960N -M("!3964@=&AE($QI8V5N7!E(ET@/3T@(G-T871I8VYA -M=')U;&5S(CH*("`@("`@("`@("`@;F5W7!E(ET@/3T@(F9O"`](&1B86=;"AF;W)W87)D*0H@("`@("`@("`@("`@("`@("`@(&EF(&YO -M="!I;F1E>"`]/2`M,3H*("`@("`@("`@("`@("`@("`@("`@("`@9&)A9UMS -M;W5R8V5?:7!=6VEN9&5X72`](&YE=W)U;&4*("`@("`@("`@("`@("`@("`@ -M("!E;'-E.@H@("`@("`@("`@("`@("`@("`@("`@("!D8F%G6W-O=7)C95]I -M<%TN87!P96YD*&YE=W)U;&4I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@ -M("`@("`@("`@("`@("`@(&1B86=;7!E(ET@/3T@ -M(G-T871I8VYA=')U;&5S(CH*("`@("`@("`@("`@("`@(&EF('-O=7)C95]I -M<"!I;B!D8F%G+FME>7,H*3H*("`@("`@("`@("`@("`@("`@("!D96P@9&)A -M9UMS;W5R8V5?:7!="B`@("`@("`@("`@(&5L:68@7,H*3H*("`@("`@("`@("`@("`@("`@("!I;F1E>"`] -M("TQ"B`@("`@("`@("`@("`@("`@("`@9F]R(&9O%T*"B`@("!R971U2!T:&4@<'5B;&EC('-I9&4L -M('1H;W-E(&UU7!E(ET@/3T@7!E(ET@/3T@(G-T871I -M8VYA="(Z"B`@("`@("`@2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET(#$*9FD*"G5S86=E*"D@ -M>PH@('!R:6YT9B`B57-A9V4Z("5S("U;8WQG?')\;GQD72!;+6P@/'!U8FQI -M8R!G871E=V%Y/ET@6RUV(#QV<&,@8VED&ET(#(@)&QO8VL@)&QO8VME9`H).SL*("!E -M&ET("0_("1L;V-K("1L;V-K960*9FD*"FEF -M(%L@(B1N9FQA9R(@/3T@(C$B(%T*=&AE;@H@("-G971?=G!N7W5S86=E"B`@ -M=6YL;V-K7V5X:70@)#\@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)&1F;&%G -M(B`]/2`B,2(@70IT:&5N"B`@(W)E;6]V95]U&ET(#`@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)')F;&%G(B`]/2`B -M,2(@70IT:&5N"B`@71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A -M=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&-E -M<'0@24]%2@I"B`@("`@("`@("`@ -M("`@("`@("`@9W5E22R)$;VU57U)E<75E&-E<'0@17AC97!T:6]N(&%S(&4Z -M"B`@("`@("`@("`@("`@("`@("`@;&]G9VEN9RYE7!E)UT@/3T@)V%L;"<@86YD(&]B:ELG -M7!E(#T@(F%N>2(*("`@("`@("`@("`@:68@(FEC -M;7!?='EP92(@:6X@7,H*2!A;F0@7!E)UT*("`@("`@("`@("`@:68@(FEC;7!? -M8V]D92(@:6X@7,H*2!A;F0@7!E)UTL('-E;&8N7!E("5S("UJ("5S(B`E("AI8VUP7W1Y<&4L('-E;&8N&5C=71E*&1S=$EP2==.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5; -M)V%C=&EO;B==(#T@(D%#0T505"(*("`@("`@("`@("`@("`@("`@("!E;'-E -M.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5;)V%C=&EO;B== -M(#T@(D123U`B"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ -M("`@("`@(",@1F]R(&]T:&5R(')U;&5S(&%D9&5D+"!I9B!D969A=6QT7V5G -M7!E("5S(B`E(&EC;7!?='EP90H@("`@("`@("`@("`@ -M("`@96QI9B!R=6QE6R=P7!E -M+B!3;RP@:71S(&9W(&%T=')I8G5T92!I7!E(#T@ -M(F%N>2(*("`@("`@("`@("`@("`@('-E;&8N<')O=&]C;VP@/2!S96QF+G1Y -M<&4*("`@("`@("`@("`@("`@(&EF(")I8VUP7W1Y<&4B(&EN(')U;&4N:V5Y -M7!E -M+"!R=6QE6R=I8VUP7V-O9&4G72D*("`@("`@("`@("`@("`@(&EF('-E;&8N -M='EP92`]/2`B<')O=&]C;VPB.@H@("`@("`@("`@("`@("`@("`@(&EF(')U -M;&5;)W!R;W1O8V]L)UT@/3T@-#$Z"B`@("`@("`@("`@("`@("`@("`@("`@ -M(')U;&5;)W!R;W1O8V]L)UT@/2`B:7!V-B(*("`@("`@("`@("`@("`@("`@ -M("!S96QF+G!R;W1O8V]L(#T@&5C=71E*")I<'1A -M8FQE+4$O:7!T86)L97,@+70@9FEL=&5R("U$+V&5C=71E*")I -M<'-E="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP -M&5C=71E*")I<'-E="`M -M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP2!V -M86QI9"!D871A"B`@("`@("`@("`@("`@("!I9B!F;VQD97(@(3T@(G5S97)D -M871A(B!A;F0@9F]L9&5R("$](")M971A9&%T82(Z"B`@("`@("`@("`@("`@ -M("`@("`@8V]N=&EN=64*"B`@("`@("`@("`@("`@("!I9B!F:6QE(#T]("(B -M.@H@("`@("`@("`@("`@("`@("`@(&-O;G1I;G5E"@H@("`@("`@("`@("`@ -M("`@7,N97AI="@Q*0H@("`@("`@("`@("!I9B!O2Q!;&QO=UQN1&5N>2!F2!E>&ES=',L('=E(&1O(&ET('1H:7,@ -M=V%Y(&9O7,N97AI="@Q -M*0H*("`@("`@("!F:"`](&]P96XH:'1A8V-E2`](")2 -M97=R:71E4G5L92!>;65T82UD871A+R@N*RDD("`N+B\B("L@9F]L9&5R("L@ -M(B\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%=(@H@("`@("`@("`@("!H -M=&%C8V5S7,N97AI="@Q*2`@ -M(R!&25A-10H@("`@("`@(')E='5R;B!4&ET*#$I("`C($9)6$U%"B`@("`@("`@:7!S96,N=G!N+2@N*BDN8V]N9B(L(&9I;&4I"B`@("`@ -M("`@("`@(&EF(&TZ"B`@("`@("`@("`@("`@("!S96QF+F-O;F9I<',N87!P -M96YD*&TN9W)O=7`H,2DI"@H@("`@("`@(&9O&5C=71E*")I<'-E -M8R!R96QO860B*0H*("`@(&1E9B!C;VYF:6=U#4R-2`M:B!!0T-%4%0B("4@9&5V72D*("`@ -M("`@("!F;W(@;F5T(&EN(&]B:ELG<&5E&UA&UA5]I<"=="B`@("`@("`@<&5E7!E/71U;FYE;"(I"B`@ -M("`@("`@9FEL92YA9&1E<2@B(&%U=&AB>3US96-R970B*0H@("`@("`@(&9I -M;&4N861D97$H(B!K97EE>&-H86YG93UI:V4B*0H@("`@("`@(&9I;&4N861D -M97$H(B!I:V4])7,B("4@:6ME<&]L:6-Y*0H@("`@("`@(&9I;&4N861D97$H -M(B!I:V5L:69E=&EM93TE3TS,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1T:6UE;W5T/3$R -M,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1A8W1I;VX]')A;F=E*#,I.@H@("`@("`@("`@("!R -M97-U;'0@/2!#&5C=71E*"=I<'-E8R!S=&%T=7,@=G!N+25S -M('P@9W)E<"`B)7,B)R`E("AR:6=H='!E97(L('!E97)L:7-T+G-P;&ET*"(L -M(BP@,2E;,%TI*0H@("`@("`@("`@("!I9B!L96XH2P@)R,G*0H@("`@("`@(&EF(&YO="!U&5C -M=71E*")T9&)D=6UP("]V87(O&5C=71E*"=K:6QL("TY("5S)R`E('!I9"D*"@IC;&%S&5C=71E*")S>7-T96UC=&P@2YS96-R971S(B`E("AS96QF+E903D-/3D9$25(I"B`@("`@ -M("`@>&PR='!D8V]N9F9I;&4@/2`B+V5T8R]X;#)T<&0O>&PR='!D+F-O;F8B -M"B`@("`@("`@>&PR='!O<'1I;VYS9FEL92`]("(O971C+W!P<"]O<'1I;VYS -M+GAL,G1P9"(*"B`@("`@("`@;&]C86QI<"`](&]B:ELG;&]C86Q?:7`G70H@ -M("`@("`@(&QO8V%L8VED2`Z(%!32R!<(B5S7"(B("4@*&QE9G0L('!S:RDI"B`@("`@ -M("`@&PR='!D8V]N9F9I;&4I"B`@("`@("`@>&PR='!D8V]N9BYA9&1E<2@B -M:7`@&PR='!O<'1I;VYS+F-O;6UI="@I"@H@("`@9&5F(')E;6]T96%C8V5S4EP*'-E;&8L(&EP82DZ"B`@("`@("`@9F]R(&EN -M=&5R9F%C92!I;B!S96QF+F-O;F9I9RYA9&1R97-S*"DN9V5T7VEN=&5R9F%C -M97,H*3H*("`@("`@("`@("`@:68@:6YT97)F86-E+FEP7VEN7W-U8FYE="AI -M<&$I.@H@("`@("`@("`@("`@("`@2@I"B`@("`@("`@4EP*')U -M;&5;)W!U8FQI8U]I<"==*0H@("`@("`@(&EN=&5R;F%L7V9W:6YT97)F86-E -M(#T@4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI"B`@ -M("`@("`@<'5B;&EC7V9W<&]R=',@/2!S96QF+G!O4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI+`H@ -M("`@("`@("`@("`@("`@&UA2(Z"B`@("`@("`@("`@(&9W7W!R97)O=71?2(Z"B`@("`@("`@ -M("`@(&9W7W!O2(Z"B`@("`@("`@("`@ -M(&9W7W!O2(Z"B`@("`@("`@ -M("`@(&9W7V]U='!U=%]R=6QE("L]("(@+2UD<&]R="`E2(Z"B`@("`@("`@("`@(&9W -M7V]U='!U=%]R=6QE("L]("(Z(B`K('-E;&8N<&]R='-4;U-T4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI -M+`H@("`@("`@("`@("`@("`@&9F9F9F9F9F("TM -M8W1M87-K(#!X9F9F9F9F9F8B("4*("`@("`@("`@("`@("`@("`@("`@("`@ -M4EP*')U;&5;(FEN=&5R;F%L7VEP -M(ETI+"!S96QF+F=E=$=U97-T27`H*2E=*0H*"F-L87-S($EP5&%B;&5S17AE -M8W5T;W(Z"@H@("`@8V]N9FEG(#T@3F]N90H*("`@(&1E9B!?7VEN:71?7RAS -M96QF+"!C;VYF:62!PR)P&5C=71OR)P&5C -M=71OR)P -M&5C=71O7!E.B`E&5C27!T86)L97,H8V]N9FEG*3H* -M("`@("`@("!L;V=G:6YG+F1E8G5G*")0&5C=71O7,H*3H*("`@("`@("`@("`@ -M97AE8T1A=&%B86&5C27!T -M86)L97,H8V]N9FEG*0H@("`@96QI9B!J&5C27!T86)L97,H -M8V]N9FEG*0H@("`@96QS93H*("`@("`@("!L;V=G:6YG+G=A7!E/25S(B`E("AP6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7)I9VAT(&]W;F5R6]U('5N9&5R('1H -M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C -M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7)I -M9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT -M='`Z+R]W=W&5C=71I;F'!O2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&QO9V=E -M&ET(#(@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)$%F;&%G(B`] -M/2`B,2(@70IT:&5N"B`@861D7W-N870@("1P=6)L:6-)<`H@('5N;&]C:U]E -M>&ET("0_("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1$9FQA9R(@/3T@(C$B -M(%T*=&AE;@H@(')E;6]V95]S870@("1P=6)L:6-)<`H@('5N;&]C:U]E>&ET -M("0_("1L;V-K("1L;V-K960*9FD*"G5N;&]C:U]E>&ET(#$@)&QO8VL@)&QO -M8VME9`H````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````````````````;W!T+V-L -M;W5D+V)I;B]V<&-?2!O9B!T:&4@3&EC96YS92!A=`HC"B,@ -M("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE -M($QI8V5N5]T86)L92@I('L*("!L;V-A;"!F5]T86)L92`B -MPH@(&QO8V%L(')U -M;&4])#$*("!L;V-A;"!I<#TD*&5C:&\@)')U;&4@?"!C=70@+60Z("UF,2D* -M("!I9B!;("1I<"`]/2`B4F5V;VME(B!="B`@=&AE;@H@("`@3TD9V%T97=A>2!C:61R/21C -M:61R(@H@(&QO8V%L(&1E=CTD*&=E=$5T:$)Y27`@)&EP*0H@(&EF(%L@)#\@ -M+6=T(#`@70H@('1H96X*("`@(')E='5R;B`Q"B`@9FD*("!S=61O(&EP(')O -M=71E(&%D9"`D8VED3TD9V%T97=A>2!C:61R/21C:61R(@H@ -M(')E='5R;B`D&ET(#(@)&QO8VL@)&QO8VME -M9`H@("`@("`@(#L["B`@97-A8PID;VYE"@II9B!;("UN("(D6EN9R!F=R!R=6QE -M&ET("1S=6-C97-S("1L;V-K("1L;V-K960*```````` -M``````````````````````````````!O<'0O8VQO=60O8FEN+V)A0`````````````````````````````````````````````````` -M````````````````````````````````````````````,#`P,#7)I9VAT(&]W;F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* -M(R`@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI -M8V5N&5C=71A8FQE/2&-E<'1I;VX@86YD('-E;&8N<')O8V5S&5C=71E('-H96QL(&-O;6UA;F0Z("5S -M)R`E('-E;&8N8VUD*0H@("`@("`@("`@("!E2<@:6X@<#H*("`@ -M("`@("`@("`@("`@("`@("`@("`@&-E<'1I;VXH)V-A;FYO="!F:6YD(&)A2!I;B`E&-E<'1I;VXH)V-A;FYO="!F:6YD -M(&AO2P@PH@("`@("`@("`@("`B87!I2V5Y(CH@87!I:V5Y+`H@ -M("`@("`@("`@("`B8V]M;6%N9"(Z("=N;W1I9GE"87)E;65T86Q07,H*2P@4)A3TE2P@5]P2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ -M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&EP=&%B;&5S -M+7-A=F5\9W)E<"`B24Y0550@+6H@3D545T]22U]35$%44R(@/B`O9&5V+VYU -M;&P*("!I9B!;("0_("UE<2`P(%T*("!T:&5N"B`@("`@(')E='5R;B`D/PH@ -M(&9I"B`@:7!T86)L97,@+4X@3D545T]22U]35$%44R`^("]D978O;G5L;`H@ -M(&EP=&%B;&5S("U)($9/4E=!4D0@+6H@3D545T]22U]35$%44R`^("]D978O -M;G5L;`H@(&EP=&%B;&5S("U)($E.4%54("UJ($Y%5%=/4DM?4U1!5%,@/B`O -M9&5V+VYU;&P*("!I<'1A8FQEPH@(&EP=&%B -M;&5S("U,($Y%5%=/4DM?4U1!5%,@+6X@+78@+7@@?"!A=VL@)R0Q('X@+UY; -M,"TY72LD+R![('!R:6YT9B`B)7,Z(BP@)#)])SL@/B`O9&5V+VYU;&P*("!I -M9B!;("UF("]R;V]T+W)E;6]V9616:69S(%T@.R!T:&5N(&EP=&%B;&5S("U: -M($Y%5%=/4DM?4U1!5%,@.R!F:3L@/B`O9&5V+VYU;&P*("`O&ET("0_("1L;V-K("1L -M;V-K960*9FD*"FEF(%L@(B1A9FQA9R(@/3T@(C$B(%T*=&AE;@H@("-A9&1? -M<'5B;&EC7VEN=&5R9F%C92`D<'5B;&EC268*("!U;FQO8VM?97AI="`D/R`D -M;&]C:R`D;&]C:V5D"F9I"@II9B!;("(D9&9L867)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&ET(#$*9FD*"G-E="`M>`IU2(*"FEF(%L@)#\@+65Q(#`@70IT:&5N -M"B`@("!T/6!D871E("LE2(*:68@6R`D/R`M;F4@ -M,"!="B`@('1H96X*("`@("`@*&-R;VYT86(@+6P@.V5C:&\@+64@(B-M;VYI -M=&]R:6YG0V]N9FEG7&Y32$5,3#TO8FEN+V)A2(I('P@8W)O;G1A8B`M"B`@("`@(&QO9V=E2!F;W(@;6]N:71O6]U(&UA>2!N;W0@=7-E('1H:7,@ -M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NWT*("`@(&9OF4G72`]('-T&QE;BD*("`@(&EF("=N=U]T>7!E)R!N;W0@:6X@:7`N:V5Y7!E)UT@/2`G<'5B;&EC)PH@("`@96QS93H* -M("`@("`@("!I<%LG;G=?='EP92==(#T@:7!;)VYW7W1Y<&4G72YL;W=E7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C -M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F -M('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5LP77T*"B`@("`@("`@("`@ -M("`@("!T;T1A=&5686P])"AD871E("UD("(D9&%T979A;"(@(BLE7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z -M+R]W=W0IE:F5C -M="!\?"!T0IS>7-T96UC=&P@7-T96UD+6IO=7)N -M86QD"@I465!%/20H9W)E<"`M4&\@)W1Y<&4]7$M;82UZ02U:72HG("]V87(O -M8V%C:&4O8VQO=60O8VUD;&EN92D*:68@6R`B)%194$4B(#T](")R;W5T97(B -M(%T@?'P@6R`B)%194$4B(#T](")V<&-R;W5T97(B(%T@?'P@6R`B)%194$4B -M(#T](")D:&-P"`O;W!T+V-L;W5D+V)I -M;B]U<&1A=&5?8V]N9FEG+G!Y(%T*("!T:&5N"B`@("`O;W!T+V-L;W5D+V)I -M;B]U<&1A=&5?8V]N9FEG+G!Y(&-M9%]L:6YE+FIS;VX@?'P@=')U90H@(&9I -M"F9I"@I;("$@+68@+W9A7-T96UD+W-S:&0@;65M;W)Y(&QE86L@+2!H='1P7-T96UD+VES7-T -M96UD+75S97(*"B,@16YA8FQE(&%N9"!3=&%R="!34T@*7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R -M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T -M"B,*(R`@(&AT='`Z+R]W=W2!S=&]R86=E('-Y7`])$A94$525DE33U(*("!I9B!; -M("(D:'EP(B`]/2`B=FUW87)E(B!=('Q\(%L@(B1H>7`B(#T](")H>7!E5]H='1P"B`@83)E;FUO9"!H96%D97)S"@H@(&-A="`^+V5T8R]A -M<&%C:&4R+V-OTA45%!3?2`];VX*4F5W7,@"UR97%U97-T960M=VET:"P@0V]N=&5N="U4 -M>7!E+"!O6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I -M="`B4V5T=&EN9R!U<"!);G1E&5C=71E(&EL8G9M('-V8W,B"B`@97AI="`Q"F9I"G-E -M='5P7VEL8G9M"@`````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````!O<'0O8VQO=60O8FEN+W-E='5P+W9P8W)O=71E2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N7-T96T@=FTB"@H@(&EF(%L@+68@ -M+V5T8R]H;W-TB`D1$]-04E.(%T@)B8@ -M1$]-04E./2)C;&]U9&YI;F4N:6YT97)N86PB"B`@(T1.4R!S97)V97(@=VEL -M;"!A<'!E;F0@)$1/34%)3B!T;R!L;V-A;"!Q=65R:65S"B`@6R-=*FQO8V%L/2XJ)"]L;V-A;#U<+R1$3TU!24Y< -M+R\B("]E=&,O9&YS;6%S<2YC;VYF"@H@(&-O;6UA;F0@+78@9&AC<%]R96QE -M87-E(#X@+V1E=B]N=6QL(#(^)C$*("!N;U]D:&-P7W)E;&5A&ET(#$*9FD*2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&EF(%L@(B1(65!%4E9)4T]2(B`A/2`B=FUW87)E(B!=.R!T:&5N -M"B`@("!R971U6YC"B`@2]L;V=R;W1A=&4@+V5T8R]C2`R/B8Q"B`@9FD*?0H*6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ -M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I="`B -M4V5T=&EN9R!U<"!%;&%S=&EC($QO860@0F%L86YC97(@7)I9VAT(&]W;F5R6]U('5N9&5R('1H -M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C -M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7!EPH@(&EF(%L@+60@+W!R;V,O>&5N(%T[('1H96X*("`@ -M(&UO=6YT("UT('AE;F9S(&YO;F4@+W!R;V,O>&5N"B`@("`D*&1M97-G('P@ -M9W)E<"`M<2`B6&5N($A632(I"B`@("!I9B!;("0_("UE<2`P(%T[('1H96X@ -M(",@,3U05BPP/4A630H@("`@("!E8VAO(")X96XM:'9M(B`F)B!R971UF5D(&%S($AY -M<&5R=B!W:&5N(%9IPH@(%L@(2`M9"`O<')O -M8R]X96X@72`F)B!S960@+6D@)W,O7G9C+R-V8R\G("]E=&,O:6YI='1A8B`F -M)B!T96QI;FET('$*("!;("UD("]P -M(W9C+W9C+R<@+V5T8R]I;FET=&%B("8F('1E;&EN:70@<0H*("!S>7-T96UC -M=&P@9&%E;6]N+7)E;&]A9`H*("!C87-E("1(65!%4E9)4T]2(&EN"B`@("`@ -M>&5N+7!V?'AE;BUD;VU5*0H@("`@("`@("`@7-T -M96UC=&P@7-T96UC=&P@9&ES86)L92!N -M='!D"B`@("`@("`@("!S>7-T96UC=&P@96YA8FQE('AE+61A96UO;@H@("`@ -M("`@("`@&5N=&]O;',@;F]T(&EN7Q#3TY&24=? -M2$]44$Q51U]00TE?04-023UY)R`O8F]O="]C;VYF:62`M -M3"`Q,34R,#`@='1Y4S`@=G0Q,#(B("]E=&,O:6YI='1A8@H@("`@("`@("`@ -M7-T96UC=&P@2!C;61L -M:6YE(&9I;&4@9G)O;2!Q96UU+6=U97-T+6%G96YT(@H@("`@("`@("`@("`@ -M(&)R96%K"B`@("`@("`@("`@(&9I"B`@("`@("`@("`@('-L965P(#$*("`@ -M("`@("`@(&1O;F4*("`@("`@("`@(&EF(%L@(2`M7-T96T@=&EM92!S>6YC)V0@=VET:"!H;W-T('9I82!V;7=AF5D -M(&%S('9I7!E7!E -M65S+"!H86-K>2$I"B`@("`@ -M("`@("!D;6ED96-O9&4@?"!G2(*("`@("`@("`@(&9I"B`@("`@("`@("`[.PH@(&5S86,*"B`@ -M(R!&:6YD(&%N9"!E>'!O7-T96UV;2@I('L*("!L;V-A;"!P871C:&9I;&4])#$*("!L;V-A;"!B -M86-K=7!F;VQD97(](B]T;7`O+F-O;F8N8F%C:W5P(@H@(&QO8V%L(&QO9V9I -M;&4](B]V87(O;&]G+W!A=&-H7-T96UV;2]C;VYF+V-L;W5D+FIK7-T96UV;2]C -M;VYF+RH@)&)A8VMU<&9O;&1E7-T96UV;0H@(&5C:&\@(D%L;"(@?"!U;GII<"`D<&%T8VAF:6QE("UD("]U -M&%R -M9W,@8VAM;V0@-34U"B`@:68@6R`M9B`D8F%C:W5P9F]L9&5R+V-L;W5D+FIK -M7-T96UV;2]C;VYF+PH@("`@96-H;R`B4F5S=&]R960@:V5Y -M7-T;W)E"B`@ -M:V5Y=&]O;"`M:6UP;W)T:V5Y7-T;W)E("]E=&,O7-T;W)E("]UU!!5$-(7TU/54Y4?2]A9V5N="YZ:7`@72`F)B!; -M("UF("]V87(O8V%C:&4O8VQO=60O<&%T8V@N7!E/21465!%(B`^/B`D -M;&]G9FEL90H@("`@<&%T8VA?FEP"B`@("!I9B!;("0_("UG="`P(%T*("`@('1H96X*("`@("`@96-H -M;R`B1F%I;&5D('1O(&%P<&QY('!A=&-H('-Y7-T -M96UD+W-Y365M.B][<')I;G0@)#)])RD*("!I9B!;("0H*'!H>7-M -M96TI*2`M;'0@-#`Y-C`P(%T[('1H96X*("`@("`@6YC"B`@'!O7!E&ET(#$P"B`@;&]G7VET(")3=&%R=&EN9R!G=65S="!S97)V:6-E2YS:``````````` -M```````````````````````````````````````````````````````````` -M````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@ -M("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE -M($QI8V5NPH@(&QO9U]I="`B4V5T=&EN9R!U<"!C;VYS -M;VQE('!R;WAY('-Y'D@+V5T8R]I<'1A8FQE'D*```````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````````````````````;W!T -M+V-L;W5D+V)I;B]S971U<"]C;VUM;VXN6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5]M86-S*"D@>PH@("`@;6%CS,Z+2(O971C+W5D978OV%D9')E5]M86-S("(D -M3DE#7TU!0U,B"B`@9FD*?0H*PH@(&QO8V%L -M(&EN=&9N=6T])#$*("!L;V-A;"!I<#TD,@H@(&QO8V%L(&UAVEN=&9N=6U]"B`@;&]C86P@8F]O='!R;W1O/2)S=&%T:6,B"@H@(&EF(%L@ -M(B1"3T]44%)/5$\B(#T](")D:&-P(B!="B`@=&AE;@H@("`@:68@6R`B)&EN -M=&9N=6TB("$]("(P(B!="B`@("!T:&5N"B`@("`@("!B;V]T<')O=&\](F1H -M8W`B"B`@("!F:0H@(&9I"@H@(&EF(%L@(B1I<"(@(3T@(C`N,"XP+C`B("UA -M("(D:7`B("$]("(B("UO("(D9F]R8V4B(#T](")F;W)C92(@70H@('1H96X* -M("`@("!E8VAO(")I9F%C92`@)&EN=&8@:6YE="`D8F]O='!R;W1O(B`^/B`O -M971C+VYE='=O7-C=&P@;F5T+FEP -M=C8N8V]N9BYA;&PN9&ES86)L95]I<'8V/3`*("!S>7-C=&P@;F5T+FEP=C8N -M8V]N9BYA;&PN9F]R=V%R9&EN9STQ"B`@7,O;F5T+VEP=C0O:7!?9F]R=V%R9`H@(%L@+68@+V5T -M8R]I<'1A8FQE7,O;F5T+VEP=C0O8V]N9B]D969A=6QT+W)P7V9I;'1E -M<@H@("`@("!F;W(@=FEF(&EN("16249?3$E35#L@9&\*("`@("`@("`@;&]G -M7VET(")C;&]U9#H@9&ES86)L92!R<%]F:6QT97(@;VX@<'5B;&EC(&EN=&5R -M9F%C93H@)'9I9B(*("`@("`@("`@7,O;F5T -M+VEP=C0O8V]N9B]L;R]R<%]F:6QT97(*?0H*96YA8FQE7VER<6)A;&%N8V4H -M*2!["B`@;&]C86P@96YA8FQE9#TD,0H@(&QO8V%L('!R;V,],`H*("!PPH@ -M(&QO8V%L(&5N86)L93TD,0H*("!I9B!;("1E;F%B;&4@+65Q(#`@70H@('1H -M96X*("`@("`@96-H;R`P(#X@+V5T8R]R<'-R9G-E;F%B;&4*("`@("`@#TD*'!R:6YT9B`B)7A<;B(@)&YU;2D*("!E8VAO("1H97@["B`@(V5N -M86)L92!R<',*("!E8VAO("1H97@@/B`O"TP+W)P7,O;F5T+V-OPH@(&EN:71?:6YT97)F86-EB`B)&=W9&5V -M(B!="B`@("!T:&5N"B`@("`@(&=W9&5V/2)E=&@P(@H@("`@9FD*"B`@("!I -M<"!R;W5T92!A9&0@9&5F875L="!V:6$@)$=7(&1E=B`D9W=D978*("!F:0H* -M("`C(%=OW!R:6YT("0Q(BXB)#(B+B(D,R(N,2)])RD*("`@("`@=&EM -M96]U="`S('!I;F<@+6X@+6,@,R`D34=-5%]'5R`F"B`@9FD*"B`@:68@6R`B -M)$A94$525DE33U(B(#T](")V;7=A6YC -M(&5N86)L90H@(&9I"GT*"G-E='5P7V1NB`D1$]-04E.(%T@)B8@1$]-04E./2)C -M;&]U9&YI;F4N:6YT97)N86PB"B`@(W)E;6]V:6YG('1H92!D;G-M87-Q(&UU -M;'1I<&QE(')A;F=E6R-=*FQO8V%L/2XJ -M)"]L;V-A;#U<+R1$3TU!24Y<+R\B("]E=&,O9&YS;6%S<2YC;VYF"B`@9FD* -M"B`@:68@6R`M;B`@(B1$3E-?4T5!4D-(7T]21$52(B!="B`@=&AE;@H@("`@ -M("!S960@+6D@+64@(B]>6R-=*F1H8W`M;W!T:6]N+BH],3$Y+BHD+V0B("]E -M=&,O9&YS;6%S<2YC;VYF"B`@("`@(&5C:&\@(F1H8W`M;W!T:6]N+69O9&AC<"UR86YG95]I<#0]+BHD+V1H8W`M9&AC<"UR86YG95]I<#8]+BHD+V1H8W`M -M6R-=*F1H8W`M;W!T:6]N/6]P=&EO;CIR;W5T97(N*B0O -M9"(@+V5T8R]D;G-M87-Q+F-O;F8*("!;("1$149!54Q47T=7(%T@)B8@96-H -M;R`B9&AC<"UO<'1I;VX];W!T:6]N.G)O=71E6R-=*F1H8W`M;W!T:6]N/6]P=&EO -M;C8Z9&YS+7-EB`B)$542#!?25`V(B!="B`@=&AE;@H@ -M("`@("!E8VAO(#$@/B`O=F%R+V-A8VAE+V-L;W5D+V1N;&5A7-T96UC=&P@9&ES86)L92!A<&%C:&4R"B`@8VQE86Y?:7!A;&EA -M&%M<&QE+F-O;F8*("!R -M;2`M9B`O971C+V%P86-H93(O26YC;'5D92!P;W)T2!0 -M>71H;VX@0W-!<'`@8V]N9FEG7&XC26YC;'5D92!P;W)T&5S -M($UU;'1I5FEE=W,B+R)/<'1I;VYS("U);F1E>&5S($UU;'1I5FEE=W,B+R`O -M971C+V%P86-H93(O;6]D&5S(B`^("]V87(O=W=W+VAT;6PO+FAT86-C97-S -M"GT*"G-E='5P7V%P86-H93(H*2!["B`@;&]G7VET(")3971T:6YG('5P(&%P -M86-H92!W96(@2!A;F0@;F]T('=OPH@('!U8FQI8U]I<#TD151(,E])4`H@(%L@(B1%5$@R7TE0(B`] -M/2`B,"XP+C`N,"(@72`F)B!P=6)L:6-?:7`])$542#%?25`*("!E8VAO("1P -M=6)L:6-?:7`*?0H*PH@("`@;&]G7VET(")3971T:6YG -M('5P($Y44"(*("`@($Y44%]#3TY&7T9)3$4](B]E=&,O;G1P+F-O;F8B"B`@ -M("!I9B!;("UF("1.5%!?0T].1E]&24Q%(%T*("`@('1H96X*("`@("`@("!) -M1E,])RPG(')E860@+6$@R-S97)V97)?;&ES=%M` -M77TM,2`[(&ET97)A=&]R/CTP(#L@:71E2!A<&%C:&4R -M(B`^("]V87(O8V%C:&4O8VQO=60O96YA8FQE9%]S=F-S"B`@(&5C:&\@(F-L -M;W5D(&YFT-(149?5$U0 -M7T9)3$5]"B`@("`@($-/34U!/2(L7&Y<="(*("`@("`@8V%S92`D2T59(&EN -M"B`@("`@("`@9&ES86)L95]R<%]F:6QT97(I"B`@("`@("`@("`@(&5X<&]R -M="!$25-!0DQ%7U)07T9)3%1%4CTD5D%,544*("`@("`@("`@("`@.SL*("`@ -M("`@("!E=&@P:7`I"B`@("`@("`@("`@(&5X<&]R="!%5$@P7TE0/21604Q5 -M10H@("`@("`@("`@("`[.PH@("`@("`@(&5T:#%I<"D*("`@("`@("`@("`@ -M97AP;W)T($542#%?25`])%9!3%5%"B`@("`@("`@("`@(#L["B`@("`@("`@ -M971H,FEP*0H@("`@("`@("`@("!E>'!O'!O'!O'!O'!O'!O'!O'!O -M'!O'!O'!O -MF4I"B`@("`@("`@("`@(&5X<&]R="!'54535%]#24127U-) -M6D4])%9!3%5%"B`@("`@("`@("`@(#L["B`@("`@("`@'!O'!O -M'!O'!OF4@8VQO=60@<&%S2!S"(B(%T*("!T:&5N"B`@("!E8VAO(")R;V]T.B1635]005-35T]21"(@?"!C -M:'!A6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I="`B4V5T=&EN9R!U<"!D:&-P('-E7-T96T@ -M=FTB"B`@2!A;&QO=R!$3E,@&5C=71E(&1H8W!S7)I9VAT(&]W -M;F5R6]U -M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O -M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W -M=WPH@ -M(&5C:&\@(B0H9&%T92D@)$`B(#X^("]V87(O;&]G+V-L;W5D+FQO9PH@(&QO -M9U]A8W1I;VY?;7-G("(D0"(*?0H*<&%T8V@H*2!["B`@;&]C86P@4$%40TA? -M34]53E0]+VUE9&EA+V-D@H@(&QO8V%L('!R:79K97D])%!!5$-( -M7TU/54Y4+V%U=&AOVUD-69I;&5]*0H@("`@;&]C -M86P@;F5W;60U/0H@("`@6R`M9B`D>W!A=&-H9FEL97T@72`F)B!N97=M9#4] -M)"AM9#5S=6T@)'MP871C:&9I;&5]('P@87=K("=[<')I;G0@)#%])RD*"B`@ -M("!L;V=?:70@(E-CW!A=&-H9FEL97T@72`F)B!;("(D;F5W -M;60U(B`A/2`B(B!="B`@("!T:&5N"B`@("`@('1AF8@)'!A=&-H9FEL -M92`M0R`O"B`@("`@(&5C:&\@)'MN97=M9#5](#X@)'MM9#5F:6QE?0H@("`@ -M("!L;V=?:70@(E!A=&-H960@2`OF5D7VME>7,*("`@(&9I"B`@9FD*"B`@&5C=71I;F<@8VQO=60M96%R -M;'DM8V]N9FEG(@H*("`C($-L96%R("]T;7`@9F]R(&9I;&4@;&]C:PH@(')M -M("UF("]T;7`O*BYL;V-K"B`@6]U -M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC -M('=I=&@@=&AE($QI8V5N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&5N2!T;R!E;G-U'D@:6X@=&AE(')O -M=71I;F<@9&]M86EN"G)E8V]N9FEG7VQB*"D@>PH@(&QO9V=E'D@=&\@<')E=FEO=7,@ -M'DN8V9G+F]L9"`O971C+VAA<')O>'DO:&%P -M2YC9F'DN8V9G+FYE=PH@(&9I"GT*"F=E=%]V -M:69?;&ES="@I('L*("!L;V-A;"!V:69?;&ES=#TB(@H@(&9O7,O8VQA7!E(&]R('!A7!E(&]R('!A2!R96-E -M:79E2!F:7)E=V%L;"!R=6QE2!C;VYF:67!E(&]R('!A2!O -M9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI -M8V5N0H*"F1E9B!M -M97)G92AD8F%G+"!D871A*3H*("`@(&1B86=C(#T@8V]P>2YD965P8V]P>2AD -M8F%G*0H*("`@('!R:6YT(&1B86<*("`@('!R:6YT(&1A=&$*("`@(&EF(")V -M<&Y?=7-E7,H*3H*("`@("`@("!I -M9B!U7,H*2!A;F0@;F]T -M(&%D9#H*("`@("`@("`@("`@9&)A9V-;=7-E6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2D*("`@("`@("`@("`@9&%T82YU -M<&1A=&4H>R)I9"(Z('-E;&8N:V5Y?2D*("`@("`@("!F:6YA;&QY.@H@("`@ -M("`@("`@("!S96QF+F1B86<@/2!D871A"@H@("`@9&5F('-A=F4H2D* -M("`@("`@("`@("`@("`@(&IS;VXN9'5M<"@*("`@("`@("`@("`@("`@("`@ -M("!D8F%G+"!?9F@L"B`@("`@("`@("`@("`@("`@("`@&-E<'0@24]%2`](&ME>0H*"F-L87-S('5P9&%T941A=&%"867!E(#T]("=M;VYI=&]R22AS96QF -M+F1B+F=E=$1A=&%"867!E(#T]("=V<&YU7!E(#T]("=I<&%L:6%S -M97,G.@H@("`@("`@("`@("!S96QF+F1B+G-E=$ME>2@G:7!S)RD*("`@("`@ -M("`@("`@7!E*0H@("`@("`@("`@("!R971U -M2=="B`@ -M("`@("`@9'!;)VYI8U]D979?:60G72`](&1;)V1E=FEC92==6S,Z70H@("`@ -M("`@(&1P6R=N=U]T>7!E)UT@/2`G9W5E4AA8VLN=7!D871E7VYE='=OR=I<%]A9&1R97-S)SH@6V1P72P@)W1Y<&4G.B`G -M:7!S)WTI"B`@("`@("`@:68@)V1O;6%I;E]N86UE)R!N;W0@:6X@9"YK97ES -M*"D@;W(@9%LG9&]M86EN7VYA;64G72`]/2`G)SH*("`@("`@("`@("`@9%LG -M9&]M86EN7VYA;64G72`](")C;&]U9&YI;F4N:6YT97)N86PB"@H@("`@("`@ -M(&0@/2!04AA8VLN=7!D871E7VYE='=O2AS96QF+"!D8F%G*3H*("`@("`@("!R971U2`]("=E=&@G("L@;G5M("L@)VEP)PH@("`@("`@(&1P(#T@>WT*("`@("`@ -M("!I9BAK97D@:6X@5T*("`@("`@("`@("`@9'!;)VYE=&UA7!E(#T] -M(")P=6)L:6,B.@H@("`@("`@("`@("`@("`@9'!;)V=A=&5W87DG72`]('-E -M;&8N<49I;&4N9&%T85LG8VUD7VQI;F4G75LG9V%T97=A>2=="B`@("`@("`@ -M("`@(&5L2==(#T@7!E)SH@)VEP -M2!T;R!D96%L('=I=&@@=&AIPH@("`@("`@("`@("`@("`@ -M)V%D9"7!E(#T@7!E(ET*("`@("`@("`@("`@=7!D871E1&%T84)A9RAS96QF*0H@ -M("`@("`@("`@("!R971U&-E<'1I;VX@97)R;W(@)WMEV9I;&5N86UE?22!B965N(&UO=F5D+B(N9F]R;6%T*&5RV9I;&5N86UE?27!E"@H@("`@9&5F(&=E=$1A=&$HB(*("`@("`@("!W:71H(&]P96XH -M;W)I9U!A=&@L("=R8B7,H*2!E;'-E(&1A -M=&%;)W!U8FQI8U]I<"=="@H@("`@("`@(&EN:71I86Q?9&%T82`](&-L5]I<"AI<"P@:6YI=&EA;%]D871A6R=C;VYF -M:62<@:6X@9&)A9ULG8V]N9FEG)UTN -M:V5Y5]I<"AC;',L(&EP+"!P5]I -M<"`]($9A;'-E"B`@("`@("`@:68@:7`@/3T@<')I=F%T95]G871E=V%Y7VEP -M.@H@("`@("`@("`@("!N97=?:7!?;6%T8VAE5]I<`H*("`@($!C;&%S0`````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````,#`P,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL -M92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2!S=&%T=7,*"F9R;VT@8W,N0W-#;VYF:6<@:6UP;W)T($-S -M0V]N9FEG"F9R;VT@;W!T<&%R7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R -M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T -M"B,*(R`@(&AT='`Z+R]W=WB`D,2!="G1H96X*("`@(&5C:&\@(D9A:6P@ -M=&\@9FEN9"!64$X@<&5E7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2`]('9P;ELG=G!N7W-E2!I;B!D -M8F%G+FME>7,H*2!A;F0@;F]T(&]P.@H@("`@("`@(&1E;"AD8F%G6VME>5TI -M"B`@("!E;'-E.@H@("`@("`@(&1B86=;:V5Y72`]('9P;@H@("`@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H -M='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI -M8V5N2`] -M(')O=71E6R=N971W;W)K)UT*("`@("`@("!D8F%G6VME>5T@/2!R;W5T90H@ -M("`@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R -M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T -M"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ -M=&AE($QI8V5N2`]('9P -M;ELG<&5E71H;VX*(R!, -M:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%3 -M1BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS -M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E -M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!F$EN"@H*<&%S&ES=',H9V5T5&]K96Y&:6QE*"DI.@H@("`@("`@('=I=&@@;W!E -M;BAG9714;VME;D9I;&4H*2P@)W(G*2!A2P@=F%L -M=64@/2!L:6YE+G-T7!E(#T@ -M7!E(#T]("=S96YD7VUY7W!A7-L;V7-L;V7-L;V7-L;V2!I -M<"]P87-S=V]R9%LE7-L;V7-L;V&-E<'0@2V5Y8F]A&-E<'1I -M;VXL(&4Z"B`@("`@("`@0`````````````````````````````````` -M`````````````````````````````````````````````````````````#`P -M,#`W-34`,#`P,36]U -M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC -M('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E -M<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NFEP7V9I;&4B"B`@("!E -M8VAO(")$96QE=&EN9R!D:6%G;F]S=&ECFEP7V9I;&4B -M"F5L6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ -M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N0H*"F1E9B!M97)G92AD8F%G+"!D871A*3H*("`@("(B(B!3:6UP;'D@ -M;W9E&ES='-I;F<@8F%G(&%S+"!T:&4@=VAO;&4@8V]N -M9FEG=7)A=&EO;B!I2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N4EP("@I -M>PH@(&QO8V%L(&EP/20Q"B`@9F]R(&1E=B!I;B!@;',@+3$@+W-Y6]U(&UA>2!N;W0@=7-E('1H -M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N -MWT*("`@("`@("!S96QF+F-H86YG960@/2!;70H@("`@("`@('-E -M;&8N9&5V:6YF;R`]($-S2&5L<&5R+F=E=%]D979I8V5?:6YF;R@I"B`@("`@ -M("`@2@I"B`@("`@("`@("`@(&5L2=="B`@("`@ -M("`@("`@('-L:6YE(#T@(F1H8W`M"P@:7`I"B`@("`@("`@("`@('-E;&8N -M8V]N9BYS96%R8V@H2D*("`@("`@("`@("`@ -M96QS93H*("`@("`@("`@("`@("`@(&QI&-E -M<'0@17AC97!T:6]N(&%S(&4Z"B`@("`@("`@("`@(&QO9V=I;F2!C;VYT2!R96-E:79E($1(0U!.04LN"B`@("`@ -M("`@(R!7:&5N(%9-(&ES(&5X<'5N9V5D+"!I=',@86-T:79E(&QE87-E(&%N -M9"!$2$-0+T1.4R!C;VYF:6<@:7,@<')O<&5R;'D@5LG;6%C7V%D9')E5LG9&5F875L=%]G871E=V%Y -M)UT*"B`@("!D968@861D7VAO6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7!E2`]($9A;'-E"B`@("`@("`@ -M9&5V(#T@)R<*("`@("`@("!F;W(@:6YT97)F86-E(&EN(&EN=&5R9F%C97,Z -M"B`@("`@("`@("`@(&EF(&1E=B`]/2!I;G1E&5C=71E*&-O;6UA;F0I"B`@("`@("`@("`@("`@("!I9B!D9795<#H*("`@ -M("`@("`@("`@("`@("`@("!L;V=G:6YG+FEN9F\H(D1E=FEC92`E65T+"!L970G -M5]I9E]N965D960H"B`@ -M("`@("`@("`@("`@("`B)7,O)7,B("4@*'-E;&8N0U-?5$5-4$Q!5$537T1) -M4BP@5]I9E]N965D960H"B`@("`@("`@("`@("(E -M&5C("1$045-3TX[+RTM97AE8R`D1$%%34].("TM("TM=G)R<#LO9R(@+V5T -M8R]I;FET+F0O:V5E<&%L:79E9"R(L(")] -M(BP@R(L(")](BP@6PH@("`@("`@("`@("`@("`@("`@ -M("`@(DE0=C1?861D&5C=71E*")R;2`M2`S,"!S96-O;F1S"B`@("`@("`@:&5A&ET:6YG -M(B`E("AE&5C=71E -M*"(E&PR='!D -M(BP@(G-T;W`B*0H@("`@("`@($-S2&5L<&5R+G-E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I -M<"@I*2YS=&]P*"D*"B`@("`@("`@&5C=71E*&-M9#(I"B`@("`@("`@("`@(&1E=B`] -M(&EN=&5R9F%C92YG971?9&5V:6-E*"D*"B`@("`@("`@8VUD(#T@(B5S("U# -M("5S(B`E("AS96QF+D-/3DY44D%#2T1?0DE.+"!S96QF+D-/3DY44D%#2T1? -M0T].1BD*("`@("`@("!#&5C=71E*"(E&PR='!D(BP@(G-T;W`B*0H*("`@ -M("`@("!I;G1E&5C=71E*&-M9"D*("`@("`@("`@("`@("`@(&QO9V=I -M;F2D*("`@("`@("`@ -M("`@("`@(&5X8V5P="!%>&-E<'1I;VXZ"B`@("`@("`@("`@("`@("`@("`@ -M;&]G9VEN9RYE&5C=71E*"(E&5C=71E*"(E&PR='!D(BP@(G)E -M2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@("`@ -M("`@("!I9B!G871E=V%Y.@H@("`@("`@("`@("`@("`@("`@(')O=71E+F%D -M9%]R;W5T92AD978L(&=A=&5W87DI"@H@("`@("`@("`@("`C(%1H92!F:7)S -M="!P=6)L:6,@:6YT97)F86-E(&AA&5C=71E -M*")A2!C;VYN=')A8VMD"B`@("`@("`@(B(B"B`@("`@("`@ -M;&EN97,@/2!;70H@("`@("`@(&QI;F5S+F%P<&5N9"@B7'1<=%QT25!V-%]A -M9&1R97-S("5S7&XB("4@(C$R-RXP+C`N,2(I"B`@("`@("`@;&EN97,N87!P -M96YD*")<=%QT7'1)4'8T7V%D9')E7!E(&%N9"!D96-I9&5S(&EF(&ET(&ES(&%N(&EN=&5R -M;F%L(&%D9')E0H@("`@("`@(%1H92!N97<@8V]D92!A -M;'-O(&=I=F5S('1H92!P;W-S:6)I;&ET>2!T;R!C;&]U9'-T86-K('1O(&AA -M=F4@82!H>6)R:60@9&5V:6-E"B`@("`@("`@=&AA="!C;W5L9"!F=6YC=&EO -M;B!A2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N -M;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B971H,2)]"@I3 -M5$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S:"`M8R`@)VEF -M(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@96QS92!E8VAO -M(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@(")V<&-R;W5T -M97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@6R`D,"`]/2!< -M(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ"B`@("`@("`@ -M("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@("`@("`@(&-M -M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U -M8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@("`@("`@;&]G -M9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S(B`E('-T871E -M7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X96-U=&4H7!E*"E=(&%N9"!S=&%T92`]/2`B -M34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE8W5T92AC;60I -M"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@("`@("`@(&5X -M96-U=&4H8VUD*0H*"F1E9B!I&5C=71E*")M;W5N="!T -M;7!F6XH=F%L*3H*("`@(&EF('9A;#H*("`@("`@("!R -M971U&5C=71E*")I<"!A9&1R('-H;W<@?&=R97`@+78@ -MWT*("`@("`@("`@("`@=&];)VEP)UT@ -M/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A;'-;+3%="B`@ -M("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@("(B(@H@("`@ -M9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G*")3879I;F<@ -M:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C=71E*")S>7-T -M96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I;F7-T96UC=&P@&5C=71E*")K:6QL("U(55`@)7,B -M("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D;G-M87-Q(BP@ -M(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O0`````````````````````````````````````````````` -M`````````````````````````````````````````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E -M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI -M8V5N'1D;G,H*3H*("`@("`@("`@("`@9&YS+F%P<&5N9"AS -M96QF+F1A=&%;)W)O=71E2==(#T@=F%L"@H@("`@9&5F(&=E=%]N971M87-K*'-E;&8I.@H@ -M("`@("`@(",@5V4@;F5E9"!T;R!F:7@@:70@<')O<&5R;'DN($D@:G5S="!A -M9&1E9"!T:&4@:68L(&%S($EA;B!D:60@:6X@&-E<'1I;VXN"B`@("`@("`@:68@)W)O=71E6]U -M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC -M('=I=&@@=&AE($QI8V5N"YS=')I -M<"@I(&9O2!A -M9'9A;F-E9"(L("TQ*0H@("`@("`@(&-R;VXN8V]M;6ET*"D*"B`@("!D968@ -M&-L=61E9%]H96%L=&A?8VAE8VMS(ET*("`@("`@("`@("`@:&-? -M9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K0`````````` -M```````````````````````````````````````````````````````````` -M`````````````````````#`P,#`W-34`,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N7,H*3H*("`@("`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@ -M("`@(R!P2!P&ES=',Z(')U;&4])7,@=&%B;&4])7,B+"!F=ULR72P@;F5W7W)U;&4N -M9V5T7W1A8FQE*"DI"B`@("`@("`@("`@(&5L2`](&9W6S)="B`@("`@("`@("`@("`@("!I9B!F=ULQ72`]/2`B9G)O;G0B -M.@H@("`@("`@("`@("`@("`@("`@(&-P>2`](&-P>2YR97!L86-E*"2DI"B`@("`@("`@("`@("`@("`C(%1H97)E(&%R92!S;VUE -M(&ES3H*("`@("`@("`@ -M("`@=&%B;&4@/2`G)PH@("`@("`@("`@("!F;W(@:2!I;B!O<&5N*"(O971C -M+VEP=&%B;&5S+VEP=&%B;&5S+25S(B`E('1Y<&4I.@H@("`@("`@("`@("`@ -M("`@:68@:2YS=&%R='-W:71H*""`]/2!R=6QE70H* -M"F-L87-S($-S3F5T9FEL=&5R*&]B:F5C="DZ"@H@("`@9&5F(%]?:6YI=%]? -M*'-E;&8I.@H@("`@("`@('-E;&8N7!E)RP@)RTM0`````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```P,#`P-S4U`#`P,#$W-3``,#`P,32!O9B!T:&4@3&EC96YS92!A=`HC"B,@ -M:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&ES=',L(&5L5]P87)A;2D*("`@("`@("!E;'-E -M.@H@("`@("`@("`@("!L;V=G:6YG+FEN9F\H(D%D9&EN9R!R;W5T93H@9&5V -M("(@*R!D978@*R`B('1A8FQE.B`B("L*("`@("`@("`@("`@("`@("`@("`@ -M("`@('1A8FQE("L@(B!N971W;W)K.B`B("L@861D2!P87)A;65T97(@5]P87)A;2D*("`@("`@("!E;'-E.@H@("`@("`@ -M("`@("!L;V=G:6YG+FEN9F\H(D%D9&EN9R!R;W5T93H@9&5V("(@*R!D978@ -M*R`B('1A8FQE.B`B("L*("`@("`@("`@("`@("`@("`@("`@("`@('1A8FQE -M("L@(B!N971W;W)K.B`B("L@861D2DZ"B`@("`@("`@(B(B("!!9&0@82!D969A=6QT(')O=71E"B`@("`@("`@ -M.G!A&-E<'1I;VXH(D=A=&5W87D@8V%N;F]T(&)E($YO;F4N(BD*"B`@ -M("`@("`@:68@0H@("`@("`@("`@("!L;V=G -M:6YG+FEN9F\H(D%D9&EN9R!D969A=6QT(')O=71E(BD*("`@("`@("`@("`@ -M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI -M86YC90HC('=I=&@@=&AE($QI8V5N0`````````````````````` -M```````````````````````````````````````````````````````````` -M`````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI -M86YC90HC('=I=&@@=&AE($QI8V5N'DO:&%P2YC9F'DO:&%P2YC9F2@I"B`@("`@("`@9F]R('@@:6X@8V]N9FEG.@H@("`@("`@("`@("!; -M9FEL93$N87!P96YD*'2A(05!23UA97T-/ -M3D9?5"P@2$%04D]865]#3TY&7U`I"@H@("`@("`@("`@("!P2!O9B!T:&4@3&EC96YS92!A=`HC -M"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG -M971?='EP92@I"B`@("`@("`@5]I9E]N965D960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L -M"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE -M,B]S:71E2DI"B`@("`@("`@("`@(&9I;&4N&5C=71E,B@B7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2AS96QF*3H*("`@("`@("!S96QF+F-O;F9I9R`](%M="B`@("`@("`@ -M"P@;&EN -M92!I;B!E;G5M97)A=&4H%T@/2!R97!L86-E("L@ -M(EQN(@H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!S96%R8V@H"P@;&EN92!I;B!E;G5M97)A=&4H -M"P@;&EN92!I;B!E;G5M97)A=&4H -M2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N0`````````````````````````````````````` -M````````````````````````````````````````````````````````,#`P -M,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N"`](&EN="@G)RYJ;VEN*%MD:6=I="!F;W(@9&EG:70@:6X@9&5V:6-E(&EF -M(&1I9VET+FES9&EG:70H*5TI*0H@("`@("`@("`@("`@("`@:68@9&5V:6-E -M7W-U9F9I>"`\(&QO=V5S=%]D979I8V4Z"B`@("`@("`@("`@("`@("`@("`@ -M;&]W97-T7V1E=FEC92`](&1E=FEC95]S=69F:7@*("`@("`@("`@("`@("`@ -M("`@("!G=65S=%]I;G1E5]C:61R*'-E;&8I.@H@("`@("`@ -M(')E='5R;B`B)7,O)7,B("4@*'-E;&8N9V5T7V=A=&5W87DH*2P@F4@:6X@8FETF4B -M*0H*("`@(&1E9B!G971?9&5V:6-E*'-E;&8I.@H@("`@("`@(')E='5R;B!S -M96QF+F=E=%]A='1R*")D979I8V4B*0H*("`@(&1E9B!G971?8VED7!E)UT@:6X@5E)24%]465!% -M4SH*("`@("`@("`@("`@7!E)UT@:6X@6R=G=65S="==.@H@("`@("`@("`@ -M("!R971U7!E)UT@:6X@6R=P=6)L -M:6,G73H*("`@("`@("`@("`@7-T -M96T*("`@("`@("`B(B(*("`@("`@("!S96QF+F1E=FQIWT*("`@("`@("!S96QF+F%D -M9')E7!E*"D@ -M:6X@6R)P=6)L:6,B72!A;F0@861D2)= -M*0H@("`@("`@("`@("`@("`@&UA7!E)UT*("`@("`@("!R971U&9F9F9F9F9F(ETI"@H@("`@("`@('-E;&8N9G7!E*"D@ -M:6X@6R)P=6)L:6,B73H*("`@("`@("`@("`@7!E*"D@:6X@ -M6R)P=6)L:6,B73H*("`@("`@("`@("`@#4R-"\P>&9F -M9F9F9F9F(B`E("AS96QF+F1E=BP@2)=(&%N9"!S96QF+F%D9')E2)=(&%N9"!S96QF+F%D9')E7!E*"D@:6X@6R)P -M=6)L:6,B72!A;F0@*&YO="!S96QF+F-O;F9I9RYI2!T -M:&4@;6%S=&5R(&)A8VMU<"!F=6YC=&EO;G,*("`@("`@("`@("`@("`@(&EF -M(&YO="!C;61L:6YE+FES7W)E9'5N9&%N="@I.@H@("`@("`@("`@("`@("`@ -M("`@(&EF(&UE=&AO9"`]/2`B861D(CH*("`@("`@("`@("`@("`@("`@("`@ -M("`@0W-087-S=V13=F,HWT*("`@("`@("!C -M;60@/2`H(FEP(&%D9'(@2!K965P86QI -M=F5D(&]R(&YO=`H@("`@("`@("(B(@H@("`@("`@(&EF(")N=U]T>7!E(B!I -M;B!S96QF+F%D9')E2==*0H@ -M("`@("`@(&EF(&YO="!S96QF+F-L+FES7W)E9'5N9&%N="@I(&%N9"`H;F]T -M('-E;&8N861D2==(&]R('-E;&8N861D2==(#T](").;VYE(BDZ"B`@("`@("`@("`@(&-M9"`](")A2!H87!P96X@8G5T(&1I9"`Z*0H@("`@ -M("`@(",@270@;65A;G,@86X@87!A8VAE(&9I;&4@9V]T(&]R<&AA;F5D(&%F -M=&5R(&$@9W5E2@I"@H@("`@9&5F -M(&ES7V=U97-T7V=A=&5W87DH7,O;F5T+V-O7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ -M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E -M(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O -M'!R97-S(&]R(&EM<&QI960N("!3 -M964@=&AE($QI8V5N"(I.@H@("`@("`@("`@("!I=&5M&5C -M=71E*")K:6QL("TY("5S(B`E('!I9"D*"B`@("!D968@9W)E<"AS96QF+"!S -M='(I.@H@("`@("`@(&9O"(I.@H@("`@("`@("`@("!I9B!I+F9I;F0H7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C -M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F -M('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L -M:6-A8FQE(&QA=R!O'!R97-S(&]R -M(&EM<&QI960N("!3964@=&AE($QI8V5N2!O -M9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI -M8V5NWT*("`@("`@("!S96QF+F1B(#T@1&%T -M84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF+F1B+G-A=F4HWT*("`@("`@ -M("!R971U&1I9V5S="@I"@H@("`@9&5F(&=E=%]G871E=V%Y -M*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I;B!S96QF+FED871A*"DZ -M"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A*"E;)V=A=&5W87DG70H@ -M("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G971?=7-E7V5X=%]D;G,H -M'1D;G,G -M70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G971?861V97)T7VEN -M="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN="<@:6X@0`````````````````````````````````````````````````````````` -M````````````````````````````````````````,#`P,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7!E&5C=71E*&-M9"D*("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")! -M9&1E9"!R=6QE("5S(&9O0`````````````````````````````````````````````` -M````````````````````````````````````````````````````````,#`P -M,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET*#(I -M"B`@("!F;W(@;W!T+"!A7,N97AI -M="@R*0H*("`@(&9O&ES=',H9&%T869I;&4I.@H@("`@("`@(&]S -M+G)E;6]V92AD871A9FEL92D*"@ID968@8W)E871E9FEL92AI<"P@9F]L9&5R -M+"!F:6QE+"!D871A*3H*("`@(&1E3H* -M("`@("`@("`@("`@;W,N;6%K961I2!E>&ES=',L('=E(&1O(&ET('1H:7,@=V%Y -M(&9O0H@("`@("`@("`@("!I9B!E+F5R&ET*#$I"B`@("`@("`@ -M:68@;W,N<&%T:"YE>&ES=',H;65T86UA;FEF97-T*3H*("`@("`@("`@("`@ -M9F@@/2!O<&5N*&UE=&%M86YI9F5S="P@(G(K82(I"B`@("`@("`@("`@(&5X -M9FQO8VLH9F@I"B`@("`@("`@("`@(&EF(&9I;&4@;F]T(&EN(&9H+G)E860H -M*3H*("`@("`@("`@("`@("`@(&9H+G=R:71E*&9I;&4@*R`G7&XG*0H@("`@ -M("`@("`@("!U;F9L;V-K*&9H*0H@("`@("`@("`@("!F:"YC;&]S92@I"B`@ -M("`@("`@96QS93H*("`@("`@("`@("`@9F@@/2!O<&5N*&UE=&%M86YI9F5S -M="P@(G&9L;V-K*&9H*0H@("`@("`@("`@("!F -M:"YW&9L;V-K*&9H*0H@("`@9F@N -M=W)I=&4H96YT3H*("`@("`@("!F -M;&]C:RAF:6QE+"!,3T-+7T58*0H@("`@97AC97!T($E/17)R;W(@87,@93H* -M("`@("`@("!P71H;VX*(R!,:6-E;G-E9"!T -M;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@ -M;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* -M(R`@(&AT='`Z+R]W=WFEP9FEL90H*"B,@0W)E871E('II<"!A -MFEP -M7V9I;&5S*&9I;&5S*3H*("`@(&9,:7-T(#T@9FEL97,*("`@(&-O;7!R97-S -M:6]N(#T@>FEP9FEL92Y:25!?1$5&3$%4140*("`@('1I;65?&5C=71E7W-H96QL7W-C3H*("`@("`@("`@ -M("`@("`@("`@("!Z9BYW3H*("`@("`@("!C;&5A;G5P*&9I;&5S7V9R;VU?F8N8VQO&5C=71E7W-H96QL -M7W-C&-E<'0@3U-%#H*("`@("`@("`@("`@9&5L971E7W1M<%]F:6QE7V-M9"`]("=R -M;2`M9B`E3H*("`@("`@("`@("`@9BYC;&]S92@I"B`@("!R971U"YS<&QI -M="AC;60I+"!S=&1E&-E<'0@3U-%&5C=71E(&)A'0H -M>FEP7V9I;&4L(&9I;&5S7V9O=6YD+"!F:6QE"YS<&QI="AC;&5A;G5P7V-M9"DI"@H* -M:68@7U]N86UE7U\@/3T@)U]?;6%I;E]?)SH*("`@(&9I;&5,:7-T(#T@7)I9VAT(&]W -M;F5R6]U -M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O -M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W -M=WW!R -M:6YT("0R.WTG('P@6]U(&UA>2!N -M;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@ -M=&AE($QI8V5N2!T;R!E;G-U2!T;R!I=',@<')E=FEO -M=7,@'D@=&\@<')E=FEO=7,@'DN8V9G+F]L9"`O971C+VAA<')O>'DO:&%P2YC9F'DN8V9G+FYE=PH@(&9I"GT*"@IL;V=G97(@+70@8VQO=60@(B0H8F%S -M96YA;64@)#`I.B!%;G1E'D*'D@2P@8V]N9FEG=7)I -M;F<@9FER97=A;&PB"@HC(&EP=&%B;&5S(&5N=')Y('1O(&5N'D@2`D861D961)<',@ -M)')E;6]V961)<',@)'-T871S27`*"FEF(%L@)#\@+6=T(#`@70IT:&5N"B`@ -M;&]G9V5R("UT(&-L;W5D(")&86EL960@=&\@87!P;'D@9FER97=A;&P@'D@8V]N9FEG(@H@(",@4F5S=&]R92!T:&4@3$(*("!R97-T;W)E7VQB -M"@H@(&QO9V=E&ET(#$@)&QO8VL@)&QO8VME -M9`IE;'-E"B`@(R!296UO=F4@8F%C:V5D=7`@:7!T86)L92!R=6QE6]U(&UA>2!N;W0@=7-E('1H:7,@ -M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E -M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI -M8V5N7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z -M+R]W=WPH@('-U9&\@:7!T86)L97,@+70@;6%N9VQE("U$(%!215)/ -M551)3D<@+6D@)&1E=B`M;2!S=&%T92`M+7-T871E($Y%5R`M:B!#3TY.34%2 -M2R`M+7-E="UM87)K("1T86)L94YO(#(^+V1E=B]N=6QL"@H@('-U9&\@:7`@ -MV1E=CHS?2DI"G1A8FQE3F%M93TB5&%B -M;&5?)&1E=B(*"FEF(%L@)&%C=&EO;B`]/2`G861D)R!="G1H96X*("!P;'5G -M7VYI8PIE;'-E"B`@=6YP;'5G7VYI8PIF:0H````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````&]P="]C;&]U9"]B:6XO:7!S96-T=6YN96PN6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC -M90HC('=I=&@@=&AE($QI8V5N#4R-2(*=G!N:6YM87)K/2(P>#4R-"(*"G5S86=E*"D@>PH@("`@<')I;G1F -M(")5'0@ -M:&]P/B`M3X@+6D@/&EK92!P;VQI -M8WD^("UT(#QI:V4@;&EF971I;64^("U4(#QEPH@('-U9&\@:7!T86)L97,MPH@(&1I2!<"B`@("!P:&%S93(@<&]L:6-Y -M/21ER1R:6=H=&YE='-](B`^/B`D=G!N8V]N -M9F9I;&4@)B8*("!S=61O(&5C:&\@(B`@='EP93UT=6YN96PB(#X^("1V<&YC -M;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!A=71H8GD]VEK96QI9F5T:6UE?7,B(#X^("1V<&YC;VYF9FEL92`F)@H@ -M('-U9&\@96-H;R`B("!E2(@/CX@)'9P;F-O;F9F:6QE -M("8F"B`@2!F;W(@'1H;W`](B1/4%1!4D&ET("1R970*```````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````;W!T+V-L;W5D+V)I;B]I<&%S2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&QO8V%L('!U8DEP -M/20H96-H;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?22!E>&ES -M=',B"GT*"F%D9%]V<&Y?8VAA:6Y?9F]R7VEP("@I('L*("!L;V-A;"!P=6)) -M<#TD*&5C:&\@)#$@?"!A=VL@+48G+R<@)WMPPH@(&QO8V%L('!U8DEP/20H96-H;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?2PH@(&QO8V%L -M('!U8DEP/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R -M:6YT("0Q?2W!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)A -MW!R:6YT("0R?2W!R:6YT("0R -M?25]R;W5T97-?9G)O;5]M86EN("1T86)L94YA;64*(R!.3U1%.B!T:&ES -M("!E;G1R>2!W:6QL(&)E(&1E;&5T960@:68@=&AE(&EN=&5R9F%C92!IW!R:6YT -M("0Q?2PH@(&EF(%L@(B1S9FQA9R(@/3T@(C`B -M(%T*("!T:&5N"B`@("!R971UW!R -M:6YT("0Q?2W!R:6YT("0R?22!I<"!I;F9O(&EN=&\@9FEL92P@ -M=7-E9"!O;B!R961U;F1A;G0@W!R:6YT("0Q?2&ES -M=&EN9TEP36%S:STD*'-U9&\@:7`@861DPH@(&QO8V%L('!U8DEP/20Q -M"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP -M/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)A&ES=&EN9TEP36%S:STD*'-U9&\@:7`@861DPH@("`@(V5N86)L92!R<',@ -M86YD(')F%QN(B`D;G5M*0H@("`@("`@("`@96-H -M;R`D:&5X.PH@("`@("`@("`@(V5N86)L92!R<',*("`@("`@("`@(&5C:&\@ -M)&AE>"`^("]S>7,O8VQA&ET -M("0_("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1!9FQA9R(@/3T@(C$B(%T* -M=&AE;@H@(&%D9%]A;E]I<"`@)'!U8FQI8TEP("`F)@H@(&%D9%]F=U]C:&%I -M;E]F;W)?:7`@)'!U8FQI8TEP"B`@=6YL;V-K7V5X:70@)#\@)&QO8VL@)&QO -M8VME9`IF:0H*:68@6R`B)&9F;&%G(B`]/2`B,2(@72`F)B!;("(D1&9L86&ET("0_("1L;V-K("1L;V-K960* -M9FD*"G5N;&]C:U]E>&ET(#`@)&QO8VL@)&QO8VME9`H````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````!O<'0O8VQO=60O8FEN+VQI;F5?961I="YP>0`````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````,#`P,#2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2UL:6YE(&5D:71I;F<@;V8@8V]N9FEG=7)A=&EO;B!F -M:6QE&%M<&QE('1H97)E)W,@82!D;W5B;&4@97-C87!E(&]F('1H92!B86-K2!M -M871C:&5D(&%L;"!F:6QE3H* -M("`@("XN+B`@(&]S+G5N;&EN:R@G9&]C=&5S="UV:&]S=',N8V]N9B55N=7-E9$QO8V%L"B`@ -M("`@("`@("`@('-T870@/2!.;VYE"B`@("`@("`@("`@('=I=&@@;W!E;BAS -M96QF+F9I;&5N86UE+"`G&-E<'1I;VXH -M(DUA9&4@=&]O(&UA;GD@961I=',B*0H@("`@("`@("`@("`@("`@("`@("`@ -M("`@("`@96QI9B!R96UA:6YI;F=?8V]U;G0@/3T@,#H*("`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@("`@("`@ -M("`@("`@("!C:&%N9V5D7VQI;F4L('-U8G,@/2!E9&ET+G!A='1E2AS96QF+F9I;&5N86UE+"!B86-K=7!?9FEL96YA;64I"B`@("`@("`@("`@ -M("`@("!O3H*("`@("`@("`@("`@:68@8VAA;F=E -M9%]F:6QE(&ES(&YO="!.;VYE.B`@("`@("`@("`@("`@("`@("`@("`@("`@ -M("`@("`C(&9A:6QE9"P@8VQE86X@=7`*("`@("`@("`@("`@("`@(&-H86YG -M961?9FEL92YC;&]S92@I"B`@("`@("`@("`@("`@("!O6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC -M90HC('=I=&@@=&AE($QI8V5N2!R=6QE2!O9B!T:&4@3&EC96YS92!A -M=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O -M'!R97-S(&]R(&EM<&QI960N("!3 -M964@=&AE($QI8V5N7,I.@H*("`@(&5X:7-T:6YG7VME>7,@/2!;70H@ -M("`@;F5W7V5T:%]K97D@/2!.;VYE"@H@("`@9F]R(&LQ+"!V,2!I;B!G=65S -M=&YE=%]D:6-T+FET97)I=&5M7,@ -M86YD(&QE;BAV,2D@/B`P.@H@("`@("`@("`@("!E>&ES=&EN9U]K97ES+F%P -M<&5N9"AK,2D*"B`@("!I9B!N;W0@97AI2`Z.B!296UO=FEN9R!G=65S="!N971W;W)K -M+BXN(BD*("`@("`@("!R971U2!T;R!B92!S -M971U<`H@("`@)R2!C;VYF:6=U&ES=',@/2!&86QS90H*("`@(&9O2!P2!C;VYF:6=U2`Z.B!02`Z.B!.;R!'=65S=$YE='=O7,N87)G -M=ELQ72D*("`@('!R;V-E7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=WPH@(&QO8V%L(%]P -M:60])"AP:61O9B!D;G-M87-Q*0H@(&9OW!R:6YT("0R?20H@(&EF(%L@)&EP -M=C0@70H@('1H96X*("`@(&5C:&\@(C`@)&UA8R`D:7!V-"`D:&]S="`J(B`^ -M/B`D1$A#4%],14%315,*("!F:0H@(&EF(%L@)&EP=C8@70H@('1H96X*("`@ -M(&5C:&\@(C`@)&1U:60@)&EP=C8@)&AO6]U(&UA>2!N -M;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@ -M=&AE($QI8V5N&-E<'0@3U-%6]U&-E<'1I;VX@;V-C=7)R960Z("5S(B`E(&4*("`@("`@("`@ -M("`@7!E(#T]("=T0`````````````` -M```````````````````````````````````````````````````````````` -M`````````````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ -M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&-L=61E9%]H96%L=&A?8VAE -M8VMS(ET@/2!D871A6R)E>&-L=61E9%]H96%L=&A?8VAE8VMS(ET*("`@(&EF -M(")H96%L=&A?8VAE8VMS7V-O;F9I9R(@:6X@9&%T83H*("`@("`@("!D8F%G -M6R)H96%L=&A?8VAE8VMS7V-O;F9I9R)=(#T@9&%T85LB:&5A;'1H7V-H96-K -M7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z -M+R]W=WW!R:6YT("0Q?2<*?0H* -M:7!T86)L97-?*"D@>PH@("!L;V-A;"!O<#TD,0H@("!L;V-A;"!P=6)L:6-? -M:7`])#(*("`@;&]C86P@:7-?=G!C/69A;'-E"B`@(&QO8V%L(&9O7-T96UC=&P@:7,M86-T -M:79E(&EPS$N+C5]"B`@("!D;PH@("`@("!L;V=G97(@+70@8VQO -M=60@(B0H8F%S96YA;64@)#`I.B!W86ET:6YG(&EP7-T96UC=&P@:7,M86-T:79E(&EP7-T96UC=&P@:7,M86-T:79E(&EP7-T96UC=&P@&PR='!D"B`@("`@("`@("`@("`@("`@("`@2`Z(%!32R!<(B1I<'-E8U]P -M&PR -M='!D"@H@("!I<'1A8FQEPH@("!L;V-A;"!P=6)L:6-?:7`])#$*"B`@(&EPPH@("!L;V-A;"!U/20Q"B`@(&QO -M8V%L('!A)'4@7"H@7"(D -M<&%S&ET(#(*"0D[.PH@(&5S86,*9&]N90H*:68@6R`B)&1E -M=B(@/3T@(B(@70IT:&5N"B`@("!D978](F5T:#(B"F9I"@II9B!;("(D8VED -M&ET(#(*6R`B)&-R96%T92(@/3T@(C$B(%T@)B8@6R`B)&QF;&%G -M)'!F;&%G)')F;&%G)'-F;&%G(B`A/2`B,3$Q,2(@72`F)B!U&ET(#(*"FEF(%L@(B1CW!R:6YT("0Q?27)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS -M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E -M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,@/2!;)V5T:#$G+"`G971H,B6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2!O9B!T:&4@ -M3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A -M8FQE(&QA=R!O2!O9B!T:&4@9&YS;6%S<2!F:6QE+@IC<"`B)$1( -M0U!?0T].1DE'7TU!24XB("`B)$1(0U!?0T].1DE'7TU!24Y?0D%+(@IC<"`B -M)$1(0U!?0T].1DE'(B`B)$1(0U!?0T].1DE'7T)!2R(*"B-E;7!T>2!T:&4@ -M8V]N9FEG(&9I;&4*96-H;R`^("1$2$-07T-/3D9)1PH*=F%R/2(D,2(*9&AC -M<%]R86YG93TB(@ID:&-P7V=A=&5W87D](B(*9&AC<%]N971M87-K/2(B"F1N -M'1?9&YS/20H96-H -M;R`B)$--1$Q)3D4B('P@9W)E<"`M;R`B=7-E97AT9&YS/71R=64B*0IW:&EL -M92!;("UN("(D=F%R(B!="F1O"B!V87(Q/20H96-H;R`D=F%R('P@8W5T("UF -M,2`M9"`B+2(I"B!R;W5T97)I<#TD*"!E8VAO("1V87(Q('P@8W5T("UF,2`M -M9"`B.B(@*0H@9V%T97=A>3TD*&5C:&\@)'9AV1H8W!?V1H8W!?;F5T;6%S:WTB)V1H8W`M;W!T:6]N/71A9SIR86YG -M92W9A -MVQO9WTB8&=R97`@(EYD:&-P+6]P=&EO;CTV(B`B)$1(0U!?0T].1DE'7TU! -M24XB8")<;B(*;&]G/2(D>VQO9WTB8&=R97`@(EYD:&-P+6]P=&EO;CUO<'1I -M;VXZVQO -M9WTB8&=R97`@(EYD:&-P+7)A;F=E/2(@(B1$2$-07T-/3D9)1U]-04E.(F`B -M7&XB"@II9B!;("(D;&]G(B`A/2`G7&Y<;EQN)R!="G1H96X*("-#;&5A;FEN -M9R!T:&4@97AI9&AC<"UR86YG93TO9"<@(B1$2$-07T-/3D9)1U]-04E.(@IF:0H*(W=R -M=&EN9R!T:&4@;F5W(&-O;F9I9R!I;G1O('1H92!C;VYF:6<@9FEL92X*96-H -M;R`M92`B)&1H8W!?&ET("1R -M97-U;'0@)&QO8VL@)&QO8VME9`H````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````````````````````!O -M<'0O8VQO=60O8FEN+V-S7V1H8W`N<'D````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7,@/2!S970H*0H@("`@("`@(&9O2`A/2`G -M:60G(&%N9"!E;G1R>5LG;6%C7V%D9')E7,N861D*&ME>2D* -M("`@("`@("`@("`@("`@(&)R96%K"@H@("`@("`@(&EF(&1A=&%;)W)E;6]V -M92==(&%N9"!K97D@;F]T(&EN(')E;6]V95]K97ES.@H@("`@("`@("`@("!R -M96UO=F5?:V5Y2!I -M;B!R96UO=F5?:V5Y5TI"@H@("`@("`@(&1B86=;9&%T85LG:7!V-%]A9&1R97-S)UU=(#T@9&%T -M80H*("`@(')E='5R;B!D8F%G"@```&]P="]C;&]U9"]B:6XO8W-?8VUD;&EN -M92YP>0`````````````````````````````````````````````````````` -M```````````````````````````````````````````P,#`P-S4U`#`P,#$W -M-3``,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ -M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E -M(&%T"B,*(R`@(&AT='`Z+R]W=W2!O9B!T:&4@ -M3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A -M8FQE(&QA=R!O'!R97-S(&]R(&EM -M<&QI960N("!3964@=&AE($QI8V5N'DN8V9G("]E=&,O:&%P2]H87!R;WAY+F-F9RYO;&0*"B`@;78@)&YE -M=U]C;VYF:6<@+V5T8R]H87!R;WAY+VAA<')O>'DN8V9G"B`@:68@:&%P2`M<"`O=F%R+W)U;B]H87!R;WAY+G!I9"`M9B`O971C+VAA<')O>'DO:&%P -M2YC9F<@+7-F("0H8V%T("]V87(O'DN<&ED*3L@=&AE -M;@H@("`@;&]G9V5R("UT(&-L;W5D(").97<@:&%P2!I;G-T86YC92!S -M=6-C97-S9G5L;'D@;&]A9&5D+"!S=&]P<&EN9R!P'DO:&%P2YC9F<@)&YE=U]C;VYF:6<* -M("`@(&UV("]E=&,O:&%P2]H87!R;WAY+F-F9RYO;&0@+V5T8R]H87!R -M;WAY+VAA<')O>'DN8V9G"B`@("!H87!R;WAY("UP("]V87(O'DN<&ED("UF("]E=&,O:&%P2]H87!R;WAY+F-F9R`M2YP:60I"B`@("!R970],0H@(&9I"@IE>&ET("1R -M970*```````````````````````````````````````````````````````` -M`````````````````````````````````````````````````````')O;W0O -M;6]N:71O71H;VX*(R!,:6-E;G-E9"!T;R!T -M:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE -M"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@ -M(&AT='`Z+R]W=WWT*("`@('!A2`K)UTG*R(@(B`K("=;)RMP2LG -M72<@*R`B("(@*R!M2!O;F4@<&ED(&]R(&YO=`H@("`@:68@97AI=%-T871U6EN9R!F97<@;6]R92!T:6UEWT*("`@(&9A:6QI -M;F=?PH@("`@("`@("`@("`@("`@ -M(G-U8V-EPH@("`@("`@("`@("`@ -M("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EWT@(U-K:7`@WT*("`@(&9A:6QI;F=# -M:&5C:W,@/2!;70H@("`@:68@8VAE8VM4>7!E(#T](")B87-I8R(Z"B`@("`@ -M("`@;6]N:71297-U;'0L(&9A:6QI;F=#:&5C:W,@/2!M;VYI=%!R;V-E&-L=61E(#T@:&-?9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!H8U]D871A(&5L7!E*0H@("`@("`@("`@("`@("`@:68@;&5N*')E="D@ -M/3T@,#H*("`@("`@("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@ -M("`@("`@:68@(G-U8V-E7,N87)G=BD@/3T@,CH*("`@("`@("!I9B!S>7,N -M87)G=ELQ72`]/2`B861V86YC960B.@H@("`@("`@("`@("!M86EN*")A9'9A -M;F-E9"(I"B`@("`@("`@96QI9B!S>7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@ -M("`@("`@("`@("!M86EN*")B87-I8R(I"B`@("`@("`@96QS93H*("`@("`@ -M("`@("`@<')I;G1D*")%7!E(&]F('1E7,N87)G=BD*("`@(&5L0`````` -M```````````````````````````````````````````````````````````` -M```````````````````P,#`P-C0T`#`P,#$W-3``,#`P,371H;VX*(R!,:6-E -M;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@ -M=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ -M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E -M(&%T"B,*(R`@(&AT='`Z+R]W=W'!E8W1E9"`](%M="B`@("`@("`@ -M9&5S=$EP(#T@<&]R=$9O'0L('-R8U!O2!I -M;B!I<%1A8FQE4QI'!E8W1E -M9#H*("`@("`@("`@("`@("`@("`@("!I9B!I<%1A8FQE16YT'!E8W1E9$5N=')Y*2`]/2`M,3H*("`@("`@("`@("`@("`@("`@("`@("`@ -M9F]U;F1!;&P@/2!&86QS90H@("`@("`@("`@("`@("`@("`@("`@("!B4QI2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA -M=R!O'!R97-S(&]R(&EM<&QI960N -M("!3964@=&AE($QI8V5N$UE;6]R>55S86=E(&EN(&AE86QT:%]C -M:&5C:W-?9&%T82`B("L@7`H@("`@("`@("`@("`@(")S>7-T96U4:')E&ET*#`I"@H@("`@;6%X365M;W)Y -M57-A9V4@/2!F;&]A="AD871A6R)M87A-96UO7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@ -M(&UA:6XH*0H````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M'E?8VAE8VLN<'D````````````` -M```````````````````````````````````````````````````````````` -M`````````````#`P,#`V-#0`,#`P,36]U(&UA>2!N;W0@=7-E('1H -M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N -M41A=&$@86YD(")M87AC;VYN -M(B!I;B!H84-F9U-E8W1I;VYS6R)G;&]B86PB73H*("`@("`@("!I9B!H87!R -M;WAY1&%T85LB;6%X8V]N;B)=("$](&AA0V9G4V5C=&EO;G-;(F=L;V)A;")= -M6R)M87AC;VYN(EU;,%TN'E$871A(BD*("`@(&EF(&AA -M<')O>'E$871A(&ES($YO;F4@;W(@;&5N*&AA<')O>'E$871A*2`]/2`P.@H@ -M("`@("`@('!R:6YT(").;R!D871A('!R;W9I9&5D('1O(&-H96-K+"!S:VEP -M<&EN9R(*("`@("`@("!E>&ET*#`I"@H@("`@=VET:"!O<&5N*"(O971C+VAA -M<')O>'DO:&%P2YC9FWT*("`@(&-UWT*("`@(&9O41A=&$L(&AA0V9G4V5C=&EO;G,I"@H@("`@:68@ -M8VAE8VM-87A#;VYN(&%N9"!C:&5C:TQB4G5L97,Z"B`@("`@("`@<')I;G0@ -M(D%L;"!C:&5C:W,@<&%S&ET*#`I"B`@("!E;'-E.@H@ -M("`@("`@(&5X:70H,2D*"@II9B!?7VYA;65?7R`]/2`B7U]M86EN7U\B.@H@ -M("`@:68@;&5N*'-Y7,N87)G=ELQ72`]/2`B -M861V86YC960B.@H@("`@("`@(&UA:6XH*0H````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&ET*#`I"@H@("`@=&5M<&QA=&5697)S:6]N36%T8VAE -M65T('-E='5P(&%T("(@*R!R96QE87-E1FEL92`K7`H@ -M("`@("`@("`@("`@("`@("`B+"!S:VEP<&EN9RXB"B`@("`@("`@96QI9B!E -M>'!E8W1E9"`A/2!F;W5N9#H*("`@("`@("`@("`@<')I;G0@(E1E;7!L871E -M(%9E'!E8W1E9"`K("(L(&9O=6YD.B`B("L@9F]U;F0*("`@("`@ -M("`@("`@=&5M<&QA=&5697)S:6]N36%T8VAE'!E8W1E9"`K("(L(&9O=6YD.B`B("L@9F]U;F0*("`@("`@ -M("`@("`@&ET*#$I"@H*:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH* -M("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A;F0@2\````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````,#`P,#0`````````````````````````` -M```````````````````````````````````````````````P,#`P-C0T`#`P -M,#$W-3``,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS -M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E -M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W3U.;VYE*3H*("`@('=I=&@@ -M;W!E;B@G+W)O;W0O:&5A;'1H7V-H96-K2!I2!I5TN2D@/3T@,#H*("`@("`@("`@("`@("`@(&-O;G1I -M;G5E"B`@("`@("`@("`@(&ME>59A;"`](&5N=')Y+G-P;&ET*"(](BD*("`@ -M("`@("`@("`@:68@;&5N*&ME>59A;"D@/3T@,CH*("`@("`@("`@("`@("`@ -M(&1;:V5Y5F%L6S!=+G-T2]?7VEN:71?7RYP>0`````````````````````````````````````````` -M````````````````````````````````````````,#`P,#8T-``P,#`Q-S4P -M`#`P,#$W-3``,#`P,#`P,#$U-#``,3,V,C4Q-3`S,30`,#$W-S8R`"`P```` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````'5S=&%R("``9&%R2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO -M2!A<'!L:6-A8FQE(&QA=R!O'!R -M97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N0`````````````````````````````````` -M````````````````````````````````````````````````,#`P,#8T-``P -M,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#,Q,S(`,3,V,C4Q-3`S,30`,#$W-S8Q -M`"`P```````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````'5S=&%R("``9&%R2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET -M*#`I"@H@("`@;6EN1&ES:TYE961E9"`](&9L;V%T*&1A=&%;(FUI;D1IF4I("\@,3`R-`H*("`@ -M(&EF("AF6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI -M86YC90HC('=I=&@@=&AE($QI8V5N2!I;7!O7,I(#T](#`Z"B`@("`@ -M("`@<')I;G0@(D%L;"`B("L@7,@ -M87)E(')E86-H86)L92!V:6$@<&EN9R(*("`@("`@("!E>&ET*#`I"B`@("!E -M;'-E.@H@("`@("`@('!R:6YT(")5;G)E86-H86)L92!G871E=V%Y7,N87)G=ELQ72`]/2`B8F%S:6,B -M.@H@("`@("`@(&UA:6XH*0H````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````')O;W0O:&5A;'1H7V-H96-K0`````````````````````````````````````````````````````````` -M```````````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P -M,371H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD -M871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C -M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F -M('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&5C=71A8FQE71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E -M($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H -M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C -M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I -M"@H@("`@=VET:"!O<&5N*"2!O -M9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A -M<'!L:6-A8FQE(&QA=R!O'!R97-S -M(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N$-P=55S86=E(&EN(&AE -M86QT:%]C:&5C:W-?9&%T82!S>7-T96U4:')E&ET*#`I"@H@("`@;6%X0W!U57-A9V4@/2!F;&]A="AD871A -M6R)M87A#<'55&ET*#`I"B`@("!E -M;'-E.@H@("`@("`@('!R:6YT(")&86EL960@=&\@&ET*#$I"@H*:68@7U]N86UE -M7U\@/3T@(E]?;6%I;E]?(CH*("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A -M;F0@0`````````````````````````````````````` -M````````````````````````````````````````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2`]('9-6R)M86-!9&1R97-S(ET@ -M*R`B("(@*R!V35LB:7`B72`K("(@(B`K('9-6R)V;4YA;64B70H@("`@("`@ -M(&9O=6YD16YT2`](%1R=64*("`@("`@("`@("`@("`@(&)R96%K"@H@("`@("`@("`@("!N -M;VY$969A=6QT4V5T(#T@(G-E=#HB("L@=DU;(FEP(ETN2`](%1R=64*("`@("`@ -M("`@("`@("`@(&)R96%K"@H@("`@("`@(&EF(&YO="!F;W5N9$5N=')Y.@H@ -M("`@("`@("`@("!F86EL961#:&5C:R`](%1R=64*("`@("`@("`@("`@9F%I -M;'5R94UE&ET*#$I"B`@("!E;'-E.@H@("`@("`@('!R -M:6YT(")!;&P@(B`K('-T7,N87)G=ELQ72`]/2`B861V86YC960B.@H@("`@("`@(&UA:6XH -M*0H````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````````````````!R;V]T -M+V9U;F,N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P -M.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N -M2!O;F4@;&]C:R!IPH@("`@ -MPH@("`@;&]C:STD,0H*("`@(%]?;&]C:V5D/3`*("`@ -M(%]?5%,]8&1A=&4@*R5S)4Y@"B`@("!?7TQ/0TM$25(](B]T;7`B"B`@("!? -M7TQ/0TM&24Q%/2(D7U],3T-+1$E2+R1?7U13+20D+21L;V-K+FQO8VLB"@H@ -M("`@:68@6R`D,B!="B`@("!T:&5N"B`@("`@("`@7U]424U%3U54/20R"B`@ -M("!E;'-E"B`@("`@("`@7U]424U%3U54/3,P"B`@("!F:0H*("`@(&EF(%L@ -M+64@)%]?3$]#2T9)3$4@70H@("`@=&AE;@H@("`@("`@(&QO9V=EPH@("`@7U],3T-+1$E2/2(O=&UP -M(@H@("`@7U],3T-+1DE,13TB)%]?3$]#2T1)4B\J+20D+20Q+FQO8VLB"B`@ -M("!?7VQO8VME9#TD,@H@("`@:68@6R`B)%]?;&]C:V5D(B`]/2`B,2(@70H@ -M("`@=&AE;@H@("`@("`@(')M("1?7TQ/0TM&24Q%"B`@("!F:0I]"@HC(')E -M;&5A&ET('9A;'5E"B,@ -M)#(@;&]C:R!F:6QE;F%M90HC("0S(&QO8VME9"@Q*2!OF4]8&EP(&%D9'(@2!O9B!T:&4@3&EC96YS92!A=`HC -M"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ -M=&AE($QI8V5N7,O8VQA;65T82UD871A+R@N*UM>+UTI+S\D("`N+B]M -M971A9&%T82\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%="@HC:'1T<#HO -M+SQR;W5T97))4#XO;&%T97-T+V9O;R!A;F0@+BXN+V9O;R\@*'EI96QD(&UE -M=&%D871A+R1)4"]F;V\I"B-A2UZ;VYE+S\D("`N+B]M971A9&%T82\E>U)%34]415]! -M1$12?2]A=F%I;&%B:6QI='DM>F]N92!;3"Q.0RQ14T%="E)E=W)I=&52=6QE -M(%YC;&]U9"UI9&5N=&EF:65R+S\D("`N+B]M971A9&%T82\E>U)%34]415]! -M1$12?2]C;&]U9"UI9&5N=&EF:65R(%M,+$Y#+%%305T*4F5WU)%34]415]!1$12?2]I -M;G-T86YC92UI9"!;3"Q.0RQ14T%="E)E=W)I=&52=6QE(%YL;V-A;"UH;W-T -M;F%M92\_)"`@+BXO;65T861A=&$O)7M214U/5$5?041$4GTO;&]C86PM:&]S -M=&YA;64@6TPL3D,L45-!70I297=R:71E4G5L92!>;&]C86PM:7!V-"\_)"`@ -M+BXO;65T861A=&$O)7M214U/5$5?041$4GTO;&]C86PM:7!V-"!;3"Q.0RQ1 -M4T%="E)E=W)I=&52=6QE(%YP=6)L:6,M:&]S=&YA;64O/R0@("XN+VUE=&%D -M871A+R5[4D5-3U1%7T%$1%)]+W!U8FQI8RUH;W-T;F%M92!;3"Q.0RQ14T%= -M"E)E=W)I=&52=6QE(%YP=6)L:6,M:7!V-"\_)"`@+BXO;65T861A=&$O)7M2 -M14U/5$5?041$4GTO<'5B;&EC+6EP=C0@6TPL3D,L45-!70I297=R:71E4G5L -M92!><'5B;&EC+6ME>7,O/R0@("XN+VUE=&%D871A+R5[4D5-3U1%7T%$1%)] -M+W!U8FQI8RUK97ES(%M,+$Y#+%%305T*4F5W=FTM:60O/R0@ -M("XN+VUE=&%D871A+R5[4D5-3U1%7T%$1%)]+W9M+6ED(%M,+$Y#+%%305T* -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````=F%R+W=W=R]H=&UL+W5S97)D871A+P`` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````````#`P,#`W-34`,#`P,3/dev/null 2>&1 || ${echo} 'cloud_scripts/usr/share/cloud/cloud-scripts.tar': 'MD5 check failed' - ) << \SHAR_EOF -6c9c71f04c38fbbe6031c09a732f525d cloud_scripts/usr/share/cloud/cloud-scripts.tar -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/usr/share/cloud/cloud-scripts.tar'` -ne 696320 && \ - ${echo} "restoration warning: size of 'cloud_scripts/usr/share/cloud/cloud-scripts.tar' is not 696320" - fi -fi -# ============= cloud_scripts/usr/share/cloud/cloud-scripts.tar ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/usr/share/cloud/cloud-scripts.tar' -then -${echo} "x - SKIPPING cloud_scripts/usr/share/cloud/cloud-scripts.tar (file already exists)" - -else -${echo} "x - extracting cloud_scripts/usr/share/cloud/cloud-scripts.tar (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/usr/share/cloud/cloud-scripts.tar -M971C+P`````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````#`P,#`W-34`,#`P,37-T96U-87A& -M:6QE4VEZ93TQ,$T*4G5N=&EM94UA>%5S93TR,$T*```````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````971C+W-Y7-T -M96TO:'EP97)V+61A96UO;G,N:'8M=G-S+61A96UO;BYS97)V:6-E```````` -M````````````````````````````````````````````````````,#`P,#8T -M-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,S0`,3,V,C4Q-3`S,30`,#(S -M,37!E2!S97)V:6-E("A64U,I(&1A96UO;@H*6U-E&5C4W1A3UM=6QT:2UU7-T96UD+W-Y2UC;VYF -M:63TO=7-R+VQO8V%L+V-L;W5D+W-Y7-T96TO;W!E;BUV;2UT;V]L3UM=6QT:2UU3UM=6QT:2UU7-T96UD+W-Y&5N+FUO=6YT"D)E9F]R93UN971W;W)K+G1A2UC;VYF:6&5C4W1A&5C4W1A3UM=6QT:2UU7-T96TO:'EP97)V+61A96UO;G,N:'8M -M9F-O<'DM9&%E;6]N+G-E7!E2!S97)V:6-E("A&0T]062D@9&%E;6]N"D-O -M;F1I=&EO;E!A=&A%>&ES=',]+V1E=B]V;6)U0H*6U-E3UM=6QT:2UU7-T96TO8VQO=60M -M<&]S=&EN:70N2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N0`````````````````````````````````````````````` -M`````````````````````````````````````````#`P,#`V-#0`,#`P,36]U(&UA>2!N;W0@=7-E -M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI -M8V5N7!E(#$S("UJ($123U`*+4$@24Y0550@+7`@:6-M<"`M:B!!0T-%4%0* -M+4$@24Y0550@+6D@971H,2`M<"!T8W`@+6T@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* -M(R`@(&AT='`Z+R]W=W7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E -M<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H -M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N -M2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H -M92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R -M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T -M"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7-C=&P@8V]N9FEG=7)A -M=&EO;B!F:6QE"B,*(R!&;W(@8FEN87)Y('9A;'5E7-C=&PN -M8V]N9B@U*2!F;W(@;6]R92!D971A:6QS+@HC($!615)324].0`H*(R!#;VYT -M2!T:&5R -M96)Y(')E9'5C:6YG('1H92!S:7IE(&]F(&1I&PR='!D+WAL -M,G1P9"YC;VYF```````````````````````````````````````````````` -M````````````````````````````````````````````````````````,#`P -M,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,3,`,3,U-C$W,C4Q-3(` -M,#$T-#4U`"`P```````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````'5S=&%R("``9&%R65S"G!P<&]P=&9I;&4@/2`@("`O971C+W!P<"]O<'1I;VYS -M+GAL,G1P9`H````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````971C+V1N2!D:7-A8FQE -MF5N+"!S:6YC92!T:&5Y"B,@=&5L;"!D -M;G-M87-Q('1O(&9I;'1E2X@268@>6]U(&AA=F4@82!D:6%L+6]N+61E;6%N9"!L:6YK('1H97D@ -M86QS;R!S=&]P"B,@=&AE6]U('=A;G0@9&YS('1O(&=E="!I=',@=7!S=')E86T@2`@(&%P<&5A2!O=&AE<@HC(&9I -M;&4L(&=E='1I;F<@:71S('-E2!O;@HC('-P96-I9FEE9"!I;G1E -M&-E<'0M:6YT97)F86-E/65T:#$*97AC97!T+6EN -M=&5R9F%C93UE=&@R"F5X8V5P="UI;G1E6]U('=A;G0@9&YS;6%S<2!T;R!P6]U"B,@=V%N="!D;G-M -M87-Q('1O(')E86QL>2!B:6YD(&]N;'D@=&AE(&EN=&5R9F%C97,@:70@:7,@ -M;&ES=&5N:6YG(&]N+`HC('5N8V]M;65N="!T:&ES(&]P=&EO;BX@06)O=70@ -M=&AE(&]N;'D@=&EM92!Y;W4@;6%Y(&YE960@=&AI6]U('=A;G0@=&\@ -M:&%V92!A(&1O;6%I;@HC(&%U=&]M871I8V%L;'D@861D960@=&\@2!Q=6%L:69I -M960@9&]M86EN(&YA;65S+"!A7-T96US(&-O;F9I9W5R960@8GD@ -M1$A#4`HC(#,I(%!R;W9I9&5S('1H92!D;VUA:6X@<&%R="!F;W(@(F5X<&%N -M9"UH;W-T7,N;W)G+G5K+#$Y,BXQ-C@N,BXP -M+S(T"@HC(%-A;64@:61E82P@8G5T(')A;F=E(')A=&AE7,N;W)G+G5K+#$Y,BXV."XS -M+C$P,"PQ.3(N,38X+C,N,C`P"@HC(%5N8V]M;65N="!T:&ES('1O(&5N86)L -M92!T:&4@:6YT96=R871E9"!$2$-0('-E6]U(&YE960*(R!T;R!S -M=7!P;'D@=&AE(')A;F=E(&]F(&%D9')E2!$2$-0"B,@2!B92!S970@;VYL>2!F;W(@=&AI2!W:&5N('1H92!T86<@(F=R965N -M(B!I2!A('-U8FYE="!W:&EC:"!C -M86XG="!B92!U6YA;6EC(&%D9')E2!A;F0*(R!A9&0@;F%M97,@=&\@=&AE($1.4R!F;W(@=&AE($E0 -M=C8@861D2P@-#AH"@HC($1O($1(0U`@86YD(%)O=71E2!W:6QL('5S -M92!33$%!0R!F;W(@861D2!R82US=&%T96QE2!J -M=7-T"B,@;F5E9"!T;R!B92!O;B!T:&4@7,@9VEV92!T:&4@:&]S="!W:71H($5T -M:&5R;F5T(&%D9')E7,@9VEV92!T:&4@:&]S="!W -M:71H(&-L:65N="!I9&5N=&EF:65R(#`Q.C`R.C`R.C`T"B,@=&AE($E0(&%D -M9')E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ -M(G)E9"(@=&\*(R!T:&4@;6%C:&EN92!W:71H($5T:&5R;F5T(&%D9')E&5D($E0=C8@861D2!;72!A2X*(V1H8W`M:&]S=#UI9#HP,#HP,3HP -M,#HP,3HQ-CID,CHX,SIF8SHY,CID-#HQ.3IE,CID.#IB,BP@9G)E9"P@6S$R -M,S0Z.C5="@HC($EG;F]R92!A;GD@8VQI96YT2!M86-H:6YE('=H;W-E"B,@1$A#4"!V96YD;W)C;&%S -M'1R82!O<'1I -M;VYS('=H:6-H(&%R92!T86=G960@87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@ -M;VYE"B,@;V8@=VAO'1R82!O<'1I;VYS('=H:6-H(&%R -M92!T86=G960@87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO2!D;G-M -M87-Q(&%N9"!S96YD(&YO(&1E9F%U;'0*(R!R;W5T92!A="!A;&PN($YO=&4@ -M=&AA="!T:&ES(&]N;'D@=V]R:W,@9F]R('1H92!O<'1I;VYS('-E;G0@8GD* -M(R!D969A=6QT("@Q+"`S+"`V+"`Q,BP@,C@I('1H92!S86UE(&QI;F4@=VEL -M;"!S96YD(&$@>F5R;RUL96YG=&@@;W!T:6]N"B,@9F]R(&%L;"!O=&AE0H*(R!3970@=&AE(&1E9F%U;'0@=&EM92UT;RUL:79E -M('1O(#4P"B-D:&-P+6]P=&EO;CTR,RPU,`H*(R!3970@=&AE(")A;&P@2!A;B!O<'1I;VX@=VAI8V@@=VEL;"!O;FQY -M(&)E('-E;G0@=&\@=&AE(")R960B(&YE='=O2!A6]U -M(&UA>2!W86YT('1O('5N8V]M;65N="!S;VUE(&]R(&%L;"!O9B!T:&5M(&EF -M('EO=2!U7!E"@HC(%-E;F0@86X@96UP='D@5U!! -M1"!O<'1I;VXN(%1H:7,@;6%Y(&)E(%)%455)4D5$('1O(&=E="!W:6YD;W=S -M(#<@=&\@8F5H879E+@HC9&AC<"UO<'1I;VX],C4R+")<;B(*"B,@4V5N9"!2 -M1D,M,S,Y-R!$3E,@9&]M86EN('-E87)C:"!$2$-0(&]P=&EO;BX@5T%23DE. -M1SH@66]U71H:6YG(&5L&4@=&%G(&9O2YK<'AE"B-D:&-P+6)O;W0];7EB;V]T:6UA9V4*"B,@16YC87!S -M=6QA=&5D(&]P=&EO;G,@9F]R($5T:&5R8F]O="!G4%A%+B!!;&P@=&AE(&]P -M=&EO;G,@87)E"B,@96YC87!S=6QA=&5D('=I=&AI;B!O<'1I;VX@,32!C;V1E"B-D:&-P+6]P=&EO;CUE;F-A<#HQ-S4L(#$W-BP@,6(@("`@("`@ -M(R!N;RUP61H8W`*(V1H8W`M;W!T:6]N/65N8V%P.C$W-2P@,3#@V+3,R"B-D:&-P+6UA=&-H/6ET86YI8W,L(&]P=&EO;CIC;&EE;G0M87)C -M:"P@,B`C24$V-`HC9&AC<"UM871C:#UH86UM97)S+"!O<'1I;VXZ8VQI96YT -M+6%R8V@L(#8@(W@X-BTV-`HC9&AC<"UM871C:#UM86-T96QS+"!O<'1I;VXZ -M8VQI96YT+6%R8V@L(#<@(T5&22!X.#8M-C0*"B,@1&\@&4M<')O;7!T/2)0#@V4$,L("));G-T86QL($QI;G5X(BP@<'AE;&EN=7@*"B,@3&]A -M9',@/'1F='`M#@V4$,L("));G-T86QL($QI;G5X(BP@<'AE;&EN -M=7@L(#$N,BXS+C0*"B,@57-E(&)O;W1S97)V97(@;VX@;F5T=V]R:RP@9F]U -M;F0@;7D@;75L=&EC87-T(&]R(&)R;V%D8V%S="X*(W!X92US97)V:6-E/7@X -M-E!#+"`B26YS=&%L;"!W:6YD;W=S(&9R;VT@4DE3('-E#@V4$,L("));G-T86QL('=I;F1O=W,@9G)O;2!225,@2!F:6QE0HC('1H92!U&%M<&QE(&]F(&1H8W`M8F]O="!W:71H(&%N(&5X=&5R;F%L(%1& -M5%`@2`M+7!X92US97)V -M:6-E+@HC9&AC<"UB;V]T/2]V87(O9G1P9"]P>&5L:6YU>"XP+&)O;W1H;W-T -M+#$Y,BXQ-C@N,"XS"@HC($EF('1H97)E(&%R92!M=6QT:7!L92!E>'1E#TR,3`P"@HC(%1H92!$2$-0('-E6]U(&UI9VAT(&5N9"!U<"!A8V-I9&5N=&%L -M;'D@8V]N9FEG=7)I;F<@82!$2$-0"B,@2X@5&AE($E30R!S97)V97(@=7-E&5C=71A8FQE -M('=H96X@82!$2$-0(&QE87-E(&ES(&-R96%T960@;W(@9&5S=')O>65D+@HC -M(%1H92!A`HC86QI87,],2XR+C,N -M,"PU+C8N-RXP+#(U-2XR-34N,C4U+C`*(R!A;F0@=&AI"UT87)G970@9F]R(&%L;"!L;V-A;`HC(&UA8VAI;F5S+@HC;&]C86QM>`H* -M(R!2971U6]U('=A;G0@=&\@ -M3XL/'=E:6=H=#X*(R!)9B!T:&4@9&]M86EN('!A&%M<&QE+F-O;2!D;VUA:6X@=&\* -M(R!L9&%P&%M -M<&QE+F-O;2!D;VUA:6X@=&\*(R!L9&%P&%M<&QE+F-O;2PS -M.#DL,@H*(R!!(%-25B!R96-O'!A;G-I;VX@ -M9&]N92!F;W(@4U)6(')E8V]R9',@7V1O97-?;F]T"B,@;V-C=7(@9F]R(%!4 -M4B!R96-O'!A;G-I;VX@9&]N92!F;W(@4U)6 -M(')E8V]R9',@7V1O97-?;F]T"B,@;V-C=7(@9F]R(%185"!R96-O&%M<&QE(%-01BX*(W1X="UR96-O5\@=V]R:W,*(R!F;W(@=&%R9V5T3TO=F%R -M+VQO9R]D;G-M87-Q+FQO9PH*(R!);F-L=61E(&$@86YO=&AE'0*```````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````````971C+V-R;VXN9&%I -M;'DO```````````````````````````````````````````````````````` -M`````````````````````````````````````````````````````````#`P -M,#`W-34`,#`P,32]C;&5A2!C86-H92!T;R!U;'1I;6%T96QY(')E9'5C92!S=V%P<&EN9PH*7,O=FTO9')O<%]C86-H97,*```````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````````````````971C+W9M -M=V%R92UT;V]LF4@:V5P=#H@,2!-0@IV;7-V8RYM -M87A,;V=3:7IE(#T@,0H*(R!$969I;F5S('1H92`B=FUT;V]L"!S:7IE(#4P30IS:7IE(#4P30IC;VUP0HC3&ES=&5N061D7,@9F]R('!R;W1O8V]L('9E2`O971C+W-S:"]SF4@;V8@97!H -M96UE7-L;V=& -M86-I;&ET>2!!551("E-Y65S"D%U=&AO7,@:6X@+V5T8R]S65S(&EF('EO=2!D;VXG="!T'0@<&%S65S"D=34T%024-L96%N=7!#65S"@HC($%C8V5P="!L;V-A;&4M4]F9G-E="`Q,`HC6#$Q57-E3&]C86QH;W-T -M('EE65S"B-5&PR='!D```````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````,#`P,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,34`,3,U -M-C$W,C4Q-3(`,#$T-C`W`"`P```````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````'5S=&%R("``9&%R6]U('=A;G0@=&\@=7-E(&$@9&EF9F5R -M96YT(&EN=&5R9F%C92!O6]U(&EN2!F2!)4"!A9&1R97-S+`H@("`@("`@(",@>6]U(&-A;B!U7-L;V'-O8VL@(R!P7-T96T@;&]G9VEN9PHD36]D3&]A9"!I;6ML;V<@ -M("`C('!R;W9I9&5S(&ME2!R:VQO9V0I"B,D36]D3&]A9"!I;6UA7-L;V<@7-T96TN("!3<&QI="!I="!U<"!S;R!T:&%T"B,@:70@:7,@96%S>2!T -M;R!W2YL;V<* -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````````````````&5T8R]M;V1P -M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@ -M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2!C86-H92!T -M;R!U;'1I;6%T96QY(')E9'5C92!S=V%P<&EN9PH*<&AY;65M/20H9G)E97QA -M=VL@)R]>365M.B][<')I;G0@)#)])RD*:68@6R`D<&AY;65M("UL="`U,3,P -M,#`@73L@=&AE;@H@('-Y;F,@)B8@96-H;R`Q(#X@+W!R;V,O2YC;VYF```````````````````````````````````````````````` -M```````````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P -M,3$-O;FYE8W1I -M;VYS4&5R0VAI;&0@("`),3`P,`H\+TEF36]D=6QE/@H*(R!V:6TZ('-Y;G1A -M>#UA<&%C:&4@=',]-"!S=STT('-T6U,:6YK&5S($9O;&QO=U-Y;4QI;FMS($UU;'1I5FEE=W,*"0E!;&QO=T]V97)R:61E -M($%L;`H)"4]R9&5R(&%L;&]W+&1E;GD*"0EA;&QO=R!F&5C0T=)("U-=6QT:59I97=S -M("M3>6U,:6YK2QA;&QO=PH@("`@("`@($1E;GD@9G)O -M;2!A;&P*("`@("`@("!!;&QO=R!F3X*"3Q$:7)E8W1O0H)"6%L;&]W(&9R;VT@86QL"@D\+T1I3X*"@E38W)I -M<'1!;&EA0H)"4%L;&]W(&9R;VT@86QL"@D\ -M+T1I3X*"@E%T%004-(15],3T=?1$E2?2]ET%004-(15],3T=?1$E2 -M?2]S2QA;&QO=PH)"41E;GD@ -M9G)O;2!A;&P*"0E!;&QO=R!F2!T -M:&4*"2,@("!34TQ#97)T:69I8V%T949I;&4@9&ER96-T:79E(&ES(&YE961E -M9"X*"5-33$-E0H*"2,@("!397)V -M97(@0V5R=&EF:6-A=&4@0VAA:6XZ"@DC("`@4&]I;G0@4U-,0V5R=&EF:6-A -M=&5#:&%I;D9I;&4@870@82!F:6QE(&-O;G1A:6YI;F<@=&AE"@DC("`@8V]N -M8V%T96YA=&EO;B!O9B!014T@96YC;V1E9"!#02!C97)T:69I8V%T97,@=VAI -M8V@@9F]R;2!T:&4*"2,@("!C97)T:69I8V%T92!C:&%I;B!F;W(@=&AE('-E -M0H)(R`@('1H92!R969E -M2`H0T$I.@H)(R`@(%-E="!T:&4@0T$@8V5R=&EF:6-A -M=&4@=F5R:69I8V%T:6]N('!A=&@@=VAE6]U(&YE960@:&%S:"!S>6UL -M:6YK6UL:6YK7!E*3H* -M"2,@("!#;&EE;G0@8V5R=&EF:6-A=&4@=F5R:69I8V%T:6]N('1Y<&4@86YD -M(&1E<'1H+B`@5'EP97,@87)E"@DC("`@;F]N92P@;W!T:6]N86PL(')E<75I -M2!T;R!V97)I9GD@=&AE(&-E -M4-L:65N -M="!R97%U:7)E"@DC4U-,5F5R:69Y1&5P=&@@(#$P"@H)(R`@($%C8V5S6YT87@@:7,@80H)(R`@(&UI>'1UU-33%]#25!(15)]("%^(&TO7BA%6%!\3E5,3"DO(%P* -M"2,@("`@("`@("`@("!A;F0@)7M34TQ?0TQ)14Y47U-?1$Y?3WT@97$@(E-N -M86ME($]I;"P@3'1D+B(@7`H)(R`@("`@("`@("`@(&%N9"`E>U-33%]#3$E% -M3E1?4U]$3E]/57T@:6X@>R)3=&%F9B(L(")#02(L(")$978B?2!<"@DC("`@ -M("`@("`@("`@86YD("5[5$E-15]71$%9?2`^/2`Q(&%N9"`E>U1)345?5T1! -M67T@/#T@-2!<"@DC("`@("`@("`@("`@86YD("5[5$E-15](3U52?2`^/2`X -M(&%N9"`E>U1)345?2$]54GT@/#T@,C`@("`@("`@*2!<"@DC("`@("`@("`@ -M("!OU)%34]415]!1$12?2`]?B!M+UXQ.3)<+C2!E>&ES=&EN9R!W:&5N(&-L -M:65N=`H)(R`@("`@875T:&5N=&EC871I;VX@:7,@=7-E9"DN(%1H:7,@8V%N -M(&)E('5S960@=&\@:6UP;W)T('1H92!C97)T:69I8V%T97,*"2,@("`@(&EN -M=&\@0T=)('-C'!O'!E;G-I=F4@;W!E2!E;F%B;&5S('1H90H)(R`@("`@97AP;W)T871I;VX@9F]R -M($-'22!A;F0@4U-)(')E<75E'!O2`O=7-R+VQI8B]C9VDM8FEN/@H)"5-33$]P=&EO;G,@*U-T -M9$5N=E9A6]U(&-A;B!U6]U(')E8V5I=F4@ -M22]/(&5R2!A;&5R="!I2!F;W(@8G)O=W-E6]U(&MN;W<@=&AA="!T:&5I2X*"2,@("!. -M;W1I8V4Z($UO2!W86YT('1O(&1I2P@;VYE(&AA6]U(&IU2!A;'-O"B,@:&%V92!T;R!C -M:&%N9V4@=&AE(%9I6]U(&AA=F4@=7!GB!A;F0*(R!214%$ -M344N1&5B:6%N+F=Z"@I,:7-T96X@,3`N,2XQ+C$Z.#$X,`H*/$EF36]D=6QE -M(&UO9%]S0HC('1E;&P@ -M9&YS;6%S<2!T;R!F:6QT97(@;W5T('%U97)I97,@=VAI8V@@=&AE('!U8FQI -M8R!$3E,@8V%N;F]T"B,@86YS=V5R+"!A;F0@=VAI8V@@;&]A9"!T:&4@2!T:&4@2X*"B,@3F5V97(@9F]R=V%R9"!P;&%I -M;B!N86UE2X*(R!.;W1E('1H870@*&%M;VYG2!O9B!T:&4@=7!S=')E86T*(R!S97)V97)S(&ET(&MN -M;W=S(&%B;W5T(&%N9"!T2!E86-H('%U97)Y"B,@=VET:"`@96%C:"`@2`@:6X@('1H92`@;W)D97(@('1H97D@("!A<'!E87(@ -M("!I;@HC("]E=&,O2!A&%M<&QE(&]F(')O=71I;F<@4%12('%U97)I97,@=&\@ -M;F%M97-E2!D;VUA:6YS(&AE6]U('=A;G0@=&\@9F]R8V4@=&\@86X@ -M25`@861D&%M<&QE(&)E;&]W('-E;F0@86YY -M(&AO6]U('=A;G0@ -M9&YS;6%S<2!T;R!L:7-T96X@9F]R($1(0U`@86YD($1.4R!R97%U97-T&-E<'0M -M:6YT97)F86-E/6QO"@HC($]R('=H:6-H('1O(&QI2!A9&1R -M97-S("AR96UE;6)E2!$3E,@7-T96US('=H:6-H -M('-U<'!O6]U(&UA>2!N965D('1H:7,@:7,@=VAE;@HC(')U;FYI;F<@ -M86YO=&AE6]U(&1O;B=T('=A;G0@9&YS;6%S<2!T;R!R -M96%D("]E=&,O:&]S=',L('5N8V]M;65N="!T:&4*(R!F;VQL;W=I;F<@;&EN -M92X*(VYO+6AO6]U('=A;G0@:70@=&\@2!P;W1E;G1I86QL>2!S971T:6YG('1H90HC -M("`@(&1O;6%I;B!O9B!A;&P@'!A;F0M:&]S -M=',B"B-D;VUA:6X],BYV;6]P0HC(&$@;&5A6]U(&AA=F4@;6]R92!T:&%N(&]N92!N971W;W)K+"!Y;W4@ -M=VEL;"!N965D('1O"B,@2!P87)A;65T97)S(&9O&%M<&QE -M7,@7,@:70G -M2!T -M:&4@;6%C:&EN92!W:71H(&5T:&5R;F5T"B,@861D'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ -M(G)E9"(@=&\*(R!A;GD@;6%C:&EN92!W:71H(&5T:&5R;F5T(&%D9')E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ -M(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO"(*(V1H8W`M -M=F5N9&]R8VQA2!M86-H:6YE(&]N90HC -M(&]F('=H;W-E($1(0U`@=7-E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@ -M87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO2!N86UE.@HC(')U;B`B9&YS;6%S<2`M+6AE;'`@9&AC<"(@=&\@9V5T -M(&$@;&ES="X*(R!.;W1E('1H870@86QL('1H92!C;VUM;VX@2!D;G-M87-Q+B!9;W4@=F5R>2!L:6ME;'D@=VEL;"!N;W0@ -M;F5E9`HC(&%N>2!D:&-P+6]P=&EO;G,N($EF('EO=2!U2!A2!W;W)K0HC(&1E9F%U;'0@*#$L -M(#,L(#8L(#$R+"`R."D@=&AE('-A;64@;&EN92!W:6QL('-E;F0@82!Z97)O -M+6QE;F=T:"!O<'1I;VX*(R!F;W(@86QL(&]T:&5R(&]P=&EO;B!N=6UB97)S -M+@HC9&AC<"UO<'1I;VX],PH*(R!3970@=&AE($Y44"!T:6UE('-E0H*(R!3970@=&AE(&1E -M9F%U;'0@=&EM92UT;RUL:79E('1O(#4P"B-D:&-P+6]P=&EO;CTR,RPU,`H* -M(R!3970@=&AE(")A;&P@2!A;B!O<'1I -M;VX@=VAI8V@@=VEL;"!O;FQY(&)E('-E;G0@=&\@=&AE(")R960B(&YE='=O -M2!A6]U(&UA>2!W86YT('1O('5N8V]M;65N="!T:&5M -M(&EF('EO=2!U2!N971B:6]S('-C;W!E+@H*(R!396YD(%)&0RTS -M,SDW($1.4R!D;VUA:6X@2!W:&5N('1H92!C;&EE;G0@71E(&EN=&5G97(@+2!T:&%T)W,@=VAA="!M:6-R;W-O9G0@=V%N -M=',N(%-E90HC(&AT='`Z+R]T96-H;F5T,BYM:6-R;W-O9G0N8V]M+U=I;F1O -M=W-397)V97(O96XO;&EB2]A-S!F,6)B-RUD,F0T+30Y9C`M.39D-BTT -M8C2!S;VUE(&-O;F9I9W5R871I;VYS(&]F"B,@ -M171H97)B;V]T('1O(&%L;&]W(&ES('1O(')E8V]G;FES92!T:&4@1$A#4"!S -M97)V97(N"B-D:&-P+6]P=&EO;CUV96YD;W(Z171H97)B;V]T+#8P+")%=&AE -M"X@3F]T92!T:&%T -M('=E(&YE960@=&\@2!N965D"B,@=&AI2!F:6QE0HC('1H92!U&5L:6YU>"YR -M960M;F5T"@HC($%N(&5X86UP;&4@;V8@9&AC<"UB;V]T('=I=&@@86X@97AT -M97)N86P@2!C;&EE -M;G0@=VAI8V@@8G)O861C87-T6]U(&UI9VAT(&5N9"!U -M<"!A8V-I9&5N=&%L;'D@8V]N9FEG=7)I;F<@82!$2$-0"B,@2X@5&AE($E30R!S -M97)V97(@=7-E2!T:&4@:&]S=&YA;64*(R!I9B!T:&5R92!IF4@:&5R92X*(V-A8VAE -M+7-I>F4],34P"@HC($EF('EO=2!W86YT('1O(&1I2!R97-P;VYS97,@=VAI8V@@8V]M92!F;W)M("]E=&,O:&]S=',@86YD -M('1H92!$2$-0(&QE87-E"B,@9FEL92!H879E(%1I;64M5&\M3&EV92!S970@ -M87,@>F5R;RP@=VAI8V@@8V]N=F5N=&EO;F%L;'D@;65A;G,*(R!D;R!N;W0@ -M8V%C:&4@9G5R=&AE6]U(&%R92!H87!P>2!T;R!T6]U(&-A;B!S970@82!T:6UE+71O+6QI=F4@*&EN"B,@6]U('=A;G0@9&YS;6%S<2!T -M;R!D971E8W0@871T96UP=',@8GD@5F5R:7-I9VX@=&\@"!U<"!$ -M3E,@2!W;W)K"!T;R`U+C8N-RYX"B-A;&EA"UT87)G970@9F]R(&%L;"!L;V-A;`HC(&UA8VAI;F5S+@HC;&]C86QM>`H* -M(R!2971U6]U('=A;G0@=&\@ -M3XL/'=E:6=H=#X*(R!)9B!T:&4@9&]M86EN('!A&%M<&QE+F-O;2!D;VUA:6X@=&\* -M(R!L9&%P&%M -M<&QE+F-O;2!D;VUA:6X@=&\*(R!L9&%P&%M<&QE+F-O;2PS -M.#D*"B,@5'=O(%-25B!R96-O&%M<&QE+F-O;2PS.#DL,0HC&%M<&QE+F-O;2QL9&%P&%M<&QE+F-O -M;0HC&%M<&QE+F-O;0H*(R!4:&4@9F]L -M;&]W:6YG(&QI;F4@65E(%!A9V4N7VAT='`N7W1C<"YD;G,M'0M3TO=F%R+VQO9R]D -M;G-M87-Q+FQO9PH*(R!);F-L=61E(&$@86YO=&AE'0*```````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````&5T8R]I<'-E8RYS96-R971S```````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P,3PH@("`@;6%X2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P -M.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N -M71R=6YC871E"GT*```````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````````&5T8R]L;V=R;W1A=&4N -M9"]C;VYN=')A8VMD```````````````````````````````````````````` -M```````````````````````````````````````````````````````P,#`P -M-C0T`#`P,#$W-3``,#`P,3PH@("`@;6%X6-O;7!R97-S"@H@("`@<&]S=')O=&%T90H@("`@("`@(&EF -M(%L@+64@+W9A2!O9B!T:&4@3&EC96YS92!A -M=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O -M'!R97-S(&]R(&EM<&QI960N("!3 -M964@=&AE($QI8V5NPH@("`@("`@(')O -M=&%T92`U"B`@("`@("`@;6%X2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N'-I>F4@,3!- -M"B`@("`@("`@;6ES0H@("`@("`@ -M(&-O;7!R97-S"B`@("`@("`@8V]P>71R=6YC871E"GT*```````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````!E=&,O;&]G0H)8V]M<')E71R=6YC871E"B`@("`@("!R;W1A=&4@,PH@("`@("`@8V]M<')E'0*("`@("`@(&UA>'-I>F4@,3!-"B`@("`@("!N;W1I9F5M -M<'1Y"GT*```````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````&5T8R]L;V=R;W1A=&4N9"]R0H)8V]M<')E -M2YL;V<@>PH@("`@0H@("`@;6%X7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ -M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E -M(&%T"B,*(R`@(&AT='`Z+R]W=W2\````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````,#`P,#'DN8V9G```````````````````````````````````````````` -M```````````````````````````````````````````````````````````P -M,#`P-C0T`#`P,#$W-3``,#`P,3'D*"75S97(@:&%P0H)9W)O -M=7`@:&%P0H)9&%E;6]N"@ID969A=6QT7!E(CHB9W5E2(Z(C$W,BXQ-BXQ+C$B+`H)(F1E9F%U -M;'1?96YT2(*?0H````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````;W!T+V-L;W5D+W1E7!E(CH@(FEC;7`B"B`@("`@("`@("`@('TL"B`@("`@("`@("`@ -M('L*("`@("`@("`@("`@("`@(")A;&QO=V5D(CH@=')U92P*("`@("`@("`@ -M("`@("`@(")C:61R(CH@(C$P+C`N,BXP+S@B+`H@("`@("`@("`@("`@("`@ -M(F9I7!E(CH@(G5D<"(*("`@("`@("`@ -M("`@?2P*("`@("`@("`@("`@>PH@("`@("`@("`@("`@("`@(F%L;&]W960B -M.B!T7!E(CH@(FYE='=OR)P=6)L:6-?:7`B.B(Q -M,"XP+C(N,3`R(BP*(G-O=7)C95]N870B.G1R=64L"B)A9&0B.G1R=64L"B)O -M;F5?=&]?;VYE7VYA="(Z9F%L2(Z(C$P+C`N,BXQ(BP*(FYE=&UA2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H -M92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2!C;61?;&EN92YJ2!I<',P,#`Q+FIS;VX*+V]P="]C;&]U9"]B:6XO -M=7!D871E7V-O;F9I9RYP>2!I<',P,#`R+FIS;VX*+V]P="]C;&]U9"]B:6XO -M=7!D871E7V-O;F9I9RYP>2!I<',P,#`S+FIS;VX*```````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````;W!T+V-L;W5D+W1ER)P -M=6)L:6-?:7`B.B(Q,"XP+C(N,3`S(BP*(G-O=7)C95]N870B.G1R=64L"B)A -M9&0B.G1R=64L"B)O;F5?=&]?;VYE7VYA="(Z9F%L2(Z(C$P+C`N,BXQ(BP*(FYE=&UAPH)(FQO8V%L7W!U8FQI8U]I<"(Z(C$W,BXQ-BXQ -M+C$B+`H)(FQO8V%L7V=U97-T7V-I9'(B.B(Q-S(N,38N,2XP+S(T(BP*"2)L -M;V-A;%]P=6)L:6-?9V%T97=A>2(Z(C$W,BXQ-BXQ+C$B+`H)(G!E97)?9V%T -M97=A>5]I<"(Z(C$P+C(P,"XR,#`N,2(L"@DB<&5E2(Z(C-D97,M;60U(BP* -M"2)I:V5?<&]L:6-Y(CHB,V1E7)I9VAT(&]W -M;F5R6]U -M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O -M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W -M=W2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NW!R:6YT("0Y.WTG*0H):68@ -M6R`D4D]55$527U-4051%(#T@(E50(B!="@ET:&5N"@D@("`@4U1!5%53/4U! -M4U1%4@H)96QI9B!;("123U5415)?4U1!5$4@/2`B1$]73B(@70H)=&AE;@H) -M("`@(%-405154SU"04-+55`*"69I"F9I"@IE8VAO(")3=&%T=7,Z("1[4U1! -M5%53?2(*```````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````!O<'0O8VQO=60O=&5M<&QA=&5S+VAE87)T8F5A="YS:"YT96UP;``` -M```````````````````````````````````````````````````````````` -M````````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC -M"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ -M=&AE($QI8V5N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H -M='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI -M8V5NPH@("`@36]D -M92!&5$97('L*("`@("`@("`C"B`@("`@("`@(R!3:7IE(&]F('1H92!R97-E -M;F0@<75E=64@*&EN(&]B:F5C=',I+B!4:&ES(&ES('1H92!M87AI;75M"B`@ -M("`@("`@(R!N=6UB97(@;V8@;V)J96-T2!T;R!S=&]R92!D96%D(&]B:F5C=',N"B`@("`@("`@(R!$969A -M=6QT(&ES(#$S,3`W,B!O8FIE8W1S+@H@("`@("`@(",*("`@("`@("`C(%)E -M6]U('-E="!A(&QO=R!V86QU92P@5$-0(&5N -M=')I97,@:6X*("`@("`@("`C($5S=&%B;&ES:&5D('-T871E&%M<&QE+`H@("`@("`@(",@86X@ -M4U-((&-O;FYE8W1I;VX@=VET:&]U="!+965P06QI=F4@96YA8FQE9"X@268@ -M;F]T('-E="P*("`@("`@("`C('1H92!D865M;VX@=7-E6]U(&1E -M8W)E87-E('1H:7,*("`@("`@("`C('9A;'5E+"!T:&4@;G5M8F5R(&]F(&%C -M:VYO=VQE9V1M96YT6]U"B`@("`@("`@(R!I;F-R96%S -M92!T:&ES('9A;'5E+"!T:&4@'!E6-L97,@6]U('1O(&1I -M'1E'1E -MF%T:6]N -M(&UE2!O9B!Y;W5R(&5X:7-T:6YG(&EN=&5R9F%C97,N($EF -M(&%N>2!D;W5B="P*("`@("`@("`C(&1O(&YO="!M;V1I9GD@=&AI0H@("`@("`@(",@9&]U -M8G0L(&1O(&YO="!M;V1I9GD@=&AIF%T:6]N(&UEF%T:6]N(&UE6]U"B`@("`@ -M("`@(R!N;W1I8V4@6]U(&UA>2!W86YT('1O -M(&EN8W)E87-E('1H92!S:7IE"B`@("`@("`@(R!O9B!T:&4@2!T;R!A8VAI979E(&9A=6QT+71O;&5R86YC92X@26X@ -M8V%S92!O9B!D;W5B="P@9&\*("`@("`@("`C(&YO="!M;V1I9GD@=&AI6]U(&-A;B!O;FQY('-E;&5C="!O;F4N"B`@("`C"B`@("`C(%5$4"![ -M"B`@("`@("`@(PH@("`@("`@(",@5410(&%D9')E6]U(&%R92!G;VEN9R!T;R!UF4*("`@("`@("`C"B`@("`@("`@ -M(R!28W93;V-K971"=69F97(@,3(T.3(X,`H*("`@("`@("`C"B`@("`@("`@ -M(R!%;F%B;&4O1&ES86)L92!M97-S86=E(&-H96-KPH@("`@(PH@("`@(R!3970@=&AE -M(&YI8V4@=F%L=64@;V8@=&AE(&1A96UO;BP@=&AI6]U(&-A;B!S96QE8W0@8F5T=V5E -M;@H@("`@(R!24B!A;F0@1DE&3R!A;F0@=&AE('!R;V-EPH@("`@(R`@(%1Y<&4@1DE&3PH@("`@(R`@(%!R:6]R:71Y -M(#DY"B`@("`C('T*"B`@("`C"B`@("`C($YU;6)E2X*("`@(",@4F5A9"!S;VUE(&1O8W5M96YT -M2!K965P -M('-O;64@9&5A9"!E;G1R:65S(&-A8VAE9"!F;W(@<&]S7-L;V2!N86UE -M("AD865M;VX@*&1E9F%U;'0I(&]R(&QO8V%L,"XN-RD*("`@(",@1&5F875L -M=#H@;V9F"B`@("`C"B`@("!3>7-L;V<@;VX*"B`@("`C"B`@("`C($QO8VMF -M:6QE"B`@("`C"B`@("!,;V-K1FEL92`O=F%R+VQO8VLO8V]N;G1R86-K9"YL -M;V-K"@H@("`@(PH@("`@(R!5;FEX('-O8VME="!C;VYF:6=UF5-87A'&%M<&QE(&-O;F9I9W5R -M871I;VX@9FEL92!S971S('1H90H@("`@(R!S:7IE('1O(#(@34)Y=&5S('1O -M(&%V;VED('1H:7,@F4*("`@(",@:68@:70@9&5T96-T&EM=6T@8G5F9F5R('-I>F4@9W)O=W1H('1H870@8V%N(&)E(')E86-H -M960N(%1H:7,@97AA;7!L92!F:6QE"B`@("`C('-E=',@=&AE('-I>F4@=&\@ -M."!-0GET97,N"B`@("`C"B`@("!.971L:6YK0G5F9F5R4VEZ94UA>$=R;W=T -M:"`X,S@X-C`X"@H@("`@(PH@("`@(R!)9B!T:&4@9&%E;6]N(&1E=&5C=',@ -M=&AA="!.971L:6YK(&ES(&1R;W!P:6YG('-T871E+6-H86YG92!E=F5N=',L -M"B`@("`C(&ET(&%U=&]M871I8V%L;'D@6YC:')O -M;FEZ871I;VX@86=A:6YS="!T:&4@2V5R;F5L"B`@("`C(&%F=&5R(#,P('-E -M8V]N9',@*&1E9F%U;'0@=F%L=64I+B!297-Y;F-H6]U('=A;G0@6YC+B!4:&ES(&]P=&EO;B!I"!K97)N96P@/CT@ -M,BXV+C,Q+@H@("`@(PH@("`@(R!.971L:6YK179E;G1S4F5L:6%B;&4@3V9F -M"@H@("`@(PH@("`@(R!">2!D969A=6QT+"!T:&4@9&%E;6]N(')E8V5I=F5S -M('-T871E('5P9&%T97,@9F]L;&]W:6YG(&%N"B`@("`C(&5V96YT+61R:79E -M;B!M;V1E;"X@66]U(&-A;B!M;V1I9GD@=&AIF%T:6]N(&UO -M9&4L('1H92!P;VQL:6YG(&UO9&4@8V%N(&]N;'D@9W5AF5S('1H92!H86YD;&EN9R!O9B!S -M=&%T92UC:&%N9V4@979E;G1S(&-O;6EN9PH@("`@(R!F2`H:6X@ -M=&5R;7,@;V8*("`@(",@2!T:')E92!F:6QT97(M6]U(&-A;B!D969I;F4@=&AE(&5V -M96YT(&9I;'1E2!A=F]I -M9&EN9R!T:&4@8V]P>2!O9B!T:&4@979E;G0@;65S6]U(')E<75I"!K97)N96P@/CT@,BXV+C(Y('1O"B`@("`C -M(&9I;'1E6]U('=A;G0@=&\@PH@ -M("`@("`@(",*("`@("`@("`C($%C8V5P="!O;FQY(&-E65R(#0@<')O -M=&]C;VPN"B`@("`@("`@(PH@("`@("`@(%!R;W1O8V]L($%C8V5P="!["B`@ -M("`@("`@("`@(%1#4`H@("`@("`@("`@("!30U10"B`@("`@("`@("`@($1# -M0U`*("`@("`@("`@("`@5410"B`@("`@("`@("`@($E#35`@(R!4:&ES(')E -M<75I2!A;&P@=&AE"B`@("`@("`@(R!)4"!A -MPH@("`@("`@("`@ -M("!)4'8T7V%D9')E2!A;B!)4'8V(&%D9')E2!F;&]W('-T871E+@H@("`@("`@(",@5&AI -M2!B86-K=7`*("`@("`@("`C(&9I -M7!E/6YO=&EF>0H@("`@4WES=&5M9"!O;@I]"@`````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````!O<'0O8VQO=60O=&5M -M<&QA=&5S+V-H96-K7VAE87)T8F5A="YS:"YT96UP;``````````````````` -M````````````````````````````````````````````````````````,#`P -M,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7-T96UC=&P@2`M+69A=6QT"@H@("`@<&MI;&P@+3D@:V5E<&%L:79E9"`^/B`D4D]55$52 -M7TQ/1R`R/B8Q('Q\('1R=64*("`@('!K:6QL("TY(&-O;FYT&ET"F9I"@``````````````;W!T+V-L;W5D+W1E;7!L871E -M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI -M86YC90HC('=I=&@@=&AE($QI8V5N6]U -M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HA -M('=I=&@@=&AE($QI8V5NPH@("`@PH@("`@("`@(&AE87)T -M8F5A=`H@("`@?0H*("`@(&YO=&EF>5]B86-K=7`@(B]O<'0O8VQO=60O8FEN -M+VUA2`M+6)A8VMU<"(*("`@(&YO=&EF>5]M87-T97(@(B]O<'0O -M8VQO=60O8FEN+VUA2`M+6UA5]F875L -M="`B+V]P="]C;&]U9"]B:6XO;6%S=&5R+G!Y("TM9F%U;'0B"GT*```````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````!O<'0O8VQO=60O8FEN+P`````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````,#`P,#&4N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&ET(#$*?0H*&5?8V9G7V9I;&5N86UE(#P\14]&"D1%1D%53%0@ -M9&5F875L=`I04D]-4%0@,0I424U%3U54(#(V"D1)4U!,05D@8F]O="YMF4]-C8P,#`@:6YI=')D/21I;FET0`````````````````````````````````````````` -M````````````````````````````````````````````,#`P,#2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA -M=R!O'!R97-S(&]R(&EM<&QI960N -M("!3964@=&AE($QI8V5N7!E(ET@/3T@(G-T871I8VYA -M=')U;&5S(CH*("`@("`@("`@("`@;F5W7!E(ET@/3T@(F9O"`](&1B86=;"AF;W)W87)D*0H@("`@("`@("`@("`@("`@("`@(&EF(&YO -M="!I;F1E>"`]/2`M,3H*("`@("`@("`@("`@("`@("`@("`@("`@9&)A9UMS -M;W5R8V5?:7!=6VEN9&5X72`](&YE=W)U;&4*("`@("`@("`@("`@("`@("`@ -M("!E;'-E.@H@("`@("`@("`@("`@("`@("`@("`@("!D8F%G6W-O=7)C95]I -M<%TN87!P96YD*&YE=W)U;&4I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@ -M("`@("`@("`@("`@("`@(&1B86=;7!E(ET@/3T@ -M(G-T871I8VYA=')U;&5S(CH*("`@("`@("`@("`@("`@(&EF('-O=7)C95]I -M<"!I;B!D8F%G+FME>7,H*3H*("`@("`@("`@("`@("`@("`@("!D96P@9&)A -M9UMS;W5R8V5?:7!="B`@("`@("`@("`@(&5L:68@7,H*3H*("`@("`@("`@("`@("`@("`@("!I;F1E>"`] -M("TQ"B`@("`@("`@("`@("`@("`@("`@9F]R(&9O%T*"B`@("!R971U2!T:&4@<'5B;&EC('-I9&4L -M('1H;W-E(&UU7!E(ET@/3T@7!E(ET@/3T@(G-T871I -M8VYA="(Z"B`@("`@("`@2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET(#$*9FD*"G5S86=E*"D@ -M>PH@('!R:6YT9B`B57-A9V4Z("5S("U;8WQG?')\;GQD72!;+6P@/'!U8FQI -M8R!G871E=V%Y/ET@6RUV(#QV<&,@8VED&ET(#(@)&QO8VL@)&QO8VME9`H).SL*("!E -M&ET("0_("1L;V-K("1L;V-K960*9FD*"FEF -M(%L@(B1N9FQA9R(@/3T@(C$B(%T*=&AE;@H@("-G971?=G!N7W5S86=E"B`@ -M=6YL;V-K7V5X:70@)#\@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)&1F;&%G -M(B`]/2`B,2(@70IT:&5N"B`@(W)E;6]V95]U&ET(#`@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)')F;&%G(B`]/2`B -M,2(@70IT:&5N"B`@71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A -M=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&-E -M<'0@24]%2@I"B`@("`@("`@("`@ -M("`@("`@("`@9W5E22R)$;VU57U)E<75E&-E<'0@17AC97!T:6]N(&%S(&4Z -M"B`@("`@("`@("`@("`@("`@("`@;&]G9VEN9RYE7!E)UT@/3T@)V%L;"<@86YD(&]B:ELG -M7!E(#T@(F%N>2(*("`@("`@("`@("`@:68@(FEC -M;7!?='EP92(@:6X@7,H*2!A;F0@7!E)UT*("`@("`@("`@("`@:68@(FEC;7!? -M8V]D92(@:6X@7,H*2!A;F0@7!E)UTL('-E;&8N7!E("5S("UJ("5S(B`E("AI8VUP7W1Y<&4L('-E;&8N&5C=71E*&1S=$EP2==.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5; -M)V%C=&EO;B==(#T@(D%#0T505"(*("`@("`@("`@("`@("`@("`@("!E;'-E -M.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5;)V%C=&EO;B== -M(#T@(D123U`B"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ -M("`@("`@(",@1F]R(&]T:&5R(')U;&5S(&%D9&5D+"!I9B!D969A=6QT7V5G -M7!E("5S(B`E(&EC;7!?='EP90H@("`@("`@("`@("`@ -M("`@96QI9B!R=6QE6R=P7!E -M+B!3;RP@:71S(&9W(&%T=')I8G5T92!I7!E(#T@ -M(F%N>2(*("`@("`@("`@("`@("`@('-E;&8N<')O=&]C;VP@/2!S96QF+G1Y -M<&4*("`@("`@("`@("`@("`@(&EF(")I8VUP7W1Y<&4B(&EN(')U;&4N:V5Y -M7!E -M+"!R=6QE6R=I8VUP7V-O9&4G72D*("`@("`@("`@("`@("`@(&EF('-E;&8N -M='EP92`]/2`B<')O=&]C;VPB.@H@("`@("`@("`@("`@("`@("`@(&EF(')U -M;&5;)W!R;W1O8V]L)UT@/3T@-#$Z"B`@("`@("`@("`@("`@("`@("`@("`@ -M(')U;&5;)W!R;W1O8V]L)UT@/2`B:7!V-B(*("`@("`@("`@("`@("`@("`@ -M("!S96QF+G!R;W1O8V]L(#T@&5C=71E*")I<'1A -M8FQE+4$O:7!T86)L97,@+70@9FEL=&5R("U$+V&5C=71E*")I -M<'-E="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP -M&5C=71E*")I<'-E="`M -M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP2!V -M86QI9"!D871A"B`@("`@("`@("`@("`@("!I9B!F;VQD97(@(3T@(G5S97)D -M871A(B!A;F0@9F]L9&5R("$](")M971A9&%T82(Z"B`@("`@("`@("`@("`@ -M("`@("`@8V]N=&EN=64*"B`@("`@("`@("`@("`@("!I9B!F:6QE(#T]("(B -M.@H@("`@("`@("`@("`@("`@("`@(&-O;G1I;G5E"@H@("`@("`@("`@("`@ -M("`@7,N97AI="@Q*0H@("`@("`@("`@("!I9B!O2Q!;&QO=UQN1&5N>2!F2!E>&ES=',L('=E(&1O(&ET('1H:7,@ -M=V%Y(&9O7,N97AI="@Q -M*0H*("`@("`@("!F:"`](&]P96XH:'1A8V-E2`](")2 -M97=R:71E4G5L92!>;65T82UD871A+R@N*RDD("`N+B\B("L@9F]L9&5R("L@ -M(B\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%=(@H@("`@("`@("`@("!H -M=&%C8V5S7,N97AI="@Q*2`@ -M(R!&25A-10H@("`@("`@(')E='5R;B!4&ET*#$I("`C($9)6$U%"B`@("`@("`@:7!S96,N=G!N+2@N*BDN8V]N9B(L(&9I;&4I"B`@("`@ -M("`@("`@(&EF(&TZ"B`@("`@("`@("`@("`@("!S96QF+F-O;F9I<',N87!P -M96YD*&TN9W)O=7`H,2DI"@H@("`@("`@(&9O&5C=71E*")I<'-E -M8R!R96QO860B*0H*("`@(&1E9B!C;VYF:6=U#4R-2`M:B!!0T-%4%0B("4@9&5V72D*("`@ -M("`@("!F;W(@;F5T(&EN(&]B:ELG<&5E&UA&UA5]I<"=="B`@("`@("`@<&5E7!E/71U;FYE;"(I"B`@ -M("`@("`@9FEL92YA9&1E<2@B(&%U=&AB>3US96-R970B*0H@("`@("`@(&9I -M;&4N861D97$H(B!K97EE>&-H86YG93UI:V4B*0H@("`@("`@(&9I;&4N861D -M97$H(B!I:V4])7,B("4@:6ME<&]L:6-Y*0H@("`@("`@(&9I;&4N861D97$H -M(B!I:V5L:69E=&EM93TE3TS,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1T:6UE;W5T/3$R -M,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1A8W1I;VX]')A;F=E*#,I.@H@("`@("`@("`@("!R -M97-U;'0@/2!#&5C=71E*"=I<'-E8R!S=&%T=7,@=G!N+25S -M('P@9W)E<"`B)7,B)R`E("AR:6=H='!E97(L('!E97)L:7-T+G-P;&ET*"(L -M(BP@,2E;,%TI*0H@("`@("`@("`@("!I9B!L96XH2P@)R,G*0H@("`@("`@(&EF(&YO="!U&5C -M=71E*")T9&)D=6UP("]V87(O&5C=71E*"=K:6QL("TY("5S)R`E('!I9"D*"@IC;&%S&5C=71E*")S>7-T96UC=&P@2YS96-R971S(B`E("AS96QF+E903D-/3D9$25(I"B`@("`@ -M("`@>&PR='!D8V]N9F9I;&4@/2`B+V5T8R]X;#)T<&0O>&PR='!D+F-O;F8B -M"B`@("`@("`@>&PR='!O<'1I;VYS9FEL92`]("(O971C+W!P<"]O<'1I;VYS -M+GAL,G1P9"(*"B`@("`@("`@;&]C86QI<"`](&]B:ELG;&]C86Q?:7`G70H@ -M("`@("`@(&QO8V%L8VED2`Z(%!32R!<(B5S7"(B("4@*&QE9G0L('!S:RDI"B`@("`@ -M("`@&PR='!D8V]N9F9I;&4I"B`@("`@("`@>&PR='!D8V]N9BYA9&1E<2@B -M:7`@&PR='!O<'1I;VYS+F-O;6UI="@I"@H@("`@9&5F(')E;6]T96%C8V5S4EP*'-E;&8L(&EP82DZ"B`@("`@("`@9F]R(&EN -M=&5R9F%C92!I;B!S96QF+F-O;F9I9RYA9&1R97-S*"DN9V5T7VEN=&5R9F%C -M97,H*3H*("`@("`@("`@("`@:68@:6YT97)F86-E+FEP7VEN7W-U8FYE="AI -M<&$I.@H@("`@("`@("`@("`@("`@2@I"B`@("`@("`@4EP*')U -M;&5;)W!U8FQI8U]I<"==*0H@("`@("`@(&EN=&5R;F%L7V9W:6YT97)F86-E -M(#T@4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI"B`@ -M("`@("`@<'5B;&EC7V9W<&]R=',@/2!S96QF+G!O4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI+`H@ -M("`@("`@("`@("`@("`@&UA2(Z"B`@("`@("`@("`@(&9W7W!R97)O=71?2(Z"B`@("`@("`@ -M("`@(&9W7W!O2(Z"B`@("`@("`@("`@ -M(&9W7W!O2(Z"B`@("`@("`@ -M("`@(&9W7V]U='!U=%]R=6QE("L]("(@+2UD<&]R="`E2(Z"B`@("`@("`@("`@(&9W -M7V]U='!U=%]R=6QE("L]("(Z(B`K('-E;&8N<&]R='-4;U-T4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI -M+`H@("`@("`@("`@("`@("`@&9F9F9F9F9F("TM -M8W1M87-K(#!X9F9F9F9F9F8B("4*("`@("`@("`@("`@("`@("`@("`@("`@ -M4EP*')U;&5;(FEN=&5R;F%L7VEP -M(ETI+"!S96QF+F=E=$=U97-T27`H*2E=*0H*"F-L87-S($EP5&%B;&5S17AE -M8W5T;W(Z"@H@("`@8V]N9FEG(#T@3F]N90H*("`@(&1E9B!?7VEN:71?7RAS -M96QF+"!C;VYF:62!PR)P&5C=71OR)P&5C -M=71OR)P -M&5C=71O7!E.B`E&5C27!T86)L97,H8V]N9FEG*3H* -M("`@("`@("!L;V=G:6YG+F1E8G5G*")0&5C=71O7,H*3H*("`@("`@("`@("`@ -M97AE8T1A=&%B86&5C27!T -M86)L97,H8V]N9FEG*0H@("`@96QI9B!J&5C27!T86)L97,H -M8V]N9FEG*0H@("`@96QS93H*("`@("`@("!L;V=G:6YG+G=A7!E/25S(B`E("AP6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7)I9VAT(&]W;F5R6]U('5N9&5R('1H -M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C -M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7)I -M9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT -M='`Z+R]W=W&5C=71I;F'!O2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&QO9V=E -M&ET(#(@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)$%F;&%G(B`] -M/2`B,2(@70IT:&5N"B`@861D7W-N870@("1P=6)L:6-)<`H@('5N;&]C:U]E -M>&ET("0_("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1$9FQA9R(@/3T@(C$B -M(%T*=&AE;@H@(')E;6]V95]S870@("1P=6)L:6-)<`H@('5N;&]C:U]E>&ET -M("0_("1L;V-K("1L;V-K960*9FD*"G5N;&]C:U]E>&ET(#$@)&QO8VL@)&QO -M8VME9`H````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````````````````;W!T+V-L -M;W5D+V)I;B]V<&-?2!O9B!T:&4@3&EC96YS92!A=`HC"B,@ -M("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE -M($QI8V5N5]T86)L92@I('L*("!L;V-A;"!F5]T86)L92`B -MPH@(&QO8V%L(')U -M;&4])#$*("!L;V-A;"!I<#TD*&5C:&\@)')U;&4@?"!C=70@+60Z("UF,2D* -M("!I9B!;("1I<"`]/2`B4F5V;VME(B!="B`@=&AE;@H@("`@3TD9V%T97=A>2!C:61R/21C -M:61R(@H@(&QO8V%L(&1E=CTD*&=E=$5T:$)Y27`@)&EP*0H@(&EF(%L@)#\@ -M+6=T(#`@70H@('1H96X*("`@(')E='5R;B`Q"B`@9FD*("!S=61O(&EP(')O -M=71E(&%D9"`D8VED3TD9V%T97=A>2!C:61R/21C:61R(@H@ -M(')E='5R;B`D&ET(#(@)&QO8VL@)&QO8VME -M9`H@("`@("`@(#L["B`@97-A8PID;VYE"@II9B!;("UN("(D6EN9R!F=R!R=6QE -M&ET("1S=6-C97-S("1L;V-K("1L;V-K960*```````` -M``````````````````````````````!O<'0O8VQO=60O8FEN+V)A0`````````````````````````````````````````````````` -M````````````````````````````````````````````,#`P,#7)I9VAT(&]W;F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* -M(R`@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI -M8V5N&5C=71A8FQE/2&-E<'1I;VX@86YD('-E;&8N<')O8V5S&5C=71E('-H96QL(&-O;6UA;F0Z("5S -M)R`E('-E;&8N8VUD*0H@("`@("`@("`@("!E2<@:6X@<#H*("`@ -M("`@("`@("`@("`@("`@("`@("`@&-E<'1I;VXH)V-A;FYO="!F:6YD(&)A2!I;B`E&-E<'1I;VXH)V-A;FYO="!F:6YD -M(&AO2P@PH@("`@("`@("`@("`B87!I2V5Y(CH@87!I:V5Y+`H@ -M("`@("`@("`@("`B8V]M;6%N9"(Z("=N;W1I9GE"87)E;65T86Q07,H*2P@4)A3TE2P@5]P2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ -M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&EP=&%B;&5S -M+7-A=F5\9W)E<"`B24Y0550@+6H@3D545T]22U]35$%44R(@/B`O9&5V+VYU -M;&P*("!I9B!;("0_("UE<2`P(%T*("!T:&5N"B`@("`@(')E='5R;B`D/PH@ -M(&9I"B`@:7!T86)L97,@+4X@3D545T]22U]35$%44R`^("]D978O;G5L;`H@ -M(&EP=&%B;&5S("U)($9/4E=!4D0@+6H@3D545T]22U]35$%44R`^("]D978O -M;G5L;`H@(&EP=&%B;&5S("U)($E.4%54("UJ($Y%5%=/4DM?4U1!5%,@/B`O -M9&5V+VYU;&P*("!I<'1A8FQEPH@(&EP=&%B -M;&5S("U,($Y%5%=/4DM?4U1!5%,@+6X@+78@+7@@?"!A=VL@)R0Q('X@+UY; -M,"TY72LD+R![('!R:6YT9B`B)7,Z(BP@)#)])SL@/B`O9&5V+VYU;&P*("!I -M9B!;("UF("]R;V]T+W)E;6]V9616:69S(%T@.R!T:&5N(&EP=&%B;&5S("U: -M($Y%5%=/4DM?4U1!5%,@.R!F:3L@/B`O9&5V+VYU;&P*("`O&ET("0_("1L;V-K("1L -M;V-K960*9FD*"FEF(%L@(B1A9FQA9R(@/3T@(C$B(%T*=&AE;@H@("-A9&1? -M<'5B;&EC7VEN=&5R9F%C92`D<'5B;&EC268*("!U;FQO8VM?97AI="`D/R`D -M;&]C:R`D;&]C:V5D"F9I"@II9B!;("(D9&9L867)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&ET(#$*9FD*"G-E="`M>`IU2(*"FEF(%L@)#\@+65Q(#`@70IT:&5N -M"B`@("!T/6!D871E("LE2(*:68@6R`D/R`M;F4@ -M,"!="B`@('1H96X*("`@("`@*&-R;VYT86(@+6P@.V5C:&\@+64@(B-M;VYI -M=&]R:6YG0V]N9FEG7&Y32$5,3#TO8FEN+V)A2(I('P@8W)O;G1A8B`M"B`@("`@(&QO9V=E2!F;W(@;6]N:71O6]U(&UA>2!N;W0@=7-E('1H:7,@ -M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NWT*("`@(&9OF4G72`]('-T&QE;BD*("`@(&EF("=N=U]T>7!E)R!N;W0@:6X@:7`N:V5Y7!E)UT@/2`G<'5B;&EC)PH@("`@96QS93H* -M("`@("`@("!I<%LG;G=?='EP92==(#T@:7!;)VYW7W1Y<&4G72YL;W=E7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C -M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F -M('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5LP77T*"B`@("`@("`@("`@ -M("`@("!T;T1A=&5686P])"AD871E("UD("(D9&%T979A;"(@(BLE7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z -M+R]W=W0IE:F5C -M="!\?"!T0IS>7-T96UC=&P@7-T96UD+6IO=7)N -M86QD"@I465!%/20H9W)E<"`M4&\@)W1Y<&4]7$M;82UZ02U:72HG("]V87(O -M8V%C:&4O8VQO=60O8VUD;&EN92D*:68@6R`B)%194$4B(#T](")R;W5T97(B -M(%T@?'P@6R`B)%194$4B(#T](")V<&-R;W5T97(B(%T@?'P@6R`B)%194$4B -M(#T](")D:&-P"`O;W!T+V-L;W5D+V)I -M;B]U<&1A=&5?8V]N9FEG+G!Y(%T*("!T:&5N"B`@("`O;W!T+V-L;W5D+V)I -M;B]U<&1A=&5?8V]N9FEG+G!Y(&-M9%]L:6YE+FIS;VX@?'P@=')U90H@(&9I -M"F9I"@I;("$@+68@+W9A7-T96UD+W-S:&0@;65M;W)Y(&QE86L@+2!H='1P7-T96UD+VES7-T -M96UD+75S97(*"B,@16YA8FQE(&%N9"!3=&%R="!34T@*7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R -M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T -M"B,*(R`@(&AT='`Z+R]W=W2!S=&]R86=E('-Y7`])$A94$525DE33U(*("!I9B!; -M("(D:'EP(B`]/2`B=FUW87)E(B!=('Q\(%L@(B1H>7`B(#T](")H>7!E5]H='1P"B`@83)E;FUO9"!H96%D97)S"@H@(&-A="`^+V5T8R]A -M<&%C:&4R+V-OTA45%!3?2`];VX*4F5W7,@"UR97%U97-T960M=VET:"P@0V]N=&5N="U4 -M>7!E+"!O6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I -M="`B4V5T=&EN9R!U<"!);G1E&5C=71E(&EL8G9M('-V8W,B"B`@97AI="`Q"F9I"G-E -M='5P7VEL8G9M"@`````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````!O<'0O8VQO=60O8FEN+W-E='5P+W9P8W)O=71E2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N7-T96T@=FTB"@H@(&EF(%L@+68@ -M+V5T8R]H;W-TB`D1$]-04E.(%T@)B8@ -M1$]-04E./2)C;&]U9&YI;F4N:6YT97)N86PB"B`@(T1.4R!S97)V97(@=VEL -M;"!A<'!E;F0@)$1/34%)3B!T;R!L;V-A;"!Q=65R:65S"B`@6R-=*FQO8V%L/2XJ)"]L;V-A;#U<+R1$3TU!24Y< -M+R\B("]E=&,O9&YS;6%S<2YC;VYF"@H@(&-O;6UA;F0@+78@9&AC<%]R96QE -M87-E(#X@+V1E=B]N=6QL(#(^)C$*("!N;U]D:&-P7W)E;&5A&ET(#$*9FD*2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&EF(%L@(B1(65!%4E9)4T]2(B`A/2`B=FUW87)E(B!=.R!T:&5N -M"B`@("!R971U6YC"B`@2]L;V=R;W1A=&4@+V5T8R]C2`R/B8Q"B`@9FD*?0H*6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ -M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I="`B -M4V5T=&EN9R!U<"!%;&%S=&EC($QO860@0F%L86YC97(@7)I9VAT(&]W;F5R6]U('5N9&5R('1H -M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C -M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7!EPH@(&EF(%L@+60@+W!R;V,O>&5N(%T[('1H96X*("`@ -M(&UO=6YT("UT('AE;F9S(&YO;F4@+W!R;V,O>&5N"B`@("`D*&1M97-G('P@ -M9W)E<"`M<2`B6&5N($A632(I"B`@("!I9B!;("0_("UE<2`P(%T[('1H96X@ -M(",@,3U05BPP/4A630H@("`@("!E8VAO(")X96XM:'9M(B`F)B!R971UF5D(&%S($AY -M<&5R=B!W:&5N(%9IPH@(%L@(2`M9"`O<')O -M8R]X96X@72`F)B!S960@+6D@)W,O7G9C+R-V8R\G("]E=&,O:6YI='1A8B`F -M)B!T96QI;FET('$*("!;("UD("]P -M(W9C+W9C+R<@+V5T8R]I;FET=&%B("8F('1E;&EN:70@<0H*("!S>7-T96UC -M=&P@9&%E;6]N+7)E;&]A9`H*("!C87-E("1(65!%4E9)4T]2(&EN"B`@("`@ -M>&5N+7!V?'AE;BUD;VU5*0H@("`@("`@("`@7-T -M96UC=&P@7-T96UC=&P@9&ES86)L92!N -M='!D"B`@("`@("`@("!S>7-T96UC=&P@96YA8FQE('AE+61A96UO;@H@("`@ -M("`@("`@&5N=&]O;',@;F]T(&EN7Q#3TY&24=? -M2$]44$Q51U]00TE?04-023UY)R`O8F]O="]C;VYF:62`M -M3"`Q,34R,#`@='1Y4S`@=G0Q,#(B("]E=&,O:6YI='1A8@H@("`@("`@("`@ -M7-T96UC=&P@2!C;61L -M:6YE(&9I;&4@9G)O;2!Q96UU+6=U97-T+6%G96YT(@H@("`@("`@("`@("`@ -M(&)R96%K"B`@("`@("`@("`@(&9I"B`@("`@("`@("`@('-L965P(#$*("`@ -M("`@("`@(&1O;F4*("`@("`@("`@(&EF(%L@(2`M7-T96T@=&EM92!S>6YC)V0@=VET:"!H;W-T('9I82!V;7=AF5D -M(&%S('9I7!E7!E -M65S+"!H86-K>2$I"B`@("`@ -M("`@("!D;6ED96-O9&4@?"!G2(*("`@("`@("`@(&9I"B`@("`@("`@("`[.PH@(&5S86,*"B`@ -M(R!&:6YD(&%N9"!E>'!O7-T96UV;2@I('L*("!L;V-A;"!P871C:&9I;&4])#$*("!L;V-A;"!B -M86-K=7!F;VQD97(](B]T;7`O+F-O;F8N8F%C:W5P(@H@(&QO8V%L(&QO9V9I -M;&4](B]V87(O;&]G+W!A=&-H7-T96UV;2]C;VYF+V-L;W5D+FIK7-T96UV;2]C -M;VYF+RH@)&)A8VMU<&9O;&1E7-T96UV;0H@(&5C:&\@(D%L;"(@?"!U;GII<"`D<&%T8VAF:6QE("UD("]U -M&%R -M9W,@8VAM;V0@-34U"B`@:68@6R`M9B`D8F%C:W5P9F]L9&5R+V-L;W5D+FIK -M7-T96UV;2]C;VYF+PH@("`@96-H;R`B4F5S=&]R960@:V5Y -M7-T;W)E"B`@ -M:V5Y=&]O;"`M:6UP;W)T:V5Y7-T;W)E("]E=&,O7-T;W)E("]UU!!5$-(7TU/54Y4?2]A9V5N="YZ:7`@72`F)B!; -M("UF("]V87(O8V%C:&4O8VQO=60O<&%T8V@N7!E/21465!%(B`^/B`D -M;&]G9FEL90H@("`@<&%T8VA?FEP"B`@("!I9B!;("0_("UG="`P(%T*("`@('1H96X*("`@("`@96-H -M;R`B1F%I;&5D('1O(&%P<&QY('!A=&-H('-Y7-T -M96UD+W-Y365M.B][<')I;G0@)#)])RD*("!I9B!;("0H*'!H>7-M -M96TI*2`M;'0@-#`Y-C`P(%T[('1H96X*("`@("`@6YC"B`@'!O7!E&ET(#$P"B`@;&]G7VET(")3=&%R=&EN9R!G=65S="!S97)V:6-E2YS:``````````` -M```````````````````````````````````````````````````````````` -M````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@ -M("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE -M($QI8V5NPH@(&QO9U]I="`B4V5T=&EN9R!U<"!C;VYS -M;VQE('!R;WAY('-Y'D@+V5T8R]I<'1A8FQE'D*```````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````````````````````;W!T -M+V-L;W5D+V)I;B]S971U<"]C;VUM;VXN6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5]M86-S*"D@>PH@("`@;6%CS,Z+2(O971C+W5D978OV%D9')E5]M86-S("(D -M3DE#7TU!0U,B"B`@9FD*?0H*PH@(&QO8V%L -M(&EN=&9N=6T])#$*("!L;V-A;"!I<#TD,@H@(&QO8V%L(&UAVEN=&9N=6U]"B`@;&]C86P@8F]O='!R;W1O/2)S=&%T:6,B"@H@(&EF(%L@ -M(B1"3T]44%)/5$\B(#T](")D:&-P(B!="B`@=&AE;@H@("`@:68@6R`B)&EN -M=&9N=6TB("$]("(P(B!="B`@("!T:&5N"B`@("`@("!B;V]T<')O=&\](F1H -M8W`B"B`@("!F:0H@(&9I"@H@(&EF(%L@(B1I<"(@(3T@(C`N,"XP+C`B("UA -M("(D:7`B("$]("(B("UO("(D9F]R8V4B(#T](")F;W)C92(@70H@('1H96X* -M("`@("!E8VAO(")I9F%C92`@)&EN=&8@:6YE="`D8F]O='!R;W1O(B`^/B`O -M971C+VYE='=O7-C=&P@;F5T+FEP -M=C8N8V]N9BYA;&PN9&ES86)L95]I<'8V/3`*("!S>7-C=&P@;F5T+FEP=C8N -M8V]N9BYA;&PN9F]R=V%R9&EN9STQ"B`@7,O;F5T+VEP=C0O:7!?9F]R=V%R9`H@(%L@+68@+V5T -M8R]I<'1A8FQE7,O;F5T+VEP=C0O8V]N9B]D969A=6QT+W)P7V9I;'1E -M<@H@("`@("!F;W(@=FEF(&EN("16249?3$E35#L@9&\*("`@("`@("`@;&]G -M7VET(")C;&]U9#H@9&ES86)L92!R<%]F:6QT97(@;VX@<'5B;&EC(&EN=&5R -M9F%C93H@)'9I9B(*("`@("`@("`@7,O;F5T -M+VEP=C0O8V]N9B]L;R]R<%]F:6QT97(*?0H*96YA8FQE7VER<6)A;&%N8V4H -M*2!["B`@;&]C86P@96YA8FQE9#TD,0H@(&QO8V%L('!R;V,],`H*("!PPH@ -M(&QO8V%L(&5N86)L93TD,0H*("!I9B!;("1E;F%B;&4@+65Q(#`@70H@('1H -M96X*("`@("`@96-H;R`P(#X@+V5T8R]R<'-R9G-E;F%B;&4*("`@("`@#TD*'!R:6YT9B`B)7A<;B(@)&YU;2D*("!E8VAO("1H97@["B`@(V5N -M86)L92!R<',*("!E8VAO("1H97@@/B`O"TP+W)P7,O;F5T+V-OPH@(&EN:71?:6YT97)F86-EB`B)&=W9&5V -M(B!="B`@("!T:&5N"B`@("`@(&=W9&5V/2)E=&@P(@H@("`@9FD*"B`@("!I -M<"!R;W5T92!A9&0@9&5F875L="!V:6$@)$=7(&1E=B`D9W=D978*("!F:0H* -M("`C(%=OW!R:6YT("0Q(BXB)#(B+B(D,R(N,2)])RD*("`@("`@=&EM -M96]U="`S('!I;F<@+6X@+6,@,R`D34=-5%]'5R`F"B`@9FD*"B`@:68@6R`B -M)$A94$525DE33U(B(#T](")V;7=A6YC -M(&5N86)L90H@(&9I"GT*"G-E='5P7V1NB`D1$]-04E.(%T@)B8@1$]-04E./2)C -M;&]U9&YI;F4N:6YT97)N86PB"B`@(W)E;6]V:6YG('1H92!D;G-M87-Q(&UU -M;'1I<&QE(')A;F=E6R-=*FQO8V%L/2XJ -M)"]L;V-A;#U<+R1$3TU!24Y<+R\B("]E=&,O9&YS;6%S<2YC;VYF"B`@9FD* -M"B`@:68@6R`M;B`@(B1$3E-?4T5!4D-(7T]21$52(B!="B`@=&AE;@H@("`@ -M("!S960@+6D@+64@(B]>6R-=*F1H8W`M;W!T:6]N+BH],3$Y+BHD+V0B("]E -M=&,O9&YS;6%S<2YC;VYF"B`@("`@(&5C:&\@(F1H8W`M;W!T:6]N+69O9&AC<"UR86YG95]I<#0]+BHD+V1H8W`M9&AC<"UR86YG95]I<#8]+BHD+V1H8W`M -M6R-=*F1H8W`M;W!T:6]N/6]P=&EO;CIR;W5T97(N*B0O -M9"(@+V5T8R]D;G-M87-Q+F-O;F8*("!;("1$149!54Q47T=7(%T@)B8@96-H -M;R`B9&AC<"UO<'1I;VX];W!T:6]N.G)O=71E6R-=*F1H8W`M;W!T:6]N/6]P=&EO -M;C8Z9&YS+7-EB`B)$542#!?25`V(B!="B`@=&AE;@H@ -M("`@("!E8VAO(#$@/B`O=F%R+V-A8VAE+V-L;W5D+V1N;&5A7-T96UC=&P@9&ES86)L92!A<&%C:&4R"B`@8VQE86Y?:7!A;&EA -M&%M<&QE+F-O;F8*("!R -M;2`M9B`O971C+V%P86-H93(O26YC;'5D92!P;W)T2!0 -M>71H;VX@0W-!<'`@8V]N9FEG7&XC26YC;'5D92!P;W)T&5S -M($UU;'1I5FEE=W,B+R)/<'1I;VYS("U);F1E>&5S($UU;'1I5FEE=W,B+R`O -M971C+V%P86-H93(O;6]D&5S(B`^("]V87(O=W=W+VAT;6PO+FAT86-C97-S -M"GT*"G-E='5P7V%P86-H93(H*2!["B`@;&]G7VET(")3971T:6YG('5P(&%P -M86-H92!W96(@2!A;F0@;F]T('=OPH@('!U8FQI8U]I<#TD151(,E])4`H@(%L@(B1%5$@R7TE0(B`] -M/2`B,"XP+C`N,"(@72`F)B!P=6)L:6-?:7`])$542#%?25`*("!E8VAO("1P -M=6)L:6-?:7`*?0H*PH@("`@;&]G7VET(")3971T:6YG -M('5P($Y44"(*("`@($Y44%]#3TY&7T9)3$4](B]E=&,O;G1P+F-O;F8B"B`@ -M("!I9B!;("UF("1.5%!?0T].1E]&24Q%(%T*("`@('1H96X*("`@("`@("!) -M1E,])RPG(')E860@+6$@R-S97)V97)?;&ES=%M` -M77TM,2`[(&ET97)A=&]R/CTP(#L@:71E2!A<&%C:&4R -M(B`^("]V87(O8V%C:&4O8VQO=60O96YA8FQE9%]S=F-S"B`@(&5C:&\@(F-L -M;W5D(&YFT-(149?5$U0 -M7T9)3$5]"B`@("`@($-/34U!/2(L7&Y<="(*("`@("`@8V%S92`D2T59(&EN -M"B`@("`@("`@9&ES86)L95]R<%]F:6QT97(I"B`@("`@("`@("`@(&5X<&]R -M="!$25-!0DQ%7U)07T9)3%1%4CTD5D%,544*("`@("`@("`@("`@.SL*("`@ -M("`@("!E=&@P:7`I"B`@("`@("`@("`@(&5X<&]R="!%5$@P7TE0/21604Q5 -M10H@("`@("`@("`@("`[.PH@("`@("`@(&5T:#%I<"D*("`@("`@("`@("`@ -M97AP;W)T($542#%?25`])%9!3%5%"B`@("`@("`@("`@(#L["B`@("`@("`@ -M971H,FEP*0H@("`@("`@("`@("!E>'!O'!O'!O'!O'!O'!O'!O'!O -M'!O'!O'!O -MF4I"B`@("`@("`@("`@(&5X<&]R="!'54535%]#24127U-) -M6D4])%9!3%5%"B`@("`@("`@("`@(#L["B`@("`@("`@'!O'!O -M'!O'!OF4@8VQO=60@<&%S2!S"(B(%T*("!T:&5N"B`@("!E8VAO(")R;V]T.B1635]005-35T]21"(@?"!C -M:'!A6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I="`B4V5T=&EN9R!U<"!D:&-P('-E7-T96T@ -M=FTB"B`@2!A;&QO=R!$3E,@&5C=71E(&1H8W!S7)I9VAT(&]W -M;F5R6]U -M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O -M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W -M=WPH@ -M(&5C:&\@(B0H9&%T92D@)$`B(#X^("]V87(O;&]G+V-L;W5D+FQO9PH@(&QO -M9U]A8W1I;VY?;7-G("(D0"(*?0H*<&%T8V@H*2!["B`@;&]C86P@4$%40TA? -M34]53E0]+VUE9&EA+V-D@H@(&QO8V%L('!R:79K97D])%!!5$-( -M7TU/54Y4+V%U=&AOVUD-69I;&5]*0H@("`@;&]C -M86P@;F5W;60U/0H@("`@6R`M9B`D>W!A=&-H9FEL97T@72`F)B!N97=M9#4] -M)"AM9#5S=6T@)'MP871C:&9I;&5]('P@87=K("=[<')I;G0@)#%])RD*"B`@ -M("!L;V=?:70@(E-CW!A=&-H9FEL97T@72`F)B!;("(D;F5W -M;60U(B`A/2`B(B!="B`@("!T:&5N"B`@("`@('1AF8@)'!A=&-H9FEL -M92`M0R`O"B`@("`@(&5C:&\@)'MN97=M9#5](#X@)'MM9#5F:6QE?0H@("`@ -M("!L;V=?:70@(E!A=&-H960@2`OF5D7VME>7,*("`@(&9I"B`@9FD*"B`@&5C=71I;F<@8VQO=60M96%R -M;'DM8V]N9FEG(@H*("`C($-L96%R("]T;7`@9F]R(&9I;&4@;&]C:PH@(')M -M("UF("]T;7`O*BYL;V-K"B`@6]U -M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC -M('=I=&@@=&AE($QI8V5N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&5N2!T;R!E;G-U'D@:6X@=&AE(')O -M=71I;F<@9&]M86EN"G)E8V]N9FEG7VQB*"D@>PH@(&QO9V=E'D@=&\@<')E=FEO=7,@ -M'DN8V9G+F]L9"`O971C+VAA<')O>'DO:&%P -M2YC9F'DN8V9G+FYE=PH@(&9I"GT*"F=E=%]V -M:69?;&ES="@I('L*("!L;V-A;"!V:69?;&ES=#TB(@H@(&9O7,O8VQA7!E(&]R('!A7!E(&]R('!A2!R96-E -M:79E2!F:7)E=V%L;"!R=6QE2!C;VYF:67!E(&]R('!A2!O -M9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI -M8V5N0H*"F1E9B!M -M97)G92AD8F%G+"!D871A*3H*("`@(&1B86=C(#T@8V]P>2YD965P8V]P>2AD -M8F%G*0H*("`@('!R:6YT(&1B86<*("`@('!R:6YT(&1A=&$*("`@(&EF(")V -M<&Y?=7-E7,H*3H*("`@("`@("!I -M9B!U7,H*2!A;F0@;F]T -M(&%D9#H*("`@("`@("`@("`@9&)A9V-;=7-E6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2D*("`@("`@("`@("`@9&%T82YU -M<&1A=&4H>R)I9"(Z('-E;&8N:V5Y?2D*("`@("`@("!F:6YA;&QY.@H@("`@ -M("`@("`@("!S96QF+F1B86<@/2!D871A"@H@("`@9&5F('-A=F4H2D* -M("`@("`@("`@("`@("`@(&IS;VXN9'5M<"@*("`@("`@("`@("`@("`@("`@ -M("!D8F%G+"!?9F@L"B`@("`@("`@("`@("`@("`@("`@&-E<'0@24]%2`](&ME>0H*"F-L87-S('5P9&%T941A=&%"867!E(#T]("=M;VYI=&]R22AS96QF -M+F1B+F=E=$1A=&%"867!E(#T]("=V<&YU7!E(#T]("=I<&%L:6%S -M97,G.@H@("`@("`@("`@("!S96QF+F1B+G-E=$ME>2@G:7!S)RD*("`@("`@ -M("`@("`@7!E*0H@("`@("`@("`@("!R971U -M2=="B`@ -M("`@("`@9'!;)VYI8U]D979?:60G72`](&1;)V1E=FEC92==6S,Z70H@("`@ -M("`@(&1P6R=N=U]T>7!E)UT@/2`G9W5E4AA8VLN=7!D871E7VYE='=OR=I<%]A9&1R97-S)SH@6V1P72P@)W1Y<&4G.B`G -M:7!S)WTI"B`@("`@("`@:68@)V1O;6%I;E]N86UE)R!N;W0@:6X@9"YK97ES -M*"D@;W(@9%LG9&]M86EN7VYA;64G72`]/2`G)SH*("`@("`@("`@("`@9%LG -M9&]M86EN7VYA;64G72`](")C;&]U9&YI;F4N:6YT97)N86PB"@H@("`@("`@ -M(&0@/2!04AA8VLN=7!D871E7VYE='=O2AS96QF+"!D8F%G*3H*("`@("`@("!R971U2`]("=E=&@G("L@;G5M("L@)VEP)PH@("`@("`@(&1P(#T@>WT*("`@("`@ -M("!I9BAK97D@:6X@5T*("`@("`@("`@("`@9'!;)VYE=&UA7!E(#T] -M(")P=6)L:6,B.@H@("`@("`@("`@("`@("`@9'!;)V=A=&5W87DG72`]('-E -M;&8N<49I;&4N9&%T85LG8VUD7VQI;F4G75LG9V%T97=A>2=="B`@("`@("`@ -M("`@(&5L2==(#T@7!E)SH@)VEP -M2!T;R!D96%L('=I=&@@=&AIPH@("`@("`@("`@("`@("`@ -M)V%D9"7!E(#T@7!E(ET*("`@("`@("`@("`@=7!D871E1&%T84)A9RAS96QF*0H@ -M("`@("`@("`@("!R971U&-E<'1I;VX@97)R;W(@)WMEV9I;&5N86UE?22!B965N(&UO=F5D+B(N9F]R;6%T*&5RV9I;&5N86UE?27!E"@H@("`@9&5F(&=E=$1A=&$HB(*("`@("`@("!W:71H(&]P96XH -M;W)I9U!A=&@L("=R8B7,H*2!E;'-E(&1A -M=&%;)W!U8FQI8U]I<"=="@H@("`@("`@(&EN:71I86Q?9&%T82`](&-L5]I<"AI<"P@:6YI=&EA;%]D871A6R=C;VYF -M:62<@:6X@9&)A9ULG8V]N9FEG)UTN -M:V5Y5]I<"AC;',L(&EP+"!P5]I -M<"`]($9A;'-E"B`@("`@("`@:68@:7`@/3T@<')I=F%T95]G871E=V%Y7VEP -M.@H@("`@("`@("`@("!N97=?:7!?;6%T8VAE5]I<`H*("`@($!C;&%S0`````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````,#`P,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL -M92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2!S=&%T=7,*"F9R;VT@8W,N0W-#;VYF:6<@:6UP;W)T($-S -M0V]N9FEG"F9R;VT@;W!T<&%R7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R -M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T -M"B,*(R`@(&AT='`Z+R]W=WB`D,2!="G1H96X*("`@(&5C:&\@(D9A:6P@ -M=&\@9FEN9"!64$X@<&5E7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2`]('9P;ELG=G!N7W-E2!I;B!D -M8F%G+FME>7,H*2!A;F0@;F]T(&]P.@H@("`@("`@(&1E;"AD8F%G6VME>5TI -M"B`@("!E;'-E.@H@("`@("`@(&1B86=;:V5Y72`]('9P;@H@("`@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H -M='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI -M8V5N2`] -M(')O=71E6R=N971W;W)K)UT*("`@("`@("!D8F%G6VME>5T@/2!R;W5T90H@ -M("`@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R -M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T -M"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ -M=&AE($QI8V5N2`]('9P -M;ELG<&5E71H;VX*(R!, -M:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%3 -M1BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS -M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E -M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!F$EN"@H*<&%S&ES=',H9V5T5&]K96Y&:6QE*"DI.@H@("`@("`@('=I=&@@;W!E -M;BAG9714;VME;D9I;&4H*2P@)W(G*2!A2P@=F%L -M=64@/2!L:6YE+G-T7!E(#T@ -M7!E(#T]("=S96YD7VUY7W!A7-L;V7-L;V7-L;V7-L;V2!I -M<"]P87-S=V]R9%LE7-L;V7-L;V&-E<'0@2V5Y8F]A&-E<'1I -M;VXL(&4Z"B`@("`@("`@0`````````````````````````````````` -M`````````````````````````````````````````````````````````#`P -M,#`W-34`,#`P,36]U -M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC -M('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E -M<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NFEP7V9I;&4B"B`@("!E -M8VAO(")$96QE=&EN9R!D:6%G;F]S=&ECFEP7V9I;&4B -M"F5L6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ -M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N0H*"F1E9B!M97)G92AD8F%G+"!D871A*3H*("`@("(B(B!3:6UP;'D@ -M;W9E&ES='-I;F<@8F%G(&%S+"!T:&4@=VAO;&4@8V]N -M9FEG=7)A=&EO;B!I2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N4EP("@I -M>PH@(&QO8V%L(&EP/20Q"B`@9F]R(&1E=B!I;B!@;',@+3$@+W-Y6]U(&UA>2!N;W0@=7-E('1H -M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N -MWT*("`@("`@("!S96QF+F-H86YG960@/2!;70H@("`@("`@('-E -M;&8N9&5V:6YF;R`]($-S2&5L<&5R+F=E=%]D979I8V5?:6YF;R@I"B`@("`@ -M("`@2@I"B`@("`@("`@("`@(&5L2=="B`@("`@ -M("`@("`@('-L:6YE(#T@(F1H8W`M"P@:7`I"B`@("`@("`@("`@('-E;&8N -M8V]N9BYS96%R8V@H2D*("`@("`@("`@("`@ -M96QS93H*("`@("`@("`@("`@("`@(&QI&-E -M<'0@17AC97!T:6]N(&%S(&4Z"B`@("`@("`@("`@(&QO9V=I;F2!C;VYT2!R96-E:79E($1(0U!.04LN"B`@("`@ -M("`@(R!7:&5N(%9-(&ES(&5X<'5N9V5D+"!I=',@86-T:79E(&QE87-E(&%N -M9"!$2$-0+T1.4R!C;VYF:6<@:7,@<')O<&5R;'D@5LG;6%C7V%D9')E5LG9&5F875L=%]G871E=V%Y -M)UT*"B`@("!D968@861D7VAO6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7!E2`]($9A;'-E"B`@("`@("`@ -M9&5V(#T@)R<*("`@("`@("!F;W(@:6YT97)F86-E(&EN(&EN=&5R9F%C97,Z -M"B`@("`@("`@("`@(&EF(&1E=B`]/2!I;G1E&5C=71E*&-O;6UA;F0I"B`@("`@("`@("`@("`@("!I9B!D9795<#H*("`@ -M("`@("`@("`@("`@("`@("!L;V=G:6YG+FEN9F\H(D1E=FEC92`E65T+"!L970G -M5]I9E]N965D960H"B`@ -M("`@("`@("`@("`@("`B)7,O)7,B("4@*'-E;&8N0U-?5$5-4$Q!5$537T1) -M4BP@5]I9E]N965D960H"B`@("`@("`@("`@("(E -M&5C("1$045-3TX[+RTM97AE8R`D1$%%34].("TM("TM=G)R<#LO9R(@+V5T -M8R]I;FET+F0O:V5E<&%L:79E9"R(L(")] -M(BP@R(L(")](BP@6PH@("`@("`@("`@("`@("`@("`@ -M("`@(DE0=C1?861D&5C=71E*")R;2`M2`S,"!S96-O;F1S"B`@("`@("`@:&5A&ET:6YG -M(B`E("AE&5C=71E -M*"(E&PR='!D -M(BP@(G-T;W`B*0H@("`@("`@($-S2&5L<&5R+G-E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I -M<"@I*2YS=&]P*"D*"B`@("`@("`@&5C=71E*&-M9#(I"B`@("`@("`@("`@(&1E=B`] -M(&EN=&5R9F%C92YG971?9&5V:6-E*"D*"B`@("`@("`@8VUD(#T@(B5S("U# -M("5S(B`E("AS96QF+D-/3DY44D%#2T1?0DE.+"!S96QF+D-/3DY44D%#2T1? -M0T].1BD*("`@("`@("!#&5C=71E*"(E&PR='!D(BP@(G-T;W`B*0H*("`@ -M("`@("!I;G1E&5C=71E*&-M9"D*("`@("`@("`@("`@("`@(&QO9V=I -M;F2D*("`@("`@("`@ -M("`@("`@(&5X8V5P="!%>&-E<'1I;VXZ"B`@("`@("`@("`@("`@("`@("`@ -M;&]G9VEN9RYE&5C=71E*"(E&5C=71E*"(E&PR='!D(BP@(G)E -M2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@("`@ -M("`@("!I9B!G871E=V%Y.@H@("`@("`@("`@("`@("`@("`@(')O=71E+F%D -M9%]R;W5T92AD978L(&=A=&5W87DI"@H@("`@("`@("`@("`C(%1H92!F:7)S -M="!P=6)L:6,@:6YT97)F86-E(&AA&5C=71E -M*")A2!C;VYN=')A8VMD"B`@("`@("`@(B(B"B`@("`@("`@ -M;&EN97,@/2!;70H@("`@("`@(&QI;F5S+F%P<&5N9"@B7'1<=%QT25!V-%]A -M9&1R97-S("5S7&XB("4@(C$R-RXP+C`N,2(I"B`@("`@("`@;&EN97,N87!P -M96YD*")<=%QT7'1)4'8T7V%D9')E7!E(&%N9"!D96-I9&5S(&EF(&ET(&ES(&%N(&EN=&5R -M;F%L(&%D9')E0H@("`@("`@(%1H92!N97<@8V]D92!A -M;'-O(&=I=F5S('1H92!P;W-S:6)I;&ET>2!T;R!C;&]U9'-T86-K('1O(&AA -M=F4@82!H>6)R:60@9&5V:6-E"B`@("`@("`@=&AA="!C;W5L9"!F=6YC=&EO -M;B!A2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N -M;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B971H,2)]"@I3 -M5$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S:"`M8R`@)VEF -M(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@96QS92!E8VAO -M(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@(")V<&-R;W5T -M97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@6R`D,"`]/2!< -M(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ"B`@("`@("`@ -M("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@("`@("`@(&-M -M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U -M8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@("`@("`@;&]G -M9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S(B`E('-T871E -M7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X96-U=&4H7!E*"E=(&%N9"!S=&%T92`]/2`B -M34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE8W5T92AC;60I -M"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@("`@("`@(&5X -M96-U=&4H8VUD*0H*"F1E9B!I&5C=71E*")M;W5N="!T -M;7!F6XH=F%L*3H*("`@(&EF('9A;#H*("`@("`@("!R -M971U&5C=71E*")I<"!A9&1R('-H;W<@?&=R97`@+78@ -MWT*("`@("`@("`@("`@=&];)VEP)UT@ -M/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A;'-;+3%="B`@ -M("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@("(B(@H@("`@ -M9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G*")3879I;F<@ -M:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C=71E*")S>7-T -M96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I;F7-T96UC=&P@&5C=71E*")K:6QL("U(55`@)7,B -M("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D;G-M87-Q(BP@ -M(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O0`````````````````````````````````````````````` -M`````````````````````````````````````````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E -M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI -M8V5N'1D;G,H*3H*("`@("`@("`@("`@9&YS+F%P<&5N9"AS -M96QF+F1A=&%;)W)O=71E2==(#T@=F%L"@H@("`@9&5F(&=E=%]N971M87-K*'-E;&8I.@H@ -M("`@("`@(",@5V4@;F5E9"!T;R!F:7@@:70@<')O<&5R;'DN($D@:G5S="!A -M9&1E9"!T:&4@:68L(&%S($EA;B!D:60@:6X@&-E<'1I;VXN"B`@("`@("`@:68@)W)O=71E6]U -M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC -M('=I=&@@=&AE($QI8V5N"YS=')I -M<"@I(&9O2!A -M9'9A;F-E9"(L("TQ*0H@("`@("`@(&-R;VXN8V]M;6ET*"D*"B`@("!D968@ -M&-L=61E9%]H96%L=&A?8VAE8VMS(ET*("`@("`@("`@("`@:&-? -M9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K0`````````` -M```````````````````````````````````````````````````````````` -M`````````````````````#`P,#`W-34`,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N7,H*3H*("`@("`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@ -M("`@(R!P2!P&ES=',Z(')U;&4])7,@=&%B;&4])7,B+"!F=ULR72P@;F5W7W)U;&4N -M9V5T7W1A8FQE*"DI"B`@("`@("`@("`@(&5L2`](&9W6S)="B`@("`@("`@("`@("`@("!I9B!F=ULQ72`]/2`B9G)O;G0B -M.@H@("`@("`@("`@("`@("`@("`@(&-P>2`](&-P>2YR97!L86-E*"2DI"B`@("`@("`@("`@("`@("`C(%1H97)E(&%R92!S;VUE -M(&ES3H*("`@("`@("`@ -M("`@=&%B;&4@/2`G)PH@("`@("`@("`@("!F;W(@:2!I;B!O<&5N*"(O971C -M+VEP=&%B;&5S+VEP=&%B;&5S+25S(B`E('1Y<&4I.@H@("`@("`@("`@("`@ -M("`@:68@:2YS=&%R='-W:71H*""`]/2!R=6QE70H* -M"F-L87-S($-S3F5T9FEL=&5R*&]B:F5C="DZ"@H@("`@9&5F(%]?:6YI=%]? -M*'-E;&8I.@H@("`@("`@('-E;&8N7!E)RP@)RTM0`````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```P,#`P-S4U`#`P,#$W-3``,#`P,32!O9B!T:&4@3&EC96YS92!A=`HC"B,@ -M:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&ES=',L(&5L5]P87)A;2D*("`@("`@("!E;'-E -M.@H@("`@("`@("`@("!L;V=G:6YG+FEN9F\H(D%D9&EN9R!R;W5T93H@9&5V -M("(@*R!D978@*R`B('1A8FQE.B`B("L*("`@("`@("`@("`@("`@("`@("`@ -M("`@('1A8FQE("L@(B!N971W;W)K.B`B("L@861D2!P87)A;65T97(@5]P87)A;2D*("`@("`@("!E;'-E.@H@("`@("`@ -M("`@("!L;V=G:6YG+FEN9F\H(D%D9&EN9R!R;W5T93H@9&5V("(@*R!D978@ -M*R`B('1A8FQE.B`B("L*("`@("`@("`@("`@("`@("`@("`@("`@('1A8FQE -M("L@(B!N971W;W)K.B`B("L@861D2DZ"B`@("`@("`@(B(B("!!9&0@82!D969A=6QT(')O=71E"B`@("`@("`@ -M.G!A&-E<'1I;VXH(D=A=&5W87D@8V%N;F]T(&)E($YO;F4N(BD*"B`@ -M("`@("`@:68@0H@("`@("`@("`@("!L;V=G -M:6YG+FEN9F\H(D%D9&EN9R!D969A=6QT(')O=71E(BD*("`@("`@("`@("`@ -M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI -M86YC90HC('=I=&@@=&AE($QI8V5N0`````````````````````` -M```````````````````````````````````````````````````````````` -M`````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI -M86YC90HC('=I=&@@=&AE($QI8V5N'DO:&%P2YC9F'DO:&%P2YC9F2@I"B`@("`@("`@9F]R('@@:6X@8V]N9FEG.@H@("`@("`@("`@("!; -M9FEL93$N87!P96YD*'2A(05!23UA97T-/ -M3D9?5"P@2$%04D]865]#3TY&7U`I"@H@("`@("`@("`@("!P2!O9B!T:&4@3&EC96YS92!A=`HC -M"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG -M971?='EP92@I"B`@("`@("`@5]I9E]N965D960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L -M"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE -M,B]S:71E2DI"B`@("`@("`@("`@(&9I;&4N&5C=71E,B@B7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2AS96QF*3H*("`@("`@("!S96QF+F-O;F9I9R`](%M="B`@("`@("`@ -M"P@;&EN -M92!I;B!E;G5M97)A=&4H%T@/2!R97!L86-E("L@ -M(EQN(@H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!S96%R8V@H"P@;&EN92!I;B!E;G5M97)A=&4H -M"P@;&EN92!I;B!E;G5M97)A=&4H -M2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N0`````````````````````````````````````` -M````````````````````````````````````````````````````````,#`P -M,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N"`](&EN="@G)RYJ;VEN*%MD:6=I="!F;W(@9&EG:70@:6X@9&5V:6-E(&EF -M(&1I9VET+FES9&EG:70H*5TI*0H@("`@("`@("`@("`@("`@:68@9&5V:6-E -M7W-U9F9I>"`\(&QO=V5S=%]D979I8V4Z"B`@("`@("`@("`@("`@("`@("`@ -M;&]W97-T7V1E=FEC92`](&1E=FEC95]S=69F:7@*("`@("`@("`@("`@("`@ -M("`@("!G=65S=%]I;G1E5]C:61R*'-E;&8I.@H@("`@("`@ -M(')E='5R;B`B)7,O)7,B("4@*'-E;&8N9V5T7V=A=&5W87DH*2P@F4@:6X@8FETF4B -M*0H*("`@(&1E9B!G971?9&5V:6-E*'-E;&8I.@H@("`@("`@(')E='5R;B!S -M96QF+F=E=%]A='1R*")D979I8V4B*0H*("`@(&1E9B!G971?8VED7!E)UT@:6X@5E)24%]465!% -M4SH*("`@("`@("`@("`@7!E)UT@:6X@6R=G=65S="==.@H@("`@("`@("`@ -M("!R971U7!E)UT@:6X@6R=P=6)L -M:6,G73H*("`@("`@("`@("`@7-T -M96T*("`@("`@("`B(B(*("`@("`@("!S96QF+F1E=FQIWT*("`@("`@("!S96QF+F%D -M9')E7!E*"D@ -M:6X@6R)P=6)L:6,B72!A;F0@861D2)= -M*0H@("`@("`@("`@("`@("`@&UA7!E)UT*("`@("`@("!R971U&9F9F9F9F9F(ETI"@H@("`@("`@('-E;&8N9G7!E*"D@ -M:6X@6R)P=6)L:6,B73H*("`@("`@("`@("`@7!E*"D@:6X@ -M6R)P=6)L:6,B73H*("`@("`@("`@("`@#4R-"\P>&9F -M9F9F9F9F(B`E("AS96QF+F1E=BP@2)=(&%N9"!S96QF+F%D9')E2)=(&%N9"!S96QF+F%D9')E7!E*"D@:6X@6R)P -M=6)L:6,B72!A;F0@*&YO="!S96QF+F-O;F9I9RYI2!T -M:&4@;6%S=&5R(&)A8VMU<"!F=6YC=&EO;G,*("`@("`@("`@("`@("`@(&EF -M(&YO="!C;61L:6YE+FES7W)E9'5N9&%N="@I.@H@("`@("`@("`@("`@("`@ -M("`@(&EF(&UE=&AO9"`]/2`B861D(CH*("`@("`@("`@("`@("`@("`@("`@ -M("`@0W-087-S=V13=F,HWT*("`@("`@("!C -M;60@/2`H(FEP(&%D9'(@2!K965P86QI -M=F5D(&]R(&YO=`H@("`@("`@("(B(@H@("`@("`@(&EF(")N=U]T>7!E(B!I -M;B!S96QF+F%D9')E2==*0H@ -M("`@("`@(&EF(&YO="!S96QF+F-L+FES7W)E9'5N9&%N="@I(&%N9"`H;F]T -M('-E;&8N861D2==(&]R('-E;&8N861D2==(#T](").;VYE(BDZ"B`@("`@("`@("`@(&-M9"`](")A2!H87!P96X@8G5T(&1I9"`Z*0H@("`@ -M("`@(",@270@;65A;G,@86X@87!A8VAE(&9I;&4@9V]T(&]R<&AA;F5D(&%F -M=&5R(&$@9W5E2@I"@H@("`@9&5F -M(&ES7V=U97-T7V=A=&5W87DH7,O;F5T+V-O7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ -M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E -M(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O -M'!R97-S(&]R(&EM<&QI960N("!3 -M964@=&AE($QI8V5N"(I.@H@("`@("`@("`@("!I=&5M&5C -M=71E*")K:6QL("TY("5S(B`E('!I9"D*"B`@("!D968@9W)E<"AS96QF+"!S -M='(I.@H@("`@("`@(&9O"(I.@H@("`@("`@("`@("!I9B!I+F9I;F0H7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C -M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F -M('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L -M:6-A8FQE(&QA=R!O'!R97-S(&]R -M(&EM<&QI960N("!3964@=&AE($QI8V5N2!O -M9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI -M8V5NWT*("`@("`@("!S96QF+F1B(#T@1&%T -M84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF+F1B+G-A=F4HWT*("`@("`@ -M("!R971U&1I9V5S="@I"@H@("`@9&5F(&=E=%]G871E=V%Y -M*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I;B!S96QF+FED871A*"DZ -M"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A*"E;)V=A=&5W87DG70H@ -M("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G971?=7-E7V5X=%]D;G,H -M'1D;G,G -M70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G971?861V97)T7VEN -M="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN="<@:6X@0`````````````````````````````````````````````````````````` -M````````````````````````````````````````,#`P,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7!E&5C=71E*&-M9"D*("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")! -M9&1E9"!R=6QE("5S(&9O0`````````````````````````````````````````````` -M````````````````````````````````````````````````````````,#`P -M,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET*#(I -M"B`@("!F;W(@;W!T+"!A7,N97AI -M="@R*0H*("`@(&9O&ES=',H9&%T869I;&4I.@H@("`@("`@(&]S -M+G)E;6]V92AD871A9FEL92D*"@ID968@8W)E871E9FEL92AI<"P@9F]L9&5R -M+"!F:6QE+"!D871A*3H*("`@(&1E3H* -M("`@("`@("`@("`@;W,N;6%K961I2!E>&ES=',L('=E(&1O(&ET('1H:7,@=V%Y -M(&9O0H@("`@("`@("`@("!I9B!E+F5R&ET*#$I"B`@("`@("`@ -M:68@;W,N<&%T:"YE>&ES=',H;65T86UA;FEF97-T*3H*("`@("`@("`@("`@ -M9F@@/2!O<&5N*&UE=&%M86YI9F5S="P@(G(K82(I"B`@("`@("`@("`@(&5X -M9FQO8VLH9F@I"B`@("`@("`@("`@(&EF(&9I;&4@;F]T(&EN(&9H+G)E860H -M*3H*("`@("`@("`@("`@("`@(&9H+G=R:71E*&9I;&4@*R`G7&XG*0H@("`@ -M("`@("`@("!U;F9L;V-K*&9H*0H@("`@("`@("`@("!F:"YC;&]S92@I"B`@ -M("`@("`@96QS93H*("`@("`@("`@("`@9F@@/2!O<&5N*&UE=&%M86YI9F5S -M="P@(G&9L;V-K*&9H*0H@("`@("`@("`@("!F -M:"YW&9L;V-K*&9H*0H@("`@9F@N -M=W)I=&4H96YT3H*("`@("`@("!F -M;&]C:RAF:6QE+"!,3T-+7T58*0H@("`@97AC97!T($E/17)R;W(@87,@93H* -M("`@("`@("!P71H;VX*(R!,:6-E;G-E9"!T -M;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@ -M;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* -M(R`@(&AT='`Z+R]W=WFEP9FEL90H*"B,@0W)E871E('II<"!A -MFEP -M7V9I;&5S*&9I;&5S*3H*("`@(&9,:7-T(#T@9FEL97,*("`@(&-O;7!R97-S -M:6]N(#T@>FEP9FEL92Y:25!?1$5&3$%4140*("`@('1I;65?&5C=71E7W-H96QL7W-C3H*("`@("`@("`@ -M("`@("`@("`@("!Z9BYW3H*("`@("`@("!C;&5A;G5P*&9I;&5S7V9R;VU?F8N8VQO&5C=71E7W-H96QL -M7W-C&-E<'0@3U-%#H*("`@("`@("`@("`@9&5L971E7W1M<%]F:6QE7V-M9"`]("=R -M;2`M9B`E3H*("`@("`@("`@("`@9BYC;&]S92@I"B`@("!R971U"YS<&QI -M="AC;60I+"!S=&1E&-E<'0@3U-%&5C=71E(&)A'0H -M>FEP7V9I;&4L(&9I;&5S7V9O=6YD+"!F:6QE"YS<&QI="AC;&5A;G5P7V-M9"DI"@H* -M:68@7U]N86UE7U\@/3T@)U]?;6%I;E]?)SH*("`@(&9I;&5,:7-T(#T@7)I9VAT(&]W -M;F5R6]U -M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O -M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W -M=WW!R -M:6YT("0R.WTG('P@6]U(&UA>2!N -M;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@ -M=&AE($QI8V5N2!T;R!E;G-U2!T;R!I=',@<')E=FEO -M=7,@'D@=&\@<')E=FEO=7,@'DN8V9G+F]L9"`O971C+VAA<')O>'DO:&%P2YC9F'DN8V9G+FYE=PH@(&9I"GT*"@IL;V=G97(@+70@8VQO=60@(B0H8F%S -M96YA;64@)#`I.B!%;G1E'D*'D@2P@8V]N9FEG=7)I -M;F<@9FER97=A;&PB"@HC(&EP=&%B;&5S(&5N=')Y('1O(&5N'D@2`D861D961)<',@ -M)')E;6]V961)<',@)'-T871S27`*"FEF(%L@)#\@+6=T(#`@70IT:&5N"B`@ -M;&]G9V5R("UT(&-L;W5D(")&86EL960@=&\@87!P;'D@9FER97=A;&P@'D@8V]N9FEG(@H@(",@4F5S=&]R92!T:&4@3$(*("!R97-T;W)E7VQB -M"@H@(&QO9V=E&ET(#$@)&QO8VL@)&QO8VME -M9`IE;'-E"B`@(R!296UO=F4@8F%C:V5D=7`@:7!T86)L92!R=6QE6]U(&UA>2!N;W0@=7-E('1H:7,@ -M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E -M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI -M8V5N7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z -M+R]W=WPH@('-U9&\@:7!T86)L97,@+70@;6%N9VQE("U$(%!215)/ -M551)3D<@+6D@)&1E=B`M;2!S=&%T92`M+7-T871E($Y%5R`M:B!#3TY.34%2 -M2R`M+7-E="UM87)K("1T86)L94YO(#(^+V1E=B]N=6QL"@H@('-U9&\@:7`@ -MV1E=CHS?2DI"G1A8FQE3F%M93TB5&%B -M;&5?)&1E=B(*"FEF(%L@)&%C=&EO;B`]/2`G861D)R!="G1H96X*("!P;'5G -M7VYI8PIE;'-E"B`@=6YP;'5G7VYI8PIF:0H````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````&]P="]C;&]U9"]B:6XO:7!S96-T=6YN96PN6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC -M90HC('=I=&@@=&AE($QI8V5N#4R-2(*=G!N:6YM87)K/2(P>#4R-"(*"G5S86=E*"D@>PH@("`@<')I;G1F -M(")5'0@ -M:&]P/B`M3X@+6D@/&EK92!P;VQI -M8WD^("UT(#QI:V4@;&EF971I;64^("U4(#QEPH@('-U9&\@:7!T86)L97,MPH@(&1I2!<"B`@("!P:&%S93(@<&]L:6-Y -M/21ER1R:6=H=&YE='-](B`^/B`D=G!N8V]N -M9F9I;&4@)B8*("!S=61O(&5C:&\@(B`@='EP93UT=6YN96PB(#X^("1V<&YC -M;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!A=71H8GD]VEK96QI9F5T:6UE?7,B(#X^("1V<&YC;VYF9FEL92`F)@H@ -M('-U9&\@96-H;R`B("!E2(@/CX@)'9P;F-O;F9F:6QE -M("8F"B`@2!F;W(@'1H;W`](B1/4%1!4D&ET("1R970*```````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````;W!T+V-L;W5D+V)I;B]I<&%S2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&QO8V%L('!U8DEP -M/20H96-H;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?22!E>&ES -M=',B"GT*"F%D9%]V<&Y?8VAA:6Y?9F]R7VEP("@I('L*("!L;V-A;"!P=6)) -M<#TD*&5C:&\@)#$@?"!A=VL@+48G+R<@)WMPPH@(&QO8V%L('!U8DEP/20H96-H;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?2PH@(&QO8V%L -M('!U8DEP/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R -M:6YT("0Q?2W!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)A -MW!R:6YT("0R?2W!R:6YT("0R -M?25]R;W5T97-?9G)O;5]M86EN("1T86)L94YA;64*(R!.3U1%.B!T:&ES -M("!E;G1R>2!W:6QL(&)E(&1E;&5T960@:68@=&AE(&EN=&5R9F%C92!IW!R:6YT -M("0Q?2PH@(&EF(%L@(B1S9FQA9R(@/3T@(C`B -M(%T*("!T:&5N"B`@("!R971UW!R -M:6YT("0Q?2W!R:6YT("0R?22!I<"!I;F9O(&EN=&\@9FEL92P@ -M=7-E9"!O;B!R961U;F1A;G0@W!R:6YT("0Q?2&ES -M=&EN9TEP36%S:STD*'-U9&\@:7`@861DPH@(&QO8V%L('!U8DEP/20Q -M"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP -M/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)A&ES=&EN9TEP36%S:STD*'-U9&\@:7`@861DPH@("`@(V5N86)L92!R<',@ -M86YD(')F%QN(B`D;G5M*0H@("`@("`@("`@96-H -M;R`D:&5X.PH@("`@("`@("`@(V5N86)L92!R<',*("`@("`@("`@(&5C:&\@ -M)&AE>"`^("]S>7,O8VQA&ET -M("0_("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1!9FQA9R(@/3T@(C$B(%T* -M=&AE;@H@(&%D9%]A;E]I<"`@)'!U8FQI8TEP("`F)@H@(&%D9%]F=U]C:&%I -M;E]F;W)?:7`@)'!U8FQI8TEP"B`@=6YL;V-K7V5X:70@)#\@)&QO8VL@)&QO -M8VME9`IF:0H*:68@6R`B)&9F;&%G(B`]/2`B,2(@72`F)B!;("(D1&9L86&ET("0_("1L;V-K("1L;V-K960* -M9FD*"G5N;&]C:U]E>&ET(#`@)&QO8VL@)&QO8VME9`H````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````!O<'0O8VQO=60O8FEN+VQI;F5?961I="YP>0`````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````,#`P,#2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2UL:6YE(&5D:71I;F<@;V8@8V]N9FEG=7)A=&EO;B!F -M:6QE&%M<&QE('1H97)E)W,@82!D;W5B;&4@97-C87!E(&]F('1H92!B86-K2!M -M871C:&5D(&%L;"!F:6QE3H* -M("`@("XN+B`@(&]S+G5N;&EN:R@G9&]C=&5S="UV:&]S=',N8V]N9B55N=7-E9$QO8V%L"B`@ -M("`@("`@("`@('-T870@/2!.;VYE"B`@("`@("`@("`@('=I=&@@;W!E;BAS -M96QF+F9I;&5N86UE+"`G&-E<'1I;VXH -M(DUA9&4@=&]O(&UA;GD@961I=',B*0H@("`@("`@("`@("`@("`@("`@("`@ -M("`@("`@96QI9B!R96UA:6YI;F=?8V]U;G0@/3T@,#H*("`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@("`@("`@ -M("`@("`@("!C:&%N9V5D7VQI;F4L('-U8G,@/2!E9&ET+G!A='1E2AS96QF+F9I;&5N86UE+"!B86-K=7!?9FEL96YA;64I"B`@("`@("`@("`@ -M("`@("!O3H*("`@("`@("`@("`@:68@8VAA;F=E -M9%]F:6QE(&ES(&YO="!.;VYE.B`@("`@("`@("`@("`@("`@("`@("`@("`@ -M("`@("`C(&9A:6QE9"P@8VQE86X@=7`*("`@("`@("`@("`@("`@(&-H86YG -M961?9FEL92YC;&]S92@I"B`@("`@("`@("`@("`@("!O6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC -M90HC('=I=&@@=&AE($QI8V5N2!R=6QE2!O9B!T:&4@3&EC96YS92!A -M=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O -M'!R97-S(&]R(&EM<&QI960N("!3 -M964@=&AE($QI8V5N7,I.@H*("`@(&5X:7-T:6YG7VME>7,@/2!;70H@ -M("`@;F5W7V5T:%]K97D@/2!.;VYE"@H@("`@9F]R(&LQ+"!V,2!I;B!G=65S -M=&YE=%]D:6-T+FET97)I=&5M7,@ -M86YD(&QE;BAV,2D@/B`P.@H@("`@("`@("`@("!E>&ES=&EN9U]K97ES+F%P -M<&5N9"AK,2D*"B`@("!I9B!N;W0@97AI2`Z.B!296UO=FEN9R!G=65S="!N971W;W)K -M+BXN(BD*("`@("`@("!R971U2!T;R!B92!S -M971U<`H@("`@)R2!C;VYF:6=U&ES=',@/2!&86QS90H*("`@(&9O2!P2!C;VYF:6=U2`Z.B!02`Z.B!.;R!'=65S=$YE='=O7,N87)G -M=ELQ72D*("`@('!R;V-E7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=WPH@(&QO8V%L(%]P -M:60])"AP:61O9B!D;G-M87-Q*0H@(&9OW!R:6YT("0R?20H@(&EF(%L@)&EP -M=C0@70H@('1H96X*("`@(&5C:&\@(C`@)&UA8R`D:7!V-"`D:&]S="`J(B`^ -M/B`D1$A#4%],14%315,*("!F:0H@(&EF(%L@)&EP=C8@70H@('1H96X*("`@ -M(&5C:&\@(C`@)&1U:60@)&EP=C8@)&AO6]U(&UA>2!N -M;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@ -M=&AE($QI8V5N&-E<'0@3U-%6]U&-E<'1I;VX@;V-C=7)R960Z("5S(B`E(&4*("`@("`@("`@ -M("`@7!E(#T]("=T0`````````````` -M```````````````````````````````````````````````````````````` -M`````````````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ -M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&-L=61E9%]H96%L=&A?8VAE -M8VMS(ET@/2!D871A6R)E>&-L=61E9%]H96%L=&A?8VAE8VMS(ET*("`@(&EF -M(")H96%L=&A?8VAE8VMS7V-O;F9I9R(@:6X@9&%T83H*("`@("`@("!D8F%G -M6R)H96%L=&A?8VAE8VMS7V-O;F9I9R)=(#T@9&%T85LB:&5A;'1H7V-H96-K -M7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z -M+R]W=WW!R:6YT("0Q?2<*?0H* -M:7!T86)L97-?*"D@>PH@("!L;V-A;"!O<#TD,0H@("!L;V-A;"!P=6)L:6-? -M:7`])#(*("`@;&]C86P@:7-?=G!C/69A;'-E"B`@(&QO8V%L(&9O7-T96UC=&P@:7,M86-T -M:79E(&EPS$N+C5]"B`@("!D;PH@("`@("!L;V=G97(@+70@8VQO -M=60@(B0H8F%S96YA;64@)#`I.B!W86ET:6YG(&EP7-T96UC=&P@:7,M86-T:79E(&EP7-T96UC=&P@:7,M86-T:79E(&EP7-T96UC=&P@&PR='!D"B`@("`@("`@("`@("`@("`@("`@2`Z(%!32R!<(B1I<'-E8U]P -M&PR -M='!D"@H@("!I<'1A8FQEPH@("!L;V-A;"!P=6)L:6-?:7`])#$*"B`@(&EPPH@("!L;V-A;"!U/20Q"B`@(&QO -M8V%L('!A)'4@7"H@7"(D -M<&%S&ET(#(*"0D[.PH@(&5S86,*9&]N90H*:68@6R`B)&1E -M=B(@/3T@(B(@70IT:&5N"B`@("!D978](F5T:#(B"F9I"@II9B!;("(D8VED -M&ET(#(*6R`B)&-R96%T92(@/3T@(C$B(%T@)B8@6R`B)&QF;&%G -M)'!F;&%G)')F;&%G)'-F;&%G(B`A/2`B,3$Q,2(@72`F)B!U&ET(#(*"FEF(%L@(B1CW!R:6YT("0Q?27)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS -M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E -M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,@/2!;)V5T:#$G+"`G971H,B6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2!O9B!T:&4@ -M3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A -M8FQE(&QA=R!O2!O9B!T:&4@9&YS;6%S<2!F:6QE+@IC<"`B)$1( -M0U!?0T].1DE'7TU!24XB("`B)$1(0U!?0T].1DE'7TU!24Y?0D%+(@IC<"`B -M)$1(0U!?0T].1DE'(B`B)$1(0U!?0T].1DE'7T)!2R(*"B-E;7!T>2!T:&4@ -M8V]N9FEG(&9I;&4*96-H;R`^("1$2$-07T-/3D9)1PH*=F%R/2(D,2(*9&AC -M<%]R86YG93TB(@ID:&-P7V=A=&5W87D](B(*9&AC<%]N971M87-K/2(B"F1N -M'1?9&YS/20H96-H -M;R`B)$--1$Q)3D4B('P@9W)E<"`M;R`B=7-E97AT9&YS/71R=64B*0IW:&EL -M92!;("UN("(D=F%R(B!="F1O"B!V87(Q/20H96-H;R`D=F%R('P@8W5T("UF -M,2`M9"`B+2(I"B!R;W5T97)I<#TD*"!E8VAO("1V87(Q('P@8W5T("UF,2`M -M9"`B.B(@*0H@9V%T97=A>3TD*&5C:&\@)'9AV1H8W!?V1H8W!?;F5T;6%S:WTB)V1H8W`M;W!T:6]N/71A9SIR86YG -M92W9A -MVQO9WTB8&=R97`@(EYD:&-P+6]P=&EO;CTV(B`B)$1(0U!?0T].1DE'7TU! -M24XB8")<;B(*;&]G/2(D>VQO9WTB8&=R97`@(EYD:&-P+6]P=&EO;CUO<'1I -M;VXZVQO -M9WTB8&=R97`@(EYD:&-P+7)A;F=E/2(@(B1$2$-07T-/3D9)1U]-04E.(F`B -M7&XB"@II9B!;("(D;&]G(B`A/2`G7&Y<;EQN)R!="G1H96X*("-#;&5A;FEN -M9R!T:&4@97AI9&AC<"UR86YG93TO9"<@(B1$2$-07T-/3D9)1U]-04E.(@IF:0H*(W=R -M=&EN9R!T:&4@;F5W(&-O;F9I9R!I;G1O('1H92!C;VYF:6<@9FEL92X*96-H -M;R`M92`B)&1H8W!?&ET("1R -M97-U;'0@)&QO8VL@)&QO8VME9`H````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````````````````````!O -M<'0O8VQO=60O8FEN+V-S7V1H8W`N<'D````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7,@/2!S970H*0H@("`@("`@(&9O2`A/2`G -M:60G(&%N9"!E;G1R>5LG;6%C7V%D9')E7,N861D*&ME>2D* -M("`@("`@("`@("`@("`@(&)R96%K"@H@("`@("`@(&EF(&1A=&%;)W)E;6]V -M92==(&%N9"!K97D@;F]T(&EN(')E;6]V95]K97ES.@H@("`@("`@("`@("!R -M96UO=F5?:V5Y2!I -M;B!R96UO=F5?:V5Y5TI"@H@("`@("`@(&1B86=;9&%T85LG:7!V-%]A9&1R97-S)UU=(#T@9&%T -M80H*("`@(')E='5R;B!D8F%G"@```&]P="]C;&]U9"]B:6XO8W-?8VUD;&EN -M92YP>0`````````````````````````````````````````````````````` -M```````````````````````````````````````````P,#`P-S4U`#`P,#$W -M-3``,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ -M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E -M(&%T"B,*(R`@(&AT='`Z+R]W=W2!O9B!T:&4@ -M3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A -M8FQE(&QA=R!O'!R97-S(&]R(&EM -M<&QI960N("!3964@=&AE($QI8V5N'DN8V9G("]E=&,O:&%P2]H87!R;WAY+F-F9RYO;&0*"B`@;78@)&YE -M=U]C;VYF:6<@+V5T8R]H87!R;WAY+VAA<')O>'DN8V9G"B`@:68@:&%P2`M<"`O=F%R+W)U;B]H87!R;WAY+G!I9"`M9B`O971C+VAA<')O>'DO:&%P -M2YC9F<@+7-F("0H8V%T("]V87(O'DN<&ED*3L@=&AE -M;@H@("`@;&]G9V5R("UT(&-L;W5D(").97<@:&%P2!I;G-T86YC92!S -M=6-C97-S9G5L;'D@;&]A9&5D+"!S=&]P<&EN9R!P'DO:&%P2YC9F<@)&YE=U]C;VYF:6<* -M("`@(&UV("]E=&,O:&%P2]H87!R;WAY+F-F9RYO;&0@+V5T8R]H87!R -M;WAY+VAA<')O>'DN8V9G"B`@("!H87!R;WAY("UP("]V87(O'DN<&ED("UF("]E=&,O:&%P2]H87!R;WAY+F-F9R`M2YP:60I"B`@("!R970],0H@(&9I"@IE>&ET("1R -M970*```````````````````````````````````````````````````````` -M`````````````````````````````````````````````````````')O;W0O -M;6]N:71O71H;VX*(R!,:6-E;G-E9"!T;R!T -M:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE -M"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@ -M(&AT='`Z+R]W=WWT*("`@('!A2`K)UTG*R(@(B`K("=;)RMP2LG -M72<@*R`B("(@*R!M2!O;F4@<&ED(&]R(&YO=`H@("`@:68@97AI=%-T871U6EN9R!F97<@;6]R92!T:6UEWT*("`@(&9A:6QI -M;F=?PH@("`@("`@("`@("`@("`@ -M(G-U8V-EPH@("`@("`@("`@("`@ -M("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EWT@(U-K:7`@WT*("`@(&9A:6QI;F=# -M:&5C:W,@/2!;70H@("`@:68@8VAE8VM4>7!E(#T](")B87-I8R(Z"B`@("`@ -M("`@;6]N:71297-U;'0L(&9A:6QI;F=#:&5C:W,@/2!M;VYI=%!R;V-E&-L=61E(#T@:&-?9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!H8U]D871A(&5L7!E*0H@("`@("`@("`@("`@("`@:68@;&5N*')E="D@ -M/3T@,#H*("`@("`@("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@ -M("`@("`@:68@(G-U8V-E7,N87)G=BD@/3T@,CH*("`@("`@("!I9B!S>7,N -M87)G=ELQ72`]/2`B861V86YC960B.@H@("`@("`@("`@("!M86EN*")A9'9A -M;F-E9"(I"B`@("`@("`@96QI9B!S>7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@ -M("`@("`@("`@("!M86EN*")B87-I8R(I"B`@("`@("`@96QS93H*("`@("`@ -M("`@("`@<')I;G1D*")%7!E(&]F('1E7,N87)G=BD*("`@(&5L0`````` -M```````````````````````````````````````````````````````````` -M```````````````````P,#`P-C0T`#`P,#$W-3``,#`P,371H;VX*(R!,:6-E -M;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@ -M=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ -M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E -M(&%T"B,*(R`@(&AT='`Z+R]W=W'!E8W1E9"`](%M="B`@("`@("`@ -M9&5S=$EP(#T@<&]R=$9O'0L('-R8U!O2!I -M;B!I<%1A8FQE4QI'!E8W1E -M9#H*("`@("`@("`@("`@("`@("`@("!I9B!I<%1A8FQE16YT'!E8W1E9$5N=')Y*2`]/2`M,3H*("`@("`@("`@("`@("`@("`@("`@("`@ -M9F]U;F1!;&P@/2!&86QS90H@("`@("`@("`@("`@("`@("`@("`@("!B4QI2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA -M=R!O'!R97-S(&]R(&EM<&QI960N -M("!3964@=&AE($QI8V5N$UE;6]R>55S86=E(&EN(&AE86QT:%]C -M:&5C:W-?9&%T82`B("L@7`H@("`@("`@("`@("`@(")S>7-T96U4:')E&ET*#`I"@H@("`@;6%X365M;W)Y -M57-A9V4@/2!F;&]A="AD871A6R)M87A-96UO7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@ -M(&UA:6XH*0H````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M'E?8VAE8VLN<'D````````````` -M```````````````````````````````````````````````````````````` -M`````````````#`P,#`V-#0`,#`P,36]U(&UA>2!N;W0@=7-E('1H -M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N -M41A=&$@86YD(")M87AC;VYN -M(B!I;B!H84-F9U-E8W1I;VYS6R)G;&]B86PB73H*("`@("`@("!I9B!H87!R -M;WAY1&%T85LB;6%X8V]N;B)=("$](&AA0V9G4V5C=&EO;G-;(F=L;V)A;")= -M6R)M87AC;VYN(EU;,%TN'E$871A(BD*("`@(&EF(&AA -M<')O>'E$871A(&ES($YO;F4@;W(@;&5N*&AA<')O>'E$871A*2`]/2`P.@H@ -M("`@("`@('!R:6YT(").;R!D871A('!R;W9I9&5D('1O(&-H96-K+"!S:VEP -M<&EN9R(*("`@("`@("!E>&ET*#`I"@H@("`@=VET:"!O<&5N*"(O971C+VAA -M<')O>'DO:&%P2YC9FWT*("`@(&-UWT*("`@(&9O41A=&$L(&AA0V9G4V5C=&EO;G,I"@H@("`@:68@ -M8VAE8VM-87A#;VYN(&%N9"!C:&5C:TQB4G5L97,Z"B`@("`@("`@<')I;G0@ -M(D%L;"!C:&5C:W,@<&%S&ET*#`I"B`@("!E;'-E.@H@ -M("`@("`@(&5X:70H,2D*"@II9B!?7VYA;65?7R`]/2`B7U]M86EN7U\B.@H@ -M("`@:68@;&5N*'-Y7,N87)G=ELQ72`]/2`B -M861V86YC960B.@H@("`@("`@(&UA:6XH*0H````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&ET*#`I"@H@("`@=&5M<&QA=&5697)S:6]N36%T8VAE -M65T('-E='5P(&%T("(@*R!R96QE87-E1FEL92`K7`H@ -M("`@("`@("`@("`@("`@("`B+"!S:VEP<&EN9RXB"B`@("`@("`@96QI9B!E -M>'!E8W1E9"`A/2!F;W5N9#H*("`@("`@("`@("`@<')I;G0@(E1E;7!L871E -M(%9E'!E8W1E9"`K("(L(&9O=6YD.B`B("L@9F]U;F0*("`@("`@ -M("`@("`@=&5M<&QA=&5697)S:6]N36%T8VAE'!E8W1E9"`K("(L(&9O=6YD.B`B("L@9F]U;F0*("`@("`@ -M("`@("`@&ET*#$I"@H*:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH* -M("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A;F0@2\````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````,#`P,#0`````````````````````````` -M```````````````````````````````````````````````P,#`P-C0T`#`P -M,#$W-3``,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS -M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E -M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W3U.;VYE*3H*("`@('=I=&@@ -M;W!E;B@G+W)O;W0O:&5A;'1H7V-H96-K2!I2!I5TN2D@/3T@,#H*("`@("`@("`@("`@("`@(&-O;G1I -M;G5E"B`@("`@("`@("`@(&ME>59A;"`](&5N=')Y+G-P;&ET*"(](BD*("`@ -M("`@("`@("`@:68@;&5N*&ME>59A;"D@/3T@,CH*("`@("`@("`@("`@("`@ -M(&1;:V5Y5F%L6S!=+G-T2]?7VEN:71?7RYP>0`````````````````````````````````````````` -M````````````````````````````````````````,#`P,#8T-``P,#`Q-S4P -M`#`P,#$W-3``,#`P,#`P,#$U-#``,3,V,C4Q-3`S,30`,#$W-S8R`"`P```` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````'5S=&%R("``9&%R2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO -M2!A<'!L:6-A8FQE(&QA=R!O'!R -M97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N0`````````````````````````````````` -M````````````````````````````````````````````````,#`P,#8T-``P -M,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#,Q,S(`,3,V,C4Q-3`S,30`,#$W-S8Q -M`"`P```````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````'5S=&%R("``9&%R2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET -M*#`I"@H@("`@;6EN1&ES:TYE961E9"`](&9L;V%T*&1A=&%;(FUI;D1IF4I("\@,3`R-`H*("`@ -M(&EF("AF6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI -M86YC90HC('=I=&@@=&AE($QI8V5N2!I;7!O7,I(#T](#`Z"B`@("`@ -M("`@<')I;G0@(D%L;"`B("L@7,@ -M87)E(')E86-H86)L92!V:6$@<&EN9R(*("`@("`@("!E>&ET*#`I"B`@("!E -M;'-E.@H@("`@("`@('!R:6YT(")5;G)E86-H86)L92!G871E=V%Y7,N87)G=ELQ72`]/2`B8F%S:6,B -M.@H@("`@("`@(&UA:6XH*0H````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````')O;W0O:&5A;'1H7V-H96-K0`````````````````````````````````````````````````````````` -M```````````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P -M,371H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD -M871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C -M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F -M('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&5C=71A8FQE71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E -M($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H -M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C -M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I -M"@H@("`@=VET:"!O<&5N*"2!O -M9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A -M<'!L:6-A8FQE(&QA=R!O'!R97-S -M(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N$-P=55S86=E(&EN(&AE -M86QT:%]C:&5C:W-?9&%T82!S>7-T96U4:')E&ET*#`I"@H@("`@;6%X0W!U57-A9V4@/2!F;&]A="AD871A -M6R)M87A#<'55&ET*#`I"B`@("!E -M;'-E.@H@("`@("`@('!R:6YT(")&86EL960@=&\@&ET*#$I"@H*:68@7U]N86UE -M7U\@/3T@(E]?;6%I;E]?(CH*("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A -M;F0@0`````````````````````````````````````` -M````````````````````````````````````````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2`]('9-6R)M86-!9&1R97-S(ET@ -M*R`B("(@*R!V35LB:7`B72`K("(@(B`K('9-6R)V;4YA;64B70H@("`@("`@ -M(&9O=6YD16YT2`](%1R=64*("`@("`@("`@("`@("`@(&)R96%K"@H@("`@("`@("`@("!N -M;VY$969A=6QT4V5T(#T@(G-E=#HB("L@=DU;(FEP(ETN2`](%1R=64*("`@("`@ -M("`@("`@("`@(&)R96%K"@H@("`@("`@(&EF(&YO="!F;W5N9$5N=')Y.@H@ -M("`@("`@("`@("!F86EL961#:&5C:R`](%1R=64*("`@("`@("`@("`@9F%I -M;'5R94UE&ET*#$I"B`@("!E;'-E.@H@("`@("`@('!R -M:6YT(")!;&P@(B`K('-T7,N87)G=ELQ72`]/2`B861V86YC960B.@H@("`@("`@(&UA:6XH -M*0H````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````````````````!R;V]T -M+V9U;F,N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P -M.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N -M2!O;F4@;&]C:R!IPH@("`@ -MPH@("`@;&]C:STD,0H*("`@(%]?;&]C:V5D/3`*("`@ -M(%]?5%,]8&1A=&4@*R5S)4Y@"B`@("!?7TQ/0TM$25(](B]T;7`B"B`@("!? -M7TQ/0TM&24Q%/2(D7U],3T-+1$E2+R1?7U13+20D+21L;V-K+FQO8VLB"@H@ -M("`@:68@6R`D,B!="B`@("!T:&5N"B`@("`@("`@7U]424U%3U54/20R"B`@ -M("!E;'-E"B`@("`@("`@7U]424U%3U54/3,P"B`@("!F:0H*("`@(&EF(%L@ -M+64@)%]?3$]#2T9)3$4@70H@("`@=&AE;@H@("`@("`@(&QO9V=EPH@("`@7U],3T-+1$E2/2(O=&UP -M(@H@("`@7U],3T-+1DE,13TB)%]?3$]#2T1)4B\J+20D+20Q+FQO8VLB"B`@ -M("!?7VQO8VME9#TD,@H@("`@:68@6R`B)%]?;&]C:V5D(B`]/2`B,2(@70H@ -M("`@=&AE;@H@("`@("`@(')M("1?7TQ/0TM&24Q%"B`@("!F:0I]"@HC(')E -M;&5A&ET('9A;'5E"B,@ -M)#(@;&]C:R!F:6QE;F%M90HC("0S(&QO8VME9"@Q*2!OF4]8&EP(&%D9'(@2!O9B!T:&4@3&EC96YS92!A=`HC -M"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ -M=&AE($QI8V5N7,O8VQA;65T82UD871A+R@N*UM>+UTI+S\D("`N+B]M -M971A9&%T82\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%="@HC:'1T<#HO -M+SQR;W5T97))4#XO;&%T97-T+V9O;R!A;F0@+BXN+V9O;R\@*'EI96QD(&UE -M=&%D871A+R1)4"]F;V\I"B-A2UZ;VYE+S\D("`N+B]M971A9&%T82\E>U)%34]415]! -M1$12?2]A=F%I;&%B:6QI='DM>F]N92!;3"Q.0RQ14T%="E)E=W)I=&52=6QE -M(%YC;&]U9"UI9&5N=&EF:65R+S\D("`N+B]M971A9&%T82\E>U)%34]415]! -M1$12?2]C;&]U9"UI9&5N=&EF:65R(%M,+$Y#+%%305T*4F5WU)%34]415]!1$12?2]I -M;G-T86YC92UI9"!;3"Q.0RQ14T%="E)E=W)I=&52=6QE(%YL;V-A;"UH;W-T -M;F%M92\_)"`@+BXO;65T861A=&$O)7M214U/5$5?041$4GTO;&]C86PM:&]S -M=&YA;64@6TPL3D,L45-!70I297=R:71E4G5L92!>;&]C86PM:7!V-"\_)"`@ -M+BXO;65T861A=&$O)7M214U/5$5?041$4GTO;&]C86PM:7!V-"!;3"Q.0RQ1 -M4T%="E)E=W)I=&52=6QE(%YP=6)L:6,M:&]S=&YA;64O/R0@("XN+VUE=&%D -M871A+R5[4D5-3U1%7T%$1%)]+W!U8FQI8RUH;W-T;F%M92!;3"Q.0RQ14T%= -M"E)E=W)I=&52=6QE(%YP=6)L:6,M:7!V-"\_)"`@+BXO;65T861A=&$O)7M2 -M14U/5$5?041$4GTO<'5B;&EC+6EP=C0@6TPL3D,L45-!70I297=R:71E4G5L -M92!><'5B;&EC+6ME>7,O/R0@("XN+VUE=&%D871A+R5[4D5-3U1%7T%$1%)] -M+W!U8FQI8RUK97ES(%M,+$Y#+%%305T*4F5W=FTM:60O/R0@ -M("XN+VUE=&%D871A+R5[4D5-3U1%7T%$1%)]+W9M+6ED(%M,+$Y#+%%305T* -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````=F%R+W=W=R]H=&UL+W5S97)D871A+P`` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````````#`P,#`W-34`,#`P,3/dev/null 2>&1 || ${echo} 'cloud_scripts/usr/share/cloud/cloud-scripts.tar': 'MD5 check failed' - ) << \SHAR_EOF -6c9c71f04c38fbbe6031c09a732f525d cloud_scripts/usr/share/cloud/cloud-scripts.tar -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/usr/share/cloud/cloud-scripts.tar'` -ne 696320 && \ - ${echo} "restoration warning: size of 'cloud_scripts/usr/share/cloud/cloud-scripts.tar' is not 696320" - fi -fi -# ============= cloud_scripts/usr/share/cloud/cloud-scripts.tar ============== -if test -n "${keep_file}" && test -f 'cloud_scripts/usr/share/cloud/cloud-scripts.tar' -then -${echo} "x - SKIPPING cloud_scripts/usr/share/cloud/cloud-scripts.tar (file already exists)" - -else -${echo} "x - extracting cloud_scripts/usr/share/cloud/cloud-scripts.tar (text)" - sed 's/^X//' << 'SHAR_EOF' | uudecode && -begin 600 cloud_scripts/usr/share/cloud/cloud-scripts.tar -M971C+P`````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````#`P,#`W-34`,#`P,37-T96U-87A& -M:6QE4VEZ93TQ,$T*4G5N=&EM94UA>%5S93TR,$T*```````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````971C+W-Y7-T -M96TO:'EP97)V+61A96UO;G,N:'8M=G-S+61A96UO;BYS97)V:6-E```````` -M````````````````````````````````````````````````````,#`P,#8T -M-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,S0`,3,V,C4Q-3`S,30`,#(S -M,37!E2!S97)V:6-E("A64U,I(&1A96UO;@H*6U-E&5C4W1A3UM=6QT:2UU7-T96UD+W-Y2UC;VYF -M:63TO=7-R+VQO8V%L+V-L;W5D+W-Y7-T96TO;W!E;BUV;2UT;V]L3UM=6QT:2UU3UM=6QT:2UU7-T96UD+W-Y&5N+FUO=6YT"D)E9F]R93UN971W;W)K+G1A2UC;VYF:6&5C4W1A&5C4W1A3UM=6QT:2UU7-T96TO:'EP97)V+61A96UO;G,N:'8M -M9F-O<'DM9&%E;6]N+G-E7!E2!S97)V:6-E("A&0T]062D@9&%E;6]N"D-O -M;F1I=&EO;E!A=&A%>&ES=',]+V1E=B]V;6)U0H*6U-E3UM=6QT:2UU7-T96TO8VQO=60M -M<&]S=&EN:70N2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N0`````````````````````````````````````````````` -M`````````````````````````````````````````#`P,#`V-#0`,#`P,36]U(&UA>2!N;W0@=7-E -M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI -M8V5N7!E(#$S("UJ($123U`*+4$@24Y0550@+7`@:6-M<"`M:B!!0T-%4%0* -M+4$@24Y0550@+6D@971H,2`M<"!T8W`@+6T@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* -M(R`@(&AT='`Z+R]W=W7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E -M<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H -M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N -M2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H -M92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R -M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T -M"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7-C=&P@8V]N9FEG=7)A -M=&EO;B!F:6QE"B,*(R!&;W(@8FEN87)Y('9A;'5E7-C=&PN -M8V]N9B@U*2!F;W(@;6]R92!D971A:6QS+@HC($!615)324].0`H*(R!#;VYT -M2!T:&5R -M96)Y(')E9'5C:6YG('1H92!S:7IE(&]F(&1I&PR='!D+WAL -M,G1P9"YC;VYF```````````````````````````````````````````````` -M````````````````````````````````````````````````````````,#`P -M,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,3,`,3,U-C$W,C4Q-3(` -M,#$T-#4U`"`P```````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````'5S=&%R("``9&%R65S"G!P<&]P=&9I;&4@/2`@("`O971C+W!P<"]O<'1I;VYS -M+GAL,G1P9`H````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````971C+V1N2!D:7-A8FQE -MF5N+"!S:6YC92!T:&5Y"B,@=&5L;"!D -M;G-M87-Q('1O(&9I;'1E2X@268@>6]U(&AA=F4@82!D:6%L+6]N+61E;6%N9"!L:6YK('1H97D@ -M86QS;R!S=&]P"B,@=&AE6]U('=A;G0@9&YS('1O(&=E="!I=',@=7!S=')E86T@2`@(&%P<&5A2!O=&AE<@HC(&9I -M;&4L(&=E='1I;F<@:71S('-E2!O;@HC('-P96-I9FEE9"!I;G1E -M&-E<'0M:6YT97)F86-E/65T:#$*97AC97!T+6EN -M=&5R9F%C93UE=&@R"F5X8V5P="UI;G1E6]U('=A;G0@9&YS;6%S<2!T;R!P6]U"B,@=V%N="!D;G-M -M87-Q('1O(')E86QL>2!B:6YD(&]N;'D@=&AE(&EN=&5R9F%C97,@:70@:7,@ -M;&ES=&5N:6YG(&]N+`HC('5N8V]M;65N="!T:&ES(&]P=&EO;BX@06)O=70@ -M=&AE(&]N;'D@=&EM92!Y;W4@;6%Y(&YE960@=&AI6]U('=A;G0@=&\@ -M:&%V92!A(&1O;6%I;@HC(&%U=&]M871I8V%L;'D@861D960@=&\@2!Q=6%L:69I -M960@9&]M86EN(&YA;65S+"!A7-T96US(&-O;F9I9W5R960@8GD@ -M1$A#4`HC(#,I(%!R;W9I9&5S('1H92!D;VUA:6X@<&%R="!F;W(@(F5X<&%N -M9"UH;W-T7,N;W)G+G5K+#$Y,BXQ-C@N,BXP -M+S(T"@HC(%-A;64@:61E82P@8G5T(')A;F=E(')A=&AE7,N;W)G+G5K+#$Y,BXV."XS -M+C$P,"PQ.3(N,38X+C,N,C`P"@HC(%5N8V]M;65N="!T:&ES('1O(&5N86)L -M92!T:&4@:6YT96=R871E9"!$2$-0('-E6]U(&YE960*(R!T;R!S -M=7!P;'D@=&AE(')A;F=E(&]F(&%D9')E2!$2$-0"B,@2!B92!S970@;VYL>2!F;W(@=&AI2!W:&5N('1H92!T86<@(F=R965N -M(B!I2!A('-U8FYE="!W:&EC:"!C -M86XG="!B92!U6YA;6EC(&%D9')E2!A;F0*(R!A9&0@;F%M97,@=&\@=&AE($1.4R!F;W(@=&AE($E0 -M=C8@861D2P@-#AH"@HC($1O($1(0U`@86YD(%)O=71E2!W:6QL('5S -M92!33$%!0R!F;W(@861D2!R82US=&%T96QE2!J -M=7-T"B,@;F5E9"!T;R!B92!O;B!T:&4@7,@9VEV92!T:&4@:&]S="!W:71H($5T -M:&5R;F5T(&%D9')E7,@9VEV92!T:&4@:&]S="!W -M:71H(&-L:65N="!I9&5N=&EF:65R(#`Q.C`R.C`R.C`T"B,@=&AE($E0(&%D -M9')E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ -M(G)E9"(@=&\*(R!T:&4@;6%C:&EN92!W:71H($5T:&5R;F5T(&%D9')E&5D($E0=C8@861D2!;72!A2X*(V1H8W`M:&]S=#UI9#HP,#HP,3HP -M,#HP,3HQ-CID,CHX,SIF8SHY,CID-#HQ.3IE,CID.#IB,BP@9G)E9"P@6S$R -M,S0Z.C5="@HC($EG;F]R92!A;GD@8VQI96YT2!M86-H:6YE('=H;W-E"B,@1$A#4"!V96YD;W)C;&%S -M'1R82!O<'1I -M;VYS('=H:6-H(&%R92!T86=G960@87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@ -M;VYE"B,@;V8@=VAO'1R82!O<'1I;VYS('=H:6-H(&%R -M92!T86=G960@87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO2!D;G-M -M87-Q(&%N9"!S96YD(&YO(&1E9F%U;'0*(R!R;W5T92!A="!A;&PN($YO=&4@ -M=&AA="!T:&ES(&]N;'D@=V]R:W,@9F]R('1H92!O<'1I;VYS('-E;G0@8GD* -M(R!D969A=6QT("@Q+"`S+"`V+"`Q,BP@,C@I('1H92!S86UE(&QI;F4@=VEL -M;"!S96YD(&$@>F5R;RUL96YG=&@@;W!T:6]N"B,@9F]R(&%L;"!O=&AE0H*(R!3970@=&AE(&1E9F%U;'0@=&EM92UT;RUL:79E -M('1O(#4P"B-D:&-P+6]P=&EO;CTR,RPU,`H*(R!3970@=&AE(")A;&P@2!A;B!O<'1I;VX@=VAI8V@@=VEL;"!O;FQY -M(&)E('-E;G0@=&\@=&AE(")R960B(&YE='=O2!A6]U -M(&UA>2!W86YT('1O('5N8V]M;65N="!S;VUE(&]R(&%L;"!O9B!T:&5M(&EF -M('EO=2!U7!E"@HC(%-E;F0@86X@96UP='D@5U!! -M1"!O<'1I;VXN(%1H:7,@;6%Y(&)E(%)%455)4D5$('1O(&=E="!W:6YD;W=S -M(#<@=&\@8F5H879E+@HC9&AC<"UO<'1I;VX],C4R+")<;B(*"B,@4V5N9"!2 -M1D,M,S,Y-R!$3E,@9&]M86EN('-E87)C:"!$2$-0(&]P=&EO;BX@5T%23DE. -M1SH@66]U71H:6YG(&5L&4@=&%G(&9O2YK<'AE"B-D:&-P+6)O;W0];7EB;V]T:6UA9V4*"B,@16YC87!S -M=6QA=&5D(&]P=&EO;G,@9F]R($5T:&5R8F]O="!G4%A%+B!!;&P@=&AE(&]P -M=&EO;G,@87)E"B,@96YC87!S=6QA=&5D('=I=&AI;B!O<'1I;VX@,32!C;V1E"B-D:&-P+6]P=&EO;CUE;F-A<#HQ-S4L(#$W-BP@,6(@("`@("`@ -M(R!N;RUP61H8W`*(V1H8W`M;W!T:6]N/65N8V%P.C$W-2P@,3#@V+3,R"B-D:&-P+6UA=&-H/6ET86YI8W,L(&]P=&EO;CIC;&EE;G0M87)C -M:"P@,B`C24$V-`HC9&AC<"UM871C:#UH86UM97)S+"!O<'1I;VXZ8VQI96YT -M+6%R8V@L(#8@(W@X-BTV-`HC9&AC<"UM871C:#UM86-T96QS+"!O<'1I;VXZ -M8VQI96YT+6%R8V@L(#<@(T5&22!X.#8M-C0*"B,@1&\@&4M<')O;7!T/2)0#@V4$,L("));G-T86QL($QI;G5X(BP@<'AE;&EN=7@*"B,@3&]A -M9',@/'1F='`M#@V4$,L("));G-T86QL($QI;G5X(BP@<'AE;&EN -M=7@L(#$N,BXS+C0*"B,@57-E(&)O;W1S97)V97(@;VX@;F5T=V]R:RP@9F]U -M;F0@;7D@;75L=&EC87-T(&]R(&)R;V%D8V%S="X*(W!X92US97)V:6-E/7@X -M-E!#+"`B26YS=&%L;"!W:6YD;W=S(&9R;VT@4DE3('-E#@V4$,L("));G-T86QL('=I;F1O=W,@9G)O;2!225,@2!F:6QE0HC('1H92!U&%M<&QE(&]F(&1H8W`M8F]O="!W:71H(&%N(&5X=&5R;F%L(%1& -M5%`@2`M+7!X92US97)V -M:6-E+@HC9&AC<"UB;V]T/2]V87(O9G1P9"]P>&5L:6YU>"XP+&)O;W1H;W-T -M+#$Y,BXQ-C@N,"XS"@HC($EF('1H97)E(&%R92!M=6QT:7!L92!E>'1E#TR,3`P"@HC(%1H92!$2$-0('-E6]U(&UI9VAT(&5N9"!U<"!A8V-I9&5N=&%L -M;'D@8V]N9FEG=7)I;F<@82!$2$-0"B,@2X@5&AE($E30R!S97)V97(@=7-E&5C=71A8FQE -M('=H96X@82!$2$-0(&QE87-E(&ES(&-R96%T960@;W(@9&5S=')O>65D+@HC -M(%1H92!A`HC86QI87,],2XR+C,N -M,"PU+C8N-RXP+#(U-2XR-34N,C4U+C`*(R!A;F0@=&AI"UT87)G970@9F]R(&%L;"!L;V-A;`HC(&UA8VAI;F5S+@HC;&]C86QM>`H* -M(R!2971U6]U('=A;G0@=&\@ -M3XL/'=E:6=H=#X*(R!)9B!T:&4@9&]M86EN('!A&%M<&QE+F-O;2!D;VUA:6X@=&\* -M(R!L9&%P&%M -M<&QE+F-O;2!D;VUA:6X@=&\*(R!L9&%P&%M<&QE+F-O;2PS -M.#DL,@H*(R!!(%-25B!R96-O'!A;G-I;VX@ -M9&]N92!F;W(@4U)6(')E8V]R9',@7V1O97-?;F]T"B,@;V-C=7(@9F]R(%!4 -M4B!R96-O'!A;G-I;VX@9&]N92!F;W(@4U)6 -M(')E8V]R9',@7V1O97-?;F]T"B,@;V-C=7(@9F]R(%185"!R96-O&%M<&QE(%-01BX*(W1X="UR96-O5\@=V]R:W,*(R!F;W(@=&%R9V5T3TO=F%R -M+VQO9R]D;G-M87-Q+FQO9PH*(R!);F-L=61E(&$@86YO=&AE'0*```````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````````971C+V-R;VXN9&%I -M;'DO```````````````````````````````````````````````````````` -M`````````````````````````````````````````````````````````#`P -M,#`W-34`,#`P,32]C;&5A2!C86-H92!T;R!U;'1I;6%T96QY(')E9'5C92!S=V%P<&EN9PH*7,O=FTO9')O<%]C86-H97,*```````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````````````````971C+W9M -M=V%R92UT;V]LF4@:V5P=#H@,2!-0@IV;7-V8RYM -M87A,;V=3:7IE(#T@,0H*(R!$969I;F5S('1H92`B=FUT;V]L"!S:7IE(#4P30IS:7IE(#4P30IC;VUP0HC3&ES=&5N061D7,@9F]R('!R;W1O8V]L('9E2`O971C+W-S:"]SF4@;V8@97!H -M96UE7-L;V=& -M86-I;&ET>2!!551("E-Y65S"D%U=&AO7,@:6X@+V5T8R]S65S(&EF('EO=2!D;VXG="!T'0@<&%S65S"D=34T%024-L96%N=7!#65S"@HC($%C8V5P="!L;V-A;&4M4]F9G-E="`Q,`HC6#$Q57-E3&]C86QH;W-T -M('EE65S"B-5&PR='!D```````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````,#`P,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`R,34`,3,U -M-C$W,C4Q-3(`,#$T-C`W`"`P```````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````'5S=&%R("``9&%R6]U('=A;G0@=&\@=7-E(&$@9&EF9F5R -M96YT(&EN=&5R9F%C92!O6]U(&EN2!F2!)4"!A9&1R97-S+`H@("`@("`@(",@>6]U(&-A;B!U7-L;V'-O8VL@(R!P7-T96T@;&]G9VEN9PHD36]D3&]A9"!I;6ML;V<@ -M("`C('!R;W9I9&5S(&ME2!R:VQO9V0I"B,D36]D3&]A9"!I;6UA7-L;V<@7-T96TN("!3<&QI="!I="!U<"!S;R!T:&%T"B,@:70@:7,@96%S>2!T -M;R!W2YL;V<* -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````````````````&5T8R]M;V1P -M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@ -M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2!C86-H92!T -M;R!U;'1I;6%T96QY(')E9'5C92!S=V%P<&EN9PH*<&AY;65M/20H9G)E97QA -M=VL@)R]>365M.B][<')I;G0@)#)])RD*:68@6R`D<&AY;65M("UL="`U,3,P -M,#`@73L@=&AE;@H@('-Y;F,@)B8@96-H;R`Q(#X@+W!R;V,O2YC;VYF```````````````````````````````````````````````` -M```````````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P -M,3$-O;FYE8W1I -M;VYS4&5R0VAI;&0@("`),3`P,`H\+TEF36]D=6QE/@H*(R!V:6TZ('-Y;G1A -M>#UA<&%C:&4@=',]-"!S=STT('-T6U,:6YK&5S($9O;&QO=U-Y;4QI;FMS($UU;'1I5FEE=W,*"0E!;&QO=T]V97)R:61E -M($%L;`H)"4]R9&5R(&%L;&]W+&1E;GD*"0EA;&QO=R!F&5C0T=)("U-=6QT:59I97=S -M("M3>6U,:6YK2QA;&QO=PH@("`@("`@($1E;GD@9G)O -M;2!A;&P*("`@("`@("!!;&QO=R!F3X*"3Q$:7)E8W1O0H)"6%L;&]W(&9R;VT@86QL"@D\+T1I3X*"@E38W)I -M<'1!;&EA0H)"4%L;&]W(&9R;VT@86QL"@D\ -M+T1I3X*"@E%T%004-(15],3T=?1$E2?2]ET%004-(15],3T=?1$E2 -M?2]S2QA;&QO=PH)"41E;GD@ -M9G)O;2!A;&P*"0E!;&QO=R!F2!T -M:&4*"2,@("!34TQ#97)T:69I8V%T949I;&4@9&ER96-T:79E(&ES(&YE961E -M9"X*"5-33$-E0H*"2,@("!397)V -M97(@0V5R=&EF:6-A=&4@0VAA:6XZ"@DC("`@4&]I;G0@4U-,0V5R=&EF:6-A -M=&5#:&%I;D9I;&4@870@82!F:6QE(&-O;G1A:6YI;F<@=&AE"@DC("`@8V]N -M8V%T96YA=&EO;B!O9B!014T@96YC;V1E9"!#02!C97)T:69I8V%T97,@=VAI -M8V@@9F]R;2!T:&4*"2,@("!C97)T:69I8V%T92!C:&%I;B!F;W(@=&AE('-E -M0H)(R`@('1H92!R969E -M2`H0T$I.@H)(R`@(%-E="!T:&4@0T$@8V5R=&EF:6-A -M=&4@=F5R:69I8V%T:6]N('!A=&@@=VAE6]U(&YE960@:&%S:"!S>6UL -M:6YK6UL:6YK7!E*3H* -M"2,@("!#;&EE;G0@8V5R=&EF:6-A=&4@=F5R:69I8V%T:6]N('1Y<&4@86YD -M(&1E<'1H+B`@5'EP97,@87)E"@DC("`@;F]N92P@;W!T:6]N86PL(')E<75I -M2!T;R!V97)I9GD@=&AE(&-E -M4-L:65N -M="!R97%U:7)E"@DC4U-,5F5R:69Y1&5P=&@@(#$P"@H)(R`@($%C8V5S6YT87@@:7,@80H)(R`@(&UI>'1UU-33%]#25!(15)]("%^(&TO7BA%6%!\3E5,3"DO(%P* -M"2,@("`@("`@("`@("!A;F0@)7M34TQ?0TQ)14Y47U-?1$Y?3WT@97$@(E-N -M86ME($]I;"P@3'1D+B(@7`H)(R`@("`@("`@("`@(&%N9"`E>U-33%]#3$E% -M3E1?4U]$3E]/57T@:6X@>R)3=&%F9B(L(")#02(L(")$978B?2!<"@DC("`@ -M("`@("`@("`@86YD("5[5$E-15]71$%9?2`^/2`Q(&%N9"`E>U1)345?5T1! -M67T@/#T@-2!<"@DC("`@("`@("`@("`@86YD("5[5$E-15](3U52?2`^/2`X -M(&%N9"`E>U1)345?2$]54GT@/#T@,C`@("`@("`@*2!<"@DC("`@("`@("`@ -M("!OU)%34]415]!1$12?2`]?B!M+UXQ.3)<+C2!E>&ES=&EN9R!W:&5N(&-L -M:65N=`H)(R`@("`@875T:&5N=&EC871I;VX@:7,@=7-E9"DN(%1H:7,@8V%N -M(&)E('5S960@=&\@:6UP;W)T('1H92!C97)T:69I8V%T97,*"2,@("`@(&EN -M=&\@0T=)('-C'!O'!E;G-I=F4@;W!E2!E;F%B;&5S('1H90H)(R`@("`@97AP;W)T871I;VX@9F]R -M($-'22!A;F0@4U-)(')E<75E'!O2`O=7-R+VQI8B]C9VDM8FEN/@H)"5-33$]P=&EO;G,@*U-T -M9$5N=E9A6]U(&-A;B!U6]U(')E8V5I=F4@ -M22]/(&5R2!A;&5R="!I2!F;W(@8G)O=W-E6]U(&MN;W<@=&AA="!T:&5I2X*"2,@("!. -M;W1I8V4Z($UO2!W86YT('1O(&1I2P@;VYE(&AA6]U(&IU2!A;'-O"B,@:&%V92!T;R!C -M:&%N9V4@=&AE(%9I6]U(&AA=F4@=7!GB!A;F0*(R!214%$ -M344N1&5B:6%N+F=Z"@I,:7-T96X@,3`N,2XQ+C$Z.#$X,`H*/$EF36]D=6QE -M(&UO9%]S0HC('1E;&P@ -M9&YS;6%S<2!T;R!F:6QT97(@;W5T('%U97)I97,@=VAI8V@@=&AE('!U8FQI -M8R!$3E,@8V%N;F]T"B,@86YS=V5R+"!A;F0@=VAI8V@@;&]A9"!T:&4@2!T:&4@2X*"B,@3F5V97(@9F]R=V%R9"!P;&%I -M;B!N86UE2X*(R!.;W1E('1H870@*&%M;VYG2!O9B!T:&4@=7!S=')E86T*(R!S97)V97)S(&ET(&MN -M;W=S(&%B;W5T(&%N9"!T2!E86-H('%U97)Y"B,@=VET:"`@96%C:"`@2`@:6X@('1H92`@;W)D97(@('1H97D@("!A<'!E87(@ -M("!I;@HC("]E=&,O2!A&%M<&QE(&]F(')O=71I;F<@4%12('%U97)I97,@=&\@ -M;F%M97-E2!D;VUA:6YS(&AE6]U('=A;G0@=&\@9F]R8V4@=&\@86X@ -M25`@861D&%M<&QE(&)E;&]W('-E;F0@86YY -M(&AO6]U('=A;G0@ -M9&YS;6%S<2!T;R!L:7-T96X@9F]R($1(0U`@86YD($1.4R!R97%U97-T&-E<'0M -M:6YT97)F86-E/6QO"@HC($]R('=H:6-H('1O(&QI2!A9&1R -M97-S("AR96UE;6)E2!$3E,@7-T96US('=H:6-H -M('-U<'!O6]U(&UA>2!N965D('1H:7,@:7,@=VAE;@HC(')U;FYI;F<@ -M86YO=&AE6]U(&1O;B=T('=A;G0@9&YS;6%S<2!T;R!R -M96%D("]E=&,O:&]S=',L('5N8V]M;65N="!T:&4*(R!F;VQL;W=I;F<@;&EN -M92X*(VYO+6AO6]U('=A;G0@:70@=&\@2!P;W1E;G1I86QL>2!S971T:6YG('1H90HC -M("`@(&1O;6%I;B!O9B!A;&P@'!A;F0M:&]S -M=',B"B-D;VUA:6X],BYV;6]P0HC(&$@;&5A6]U(&AA=F4@;6]R92!T:&%N(&]N92!N971W;W)K+"!Y;W4@ -M=VEL;"!N965D('1O"B,@2!P87)A;65T97)S(&9O&%M<&QE -M7,@7,@:70G -M2!T -M:&4@;6%C:&EN92!W:71H(&5T:&5R;F5T"B,@861D'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ -M(G)E9"(@=&\*(R!A;GD@;6%C:&EN92!W:71H(&5T:&5R;F5T(&%D9')E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@87,@ -M(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO"(*(V1H8W`M -M=F5N9&]R8VQA2!M86-H:6YE(&]N90HC -M(&]F('=H;W-E($1(0U`@=7-E'1R82!O<'1I;VYS('=H:6-H(&%R92!T86=G960@ -M87,@(G)E9"(@=&\@86YY(&UA8VAI;F4@=VAO2!N86UE.@HC(')U;B`B9&YS;6%S<2`M+6AE;'`@9&AC<"(@=&\@9V5T -M(&$@;&ES="X*(R!.;W1E('1H870@86QL('1H92!C;VUM;VX@2!D;G-M87-Q+B!9;W4@=F5R>2!L:6ME;'D@=VEL;"!N;W0@ -M;F5E9`HC(&%N>2!D:&-P+6]P=&EO;G,N($EF('EO=2!U2!A2!W;W)K0HC(&1E9F%U;'0@*#$L -M(#,L(#8L(#$R+"`R."D@=&AE('-A;64@;&EN92!W:6QL('-E;F0@82!Z97)O -M+6QE;F=T:"!O<'1I;VX*(R!F;W(@86QL(&]T:&5R(&]P=&EO;B!N=6UB97)S -M+@HC9&AC<"UO<'1I;VX],PH*(R!3970@=&AE($Y44"!T:6UE('-E0H*(R!3970@=&AE(&1E -M9F%U;'0@=&EM92UT;RUL:79E('1O(#4P"B-D:&-P+6]P=&EO;CTR,RPU,`H* -M(R!3970@=&AE(")A;&P@2!A;B!O<'1I -M;VX@=VAI8V@@=VEL;"!O;FQY(&)E('-E;G0@=&\@=&AE(")R960B(&YE='=O -M2!A6]U(&UA>2!W86YT('1O('5N8V]M;65N="!T:&5M -M(&EF('EO=2!U2!N971B:6]S('-C;W!E+@H*(R!396YD(%)&0RTS -M,SDW($1.4R!D;VUA:6X@2!W:&5N('1H92!C;&EE;G0@71E(&EN=&5G97(@+2!T:&%T)W,@=VAA="!M:6-R;W-O9G0@=V%N -M=',N(%-E90HC(&AT='`Z+R]T96-H;F5T,BYM:6-R;W-O9G0N8V]M+U=I;F1O -M=W-397)V97(O96XO;&EB2]A-S!F,6)B-RUD,F0T+30Y9C`M.39D-BTT -M8C2!S;VUE(&-O;F9I9W5R871I;VYS(&]F"B,@ -M171H97)B;V]T('1O(&%L;&]W(&ES('1O(')E8V]G;FES92!T:&4@1$A#4"!S -M97)V97(N"B-D:&-P+6]P=&EO;CUV96YD;W(Z171H97)B;V]T+#8P+")%=&AE -M"X@3F]T92!T:&%T -M('=E(&YE960@=&\@2!N965D"B,@=&AI2!F:6QE0HC('1H92!U&5L:6YU>"YR -M960M;F5T"@HC($%N(&5X86UP;&4@;V8@9&AC<"UB;V]T('=I=&@@86X@97AT -M97)N86P@2!C;&EE -M;G0@=VAI8V@@8G)O861C87-T6]U(&UI9VAT(&5N9"!U -M<"!A8V-I9&5N=&%L;'D@8V]N9FEG=7)I;F<@82!$2$-0"B,@2X@5&AE($E30R!S -M97)V97(@=7-E2!T:&4@:&]S=&YA;64*(R!I9B!T:&5R92!IF4@:&5R92X*(V-A8VAE -M+7-I>F4],34P"@HC($EF('EO=2!W86YT('1O(&1I2!R97-P;VYS97,@=VAI8V@@8V]M92!F;W)M("]E=&,O:&]S=',@86YD -M('1H92!$2$-0(&QE87-E"B,@9FEL92!H879E(%1I;64M5&\M3&EV92!S970@ -M87,@>F5R;RP@=VAI8V@@8V]N=F5N=&EO;F%L;'D@;65A;G,*(R!D;R!N;W0@ -M8V%C:&4@9G5R=&AE6]U(&%R92!H87!P>2!T;R!T6]U(&-A;B!S970@82!T:6UE+71O+6QI=F4@*&EN"B,@6]U('=A;G0@9&YS;6%S<2!T -M;R!D971E8W0@871T96UP=',@8GD@5F5R:7-I9VX@=&\@"!U<"!$ -M3E,@2!W;W)K"!T;R`U+C8N-RYX"B-A;&EA"UT87)G970@9F]R(&%L;"!L;V-A;`HC(&UA8VAI;F5S+@HC;&]C86QM>`H* -M(R!2971U6]U('=A;G0@=&\@ -M3XL/'=E:6=H=#X*(R!)9B!T:&4@9&]M86EN('!A&%M<&QE+F-O;2!D;VUA:6X@=&\* -M(R!L9&%P&%M -M<&QE+F-O;2!D;VUA:6X@=&\*(R!L9&%P&%M<&QE+F-O;2PS -M.#D*"B,@5'=O(%-25B!R96-O&%M<&QE+F-O;2PS.#DL,0HC&%M<&QE+F-O;2QL9&%P&%M<&QE+F-O -M;0HC&%M<&QE+F-O;0H*(R!4:&4@9F]L -M;&]W:6YG(&QI;F4@65E(%!A9V4N7VAT='`N7W1C<"YD;G,M'0M3TO=F%R+VQO9R]D -M;G-M87-Q+FQO9PH*(R!);F-L=61E(&$@86YO=&AE'0*```````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````&5T8R]I<'-E8RYS96-R971S```````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P,3PH@("`@;6%X2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P -M.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N -M71R=6YC871E"GT*```````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````````&5T8R]L;V=R;W1A=&4N -M9"]C;VYN=')A8VMD```````````````````````````````````````````` -M```````````````````````````````````````````````````````P,#`P -M-C0T`#`P,#$W-3``,#`P,3PH@("`@;6%X6-O;7!R97-S"@H@("`@<&]S=')O=&%T90H@("`@("`@(&EF -M(%L@+64@+W9A2!O9B!T:&4@3&EC96YS92!A -M=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O -M'!R97-S(&]R(&EM<&QI960N("!3 -M964@=&AE($QI8V5NPH@("`@("`@(')O -M=&%T92`U"B`@("`@("`@;6%X2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N'-I>F4@,3!- -M"B`@("`@("`@;6ES0H@("`@("`@ -M(&-O;7!R97-S"B`@("`@("`@8V]P>71R=6YC871E"GT*```````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````!E=&,O;&]G0H)8V]M<')E71R=6YC871E"B`@("`@("!R;W1A=&4@,PH@("`@("`@8V]M<')E'0*("`@("`@(&UA>'-I>F4@,3!-"B`@("`@("!N;W1I9F5M -M<'1Y"GT*```````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````&5T8R]L;V=R;W1A=&4N9"]R0H)8V]M<')E -M2YL;V<@>PH@("`@0H@("`@;6%X7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ -M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E -M(&%T"B,*(R`@(&AT='`Z+R]W=W2\````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````,#`P,#'DN8V9G```````````````````````````````````````````` -M```````````````````````````````````````````````````````````P -M,#`P-C0T`#`P,#$W-3``,#`P,3'D*"75S97(@:&%P0H)9W)O -M=7`@:&%P0H)9&%E;6]N"@ID969A=6QT7!E(CHB9W5E2(Z(C$W,BXQ-BXQ+C$B+`H)(F1E9F%U -M;'1?96YT2(*?0H````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````;W!T+V-L;W5D+W1E7!E(CH@(FEC;7`B"B`@("`@("`@("`@('TL"B`@("`@("`@("`@ -M('L*("`@("`@("`@("`@("`@(")A;&QO=V5D(CH@=')U92P*("`@("`@("`@ -M("`@("`@(")C:61R(CH@(C$P+C`N,BXP+S@B+`H@("`@("`@("`@("`@("`@ -M(F9I7!E(CH@(G5D<"(*("`@("`@("`@ -M("`@?2P*("`@("`@("`@("`@>PH@("`@("`@("`@("`@("`@(F%L;&]W960B -M.B!T7!E(CH@(FYE='=OR)P=6)L:6-?:7`B.B(Q -M,"XP+C(N,3`R(BP*(G-O=7)C95]N870B.G1R=64L"B)A9&0B.G1R=64L"B)O -M;F5?=&]?;VYE7VYA="(Z9F%L2(Z(C$P+C`N,BXQ(BP*(FYE=&UA2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H -M92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2!C;61?;&EN92YJ2!I<',P,#`Q+FIS;VX*+V]P="]C;&]U9"]B:6XO -M=7!D871E7V-O;F9I9RYP>2!I<',P,#`R+FIS;VX*+V]P="]C;&]U9"]B:6XO -M=7!D871E7V-O;F9I9RYP>2!I<',P,#`S+FIS;VX*```````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````;W!T+V-L;W5D+W1ER)P -M=6)L:6-?:7`B.B(Q,"XP+C(N,3`S(BP*(G-O=7)C95]N870B.G1R=64L"B)A -M9&0B.G1R=64L"B)O;F5?=&]?;VYE7VYA="(Z9F%L2(Z(C$P+C`N,BXQ(BP*(FYE=&UAPH)(FQO8V%L7W!U8FQI8U]I<"(Z(C$W,BXQ-BXQ -M+C$B+`H)(FQO8V%L7V=U97-T7V-I9'(B.B(Q-S(N,38N,2XP+S(T(BP*"2)L -M;V-A;%]P=6)L:6-?9V%T97=A>2(Z(C$W,BXQ-BXQ+C$B+`H)(G!E97)?9V%T -M97=A>5]I<"(Z(C$P+C(P,"XR,#`N,2(L"@DB<&5E2(Z(C-D97,M;60U(BP* -M"2)I:V5?<&]L:6-Y(CHB,V1E7)I9VAT(&]W -M;F5R6]U -M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O -M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W -M=W2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NW!R:6YT("0Y.WTG*0H):68@ -M6R`D4D]55$527U-4051%(#T@(E50(B!="@ET:&5N"@D@("`@4U1!5%53/4U! -M4U1%4@H)96QI9B!;("123U5415)?4U1!5$4@/2`B1$]73B(@70H)=&AE;@H) -M("`@(%-405154SU"04-+55`*"69I"F9I"@IE8VAO(")3=&%T=7,Z("1[4U1! -M5%53?2(*```````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````!O<'0O8VQO=60O=&5M<&QA=&5S+VAE87)T8F5A="YS:"YT96UP;``` -M```````````````````````````````````````````````````````````` -M````````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC -M"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ -M=&AE($QI8V5N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H -M='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI -M8V5NPH@("`@36]D -M92!&5$97('L*("`@("`@("`C"B`@("`@("`@(R!3:7IE(&]F('1H92!R97-E -M;F0@<75E=64@*&EN(&]B:F5C=',I+B!4:&ES(&ES('1H92!M87AI;75M"B`@ -M("`@("`@(R!N=6UB97(@;V8@;V)J96-T2!T;R!S=&]R92!D96%D(&]B:F5C=',N"B`@("`@("`@(R!$969A -M=6QT(&ES(#$S,3`W,B!O8FIE8W1S+@H@("`@("`@(",*("`@("`@("`C(%)E -M6]U('-E="!A(&QO=R!V86QU92P@5$-0(&5N -M=')I97,@:6X*("`@("`@("`C($5S=&%B;&ES:&5D('-T871E&%M<&QE+`H@("`@("`@(",@86X@ -M4U-((&-O;FYE8W1I;VX@=VET:&]U="!+965P06QI=F4@96YA8FQE9"X@268@ -M;F]T('-E="P*("`@("`@("`C('1H92!D865M;VX@=7-E6]U(&1E -M8W)E87-E('1H:7,*("`@("`@("`C('9A;'5E+"!T:&4@;G5M8F5R(&]F(&%C -M:VYO=VQE9V1M96YT6]U"B`@("`@("`@(R!I;F-R96%S -M92!T:&ES('9A;'5E+"!T:&4@'!E6-L97,@6]U('1O(&1I -M'1E'1E -MF%T:6]N -M(&UE2!O9B!Y;W5R(&5X:7-T:6YG(&EN=&5R9F%C97,N($EF -M(&%N>2!D;W5B="P*("`@("`@("`C(&1O(&YO="!M;V1I9GD@=&AI0H@("`@("`@(",@9&]U -M8G0L(&1O(&YO="!M;V1I9GD@=&AIF%T:6]N(&UEF%T:6]N(&UE6]U"B`@("`@ -M("`@(R!N;W1I8V4@6]U(&UA>2!W86YT('1O -M(&EN8W)E87-E('1H92!S:7IE"B`@("`@("`@(R!O9B!T:&4@2!T;R!A8VAI979E(&9A=6QT+71O;&5R86YC92X@26X@ -M8V%S92!O9B!D;W5B="P@9&\*("`@("`@("`C(&YO="!M;V1I9GD@=&AI6]U(&-A;B!O;FQY('-E;&5C="!O;F4N"B`@("`C"B`@("`C(%5$4"![ -M"B`@("`@("`@(PH@("`@("`@(",@5410(&%D9')E6]U(&%R92!G;VEN9R!T;R!UF4*("`@("`@("`C"B`@("`@("`@ -M(R!28W93;V-K971"=69F97(@,3(T.3(X,`H*("`@("`@("`C"B`@("`@("`@ -M(R!%;F%B;&4O1&ES86)L92!M97-S86=E(&-H96-KPH@("`@(PH@("`@(R!3970@=&AE -M(&YI8V4@=F%L=64@;V8@=&AE(&1A96UO;BP@=&AI6]U(&-A;B!S96QE8W0@8F5T=V5E -M;@H@("`@(R!24B!A;F0@1DE&3R!A;F0@=&AE('!R;V-EPH@("`@(R`@(%1Y<&4@1DE&3PH@("`@(R`@(%!R:6]R:71Y -M(#DY"B`@("`C('T*"B`@("`C"B`@("`C($YU;6)E2X*("`@(",@4F5A9"!S;VUE(&1O8W5M96YT -M2!K965P -M('-O;64@9&5A9"!E;G1R:65S(&-A8VAE9"!F;W(@<&]S7-L;V2!N86UE -M("AD865M;VX@*&1E9F%U;'0I(&]R(&QO8V%L,"XN-RD*("`@(",@1&5F875L -M=#H@;V9F"B`@("`C"B`@("!3>7-L;V<@;VX*"B`@("`C"B`@("`C($QO8VMF -M:6QE"B`@("`C"B`@("!,;V-K1FEL92`O=F%R+VQO8VLO8V]N;G1R86-K9"YL -M;V-K"@H@("`@(PH@("`@(R!5;FEX('-O8VME="!C;VYF:6=UF5-87A'&%M<&QE(&-O;F9I9W5R -M871I;VX@9FEL92!S971S('1H90H@("`@(R!S:7IE('1O(#(@34)Y=&5S('1O -M(&%V;VED('1H:7,@F4*("`@(",@:68@:70@9&5T96-T&EM=6T@8G5F9F5R('-I>F4@9W)O=W1H('1H870@8V%N(&)E(')E86-H -M960N(%1H:7,@97AA;7!L92!F:6QE"B`@("`C('-E=',@=&AE('-I>F4@=&\@ -M."!-0GET97,N"B`@("`C"B`@("!.971L:6YK0G5F9F5R4VEZ94UA>$=R;W=T -M:"`X,S@X-C`X"@H@("`@(PH@("`@(R!)9B!T:&4@9&%E;6]N(&1E=&5C=',@ -M=&AA="!.971L:6YK(&ES(&1R;W!P:6YG('-T871E+6-H86YG92!E=F5N=',L -M"B`@("`C(&ET(&%U=&]M871I8V%L;'D@6YC:')O -M;FEZ871I;VX@86=A:6YS="!T:&4@2V5R;F5L"B`@("`C(&%F=&5R(#,P('-E -M8V]N9',@*&1E9F%U;'0@=F%L=64I+B!297-Y;F-H6]U('=A;G0@6YC+B!4:&ES(&]P=&EO;B!I"!K97)N96P@/CT@ -M,BXV+C,Q+@H@("`@(PH@("`@(R!.971L:6YK179E;G1S4F5L:6%B;&4@3V9F -M"@H@("`@(PH@("`@(R!">2!D969A=6QT+"!T:&4@9&%E;6]N(')E8V5I=F5S -M('-T871E('5P9&%T97,@9F]L;&]W:6YG(&%N"B`@("`C(&5V96YT+61R:79E -M;B!M;V1E;"X@66]U(&-A;B!M;V1I9GD@=&AIF%T:6]N(&UO -M9&4L('1H92!P;VQL:6YG(&UO9&4@8V%N(&]N;'D@9W5AF5S('1H92!H86YD;&EN9R!O9B!S -M=&%T92UC:&%N9V4@979E;G1S(&-O;6EN9PH@("`@(R!F2`H:6X@ -M=&5R;7,@;V8*("`@(",@2!T:')E92!F:6QT97(M6]U(&-A;B!D969I;F4@=&AE(&5V -M96YT(&9I;'1E2!A=F]I -M9&EN9R!T:&4@8V]P>2!O9B!T:&4@979E;G0@;65S6]U(')E<75I"!K97)N96P@/CT@,BXV+C(Y('1O"B`@("`C -M(&9I;'1E6]U('=A;G0@=&\@PH@ -M("`@("`@(",*("`@("`@("`C($%C8V5P="!O;FQY(&-E65R(#0@<')O -M=&]C;VPN"B`@("`@("`@(PH@("`@("`@(%!R;W1O8V]L($%C8V5P="!["B`@ -M("`@("`@("`@(%1#4`H@("`@("`@("`@("!30U10"B`@("`@("`@("`@($1# -M0U`*("`@("`@("`@("`@5410"B`@("`@("`@("`@($E#35`@(R!4:&ES(')E -M<75I2!A;&P@=&AE"B`@("`@("`@(R!)4"!A -MPH@("`@("`@("`@ -M("!)4'8T7V%D9')E2!A;B!)4'8V(&%D9')E2!F;&]W('-T871E+@H@("`@("`@(",@5&AI -M2!B86-K=7`*("`@("`@("`C(&9I -M7!E/6YO=&EF>0H@("`@4WES=&5M9"!O;@I]"@`````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````!O<'0O8VQO=60O=&5M -M<&QA=&5S+V-H96-K7VAE87)T8F5A="YS:"YT96UP;``````````````````` -M````````````````````````````````````````````````````````,#`P -M,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7-T96UC=&P@2`M+69A=6QT"@H@("`@<&MI;&P@+3D@:V5E<&%L:79E9"`^/B`D4D]55$52 -M7TQ/1R`R/B8Q('Q\('1R=64*("`@('!K:6QL("TY(&-O;FYT&ET"F9I"@``````````````;W!T+V-L;W5D+W1E;7!L871E -M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI -M86YC90HC('=I=&@@=&AE($QI8V5N6]U -M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HA -M('=I=&@@=&AE($QI8V5NPH@("`@PH@("`@("`@(&AE87)T -M8F5A=`H@("`@?0H*("`@(&YO=&EF>5]B86-K=7`@(B]O<'0O8VQO=60O8FEN -M+VUA2`M+6)A8VMU<"(*("`@(&YO=&EF>5]M87-T97(@(B]O<'0O -M8VQO=60O8FEN+VUA2`M+6UA5]F875L -M="`B+V]P="]C;&]U9"]B:6XO;6%S=&5R+G!Y("TM9F%U;'0B"GT*```````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````!O<'0O8VQO=60O8FEN+P`````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````,#`P,#&4N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&ET(#$*?0H*&5?8V9G7V9I;&5N86UE(#P\14]&"D1%1D%53%0@ -M9&5F875L=`I04D]-4%0@,0I424U%3U54(#(V"D1)4U!,05D@8F]O="YMF4]-C8P,#`@:6YI=')D/21I;FET0`````````````````````````````````````````` -M````````````````````````````````````````````,#`P,#2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA -M=R!O'!R97-S(&]R(&EM<&QI960N -M("!3964@=&AE($QI8V5N7!E(ET@/3T@(G-T871I8VYA -M=')U;&5S(CH*("`@("`@("`@("`@;F5W7!E(ET@/3T@(F9O"`](&1B86=;"AF;W)W87)D*0H@("`@("`@("`@("`@("`@("`@(&EF(&YO -M="!I;F1E>"`]/2`M,3H*("`@("`@("`@("`@("`@("`@("`@("`@9&)A9UMS -M;W5R8V5?:7!=6VEN9&5X72`](&YE=W)U;&4*("`@("`@("`@("`@("`@("`@ -M("!E;'-E.@H@("`@("`@("`@("`@("`@("`@("`@("!D8F%G6W-O=7)C95]I -M<%TN87!P96YD*&YE=W)U;&4I"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@ -M("`@("`@("`@("`@("`@(&1B86=;7!E(ET@/3T@ -M(G-T871I8VYA=')U;&5S(CH*("`@("`@("`@("`@("`@(&EF('-O=7)C95]I -M<"!I;B!D8F%G+FME>7,H*3H*("`@("`@("`@("`@("`@("`@("!D96P@9&)A -M9UMS;W5R8V5?:7!="B`@("`@("`@("`@(&5L:68@7,H*3H*("`@("`@("`@("`@("`@("`@("!I;F1E>"`] -M("TQ"B`@("`@("`@("`@("`@("`@("`@9F]R(&9O%T*"B`@("!R971U2!T:&4@<'5B;&EC('-I9&4L -M('1H;W-E(&UU7!E(ET@/3T@7!E(ET@/3T@(G-T871I -M8VYA="(Z"B`@("`@("`@2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET(#$*9FD*"G5S86=E*"D@ -M>PH@('!R:6YT9B`B57-A9V4Z("5S("U;8WQG?')\;GQD72!;+6P@/'!U8FQI -M8R!G871E=V%Y/ET@6RUV(#QV<&,@8VED&ET(#(@)&QO8VL@)&QO8VME9`H).SL*("!E -M&ET("0_("1L;V-K("1L;V-K960*9FD*"FEF -M(%L@(B1N9FQA9R(@/3T@(C$B(%T*=&AE;@H@("-G971?=G!N7W5S86=E"B`@ -M=6YL;V-K7V5X:70@)#\@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)&1F;&%G -M(B`]/2`B,2(@70IT:&5N"B`@(W)E;6]V95]U&ET(#`@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)')F;&%G(B`]/2`B -M,2(@70IT:&5N"B`@71H;VX*(R`M+2!C;V1I;F2!O9B!T:&4@3&EC96YS92!A -M=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&-E -M<'0@24]%2@I"B`@("`@("`@("`@ -M("`@("`@("`@9W5E22R)$;VU57U)E<75E&-E<'0@17AC97!T:6]N(&%S(&4Z -M"B`@("`@("`@("`@("`@("`@("`@;&]G9VEN9RYE7!E)UT@/3T@)V%L;"<@86YD(&]B:ELG -M7!E(#T@(F%N>2(*("`@("`@("`@("`@:68@(FEC -M;7!?='EP92(@:6X@7,H*2!A;F0@7!E)UT*("`@("`@("`@("`@:68@(FEC;7!? -M8V]D92(@:6X@7,H*2!A;F0@7!E)UTL('-E;&8N7!E("5S("UJ("5S(B`E("AI8VUP7W1Y<&4L('-E;&8N&5C=71E*&1S=$EP2==.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5; -M)V%C=&EO;B==(#T@(D%#0T505"(*("`@("`@("`@("`@("`@("`@("!E;'-E -M.@H@("`@("`@("`@("`@("`@("`@("`@("!S96QF+G)U;&5;)V%C=&EO;B== -M(#T@(D123U`B"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@ -M("`@("`@(",@1F]R(&]T:&5R(')U;&5S(&%D9&5D+"!I9B!D969A=6QT7V5G -M7!E("5S(B`E(&EC;7!?='EP90H@("`@("`@("`@("`@ -M("`@96QI9B!R=6QE6R=P7!E -M+B!3;RP@:71S(&9W(&%T=')I8G5T92!I7!E(#T@ -M(F%N>2(*("`@("`@("`@("`@("`@('-E;&8N<')O=&]C;VP@/2!S96QF+G1Y -M<&4*("`@("`@("`@("`@("`@(&EF(")I8VUP7W1Y<&4B(&EN(')U;&4N:V5Y -M7!E -M+"!R=6QE6R=I8VUP7V-O9&4G72D*("`@("`@("`@("`@("`@(&EF('-E;&8N -M='EP92`]/2`B<')O=&]C;VPB.@H@("`@("`@("`@("`@("`@("`@(&EF(')U -M;&5;)W!R;W1O8V]L)UT@/3T@-#$Z"B`@("`@("`@("`@("`@("`@("`@("`@ -M(')U;&5;)W!R;W1O8V]L)UT@/2`B:7!V-B(*("`@("`@("`@("`@("`@("`@ -M("!S96QF+G!R;W1O8V]L(#T@&5C=71E*")I<'1A -M8FQE+4$O:7!T86)L97,@+70@9FEL=&5R("U$+V&5C=71E*")I -M<'-E="`M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP -M&5C=71E*")I<'-E="`M -M3"!\(&=R97`@3F%M93H@('P@87=K('LG<')I;G0@)#(G?2!\(&EP2!V -M86QI9"!D871A"B`@("`@("`@("`@("`@("!I9B!F;VQD97(@(3T@(G5S97)D -M871A(B!A;F0@9F]L9&5R("$](")M971A9&%T82(Z"B`@("`@("`@("`@("`@ -M("`@("`@8V]N=&EN=64*"B`@("`@("`@("`@("`@("!I9B!F:6QE(#T]("(B -M.@H@("`@("`@("`@("`@("`@("`@(&-O;G1I;G5E"@H@("`@("`@("`@("`@ -M("`@7,N97AI="@Q*0H@("`@("`@("`@("!I9B!O2Q!;&QO=UQN1&5N>2!F2!E>&ES=',L('=E(&1O(&ET('1H:7,@ -M=V%Y(&9O7,N97AI="@Q -M*0H*("`@("`@("!F:"`](&]P96XH:'1A8V-E2`](")2 -M97=R:71E4G5L92!>;65T82UD871A+R@N*RDD("`N+B\B("L@9F]L9&5R("L@ -M(B\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%=(@H@("`@("`@("`@("!H -M=&%C8V5S7,N97AI="@Q*2`@ -M(R!&25A-10H@("`@("`@(')E='5R;B!4&ET*#$I("`C($9)6$U%"B`@("`@("`@:7!S96,N=G!N+2@N*BDN8V]N9B(L(&9I;&4I"B`@("`@ -M("`@("`@(&EF(&TZ"B`@("`@("`@("`@("`@("!S96QF+F-O;F9I<',N87!P -M96YD*&TN9W)O=7`H,2DI"@H@("`@("`@(&9O&5C=71E*")I<'-E -M8R!R96QO860B*0H*("`@(&1E9B!C;VYF:6=U#4R-2`M:B!!0T-%4%0B("4@9&5V72D*("`@ -M("`@("!F;W(@;F5T(&EN(&]B:ELG<&5E&UA&UA5]I<"=="B`@("`@("`@<&5E7!E/71U;FYE;"(I"B`@ -M("`@("`@9FEL92YA9&1E<2@B(&%U=&AB>3US96-R970B*0H@("`@("`@(&9I -M;&4N861D97$H(B!K97EE>&-H86YG93UI:V4B*0H@("`@("`@(&9I;&4N861D -M97$H(B!I:V4])7,B("4@:6ME<&]L:6-Y*0H@("`@("`@(&9I;&4N861D97$H -M(B!I:V5L:69E=&EM93TE3TS,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1T:6UE;W5T/3$R -M,"(I"B`@("`@("`@("`@(&9I;&4N861D97$H(B!D<&1A8W1I;VX]')A;F=E*#,I.@H@("`@("`@("`@("!R -M97-U;'0@/2!#&5C=71E*"=I<'-E8R!S=&%T=7,@=G!N+25S -M('P@9W)E<"`B)7,B)R`E("AR:6=H='!E97(L('!E97)L:7-T+G-P;&ET*"(L -M(BP@,2E;,%TI*0H@("`@("`@("`@("!I9B!L96XH2P@)R,G*0H@("`@("`@(&EF(&YO="!U&5C -M=71E*")T9&)D=6UP("]V87(O&5C=71E*"=K:6QL("TY("5S)R`E('!I9"D*"@IC;&%S&5C=71E*")S>7-T96UC=&P@2YS96-R971S(B`E("AS96QF+E903D-/3D9$25(I"B`@("`@ -M("`@>&PR='!D8V]N9F9I;&4@/2`B+V5T8R]X;#)T<&0O>&PR='!D+F-O;F8B -M"B`@("`@("`@>&PR='!O<'1I;VYS9FEL92`]("(O971C+W!P<"]O<'1I;VYS -M+GAL,G1P9"(*"B`@("`@("`@;&]C86QI<"`](&]B:ELG;&]C86Q?:7`G70H@ -M("`@("`@(&QO8V%L8VED2`Z(%!32R!<(B5S7"(B("4@*&QE9G0L('!S:RDI"B`@("`@ -M("`@&PR='!D8V]N9F9I;&4I"B`@("`@("`@>&PR='!D8V]N9BYA9&1E<2@B -M:7`@&PR='!O<'1I;VYS+F-O;6UI="@I"@H@("`@9&5F(')E;6]T96%C8V5S4EP*'-E;&8L(&EP82DZ"B`@("`@("`@9F]R(&EN -M=&5R9F%C92!I;B!S96QF+F-O;F9I9RYA9&1R97-S*"DN9V5T7VEN=&5R9F%C -M97,H*3H*("`@("`@("`@("`@:68@:6YT97)F86-E+FEP7VEN7W-U8FYE="AI -M<&$I.@H@("`@("`@("`@("`@("`@2@I"B`@("`@("`@4EP*')U -M;&5;)W!U8FQI8U]I<"==*0H@("`@("`@(&EN=&5R;F%L7V9W:6YT97)F86-E -M(#T@4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI"B`@ -M("`@("`@<'5B;&EC7V9W<&]R=',@/2!S96QF+G!O4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI+`H@ -M("`@("`@("`@("`@("`@&UA2(Z"B`@("`@("`@("`@(&9W7W!R97)O=71?2(Z"B`@("`@("`@ -M("`@(&9W7W!O2(Z"B`@("`@("`@("`@ -M(&9W7W!O2(Z"B`@("`@("`@ -M("`@(&9W7V]U='!U=%]R=6QE("L]("(@+2UD<&]R="`E2(Z"B`@("`@("`@("`@(&9W -M7V]U='!U=%]R=6QE("L]("(Z(B`K('-E;&8N<&]R='-4;U-T4EP*')U;&5;)VEN=&5R;F%L7VEP)UTI -M+`H@("`@("`@("`@("`@("`@&9F9F9F9F9F("TM -M8W1M87-K(#!X9F9F9F9F9F8B("4*("`@("`@("`@("`@("`@("`@("`@("`@ -M4EP*')U;&5;(FEN=&5R;F%L7VEP -M(ETI+"!S96QF+F=E=$=U97-T27`H*2E=*0H*"F-L87-S($EP5&%B;&5S17AE -M8W5T;W(Z"@H@("`@8V]N9FEG(#T@3F]N90H*("`@(&1E9B!?7VEN:71?7RAS -M96QF+"!C;VYF:62!PR)P&5C=71OR)P&5C -M=71OR)P -M&5C=71O7!E.B`E&5C27!T86)L97,H8V]N9FEG*3H* -M("`@("`@("!L;V=G:6YG+F1E8G5G*")0&5C=71O7,H*3H*("`@("`@("`@("`@ -M97AE8T1A=&%B86&5C27!T -M86)L97,H8V]N9FEG*0H@("`@96QI9B!J&5C27!T86)L97,H -M8V]N9FEG*0H@("`@96QS93H*("`@("`@("!L;V=G:6YG+G=A7!E/25S(B`E("AP6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7)I9VAT(&]W;F5R6]U('5N9&5R('1H -M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C -M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7)I -M9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT -M='`Z+R]W=W&5C=71I;F'!O2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&QO9V=E -M&ET(#(@)&QO8VL@)&QO8VME9`IF:0H*:68@6R`B)$%F;&%G(B`] -M/2`B,2(@70IT:&5N"B`@861D7W-N870@("1P=6)L:6-)<`H@('5N;&]C:U]E -M>&ET("0_("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1$9FQA9R(@/3T@(C$B -M(%T*=&AE;@H@(')E;6]V95]S870@("1P=6)L:6-)<`H@('5N;&]C:U]E>&ET -M("0_("1L;V-K("1L;V-K960*9FD*"G5N;&]C:U]E>&ET(#$@)&QO8VL@)&QO -M8VME9`H````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````````````````;W!T+V-L -M;W5D+V)I;B]V<&-?2!O9B!T:&4@3&EC96YS92!A=`HC"B,@ -M("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE -M($QI8V5N5]T86)L92@I('L*("!L;V-A;"!F5]T86)L92`B -MPH@(&QO8V%L(')U -M;&4])#$*("!L;V-A;"!I<#TD*&5C:&\@)')U;&4@?"!C=70@+60Z("UF,2D* -M("!I9B!;("1I<"`]/2`B4F5V;VME(B!="B`@=&AE;@H@("`@3TD9V%T97=A>2!C:61R/21C -M:61R(@H@(&QO8V%L(&1E=CTD*&=E=$5T:$)Y27`@)&EP*0H@(&EF(%L@)#\@ -M+6=T(#`@70H@('1H96X*("`@(')E='5R;B`Q"B`@9FD*("!S=61O(&EP(')O -M=71E(&%D9"`D8VED3TD9V%T97=A>2!C:61R/21C:61R(@H@ -M(')E='5R;B`D&ET(#(@)&QO8VL@)&QO8VME -M9`H@("`@("`@(#L["B`@97-A8PID;VYE"@II9B!;("UN("(D6EN9R!F=R!R=6QE -M&ET("1S=6-C97-S("1L;V-K("1L;V-K960*```````` -M``````````````````````````````!O<'0O8VQO=60O8FEN+V)A0`````````````````````````````````````````````````` -M````````````````````````````````````````````,#`P,#7)I9VAT(&]W;F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* -M(R`@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI -M8V5N&5C=71A8FQE/2&-E<'1I;VX@86YD('-E;&8N<')O8V5S&5C=71E('-H96QL(&-O;6UA;F0Z("5S -M)R`E('-E;&8N8VUD*0H@("`@("`@("`@("!E2<@:6X@<#H*("`@ -M("`@("`@("`@("`@("`@("`@("`@&-E<'1I;VXH)V-A;FYO="!F:6YD(&)A2!I;B`E&-E<'1I;VXH)V-A;FYO="!F:6YD -M(&AO2P@PH@("`@("`@("`@("`B87!I2V5Y(CH@87!I:V5Y+`H@ -M("`@("`@("`@("`B8V]M;6%N9"(Z("=N;W1I9GE"87)E;65T86Q07,H*2P@4)A3TE2P@5]P2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ -M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&EP=&%B;&5S -M+7-A=F5\9W)E<"`B24Y0550@+6H@3D545T]22U]35$%44R(@/B`O9&5V+VYU -M;&P*("!I9B!;("0_("UE<2`P(%T*("!T:&5N"B`@("`@(')E='5R;B`D/PH@ -M(&9I"B`@:7!T86)L97,@+4X@3D545T]22U]35$%44R`^("]D978O;G5L;`H@ -M(&EP=&%B;&5S("U)($9/4E=!4D0@+6H@3D545T]22U]35$%44R`^("]D978O -M;G5L;`H@(&EP=&%B;&5S("U)($E.4%54("UJ($Y%5%=/4DM?4U1!5%,@/B`O -M9&5V+VYU;&P*("!I<'1A8FQEPH@(&EP=&%B -M;&5S("U,($Y%5%=/4DM?4U1!5%,@+6X@+78@+7@@?"!A=VL@)R0Q('X@+UY; -M,"TY72LD+R![('!R:6YT9B`B)7,Z(BP@)#)])SL@/B`O9&5V+VYU;&P*("!I -M9B!;("UF("]R;V]T+W)E;6]V9616:69S(%T@.R!T:&5N(&EP=&%B;&5S("U: -M($Y%5%=/4DM?4U1!5%,@.R!F:3L@/B`O9&5V+VYU;&P*("`O&ET("0_("1L;V-K("1L -M;V-K960*9FD*"FEF(%L@(B1A9FQA9R(@/3T@(C$B(%T*=&AE;@H@("-A9&1? -M<'5B;&EC7VEN=&5R9F%C92`D<'5B;&EC268*("!U;FQO8VM?97AI="`D/R`D -M;&]C:R`D;&]C:V5D"F9I"@II9B!;("(D9&9L867)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&ET(#$*9FD*"G-E="`M>`IU2(*"FEF(%L@)#\@+65Q(#`@70IT:&5N -M"B`@("!T/6!D871E("LE2(*:68@6R`D/R`M;F4@ -M,"!="B`@('1H96X*("`@("`@*&-R;VYT86(@+6P@.V5C:&\@+64@(B-M;VYI -M=&]R:6YG0V]N9FEG7&Y32$5,3#TO8FEN+V)A2(I('P@8W)O;G1A8B`M"B`@("`@(&QO9V=E2!F;W(@;6]N:71O6]U(&UA>2!N;W0@=7-E('1H:7,@ -M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NWT*("`@(&9OF4G72`]('-T&QE;BD*("`@(&EF("=N=U]T>7!E)R!N;W0@:6X@:7`N:V5Y7!E)UT@/2`G<'5B;&EC)PH@("`@96QS93H* -M("`@("`@("!I<%LG;G=?='EP92==(#T@:7!;)VYW7W1Y<&4G72YL;W=E7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C -M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F -M('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5LP77T*"B`@("`@("`@("`@ -M("`@("!T;T1A=&5686P])"AD871E("UD("(D9&%T979A;"(@(BLE7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z -M+R]W=W0IE:F5C -M="!\?"!T0IS>7-T96UC=&P@7-T96UD+6IO=7)N -M86QD"@I465!%/20H9W)E<"`M4&\@)W1Y<&4]7$M;82UZ02U:72HG("]V87(O -M8V%C:&4O8VQO=60O8VUD;&EN92D*:68@6R`B)%194$4B(#T](")R;W5T97(B -M(%T@?'P@6R`B)%194$4B(#T](")V<&-R;W5T97(B(%T@?'P@6R`B)%194$4B -M(#T](")D:&-P"`O;W!T+V-L;W5D+V)I -M;B]U<&1A=&5?8V]N9FEG+G!Y(%T*("!T:&5N"B`@("`O;W!T+V-L;W5D+V)I -M;B]U<&1A=&5?8V]N9FEG+G!Y(&-M9%]L:6YE+FIS;VX@?'P@=')U90H@(&9I -M"F9I"@I;("$@+68@+W9A7-T96UD+W-S:&0@;65M;W)Y(&QE86L@+2!H='1P7-T96UD+VES7-T -M96UD+75S97(*"B,@16YA8FQE(&%N9"!3=&%R="!34T@*7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R -M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T -M"B,*(R`@(&AT='`Z+R]W=W2!S=&]R86=E('-Y7`])$A94$525DE33U(*("!I9B!; -M("(D:'EP(B`]/2`B=FUW87)E(B!=('Q\(%L@(B1H>7`B(#T](")H>7!E5]H='1P"B`@83)E;FUO9"!H96%D97)S"@H@(&-A="`^+V5T8R]A -M<&%C:&4R+V-OTA45%!3?2`];VX*4F5W7,@"UR97%U97-T960M=VET:"P@0V]N=&5N="U4 -M>7!E+"!O6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I -M="`B4V5T=&EN9R!U<"!);G1E&5C=71E(&EL8G9M('-V8W,B"B`@97AI="`Q"F9I"G-E -M='5P7VEL8G9M"@`````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````!O<'0O8VQO=60O8FEN+W-E='5P+W9P8W)O=71E2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N7-T96T@=FTB"@H@(&EF(%L@+68@ -M+V5T8R]H;W-TB`D1$]-04E.(%T@)B8@ -M1$]-04E./2)C;&]U9&YI;F4N:6YT97)N86PB"B`@(T1.4R!S97)V97(@=VEL -M;"!A<'!E;F0@)$1/34%)3B!T;R!L;V-A;"!Q=65R:65S"B`@6R-=*FQO8V%L/2XJ)"]L;V-A;#U<+R1$3TU!24Y< -M+R\B("]E=&,O9&YS;6%S<2YC;VYF"@H@(&-O;6UA;F0@+78@9&AC<%]R96QE -M87-E(#X@+V1E=B]N=6QL(#(^)C$*("!N;U]D:&-P7W)E;&5A&ET(#$*9FD*2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&EF(%L@(B1(65!%4E9)4T]2(B`A/2`B=FUW87)E(B!=.R!T:&5N -M"B`@("!R971U6YC"B`@2]L;V=R;W1A=&4@+V5T8R]C2`R/B8Q"B`@9FD*?0H*6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ -M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I="`B -M4V5T=&EN9R!U<"!%;&%S=&EC($QO860@0F%L86YC97(@7)I9VAT(&]W;F5R6]U('5N9&5R('1H -M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C -M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7!EPH@(&EF(%L@+60@+W!R;V,O>&5N(%T[('1H96X*("`@ -M(&UO=6YT("UT('AE;F9S(&YO;F4@+W!R;V,O>&5N"B`@("`D*&1M97-G('P@ -M9W)E<"`M<2`B6&5N($A632(I"B`@("!I9B!;("0_("UE<2`P(%T[('1H96X@ -M(",@,3U05BPP/4A630H@("`@("!E8VAO(")X96XM:'9M(B`F)B!R971UF5D(&%S($AY -M<&5R=B!W:&5N(%9IPH@(%L@(2`M9"`O<')O -M8R]X96X@72`F)B!S960@+6D@)W,O7G9C+R-V8R\G("]E=&,O:6YI='1A8B`F -M)B!T96QI;FET('$*("!;("UD("]P -M(W9C+W9C+R<@+V5T8R]I;FET=&%B("8F('1E;&EN:70@<0H*("!S>7-T96UC -M=&P@9&%E;6]N+7)E;&]A9`H*("!C87-E("1(65!%4E9)4T]2(&EN"B`@("`@ -M>&5N+7!V?'AE;BUD;VU5*0H@("`@("`@("`@7-T -M96UC=&P@7-T96UC=&P@9&ES86)L92!N -M='!D"B`@("`@("`@("!S>7-T96UC=&P@96YA8FQE('AE+61A96UO;@H@("`@ -M("`@("`@&5N=&]O;',@;F]T(&EN7Q#3TY&24=? -M2$]44$Q51U]00TE?04-023UY)R`O8F]O="]C;VYF:62`M -M3"`Q,34R,#`@='1Y4S`@=G0Q,#(B("]E=&,O:6YI='1A8@H@("`@("`@("`@ -M7-T96UC=&P@2!C;61L -M:6YE(&9I;&4@9G)O;2!Q96UU+6=U97-T+6%G96YT(@H@("`@("`@("`@("`@ -M(&)R96%K"B`@("`@("`@("`@(&9I"B`@("`@("`@("`@('-L965P(#$*("`@ -M("`@("`@(&1O;F4*("`@("`@("`@(&EF(%L@(2`M7-T96T@=&EM92!S>6YC)V0@=VET:"!H;W-T('9I82!V;7=AF5D -M(&%S('9I7!E7!E -M65S+"!H86-K>2$I"B`@("`@ -M("`@("!D;6ED96-O9&4@?"!G2(*("`@("`@("`@(&9I"B`@("`@("`@("`[.PH@(&5S86,*"B`@ -M(R!&:6YD(&%N9"!E>'!O7-T96UV;2@I('L*("!L;V-A;"!P871C:&9I;&4])#$*("!L;V-A;"!B -M86-K=7!F;VQD97(](B]T;7`O+F-O;F8N8F%C:W5P(@H@(&QO8V%L(&QO9V9I -M;&4](B]V87(O;&]G+W!A=&-H7-T96UV;2]C;VYF+V-L;W5D+FIK7-T96UV;2]C -M;VYF+RH@)&)A8VMU<&9O;&1E7-T96UV;0H@(&5C:&\@(D%L;"(@?"!U;GII<"`D<&%T8VAF:6QE("UD("]U -M&%R -M9W,@8VAM;V0@-34U"B`@:68@6R`M9B`D8F%C:W5P9F]L9&5R+V-L;W5D+FIK -M7-T96UV;2]C;VYF+PH@("`@96-H;R`B4F5S=&]R960@:V5Y -M7-T;W)E"B`@ -M:V5Y=&]O;"`M:6UP;W)T:V5Y7-T;W)E("]E=&,O7-T;W)E("]UU!!5$-(7TU/54Y4?2]A9V5N="YZ:7`@72`F)B!; -M("UF("]V87(O8V%C:&4O8VQO=60O<&%T8V@N7!E/21465!%(B`^/B`D -M;&]G9FEL90H@("`@<&%T8VA?FEP"B`@("!I9B!;("0_("UG="`P(%T*("`@('1H96X*("`@("`@96-H -M;R`B1F%I;&5D('1O(&%P<&QY('!A=&-H('-Y7-T -M96UD+W-Y365M.B][<')I;G0@)#)])RD*("!I9B!;("0H*'!H>7-M -M96TI*2`M;'0@-#`Y-C`P(%T[('1H96X*("`@("`@6YC"B`@'!O7!E&ET(#$P"B`@;&]G7VET(")3=&%R=&EN9R!G=65S="!S97)V:6-E2YS:``````````` -M```````````````````````````````````````````````````````````` -M````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@ -M("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE -M($QI8V5NPH@(&QO9U]I="`B4V5T=&EN9R!U<"!C;VYS -M;VQE('!R;WAY('-Y'D@+V5T8R]I<'1A8FQE'D*```````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````````````````````````;W!T -M+V-L;W5D+V)I;B]S971U<"]C;VUM;VXN6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N5]M86-S*"D@>PH@("`@;6%CS,Z+2(O971C+W5D978OV%D9')E5]M86-S("(D -M3DE#7TU!0U,B"B`@9FD*?0H*PH@(&QO8V%L -M(&EN=&9N=6T])#$*("!L;V-A;"!I<#TD,@H@(&QO8V%L(&UAVEN=&9N=6U]"B`@;&]C86P@8F]O='!R;W1O/2)S=&%T:6,B"@H@(&EF(%L@ -M(B1"3T]44%)/5$\B(#T](")D:&-P(B!="B`@=&AE;@H@("`@:68@6R`B)&EN -M=&9N=6TB("$]("(P(B!="B`@("!T:&5N"B`@("`@("!B;V]T<')O=&\](F1H -M8W`B"B`@("!F:0H@(&9I"@H@(&EF(%L@(B1I<"(@(3T@(C`N,"XP+C`B("UA -M("(D:7`B("$]("(B("UO("(D9F]R8V4B(#T](")F;W)C92(@70H@('1H96X* -M("`@("!E8VAO(")I9F%C92`@)&EN=&8@:6YE="`D8F]O='!R;W1O(B`^/B`O -M971C+VYE='=O7-C=&P@;F5T+FEP -M=C8N8V]N9BYA;&PN9&ES86)L95]I<'8V/3`*("!S>7-C=&P@;F5T+FEP=C8N -M8V]N9BYA;&PN9F]R=V%R9&EN9STQ"B`@7,O;F5T+VEP=C0O:7!?9F]R=V%R9`H@(%L@+68@+V5T -M8R]I<'1A8FQE7,O;F5T+VEP=C0O8V]N9B]D969A=6QT+W)P7V9I;'1E -M<@H@("`@("!F;W(@=FEF(&EN("16249?3$E35#L@9&\*("`@("`@("`@;&]G -M7VET(")C;&]U9#H@9&ES86)L92!R<%]F:6QT97(@;VX@<'5B;&EC(&EN=&5R -M9F%C93H@)'9I9B(*("`@("`@("`@7,O;F5T -M+VEP=C0O8V]N9B]L;R]R<%]F:6QT97(*?0H*96YA8FQE7VER<6)A;&%N8V4H -M*2!["B`@;&]C86P@96YA8FQE9#TD,0H@(&QO8V%L('!R;V,],`H*("!PPH@ -M(&QO8V%L(&5N86)L93TD,0H*("!I9B!;("1E;F%B;&4@+65Q(#`@70H@('1H -M96X*("`@("`@96-H;R`P(#X@+V5T8R]R<'-R9G-E;F%B;&4*("`@("`@#TD*'!R:6YT9B`B)7A<;B(@)&YU;2D*("!E8VAO("1H97@["B`@(V5N -M86)L92!R<',*("!E8VAO("1H97@@/B`O"TP+W)P7,O;F5T+V-OPH@(&EN:71?:6YT97)F86-EB`B)&=W9&5V -M(B!="B`@("!T:&5N"B`@("`@(&=W9&5V/2)E=&@P(@H@("`@9FD*"B`@("!I -M<"!R;W5T92!A9&0@9&5F875L="!V:6$@)$=7(&1E=B`D9W=D978*("!F:0H* -M("`C(%=OW!R:6YT("0Q(BXB)#(B+B(D,R(N,2)])RD*("`@("`@=&EM -M96]U="`S('!I;F<@+6X@+6,@,R`D34=-5%]'5R`F"B`@9FD*"B`@:68@6R`B -M)$A94$525DE33U(B(#T](")V;7=A6YC -M(&5N86)L90H@(&9I"GT*"G-E='5P7V1NB`D1$]-04E.(%T@)B8@1$]-04E./2)C -M;&]U9&YI;F4N:6YT97)N86PB"B`@(W)E;6]V:6YG('1H92!D;G-M87-Q(&UU -M;'1I<&QE(')A;F=E6R-=*FQO8V%L/2XJ -M)"]L;V-A;#U<+R1$3TU!24Y<+R\B("]E=&,O9&YS;6%S<2YC;VYF"B`@9FD* -M"B`@:68@6R`M;B`@(B1$3E-?4T5!4D-(7T]21$52(B!="B`@=&AE;@H@("`@ -M("!S960@+6D@+64@(B]>6R-=*F1H8W`M;W!T:6]N+BH],3$Y+BHD+V0B("]E -M=&,O9&YS;6%S<2YC;VYF"B`@("`@(&5C:&\@(F1H8W`M;W!T:6]N+69O9&AC<"UR86YG95]I<#0]+BHD+V1H8W`M9&AC<"UR86YG95]I<#8]+BHD+V1H8W`M -M6R-=*F1H8W`M;W!T:6]N/6]P=&EO;CIR;W5T97(N*B0O -M9"(@+V5T8R]D;G-M87-Q+F-O;F8*("!;("1$149!54Q47T=7(%T@)B8@96-H -M;R`B9&AC<"UO<'1I;VX];W!T:6]N.G)O=71E6R-=*F1H8W`M;W!T:6]N/6]P=&EO -M;C8Z9&YS+7-EB`B)$542#!?25`V(B!="B`@=&AE;@H@ -M("`@("!E8VAO(#$@/B`O=F%R+V-A8VAE+V-L;W5D+V1N;&5A7-T96UC=&P@9&ES86)L92!A<&%C:&4R"B`@8VQE86Y?:7!A;&EA -M&%M<&QE+F-O;F8*("!R -M;2`M9B`O971C+V%P86-H93(O26YC;'5D92!P;W)T2!0 -M>71H;VX@0W-!<'`@8V]N9FEG7&XC26YC;'5D92!P;W)T&5S -M($UU;'1I5FEE=W,B+R)/<'1I;VYS("U);F1E>&5S($UU;'1I5FEE=W,B+R`O -M971C+V%P86-H93(O;6]D&5S(B`^("]V87(O=W=W+VAT;6PO+FAT86-C97-S -M"GT*"G-E='5P7V%P86-H93(H*2!["B`@;&]G7VET(")3971T:6YG('5P(&%P -M86-H92!W96(@2!A;F0@;F]T('=OPH@('!U8FQI8U]I<#TD151(,E])4`H@(%L@(B1%5$@R7TE0(B`] -M/2`B,"XP+C`N,"(@72`F)B!P=6)L:6-?:7`])$542#%?25`*("!E8VAO("1P -M=6)L:6-?:7`*?0H*PH@("`@;&]G7VET(")3971T:6YG -M('5P($Y44"(*("`@($Y44%]#3TY&7T9)3$4](B]E=&,O;G1P+F-O;F8B"B`@ -M("!I9B!;("UF("1.5%!?0T].1E]&24Q%(%T*("`@('1H96X*("`@("`@("!) -M1E,])RPG(')E860@+6$@R-S97)V97)?;&ES=%M` -M77TM,2`[(&ET97)A=&]R/CTP(#L@:71E2!A<&%C:&4R -M(B`^("]V87(O8V%C:&4O8VQO=60O96YA8FQE9%]S=F-S"B`@(&5C:&\@(F-L -M;W5D(&YFT-(149?5$U0 -M7T9)3$5]"B`@("`@($-/34U!/2(L7&Y<="(*("`@("`@8V%S92`D2T59(&EN -M"B`@("`@("`@9&ES86)L95]R<%]F:6QT97(I"B`@("`@("`@("`@(&5X<&]R -M="!$25-!0DQ%7U)07T9)3%1%4CTD5D%,544*("`@("`@("`@("`@.SL*("`@ -M("`@("!E=&@P:7`I"B`@("`@("`@("`@(&5X<&]R="!%5$@P7TE0/21604Q5 -M10H@("`@("`@("`@("`[.PH@("`@("`@(&5T:#%I<"D*("`@("`@("`@("`@ -M97AP;W)T($542#%?25`])%9!3%5%"B`@("`@("`@("`@(#L["B`@("`@("`@ -M971H,FEP*0H@("`@("`@("`@("!E>'!O'!O'!O'!O'!O'!O'!O'!O -M'!O'!O'!O -MF4I"B`@("`@("`@("`@(&5X<&]R="!'54535%]#24127U-) -M6D4])%9!3%5%"B`@("`@("`@("`@(#L["B`@("`@("`@'!O'!O -M'!O'!OF4@8VQO=60@<&%S2!S"(B(%T*("!T:&5N"B`@("!E8VAO(")R;V]T.B1635]005-35T]21"(@?"!C -M:'!A6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NPH@(&QO9U]I="`B4V5T=&EN9R!U<"!D:&-P('-E7-T96T@ -M=FTB"B`@2!A;&QO=R!$3E,@&5C=71E(&1H8W!S7)I9VAT(&]W -M;F5R6]U -M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O -M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W -M=WPH@ -M(&5C:&\@(B0H9&%T92D@)$`B(#X^("]V87(O;&]G+V-L;W5D+FQO9PH@(&QO -M9U]A8W1I;VY?;7-G("(D0"(*?0H*<&%T8V@H*2!["B`@;&]C86P@4$%40TA? -M34]53E0]+VUE9&EA+V-D@H@(&QO8V%L('!R:79K97D])%!!5$-( -M7TU/54Y4+V%U=&AOVUD-69I;&5]*0H@("`@;&]C -M86P@;F5W;60U/0H@("`@6R`M9B`D>W!A=&-H9FEL97T@72`F)B!N97=M9#4] -M)"AM9#5S=6T@)'MP871C:&9I;&5]('P@87=K("=[<')I;G0@)#%])RD*"B`@ -M("!L;V=?:70@(E-CW!A=&-H9FEL97T@72`F)B!;("(D;F5W -M;60U(B`A/2`B(B!="B`@("!T:&5N"B`@("`@('1AF8@)'!A=&-H9FEL -M92`M0R`O"B`@("`@(&5C:&\@)'MN97=M9#5](#X@)'MM9#5F:6QE?0H@("`@ -M("!L;V=?:70@(E!A=&-H960@2`OF5D7VME>7,*("`@(&9I"B`@9FD*"B`@&5C=71I;F<@8VQO=60M96%R -M;'DM8V]N9FEG(@H*("`C($-L96%R("]T;7`@9F]R(&9I;&4@;&]C:PH@(')M -M("UF("]T;7`O*BYL;V-K"B`@6]U -M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC -M('=I=&@@=&AE($QI8V5N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&5N2!T;R!E;G-U'D@:6X@=&AE(')O -M=71I;F<@9&]M86EN"G)E8V]N9FEG7VQB*"D@>PH@(&QO9V=E'D@=&\@<')E=FEO=7,@ -M'DN8V9G+F]L9"`O971C+VAA<')O>'DO:&%P -M2YC9F'DN8V9G+FYE=PH@(&9I"GT*"F=E=%]V -M:69?;&ES="@I('L*("!L;V-A;"!V:69?;&ES=#TB(@H@(&9O7,O8VQA7!E(&]R('!A7!E(&]R('!A2!R96-E -M:79E2!F:7)E=V%L;"!R=6QE2!C;VYF:67!E(&]R('!A2!O -M9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI -M8V5N0H*"F1E9B!M -M97)G92AD8F%G+"!D871A*3H*("`@(&1B86=C(#T@8V]P>2YD965P8V]P>2AD -M8F%G*0H*("`@('!R:6YT(&1B86<*("`@('!R:6YT(&1A=&$*("`@(&EF(")V -M<&Y?=7-E7,H*3H*("`@("`@("!I -M9B!U7,H*2!A;F0@;F]T -M(&%D9#H*("`@("`@("`@("`@9&)A9V-;=7-E6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2D*("`@("`@("`@("`@9&%T82YU -M<&1A=&4H>R)I9"(Z('-E;&8N:V5Y?2D*("`@("`@("!F:6YA;&QY.@H@("`@ -M("`@("`@("!S96QF+F1B86<@/2!D871A"@H@("`@9&5F('-A=F4H2D* -M("`@("`@("`@("`@("`@(&IS;VXN9'5M<"@*("`@("`@("`@("`@("`@("`@ -M("!D8F%G+"!?9F@L"B`@("`@("`@("`@("`@("`@("`@&-E<'0@24]%2`](&ME>0H*"F-L87-S('5P9&%T941A=&%"867!E(#T]("=M;VYI=&]R22AS96QF -M+F1B+F=E=$1A=&%"867!E(#T]("=V<&YU7!E(#T]("=I<&%L:6%S -M97,G.@H@("`@("`@("`@("!S96QF+F1B+G-E=$ME>2@G:7!S)RD*("`@("`@ -M("`@("`@7!E*0H@("`@("`@("`@("!R971U -M2=="B`@ -M("`@("`@9'!;)VYI8U]D979?:60G72`](&1;)V1E=FEC92==6S,Z70H@("`@ -M("`@(&1P6R=N=U]T>7!E)UT@/2`G9W5E4AA8VLN=7!D871E7VYE='=OR=I<%]A9&1R97-S)SH@6V1P72P@)W1Y<&4G.B`G -M:7!S)WTI"B`@("`@("`@:68@)V1O;6%I;E]N86UE)R!N;W0@:6X@9"YK97ES -M*"D@;W(@9%LG9&]M86EN7VYA;64G72`]/2`G)SH*("`@("`@("`@("`@9%LG -M9&]M86EN7VYA;64G72`](")C;&]U9&YI;F4N:6YT97)N86PB"@H@("`@("`@ -M(&0@/2!04AA8VLN=7!D871E7VYE='=O2AS96QF+"!D8F%G*3H*("`@("`@("!R971U2`]("=E=&@G("L@;G5M("L@)VEP)PH@("`@("`@(&1P(#T@>WT*("`@("`@ -M("!I9BAK97D@:6X@5T*("`@("`@("`@("`@9'!;)VYE=&UA7!E(#T] -M(")P=6)L:6,B.@H@("`@("`@("`@("`@("`@9'!;)V=A=&5W87DG72`]('-E -M;&8N<49I;&4N9&%T85LG8VUD7VQI;F4G75LG9V%T97=A>2=="B`@("`@("`@ -M("`@(&5L2==(#T@7!E)SH@)VEP -M2!T;R!D96%L('=I=&@@=&AIPH@("`@("`@("`@("`@("`@ -M)V%D9"7!E(#T@7!E(ET*("`@("`@("`@("`@=7!D871E1&%T84)A9RAS96QF*0H@ -M("`@("`@("`@("!R971U&-E<'1I;VX@97)R;W(@)WMEV9I;&5N86UE?22!B965N(&UO=F5D+B(N9F]R;6%T*&5RV9I;&5N86UE?27!E"@H@("`@9&5F(&=E=$1A=&$HB(*("`@("`@("!W:71H(&]P96XH -M;W)I9U!A=&@L("=R8B7,H*2!E;'-E(&1A -M=&%;)W!U8FQI8U]I<"=="@H@("`@("`@(&EN:71I86Q?9&%T82`](&-L5]I<"AI<"P@:6YI=&EA;%]D871A6R=C;VYF -M:62<@:6X@9&)A9ULG8V]N9FEG)UTN -M:V5Y5]I<"AC;',L(&EP+"!P5]I -M<"`]($9A;'-E"B`@("`@("`@:68@:7`@/3T@<')I=F%T95]G871E=V%Y7VEP -M.@H@("`@("`@("`@("!N97=?:7!?;6%T8VAE5]I<`H*("`@($!C;&%S0`````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````````,#`P,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL -M92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2!S=&%T=7,*"F9R;VT@8W,N0W-#;VYF:6<@:6UP;W)T($-S -M0V]N9FEG"F9R;VT@;W!T<&%R7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R -M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T -M"B,*(R`@(&AT='`Z+R]W=WB`D,2!="G1H96X*("`@(&5C:&\@(D9A:6P@ -M=&\@9FEN9"!64$X@<&5E7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2`]('9P;ELG=G!N7W-E2!I;B!D -M8F%G+FME>7,H*2!A;F0@;F]T(&]P.@H@("`@("`@(&1E;"AD8F%G6VME>5TI -M"B`@("!E;'-E.@H@("`@("`@(&1B86=;:V5Y72`]('9P;@H@("`@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H -M='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI -M8V5N2`] -M(')O=71E6R=N971W;W)K)UT*("`@("`@("!D8F%G6VME>5T@/2!R;W5T90H@ -M("`@7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R -M2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T -M"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ -M=&AE($QI8V5N2`]('9P -M;ELG<&5E71H;VX*(R!, -M:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%3 -M1BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS -M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E -M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!F$EN"@H*<&%S&ES=',H9V5T5&]K96Y&:6QE*"DI.@H@("`@("`@('=I=&@@;W!E -M;BAG9714;VME;D9I;&4H*2P@)W(G*2!A2P@=F%L -M=64@/2!L:6YE+G-T7!E(#T@ -M7!E(#T]("=S96YD7VUY7W!A7-L;V7-L;V7-L;V7-L;V2!I -M<"]P87-S=V]R9%LE7-L;V7-L;V&-E<'0@2V5Y8F]A&-E<'1I -M;VXL(&4Z"B`@("`@("`@0`````````````````````````````````` -M`````````````````````````````````````````````````````````#`P -M,#`W-34`,#`P,36]U -M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC -M('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E -M<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5NFEP7V9I;&4B"B`@("!E -M8VAO(")$96QE=&EN9R!D:6%G;F]S=&ECFEP7V9I;&4B -M"F5L6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ -M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N0H*"F1E9B!M97)G92AD8F%G+"!D871A*3H*("`@("(B(B!3:6UP;'D@ -M;W9E&ES='-I;F<@8F%G(&%S+"!T:&4@=VAO;&4@8V]N -M9FEG=7)A=&EO;B!I2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N4EP("@I -M>PH@(&QO8V%L(&EP/20Q"B`@9F]R(&1E=B!I;B!@;',@+3$@+W-Y6]U(&UA>2!N;W0@=7-E('1H -M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N -MWT*("`@("`@("!S96QF+F-H86YG960@/2!;70H@("`@("`@('-E -M;&8N9&5V:6YF;R`]($-S2&5L<&5R+F=E=%]D979I8V5?:6YF;R@I"B`@("`@ -M("`@2@I"B`@("`@("`@("`@(&5L2=="B`@("`@ -M("`@("`@('-L:6YE(#T@(F1H8W`M"P@:7`I"B`@("`@("`@("`@('-E;&8N -M8V]N9BYS96%R8V@H2D*("`@("`@("`@("`@ -M96QS93H*("`@("`@("`@("`@("`@(&QI&-E -M<'0@17AC97!T:6]N(&%S(&4Z"B`@("`@("`@("`@(&QO9V=I;F2!C;VYT2!R96-E:79E($1(0U!.04LN"B`@("`@ -M("`@(R!7:&5N(%9-(&ES(&5X<'5N9V5D+"!I=',@86-T:79E(&QE87-E(&%N -M9"!$2$-0+T1.4R!C;VYF:6<@:7,@<')O<&5R;'D@5LG;6%C7V%D9')E5LG9&5F875L=%]G871E=V%Y -M)UT*"B`@("!D968@861D7VAO6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7!E2`]($9A;'-E"B`@("`@("`@ -M9&5V(#T@)R<*("`@("`@("!F;W(@:6YT97)F86-E(&EN(&EN=&5R9F%C97,Z -M"B`@("`@("`@("`@(&EF(&1E=B`]/2!I;G1E&5C=71E*&-O;6UA;F0I"B`@("`@("`@("`@("`@("!I9B!D9795<#H*("`@ -M("`@("`@("`@("`@("`@("!L;V=G:6YG+FEN9F\H(D1E=FEC92`E65T+"!L970G -M5]I9E]N965D960H"B`@ -M("`@("`@("`@("`@("`B)7,O)7,B("4@*'-E;&8N0U-?5$5-4$Q!5$537T1) -M4BP@5]I9E]N965D960H"B`@("`@("`@("`@("(E -M&5C("1$045-3TX[+RTM97AE8R`D1$%%34].("TM("TM=G)R<#LO9R(@+V5T -M8R]I;FET+F0O:V5E<&%L:79E9"R(L(")] -M(BP@R(L(")](BP@6PH@("`@("`@("`@("`@("`@("`@ -M("`@(DE0=C1?861D&5C=71E*")R;2`M2`S,"!S96-O;F1S"B`@("`@("`@:&5A&ET:6YG -M(B`E("AE&5C=71E -M*"(E&PR='!D -M(BP@(G-T;W`B*0H@("`@("`@($-S2&5L<&5R+G-E2@I("L@(BPB("L@:6YT97)F86-E+F=E=%]I -M<"@I*2YS=&]P*"D*"B`@("`@("`@&5C=71E*&-M9#(I"B`@("`@("`@("`@(&1E=B`] -M(&EN=&5R9F%C92YG971?9&5V:6-E*"D*"B`@("`@("`@8VUD(#T@(B5S("U# -M("5S(B`E("AS96QF+D-/3DY44D%#2T1?0DE.+"!S96QF+D-/3DY44D%#2T1? -M0T].1BD*("`@("`@("!#&5C=71E*"(E&PR='!D(BP@(G-T;W`B*0H*("`@ -M("`@("!I;G1E&5C=71E*&-M9"D*("`@("`@("`@("`@("`@(&QO9V=I -M;F2D*("`@("`@("`@ -M("`@("`@(&5X8V5P="!%>&-E<'1I;VXZ"B`@("`@("`@("`@("`@("`@("`@ -M;&]G9VEN9RYE&5C=71E*"(E&5C=71E*"(E&PR='!D(BP@(G)E -M2`](&EN=&5R9F%C92YG971?9V%T97=A>2@I"B`@("`@("`@("`@ -M("`@("!I9B!G871E=V%Y.@H@("`@("`@("`@("`@("`@("`@(')O=71E+F%D -M9%]R;W5T92AD978L(&=A=&5W87DI"@H@("`@("`@("`@("`C(%1H92!F:7)S -M="!P=6)L:6,@:6YT97)F86-E(&AA&5C=71E -M*")A2!C;VYN=')A8VMD"B`@("`@("`@(B(B"B`@("`@("`@ -M;&EN97,@/2!;70H@("`@("`@(&QI;F5S+F%P<&5N9"@B7'1<=%QT25!V-%]A -M9&1R97-S("5S7&XB("4@(C$R-RXP+C`N,2(I"B`@("`@("`@;&EN97,N87!P -M96YD*")<=%QT7'1)4'8T7V%D9')E7!E(&%N9"!D96-I9&5S(&EF(&ET(&ES(&%N(&EN=&5R -M;F%L(&%D9')E0H@("`@("`@(%1H92!N97<@8V]D92!A -M;'-O(&=I=F5S('1H92!P;W-S:6)I;&ET>2!T;R!C;&]U9'-T86-K('1O(&AA -M=F4@82!H>6)R:60@9&5V:6-E"B`@("`@("`@=&AA="!C;W5L9"!F=6YC=&EO -M;B!A2!O9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N -M;W)G+VQI8V5NR)R;W5T97(B.B`B971H,B(L(")V<&-R;W5T97(B.B`B971H,2)]"@I3 -M5$%415]#3TU-04Y$4R`]('LB&%R9W,@8F%S:"`M8R`@)VEF -M(%L@)#`@/3T@,B!=.R!T:&5N(&5C:&\@7")-05-415)<(CL@96QS92!E8VAO -M(%PB0D%#2U507"([(&9I)R(L"B`@("`@("`@("`@("`@("`@(")V<&-R;W5T -M97(B.B`B:7`@861DW!R:6YT("0Y.WTG('P@>&%R9W,@8F%S:"`M8R`G:68@6R`D,"`]/2!< -M(E507"(@73L@=&AE;B!E8VAO(%PB34%35$527"([(&5L&5C=71E*&-M9"DZ"B`@("`@("`@ -M("`@(&EF("(@1$]73B`B(&EN(&1E=FEC93H*("`@("`@("`@("`@("`@(&-M -M9"`](")I<"!L:6YK('-E="`E7,@87)E('!U -M8FQI8R!I;G1E7!E*"E="B`@("`@("`@("`@("`@("`@("`@;&]G -M9VEN9RYI;F9O*")#:&5C:R!S=&%T92!C;VUM86YD(#T^("5S(B`E('-T871E -M7V-M9"D*("`@("`@("`@("`@("`@("`@("!S=&%T92`](&5X96-U=&4H7!E*"E=(&%N9"!S=&%T92`]/2`B -M34%35$52(CH*("`@("`@("`@("`@("`@("`@("`@("`@97AE8W5T92AC;60I -M"B`@("`@("`@("`@("`@("!E;'-E.@H@("`@("`@("`@("`@("`@("`@(&5X -M96-U=&4H8VUD*0H*"F1E9B!I&5C=71E*")M;W5N="!T -M;7!F6XH=F%L*3H*("`@(&EF('9A;#H*("`@("`@("!R -M971U&5C=71E*")I<"!A9&1R('-H;W<@?&=R97`@+78@ -MWT*("`@("`@("`@("`@=&];)VEP)UT@ -M/2!V86QS6S%="B`@("`@("`@("`@('1O6R=D978G72`]('9A;'-;+3%="B`@ -M("`@("`@("`@('1O6R=N971W;W)K)UT@/2!)4$YE='=O2!S=')I;F<*("`@("(B(@H@("`@ -M9F]R(&D@:6X@97AE8W5T92@B:7`@861D&5C=71I;F&5C=71E(&-O;6UA;F0@(B(B"B`@("!L;V=G:6YG+F1E8G5G*")3879I;F<@ -M:7!T86)L97,@9F]R("5S(B`E(&-O;6UA;F0I"@H@("`@&5C=71I;F&5C=71E*")S>7-T -M96UC=&P@)7,@)7,B("4@*&]P+"!N86UE*2D*("`@(&QO9V=I;F7-T96UC=&P@&5C=71E*")K:6QL("U(55`@)7,B -M("4@<&ED*0H@("`@96QS93H*("`@("`@("!S97)V:6-E*")D;G-M87-Q(BP@ -M(G-T87)T(BD*"@ID968@8V]P>5]I9E]N965D960H2!E>&ES=`H@("`@(B(B"B`@("!I9B!O0`````````````````````````````````````````````` -M`````````````````````````````````````````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E -M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI -M8V5N'1D;G,H*3H*("`@("`@("`@("`@9&YS+F%P<&5N9"AS -M96QF+F1A=&%;)W)O=71E2==(#T@=F%L"@H@("`@9&5F(&=E=%]N971M87-K*'-E;&8I.@H@ -M("`@("`@(",@5V4@;F5E9"!T;R!F:7@@:70@<')O<&5R;'DN($D@:G5S="!A -M9&1E9"!T:&4@:68L(&%S($EA;B!D:60@:6X@&-E<'1I;VXN"B`@("`@("`@:68@)W)O=71E6]U -M(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC -M('=I=&@@=&AE($QI8V5N"YS=')I -M<"@I(&9O2!A -M9'9A;F-E9"(L("TQ*0H@("`@("`@(&-R;VXN8V]M;6ET*"D*"B`@("!D968@ -M&-L=61E9%]H96%L=&A?8VAE8VMS(ET*("`@("`@("`@("`@:&-? -M9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K0`````````` -M```````````````````````````````````````````````````````````` -M`````````````````````#`P,#`W-34`,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC -M96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!, -M:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N7,H*3H*("`@("`@("`@("`@&5C=71E*&-M9"D*("`@("`@("`@ -M("`@(R!P2!P&ES=',Z(')U;&4])7,@=&%B;&4])7,B+"!F=ULR72P@;F5W7W)U;&4N -M9V5T7W1A8FQE*"DI"B`@("`@("`@("`@(&5L2`](&9W6S)="B`@("`@("`@("`@("`@("!I9B!F=ULQ72`]/2`B9G)O;G0B -M.@H@("`@("`@("`@("`@("`@("`@(&-P>2`](&-P>2YR97!L86-E*"2DI"B`@("`@("`@("`@("`@("`C(%1H97)E(&%R92!S;VUE -M(&ES3H*("`@("`@("`@ -M("`@=&%B;&4@/2`G)PH@("`@("`@("`@("!F;W(@:2!I;B!O<&5N*"(O971C -M+VEP=&%B;&5S+VEP=&%B;&5S+25S(B`E('1Y<&4I.@H@("`@("`@("`@("`@ -M("`@:68@:2YS=&%R='-W:71H*""`]/2!R=6QE70H* -M"F-L87-S($-S3F5T9FEL=&5R*&]B:F5C="DZ"@H@("`@9&5F(%]?:6YI=%]? -M*'-E;&8I.@H@("`@("`@('-E;&8N7!E)RP@)RTM0`````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```P,#`P-S4U`#`P,#$W-3``,#`P,32!O9B!T:&4@3&EC96YS92!A=`HC"B,@ -M:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N&ES=',L(&5L5]P87)A;2D*("`@("`@("!E;'-E -M.@H@("`@("`@("`@("!L;V=G:6YG+FEN9F\H(D%D9&EN9R!R;W5T93H@9&5V -M("(@*R!D978@*R`B('1A8FQE.B`B("L*("`@("`@("`@("`@("`@("`@("`@ -M("`@('1A8FQE("L@(B!N971W;W)K.B`B("L@861D2!P87)A;65T97(@5]P87)A;2D*("`@("`@("!E;'-E.@H@("`@("`@ -M("`@("!L;V=G:6YG+FEN9F\H(D%D9&EN9R!R;W5T93H@9&5V("(@*R!D978@ -M*R`B('1A8FQE.B`B("L*("`@("`@("`@("`@("`@("`@("`@("`@('1A8FQE -M("L@(B!N971W;W)K.B`B("L@861D2DZ"B`@("`@("`@(B(B("!!9&0@82!D969A=6QT(')O=71E"B`@("`@("`@ -M.G!A&-E<'1I;VXH(D=A=&5W87D@8V%N;F]T(&)E($YO;F4N(BD*"B`@ -M("`@("`@:68@0H@("`@("`@("`@("!L;V=G -M:6YG+FEN9F\H(D%D9&EN9R!D969A=6QT(')O=71E(BD*("`@("`@("`@("`@ -M6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI -M86YC90HC('=I=&@@=&AE($QI8V5N0`````````````````````` -M```````````````````````````````````````````````````````````` -M`````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI -M86YC90HC('=I=&@@=&AE($QI8V5N'DO:&%P2YC9F'DO:&%P2YC9F2@I"B`@("`@("`@9F]R('@@:6X@8V]N9FEG.@H@("`@("`@("`@("!; -M9FEL93$N87!P96YD*'2A(05!23UA97T-/ -M3D9?5"P@2$%04D]865]#3TY&7U`I"@H@("`@("`@("`@("!P2!O9B!T:&4@3&EC96YS92!A=`HC -M"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2`](&EP+F=E=%]G871E=V%Y*"D*("`@("`@("!S96QF+G1Y<&4@/2!I<"YG -M971?='EP92@I"B`@("`@("`@5]I9E]N965D960H(B]E=&,O87!A8VAE,B]V:&]S="YT96UP;&%T92(L -M"B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@(B]E=&,O87!A8VAE -M,B]S:71E2DI"B`@("`@("`@("`@(&9I;&4N&5C=71E,B@B7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2AS96QF*3H*("`@("`@("!S96QF+F-O;F9I9R`](%M="B`@("`@("`@ -M"P@;&EN -M92!I;B!E;G5M97)A=&4H%T@/2!R97!L86-E("L@ -M(EQN(@H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!S96%R8V@H"P@;&EN92!I;B!E;G5M97)A=&4H -M"P@;&EN92!I;B!E;G5M97)A=&4H -M2!O9B!T:&4@3&EC -M96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE -M(&QA=R!O'!R97-S(&]R(&EM<&QI -M960N("!3964@=&AE($QI8V5N0`````````````````````````````````````` -M````````````````````````````````````````````````````````,#`P -M,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E -M>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N"`](&EN="@G)RYJ;VEN*%MD:6=I="!F;W(@9&EG:70@:6X@9&5V:6-E(&EF -M(&1I9VET+FES9&EG:70H*5TI*0H@("`@("`@("`@("`@("`@:68@9&5V:6-E -M7W-U9F9I>"`\(&QO=V5S=%]D979I8V4Z"B`@("`@("`@("`@("`@("`@("`@ -M;&]W97-T7V1E=FEC92`](&1E=FEC95]S=69F:7@*("`@("`@("`@("`@("`@ -M("`@("!G=65S=%]I;G1E5]C:61R*'-E;&8I.@H@("`@("`@ -M(')E='5R;B`B)7,O)7,B("4@*'-E;&8N9V5T7V=A=&5W87DH*2P@F4@:6X@8FETF4B -M*0H*("`@(&1E9B!G971?9&5V:6-E*'-E;&8I.@H@("`@("`@(')E='5R;B!S -M96QF+F=E=%]A='1R*")D979I8V4B*0H*("`@(&1E9B!G971?8VED7!E)UT@:6X@5E)24%]465!% -M4SH*("`@("`@("`@("`@7!E)UT@:6X@6R=G=65S="==.@H@("`@("`@("`@ -M("!R971U7!E)UT@:6X@6R=P=6)L -M:6,G73H*("`@("`@("`@("`@7-T -M96T*("`@("`@("`B(B(*("`@("`@("!S96QF+F1E=FQIWT*("`@("`@("!S96QF+F%D -M9')E7!E*"D@ -M:6X@6R)P=6)L:6,B72!A;F0@861D2)= -M*0H@("`@("`@("`@("`@("`@&UA7!E)UT*("`@("`@("!R971U&9F9F9F9F9F(ETI"@H@("`@("`@('-E;&8N9G7!E*"D@ -M:6X@6R)P=6)L:6,B73H*("`@("`@("`@("`@7!E*"D@:6X@ -M6R)P=6)L:6,B73H*("`@("`@("`@("`@#4R-"\P>&9F -M9F9F9F9F(B`E("AS96QF+F1E=BP@2)=(&%N9"!S96QF+F%D9')E2)=(&%N9"!S96QF+F%D9')E7!E*"D@:6X@6R)P -M=6)L:6,B72!A;F0@*&YO="!S96QF+F-O;F9I9RYI2!T -M:&4@;6%S=&5R(&)A8VMU<"!F=6YC=&EO;G,*("`@("`@("`@("`@("`@(&EF -M(&YO="!C;61L:6YE+FES7W)E9'5N9&%N="@I.@H@("`@("`@("`@("`@("`@ -M("`@(&EF(&UE=&AO9"`]/2`B861D(CH*("`@("`@("`@("`@("`@("`@("`@ -M("`@0W-087-S=V13=F,HWT*("`@("`@("!C -M;60@/2`H(FEP(&%D9'(@2!K965P86QI -M=F5D(&]R(&YO=`H@("`@("`@("(B(@H@("`@("`@(&EF(")N=U]T>7!E(B!I -M;B!S96QF+F%D9')E2==*0H@ -M("`@("`@(&EF(&YO="!S96QF+F-L+FES7W)E9'5N9&%N="@I(&%N9"`H;F]T -M('-E;&8N861D2==(&]R('-E;&8N861D2==(#T](").;VYE(BDZ"B`@("`@("`@("`@(&-M9"`](")A2!H87!P96X@8G5T(&1I9"`Z*0H@("`@ -M("`@(",@270@;65A;G,@86X@87!A8VAE(&9I;&4@9V]T(&]R<&AA;F5D(&%F -M=&5R(&$@9W5E2@I"@H@("`@9&5F -M(&ES7V=U97-T7V=A=&5W87DH7,O;F5T+V-O7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ -M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E -M(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O -M'!R97-S(&]R(&EM<&QI960N("!3 -M964@=&AE($QI8V5N"(I.@H@("`@("`@("`@("!I=&5M&5C -M=71E*")K:6QL("TY("5S(B`E('!I9"D*"B`@("!D968@9W)E<"AS96QF+"!S -M='(I.@H@("`@("`@(&9O"(I.@H@("`@("`@("`@("!I9B!I+F9I;F0H7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C -M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F -M('1H92!,:6-E;G-E(&%T"B,*(R!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L -M:6-A8FQE(&QA=R!O'!R97-S(&]R -M(&EM<&QI960N("!3964@=&AE($QI8V5N2!O -M9B!T:&4@3&EC96YS92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI -M8V5NWT*("`@("`@("!S96QF+F1B(#T@1&%T -M84)A9R@I"B`@("`@("`@2$*("`@("`@("`B(B(*("`@("`@("!S96QF+F1B+G-A=F4HWT*("`@("`@ -M("!R971U&1I9V5S="@I"@H@("`@9&5F(&=E=%]G871E=V%Y -M*'-E;&8I.@H@("`@("`@(&EF(")G871E=V%Y(B!I;B!S96QF+FED871A*"DZ -M"B`@("`@("`@("`@(')E='5R;B!S96QF+FED871A*"E;)V=A=&5W87DG70H@ -M("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G971?=7-E7V5X=%]D;G,H -M'1D;G,G -M70H@("`@("`@(')E='5R;B!&86QS90H*("`@(&1E9B!G971?861V97)T7VEN -M="AS96QF*3H*("`@("`@("!I9B`G861V97)T7VEN="<@:6X@0`````````````````````````````````````````````````````````` -M````````````````````````````````````````,#`P,#6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N7!E&5C=71E*&-M9"D*("`@("`@("`@("`@;&]G9VEN9RYI;F9O*")! -M9&1E9"!R=6QE("5S(&9O0`````````````````````````````````````````````` -M````````````````````````````````````````````````````````,#`P -M,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O -M=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET*#(I -M"B`@("!F;W(@;W!T+"!A7,N97AI -M="@R*0H*("`@(&9O&ES=',H9&%T869I;&4I.@H@("`@("`@(&]S -M+G)E;6]V92AD871A9FEL92D*"@ID968@8W)E871E9FEL92AI<"P@9F]L9&5R -M+"!F:6QE+"!D871A*3H*("`@(&1E3H* -M("`@("`@("`@("`@;W,N;6%K961I2!E>&ES=',L('=E(&1O(&ET('1H:7,@=V%Y -M(&9O0H@("`@("`@("`@("!I9B!E+F5R&ET*#$I"B`@("`@("`@ -M:68@;W,N<&%T:"YE>&ES=',H;65T86UA;FEF97-T*3H*("`@("`@("`@("`@ -M9F@@/2!O<&5N*&UE=&%M86YI9F5S="P@(G(K82(I"B`@("`@("`@("`@(&5X -M9FQO8VLH9F@I"B`@("`@("`@("`@(&EF(&9I;&4@;F]T(&EN(&9H+G)E860H -M*3H*("`@("`@("`@("`@("`@(&9H+G=R:71E*&9I;&4@*R`G7&XG*0H@("`@ -M("`@("`@("!U;F9L;V-K*&9H*0H@("`@("`@("`@("!F:"YC;&]S92@I"B`@ -M("`@("`@96QS93H*("`@("`@("`@("`@9F@@/2!O<&5N*&UE=&%M86YI9F5S -M="P@(G&9L;V-K*&9H*0H@("`@("`@("`@("!F -M:"YW&9L;V-K*&9H*0H@("`@9F@N -M=W)I=&4H96YT3H*("`@("`@("!F -M;&]C:RAF:6QE+"!,3T-+7T58*0H@("`@97AC97!T($E/17)R;W(@87,@93H* -M("`@("`@("!P71H;VX*(R!,:6-E;G-E9"!T -M;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@ -M;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,* -M(R`@(&AT='`Z+R]W=WFEP9FEL90H*"B,@0W)E871E('II<"!A -MFEP -M7V9I;&5S*&9I;&5S*3H*("`@(&9,:7-T(#T@9FEL97,*("`@(&-O;7!R97-S -M:6]N(#T@>FEP9FEL92Y:25!?1$5&3$%4140*("`@('1I;65?&5C=71E7W-H96QL7W-C3H*("`@("`@("`@ -M("`@("`@("`@("!Z9BYW3H*("`@("`@("!C;&5A;G5P*&9I;&5S7V9R;VU?F8N8VQO&5C=71E7W-H96QL -M7W-C&-E<'0@3U-%#H*("`@("`@("`@("`@9&5L971E7W1M<%]F:6QE7V-M9"`]("=R -M;2`M9B`E3H*("`@("`@("`@("`@9BYC;&]S92@I"B`@("!R971U"YS<&QI -M="AC;60I+"!S=&1E&-E<'0@3U-%&5C=71E(&)A'0H -M>FEP7V9I;&4L(&9I;&5S7V9O=6YD+"!F:6QE"YS<&QI="AC;&5A;G5P7V-M9"DI"@H* -M:68@7U]N86UE7U\@/3T@)U]?;6%I;E]?)SH*("`@(&9I;&5,:7-T(#T@7)I9VAT(&]W -M;F5R6]U -M('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O -M8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W -M=WW!R -M:6YT("0R.WTG('P@6]U(&UA>2!N -M;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@ -M=&AE($QI8V5N2!T;R!E;G-U2!T;R!I=',@<')E=FEO -M=7,@'D@=&\@<')E=FEO=7,@'DN8V9G+F]L9"`O971C+VAA<')O>'DO:&%P2YC9F'DN8V9G+FYE=PH@(&9I"GT*"@IL;V=G97(@+70@8VQO=60@(B0H8F%S -M96YA;64@)#`I.B!%;G1E'D*'D@2P@8V]N9FEG=7)I -M;F<@9FER97=A;&PB"@HC(&EP=&%B;&5S(&5N=')Y('1O(&5N'D@2`D861D961)<',@ -M)')E;6]V961)<',@)'-T871S27`*"FEF(%L@)#\@+6=T(#`@70IT:&5N"B`@ -M;&]G9V5R("UT(&-L;W5D(")&86EL960@=&\@87!P;'D@9FER97=A;&P@'D@8V]N9FEG(@H@(",@4F5S=&]R92!T:&4@3$(*("!R97-T;W)E7VQB -M"@H@(&QO9V=E&ET(#$@)&QO8VL@)&QO8VME -M9`IE;'-E"B`@(R!296UO=F4@8F%C:V5D=7`@:7!T86)L92!R=6QE6]U(&UA>2!N;W0@=7-E('1H:7,@ -M9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N6]U(&UA>2!N;W0@=7-E -M('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI -M8V5N7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z -M+R]W=WPH@('-U9&\@:7!T86)L97,@+70@;6%N9VQE("U$(%!215)/ -M551)3D<@+6D@)&1E=B`M;2!S=&%T92`M+7-T871E($Y%5R`M:B!#3TY.34%2 -M2R`M+7-E="UM87)K("1T86)L94YO(#(^+V1E=B]N=6QL"@H@('-U9&\@:7`@ -MV1E=CHS?2DI"G1A8FQE3F%M93TB5&%B -M;&5?)&1E=B(*"FEF(%L@)&%C=&EO;B`]/2`G861D)R!="G1H96X*("!P;'5G -M7VYI8PIE;'-E"B`@=6YP;'5G7VYI8PIF:0H````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````&]P="]C;&]U9"]B:6XO:7!S96-T=6YN96PN6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC -M90HC('=I=&@@=&AE($QI8V5N#4R-2(*=G!N:6YM87)K/2(P>#4R-"(*"G5S86=E*"D@>PH@("`@<')I;G1F -M(")5'0@ -M:&]P/B`M3X@+6D@/&EK92!P;VQI -M8WD^("UT(#QI:V4@;&EF971I;64^("U4(#QEPH@('-U9&\@:7!T86)L97,MPH@(&1I2!<"B`@("!P:&%S93(@<&]L:6-Y -M/21ER1R:6=H=&YE='-](B`^/B`D=G!N8V]N -M9F9I;&4@)B8*("!S=61O(&5C:&\@(B`@='EP93UT=6YN96PB(#X^("1V<&YC -M;VYF9FEL92`F)@H@('-U9&\@96-H;R`B("!A=71H8GD]VEK96QI9F5T:6UE?7,B(#X^("1V<&YC;VYF9FEL92`F)@H@ -M('-U9&\@96-H;R`B("!E2(@/CX@)'9P;F-O;F9F:6QE -M("8F"B`@2!F;W(@'1H;W`](B1/4%1!4D&ET("1R970*```````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````;W!T+V-L;W5D+V)I;B]I<&%S2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5NPH@(&QO8V%L('!U8DEP -M/20H96-H;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?22!E>&ES -M=',B"GT*"F%D9%]V<&Y?8VAA:6Y?9F]R7VEP("@I('L*("!L;V-A;"!P=6)) -M<#TD*&5C:&\@)#$@?"!A=VL@+48G+R<@)WMPPH@(&QO8V%L('!U8DEP/20H96-H;R`D,2!\(&%W:R`M1BW!R:6YT("0Q?2PH@(&QO8V%L -M('!U8DEP/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R -M:6YT("0Q?2W!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)A -MW!R:6YT("0R?2W!R:6YT("0R -M?25]R;W5T97-?9G)O;5]M86EN("1T86)L94YA;64*(R!.3U1%.B!T:&ES -M("!E;G1R>2!W:6QL(&)E(&1E;&5T960@:68@=&AE(&EN=&5R9F%C92!IW!R:6YT -M("0Q?2PH@(&EF(%L@(B1S9FQA9R(@/3T@(C`B -M(%T*("!T:&5N"B`@("!R971UW!R -M:6YT("0Q?2W!R:6YT("0R?22!I<"!I;F9O(&EN=&\@9FEL92P@ -M=7-E9"!O;B!R961U;F1A;G0@W!R:6YT("0Q?2&ES -M=&EN9TEP36%S:STD*'-U9&\@:7`@861DPH@(&QO8V%L('!U8DEP/20Q -M"B`@;&]G9V5R("UT(&-L;W5D("(D*&)AW!R:6YT("0Q?2PH@(&QO8V%L('!U8DEP -M/20Q"B`@;&]G9V5R("UT(&-L;W5D("(D*&)A&ES=&EN9TEP36%S:STD*'-U9&\@:7`@861DPH@("`@(V5N86)L92!R<',@ -M86YD(')F%QN(B`D;G5M*0H@("`@("`@("`@96-H -M;R`D:&5X.PH@("`@("`@("`@(V5N86)L92!R<',*("`@("`@("`@(&5C:&\@ -M)&AE>"`^("]S>7,O8VQA&ET -M("0_("1L;V-K("1L;V-K960*9FD*"FEF(%L@(B1!9FQA9R(@/3T@(C$B(%T* -M=&AE;@H@(&%D9%]A;E]I<"`@)'!U8FQI8TEP("`F)@H@(&%D9%]F=U]C:&%I -M;E]F;W)?:7`@)'!U8FQI8TEP"B`@=6YL;V-K7V5X:70@)#\@)&QO8VL@)&QO -M8VME9`IF:0H*:68@6R`B)&9F;&%G(B`]/2`B,2(@72`F)B!;("(D1&9L86&ET("0_("1L;V-K("1L;V-K960* -M9FD*"G5N;&]C:U]E>&ET(#`@)&QO8VL@)&QO8VME9`H````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````!O<'0O8VQO=60O8FEN+VQI;F5?961I="YP>0`````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````,#`P,#2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@:'1T<#HO+W=W=RYA<&%C:&4N;W)G+VQI8V5N2UL:6YE(&5D:71I;F<@;V8@8V]N9FEG=7)A=&EO;B!F -M:6QE&%M<&QE('1H97)E)W,@82!D;W5B;&4@97-C87!E(&]F('1H92!B86-K2!M -M871C:&5D(&%L;"!F:6QE3H* -M("`@("XN+B`@(&]S+G5N;&EN:R@G9&]C=&5S="UV:&]S=',N8V]N9B55N=7-E9$QO8V%L"B`@ -M("`@("`@("`@('-T870@/2!.;VYE"B`@("`@("`@("`@('=I=&@@;W!E;BAS -M96QF+F9I;&5N86UE+"`G&-E<'1I;VXH -M(DUA9&4@=&]O(&UA;GD@961I=',B*0H@("`@("`@("`@("`@("`@("`@("`@ -M("`@("`@96QI9B!R96UA:6YI;F=?8V]U;G0@/3T@,#H*("`@("`@("`@("`@ -M("`@("`@("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@("`@("`@ -M("`@("`@("!C:&%N9V5D7VQI;F4L('-U8G,@/2!E9&ET+G!A='1E2AS96QF+F9I;&5N86UE+"!B86-K=7!?9FEL96YA;64I"B`@("`@("`@("`@ -M("`@("!O3H*("`@("`@("`@("`@:68@8VAA;F=E -M9%]F:6QE(&ES(&YO="!.;VYE.B`@("`@("`@("`@("`@("`@("`@("`@("`@ -M("`@("`C(&9A:6QE9"P@8VQE86X@=7`*("`@("`@("`@("`@("`@(&-H86YG -M961?9FEL92YC;&]S92@I"B`@("`@("`@("`@("`@("!O6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC -M90HC('=I=&@@=&AE($QI8V5N2!R=6QE2!O9B!T:&4@3&EC96YS92!A -M=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O -M'!R97-S(&]R(&EM<&QI960N("!3 -M964@=&AE($QI8V5N7,I.@H*("`@(&5X:7-T:6YG7VME>7,@/2!;70H@ -M("`@;F5W7V5T:%]K97D@/2!.;VYE"@H@("`@9F]R(&LQ+"!V,2!I;B!G=65S -M=&YE=%]D:6-T+FET97)I=&5M7,@ -M86YD(&QE;BAV,2D@/B`P.@H@("`@("`@("`@("!E>&ES=&EN9U]K97ES+F%P -M<&5N9"AK,2D*"B`@("!I9B!N;W0@97AI2`Z.B!296UO=FEN9R!G=65S="!N971W;W)K -M+BXN(BD*("`@("`@("!R971U2!T;R!B92!S -M971U<`H@("`@)R2!C;VYF:6=U&ES=',@/2!&86QS90H*("`@(&9O2!P2!C;VYF:6=U2`Z.B!02`Z.B!.;R!'=65S=$YE='=O7,N87)G -M=ELQ72D*("`@('!R;V-E7)I9VAT(&]W;F5R -M6]U('5N -M9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A -M:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=WPH@(&QO8V%L(%]P -M:60])"AP:61O9B!D;G-M87-Q*0H@(&9OW!R:6YT("0R?20H@(&EF(%L@)&EP -M=C0@70H@('1H96X*("`@(&5C:&\@(C`@)&UA8R`D:7!V-"`D:&]S="`J(B`^ -M/B`D1$A#4%],14%315,*("!F:0H@(&EF(%L@)&EP=C8@70H@('1H96X*("`@ -M(&5C:&\@(C`@)&1U:60@)&EP=C8@)&AO6]U(&UA>2!N -M;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@ -M=&AE($QI8V5N&-E<'0@3U-%6]U&-E<'1I;VX@;V-C=7)R960Z("5S(B`E(&4*("`@("`@("`@ -M("`@7!E(#T]("=T0`````````````` -M```````````````````````````````````````````````````````````` -M`````````````#`P,#`W-34`,#`P,36]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@ -M8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&-L=61E9%]H96%L=&A?8VAE -M8VMS(ET@/2!D871A6R)E>&-L=61E9%]H96%L=&A?8VAE8VMS(ET*("`@(&EF -M(")H96%L=&A?8VAE8VMS7V-O;F9I9R(@:6X@9&%T83H*("`@("`@("!D8F%G -M6R)H96%L=&A?8VAE8VMS7V-O;F9I9R)=(#T@9&%T85LB:&5A;'1H7V-H96-K -M7)I9VAT -M(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z -M+R]W=WW!R:6YT("0Q?2<*?0H* -M:7!T86)L97-?*"D@>PH@("!L;V-A;"!O<#TD,0H@("!L;V-A;"!P=6)L:6-? -M:7`])#(*("`@;&]C86P@:7-?=G!C/69A;'-E"B`@(&QO8V%L(&9O7-T96UC=&P@:7,M86-T -M:79E(&EPS$N+C5]"B`@("!D;PH@("`@("!L;V=G97(@+70@8VQO -M=60@(B0H8F%S96YA;64@)#`I.B!W86ET:6YG(&EP7-T96UC=&P@:7,M86-T:79E(&EP7-T96UC=&P@:7,M86-T:79E(&EP7-T96UC=&P@&PR='!D"B`@("`@("`@("`@("`@("`@("`@2`Z(%!32R!<(B1I<'-E8U]P -M&PR -M='!D"@H@("!I<'1A8FQEPH@("!L;V-A;"!P=6)L:6-?:7`])#$*"B`@(&EPPH@("!L;V-A;"!U/20Q"B`@(&QO -M8V%L('!A)'4@7"H@7"(D -M<&%S&ET(#(*"0D[.PH@(&5S86,*9&]N90H*:68@6R`B)&1E -M=B(@/3T@(B(@70IT:&5N"B`@("!D978](F5T:#(B"F9I"@II9B!;("(D8VED -M&ET(#(*6R`B)&-R96%T92(@/3T@(C$B(%T@)B8@6R`B)&QF;&%G -M)'!F;&%G)')F;&%G)'-F;&%G(B`A/2`B,3$Q,2(@72`F)B!U&ET(#(*"FEF(%L@(B1CW!R:6YT("0Q?27)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS -M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E -M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W7,@/2!;)V5T:#$G+"`G971H,B6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@ -M:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N2!O9B!T:&4@ -M3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A -M8FQE(&QA=R!O2!O9B!T:&4@9&YS;6%S<2!F:6QE+@IC<"`B)$1( -M0U!?0T].1DE'7TU!24XB("`B)$1(0U!?0T].1DE'7TU!24Y?0D%+(@IC<"`B -M)$1(0U!?0T].1DE'(B`B)$1(0U!?0T].1DE'7T)!2R(*"B-E;7!T>2!T:&4@ -M8V]N9FEG(&9I;&4*96-H;R`^("1$2$-07T-/3D9)1PH*=F%R/2(D,2(*9&AC -M<%]R86YG93TB(@ID:&-P7V=A=&5W87D](B(*9&AC<%]N971M87-K/2(B"F1N -M'1?9&YS/20H96-H -M;R`B)$--1$Q)3D4B('P@9W)E<"`M;R`B=7-E97AT9&YS/71R=64B*0IW:&EL -M92!;("UN("(D=F%R(B!="F1O"B!V87(Q/20H96-H;R`D=F%R('P@8W5T("UF -M,2`M9"`B+2(I"B!R;W5T97)I<#TD*"!E8VAO("1V87(Q('P@8W5T("UF,2`M -M9"`B.B(@*0H@9V%T97=A>3TD*&5C:&\@)'9AV1H8W!?V1H8W!?;F5T;6%S:WTB)V1H8W`M;W!T:6]N/71A9SIR86YG -M92W9A -MVQO9WTB8&=R97`@(EYD:&-P+6]P=&EO;CTV(B`B)$1(0U!?0T].1DE'7TU! -M24XB8")<;B(*;&]G/2(D>VQO9WTB8&=R97`@(EYD:&-P+6]P=&EO;CUO<'1I -M;VXZVQO -M9WTB8&=R97`@(EYD:&-P+7)A;F=E/2(@(B1$2$-07T-/3D9)1U]-04E.(F`B -M7&XB"@II9B!;("(D;&]G(B`A/2`G7&Y<;EQN)R!="G1H96X*("-#;&5A;FEN -M9R!T:&4@97AI9&AC<"UR86YG93TO9"<@(B1$2$-07T-/3D9)1U]-04E.(@IF:0H*(W=R -M=&EN9R!T:&4@;F5W(&-O;F9I9R!I;G1O('1H92!C;VYF:6<@9FEL92X*96-H -M;R`M92`B)&1H8W!?&ET("1R -M97-U;'0@)&QO8VL@)&QO8VME9`H````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````````````````````!O -M<'0O8VQO=60O8FEN+V-S7V1H8W`N<'D````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N7,@/2!S970H*0H@("`@("`@(&9O2`A/2`G -M:60G(&%N9"!E;G1R>5LG;6%C7V%D9')E7,N861D*&ME>2D* -M("`@("`@("`@("`@("`@(&)R96%K"@H@("`@("`@(&EF(&1A=&%;)W)E;6]V -M92==(&%N9"!K97D@;F]T(&EN(')E;6]V95]K97ES.@H@("`@("`@("`@("!R -M96UO=F5?:V5Y2!I -M;B!R96UO=F5?:V5Y5TI"@H@("`@("`@(&1B86=;9&%T85LG:7!V-%]A9&1R97-S)UU=(#T@9&%T -M80H*("`@(')E='5R;B!D8F%G"@```&]P="]C;&]U9"]B:6XO8W-?8VUD;&EN -M92YP>0`````````````````````````````````````````````````````` -M```````````````````````````````````````````P,#`P-S4U`#`P,#$W -M-3``,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ -M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E -M(&%T"B,*(R`@(&AT='`Z+R]W=W2!O9B!T:&4@ -M3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A -M8FQE(&QA=R!O'!R97-S(&]R(&EM -M<&QI960N("!3964@=&AE($QI8V5N'DN8V9G("]E=&,O:&%P2]H87!R;WAY+F-F9RYO;&0*"B`@;78@)&YE -M=U]C;VYF:6<@+V5T8R]H87!R;WAY+VAA<')O>'DN8V9G"B`@:68@:&%P2`M<"`O=F%R+W)U;B]H87!R;WAY+G!I9"`M9B`O971C+VAA<')O>'DO:&%P -M2YC9F<@+7-F("0H8V%T("]V87(O'DN<&ED*3L@=&AE -M;@H@("`@;&]G9V5R("UT(&-L;W5D(").97<@:&%P2!I;G-T86YC92!S -M=6-C97-S9G5L;'D@;&]A9&5D+"!S=&]P<&EN9R!P'DO:&%P2YC9F<@)&YE=U]C;VYF:6<* -M("`@(&UV("]E=&,O:&%P2]H87!R;WAY+F-F9RYO;&0@+V5T8R]H87!R -M;WAY+VAA<')O>'DN8V9G"B`@("!H87!R;WAY("UP("]V87(O'DN<&ED("UF("]E=&,O:&%P2]H87!R;WAY+F-F9R`M2YP:60I"B`@("!R970],0H@(&9I"@IE>&ET("1R -M970*```````````````````````````````````````````````````````` -M`````````````````````````````````````````````````````')O;W0O -M;6]N:71O71H;VX*(R!,:6-E;G-E9"!T;R!T -M:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE -M"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@ -M(&AT='`Z+R]W=WWT*("`@('!A2`K)UTG*R(@(B`K("=;)RMP2LG -M72<@*R`B("(@*R!M2!O;F4@<&ED(&]R(&YO=`H@("`@:68@97AI=%-T871U6EN9R!F97<@;6]R92!T:6UEWT*("`@(&9A:6QI -M;F=?PH@("`@("`@("`@("`@("`@ -M(G-U8V-EPH@("`@("`@("`@("`@ -M("`@(G-U8V-EPH@("`@("`@("`@("`@("`@(G-U8V-EWT@(U-K:7`@WT*("`@(&9A:6QI;F=# -M:&5C:W,@/2!;70H@("`@:68@8VAE8VM4>7!E(#T](")B87-I8R(Z"B`@("`@ -M("`@;6]N:71297-U;'0L(&9A:6QI;F=#:&5C:W,@/2!M;VYI=%!R;V-E&-L=61E(#T@:&-?9&%T85LB97AC;'5D961?:&5A;'1H7V-H96-K&-L=61E9%]H96%L=&A?8VAE8VMS(B!I;B!H8U]D871A(&5L7!E*0H@("`@("`@("`@("`@("`@:68@;&5N*')E="D@ -M/3T@,#H*("`@("`@("`@("`@("`@("`@("!C;VYT:6YU90H@("`@("`@("`@ -M("`@("`@:68@(G-U8V-E7,N87)G=BD@/3T@,CH*("`@("`@("!I9B!S>7,N -M87)G=ELQ72`]/2`B861V86YC960B.@H@("`@("`@("`@("!M86EN*")A9'9A -M;F-E9"(I"B`@("`@("`@96QI9B!S>7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@ -M("`@("`@("`@("!M86EN*")B87-I8R(I"B`@("`@("`@96QS93H*("`@("`@ -M("`@("`@<')I;G1D*")%7!E(&]F('1E7,N87)G=BD*("`@(&5L0`````` -M```````````````````````````````````````````````````````````` -M```````````````````P,#`P-C0T`#`P,#$W-3``,#`P,371H;VX*(R!,:6-E -M;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VX@*$%31BD@ -M=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS92P@ -M5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E;G-E -M(&%T"B,*(R`@(&AT='`Z+R]W=W'!E8W1E9"`](%M="B`@("`@("`@ -M9&5S=$EP(#T@<&]R=$9O'0L('-R8U!O2!I -M;B!I<%1A8FQE4QI'!E8W1E -M9#H*("`@("`@("`@("`@("`@("`@("!I9B!I<%1A8FQE16YT'!E8W1E9$5N=')Y*2`]/2`M,3H*("`@("`@("`@("`@("`@("`@("`@("`@ -M9F]U;F1!;&P@/2!&86QS90H@("`@("`@("`@("`@("`@("`@("`@("!B4QI2!O9B!T:&4@3&EC96YS -M92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA -M=R!O'!R97-S(&]R(&EM<&QI960N -M("!3964@=&AE($QI8V5N$UE;6]R>55S86=E(&EN(&AE86QT:%]C -M:&5C:W-?9&%T82`B("L@7`H@("`@("`@("`@("`@(")S>7-T96U4:')E&ET*#`I"@H@("`@;6%X365M;W)Y -M57-A9V4@/2!F;&]A="AD871A6R)M87A-96UO7,N87)G=ELQ72`]/2`B8F%S:6,B.@H@("`@("`@ -M(&UA:6XH*0H````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M'E?8VAE8VLN<'D````````````` -M```````````````````````````````````````````````````````````` -M`````````````#`P,#`V-#0`,#`P,36]U(&UA>2!N;W0@=7-E('1H -M:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI86YC90HC('=I=&@@=&AE($QI8V5N -M41A=&$@86YD(")M87AC;VYN -M(B!I;B!H84-F9U-E8W1I;VYS6R)G;&]B86PB73H*("`@("`@("!I9B!H87!R -M;WAY1&%T85LB;6%X8V]N;B)=("$](&AA0V9G4V5C=&EO;G-;(F=L;V)A;")= -M6R)M87AC;VYN(EU;,%TN'E$871A(BD*("`@(&EF(&AA -M<')O>'E$871A(&ES($YO;F4@;W(@;&5N*&AA<')O>'E$871A*2`]/2`P.@H@ -M("`@("`@('!R:6YT(").;R!D871A('!R;W9I9&5D('1O(&-H96-K+"!S:VEP -M<&EN9R(*("`@("`@("!E>&ET*#`I"@H@("`@=VET:"!O<&5N*"(O971C+VAA -M<')O>'DO:&%P2YC9FWT*("`@(&-UWT*("`@(&9O41A=&$L(&AA0V9G4V5C=&EO;G,I"@H@("`@:68@ -M8VAE8VM-87A#;VYN(&%N9"!C:&5C:TQB4G5L97,Z"B`@("`@("`@<')I;G0@ -M(D%L;"!C:&5C:W,@<&%S&ET*#`I"B`@("!E;'-E.@H@ -M("`@("`@(&5X:70H,2D*"@II9B!?7VYA;65?7R`]/2`B7U]M86EN7U\B.@H@ -M("`@:68@;&5N*'-Y7,N87)G=ELQ72`]/2`B -M861V86YC960B.@H@("`@("`@(&UA:6XH*0H````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````````6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M -M<&QI86YC90HC('=I=&@@=&AE($QI8V5N&ET*#`I"@H@("`@=&5M<&QA=&5697)S:6]N36%T8VAE -M65T('-E='5P(&%T("(@*R!R96QE87-E1FEL92`K7`H@ -M("`@("`@("`@("`@("`@("`B+"!S:VEP<&EN9RXB"B`@("`@("`@96QI9B!E -M>'!E8W1E9"`A/2!F;W5N9#H*("`@("`@("`@("`@<')I;G0@(E1E;7!L871E -M(%9E'!E8W1E9"`K("(L(&9O=6YD.B`B("L@9F]U;F0*("`@("`@ -M("`@("`@=&5M<&QA=&5697)S:6]N36%T8VAE'!E8W1E9"`K("(L(&9O=6YD.B`B("L@9F]U;F0*("`@("`@ -M("`@("`@&ET*#$I"@H*:68@7U]N86UE7U\@/3T@(E]?;6%I;E]?(CH* -M("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A;F0@2\````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````,#`P,#0`````````````````````````` -M```````````````````````````````````````````````P,#`P-C0T`#`P -M,#$W-3``,#`P,37)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C:&4@3&EC96YS -M92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F('1H92!,:6-E -M;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W3U.;VYE*3H*("`@('=I=&@@ -M;W!E;B@G+W)O;W0O:&5A;'1H7V-H96-K2!I2!I5TN2D@/3T@,#H*("`@("`@("`@("`@("`@(&-O;G1I -M;G5E"B`@("`@("`@("`@(&ME>59A;"`](&5N=')Y+G-P;&ET*"(](BD*("`@ -M("`@("`@("`@:68@;&5N*&ME>59A;"D@/3T@,CH*("`@("`@("`@("`@("`@ -M(&1;:V5Y5F%L6S!=+G-T2]?7VEN:71?7RYP>0`````````````````````````````````````````` -M````````````````````````````````````````,#`P,#8T-``P,#`Q-S4P -M`#`P,#$W-3``,#`P,#`P,#$U-#``,3,V,C4Q-3`S,30`,#$W-S8R`"`P```` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````'5S=&%R("``9&%R2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO -M2!A<'!L:6-A8FQE(&QA=R!O'!R -M97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N0`````````````````````````````````` -M````````````````````````````````````````````````,#`P,#8T-``P -M,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#,Q,S(`,3,V,C4Q-3`S,30`,#$W-S8Q -M`"`P```````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````'5S=&%R("``9&%R2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P -M86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N&ET -M*#`I"@H@("`@;6EN1&ES:TYE961E9"`](&9L;V%T*&1A=&%;(FUI;D1IF4I("\@,3`R-`H*("`@ -M(&EF("AF6]U(&UA>2!N;W0@=7-E('1H:7,@9FEL92!E>&-E<'0@:6X@8V]M<&QI -M86YC90HC('=I=&@@=&AE($QI8V5N2!I;7!O7,I(#T](#`Z"B`@("`@ -M("`@<')I;G0@(D%L;"`B("L@7,@ -M87)E(')E86-H86)L92!V:6$@<&EN9R(*("`@("`@("!E>&ET*#`I"B`@("!E -M;'-E.@H@("`@("`@('!R:6YT(")5;G)E86-H86)L92!G871E=V%Y7,N87)G=ELQ72`]/2`B8F%S:6,B -M.@H@("`@("`@(&UA:6XH*0H````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````')O;W0O:&5A;'1H7V-H96-K0`````````````````````````````````````````````````````````` -M```````````````````````````````````P,#`P-C0T`#`P,#$W-3``,#`P -M,371H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD -M871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H92!!<&%C -M:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C;W!Y(&]F -M('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W&5C=71A8FQE71H;VX*(R!,:6-E;G-E9"!T;R!T:&4@07!A8VAE(%-O9G1W87)E -M($9O=6YD871I;VX@*$%31BD@=6YD97(@;VYE"B,@;W(@;6]R92!C;VYT7)I9VAT(&]W;F5R6]U('5N9&5R('1H -M92!!<&%C:&4@3&EC96YS92P@5F5R2!O8G1A:6X@82!C -M;W!Y(&]F('1H92!,:6-E;G-E(&%T"B,*(R`@(&AT='`Z+R]W=W2!I;7!O&ET*#`I -M"@H@("`@=VET:"!O<&5N*"2!O -M9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A -M<'!L:6-A8FQE(&QA=R!O'!R97-S -M(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N$-P=55S86=E(&EN(&AE -M86QT:%]C:&5C:W-?9&%T82!S>7-T96U4:')E&ET*#`I"@H@("`@;6%X0W!U57-A9V4@/2!F;&]A="AD871A -M6R)M87A#<'55&ET*#`I"B`@("!E -M;'-E.@H@("`@("`@('!R:6YT(")&86EL960@=&\@&ET*#$I"@H*:68@7U]N86UE -M7U\@/3T@(E]?;6%I;E]?(CH*("`@(&EF(&QE;BAS>7,N87)G=BD@/3T@,B!A -M;F0@0`````````````````````````````````````` -M````````````````````````````````````````````````````,#`P,#2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P.B\O=W=W -M+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N2`]('9-6R)M86-!9&1R97-S(ET@ -M*R`B("(@*R!V35LB:7`B72`K("(@(B`K('9-6R)V;4YA;64B70H@("`@("`@ -M(&9O=6YD16YT2`](%1R=64*("`@("`@("`@("`@("`@(&)R96%K"@H@("`@("`@("`@("!N -M;VY$969A=6QT4V5T(#T@(G-E=#HB("L@=DU;(FEP(ETN2`](%1R=64*("`@("`@ -M("`@("`@("`@(&)R96%K"@H@("`@("`@(&EF(&YO="!F;W5N9$5N=')Y.@H@ -M("`@("`@("`@("!F86EL961#:&5C:R`](%1R=64*("`@("`@("`@("`@9F%I -M;'5R94UE&ET*#$I"B`@("!E;'-E.@H@("`@("`@('!R -M:6YT(")!;&P@(B`K('-T7,N87)G=ELQ72`]/2`B861V86YC960B.@H@("`@("`@(&UA:6XH -M*0H````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````````````````!R;V]T -M+V9U;F,N2!O9B!T:&4@3&EC96YS92!A=`HC"B,@("!H='1P -M.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@=&AE($QI8V5N -M2!O;F4@;&]C:R!IPH@("`@ -MPH@("`@;&]C:STD,0H*("`@(%]?;&]C:V5D/3`*("`@ -M(%]?5%,]8&1A=&4@*R5S)4Y@"B`@("!?7TQ/0TM$25(](B]T;7`B"B`@("!? -M7TQ/0TM&24Q%/2(D7U],3T-+1$E2+R1?7U13+20D+21L;V-K+FQO8VLB"@H@ -M("`@:68@6R`D,B!="B`@("!T:&5N"B`@("`@("`@7U]424U%3U54/20R"B`@ -M("!E;'-E"B`@("`@("`@7U]424U%3U54/3,P"B`@("!F:0H*("`@(&EF(%L@ -M+64@)%]?3$]#2T9)3$4@70H@("`@=&AE;@H@("`@("`@(&QO9V=EPH@("`@7U],3T-+1$E2/2(O=&UP -M(@H@("`@7U],3T-+1DE,13TB)%]?3$]#2T1)4B\J+20D+20Q+FQO8VLB"B`@ -M("!?7VQO8VME9#TD,@H@("`@:68@6R`B)%]?;&]C:V5D(B`]/2`B,2(@70H@ -M("`@=&AE;@H@("`@("`@(')M("1?7TQ/0TM&24Q%"B`@("!F:0I]"@HC(')E -M;&5A&ET('9A;'5E"B,@ -M)#(@;&]C:R!F:6QE;F%M90HC("0S(&QO8VME9"@Q*2!OF4]8&EP(&%D9'(@2!O9B!T:&4@3&EC96YS92!A=`HC -M"B,@("!H='1P.B\O=W=W+F%P86-H92YO2!A<'!L:6-A8FQE(&QA=R!O'!R97-S(&]R(&EM<&QI960N("!3964@ -M=&AE($QI8V5N7,O8VQA;65T82UD871A+R@N*UM>+UTI+S\D("`N+B]M -M971A9&%T82\E>U)%34]415]!1$12?2\D,2!;3"Q.0RQ14T%="@HC:'1T<#HO -M+SQR;W5T97))4#XO;&%T97-T+V9O;R!A;F0@+BXN+V9O;R\@*'EI96QD(&UE -M=&%D871A+R1)4"]F;V\I"B-A2UZ;VYE+S\D("`N+B]M971A9&%T82\E>U)%34]415]! -M1$12?2]A=F%I;&%B:6QI='DM>F]N92!;3"Q.0RQ14T%="E)E=W)I=&52=6QE -M(%YC;&]U9"UI9&5N=&EF:65R+S\D("`N+B]M971A9&%T82\E>U)%34]415]! -M1$12?2]C;&]U9"UI9&5N=&EF:65R(%M,+$Y#+%%305T*4F5WU)%34]415]!1$12?2]I -M;G-T86YC92UI9"!;3"Q.0RQ14T%="E)E=W)I=&52=6QE(%YL;V-A;"UH;W-T -M;F%M92\_)"`@+BXO;65T861A=&$O)7M214U/5$5?041$4GTO;&]C86PM:&]S -M=&YA;64@6TPL3D,L45-!70I297=R:71E4G5L92!>;&]C86PM:7!V-"\_)"`@ -M+BXO;65T861A=&$O)7M214U/5$5?041$4GTO;&]C86PM:7!V-"!;3"Q.0RQ1 -M4T%="E)E=W)I=&52=6QE(%YP=6)L:6,M:&]S=&YA;64O/R0@("XN+VUE=&%D -M871A+R5[4D5-3U1%7T%$1%)]+W!U8FQI8RUH;W-T;F%M92!;3"Q.0RQ14T%= -M"E)E=W)I=&52=6QE(%YP=6)L:6,M:7!V-"\_)"`@+BXO;65T861A=&$O)7M2 -M14U/5$5?041$4GTO<'5B;&EC+6EP=C0@6TPL3D,L45-!70I297=R:71E4G5L -M92!><'5B;&EC+6ME>7,O/R0@("XN+VUE=&%D871A+R5[4D5-3U1%7T%$1%)] -M+W!U8FQI8RUK97ES(%M,+$Y#+%%305T*4F5W=FTM:60O/R0@ -M("XN+VUE=&%D871A+R5[4D5-3U1%7T%$1%)]+W9M+6ED(%M,+$Y#+%%305T* -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````=F%R+W=W=R]H=&UL+W5S97)D871A+P`` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````````#`P,#`W-34`,#`P,3/dev/null 2>&1 || ${echo} 'cloud_scripts/usr/share/cloud/cloud-scripts.tar': 'MD5 check failed' - ) << \SHAR_EOF -6c9c71f04c38fbbe6031c09a732f525d cloud_scripts/usr/share/cloud/cloud-scripts.tar -SHAR_EOF - -else -test `LC_ALL=C wc -c < 'cloud_scripts/usr/share/cloud/cloud-scripts.tar'` -ne 696320 && \ - ${echo} "restoration warning: size of 'cloud_scripts/usr/share/cloud/cloud-scripts.tar' is not 696320" - fi -fi -if rm -fr ${lock_dir} -then ${echo} "x - removed lock directory ${lock_dir}." -else ${echo} "x - failed to remove lock directory ${lock_dir}." - exit 1 -fi -exit 0