From owner-freebsd-scsi Fri Jun 14 10:38:40 2002 Delivered-To: freebsd-scsi@freebsd.org Received: from david.siemens.de (david.siemens.de [192.35.17.14]) by hub.freebsd.org (Postfix) with ESMTP id 434D837B40A for ; Fri, 14 Jun 2002 10:38:34 -0700 (PDT) Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by david.siemens.de (8.11.6/8.11.6) with ESMTP id g5EHcWo13385; Fri, 14 Jun 2002 19:38:33 +0200 (MEST) Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.42.7]) by mail1.siemens.de (8.11.6/8.11.6) with ESMTP id g5EHcWi12116; Fri, 14 Jun 2002 19:38:32 +0200 (MEST) Received: (from localhost) by curry.mchp.siemens.de (8.12.2/8.12.3) id g5EHcW7i081035; Date: Fri, 14 Jun 2002 19:38:30 +0200 From: Andre Albsmeier To: "Kenneth D. Merry" Cc: Andre Albsmeier , freebsd-scsi@FreeBSD.ORG Subject: Re: Editing modepages via script Message-ID: <20020614193830.A18511@curry.mchp.siemens.de> References: <20020614132800.A17519@curry.mchp.siemens.de> <20020614075942.A56232@panzer.kdm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020614075942.A56232@panzer.kdm.org>; from ken@kdm.org on Fri, Jun 14, 2002 at 07:59:42AM -0600 X-Echelon: BND CIA NSA Mossad KGB MI6 IRA detonator nuclear assault strike X-RAVMilter-Version: 8.3.1(snapshot 20020109) (curry.mchp.siemens.de) Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Fri, 14-Jun-2002 at 07:59:42 -0600, Kenneth D. Merry wrote: > On Fri, Jun 14, 2002 at 13:28:00 +0200, Andre Albsmeier wrote: > > I would like to modify a modepage entry with a script (depending > > on various things). I think camcontrol can only pass modepages > > to vi for editing. What I would like to do is something like: > > > > camcontrol modepage sa0 -m 15 -P 0 | sed -e some_stuff | camcontrol modepage sa0 -m 15 -P 0 > > > > I don't want to use "camcontrol cmd ..." for it. Any hints? > > The work that Kelly Yancy did a while back to make camcontrol modepage > scriptable, among other things, should do the trick. You can do things > like: > > echo "WCE: 1" | camcontrol modepage da3 -m 8 -e Thanks! I tried a echo "Data Compression Enabled: 0" | camcontrol modepage sa0 -m 15 -P 0 -e and it worked great. This is better than my hack replacing EDITOR with some script that changed what I wanted. Thanks again for the hint, -Andre To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message