explicit use of /etc/rc.d vs service

Eitan Adler lists at eitanadler.com
Sat Jan 26 06:29:31 UTC 2013


On 25 January 2013 12:33, Benjamin Kaduk <kaduk at mit.edu> wrote:
> On Thu, 24 Jan 2013, Eitan Adler wrote:
> These '???'s would be less likely to leak into your actual commits if they
> were only added once received...

This would break a lot of my workflows (git log --grep and git filter-branch)

> 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.

Thanks for going through all these - I won't common on each individual
one - just fix them.
> The commit message only mentions one place where a .sh suffix was stripped;
> there are two here.

Forgot about these.  Commit message fixed.
         The command:</para>
>> -      <screen>&prompt.root; <userinput>/etc/rc.d/inetd
>> rcvar</userinput></screen>
>> +      <screen>&prompt.root; <userinput>service inetd
>> rcvar</userinput></screen>
>
> Wow, that's an uncommon command to pass to service!

It seemed to work.  Keeping it.

> Ahem.

:-\

> 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.

I would prefer to see service(8) be the interface and rc.d be a mere
implementation detail.

> Hmm, maybe this block and the previous should use a more identical wording.

Explain?



==== Version 2 ====

This is mostly the same as above with corrections for the issues noted above.

==============
commit 87f317a1a7971f66c3c0f0ce15c240047de0c422
Author: Eitan Adler <lists at eitanadler.com>
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 script examples by removing the ".sh" suffix.

    Discussed on:	-doc
    Reviewed by:	???
    Approved by:	??? (mentor)

diff --git a/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml
b/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml
index dd1680c..82c190a 100644
--- a/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml
+++ b/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml
@@ -1206,7 +1206,7 @@ ifconfig_wlan0="DHCP"</programlisting>
 	    <para>At this point, you are ready to bring up the
 	      wireless interface:</para>

-	    <screen>&prompt.root; <userinput>/etc/rc.d/netif
start</userinput></screen>
+	    <screen>&prompt.root; <userinput>service netif start</userinput></screen>

 	    <para>Once the interface is running, use
 	      <command>ifconfig</command> to see the status of the
@@ -1323,7 +1323,7 @@ ifconfig_wlan0="WPA DHCP"</programlisting>

 	    <para>Then we can bring up the interface:</para>

-	    <screen>&prompt.root;
<userinput><filename>/etc/rc.d/netif</filename> start</userinput>
+	    <screen>&prompt.root; <userinput><filename>service
netif</filename> start</userinput>
 Starting wpa_supplicant.
 DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
 DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
@@ -1513,10 +1513,9 @@ wlan0:
flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
 	    <programlisting>wlans_ath0="wlan0"
 ifconfig_wlan0="WPA DHCP"</programlisting>

-	    <para>The next step is to bring up the interface with the
-	      help of the <filename>rc.d</filename> facility:</para>
+	    <para>The next step is to bring up the interface:</para>

-	    <screen>&prompt.root; <userinput>/etc/rc.d/netif start</userinput>
+	    <screen>&prompt.root; <userinput>service netif start</userinput>
 Starting wpa_supplicant.
 DHCPREQUEST on wlan0 to 255.255.255.255 port 67 interval 7
 DHCPREQUEST on wlan0 to 255.255.255.255 port 67 interval 15
@@ -1607,7 +1606,7 @@ ifconfig_wlan0="WPA DHCP"</programlisting>

 	    <para>The next step is to bring up the interface:</para>

-	    <screen>&prompt.root; <userinput>/etc/rc.d/netif start</userinput>
+	    <screen>&prompt.root; <userinput>service netif start</userinput>
 Starting wpa_supplicant.
 DHCPREQUEST on wlan0 to 255.255.255.255 port 67 interval 7
 DHCPREQUEST on wlan0 to 255.255.255.255 port 67 interval 15
@@ -1719,7 +1718,7 @@ ifconfig_wlan0="WPA DHCP"</programlisting>

 	    <para>Then we can bring up the interface:</para>

-	    <screen>&prompt.root; <userinput>/etc/rc.d/netif start</userinput>
+	    <screen>&prompt.root; <userinput>service netif start</userinput>
 Starting wpa_supplicant.
 DHCPREQUEST on wlan0 to 255.255.255.255 port 67 interval 7
 DHCPREQUEST on wlan0 to 255.255.255.255 port 67 interval 15
@@ -2090,7 +2089,7 @@ wpa_pairwise=CCMP TKIP <co
id="co-ap-wpapsk-pwise"/></programlisting>
 	  <para>The next step is to start
 	    <application>hostapd</application>:</para>

-	  <screen>&prompt.root; <userinput>/etc/rc.d/hostapd
forcestart</userinput></screen>
+	  <screen>&prompt.root; <userinput>service hostapd
forcestart</userinput></screen>

 	  <screen>&prompt.root; <userinput>ifconfig
<replaceable>wlan0</replaceable></userinput>
   wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2290
@@ -2330,13 +2329,13 @@ ubt0: Interface 0 endpoints: interrupt=0x81,
bulk-in=0x82, bulk-out=0x2
 ubt0: Interface 1 (alt.config 5) endpoints: isoc-in=0x83, isoc-out=0x3,
       wMaxPacketSize=49, nframes=6, buffer size=294</screen>

-      <para>The <filename>/etc/rc.d/bluetooth</filename> script
+      <para>&man.service.8;
 	is used to start and stop the Bluetooth stack.  It is a good
 	idea to stop the stack before unplugging the device, but it is
 	not (usually) fatal.  When starting the stack, you will
 	receive output similar to the following:</para>

-      <screen>&prompt.root; <userinput>/etc/rc.d/bluetooth start
ubt0</userinput>
+      <screen>&prompt.root; <userinput>service bluetooth start ubt0</userinput>
 BD_ADDR: 00:02:72:00:d4:1a
 Features: 0xff 0xff 0xf 00 00 00 00 00
 <3-Slot> <5-Slot> <Encryption> <Slot offset>
@@ -2687,7 +2686,7 @@ Bluetooth Profile Descriptor List:
       <para>Then the <application>sdpd</application> daemon can be
 	started with:</para>

-      <screen>&prompt.root; <userinput>/etc/rc.d/sdpd
start</userinput></screen>
+      <screen>&prompt.root; <userinput>service sdpd start</userinput></screen>

       <para>The local server application that wants to provide
 	Bluetooth service to the remote clients will register service
@@ -4169,7 +4168,7 @@ margaux:ha=0123456789ab:tc=.def100</programlisting>
 	      <filename>/etc/rc.conf</filename> file for this command
 	      to execute correctly:</para>

-	    <screen>&prompt.root; <userinput>/etc/rc.d/inetd
restart</userinput></screen>
+	    <screen>&prompt.root; <userinput>service inetd
restart</userinput></screen>
 	  </step>
 	</procedure>

@@ -4208,7 +4207,7 @@ margaux:ha=0123456789ab:tc=.def100</programlisting>
 	      <filename>/etc/rc.conf</filename> at the first step, you
 	      probably want to reboot instead.</para>

-	    <screen>&prompt.root; <userinput>/etc/rc.d/mountd
restart</userinput></screen>
+	    <screen>&prompt.root; <userinput>service mountd
restart</userinput></screen>
 	  </step>
 	</procedure>
       </sect3>
@@ -4442,7 +4441,7 @@ cd /usr/src/etc; make distribution</programlisting>
 	<step>
 	  <para>Restart the NFS server:</para>

-	  <screen>&prompt.root; <userinput>/etc/rc.d/nfsd restart</userinput></screen>
+	  <screen>&prompt.root; <userinput>service nfsd restart</userinput></screen>
 	</step>

 	<step>
@@ -4460,7 +4459,7 @@ cd /usr/src/etc; make distribution</programlisting>
 	<step>
 	  <para>Restart inetd:</para>

-	  <screen>&prompt.root; <userinput>/etc/rc.d/inetd
restart</userinput></screen>
+	  <screen>&prompt.root; <userinput>service inetd restart</userinput></screen>
 	</step>

 	<step>
diff --git a/en_US.ISO8859-1/books/handbook/audit/chapter.xml
b/en_US.ISO8859-1/books/handbook/audit/chapter.xml
index 646fb9d..642ce69 100644
--- a/en_US.ISO8859-1/books/handbook/audit/chapter.xml
+++ b/en_US.ISO8859-1/books/handbook/audit/chapter.xml
@@ -211,7 +211,7 @@ requirements. -->
     <para>Audit support must then be started by a reboot, or by
       manually starting the audit daemon:</para>

-    <programlisting>/etc/rc.d/auditd start</programlisting>
+    <programlisting>service auditd start</programlisting>
   </sect1>

   <sect1 id="audit-config">
diff --git a/en_US.ISO8859-1/books/handbook/config/chapter.xml
b/en_US.ISO8859-1/books/handbook/config/chapter.xml
index d710731..ef5d984 100644
--- a/en_US.ISO8859-1/books/handbook/config/chapter.xml
+++ b/en_US.ISO8859-1/books/handbook/config/chapter.xml
@@ -679,7 +679,7 @@ HOME=/var/log
       For instance, &man.sshd.8; can be restarted with the following
       command:</para>

-    <screen>&prompt.root; <userinput>/etc/rc.d/sshd
restart</userinput></screen>
+    <screen>&prompt.root; <userinput>service sshd restart</userinput></screen>

     <para>This procedure is similar for other services.  Of course,
       services are usually started automatically at boot time as
@@ -711,7 +711,7 @@ HOME=/var/log
       <filename>/etc/rc.conf</filename> setting, execute the following
       command:</para>

-    <screen>&prompt.root; <userinput>/etc/rc.d/sshd
onerestart</userinput></screen>
+    <screen>&prompt.root; <userinput>service sshd
onerestart</userinput></screen>

     <para>It is easy to check if a service is enabled in
       <filename>/etc/rc.conf</filename> by running the appropriate
@@ -720,7 +720,7 @@ HOME=/var/log
       <command>sshd</command> is in fact enabled in
       <filename>/etc/rc.conf</filename> by running:</para>

-    <screen>&prompt.root; <userinput>/etc/rc.d/sshd rcvar</userinput>
+    <screen>&prompt.root; <userinput>service sshd rcvar</userinput>
 # sshd
 $sshd_enable=YES</screen>

@@ -734,7 +734,7 @@ $sshd_enable=YES</screen>
       <option>status</option> option is available.  For instance to
       verify that <command>sshd</command> is actually started:</para>

-    <screen>&prompt.root; <userinput>/etc/rc.d/sshd status</userinput>
+    <screen>&prompt.root; <userinput>service sshd status</userinput>
 sshd is running as pid 433.</screen>

     <para>In some cases it is also possible to <option>reload</option>
@@ -1218,14 +1218,14 @@ ifconfig_dc1="inet 10.0.0.1 netmask
255.255.255.0 media 10baseT/UTP"</programlis
 	configuration errors.  Alternatively you can just relaunch the
 	networking system:</para>

-      <screen>&prompt.root; <userinput>/etc/rc.d/netif
restart</userinput></screen>
+      <screen>&prompt.root; <userinput>service netif
restart</userinput></screen>

       <note>
 	<para>If a default gateway has been set in
 	  <filename>/etc/rc.conf</filename>, use also this
 	  command:</para>

-	<screen>&prompt.root; <userinput>/etc/rc.d/routing
restart</userinput></screen>
+	<screen>&prompt.root; <userinput>service routing restart</userinput></screen>
       </note>

       <para>Once the networking system has been relaunched, you should
diff --git a/en_US.ISO8859-1/books/handbook/disks/chapter.xml
b/en_US.ISO8859-1/books/handbook/disks/chapter.xml
index 176c7b2..48bbfdc 100644
--- a/en_US.ISO8859-1/books/handbook/disks/chapter.xml
+++ b/en_US.ISO8859-1/books/handbook/disks/chapter.xml
@@ -3364,7 +3364,7 @@ Filesystem 1K-blocks Used Avail Capacity  Mounted on

       <para>Now restart <command>inetd</command>:</para>

-      <screen>&prompt.root; <userinput>/etc/rc.d/inetd
restart</userinput></screen>
+      <screen>&prompt.root; <userinput>service inetd
restart</userinput></screen>
     </sect2>
   </sect1>

@@ -4422,7 +4422,7 @@ Device          1K-blocks     Used    Avail Capacity
 	local disk, and start the &man.hastd.8; daemon:</para>

       <screen>&prompt.root; <userinput>hastctl create test</userinput>
-&prompt.root; <userinput>/etc/rc.d/hastd onestart</userinput></screen>
+&prompt.root; <userinput>service hastd onestart</userinput></screen>

       <note>
 	<para>It is <emphasis>not</emphasis> possible to use GEOM
@@ -4554,7 +4554,7 @@ notify 30 {
 	<para>Restart &man.devd.8; on both nodes to put the new
 	  configuration into effect:</para>

-	<screen>&prompt.root; <userinput>/etc/rc.d/devd restart</userinput></screen>
+	<screen>&prompt.root; <userinput>service devd restart</userinput></screen>

 	<para>When the <devicename>carp0</devicename> interface goes
 	  up or down (i.e., the interface state changes), the system
diff --git a/en_US.ISO8859-1/books/handbook/filesystems/chapter.xml
b/en_US.ISO8859-1/books/handbook/filesystems/chapter.xml
index c3eeb38..3602d92 100644
--- a/en_US.ISO8859-1/books/handbook/filesystems/chapter.xml
+++ b/en_US.ISO8859-1/books/handbook/filesystems/chapter.xml
@@ -189,7 +189,7 @@ vfs.zfs.vdev.cache.size="5M"</programlisting>
 	commands:</para>

       <screen>&prompt.root; <userinput>echo 'zfs_enable="YES"'
>> /etc/rc.conf</userinput>
-&prompt.root; <userinput>/etc/rc.d/zfs start</userinput></screen>
+&prompt.root; <userinput>service zfs start</userinput></screen>

       <para>The remainder of this document assumes three
 	<acronym>SCSI</acronym> disks are available, and their
diff --git a/en_US.ISO8859-1/books/handbook/firewalls/chapter.xml
b/en_US.ISO8859-1/books/handbook/firewalls/chapter.xml
index 83c556e..72913cb 100644
--- a/en_US.ISO8859-1/books/handbook/firewalls/chapter.xml
+++ b/en_US.ISO8859-1/books/handbook/firewalls/chapter.xml
@@ -249,7 +249,7 @@

 	<para>Then run the startup script to load the module:</para>

-        <screen>&prompt.root; <userinput>/etc/rc.d/pf
start</userinput></screen>
+        <screen>&prompt.root; <userinput>service pf start</userinput></screen>

 	<para>Note that the PF Module will not load if it cannot find
 	  the ruleset config file.  The default location is
@@ -277,7 +277,7 @@

       <para>Then run the startup script to load the module:</para>

-      <screen>&prompt.root; <userinput>/etc/rc.d/pflog
start</userinput></screen>
+      <screen>&prompt.root; <userinput>service pflog start</userinput></screen>

       <para>If you need other <acronym>PF</acronym> features you will
 	need to compile <acronym>PF</acronym> support into the
@@ -884,7 +884,7 @@ LOG_ERR - packets which have been logged and which
can be considered short</scre
       <para>To activate the changes to <filename>/etc/syslog.conf
 	  </filename> you can reboot or bump the &man.syslogd.8;
 	daemon into re-reading <filename>/etc/syslog.conf</filename>
-	by running <command>/etc/rc.d/syslogd reload</command></para>
+	by running <command>service syslogd reload</command></para>

       <para>Do not forget to change
 	<filename>/etc/newsyslog.conf</filename> to rotate the new
diff --git a/en_US.ISO8859-1/books/handbook/jails/chapter.xml
b/en_US.ISO8859-1/books/handbook/jails/chapter.xml
index 71cf55c..0812972 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_<replaceable>www</replaceable>_devfs_ruleset="<replaceable>www_ruleset</rep
       </step>
     </procedure>

-    <para>The <filename>/etc/rc.d/jail</filename> script can be used to
+    <para>&man.service.8; can be used to
       start or stop a jail by hand, if an entry for it exists in
       <filename>rc.conf</filename>:</para>

-    <screen>&prompt.root; <userinput>/etc/rc.d/jail start
<replaceable>www</replaceable></userinput>
-&prompt.root; <userinput>/etc/rc.d/jail stop
<replaceable>www</replaceable></userinput></screen>
+    <screen>&prompt.root; <userinput>service jail start
<replaceable>www</replaceable></userinput>
+&prompt.root; <userinput>service jail stop
<replaceable>www</replaceable></userinput></screen>

     <para>A clean way to shut down a &man.jail.8; is not available at
       the moment.  This is because commands normally used to accomplish
@@ -857,11 +857,11 @@ jail_www_devfs_enable="YES"</programlisting>
 	  <step>
 	    <para>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
-	      <filename>/etc/rc.d/jail</filename> script:</para>
+	      jail, and then start them using the jail rc
+	      script.</para>

 	    <screen>&prompt.root; <userinput>mount -a</userinput>
-&prompt.root; <userinput>/etc/rc.d/jail start</userinput></screen>
+&prompt.root; <userinput>service jail start</userinput></screen>
 	  </step>
 	</procedure>

@@ -933,7 +933,7 @@ jail_www_devfs_enable="YES"</programlisting>
 	  <step>
 	    <para>The right time to stop the jails is now:</para>

-	    <screen>&prompt.root; <userinput>/etc/rc.d/jail stop</userinput></screen>
+	    <screen>&prompt.root; <userinput>service jail stop</userinput></screen>
 	  </step>
 	  <step>
 	    <para>Unmount the original file systems:</para>
@@ -974,7 +974,7 @@ jail_www_devfs_enable="YES"</programlisting>
 	      start the jails:</para>

 	    <screen>&prompt.root; <userinput>mount -a</userinput>
-&prompt.root; <userinput>/etc/rc.d/jail start</userinput></screen>
+&prompt.root; <userinput>service jail start</userinput></screen>
 	  </step>
 	</procedure>

diff --git a/en_US.ISO8859-1/books/handbook/linuxemu/chapter.xml
b/en_US.ISO8859-1/books/handbook/linuxemu/chapter.xml
index fcd7304..ee33ada 100644
--- a/en_US.ISO8859-1/books/handbook/linuxemu/chapter.xml
+++ b/en_US.ISO8859-1/books/handbook/linuxemu/chapter.xml
@@ -656,7 +656,7 @@ done</programlisting>
 	<step><para>Start the license server.</para>

 	<para>The following script, installed as
-	  <filename>/usr/local/etc/rc.d/lmgrd.sh</filename> is a
+	  <filename>/usr/local/rtc/rc.d/lmgrd</filename> is a
 	  convenient way to start up <command>lmgrd</command>:</para>

 	<programlisting>   ----- snip ------------
@@ -843,7 +843,7 @@ FEATURE Maple maplelmg 2000.0831 permanent 1 XXXXXXXXXXXX \

 	<step>
 	  <para>Create a startup file at
-	    <filename>/usr/local/etc/rc.d/flexlm.sh</filename>.  The
+	    <filename>/usr/local/etc/rc.d/flexlm</filename>.  The
 	    example below is a modified version of the distributed
 	    <filename>$MATLAB/etc/rc.lm.glnx86</filename>.  The
 	    changes are file locations, and startup of the license
@@ -872,7 +872,7 @@ exit 0</programlisting>
 	  <important>
 	    <para>The file must be made executable:</para>

-	    <screen>&prompt.root; <userinput>chmod +x
/usr/local/etc/rc.d/flexlm.sh</userinput></screen>
+	    <screen>&prompt.root; <userinput>chmod +x
/usr/local/etc/rc.d/flexlm</userinput></screen>

 	    <para>You must also replace
 	      <replaceable>username</replaceable> above with the name
@@ -884,7 +884,7 @@ exit 0</programlisting>
 	<step>
 	  <para>Start the license manager with the command:</para>

-	  <screen>&prompt.root; <userinput>/usr/local/etc/rc.d/flexlm.sh
start</userinput></screen>
+	  <screen>&prompt.root; <userinput>service flexlm start</userinput></screen>
 	</step>
       </procedure>
     </sect2>
diff --git a/en_US.ISO8859-1/books/handbook/mail/chapter.xml
b/en_US.ISO8859-1/books/handbook/mail/chapter.xml
index 12cd797..3c63bbd 100644
--- a/en_US.ISO8859-1/books/handbook/mail/chapter.xml
+++ b/en_US.ISO8859-1/books/handbook/mail/chapter.xml
@@ -1589,7 +1589,7 @@ define(`confDELIVERY_MODE',`deferred')dnl</programlisting>

 	<para>and finally start the saslauthd daemon:</para>

-	<screen>&prompt.root; <userinput>/usr/local/etc/rc.d/saslauthd
start</userinput></screen>
+	<screen>&prompt.root; <userinput>service saslauthd start</userinput></screen>

 	<para>This daemon serves as a broker for
<application>sendmail</application> to
 	  authenticate against your FreeBSD <filename>passwd</filename>
diff --git a/en_US.ISO8859-1/books/handbook/multimedia/chapter.xml
b/en_US.ISO8859-1/books/handbook/multimedia/chapter.xml
index 6856ac9..578cf6f 100644
--- a/en_US.ISO8859-1/books/handbook/multimedia/chapter.xml
+++ b/en_US.ISO8859-1/books/handbook/multimedia/chapter.xml
@@ -1578,7 +1578,7 @@ bktr0: Pinnacle/Miro TV, Philips SECAM
tuner.</programlisting>
       <para>Start the backend:</para>

       <screen>&prompt.root; <userinput>echo
'mythbackend_enable="YES"' >> /etc/rc.conf</userinput>
-&prompt.root; <userinput>/usr/local/etc/rc.d/mythbackend
start</userinput></screen>
+&prompt.root; <userinput>service mythbackend start</userinput></screen>
     </sect2>
   </sect1>

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 4fc8598..4e608b1 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 @@
 	<application>inetd</application> starting at boot time.
 	The command:</para>

-      <screen>&prompt.root; <userinput>/etc/rc.d/inetd
rcvar</userinput></screen>
+      <screen>&prompt.root; <userinput>service inetd rcvar</userinput></screen>

       <para>
 	can be run to display the current effective setting.</para>
@@ -272,7 +272,7 @@
 	<title>Reloading the <application>inetd</application>
 	  Configuration File</title>

-	<screen>&prompt.root; <userinput>/etc/rc.d/inetd reload</userinput></screen>
+	<screen>&prompt.root; <userinput>service inetd reload</userinput></screen>
       </example>

       <para>Each line of the configuration file specifies an
@@ -805,7 +805,7 @@ mountd_flags="-r"</programlisting>
       <para>or by invoking the <command>mountd</command> &man.rc.8;
 	script with the appropriate parameter:</para>

-      <screen>&prompt.root; <userinput>/etc/rc.d/mountd
onereload</userinput></screen>
+      <screen>&prompt.root; <userinput>service mountd
onereload</userinput></screen>

       <para>Please refer to <xref linkend="configtuning-rcd"/> for
 	more information about using rc scripts.</para>
@@ -872,8 +872,8 @@ rpc_statd_enable="YES"</programlisting>

       <para>Start the application by using:</para>

-      <screen>&prompt.root; <userinput>/etc/rc.d/lockd start</userinput>
-&prompt.root; <userinput>/etc/rc.d/statd start</userinput></screen>
+      <screen>&prompt.root; <userinput>service lockd start</userinput>
+&prompt.root; <userinput>service statd start</userinput></screen>

       <para>If real locking between the <acronym>NFS</acronym> clients
 	and <acronym>NFS</acronym> server is not required, it is
@@ -1588,7 +1588,7 @@ Exports list on foobar:
 	    initializing the NIS maps, start the
 	    <application>ypserv</application> daemon manually:</para>

-	  <screen>&prompt.root; <userinput>/etc/rc.d/ypserv start</userinput></screen>
+	  <screen>&prompt.root; <userinput>service ypserv start</userinput></screen>
 	</sect4>

 	<sect4>
@@ -1875,7 +1875,7 @@ nis_client_enable="YES"</programlisting>
 	    following commands as the superuser:</para>

 	  <screen>&prompt.root; <userinput>/etc/netstart</userinput>
-&prompt.root; <userinput>/etc/rc.d/ypbind start</userinput></screen>
+&prompt.root; <userinput>service ypbind start</userinput></screen>

 	  <para>After completing these steps, you should be able to
 	    run <command>ypcat passwd</command> and see the NIS
@@ -3009,7 +3009,7 @@ dhcpd_ifaces="dc0"</programlisting>
 	<para>Then, you can proceed to start the server by issuing
 	  the following command:</para>

-	<screen>&prompt.root; <userinput>/usr/local/etc/rc.d/isc-dhcpd
start</userinput></screen>
+	<screen>&prompt.root; <userinput>service isc-dhcpd start</userinput></screen>

 	<para>Should you need to make changes to the configuration
 	  of your server in the future, it is important to note that
@@ -3380,7 +3380,7 @@ dhcpd_ifaces="dc0"</programlisting>
 	To start the server one time with
 	this configuration, use the following command:</para>

-      <screen>&prompt.root; <userinput>/etc/rc.d/named
onestart</userinput></screen>
+      <screen>&prompt.root; <userinput>service named
onestart</userinput></screen>

       <para>To ensure the <application>named</application> daemon is
 	started at boot each time, put the following line into the
@@ -4629,9 +4629,8 @@ $include Kexample.com.+005+nnnnn.ZSK.key    ;
ZSK</programlisting>
       <para>The <filename role="package">www/apache22</filename> port
 	installs an &man.rc.8; script to aid in starting, stopping,
 	and restarting <application>Apache</application>, which can be
-	found in the <filename
-	  class="directory">/usr/local/etc/rc.d/</filename>
-	directory.</para>
+	found in <filename
+	  class="directory">/usr/local/etc/rc.d/</filename>.</para>

       <para>To launch <application>Apache</application> at system
 	startup, add the following line to
@@ -4653,8 +4652,6 @@ $include Kexample.com.+005+nnnnn.ZSK.key    ;
ZSK</programlisting>
 	or by the &man.service.8; utility by issuing one of the
 	following commands:</para>

-      <screen>&prompt.root; <userinput>/usr/local/etc/rc.d/apache22
configtest</userinput></screen>
-
       <screen>&prompt.root; <userinput>service apache22
configtest</userinput></screen>

       <note>
@@ -4667,10 +4664,7 @@ $include Kexample.com.+005+nnnnn.ZSK.key    ;
ZSK</programlisting>
       <para>If <application>Apache</application> does not report
 	configuration errors, the
 	<application>Apache</application> <command>httpd</command>
-	can be started with the same &man.rc.8; and &man.service.8;
-	mechanisms:</para>
-
-      <screen>&prompt.root; <userinput>/usr/local/etc/rc.d/apache22
start</userinput></screen>
+	can be started with &man.service.8;:</para>

       <screen>&prompt.root; <userinput>service apache22
start</userinput></screen>

@@ -5095,7 +5089,7 @@ DocumentRoot /www/someotherdomain.tld
 	manually by executing the following command as
 	<username>root</username>:</para>

-      <screen>&prompt.root; <userinput>/etc/rc.d/ftpd
start</userinput></screen>
+      <screen>&prompt.root; <userinput>service ftpd start</userinput></screen>

       <para>You can now log on to your FTP server by typing:</para>

@@ -5383,7 +5377,7 @@ DocumentRoot /www/someotherdomain.tld
       <para>It is possible then to start
 	<application>Samba</application> at any time by typing:</para>

-      <screen>&prompt.root; <userinput>/usr/local/etc/rc.d/samba
start</userinput>
+      <screen>&prompt.root; <userinput>service samba start</userinput>
 Starting SAMBA: removing stale tdbs :
 Starting nmbd.
 Starting smbd.</screen>
@@ -5403,7 +5397,7 @@ Starting smbd.</screen>
       <para>You can stop <application>Samba</application> at any time
 	by typing :</para>

-      <screen>&prompt.root; <userinput>/usr/local/etc/rc.d/samba
stop</userinput></screen>
+      <screen>&prompt.root; <userinput>service samba stop</userinput></screen>

       <para><application>Samba</application> is a complex software
 	suite with functionality that allows broad integration with
@@ -5781,7 +5775,7 @@ syslogd_flags="-a logclient.example.com -v
-v"</programlisting>
       <para>At this point, the <command>syslogd</command> daemon
 	should be restarted and verified:</para>

-      <screen>&prompt.root; <userinput>/etc/rc.d/syslogd restart</userinput>
+      <screen>&prompt.root; <userinput>service syslogd restart</userinput>
 &prompt.root; <userinput>pgrep syslog</userinput></screen>

       <para>If a <acronym>PID</acronym> is returned, the server has
@@ -5857,7 +5851,7 @@ syslogd_flags="-s -v -v"</programlisting>
       <para>Once added, <command>syslogd</command> must be restarted
 	for the changes to take effect:</para>

-      <screen>&prompt.root; <userinput>/etc/rc.d/syslogd
restart</userinput></screen>
+      <screen>&prompt.root; <userinput>service syslogd
restart</userinput></screen>

       <para>To test that log messages are being sent across the
 	network, use &man.logger.1; on the client to send a message to
@@ -5894,7 +5888,7 @@ syslogd_flags="-s -v -v"</programlisting>

       <programlisting>syslogd_flags="-d -a logclien.example.com -v
-v"</programlisting>

-      <screen>&prompt.root; <userinput>/etc/rc.d/syslogd
restart</userinput></screen>
+      <screen>&prompt.root; <userinput>service syslogd
restart</userinput></screen>

       <para>Debugging data similar to the following will flash on the
 	screen immediately after the restart:</para>
@@ -5919,7 +5913,7 @@ rejected in rule 0 due to name mismatch.</screen>
 	<literal>logclien</literal>.  After the proper alterations
 	are made, a restart is issued with expected results:</para>

-      <screen>&prompt.root; <userinput>/etc/rc.d/syslogd restart</userinput>
+      <screen>&prompt.root; <userinput>service syslogd restart</userinput>
 logmsg: pri 56, flags 4, from logserv.example.com, msg syslogd: restart
 syslogd: restarted
 logmsg: pri 6, flags 4, from logserv.example.com, msg syslogd: kernel
boot file is /boot/kernel/kernel
diff --git a/en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.xml
b/en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.xml
index 24ea0b2..1a4caf5 100644
--- a/en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.xml
+++ b/en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.xml
@@ -2953,7 +2953,7 @@ water.CS.Example localhost.Example. UGH
34 47641234  lo0 -       0.438
 	<para>To apply the settings immediately you can execute the
 	  following command as <username>root</username>:</para>

-	<screen>&prompt.root; /etc/rc.d/routing start</screen>
+	<screen>&prompt.root; service routing start</screen>

 	<para>Please refer to <xref linkend="kernelconfig"/> on
 	  Configuring the FreeBSD Kernel for help in
diff --git a/en_US.ISO8859-1/books/handbook/security/chapter.xml
b/en_US.ISO8859-1/books/handbook/security/chapter.xml
index 5ebbb51..3cd5bd1 100644
--- a/en_US.ISO8859-1/books/handbook/security/chapter.xml
+++ b/en_US.ISO8859-1/books/handbook/security/chapter.xml
@@ -1483,10 +1483,9 @@ Enter secret pass phrase: <userinput><secret
password></userinput>
 qpopper : ALL : allow</programlisting>

       <para>After adding this line, <application>inetd</application>
-	will need to be restarted.  This can be accomplished by use of
-	the &man.kill.1; command, or with the
-	<parameter>restart</parameter> parameter with
-	<filename>/etc/rc.d/inetd</filename>.</para>
+	will need to be restarted by using &man.service.8;:</para>
+
+	<screen>&prompt.root; <userinput>service inetd restart</userinput></screen>
     </sect2>

     <sect2>
@@ -1860,8 +1859,8 @@ Password: <userinput>xxxxxxxx</userinput>
 Verifying password - Password: <userinput>xxxxxxxx</userinput></screen>

       <para>Now it is time to start up the <acronym>KDC</acronym>
-	services.  Run <command>/etc/rc.d/kerberos start</command> and
-	<command>/etc/rc.d/kadmind start</command> to bring up the
+	services.  Run <command>service kerberos start</command> and
+	<command>service kadmind start</command> to bring up the
 	services.  Note that you will not have any kerberized daemons
 	running at this point but you should be able to confirm that
 	the <acronym>KDC</acronym> is functioning by obtaining and
@@ -1985,7 +1984,7 @@ kadmin><userinput> exit</userinput></screen>
 	example we will enable the <command>telnet</command> service
 	by putting a line like this into your
 	<filename>/etc/inetd.conf</filename> and then restarting the
-	&man.inetd.8; service with <command>/etc/rc.d/inetd
+	&man.inetd.8; service with <command>service inetd
 	  restart</command>:</para>

       <programlisting>telnet    stream  tcp     nowait  root
/usr/libexec/telnetd  telnetd -a user</programlisting>
@@ -3209,10 +3208,10 @@ racoon_enable="yes"</programlisting>
       <para>This will load &man.sshd.8;, the daemon program for
 	<application>OpenSSH</application>, the next time your
 	system initializes.  Alternatively, it is possible to use
-	<filename>/etc/rc.d/sshd</filename> &man.rc.8; script to
+	&man.service.8; to
 	start <application>OpenSSH</application>:</para>

-      <screen>&prompt.root; <userinput>/etc/rc.d/sshd
start</userinput></screen>
+      <screen>&prompt.root; <userinput>service sshd start</userinput></screen>
     </sect2>

     <sect2>
@@ -3601,7 +3600,7 @@ user at unfirewalled-system.example.org's password:
<userinput>*******</userinput><
 	<filename>/etc/ssh/sshd_config</filename> you must tell
 	&man.sshd.8; to reload its config files, by running:</para>

-      <screen>&prompt.root; <userinput>/etc/rc.d/sshd
reload</userinput></screen>
+      <screen>&prompt.root; <userinput>service sshd reload</userinput></screen>
     </sect2>

     <sect2>
diff --git a/en_US.ISO8859-1/books/handbook/virtualization/chapter.xml
b/en_US.ISO8859-1/books/handbook/virtualization/chapter.xml
index e9a0845..4d760b1 100644
--- a/en_US.ISO8859-1/books/handbook/virtualization/chapter.xml
+++ b/en_US.ISO8859-1/books/handbook/virtualization/chapter.xml
@@ -1244,7 +1244,7 @@ add path 'usb/*' mode 0660 group operator</programlisting>

       <para>Then, restart devfs:</para>

-      <screen>&prompt.root; <userinput>/etc/rc.d/devfs
restart</userinput></screen>
+      <screen>&prompt.root; <userinput>service devfs
restart</userinput></screen>

       <para>USB can now be enabled in the guest operating system.  USB
 	devices should be visible in the &virtualbox;
@@ -1292,7 +1292,7 @@ add path 'usb/*' mode 0660 group operator</programlisting>
 perm xpt0 0660
 perm pass* 0660</programlisting>

-      <screen>&prompt.root; <userinput>/etc/rc.d/devfs
restart</userinput></screen>
+      <screen>&prompt.root; <userinput>service devfs
restart</userinput></screen>
     </sect2>

 <!--






-- 
Eitan Adler


More information about the freebsd-doc mailing list