Remove obsolete revision.
authorAlin Năstac <mrness@gentoo.org>
Sat, 18 Nov 2006 13:57:48 +0000 (13:57 +0000)
committerAlin Năstac <mrness@gentoo.org>
Sat, 18 Nov 2006 13:57:48 +0000 (13:57 +0000)
Package-Manager: portage-2.1.1-r1

net-dialup/slmodem/ChangeLog
net-dialup/slmodem/files/slmodem-confd [new file with mode: 0644]
net-dialup/slmodem/files/slmodem-initd [new file with mode: 0644]
net-dialup/slmodem/files/slmodem-modules [new file with mode: 0644]
net-dialup/slmodem/slmodem-2.9.11_pre20051101-r2.ebuild

index 542f140e8f13d6f9c8ca0ff71fbf9829b3007344..7faed5096024377c792fc3baa2b1821fcf013be0 100644 (file)
@@ -1,6 +1,14 @@
 # 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:
diff --git a/net-dialup/slmodem/files/slmodem-confd b/net-dialup/slmodem/files/slmodem-confd
new file mode 100644 (file)
index 0000000..873dd33
--- /dev/null
@@ -0,0 +1,32 @@
+# 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
diff --git a/net-dialup/slmodem/files/slmodem-initd b/net-dialup/slmodem/files/slmodem-initd
new file mode 100644 (file)
index 0000000..203af28
--- /dev/null
@@ -0,0 +1,99 @@
+#!/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
+}
diff --git a/net-dialup/slmodem/files/slmodem-modules b/net-dialup/slmodem/files/slmodem-modules
new file mode 100644 (file)
index 0000000..3a49fed
--- /dev/null
@@ -0,0 +1,4 @@
+# slmodem 2.9.x kernel modules' configuration file
+
+alias char-major-242 slamr
+alias char-major-243 slusb
index 7431cbc30f861a3e3f493700c6e7f92bff531e8c..7e2b55e684e30fe54c2dd713c976233cbd6ba876 100644 (file)
@@ -1,6 +1,6 @@
 # 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
 
@@ -75,8 +75,8 @@ src_install() {
        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
@@ -88,7 +88,7 @@ src_install() {
 
 
        # 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