Bug 74287 - Update port sysutils/anacron: added startup script
Summary: Update port sysutils/anacron: added startup script
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-23 13:00 UTC by Derik van Zuetphen
Modified: 2004-11-26 09:50 UTC (History)
1 user (show)

See Also:


Attachments
diff-2.3-3 (3.03 KB, text/plain)
2004-11-23 13:00 UTC, Derik van Zuetphen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Derik van Zuetphen 2004-11-23 13:00:49 UTC
	added startup script
	fixes pr ports/74135
Comment 1 Derik van Zuetphen 2004-11-23 17:44:50 UTC
Oops.

The line

++rcvar`set_rcvar`

in the diff should be

++rcvar=`set_rcvar`
Comment 2 Sergey Matveychuk freebsd_committer freebsd_triage 2004-11-24 02:45:34 UTC
State Changed
From-To: open->closed

Committed, thanks!
Comment 3 solstice.dhiver 2004-11-24 20:59:33 UTC
the name of the script must be anacron and not anacron.sh.
because scripts named *.sh are considered old-style script and run
whatever is set in /etc/rc.conf (am i right ?)

install the anacron's port and you will see that even if you don't set
anything in /etc/rc.conf the anacron.sh is run.

Moreover you got that warning
Local package initialization:/usr/local/etc/rc.d/anacron.sh: WARNING:
$anacron_enable is not set properly - see rc.conf(5).

you must add one line to make that warning disapears as the patch below
show
--- anacron     Wed Nov 24 21:57:10 2004
+++ /usr/local/etc/rc.d/anacron Wed Nov 24 21:50:17 2004
@@ -6,6 +6,8 @@
 # REQUIRE: LOGIN
 # KEYWORD: FreeBSD

+anacron_enable=${anacron_enable-"NO"}
+
 . /etc/rc.subr

 prefix=/usr/local
Comment 4 Derik van Zuetphen 2004-11-26 09:44:03 UTC
Quoting solsTiCe d'Hiver (solstice.dhiver@laposte.net):
> the name of the script must be anacron and not anacron.sh.
> because scripts named *.sh are considered old-style script and run
> whatever is set in /etc/rc.conf (am i right ?)

The name of the script doesn't matter for rcNG, see rc(8). Only
old-style rc-scripts must be named *.sh.


> install the anacron's port and you will see that even if you don't set
> anything in /etc/rc.conf the anacron.sh is run.
> 
> Moreover you got that warning
> Local package initialization:/usr/local/etc/rc.d/anacron.sh: WARNING:
> $anacron_enable is not set properly - see rc.conf(5).

That's intentional.

I think it is better to emit a warning, than to silently ignore the
port, or worse, to silently start an unconfigured program.

-Derik.