From owner-freebsd-current Sun Mar 5 11:27:48 2000 Delivered-To: freebsd-current@freebsd.org Received: from funkthat.com (adsl-63-195-54-213.dsl.snfc21.pacbell.net [63.195.54.213]) by hub.freebsd.org (Postfix) with ESMTP id 7E57E37BAB7; Sun, 5 Mar 2000 11:27:42 -0800 (PST) (envelope-from gurney_j@efn.org) Received: (from jmg@localhost) by funkthat.com (8.9.3/8.8.7) id LAA53977; Sun, 5 Mar 2000 11:26:58 -0800 (PST) Message-ID: <20000305112658.59344@hydrogen.funkthat.com> Date: Sun, 5 Mar 2000 11:26:58 -0800 From: John-Mark Gurney To: Lauri Laupmaa Cc: scsi@FreeBSD.ORG, current@FreeBSD.ORG Subject: plist/glist query & proposal Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.69 Reply-To: John-Mark Gurney Organization: Cu Networking X-Operating-System: FreeBSD 3.4-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Doug White forwarded this message to me.... I actually have done this but I have not cleaned the code up for committing to the tree... I have been running this code for over a half year now... if people want, I can comitte this as is, but I'm using old daily routines on my box, not the newer ones... bak=/var/backups echo "" echo "" echo "checking disks for defects:" for i in `camcontrol devlist | awk '/(da|sd)/ { if (match($0, "(da|sd)[[:digit:]]+") != 0) { diskname = substr($0, RSTART, RLENGTH); match(diskname, "[[:digit:]]+"); print substr(diskname, RSTART, RLENGTH) } }' | sort -u`; do if [ -f ${bak}/da${i}.glist ]; then mv ${bak}/da${i}.glist ${bak}/da${i}.glist.bak fi echo -n "da${i}: " camcontrol defects -u $i -f phys -G 2>&1 > ${bak}/da${i}.glist if [ -f ${bak}/da${i}.glist.bak ]; then if ! cmp -s ${bak}/da${i}.glist ${bak}/da${i}.glist.bak; then diff ${bak}/da${i}.glist.bak ${bak}/da${i}.glist fi fi done -- John-Mark Gurney Voice: +1 408 975 9651 Cu Networking "The soul contains in itself the event that shall presently befall it. The event is only the actualizing of its thought." -- Ralph Waldo Emerson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message