From owner-freebsd-stable@FreeBSD.ORG Mon Feb 27 20:52:33 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEED21065753 for ; Mon, 27 Feb 2012 20:52:33 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from fsm1.ukr.net (fsm1.ukr.net [195.214.192.120]) by mx1.freebsd.org (Postfix) with ESMTP id 76D108FC0C for ; Mon, 27 Feb 2012 20:52:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=fsm; h=Content-Transfer-Encoding:Content-Type:Mime-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=jpDuR2OdCCarM2D54VtrcK5P//Vf3LFuXFClH8Xl7ZY=; b=K1uEOAKPBQVlY7ol8c6Ghyen8XG5cQhIb4dU/54upR6fKgIX6BtBNbQgTeOK4221KfUsBrxlSy5Mko5rNvXiDIqsHvseKQL1KWz7jnuisFQYwWxrYjWXhcmlNhHyia9T6qY8zYmy/KdQjM7YhtVdbqb2LpKa9p/xTipIJkQCBVY=; Received: from [178.137.138.140] (helo=nonamehost.) by fsm1.ukr.net with esmtpsa ID 1S27YM-000Elh-Mx ; Mon, 27 Feb 2012 22:52:14 +0200 Date: Mon, 27 Feb 2012 22:52:13 +0200 From: Ivan Klymenko To: vermaden Message-ID: <20120227225213.426e64da@nonamehost.> In-Reply-To: References: <4F3EE186.4020801@gmail.com> <201202181409.08859.hselasky@c2i.net> <20120226203949.H89643@sola.nimnet.asn.au> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Hans Petter Selasky , freebsd-stable@freebsd.org, smithi@nimnet.asn.au, lars.engels@0x20.net Subject: Re: devd based AUTOMOUNTER X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Feb 2012 20:52:33 -0000 > > Unfortunately, I spent a few days that would > > have to understand how it is possible to > > detect the inserted CD-ROM with devd; but > > alas - the only thing that detects changes > > in the drive CD-ROM - a :sysctl kern.geom.conftxt > > > > before inserting the disc: > > kern.geom.conftxt: 0 DISK cd0 0 2048 hd 0 sc 0 > > ... > > > > after inserting the disc: > > kern.geom.conftxt: 0 DISK cd0 4700372992 2048 hd 0 sc 0 > > Thanks, at least we have 'something' we can cepend on. > > I can create an 'active wait' daemon for that, like the skel below: > > while sleep 3 > do > case $( sysctl -n kern.geom.conftxt ) in > (0 DISK cd0 0 2048 hd 0 sc 0) > echo "No CD in the drive ..." > # umount procedure ... > ;; > (0 DISK cd0 * * hd 0 sc 0) > echo "We have CD here!" > # do something about it lile mount_cd9660 > ;; > esac > done > unfortunately it will not work properly because the value will only change, but will never be equal to "0" after inserting the first CD-ROM drive. :( > But a devd(8) event would be far better, certainly > maybe some somple commit to > devd(8) would help here? My knowledge does not allow me to add these > bits to devd(8). >