aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--initscripts.spec16
-rwxr-xr-xprefdm26
3 files changed, 36 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index bfe9b6ab..2f675b31 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,8 @@ install:
install -m755 setsysfont $(ROOT)/sbin
install -m755 lang.sh $(ROOT)/etc/profile.d
install -m755 service $(ROOT)/sbin
+ mkdir -p $(ROOT)/etc/X11
+ install -m755 prefdm /etc/X11/prefdm
mkdir -p $(ROOT)/etc/sysconfig
mkdir -p $(ROOT)/etc/sysconfig/console
install -m644 sysconfig/init $(ROOT)/etc/sysconfig/init
diff --git a/initscripts.spec b/initscripts.spec
index 2c15992f..93498211 100644
--- a/initscripts.spec
+++ b/initscripts.spec
@@ -10,7 +10,6 @@ BuildRoot: /var/tmp/initbld
Requires: mingetty, bash, /bin/awk, /bin/sed, mktemp, e2fsprogs, console-tools
Requires: procps, modutils >= 2.1.85-3, sysklogd >= 1.3.31
Requires: setup >= 2.0.3
-Requires: wvdial >= 1.31
Conflicts: kernel <= 2.2, timeconfig < 3.0
Prereq: /sbin/chkconfig, /usr/sbin/groupadd, gawk
@@ -50,13 +49,13 @@ ln -s ../init.d/random $RPM_BUILD_ROOT/etc/rc.d/rc4.d/S20random
ln -s ../init.d/random $RPM_BUILD_ROOT/etc/rc.d/rc5.d/S20random
ln -s ../init.d/random $RPM_BUILD_ROOT/etc/rc.d/rc6.d/K80random
-ln -s ../init.d/netfs $RPM_BUILD_ROOT/etc/rc.d/rc0.d/K85netfs
-ln -s ../init.d/netfs $RPM_BUILD_ROOT/etc/rc.d/rc1.d/K85netfs
-ln -s ../init.d/netfs $RPM_BUILD_ROOT/etc/rc.d/rc2.d/K85netfs
-ln -s ../init.d/netfs $RPM_BUILD_ROOT/etc/rc.d/rc3.d/S15netfs
-ln -s ../init.d/netfs $RPM_BUILD_ROOT/etc/rc.d/rc4.d/S15netfs
-ln -s ../init.d/netfs $RPM_BUILD_ROOT/etc/rc.d/rc5.d/S15netfs
-ln -s ../init.d/netfs $RPM_BUILD_ROOT/etc/rc.d/rc6.d/K85netfs
+ln -s ../init.d/netfs $RPM_BUILD_ROOT/etc/rc.d/rc0.d/K75netfs
+ln -s ../init.d/netfs $RPM_BUILD_ROOT/etc/rc.d/rc1.d/K75netfs
+ln -s ../init.d/netfs $RPM_BUILD_ROOT/etc/rc.d/rc2.d/K75netfs
+ln -s ../init.d/netfs $RPM_BUILD_ROOT/etc/rc.d/rc3.d/S25netfs
+ln -s ../init.d/netfs $RPM_BUILD_ROOT/etc/rc.d/rc4.d/S25netfs
+ln -s ../init.d/netfs $RPM_BUILD_ROOT/etc/rc.d/rc5.d/S25netfs
+ln -s ../init.d/netfs $RPM_BUILD_ROOT/etc/rc.d/rc6.d/K75netfs
ln -s ../init.d/network $RPM_BUILD_ROOT/etc/rc.d/rc0.d/K90network
ln -s ../init.d/network $RPM_BUILD_ROOT/etc/rc.d/rc1.d/K90network
@@ -147,6 +146,7 @@ rm -rf $RPM_BUILD_ROOT
%config /etc/sysconfig/network-scripts/ifup-plip
%config /etc/sysconfig/network-scripts/ifup-aliases
%config /etc/sysconfig/network-scripts/ifup-ipx
+%config /etc/X11/prefdm
%config /etc/inittab
%dir /etc/rc.d
%config /etc/rc.d/rc.sysinit
diff --git a/prefdm b/prefdm
new file mode 100755
index 00000000..ff5219b7
--- /dev/null
+++ b/prefdm
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Set preferred X display manager link
+preferred=
+if [ -f /etc/sysconfig/desktop ]; then
+ if [ -n "grep GNOME /etc/sysconfig/desktop" ]; then
+ preferred=gdm
+ elif [ -n "grep KDE /etc/sysconfig/desktop" ]; then
+ preferred=kdm
+ elif [ -n "grep AnotherLevel /etc/sysconfig/desktop" ]; then
+ preferred=xdm
+ fi
+fi
+if [ -z "$preferred" ]; then
+ if which gdm >/dev/null 2>&1; then
+ preferred=gdm
+ elif which kdm >/dev/null 2>&1; then
+ preferred=kdm
+ elif which xdm >/dev/null 2>&1; then
+ preferred=xdm
+ fi
+fi
+if [ -n "$preferred" ] && which $preferred
+ exec `which $preferred` $*
+fi
+exit 1