Index: head/etc/auto_master =================================================================== --- head/etc/auto_master (revision 337339) +++ head/etc/auto_master (nonexistent) @@ -1,9 +0,0 @@ -# $FreeBSD$ -# -# Automounter master map, see auto_master(5) for details. -# -/net -hosts -nobrowse,nosuid,intr -# 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,noatime -#/- -noauto Property changes on: head/etc/auto_master ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/etc/autofs/special_media =================================================================== --- head/etc/autofs/special_media (revision 337339) +++ head/etc/autofs/special_media (nonexistent) @@ -1,136 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# Print newline-separated list of devices available for mounting. -# If there is a filesystem label - use it, otherwise use device name. -print_available() { - local _fstype _fstype_and_label _label _p - - for _p in ${providers}; do - _fstype_and_label="$(fstyp -l "/dev/${_p}" 2> /dev/null)" - if [ $? -ne 0 ]; then - # Ignore devices for which we were unable - # to determine filesystem type. - continue - fi - - _fstype="${_fstype_and_label%% *}" - if [ "${_fstype}" != "${_fstype_and_label}" ]; then - _label="${_fstype_and_label#* }" - # Replace plus signs and slashes with minuses; - # leading plus signs have special meaning in maps, - # and multi-component keys are just not supported. - _label="$(echo ${_label} | sed 's,[+/],-,g')" - echo "${_label}" - continue - fi - - echo "${_p}" - done -} - -# Print a single map entry. -print_map_entry() { - local _fstype _p - - _fstype="$1" - _p="$2" - - case "${_fstype}" in - "exfat") - if [ -f "/usr/local/sbin/mount.exfat" ]; then - echo "-mountprog=/usr/local/sbin/mount.exfat,fstype=${_fstype},nosuid :/dev/${_p}" - else - /usr/bin/logger -p info -t "special_media[$$]" \ - "Cannot mount ${_fstype} formatted device /dev/${_p}: Install sysutils/fusefs-exfat first" - exit 1 - fi - ;; - "ntfs") - if [ -f "/usr/local/bin/ntfs-3g" ]; then - echo "-mountprog=/usr/local/bin/ntfs-3g,fstype=${_fstype},nosuid :/dev/${_p}" - else - /usr/bin/logger -p info -t "special_media[$$]" \ - "Cannot mount ${_fstype} formatted device /dev/${_p}: Install sysutils/fusefs-ntfs first" - exit 1 - fi - ;; - "ext2fs" | "msdosfs") - echo "-fstype=${_fstype},nosuid,async :/dev/${_p}" - ;; - *) - echo "-fstype=${_fstype},nosuid :/dev/${_p}" - ;; - esac -} - -# Determine map entry contents for the given key and print out the entry. -print_one() { - local _fstype _fstype_and_label _label _key _p - - _key="$1" - - _fstype="$(fstyp "/dev/${_key}" 2> /dev/null)" - if [ $? -eq 0 ]; then - print_map_entry "${_fstype}" "${_key}" - return - fi - - for _p in ${providers}; do - _fstype_and_label="$(fstyp -l "/dev/${_p}" 2> /dev/null)" - if [ $? -ne 0 ]; then - # Ignore devices for which we were unable - # to determine filesystem type. - continue - fi - - _fstype="${_fstype_and_label%% *}" - if [ "${_fstype}" = "${_fstype_and_label}" ]; then - # No label, try another device. - continue - fi - - _label="${_fstype_and_label#* }" - # Replace plus signs and slashes with minuses; - # leading plus signs have special meaning in maps, - # and multi-component keys are just not supported. - _label="$(echo ${_label} | sed 's,[+/],-,g')" - if [ "${_label}" != "${_key}" ]; then - # Labels don't match, try another device. - continue - fi - - print_map_entry "${_fstype}" "${_p}" - done - - # No matching device - don't print anything, autofs will handle it. -} - -# Obtain a list of (geom-provider-name, access-count) pairs, turning this: -# -# z0xfffff80005085d00 [shape=hexagon,label="ada0\nr2w2e3\nerr#0\nsector=512\nstripe=0"]; -# -# Into this: -# -# ada0 r2w2e3 -# -# XXX: It would be easier to use kern.geom.conftxt instead, but it lacks -# access counts. -pairs=$(sysctl kern.geom.confdot | sed -n 's/^.*hexagon,label="\([^\]*\)\\n\([^\]*\).*/\1 \2/p') - -# Obtain a list of GEOM providers that are not already open - not mounted, -# and without other GEOM class, such as gpart, attached. In other words, -# grep for "r0w0e0". Skip providers with names containing slashes; we're -# not interested in geom_label(4) creations. -providers=$(echo "$pairs" | awk '$2 == "r0w0e0" && $1 !~ /\// { print $1 }') - -if [ $# -eq 0 ]; then - print_available - exit 0 -fi - -print_one "$1" -exit 0 - Property changes on: head/etc/autofs/special_media ___________________________________________________________________ Deleted: svn:executable ## -1 +0,0 ## -* \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/etc/autofs/include_nis_nullfs =================================================================== --- head/etc/autofs/include_nis_nullfs (revision 337339) +++ head/etc/autofs/include_nis_nullfs (nonexistent) @@ -1,180 +0,0 @@ -#!/usr/bin/awk -f -#- -# Copyright (c) 2017 G. Paul Ziemba -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# $FreeBSD$ -# - -# -# /etc/autofs/include_nis_nullfs -# -# automountd Directory Services script for NIS -# -# SYNOPSIS -# include_nis_nullfs -# -# include_nis_nullfs -# -# DESCRIPTION -# -# This script provides a Directory Services map for automountd -# based on NIS. Please see auto_master(5) for general information. -# -# The first form, with one argument, emits the entire named NIS map. -# The second form, with two arguments, emits the map entry for the -# key given in the second argument. -# -# This script attempts to determine the names and IP addresses -# of the local host. Map entries matching the local host are -# rewritten to specify nullfs mounts (instead of the default -# NFS) to reduce access overhead in the kernel. -# -# If a map entry contains multiple location fields, it is not changed. -# - - -# Populate list of names and IP addrs thet mean "this host" -# into myhostnames array -BEGIN { - # - # Set self hostnames - # - - "hostname -s" | getline; - myhostnames[$0] = 1; - - "hostname -f" | getline; - myhostnames[$0] = 1; - - myhostnames["localhost"] = 1 - - "hostname -f" | getline; - localdomain=$0 - myhostnames["localhost."localdomain] = 1 - - while ("ifconfig" | getline) { - if ($1 == "inet") { - myhostnames[$2] = 1; - } - } - - # debug -# print "--- hostname list start ----" -# for (i in myhostnames) { -# print i -# } -# print "--- hostname list end ----" - - if (ARGC == 2) { - # mapname only - while ("ypcat -k " ARGV[1] | getline) { - proc_mapline(1) - } - } - if (ARGC == 3) { - # mapname and keyname - while ("ypmatch " ARGV[2] " " ARGV[1] | getline) { - proc_mapline(0) - } - } - exit 0 -} - -function is_self(hostname) -{ - if (myhostnames[hostname]) { - return 1 - } - return 0 -} - -# -# Lines are of the form [key] [-opts] location1 [... locationN] -# -# indicate index of key field with first positional parameter -# 1 means keyfield is the first field -# 0 means keyfield is not present -# -function proc_mapline(keyfield) -{ - optionsfield = 0 - locationfield = 0 - locationcount = 0 - - for (i=keyfield+1; i <= NF; ++i) { - if (!optionsfield) { - if ($i ~ /^-/) { - # the first options field found on the line - optionsfield = i; - continue - } - } - # Assumption: location contains colon (":") - if (optionsfield && ($i ~ /:/) && ($i !~ /^-/)) { - ++locationcount - if (!locationfield) { - # the first location field found on the line - locationfield = i - } - } - } - - # - # If location not found, do not modify. - # - # If there is more than one location, do not modify. Rationale: - # Options are applied to all locations. We ca not have "nullfs" - # for only some locations and "nfs" for others for a given - # map key (i.e., a line). The usual reason for multiple - # locations is for redundancy using replicated volumes on - # multiple hosts, so multiple hosts imply fstype=nfs (the - # FreeBSD default for automounter maps). - # - # Hypothetically there could be a map entry with multiple - # locations all with host parts matching "me". In that case, - # it would be safe to rewrite the locations and specify - # nullfs, but the code does not handle this case. - # - if (locationcount == 1) { - # - # We have a line with exactly one location field - # - # Assumption: location has no more than one colon (":") - # - n=split($locationfield,location,":") - if (is_self(location[1])) { - $locationfield = ":" location[2] - if (optionsfield) { - # append to existing options - $optionsfield = $optionsfield ",fstype=nullfs" - } else { - # sneak in ahead of location - $locationfield = "-fstype=nullfs " $locationfield - } - } - } - - print -} Property changes on: head/etc/autofs/include_nis_nullfs ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/etc/autofs/special_noauto =================================================================== --- head/etc/autofs/special_noauto (revision 337339) +++ head/etc/autofs/special_noauto (nonexistent) @@ -1,29 +0,0 @@ -#!/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 - Property changes on: head/etc/autofs/special_noauto ___________________________________________________________________ Deleted: svn:executable ## -1 +0,0 ## -* \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/etc/autofs/special_hosts =================================================================== --- head/etc/autofs/special_hosts (revision 337339) +++ head/etc/autofs/special_hosts (nonexistent) @@ -1,17 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -if [ $# -eq 0 ]; then - out=`getent hosts` - [ $? -eq 0 ] || exit 1 - echo "$out" | awk '{ print $2 }' | sort -u - exit 0 -fi - -out=`showmount -E "$1"` -[ $? -eq 0 ] || exit 1 -echo "$out" | awk -v host="$1" \ - '{ printf "\"%s\"\t\"%s:%s\" ", $0, host, $0 } END { printf "\n" }' - Property changes on: head/etc/autofs/special_hosts ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/etc/autofs/special_null =================================================================== --- head/etc/autofs/special_null (revision 337339) +++ head/etc/autofs/special_null (nonexistent) @@ -1,4 +0,0 @@ -#!/usr/bin/true -# -# $FreeBSD$ -# Property changes on: head/etc/autofs/special_null ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/etc/autofs/include_nis =================================================================== --- head/etc/autofs/include_nis (revision 337339) +++ head/etc/autofs/include_nis (nonexistent) @@ -1,14 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -if [ -n "$2" ]; then - ypmatch $2 $1 - exit 0 -fi - -if [ -n "$1" ]; then - ypcat -k $1 - exit 0 -fi Property changes on: head/etc/autofs/include_nis ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/etc/autofs/include_ldap =================================================================== --- head/etc/autofs/include_ldap (revision 337339) +++ head/etc/autofs/include_ldap (nonexistent) @@ -1,55 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# Modify this to suit your needs. The "$1" is the map name, eg. "auto_master". -# To debug, simply run this script with map name as the only parameter. It's -# supposed to output map contents ("key location" pairs) to standard output. -SEARCHBASE="ou=$1,dc=example,dc=com" -ENTRY_ATTRIBUTE="cn" -VALUE_ATTRIBUTE="automountInformation" - -/usr/local/bin/ldapsearch -LLL -x -o ldif-wrap=no -b "$SEARCHBASE" "$ENTRY_ATTRIBUTE" "$VALUE_ATTRIBUTE" | awk ' -$1 == "'$ENTRY_ATTRIBUTE':" { - key = $2 -} - -$1 == "'$VALUE_ATTRIBUTE':" { - for (i = 2; i <= NF; i++) { - value[i] = $(i) - } - nvalues = NF - b64 = 0 -} - -# Double colon after attribute name means the value is in Base64. -$1 == "'$VALUE_ATTRIBUTE'::" { - for (i = 2; i <= NF; i++) { - value[i] = $(i) - } - nvalues = NF - b64 = 1 -} - -# Empty line - end of record. -NF == 0 && key != "" && nvalues > 0 { - printf "%s%s", key, OFS - for (i = 2; i < nvalues; i++) { - printf "%s%s", value[i], OFS - } - if (b64 == 1) { - printf "%s", value[nvalues] | "b64decode -rp" - close("b64decode -rp") - printf "%s", ORS - } else { - printf "%s%s", value[nvalues], ORS - } -} - -NF == 0 { - key = "" - nvalues = 0 - delete value -} -' Property changes on: head/etc/autofs/include_ldap ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/etc/autofs/Makefile =================================================================== --- head/etc/autofs/Makefile (revision 337339) +++ head/etc/autofs/Makefile (nonexistent) @@ -1,15 +0,0 @@ -# $FreeBSD$ - -FILES= include_ldap \ - include_nis \ - include_nis_nullfs \ - special_hosts \ - special_media \ - special_noauto \ - special_null - -NO_OBJ= -FILESDIR= /etc/autofs -FILESMODE= 755 - -.include Property changes on: head/etc/autofs/Makefile ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/etc/Makefile =================================================================== --- head/etc/Makefile (revision 337339) +++ head/etc/Makefile (revision 337340) @@ -1,380 +1,377 @@ # from: @(#)Makefile 5.11 (Berkeley) 5/21/91 # $FreeBSD$ .include FILESGROUPS= FILES # No need as it is empty and just causes rebuilds since this file does so much. UPDATE_DEPENDFILE= no .if ${MK_SENDMAIL} != "no" SUBDIR+=sendmail .endif BIN1= crontab \ devd.conf \ devfs.conf \ ddb.conf \ dhclient.conf \ disktab \ fbtab \ gettytab \ group \ hosts \ hosts.allow \ hosts.equiv \ libalias.conf \ libmap.conf \ login.access \ login.conf \ mac.conf \ motd \ netconfig \ networks \ newsyslog.conf \ nsswitch.conf \ phones \ profile \ protocols \ rc.bsdextended \ rc.firewall \ remote \ rpc \ services \ sysctl.conf \ syslog.conf \ termcap.small .if exists(${.CURDIR}/etc.${MACHINE}/ttys) BIN1+= etc.${MACHINE}/ttys .elif exists(${.CURDIR}/etc.${MACHINE_ARCH}/ttys) BIN1+= etc.${MACHINE_ARCH}/ttys .elif exists(${.CURDIR}/etc.${MACHINE_CPUARCH}/ttys) BIN1+= etc.${MACHINE_CPUARCH}/ttys .else .error etc.MACHINE/ttys missing .endif OPENBSMDIR= ${SRCTOP}/contrib/openbsm BSM_ETC_OPEN_FILES= ${OPENBSMDIR}/etc/audit_class \ ${OPENBSMDIR}/etc/audit_event BSM_ETC_RESTRICTED_FILES= ${OPENBSMDIR}/etc/audit_control \ ${OPENBSMDIR}/etc/audit_user BSM_ETC_EXEC_FILES= ${OPENBSMDIR}/etc/audit_warn BSM_ETC_DIR= ${DESTDIR}/etc/security # NB: keep these sorted by MK_* knobs .if ${MK_AMD} != "no" BIN1+= amd.map .endif .if ${MK_AUTOFS} != "no" BIN1+= auto_master .endif .if ${MK_FTP} != "no" BIN1+= ftpusers .endif .if ${MK_INETD} != "no" BIN1+= inetd.conf .endif .if ${MK_LOCATE} != "no" BIN1+= ${SRCTOP}/usr.bin/locate/locate/locate.rc .endif .if ${MK_LPR} != "no" BIN1+= hosts.lpd printcap .endif .if ${MK_MAIL} != "no" BIN1+= ${SRCTOP}/usr.bin/mail/misc/mail.rc .endif .if ${MK_NTP} != "no" BIN1+= ntp.conf .endif .if ${MK_OPENSSH} != "no" SSH= ${SRCTOP}/crypto/openssh/ssh_config \ ${SRCTOP}/crypto/openssh/sshd_config \ ${SRCTOP}/crypto/openssh/moduli .endif .if ${MK_OPENSSL} != "no" SSL= ${SRCTOP}/crypto/openssl/apps/openssl.cnf .endif .if ${MK_PF} != "no" BIN1+= pf.os .endif .if ${MK_SENDMAIL} != "no" BIN1+= rc.sendmail .endif .if ${MK_TCSH} != "no" BIN1+= csh.cshrc csh.login csh.logout .endif .if ${MK_WIRELESS} != "no" BIN1+= regdomain.xml .endif .if ${MK_SENDMAIL} == "no" ETCMAIL=mailer.conf aliases .else ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \ mailertable.sample aliases .endif # Special top level files for FreeBSD FREEBSD=COPYRIGHT # Sanitize DESTDIR DESTDIR:= ${DESTDIR:C://*:/:g} afterinstall: .if ${MK_MAN} != "no" ${_+_}cd ${SRCTOP}/share/man; ${MAKE} makedb .endif distribute: # Avoid installing tests here; "make distribution" will do this and # correctly place them in the right location. ${_+_}cd ${.CURDIR} ; ${MAKE} MK_TESTS=no install \ DESTDIR=${DISTDIR}/${DISTRIBUTION} ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION} .include .if defined(NO_ROOT) METALOG.add?= cat -l >> ${METALOG} .endif distribution: .if !defined(DESTDIR) @echo "set DESTDIR before running \"make ${.TARGET}\"" @false .endif cd ${.CURDIR}; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${BIN1} ${DESTDIR}/etc; \ cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; .if ${MK_SERVICESDB} != "no" cd ${.CURDIR}; \ services_mkdb ${CAP_MKDB_ENDIAN} -q -o ${DESTDIR}/var/db/services.db \ ${DESTDIR}/etc/services; .endif .if ${MK_BSNMP} != "no" cd ${.CURDIR}; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ snmpd.config ${DESTDIR}/etc; .endif .if ${MK_TCSH} == "no" sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd .endif pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd .if defined(NO_ROOT) ( \ echo "./etc/login.conf.db type=file mode=0644 uname=root gname=wheel"; \ echo "./etc/passwd type=file mode=0644 uname=root gname=wheel"; \ echo "./etc/pwd.db type=file mode=0644 uname=root gname=wheel"; \ echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \ echo "./var/db/services.db type=file mode=0644 uname=root gname=wheel"; \ ) | ${METALOG.add} .endif -.if ${MK_AUTOFS} != "no" - ${_+_}cd ${.CURDIR}/autofs; ${MAKE} install -.endif .if ${MK_BLUETOOTH} != "no" ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install .endif ${_+_}cd ${.CURDIR}/cron.d; ${MAKE} install ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install ${_+_}cd ${.CURDIR}/devd; ${MAKE} install ${_+_}cd ${.CURDIR}/gss; ${MAKE} install ${_+_}cd ${.CURDIR}/mtree; ${MAKE} install ${_+_}cd ${.CURDIR}/newsyslog.conf.d; ${MAKE} install .if ${MK_NTP} != "no" ${_+_}cd ${.CURDIR}/ntp; ${MAKE} install .endif ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install ${_+_}cd ${SRCTOP}/share/termcap; ${MAKE} etc-termcap ${_+_}cd ${.CURDIR}/syslog.d; ${MAKE} install ${_+_}cd ${SRCTOP}/usr.sbin/rmt; ${MAKE} etc-rmt ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \ ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR} cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0600 \ ${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR} cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \ ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR} .if ${MK_UNBOUND} != "no" if [ ! -e ${DESTDIR}/etc/unbound ]; then \ ${INSTALL_SYMLINK} ../var/unbound ${DESTDIR}/etc/unbound; \ fi .endif .if ${MK_SENDMAIL} != "no" ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution .endif .if ${MK_OPENSSH} != "no" cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${SSH} ${DESTDIR}/etc/ssh .endif .if ${MK_OPENSSL} != "no" cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${SSL} ${DESTDIR}/etc/ssl .endif .if ${MK_KERBEROS} != "no" cd ${.CURDIR}/root; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ dot.k5login ${DESTDIR}/root/.k5login; .endif cd ${.CURDIR}/root; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ dot.profile ${DESTDIR}/root/.profile; \ rm -f ${DESTDIR}/.profile; \ ${INSTALL_LINK} ${DESTDIR}/root/.profile ${DESTDIR}/.profile .if ${MK_TCSH} != "no" cd ${.CURDIR}/root; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ dot.cshrc ${DESTDIR}/root/.cshrc; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ dot.login ${DESTDIR}/root/.login; \ rm -f ${DESTDIR}/.cshrc; \ ${INSTALL_LINK} ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc .endif .if ${MK_MAIL} != "no" cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${ETCMAIL} ${DESTDIR}/etc/mail if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \ ! -f ${DESTDIR}/etc/aliases ]; then \ ${INSTALL_SYMLINK} mail/aliases ${DESTDIR}/etc/aliases; \ fi .endif .if ${MK_LOCATE} != "no" ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \ ${DESTDIR}/var/db/locate.database .endif cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${FREEBSD} ${DESTDIR}/ .if ${MK_BOOT} != "no" .if exists(${SRCTOP}/sys/${MACHINE}/conf/GENERIC.hints) ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${SRCTOP}/sys/${MACHINE}/conf/GENERIC.hints \ ${DESTDIR}/boot/device.hints .endif .endif .if ${MK_NIS} == "no" sed -i "" -e 's/.*_compat:/# &/' -e 's/compat$$/files/' \ ${DESTDIR}/etc/nsswitch.conf .endif MTREE_CMD?= mtree MTREES= mtree/BSD.root.dist / \ mtree/BSD.var.dist /var \ mtree/BSD.usr.dist /usr \ mtree/BSD.include.dist /usr/include \ mtree/BSD.debug.dist /usr/lib .if ${MK_LIB32} != "no" MTREES+= mtree/BSD.lib32.dist /usr MTREES+= mtree/BSD.lib32.dist /usr/lib/debug/usr .endif .if ${MK_LIBSOFT} != "no" MTREES+= mtree/BSD.libsoft.dist /usr MTREES+= mtree/BSD.libsoft.dist /usr/lib/debug/usr .endif .if ${MK_TESTS} != "no" MTREES+= mtree/BSD.tests.dist ${TESTSBASE} MTREES+= mtree/BSD.tests.dist /usr/lib/debug/${TESTSBASE} .endif .if ${MK_SENDMAIL} != "no" MTREES+= mtree/BSD.sendmail.dist / .endif .for mtree in ${LOCAL_MTREE} MTREES+= ../${mtree} / .endfor # Clean up some directories that where mistakenly created as files that # should not have been as part of the nvi update in r281994. # This should be removed after 11.0-RELEASE. DISTRIB_CLEANUP_SHARE_FILES= ${SHAREDIR}/doc/usd/10.exref ${SHAREDIR}/doc/usd/11.edit DISTRIB_CLEANUP_SHARE_FILES+= ${SHAREDIR}/doc/usd/12.vi ${SHAREDIR}/doc/usd/13.viref distrib-cleanup: .PHONY for file in ${DISTRIB_CLEANUP_SHARE_FILES}; do \ if [ -f ${DESTDIR}/$${file} ]; then \ rm -f ${DESTDIR}/$${file}; \ fi; \ done distrib-dirs: ${MTREES:N/*} distrib-cleanup .PHONY @set ${MTREES}; \ while test $$# -ge 2; do \ m=${.CURDIR}/$$1; \ shift; \ d=${DESTDIR}$$1; \ shift; \ test -d $$d || mkdir -p $$d; \ ${ECHO} ${MTREE_CMD} -deU ${MTREE_FSCHG} \ ${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; \ ${MTREE_FILTER} $$m | \ ${MTREE_CMD} -deU ${MTREE_FSCHG} ${MTREE_FOLLOWS_SYMLINKS} \ -p $$d; \ done; true .if defined(NO_ROOT) @set ${MTREES}; \ while test $$# -ge 2; do \ m=${.CURDIR}/$$1; \ shift; \ d=$$1; \ test "$$d" == "/" && d=""; \ d=${DISTBASE}$$d; \ shift; \ test -d ${DESTDIR}/$$d || mkdir -p ${DESTDIR}/$$d; \ ${ECHO} "${MTREE_CMD:N-W} -C -f $$m -K all | " \ "sed s#^\.#.$$d# | ${METALOG.add}" ; \ ${MTREE_FILTER} $$m | \ ${MTREE_CMD:N-W} -C -K all | sed s#^\.#.$$d# | \ ${METALOG.add} ; \ done; true .endif .if ${MK_NLS} != "no" set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \ while [ $$# -gt 0 ] ; do \ ${INSTALL_SYMLINK} "$$2" "${DESTDIR}${SHAREDIR}/nls/$$1"; \ shift; shift; \ done .endif etc-examples-install: ${META_DEPS} cd ${.CURDIR}; ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${BIN1} ${BIN2} nsmb.conf opieaccess \ ${DESTDIR}${SHAREDIR}/examples/etc etc-examples: etc-examples-install ${_+_}cd ${.CURDIR}/defaults; \ ${MAKE} ${${MK_STAGING} == "yes":?all:install} \ DESTDIR=${DESTDIR}${SHAREDIR}/examples .include .if ${MK_INSTALL_AS_USER} == "yes" && ${_uid} != 0 MTREE_FILTER= sed -e 's,\([gu]\)name=,\1id=,g' \ -e 's,\(uid=\)[^ ]* ,\1${_uid} ,' \ -e 's,\(gid=\)[^ ]* ,\1${_gid} ,' \ -e 's,\(uid=\)[^ ]*$$,\1${_uid},' \ -e 's,\(gid=\)[^ ]*$$,\1${_gid},' .else MTREE_FILTER= cat .if !defined(NO_FSCHG) MTREE_FSCHG= -i .endif .endif Index: head/usr.sbin/autofs/Makefile =================================================================== --- head/usr.sbin/autofs/Makefile (revision 337339) +++ head/usr.sbin/autofs/Makefile (revision 337340) @@ -1,33 +1,36 @@ # $FreeBSD$ +CONFS= auto_master PACKAGE=autofs PROG= automountd SRCS= automount.c SRCS+= automountd.c SRCS+= autounmountd.c SRCS+= common.c SRCS+= defined.c SRCS+= getmntopts.c SRCS+= log.c SRCS+= popen.c SRCS+= token.l CFLAGS+=-I${.CURDIR} CFLAGS+=-I${SRCTOP}/sys/fs/autofs MAN= automount.8 automountd.8 autounmountd.8 auto_master.5 LIBADD= util # Needed for getmntopts.c MOUNT= ${SRCTOP}/sbin/mount CFLAGS+=-I${MOUNT} WARNS= 6 LINKS= ${BINDIR}/automountd ${BINDIR}/automount LINKS+= ${BINDIR}/automountd ${BINDIR}/autounmountd .PATH: ${MOUNT} + +SUBDIR= autofs .include Index: head/usr.sbin/autofs/auto_master =================================================================== --- head/usr.sbin/autofs/auto_master (nonexistent) +++ head/usr.sbin/autofs/auto_master (revision 337340) @@ -0,0 +1,9 @@ +# $FreeBSD$ +# +# Automounter master map, see auto_master(5) for details. +# +/net -hosts -nobrowse,nosuid,intr +# 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,noatime +#/- -noauto Property changes on: head/usr.sbin/autofs/auto_master ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/usr.sbin/autofs/autofs/Makefile =================================================================== --- head/usr.sbin/autofs/autofs/Makefile (nonexistent) +++ head/usr.sbin/autofs/autofs/Makefile (revision 337340) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +CONFS= include_ldap \ + include_nis \ + include_nis_nullfs \ + special_hosts \ + special_media \ + special_noauto \ + special_null + +NO_OBJ= +CONFDIR= /etc/autofs +CONFMODE= 755 + +.include Property changes on: head/usr.sbin/autofs/autofs/Makefile ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/usr.sbin/autofs/autofs/special_media =================================================================== --- head/usr.sbin/autofs/autofs/special_media (nonexistent) +++ head/usr.sbin/autofs/autofs/special_media (revision 337340) @@ -0,0 +1,136 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# Print newline-separated list of devices available for mounting. +# If there is a filesystem label - use it, otherwise use device name. +print_available() { + local _fstype _fstype_and_label _label _p + + for _p in ${providers}; do + _fstype_and_label="$(fstyp -l "/dev/${_p}" 2> /dev/null)" + if [ $? -ne 0 ]; then + # Ignore devices for which we were unable + # to determine filesystem type. + continue + fi + + _fstype="${_fstype_and_label%% *}" + if [ "${_fstype}" != "${_fstype_and_label}" ]; then + _label="${_fstype_and_label#* }" + # Replace plus signs and slashes with minuses; + # leading plus signs have special meaning in maps, + # and multi-component keys are just not supported. + _label="$(echo ${_label} | sed 's,[+/],-,g')" + echo "${_label}" + continue + fi + + echo "${_p}" + done +} + +# Print a single map entry. +print_map_entry() { + local _fstype _p + + _fstype="$1" + _p="$2" + + case "${_fstype}" in + "exfat") + if [ -f "/usr/local/sbin/mount.exfat" ]; then + echo "-mountprog=/usr/local/sbin/mount.exfat,fstype=${_fstype},nosuid :/dev/${_p}" + else + /usr/bin/logger -p info -t "special_media[$$]" \ + "Cannot mount ${_fstype} formatted device /dev/${_p}: Install sysutils/fusefs-exfat first" + exit 1 + fi + ;; + "ntfs") + if [ -f "/usr/local/bin/ntfs-3g" ]; then + echo "-mountprog=/usr/local/bin/ntfs-3g,fstype=${_fstype},nosuid :/dev/${_p}" + else + /usr/bin/logger -p info -t "special_media[$$]" \ + "Cannot mount ${_fstype} formatted device /dev/${_p}: Install sysutils/fusefs-ntfs first" + exit 1 + fi + ;; + "ext2fs" | "msdosfs") + echo "-fstype=${_fstype},nosuid,async :/dev/${_p}" + ;; + *) + echo "-fstype=${_fstype},nosuid :/dev/${_p}" + ;; + esac +} + +# Determine map entry contents for the given key and print out the entry. +print_one() { + local _fstype _fstype_and_label _label _key _p + + _key="$1" + + _fstype="$(fstyp "/dev/${_key}" 2> /dev/null)" + if [ $? -eq 0 ]; then + print_map_entry "${_fstype}" "${_key}" + return + fi + + for _p in ${providers}; do + _fstype_and_label="$(fstyp -l "/dev/${_p}" 2> /dev/null)" + if [ $? -ne 0 ]; then + # Ignore devices for which we were unable + # to determine filesystem type. + continue + fi + + _fstype="${_fstype_and_label%% *}" + if [ "${_fstype}" = "${_fstype_and_label}" ]; then + # No label, try another device. + continue + fi + + _label="${_fstype_and_label#* }" + # Replace plus signs and slashes with minuses; + # leading plus signs have special meaning in maps, + # and multi-component keys are just not supported. + _label="$(echo ${_label} | sed 's,[+/],-,g')" + if [ "${_label}" != "${_key}" ]; then + # Labels don't match, try another device. + continue + fi + + print_map_entry "${_fstype}" "${_p}" + done + + # No matching device - don't print anything, autofs will handle it. +} + +# Obtain a list of (geom-provider-name, access-count) pairs, turning this: +# +# z0xfffff80005085d00 [shape=hexagon,label="ada0\nr2w2e3\nerr#0\nsector=512\nstripe=0"]; +# +# Into this: +# +# ada0 r2w2e3 +# +# XXX: It would be easier to use kern.geom.conftxt instead, but it lacks +# access counts. +pairs=$(sysctl kern.geom.confdot | sed -n 's/^.*hexagon,label="\([^\]*\)\\n\([^\]*\).*/\1 \2/p') + +# Obtain a list of GEOM providers that are not already open - not mounted, +# and without other GEOM class, such as gpart, attached. In other words, +# grep for "r0w0e0". Skip providers with names containing slashes; we're +# not interested in geom_label(4) creations. +providers=$(echo "$pairs" | awk '$2 == "r0w0e0" && $1 !~ /\// { print $1 }') + +if [ $# -eq 0 ]; then + print_available + exit 0 +fi + +print_one "$1" +exit 0 + Property changes on: head/usr.sbin/autofs/autofs/special_media ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/usr.sbin/autofs/autofs/include_nis =================================================================== --- head/usr.sbin/autofs/autofs/include_nis (nonexistent) +++ head/usr.sbin/autofs/autofs/include_nis (revision 337340) @@ -0,0 +1,14 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +if [ -n "$2" ]; then + ypmatch $2 $1 + exit 0 +fi + +if [ -n "$1" ]; then + ypcat -k $1 + exit 0 +fi Property changes on: head/usr.sbin/autofs/autofs/include_nis ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/usr.sbin/autofs/autofs/include_nis_nullfs =================================================================== --- head/usr.sbin/autofs/autofs/include_nis_nullfs (nonexistent) +++ head/usr.sbin/autofs/autofs/include_nis_nullfs (revision 337340) @@ -0,0 +1,180 @@ +#!/usr/bin/awk -f +#- +# Copyright (c) 2017 G. Paul Ziemba +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# +# /etc/autofs/include_nis_nullfs +# +# automountd Directory Services script for NIS +# +# SYNOPSIS +# include_nis_nullfs +# +# include_nis_nullfs +# +# DESCRIPTION +# +# This script provides a Directory Services map for automountd +# based on NIS. Please see auto_master(5) for general information. +# +# The first form, with one argument, emits the entire named NIS map. +# The second form, with two arguments, emits the map entry for the +# key given in the second argument. +# +# This script attempts to determine the names and IP addresses +# of the local host. Map entries matching the local host are +# rewritten to specify nullfs mounts (instead of the default +# NFS) to reduce access overhead in the kernel. +# +# If a map entry contains multiple location fields, it is not changed. +# + + +# Populate list of names and IP addrs thet mean "this host" +# into myhostnames array +BEGIN { + # + # Set self hostnames + # + + "hostname -s" | getline; + myhostnames[$0] = 1; + + "hostname -f" | getline; + myhostnames[$0] = 1; + + myhostnames["localhost"] = 1 + + "hostname -f" | getline; + localdomain=$0 + myhostnames["localhost."localdomain] = 1 + + while ("ifconfig" | getline) { + if ($1 == "inet") { + myhostnames[$2] = 1; + } + } + + # debug +# print "--- hostname list start ----" +# for (i in myhostnames) { +# print i +# } +# print "--- hostname list end ----" + + if (ARGC == 2) { + # mapname only + while ("ypcat -k " ARGV[1] | getline) { + proc_mapline(1) + } + } + if (ARGC == 3) { + # mapname and keyname + while ("ypmatch " ARGV[2] " " ARGV[1] | getline) { + proc_mapline(0) + } + } + exit 0 +} + +function is_self(hostname) +{ + if (myhostnames[hostname]) { + return 1 + } + return 0 +} + +# +# Lines are of the form [key] [-opts] location1 [... locationN] +# +# indicate index of key field with first positional parameter +# 1 means keyfield is the first field +# 0 means keyfield is not present +# +function proc_mapline(keyfield) +{ + optionsfield = 0 + locationfield = 0 + locationcount = 0 + + for (i=keyfield+1; i <= NF; ++i) { + if (!optionsfield) { + if ($i ~ /^-/) { + # the first options field found on the line + optionsfield = i; + continue + } + } + # Assumption: location contains colon (":") + if (optionsfield && ($i ~ /:/) && ($i !~ /^-/)) { + ++locationcount + if (!locationfield) { + # the first location field found on the line + locationfield = i + } + } + } + + # + # If location not found, do not modify. + # + # If there is more than one location, do not modify. Rationale: + # Options are applied to all locations. We ca not have "nullfs" + # for only some locations and "nfs" for others for a given + # map key (i.e., a line). The usual reason for multiple + # locations is for redundancy using replicated volumes on + # multiple hosts, so multiple hosts imply fstype=nfs (the + # FreeBSD default for automounter maps). + # + # Hypothetically there could be a map entry with multiple + # locations all with host parts matching "me". In that case, + # it would be safe to rewrite the locations and specify + # nullfs, but the code does not handle this case. + # + if (locationcount == 1) { + # + # We have a line with exactly one location field + # + # Assumption: location has no more than one colon (":") + # + n=split($locationfield,location,":") + if (is_self(location[1])) { + $locationfield = ":" location[2] + if (optionsfield) { + # append to existing options + $optionsfield = $optionsfield ",fstype=nullfs" + } else { + # sneak in ahead of location + $locationfield = "-fstype=nullfs " $locationfield + } + } + } + + print +} Property changes on: head/usr.sbin/autofs/autofs/include_nis_nullfs ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/usr.sbin/autofs/autofs/special_hosts =================================================================== --- head/usr.sbin/autofs/autofs/special_hosts (nonexistent) +++ head/usr.sbin/autofs/autofs/special_hosts (revision 337340) @@ -0,0 +1,17 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +if [ $# -eq 0 ]; then + out=`getent hosts` + [ $? -eq 0 ] || exit 1 + echo "$out" | awk '{ print $2 }' | sort -u + exit 0 +fi + +out=`showmount -E "$1"` +[ $? -eq 0 ] || exit 1 +echo "$out" | awk -v host="$1" \ + '{ printf "\"%s\"\t\"%s:%s\" ", $0, host, $0 } END { printf "\n" }' + Property changes on: head/usr.sbin/autofs/autofs/special_hosts ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/usr.sbin/autofs/autofs/include_ldap =================================================================== --- head/usr.sbin/autofs/autofs/include_ldap (nonexistent) +++ head/usr.sbin/autofs/autofs/include_ldap (revision 337340) @@ -0,0 +1,55 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# Modify this to suit your needs. The "$1" is the map name, eg. "auto_master". +# To debug, simply run this script with map name as the only parameter. It's +# supposed to output map contents ("key location" pairs) to standard output. +SEARCHBASE="ou=$1,dc=example,dc=com" +ENTRY_ATTRIBUTE="cn" +VALUE_ATTRIBUTE="automountInformation" + +/usr/local/bin/ldapsearch -LLL -x -o ldif-wrap=no -b "$SEARCHBASE" "$ENTRY_ATTRIBUTE" "$VALUE_ATTRIBUTE" | awk ' +$1 == "'$ENTRY_ATTRIBUTE':" { + key = $2 +} + +$1 == "'$VALUE_ATTRIBUTE':" { + for (i = 2; i <= NF; i++) { + value[i] = $(i) + } + nvalues = NF + b64 = 0 +} + +# Double colon after attribute name means the value is in Base64. +$1 == "'$VALUE_ATTRIBUTE'::" { + for (i = 2; i <= NF; i++) { + value[i] = $(i) + } + nvalues = NF + b64 = 1 +} + +# Empty line - end of record. +NF == 0 && key != "" && nvalues > 0 { + printf "%s%s", key, OFS + for (i = 2; i < nvalues; i++) { + printf "%s%s", value[i], OFS + } + if (b64 == 1) { + printf "%s", value[nvalues] | "b64decode -rp" + close("b64decode -rp") + printf "%s", ORS + } else { + printf "%s%s", value[nvalues], ORS + } +} + +NF == 0 { + key = "" + nvalues = 0 + delete value +} +' Property changes on: head/usr.sbin/autofs/autofs/include_ldap ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/usr.sbin/autofs/autofs/special_noauto =================================================================== --- head/usr.sbin/autofs/autofs/special_noauto (nonexistent) +++ head/usr.sbin/autofs/autofs/special_noauto (revision 337340) @@ -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 + Property changes on: head/usr.sbin/autofs/autofs/special_noauto ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/usr.sbin/autofs/autofs/special_null =================================================================== --- head/usr.sbin/autofs/autofs/special_null (nonexistent) +++ head/usr.sbin/autofs/autofs/special_null (revision 337340) @@ -0,0 +1,4 @@ +#!/usr/bin/true +# +# $FreeBSD$ +# Property changes on: head/usr.sbin/autofs/autofs/special_null ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property