summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/LinHES-config')
-rwxr-xr-xabs/core/LinHES-config/PKGBUILD13
-rwxr-xr-xabs/core/LinHES-config/mv_network.py18
-rwxr-xr-xabs/core/LinHES-config/plymouth_config.py13
-rwxr-xr-xabs/core/LinHES-config/systemd-coredump.conf2
-rwxr-xr-xabs/core/LinHES-config/xconfig.sh146
5 files changed, 110 insertions, 82 deletions
diff --git a/abs/core/LinHES-config/PKGBUILD b/abs/core/LinHES-config/PKGBUILD
index ed6cca9..f67f84d 100755
--- a/abs/core/LinHES-config/PKGBUILD
+++ b/abs/core/LinHES-config/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=LinHES-config
pkgver=8.4.2
-pkgrel=1
+pkgrel=5
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'
@@ -48,6 +48,7 @@ source=(mv_install.py 09_mythvantge_runit_grub
mv_fileshare.py
mv_locale.py
systemconfig.py
+ systemd-coredump.conf
pinkNoise_3s.wav
myth_user_call.py
mythvantage.cfg
@@ -132,6 +133,9 @@ package() {
#sysctrl conf
install -o root -g root -D -m 0755 hdhr.conf $pkgdir/etc/sysctl.d/hdhr.conf
+ #systemd conf
+ install -o root -g root -D -m 0755 systemd-coredump.conf $pkgdir/etc/systemd/coredump.conf.d/coredump.conf
+
#modules blacklist files
install -o root -g root -D -m 0755 blacklist_pcspkr.conf $pkgdir/etc/modprobe.d/blacklist_pcspkr.conf
install -o root -g root -D -m 0755 blacklist_nouveau.conf $pkgdir/etc/modprobe.d/blacklist_nouveau.conf
@@ -148,7 +152,7 @@ md5sums=('97b810ddc35d1f441dbe8cdd6886e2af'
'27e4fcacca9b9662dd782fbdc92fceea'
'2a7f3b34e522acfd08283b86c8926aba'
'b596d2e3779a434435bc0f0277b1ba3e'
- 'a751a88268029989f0067e2c9e75bf6e'
+ 'f0fb2ec7bcfa827686f590db8890d87a'
'f0376c98a7986897406d393186c0365e'
'157e73d0f90d7b306aba8f5921aeedd3'
'1f58c0393a131f4a8f9a84b3fe08a7e4'
@@ -166,7 +170,7 @@ md5sums=('97b810ddc35d1f441dbe8cdd6886e2af'
'b845de3e05c1734cce4b9ac5e8f1baaf'
'02b4378b17bca6bebdcc2258a80dfc6b'
'8b7dce4a3a0a281fa6656aa8781a648e'
- '4b10fff21a0274f950f97f2b61e92463'
+ '3ef3f589f46d0b59603226fef325e611'
'824e49d9b01fed295c704ab68908b464'
'fe5e31b833cc6707209e9d656b6eb53c'
'336f08aed2e3c0b9fd09563933d54735'
@@ -177,6 +181,7 @@ md5sums=('97b810ddc35d1f441dbe8cdd6886e2af'
'3cb673adb83b6afa52cffaa621b9d96b'
'781f161a79c3188a31c8615b8258b241'
'888a6c57f272d9fa3e77e216a421562b'
+ '6cb0aac63623a44463c4209862d2baa0'
'cdd5008ee77e67c1d51ad73a24612485'
'2596460462cf6c889cf8f95485537b20'
'dc3c5270691a62600475705f4cb78b56'
@@ -186,5 +191,5 @@ md5sums=('97b810ddc35d1f441dbe8cdd6886e2af'
'3866086e6af5e3528a66eff492f2f4dd'
'c9279fa095af624ee3d9bc75d3328360'
'02cf69074d2bbacef05fa3e451af9af3'
- '10354854c29d894d3598639eaa1df72c'
+ '18a47236637c364af27c14ac0aafc801'
'7acbd2064db905e76372a0618b24a6d9')
diff --git a/abs/core/LinHES-config/mv_network.py b/abs/core/LinHES-config/mv_network.py
index a4ad0c9..559a226 100755
--- a/abs/core/LinHES-config/mv_network.py
+++ b/abs/core/LinHES-config/mv_network.py
@@ -53,17 +53,23 @@ def get_ip(ifname):
logging.debug(" Found %s in all_interfaces", ifname)
else:
logging.critical("* Couldn't find %s in list", ifname)
- ifname = all_if[0]
+ try:
+ ifname = all_if[0]
+ except:
+ ifname = ifname
logging.critical("* Using %s for interface name", ifname)
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
- ip = socket.inet_ntoa(fcntl.ioctl(
- s.fileno(),
- 0x8915, # SIOCGIFADDR
- struct.pack('256s', ifname[:15])
- )[20:24])
+ try:
+ ip = socket.inet_ntoa(fcntl.ioctl(
+ s.fileno(),
+ 0x8915, # SIOCGIFADDR
+ struct.pack('256s', ifname[:15])
+ )[20:24])
+ except:
+ ip = "127.0.0.1"
logging.debug(" get_ip ip address is %s", ip)
return ip
diff --git a/abs/core/LinHES-config/plymouth_config.py b/abs/core/LinHES-config/plymouth_config.py
index bb60722..a3ade2b 100755
--- a/abs/core/LinHES-config/plymouth_config.py
+++ b/abs/core/LinHES-config/plymouth_config.py
@@ -120,14 +120,16 @@ class plymouth_driver():
add_modules = ['i915']
remove_hooks = ['v86d']
else:
- #add_modules = ['nfs','jm']
- remove_modules = ['i915']
- add_hooks = ['v86d']
+ #add_modules = ['nfs','jm']
+ remove_modules = ['i915']
+ #remove and add to ensure v86d is first
+ remove_hooks = ['v86d','plymouth']
+ add_hooks = ['v86d','plymouth']
- new_hooks = self.add_hooks(add_hooks , new_hooks)
new_hooks = self.remove_hooks(remove_hooks, new_hooks)
- new_modules = self.add_modules(add_modules, new_modules)
+ new_hooks = self.add_hooks(add_hooks , new_hooks)
new_modules = self.remove_modules(remove_modules, new_modules)
+ new_modules = self.add_modules(add_modules, new_modules)
self.new_hooks = new_hooks
self.new_modules = new_modules
@@ -156,7 +158,6 @@ class plymouth_driver():
if line.startswith('MODULES='):
new_line = 'MODULES="%s"'%(" ".join(self.new_modules))
f.write(new_line)
- f.write("\n")
f.close()
except:
print " plymouth_config: couldn't write %s" %conf_file
diff --git a/abs/core/LinHES-config/systemd-coredump.conf b/abs/core/LinHES-config/systemd-coredump.conf
new file mode 100755
index 0000000..519f838
--- /dev/null
+++ b/abs/core/LinHES-config/systemd-coredump.conf
@@ -0,0 +1,2 @@
+[Coredump]
+Storage=none
diff --git a/abs/core/LinHES-config/xconfig.sh b/abs/core/LinHES-config/xconfig.sh
index b5693b9..be01857 100755
--- a/abs/core/LinHES-config/xconfig.sh
+++ b/abs/core/LinHES-config/xconfig.sh
@@ -1,9 +1,18 @@
#!/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
+echo -e "\n\n--------------------------------------------------------------------------------" >> $LOGFILE 2>&1
+echo -e `date`"\n" >> $LOGFILE 2>&1
+
for i in ati intel mga savage sis unichrome
do
templist=`echo $i-dri xf86-video-$i`
@@ -17,6 +26,8 @@ MYTH_RUN_STATUS="1"
NVIDIA_304xx="$TEMPLATES/xorg/304xx_supported.txt"
NVIDIA_340xx="$TEMPLATES/xorg/340xx_supported.txt"
NVIDIA_SUPPORTED="$TEMPLATES/xorg/nvidia_supported.txt"
+NVIDIA_DISABLE_MSI="$TEMPLATES/xorg/nvidia_disable_msi.txt"
+NVIDIA_MSI_MODPROBE="$BASE/etc/modprobe.d/nvidia_msi.conf"
. /usr/MythVantage/bin/install_functions.sh
home_check
@@ -26,11 +37,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" | tee -a $LOGFILE
VGACARDTYPE=vesa
Xcardtype=$VGACARDTYPE
else
@@ -38,10 +49,10 @@ 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"
+ echo "Detected $VGACARDTYPE as the video card type" | tee -a $LOGFILE
fi
else
- echo "Video card type forced to $VGACARDTYPE"
+ echo "Video card type forced to $VGACARDTYPE" | tee -a $LOGFILE
VGAFORCED=1
CARDID="NOT_DETECTED"
fi
@@ -49,14 +60,14 @@ function Xvalues {
}
function presetupX {
- if [ "$XIgnoreConfig" = 1 ]
+ if [ "$XIgnoreConfig" = 1 ]
then
- echo "Using User Supplied X"
+ echo "Using User Supplied X" | tee -a $LOGFILE
if [ -f "$MYTHHOME/templates/xorg.user" ]
then
cp -f "$MYTHHOME/templates/xorg.user" "$XORG_CONF"
else
- echo "Didn't find the file"
+ echo "Didn't find the file" | tee -a $LOGFILE
echo "Copy your config file to $MYTHHOME/templates/xorg.user" > "$XORG_CONF"
fi
else
@@ -65,6 +76,7 @@ function presetupX {
}
function nvidia_prepare {
+ [[ -f "$NVIDIA_MSI_MODPROBE" ]] && rm -f "$NVIDIA_MSI_MODPROBE"
for i in libva-intel-driver mesa-libgl nvidia nvidia-utils nvidia-libgl opencl-nvidia nvidia-settings libglvnd 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
@@ -77,13 +89,12 @@ function nvidia_prepare {
}
function pkg_check () {
- echo " Checking for $1 in cache or online"
+ echo " Checking for $1 in cache or online" | tee -a $LOGFILE
pacman --noconfirm -Sw $1 >> $LOGFILE 2>&1
rc=$?
if [ $rc != 0 ]
then
- echo " Couldn't find $1 for install, aborting"
- echo " Couldn't find $1 for install, aborting" >> $LOGFILE 2>&1
+ echo " Couldn't find $1 for install, aborting" | tee -a $LOGFILE
exit 1
fi
}
@@ -93,22 +104,21 @@ function nvidia_driver_install {
INSTALLED=0
- grep -qi "$CARDID" "$NVIDIA_SUPPORTED"
+ CARDNAME=`grep -i "$CARDID" "$NVIDIA_SUPPORTED"`
if [[ $? = 0 || $VGAFORCED -eq 1 && $VGACARDTYPE == "nvidia" ]]
then
+ echo "$CARDNAME" | tee -a $LOGFILE
LIST="nvidia nvidia-libgl nvidia-utils opencl-nvidia nvidia-settings"
for i in `echo ${LIST}`
do
pkg_check $i
done
- echo "Installing current nvidia driver"
- echo "Installing current nvidia driver" >> $LOGFILE 2>&1
+ echo "Installing current nvidia driver" | tee -a $LOGFILE
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
+ echo "ERROR: Unable to install current nvidia driver" | tee -a $LOGFILE
else
INSTALLED=1
fi
@@ -116,22 +126,21 @@ function nvidia_driver_install {
if [ $INSTALLED -eq 0 ]
then
- grep -qi "$CARDID" "$NVIDIA_340xx"
+ CARDNAME=`grep -i "$CARDID" "$NVIDIA_340xx"`
if [[ $? = 0 || $VGAFORCED -eq 1 && $VGACARDTYPE == "nvidia-340xx" ]]
then
+ echo "$CARDNAME" | tee -a $LOGFILE
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
+ echo "Installing nvidia-340xx driver" | tee -a $LOGFILE
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
+ echo "ERROR: Unable to install nvidia-340xx driver" | tee -a $LOGFILE
else
INSTALLED=1
fi
@@ -140,22 +149,21 @@ function nvidia_driver_install {
if [ $INSTALLED -eq 0 ]
then
- grep -qi "$CARDID" "$NVIDIA_304xx"
+ CARDNAME=`grep -i "$CARDID" "$NVIDIA_304xx"`
if [[ $? = 0 || $VGAFORCED -eq 1 && $VGACARDTYPE == "nvidia-304xx" ]]
then
+ echo "$CARDNAME" | tee -a $LOGFILE
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
+ echo "Installing nvidia-304xx driver" | tee -a $LOGFILE
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
+ echo "ERROR: Unable to install nvidia-304xx driver" | tee -a $LOGFILE
else
INSTALLED=1
fi
@@ -165,27 +173,34 @@ function nvidia_driver_install {
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
+ echo " Couldn't find the card id in any list" | tee -a $LOGFILE
LIST="nvidia nvidia-libgl nvidia-utils opencl-nvidia nvidia-settings"
for i in `echo ${LIST}`
do
pkg_check $i
done
- echo "Installing current nvidia driver"
- echo "Installing current nvidia driver" >> $LOGFILE 2>&1
+ echo "Installing current nvidia driver" | tee -a $LOGFILE
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
+ echo "ERROR: Unable to install current nvidia driver" | tee -a $LOGFILE
else
INSTALLED=1
fi
fi
echo "/usr/lib/libXvMCNVIDIA_dynamic.so.1" > "$XVMC_CONFIG"
+
+ if [ $INSTALLED -eq 1 ]
+ then
+ grep -qi "$CARDID" "$NVIDIA_DISABLE_MSI"
+ if [[ $? = 0 ]]
+ then
+ echo "Disabling MSI interrupts" | tee -a $LOGFILE
+ echo "options nvidia NVreg_EnableMSI=0" > "$NVIDIA_MSI_MODPROBE"
+ fi
+ fi
}
function vmware_driver_install {
@@ -194,8 +209,7 @@ function vmware_driver_install {
do
pkg_check $i
done
- echo "Installing VMware driver"
- echo "Installing VMware driver" >> $LOGFILE 2>&1
+ echo "Installing VMware driver" | tee -a $LOGFILE
#this is used to remove nvidia
nvidia_prepare
for i in `echo ${LIST}`
@@ -207,8 +221,7 @@ function vmware_driver_install {
function vesa_driver_install {
pkg_check xf86-video-vesa
pkg_check mesa-libgl
- echo "Installing Vesa driver"
- echo "Installing Vesa driver" >> $LOGFILE 2>&1
+ echo "Installing Vesa driver" | tee -a $LOGFILE
#this is used to remove nvidia
nvidia_prepare
pacman -S --noconfirm xf86-video-vesa mesa-libgl >> $LOGFILE 2>&1
@@ -217,8 +230,7 @@ function vesa_driver_install {
function intel_driver_install {
pkg_check xf86-video-intel
pkg_check mesa-libgl
- echo "Installing Intel driver"
- echo "Installing Intel driver" >> $LOGFILE 2>&1
+ echo "Installing Intel driver" | tee -a $LOGFILE
#this is used to remove nvidia
nvidia_prepare
pacman -S --noconfirm xf86-video-intel libva-intel-driver mesa-libgl >> $LOGFILE 2>&1
@@ -226,8 +238,7 @@ 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}" | tee -a $LOGFILE
cat > /etc/X11/xorg.conf.d/30-screen.conf <<EOF
Section "Screen"
Identifier "Screen0" #Collapse Monitor and Device section to Screen section
@@ -249,15 +260,11 @@ 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}" | tee -a $LOGFILE
rm -f /etc/X11/xorg.conf.d/30-screen.conf
fi
;;
@@ -270,10 +277,11 @@ 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}" | tee -a $LOGFILE
rm -f /etc/X11/xorg.conf.d/30-screen.conf
fi
;;
@@ -281,25 +289,27 @@ 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}" | tee -a $LOGFILE
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." | tee -a $LOGFILE
+ 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}" | tee -a $LOGFILE
rm -f /etc/X11/xorg.conf.d/30-screen.conf
fi
@@ -309,7 +319,7 @@ function setupX {
#configure the ramdisk for kms
if [ x$RUNP != "x1" ]
then
- echo "Running plymouth_config"
+ echo "Running plymouth_config" | tee -a $LOGFILE
plymouth_config.py >> $LOGFILE 2>&1
fi
fi
@@ -319,8 +329,8 @@ 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..."
+ echo "Pacman is running and must quit before xconfig.sh can continue." | tee -a $LOGFILE
+ echo " Waiting for pacman to quit..." | tee -a $LOGFILE
while [ -f /var/lib/pacman/db.lck ]
do
sleep 5
@@ -333,28 +343,25 @@ 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"
+ echo "** xorg configuration disabled in /etc/mythvantage.cfg" | tee -a $LOGFILE
exit 1
fi
if [ -f /etc/sysconfig/IGNORE_X ]
then
- echo "** Will not run xconfig.sh due to presence of /etc/sysconfig/IGNORE_X"
+ echo "** Will not run xconfig.sh due to presence of /etc/sysconfig/IGNORE_X" | tee -a $LOGFILE
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." | tee -a $LOGFILE
fi
+
CMDLINE=$(cat /proc/cmdline)
echo $CMDLINE | grep -q displayres
if [ $? = 0 ]
@@ -365,10 +372,17 @@ fi
if [ ! x$DSR = x ]
then
Xres=$DSR
+ echo " Setting resolution to ${Xres} from kernel cmdline" | tee -a $LOGFILE
fi
if [ ! x$DISPLAYRES = x ]
then
Xres=$DISPLAYRES
+ echo "Resolution forced to ${Xres}" | tee -a $LOGFILE
+fi
+if [ x$Xres = x ]
+then
+ Xres="Auto"
+ echo "Resolution not set. Setting to ${Xres}" | tee -a $LOGFILE
fi