summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2005-03-02 02:46:47 +0000
committerbrooks <brooks@FreeBSD.org>2005-03-02 02:46:47 +0000
commit5960c03b45ee0821adf04d6323fd18b42dafb961 (patch)
tree51ae8feff1d54be4de7742fe72d483f8356e96a3
parent352e54a36d54c7a8fa00f23ecf81dee374a89f06 (diff)
downloadFreeBSD-src-5960c03b45ee0821adf04d6323fd18b42dafb961.zip
FreeBSD-src-5960c03b45ee0821adf04d6323fd18b42dafb961.tar.gz
Allow chkprintcap(8) to be run before lpd is started. Disabled by
default for now. Default flags create missing directories. Remove comment about doing this in etc/rc.d/var. Unlike in the PR, I chose to do this in the lpd script where we reliably have /usr available. PR: conf/71488 Submitted by: RZ-FreeBSD0904 at fh-karlsruhe dot de
-rw-r--r--etc/defaults/rc.conf2
-rwxr-xr-xetc/rc.d/lpd8
-rw-r--r--etc/rc.d/var2
3 files changed, 10 insertions, 2 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index c28241b..1145d31 100644
--- a/etc/defaults/rc.conf
+++ b/etc/defaults/rc.conf
@@ -432,6 +432,8 @@ cron_flags="" # Which options to pass to the cron daemon.
lpd_enable="NO" # Run the line printer daemon.
lpd_program="/usr/sbin/lpd" # path to lpd, if you want a different one.
lpd_flags="" # Flags to lpd (if enabled).
+chkprintcap_enable="NO" # Run chkprintcap(8) before running lpd.
+chkprintcap_flags="-d" # Create missing directories by default.
usbd_enable="NO" # Run the usbd daemon.
usbd_flags="" # Flags to usbd (if enabled).
dumpdev="NO" # Device name to crashdump to (or NO).
diff --git a/etc/rc.d/lpd b/etc/rc.d/lpd
index 8ab3a8c..dc2c3f3 100755
--- a/etc/rc.d/lpd
+++ b/etc/rc.d/lpd
@@ -14,6 +14,14 @@ name="lpd"
rcvar=`set_rcvar`
command="/usr/sbin/${name}"
required_files="/etc/printcap"
+start_precmd="_chkprintcap"
+
+_chkprintcap()
+{
+ if checkyesno chkprintcap_enable ; then
+ /usr/sbin/chkprintcap ${chkprintcap_flags}
+ fi
+}
load_rc_config $name
run_rc_command "$1"
diff --git a/etc/rc.d/var b/etc/rc.d/var
index 3eb21e2..6af285c 100644
--- a/etc/rc.d/var
+++ b/etc/rc.d/var
@@ -46,8 +46,6 @@ _populate_var()
/usr/sbin/mtree -deU -f /etc/mtree/BSD.sendmail.dist -p / > /dev/null
;;
esac
-
- # XXX: should create spool dirs for lpd
}
# If we do not have a writable /var, create a memory filesystem for /var
OpenPOWER on IntegriCloud