From ddbb426655b95094d86d419c6051ae026b5543d9 Mon Sep 17 00:00:00 2001 From: Aneesh Agrawal Date: Thu, 8 Feb 2018 22:23:45 -0800 Subject: [PATCH] Note down who created tmp saltfs clone and when --- salt/files/master/ADMIN_README | 3 +++ salt/files/master/setup.sh | 14 +++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/salt/files/master/ADMIN_README b/salt/files/master/ADMIN_README index 2948ac81..460092b0 100644 --- a/salt/files/master/ADMIN_README +++ b/salt/files/master/ADMIN_README @@ -19,3 +19,6 @@ so it is important to follow a few guidelines: - There is only one of these folders, so if it's already in use, wait until it is empty again before testing your change. + You can look at the CLONER file inside the clone to see who + created the clone and at what time they did so. + Note that the timestamp is in UTC. diff --git a/salt/files/master/setup.sh b/salt/files/master/setup.sh index e19689c3..844cb91a 100644 --- a/salt/files/master/setup.sh +++ b/salt/files/master/setup.sh @@ -4,4 +4,16 @@ set -o errexit set -o nounset set -o pipefail -exec git clone https://github.com/servo/saltfs.git + +main() { + if (( $# != 1)); then + printf 'usage: %s \n' "${0}" + return 1 + fi + + git clone https://github.com/servo/saltfs.git + echo "${1} @ $(date --utc --iso-8601=seconds)" > saltfs/CLONER +} + + +main "$@"