hi there,

i am confused about the rc scripts.

existing ports have pkg/daemon.rc files and a
@rcscript ${RCDIR}/daemon
line in PLIST

pkg_create(1) says:

     @rcscript filename
             Script for the /etc/rc.d framework.  Contrary to @file, absolute
             paths are okay, e.g.,

                   @rcscript ${RCDIR}/ballsd

             In this case, performs an implicit @cwd to ${RCDIR}.


this is not very helpful without the most important part that is in
the porting handbook FAQ:

1. The script has to be placed into ${PKGDIR} with a .rc extension, like
   mpd.rc. This will allow the package tools to pick it up.


also, some ports have executable pkg/*.rc file, some dont.
what's the policy on that?


now on to my problem :]

$ cat pkg/tinyproxy.rc
#!/bin/sh
#
# $OpenBSD$

daemon="${TRUEPREFIX}/sbin/tinyproxy"

. /etc/rc.d/rc.subr

rc_cmd $1


$ cat PLIST
@comment $OpenBSD$
@newgroup _tinyproxy:617
@newuser _tinyproxy:617:_tinyproxy:daemon:tinyproxy:/nonexistent:/sbin/nologin
@man man/man5/tinyproxy.conf.5
@man man/man8/tinyproxy.8
@bin sbin/tinyproxy
share/examples/tinyproxy/
share/examples/tinyproxy/tinyproxy.conf
@sample ${SYSCONFDIR}/tinyproxy.conf
share/tinyproxy/
share/tinyproxy/debug.html
share/tinyproxy/default.html
share/tinyproxy/stats.html
@rcscript ${RCDIR}/tinyproxy


but whenever i make make update-plist after make fake, i get:

===>  Updating plist for tinyproxy-1.8.3
Scanning destdir
Getting old lists
1st pass identifying files
Attaching annotations
Sorting out destdir files
/etc/rc.d/tinyproxy does not belong
/etc/tinyproxy.conf does not belong
pkg/PLIST changed


and the @rcscript line is removed from the new PLIST.

$ diff -u PLIST.orig PLIST
--- PLIST.orig  Thu Oct 13 23:14:12 2011
+++ PLIST       Thu Oct 13 23:15:57 2011
@@ -11,4 +11,3 @@
 share/tinyproxy/debug.html
 share/tinyproxy/default.html
 share/tinyproxy/stats.html
-@rcscript ${RCDIR}/tinyproxy



what am i doing wrong?

-f
-- 
to live is to risk dying.

Reply via email to