manjaro-tools/livecd/mhwd
2014-12-09 00:17:46 +01:00

31 lines
881 B
Bash
Executable file

#!/bin/sh
[[ -r /opt/livecd/util-lng.sh ]] && source /opt/livecd/util-lng.sh
USENONFREE="$(kernel_cmdline nonfree no)"
VIDEO="$(kernel_cmdline xdriver no)"
# hwdetect_graphics
if [ -e "/opt/livecd/pacman-gfx.conf" ] ; then
echo "run mhwd" >> /tmp/livecd.log
if [ "${USENONFREE}" == "yes" ] || [ "${USENONFREE}" == "true" ]; then
if [ "${VIDEO}" == "vesa" ]; then
mhwd --install pci video-vesa --pmconfig "/opt/livecd/pacman-gfx.conf"
else
mhwd --auto pci nonfree 0300 --pmconfig "/opt/livecd/pacman-gfx.conf"
fi
else
if [ "${VIDEO}" == "vesa" ]; then
mhwd --install pci video-vesa --pmconfig "/opt/livecd/pacman-gfx.conf"
else
mhwd --auto pci free 0300 --pmconfig "/opt/livecd/pacman-gfx.conf"
fi
fi
fi
if [[ -e /run/openrc ]];then
if [[ -f /etc/X11/mhwd.d/virtualbox.conf ]];then
VBoxService
fi
fi
echo "MHWD DONE" > /tmp/mhwd.task