Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Add rc.d script to make sure the system fontconfig cache is ...



details:   https://anonhg.NetBSD.org/src/rev/bf7df1a9f21b
branches:  trunk
changeset: 762243:bf7df1a9f21b
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Fri Feb 18 00:42:20 2011 +0000

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

diffstat:

 distrib/sets/lists/xetc/mi |   4 +++-
 etc/defaults/rc.conf       |   5 ++++-
 etc/rc.d/Makefile          |   5 +++--
 etc/rc.d/fccache.in        |  28 ++++++++++++++++++++++++++++
 4 files changed, 38 insertions(+), 4 deletions(-)

diffs (87 lines):

diff -r 83197c5d66ea -r bf7df1a9f21b distrib/sets/lists/xetc/mi
--- a/distrib/sets/lists/xetc/mi        Thu Feb 17 23:50:18 2011 +0000
+++ b/distrib/sets/lists/xetc/mi        Fri Feb 18 00:42:20 2011 +0000
@@ -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
diff -r 83197c5d66ea -r bf7df1a9f21b etc/defaults/rc.conf
--- a/etc/defaults/rc.conf      Thu Feb 17 23:50:18 2011 +0000
+++ b/etc/defaults/rc.conf      Fri Feb 18 00:42:20 2011 +0000
@@ -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=""
diff -r 83197c5d66ea -r bf7df1a9f21b etc/rc.d/Makefile
--- a/etc/rc.d/Makefile Thu Feb 17 23:50:18 2011 +0000
+++ b/etc/rc.d/Makefile Fri Feb 18 00:42:20 2011 +0000
@@ -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:
diff -r 83197c5d66ea -r bf7df1a9f21b etc/rc.d/fccache.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/rc.d/fccache.in       Fri Feb 18 00:42:20 2011 +0000
@@ -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"



Home | Main Index | Thread Index | Old Index