4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
22 md5sum $(find / ! -path "/tmp/*" -executable -type f) > /root/binary_checksum.md5
23 sha256sum $(find / ! -path "/tmp/*" -executable -type f) > /root/binary_checksum.sha256
25 # Remove checksum that has been modified during deployment
26 changed_checksums=( "resolv.conf" "mariadb.sg" "rabbitmq-server.sg" "audit.rules" "influxdb.conf" "influxdb-1" )
27 for checksum in ${changed_checksums[@]}
29 sed -i "/${checksum}/d" /root/binary_checksum.md5
30 sed -i "/${checksum}/d" /root/binary_checksum.sha256
33 # Add checksums that will be added during deployment
35 "/etc/openstack-dashboard/enabled/_2200_ironic.py" \
36 "/etc/openstack-dashboard/enabled/_2200_ironic.pyc" \
37 "/etc/openstack-dashboard/enabled/_2200_ironic.pyo" \
38 "/etc/openstack-dashboard/local_settings" \
39 "/etc/openstack-dashboard/nova_policy.json" \
40 "/etc/openstack-dashboard/neutron_policy.json" \
41 "/etc/openstack-dashboard/keystone_policy.json" \
42 "/etc/openstack-dashboard/glance_policy.json" \
43 "/etc/openstack-dashboard/cinder_policy.json" \
44 "/etc/openstack-dashboard/cinder_policy.d/consistencygroup.yaml" \
45 "/etc/openstack-dashboard/nova_policy.d/api-extensions.yaml" \
47 for f in ${checksums_to_add[@]}; do
49 md5sum ${f} >> /root/binary_checksum.md5
50 sha256sum ${f} >> /root/binary_checksum.sha256
54 # Include docker images
55 docker_images=$( find /var/lib/crf-images/docker-images/infra/ -type f ) || :
56 if [ -n "${docker_images}" ]; then
57 md5sum ${docker_images} >> /root/binary_checksum.md5
58 sha256sum ${docker_images} >> /root/binary_checksum.sha256
61 # Sort the checksum files
62 sort -k2 -o /root/binary_checksum.md5 /root/binary_checksum.md5
63 sort -k2 -o /root/binary_checksum.sha256 /root/binary_checksum.sha256