summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/LinHES-config')
-rw-r--r--abs/core/LinHES-config/LinHES-release2
-rwxr-xr-xabs/core/LinHES-config/PKGBUILD23
-rw-r--r--abs/core/LinHES-config/config.install3
-rwxr-xr-xabs/core/LinHES-config/mv_common.py12
-rwxr-xr-xabs/core/LinHES-config/mv_ir.py115
-rwxr-xr-xabs/core/LinHES-config/mv_software.py3
-rwxr-xr-xabs/core/LinHES-config/mv_vnc.py25
-rwxr-xr-xabs/core/LinHES-config/plymouth_config.py4
-rwxr-xr-xabs/core/LinHES-config/xconfig.cron7
-rwxr-xr-xabs/core/LinHES-config/xconfig.sh199
10 files changed, 255 insertions, 138 deletions
diff --git a/abs/core/LinHES-config/LinHES-release b/abs/core/LinHES-config/LinHES-release
index d5029cc..1a4fd80 100644
--- a/abs/core/LinHES-config/LinHES-release
+++ b/abs/core/LinHES-config/LinHES-release
@@ -1 +1 @@
-LinHES R8.2 (Paid the iron price)
+LinHES R8.3 (Lorne Malvo)
diff --git a/abs/core/LinHES-config/PKGBUILD b/abs/core/LinHES-config/PKGBUILD
index 1f7d048..e35f4a4 100755
--- a/abs/core/LinHES-config/PKGBUILD
+++ b/abs/core/LinHES-config/PKGBUILD
@@ -1,12 +1,12 @@
pkgname=LinHES-config
-pkgver=8.2
-pkgrel=17
+pkgver=8.3
+pkgrel=12
conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev LinHes-config )
pkgdesc="Install and configure your system"
depends=('bc' 'libstatgrab' 'mysql-python' 'expect' 'curl' 'dnsutils' 'parted'
'sg3_utils' 'nmbscan' 'system-templates' 'rsync' 'python-parted'
'python2-pexpect' 'python-netifaces' 'xcursor-vanilla-dmz-aa'
- 'python-iplib' 'sudo' 'setserial' 'udevil' 'balance' )
+ 'python-iplib' 'sudo' 'setserial' 'udevil' 'balance' 'runit-scripts>=8.3-4' )
arch=('i686' 'x86_64')
source=(mv_install.py 09_mythvantge_runit_grub
@@ -20,6 +20,7 @@ source=(mv_install.py 09_mythvantge_runit_grub
restore_default_settings.sh
myth_settings_wrapper.sh
xconfig.sh
+ xconfig.cron
timezip.py
soundconfig.sh
LinHES-release
@@ -76,6 +77,7 @@ package() {
install -m 0755 install_functions.sh $MVDIR/bin/install_functions.sh
install -m 0755 systemconfig.sh $MVDIR/bin/systemconfig.sh
install -m 0755 xconfig.sh $MVDIR/bin/xconfig.sh
+ install -m 0644 xconfig.cron $MVDIR/bin/xconfig.cron
install -m 0755 install_db_chroot.sh $MVDIR/bin/install_db_chroot.sh
install -m 0755 restore_km_db_chroot.sh $MVDIR/bin/restore_km_db_chroot.sh
# install -m 0755 restore_default_settings.sh $MVDIR/bin/restore_default_settings.sh
@@ -144,10 +146,11 @@ md5sums=('17d9dd5a097fbbd4dae75dff8e2677ff'
'b8becf69d4309b938ceba3178c799270'
'2a7f3b34e522acfd08283b86c8926aba'
'b596d2e3779a434435bc0f0277b1ba3e'
- '9b3d200e101d2ba814de00318a41db8f'
+ '6e5639fff82fa2ba76113ac1ab8f2016'
+ 'f0376c98a7986897406d393186c0365e'
'157e73d0f90d7b306aba8f5921aeedd3'
'f8f803cb5738ce0021cd37c1ab514c45'
- '879c692ebfd86cdd60d93278f1df8041'
+ 'eef9b882ecb70648a8f253f85b73a274'
'5f890ea9bda6aef652d2560ca19dac07'
'ab2aa42c2947148c2b1cac0ade6d1d55'
'd429b59d3cfb37b0624c6a4a71a7c2c0'
@@ -157,18 +160,18 @@ md5sums=('17d9dd5a097fbbd4dae75dff8e2677ff'
'e959df98947eb0d2ea64ff616b61aab5'
'2506860a416e1988934225d80d501c2c'
'c0549457750c4f8e8038d904a0f3012a'
- '1224a6a51cfe3283b562e3c250688b53'
+ 'cb7abd558b6540bc5e2232866a2a42f8'
'b845de3e05c1734cce4b9ac5e8f1baaf'
- '885fcb99a0179d9704385e14aefd7af6'
+ '077ebce663edba30ba7f93e4d245d125'
'8b7dce4a3a0a281fa6656aa8781a648e'
'4b10fff21a0274f950f97f2b61e92463'
'824e49d9b01fed295c704ab68908b464'
'fe5e31b833cc6707209e9d656b6eb53c'
- '36dc1ae5fae0bbf99cb2bf5ae9419e67'
+ '24ef3ad4be1bf367cca40469173f19af'
'087a0ef743bc8af915503f8773536ce4'
'38665330aeb3a8bdf7be24857fe035bb'
'80685e047993b00161be29e3580f3a40'
- '299c24c0820fc9c483c820db2595e3cb'
+ 'b79fe6ef82b0b5e71d62806e773ed556'
'595663a2cb0b43c4ea3fb3dac915a3c8'
'781f161a79c3188a31c8615b8258b241'
'888a6c57f272d9fa3e77e216a421562b'
@@ -180,5 +183,5 @@ md5sums=('17d9dd5a097fbbd4dae75dff8e2677ff'
'3866086e6af5e3528a66eff492f2f4dd'
'c9279fa095af624ee3d9bc75d3328360'
'02cf69074d2bbacef05fa3e451af9af3'
- '85d15efc55074a94c58d44542ea1dd13'
+ '10354854c29d894d3598639eaa1df72c'
'7acbd2064db905e76372a0618b24a6d9')
diff --git a/abs/core/LinHES-config/config.install b/abs/core/LinHES-config/config.install
index 0b7060e..50c66c7 100644
--- a/abs/core/LinHES-config/config.install
+++ b/abs/core/LinHES-config/config.install
@@ -40,7 +40,8 @@ post_upgrade() {
/usr/MythVantage/bin/systemconfig.py -m hostype
fi
- /usr/MythVantage/bin/systemconfig.py -m locale
+ /usr/MythVantage/bin/systemconfig.py -m locale,vnc,ir
+
echo " Removing pts and shm from fstab..."
cp -a /etc/fstab /etc/fstab.backup.pre_pts_shm
sed -i '/\/dev\/pts/d' /etc/fstab
diff --git a/abs/core/LinHES-config/mv_common.py b/abs/core/LinHES-config/mv_common.py
index 3160989..a009d72 100755
--- a/abs/core/LinHES-config/mv_common.py
+++ b/abs/core/LinHES-config/mv_common.py
@@ -216,13 +216,17 @@ def pacinstall(pkg):
elif pkg == "fuppes":
pacinstall("fuppes-svn")
elif pkg == "mupen64":
- pacinstall("mupen64plus-svn")
+ pacinstall("mupen64plus")
elif pkg == "dolphinemu":
pacinstall("dolphin-emu")
elif pkg == "webonlinhes":
pacinstall("web-on-linhes")
elif pkg == "xbmc":
pacinstall("xbmc-pvr-addons")
+ elif pkg == "kodi":
+ pacinstall("kodi-pvr-addons")
+ elif pkg == "plexhometheater":
+ pacinstall("plex-home-theater")
elif pkg == "mame":
pacinstall("sdlmame")
elif pkg == "foldingathome":
@@ -254,13 +258,17 @@ def pacremove(pkg):
elif pkg == "fuppes":
pacremove("fuppes-svn")
elif pkg == "mupen64":
- pacremove("mupen64plus-svn")
+ pacremove("mupen64plus")
elif pkg == "dolphinemu":
pacremove("dolphin-emu")
elif pkg == "webonlinhes":
pacremove("web-on-linhes")
elif pkg == "xbmc":
pacremove("xbmc-pvr-addons")
+ elif pkg == "kodi":
+ pacremove("kodi-pvr-addons")
+ elif pkg == "plexhometheater":
+ pacremove("plex-home-theater")
elif pkg == "mame":
pacremove("sdlmame")
elif pkg == "foldingathome":
diff --git a/abs/core/LinHES-config/mv_ir.py b/abs/core/LinHES-config/mv_ir.py
index c4386cc..8eab7b0 100755
--- a/abs/core/LinHES-config/mv_ir.py
+++ b/abs/core/LinHES-config/mv_ir.py
@@ -46,6 +46,16 @@ def setup_lirc_links(mythhome):
else:
logging.debug(" /etc/lircrc does not exist, can not link it")
+ if os.path.exists("/etc/wol-lircrc"):
+ if not os.path.exists(mythhome+"/.wol-lircrc"):
+ logging.debug(" Creating symlink for .wol-lircrc")
+ os.symlink("/etc/wol-lircrc",mythhome+"/.wol-lircrc")
+ else:
+ logging.debug(" %s/.wol-lircrc already present",mythhome)
+ else:
+ logging.debug(" /etc/wol-lircrc does not exist, can not link it")
+
+
def scrub_modules(filename,module):
logging.debug(" scrubbing %s from %s",module,filename)
cmd = '''sed -i -e '/.*#%s/d' %s''' %(module,filename)
@@ -91,6 +101,7 @@ def setup_ir_remote(Remotetype,templates,mythhome,HostBlasterType,remotebucket):
HostBlasterType_values=["None",""]
if Remotetype == "no_remote" and (HostBlasterType in HostBlasterType_values) :
mv_common.remove_service("remotes")
+ mv_common.remove_service("irexec")
elif Remotetype == "tinker":
pass #do nothing
else:
@@ -99,6 +110,8 @@ def setup_ir_remote(Remotetype,templates,mythhome,HostBlasterType,remotebucket):
mv_common.runcmd(cmd)
cmd = "mv /etc/lircrc /etc/lircrc-%s" %currenttime
mv_common.runcmd(cmd)
+ cmd = "mv /etc/wol-lircrc /etc/wol-lircrc-%s" %currenttime
+ mv_common.runcmd(cmd)
cmd = "mv /etc/remote.run /etc/remote.run-%s" %currenttime
mv_common.runcmd(cmd)
if remotebucket == "user":
@@ -108,16 +121,16 @@ def setup_ir_remote(Remotetype,templates,mythhome,HostBlasterType,remotebucket):
files = remote_path + "/lircd*"
logging.debug(" Using %s",files)
- # /etc/lircd.conf include
+ # /etc/lircd.conf symlink
for filename in glob.glob(files):
# Ignore subfolders
if os.path.isdir (filename):
logging.debug(" %s is a dir, skipping",filename)
continue
- include_file("/etc/lircd.conf",filename)
+ os.symlink(filename,"/etc/lircd.conf")
#files = templates + "/remotes/" + Remotetype + "/lircrc*"
- # inluce lircrc
+ # include lircrc
files = remote_path + "/lircrc*"
logging.debug(" Using %s",files)
for filename in glob.glob(files):
@@ -127,7 +140,17 @@ def setup_ir_remote(Remotetype,templates,mythhome,HostBlasterType,remotebucket):
continue
include_file("/etc/lircrc",filename)
- #if remote has a special run file use it.
+ # include wol-lircrc
+ files = remote_path + "/wol-lircrc*"
+ logging.debug(" Using %s",files)
+ for filename in glob.glob(files):
+ # Ignore subfolders
+ if os.path.isdir (filename):
+ logging.debug(" %s is a dir, skipping",filename)
+ continue
+ include_file("/etc/wol-lircrc",filename)
+
+ #if remote has a special run file use it.
files = remote_path + "/remote.run*"
logging.debug(" Using %s",files)
for filename in glob.glob(files):
@@ -138,46 +161,55 @@ def setup_ir_remote(Remotetype,templates,mythhome,HostBlasterType,remotebucket):
cmd = "cp %s /etc/remote.run" %filename
mv_common.runcmd(cmd)
- #if remote has a special xbmc file, use it.
- xbmcfile= remote_path + "/xbmc.xml"
- userxmbcfile = mythhome+"/.xbmc/userdata/Lircmap.xml"
-
- if os.path.exists(xbmcfile):
- logging.debug(" XBMC lirc file present")
- logging.info(" Setting up lirc for xbmc")
- if not os.path.exists(mythhome+"/.xbmc/userdata"):
- logging.debug(" Creating %s/.xbmc",mythhome)
- try:
- os.mkdir(mythhome+"/.xbmc")
- except:
- logging.debug(" Couldn't create .xbmc/ ")
+ #if remote has a Lircmap.xml file, use it for kodi and plexht.
+ kodifile= remote_path + "/Lircmap.xml"
+
+ for app in ['Kodi', 'PlexHT']:
+ if app == 'Kodi':
+ userLircmap = mythhome+"/.kodi/userdata/Lircmap.xml"
+ userdirname = ".kodi"
+ elif app == 'PlexHT':
+ userLircmap = mythhome+"/.plexht/userdata/Lircmap.xml"
+ userdirname = ".plexht"
+
+ if os.path.exists(kodifile):
+ logging.debug(" %s lirc file present at %s", app, kodifile)
+ logging.info(" Setting up lirc for %s",app)
+ if not os.path.exists(mythhome+"/"+userdirname+"/userdata"):
+ logging.debug(" Creating %s/%s", mythhome, userdirname)
+ try:
+ os.mkdir(mythhome+"/"+userdirname)
+ except:
+ logging.debug(" Couldn't create %s/ ",userdirname)
+ try:
+ os.mkdir(mythhome+"/"+userdirname+"/userdata/")
+ except:
+ logging.debug(" Couldn't create %s/userdata",userdirname)
+
+ try:
+ cmd = ''' chown -R mythtv %s/%s''' %(mythhome,userdirname)
+ mv_common.runcmd(cmd)
+ cmd = ''' chgrp -R mythtv %s/%s/userdata''' %(mythhome,userdirname)
+ mv_common.runcmd(cmd)
+ except:
+ logging.debug(" Couldn't change permissions for %s",userdirname)
+ pass
try:
- os.mkdir(mythhome+"/.xbmc/userdata/")
+ cmd = ''' rm -f %s''' %(userLircmap)
+ mv_common.runcmd(cmd)
+ logging.debug(" Creating symlink for %s Lircmap.xml",app)
+ os.symlink(kodifile, mythhome+"/"+userdirname+"/userdata/Lircmap.xml")
except:
- logging.debug(" Couldn't create .xbmc/userdata ")
-
- try:
- cmd = ''' chown -R mythtv %s/.xbmc''' %mythhome
- mv_common.runcmd(cmd)
- cmd = ''' chgrp -R mythtv %s/.xbmc/userdata''' %mythhome
- mv_common.runcmd(cmd)
- except:
- logging.debug(" Couldn't change permissions for .xbmc")
pass
- try:
- cmd = ''' rm -f %s''' %(userxmbcfile)
+ else:
+ logging.debug(" %s Lircmap file %s not present", userdirname, kodifile)
+ logging.debug(" Checking if %s is a symlink", userLircmap)
+ if os.path.islink(userLircmap):
+ logging.info(" Removing symlink %s", userLircmap)
+ cmd = ''' rm -f %s''' %(userLircmap)
mv_common.runcmd(cmd)
- logging.debug(" Creating symlink for xmbc lircrc")
- os.symlink(xbmcfile, mythhome+"/.xbmc/userdata/Lircmap.xml")
- except:
- pass
- else:
- logging.debug(" XBMC lirc file %s not present" %xbmcfile)
-
-
-
-
-
+ else:
+ logging.debug(" Not a symlink %s", userLircmap)
#remote has it's own modprobe.d/conf filename
@@ -195,9 +227,10 @@ def setup_ir_remote(Remotetype,templates,mythhome,HostBlasterType,remotebucket):
#cleanup
- cmd = "chmod 755 /etc/lircrc /etc/remote.run"
+ cmd = "chmod 755 /etc/lircrc /etc/wol-lircrc /etc/remote.run"
mv_common.runcmd(cmd)
mv_common.add_service("remotes")
+ mv_common.add_service("irexec")
def setup_ir_receiver(ReceiverType,TEMPLATES,HDHRlirc_device,myip):
diff --git a/abs/core/LinHES-config/mv_software.py b/abs/core/LinHES-config/mv_software.py
index 13f0f2f..102fa96 100755
--- a/abs/core/LinHES-config/mv_software.py
+++ b/abs/core/LinHES-config/mv_software.py
@@ -72,7 +72,8 @@ def setup_software(systemconfig, data_config):
"webmin",
"webonlinhes",
"huludesktop",
- "xbmc",
+ "plexhometheater",
+ "kodi",
"dvdcss",
"foldingathome")
diff --git a/abs/core/LinHES-config/mv_vnc.py b/abs/core/LinHES-config/mv_vnc.py
index 0260494..1a028d2 100755
--- a/abs/core/LinHES-config/mv_vnc.py
+++ b/abs/core/LinHES-config/mv_vnc.py
@@ -79,23 +79,6 @@ exec wmaker
logging.info("__End of vnc \n")
-def start_xvnc(xvncpasswd):
- logging.info(" Checking if x11vnc needs to be started")
- if mv_common.check_service("frontend"):
- logging.info(" Frontend is running, starting x11vnc")
- line='''su mythtv -c "DISPLAY=localhost:0 x11vnc -rfbport 5902 --passwd %s 2>&1 > /dev/null &" \n''' %xvncpasswd
- #line='''su mythtv -c "DISPLAY=localhost:0 xscreensaver -no-splash \&" '''
- try:
- fout = open("/tmp/cmd.sh", "w")
- fout.write(line)
- fout.close()
- os.chmod("/tmp/cmd.sh",0755)
- cmd="/tmp/cmd.sh"
- os.system(cmd)
- os.remove("/tmp/cmd.sh")
- except:
- logging.info(" Couldn't start x11vnc")
-
def setupvnc(systemconfig,data_config):
logging.info("____Start of vnc config ____")
@@ -114,6 +97,7 @@ def setupvnc(systemconfig,data_config):
mv_common.add_service("vnc")
else:
mv_common.remove_service("vnc")
+ mv_common.pacremove("tigervnc")
#x11vnc
try:
xvnc=systemconfig.get("xvncenable")
@@ -125,9 +109,10 @@ def setupvnc(systemconfig,data_config):
if xvnc == "1":
logging.info(" Installing x11vnc system\n")
mv_common.pacinstall("x11vnc")
- start_xvnc(xvncpasswd)
+ mv_common.add_service("xvnc")
else:
- mv_common.pacinstall("x11vnc")
+ mv_common.remove_service("xvnc")
+ mv_common.pacremove("x11vnc")
- logging.info("__End of vnc\n") \ No newline at end of file
+ logging.info("__End of vnc\n")
diff --git a/abs/core/LinHES-config/plymouth_config.py b/abs/core/LinHES-config/plymouth_config.py
index 7c7546d..bb60722 100755
--- a/abs/core/LinHES-config/plymouth_config.py
+++ b/abs/core/LinHES-config/plymouth_config.py
@@ -5,7 +5,7 @@ __author__ = "James Meyer"
__date__ = "Dec 11th 2012"
-import subprocess
+import subprocess, sys
class plymouth_driver():
@@ -180,7 +180,7 @@ def go():
#print p.get_old_modules()
#print p.get_new_modules()
- if p.create_newmkinitcpio() == True:
+ if p.create_newmkinitcpio() == True or "--mkinitcpio" in sys.argv:
p.run_mkinitcpio()
diff --git a/abs/core/LinHES-config/xconfig.cron b/abs/core/LinHES-config/xconfig.cron
new file mode 100755
index 0000000..ec44803
--- /dev/null
+++ b/abs/core/LinHES-config/xconfig.cron
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+/usr/MythVantage/bin/xconfig.sh >> /dev/null 2>&1 &
+#remove xconfig.cron from root crontab
+grep -v "* * * * * /usr/bin/bash /usr/MythVantage/bin/xconfig.cron" /var/spool/cron/root > /var/spool/cron/root2
+mv /var/spool/cron/root2 /var/spool/cron/root
+echo "root" >> /var/spool/cron/cron.update
diff --git a/abs/core/LinHES-config/xconfig.sh b/abs/core/LinHES-config/xconfig.sh
index 52dc952..acc949c 100755
--- a/abs/core/LinHES-config/xconfig.sh
+++ b/abs/core/LinHES-config/xconfig.sh
@@ -8,23 +8,25 @@ for i in ati intel mga savage sis unichrome
do
templist=`echo $i-dri xf86-video-$i`
NVPKGS=`echo $NVPKGS $templist`
-
done
+
BASE=""
MYTH_RUN_STATUS="1"
. /etc/profile
-#MYTHHOME=$BASE/home/mythtv
+NVIDIA_304xx="$TEMPLATES/xorg/304xx_supported.txt"
+NVIDIA_340xx="$TEMPLATES/xorg/340xx_supported.txt"
+NVIDIA_SUPPORTED="$TEMPLATES/xorg/nvidia_supported.txt"
. /usr/MythVantage/bin/install_functions.sh
home_check
-
function Xvalues {
- echo $VGACARDTYPE
+ #echo $VGACARDTYPE
+ VGAFORCED=0
if [ "x$VGACARDTYPE" = "x" ]
then
- CMDLINE=$(cat /proc/cmdline)
+ CMDLINE=$(cat /proc/cmdline)
echo "$CMDLINE" | grep -q forceXvesa
if [ $? = 0 ]
then
@@ -36,17 +38,20 @@ function Xvalues {
VGAPCIID=`lspci | grep -i vga |grep -vi non-vga| sort -r | head -n 1 | cut -d" " -f1`
CARDID=`lspci -n | grep "$VGAPCIID" | grep 10de | cut -d" " -f3 | cut -d: -f2`
VENDORID=`lspci -n | grep "$VGAPCIID" | grep 10de | cut -d" " -f3 | cut -d: -f1`
+ echo "Detected $VGACARDTYPE as the video card type"
fi
else
- echo "VGACARDTYPE already set"
+ echo "Video card type forced to $VGACARDTYPE"
+ VGAFORCED=1
+ CARDID="NOT_DETECTED"
fi
- echo "Detected $VGACARDTYPE as the video card type"
+ VGACARDTYPE=${VGACARDTYPE,,} #make lowercase
}
function presetupX {
if [ "$XIgnoreConfig" = 1 ]
then
- echo "Using User supplied X"
+ echo "Using User Supplied X"
if [ -f "$MYTHHOME/templates/xorg.user" ]
then
cp -f "$MYTHHOME/templates/xorg.user" "$XORG_CONF"
@@ -60,14 +65,14 @@ function presetupX {
}
function nvidia_prepare {
- for i in mesa-libgl nvidia nvidia-utils nvidia-libgl nvidia-173xx nvidia-173xx-utils nvidia-96xx nvidia-96xx-utils
+ for i in mesa-libgl nvidia nvidia-utils nvidia-libgl opencl-nvidia nvidia-304xx nvidia-304xx-utils nvidia-304xx-libgl opencl-nvidia-304xx nvidia-340xx nvidia-340xx-utils nvidia-340xx-libgl opencl-nvidia-340xx
do
pacman --noconfirm -Rdd $i >> $LOGFILE 2>&1
done
for i in `echo ${NVPKGS}`
do
- pacman --noconfirm -Rc $i >> $LOGFILE 2>&1
+ pacman --noconfirm -Rc $i >> $LOGFILE 2>&1
done
}
@@ -84,32 +89,113 @@ function pkg_check () {
}
function nvidia_driver_install {
- echo "Installing Nvidia driver"
cp "$TEMPLATES/xorg/xorg.nvidia" $BASE/etc/X11/xorg.conf.d/20-automv.conf
- #install latest drivers
- LIST="nvidia nvidia-libgl nvidia-utils"
- for i in `echo ${LIST}`
- do
- pkg_check $i
- done
- #this is used to remove nvidia
- nvidia_prepare
- for i in `echo ${LIST}`
- do
- pacman -S --noconfirm $i >> $LOGFILE 2>&1
- done
- installed=1
+
+ INSTALLED=0
+
+ grep -qi "$CARDID" "$NVIDIA_SUPPORTED"
+ if [[ $? = 0 || $VGAFORCED -eq 1 && $VGACARDTYPE == "nvidia" ]]
+ then
+ LIST="nvidia nvidia-libgl nvidia-utils opencl-nvidia"
+ for i in `echo ${LIST}`
+ do
+ pkg_check $i
+ done
+ echo "Installing current nvidia driver"
+ echo "Installing current nvidia driver" >> $LOGFILE 2>&1
+ nvidia_prepare
+ pacman --noconfirm -S ${LIST} >> $LOGFILE 2>&1
+ if [[ $? != 0 ]]
+ then
+ echo "ERROR: Unable to install current nvidia driver"
+ echo "ERROR: Unable to install current nvidia driver" >> $LOGFILE 2>&1
+ else
+ INSTALLED=1
+ fi
+ fi
+
+ if [ $INSTALLED -eq 0 ]
+ then
+ grep -qi "$CARDID" "$NVIDIA_340xx"
+ if [[ $? = 0 || $VGAFORCED -eq 1 && $VGACARDTYPE == "nvidia-340xx" ]]
+ then
+ LIST="nvidia-340xx nvidia-340xx-libgl nvidia-340xx-utils opencl-nvidia-340xx"
+ for i in `echo ${LIST}`
+ do
+ pkg_check $i
+ done
+ echo "Installing nvidia-340xx driver"
+ echo "Installing nvidia-340xx driver" >> $LOGFILE 2>&1
+ nvidia_prepare
+ pacman --noconfirm -S ${LIST} >> $LOGFILE 2>&1
+ if [[ $? != 0 ]]
+ then
+ echo "ERROR: Unable to install nvidia-340xx driver"
+ echo "ERROR: Unable to install nvidia-340xx driver" >> $LOGFILE 2>&1
+ else
+ INSTALLED=1
+ fi
+ fi
+ fi
+
+ if [ $INSTALLED -eq 0 ]
+ then
+ grep -qi "$CARDID" "$NVIDIA_304xx"
+ if [[ $? = 0 || $VGAFORCED -eq 1 && $VGACARDTYPE == "nvidia-304xx" ]]
+ then
+ LIST="nvidia-304xx nvidia-304xx-libgl nvidia-304xx-utils opencl-nvidia-304xx"
+ for i in `echo ${LIST}`
+ do
+ pkg_check $i
+ done
+ echo "Installing nvidia-304xx driver"
+ echo "Installing nvidia-304xx driver" >> $LOGFILE 2>&1
+ nvidia_prepare
+ pacman --noconfirm -S ${LIST} >> $LOGFILE 2>&1
+ if [[ $? != 0 ]]
+ then
+ echo "ERROR: Unable to install nvidia-304xx driver"
+ echo "ERROR: Unable to install nvidia-304xx driver" >> $LOGFILE 2>&1
+ else
+ INSTALLED=1
+ fi
+ fi
+ fi
+
+ if [ $INSTALLED -eq 0 ]
+ then
+ #this is a failsafe, can't find the right driver, then use the latest'
+ echo " Couldn't find the card id in any list"
+ echo " Couldn't find the card id in any list" >> $LOGFILE 2>&1
+ LIST="nvidia nvidia-libgl nvidia-utils opencl-nvidia"
+ for i in `echo ${LIST}`
+ do
+ pkg_check $i
+ done
+ echo "Installing current nvidia driver"
+ echo "Installing current nvidia driver" >> $LOGFILE 2>&1
+ nvidia_prepare
+ pacman --noconfirm -S ${LIST} >> $LOGFILE 2>&1
+ if [[ $? != 0 ]]
+ then
+ echo "ERROR: Unable to install current nvidia driver"
+ echo "ERROR: Unable to install current nvidia driver" >> $LOGFILE 2>&1
+ else
+ INSTALLED=1
+ fi
+ fi
+
echo "/usr/lib/libXvMCNVIDIA_dynamic.so.1" > "$XVMC_CONFIG"
}
function vmware_driver_install {
- echo "Installing VMware driver"
- echo "Installing VMware driver" >> $LOGFILE 2>&1
LIST="xf86-input-vmmouse xf86-video-vmware xf86-video-vesa svga-dri mesa-libgl"
for i in `echo ${LIST}`
do
pkg_check $i
done
+ echo "Installing VMware driver"
+ echo "Installing VMware driver" >> $LOGFILE 2>&1
#this is used to remove nvidia
nvidia_prepare
for i in `echo ${LIST}`
@@ -119,46 +205,26 @@ function vmware_driver_install {
}
function vesa_driver_install {
- echo "Installing Vesa driver"
- echo "Installing Vesa driver" >> $LOGFILE 2>&1
pkg_check xf86-video-vesa
pkg_check mesa-libgl
+ echo "Installing Vesa driver"
+ echo "Installing Vesa driver" >> $LOGFILE 2>&1
#this is used to remove nvidia
nvidia_prepare
pacman -S --noconfirm xf86-video-vesa mesa-libgl >> $LOGFILE 2>&1
}
function intel_driver_install {
- echo "Installing Intel driver"
- echo "Installing Intel driver" >> $LOGFILE 2>&1
pkg_check xf86-video-intel
pkg_check mesa-libgl
+ echo "Installing Intel driver"
+ echo "Installing Intel driver" >> $LOGFILE 2>&1
#this is used to remove nvidia
nvidia_prepare
pacman -S --noconfirm xf86-video-intel mesa-libgl >> $LOGFILE 2>&1
echo "/usr/lib/libIntelXvMC.so.1" > "$XVMC_CONFIG"
}
-# if [ "$Xcategory" = "Nvidia" ]
-# then
-# #Xres=""
-# if [ "$XnVidia1080p" = "1" ]
-# then
-# Xres="${Xres} 1920x1080_60"
-# fi
-# if [ "$XnVidia1080i" = "1" ]
-# then
-# Xres="${Xres} 1920x1080_60i"
-# fi
-# if [ "$XnVidia720p" = "1" ]
-# then
-# Xres="${Xres} 1280x720_60"
-# fi
-# if [ "$XnVidia480p" = "1" ]
-# then
-# Xres="${Xres} 720x480_60"
-# fi
-
function set_res {
echo " Setting modeline to ${Xres}"
echo " Setting modeline to ${Xres}" >> $LOGFILE 2>&1
@@ -176,13 +242,12 @@ function set_res {
EOF
}
-
function setupX {
Xvalues
if [ x = x ]
then
case $VGACARDTYPE in
- NVIDIA|nVidia|nvidia)
+ nvidia|nvidia-340xx|nvidia-304xx)
nvidia_driver_install
if [ \"$Xres\" = "Auto" ]
then
@@ -197,7 +262,7 @@ function setupX {
fi
;;
- VMware)
+ vmware)
vmware_driver_install
cp $TEMPLATES/xorg/xorg.vmware /etc/X11/xorg.conf.d/20-automv.conf
echo "copy in autostart functions" >> $LOGFILE 2>&1
@@ -211,9 +276,9 @@ function setupX {
else
rm -f /etc/X11/xorg.conf.d/30-screen.conf
fi
- ;;
+ ;;
- Intel|intel)
+ intel)
intel_driver_install
cp $TEMPLATES/xorg/xorg.intel /etc/X11/xorg.conf.d/20-automv.conf
if [ ${Xres} != "Auto" ]
@@ -222,9 +287,13 @@ function setupX {
else
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
+ 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" ]
@@ -247,7 +316,17 @@ function setupX {
}
-
+function pacman_wait {
+ if [ -f /var/lib/pacman/db.lck ]
+ then
+ echo "Pacman is running and must quit before xconfig.sh can continue."
+ echo " Waiting for pacman to quit..."
+ while [ -f /var/lib/pacman/db.lck ]
+ do
+ sleep 5
+ done
+ fi
+}
#---------------------------------------------------------------------------------
#MAIN
@@ -267,7 +346,6 @@ then
fi
-
if [ -f /etc/systemconfig ]
then
. /etc/systemconfig
@@ -291,8 +369,9 @@ then
fi
-
XORG_CONF="/etc/X11/xorg.conf"
XVMC_CONFIG="/etc/X11/XvMCConfig"
+
+pacman_wait
presetupX