From owner-svn-soc-all@FreeBSD.ORG Wed Jun 13 16:19:22 2012 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id B78A0106564A for ; Wed, 13 Jun 2012 16:19:20 +0000 (UTC) (envelope-from tzabal@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Wed, 13 Jun 2012 16:19:20 +0000 Date: Wed, 13 Jun 2012 16:19:20 +0000 From: tzabal@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20120613161920.B78A0106564A@hub.freebsd.org> Cc: Subject: socsvn commit: r237614 - in soc2012/tzabal/server-side/akcrs-release/9.0.0: etc/rc.d usr.sbin/crashreportd X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jun 2012 16:19:23 -0000 Author: tzabal Date: Wed Jun 13 16:19:20 2012 New Revision: 237614 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=237614 Log: Upload changes for the crashreportd daemon. Modified: soc2012/tzabal/server-side/akcrs-release/9.0.0/etc/rc.d/crashreportd soc2012/tzabal/server-side/akcrs-release/9.0.0/usr.sbin/crashreportd/crashreportd.sh Modified: soc2012/tzabal/server-side/akcrs-release/9.0.0/etc/rc.d/crashreportd ============================================================================== --- soc2012/tzabal/server-side/akcrs-release/9.0.0/etc/rc.d/crashreportd Wed Jun 13 15:25:52 2012 (r237613) +++ soc2012/tzabal/server-side/akcrs-release/9.0.0/etc/rc.d/crashreportd Wed Jun 13 16:19:20 2012 (r237614) @@ -9,8 +9,13 @@ name="crashreportd" rcvar="crashreportd_enable" command="/usr/sbin/${name}" -# Check if this is correct, taken from sshd rc.d script -pidfile="/var/run/${name}.pid" +command_args="0<&- 1>/dev/null 2>&1 &" +#pidfile="/var/run/${name}.pid" load_rc_config $name run_rc_command "$1" + +# FIX: Make the rc.d script to support all the default arguments. +# Work: start, rcvar +# Not work: stop, restart, status, (poll?) +# Check with: ps ux | grep crashreportd \ No newline at end of file Modified: soc2012/tzabal/server-side/akcrs-release/9.0.0/usr.sbin/crashreportd/crashreportd.sh ============================================================================== --- soc2012/tzabal/server-side/akcrs-release/9.0.0/usr.sbin/crashreportd/crashreportd.sh Wed Jun 13 15:25:52 2012 (r237613) +++ soc2012/tzabal/server-side/akcrs-release/9.0.0/usr.sbin/crashreportd/crashreportd.sh Wed Jun 13 16:19:20 2012 (r237614) @@ -1,3 +1,18 @@ #!/bin/sh -echo 'Inside /usr/sbin/crashreportd.' +interval=10 +#reportsdir="/home/reporter" +#echo "`whoami` is executing /usr/sbin/crashreportd" +dfile="/home/tzabal/dfile" +touch ${dfile} + +count=1 +while : ; do + #reports=`echo "${reportsdir}/*"` + #for report in ${reports}; do + # echo "report = ${report}" + #done + echo "pass ${count}" >> ${dfile} + count=$((count+1)) + sleep ${interval} +done