Module Name:    src
Committed By:   jmcneill
Date:           Fri Feb 18 00:42:20 UTC 2011

Modified Files:
        src/distrib/sets/lists/xetc: mi
        src/etc/defaults: rc.conf
        src/etc/rc.d: Makefile
Added Files:
        src/etc/rc.d: fccache.in

Log Message:
Add rc.d script to make sure the system fontconfig cache is up to date.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/distrib/sets/lists/xetc/mi
cvs rdiff -u -r1.111 -r1.112 src/etc/defaults/rc.conf
cvs rdiff -u -r1.82 -r1.83 src/etc/rc.d/Makefile
cvs rdiff -u -r0 -r1.1 src/etc/rc.d/fccache.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/xetc/mi
diff -u src/distrib/sets/lists/xetc/mi:1.17 src/distrib/sets/lists/xetc/mi:1.18
--- src/distrib/sets/lists/xetc/mi:1.17	Thu Jan 14 13:47:42 2010
+++ src/distrib/sets/lists/xetc/mi	Fri Feb 18 00:42:20 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.17 2010/01/14 13:47:42 wiz Exp $
+# $NetBSD: mi,v 1.18 2011/02/18 00:42:20 jmcneill Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -106,3 +106,5 @@
 ./etc/rc.d/xdm						etc-x11-rc	xorg
 ./etc/rc.d/xfs						etc-x11-rc	x11
 ./etc/rc.d/xfs						etc-x11-rc	xorg
+./etc/rc.d/fccache					etc-x11-rc	x11
+./etc/rc.d/fccache					etc-x11-rc	xorg

Index: src/etc/defaults/rc.conf
diff -u src/etc/defaults/rc.conf:1.111 src/etc/defaults/rc.conf:1.112
--- src/etc/defaults/rc.conf:1.111	Wed Feb  2 02:20:28 2011
+++ src/etc/defaults/rc.conf	Fri Feb 18 00:42:20 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: rc.conf,v 1.111 2011/02/02 02:20:28 rmind Exp $
+#	$NetBSD: rc.conf,v 1.112 2011/02/18 00:42:20 jmcneill Exp $
 #
 # /etc/defaults/rc.conf --
 #	default configuration of /etc/rc.conf
@@ -273,6 +273,9 @@
 xdm=NO			xdm_flags=""		# X11 display manager; needs
 						# wscons=YES for local displays.
 
+# Update fontconfig cache at boot
+fccache=YES
+
 # YP (NIS) daemons.
 #
 ypbind=NO		ypbind_flags=""

Index: src/etc/rc.d/Makefile
diff -u src/etc/rc.d/Makefile:1.82 src/etc/rc.d/Makefile:1.83
--- src/etc/rc.d/Makefile:1.82	Wed Feb  2 02:20:28 2011
+++ src/etc/rc.d/Makefile	Fri Feb 18 00:42:20 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.82 2011/02/02 02:20:28 rmind Exp $
+# $NetBSD: Makefile,v 1.83 2011/02/18 00:42:20 jmcneill Exp $
 
 .include <bsd.own.mk>
 
@@ -42,9 +42,10 @@
 FILESMODE=	${BINMODE}
 
 .if ${MKX11} != "no"
-CONFIGFILES+=	xdm xfs
+CONFIGFILES+=	xdm xfs fccache
 FILESBUILD_xdm=	yes
 FILESBUILD_xfs=	yes
+FILESBUILD_fccache= yes
 
 .SUFFIXES: .in
 .in:

Added files:

Index: src/etc/rc.d/fccache.in
diff -u /dev/null src/etc/rc.d/fccache.in:1.1
--- /dev/null	Fri Feb 18 00:42:20 2011
+++ src/etc/rc.d/fccache.in	Fri Feb 18 00:42:20 2011
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# $NetBSD: fccache.in,v 1.1 2011/02/18 00:42:20 jmcneill Exp $
+#
+
+# PROVIDE: fccache 
+# REQUIRE: mountcritremote
+# BEFORE:  DAEMON
+
+$_rc_subr_loaded . /etc/rc.subr
+
+name="fccache"
+rcvar=${name}
+command="@X11ROOTDIR@/bin/fc-cache"
+start_cmd="fccache_start"
+stop_cmd=":"
+
+fccache_start()
+{
+	if [ -x "${command}" ]; then
+		echo -n "Updating fontconfig cache:"
+		${command} -q
+		echo " done"
+	fi
+}
+
+load_rc_config $name
+run_rc_command "$1"

Reply via email to