From owner-freebsd-doc@FreeBSD.ORG Fri Jan 25 17:38:50 2013 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3273D238 for ; Fri, 25 Jan 2013 17:38:50 +0000 (UTC) (envelope-from kaduk@mit.edu) Received: from dmz-mailsec-scanner-4.mit.edu (DMZ-MAILSEC-SCANNER-4.MIT.EDU [18.9.25.15]) by mx1.freebsd.org (Postfix) with ESMTP id D7771C26 for ; Fri, 25 Jan 2013 17:38:49 +0000 (UTC) X-AuditID: 1209190f-b7f586d000000915-90-5102c1f78138 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP id D2.0D.02325.7F1C2015; Fri, 25 Jan 2013 12:33:43 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id r0PHXhaG028539; Fri, 25 Jan 2013 12:33:43 -0500 Received: from multics.mit.edu (SYSTEM-LOW-SIPB.MIT.EDU [18.187.2.37]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id r0PHXerq016679 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 25 Jan 2013 12:33:42 -0500 (EST) Received: (from kaduk@localhost) by multics.mit.edu (8.12.9.20060308) id r0PHXea5019333; Fri, 25 Jan 2013 12:33:40 -0500 (EST) Date: Fri, 25 Jan 2013 12:33:40 -0500 (EST) From: Benjamin Kaduk To: Eitan Adler Subject: Re: explicit use of /etc/rc.d vs service In-Reply-To: Message-ID: References: User-Agent: Alpine 1.10 (GSO 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLIsWRmVeSWpSXmKPExsUixG6nrvv9IFOgwdLr4hanznSxWiw60c7k wOQxbfNBNo8Zn+azBDBFcdmkpOZklqUW6dslcGU0X5nJVLAtsOLUtF0sDYzznLsYOTkkBEwk Gh98ZIewxSQu3FvPBmILCexjlLjUJwJhb2CU6Lnv1sXIBWSfYJK4efQ2E4TTwChx9toFZpAq FgFtid17TjOC2GwCKhIz32wEmyQioCbx7nU3WJxZQFqiYf1mJhBbWMBQYuKbP2C9nAKBEg+3 LQWr5xVwkOhb9osRYsFxRontF86CnScqoCOxev8UFogiQYmTM5+wQAy1lDj35zrbBEbBWUhS s5CkFjAyrWKUTcmt0s1NzMwpTk3WLU5OzMtLLdI10cvNLNFLTSndxAgKVU5J/h2M3w4qHWIU 4GBU4uH1WMAUKMSaWFZcmXuIUZKDSUmU1/0AUIgvKT+lMiOxOCO+qDQntfgQowQHs5IIr4wJ UI43JbGyKrUoHyYlzcGiJM57NeWmv5BAemJJanZqakFqEUxWhoNDSYI3GmSoYFFqempFWmZO CUKaiYMTZDgP0PA3IDW8xQWJucWZ6RD5U4yKUuK820ESAiCJjNI8uF5YKnnFKA70ijDvYpAq HmAagut+BTSYCWjw/ln/A4AGlyQipKQaGA1/Wr9JfB68U2DPhnLxiZZWx6rkJPSfZB68Wlg9 V9s4X63OP18w8tH9JTqP73oL3rzlfiknb1GbrKLWYUuJtb5mJ/b/OfbXt5DbOMS32VCwivX3 olyH8MBFFz2vc24+nH7i/cs7Bqksx2Yv6j3VwXdm4t0X8wxjdB56163xqHrh8Cm29EX1HyWW 4oxEQy3mouJEAN5VtwwAAwAA Cc: freebsd-doc@freebsd.org X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jan 2013 17:38:50 -0000 On Thu, 24 Jan 2013, Eitan Adler wrote: > On 24 January 2013 10:36, Warren Block wrote: >> On Wed, 23 Jan 2013, Eitan Adler wrote: >> >>> Would anyone object to a patch which converts uses of >>> "/etc/rc.d/daemon start" to "service daemon start" and the like? >>> I would like to see service(1) become the standard interface to using >>> services. >> >> >> Agreed. service(1) puts things in one place and abstracts them. Also, it's >> less typing and easier to autocomplete. > > Patch follows, also attached. > > commit c1cdabe869a82aa9ab56a30fee78530fc38ac8e3 > Author: Eitan Adler > Date: Thu Jan 24 12:26:10 2013 -0500 > > Prefer the use of service(1) to explicit invocation of /etc/rc.d > scripts: service(1) puts things in one place and abstracts them. > Also, it's less > typing and easier to autocomplete. > > While here modernize one script example by removing the ".sh" suffix. > > Discussed on: -doc > Reviewed by: ??? > Approved by: ??? (mentor) These '???'s would be less likely to leak into your actual commits if they were only added once received... > > diff --git a/en_US.ISO8859-1/books/handbook/disks/chapter.xml > b/en_US.ISO8859-1/books/handbook/disks/chapter.xml > index 176c7b2..345fdc4 100644 > --- a/en_US.ISO8859-1/books/handbook/disks/chapter.xml > +++ b/en_US.ISO8859-1/books/handbook/disks/chapter.xml > @@ -3542,7 +3542,7 @@ sector_size = 2048 > /etc/gbde/ad4s1c.lock. > gbde lock files must end in > .lock in order to be correctly detected > - by the /etc/rc.d/gbde start up > + by the service gbde start up This is not correct. It is the gbde start-up script which is relevant; that script is located in /etc/rc.d/gbde. service(8) does not come into play. > script. > > > diff --git a/en_US.ISO8859-1/books/handbook/jails/chapter.xml > b/en_US.ISO8859-1/books/handbook/jails/chapter.xml > index 71cf55c..264d0c6 100644 > --- a/en_US.ISO8859-1/books/handbook/jails/chapter.xml > +++ b/en_US.ISO8859-1/books/handbook/jails/chapter.xml > @@ -370,12 +370,12 @@ > jail_www_devfs_ruleset="www_ruleset > > > - The /etc/rc.d/jail script can be used to > + The service jail script can be used to Likewise here. > start or stop a jail by hand, if an entry for it exists in > rc.conf: > > - &prompt.root; /etc/rc.d/jail start > www > -&prompt.root; /etc/rc.d/jail stop > www > + &prompt.root; service jail start > www > +&prompt.root; service jail stop > www > > A clean way to shut down a &man.jail.8; is not available at > the moment. This is because commands normally used to accomplish > @@ -858,10 +858,10 @@ jail_www_devfs_enable="YES" > In this phase, the jails are built and prepared to > run. First, mount the required file systems for each > jail, and then start them using the > - /etc/rc.d/jail script: > + service jail script: This might be better as "using the jail rc script" (as compared to the previous cases quoted), but is still wrong as it appears here. > > &prompt.root; mount -a > -&prompt.root; /etc/rc.d/jail start > +&prompt.root; service jail start > > > > diff --git a/en_US.ISO8859-1/books/handbook/linuxemu/chapter.xml > b/en_US.ISO8859-1/books/handbook/linuxemu/chapter.xml > index b9c42c0..bd77283 100644 > --- a/en_US.ISO8859-1/books/handbook/linuxemu/chapter.xml > +++ b/en_US.ISO8859-1/books/handbook/linuxemu/chapter.xml > @@ -622,7 +622,7 @@ done > Start the license server. > > The following script, installed as > - /usr/local/etc/rc.d/lmgrd.sh is a > + /usr/local/rtc/rc.d/lmgrd is a > convenient way to start up lmgrd: > > ----- snip ------------ > @@ -799,7 +799,7 @@ FEATURE Maple maplelmg 2000.0831 permanent 1 XXXXXXXXXXXX \ > > > Create a startup file at > - /usr/local/etc/rc.d/flexlm.sh. The > + /usr/local/etc/rc.d/flexlm. The The commit message only mentions one place where a .sh suffix was stripped; there are two here. > example below is a modified version of the distributed > $MATLAB/etc/rc.lm.glnx86. The changes > are file locations, and startup of the license manager > @@ -828,7 +828,7 @@ exit 0 > > The file must be made executable: > > - &prompt.root; chmod +x > /usr/local/etc/rc.d/flexlm.sh > + &prompt.root; chmod +x > /usr/local/etc/rc.d/flexlm Oops, three. > > You must also replace > username above with the name > @@ -840,7 +840,7 @@ exit 0 > > Start the license manager with the command: > > - &prompt.root; /usr/local/etc/rc.d/flexlm.sh > start > + &prompt.root; service flexlm start > > > > diff --git a/en_US.ISO8859-1/books/handbook/mac/chapter.xml > b/en_US.ISO8859-1/books/handbook/mac/chapter.xml > index adb4c4d..a0c4594 100644 > --- a/en_US.ISO8859-1/books/handbook/mac/chapter.xml > +++ b/en_US.ISO8859-1/books/handbook/mac/chapter.xml > @@ -1840,7 +1840,7 @@ default_labels socket ?biba > > &prompt.root; cd /etc/mail && make > stop && \ > setpmac biba/equal make start && setpmac biba/10\(10-10\) > apachectl start && \ > -setpmac biba/10\(10-10\) /usr/local/etc/rc.d/nagios.sh > forcestart > +setpmac biba/10\(10-10\) service nagios.sh forcestart Does 'service nagios.sh' even work? > > Double check to ensure that everything is working > properly. If not, check the log files or error messages. Use > diff --git a/en_US.ISO8859-1/books/handbook/network-servers/chapter.xml > b/en_US.ISO8859-1/books/handbook/network-servers/chapter.xml > index c88c3c4..af24044 100644 > --- a/en_US.ISO8859-1/books/handbook/network-servers/chapter.xml > +++ b/en_US.ISO8859-1/books/handbook/network-servers/chapter.xml > @@ -173,7 +173,7 @@ > inetd starting at boot time. > The command: > > - &prompt.root; /etc/rc.d/inetd > rcvar > + &prompt.root; service inetd rcvar Wow, that's an uncommon command to pass to service! > > > can be run to display the current effective setting. > @@ -4586,7 +4586,7 @@ $include Kexample.com.+005+nnnnn.ZSK.key ; > ZSK > installs an &man.rc.8; script to aid in starting, stopping, > and restarting Apache, which can be > found in the - class="directory">/usr/local/etc/rc.d/ > + class="directory">service Ahem. > directory. > > To launch Apache at system > @@ -4622,10 +4622,8 @@ $include Kexample.com.+005+nnnnn.ZSK.key ; > ZSK > If Apache does not report > configuration errors, the > Apache httpd > - can be started with the same &man.rc.8; and &man.service.8; > - mechanisms: > + can be started with &man.service.8;: > > - &prompt.root; /usr/local/etc/rc.d/apache22 > start > &prompt.root; service apache22 > start I am less excited than you about removing mention of rc.d in this case than you are, but not enough so so as to object to it. > > The httpd service can be tested by > diff --git a/en_US.ISO8859-1/books/handbook/security/chapter.xml > b/en_US.ISO8859-1/books/handbook/security/chapter.xml > index 718b71a..4cf46b6 100644 > --- a/en_US.ISO8859-1/books/handbook/security/chapter.xml > +++ b/en_US.ISO8859-1/books/handbook/security/chapter.xml > @@ -1484,9 +1484,9 @@ qpopper : ALL : allow > > After adding this line, inetd > will need to be restarted. This can be accomplished by use of > - the &man.kill.1; command, or with the > - restart parameter with > - /etc/rc.d/inetd. > + &man.kill.1; or by &man.service.8;: > + > + &prompt.root; service inetd restart I guess you're not in a kill-killing mood today, then. (Similar case to the previous item.) > > > > @@ -1984,7 +1984,7 @@ kadmin> exit > example we will enable the telnet service > by putting a line like this into your > /etc/inetd.conf and then restarting the > - &man.inetd.8; service with /etc/rc.d/inetd > + &man.inetd.8; service with service inetd Hmm, maybe this block and the previous should use a more identical wording. -Ben > restart: > > telnet stream tcp nowait root > /usr/libexec/telnetd telnetd -a user