From e87191821ede542e14e8dd368f139aca8e517e4b Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 1 Aug 2014 19:32:20 +0000 Subject: Like with /usr/lib + /usr/lib/compat, add the optional /usr/lib32/compat to the ldconfig32 default path. /usr/lib32 is the 32 bit versions of *current* libraries, while old versions should be able to be in /usr/lib32/compat, like with /usr/lib/compat. The separation is meant to keep the compile time default search paths cleaner. --- etc/defaults/rc.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index aa19b30..da0e419 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -610,7 +610,8 @@ clear_tmp_X="YES" # Clear and recreate X11-related directories in /tmp ldconfig_insecure="NO" # Set to YES to disable ldconfig security checks ldconfig_paths="/usr/lib/compat /usr/local/lib /usr/local/lib/compat/pkg" # shared library search paths -ldconfig32_paths="/usr/lib32" # 32-bit compatibility shared library search paths +ldconfig32_paths="/usr/lib32 /usr/lib32/compat" + # 32-bit compatibility shared library search paths ldconfig_paths_aout="/usr/lib/compat/aout /usr/local/lib/aout" # a.out shared library search paths ldconfig_local_dirs="/usr/local/libdata/ldconfig" -- cgit v1.1 From 0a9b61e64a0ea241dcf77484349684052e6c6391 Mon Sep 17 00:00:00 2001 From: ngie Date: Mon, 4 Aug 2014 22:10:07 +0000 Subject: Integrate lib/libmp into the build/kyua - Remove the .t wrapper - Fix -Wreturn-type warnings with clang This change has been tested on amd64/i386 Phabric: D530 Reviewed by: jmmv Approved by: jmmv (co-mentor) MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 4d6f18a..1f61599 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -85,6 +85,8 @@ .. libcrypt .. + libmp + .. .. libexec atf -- cgit v1.1 From 9513739a47728a2ab6f7b2f5938d7ca223a60413 Mon Sep 17 00:00:00 2001 From: ngie Date: Tue, 5 Aug 2014 18:41:27 +0000 Subject: Integrate lib/libnv into the build/kyua Rename all of the TAP test applications from to _test to match the convention described in the TestSuite wiki page Phabric: D538 Approved by: jmmv (mentor) Sponsored by: EMC / Isilon Storage Division --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 1f61599..64bf426 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -87,6 +87,8 @@ .. libmp .. + libnv + .. .. libexec atf -- cgit v1.1 From 0285c8234c244c91d683236a358d83b7350ee8a0 Mon Sep 17 00:00:00 2001 From: ngie Date: Wed, 13 Aug 2014 05:15:28 +0000 Subject: Add missing BSD.tests.dist entry for lib/libutil to unbreak installworld with MK_TESTS == no Phabric: D555 X-MFC with: r269904 Approved by: jmmv (mentor, implicit) Pointyhat to: ngie --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 64bf426..3c561bb 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -89,6 +89,8 @@ .. libnv .. + libutil + .. .. libexec atf -- cgit v1.1 From c511ec0ad85c2a70edc55e4d611ddcb3314bd7f2 Mon Sep 17 00:00:00 2001 From: asomers Date: Thu, 14 Aug 2014 22:33:56 +0000 Subject: Convert devd's client socket to type SOCK_SEQPACKET. This change consists of two merges from projects/zfsd/head along with the addition of an ATF test case for the new functionality. sbin/devd/tests/Makefile sbin/devd/tests/client_test.c Add ATF test cases for reading events from both devd socket types. r266519: sbin/devd/devd.8 sbin/devd/devd.cc Create a new socket, of type SOCK_SEQPACKET, for communicating with clients. SOCK_SEQPACKET sockets preserve record boundaries, simplying code in the client. The old SOCK_STREAM socket is retained for backwards-compatibility with existing clients. r269993: sbin/devd/devd.8 Fix grammar bug. CR: https://reviews.freebsd.org/rS266519 MFC after: 5 days Sponsored by: Spectra Logic --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 3c561bb..5438176 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -105,6 +105,8 @@ sbin dhclient .. + devd + .. growfs .. mdconfig -- cgit v1.1 From 82e14020fd65682e9c4e04af88589597b3609efa Mon Sep 17 00:00:00 2001 From: ngie Date: Fri, 15 Aug 2014 21:35:31 +0000 Subject: Make the USB and ZFS devd configuration files optional depending on the values of MK_USB/MK_ZFS Making zfs.conf optional resolves PR # 186971 PR: 186971 Phabric: D606 Approved by: jmmv (mentor) Sponsored by: EMC / Isilon Storage Division --- etc/devd/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/devd/Makefile b/etc/devd/Makefile index c744398..94cafdc 100644 --- a/etc/devd/Makefile +++ b/etc/devd/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ -FILES= uath.conf usb.conf zfs.conf +.include .if ${MACHINE} == "powerpc" FILES+= apple.conf @@ -10,6 +10,14 @@ FILES+= apple.conf FILES+= asus.conf .endif +.if ${MK_USB} != "no" +FILES+= uath.conf usb.conf +.endif + +.if ${MK_ZFS} != "no" +FILES+= zfs.conf +.endif + NO_OBJ= FILESDIR= /etc/devd FILESMODE= 644 -- cgit v1.1 From cac9beab7d53f0c37ce2a2a1b893be59028928f4 Mon Sep 17 00:00:00 2001 From: trasz Date: Sun, 17 Aug 2014 09:44:42 +0000 Subject: Bring in the new automounter, similar to what's provided in most other UNIX systems, eg. MacOS X and Solaris. It uses Sun-compatible map format, has proper kernel support, and LDAP integration. There are still a few outstanding problems; they will be fixed shortly. Reviewed by: allanjude@, emaste@, kib@, wblock@ (earlier versions) Phabric: D523 MFC after: 2 weeks Relnotes: yes Sponsored by: The FreeBSD Foundation --- etc/Makefile | 4 +++- etc/auto_master | 5 +++++ etc/autofs/Makefile | 9 +++++++++ etc/autofs/include_ldap | 38 ++++++++++++++++++++++++++++++++++++++ etc/autofs/special_hosts | 17 +++++++++++++++++ etc/autofs/special_null | 4 ++++ etc/defaults/rc.conf | 1 + etc/mtree/BSD.root.dist | 2 ++ etc/rc.d/Makefile | 3 +++ etc/rc.d/automount | 31 +++++++++++++++++++++++++++++++ etc/rc.d/automountd | 19 +++++++++++++++++++ etc/rc.d/autounmountd | 18 ++++++++++++++++++ 12 files changed, 150 insertions(+), 1 deletion(-) create mode 100644 etc/auto_master create mode 100644 etc/autofs/Makefile create mode 100644 etc/autofs/include_ldap create mode 100644 etc/autofs/special_hosts create mode 100644 etc/autofs/special_null create mode 100644 etc/rc.d/automount create mode 100644 etc/rc.d/automountd create mode 100644 etc/rc.d/autounmountd (limited to 'etc') diff --git a/etc/Makefile b/etc/Makefile index 3387e60..ff70cc1 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -11,7 +11,8 @@ SUBDIR= sendmail SUBDIR+=tests .endif -BIN1= crontab \ +BIN1= auto_master \ + crontab \ devd.conf \ devfs.conf \ ddb.conf \ @@ -225,6 +226,7 @@ distribution: echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \ ) | ${METALOG.add} .endif + ${_+_}cd ${.CURDIR}/autofs; ${MAKE} install .if ${MK_BLUETOOTH} != "no" ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install .endif diff --git a/etc/auto_master b/etc/auto_master new file mode 100644 index 0000000..16d55e2 --- /dev/null +++ b/etc/auto_master @@ -0,0 +1,5 @@ +# $FreeBSD$ +# +# Automounter master map, see auto_master(5) for details. +# +/net -hosts -nosuid diff --git a/etc/autofs/Makefile b/etc/autofs/Makefile new file mode 100644 index 0000000..c9eda50 --- /dev/null +++ b/etc/autofs/Makefile @@ -0,0 +1,9 @@ +# $FreeBSD$ + +FILES= include_ldap special_hosts special_null + +NO_OBJ= +FILESDIR= /etc/autofs +FILESMODE= 755 + +.include diff --git a/etc/autofs/include_ldap b/etc/autofs/include_ldap new file mode 100644 index 0000000..58970c0 --- /dev/null +++ b/etc/autofs/include_ldap @@ -0,0 +1,38 @@ +#!/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':" && key { + printf "%s%s", key, OFS + key = "" + for (i=2; i 1 { printf "%s\t%s:%s ", $1, host, $1 } END { printf "\n" }' + diff --git a/etc/autofs/special_null b/etc/autofs/special_null new file mode 100644 index 0000000..41c1000 --- /dev/null +++ b/etc/autofs/special_null @@ -0,0 +1,4 @@ +#!/usr/bin/true +# +# $FreeBSD$ +# diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index da0e419..87d9216 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -306,6 +306,7 @@ amd_enable="NO" # Run amd service with $amd_flags (or NO). amd_program="/usr/sbin/amd" # path to amd, if you want a different one. amd_flags="-a /.amd_mnt -l syslog /host /etc/amd.map /net /etc/amd.map" amd_map_program="NO" # Can be set to "ypcat -k amd.master" +autofs_enable="NO" # Run automountd(8) nfs_client_enable="NO" # This host is an NFS client (or NO). nfs_access_cache="60" # Client cache timeout in seconds nfs_server_enable="NO" # This host is an NFS server (or NO). diff --git a/etc/mtree/BSD.root.dist b/etc/mtree/BSD.root.dist index 4462013..d494ef6 100644 --- a/etc/mtree/BSD.root.dist +++ b/etc/mtree/BSD.root.dist @@ -24,6 +24,8 @@ etc X11 .. + autofs + .. bluetooth .. casper diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index 7302d29..75f79b9 100644 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -20,6 +20,9 @@ FILES= DAEMON \ atm3 \ auditd \ auditdistd \ + automount \ + automountd \ + autounmountd \ bgfsck \ ${_bluetooth} \ bootparams \ diff --git a/etc/rc.d/automount b/etc/rc.d/automount new file mode 100644 index 0000000..63bda42 --- /dev/null +++ b/etc/rc.d/automount @@ -0,0 +1,31 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: automount +# REQUIRE: nfsclient +# KEYWORD: nojail shutdown + +. /etc/rc.subr + +name="automount" +rcvar="autofs_enable" +start_cmd="automount_start" +stop_cmd="automount_stop" +required_modules="autofs" + +automount_start() +{ + + /usr/sbin/automount +} + +automount_stop() +{ + + /sbin/umount -At autofs +} + +load_rc_config $name +run_rc_command "$1" diff --git a/etc/rc.d/automountd b/etc/rc.d/automountd new file mode 100644 index 0000000..6d74665 --- /dev/null +++ b/etc/rc.d/automountd @@ -0,0 +1,19 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: automountd +# REQUIRE: automount +# KEYWORD: nojail + +. /etc/rc.subr + +name="automountd" +rcvar="autofs_enable" +pidfile="/var/run/${name}.pid" +command="/usr/sbin/${name}" +required_modules="autofs" + +load_rc_config $name +run_rc_command "$1" diff --git a/etc/rc.d/autounmountd b/etc/rc.d/autounmountd new file mode 100644 index 0000000..c57f90d --- /dev/null +++ b/etc/rc.d/autounmountd @@ -0,0 +1,18 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: autounmountd +# REQUIRE: nfsclient +# KEYWORD: nojail + +. /etc/rc.subr + +name="autounmountd" +rcvar="autofs_enable" +pidfile="/var/run/${name}.pid" +command="/usr/sbin/${name}" + +load_rc_config $name +run_rc_command "$1" -- cgit v1.1 From 2db4dceb4e3416d6c1345f9474ba21d049c8ea3d Mon Sep 17 00:00:00 2001 From: des Date: Sat, 23 Aug 2014 10:49:02 +0000 Subject: Setting rc_debug explicitly in /etc/defaults/rc.conf defeats its purpose. MFC after: 3 days --- etc/defaults/rc.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 87d9216..3c77d8d 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -21,7 +21,7 @@ ### Important initial Boot-time options #################### ############################################################## -rc_debug="NO" # Set to YES to enable debugging output from rc.d +#rc_debug="NO" # Set to YES to enable debugging output from rc.d rc_info="NO" # Enables display of informational messages at boot. rc_startmsgs="YES" # Show "Starting foo:" messages at boot rcshutdown_timeout="90" # Seconds to wait before terminating rc.shutdown -- cgit v1.1 From 5c129e9d8b23fdc4340d4fc5c0b9c9f117a5b122 Mon Sep 17 00:00:00 2001 From: des Date: Sat, 23 Aug 2014 10:51:37 +0000 Subject: Add support for /etc/rc.conf.d/ subdirectories. This is particularly useful for services such as "network" (netif) where each interface can now have its own separate configuration file. Add /etc/rc.conf.d to the mtree file so it is always present. MFC after: 3 days --- etc/mtree/BSD.root.dist | 2 ++ etc/rc.subr | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/mtree/BSD.root.dist b/etc/mtree/BSD.root.dist index d494ef6..7b8d9e7 100644 --- a/etc/mtree/BSD.root.dist +++ b/etc/mtree/BSD.root.dist @@ -62,6 +62,8 @@ .. ppp .. + rc.conf.d + .. rc.d .. security diff --git a/etc/rc.subr b/etc/rc.subr index b6172db..f02ae14 100644 --- a/etc/rc.subr +++ b/etc/rc.subr @@ -1290,8 +1290,16 @@ load_rc_config() _rc_conf_loaded=true fi if [ -f /etc/rc.conf.d/"$_name" ]; then - debug "Sourcing /etc/rc.conf.d/${_name}" + debug "Sourcing /etc/rc.conf.d/$_name" . /etc/rc.conf.d/"$_name" + elif [ -d /etc/rc.conf.d/"$_name" ] ; then + local _rc + for _rc in /etc/rc.conf.d/"$_name"/* ; do + if [ -f "$_rc" ] ; then + debug "Sourcing $_rc" + . "$_rc" + fi + done fi # Set defaults if defined. -- cgit v1.1 From 19be009a4f8eb0d239ec3e465b0a9b2a2947dcf8 Mon Sep 17 00:00:00 2001 From: trasz Date: Sat, 23 Aug 2014 12:00:45 +0000 Subject: Add "nobrowse" option. Previously automountd(8) always behaved as if it was set, now it's conditional. PR: 192862 MFC after: 2 weeks Sponsored by: The FreeBSD Foundation --- etc/auto_master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/auto_master b/etc/auto_master index 16d55e2..3b3e5da 100644 --- a/etc/auto_master +++ b/etc/auto_master @@ -2,4 +2,4 @@ # # Automounter master map, see auto_master(5) for details. # -/net -hosts -nosuid +/net -hosts -nobrowse,nosuid -- cgit v1.1 From 10a33dbbac86c78363fb7438b202ae05fb3362db Mon Sep 17 00:00:00 2001 From: se Date: Tue, 26 Aug 2014 08:13:30 +0000 Subject: Add references to vt(4) and the configuration files in /usr7share/vt where appropriate (i.e. where syscons was already mentioned and vt supports the feature). Comments in defaults/rc.conf are updated to match the contents of the modified man-page rc.conf(5). Reviewed by: pluknet, emaste MFC after: 3 days --- etc/defaults/rc.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'etc') diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 3c77d8d..b5db884 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -516,15 +516,15 @@ ip6addrctl_policy="AUTO" # A pre-defined address selection policy ############################################################## keyboard="" # keyboard device to use (default /dev/kbd0). -keymap="NO" # keymap in /usr/share/syscons/keymaps/* (or NO). +keymap="NO" # keymap in /usr/share/{syscons,vt}/keymaps/* (or NO). keyrate="NO" # keyboard rate to: slow, normal, fast (or NO). keybell="NO" # See kbdcontrol(1) for options. Use "off" to disable. keychange="NO" # function keys default values (or NO). cursor="NO" # cursor type {normal|blink|destructive} (or NO). scrnmap="NO" # screen map in /usr/share/syscons/scrnmaps/* (or NO). -font8x16="NO" # font 8x16 from /usr/share/syscons/fonts/* (or NO). -font8x14="NO" # font 8x14 from /usr/share/syscons/fonts/* (or NO). -font8x8="NO" # font 8x8 from /usr/share/syscons/fonts/* (or NO). +font8x16="NO" # font 8x16 from /usr/share/{syscons,vt}/fonts/* (or NO). +font8x14="NO" # font 8x14 from /usr/share/{syscons,vt}/fonts/* (or NO). +font8x8="NO" # font 8x8 from /usr/share/{syscons,vt}/fonts/* (or NO). blanktime="300" # blank time (in seconds) or "NO" to turn it off. saver="NO" # screen saver: Uses /boot/kernel/${saver}_saver.ko moused_nondefault_enable="YES" # Treat non-default mice as enabled unless -- cgit v1.1 From 56ed7afe46319bfcd887e683556267124c515c95 Mon Sep 17 00:00:00 2001 From: bapt Date: Tue, 26 Aug 2014 22:33:34 +0000 Subject: Allow to configure services from ${LOCALBASE}/etc/rc.conf.d Reviewed by: bdrewery MFC after: 1 week Relnotes: yes --- etc/rc.subr | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'etc') diff --git a/etc/rc.subr b/etc/rc.subr index f02ae14..59fe68b 100644 --- a/etc/rc.subr +++ b/etc/rc.subr @@ -1301,6 +1301,10 @@ load_rc_config() fi done fi + if [ -f ${LOCALBASE:-/usr/local}/etc/rc.conf.d/"$_name" ]; then + debug "Sourcing ${LOCALBASE:-/usr/local}/etc/rc.conf.d/${_name}" + . ${LOCALBASE:-/usr/local}/etc/rc.conf.d/"$_name" + fi # Set defaults if defined. for _var in $rcvar; do -- cgit v1.1 From 00a1947ef5fe4206888a054a254a598b73df993e Mon Sep 17 00:00:00 2001 From: gavin Date: Tue, 26 Aug 2014 22:39:24 +0000 Subject: Fix xref, pam(8) -> pam(3) PR: 193045 Submitted by: rsimmons0 gmail com MFC after: 3 days --- etc/pam.d/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/pam.d/README b/etc/pam.d/README index 7b8f958..2824c05 100644 --- a/etc/pam.d/README +++ b/etc/pam.d/README @@ -8,7 +8,7 @@ particular service, the /etc/pam.d/other is used instead. If that file does not exist, /etc/pam.conf is searched for entries matching the specified service or, failing that, the "other" service. -See the pam(8) manual page for an explanation of the workings of the +See the pam(3) manual page for an explanation of the workings of the PAM library and descriptions of the various files and modules. Below is a summary of the format for the pam.conf and /etc/pam.d/* files. -- cgit v1.1 From 22464809265beea7b7903c7dbc8989f5a6b585dd Mon Sep 17 00:00:00 2001 From: hrs Date: Wed, 27 Aug 2014 09:19:22 +0000 Subject: - Use $local_startup to load rc.conf.d/* scripts. - Document support of rc.conf.d//* introduced in r270392. Discussed with: bapt --- etc/rc.subr | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'etc') diff --git a/etc/rc.subr b/etc/rc.subr index 59fe68b..ff4e898 100644 --- a/etc/rc.subr +++ b/etc/rc.subr @@ -1270,7 +1270,7 @@ run_rc_script() # load_rc_config() { - local _name _rcvar_val _var _defval _v _msg _new + local _name _rcvar_val _var _defval _v _msg _new _d _name=$1 if [ -z "$_name" ]; then err 3 'USAGE: load_rc_config name' @@ -1289,22 +1289,21 @@ load_rc_config() fi _rc_conf_loaded=true fi - if [ -f /etc/rc.conf.d/"$_name" ]; then - debug "Sourcing /etc/rc.conf.d/$_name" - . /etc/rc.conf.d/"$_name" - elif [ -d /etc/rc.conf.d/"$_name" ] ; then - local _rc - for _rc in /etc/rc.conf.d/"$_name"/* ; do - if [ -f "$_rc" ] ; then - debug "Sourcing $_rc" - . "$_rc" - fi - done - fi - if [ -f ${LOCALBASE:-/usr/local}/etc/rc.conf.d/"$_name" ]; then - debug "Sourcing ${LOCALBASE:-/usr/local}/etc/rc.conf.d/${_name}" - . ${LOCALBASE:-/usr/local}/etc/rc.conf.d/"$_name" - fi + + for _d in /etc ${local_startup%*/rc.d}; do + if [ -f ${_d}/rc.conf.d/"$_name" ]; then + debug "Sourcing ${_d}/rc.conf.d/$_name" + . ${_d}/rc.conf.d/"$_name" + elif [ -d ${_d}/rc.conf.d/"$_name" ] ; then + local _rc + for _rc in ${_d}/rc.conf.d/"$_name"/* ; do + if [ -f "$_rc" ] ; then + debug "Sourcing $_rc" + . "$_rc" + fi + done + fi + done # Set defaults if defined. for _var in $rcvar; do -- cgit v1.1 From 12c6141a1e0a285114c62a9c84d6dd541ec93149 Mon Sep 17 00:00:00 2001 From: hrs Date: Fri, 29 Aug 2014 06:23:00 +0000 Subject: Fix rc.d/gssd script to define the default values in a standard way. --- etc/defaults/rc.conf | 1 + etc/rc.d/gssd | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'etc') diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index b5db884..7c7d899 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -282,6 +282,7 @@ kfd_enable="NO" # Run kfd (or NO) kfd_program="/usr/libexec/kfd" # path to kerberos 5 kfd daemon gssd_enable="NO" # Run the gssd daemon (or NO). +gssd_program="/usr/sbin/gssd" # Path to gssd. gssd_flags="" # Flags for gssd. rwhod_enable="NO" # Run the rwho daemon (or NO). diff --git a/etc/rc.d/gssd b/etc/rc.d/gssd index 3788307..e981478 100755 --- a/etc/rc.d/gssd +++ b/etc/rc.d/gssd @@ -9,10 +9,8 @@ . /etc/rc.subr -name="gssd" +name=gssd +rcvar=gssd_enable load_rc_config $name -rcvar="gssd_enable" -command="${gssd:-/usr/sbin/${name}}" -eval ${name}_flags=\"${gssd_flags}\" run_rc_command "$1" -- cgit v1.1 From 0a12d6abf032ff89f34c9d605c6d467eae2ed916 Mon Sep 17 00:00:00 2001 From: hrs Date: Fri, 29 Aug 2014 06:31:18 +0000 Subject: - Add a warning message when an IPv6 address is specified with no prefixlen. - Use a parameter argument in jls(8) instead of doing grep. --- etc/rc.d/jail | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) (limited to 'etc') diff --git a/etc/rc.d/jail b/etc/rc.d/jail index d8a88e4..1049fcb 100755 --- a/etc/rc.d/jail +++ b/etc/rc.d/jail @@ -321,6 +321,8 @@ jail_extract_address() elif [ "${_type}" = "inet6" ]; then # In case _maske is not set for IPv6, use /128. _mask=${_mask:-/128} + warn "$_type $_addr: an IPv6 address should always be " \ + "specified with a prefix length. /128 is used." fi } @@ -420,7 +422,7 @@ jail_status() jail_start() { - local _j _jid _jn _jl + local _j _jid _jl if [ $# = 0 ]; then return @@ -433,12 +435,10 @@ jail_start() command_args="-f $jail_conf -c" _tmp=`mktemp -t jail` || exit 3 if $command $rc_flags $command_args >> $_tmp 2>&1; then - $jail_jls -nq | while read IN; do - _jn=$(echo $IN | tr " " "\n" | grep ^name=) - _jid=$(echo $IN | tr " " "\n" | grep ^jid=) - echo -n " ${_jn#name=}" - echo "${_jid#jid=}" \ - > /var/run/jail_${_jn#name=}.id + $jail_jls jid name | while read IN; do + set -- $IN + echo -n " $2" + echo $1 > /var/run/jail_$2.id done else tail -1 $_tmp @@ -468,9 +468,8 @@ jail_start() sleep 1 for _j in $_jl; do echo -n " ${_hostname:-${_j}}" - if _jid=$($jail_jls -n -j $_j | tr " " "\n" | \ - grep ^jid=); then - echo "${_jid#jid=}" > /var/run/jail_${_j}.id + if _jid=$($jail_jls -j $_j jid); then + echo "$_jid" > /var/run/jail_${_j}.id else rm -f /var/run/jail_${_j}.id echo " cannot start jail " \ @@ -492,9 +491,8 @@ jail_start() if $command $rc_flags $command_args \ >> $_tmp 2>&1 /var/run/jail_${_j}.id + _jid=$($jail_jls -j $_j jid) + echo $_jid > /var/run/jail_${_j}.id else rm -f /var/run/jail_${_j}.id echo " cannot start jail " \ @@ -509,7 +507,7 @@ jail_start() jail_stop() { - local _j _jn + local _j if [ $# = 0 ]; then return @@ -520,16 +518,14 @@ jail_stop() command=$jail_program rc_flags=$jail_flags command_args="-f $jail_conf -r" - $jail_jls -nq | while read IN; do - _jn=$(echo $IN | tr " " "\n" | grep ^name=) - echo -n " ${_jn#name=}" + $jail_jls name | while read _j; do + echo -n " $_j" _tmp=`mktemp -t jail` || exit 3 - $command $rc_flags $command_args ${_jn#name=} \ - >> $_tmp 2>&1 - if $jail_jls -j ${_jn#name=} > /dev/null 2>&1; then + $command $rc_flags $command_args $_j >> $_tmp 2>&1 + if $jail_jls -j $_j > /dev/null 2>&1; then tail -1 $_tmp else - rm -f /var/run/jail_${_jn#name=}.id + rm -f /var/run/jail_${_j}.id fi rm -f $_tmp done -- cgit v1.1 From 1937276d51048d9c8860de1841030471d0abce1b Mon Sep 17 00:00:00 2001 From: hrs Date: Fri, 29 Aug 2014 07:51:47 +0000 Subject: Restructure rc.d scripts for kerberos5 daemons: - Rename $kerberos5_server_enable with $kdc_enable and rename rc.d/kerberos with rc.d/kdc. - Rename $kadmin5_server_enable with $kadmind_enable. - Rename ${kerberos5,kpasswdd}_server with ${kdc,kpasswdd}_program. - Fix rc.d/{kadmind,kerberos,kpasswdd,kfd} scripts not to change variables after load_rc_config(). - Add rc.d/ipropd_master and rc.d/ipropd_slave scripts. These are for iprop-master(8) and iprop-slave(8). Keytab used for iprop service is defined in ipropd_{master,slave}_keytab (/etc/krb5.keytab by default). - Add dependency on rc.d/kdc to SERVERS. rc.d/kdc must be invoked as early as possible before scripts divided by rc.d/SERVERS. Note that changes to rc.d/{kdc,kpasswdd,kadmind} are backward-compatible with the old configuration variables: ${kerberos5,kpasswdd,kadmin5}_server{,_enable,_flags}. --- etc/defaults/rc.conf | 27 ++++++++++++++++++++------- etc/rc.d/Makefile | 4 +++- etc/rc.d/SERVERS | 2 +- etc/rc.d/ipropd_master | 40 ++++++++++++++++++++++++++++++++++++++++ etc/rc.d/ipropd_slave | 32 ++++++++++++++++++++++++++++++++ etc/rc.d/kadmind | 28 ++++++++++++++++++---------- etc/rc.d/kdc | 27 +++++++++++++++++++++++++++ etc/rc.d/kerberos | 17 ----------------- etc/rc.d/kfd | 12 +++++++++--- etc/rc.d/kpasswdd | 26 +++++++++++++++++--------- 10 files changed, 167 insertions(+), 48 deletions(-) create mode 100755 etc/rc.d/ipropd_master create mode 100755 etc/rc.d/ipropd_slave create mode 100755 etc/rc.d/kdc delete mode 100755 etc/rc.d/kerberos (limited to 'etc') diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 7c7d899..190bb9c 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -271,15 +271,28 @@ local_unbound_enable="NO" # local caching resolver # # kerberos. Do not run the admin daemons on slave servers # -kerberos5_server_enable="NO" # Run a kerberos 5 master server (or NO). -kerberos5_server="/usr/libexec/kdc" # path to kerberos 5 KDC -kerberos5_server_flags="--detach" # Additional flags to the kerberos 5 server -kadmind5_server_enable="NO" # Run kadmind (or NO) -kadmind5_server="/usr/libexec/kadmind" # path to kerberos 5 admin daemon -kpasswdd_server_enable="NO" # Run kpasswdd (or NO) -kpasswdd_server="/usr/libexec/kpasswdd" # path to kerberos 5 passwd daemon +kdc_enable="NO" # Run a kerberos 5 KDC (or NO). +kdc_program="/usr/libexec/kdc" # path to kerberos 5 KDC +kdc_flags="" # Additional flags to the kerberos 5 KDC +kadmind_enable="NO" # Run kadmind (or NO) +kadmind_program="/usr/libexec/kadmind" # path to kadmind +kpasswdd_enable="NO" # Run kpasswdd (or NO) +kpasswdd_program="/usr/libexec/kpasswdd" # path to kpasswdd kfd_enable="NO" # Run kfd (or NO) kfd_program="/usr/libexec/kfd" # path to kerberos 5 kfd daemon +kfd_flags="" +ipropd_master_enable="NO" # Run Heimdal incremental propagation daemon + # (master daemon). +ipropd_master_program="/usr/libexec/ipropd-master" +ipropd_master_flags="" # Flags to ipropd-master. +ipropd_master_keytab="/etc/krb5.keytab" # keytab for ipropd-master. +ipropd_master_slaves="" # slave node names used for /var/heimdal/slaves. +ipropd_slave_enable="NO" # Run Heimdal incremental propagation daemon + # (slave daemon). +ipropd_slave_program="/usr/libexec/ipropd-slave" +ipropd_slave_flags="" # Flags to ipropd-slave. +ipropd_slave_keytab="/etc/krb5.keytab" # keytab for ipropd-slave. +ipropd_slave_masters="" # master node names. gssd_enable="NO" # Run the gssd daemon (or NO). gssd_program="/usr/sbin/gssd" # Path to gssd. diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index 75f79b9..64e83ac 100644 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -65,12 +65,14 @@ FILES= DAEMON \ ipfw \ ipmon \ ipnat \ + ipropd_master \ + ipropd_slave \ ipsec \ iscsictl \ iscsid \ jail \ kadmind \ - kerberos \ + kdc \ keyserv \ kfd \ kld \ diff --git a/etc/rc.d/SERVERS b/etc/rc.d/SERVERS index 1cf019a..7cd156a 100755 --- a/etc/rc.d/SERVERS +++ b/etc/rc.d/SERVERS @@ -4,7 +4,7 @@ # # PROVIDE: SERVERS -# REQUIRE: mountcritremote abi ldconfig savecore watchdogd +# REQUIRE: mountcritremote abi ldconfig savecore watchdogd kdc # This is a dummy dependency, for early-start servers relying on # some basic configuration. diff --git a/etc/rc.d/ipropd_master b/etc/rc.d/ipropd_master new file mode 100755 index 0000000..0611dea --- /dev/null +++ b/etc/rc.d/ipropd_master @@ -0,0 +1,40 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: ipropd_master +# REQUIRE: kdc +# KEYWORD: shutdown + +. /etc/rc.subr + +name=ipropd_master +rcvar=${name}_enable +required_files="$ipropd_master_keytab" +start_precmd=${name}_start_precmd +start_postcmd=${name}_start_postcmd + +ipropd_master_start_precmd() +{ + + if [ -z "$ipropd_master_slaves" ]; then + warn "\$ipropd_master_slaves is empty." + return 1 + fi + for _slave in $ipropd_master_slaves; do + echo $_slave + done > /var/heimdal/slaves || return 1 + command_args="$command_args \ + --keytab=\"$ipropd_master_keytab\" \ + --detach \ + " +} +ipropd_master_start_postcmd() +{ + + echo "${name}: slave nodes: $ipropd_master_slaves" +} + +load_rc_config $name +run_rc_command "$1" diff --git a/etc/rc.d/ipropd_slave b/etc/rc.d/ipropd_slave new file mode 100755 index 0000000..803281e --- /dev/null +++ b/etc/rc.d/ipropd_slave @@ -0,0 +1,32 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: ipropd_slave +# REQUIRE: kdc +# KEYWORD: shutdown + +. /etc/rc.subr + +name=ipropd_slave +rcvar=${name}_enable +required_files="$ipropd_slave_keytab" +start_precmd=${name}_start_precmd + +ipropd_slave_start_precmd() +{ + + if [ -z "$ipropd_slave_masters" ]; then + warn "\$ipropd_slave_masters is empty." + return 1 + fi + command_args=" \ + $command_args \ + --keytab=\"$ipropd_slave_keytab\" \ + --detach \ + $ipropd_slave_masters" +} + +load_rc_config $name +run_rc_command "$1" diff --git a/etc/rc.d/kadmind b/etc/rc.d/kadmind index 1e07938..d4acd7c 100755 --- a/etc/rc.d/kadmind +++ b/etc/rc.d/kadmind @@ -3,18 +3,26 @@ # $FreeBSD$ # -# PROVIDE: kadmin -# REQUIRE: kerberos -# BEFORE: DAEMON +# PROVIDE: kadmind +# REQUIRE: kdc +# KEYWORD: shutdown . /etc/rc.subr -name="kadmind5" -load_rc_config $name -rcvar="kadmind5_server_enable" -unset start_cmd -command="${kadmind5_server}" -command_args="&" -required_vars="kerberos5_server_enable" +name=kadmind +rcvar=${name}_enable +required_vars=kdc_enable +start_precmd=${name}_start_precmd + +set_rcvar_obsolete kadmind5_server_enable kadmind_enable +set_rcvar_obsolete kadmind5_server kadmind_program +set_rcvar_obsolete kerberos5_server_enable kdc_enable + +kadmind_start_precmd() +{ + command_args="$command_args &" +} + +load_rc_config $name run_rc_command "$1" diff --git a/etc/rc.d/kdc b/etc/rc.d/kdc new file mode 100755 index 0000000..aef96df --- /dev/null +++ b/etc/rc.d/kdc @@ -0,0 +1,27 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: kdc +# REQUIRE: NETWORKING +# KEYWORD: shutdown + +. /etc/rc.subr + +name=kdc +rcvar=${name}_enable +start_precmd=${name}_start_precmd + +set_rcvar_obsolete kerberos5_server_enable kdc_enable +set_rcvar_obsolete kerberos5_server kdc_program +set_rcvar_obsolete kerberos5_server_flags kdc_flags + +kdc_start_precmd() +{ + + command_args="$command_args --detach" +} + +load_rc_config $name +run_rc_command "$1" diff --git a/etc/rc.d/kerberos b/etc/rc.d/kerberos deleted file mode 100755 index 3eeb32a..0000000 --- a/etc/rc.d/kerberos +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# PROVIDE: kerberos -# REQUIRE: NETWORKING - -. /etc/rc.subr - -name="kerberos5" -rcvar="kerberos5_server_enable" - -load_rc_config $name -command="${kerberos5_server}" -kerberos5_flags="${kerberos5_server_flags}" -run_rc_command "$1" diff --git a/etc/rc.d/kfd b/etc/rc.d/kfd index d393f95..b6d9365 100755 --- a/etc/rc.d/kfd +++ b/etc/rc.d/kfd @@ -10,8 +10,14 @@ . /etc/rc.subr name=kfd -rcvar=kfd_enable -load_rc_config $name -command_args="-i &" +rcvar=${name}_enable +start_precmd=${name}_start_precmd + +kfd_start_precmd() +{ + command_args="$command_args -i &" +} + +load_rc_config $name run_rc_command "$1" diff --git a/etc/rc.d/kpasswdd b/etc/rc.d/kpasswdd index d7f40ac..cf72d80 100755 --- a/etc/rc.d/kpasswdd +++ b/etc/rc.d/kpasswdd @@ -4,17 +4,25 @@ # # PROVIDE: kpasswdd -# REQUIRE: kadmin -# BEFORE: DAEMON +# REQUIRE: kdc +# KEYWORD: shutdown . /etc/rc.subr -name="kpasswdd" -load_rc_config $name -rcvar="kpasswdd_server_enable" -unset start_cmd -command="${kpasswdd_server}" -command_args="&" -required_vars="kadmind5_server_enable" +name=kpasswdd +rcvar=${name}_enable +required_vars=kdc_enable +start_precmd=${name}_start_precmd + +set_rcvar_obsolete kpasswdd_server_enable kpasswdd_enable +set_rcvar_obsolete kpasswdd_server kpasswdd_program +set_rcvar_obsolete kerberos5_server_enable kdc_enable + +kpasswdd_start_precmd() +{ + command_args="$command_args &" +} + +load_rc_config $name run_rc_command "$1" -- cgit v1.1 From c7aafdef00f69f8a6c776d3f404422e0045f0a38 Mon Sep 17 00:00:00 2001 From: hrs Date: Fri, 29 Aug 2014 08:02:35 +0000 Subject: Return false status only when adding a route is failed. It could erroneously return false due to an afexists() check loop in routing_start(). --- etc/rc.d/routing | 50 ++++++++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 26 deletions(-) (limited to 'etc') diff --git a/etc/rc.d/routing b/etc/rc.d/routing index c37c706..9cb07e5 100755 --- a/etc/rc.d/routing +++ b/etc/rc.d/routing @@ -23,32 +23,33 @@ ROUTE_CMD="/sbin/route" routing_start() { - local _cmd _af _if _a + local _cmd _af _if _a _ret _cmd=$1 _af=$2 _if=$3 + _ret=0 case $_if in ""|[Aa][Ll][Ll]|[Aa][Nn][Yy]) _if="" ;; esac case $_af in - inet|inet6|atm) - if afexists $_af; then - setroutes $_cmd $_af $_if - else - err 1 "Unsupported address family: $_af." - fi - ;; ""|[Aa][Ll][Ll]|[Aa][Nn][Yy]) for _a in inet inet6 atm; do - afexists $_a && setroutes $_cmd $_a $_if + afexists $_a || continue + setroutes $_cmd $_a $_if || _ret=1 done - ;; + ;; *) - err 1 "Unsupported address family: $_af." - ;; + if afexists $_af; then + setroutes $_cmd $_af $_if || _ret=1 + else + err 1 "Unsupported address family: $_af." + fi + ;; esac + + return $_ret } routing_stop() @@ -62,17 +63,6 @@ routing_stop() esac case $_af in - inet|inet6|atm) - if afexists $_af; then - eval static_${_af} delete $_if - # When $_if is specified, do not flush routes. - if ! [ -n "$_if" ]; then - eval routing_stop_${_af} - fi - else - err 1 "Unsupported address family: $_af." - fi - ;; ""|[Aa][Ll][Ll]|[Aa][Nn][Yy]) for _a in inet inet6 atm; do afexists $_a || continue @@ -82,10 +72,18 @@ routing_stop() eval routing_stop_${_a} fi done - ;; + ;; *) - err 1 "Unsupported address family: $_af." - ;; + if afexists $_af; then + eval static_${_af} delete $_if + # When $_if is specified, do not flush routes. + if ! [ -n "$_if" ]; then + eval routing_stop_${_af} + fi + else + err 1 "Unsupported address family: $_af." + fi + ;; esac } -- cgit v1.1 From c27f28026935d1ee3cc82aacd01b1dc04682ec15 Mon Sep 17 00:00:00 2001 From: hrs Date: Sat, 30 Aug 2014 07:08:10 +0000 Subject: Use ipv6_prefer when at least one ifconfig_IF_ipv6 is configured. Discussed on: -net@ --- etc/rc.d/ip6addrctl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/rc.d/ip6addrctl b/etc/rc.d/ip6addrctl index a7aa90c..8b7486f 100755 --- a/etc/rc.d/ip6addrctl +++ b/etc/rc.d/ip6addrctl @@ -75,6 +75,8 @@ ip6addrctl_start() else if checkyesno ipv6_activate_all_interfaces; then ip6addrctl_prefer_ipv6 + elif [ -n "$(list_vars ifconfig_\*_ipv6)" ]; then + ip6addrctl_prefer_ipv6 else ip6addrctl_prefer_ipv4 fi -- cgit v1.1 From 0d0ac3a76ee517fcff05a07f2364e070de6c6a6e Mon Sep 17 00:00:00 2001 From: se Date: Mon, 1 Sep 2014 16:51:57 +0000 Subject: Add vt(4) support to the console initialisation script, specifically: - Identify the console driver used and print syscons or vt as appropriate. - If vt is used and a keymap could not be loaded, then try to replace the keymap name configured in rc.conf based on a replacement list in this script. Warn about the fact, that a syscons keyname is configured and report the replacement used under vt. - If no replacement keymap is found, no keymap is loaded and a warning is displayed, which points at the conversion script and allows the conversion of keymaps not part of the official distribution. This patch has been sent to the -hackers list for review, but no comment has been received, yet. It is tested to work under syscons and vt on my system (on vt with either the syscons or vt keymap file name in rc.conf). MFC after: 3 days --- etc/rc.d/syscons | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 115 insertions(+), 4 deletions(-) (limited to 'etc') diff --git a/etc/rc.d/syscons b/etc/rc.d/syscons index f611e3b..0dc41ad 100755 --- a/etc/rc.d/syscons +++ b/etc/rc.d/syscons @@ -45,16 +45,122 @@ stop_cmd=":" kbddev=/dev/ttyv0 viddev=/dev/ttyv0 -_sc_config="syscons" +_sc_config= +_sc_console= _sc_initdone= +_sc_keymap_msg= sc_init() { if [ -z "${_sc_initdone}" ]; then + if [ -z "${_sc_console}" ]; then + if [ x`sysctl -n kern.vty` = x"vt" ]; then + _sc_console="vt" + else + _sc_console="syscons" + fi + _sc_config="${_sc_console}" + fi echo -n "Configuring ${_sc_config}:" _sc_initdone=yes fi } +# syscons to vt migration helper +lookup_keymap_for_vt() +{ + keymap=`basename $1 .kbd` + case $keymap in +hy.armscii-8) echo am;; +be.iso.acc) echo be.acc;; +be.iso) echo be;; +bg.bds.ctrlcaps) echo bg.bds;; +bg.phonetic.ctrlcaps) echo bg.phonetic;; +br275.iso.acc) echo br;; +br275.*) echo br.noacc;; +by.*) echo by;; +fr_CA.iso.acc) echo ca-fr;; +swissgerman.macbook.acc) echo ch.macbook.acc;; +swissgerman.iso.acc) echo ch.acc;; +swissgerman.*) echo ch;; +swissfrench.iso.acc) echo ch-fr.acc;; +swissfrench.*) echo ch-fr;; +ce.iso2) echo centraleuropean.qwerty;; +colemak.iso15.acc) echo colemak.acc;; +cs.*|cz.*) echo cz;; +german.iso.acc) echo de.acc;; +german.*) echo de;; +danish.iso.acc) echo dk.acc;; +danish.iso.macbook) echo dk.macbook;; +danish.*) echo dk;; +estonian.*) echo ee;; +spanish.dvorak) echo es.dvorak;; +spanish.iso*.acc) echo es.acc;; +spanish.iso) echo es;; +finnish.*) echo fi;; +fr.macbook.acc) echo fr.macbook;; +fr.iso.acc) echo fr.acc;; +fr.iso) echo fr;; +el.iso07) echo gr;; +gr.us101.acc) echo gr.101.acc;; +hr.iso) echo hr;; +hu.iso2.101keys) echo hu.101;; +hu.iso2.102keys) echo hu.102;; +iw.iso8) echo il;; +icelandic.iso.acc) echo is.acc;; +icelandic.iso) echo is;; +it.iso) echo it;; +jp.106x) echo jp.capsctrl;; +jp.106) echo jp;; +#?? jp.pc98.iso) echo jp.pc98;; +kk.pt154.io) echo kz.io;; +kk.pt154.kst) echo kz.kst;; +latinamerican.iso.acc) echo latinamerican.acc;; +lt.iso4) echo lt;; +norwegian.iso) echo no;; +norwegian.dvorak) echo no.dvorak;; +dutch.iso.acc) echo nl;; +eee_nordic) echo nordic.asus-eee;; +pl_PL.dvorak) echo pl.dvorak;; +pl_PL.ISO8859-2) echo pl;; +pt.iso.acc) echo pt.acc;; +pt.iso) echo pt;; +ru.koi8-r.shift) echo ru.shift;; +ru.koi8-r.win) echo ru.win;; +ru.*) echo ru;; +swedish.*) echo se;; +si.iso) echo si;; +sk.iso2) echo sk;; +tr.iso9.q) echo tr;; +ua.koi8-u.shift.alt) echo ua.shift.alt;; +ua.*) echo ua;; +uk.*-ctrl) echo uk.capsctrl;; +uk.dvorak) echo uk.dvorak;; +uk.*) echo uk;; +us.iso.acc) echo us.acc;; +us.pc-ctrl) echo us.ctrl;; +us.iso) echo us;; + esac +} + +kbdcontrol_load_keymap() +{ + errmsg=`kbdcontrol < ${kbddev} -l ${keymap} 2>&1` + if [ -n "${errmsg}" -a "${_sc_console}" = "vt" ]; then + _sc_keymap_msg="${errmsg}" + keymap_vt=`lookup_keymap_for_vt ${keymap}` + if [ -n "${keymap_vt}" ]; then + errmsg=`kbdcontrol < ${kbddev} -l ${keymap_vt} 2>&1` + if [ -z "${errmsg}" ]; then + _sc_keymap_msg="New keymap: In /etc/rc.conf replace 'keymap=${keymap}' by 'keymap=${keymap_vt}'" + fi + else + _sc_keymap_msg="No replacement found for keymap '${keymap}'. +You may try to convert your keymap file using 'convert-keymap.pl', which is +part of the system sources and located in /usr/src/tools/tools/vt/keymaps/" + fi + fi +} + # helper syscons_configure_keyboard() { @@ -65,7 +171,7 @@ syscons_configure_keyboard() ;; *) sc_init - echo -n ' keymap'; kbdcontrol < ${kbddev} -l ${keymap} + echo -n ' keymap'; kbdcontrol_load_keymap ;; esac @@ -139,10 +245,9 @@ syscons_setkeyboard() # if [ -n "${_sc_initdone}" ]; then echo '.' - _sc_config="syscons" + _sc_config="${_sc_console}" _sc_initdone= fi - } syscons_precmd() @@ -256,6 +361,12 @@ syscons_start() fi [ -n "${_sc_initdone}" ] && echo '.' + if [ -n "${_sc_keymap_msg}" ]; then + echo + echo "WARNING:" + echo "${_sc_keymap_msg}." + echo + fi } load_rc_config $name -- cgit v1.1 From 91458022a75325482e379a08e6e75c57cdd2efc2 Mon Sep 17 00:00:00 2001 From: imp Date: Wed, 3 Sep 2014 21:59:07 +0000 Subject: Create a /boot/dtb directory to house DTB blobs. The flattened device tree support includes a device tree source compiler dtc(8) which converts .dts files into .dtb files. /boot/loader will load dtb files from this directory by default, allowing for fewer differences between images for different SoCs. Compiled dts files will wind up here eventually as an alternative to embedding them into the kernel. Document this in hier(7), as well as add missing entries for /boot/firmware and /boot/zfs, though the latter two should only be considered place holders if someone wants to make them better. --- etc/mtree/BSD.root.dist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.root.dist b/etc/mtree/BSD.root.dist index 7b8d9e7..af2f6a9 100644 --- a/etc/mtree/BSD.root.dist +++ b/etc/mtree/BSD.root.dist @@ -10,6 +10,8 @@ boot defaults .. + dtb + .. firmware .. kernel -- cgit v1.1 From 2d9d64ca44af1c88ddc687d0beab2e2d81fd765b Mon Sep 17 00:00:00 2001 From: gjb Date: Thu, 4 Sep 2014 02:06:33 +0000 Subject: Fix typo: s/_maske/_mask/ MFC after: 3 days Sponsored by: The FreeBSD Foundation --- etc/rc.d/jail | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/rc.d/jail b/etc/rc.d/jail index 1049fcb..75f3775 100755 --- a/etc/rc.d/jail +++ b/etc/rc.d/jail @@ -319,7 +319,7 @@ jail_extract_address() _mask=${_mask:-/32} elif [ "${_type}" = "inet6" ]; then - # In case _maske is not set for IPv6, use /128. + # In case _mask is not set for IPv6, use /128. _mask=${_mask:-/128} warn "$_type $_addr: an IPv6 address should always be " \ "specified with a prefix length. /128 is used." -- cgit v1.1 From b3e65adf91ff2b52bad7965ac75d0bae3b8e4be1 Mon Sep 17 00:00:00 2001 From: hrs Date: Thu, 4 Sep 2014 22:00:52 +0000 Subject: Fix a bug which prevented mount.fstab parameter from being converted when jail_JID_devfs_enable=NO. Spotted by: peter --- etc/rc.d/jail | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'etc') diff --git a/etc/rc.d/jail b/etc/rc.d/jail index 75f3775..cf1c6e2 100755 --- a/etc/rc.d/jail +++ b/etc/rc.d/jail @@ -207,6 +207,10 @@ parse_options() extract_var $_j consolelog exec.consolelog - \ /var/log/jail_${_j}_console.log + if [ -r $_fstab ]; then + echo " mount.fstab = \"$_fstab\";" + fi + eval : \${jail_${_j}_devfs_enable:=${jail_devfs_enable:-NO}} if checkyesno jail_${_j}_devfs_enable; then echo " mount.devfs;" @@ -222,11 +226,7 @@ parse_options() ;; *) warn "devfs_ruleset must be an integer." ;; esac - if [ -r $_fstab ]; then - echo " mount.fstab = \"$_fstab\";" - fi fi - eval : \${jail_${_j}_fdescfs_enable:=${jail_fdescfs_enable:-NO}} if checkyesno jail_${_j}_fdescfs_enable; then echo " mount.fdescfs;" -- cgit v1.1 From 0104da71d7721ade4ea6bded9f6ec087d3d06f6a Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 8 Sep 2014 05:14:58 +0000 Subject: Temporarily remove the warning added r270781 - it prints the warning regardless of whether the usage is correct or not and this generates a LOT of noise, even when you have specified a mask. --- etc/rc.d/jail | 2 -- 1 file changed, 2 deletions(-) (limited to 'etc') diff --git a/etc/rc.d/jail b/etc/rc.d/jail index cf1c6e2..0b886fd 100755 --- a/etc/rc.d/jail +++ b/etc/rc.d/jail @@ -321,8 +321,6 @@ jail_extract_address() elif [ "${_type}" = "inet6" ]; then # In case _mask is not set for IPv6, use /128. _mask=${_mask:-/128} - warn "$_type $_addr: an IPv6 address should always be " \ - "specified with a prefix length. /128 is used." fi } -- cgit v1.1 From 6224f5c9f14f60cc6203ad68f112f57f4a9eedbf Mon Sep 17 00:00:00 2001 From: des Date: Mon, 8 Sep 2014 09:33:43 +0000 Subject: Use the correct idiom for default values, and ensure that the script works correctly if the user overrides them. PR: 193255 Submitted by: hrs@ MFC after: 3 days --- etc/defaults/rc.conf | 7 +++++++ etc/rc.d/local_unbound | 20 ++++++-------------- 2 files changed, 13 insertions(+), 14 deletions(-) (limited to 'etc') diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 190bb9c..766116e 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -267,6 +267,13 @@ hastd_program="/sbin/hastd" # path to hastd, if you want a different one. hastd_flags="" # Optional flags to hastd. ctld_enable="NO" # CAM Target Layer / iSCSI target daemon. local_unbound_enable="NO" # local caching resolver +local_unbound_program="/usr/sbin/unbound" +local_unbound_workdir=/var/unbound +local_unbound_config="${local_unbound_workdir}/unbound.conf" +local_unbound_flags="-c${local_unbound_config}" +local_unbound_forwardconf="${local_unbound_workdir}/forward.conf}" +local_unbound_anchor="${local_unbound_workdir}/root.key" +local_unbound_forwarders="" # # kerberos. Do not run the admin daemons on slave servers diff --git a/etc/rc.d/local_unbound b/etc/rc.d/local_unbound index ed69c19..9a7e191 100755 --- a/etc/rc.d/local_unbound +++ b/etc/rc.d/local_unbound @@ -13,7 +13,6 @@ name="local_unbound" desc="local caching forwarding resolver" rcvar="local_unbound_enable" -command="/usr/sbin/unbound" extra_commands="anchor configtest reload setup" start_precmd="local_unbound_prestart" reload_precmd="local_unbound_configtest" @@ -22,18 +21,9 @@ configtest_cmd="local_unbound_configtest" setup_cmd="local_unbound_setup" pidfile="/var/run/${name}.pid" -: ${local_unbound_workdir:=/var/unbound} -: ${local_unbound_config:=${local_unbound_workdir}/unbound.conf} -: ${local_unbound_flags:=-c${local_unbound_config}} -: ${local_unbound_forwardconf:=${local_unbound_workdir}/forward.conf} -: ${local_unbound_anchor:=${local_unbound_workdir}/root.key} -: ${local_unbound_forwarders:=} - -load_rc_config $name - do_as_unbound() { - echo "$@" | su -m unbound + echo "$@" | /usr/bin/su -m unbound } # @@ -41,7 +31,8 @@ do_as_unbound() # local_unbound_anchor() { - do_as_unbound /usr/sbin/unbound-anchor -a ${local_unbound_anchor} + do_as_unbound ${local_unbound_program%/*}/unbound-anchor \ + -a ${local_unbound_anchor} # we can't trust the exit code - check if the file exists [ -f ${local_unbound_anchor} ] } @@ -51,7 +42,8 @@ local_unbound_anchor() # local_unbound_configtest() { - do_as_unbound /usr/sbin/unbound-checkconf ${local_unbound_config} + do_as_unbound ${local_unbound_program%/*}/unbound-checkconf \ + ${local_unbound_config} } # @@ -61,7 +53,7 @@ local_unbound_configtest() local_unbound_setup() { echo "Performing initial setup." - /usr/sbin/local-unbound-setup -n \ + ${local_unbound_program%/*}/local-unbound-setup -n \ -u unbound \ -w ${local_unbound_workdir} \ -c ${local_unbound_config} \ -- cgit v1.1 From 1798b7ca76fa9c6311943319eeb651993428e45b Mon Sep 17 00:00:00 2001 From: des Date: Mon, 8 Sep 2014 12:26:52 +0000 Subject: Revert r271257 after several issues were pointed out. An updated patch will be committed at a later date. --- etc/defaults/rc.conf | 7 ------- etc/rc.d/local_unbound | 20 ++++++++++++++------ 2 files changed, 14 insertions(+), 13 deletions(-) (limited to 'etc') diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 766116e..190bb9c 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -267,13 +267,6 @@ hastd_program="/sbin/hastd" # path to hastd, if you want a different one. hastd_flags="" # Optional flags to hastd. ctld_enable="NO" # CAM Target Layer / iSCSI target daemon. local_unbound_enable="NO" # local caching resolver -local_unbound_program="/usr/sbin/unbound" -local_unbound_workdir=/var/unbound -local_unbound_config="${local_unbound_workdir}/unbound.conf" -local_unbound_flags="-c${local_unbound_config}" -local_unbound_forwardconf="${local_unbound_workdir}/forward.conf}" -local_unbound_anchor="${local_unbound_workdir}/root.key" -local_unbound_forwarders="" # # kerberos. Do not run the admin daemons on slave servers diff --git a/etc/rc.d/local_unbound b/etc/rc.d/local_unbound index 9a7e191..ed69c19 100755 --- a/etc/rc.d/local_unbound +++ b/etc/rc.d/local_unbound @@ -13,6 +13,7 @@ name="local_unbound" desc="local caching forwarding resolver" rcvar="local_unbound_enable" +command="/usr/sbin/unbound" extra_commands="anchor configtest reload setup" start_precmd="local_unbound_prestart" reload_precmd="local_unbound_configtest" @@ -21,9 +22,18 @@ configtest_cmd="local_unbound_configtest" setup_cmd="local_unbound_setup" pidfile="/var/run/${name}.pid" +: ${local_unbound_workdir:=/var/unbound} +: ${local_unbound_config:=${local_unbound_workdir}/unbound.conf} +: ${local_unbound_flags:=-c${local_unbound_config}} +: ${local_unbound_forwardconf:=${local_unbound_workdir}/forward.conf} +: ${local_unbound_anchor:=${local_unbound_workdir}/root.key} +: ${local_unbound_forwarders:=} + +load_rc_config $name + do_as_unbound() { - echo "$@" | /usr/bin/su -m unbound + echo "$@" | su -m unbound } # @@ -31,8 +41,7 @@ do_as_unbound() # local_unbound_anchor() { - do_as_unbound ${local_unbound_program%/*}/unbound-anchor \ - -a ${local_unbound_anchor} + do_as_unbound /usr/sbin/unbound-anchor -a ${local_unbound_anchor} # we can't trust the exit code - check if the file exists [ -f ${local_unbound_anchor} ] } @@ -42,8 +51,7 @@ local_unbound_anchor() # local_unbound_configtest() { - do_as_unbound ${local_unbound_program%/*}/unbound-checkconf \ - ${local_unbound_config} + do_as_unbound /usr/sbin/unbound-checkconf ${local_unbound_config} } # @@ -53,7 +61,7 @@ local_unbound_configtest() local_unbound_setup() { echo "Performing initial setup." - ${local_unbound_program%/*}/local-unbound-setup -n \ + /usr/sbin/local-unbound-setup -n \ -u unbound \ -w ${local_unbound_workdir} \ -c ${local_unbound_config} \ -- cgit v1.1 From ec56ad408f8f497ee4f4cdd640b5b8c10493cad7 Mon Sep 17 00:00:00 2001 From: bdrewery Date: Tue, 9 Sep 2014 17:03:58 +0000 Subject: Don't cross mount boundaries when cleaning tmp files. Mounting something in /tmp such as a build jail with nullfs mounts for some directories can result in very surprising results the next day. MFC after: 2 weeks Relnotes: yes --- etc/periodic/daily/110.clean-tmps | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'etc') diff --git a/etc/periodic/daily/110.clean-tmps b/etc/periodic/daily/110.clean-tmps index eef3bc6..67bcec6 100755 --- a/etc/periodic/daily/110.clean-tmps +++ b/etc/periodic/daily/110.clean-tmps @@ -45,8 +45,8 @@ case "$daily_clean_tmps_enable" in rc=$(for dir in $daily_clean_tmps_dirs do [ ."${dir#/}" != ."$dir" -a -d $dir ] && cd $dir && { - find -d . -type f $args -delete $print - find -d . ! -name . -type d $dargs -delete $print + find -x -d . -type f $args -delete $print + find -x -d . ! -name . -type d $dargs -delete $print } | sed "s,^\\., $dir," done | tee /dev/stderr | wc -l) [ -z "$print" ] && rc=0 -- cgit v1.1 From 9e4c2e60325e025e2d03da9eeecd353a4dba10b7 Mon Sep 17 00:00:00 2001 From: hrs Date: Thu, 11 Sep 2014 12:30:29 +0000 Subject: - Add $netif_ipexpand_max to specify the upper limit for the number of addresses generated by an address range specification. The default value is 2048. This can be increased by setting $netif_ipexpand_max in rc.conf. - Fix warning messages when an address range spec exceeds the upper limit. PR: 186841 --- etc/defaults/rc.conf | 1 + etc/network.subr | 12 +++++------- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'etc') diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 190bb9c..7a39a27 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -110,6 +110,7 @@ synchronous_dhclient="NO" # Start dhclient directly on configured # interfaces during startup. defaultroute_delay="30" # Time to wait for a default route on a DHCP interface. defaultroute_carrier_delay="5" # Time to wait for carrier while waiting for a default route. +netif_ipexpand_max="2048" # Maximum number of IP addrs in a range spec. wpa_supplicant_program="/usr/sbin/wpa_supplicant" wpa_supplicant_flags="-s" # Extra flags to pass to wpa_supplicant wpa_supplicant_conf_file="/etc/wpa_supplicant.conf" diff --git a/etc/network.subr b/etc/network.subr index f67622d..520c9e8 100644 --- a/etc/network.subr +++ b/etc/network.subr @@ -25,9 +25,7 @@ # $FreeBSD$ # IFCONFIG_CMD="/sbin/ifconfig" - -# Maximum number of addresses expanded from a address range specification. -_IPEXPANDMAX=31 +: ${netif_ipexpand_max:=2048} # # Subroutines commonly used from network startup scripts. @@ -886,8 +884,8 @@ ifalias_expand_addr_inet() _ipcount=$_iplow while [ "$_ipcount" -le "$_iphigh" ]; do _retstr="${_retstr} ${_iphead}${_iphead:+.}${_ipcount}${_iptail:+.}${_iptail}${_plen:+/}${_plen}" - if [ $_ipcount -gt $(($_iplow + $_IPEXPANDMAX)) ]; then - warn "Range specification is too large (${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_iphigh}${_iptail:+.}${_iptail}). ${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_ipcount}${_iptail:+.}${_iptail} was processed." + if [ $_ipcount -gt $(($_iplow + $netif_ipexpand_max)) ]; then + warn "Range specification is too large (${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_iphigh}${_iptail:+.}${_iptail}). ${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_ipcount}${_iptail:+.}${_iptail} was processed. Increase \$netif_ipexpand_max in rc.conf." break else _ipcount=$(($_ipcount + 1)) @@ -976,9 +974,9 @@ ifalias_expand_addr_inet6() $_ipleft $_ipcount $_ipright \ ${_plen:+/}$_plen` _retstr="$_retstr $_r" - if [ $_ipcount -gt $(($_iplow + $_IPEXPANDMAX)) ] + if [ $_ipcount -gt $(($_iplow + $netif_ipexpand_max)) ] then - warn "Range specification is too large $(printf '(%s:%04x%s-%s:%04x%s)' $_ipleft $_iplow $_ipright $_ipleft $_iphigh $_ipright). $(printf '%s:%04x%s-%s:%04x%s' $_ipleft $_iplow $_ipright $_ipleft $_ipcount $_ipright) was processed." + warn "Range specification is too large $(printf '(%s:%x%s-%s:%x%s)' "$_ipleft" "$_iplow" "$_ipright" "$_ipleft" "$_iphigh" "$_ipright"). $(printf '%s:%x%s-%s:%x%s' "$_ipleft" "$_iplow" "$_ipright" "$_ipleft" "$_ipcount" "$_ipright") was processed. Increase \$netif_ipexpand_max in rc.conf." break else _ipcount=$(($_ipcount + 1)) -- cgit v1.1 From cb4f5443aed276fd51d094c45205701976147a3d Mon Sep 17 00:00:00 2001 From: wblock Date: Thu, 11 Sep 2014 18:24:16 +0000 Subject: Update motd, clarifying the information and adding pointers to other resources. MFC after: 3 days --- etc/motd | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) (limited to 'etc') diff --git a/etc/motd b/etc/motd index 50ce29d..e616d51 100644 --- a/etc/motd +++ b/etc/motd @@ -1,25 +1,21 @@ FreeBSD ?.?.? (UNKNOWN) -Welcome to FreeBSD! +Welcome to FreeBSD! Handy technical support resources: -Before seeking technical support, please use the following resources: +Security advisories and errata: https://www.FreeBSD.org/releases/ +Handbook: https://www.FreeBSD.org/handbook/ +FAQ: https://www.FreeBSD.org/faq/ +Mailing list: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/ +Forums: https://forums.FreeBSD.org/ -o Security advisories and updated errata information for all releases are - at http://www.FreeBSD.org/releases/ - always consult the ERRATA section - for your release first as it's updated frequently. +Documents installed with the system are in the /usr/local/share/doc/freebsd/ +directory, or can be installed later with: pkg install en-freebsd-doc +For other languages, replace "en" with a language code like de or fr. -o The Handbook and FAQ documents are at http://www.FreeBSD.org/ and, - along with the mailing lists, can be searched by going to - http://www.FreeBSD.org/search/. If the doc package has been installed - (or fetched via pkg install lang-freebsd-doc, where lang is the - 2-letter language code, e.g. en), they are also available formatted - in /usr/local/share/doc/freebsd. +Show the version of FreeBSD installed: uname -a +Please include that output and any error messages when posting questions. -If you still have a question or problem, please take the output of -`uname -a', along with any relevant error messages, and email it -as a question to the questions@FreeBSD.org mailing list. If you are -unfamiliar with FreeBSD's directory layout, please refer to the hier(7) -manual page. If you are not familiar with manual pages, type `man man'. +Introduction to manual pages: man man +FreeBSD directory layout: man hier Edit /etc/motd to change this login announcement. - -- cgit v1.1 From edc7ea3a5d36632b4b34de01da7109a81c9b39cf Mon Sep 17 00:00:00 2001 From: delphij Date: Sat, 13 Sep 2014 02:15:31 +0000 Subject: Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft, many thanks for their continued support of FreeBSD. While I'm there, also implement a new build knob, WITHOUT_HYPERV to disable building and installing of the HyperV utilities when necessary. The HyperV utilities are only built for i386 and amd64 targets. This is a stable/10 candidate for inclusion with 10.1-RELEASE. Submitted by: Wei Hu MFC after: 1 week --- etc/mtree/BSD.usr.dist | 2 ++ etc/mtree/BSD.var.dist | 2 ++ etc/rc.d/Makefile | 5 +++++ etc/rc.d/hv_kvpd | 15 +++++++++++++++ 4 files changed, 24 insertions(+) create mode 100644 etc/rc.d/hv_kvpd (limited to 'etc') diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index 0848500..977cf75 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -108,6 +108,8 @@ .. bsdinstall .. + hyperv + .. lpr ru .. diff --git a/etc/mtree/BSD.var.dist b/etc/mtree/BSD.var.dist index 990c23c..7d4af0b 100644 --- a/etc/mtree/BSD.var.dist +++ b/etc/mtree/BSD.var.dist @@ -42,6 +42,8 @@ .. freebsd-update mode=0700 .. + hyperv mode=0700 + .. ipf mode=0700 .. pkg diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index 64e83ac..d0897e3 100644 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -57,6 +57,7 @@ FILES= DAEMON \ hostid \ hostid_save \ hostname \ + ${_hv_kvpd} \ inetd \ initrandom \ ip6addrctl \ @@ -192,6 +193,10 @@ _ubthidhci= ubthidhci _casperd= casperd .endif +.if ${MK_HYPERV} != "no" +_hv_kvpd= hv_kvpd +.endif + .if ${MK_UNBOUND} != "no" _unbound= local_unbound .endif diff --git a/etc/rc.d/hv_kvpd b/etc/rc.d/hv_kvpd new file mode 100644 index 0000000..78e4b74 --- /dev/null +++ b/etc/rc.d/hv_kvpd @@ -0,0 +1,15 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: hv_kvpd + +. /etc/rc.subr + +name="hv_kvp_daemon" +command="/usr/sbin/${name}" +required_dirs="/var/db/hyperv" + +load_rc_config $name +run_rc_command "$1" -- cgit v1.1 From de7f3e3c402722bf4ff53574b0312000025685af Mon Sep 17 00:00:00 2001 From: hrs Date: Sat, 13 Sep 2014 18:54:15 +0000 Subject: Do not set net.inet.ip.{sourceroute,accept_sourceroute} in a vnet jail. The following warnings were displayed: sysctl: net.inet.ip.sourceroute=0: Operation not permitted sysctl: net.inet.ip.accept_sourceroute=0: Operation not permitted --- etc/rc.d/routing | 28 +++++++++++++++------------- etc/rc.subr | 16 ++++++++++++++++ 2 files changed, 31 insertions(+), 13 deletions(-) (limited to 'etc') diff --git a/etc/rc.d/routing b/etc/rc.d/routing index 9cb07e5..f511cd3 100755 --- a/etc/rc.d/routing +++ b/etc/rc.d/routing @@ -326,20 +326,22 @@ options_inet() ${SYSCTL} net.inet.ip.forwarding=0 > /dev/null fi - if checkyesno forward_sourceroute; then - ropts_init inet - echo -n ' do source routing=YES' - ${SYSCTL} net.inet.ip.sourceroute=1 > /dev/null - else - ${SYSCTL} net.inet.ip.sourceroute=0 > /dev/null - fi + if ! check_jail vnet; then + if checkyesno forward_sourceroute; then + ropts_init inet + echo -n ' do source routing=YES' + ${SYSCTL} net.inet.ip.sourceroute=1 > /dev/null + else + ${SYSCTL} net.inet.ip.sourceroute=0 > /dev/null + fi - if checkyesno accept_sourceroute; then - ropts_init inet - echo -n ' accept source routing=YES' - ${SYSCTL} net.inet.ip.accept_sourceroute=1 > /dev/null - else - ${SYSCTL} net.inet.ip.accept_sourceroute=0 > /dev/null + if checkyesno accept_sourceroute; then + ropts_init inet + echo -n ' accept source routing=YES' + ${SYSCTL} net.inet.ip.accept_sourceroute=1 > /dev/null + else + ${SYSCTL} net.inet.ip.accept_sourceroute=0 > /dev/null + fi fi if checkyesno arpproxy_all; then diff --git a/etc/rc.subr b/etc/rc.subr index ff4e898..97b631f 100644 --- a/etc/rc.subr +++ b/etc/rc.subr @@ -1966,6 +1966,22 @@ check_required_after() return 0 } +# check_jail mib +# Return true if security.jail.$mib exists and set to 1. + +check_jail() +{ + local _mib _v + + _mib=$1 + if _v=$(${SYSCTL_N} "security.jail.$_mib" 2> /dev/null); then + case $_v in + 1) return 0;; + esac + fi + return 1 +} + # check_kern_features mib # Return existence of kern.features.* sysctl MIB as true or # false. The result will be cached in $_rc_cache_kern_features_ -- cgit v1.1 From 0d57c69d7bcff6b7ff4abcbcd7b8eb07b3696055 Mon Sep 17 00:00:00 2001 From: hrs Date: Mon, 15 Sep 2014 07:20:40 +0000 Subject: Make net.inet.ip.sourceroute, net.inet.ip.accept_sourceroute, and net.inet.ip.process_options vnet-aware. Revert changes in r271545. Suggested by: bz --- etc/rc.d/routing | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'etc') diff --git a/etc/rc.d/routing b/etc/rc.d/routing index f511cd3..9cb07e5 100755 --- a/etc/rc.d/routing +++ b/etc/rc.d/routing @@ -326,22 +326,20 @@ options_inet() ${SYSCTL} net.inet.ip.forwarding=0 > /dev/null fi - if ! check_jail vnet; then - if checkyesno forward_sourceroute; then - ropts_init inet - echo -n ' do source routing=YES' - ${SYSCTL} net.inet.ip.sourceroute=1 > /dev/null - else - ${SYSCTL} net.inet.ip.sourceroute=0 > /dev/null - fi + if checkyesno forward_sourceroute; then + ropts_init inet + echo -n ' do source routing=YES' + ${SYSCTL} net.inet.ip.sourceroute=1 > /dev/null + else + ${SYSCTL} net.inet.ip.sourceroute=0 > /dev/null + fi - if checkyesno accept_sourceroute; then - ropts_init inet - echo -n ' accept source routing=YES' - ${SYSCTL} net.inet.ip.accept_sourceroute=1 > /dev/null - else - ${SYSCTL} net.inet.ip.accept_sourceroute=0 > /dev/null - fi + if checkyesno accept_sourceroute; then + ropts_init inet + echo -n ' accept source routing=YES' + ${SYSCTL} net.inet.ip.accept_sourceroute=1 > /dev/null + else + ${SYSCTL} net.inet.ip.accept_sourceroute=0 > /dev/null fi if checkyesno arpproxy_all; then -- cgit v1.1 From 1669d588d5f0aca653c6f4e00306fa52d3c840f1 Mon Sep 17 00:00:00 2001 From: hrs Date: Tue, 16 Sep 2014 05:45:38 +0000 Subject: Fix a typo; master server for iprop service should be singular. --- etc/defaults/rc.conf | 2 +- etc/rc.d/ipropd_slave | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'etc') diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 7a39a27..b24e869 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -293,7 +293,7 @@ ipropd_slave_enable="NO" # Run Heimdal incremental propagation daemon ipropd_slave_program="/usr/libexec/ipropd-slave" ipropd_slave_flags="" # Flags to ipropd-slave. ipropd_slave_keytab="/etc/krb5.keytab" # keytab for ipropd-slave. -ipropd_slave_masters="" # master node names. +ipropd_slave_master="" # master node name. gssd_enable="NO" # Run the gssd daemon (or NO). gssd_program="/usr/sbin/gssd" # Path to gssd. diff --git a/etc/rc.d/ipropd_slave b/etc/rc.d/ipropd_slave index 803281e..70c4c70 100755 --- a/etc/rc.d/ipropd_slave +++ b/etc/rc.d/ipropd_slave @@ -17,15 +17,15 @@ start_precmd=${name}_start_precmd ipropd_slave_start_precmd() { - if [ -z "$ipropd_slave_masters" ]; then - warn "\$ipropd_slave_masters is empty." + if [ -z "$ipropd_slave_master" ]; then + warn "\$ipropd_slave_master is empty." return 1 fi command_args=" \ $command_args \ --keytab=\"$ipropd_slave_keytab\" \ --detach \ - $ipropd_slave_masters" + $ipropd_slave_master" } load_rc_config $name -- cgit v1.1 From 4fa78dd391a93e96782b57f095c6d19eff84f8b2 Mon Sep 17 00:00:00 2001 From: sbruno Date: Tue, 16 Sep 2014 20:02:16 +0000 Subject: Add proper disable/enable hooks to the default scripts so that this is only run when asked for by the user. Right now, hv_kvpd is run on every boot. Don't do that. Add hv_kvpd_enable= for this script to be run. MFC with 271493 MFC after: 2 weeks Relnotes: yes --- etc/defaults/rc.conf | 2 ++ etc/rc.d/hv_kvpd | 1 + 2 files changed, 3 insertions(+) (limited to 'etc') diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index b24e869..5efe78b 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -684,6 +684,8 @@ jail_enable="NO" # Set to NO to disable starting of any jails jail_parallel_start="NO" # Start jails in the background jail_list="" # Space separated list of names of jails +hv_kvpd_enable="NO" # Start the Hyper-V key-value Pair Driver hv_kvp(4) + ############################################################## ### Define source_rc_confs, the mechanism used by /etc/rc.* ## ### scripts to source rc_conf_files overrides safely. ## diff --git a/etc/rc.d/hv_kvpd b/etc/rc.d/hv_kvpd index 78e4b74..284c7de 100644 --- a/etc/rc.d/hv_kvpd +++ b/etc/rc.d/hv_kvpd @@ -8,6 +8,7 @@ . /etc/rc.subr name="hv_kvp_daemon" +rcvar="kp_kvpd_enable" command="/usr/sbin/${name}" required_dirs="/var/db/hyperv" -- cgit v1.1 From 6ea28efcbc7b1db08e8275cfdca1a4f723f7536c Mon Sep 17 00:00:00 2001 From: sbruno Date: Tue, 16 Sep 2014 20:48:13 +0000 Subject: Such typo, many email, very spelling. wow. MFC with 271688 271493 Submitted by: ngie ian MFC after: 2 weeks Relnotes: yes --- etc/rc.d/hv_kvpd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/rc.d/hv_kvpd b/etc/rc.d/hv_kvpd index 284c7de..164ec53 100644 --- a/etc/rc.d/hv_kvpd +++ b/etc/rc.d/hv_kvpd @@ -8,7 +8,7 @@ . /etc/rc.subr name="hv_kvp_daemon" -rcvar="kp_kvpd_enable" +rcvar="hv_kvpd_enable" command="/usr/sbin/${name}" required_dirs="/var/db/hyperv" -- cgit v1.1 From f38530676caf0a6e9637453a93d886cd96f5c9ae Mon Sep 17 00:00:00 2001 From: delphij Date: Wed, 17 Sep 2014 02:32:22 +0000 Subject: Use a devd event to start hv_kvpd instead of doing so in rc.d script. This is cleaner and eliminates the unneeded startup of KVP daemon on systems that do not run as a Hyper-V guest. Submitted by: hrs X-MFC-with: 271493, 271688, 271699 --- etc/defaults/rc.conf | 2 -- etc/devd/Makefile | 4 ++++ etc/devd/hyperv.conf | 19 +++++++++++++++++++ etc/rc.d/Makefile | 5 ----- etc/rc.d/hv_kvpd | 16 ---------------- 5 files changed, 23 insertions(+), 23 deletions(-) create mode 100644 etc/devd/hyperv.conf delete mode 100644 etc/rc.d/hv_kvpd (limited to 'etc') diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 5efe78b..b24e869 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -684,8 +684,6 @@ jail_enable="NO" # Set to NO to disable starting of any jails jail_parallel_start="NO" # Start jails in the background jail_list="" # Space separated list of names of jails -hv_kvpd_enable="NO" # Start the Hyper-V key-value Pair Driver hv_kvp(4) - ############################################################## ### Define source_rc_confs, the mechanism used by /etc/rc.* ## ### scripts to source rc_conf_files overrides safely. ## diff --git a/etc/devd/Makefile b/etc/devd/Makefile index 94cafdc..82a5000 100644 --- a/etc/devd/Makefile +++ b/etc/devd/Makefile @@ -18,6 +18,10 @@ FILES+= uath.conf usb.conf FILES+= zfs.conf .endif +.if ${MK_HYPERV} != "no" +FILES+= hyperv.conf +.endif + NO_OBJ= FILESDIR= /etc/devd FILESMODE= 644 diff --git a/etc/devd/hyperv.conf b/etc/devd/hyperv.conf new file mode 100644 index 0000000..8abafa9 --- /dev/null +++ b/etc/devd/hyperv.conf @@ -0,0 +1,19 @@ +# $FreeBSD$ +# +# Hyper-V specific events + +notify 10 { + match "system" "DEVFS"; + match "subsystem" "CDEV"; + match "type" "CREATE"; + match "cdev" "/dev/hv_kvp_dev"; + action "/usr/sbin/hv_kvp_daemon"; +}; + +notify 10 { + match "system" "DEVFS"; + match "subsystem" "CDEV"; + match "type" "DESTROY"; + match "cdev" "/dev/hv_kvp_dev"; + action "pkill -x hv_kvp_daemon"; +}; diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index d0897e3..64e83ac 100644 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -57,7 +57,6 @@ FILES= DAEMON \ hostid \ hostid_save \ hostname \ - ${_hv_kvpd} \ inetd \ initrandom \ ip6addrctl \ @@ -193,10 +192,6 @@ _ubthidhci= ubthidhci _casperd= casperd .endif -.if ${MK_HYPERV} != "no" -_hv_kvpd= hv_kvpd -.endif - .if ${MK_UNBOUND} != "no" _unbound= local_unbound .endif diff --git a/etc/rc.d/hv_kvpd b/etc/rc.d/hv_kvpd deleted file mode 100644 index 164ec53..0000000 --- a/etc/rc.d/hv_kvpd +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# PROVIDE: hv_kvpd - -. /etc/rc.subr - -name="hv_kvp_daemon" -rcvar="hv_kvpd_enable" -command="/usr/sbin/${name}" -required_dirs="/var/db/hyperv" - -load_rc_config $name -run_rc_command "$1" -- cgit v1.1 From 8fbdaa50eadab69ef1db450a95198973f693f629 Mon Sep 17 00:00:00 2001 From: will Date: Thu, 18 Sep 2014 14:41:57 +0000 Subject: Fix incremental builds involving non-root users with read-only source files. Makefiles should not assume that source files can be overwritten. This is the common case for Perforce source trees. This is a followup commit to r211243 in the same vein. MFC after: 1 month Sponsored by: Spectra Logic MFSpectraBSD: r1036319 on 2014/01/29, r1046711 on 2014/03/06 --- etc/mail/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'etc') diff --git a/etc/mail/Makefile b/etc/mail/Makefile index 3f085cc..510b024 100644 --- a/etc/mail/Makefile +++ b/etc/mail/Makefile @@ -69,7 +69,7 @@ SENDMAIL_MC!= hostname SENDMAIL_MC:= ${SENDMAIL_MC}.mc ${SENDMAIL_MC}: - cp freebsd.mc ${SENDMAIL_MC} + cp -f freebsd.mc ${SENDMAIL_MC} .endif .ifndef SENDMAIL_SUBMIT_MC @@ -77,7 +77,7 @@ SENDMAIL_SUBMIT_MC!= hostname SENDMAIL_SUBMIT_MC:= ${SENDMAIL_SUBMIT_MC}.submit.mc ${SENDMAIL_SUBMIT_MC}: - cp freebsd.submit.mc ${SENDMAIL_SUBMIT_MC} + cp -f freebsd.submit.mc ${SENDMAIL_SUBMIT_MC} .endif INSTALL_CF= ${SENDMAIL_MC:R}.cf -- cgit v1.1 From c8f0850d9e1c2c06eda5a31abdb0e409175d8ee6 Mon Sep 17 00:00:00 2001 From: hrs Date: Fri, 19 Sep 2014 07:18:45 +0000 Subject: Fix cdev. It is a device node name, not a pathname. --- etc/devd/hyperv.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'etc') diff --git a/etc/devd/hyperv.conf b/etc/devd/hyperv.conf index 8abafa9..bed7383 100644 --- a/etc/devd/hyperv.conf +++ b/etc/devd/hyperv.conf @@ -6,7 +6,7 @@ notify 10 { match "system" "DEVFS"; match "subsystem" "CDEV"; match "type" "CREATE"; - match "cdev" "/dev/hv_kvp_dev"; + match "cdev" "hv_kvp_dev"; action "/usr/sbin/hv_kvp_daemon"; }; @@ -14,6 +14,6 @@ notify 10 { match "system" "DEVFS"; match "subsystem" "CDEV"; match "type" "DESTROY"; - match "cdev" "/dev/hv_kvp_dev"; + match "cdev" "hv_kvp_dev"; action "pkill -x hv_kvp_daemon"; }; -- cgit v1.1 From cb2834e3bed1bd7c6138695e314d56a4335945e5 Mon Sep 17 00:00:00 2001 From: ngie Date: Sat, 20 Sep 2014 05:49:15 +0000 Subject: Sort the optional rc.d scripts by their knobs MFC after: 1 week Sponsored by: EMC / Isilon Storage Division --- etc/rc.d/Makefile | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'etc') diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index 64e83ac..bb2c177 100644 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -169,27 +169,27 @@ FILES= DAEMON \ zfs \ zvol -.if ${MK_OFED} != "no" -_opensm= opensm +.if ${MK_BLUETOOTH} != "no" +_bluetooth= bluetooth +_bthidd= bthidd +_hcsecd= hcsecd +_ubthidhci= ubthidhci .endif -.if ${MK_OPENSSH} != "no" -_sshd= sshd +.if ${MK_CASPER} != "no" +_casperd= casperd .endif .if ${MK_NS_CACHING} != "no" _nscd= nscd .endif -.if ${MK_BLUETOOTH} != "no" -_bluetooth= bluetooth -_bthidd= bthidd -_hcsecd= hcsecd -_ubthidhci= ubthidhci +.if ${MK_OFED} != "no" +_opensm= opensm .endif -.if ${MK_CASPER} != "no" -_casperd= casperd +.if ${MK_OPENSSH} != "no" +_sshd= sshd .endif .if ${MK_UNBOUND} != "no" -- cgit v1.1 From 559aae68ec0a01e19862f6706a27a20e92a1e894 Mon Sep 17 00:00:00 2001 From: ngie Date: Sat, 20 Sep 2014 06:05:24 +0000 Subject: Don't install /etc/rc.d/rwho unless MK_RCMDS == yes MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division --- etc/rc.d/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index bb2c177..b5e14d4 100644 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -133,7 +133,6 @@ FILES= DAEMON \ rpcbind \ rtadvd \ rtsold \ - rwho \ savecore \ sdpd \ securelevel \ @@ -192,6 +191,10 @@ _opensm= opensm _sshd= sshd .endif +.if ${MK_RCMDS} != "no" +FILES+= rwho +.endif + .if ${MK_UNBOUND} != "no" _unbound= local_unbound .endif -- cgit v1.1 From f345ebf7972ea03d2a4b5ccb4e21cabacc00a3c9 Mon Sep 17 00:00:00 2001 From: ngie Date: Sat, 20 Sep 2014 06:34:34 +0000 Subject: Don't install /etc/rc.d/ftp-proxy unless MK_PF == yes MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division --- etc/rc.d/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index b5e14d4..186c974 100644 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -44,7 +44,6 @@ FILES= DAEMON \ dumpon \ faith \ fsck \ - ftp-proxy \ ftpd \ gbde \ geli \ @@ -191,6 +190,10 @@ _opensm= opensm _sshd= sshd .endif +.if ${MK_PF} != "no" +FILES+= ftp-proxy +.endif + .if ${MK_RCMDS} != "no" FILES+= rwho .endif -- cgit v1.1 From e6285cbc7cdddd6065630d467e0d9c0eba01ab27 Mon Sep 17 00:00:00 2001 From: marcel Date: Sat, 20 Sep 2014 21:02:54 +0000 Subject: Add unit tests for mkimg(1): --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 5438176..527e611 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -253,6 +253,8 @@ .. m4 .. + mkimg + .. ncal .. printf -- cgit v1.1 From ae206eb32a7c030d62d03aeba45e89508027cd62 Mon Sep 17 00:00:00 2001 From: jmmv Date: Mon, 22 Sep 2014 09:54:48 +0000 Subject: Register /usr/tests/lib/libproc to fix build. Missed in r271937, reviewed in D710. --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 527e611..beec7a3 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -89,6 +89,8 @@ .. libnv .. + libproc + .. libutil .. .. -- cgit v1.1 From 4acc8ae3764b8098473f377a4898ba90ba195e78 Mon Sep 17 00:00:00 2001 From: se Date: Mon, 22 Sep 2014 11:54:13 +0000 Subject: The new naming scheme for keymap files for use with vt(4) introduced a collision for "no" as a country code with "NO" meaning "do not load any keymap" (which also has been the default value in etc/defaults/rc.conf for a long time). The result of this collision is, that "kbdcontrol -l no" will load the Norwegian keymap, while "keymap=no" in rc.conf was interpreted as the lower case spelling of "NO" meaning "no keyboard" (and "no.kbd" was not loaded). Fix this by matching only the upper-case spelling "NO" in rc.d/syscons when deciding whether to load a keymap file. This will lead to "no.kbd" being loaded, if the until now valid (but non-default) spelling "no" was used in an individual rc.conf file to mean "no keyboard". But all alternatives I could think of introduce a larger violation of POLA ... Reported by: Gyrd Thane Lange (gyrd-se at thanelange.no) MFC after: 3 days --- etc/rc.d/syscons | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/rc.d/syscons b/etc/rc.d/syscons index 0dc41ad..a60ac4c 100755 --- a/etc/rc.d/syscons +++ b/etc/rc.d/syscons @@ -167,7 +167,7 @@ syscons_configure_keyboard() # keymap # case ${keymap} in - [Nn][Oo] | '') + NO | '') ;; *) sc_init -- cgit v1.1 From c6bdc8ffe7f5502bd9ffd5aa6e6ce5816a71d002 Mon Sep 17 00:00:00 2001 From: markj Date: Tue, 23 Sep 2014 18:38:06 +0000 Subject: Remove settings for pkg_* scripts which are no longer present. MFC after: 1 week --- etc/defaults/periodic.conf | 8 -------- 1 file changed, 8 deletions(-) (limited to 'etc') diff --git a/etc/defaults/periodic.conf b/etc/defaults/periodic.conf index 8520fc5..bbf97d9 100644 --- a/etc/defaults/periodic.conf +++ b/etc/defaults/periodic.conf @@ -75,10 +75,6 @@ daily_backup_passwd_enable="YES" # Backup passwd & group # 210.backup-aliases daily_backup_aliases_enable="YES" # Backup mail aliases -# 220.backup-pkgdb -daily_backup_pkgdb_enable="YES" # Backup /var/db/pkg -daily_backup_pkgdb_dir="/var/backups" - # 300.calendar daily_calendar_enable="NO" # Run calendar -a @@ -257,10 +253,6 @@ security_status_passwdless_period="daily" security_status_logincheck_enable="YES" security_status_logincheck_period="daily" -# 460.chkportsum -security_status_chkportsum_enable="NO" # Check ports w/ wrong checksum -security_status_chkportsum_period="daily" - # 500.ipfwdenied security_status_ipfwdenied_enable="YES" security_status_ipfwdenied_period="daily" -- cgit v1.1 From 207b1a98a8f5b0025c8574e906732e4f03d52397 Mon Sep 17 00:00:00 2001 From: ngie Date: Tue, 23 Sep 2014 22:07:08 +0000 Subject: Don't install /etc/rc.d/keyserv unless MK_OPENSSL == yes Sponsored by: EMC / Isilon Storage Division --- etc/rc.d/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index 186c974..12c87db 100644 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -72,7 +72,6 @@ FILES= DAEMON \ jail \ kadmind \ kdc \ - keyserv \ kfd \ kld \ kldxref \ @@ -186,6 +185,10 @@ _nscd= nscd _opensm= opensm .endif +.if ${MK_OPENSSL} != "no" +FILES+= keyserv +.endif + .if ${MK_OPENSSH} != "no" _sshd= sshd .endif -- cgit v1.1 From c262e70a87b89ddd34f5489f22111a619647c998 Mon Sep 17 00:00:00 2001 From: wblock Date: Thu, 25 Sep 2014 21:57:35 +0000 Subject: Revised to better point to release notes and errata, security advisories, and be more specific about the -questions list. MFC after: 3 days --- etc/motd | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'etc') diff --git a/etc/motd b/etc/motd index e616d51..e70e98d 100644 --- a/etc/motd +++ b/etc/motd @@ -1,12 +1,13 @@ FreeBSD ?.?.? (UNKNOWN) -Welcome to FreeBSD! Handy technical support resources: +Welcome to FreeBSD! -Security advisories and errata: https://www.FreeBSD.org/releases/ -Handbook: https://www.FreeBSD.org/handbook/ -FAQ: https://www.FreeBSD.org/faq/ -Mailing list: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/ -Forums: https://forums.FreeBSD.org/ +Release Notes, Errata: https://www.FreeBSD.org/releases/ +Security Advisories: https://www.FreeBSD.org/security/ +FreeBSD Handbook: https://www.FreeBSD.org/handbook/ +FreeBSD FAQ: https://www.FreeBSD.org/faq/ +Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/ +FreeBSD Forums: https://forums.FreeBSD.org/ Documents installed with the system are in the /usr/local/share/doc/freebsd/ directory, or can be installed later with: pkg install en-freebsd-doc @@ -14,7 +15,6 @@ For other languages, replace "en" with a language code like de or fr. Show the version of FreeBSD installed: uname -a Please include that output and any error messages when posting questions. - Introduction to manual pages: man man FreeBSD directory layout: man hier -- cgit v1.1 From 91dfb922803c98bede9e276b6c80d8f639c34a77 Mon Sep 17 00:00:00 2001 From: hselasky Date: Sun, 28 Sep 2014 12:41:48 +0000 Subject: Regenerate usb.conf MFC after: 3 days --- etc/devd/usb.conf | 128 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 115 insertions(+), 13 deletions(-) (limited to 'etc') diff --git a/etc/devd/usb.conf b/etc/devd/usb.conf index c8d252a..7828a85 100644 --- a/etc/devd/usb.conf +++ b/etc/devd/usb.conf @@ -65,7 +65,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x03f0"; - match "product" "(0x2016|0x2116|0x2216|0x3016|0x3116)"; + match "product" "(0x2016|0x2116|0x2216)"; + action "kldload -n uipaq"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x03f0"; + match "product" "(0x241d|0x251d)"; + action "kldload -n u3g"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x03f0"; + match "product" "(0x3016|0x3116)"; action "kldload -n uipaq"; }; @@ -129,7 +145,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0403"; - match "product" "(0x6001|0x6004|0x6006|0x6006|0x6010|0x6011|0x6014|0x6015|0x8372|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbbe2|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbcda|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed73|0xed74|0xee18|0xeee8|0xeee9|0xeeea|0xeeeb|0xeeec|0xeeed|0xeeee|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)"; + match "product" "(0x6001|0x6004|0x6006|0x6006|0x6010|0x6011|0x6014|0x6015|0x8372|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xa6d1|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbbe2|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbcda|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed73|0xed74|0xee18|0xeee8|0xeee9|0xeeea|0xeeeb|0xeeec|0xeeed|0xeeee|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)"; action "kldload -n uftdi"; }; @@ -1057,7 +1073,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0586"; - match "product" "(0x3416|0x341a)"; + match "product" "(0x3416|0x341a|0x341e)"; action "kldload -n if_run"; }; @@ -1097,7 +1113,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x05ac"; - match "product" "(0x020d|0x020e|0x020f|0x0215|0x0217|0x0218|0x0219|0x021a|0x021b|0x021c)"; + match "product" "(0x020d|0x020e|0x020f|0x0210|0x0214|0x0215|0x0216|0x0217|0x0218|0x0219|0x021a|0x021b|0x021c)"; action "kldload -n atp"; }; @@ -2353,7 +2369,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0b05"; - match "product" "(0x17b5|0x17cb)"; + match "product" "0x17b5"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0b05"; + match "product" "0x17ba"; + action "kldload -n if_urtwn"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0b05"; + match "product" "0x17cb"; action "kldload -n ng_ubt"; }; @@ -2481,7 +2513,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0bda"; - match "product" "(0x018a|0x317f)"; + match "product" "(0x0179|0x018a|0x317f)"; action "kldload -n if_urtwn"; }; @@ -2513,7 +2545,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0bda"; - match "product" "(0x8176|0x8176|0x8177|0x8178|0x817a|0x817b|0x817c|0x817d|0x817e)"; + match "product" "(0x8176|0x8176|0x8177|0x8178|0x8179|0x817a|0x817b|0x817c|0x817d|0x817e)"; action "kldload -n if_urtwn"; }; @@ -2929,6 +2961,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0df6"; + match "product" "0x0072"; + action "kldload -n if_axge"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0df6"; match "product" "0x061c"; action "kldload -n if_axe"; }; @@ -3577,7 +3617,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x12d1"; - match "product" "(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1464|0x1465|0x14ac|0x14c9|0x14d1|0x14fe|0x1505|0x1506|0x1520|0x1521|0x1803|0x1c05|0x1c0b)"; + match "product" "(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1464|0x1465|0x14ac|0x14c9|0x14d1|0x14fe|0x1505|0x1506|0x1520|0x1521)"; + action "kldload -n u3g"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; + match "product" "0x155b"; + action "kldload -n if_cdce"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; + match "product" "(0x1803|0x1c05|0x1c0b)"; action "kldload -n u3g"; }; @@ -3753,7 +3809,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x1410"; - match "product" "(0x1100|0x1110|0x1120|0x1130|0x1400|0x1410|0x1420|0x1430|0x1450|0x2100|0x2110|0x2120|0x2130|0x2400|0x2410|0x2420|0x4100|0x4400|0x5010|0x5020|0x5041|0x5100|0x6000|0x6002|0x7042)"; + match "product" "(0x1100|0x1110|0x1120|0x1130|0x1400|0x1410|0x1420|0x1430|0x1450|0x2100|0x2110|0x2120|0x2130|0x2400|0x2410|0x2420|0x4100|0x4400|0x5010|0x5020|0x5041|0x5100|0x6000|0x6002|0x7001|0x7031|0x7042)"; action "kldload -n u3g"; }; @@ -4553,7 +4609,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x1cf1"; - match "product" "(0x0001|0x0004)"; + match "product" "(0x0001|0x0004|0x0022)"; action "kldload -n uftdi"; }; @@ -4568,6 +4624,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x1d34"; + match "product" "0x0004"; + action "kldload -n uled"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x1d4d"; match "product" "(0x0002|0x000c|0x000e|0x0010)"; action "kldload -n if_run"; @@ -4633,7 +4697,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x2001"; - match "product" "(0x3307|0x3308|0x3309|0x330a|0x330d)"; + match "product" "(0x3307|0x3308|0x3309|0x330a|0x330d|0x330f)"; action "kldload -n if_urtwn"; }; @@ -4665,7 +4729,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x2001"; - match "product" "(0x3c09|0x3c0a|0x3c15|0x3c1a|0x3c1b|0x3c1f)"; + match "product" "(0x3c09|0x3c0a|0x3c15|0x3c1a|0x3c1b|0x3c1f|0x3c20)"; action "kldload -n if_run"; }; @@ -4689,6 +4753,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x2001"; + match "product" "0x4a00"; + action "kldload -n if_axge"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x2001"; match "product" "(0x7e12|0xa805)"; action "kldload -n u3g"; }; @@ -5232,6 +5304,36 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x12d1"; + match "intclass" "0xff"; + match "intsubclass" "0x02"; + match "intprotocol" "0x16"; + action "kldload -n if_cdce"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; + match "intclass" "0xff"; + match "intsubclass" "0x02"; + match "intprotocol" "0x46"; + action "kldload -n if_cdce"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; + match "intclass" "0xff"; + match "intsubclass" "0x02"; + match "intprotocol" "0x76"; + action "kldload -n if_cdce"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "intclass" "0x02"; match "intsubclass" "0x02"; match "intprotocol" "0x00"; @@ -5399,5 +5501,5 @@ nomatch 32 { action "kldload -n umass"; }; -# 2621 USB entries processed +# 2643 USB entries processed -- cgit v1.1 From fd6a7f8ca9a6e8a5ad987094edf77b876f3e7284 Mon Sep 17 00:00:00 2001 From: hrs Date: Thu, 2 Oct 2014 01:16:30 +0000 Subject: Resurrect set_rcvar() as a function to define a rc.conf variable. It defines a variable and its default value in load_rc_config() just after rc.conf is loaded. "rcvar" command shows the current and the default values. This is an attempt to solve a problem that rc.d scripts from third-party software do not have entries in /etc/defaults/rc.conf. The fact that load_rc_config() reads rc.conf only once and /etc/rc invokes the function before running rc.d scripts made developers confused for a long time because load_rc_config() just before run_rc_command() in each rc.d script overrides variables only when the script is directly invoked, not from /etc/rc. Variables defined in set_rcvar are always set in load_rc_config() after loading rc.conf. An rc.d script can now be written in a self-contained manner regarding the related variables as follows: --- name=foo rcvar=foo_enable set_rcvar foo_enable YES "Enable $name" set_rcvar foo_flags "-s" "Flags to $name" ... load_rc_config $name run_rc_command "$@" --- --- etc/rc.subr | 43 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) (limited to 'etc') diff --git a/etc/rc.subr b/etc/rc.subr index 97b631f..4b3fddf 100644 --- a/etc/rc.subr +++ b/etc/rc.subr @@ -68,6 +68,39 @@ list_vars() done; } } +# set_rcvar [var] [defval] [desc] +# +# Echo or define a rc.conf(5) variable name. Global variable +# $rcvars is used. +# +# If no argument is specified, echo "${name}_enable". +# +# If only a var is specified, echo "${var}_enable". +# +# If var and defval are specified, the ${var} is defined as +# rc.conf(5) variable and the default value is ${defvar}. An +# optional argument $desc can also be specified to add a +# description for that. +# +set_rcvar() +{ + local _var + + case $# in + 0) echo ${name}_enable ;; + 1) echo ${1}_enable ;; + *) + debug "set_rcvar: \$$1=$2 is added" \ + " as a rc.conf(5) variable." + _var=$1 + rcvars="${rcvars# } $_var" + eval ${_var}_defval=\"$2\" + shift 2 + eval ${_var}_desc=\"$*\" + ;; + esac +} + # set_rcvar_obsolete oldvar [newvar] [msg] # Define obsolete variable. # Global variable $rcvars_obsolete is used. @@ -76,7 +109,7 @@ set_rcvar_obsolete() { local _var _var=$1 - debug "rcvar_obsolete: \$$1(old) -> \$$2(new) is defined" + debug "set_rcvar_obsolete: \$$1(old) -> \$$2(new) is defined" rcvars_obsolete="${rcvars_obsolete# } $1" eval ${1}_newvar=\"$2\" @@ -1091,8 +1124,8 @@ $command $rc_flags $command_args" echo "" fi echo "#" - # Get unique vars in $rcvar - for _v in $rcvar; do + # Get unique vars in $rcvar $rcvars + for _v in $rcvar $rcvars; do case $v in $_v\ *|\ *$_v|*\ $_v\ *) ;; *) v="${v# } $_v" ;; @@ -1238,7 +1271,7 @@ run_rc_script() unset name command command_args command_interpreter \ extra_commands pidfile procname \ - rcvar rcvars_obsolete required_dirs required_files \ + rcvar rcvars rcvars_obsolete required_dirs required_files \ required_vars eval unset ${_arg}_cmd ${_arg}_precmd ${_arg}_postcmd @@ -1306,7 +1339,7 @@ load_rc_config() done # Set defaults if defined. - for _var in $rcvar; do + for _var in $rcvar $rcvars; do eval _defval=\$${_var}_defval if [ -n "$_defval" ]; then eval : \${$_var:=\$${_var}_defval} -- cgit v1.1 From 1319daf6688fee426cae9267e4467a62398a4c14 Mon Sep 17 00:00:00 2001 From: brd Date: Thu, 2 Oct 2014 19:53:37 +0000 Subject: - Add a test for bug 191427 where pw(8) will go into an infinite loop Reviewed by: will MFC after: 1 month --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index beec7a3..3a9d0e0 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -287,6 +287,8 @@ .. newsyslog .. + pw + .. sa .. .. -- cgit v1.1 From c4fbacfa9e4777a7a18301b700ecfbc1f4bf1cca Mon Sep 17 00:00:00 2001 From: ngie Date: Thu, 9 Oct 2014 00:32:33 +0000 Subject: Integrate usr.sbin/nmtree/tests from NetBSD into atf/kyua In collaboration with: pho Sponsored by: EMC / Isilon Storage Division --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 3a9d0e0..9014223 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -287,6 +287,8 @@ .. newsyslog .. + nmtree + .. pw .. sa -- cgit v1.1 From bdd90c4710b9a9c83d5e6e8f0119e03791950d81 Mon Sep 17 00:00:00 2001 From: ngie Date: Thu, 9 Oct 2014 00:37:58 +0000 Subject: Set the autoindent to 4 spaces with vim in BSD.tests.dist This will prevent vim users from accidentally checking in buggy mtree files (mixed tabs/spaces). MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 9014223..bf3484d 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -296,3 +296,5 @@ .. .. .. + +# vim: set expandtab ts=4 sw=4: -- cgit v1.1 From 52c660bb437a8980d615e8dc0fd595bd5ee1cc2d Mon Sep 17 00:00:00 2001 From: ngie Date: Thu, 9 Oct 2014 00:41:42 +0000 Subject: Integrate usr.sbin/basename/tests from NetBSD into atf/kyua In collaboration with: pho Sponsored by: EMC / Isilon Storage Division --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index bf3484d..0042e9c 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -143,6 +143,8 @@ usr.bin apply .. + basename + .. bmake archives fmt_44bsd -- cgit v1.1 From 70c01e4074dc74d961b044db91e4308b87b168f0 Mon Sep 17 00:00:00 2001 From: ngie Date: Thu, 9 Oct 2014 00:50:33 +0000 Subject: Integrate usr.bin/cmp/tests from NetBSD into atf/kyua In collaboration with: sjg Sponsored by: EMC / Isilon Storage Division --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 0042e9c..66367cc 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -245,6 +245,8 @@ .. calendar .. + cmp + .. comm .. file2c -- cgit v1.1 From 82aaaa0800a608b2e6744cc9119ea1ff62ff7493 Mon Sep 17 00:00:00 2001 From: ngie Date: Thu, 9 Oct 2014 00:55:04 +0000 Subject: Integrate usr.bin/dirname/tests from NetBSD into atf/kyua In collaboration with: pho, sjg Sponsored by: EMC / Isilon Storage Division --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 66367cc..16e4b60 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -249,6 +249,8 @@ .. comm .. + dirname + .. file2c .. join -- cgit v1.1 From d99fd4f0d70e31d83d6f2e000c265c3ddae1eb82 Mon Sep 17 00:00:00 2001 From: ngie Date: Thu, 9 Oct 2014 01:39:07 +0000 Subject: Integrate bin/sleep/tests from NetBSD into atf/kyua Sponsored by: EMC / Isilon Storage Division --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 16e4b60..e91af3d 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -47,6 +47,8 @@ set-e .. .. + sleep + .. test .. .. -- cgit v1.1 From 429a4fc8f23942aadf2231e6c2d2e26eebe1b135 Mon Sep 17 00:00:00 2001 From: ngie Date: Thu, 9 Oct 2014 01:46:31 +0000 Subject: Integrate usr.bin/cut/tests from NetBSD into atf/kyua Sponsored by: EMC / Isilon Storage Division --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index e91af3d..6932551 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -251,6 +251,8 @@ .. comm .. + cut + .. dirname .. file2c -- cgit v1.1 From 9cf2b42641723fc9186176c799339e4834f76bc4 Mon Sep 17 00:00:00 2001 From: ngie Date: Thu, 9 Oct 2014 01:53:23 +0000 Subject: Integrate usr.bin/grep/tests from NetBSD into atf/kyua Sponsored by: EMC / Isilon Storage Division --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 6932551..fd4921a 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -257,6 +257,8 @@ .. file2c .. + grep + .. join .. jot -- cgit v1.1 From af608f76fa1171ecd0fd85a221cf87c780abe6ea Mon Sep 17 00:00:00 2001 From: ngie Date: Thu, 9 Oct 2014 02:07:34 +0000 Subject: Integrate usr.bin/diff/tests from NetBSD into atf/kyua at gnu/usr.bin/diff/tests Sponsored by: EMC / Isilon Storage Division --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index fd4921a..72b34ac 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -70,6 +70,8 @@ lib .. usr.bin + diff + .. .. .. lib -- cgit v1.1 From 9de8ee6c0c9bd7196f7b443fe919f04089a6b67e Mon Sep 17 00:00:00 2001 From: ngie Date: Thu, 9 Oct 2014 02:24:34 +0000 Subject: Integrate usr.bin/gzip/tests from NetBSD into atf/kyua Sponsored by: EMC / Isilon Storage Division --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 72b34ac..45c2d7c 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -261,6 +261,8 @@ .. grep .. + gzip + .. join .. jot -- cgit v1.1 From afe30bff57647805e6b0295dfe0927d23ce1d3ce Mon Sep 17 00:00:00 2001 From: hselasky Date: Thu, 9 Oct 2014 13:58:19 +0000 Subject: Add example devd configuration file for USB printers. --- etc/devd/Makefile | 2 +- etc/devd/ulpt.conf | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 etc/devd/ulpt.conf (limited to 'etc') diff --git a/etc/devd/Makefile b/etc/devd/Makefile index 82a5000..6d1031e 100644 --- a/etc/devd/Makefile +++ b/etc/devd/Makefile @@ -11,7 +11,7 @@ FILES+= asus.conf .endif .if ${MK_USB} != "no" -FILES+= uath.conf usb.conf +FILES+= uath.conf ulpt.conf usb.conf .endif .if ${MK_ZFS} != "no" diff --git a/etc/devd/ulpt.conf b/etc/devd/ulpt.conf new file mode 100644 index 0000000..2082726 --- /dev/null +++ b/etc/devd/ulpt.conf @@ -0,0 +1,18 @@ +# +# $FreeBSD$ +# + +# +# Example devd configuration file for USB printers. +# Uncomment the notify rule below to enable. +# +# Generic USB printer devices +#notify 100 { +# match "system" "USB"; +# match "subsystem" "INTERFACE"; +# match "type" "ATTACH"; +# match "intclass" "0x07"; +# match "intsubclass" "0x01"; +# match "intprotocol" "(0x01|0x02|0x03)"; +# action "chown root:wheel /dev/$cdev"; +#}; -- cgit v1.1 From ab0d138ede761ad218858e4c784f261517032129 Mon Sep 17 00:00:00 2001 From: hrs Date: Sat, 11 Oct 2014 20:28:04 +0000 Subject: Rename s/network/netif/ and set netif_enable for namespace consistency. --- etc/defaults/rc.conf | 1 + etc/rc.d/netif | 31 ++++++++++++++++--------------- 2 files changed, 17 insertions(+), 15 deletions(-) (limited to 'etc') diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index b24e869..18989fa 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -110,6 +110,7 @@ synchronous_dhclient="NO" # Start dhclient directly on configured # interfaces during startup. defaultroute_delay="30" # Time to wait for a default route on a DHCP interface. defaultroute_carrier_delay="5" # Time to wait for carrier while waiting for a default route. +netif_enable="YES" # Set to YES to initialize network interfaces netif_ipexpand_max="2048" # Maximum number of IP addrs in a range spec. wpa_supplicant_program="/usr/sbin/wpa_supplicant" wpa_supplicant_flags="-s" # Extra flags to pass to wpa_supplicant diff --git a/etc/rc.d/netif b/etc/rc.d/netif index 154f1ce..dd0dde2 100755 --- a/etc/rc.d/netif +++ b/etc/rc.d/netif @@ -33,9 +33,10 @@ . /etc/rc.subr . /etc/network.subr -name="network" -start_cmd="network_start" -stop_cmd="network_stop" +name="netif" +rcvar="${name}_enable" +start_cmd="netif_start" +stop_cmd="netif_stop" cloneup_cmd="clone_up" clonedown_cmd="clone_down" clear_cmd="doclear" @@ -47,7 +48,7 @@ cmdifn= set_rcvar_obsolete ipv6_enable ipv6_activate_all_interfaces set_rcvar_obsolete ipv6_prefer -network_start() +netif_start() { local _if @@ -71,7 +72,7 @@ network_start() ifnet_rename $cmdifn # Configure the interface(s). - network_common ifn_start $cmdifn + netif_common ifn_start $cmdifn if [ -f /etc/rc.d/ipfilter ] ; then # Resync ipfilter @@ -87,19 +88,19 @@ network_start() fi } -network_stop() +netif_stop() { _clone_down=1 - network_stop0 $* + netif_stop0 $* } doclear() { _clone_down= - network_stop0 $* + netif_stop0 $* } -network_stop0() +netif_stop0() { local _if @@ -108,7 +109,7 @@ network_stop0() cmdifn=$* # Deconfigure the interface(s) - network_common ifn_stop $cmdifn + netif_common ifn_stop $cmdifn # Destroy cloned interfaces if [ -n "$_clone_down" ]; then @@ -126,28 +127,28 @@ vnet_up() { cmdifn=$* - network_common ifn_vnetup $cmdifn + netif_common ifn_vnetup $cmdifn } vnet_down() { cmdifn=$* - network_common ifn_vnetdown $cmdifn + netif_common ifn_vnetdown $cmdifn } -# network_common routine +# netif_common routine # Common configuration subroutine for network interfaces. This # routine takes all the preparatory steps needed for configuriing # an interface and then calls $routine. -network_common() +netif_common() { local _cooked_list _tmp_list _fail _func _ok _str _cmdifn _func= if [ -z "$1" ]; then - err 1 "network_common(): No function name specified." + err 1 "netif_common(): No function name specified." else _func="$1" shift -- cgit v1.1 From 77616d41a2ce3744b35e68b8a3c12e562283a322 Mon Sep 17 00:00:00 2001 From: hrs Date: Sat, 11 Oct 2014 23:49:27 +0000 Subject: Add ${name}_env and ${name}_prepend. ${name}_env is an argument list which will be passed to env(1). ${name}_prepend is simply prepended to the command line for $command. --- etc/rc.subr | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/rc.subr b/etc/rc.subr index 4b3fddf..387b909 100644 --- a/etc/rc.subr +++ b/etc/rc.subr @@ -749,6 +749,8 @@ check_startmsgs() # NOTE: $flags from the parent environment # can be used to override this. # +# ${name}_env n Environment variables to run ${command} with. +# # ${name}_fib n Routing table number to run ${command} with. # # ${name}_nice n Nice level to run ${command} at. @@ -764,6 +766,8 @@ check_startmsgs() # to run the chrooted ${command} with. # Requires /usr to be mounted. # +# ${name}_prepend n Command added before ${command}. +# # ${rc_arg}_cmd n If set, use this as the method when invoked; # Otherwise, use default command (see below) # @@ -937,7 +941,8 @@ run_rc_command() eval _chdir=\$${name}_chdir _chroot=\$${name}_chroot \ _nice=\$${name}_nice _user=\$${name}_user \ _group=\$${name}_group _groups=\$${name}_groups \ - _fib=\$${name}_fib + _fib=\$${name}_fib _env=\$${name}_env \ + _prepend=\$${name}_prepend if [ -n "$_user" ]; then # unset $_user if running as that user if [ "$_user" = "$(eval $IDCMD)" ]; then @@ -1022,12 +1027,14 @@ run_rc_command() _doit="\ ${_nice:+nice -n $_nice }\ ${_fib:+setfib -F $_fib }\ +${_env:+env $_env }\ chroot ${_user:+-u $_user }${_group:+-g $_group }${_groups:+-G $_groups }\ $_chroot $command $rc_flags $command_args" else _doit="\ ${_chdir:+cd $_chdir && }\ ${_fib:+setfib -F $_fib }\ +${_env:+env $_env }\ $command $rc_flags $command_args" if [ -n "$_user" ]; then _doit="su -m $_user -c 'sh -c \"$_doit\"'" @@ -1038,6 +1045,9 @@ $command $rc_flags $command_args" fi _doit="nice -n $_nice $_doit" fi + if [ -n "$_prepend" ]; then + _doit="$_prepend $_doit" + fi fi # run the full command -- cgit v1.1 From 106faa14620e91e82461ef043cd93dcd67ffa2af Mon Sep 17 00:00:00 2001 From: hrs Date: Sun, 12 Oct 2014 02:42:36 +0000 Subject: Add env and prepend to _rc_namevarlist. --- etc/rc.subr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/rc.subr b/etc/rc.subr index 387b909..6534f68 100644 --- a/etc/rc.subr +++ b/etc/rc.subr @@ -2050,7 +2050,7 @@ check_kern_features() # check_namevarlist var # Return "0" if ${name}_var is reserved in rc.subr. -_rc_namevarlist="program chroot chdir flags fib nice user group groups" +_rc_namevarlist="program chroot chdir env flags fib nice user group groups prepend" check_namevarlist() { local _v -- cgit v1.1 From 71bc2d78463933cae06f488e3121ad429ca6786f Mon Sep 17 00:00:00 2001 From: jhibbits Date: Sun, 12 Oct 2014 19:12:48 +0000 Subject: Add an AC line monitor so power_profile can work Summary: Add a polling loop (1Hz) to monitor the battery and AC status, to notify devd like ACPI does for power monitoring. This allows /etc/rc.d/power_profile to work on PowerPC laptops Test Plan: Tested on a Titanium PowerBook, configuring economy_cpu_freq and performance_cpu_freq, disabling powerd. Reviewers: #powerpc, nwhitehorn Reviewed By: nwhitehorn Subscribers: rpaulo Differential Revision: https://reviews.freebsd.org/D937 --- etc/devd/apple.conf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/devd/apple.conf b/etc/devd/apple.conf index 8518890..7f066cd 100644 --- a/etc/devd/apple.conf +++ b/etc/devd/apple.conf @@ -71,4 +71,10 @@ notify 0 { action "camcontrol eject cd0"; }; - +# Equivalent to the ACPI/ACAD notify +notify 10 { + match "system" "PMU"; + match "subsystem" "POWER"; + match "type" "ACLINE"; + action "/etc/rc.d/power_profile $notify"; +} -- cgit v1.1 From 9be68c3461b1961afeaf262633d350e5cabb2bee Mon Sep 17 00:00:00 2001 From: hrs Date: Sun, 12 Oct 2014 22:11:28 +0000 Subject: s/-/_/ in name. --- etc/rc.d/bgfsck | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/rc.d/bgfsck b/etc/rc.d/bgfsck index 101577e..d15744c 100755 --- a/etc/rc.d/bgfsck +++ b/etc/rc.d/bgfsck @@ -9,7 +9,7 @@ . /etc/rc.subr -name="background-fsck" +name="background_fsck" rcvar="background_fsck" start_cmd="bgfsck_start" stop_cmd=":" -- cgit v1.1 From e33f69c523dbf8bb545d868cb119ab2a65e8b03c Mon Sep 17 00:00:00 2001 From: imp Date: Thu, 16 Oct 2014 00:33:06 +0000 Subject: HYPERV isn't available on all architectures, but just on by default for i386/amd64. Rather, it only works on i386/amd64 and should only be built there. Rather than change the default based on which architecutre, do things more directly by only building it on i386/amd64 and having it always on. This is how we handle other options that are relevant only for a few architectures. --- etc/devd/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'etc') diff --git a/etc/devd/Makefile b/etc/devd/Makefile index 6d1031e..27dfb92 100644 --- a/etc/devd/Makefile +++ b/etc/devd/Makefile @@ -8,6 +8,9 @@ FILES+= apple.conf .if ${MACHINE} == "amd64" || ${MACHINE} == "i386" FILES+= asus.conf +.if ${MK_HYPERV} != "no" +FILES+= hyperv.conf +.endif .endif .if ${MK_USB} != "no" @@ -18,10 +21,6 @@ FILES+= uath.conf ulpt.conf usb.conf FILES+= zfs.conf .endif -.if ${MK_HYPERV} != "no" -FILES+= hyperv.conf -.endif - NO_OBJ= FILESDIR= /etc/devd FILESMODE= 644 -- cgit v1.1 From 062adab01a71e8ba401e1ae690e44c5fbfb8dcf3 Mon Sep 17 00:00:00 2001 From: hrs Date: Fri, 17 Oct 2014 00:31:51 +0000 Subject: Add support of "/{udp,tcp,proto}" suffix into $firewall_myservices, which interpreted the listed items as port numbers of TCP services. A service with no suffix still works and recognized as a TCP service for backward compatibility. It should be updated with /tcp suffix. PR: 194292 MFC after: 1 week --- etc/rc.firewall | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'etc') diff --git a/etc/rc.firewall b/etc/rc.firewall index d8a3f6c..2065253 100644 --- a/etc/rc.firewall +++ b/etc/rc.firewall @@ -422,8 +422,8 @@ case ${firewall_type} in [Ww][Oo][Rr][Kk][Ss][Tt][Aa][Tt][Ii][Oo][Nn]) # Configuration: - # firewall_myservices: List of TCP ports on which this host - # offers services. + # firewall_myservices: List of ports/protocols on which this + # host offers services. # firewall_allowservices: List of IPv4 and/or IPv6 addresses # that have access to # $firewall_myservices. @@ -487,7 +487,24 @@ case ${firewall_type} in # for i in ${firewall_allowservices} ; do for j in ${firewall_myservices} ; do - ${fwcmd} add pass tcp from $i to me $j + case $j in + [0-9A-Za-z]*/[Pp][Rr][Oo][Tt][Oo]) + ${fwcmd} add pass ${j%/[Pp][Rr][Oo][Tt][Oo]} from $i to me + ;; + [0-9A-Za-z]*/[Tt][Cc][Pp]) + ${fwcmd} add pass tcp from $i to me ${j%/[Tt][Cc][Pp]} + ;; + [0-9A-Za-z]*/[Uu][Dd][Pp]) + ${fwcmd} add pass udp from $i to me ${j%/[Uu][Dd][Pp]} + ;; + *[0-9A-Za-z]) + echo "Consider using tcp/$j in firewall_myservices." > /dev/stderr + ${fwcmd} add pass tcp from $i to me $j + ;; + *) + echo "Invalid port in firewall_myservices: $j" > /dev/stderr + ;; + esac done done -- cgit v1.1 From 7bc5d0ce46ff90e35de5e2e6b80d7d1935ad5652 Mon Sep 17 00:00:00 2001 From: hrs Date: Sun, 19 Oct 2014 20:46:59 +0000 Subject: - Honer MK_KERBEROS for Heimdal rc.d scripts. - Add rc.c/kerberos to OLD_FILES. --- etc/rc.d/Makefile | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'etc') diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index 12c87db..2a3057f 100644 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -70,12 +70,12 @@ FILES= DAEMON \ iscsictl \ iscsid \ jail \ - kadmind \ - kdc \ - kfd \ + ${_kadmind} \ + ${_kdc} \ + ${_kfd} \ kld \ kldxref \ - kpasswdd \ + ${_kpasswdd} \ ldconfig \ local \ localpkg \ @@ -181,6 +181,13 @@ _casperd= casperd _nscd= nscd .endif +.if ${MK_KERBEROS} != "no" +_kadmind= kadmind +_kdc= kdc +_kfd= kfd +_kpasswdd= kpasswdd +.endif + .if ${MK_OFED} != "no" _opensm= opensm .endif -- cgit v1.1 From f8efef6094b91ee8e20c2dfa415c9d1a10a4fc17 Mon Sep 17 00:00:00 2001 From: hrs Date: Mon, 20 Oct 2014 04:14:35 +0000 Subject: Fix a typo. Spotted by: O. Hartmann --- etc/rc.firewall | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/rc.firewall b/etc/rc.firewall index 2065253..ee578ef 100644 --- a/etc/rc.firewall +++ b/etc/rc.firewall @@ -498,7 +498,8 @@ case ${firewall_type} in ${fwcmd} add pass udp from $i to me ${j%/[Uu][Dd][Pp]} ;; *[0-9A-Za-z]) - echo "Consider using tcp/$j in firewall_myservices." > /dev/stderr + echo "Consider using ${j}/tcp in firewall_myservices." \ + > /dev/stderr ${fwcmd} add pass tcp from $i to me $j ;; *) -- cgit v1.1 From 1c9fbedf833fe685d563e3d1751d4830649757e2 Mon Sep 17 00:00:00 2001 From: marcel Date: Thu, 23 Oct 2014 23:14:23 +0000 Subject: Hook libxo to the build. Sponsored by: Juniper Networks, Inc. --- etc/mtree/BSD.include.dist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.include.dist b/etc/mtree/BSD.include.dist index 3462d7e..fd54387 100644 --- a/etc/mtree/BSD.include.dist +++ b/etc/mtree/BSD.include.dist @@ -249,6 +249,8 @@ .. libmilter .. + libxo + .. lzma .. machine -- cgit v1.1 From 99068e42872b66860995cc4b3b0b80a05b98e376 Mon Sep 17 00:00:00 2001 From: bapt Date: Tue, 28 Oct 2014 10:39:41 +0000 Subject: Add regression tests for the timeout(1) utility They are modeled over the regression tests that are provided for the GNU coreutils timeout(1) utility --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 45c2d7c..93ca4df 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -281,6 +281,8 @@ regress.multitest.out .. .. + timeout + .. tr .. truncate -- cgit v1.1 From 95f601fb4fb00e90246cb9450b07534d6b874654 Mon Sep 17 00:00:00 2001 From: emaste Date: Tue, 28 Oct 2014 14:48:52 +0000 Subject: Add missing /usr/lib/debug directories Directories for /usr/lib{,32}/{i18n,private} were missing from the mtree file, which caused installworld to install the files that should be in the directory as the name of the directory. --- etc/mtree/BSD.debug.dist | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.debug.dist b/etc/mtree/BSD.debug.dist index ab75d0f..7797a4c 100644 --- a/etc/mtree/BSD.debug.dist +++ b/etc/mtree/BSD.debug.dist @@ -26,8 +26,16 @@ lib engines .. + i18n + .. + private + .. .. lib32 + i18n + .. + private + .. .. libexec bsdinstall -- cgit v1.1 From fce6747f55fd538917f2bd60e601dc95866c16d0 Mon Sep 17 00:00:00 2001 From: markm Date: Thu, 30 Oct 2014 21:21:53 +0000 Subject: This is the much-discussed major upgrade to the random(4) device, known to you all as /dev/random. This code has had an extensive rewrite and a good series of reviews, both by the author and other parties. This means a lot of code has been simplified. Pluggable structures for high-rate entropy generators are available, and it is most definitely not the case that /dev/random can be driven by only a hardware souce any more. This has been designed out of the device. Hardware sources are stirred into the CSPRNG (Yarrow, Fortuna) like any other entropy source. Pluggable modules may be written by third parties for additional sources. The harvesting structures and consequently the locking have been simplified. Entropy harvesting is done in a more general way (the documentation for this will follow). There is some GREAT entropy to be had in the UMA allocator, but it is disabled for now as messing with that is likely to annoy many people. The venerable (but effective) Yarrow algorithm, which is no longer supported by its authors now has an alternative, Fortuna. For now, Yarrow is retained as the default algorithm, but this may be changed using a kernel option. It is intended to make Fortuna the default algorithm for 11.0. Interested parties are encouraged to read ISBN 978-0-470-47424-2 "Cryptography Engineering" By Ferguson, Schneier and Kohno for Fortuna's gory details. Heck, read it anyway. Many thanks to Arthur Mesh who did early grunt work, and who got caught in the crossfire rather more than he deserved to. My thanks also to folks who helped me thresh this out on whiteboards and in the odd "Hallway track", or otherwise. My Nomex pants are on. Let the feedback commence! Reviewed by: trasz,des(partial),imp(partial?),rwatson(partial?) Approved by: so(des) --- etc/defaults/rc.conf | 2 +- etc/rc.d/Makefile | 1 - etc/rc.d/geli | 2 +- etc/rc.d/initrandom | 61 ---------------------------------------------------- etc/rc.d/postrandom | 2 +- etc/rc.d/random | 2 +- 6 files changed, 4 insertions(+), 66 deletions(-) delete mode 100755 etc/rc.d/initrandom (limited to 'etc') diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 18989fa..79799bf 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -645,7 +645,7 @@ update_motd="YES" # update version info in /etc/motd (or NO) entropy_file="/entropy" # Set to NO to disable caching entropy through reboots. # /var/db/entropy-file is preferred if / is not avail. entropy_dir="/var/db/entropy" # Set to NO to disable caching entropy via cron. -entropy_save_sz="2048" # Size of the entropy cache files. +entropy_save_sz="4096" # Size of the entropy cache files. entropy_save_num="8" # Number of entropy cache files to save. harvest_interrupt="YES" # Entropy device harvests interrupt randomness harvest_ethernet="YES" # Entropy device harvests ethernet randomness diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index 2a3057f..72b5247 100644 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -57,7 +57,6 @@ FILES= DAEMON \ hostid_save \ hostname \ inetd \ - initrandom \ ip6addrctl \ ipfilter \ ipfs \ diff --git a/etc/rc.d/geli b/etc/rc.d/geli index 8b867b3..4551f71 100755 --- a/etc/rc.d/geli +++ b/etc/rc.d/geli @@ -28,7 +28,7 @@ # # PROVIDE: disks -# REQUIRE: initrandom +# REQUIRE: random # KEYWORD: nojail . /etc/rc.subr diff --git a/etc/rc.d/initrandom b/etc/rc.d/initrandom deleted file mode 100755 index 907668b..0000000 --- a/etc/rc.d/initrandom +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# PROVIDE: initrandom -# REQUIRE: dumpon ddb -# BEFORE: disks -# KEYWORD: nojail - -. /etc/rc.subr - -name="initrandom" -start_cmd="initrandom_start" -stop_cmd=":" - -initrandom_start() -{ - soft_random_generator=`sysctl kern.random 2>/dev/null` - - echo -n 'Entropy harvesting:' - - if [ \! -z "${soft_random_generator}" ] ; then - - if [ -w /dev/random ]; then - if checkyesno harvest_interrupt; then - ${SYSCTL} kern.random.sys.harvest.interrupt=1 >/dev/null - echo -n ' interrupts' - else - ${SYSCTL} kern.random.sys.harvest.interrupt=0 >/dev/null - fi - - if checkyesno harvest_ethernet; then - ${SYSCTL} kern.random.sys.harvest.ethernet=1 >/dev/null - echo -n ' ethernet' - else - ${SYSCTL} kern.random.sys.harvest.ethernet=0 >/dev/null - fi - - if checkyesno harvest_p_to_p; then - ${SYSCTL} kern.random.sys.harvest.point_to_point=1 >/dev/null - echo -n ' point_to_point' - else - ${SYSCTL} kern.random.sys.harvest.point_to_point=0 >/dev/null - fi - - if checkyesno harvest_swi; then - ${SYSCTL} kern.random.sys.harvest.swi=1 >/dev/null - echo -n ' swi' - else - ${SYSCTL} kern.random.sys.harvest.swi=0 >/dev/null - fi - fi - - fi - - echo '.' -} - -load_rc_config random -run_rc_command "$1" diff --git a/etc/rc.d/postrandom b/etc/rc.d/postrandom index 006d563..3a60830 100755 --- a/etc/rc.d/postrandom +++ b/etc/rc.d/postrandom @@ -4,7 +4,7 @@ # # PROVIDE: postrandom -# REQUIRE: initrandom random FILESYSTEMS +# REQUIRE: random FILESYSTEMS # BEFORE: LOGIN # KEYWORD: nojail diff --git a/etc/rc.d/random b/etc/rc.d/random index 8499522..c7da932 100755 --- a/etc/rc.d/random +++ b/etc/rc.d/random @@ -4,7 +4,7 @@ # # PROVIDE: random -# REQUIRE: initrandom FILESYSTEMS +# REQUIRE: FILESYSTEMS # BEFORE: netif # KEYWORD: nojail shutdown -- cgit v1.1 From 41b6a835472de042268a29723b3c9291dfb7e24d Mon Sep 17 00:00:00 2001 From: delphij Date: Fri, 31 Oct 2014 22:20:27 +0000 Subject: rc.d/geli should not depend on random, as the attach functionality do not require additional entropy to function. It would create a circular dependency (not immediately obvious: geli provides 'disks' and requires 'random' as of r273872, 'random' requires 'FILESYSTEMS', 'FILESYSTEMS' requires 'root', 'root' requires 'swap', and finally 'swap' requires 'disk'). --- etc/rc.d/geli | 1 - 1 file changed, 1 deletion(-) (limited to 'etc') diff --git a/etc/rc.d/geli b/etc/rc.d/geli index 4551f71..77fff39 100755 --- a/etc/rc.d/geli +++ b/etc/rc.d/geli @@ -28,7 +28,6 @@ # # PROVIDE: disks -# REQUIRE: random # KEYWORD: nojail . /etc/rc.subr -- cgit v1.1 From 2093a6f55b95184e95f325150e116b197adfeda8 Mon Sep 17 00:00:00 2001 From: jmg Date: Sun, 2 Nov 2014 00:11:25 +0000 Subject: add an rc.d script to automatically grow the specified FS... It has been tested on both MBR and GPT... It won't be enabled until you add growfs_enable="YES" and will only run on first boot.. --- etc/rc.d/Makefile | 1 + etc/rc.d/growfs | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100755 etc/rc.d/growfs (limited to 'etc') diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index 72b5247..f42b207 100644 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -49,6 +49,7 @@ FILES= DAEMON \ geli \ geli2 \ gptboot \ + growfs \ gssd \ hastd \ ${_hcsecd} \ diff --git a/etc/rc.d/growfs b/etc/rc.d/growfs new file mode 100755 index 0000000..db87d29 --- /dev/null +++ b/etc/rc.d/growfs @@ -0,0 +1,98 @@ +#!/bin/sh +# +# Copyright 2014 John-Mark Gurney +# 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$ +# + +# PROVIDE: growfs +# BEFORE: sysctl +# KEYWORD: firstboot + +# This allows us to distribute a image +# and have it work on essentially any size drive. +# +# TODO: Figure out where this should really be ordered. +# I suspect it should go just after fsck but before mountcritlocal +# but it's hard to tell for sure because of the bug described +# below. +# + +. /etc/rc.subr + +name="growfs" +start_cmd="growfs_start" +stop_cmd=":" +rcvar="growfs_enable" + +growfs_start () +{ + echo "Growing root partition to fill device" + rootdev=$(df / | tail -n 1 | awk '{ sub("/dev/", "", $1); print $1 }') + if [ x"$rootdev" = x"${rootdev%/*}" ]; then + # raw device + rawdev="$rootdev" + else + rawdev=$(glabel status | awk '$1 == "'"$rootdev"'" { print $3 }') + if [ x"$rawdev" = x"" ]; then + echo "Can't figure out device for: $rootdev" + return + fi + fi + + sysctl -b kern.geom.conftxt | awk ' +{ + lvl=$1 + device[lvl] = $3 + type[lvl] = $2 + idx[lvl] = $7 + parttype[lvl] = $13 + if (dev == $3) { + for (i = 1; i <= lvl; i++) { + # resize + if (type[i] == "PART") { + pdev = device[i - 1] + cmd[i] = "gpart resize -i " idx[i] " " pdev + if (parttype[i] == "GPT") + cmd[i] = "gpart recover " pdev " ; " cmd[i] + } else if (type[i] == "LABEL") { + continue + } else { + print "unhandled type: " type[i] + exit 1 + } + } + for (i = 1; i <= lvl; i++) { + if (cmd[i]) + system(cmd[i]) + } + exit 0 + } +}' dev="$rawdev" + growfs -y /dev/"$rootdev" +} + +load_rc_config $name +run_rc_command "$1" -- cgit v1.1 From 79cf481147176a7adeb670c9a1d0012e2bb2c606 Mon Sep 17 00:00:00 2001 From: des Date: Sun, 2 Nov 2014 01:47:27 +0000 Subject: Get rid of the postrandom script. It was born in a time when the random script ran before filesystems were mounted, which is no longer the case. In random_start(), immediately delete each file that is fed into /dev/random, and recreate the default entropy file immediately after reading and deleting it. The logic used in random_stop() to determine which file to write to should probably be factored out and used here as well. --- etc/rc.d/Makefile | 1 - etc/rc.d/adjkerntz | 2 +- etc/rc.d/postrandom | 41 ----------------------------------------- etc/rc.d/random | 51 ++++++++++++++++++++++++++++++++++----------------- 4 files changed, 35 insertions(+), 60 deletions(-) delete mode 100755 etc/rc.d/postrandom (limited to 'etc') diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index f42b207..bfa22bf 100644 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -112,7 +112,6 @@ FILES= DAEMON \ pf \ pflog \ pfsync \ - postrandom \ powerd \ power_profile \ ppp \ diff --git a/etc/rc.d/adjkerntz b/etc/rc.d/adjkerntz index 03f6159..18a8220 100755 --- a/etc/rc.d/adjkerntz +++ b/etc/rc.d/adjkerntz @@ -4,7 +4,7 @@ # # PROVIDE: adjkerntz -# REQUIRE: FILESYSTEMS postrandom +# REQUIRE: FILESYSTEMS # BEFORE: netif # KEYWORD: nojail diff --git a/etc/rc.d/postrandom b/etc/rc.d/postrandom deleted file mode 100755 index 3a60830..0000000 --- a/etc/rc.d/postrandom +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# PROVIDE: postrandom -# REQUIRE: random FILESYSTEMS -# BEFORE: LOGIN -# KEYWORD: nojail - -. /etc/rc.subr - -name="postrandom" -start_cmd="${name}_start" -stop_cmd=":" - -# This will remove old ${entropy_file} and generate a new one. -# According to Bruce Schneier, this is strongly recommended in order -# to avoid using same ${entropy_file} across reboots. -# Reference: Chapter 10.6, Practical Cryptography, ISBN: 0-471-22357-3 - -postrandom_start() -{ - /etc/rc.d/random fastsaveseed - - case ${entropy_dir} in - [Nn][Oo]) - ;; - *) - entropy_dir=${entropy_dir:-/var/db/entropy} - if [ -d "${entropy_dir}" ]; then - if [ -w /dev/random ]; then - rm -f ${entropy_dir}/* - fi - fi - ;; - esac -} - -load_rc_config random -run_rc_command "$1" diff --git a/etc/rc.d/random b/etc/rc.d/random index c7da932..2420a39 100755 --- a/etc/rc.d/random +++ b/etc/rc.d/random @@ -17,41 +17,58 @@ stop_cmd="random_stop" extra_commands="saveseed" saveseed_cmd="${name}_stop" +save_dev_random() +{ + for f ; do + if :>>"$f" ; then + debug "saving entropy to $f" + dd if=/dev/random of="$f" bs=4096 count=1 2>/dev/null + fi + done +} + feed_dev_random() { - if [ -f "${1}" -a -r "${1}" -a -s "${1}" ]; then - cat "${1}" | dd of=/dev/random bs=8k 2>/dev/null - fi + for f ; do + if [ -f "$f" -a -r "$f" -a -s "$f" ] ; then + if dd if="$f" of=/dev/random bs=4096 2>/dev/null ; then + debug "entropy read from $f" + rm -f "$f" + fi + fi + done } random_start() { + echo -n 'Feeding entropy:' + + if [ ! -w /dev/random ] ; then + warn "/dev/random is not writeable" + return 1 + fi + # Reseed /dev/random with previously stored entropy. - case ${entropy_dir} in + case ${entropy_dir:=/var/db/entropy} in [Nn][Oo]) ;; *) - entropy_dir=${entropy_dir:-/var/db/entropy} - if [ -d "${entropy_dir}" ]; then - if [ -w /dev/random ]; then - for seedfile in ${entropy_dir}/*; do - feed_dev_random "${seedfile}" - done - fi + if [ -d "${entropy_dir}" ] ; then + feed_dev_random "${entropy_dir}"/* fi ;; esac - case ${entropy_file} in + case ${entropy_file:=/entropy} in [Nn][Oo] | '') ;; *) - if [ -w /dev/random ]; then - feed_dev_random "${entropy_file}" - feed_dev_random /var/db/entropy-file - fi + feed_dev_random "${entropy_file}" /var/db/entropy-file + save_dev_random "${entropy_file}" ;; esac + + echo '.' } random_stop() @@ -59,7 +76,7 @@ random_stop() # Write some entropy so when the machine reboots /dev/random # can be reseeded # - case ${entropy_file} in + case ${entropy_file:=/entropy} in [Nn][Oo] | '') ;; *) -- cgit v1.1 From 0bd39a418ef1ed6dcebaddd24fbef5e89c86e6b4 Mon Sep 17 00:00:00 2001 From: wblock Date: Sun, 2 Nov 2014 19:25:31 +0000 Subject: Add the less-ambiguous freebsd-version command. Reviewed by: -stable MFC after: 3 days --- etc/motd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/motd b/etc/motd index e70e98d..4dc41a7 100644 --- a/etc/motd +++ b/etc/motd @@ -13,7 +13,7 @@ Documents installed with the system are in the /usr/local/share/doc/freebsd/ directory, or can be installed later with: pkg install en-freebsd-doc For other languages, replace "en" with a language code like de or fr. -Show the version of FreeBSD installed: uname -a +Show the version of FreeBSD installed: freebsd-version ; uname -a Please include that output and any error messages when posting questions. Introduction to manual pages: man man FreeBSD directory layout: man hier -- cgit v1.1 From 90a2b12f5fdbc4cbbfed777ea6f9d6632274b5c0 Mon Sep 17 00:00:00 2001 From: hrs Date: Mon, 3 Nov 2014 00:37:39 +0000 Subject: Do not try to create a /dev/log symlink in a jail. PR: 179828 --- etc/rc.d/syslogd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/rc.d/syslogd b/etc/rc.d/syslogd index 2842b48..747b6f0 100755 --- a/etc/rc.d/syslogd +++ b/etc/rc.d/syslogd @@ -28,7 +28,7 @@ syslogd_precmd() # Transitional symlink for old binaries # - if [ ! -L /dev/log ]; then + if [ ! -L /dev/log ] && ! check_jail jailed; then ln -sf /var/run/log /dev/log fi rm -f /var/run/log -- cgit v1.1 From 5b7d87f332ba5090eef47ebf3df086968a0888c0 Mon Sep 17 00:00:00 2001 From: ngie Date: Mon, 3 Nov 2014 07:18:42 +0000 Subject: Integrate pjdfstest test suite execution into kyua pjdfstest execution is opt-in and must be done as root due to some of the assumptions made by the test suite and lack of error checking in the non-root case A description of how to execute pjdfstest with kyua is provided in share/pjdfstest/README Phabric: D824 (an earlier prototype patch) MFC after: 1 month Relnotes: yes Sponsored by: EMC / Isilon Storage Division --- etc/mtree/BSD.tests.dist | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 93ca4df..9b3d095 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -17,6 +17,8 @@ doc atf .. + pjdfstest + .. .. .. tests @@ -143,6 +145,38 @@ .. netinet .. + pjdfstest + chflags + .. + chmod + .. + chown + .. + ftruncate + .. + granular + .. + link + .. + mkdir + .. + mkfifo + .. + mknod + .. + open + .. + rename + .. + rmdir + .. + symlink + .. + truncate + .. + unlink + .. + .. .. usr.bin apply -- cgit v1.1 From e0f7993862a0fd0f5f90788f945a842deced8420 Mon Sep 17 00:00:00 2001 From: jmg Date: Mon, 3 Nov 2014 19:23:49 +0000 Subject: use tab instead of spaces like the rest of the file.. --- etc/rc.d/syscons | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/rc.d/syscons b/etc/rc.d/syscons index a60ac4c..67a9b91 100755 --- a/etc/rc.d/syscons +++ b/etc/rc.d/syscons @@ -139,7 +139,7 @@ uk.*) echo uk;; us.iso.acc) echo us.acc;; us.pc-ctrl) echo us.ctrl;; us.iso) echo us;; - esac + esac } kbdcontrol_load_keymap() -- cgit v1.1 From 0f07da924ef52c311e695b2dcd2b82fdbd330bb3 Mon Sep 17 00:00:00 2001 From: jmg Date: Mon, 3 Nov 2014 21:03:54 +0000 Subject: switch from spaces to tabs to match style and awk... Pointed out by: brooks --- etc/rc.d/growfs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'etc') diff --git a/etc/rc.d/growfs b/etc/rc.d/growfs index db87d29..ec3633d 100755 --- a/etc/rc.d/growfs +++ b/etc/rc.d/growfs @@ -49,20 +49,20 @@ rcvar="growfs_enable" growfs_start () { - echo "Growing root partition to fill device" - rootdev=$(df / | tail -n 1 | awk '{ sub("/dev/", "", $1); print $1 }') - if [ x"$rootdev" = x"${rootdev%/*}" ]; then - # raw device - rawdev="$rootdev" - else - rawdev=$(glabel status | awk '$1 == "'"$rootdev"'" { print $3 }') - if [ x"$rawdev" = x"" ]; then - echo "Can't figure out device for: $rootdev" - return + echo "Growing root partition to fill device" + rootdev=$(df / | tail -n 1 | awk '{ sub("/dev/", "", $1); print $1 }') + if [ x"$rootdev" = x"${rootdev%/*}" ]; then + # raw device + rawdev="$rootdev" + else + rawdev=$(glabel status | awk '$1 == "'"$rootdev"'" { print $3 }') + if [ x"$rawdev" = x"" ]; then + echo "Can't figure out device for: $rootdev" + return + fi fi - fi - sysctl -b kern.geom.conftxt | awk ' + sysctl -b kern.geom.conftxt | awk ' { lvl=$1 device[lvl] = $3 @@ -91,7 +91,7 @@ growfs_start () exit 0 } }' dev="$rawdev" - growfs -y /dev/"$rootdev" + growfs -y /dev/"$rootdev" } load_rc_config $name -- cgit v1.1 From cddd13d16775c573db6518e2d3bd0065670d03a6 Mon Sep 17 00:00:00 2001 From: ngie Date: Tue, 4 Nov 2014 00:56:25 +0000 Subject: Add reachover Makefiles for contrib/netbsd-tests/lib/libc; this adds approximately 500 new testcases Various TODOs have been sprinkled around the Makefiles for items that even need to be ported (missing features), testcases have issues with building/linking, or issues at runtime. A variant of this code has been tested extensively on amd64 and i386 10-STABLE/11-CURRENT for several months without issue. It builds on other architectures, but the code will remain off until I have prove it works on virtual hardware or real hardware on other architectures In collaboration with: pho, Casey Peel Sponsored by: EMC / Isilon Storage Division --- etc/mtree/BSD.tests.dist | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 9b3d095..3c868b9 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -89,6 +89,56 @@ test-programs .. .. + libc + c063 + .. + db + .. + gen + execve + .. + posix_spawn + .. + .. + hash + data + .. + .. + inet + .. + locale + .. + net + getaddrinfo + data + .. + .. + .. + regex + data + .. + .. + ssp + .. + stdio + .. + stdlib + .. + string + .. + sys + .. + time + .. + tls + dso + .. + .. + termios + .. + ttyio + .. + .. libcrypt .. libmp -- cgit v1.1 From bfc0f852ba36942c2903b68b79ccc504e7d2c1f7 Mon Sep 17 00:00:00 2001 From: bapt Date: Wed, 5 Nov 2014 06:42:07 +0000 Subject: Avoid installing security.functions with executable bits, periodic(8) will try to execute all files with an executable bit in /etc/periodic/*/ while this file is supposed only to be sourced by others MFC after: 1 week --- etc/periodic/security/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'etc') diff --git a/etc/periodic/security/Makefile b/etc/periodic/security/Makefile index 026948b..8174133 100644 --- a/etc/periodic/security/Makefile +++ b/etc/periodic/security/Makefile @@ -2,6 +2,8 @@ .include +FILESGROUPS= FILES DATA + FILES= 100.chksetuid \ 110.neggrpperm \ 200.chkmounts \ @@ -10,8 +12,8 @@ FILES= 100.chksetuid \ 410.logincheck \ 700.kernelmsg \ 800.loginfail \ - 900.tcpwrap \ - security.functions + 900.tcpwrap +DATA= security.functions # NB: keep these sorted by MK_* knobs -- cgit v1.1 From d18a2c8088ca3144e65c43a66c8990e98f95eeab Mon Sep 17 00:00:00 2001 From: markj Date: Wed, 5 Nov 2014 22:50:33 +0000 Subject: Create a directory for the PAM tests. --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 3c868b9..ae377ac 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -145,6 +145,8 @@ .. libnv .. + libpam + .. libproc .. libutil -- cgit v1.1 From 1e8781c32ec313c7ef637bad266a2fc753d62b6c Mon Sep 17 00:00:00 2001 From: jmg Date: Thu, 6 Nov 2014 07:27:14 +0000 Subject: remove comment about the bug... I don't remeber what it was... It may be an issue w/ using awk which is in /usr (and isn't always present), or another issue... Suggestion by: brooks --- etc/rc.d/growfs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'etc') diff --git a/etc/rc.d/growfs b/etc/rc.d/growfs index ec3633d..cc0ed11 100755 --- a/etc/rc.d/growfs +++ b/etc/rc.d/growfs @@ -35,9 +35,7 @@ # and have it work on essentially any size drive. # # TODO: Figure out where this should really be ordered. -# I suspect it should go just after fsck but before mountcritlocal -# but it's hard to tell for sure because of the bug described -# below. +# I suspect it should go just after fsck but before mountcritlocal. # . /etc/rc.subr -- cgit v1.1 From b5d711d3a6940afdd3615f7ffc2dcfa3faacd446 Mon Sep 17 00:00:00 2001 From: melifaro Date: Sun, 9 Nov 2014 21:33:01 +0000 Subject: Renove faith(4) and faithd(8) from base. It looks like industry have chosen different (and more traditional) stateless/statuful NAT64 as translation mechanism. Last non-trivial commits to both faith(4) and faithd(8) happened more than 12 years ago, so I assume it is time to drop RFC3142 in FreeBSD. No objections from: net@ --- etc/defaults/rc.conf | 3 --- etc/network.subr | 2 -- etc/rc.d/Makefile | 1 - etc/rc.d/NETWORKING | 2 +- etc/rc.d/bridge | 2 +- etc/rc.d/defaultroute | 2 +- etc/rc.d/faith | 75 --------------------------------------------------- etc/rc.d/routing | 4 +-- 8 files changed, 5 insertions(+), 86 deletions(-) delete mode 100755 etc/rc.d/faith (limited to 'etc') diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 79799bf..1422390 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -514,9 +514,6 @@ stf_interface_ipv4plen="0" # Prefix length for 6to4 IPv4 addr, stf_interface_ipv6_ifid="0:0:0:1" # IPv6 interface id for stf0. # If you like, you can set "AUTO" for this. stf_interface_ipv6_slaid="0000" # IPv6 Site Level Aggregator for stf0 -ipv6_faith_prefix="NO" # Set faith prefix to enable a FAITH - # IPv6-to-IPv4 TCP translator. You also need - # faithd(8) setup. ipv6_ipv4mapping="NO" # Set to "YES" to enable IPv4 mapped IPv6 addr # communication. (like ::ffff:a.b.c.d) ipv6_ipfilter_rules="/etc/ipf6.rules" # rules definition file for ipfilter, diff --git a/etc/network.subr b/etc/network.subr index 520c9e8..b8e0654 100644 --- a/etc/network.subr +++ b/etc/network.subr @@ -372,7 +372,6 @@ dhcpif() case $1 in lo[0-9]*|\ stf[0-9]*|\ - faith[0-9]*|\ lp[0-9]*|\ sl[0-9]*) return 1 @@ -591,7 +590,6 @@ ipv6_autoconfif() case $_if in lo[0-9]*|\ stf[0-9]*|\ - faith[0-9]*|\ lp[0-9]*|\ sl[0-9]*) return 1 diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index bfa22bf..f26c190 100644 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -42,7 +42,6 @@ FILES= DAEMON \ dhclient \ dmesg \ dumpon \ - faith \ fsck \ ftpd \ gbde \ diff --git a/etc/rc.d/NETWORKING b/etc/rc.d/NETWORKING index c86150f..12dd3b0 100755 --- a/etc/rc.d/NETWORKING +++ b/etc/rc.d/NETWORKING @@ -4,7 +4,7 @@ # # PROVIDE: NETWORKING NETWORK -# REQUIRE: netif netoptions routing ppp ipfw stf faith +# REQUIRE: netif netoptions routing ppp ipfw stf # REQUIRE: defaultroute routed mrouted route6d mroute6d resolv bridge # REQUIRE: static_arp static_ndp local_unbound diff --git a/etc/rc.d/bridge b/etc/rc.d/bridge index 4c3b340..93e68a2 100755 --- a/etc/rc.d/bridge +++ b/etc/rc.d/bridge @@ -26,7 +26,7 @@ # # PROVIDE: bridge -# REQUIRE: netif faith ppp stf +# REQUIRE: netif ppp stf # KEYWORD: nojail . /etc/rc.subr diff --git a/etc/rc.d/defaultroute b/etc/rc.d/defaultroute index ea54c83..8e87775 100755 --- a/etc/rc.d/defaultroute +++ b/etc/rc.d/defaultroute @@ -6,7 +6,7 @@ # # PROVIDE: defaultroute -# REQUIRE: devd faith netif stf +# REQUIRE: devd netif stf # KEYWORD: nojail . /etc/rc.subr diff --git a/etc/rc.d/faith b/etc/rc.d/faith deleted file mode 100755 index 4790ebd..0000000 --- a/etc/rc.d/faith +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/sh -# $FreeBSD$ -# - -# PROVIDE: faith -# REQUIRE: netif -# KEYWORD: nojail - -. /etc/rc.subr -. /etc/network.subr - -name="faith" -start_cmd="faith_up" -stop_cmd="faith_down" - -faith_up() -{ - case ${ipv6_faith_prefix} in - [Nn][Oo] | '') - ;; - *) - echo "Configuring IPv6-to-IPv4 TCP relay capturing interface:" \ - " faith0." - ${SYSCTL} net.inet6.ip6.keepfaith=1 - ifconfig faith0 create >/dev/null 2>&1 - ifconfig faith0 up - for prefix in ${ipv6_faith_prefix}; do - prefixlen=`expr "${prefix}" : ".*/\(.*\)"` - case ${prefixlen} in - '') - prefixlen=96 - ;; - *) - prefix=`expr "${prefix}" : \ - "\(.*\)/${prefixlen}"` - ;; - esac - route add -inet6 ${prefix} -prefixlen ${prefixlen} ::1 - route change -inet6 ${prefix} -prefixlen ${prefixlen} \ - -ifp faith0 - done - check_startmsgs && ifconfig faith0 - ;; - esac -} - -faith_down() -{ - echo "Removing IPv6-to-IPv4 TCP relay capturing interface: faith0." - ifconfig faith0 destroy - ${SYSCTL} net.inet6.ip6.keepfaith=0 - - case ${ipv6_faith_prefix} in - [Nn][Oo] | '') - ;; - *) - for prefix in ${ipv6_faith_prefix}; do - prefixlen=`expr "${prefix}" : ".*/\(.*\)"` - case ${prefixlen} in - '') - prefixlen=96 - ;; - *) - prefix=`expr "${prefix}" : \ - "\(.*\)/${prefixlen}"` - ;; - esac - route delete -inet6 ${prefix} -prefixlen ${prefixlen} - done - ;; - esac -} - -load_rc_config $name -run_rc_command "$1" diff --git a/etc/rc.d/routing b/etc/rc.d/routing index 9cb07e5..b381471 100755 --- a/etc/rc.d/routing +++ b/etc/rc.d/routing @@ -6,7 +6,7 @@ # # PROVIDE: routing -# REQUIRE: faith netif ppp stf +# REQUIRE: netif ppp stf # KEYWORD: nojailvnet . /etc/rc.subr @@ -245,7 +245,7 @@ static_inet6() [Nn][Oo][Nn][Ee]) return ;; - lo0|faith[0-9]*) + lo0) continue ;; esac -- cgit v1.1 From 7e7662c9889681df6586a0bfbb41ec6d6f491b42 Mon Sep 17 00:00:00 2001 From: ngie Date: Sun, 16 Nov 2014 06:35:20 +0000 Subject: Add reachover Makefiles for contrib/netbsd-tests/lib/libpthread as lib/libthr/tests A variant of this code has been tested on amd64/i386 for some time by EMC/Isilon on 10-STABLE/11-CURRENT. It builds on other architectures, but the code will remain off until it's proven it works on virtual hardware or real hardware on other architectures Original work by: pho Sponsored by: EMC / Isilon Storage Division --- etc/mtree/BSD.tests.dist | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index ae377ac..68c015d 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -149,6 +149,10 @@ .. libproc .. + libthr + dlopen + .. + .. libutil .. .. -- cgit v1.1 From 747103896d741e7aff571699e99ead80ce18e243 Mon Sep 17 00:00:00 2001 From: ngie Date: Sun, 16 Nov 2014 07:03:19 +0000 Subject: Add reachover Makefiles for contrib/netbsd-tests/lib/librt A variant of this code has been tested on amd64/i386 for some time by EMC/Isilon on 10-STABLE/11-CURRENT. It builds on other architectures, but the code will remain off until it's proven it works on virtual hardware or real hardware on other architectures Sponsored by: EMC / Isilon Storage Division --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 68c015d..ffa8bd7 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -149,6 +149,8 @@ .. libproc .. + librt + .. libthr dlopen .. -- cgit v1.1 From 886f75286d5765de95a263f2952476fad86f73b3 Mon Sep 17 00:00:00 2001 From: ngie Date: Mon, 17 Nov 2014 09:19:09 +0000 Subject: Add reachover Makefiles for contrib/netbsd-tests/lib/librt A variant of this code has been tested on amd64/i386 for some time by EMC/Isilon on 10-STABLE/11-CURRENT. It builds on other architectures, but the code will remain off until it's proven it works on virtual hardware or real hardware on other architectures Sponsored by: EMC / Isilon Storage Division --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc') diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index ffa8bd7..8604c55 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -157,6 +157,8 @@ .. libutil .. + msun + .. .. libexec atf -- cgit v1.1 From f64af8af37042a49bb9d67a03ba65da156be79ae Mon Sep 17 00:00:00 2001 From: jhibbits Date: Tue, 18 Nov 2014 16:31:00 +0000 Subject: Missed a terminating ';'. X-MFC-with: r273009 --- etc/devd/apple.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/devd/apple.conf b/etc/devd/apple.conf index 7f066cd..9a84542 100644 --- a/etc/devd/apple.conf +++ b/etc/devd/apple.conf @@ -77,4 +77,4 @@ notify 10 { match "subsystem" "POWER"; match "type" "ACLINE"; action "/etc/rc.d/power_profile $notify"; -} +}; -- cgit v1.1