From 7da45d65be36d36b880cc55c5036e96c24b53f00 Mon Sep 17 00:00:00 2001 From: Qiaowei Ren Date: Thu, 1 Mar 2018 14:38:11 +0800 Subject: remove ceph code This patch removes initial ceph code, due to license issue. Change-Id: I092d44f601cdf34aed92300fe13214925563081c Signed-off-by: Qiaowei Ren --- src/ceph/qa/nightlies/cron_wrapper | 53 -------------------------------------- 1 file changed, 53 deletions(-) delete mode 100755 src/ceph/qa/nightlies/cron_wrapper (limited to 'src/ceph/qa/nightlies') diff --git a/src/ceph/qa/nightlies/cron_wrapper b/src/ceph/qa/nightlies/cron_wrapper deleted file mode 100755 index ced5a32..0000000 --- a/src/ceph/qa/nightlies/cron_wrapper +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -# /nightlies/cron_wrapper.sh - -# check for no argument case and stop -if [ -z $1 ]; then - echo "need argument" - exit 1 -fi - -# set permanent $LOG file var -LOG="/var/log/crontab-nightlies-log/crontab.log" -# set $LOG_LOCKED_ERR in case locking failed -LOG_LOCK_ERR="/var/log/crontab-nightlies-log/crontab_lock_problem.$$" - -# temp files to store stdout and stderr -# named with the PID of this script in their name so they'll be unique -STDERR="/var/tmp/stderr.$$" -STDOUT="/var/tmp/stdout.$$" - -# $STDOUT and $STDERR are removed when the script exits for any reason -trap "rm -f $STDOUT $STDERR" 0 - -# run a command from this script's argument -# redirect stdout to $STDOUT file and redirect stderr to $STDERR file - -DATE=$(date) -echo -n "$DATE: " >> $STDOUT -echo "Running command: $@" >> $STDOUT -"$@" > $STDOUT 2> $STDERR - -# get return code from the command run -code=$? - -if [ $code != 0 ] ; then - # echoing to stdout/stderr makes cron send email - echo "stdout:" - cat $STDOUT - echo "stderr:" - cat $STDERR -else - # normal exit: just log stdout - - # lock $LOG with file descriptor 200 - exec 200>>$LOG - # if $LOG is locked by other process - wait for 20 sec - flock -w 20 200 || LOG=$LOG_LOCK_ERR - echo "stdout:" >> $LOG - cat $STDOUT >> $LOG - echo "stderr:" >> $LOG - cat $STDERR >> $LOG - # unlock - flock -u 200 -fi -- cgit 1.2.3-korg