From owner-freebsd-questions@FreeBSD.ORG Sun Jun 22 09:13:19 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B46A3106567A for ; Sun, 22 Jun 2008 09:13:19 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr1.xs4all.nl (smtp-vbr1.xs4all.nl [194.109.24.21]) by mx1.freebsd.org (Postfix) with ESMTP id 3FBCD8FC17 for ; Sun, 22 Jun 2008 09:13:18 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr1.xs4all.nl (8.13.8/8.13.8) with ESMTP id m5M9DH9j035987; Sun, 22 Jun 2008 11:13:17 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id 5E79ABA9A; Sun, 22 Jun 2008 11:13:15 +0200 (CEST) Date: Sun, 22 Jun 2008 11:13:15 +0200 From: Roland Smith To: RW Message-ID: <20080622091315.GA43950@slackbox.xs4all.nl> References: <200806212144.09925.heroh@gmx.de> <20080621224731.GA26997@slackbox.xs4all.nl> <20080622002207.7fc1f697@gumby.homeunix.com.> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UugvWAfsgieZRqgk" Content-Disposition: inline In-Reply-To: <20080622002207.7fc1f697@gumby.homeunix.com.> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: freebsd-questions@freebsd.org Subject: Re: shellscript conditional to check for external disk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2008 09:13:19 -0000 --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 22, 2008 at 12:22:07AM +0100, RW wrote: > On Sun, 22 Jun 2008 00:47:31 +0200 > Roland Smith wrote: >=20 >=20 > > Use glabel(8) to give the device an unique label. There is no telling > > which device /dev/da0s1d is pointing to! After labeling you can check > > for /dev//, which should be unique. >=20 > I think that should be: >=20 > /dev/label/ That is only for non-filesystem labels, according to glabel(8): "This class also provides volume label detection for file systems. Tho= se labels cannot be set with glabel, but must be set with the appropriate file system utility, e.g. for UFS the file system label is set with tunefs(8). Currently supported file systems are: o UFS1 (directory /dev/ufs/). o UFS2 (directory /dev/ufs/). o MSDOSFS (FAT12, FAT16, FAT32) (directory /dev/msdosfs/). o CD ISO9660 (directory /dev/iso9660/). o EXT2FS (directory /dev/ext2fs/). o REISERFS (directory /dev/reiserfs/). o NTFS (directory /dev/ntfs/). Non file-system labels are created in the directory /dev/label/." Roland --=20 R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --UugvWAfsgieZRqgk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkheF6oACgkQEnfvsMMhpyVWfQCgk57UgINaGPCXJ1HhIMHk0H0G O6kAoIZe8arsuaTQDCeRYVNU/6FM40ck =m8DD -----END PGP SIGNATURE----- --UugvWAfsgieZRqgk--