#!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ depend() { before xdm } checkconfig() { if [ -z "${replace[0]}" ] || [ -z "${with[0]}" ] then eerror "You need to set at least one replace/with pair in /etc/conf.d/915resolution" return 1 fi } start() { checkconfig || return 1 ebegin "Running 915resolution to replace ${#replace[@]} mode(s)" i=0; return=0; retval=0 for target in "${replace[@]}" do /usr/sbin/915resolution $target ${with[$i]} > /dev/null retval=$? if [ "$retval"!=0 ]; then return=$retval; fi i=$(($i+1)) done eend $return }