1 |
commit: 2a7dad7950f55343d4d3f7e37138b760bcce5acf |
2 |
Author: W. Trevor King <wking <AT> tremily <DOT> us> |
3 |
AuthorDate: Mon Mar 4 02:33:02 2013 +0000 |
4 |
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com> |
5 |
CommitDate: Thu Nov 21 09:00:10 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=2a7dad79 |
7 |
|
8 |
livecd-bashrc: Avoid a startx race by restricting to tty1 |
9 |
|
10 |
Otherwise several virtual consoles may notice the existence of |
11 |
/etc/startx, and spawn simultaneous X servers. This way we only spawn |
12 |
a single X server, regardless of timing. |
13 |
|
14 |
A better solution here is probably to add a "start" or "x-server" |
15 |
service to /etc/init.d/, but that's more work than I'm up to at the |
16 |
moment. |
17 |
|
18 |
--- |
19 |
livecd/files/livecd-bashrc | 2 +- |
20 |
1 file changed, 1 insertion(+), 1 deletion(-) |
21 |
|
22 |
diff --git a/livecd/files/livecd-bashrc b/livecd/files/livecd-bashrc |
23 |
index 983e657..7abfbd4 100644 |
24 |
--- a/livecd/files/livecd-bashrc |
25 |
+++ b/livecd/files/livecd-bashrc |
26 |
@@ -4,7 +4,7 @@ if [ ! "$(grep nox /proc/cmdline)" ] |
27 |
then |
28 |
if [ -x /usr/bin/X ] |
29 |
then |
30 |
- if [ -e /etc/startx ] |
31 |
+ if [ -e /etc/startx ] && [ "$(tty)" == /dev/tty1 ] |
32 |
then |
33 |
rm -f /etc/startx |
34 |
##STARTX |