summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-04-17 04:23:44 +0000
committerMike Frysinger <vapier@gentoo.org>2008-04-17 04:23:44 +0000
commit2aa8fd39c3e1b6e4ca0959caf534510949baa805 (patch)
treed72308454315acf98e9065b1147172b1f4d6c755 /x11-apps/xfs/files
parentAdd patch to build on non-x86 arches (diff)
downloadhistorical-2aa8fd39c3e1b6e4ca0959caf534510949baa805.tar.gz
historical-2aa8fd39c3e1b6e4ca0959caf534510949baa805.tar.bz2
historical-2aa8fd39c3e1b6e4ca0959caf534510949baa805.zip
Dont loop forever trying to create /tmp/.font-unix. If it fails sanity, then just abort the process.
Package-Manager: portage-2.2_pre5
Diffstat (limited to 'x11-apps/xfs/files')
-rwxr-xr-xx11-apps/xfs/files/xfs.start10
1 files changed, 8 insertions, 2 deletions
diff --git a/x11-apps/xfs/files/xfs.start b/x11-apps/xfs/files/xfs.start
index 9290a0ec60f9..ca3b456548ce 100755
--- a/x11-apps/xfs/files/xfs.start
+++ b/x11-apps/xfs/files/xfs.start
@@ -1,8 +1,8 @@
#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2
# Author: Martin Schlemmer <azarah@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/x11-apps/xfs/files/xfs.start,v 1.3 2007/09/30 08:21:18 dberkholz Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-apps/xfs/files/xfs.start,v 1.4 2008/04/17 04:23:44 vapier Exp $
#NB: Config is in /etc/conf.d/xfs
@@ -306,12 +306,18 @@ start() {
ebegin "Starting X Font Server"
if [ "`grep -e "^xfs:" /etc/passwd`" ] ; then
+ local sanity=0
# Fix possible race condition, bug #185660
while ! [ -d /tmp/.font-unix ]; do
# Fix possible security problem, turned to hard failure in 6.8.0
# See discussion at http://freedesktop.org/bugzilla/show_bug.cgi?id=306
rm -rf /tmp/.font-unix
mkdir -m 1777 /tmp/.font-unix
+ ((sanity+=1))
+ if [ ${sanity} -gt 1000 ] ; then
+ eend 1 "i give up"
+ return 1
+ fi
done
start-stop-daemon --start --quiet --exec /usr/bin/xfs \