As agreed with espie@, install a first rc script to serve as a test
example. A couple of things are still missing from the infrastructure but the basics work. When everything has been taken care of, we'll start mocing all ports to using the new rc system.
This commit is contained in:
parent
b83ace4a28
commit
a81d6712c2
@ -1,11 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.80 2010/10/18 21:25:08 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.81 2010/10/27 15:42:06 ajacoutot Exp $
|
||||
|
||||
COMMENT= Common Unix Printing System
|
||||
|
||||
VERSION= 1.4.4
|
||||
DISTNAME= cups-${VERSION}-source
|
||||
PKGNAME= cups-${VERSION}
|
||||
REVISION= 3
|
||||
REVISION= 4
|
||||
|
||||
CATEGORIES= print sysutils
|
||||
|
||||
|
@ -1,20 +1,3 @@
|
||||
To enable CUPS, execute '${PREFIX}/sbin/cups-enable' as root.
|
||||
To disable CUPS, execute '${PREFIX}/sbin/cups-disable' as root.
|
||||
|
||||
To start cups at boot time, add the following to
|
||||
/etc/rc.local:
|
||||
|
||||
if [ -x ${PREFIX}/sbin/cupsd ]; then
|
||||
#chown _cups /dev/ulpt[0-1] # uncomment if using USB printer
|
||||
#chown _cups /dev/lp[a,t][0-2] # uncomment if using parallel printer
|
||||
echo y | ${PREFIX}/sbin/cups-enable > /dev/null
|
||||
echo -n ' cupsd'; ${PREFIX}/sbin/cupsd
|
||||
fi
|
||||
|
||||
Starting cupsd will overwrite /etc/printcap. A backup copy of this file
|
||||
is saved as /etc/printcap.pre-cups by '${PREFIX}/sbin/cups-enable'
|
||||
and will be restored when you run '${PREFIX}/sbin/cups-disable'.
|
||||
|
||||
If you want to print to non-Postscript printers or use CUPS bundled PPD
|
||||
files (i.e. drivers), you'll need to install ghostscript. You will also
|
||||
most probably want to install the foomatic-filters package which
|
||||
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST,v 1.25 2010/05/16 14:16:36 ajacoutot Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.26 2010/10/27 15:42:06 ajacoutot Exp $
|
||||
@conflict LPRng-*
|
||||
@newgroup _cups:541
|
||||
@newuser _cups:541:541:daemon:CUPS printer spooler daemon:/var/empty:/sbin/nologin
|
||||
@ -1077,3 +1077,6 @@ share/locale/zh_TW/cups_zh_TW.po
|
||||
@unexec rm -rf /var/cache/cups
|
||||
@extraunexec rm -rf /var/log/cups
|
||||
@extraunexec rm -rf /var/spool/cups
|
||||
@owner
|
||||
@group
|
||||
@rcscript ${RCDIR}/cupsd
|
||||
|
20
print/cups/pkg/cupsd.rc
Executable file
20
print/cups/pkg/cupsd.rc
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /etc/rc.d/rc.subr
|
||||
|
||||
daemon="${TRUEPREFIX}/sbin/cupsd"
|
||||
pexp="${daemon} -C ${SYSCONFDIR}/cups/cupsd.conf"
|
||||
|
||||
rc_pre() {
|
||||
chown _cups /dev/ulpt[0-1]
|
||||
chown _cups /dev/lp[a,t][0-2]
|
||||
echo y | ${TRUEPREFIX}/sbin/cups-enable >/dev/null
|
||||
}
|
||||
|
||||
rc_post() {
|
||||
echo y | ${TRUEPREFIX}/sbin/cups-disable >/dev/null
|
||||
chown root /dev/lp[a,t][0-2]
|
||||
chown root /dev/ulpt[0-1]
|
||||
}
|
||||
|
||||
rc_cmd $1
|
Loading…
Reference in New Issue
Block a user