summaryrefslogtreecommitdiffstats
path: root/print/pips800/files/ekpd.sh
blob: b5628ef0653181663625e2a249cd1aca635d923e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: ekpd
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown

# Define these ekpd_* variables in one of these files:
#	/etc/rc.conf
#	/etc/rc.conf.local
#	/etc/rc.conf.d/ekpd
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
# ekpd_enable="YES"
# ekpd_flags=""			# Flags to ekpd program

. /etc/rc.subr

name="ekpd"
rcvar=`set_rcvar`
command="%%PREFIX%%/libexec/pips/printer/ekpd"
start_precmd="ekpd_prestart"

ekpd_prestart() {
	OLDMASK=`umask`
	umask 000
	[ ! -d /var/ekpd ] && mkdir -p /var/ekpd && chmod 1777 /var/ekpd
	[ ! -e /var/ekpd/ekplp0 ] && rm -f /var/ekpd/ekplp0 && \
		mkfifo -m 666 /var/ekpd/ekplp0
	umask $OLDMASK
}

load_rc_config $name
ekpd_enable=${ekpd_enable:-"NO"}
run_rc_command "$1"
OpenPOWER on IntegriCloud