Don't try and change ownership on files that don't exist.

This commit is contained in:
ajacoutot 2010-11-30 08:09:09 +00:00
parent 20759854d9
commit cbdb3f818c
2 changed files with 8 additions and 6 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.87 2010/11/20 09:48:39 espie Exp $
# $OpenBSD: Makefile,v 1.88 2010/11/30 08:09:09 ajacoutot Exp $
COMMENT= Common Unix Printing System
@ -6,6 +6,8 @@ VERSION= 1.4.5
DISTNAME= cups-${VERSION}-source
PKGNAME= cups-${VERSION}
REVISION= 0
CATEGORIES= print sysutils
# XXX ghostscript needs to dlopen() libcupsimage.so.4

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $OpenBSD: cupsd.rc,v 1.3 2010/10/29 12:54:44 ajacoutot Exp $
# $OpenBSD: cupsd.rc,v 1.4 2010/11/30 08:09:09 ajacoutot Exp $
. /etc/rc.d/rc.subr
@ -13,8 +13,8 @@ _lpfiles="/usr/bin/lpq /usr/bin/lpr /usr/bin/lprm /usr/sbin/lpc \
/usr/share/man/cat8/lpd.0"
rc_pre() {
chown _cups /dev/ulpt[0-1]
chown _cups /dev/lp[a,t][0-2]
[ -e /dev/ulpt0 ] && chown _cups /dev/ulpt[0-1]
[ -e /dev/lpt0 ] && chown _cups /dev/lp[a,t][0-2]
if [ -e /usr/sbin/lpd.pre-cups -a ! -f /usr/sbin/lpd -a -L /usr/sbin/lpc ]; then
return
@ -59,8 +59,8 @@ rc_post() {
fi
fi
chown root /dev/lp[a,t][0-2]
chown root /dev/ulpt[0-1]
[ -e /dev/lpt0 ] && chown root /dev/lp[a,t][0-2]
[ -e /dev/ulpt0 ] && chown root /dev/ulpt[0-1]
}
rc_cmd $1