blob: 3f0447583117c3395f68536c8b714e395eb451f9 [file] [log] [blame]
#!/bin/sh
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
if grep -q '^ok$' "$1" 2>/dev/null; then
kill -TERM $PPID;
fi
if ! grep -q '^first-fail$' "$1" 2>/dev/null; then
echo 'first-fail' > "$1"
exit 1
fi
echo 'ok' >> "$1"
exit 0