diff options
author | jlam <jlam> | 2000-12-28 00:13:08 +0000 |
---|---|---|
committer | jlam <jlam> | 2000-12-28 00:13:08 +0000 |
commit | 4b8becb394427354bf33b083e4b3811bba36640b (patch) | |
tree | 5d28c10d6fc0bda8623cab0b6d8424f2c33defdd /print/LPRng-core/files | |
parent | e86ce9d40cfb02b21a177185f1f6ddcae0999531 (diff) | |
download | pkgsrc-4b8becb394427354bf33b083e4b3811bba36640b.tar.gz |
Note conflict with print/cups.
Add INSTALL/DEINSTALL scripts to handle the configure files.
Replace lprng.sh with a rc.d-style script LPRng.sh.
Fix problems with setting the default paths for LPRng.
Diffstat (limited to 'print/LPRng-core/files')
-rw-r--r-- | print/LPRng-core/files/LPRng.sh | 58 | ||||
-rw-r--r-- | print/LPRng-core/files/lprng.sh | 16 | ||||
-rw-r--r-- | print/LPRng-core/files/patch-sum | 5 |
3 files changed, 60 insertions, 19 deletions
diff --git a/print/LPRng-core/files/LPRng.sh b/print/LPRng-core/files/LPRng.sh new file mode 100644 index 00000000000..c6f2a4655da --- /dev/null +++ b/print/LPRng-core/files/LPRng.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# +# $NetBSD: LPRng.sh,v 1.1 2000/12/28 00:13:08 jlam Exp $ +# +# PROVIDE: lpd +# REQUIRE: DAEMON + +name="lpd" +command=@@PREFIX@@/sbin/${name} +pidfile="/var/run/${name}.pid" + +if [ -f ${pidfile} ] +then + pid=`head -1 ${pidfile}` +else + pid=`ps -ax | awk '{print $1,$5}' | grep ${name} | awk '{print $1}'` +fi + +cmd=${1:-start} + +case ${cmd} in +start) + if [ "$pid" = "" -a -x ${command} ] + then + echo "Starting LPRng." + ${command} + fi + ;; + +stop) + if [ "$pid" != "" ] + then + echo "Stopping LPRng." + kill $pid + fi + ;; + +restart) + ( $0 stop ) + sleep 5 + $0 start + ;; + +status) + if [ "$pid" != "" ] + then + echo "LPRng is running as pid ${pid}." + else + echo "LPRng is not running." + fi + ;; + +*) + echo 1>&2 "Usage: ${name} [restart|start|stop|status]" + exit 1 + ;; +esac +exit 0 diff --git a/print/LPRng-core/files/lprng.sh b/print/LPRng-core/files/lprng.sh deleted file mode 100644 index c9d8a0c1375..00000000000 --- a/print/LPRng-core/files/lprng.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -# -# $NetBSD: lprng.sh,v 1.1.1.1 2000/12/12 20:09:42 kei Exp $ - -# Stop BSD lpd if it is running. -# -if [ -f /var/run/lpd.pid ]; then - kill `@@CAT@@ /var/run/lpd.pid` -fi - -# Start LPRng lpd if it exists. -# -if [ -x @@PREFIX@@/sbin/lpd ]; then - @@ECHO@@ -n ' LPRng'; - @@PREFIX@@/sbin/lpd -fi diff --git a/print/LPRng-core/files/patch-sum b/print/LPRng-core/files/patch-sum index 369ea95e6ab..f999a88f473 100644 --- a/print/LPRng-core/files/patch-sum +++ b/print/LPRng-core/files/patch-sum @@ -1,5 +1,4 @@ -$NetBSD: patch-sum,v 1.1.1.1 2000/12/12 20:09:42 kei Exp $ +$NetBSD: patch-sum,v 1.2 2000/12/28 00:13:08 jlam Exp $ MD5 (patch-ab) = b91d3b0d6624edd43adf33c9852a4984 -MD5 (patch-ac) = 89fa587f78602373b3e3b0e736125c92 -MD5 (patch-ad) = b6ee24a8fba88e704be025f9efbb004c +MD5 (patch-ac) = ea0aa9116935a818bf5c502be68730d7 |