From owner-svn-doc-all@FreeBSD.ORG Mon Jan 28 19:42:41 2013 Return-Path: Delivered-To: svn-doc-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 61B94C29; Mon, 28 Jan 2013 19:42:41 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5107A779; Mon, 28 Jan 2013 19:42:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0SJgfQS094048; Mon, 28 Jan 2013 19:42:41 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0SJgcU5094032; Mon, 28 Jan 2013 19:42:38 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201301281942.r0SJgcU5094032@svn.freebsd.org> From: Eitan Adler Date: Mon, 28 Jan 2013 19:42:38 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r40792 - in head/en_US.ISO8859-1/books/handbook: advanced-networking audit config disks filesystems firewalls jails linuxemu mail multimedia network-servers ppp-and-slip security virtua... X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jan 2013 19:42:41 -0000 Author: eadler Date: Mon Jan 28 19:42:38 2013 New Revision: 40792 URL: http://svnweb.freebsd.org/changeset/doc/40792 Log: 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: bjk (prior version) Approved by: bcr (mentor) Modified: head/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml head/en_US.ISO8859-1/books/handbook/audit/chapter.xml head/en_US.ISO8859-1/books/handbook/config/chapter.xml head/en_US.ISO8859-1/books/handbook/disks/chapter.xml head/en_US.ISO8859-1/books/handbook/filesystems/chapter.xml head/en_US.ISO8859-1/books/handbook/firewalls/chapter.xml head/en_US.ISO8859-1/books/handbook/jails/chapter.xml head/en_US.ISO8859-1/books/handbook/linuxemu/chapter.xml head/en_US.ISO8859-1/books/handbook/mail/chapter.xml head/en_US.ISO8859-1/books/handbook/multimedia/chapter.xml head/en_US.ISO8859-1/books/handbook/network-servers/chapter.xml head/en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.xml head/en_US.ISO8859-1/books/handbook/security/chapter.xml head/en_US.ISO8859-1/books/handbook/virtualization/chapter.xml Modified: head/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml Mon Jan 28 19:13:24 2013 (r40791) +++ head/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml Mon Jan 28 19:42:38 2013 (r40792) @@ -1206,7 +1206,7 @@ ifconfig_wlan0="DHCP" At this point, you are ready to bring up the wireless interface: - &prompt.root; /etc/rc.d/netif start + &prompt.root; service netif start Once the interface is running, use ifconfig to see the status of the @@ -1323,7 +1323,7 @@ ifconfig_wlan0="WPA DHCP"Then we can bring up the interface: - &prompt.root; /etc/rc.d/netif start + &prompt.root; service netif start 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,RUNNIN wlans_ath0="wlan0" ifconfig_wlan0="WPA DHCP" - The next step is to bring up the interface with the - help of the rc.d facility: + The next step is to bring up the interface: - &prompt.root; /etc/rc.d/netif start + &prompt.root; service netif start 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"The next step is to bring up the interface: - &prompt.root; /etc/rc.d/netif start + &prompt.root; service netif start 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"Then we can bring up the interface: - &prompt.root; /etc/rc.d/netif start + &prompt.root; service netif start 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 Modified: head/en_US.ISO8859-1/books/handbook/config/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/config/chapter.xml Mon Jan 28 19:13:24 2013 (r40791) +++ head/en_US.ISO8859-1/books/handbook/config/chapter.xml Mon Jan 28 19:42:38 2013 (r40792) @@ -679,7 +679,7 @@ HOME=/var/log For instance, &man.sshd.8; can be restarted with the following command: - &prompt.root; /etc/rc.d/sshd restart + &prompt.root; service sshd restart 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 /etc/rc.conf setting, execute the following command: - &prompt.root; /etc/rc.d/sshd onerestart + &prompt.root; service sshd onerestart It is easy to check if a service is enabled in /etc/rc.conf by running the appropriate @@ -720,7 +720,7 @@ HOME=/var/log sshd is in fact enabled in /etc/rc.conf by running: - &prompt.root; /etc/rc.d/sshd rcvar + &prompt.root; service sshd rcvar # sshd $sshd_enable=YES @@ -734,7 +734,7 @@ $sshd_enable=YES option is available. For instance to verify that sshd is actually started: - &prompt.root; /etc/rc.d/sshd status + &prompt.root; service sshd status sshd is running as pid 433. In some cases it is also possible to @@ -1218,14 +1218,14 @@ ifconfig_dc1="inet 10.0.0.1 netmask 255. configuration errors. Alternatively you can just relaunch the networking system: - &prompt.root; /etc/rc.d/netif restart + &prompt.root; service netif restart If a default gateway has been set in /etc/rc.conf, use also this command: - &prompt.root; /etc/rc.d/routing restart + &prompt.root; service routing restart Once the networking system has been relaunched, you should Modified: head/en_US.ISO8859-1/books/handbook/disks/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/disks/chapter.xml Mon Jan 28 19:13:24 2013 (r40791) +++ head/en_US.ISO8859-1/books/handbook/disks/chapter.xml Mon Jan 28 19:42:38 2013 (r40792) @@ -3364,7 +3364,7 @@ Filesystem 1K-blocks Used Avail Capacity Now restart inetd: - &prompt.root; /etc/rc.d/inetd restart + &prompt.root; service inetd restart @@ -4422,7 +4422,7 @@ Device 1K-blocks Used Av local disk, and start the &man.hastd.8; daemon: &prompt.root; hastctl create test -&prompt.root; /etc/rc.d/hastd onestart +&prompt.root; service hastd onestart It is not possible to use GEOM @@ -4554,7 +4554,7 @@ notify 30 { Restart &man.devd.8; on both nodes to put the new configuration into effect: - &prompt.root; /etc/rc.d/devd restart + &prompt.root; service devd restart When the carp0 interface goes up or down (i.e., the interface state changes), the system Modified: head/en_US.ISO8859-1/books/handbook/filesystems/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/filesystems/chapter.xml Mon Jan 28 19:13:24 2013 (r40791) +++ head/en_US.ISO8859-1/books/handbook/filesystems/chapter.xml Mon Jan 28 19:42:38 2013 (r40792) @@ -189,7 +189,7 @@ vfs.zfs.vdev.cache.size="5M" &prompt.root; echo 'zfs_enable="YES"' >> /etc/rc.conf -&prompt.root; /etc/rc.d/zfs start +&prompt.root; service zfs start The remainder of this document assumes three SCSI disks are available, and their Modified: head/en_US.ISO8859-1/books/handbook/firewalls/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/firewalls/chapter.xml Mon Jan 28 19:13:24 2013 (r40791) +++ head/en_US.ISO8859-1/books/handbook/firewalls/chapter.xml Mon Jan 28 19:42:38 2013 (r40792) @@ -249,7 +249,7 @@ Then run the startup script to load the module: - &prompt.root; /etc/rc.d/pf start + &prompt.root; service pf start Note that the PF Module will not load if it cannot find the ruleset config file. The default location is @@ -277,7 +277,7 @@ Then run the startup script to load the module: - &prompt.root; /etc/rc.d/pflog start + &prompt.root; service pflog start If you need other PF features you will need to compile PF support into the @@ -884,7 +884,7 @@ LOG_ERR - packets which have been logged To activate the changes to /etc/syslog.conf you can reboot or bump the &man.syslogd.8; daemon into re-reading /etc/syslog.conf - by running /etc/rc.d/syslogd reload + by running service syslogd reload Do not forget to change /etc/newsyslog.conf to rotate the new Modified: head/en_US.ISO8859-1/books/handbook/jails/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/jails/chapter.xml Mon Jan 28 19:13:24 2013 (r40791) +++ head/en_US.ISO8859-1/books/handbook/jails/chapter.xml Mon Jan 28 19:42:38 2013 (r40792) @@ -370,12 +370,12 @@ jail_www_devf - The /etc/rc.d/jail script can be used to + &man.service.8; can be used to 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 @@ -857,11 +857,11 @@ 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: + jail, and then start them using the jail rc + script. &prompt.root; mount -a -&prompt.root; /etc/rc.d/jail start +&prompt.root; service jail start @@ -933,7 +933,7 @@ jail_www_devfs_enable="YES" The right time to stop the jails is now: - &prompt.root; /etc/rc.d/jail stop + &prompt.root; service jail stop Unmount the original file systems: @@ -974,7 +974,7 @@ jail_www_devfs_enable="YES" &prompt.root; mount -a -&prompt.root; /etc/rc.d/jail start +&prompt.root; service jail start Modified: head/en_US.ISO8859-1/books/handbook/linuxemu/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/linuxemu/chapter.xml Mon Jan 28 19:13:24 2013 (r40791) +++ head/en_US.ISO8859-1/books/handbook/linuxemu/chapter.xml Mon Jan 28 19:42:38 2013 (r40792) @@ -656,7 +656,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 ------------ @@ -843,7 +843,7 @@ FEATURE Maple maplelmg 2000.0831 permane Create a startup file at - /usr/local/etc/rc.d/flexlm.sh. The + /usr/local/etc/rc.d/flexlm. The example below is a modified version of the distributed $MATLAB/etc/rc.lm.glnx86. The changes are file locations, and startup of the license @@ -872,7 +872,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 You must also replace username above with the name @@ -884,7 +884,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 Modified: head/en_US.ISO8859-1/books/handbook/mail/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/mail/chapter.xml Mon Jan 28 19:13:24 2013 (r40791) +++ head/en_US.ISO8859-1/books/handbook/mail/chapter.xml Mon Jan 28 19:42:38 2013 (r40792) @@ -1589,7 +1589,7 @@ define(`confDELIVERY_MODE',`deferred')dn and finally start the saslauthd daemon: - &prompt.root; /usr/local/etc/rc.d/saslauthd start + &prompt.root; service saslauthd start This daemon serves as a broker for sendmail to authenticate against your FreeBSD passwd Modified: head/en_US.ISO8859-1/books/handbook/multimedia/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/multimedia/chapter.xml Mon Jan 28 19:13:24 2013 (r40791) +++ head/en_US.ISO8859-1/books/handbook/multimedia/chapter.xml Mon Jan 28 19:42:38 2013 (r40792) @@ -1638,7 +1638,7 @@ bktr0: Pinnacle/Miro TV, Philips SECAM t Start the backend: &prompt.root; echo 'mythbackend_enable="YES"' >> /etc/rc.conf -&prompt.root; /usr/local/etc/rc.d/mythbackend start +&prompt.root; service mythbackend start Modified: head/en_US.ISO8859-1/books/handbook/network-servers/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/network-servers/chapter.xml Mon Jan 28 19:13:24 2013 (r40791) +++ head/en_US.ISO8859-1/books/handbook/network-servers/chapter.xml Mon Jan 28 19:42:38 2013 (r40792) @@ -173,7 +173,7 @@ inetd starting at boot time. The command: - &prompt.root; /etc/rc.d/inetd rcvar + &prompt.root; service inetd rcvar can be run to display the current effective setting. @@ -272,7 +272,7 @@ Reloading the <application>inetd</application> Configuration File - &prompt.root; /etc/rc.d/inetd reload + &prompt.root; service inetd reload Each line of the configuration file specifies an @@ -805,7 +805,7 @@ mountd_flags="-r" or by invoking the mountd &man.rc.8; script with the appropriate parameter: - &prompt.root; /etc/rc.d/mountd onereload + &prompt.root; service mountd onereload Please refer to for more information about using rc scripts. @@ -872,8 +872,8 @@ rpc_statd_enable="YES" Start the application by using: - &prompt.root; /etc/rc.d/lockd start -&prompt.root; /etc/rc.d/statd start + &prompt.root; service lockd start +&prompt.root; service statd start If real locking between the NFS clients and NFS server is not required, it is @@ -1588,7 +1588,7 @@ Exports list on foobar: initializing the NIS maps, start the ypserv daemon manually: - &prompt.root; /etc/rc.d/ypserv start + &prompt.root; service ypserv start @@ -1875,7 +1875,7 @@ nis_client_enable="YES" following commands as the superuser: &prompt.root; /etc/netstart -&prompt.root; /etc/rc.d/ypbind start +&prompt.root; service ypbind start After completing these steps, you should be able to run ypcat passwd and see the NIS @@ -3009,7 +3009,7 @@ dhcpd_ifaces="dc0" Then, you can proceed to start the server by issuing the following command: - &prompt.root; /usr/local/etc/rc.d/isc-dhcpd start + &prompt.root; service isc-dhcpd start 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" To start the server one time with this configuration, use the following command: - &prompt.root; /etc/rc.d/named onestart + &prompt.root; service named onestart To ensure the named daemon is started at boot each time, put the following line into the @@ -4629,9 +4629,8 @@ $include Kexample.com.+005+nnnnn.ZSK.key The www/apache22 port installs an &man.rc.8; script to aid in starting, stopping, and restarting Apache, which can be - found in the /usr/local/etc/rc.d/ - directory. + found in /usr/local/etc/rc.d/. To launch Apache at system startup, add the following line to @@ -4653,8 +4652,6 @@ $include Kexample.com.+005+nnnnn.ZSK.key or by the &man.service.8; utility by issuing one of the following commands: - &prompt.root; /usr/local/etc/rc.d/apache22 configtest - &prompt.root; service apache22 configtest @@ -4667,10 +4664,7 @@ $include Kexample.com.+005+nnnnn.ZSK.key If Apache does not report configuration errors, the Apache httpd - can be started with the same &man.rc.8; and &man.service.8; - mechanisms: - - &prompt.root; /usr/local/etc/rc.d/apache22 start + can be started with &man.service.8;: &prompt.root; service apache22 start @@ -5095,7 +5089,7 @@ DocumentRoot /www/someotherdomain.tld manually by executing the following command as root: - &prompt.root; /etc/rc.d/ftpd start + &prompt.root; service ftpd start You can now log on to your FTP server by typing: @@ -5383,7 +5377,7 @@ DocumentRoot /www/someotherdomain.tld It is possible then to start Samba at any time by typing: - &prompt.root; /usr/local/etc/rc.d/samba start + &prompt.root; service samba start Starting SAMBA: removing stale tdbs : Starting nmbd. Starting smbd. @@ -5403,7 +5397,7 @@ Starting smbd. You can stop Samba at any time by typing : - &prompt.root; /usr/local/etc/rc.d/samba stop + &prompt.root; service samba stop Samba is a complex software suite with functionality that allows broad integration with @@ -5781,7 +5775,7 @@ syslogd_flags="-a logclient.example.com At this point, the syslogd daemon should be restarted and verified: - &prompt.root; /etc/rc.d/syslogd restart + &prompt.root; service syslogd restart &prompt.root; pgrep syslog If a PID is returned, the server has @@ -5857,7 +5851,7 @@ syslogd_flags="-s -v -v"Once added, syslogd must be restarted for the changes to take effect: - &prompt.root; /etc/rc.d/syslogd restart + &prompt.root; service syslogd restart 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"syslogd_flags="-d -a logclien.example.com -v -v" - &prompt.root; /etc/rc.d/syslogd restart + &prompt.root; service syslogd restart Debugging data similar to the following will flash on the screen immediately after the restart: @@ -5919,7 +5913,7 @@ rejected in rule 0 due to name mismatch. logclien. After the proper alterations are made, a restart is issued with expected results: - &prompt.root; /etc/rc.d/syslogd restart + &prompt.root; service syslogd restart 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 Modified: head/en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.xml Mon Jan 28 19:13:24 2013 (r40791) +++ head/en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.xml Mon Jan 28 19:42:38 2013 (r40792) @@ -3038,7 +3038,7 @@ water.CS.Example localhost.Example. UGH To apply the settings immediately you can execute the following command as root: - &prompt.root; /etc/rc.d/routing start + &prompt.root; service routing start Please refer to on Configuring the FreeBSD Kernel for help in Modified: head/en_US.ISO8859-1/books/handbook/security/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/security/chapter.xml Mon Jan 28 19:13:24 2013 (r40791) +++ head/en_US.ISO8859-1/books/handbook/security/chapter.xml Mon Jan 28 19:42:38 2013 (r40792) @@ -1483,10 +1483,9 @@ Enter secret pass phrase: < 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. + will need to be restarted by using &man.service.8;: + + &prompt.root; service inetd restart @@ -1860,8 +1859,8 @@ Password: xxxxxxxxxxxxxxxx Now it is time to start up the KDC - services. Run /etc/rc.d/kerberos start and - /etc/rc.d/kadmind start to bring up the + services. Run service kerberos start and + service kadmind start 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 KDC is functioning by obtaining and @@ -1985,7 +1984,7 @@ kadmin> exittelnet 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 restart: telnet stream tcp nowait root /usr/libexec/telnetd telnetd -a user @@ -3209,10 +3208,10 @@ racoon_enable="yes" This will load &man.sshd.8;, the daemon program for OpenSSH, the next time your system initializes. Alternatively, it is possible to use - /etc/rc.d/sshd &man.rc.8; script to + &man.service.8; to start OpenSSH: - &prompt.root; /etc/rc.d/sshd start + &prompt.root; service sshd start @@ -3601,7 +3600,7 @@ user@unfirewalled-system.example.org's p /etc/ssh/sshd_config you must tell &man.sshd.8; to reload its config files, by running: - &prompt.root; /etc/rc.d/sshd reload + &prompt.root; service sshd reload Modified: head/en_US.ISO8859-1/books/handbook/virtualization/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/virtualization/chapter.xml Mon Jan 28 19:13:24 2013 (r40791) +++ head/en_US.ISO8859-1/books/handbook/virtualization/chapter.xml Mon Jan 28 19:42:38 2013 (r40792) @@ -1245,7 +1245,7 @@ add path 'usb/*' mode 0660 group operato Then, restart devfs: - &prompt.root; /etc/rc.d/devfs restart + &prompt.root; service devfs restart USB can now be enabled in the guest operating system. USB devices should be visible in the &virtualbox; @@ -1293,7 +1293,7 @@ add path 'usb/*' mode 0660 group operato perm xpt0 0660 perm pass* 0660 - &prompt.root; /etc/rc.d/devfs restart + &prompt.root; service devfs restart