From owner-freebsd-questions Fri Aug 29 00:08:28 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id AAA16250 for questions-outgoing; Fri, 29 Aug 1997 00:08:28 -0700 (PDT) Received: from murkwood.gaffaneys.com (dialup3.gaffaneys.com [208.155.161.53]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id AAA16242 for ; Fri, 29 Aug 1997 00:08:23 -0700 (PDT) Received: (from zach@localhost) by murkwood.gaffaneys.com (8.8.7/8.8.6) id IAA05950; Thu, 28 Aug 1997 08:55:10 -0500 (CDT) From: Zach Heilig Message-ID: <19970828085510.60034@gaffaneys.com> Date: Thu, 28 Aug 1997 08:55:10 -0500 To: questions@freebsd.org Subject: Is that floppy write-protected? Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.81 Sender: owner-freebsd-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Is it possible to determine if a floppy disk is write-protected from a script? If you happen to be staring at the console, it's pretty obvious for a person to determine what is happening, but I can't figure out how to tell from a script. If you mount a write-protected flopp, and remove a file on it, the script can't tell if the file was really removed or not (it sure looks like it was removed from the scripts point of view). I know I could unmount the floppy, remount it, and test if the files are really gone, but then /var/log/messages becomes full of needless write-protected floppy errors. This is what I ended up doing, but it would be nice if there were a better solution. -- Zach Heilig (zach@gaffaneys.com)