diff -Naur magellan-initscripts/etc/rc.d/init.d/hwdetect magellan-initscripts-fixed/etc/rc.d/init.d/hwdetect --- magellan-initscripts/etc/rc.d/init.d/hwdetect 2005-08-31 23:46:24.000000000 +0200 +++ magellan-initscripts-fixed/etc/rc.d/init.d/hwdetect 2010-11-26 13:34:19.000000000 +0100 @@ -21,19 +21,12 @@ xserver="$(readlink /usr/X11R6/bin/X)" case ${xserver} in - Xorg) - xfconfig=/etc/X11/xorg.conf - ;; - XFree86) - xfconfig=/etc/X11/XF86Config - ;; - *) - echo " Unkown xserver. aborting." - exit 1 - ;; + Xorg) xfconfig=/etc/X11/xorg.conf;; + XFree86) xfconfig=/etc/X11/XF86Config;; + *) echo " Unkown xserver. aborting."; exit 1 ;; esac - # have we vnc support ? + # got we vnc support ? if [ -f /usr/X11R6/lib/modules/vnc.so ] || \ [ -f /usr/X11R6/lib/modules/extensions/vnc.so ] then @@ -65,10 +58,7 @@ echo ' SubSection "extmod"' >> ${xfconfig} echo ' Option "omit xfree86-dga"' >> ${xfconfig} echo ' EndSubSection' >> ${xfconfig} - echo ' Load "type1"' >> ${xfconfig} - echo ' Load "speedo"' >> ${xfconfig} echo ' Load "freetype"' >> ${xfconfig} - echo '# Load "xtt"' >> ${xfconfig} echo '# Load "glx"' >> ${xfconfig} echo ' Load "dri"' >> ${xfconfig} @@ -80,7 +70,6 @@ # fonts echo '' >> ${xfconfig} echo 'Section "Files"' >> ${xfconfig} - echo ' RgbPath "/usr/X11R6/lib/X11/rgb"' >> ${xfconfig} case ${xserver} in Xorg) @@ -88,9 +77,6 @@ echo ' FontPath "/usr/share/fonts/misc/"' >> ${xfconfig} echo ' FontPath "/usr/share/fonts/75dpi/:unscaled"' >> ${xfconfig} echo ' FontPath "/usr/share/fonts/100dpi/:unscaled"' >> ${xfconfig} - echo ' #prevents slow startup when disabled -> speedo, type1' >> ${xfconfig} - echo ' #FontPath "/usr/share/fonts/Speedo/"' >> ${xfconfig} - echo ' #FontPath "/usr/share/fonts/Type1/"' >> ${xfconfig} echo ' FontPath "/usr/share/fonts/TrueType/"' >> ${xfconfig} echo ' FontPath "/usr/share/fonts/freefont/"' >> ${xfconfig} echo ' FontPath "/usr/share/fonts/75dpi/"' >> ${xfconfig} @@ -101,9 +87,6 @@ echo ' FontPath "/usr/X11R6/lib/X11/fonts/misc/"' >> ${xfconfig} echo ' FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"' >> ${xfconfig} echo ' FontPath "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"' >> ${xfconfig} - echo ' #prevents slow startup when disabled -> speedo, type1' >> ${xfconfig} - echo ' #FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"' >> ${xfconfig} - echo ' #FontPath "/usr/X11R6/lib/X11/fonts/Type1/"' >> ${xfconfig} echo ' FontPath "/usr/X11R6/lib/X11/fonts/TrueType/"' >> ${xfconfig} echo ' FontPath "/usr/X11R6/lib/X11/fonts/freefont/"' >> ${xfconfig} echo ' FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"' >> ${xfconfig} @@ -111,7 +94,6 @@ ;; esac - echo '# ModulePath "/usr/X11R6/lib/modules"' >> ${xfconfig} echo 'EndSection' >> ${xfconfig} @@ -130,24 +112,16 @@ echo ' Identifier "Keyboard1"' >> ${xfconfig} case ${xserver} in - Xorg) - echo ' Driver "kbd"' >> ${xfconfig} - ;; - XFree86) - echo ' Driver "Keyboard"' >> ${xfconfig} - ;; + Xorg) echo ' Driver "kbd"' >> ${xfconfig} ;; + XFree86) echo ' Driver "Keyboard"' >> ${xfconfig} ;; esac echo ' Option "AutoRepeat" "500 30"' >> ${xfconfig} echo '# Option "Xleds" "1 2 3"' >> ${xfconfig} case ${xserver} in - Xorg) - echo ' Option "XkbRules" "xorg"' >> ${xfconfig} - ;; - XFree86) - echo ' Option "XkbRules" "xfree86"' >> ${xfconfig} - ;; + Xorg) echo ' Option "XkbRules" "xorg"' >> ${xfconfig} ;; + XFree86) echo ' Option "XkbRules" "xfree86"' >> ${xfconfig} ;; esac echo ' Option "XkbModel" "pc104"' >> ${xfconfig} @@ -248,6 +222,17 @@ if [ -x "/sbin/ddcxinfo-knoppix" ] then ddcxinfo-knoppix -monitor >> ${xfconfig} + + # try cvt + elif [ -x "/usr/X11R6/bin/cvt" ] + then + local modeline="$(/usr/X11R6/bin/cvt 1024 767 60 | sed -e 's:^:\t:g' -e 's:_.*\":\":')" + echo 'Section "Monitor"' >> ${xfconfig} + echo ' Identifier "mon0"' >> ${xfconfig} + echo ' Option "DPMS"' >> ${xfconfig} + echo "${modeline}" >> ${xfconfig} + echo 'EndSection' >> ${xfconfig} + else # some conservative default values echo 'Section "Monitor"' >> ${xfconfig} @@ -359,9 +344,9 @@ # dri (here disabled, use default of xserver) echo '' >> ${xfconfig} - echo '# Section "DRI"' >> ${xfconfig} - echo '# Mode 0666' >> ${xfconfig} - echo '# EndSection' >> ${xfconfig} + echo 'Section "DRI"' >> ${xfconfig} + echo ' Mode 0666' >> ${xfconfig} + echo 'EndSection' >> ${xfconfig} }