From owner-freebsd-questions Thu Nov 8 1:37:45 2001 Delivered-To: freebsd-questions@freebsd.org Received: from sunny.pacific.net.sg (sunny.pacific.net.sg [203.120.90.127]) by hub.freebsd.org (Postfix) with ESMTP id 9F7E637B41F for ; Thu, 8 Nov 2001 01:37:42 -0800 (PST) Received: from smtp1.pacific.net.sg (smtp1.pacific.net.sg [203.120.90.70]) by sunny.pacific.net.sg with ESMTP id fA89bQi21686 for ; Thu, 8 Nov 2001 17:37:26 +0800 (SGT) Received: from ap_280868.pacific.net.sg ([203.208.143.98]) by smtp1.pacific.net.sg with ESMTP id fA89bOl06398 for ; Thu, 8 Nov 2001 17:37:24 +0800 Message-Id: <5.1.0.14.0.20011108173601.00a49bc0@po.pacific.net.sg> X-Sender: nchee_hoong@po.pacific.net.sg X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Thu, 08 Nov 2001 17:43:42 +0800 To: freebsd-questions@FreeBSD.ORG From: Kelvin Ng Chee Hoong Subject: rc.shutdown Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi ; I have created rc.shutdown directory in /usr/local/etc , and put a sample script under rc.shutdown directory in order to command the system execute the script first before it is going to reboot . But somehow , it doesn't work . What happened ? My sample script is as follow ... LOCALETC=/usr/local/etc messages='The system has been rebooted, so the MRTG program is rerunning' if [ -f $LOCALETC/mrtg/cisco7000.pid ]; then rm -f $LOCALETC/mrtg/cisco7000.pid echo $messages | mail -s "Restart MRTG daemon" abc@defasddd.com fi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message