svn commit: r344096 - in stable/12: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config
Author: lme (ports committer) Date: Wed Feb 13 14:32:14 2019 New Revision: 344096 URL: https://svnweb.freebsd.org/changeset/base/344096 Log: MFC r342945, r342947, r343020 Add `bluetooth-config` script to simplify setting up bluetooth connections to devices like mice, keyboards, bt-audio, ... This script currently allows scanning for nearby devices, adds one to /etc/bluetooth/hosts, adds an entry to hcsecd's conf and if it is a HID, add an entry to bthidd's configs, as well. Submitted by: erdgeist Approved by:bapt MFC after: 2 weeks Differential Revision: D3778 Reviewers: bapt, emax Added: stable/12/usr.sbin/bluetooth/bluetooth-config/ - copied from r342945, head/usr.sbin/bluetooth/bluetooth-config/ Modified: stable/12/tools/build/mk/OptionalObsoleteFiles.inc stable/12/usr.sbin/bluetooth/Makefile stable/12/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8 stable/12/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh Modified: stable/12/tools/build/mk/OptionalObsoleteFiles.inc == --- stable/12/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 13 14:28:02 2019(r344095) +++ stable/12/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 13 14:32:14 2019(r344096) @@ -486,6 +486,7 @@ OLD_FILES+=usr/lib32/libsdp_p.a .endif OLD_FILES+=usr/sbin/ath3kfw OLD_FILES+=usr/sbin/bcmfw +OLD_FILES+=usr/sbin/bluetooth-config OLD_FILES+=usr/sbin/bt3cfw OLD_FILES+=usr/sbin/bthidcontrol OLD_FILES+=usr/sbin/bthidd @@ -562,6 +563,7 @@ OLD_FILES+=usr/share/man/man5/bluetooth.protocols.5.gz OLD_FILES+=usr/share/man/man5/hcsecd.conf.5.gz OLD_FILES+=usr/share/man/man8/ath3kfw.8.gz OLD_FILES+=usr/share/man/man8/bcmfw.8.gz +OLD_FILES+=usr/share/man/man8/bluetooth-config.8.gz OLD_FILES+=usr/share/man/man8/bt3cfw.8.gz OLD_FILES+=usr/share/man/man8/bthidcontrol.8.gz OLD_FILES+=usr/share/man/man8/bthidd.8.gz Modified: stable/12/usr.sbin/bluetooth/Makefile == --- stable/12/usr.sbin/bluetooth/Makefile Wed Feb 13 14:28:02 2019 (r344095) +++ stable/12/usr.sbin/bluetooth/Makefile Wed Feb 13 14:32:14 2019 (r344096) @@ -4,6 +4,7 @@ .include SUBDIR= \ + bluetooth-config \ bt3cfw \ btpand \ hccontrol \ Modified: stable/12/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8 == --- head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8 Fri Jan 11 15:52:09 2019(r342945) +++ stable/12/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8Wed Feb 13 14:32:14 2019(r344096) @@ -109,114 +109,3 @@ utility first appeared in .An Dirk Engling Aq Mt erdge...@erdgeist.org .Sh THANKS TO Lars Engels and Warren Block for suggestions, help, and testing. -.\" Copyright (c) 2019 Dirk Engling -.\" 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$ -.\" -.Dd January 7, 2019 -.Dt BLUETOOTH-CONFIG 8 -.Os -.Sh NAME -.Nm bluetooth-config -.Nd a script to manage config files for the bluetooth sub system -.Sh SYNOPSIS -.Nm -.Ar scan -.Op Fl d Ar device -.Op Fl n Ar node -.Sh DESCRIPTION -The -.Nm -utility is an interactive script to provide a frontend to the complex bluetooth sub system daemons. -.Pp -The following options are available: -.Bl -tag -width indent+ -.It Fl d -Scan for a specific bluetooth device address. -.It Fl n -
svn commit: r343020 - head/usr.sbin/bluetooth/bluetooth-config
Author: lme (ports committer) Date: Mon Jan 14 08:23:47 2019 New Revision: 343020 URL: https://svnweb.freebsd.org/changeset/base/343020 Log: This new version of bluetooth-config.sh tries to follow the style of other shell scripts in base, removes the bogus "copyleft", adds the BeerWare license header and uses rc.subr(8) new 'enable' keyword for adding entries in rc.conf(5). Submitted by: erdgeist Approved by: bapt MFC after:2 weeks Modified: head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh Modified: head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh == --- head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.shMon Jan 14 07:54:11 2019(r343019) +++ head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.shMon Jan 14 08:23:47 2019(r343020) @@ -1,9 +1,12 @@ #!/bin/sh #- -# Copyleft 2019 Dirk Engling +# +# "THE BEER-WARE LICENSE" (Revision 42): +# wrote this file. As long as you retain this notice you +# can do whatever you want with this stuff. If we meet some day, and you think +# this stuff is worth it, you can buy me a beer in return Poul-Henning Kamp +# # -# This script is released under the beerware license. -# # $FreeBSD$ # @@ -11,8 +14,6 @@ exerr () { echo -e "Error: $*" >&2 ; exit 1; } print_syntax () { echo -e "Syntax: $0 scan [-d device] [-n node]"; exit 1; } -# Assuming we are called to do the pair-new-device subcommand first - main() { unset node device started bdaddresses retry @@ -22,132 +23,140 @@ shift # Get command line options while getopts :d:n: arg; do - case ${arg} in -d) device="$OPTARG";; -n) node="$OPTARG";; -?) print_syntax;; - esac + case ${arg} in + d) device="$OPTARG";; + n) node="$OPTARG";; + ?) print_syntax;; + esac done # No use running without super user rights -[ $( id -u ) -eq 0 ] || exerr "$0 must modify files that belong to root. Re-run as root." +if [ $( id -u ) -ne 0 ]; then + exerr "$0 must modify files that belong to root. Re-run as root." +fi -known_nodes=$(/usr/sbin/hccontrol read_node_list 2>/dev/null | \ -/usr/bin/tail -n +2 | /usr/bin/cut -d ' ' -f 1) +known_nodes=$( /usr/sbin/hccontrol read_node_list 2>/dev/null |\ + /usr/bin/tail -n +2 | /usr/bin/cut -d ' ' -f 1 ) # Check if netgraph knows about any HCI nodes if ! [ "${known_nodes}" ]; then - ng_nodes=$(/usr/sbin/ngctl list 2>/dev/null | \ -/usr/bin/grep -o "Name: .* Type: ubt" | /usr/bin/cut -d ' ' -f 2) + ng_nodes=$( /usr/sbin/ngctl list 2>/dev/null | \ + /usr/bin/grep -o "Name: .* Type: ubt" |/usr/bin/cut -d' ' -f2 ) - [ "${ng_nodes}" ] || exerr "No Bluetooth host controllers found." + [ "${ng_nodes}" ] || exerr "No Bluetooth host controllers found." - unset found - for n in ${ng_nodes}; do -if [ "${n}" = "${node%hci}" ]; then - # If we found the node but its stack is not set up, do it now - /usr/sbin/service bluetooth start ${node%hci} || exit 1 - found="YES" -fi - done + unset found + for n in ${ng_nodes}; do + if [ "${n}" = "${node%hci}" ]; then + # Found the node but its stack is not set up? Do it now. + /usr/sbin/service bluetooth start ${node%hci} || exit 1 + found="YES" + fi + done - # If we have Bluetooth controller nodes without a set up stack, - # ask the user if we shall start it up - if ! [ "${found}" ]; then -printf "No usable Bluetooth host controllers were found.\n" -printf "These host controllers exist in the system:\n %s" " ${ng_nodes}" -read -p "Choose a host controller to set up: [${ng_nodes%% *}]" node -: ${node:="${ng_nodes%% *}"} -/usr/sbin/service bluetooth start ${node} || exit 1 - fi + # If we have Bluetooth controller nodes without a set up stack, + # ask the user if we shall start it up + if ! [ "${found}" ]; then + printf "No usable Bluetooth host controllers were found.\n" + printf "These host controllers exist in the system:\n" + printf " %s\n" "${ng_nodes}" + prompt="Choose a host controller to set up: [${ng_nodes%% *}]" + read -p "${prompt}" node + : ${node:="${ng_nodes%% *}"} + /usr/sbin/service bluetooth start ${node} || exit 1 + fi - # Re-read known nodes - known_nodes=$(/usr/sbin/hccontrol read_node_list 2>/dev/null | \ -/usr/bin/tail -n +2 | /usr/bin/cut -d ' ' -f 1) - # check if we succeeded in bringing it up - [ "${known_nodes}" ] || exerr "Failed to set up Bluetooth stack" + # Re-read known nodes +
Re: svn commit: r342945 - in head: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config
On Fri, Jan 11, 2019 at 01:11:26PM -0800, Rodney W. Grimes wrote: > > On Fri, Jan 11, 2019 at 08:04:33AM -0800, Rodney W. Grimes wrote: > > > The style of this .sh does not match the normal style of > > > such things in base, especially with respect to long lines > > > and indentation. > > > > In addition to adding the license header and changing copyleft -> > > copyright I changed the indentation to tabs and wrapped around most > > lines at 80 chars: > > Looks like the copyright has gone missing??? Yes, I removed it after skimming through the other Beerware licensed files and the all only had the license, no copyright. > > Is it just the printf's that are now > 80? That's right. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r342945 - in head: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config
On Fri, Jan 11, 2019 at 08:04:33AM -0800, Rodney W. Grimes wrote: > The style of this .sh does not match the normal style of > such things in base, especially with respect to long lines > and indentation. In addition to adding the license header and changing copyleft -> copyright I changed the indentation to tabs and wrapped around most lines at 80 chars: http://bsd-geek.de/FreeBSD/bluetooth-config.sh IMHO the original version was easier to read, but I will adhere to standards. :) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r342945 - in head: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config
On Fri, Jan 11, 2019 at 08:04:33AM -0800, Rodney W. Grimes wrote: > > Author: lme (ports committer) > > Date: Fri Jan 11 15:52:09 2019 > > New Revision: 342945 > > URL: https://svnweb.freebsd.org/changeset/base/342945 > > +.Nm > > +utility first appeared in > > +.Fx 12.1 . > > +.Sh AUTHORS > > +.An Dirk Engling Aq Mt erdge...@erdgeist.org > > +.Sh THANKS TO > > +Lars Engels and Warren Block for suggestions, help, and testing. > > The contents of this file appear twice Yes, sorry. My fault. Bapt already fixed this in r342947. > > > > Added: head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh > > == > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > +++ head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.shFri Jan > > 11 15:52:09 2019(r342945) > > @@ -0,0 +1,275 @@ > > +#!/bin/sh > > +#- > > +# Copyleft 2019 Dirk Engling > > That implies the GPL, would you be willing to change it to > what it appears your actually asserting, a Copyright, please. I just asked Dirk if I can change this to "Copyright". It was a mistake on his side and he agrees to the change. > > > +# > > +# This script is released under the beerware license. > > Incomplete and none deterministic license reference, > this needs to be corrected in some way, preferable > with the text of the beerware license so there is > no doubt as to what applies. I'll add the Beerware header. > > +# After function definitions, main() can use them > > +main "$@" > > + > > +exit > > + > > +# TODO > > +# * If device is a keyboard, offer a text entry test field and if it does > > +# not succeed, leave some clues for debugging (i.e. if the node responds > > +# to pings, maybe switch keyboard on/off, etc) > > +# * Same if device is a mouse, i.e. hexdump /dev/sysmouse. > > +# * If device offers DUN profiles, ask the user if an entry in > > +# /etc/ppp/ppp.conf should be created > > +# * If OPUSH or SPP is offered, refer to the respective man pages to give > > +# some clues how to continue > > > > > > The style of this .sh does not match the normal style of > such things in base, especially with respect to long lines > and indentation. Do we have a style guide for shell scripts in base? How should indentation look like? Lars ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r342945 - in head: tools/build/mk usr.sbin/bluetooth usr.sbin/bluetooth/bluetooth-config
to the complex bluetooth sub system daemons. +.Pp +The following options are available: +.Bl -tag -width indent+ +.It Fl d +Scan for a specific bluetooth device address. +.It Fl n +Limit scan to a specific host controller. Hint: List all netgraph nodes with +.Ql /usr/sbin/ngctl list . +.El +.Pp +.Nm +will help finding and setting up bluetooth controllers, scan for nearby bluetooth devices in +pairing mode, lookup their names, allow mapping to friendly names in +.Pa /etc/bluetooth/hosts , +ask for the paring PIN, instrument +.Xr hcsecd 8 +to securely pair with new devices and, if the device offers HID endpoints such as mice or +keyboards, configure and restart +.Xr bthidd 8 . +.Pp +.Nm +can bring up any interface and daemon necessary for operation and, if a node is provided on +command line, will do so automatically for that interface. +.Sh CAVEATS +.Nm +can not parse entries in +.Xr hcsecd 8 +config file and thus will ask the user to manually modify existing pairing PIN entries. +.Sh FILES +.Bl -tag -width ".Pa /etc/bluetooth/hosts" -compact +.It Pa /etc/bluetooth/hosts +.It Pa sysrc -n bthidd_config +.It Pa sysrc -n hcsecd_config +.El +.Sh EXAMPLES +.Nm +scan -n ubt0 -a 00:26:bb:7a:58:95 +.Bd -ragged -offset indent +This will scan the bluetooth controller ubt0hci for a bluetooth device with the address +00:26:bb:7a:58:95, set up ubt0 if necessary and enter an interactive dialog to pair the +new device. Since in this example a mouse is paired, +.Nm +will interact with +.Xr bthidd 8 , +enabling it if necessary and then write an HID descriptor to its config. +.Ed +.Pp +.Nm +scan +.Bd -ragged -offset indent +This will scan all bluetooth controllers on the systems for bluetooth devices, prompting +to bring up controllers or daemons along the way. +.Ed +.Sh SEE ALSO +.Xr bthidcontrol 8 , +.Xr bthidd 8 , +.Xr bthost 1 , +.Xr hccontrol 8 , +.Xr hcsecd 8 , +.Xr sdpcontrol 8 , +.Xr sysrc 8 +.Sh HISTORY +A +.Nm +utility first appeared in +.Fx 12.1 . +.Sh AUTHORS +.An Dirk Engling Aq Mt erdge...@erdgeist.org +.Sh THANKS TO +Lars Engels and Warren Block for suggestions, help, and testing. +.\" Copyright (c) 2019 Dirk Engling +.\" 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$ +.\" +.Dd January 7, 2019 +.Dt BLUETOOTH-CONFIG 8 +.Os +.Sh NAME +.Nm bluetooth-config +.Nd a script to manage config files for the bluetooth sub system +.Sh SYNOPSIS +.Nm +.Ar scan +.Op Fl d Ar device +.Op Fl n Ar node +.Sh DESCRIPTION +The +.Nm +utility is an interactive script to provide a frontend to the complex bluetooth sub system daemons. +.Pp +The following options are available: +.Bl -tag -width indent+ +.It Fl d +Scan for a specific bluetooth device address. +.It Fl n +Limit scan to a specific host controller. Hint: List all netgraph nodes with +.Ql /usr/sbin/ngctl list . +.El +.Pp +.Nm +will help finding and setting up bluetooth controllers, scan for nearby bluetooth devices in +pairing mode, lookup their names, allow mapping to friendly names in +.Pa /etc/bluetooth/hosts , +ask for the paring PIN, instrument +.Xr hcsecd 8 +to securely pair with new devices and, if the device offers HID endpoints such as mice or +keyboards, configure and restart +.Xr bthidd 8 . +.Pp +.Nm +can bring up any interface and daemon necessary for operation and, if a node is provided on +command line, will do so automatically for that interface. +.Sh CAVEATS +.Nm +can not parse entries in +.Xr hcsecd 8 +config file and thus will ask the user to manually modify existing pairing PIN entries. +.Sh FILES +.Bl -tag
svn commit: r298550 - head/etc/rc.d
Author: lme (ports committer) Date: Sun Apr 24 19:25:11 2016 New Revision: 298550 URL: https://svnweb.freebsd.org/changeset/base/298550 Log: Fix duplicate "name" variable that sneaked in with the rc description commit. Approved by: jhibbits Modified: head/etc/rc.d/geli2 Modified: head/etc/rc.d/geli2 == --- head/etc/rc.d/geli2 Sun Apr 24 17:09:51 2016(r298549) +++ head/etc/rc.d/geli2 Sun Apr 24 19:25:11 2016(r298550) @@ -34,7 +34,7 @@ . /etc/rc.subr name="geli2" -name="GELI disk encryption" +desc="GELI disk encryption" start_cmd="geli2_start" stop_cmd=":" ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r298515 - in head: etc share/examples/csh share/man/man8
Author: lme (ports committer) Date: Sat Apr 23 16:19:34 2016 New Revision: 298515 URL: https://svnweb.freebsd.org/changeset/base/298515 Log: - Add two new subcommands to rc.subr: "describe" shows an rc script's description "extracommands" shows an rc script's non-standard commands like "reload", "configtest", "keygen", etc - Update the rc(8) manpage and the tcsh(1) completion examples to reflect these changes Approved by: bapt Sponsored by: Essen Linuxhotel Hackathon 2016 Differential Revision:D452 Modified: head/etc/rc.subr head/share/examples/csh/dot.cshrc head/share/man/man8/rc.8 Modified: head/etc/rc.subr == --- head/etc/rc.subrSat Apr 23 16:10:54 2016(r298514) +++ head/etc/rc.subrSat Apr 23 16:19:34 2016(r298515) @@ -844,6 +844,10 @@ check_startmsgs() # # enabled Return true if the service is enabled. # +# describeShow the service's description +# +# extracommands Show the service's extra commands +# # Variables available to methods, and after run_rc_command() has # completed: # @@ -912,7 +916,7 @@ run_rc_command() eval _override_command=\$${name}_program command=${_override_command:-$command} - _keywords="start stop restart rcvar enabled $extra_commands" + _keywords="start stop restart rcvar enabled describe extracommands $extra_commands" rc_pid= _pidcmd= _procname=${procname:-${command}} @@ -962,12 +966,13 @@ run_rc_command() if [ "$_elem" != "$rc_arg" ]; then continue fi - # if ${rcvar} is set, $1 is not "rcvar" + # if ${rcvar} is set, $1 is not "rcvar" and not "describe" # and ${rc_pid} is not set, then run # checkyesno ${rcvar} # and return if that failed # - if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a "$rc_arg" != "stop" ] || + if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a "$rc_arg" != "stop" \ + -a "$rc_arg" != "describe" ] || [ -n "${rcvar}" -a "$rc_arg" = "stop" -a -z "${rc_pid}" ]; then if ! checkyesno ${rcvar}; then if [ -n "${rc_quiet}" ]; then @@ -1004,6 +1009,16 @@ run_rc_command() case "$rc_arg" in # default operations... + describe) + if [ -n "$desc" ]; then + echo "$desc" + fi + ;; + + extracommands) + echo "$extra_commands" + ;; + status) _run_rc_precmd || return 1 if [ -n "$rc_pid" ]; then Modified: head/share/examples/csh/dot.cshrc == --- head/share/examples/csh/dot.cshrc Sat Apr 23 16:10:54 2016 (r298514) +++ head/share/examples/csh/dot.cshrc Sat Apr 23 16:19:34 2016 (r298515) @@ -98,7 +98,7 @@ complete rsync"c,*:/,F:/," \ complete scp "c,*:/,F:/," \ "c,*:,F:$HOME," \ 'c/*@/$hosts/:/' -complete service 'c/-/(e l r v)/' 'p/1/`service -l`/' 'n/*/(start stop reload restart status rcvar onestart onestop)/' +complete service 'c/-/(e l r v)/' 'p/1/`service -l`/' 'n/*/(start stop reload restart status rcvar describe extracommands onestart onestop oneextracommands)/' complete svn 'C@file:///@`'"${HOME}/etc/tcsh/complete.d/svn"'`@@' \ 'n@ls@(file:/// svn+ssh:// svn://)@@' \ 'n@help@(add blame cat checkout cleanup commit copy delete export help import info list ls lock log merge mkdir move propdel \ Modified: head/share/man/man8/rc.8 == --- head/share/man/man8/rc.8Sat Apr 23 16:10:54 2016(r298514) +++ head/share/man/man8/rc.8Sat Apr 23 16:19:34 2016(r298515) @@ -323,6 +323,10 @@ If the script starts a process (rather t operation), show the status of the process. Otherwise it is not necessary to support this argument. Defaults to displaying the process ID of the program (if running). +.It Cm describe +Print a short description of what the script does. +.It Cm extracommands +Print the script's non-standard commands. .It Cm poll If the script starts a process (rather than performing a one-off operation), wait for the command to exit. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To
svn commit: r298514 - head/etc/rc.d
Author: lme (ports committer) Date: Sat Apr 23 16:10:54 2016 New Revision: 298514 URL: https://svnweb.freebsd.org/changeset/base/298514 Log: - Add descriptions to most of the rc scripts. Those are mostly taken from their daemon's manpage and probably improved. - Consistently use "filesystem" not "file system". Approved by: bapt, brueffer Differential Revision:D452 Modified: head/etc/rc.d/FILESYSTEMS head/etc/rc.d/abi head/etc/rc.d/amd head/etc/rc.d/apm head/etc/rc.d/apmd head/etc/rc.d/auditd head/etc/rc.d/auditdistd head/etc/rc.d/automountd head/etc/rc.d/autounmountd head/etc/rc.d/bgfsck head/etc/rc.d/bluetooth head/etc/rc.d/bootparams head/etc/rc.d/bridge head/etc/rc.d/bsnmpd head/etc/rc.d/bthidd head/etc/rc.d/ccd head/etc/rc.d/cleanvar head/etc/rc.d/cleartmp head/etc/rc.d/cron head/etc/rc.d/ctld head/etc/rc.d/ddb head/etc/rc.d/defaultroute head/etc/rc.d/devd head/etc/rc.d/devfs head/etc/rc.d/dhclient head/etc/rc.d/dmesg head/etc/rc.d/dumpon head/etc/rc.d/fsck head/etc/rc.d/ftp-proxy head/etc/rc.d/ftpd head/etc/rc.d/gbde head/etc/rc.d/geli head/etc/rc.d/geli2 head/etc/rc.d/growfs head/etc/rc.d/gssd head/etc/rc.d/hastd head/etc/rc.d/hcsecd head/etc/rc.d/hostapd head/etc/rc.d/hostid head/etc/rc.d/hostid_save head/etc/rc.d/hostname head/etc/rc.d/inetd head/etc/rc.d/ip6addrctl head/etc/rc.d/ipfilter head/etc/rc.d/ipfs head/etc/rc.d/ipfw head/etc/rc.d/ipmon head/etc/rc.d/ipnat head/etc/rc.d/ipsec head/etc/rc.d/iscsictl head/etc/rc.d/iscsid head/etc/rc.d/jail head/etc/rc.d/kadmind head/etc/rc.d/kdc head/etc/rc.d/keyserv head/etc/rc.d/kfd head/etc/rc.d/kld head/etc/rc.d/kldxref head/etc/rc.d/kpasswdd head/etc/rc.d/ldconfig head/etc/rc.d/local head/etc/rc.d/local_unbound head/etc/rc.d/localpkg head/etc/rc.d/lockd head/etc/rc.d/lpd head/etc/rc.d/mdconfig head/etc/rc.d/mdconfig2 head/etc/rc.d/mixer head/etc/rc.d/motd head/etc/rc.d/mountcritlocal head/etc/rc.d/mountcritremote head/etc/rc.d/mountd head/etc/rc.d/mountlate head/etc/rc.d/moused head/etc/rc.d/msgs head/etc/rc.d/natd head/etc/rc.d/netif head/etc/rc.d/netoptions head/etc/rc.d/netwait head/etc/rc.d/newsyslog head/etc/rc.d/nfscbd head/etc/rc.d/nfsclient head/etc/rc.d/nfsd head/etc/rc.d/nfsuserd head/etc/rc.d/nisdomain head/etc/rc.d/nscd head/etc/rc.d/nsswitch head/etc/rc.d/ntpd head/etc/rc.d/ntpdate head/etc/rc.d/pf head/etc/rc.d/pflog head/etc/rc.d/pfsync head/etc/rc.d/power_profile head/etc/rc.d/powerd head/etc/rc.d/ppp head/etc/rc.d/pppoed head/etc/rc.d/pwcheck head/etc/rc.d/quota head/etc/rc.d/random head/etc/rc.d/rarpd head/etc/rc.d/rctl head/etc/rc.d/resolv head/etc/rc.d/rfcomm_pppd_server head/etc/rc.d/root head/etc/rc.d/route6d head/etc/rc.d/routed head/etc/rc.d/routing head/etc/rc.d/rpcbind head/etc/rc.d/rtadvd head/etc/rc.d/rtsold head/etc/rc.d/rwho head/etc/rc.d/savecore head/etc/rc.d/sdpd head/etc/rc.d/securelevel head/etc/rc.d/sendmail head/etc/rc.d/sppp head/etc/rc.d/sshd head/etc/rc.d/statd head/etc/rc.d/static_arp head/etc/rc.d/stf head/etc/rc.d/swap head/etc/rc.d/swaplate head/etc/rc.d/syscons head/etc/rc.d/sysctl head/etc/rc.d/syslogd head/etc/rc.d/timed head/etc/rc.d/tmp head/etc/rc.d/ugidfw head/etc/rc.d/utx head/etc/rc.d/var head/etc/rc.d/virecover head/etc/rc.d/watchdogd head/etc/rc.d/wpa_supplicant head/etc/rc.d/ypbind head/etc/rc.d/yppasswdd head/etc/rc.d/ypserv head/etc/rc.d/ypset head/etc/rc.d/ypxfrd head/etc/rc.d/zfs head/etc/rc.d/zvol Modified: head/etc/rc.d/FILESYSTEMS == --- head/etc/rc.d/FILESYSTEMS Sat Apr 23 13:59:18 2016(r298513) +++ head/etc/rc.d/FILESYSTEMS Sat Apr 23 16:10:54 2016(r298514) @@ -6,7 +6,7 @@ # PROVIDE: FILESYSTEMS # REQUIRE: root mountcritlocal cleanvar zfs -# This is a dummy dependency, for services which require file systems +# This is a dummy dependency, for services which require filesystems # to be mounted before starting. It also serves as the default early / # late divider; after this point, rc.d directories are rescanned to -# catch scripts from other file systems than /. +# catch scripts from other filesystems than /. Modified: head/etc/rc.d/abi == --- head/etc/rc.d/abi Sat Apr 23 13:59:18 2016(r298513) +++ head/etc/rc.d/abi Sat Apr 23 16:10:54 2016(r298514) @@ -10,6 +10,7 @@ . /etc/rc.subr name="abi" +desc="Enable foreign ABIs" start_cmd="${name}_start" stop_cmd=":" Modified: head/etc/rc.d/amd == --- head/etc/rc.d/amd Sat Apr 23 13:59:18 2016(r298513) +++ head/etc/rc.d/amd
svn commit: r260492 - head/sbin/geom/class/part
Author: lme (ports committer) Date: Thu Jan 9 20:06:14 2014 New Revision: 260492 URL: http://svnweb.freebsd.org/changeset/base/260492 Log: Check if the given argument to 'gpart add' is actually a geom device and give a hint to use 'gpart create' before trying to add a partition. Approved by: pjd Modified: head/sbin/geom/class/part/geom_part.c (contents, props changed) Modified: head/sbin/geom/class/part/geom_part.c == --- head/sbin/geom/class/part/geom_part.c Thu Jan 9 18:53:21 2014 (r260491) +++ head/sbin/geom/class/part/geom_part.c Thu Jan 9 20:06:14 2014 (r260492) @@ -454,8 +454,19 @@ gpart_autofill(struct gctl_req *req) if (s == NULL) abort(); gp = find_geom(cp, s); - if (gp == NULL) - errx(EXIT_FAILURE, No such geom: %s., s); + if (gp == NULL) { + if (g_device_path(s) == NULL) { + errx(EXIT_FAILURE, No such geom %s., s); + } else { + /* +* We don't free memory allocated by g_device_path() as +* we are about to exit. +*/ + errx(EXIT_FAILURE, + No partitioning scheme found on geom %s. Create one first using 'gpart create'., + s); + } + } pp = LIST_FIRST(gp-lg_consumer)-lg_provider; if (pp == NULL) errx(EXIT_FAILURE, Provider for geom %s not found., s); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org