diskimage-builder/elements/svc-map/extra-data.d/11-copy-svc-map-file
Jan Grant e88be20f1d Fix race in svc-map
The construction of the combined svc-map-services file uses the host's
/tmp directory to store a work-in-progress file. That file's left behind
after it's done with.

There's a potential race here; together with problems that may arise
if two users attempt to run devtest on the same system.

This patch fixes this by creating the temporary file specifically under
$TMP_MOUNT_PATH.

Change-Id: Iecbdc583e37bed542249c316919c3712c28c7440
2015-03-03 15:29:52 -08:00

6 lines
162 B
Bash
Executable File

#!/bin/bash
set -eux
set -o pipefail
sudo install -D -o root -g root -m 0644 "$TMP_MOUNT_PATH/tmp/svc-map-services" "$TMP_MOUNT_PATH/usr/share/svc-map/services"