--- hardware.orig 2005-08-17 16:54:16 +0300 +++ hardware 2005-11-09 23:07:23 +0200 @@ -15,14 +15,31 @@ LOCKFILE=/var/lock/subsys/x11createconfi RETVAL=0 start() { + if [ ! -f /etc/X11/xorg.conf ];then local STRING="Setting up Xorg ..." echo -n "$STRING " /usr/bin/x11createconfig >/etc/X11/xorg.conf.auto local rc=$? - [ $rc -eq 0 ] && success "$STRING" || failure "$STRING" + if [ $rc -eq 0 ] + then + success "$STRING" + echo test + /usr/bin/x11createconfig | grep "Modes" >/dev/null 2>&1 + if [ "$?" == "1" ] + then + local MODES="\\\"1024x768\\\" \\\"800x600\\\" \\\"640x480\\\"" + x11createconfig | sed s/.*"Subsection \"Display\""\$/\&\\\n\\\t\\\t"Modes $MODES"/g > /etc/X11/xorg.conf.auto + fi + else + failure "$STRING" + fi echo - ln -s xorg.conf.auto /etc/X11/xorg.conf + cat /etc/X11/xorg.conf.auto |sed s/.*"Identifier \"Keyboard1\""/\&\ +\\\n\\\t\\\tOption\ \"XkbLayout\"\ \"us,ru\"\ +\\\n\\\t\\\tOption\ \"XkbVariant\"\ \"winkeys\"\ +\\\n\\\t\\\tOption\ \"XkbOptions\"\ \"grp:alt_shift_toggle,grp_led:scroll\"\ +/ > /etc/X11/xorg.conf touch $LOCKFILE fi [ -x "$SETGL" ] && $SETGL ||: