From owner-freebsd-current Thu May 7 11:34:02 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA04665 for freebsd-current-outgoing; Thu, 7 May 1998 11:34:02 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from mail.westbend.net (ns1.westbend.net [207.217.224.194]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA04587 for ; Thu, 7 May 1998 11:33:42 -0700 (PDT) (envelope-from hetzels@westbend.net) Received: from admin (admin.westbend.net [207.217.224.195]) by mail.westbend.net (8.8.8/8.8.8) with SMTP id NAA25721 for ; Thu, 7 May 1998 13:33:42 -0500 (CDT) (envelope-from hetzels@westbend.net) Message-ID: <013501bd79e6$f601e440$c3e0d9cf@admin.westbend.net> From: "Scot W. Hetzel" To: "FreeBSD-Current" Subject: Periodic file for CVSup Date: Thu, 7 May 1998 13:35:50 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.2106.4 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I just created the script bellow that can be used update a server on a daily, weekly, or monthly basis. Depending on where it is installed into the /etc/periodic directory tree. To determine the SUP program, SUP flags, and SUP file, the script obtains these values from the make.conf file. Any suggestions for improvements. Scot W. Hetzel NOTE: The make.conf file has to be parsed, as using ". /etc/make.conf" to bring the values in doesn't work. ---- 998.cvsup ---- #!/bin/sh - if [ -f /etc/make.conf ] ; then SUP_UPDATE=`grep SUP_UPDATE= /etc/make.conf | grep -v "#SUP_UPDATE=" | awk '{print $2}'` if [ "${SUP_UPDATE}" = "yes" ] ; then #Get the variables SUP, SUPFLAGS, SUPFILE from the make.conf file SUP=`grep SUP= /etc/make.conf | grep -v "#SUP=" | awk '{print $2}'` SUPFLAGS=`grep SUPFLAGS= /etc/make.conf | grep -v "#SUPFLAGS=" | awk -F= '{print $2}'` SUPFILE=`grep SUPFILE= /etc/make.conf | grep -v "#SUPFILE=" | awk '{print $2}'` #Check type of update we are performing case `basename \`pwd\`` in daily) PERIOD="Daily";; weekly) PERIOD="Weekly";; monthly) PERIOD="Monthly";; esac #Are we doing a CVSup or a Sup Update case `basename ${SUP}` in cvsup) CVSUP="CVSup";; sup) CVSUP="Sup";; esac echo "" echo "${PERIOD} ${CVSUP} Update:" ${SUP} ${SUPFLAGS} ${SUPFILE} fi fi ---- 998.cvsup ---- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message