# ChangeLog for net-dialup/slmodem
# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/ChangeLog,v 1.72 2006/10/08 19:49:13 ticho Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/ChangeLog,v 1.73 2006/11/18 13:57:48 mrness Exp $
+
+ 18 Nov 2006; Alin Nastac <mrness@gentoo.org>
+ -files/slmodem-2.9.11-modem-cc-makefile.patch,
+ -files/slmodem-2.9.11-modem-makefile.patch, -files/slmodem-2.9.11.init,
+ -files/slmodem-2.9.11.modules, -files/slmodem-2.9.conf,
+ +files/slmodem-confd, +files/slmodem-initd, +files/slmodem-modules,
+ -slmodem-2.9.11_pre20051101.ebuild, slmodem-2.9.11_pre20051101-r2.ebuild:
+ Remove obsolete revision.
08 Oct 2006; Andrej Kacian <ticho@gentoo.org>
slmodem-2.9.11_pre20051101-r2.ebuild:
--- /dev/null
+# Config file for /etc/init.d/slmodemd
+
+DEV=/dev/ttySL0
+COUNTRY=USA
+GROUP=dialout
+# the group should be kept in sync with:
+# /etc/devfs.d/slmodem (devfs)
+# /etc/udev/rules.d/55-slmodem.rules (udev)
+
+# The following symlink will be created if uncommented
+LN_DEV=/dev/modem
+
+# Raise priority to reduce modem dropouts
+NICE=-6
+
+# ALSA Options:
+
+# The following sets the ALSA (alsasound) init script to
+# be a dependancy of the slmodem one. It does also provides
+# ALSA support.
+# MODULE=alsa
+
+# The modem hardware slot
+# use "modem:0", "modem:1", etc.
+# usually modem:1 is used
+# HW_SLOT=modem:1
+
+# Non-ALSA OPTIONS:
+
+# MODULE=slamr
+# or
+# MODULE=slusb
--- /dev/null
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+if [ "${MODULE}" = "alsa" ];
+then
+ needalsasound="alsasound"
+fi
+depend() {
+ need logger $needalsasound
+}
+
+
+checkconfig() {
+ if [ -z "${COUNTRY}" ]; then
+ eerror "You need to config /etc/conf.d/slmodem first"
+ return 1
+ fi
+}
+
+function loadsalsa {
+ ebegin "Starting slmodemd for ${DEV}"
+ start-stop-daemon --start --background --nicelevel=${NICE} --make-pidfile \
+ --pidfile /var/run/slmodemd.pid --startas /usr/sbin/slmodemd \
+ -- -country=${COUNTRY} -g=${GROUP} --alsa ${HW_SLOT}
+ return ${?}
+}
+
+function loadsmodule {
+ modprobe ${MODULE}
+
+ if [ "$?" -gt 0 ]; then
+ eerror "Missing ${MODULE}. Please set up /etc/conf.d/slmodem"
+ return 1;
+ fi
+
+ if [ -z "${MDEV}" ]; then MDEV="/dev/${MODULE}0"; fi
+ if [ ! -c "${MDEV}" ]; then
+ case ${MODULE} in
+ slamr)
+ mknod ${MDEV} c 242 0
+ ;;
+ slusb)
+ mknod ${MDEV} c 243 0
+ ;;
+ esac
+ fi
+
+ ebegin "Starting slmodemd for ${DEV}"
+ start-stop-daemon --start --background --nicelevel=${NICE} --make-pidfile \
+ --pidfile /var/run/slmodemd.pid --startas /usr/sbin/slmodemd \
+ -- -country=${COUNTRY} -g=${GROUP} ${MDEV}
+ return ${?}
+}
+
+start() {
+
+ checkconfig || return 1
+ if [ ! -c /dev/ppp ]; then mknod /dev/ppp c 108 0; fi
+
+ # either if we use alsa or not, the only thing we need is
+ # ttySL0, which is created by slmodemd when started (points to a pts)
+
+ if [ "${MODULE}" == "alsa" ]; then
+ loadsalsa
+ else
+ loadsmodule
+ fi
+
+ result=${?}
+
+ test ! -z "${LN_DEV}" && /bin/ln -s ${DEV} ${LN_DEV} 2> /dev/null
+
+ eend ${result}
+}
+
+stop() {
+ ebegin "Shutting down slmodemd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/slmodemd.pid
+ result=${?}
+ [ -e /var/run/slmodemd.pid ] && rm /var/run/slmodemd.pid
+ unlink ${LN_DEV} 2> /dev/null
+ eend ${result}
+ if [ ! "${MODULE}" == "alsa" ]; then
+ ebegin "Waiting for ${MODULE} modem driver unload"
+ if [ "$RC_NOCOLOR" != "yes" ]; then
+ echo -e "\e[A\e[44G "
+ echo -ne "\e[A\e[44G"
+ fi
+ for ((a=0,result=1; result==1 && a <= 5 ; a++))
+ do
+ sleep 0.25
+ echo -n "."
+ modprobe -r slamr 2> /dev/null && result=0
+ done
+ if [ "$RC_NOCOLOR" != "yes" ]; then echo; fi
+ eend ${result}
+ fi
+}
--- /dev/null
+# slmodem 2.9.x kernel modules' configuration file
+
+alias char-major-242 slamr
+alias char-major-243 slusb
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/slmodem-2.9.11_pre20051101-r2.ebuild,v 1.2 2006/10/08 19:49:13 ticho Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/slmodem-2.9.11_pre20051101-r2.ebuild,v 1.3 2006/11/18 13:57:48 mrness Exp $
inherit eutils linux-mod multilib
fowners root:dialout /var/lib/slmodem
keepdir /var/lib/slmodem
- newconfd "${FILESDIR}/${PN}-2.9.conf" ${PN}
- newinitd "${FILESDIR}/${PN}-2.9.11.init" ${PN}
+ newconfd "${FILESDIR}/slmodem-confd" ${PN}
+ newinitd "${FILESDIR}/slmodem-initd" ${PN}
# configure for alsa - or not for alsa
if use alsa; then
# Add module aliases and install hotplug script
- insinto /etc/modules.d/; newins "${FILESDIR}/${PN}-2.9.11.modules" ${PN}
+ insinto /etc/modules.d/; newins "${FILESDIR}/slmodem-modules" ${PN}
if use usb; then
exeinto /etc/hotplug/usb; newexe "${FILESDIR}/slusb.hotplug" slusb
fi