nix-tools/scripts/mhwd-live
2014-12-19 17:46:43 +01:00

26 lines
776 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
echo "MHWD DONE" > /tmp/mhwd.task