1 #!/bin/sh 2 # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. 3 # Use of this source code is governed by a BSD-style license that can be 4 # found in the LICENSE file. 5 . $(dirname $0)/time.sh 6 7 if grep -q '^ok$' "$1" 2>/dev/null; then 8 # Take down tlsdated 9 kill -TERM $PPID 10 exit 1 11 fi 12 13 if ! grep -q '^first-fail$' "$1" 2>/dev/null; then 14 echo 'first-fail' > "$1" 15 exit 2 16 fi 17 18 echo 'ok' >> "$1" 19 print_time $(date +%s) 20 exit 0 21