diff --git a/en_US.ISO8859-1/books/handbook/config/chapter.sgml b/en_US.ISO8859-1/books/handbook/config/chapter.sgml index 63f6b5da00..0dce43ca5f 100644 --- a/en_US.ISO8859-1/books/handbook/config/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/config/chapter.sgml @@ -359,67 +359,6 @@ important aspect to consider is that their start up configuration can be handled through simple startup scripts. - Before the advent of rc.d, applications would drop a - simple start up script into the - /usr/local/etc/rc.d - directory which would be read by the system initialization - scripts. These scripts would then be executed during the latter - stages of system start up. - - While many individuals have spent hours trying to merge the - old configuration style into the new system, the fact remains - that some third party utilities still require a script simply - dropped into the aforementioned directory. The subtle differences - in the scripts depend whether or not rc.d is being used. Prior - to &os; 5.1 the old configuration style is used and in - almost all cases a new style script would do just fine. - - While every script must meet some minimal requirements, most - of the time these requirements are &os; version - agnostic. Each script must be executable by the system; this is - typically achieved by using the chmod command and - setting the unique permissions of 555. There should - also be, at minimal, options to start and stop - the application. - - The simplest start up script would probably look a little - bit like this one: - - #!/bin/sh -echo -n ' utility' - -case "$1" in -start) - /usr/local/bin/utility - ;; -stop) - kill -9 `cat /var/run/utility.pid` - ;; -*) - echo "Usage: `basename $0` {start|stop}" >&2 - exit 64 - ;; -esac - -exit 0 - - This script provides for a stop and - start option for - the application hereto referred simply as - utility. - - Could be started manually with: - - &prompt.root; /usr/local/etc/rc.d/utility start - - While not all third party software requires the line in - rc.conf, almost every day a new port will - be modified to accept this configuration. Check the final output - of the installation for more information on a specific - application. Some third party software will provide start up - scripts which permit the application to be used with - rc.d; although, this will be discussed in the next section. - Extended Application Configuration @@ -439,14 +378,6 @@ exit 0 # REQUIRE: DAEMON # KEYWORD: shutdown -# -# DO NOT CHANGE THESE DEFAULT VALUES HERE -# SET THEM IN THE /etc/rc.conf FILE -# -utility_enable=${utility_enable-"NO"} -utility_flags=${utility_flags-""} -utility_pidfile=${utility_pidfile-"/var/run/utility.pid"} - . /etc/rc.subr name="utility" @@ -455,15 +386,20 @@ command="/usr/local/sbin/utility" load_rc_config $name -pidfile="${utility_pidfile}" +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# SET THEM IN THE /etc/rc.conf FILE +# +utility_enable=${utility_enable-"NO"} +utility_pidfile=${utility_pidfile-"/var/run/utility.pid"} -start_cmd="echo \"Starting ${name}.\"; /usr/bin/nice -5 ${command} ${utility_flags} ${command_args}" +pidfile="${utility_pidfile}" run_rc_command "$1" This script will ensure that the provided utility will be started after the - daemon service. It also provides a method + DAEMON pseudo-service. It also provides a method for setting and tracking the PID, or process ID file. @@ -484,15 +420,15 @@ run_rc_command "$1" Other services, such as POP3 server daemons, IMAP, etc. could be started using - the &man.inetd.8;. This involves installing the service + &man.inetd.8;. This involves installing the service utility from the Ports Collection with a configuration line - appended to the /etc/inetd.conf file, - or uncommenting one of the current configuration lines. Working + added to the /etc/inetd.conf file, + or by uncommenting one of the current configuration lines. Working with inetd and its configuration is described in depth in the inetd section. - In some cases, it may be more plausible to use the + In some cases it may make more sense to use the &man.cron.8; daemon to start system services. This approach has a number of advantages because cron runs these processes as the crontab's file