summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/xconfig.sh
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2016-11-28 22:45:34 (GMT)
committerBritney Fransen <brfransen@gmail.com>2016-11-28 22:49:21 (GMT)
commitd438d076a7bf6b55097942b45f0fe2466e0cfef7 (patch)
tree0019d093881cbb689d4e1b9538ff61d319295a52 /abs/core/LinHES-config/xconfig.sh
parent55e4254a334f68d02416baa99285d7afe5bba209 (diff)
downloadlinhes_pkgbuild-d438d076a7bf6b55097942b45f0fe2466e0cfef7.zip
linhes_pkgbuild-d438d076a7bf6b55097942b45f0fe2466e0cfef7.tar.gz
linhes_pkgbuild-d438d076a7bf6b55097942b45f0fe2466e0cfef7.tar.bz2
LinHES-config: add systemd-coredump.conf to disable coredumps
xconfig.sh: make sure Xres is set
Diffstat (limited to 'abs/core/LinHES-config/xconfig.sh')
-rwxr-xr-xabs/core/LinHES-config/xconfig.sh71
1 files changed, 44 insertions, 27 deletions
diff --git a/abs/core/LinHES-config/xconfig.sh b/abs/core/LinHES-config/xconfig.sh
index b5693b9..3f0a0d2 100755
--- a/abs/core/LinHES-config/xconfig.sh
+++ b/abs/core/LinHES-config/xconfig.sh
@@ -1,7 +1,13 @@
#!/bin/bash
#set -x
#SET DISPLAYRES to force Xres, ENV takes precendent over cmdline
-
+#SET VGACARDTYPE to force card type:
+ #VGACARDTYPE="intel" xconfig.sh
+ #VGACARDTYPE="nvidia" xconfig.sh
+ #VGACARDTYPE="nvidia-340xx" xconfig.sh
+ #VGACARDTYPE="nvidia-304xx" xconfig.sh
+ #VGACARDTYPE="VMware" xconfig.sh
+ #VGACARDTYPE="vesa" xconfig.sh
LOGFILE=/tmp/xconfig.log
for i in ati intel mga savage sis unichrome
@@ -26,11 +32,11 @@ function Xvalues {
VGAFORCED=0
if [ "x$VGACARDTYPE" = "x" ]
then
- CMDLINE=$(cat /proc/cmdline)
+ CMDLINE=$(cat /proc/cmdline)
echo "$CMDLINE" | grep -q forceXvesa
if [ $? = 0 ]
then
- echo "Forcing driver to vesa"
+ echo "Forcing driver to vesa from kernel cmdline"
VGACARDTYPE=vesa
Xcardtype=$VGACARDTYPE
else
@@ -49,7 +55,7 @@ function Xvalues {
}
function presetupX {
- if [ "$XIgnoreConfig" = 1 ]
+ if [ "$XIgnoreConfig" = 1 ]
then
echo "Using User Supplied X"
if [ -f "$MYTHHOME/templates/xorg.user" ]
@@ -226,8 +232,8 @@ function intel_driver_install {
}
function set_res {
- echo " Setting modeline to ${Xres}"
- echo " Setting modeline to ${Xres}" >> $LOGFILE 2>&1
+ echo "Setting resolution to ${Xres}"
+ echo "Setting resolution to ${Xres}" >> $LOGFILE 2>&1
cat > /etc/X11/xorg.conf.d/30-screen.conf <<EOF
Section "Screen"
Identifier "Screen0" #Collapse Monitor and Device section to Screen section
@@ -249,15 +255,12 @@ function setupX {
case $VGACARDTYPE in
nvidia|nvidia-340xx|nvidia-304xx)
nvidia_driver_install
- if [ \"$Xres\" = "Auto" ]
- then
- Xres="nvidia-auto-select"
- fi
-
- if [ ${Xres} != "Auto" ]
+ if [[ $Xres != "Auto" ]]
then
set_res
else
+ echo "Setting resolution to ${Xres}"
+ echo "Setting resolution to ${Xres}" >> $LOGFILE 2>&1
rm -f /etc/X11/xorg.conf.d/30-screen.conf
fi
;;
@@ -270,10 +273,12 @@ function setupX {
echo "#!/bin/bash" > /etc/X11/autostart/vmware.sh
echo "/usr/bin/vmware-user-suid-wrapper" >> /etc/X11/autostart/vmware.sh
chmod 755 /etc/X11/autostart/vmware.sh
- if [ ${Xres} != "Auto" ]
+ if [[ $Xres != "Auto" ]]
then
set_res
else
+ echo "Setting resolution to ${Xres}"
+ echo "Setting resolution to ${Xres}" >> $LOGFILE 2>&1
rm -f /etc/X11/xorg.conf.d/30-screen.conf
fi
;;
@@ -281,25 +286,29 @@ function setupX {
intel)
intel_driver_install
cp $TEMPLATES/xorg/xorg.intel /etc/X11/xorg.conf.d/20-automv.conf
- if [ ${Xres} != "Auto" ]
+ if [[ $Xres != "Auto" ]]
then
set_res
else
+ echo "Setting resolution to ${Xres}"
+ echo "Setting resolution to ${Xres}" >> $LOGFILE 2>&1
rm -f /etc/X11/xorg.conf.d/30-screen.conf
fi
;;
vesa|innotek|*) #leaving this as * and vesa for no real reason other then it's explicit to catch vesa
- if [[ $VGACARDTYPE != "vesa" && $VGACARDTYPE != "innotek" ]]
- then
- echo "Unknown card type, using Vesa."
- fi
- vesa_driver_install
- cp $TEMPLATES/xorg/xorg.vesa /etc/X11/xorg.conf.d/20-automv.conf
- if [ ${Xres} != "Auto" ]
+ if [[ $VGACARDTYPE != "vesa" && $VGACARDTYPE != "innotek" ]]
+ then
+ echo "Unknown card type, using Vesa."
+ fi
+ vesa_driver_install
+ cp $TEMPLATES/xorg/xorg.vesa /etc/X11/xorg.conf.d/20-automv.conf
+ if [[ $Xres != "Auto" ]]
then
set_res
else
+ echo "Setting resolution to ${Xres}"
+ echo "Setting resolution to ${Xres}" >> $LOGFILE 2>&1
rm -f /etc/X11/xorg.conf.d/30-screen.conf
fi
@@ -333,7 +342,7 @@ function pacman_wait {
LINE=`grep -i xorg /etc/mythvantage.cfg|grep -q False`
rc=$?
-if [ $rc = 0 ]
+if [ $rc = 0 ]
then
echo "** xorg configuration disabled in /etc/mythvantage.cfg"
exit 1
@@ -345,16 +354,14 @@ then
exit 1
fi
-
if [ -f /etc/systemconfig ]
then
. /etc/systemconfig
else
- #Xres="800x600"
- Xres="Auto"
- echo " Setting modeline to ${Xres}"
- echo " Setting modeline to ${Xres}" >> $LOGFILE 2>&1
+ echo " systemconfig not found."
+ echo " systemconfig not found." >> $LOGFILE 2>&1
fi
+
CMDLINE=$(cat /proc/cmdline)
echo $CMDLINE | grep -q displayres
if [ $? = 0 ]
@@ -365,10 +372,20 @@ fi
if [ ! x$DSR = x ]
then
Xres=$DSR
+ echo " Setting resolution to ${Xres} from kernel cmdline"
+ echo " Setting resolution to ${Xres} from kernel cmdline" >> $LOGFILE 2>&1
fi
if [ ! x$DISPLAYRES = x ]
then
Xres=$DISPLAYRES
+ echo "Resolution forced to ${Xres}"
+ echo "Resolution forced to ${Xres}" >> $LOGFILE 2>&1
+fi
+if [ x$Xres = x ]
+then
+ Xres="Auto"
+ echo "Resolution not set. Setting to ${Xres}"
+ echo "Resolution not set. Setting to ${Xres}" >> $LOGFILE 2>&1
fi