#!/sbin/runscript
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/setserial/files/serial,v 1.3 2007/06/13 07:51:51 vapier Exp $

depend() {
	need localmount
}

start() {
	[ ! -e /etc/serial.conf ] && return 0

	# load the module if need be
	if [ -e /proc/modules ] ; then
		modprobe -q serial
	fi

	grep -v "^#\|^ \|^$" /etc/serial.conf | while read device args
	do
		ebegin "Setting ${device} to $args"
		setserial -b ${device} ${args}
		eend $?
	done

	return 0
}


# vim:ts=4
