Date: Mon, 17 Dec 2007 10:22:38 GMT From: Erik Cederstrand <erik@cederstrand.dk> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/118770: PATCH: rc.d scripts: print information instead of silently failing when rcvar is not set Message-ID: <200712171022.lBHAMcnH033122@www.freebsd.org> Resent-Message-ID: <200712171030.lBHAU0Gn059928@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712171022.lBHAMcnH033122>
