misc/118770: PATCH: rc.d scripts: print information instead of
silently failing when rcvar is not set
Erik Cederstrand
erik at cederstrand.dk
Mon Dec 17 02:30:01 PST 2007
>Number: 118770
>Category: misc
>Synopsis: PATCH: rc.d scripts: print information instead of silently failing when rcvar is not set
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Mon Dec 17 10:30:00 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator: Erik Cederstrand
>Release: 7.0-BETA4
>Organization:
>Environment:
FreeBSD blanc.affect-it.dk 7.0-BETA4 FreeBSD 7.0-BETA4 #0: Sun Dec 2 19:19:04 UTC 2007 root at logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
>Description:
Starting an rc.d script without the corresponding rcvar variable set in rc.conf will silently fail. Printing a notice would be more helpful.
>How-To-Repeat:
# /etc/rc.d/ftpd start
#
.. but ftpd is not started
>Fix:
This patch to /etc/rc.subr notifies the user if the rc.d script is called without the rcvar set.
# diff rc.subr.orig rc.subr
608a609
> echo "$name not started. Set ${rcvar} to YES in
/etc./rc.conf or use '$name onestart'."
which gives the output:
# /etc/rc.d/ftpd start
ftpd not started. Set ftpd_enable to YES in /etc./rc.conf or use 'ftpd
onestart'.
#
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list