From 828a415bc447f99ce76c7bd89facadb072adbf59 Mon Sep 17 00:00:00 2001 From: Martin Schlemmer Date: Sun, 20 Oct 2002 21:06:36 +0000 Subject: [PATCH] small changes to /etc/init.d/xfs --- x11-base/xfree/files/4.2.1/xfs.start | 31 ++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/x11-base/xfree/files/4.2.1/xfs.start b/x11-base/xfree/files/4.2.1/xfs.start index 23e3ffcbe761..56e47c71f686 100644 --- a/x11-base/xfree/files/4.2.1/xfs.start +++ b/x11-base/xfree/files/4.2.1/xfs.start @@ -2,7 +2,7 @@ # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # Author: Martin Schlemmer -# $Header: /var/cvsroot/gentoo-x86/x11-base/xfree/files/4.2.1/xfs.start,v 1.2 2002/10/20 20:40:12 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-base/xfree/files/4.2.1/xfs.start,v 1.3 2002/10/20 21:06:36 azarah Exp $ #NB: Config is in /etc/conf.d/xfs @@ -36,14 +36,31 @@ check_md5sum() { if [ ! -f $1/fonts.md5 ] then - # No md5 file exist, so create it and return 0 to add this font - # dir as a candidate for updating... - > $1/fonts.md5 - echo "${fontlist}" | xargs -i md5sum {} >> $1/fonts.md5 + if [ -n "${fontlist}" ] + then + # No md5 file exist, so create it and return 0 to add this font + # dir as a candidate for updating... + > $1/fonts.md5 + echo "${fontlist}" | xargs -i md5sum {} >> $1/fonts.md5 - return 0 + return 0 + fi else local retval=1 + + # All the fonts was removed, so cleanup + if [ -z "${fontlist}" ] + then + for x in $1/fonts.* $1/encodings.dir + do + if [ -f ${x} ] + then + rm -f ${x} + fi + done + + return 1 + fi # If any md5 checksum fails, this dir should be updated. if [ -n "$(md5sum -c $1/fonts.md5 2> /dev/null | egrep "FAILED")" ] @@ -112,7 +129,9 @@ setup_font_dirs() { # While we at it, update fontconfig's cache as well if [ -x /usr/bin/fc-cache ] then + ebegin "Updating FC cache" /usr/bin/fc-cache + eend 0 fi if [ ! -x /usr/X11R6/bin/mkfontdir -o ! /usr/X11R6/bin/ttmkfdir2 ] -- 2.26.2