From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id B78FB198005 for ; Mon, 4 Mar 2013 03:13:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8977FE06B5; Mon, 4 Mar 2013 03:13:37 +0000 (UTC) Received: from vms173021pub.verizon.net (vms173021pub.verizon.net [206.46.173.21]) by pigeon.gentoo.org (Postfix) with ESMTP id 047B2E06B5 for ; Mon, 4 Mar 2013 03:13:36 +0000 (UTC) Received: from odin.tremily.us ([unknown] [72.68.108.243]) by vms173021.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0MJ400HS48YGBG10@vms173021.mailsrvcs.net> for gentoo-catalyst@lists.gentoo.org; Sun, 03 Mar 2013 21:13:29 -0600 (CST) Received: by odin.tremily.us (Postfix, from userid 1000) id 43D42903A7D; Sun, 03 Mar 2013 22:13:27 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin; t=1362366807; bh=JINzUmfWE5WOzqMmD/pn/VEVF2e+KuEyjSkzR6nDPy4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Q8dlIoUV7fqBLfb8acUgJHQOmYp/8j3cHsWDlTnybDTMd66ms8Qxiu2DHa4zr++Cc zt9gDzP4+P7PfVrxVzFzpym/1AGlpJ+KgPTVVQ/TNgg9oVOeuRmQqPKGHHZx0cdqXC BkTnc9huOpomfYVAHXPSHfEzpoH6kqWfnJ4dLjK0= From: "W. Trevor King" To: Catalyst Cc: "W. Trevor King" Subject: [gentoo-catalyst] [PATCH] livecd-bashrc: Avoid a startx race by restricting to tty1 Date: Sun, 03 Mar 2013 22:13:24 -0500 Message-id: <6d3c93bde552943c26acbf6c1946dae23821860c.1362366795.git.wking@tremily.us> X-Mailer: git-send-email 1.7.12.4 In-reply-to: <48b5405f720c6aa9e9472be0fc3a66e7ef336d3e.1362329514.git.wking@tremily.us> References: <48b5405f720c6aa9e9472be0fc3a66e7ef336d3e.1362329514.git.wking@tremily.us> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org X-Archives-Salt: 4d4810fe-e9c2-42bf-9acb-6472b37d601b X-Archives-Hash: bfc168466d0b046d54da55c525b71e2c From: "W. Trevor King" Otherwise several virtual consoles may notice the existence of /etc/startx, and spawn simultaneous X servers. This way we only spawn a single X server, regardless of timing. A better solution here is probably to add a "start" or "x-server" service to /etc/init.d/, but that's more work than I'm up to at the moment. --- livecd/files/livecd-bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/livecd/files/livecd-bashrc b/livecd/files/livecd-bashrc index 983e657..7abfbd4 100644 --- a/livecd/files/livecd-bashrc +++ b/livecd/files/livecd-bashrc @@ -4,7 +4,7 @@ if [ ! "$(grep nox /proc/cmdline)" ] then if [ -x /usr/bin/X ] then - if [ -e /etc/startx ] + if [ -e /etc/startx ] && [ "$(tty)" == /dev/tty1 ] then rm -f /etc/startx ##STARTX -- 1.8.2.rc0.16.g20a599e