From owner-freebsd-rc@FreeBSD.ORG Thu Sep 6 19:57:14 2012 Return-Path: Delivered-To: rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0109A106564A; Thu, 6 Sep 2012 19:57:14 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from onyx.glenbarber.us (onyx.glenbarber.us [IPv6:2607:fc50:1000:c200::face]) by mx1.freebsd.org (Postfix) with ESMTP id 48FAF8FC1D; Thu, 6 Sep 2012 19:57:13 +0000 (UTC) Received: from glenbarber.us (unknown [IPv6:2001:470:8:1205:2:2:0:100]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: gjb) by onyx.glenbarber.us (Postfix) with ESMTPSA id EEEFF23F645; Thu, 6 Sep 2012 15:57:10 -0400 (EDT) Date: Thu, 6 Sep 2012 15:57:06 -0400 From: Glen Barber To: rc@FreeBSD.org Message-ID: <20120906195706.GD1332@glenbarber.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ULyIDA2m8JTe+TiX" Content-Disposition: inline X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: [PATCH] Allow use of program path overrides X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Sep 2012 19:57:14 -0000 --ULyIDA2m8JTe+TiX Content-Type: multipart/mixed; boundary="wTWi5aaYRw9ix9vO" Content-Disposition: inline --wTWi5aaYRw9ix9vO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, Many rc(8) scripts have corresponding 'foo_program="/path/to/foo"' entries in etc/defaults/rc.conf . However, some are missing the functionality to override $command correctly. The attached patch: - Adds missing "${name}_program=/path/to/${name}" entries to defaults/rc.conf - Adds missing functionality of setting "command=${foo_program:-/path/to/foo}" in corresponding rc(8) scripts. Comments welcome. Thanks, Glen --wTWi5aaYRw9ix9vO Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="etc-cmd_program.diff.txt" Content-Transfer-Encoding: quoted-printable Index: head/etc/defaults/rc.conf =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/defaults/rc.conf (revision 240175) +++ head/etc/defaults/rc.conf (working copy) @@ -34,11 +34,15 @@ =20 swapfile=3D"NO" # Set to name of swapfile if aux swapfile desired. apm_enable=3D"NO" # Set to YES to enable APM BIOS functions (or NO). +apm_program=3D"/usr/sbin/apm" # path to apm program, if you want a differe= nt one. apmd_enable=3D"NO" # Run apmd to handle APM event from userland. +apmd_program=3D"/usr/sbin/apmd" # path to apmd program, if you want a diff= erent one. apmd_flags=3D"" # Flags to apmd (if enabled). ddb_enable=3D"NO" # Set to YES to load ddb scripts at boot. +ddb_program=3D"/sbin/ddb" # path to ddb program, if you want a different o= ne. ddb_config=3D"/etc/ddb.conf" # ddb(8) config file. devd_enable=3D"YES" # Run devd, to trigger programs on device tree change= s. +devd_program=3D"/sbin/devd" # path to ddb program, if you want a different= one. devd_flags=3D"" # Additional flags for devd(8). #kld_list=3D"" # Kernel modules to load after local disks are mounted kldxref_enable=3D"NO" # Build linker.hints files with kldxref(8). @@ -199,6 +203,7 @@ pflog_program=3D"/sbin/pflogd" # where the pflogd program lives pflog_flags=3D"" # additional flags for pflogd ftpproxy_enable=3D"NO" # Set to YES to enable ftp-proxy(8) for pf +ftpproxy_program=3D"/usr/sbin/ftp-proxy" # path to ftp-proxy program. ftpproxy_flags=3D"" # additional flags for ftp-proxy(8) pfsync_enable=3D"NO" # Expose pf state to other hosts for syncing pfsync_syncdev=3D"" # Interface for pfsync to work through @@ -261,6 +266,7 @@ =20 ### Network daemon (miscellaneous) ### hostapd_enable=3D"NO" # Run hostap daemon. +hostapd_program=3D"/usr/sbin/hostapd" # path to hostapd, if you want a dif= ferent one. syslogd_enable=3D"YES" # Run syslog daemon (or NO). syslogd_program=3D"/usr/sbin/syslogd" # path to syslogd, if you want a dif= ferent one. syslogd_flags=3D"-s" # Flags to syslogd (if enabled). @@ -302,6 +308,7 @@ kfd_program=3D"/usr/libexec/kfd" # path to kerberos 5 kfd daemon =20 gssd_enable=3D"NO" # Run the gssd daemon (or NO). +gssd_program=3D"/usr/sbin/gssd" # path to gssd program. gssd_flags=3D"" # Flags for gssd. =20 rwhod_enable=3D"NO" # Run the rwho daemon (or NO). @@ -309,6 +316,8 @@ rarpd_enable=3D"NO" # Run rarpd (or NO). rarpd_flags=3D"-a" # Flags to rarpd. bootparamd_enable=3D"NO" # Run bootparamd (or NO). +bootparamd_program=3D"/usr/sbin/bootparamd" # path to bootparamd, if you w= ant a + # different one. bootparamd_flags=3D"" # Flags to bootparamd pppoed_enable=3D"NO" # Run the PPP over Ethernet daemon. pppoed_provider=3D"*" # Provider and ppp(8) config file entry. @@ -345,6 +354,7 @@ rpcbind_flags=3D"" # Flags to rpcbind (if enabled). rpc_ypupdated_enable=3D"NO" # Run if NIS master and SecureRPC (or NO). keyserv_enable=3D"NO" # Run the SecureRPC keyserver (or NO). +keyserv_program=3D"/usr/sbin/keyserv" # path to keyserv program. keyserv_flags=3D"" # Flags to keyserv (if enabled). nfsv4_server_enable=3D"NO" # Enable support for NFSv4 nfscbd_enable=3D"NO" # NFSv4 client side callback daemon @@ -383,6 +393,8 @@ # Be sure to understand the security implications of running SNMP v1/v2 # in your network. bsnmpd_enable=3D"NO" # Run the SNMP daemon (or NO). +bsnmpd_program=3D"/usr/sbin/bsnmpd" # path to bsnmpd, if you want a + # different one. bsnmpd_flags=3D"" # Flags for bsnmpd. =20 ### Network routing options: ### @@ -403,6 +415,7 @@ mrouted_flags=3D"" # Flags for multicast routing daemon. ipxgateway_enable=3D"NO" # Set to YES to enable IPX routing. ipxrouted_enable=3D"NO" # Set to YES to run the IPX routing daemon. +ipxrouted_program=3D"/usr/sbin/IPXrouted" # path to ipxrouted program. ipxrouted_flags=3D"" # Flags for IPX routing daemon. arpproxy_all=3D"NO" # replaces obsolete kernel option ARP_PROXYALL. forward_sourceroute=3D"NO" # do source routing (only if gateway_enable is = set to "YES") @@ -422,14 +435,18 @@ ### Bluetooth ### hcsecd_enable=3D"NO" # Enable hcsecd(8) (or NO) hcsecd_config=3D"/etc/bluetooth/hcsecd.conf" # hcsecd(8) configuration file +hcsecd_program=3D"/usr/sbin/hcsecd" # path to hcsecd program. =20 sdpd_enable=3D"NO" # Enable sdpd(8) (or NO) +sdpd_program=3D"/usr/sbin/sdpd" # path to sdpd program. sdpd_control=3D"/var/run/sdp" # sdpd(8) control socket sdpd_groupname=3D"nobody" # set spdp(8) user/group to run as after sdpd_username=3D"nobody" # it initializes =20 bthidd_enable=3D"NO" # Enable bthidd(8) (or NO) bthidd_config=3D"/etc/bluetooth/bthidd.conf" # bthidd(8) configuration file +bthidd_program=3D"/usr/sbin/bthidd" # path to bthidd program, if you want a + # different one. bthidd_hids=3D"/var/db/bthidd.hids" # bthidd(8) known HID devices file =20 rfcomm_pppd_server_enable=3D"NO" # Enable rfcomm_pppd(8) in server mode (o= r NO) @@ -598,6 +615,7 @@ lpd_program=3D"/usr/sbin/lpd" # path to lpd, if you want a different one. lpd_flags=3D"" # Flags to lpd (if enabled). nscd_enable=3D"NO" # Run the nsswitch caching daemon. +nscd_program=3D"/usr/sbin/nscd" # path to nscd program. chkprintcap_enable=3D"NO" # Run chkprintcap(8) before running lpd. chkprintcap_flags=3D"-d" # Create missing directories by default. dumpdev=3D"AUTO" # Device to crashdump to (device name, AUTO, or NO). Index: head/etc/rc.d/nscd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/nscd (revision 240175) +++ head/etc/rc.d/nscd (working copy) @@ -21,7 +21,6 @@ name=3D"nscd" rcvar=3D"nscd_enable" =20 -command=3D/usr/sbin/nscd extra_commands=3D"flush" flush_cmd=3D"${command} -I all" =20 @@ -46,6 +45,7 @@ =20 =20 load_rc_config $name +command=3D"${nscd_program:-/usr/sbin/nscd}" _nscd_set_option "enable" "NO" _nscd_set_option "pidfile" "/var/run/nscd.pid" _nscd_set_option "flags" "" Index: head/etc/rc.d/lpd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/lpd (revision 240175) +++ head/etc/rc.d/lpd (working copy) @@ -12,10 +12,13 @@ =20 name=3D"lpd" rcvar=3D"lpd_enable" -command=3D"/usr/sbin/${name}" + required_files=3D"/etc/printcap" start_precmd=3D"chkprintcap" =20 +load_rc_config $name +command=3D"${lpd_program:-/usr/sbin/${name}}" + chkprintcap() { if checkyesno chkprintcap_enable ; then @@ -23,5 +26,4 @@ fi } =20 -load_rc_config $name run_rc_command "$1" Index: head/etc/rc.d/sshd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/sshd (revision 240175) +++ head/etc/rc.d/sshd (working copy) @@ -11,13 +11,15 @@ =20 name=3D"sshd" rcvar=3D"sshd_enable" -command=3D"/usr/sbin/${name}" keygen_cmd=3D"sshd_keygen" start_precmd=3D"sshd_precmd" configtest_cmd=3D"sshd_configtest" pidfile=3D"/var/run/${name}.pid" extra_commands=3D"configtest keygen reload" =20 +load_rc_config $name +command=3D"${sshd_program:-/usr/sbin/${name}}" + timeout=3D300 =20 user_reseed() @@ -106,5 +108,4 @@ sshd_configtest } =20 -load_rc_config $name run_rc_command "$1" Index: head/etc/rc.d/rpcbind =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/rpcbind (revision 240175) +++ head/etc/rc.d/rpcbind (working copy) @@ -11,9 +11,10 @@ =20 name=3D"rpcbind" rcvar=3D"rpcbind_enable" -command=3D"/usr/sbin/${name}" + +load_rc_config $name +command=3D"${rpcbind_program:-/usr/sbin/${name}}" =20 stop_postcmd=3D'/bin/rm -f /var/run/rpcbind.*' =20 -load_rc_config $name run_rc_command "$1" Index: head/etc/rc.d/ddb =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/ddb (revision 240175) +++ head/etc/rc.d/ddb (working copy) @@ -12,7 +12,6 @@ =20 name=3D"ddb" rcvar=3D"ddb_enable" -command=3D"/sbin/${name}" start_precmd=3D"ddb_prestart" stop_cmd=3D":" =20 @@ -25,7 +24,7 @@ } =20 load_rc_config $name - +command=3D"${ddb_program:-/sbin/${name}}" required_files=3D"${ddb_config}" command_args=3D"${ddb_config}" =20 Index: head/etc/rc.d/bootparams =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/bootparams (revision 240175) +++ head/etc/rc.d/bootparams (working copy) @@ -13,7 +13,8 @@ name=3D"bootparamd" rcvar=3D"bootparamd_enable" required_files=3D"/etc/bootparams" -command=3D"/usr/sbin/${name}" =20 load_rc_config $name +command=3D"${bootparamd_program:-/usr/sbin/${name}}" + run_rc_command "$1" Index: head/etc/rc.d/ftp-proxy =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/ftp-proxy (revision 240175) +++ head/etc/rc.d/ftp-proxy (working copy) @@ -11,7 +11,7 @@ =20 name=3D"ftpproxy" rcvar=3D"ftpproxy_enable" -command=3D"/usr/sbin/ftp-proxy" - load_rc_config $name +command=3D"${ftpproxy_program:-/usr/sbin/ftp-proxy}" + run_rc_command "$1" Index: head/etc/rc.d/ftpd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/ftpd (revision 240175) +++ head/etc/rc.d/ftpd (working copy) @@ -11,15 +11,17 @@ =20 name=3D"ftpd" rcvar=3D"ftpd_enable" -command=3D"/usr/libexec/${name}" + pidfile=3D"/var/run/${name}.pid" start_precmd=3Dftpd_prestart =20 +load_rc_config $name +command=3D"${ftpd_program:-/usr/libexec/${name}}" + ftpd_prestart() { rc_flags=3D"-D ${rc_flags}" return 0 } =20 -load_rc_config $name run_rc_command "$1" Index: head/etc/rc.d/mrouted =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/mrouted (revision 240175) +++ head/etc/rc.d/mrouted (working copy) @@ -11,10 +11,11 @@ =20 name=3D"mrouted" rcvar=3D"mrouted_enable" -command=3D"/usr/local/sbin/${name}" pidfile=3D"/var/run/${name}.pid" required_files=3D"/etc/${name}.conf" extra_commands=3D"reload" =20 load_rc_config $name +command=3D"${mrouted_program:-/usr/local/sbin/${name}}" + run_rc_command "$1" Index: head/etc/rc.d/dhclient =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/dhclient (revision 240175) +++ head/etc/rc.d/dhclient (working copy) @@ -53,6 +53,7 @@ =20 load_rc_config $name load_rc_config network +command=3D"${dhclient_program:-/sbin/${name}}" =20 if [ -z $ifn ] ; then # only complain if a command was specified but no interface Index: head/etc/rc.d/amd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/amd (revision 240175) +++ head/etc/rc.d/amd (working copy) @@ -12,11 +12,14 @@ =20 name=3D"amd" rcvar=3D"amd_enable" -command=3D"/usr/sbin/${name}" + start_precmd=3D"amd_precmd" command_args=3D"&" extra_commands=3D"reload" =20 +load_rc_config $name +command=3D"${amd_program:-/usr/sbin/${name}}" + amd_precmd() { force_depend nfsclient nfs_client || return 1 @@ -44,5 +47,4 @@ esac } =20 -load_rc_config $name run_rc_command "$1" Index: head/etc/rc.d/devd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/devd (revision 240175) +++ head/etc/rc.d/devd (working copy) @@ -12,11 +12,13 @@ =20 name=3D"devd" rcvar=3D"devd_enable" -command=3D"/sbin/${name}" =20 start_precmd=3D${name}_prestart stop_precmd=3Dfind_pidfile =20 +load_rc_config $name +command=3D"${devd_program:-/sbin/${name}}" + find_pidfile() { if get_pidfile_from_conf pid-file /etc/devd.conf; then @@ -36,5 +38,4 @@ fi } =20 -load_rc_config $name run_rc_command "$1" Index: head/etc/rc.d/ipxrouted =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/ipxrouted (revision 240175) +++ head/etc/rc.d/ipxrouted (working copy) @@ -12,8 +12,9 @@ =20 name=3D"ipxrouted" rcvar=3D"ipxrouted_enable" -command=3D"/usr/sbin/IPXrouted" -command_args=3D"> /dev/null 2>&1" =20 load_rc_config $name +command=3D"${ipxrouted_program:-/usr/sbin/IPXrouted}" +command_args=3D"> /dev/null 2>&1" + run_rc_command "$1" Index: head/etc/rc.d/cron =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/cron (revision 240175) +++ head/etc/rc.d/cron (working copy) @@ -12,10 +12,11 @@ =20 name=3D"cron" rcvar=3D"cron_enable" -command=3D"/usr/sbin/${name}" pidfile=3D"/var/run/${name}.pid" =20 load_rc_config $name +command=3D${cron_program:-/usr/sbin/${name}} + if checkyesno cron_dst then cron_flags=3D"$cron_flags -s" Index: head/etc/rc.d/pflog =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/pflog (revision 240175) +++ head/etc/rc.d/pflog (working copy) @@ -11,15 +11,16 @@ =20 name=3D"pflog" rcvar=3D"pflog_enable" -command=3D"/sbin/pflogd" pidfile=3D"/var/run/pflogd.pid" start_precmd=3D"pflog_prestart" stop_postcmd=3D"pflog_poststop" extra_commands=3D"reload resync" - # for backward compatibility resync_cmd=3D"pflog_resync" =20 +load_rc_config $name +command=3D"${pflog_program:-/sbin/pflogd}" + pflog_prestart() { load_kld pflog || return 1 @@ -52,5 +53,4 @@ run_rc_command reload } =20 -load_rc_config $name run_rc_command "$1" Index: head/etc/rc.d/ppp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/ppp (revision 240175) +++ head/etc/rc.d/ppp (working copy) @@ -11,11 +11,13 @@ =20 name=3D"ppp" rcvar=3D"ppp_enable" -command=3D"/usr/sbin/${name}" start_cmd=3D"ppp_start" stop_cmd=3D"ppp_stop" start_postcmd=3D"ppp_poststart" =20 +load_rc_config $name +command=3D"${ppp_program:-/usr/sbin/${name}}" + ppp_start_profile() { local _ppp_profile _ppp_mode _ppp_nat _ppp_unit @@ -130,5 +132,4 @@ echo "." } =20 -load_rc_config $name run_rc_command $* Index: head/etc/rc.d/bthidd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/bthidd (revision 240175) +++ head/etc/rc.d/bthidd (working copy) @@ -12,7 +12,6 @@ =20 name=3D"bthidd" rcvar=3D"bthidd_enable" -command=3D"/usr/sbin/${name}" pidfile=3D"/var/run/${name}.pid" start_precmd=3D"bthidd_prestart" =20 @@ -25,6 +24,7 @@ } =20 load_rc_config $name +command=3D"${bthidd_program:-/usr/sbin/${name}}" config=3D"${bthidd_config:-/etc/bluetooth/${name}.conf}" hids=3D"${bthidd_hids:-/var/db/${name}.hids}" command_args=3D"-c ${config} -H ${hids} -p ${pidfile}" Index: head/etc/rc.d/gssd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/gssd (revision 240175) +++ head/etc/rc.d/gssd (working copy) @@ -13,6 +13,6 @@ =20 load_rc_config $name rcvar=3D"gssd_enable" -command=3D"${gssd:-/usr/sbin/${name}}" +command=3D"${gssd_program:-/usr/sbin/${name}}" eval ${name}_flags=3D\"${gssd_flags}\" run_rc_command "$1" Index: head/etc/rc.d/mroute6d =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/mroute6d (revision 240175) +++ head/etc/rc.d/mroute6d (working copy) @@ -12,7 +12,8 @@ =20 name=3D"mroute6d" rcvar=3D"mroute6d_enable" -command=3D"/usr/local/sbin/pim6dd" =20 load_rc_config $name +command=3D"${mroute6d_program:-/usr/local/sbin/pim6dd}" + run_rc_command "$1" Index: head/etc/rc.d/apm =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/apm (revision 240175) +++ head/etc/rc.d/apm (working copy) @@ -12,12 +12,15 @@ =20 name=3D"apm" rcvar=3D"apm_enable" + start_precmd=3D"apm_precmd" -command=3D"/usr/sbin/${name}" start_cmd=3D"${command} -e enable" stop_cmd=3D"${command} -e disable" status_cmd=3D"apm_status" =20 +load_rc_config $name +command=3D"${apm_program:-/usr/sbin/${name}}" + apm_precmd() { case `${SYSCTL_N} hw.machine_arch` in @@ -42,5 +45,4 @@ return 1 } =20 -load_rc_config $name run_rc_command "$1" Index: head/etc/rc.d/syslogd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/syslogd (revision 240175) +++ head/etc/rc.d/syslogd (working copy) @@ -12,7 +12,6 @@ name=3D"syslogd" rcvar=3D"syslogd_enable" pidfile=3D"/var/run/syslog.pid" -command=3D"/usr/sbin/${name}" required_files=3D"/etc/syslog.conf" start_precmd=3D"syslogd_precmd" extra_commands=3D"reload" @@ -21,6 +20,9 @@ evalargs=3D"rc_flags=3D\"\`set_socketlist\` \$rc_flags\"" altlog_proglist=3D"named" =20 +load_rc_config $name +command=3D"${syslogd_program:-/usr/sbin/${name}}" + syslogd_precmd() { local _l _ldir @@ -68,5 +70,4 @@ done echo $_socketargs } -load_rc_config $name run_rc_command "$1" Index: head/etc/rc.d/keyserv =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/keyserv (revision 240175) +++ head/etc/rc.d/keyserv (working copy) @@ -14,13 +14,14 @@ =20 name=3D"keyserv" rcvar=3D"keyserv_enable" -command=3D"/usr/sbin/${name}" start_precmd=3D"keyserv_prestart" =20 +load_rc_config $name +command=3D"${keyserv_program:-/usr/sbin/${name}}" + keyserv_prestart() { force_depend rpcbind || return 1 } =20 -load_rc_config $name run_rc_command "$1" Index: head/etc/rc.d/hostapd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/hostapd (revision 240175) +++ head/etc/rc.d/hostapd (working copy) @@ -11,7 +11,6 @@ =20 name=3D"hostapd" rcvar=3D"hostapd_enable" -command=3D"/usr/sbin/${name}" =20 conf_file=3D"/etc/${name}.conf" pidfile=3D"/var/run/${name}.pid" @@ -22,4 +21,6 @@ extra_commands=3D"reload" =20 load_rc_config ${name} +command=3D"${hostapd_program:-/usr/sbin/${name}}" + run_rc_command "$1" Index: head/etc/rc.d/inetd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/inetd (revision 240175) +++ head/etc/rc.d/inetd (working copy) @@ -11,10 +11,12 @@ =20 name=3D"inetd" rcvar=3D"inetd_enable" -command=3D"/usr/sbin/${name}" + pidfile=3D"/var/run/${name}.pid" required_files=3D"/etc/${name}.conf" extra_commands=3D"reload" =20 load_rc_config $name +command=3D"${inetd_program:-/usr/sbin/${name}}" + run_rc_command "$1" Index: head/etc/rc.d/apmd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/apmd (revision 240175) +++ head/etc/rc.d/apmd (working copy) @@ -12,7 +12,10 @@ =20 name=3D"apmd" rcvar=3D"apmd_enable" -command=3D"/usr/sbin/${name}" + +load_rc_config $name +command=3D"${apmd_program:-/usr/sbin/${name}}" + start_precmd=3D"apmd_prestart" =20 apmd_prestart() @@ -33,5 +36,4 @@ esac } =20 -load_rc_config $name run_rc_command "$1" Index: head/etc/rc.d/natd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/natd (revision 240175) +++ head/etc/rc.d/natd (working copy) @@ -11,11 +11,13 @@ =20 name=3D"natd" rcvar=3D"natd_enable" -command=3D"/sbin/${name}" pidfile=3D"/var/run/${name}.pid" start_precmd=3D"natd_precmd" required_modules=3D"ipdivert" =20 +load_rc_config $name +command=3D"${natd_program:-/sbin/${name}}" + natd_precmd() { if [ -n "${natd_interface}" ]; then @@ -39,5 +41,4 @@ return 0 } =20 -load_rc_config $name run_rc_command "$1" Index: head/etc/rc.d/hcsecd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/hcsecd (revision 240175) +++ head/etc/rc.d/hcsecd (working copy) @@ -12,11 +12,11 @@ =20 name=3D"hcsecd" rcvar=3D"hcsecd_enable" -command=3D"/usr/sbin/${name}" pidfile=3D"/var/run/${name}.pid" required_modules=3D"ng_btsocket" =20 load_rc_config $name +command=3D"${hcsecd_program:-/usr/sbin/${name}}" config=3D"${hcsecd_config:-/etc/bluetooth/${name}.conf}" command_args=3D"-f ${config}" required_files=3D"${config}" Index: head/etc/rc.d/hastd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/hastd (revision 240175) +++ head/etc/rc.d/hastd (working copy) @@ -13,17 +13,18 @@ name=3D"hastd" rcvar=3D"hastd_enable" pidfile=3D"/var/run/${name}.pid" -command=3D"/sbin/${name}" hastctl=3D"/sbin/hastctl" required_files=3D"/etc/hast.conf" stop_precmd=3D"hastd_stop_precmd" required_modules=3D"geom_gate:g_gate" extra_commands=3D"reload" =20 +load_rc_config $name +command=3D"${hastd_program:-/sbin/${name}}" + hastd_stop_precmd() { ${hastctl} role init all } =20 -load_rc_config $name run_rc_command "$1" Index: head/etc/rc.d/ipmon =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/ipmon (revision 240175) +++ head/etc/rc.d/ipmon (working copy) @@ -12,9 +12,11 @@ =20 name=3D"ipmon" rcvar=3D"ipmon_enable" -command=3D"/sbin/${name}" start_precmd=3D"ipmon_precmd" =20 +load_rc_config $name +command=3D"${ipmon_program:-/sbin/${name}}" + ipmon_precmd() { # Continue only if ipfilter or ipnat is enabled and the @@ -29,5 +31,4 @@ return 0 } =20 -load_rc_config $name run_rc_command "$1" Index: head/etc/rc.d/bsnmpd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/bsnmpd (revision 240175) +++ head/etc/rc.d/bsnmpd (working copy) @@ -11,8 +11,9 @@ =20 name=3D"bsnmpd" rcvar=3D"bsnmpd_enable" -command=3D"/usr/sbin/${name}" pidfile=3D"/var/run/snmpd.pid" =20 load_rc_config $name +command=3D"${bsnmpd_program:-/usr/sbin/${name}}" + run_rc_command "$1" Index: head/etc/rc.d/sdpd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/sdpd (revision 240175) +++ head/etc/rc.d/sdpd (working copy) @@ -11,11 +11,11 @@ . /etc/rc.subr =20 name=3D"sdpd" -command=3D"/usr/sbin/${name}" rcvar=3D"sdpd_enable" required_modules=3D"ng_btsocket" =20 load_rc_config $name +command=3D"${sdpd_program:-/usr/sbin/${name}}" control=3D"${sdpd_control:-/var/run/sdp}" group=3D"${sdpd_groupname:-nobody}" user=3D"${sdpd_username:-nobody}" Index: head/etc/rc.d/auditd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/auditd (revision 240175) +++ head/etc/rc.d/auditd (working copy) @@ -14,13 +14,16 @@ =20 name=3D"auditd" stop_cmd=3D"auditd_stop" -command=3D"/usr/sbin/${name}" + rcvar=3D"auditd_enable" command_args=3D"${auditd_flags}" required_files=3D"/etc/security/audit_class /etc/security/audit_control /etc/security/audit_event /etc/security/audit_user /etc/security/audit_warn" =20 +load_rc_config $name +command=3D"${auditd_program:-/usr/sbin/${name}}" + auditd_stop() { =20 @@ -28,5 +31,4 @@ sleep 1 } =20 -load_rc_config $name run_rc_command "$1" Index: head/etc/rc.d/ntpd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/etc/rc.d/ntpd (revision 240175) +++ head/etc/rc.d/ntpd (working copy) @@ -12,11 +12,11 @@ =20 name=3D"ntpd" rcvar=3D"ntpd_enable" -command=3D"/usr/sbin/${name}" pidfile=3D"/var/run/${name}.pid" start_precmd=3D"ntpd_precmd" =20 load_rc_config $name +command=3D"${ntpd_program:-/usr/sbin/${name}}" =20 ntpd_precmd() { --wTWi5aaYRw9ix9vO-- --ULyIDA2m8JTe+TiX Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBCAAGBQJQSQASAAoJEFJPDDeguUajY9cH/ROLFeyxu2AcEqq8McTatWDN nSuIUOGebNC0EbhatIfTnqzGIjF2dFfRQ74e418ovhe4QlrskH4h7ZVrNCu6U/iA zyCYjOXkUmUDSCefcLUBw8W3hStjIhERYdi+dhoLRjwpE+8DZ51hwpqtlgnwtPeh bpm02CyLTZ1k49KSIpPv700fFqsQKdB024HchGM7AFrgvYORHP8RmaNELAdXi4ma OHQqd7CsXMhOsjXUcdDRl86ElR4IMgFazH2uYvAkahPG3oXe4C7V2MprvAMAQ/pR qgiNt741B5b+ehDmtt3vH1Rt+VUrO5YGwB9AAxxPcQ7yrYLQum4Y9oxhpWqESus= =3pgT -----END PGP SIGNATURE----- --ULyIDA2m8JTe+TiX--