From owner-svn-src-stable-10@FreeBSD.ORG Thu May 21 13:42:39 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28AFE93B; Thu, 21 May 2015 13:42:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 092931F43; Thu, 21 May 2015 13:42:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LDgcXx008995; Thu, 21 May 2015 13:42:38 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LDgcTb008991; Thu, 21 May 2015 13:42:38 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505211342.t4LDgcTb008991@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 May 2015 13:42:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283242 - in stable/10: etc etc/autofs usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 13:42:39 -0000 Author: trasz Date: Thu May 21 13:42:37 2015 New Revision: 283242 URL: https://svnweb.freebsd.org/changeset/base/283242 Log: MFC r279955: Add -noauto autofs map, for automatic handling of fstab entries marked "noauto". Relnotes: yes Sponsored by: The FreeBSD Foundation Added: stable/10/etc/autofs/special_noauto - copied unchanged from r279955, head/etc/autofs/special_noauto Modified: stable/10/etc/auto_master stable/10/etc/autofs/Makefile stable/10/usr.sbin/autofs/auto_master.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/auto_master ============================================================================== --- stable/10/etc/auto_master Thu May 21 13:41:08 2015 (r283241) +++ stable/10/etc/auto_master Thu May 21 13:42:37 2015 (r283242) @@ -6,3 +6,4 @@ # When using the -media special map, make sure to edit devd.conf(5) # to move the call to "automount -c" out of the comments section. #/media -media -nosuid +#/- -noauto Modified: stable/10/etc/autofs/Makefile ============================================================================== --- stable/10/etc/autofs/Makefile Thu May 21 13:41:08 2015 (r283241) +++ stable/10/etc/autofs/Makefile Thu May 21 13:42:37 2015 (r283242) @@ -1,6 +1,6 @@ # $FreeBSD$ -FILES= include_ldap special_hosts special_media special_null +FILES= include_ldap special_hosts special_media special_noauto special_null NO_OBJ= FILESDIR= /etc/autofs Copied: stable/10/etc/autofs/special_noauto (from r279955, head/etc/autofs/special_noauto) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/etc/autofs/special_noauto Thu May 21 13:42:37 2015 (r283242, copy of r279955, head/etc/autofs/special_noauto) @@ -0,0 +1,29 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +print_available() { + sed 's/#.*//' /etc/fstab | awk '$4 ~ /noauto/ { print $2 }' +} + +print_one() { + local _mntpoint + + _mntpoint="${1%/}" + + sed 's/#.*//' /etc/fstab | awk ' + $2 == "'"${_mntpoint}"'" && $4 ~ /noauto/ { + if ($1 ~ /:/) { dev=$1 } else { dev=":"$1 } + print "-fstype=" $3 "," $4, dev + }' +} + +if [ $# -eq 0 ]; then + print_available + exit 0 +fi + +print_one "$1" +exit 0 + Modified: stable/10/usr.sbin/autofs/auto_master.5 ============================================================================== --- stable/10/usr.sbin/autofs/auto_master.5 Thu May 21 13:41:08 2015 (r283241) +++ stable/10/usr.sbin/autofs/auto_master.5 Thu May 21 13:42:37 2015 (r283242) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 9, 2015 +.Dd March 13, 2015 .Dt AUTO_MASTER 5 .Os .Sh NAME @@ -260,6 +260,11 @@ when they are automatically created. .It Li -media Query devices that are not yet mounted, but contain valid filesystems. Generally used to access files on removable media. +.It Li -noauto +Mount filesystems configured in +.Xr fstab 5 +as "noauto". +This needs to be set up as a direct map. .It Li -null Prevent .Xr automountd 8