From owner-svn-src-stable@freebsd.org Fri Jun 22 04:54:52 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDD44100E2C5; Fri, 22 Jun 2018 04:54:52 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 698117E067; Fri, 22 Jun 2018 04:54:52 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 474361C134; Fri, 22 Jun 2018 04:54:52 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5M4sqar093229; Fri, 22 Jun 2018 04:54:52 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5M4sqUV093228; Fri, 22 Jun 2018 04:54:52 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806220454.w5M4sqUV093228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Fri, 22 Jun 2018 04:54:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335530 - stable/11/usr.sbin/service X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.sbin/service X-SVN-Commit-Revision: 335530 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 04:54:53 -0000 Author: eadler Date: Fri Jun 22 04:54:51 2018 New Revision: 335530 URL: https://svnweb.freebsd.org/changeset/base/335530 Log: MFC r334472: service(1): Improve manual page * Sort options.. * Fix some typos. * Use one Bd macro for code blocks instead of a bunch of Dl * macros. * Improve formatting. * Clarify 'jail' argument PR: 228552 Modified: stable/11/usr.sbin/service/service.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/service/service.8 ============================================================================== --- stable/11/usr.sbin/service/service.8 Fri Jun 22 03:40:03 2018 (r335529) +++ stable/11/usr.sbin/service/service.8 Fri Jun 22 04:54:51 2018 (r335530) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 15, 2018 +.Dd May 31, 2018 .Dt SERVICE 8 .Os .Sh NAME @@ -32,19 +32,24 @@ .Nd "control (start/stop/etc.) or list system services" .Sh SYNOPSIS .Nm -.Op Fl j Ao jail name or id Ac +.Op Fl j Ar jail .Fl e .Nm -.Op Fl j Ao jail name or id Ac +.Op Fl j Ar jail .Fl R .Nm -.Op Fl j Ao jail name or id Ac +.Op Fl j Ar jail .Op Fl v -.Fl l | r +.Fl l .Nm -.Op Fl j Ao jail name or id Ac +.Op Fl j Ar jail .Op Fl v -.Ar start|stop|etc. +.Fl r +.Nm +.Op Fl j Ar jail +.Op Fl v +.Ar script +.Ar command .Sh DESCRIPTION The .Nm @@ -52,14 +57,16 @@ command is an easy interface to the rc.d system. Its primary purpose is to start and stop services provided by the rc.d scripts. When used for this purpose it will set the same restricted -environment that is in use at boot time (see below). +environment that is in use at boot time +.Po +see +.Sx ENVIRONMENT +.Pc . It can also be used to list the scripts using various criteria. .Pp The options are as follows: .Bl -tag -width F1 -.It Fl j Ao jail name or id Ac -Perform the given actions under the named jail. .It Fl e List services that are enabled. The list of scripts to check is compiled using @@ -70,8 +77,11 @@ then that list of scripts is checked for an .Qq rcvar assignment. If present the script is checked to see if it is enabled. -.It Fl R -Restart all enabled local services. +.It Fl j Ar jail +Perform the given actions under the named jail. +The +.Ar jail +argument can be either a jail ID or a jail name. .It Fl l List all files in .Pa /etc/rc.d @@ -88,8 +98,10 @@ Generate the as in .Fl e above, but list all of the files, not just what is enabled. +.It Fl R +Restart all enabled local services. .It Fl v -Be slightly more verbose +Be slightly more verbose. .El .Sh ENVIRONMENT When used to run rc.d scripts the @@ -111,21 +123,24 @@ at boot time. The following are examples of typical usage of the .Nm command: +.Bd -literal -offset -ident +service named status +service -j dns named status +service -rv +.Ed .Pp -.Dl "service named status" -.Dl "service -j dns named status" -.Dl "service -rv" -.Pp The following programmable completion entry can be use in .Xr bash 1 for the names of the rc.d scripts: -.Dl "_service () {" -.Dl " local cur" -.Dl " cur=${COMP_WORDS[COMP_CWORD]}" -.Dl " COMPREPLY=( $( compgen -W '$( service -l )' -- $cur ) )" -.Dl " return 0" -.Dl "}" -.Dl "complete -F _service service" +.Bd -literal -offset -ident +_service () { + local cur + cur=${COMP_WORDS[COMP_CWORD]} + COMPREPLY=( $( compgen -W '$( service -l )' -- $cur ) ) + return 0 +} +complete -F _service service +.Ed .Sh SEE ALSO .Xr bash 1 Pq Pa ports/shells/bash , .Xr rc.conf 5 ,