В продолжение темы Create a boot option for easy nvidia or nouveau display driver switching
Делаем раз
> grep -1 depend /etc/init.d/xdm
depend() {
need localmount xdm-setup
Отлично т.е. вместо /etc/init.d/xcfgmaker можно использовать /etc/init.d/xdm-setup
Этим и займемся.
> cat /etc/init.d/xdm-setup
#!/sbin/runscript
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-server/files/xdm-setup.initd-1,v 1.1 2010/04/13 10:07:39 scarabeus Exp $
depend() {
need localmount
}
start() {
if get\_bootparam "nox" ; then
touch /etc/.noxdm
fi
if get\_bootparam "nouveau.blacklist=true" ; then
cp /etc/X11/video/20-nvidia.conf.nvidia
/etc/X11/xorg.conf.d/20-nvidia.conf &\>/dev/null &
eselect opengl set nvidia &\>/dev/null &
eselect xvmc set nvidia &\>/dev/null & # grep touch
/usr/share/eselect/modules/xvmc.eselect
fi
if get\_bootparam "nvidia.blacklist=true" ; then
cp /etc/X11/video/20-nvidia.conf.nouveau
/etc/X11/xorg.conf.d/20-nvidia.conf &\>/dev/null &
eselect opengl set xorg-x11 &\>/dev/null &
eselect xvmc set xorg-x11 &\>/dev/null & # grep touch
/usr/share/eselect/modules/xvmc.eselect
fi
}
Как результат больше нет лишних велосипедов.
Comments