File Xterminal-0.4.dif of Package xdmsc
--- Makefile.Linux
+++ Makefile.Linux 2007-02-09 10:41:40.000000000 +0000
@@ -9,7 +9,6 @@
#
# Author: Werner Fink
#
-USER = -o root -g root
LOGDIR = $(DESTDIR)/var/log
INIDIR = $(DESTDIR)/etc/init.d
DOINST = $(DESTDIR)/install
@@ -19,10 +18,10 @@ compile:
@echo "nothing to do"
install:
- install -d $(USER) $(LOGDIR)
- install -d $(USER) $(INIDIR)
- install -d $(USER) $(DOINST)
- install -d $(USER) $(ETCRCC)
- install -c $(USER) -m 0644 rc.config.xdmsc $(ETCRCC)/sysconfig.xdmsc
- install -c $(USER) -m 0755 rx $(INIDIR)
-# install -c $(USER) -m 0755 doinst.sh $(DOINST)
+ install -d $(LOGDIR)
+ install -d $(INIDIR)
+ install -d $(DOINST)
+ install -d $(ETCRCC)
+ install -c -m 0644 rc.config.xdmsc $(ETCRCC)/sysconfig.xdmsc
+ install -c -m 0755 rx $(INIDIR)
+# install -c -m 0755 doinst.sh $(DOINST)
--- rx
+++ rx 2009-11-25 10:08:55.711430028 +0000
@@ -3,7 +3,7 @@
# /etc/init.d/rx
#
# Copyright (c) 1997-2000 SuSE GmbH Nuernberg, Germany.
-# Copyright (c) 2005 SuSE LINUX Products GmbH Nuernberg, Germany.
+# Copyright (c) 2005,2007 SuSE LINUX Products GmbH Nuernberg, Germany.
# please send bugfixes or comments to http://www.suse.de/feedback
#
# Author: Werner Fink <werner@suse.de>
@@ -32,18 +32,33 @@
# replaced by underscores.
#
+if test -x /usr/X11R6/bin/X ; then
: ${RX_SERVER=/usr/X11R6/bin/X}
+elif test -x /usr/bin/Xorg ; then
+: ${RX_SERVER=/usr/bin/Xorg}
+else
+: ${RX_SERVER=/usr/bin/X}
+fi
: ${quiet=-quiet}
+typeset -i version
+function do_version ()
+{
+ local -i a=$1 b=$2 c=$3
+ echo $(((a<<16)+(b<<8)+c))
+}
+xorg=no
function get_version ()
{
local l version="$(${RX_SERVER} -version 2>&1)"
- OIFS="$IFS" ; IFS='
-'
+ OIFS="$IFS" ; IFS=$'\n'
for l in $version ; do
case "$l" in
+ X.Org\ X\ Server*)
+ xorg=yes
+ break ;;
X\ Window\ System\ Version*)
break ;;
XFree86\ Version*)
@@ -55,7 +70,14 @@ function get_version ()
set -- $l
eval version=\${$#}
- l=${version%%.*}
+ if test $xorg = yes ; then
+ OIFS="$IFS" ; IFS=.
+ set -- $version
+ IFS="$OIFS"
+ l=$(do_version $1 $2 $3)
+ else
+ l=${version%%.*}
+ fi
case ${l} in
[0-9]*) echo ${l} ;;
*) echo 0 ;;
@@ -64,7 +86,8 @@ function get_version ()
XCONFIG=""
if test -x $RX_SERVER ; then
- if test $(get_version) -gt 3 ; then
+ version=$(get_version)
+ if test $version -gt 3 ; then
if test -e /etc/X11/xorg.conf ; then
XCONFIG=/etc/X11/xorg.conf
else
@@ -79,12 +102,25 @@ if test -x $RX_SERVER ; then
fi
DEPTHOPT=-bpp
fi
+else
+ echo "Error $0: No X server found, sleeping for next 10 minutes."
+ sleep 600
fi
if test -n "$XCONFIG" -a -r "$XCONFIG" ; then
. /etc/sysconfig/xdmsc
if test "$START_RX" != "yes" -a "$PPID" = "1" ; then
echo "Error $0: Starting X for a X terminal is disabled in /etc/sysconfig/xdmsc,"
+ echo " please disable the start line in /etc/inittab and run"
+ echo " the command /sbin/init q"
+ echo " $0: Sleeping for next 10 minutes."
+ sleep 600
+ exit 0
+ fi
+elif test $version -ge $(do_version 1 6 5) ; then
+ . /etc/sysconfig/xdmsc
+ if test "$START_RX" != "yes" -a "$PPID" = "1" ; then
+ echo "Error $0: Starting X for a X terminal is disabled in /etc/sysconfig/xdmsc,"
echo " please disable the start line in /etc/inittab and run"
echo " the command /sbin/init q"
echo " $0: Sleeping for next 10 minutes."