summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Black <dragonheart@gentoo.org>2004-06-08 05:38:04 +0000
committerDaniel Black <dragonheart@gentoo.org>2004-06-08 05:38:04 +0000
commita91e12a1d26d35e290f25499f8f486df2e980164 (patch)
tree180880084463e380bd5b6b72020deec5c88e2527 /net-dialup
parentNew init script setup for rpc.yppasswdd as suggested on bug #40048 (Manifest ... (diff)
downloadgentoo-2-a91e12a1d26d35e290f25499f8f486df2e980164.tar.gz
gentoo-2-a91e12a1d26d35e290f25499f8f486df2e980164.tar.bz2
gentoo-2-a91e12a1d26d35e290f25499f8f486df2e980164.zip
Fixes and updates as per bug #47947 comments 31,35,36
Diffstat (limited to 'net-dialup')
-rw-r--r--net-dialup/slmodem/ChangeLog7
-rw-r--r--net-dialup/slmodem/files/digest-slmodem-2.9.7-r21
-rw-r--r--net-dialup/slmodem/files/slmodem-2.9.conf4
-rw-r--r--net-dialup/slmodem/files/slmodem-2.9.devfs11
-rw-r--r--net-dialup/slmodem/files/slmodem-2.9.init4
-rw-r--r--net-dialup/slmodem/slmodem-2.9.7-r2.ebuild127
6 files changed, 149 insertions, 5 deletions
diff --git a/net-dialup/slmodem/ChangeLog b/net-dialup/slmodem/ChangeLog
index 27b41447eb56..e6da2051ed9d 100644
--- a/net-dialup/slmodem/ChangeLog
+++ b/net-dialup/slmodem/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for net-dialup/slmodem
# Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/ChangeLog,v 1.10 2004/06/05 12:11:00 dragonheart Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/ChangeLog,v 1.11 2004/06/08 05:37:52 dragonheart Exp $
+
+ 08 Jun 2004; Daniel Black <dragonheart@gentoo.org> files/slmodem-2.9.conf,
+ files/slmodem-2.9.devfs, files/slmodem-2.9.init, +slmodem-2.9.7-r2.ebuild:
+ Fixes and updates as per bug #47947 comments 31,35,36. Thanks to Tod
+ Morrison, Miroslaw Mieszczak and Simon Cooper.
05 Jun 2004; Daniel Black <dragonheart@gentoo.org> slmodem-2.9.7-r1.ebuild:
Fix according to bug #47947 comment 29 - Thanks Simon.
diff --git a/net-dialup/slmodem/files/digest-slmodem-2.9.7-r2 b/net-dialup/slmodem/files/digest-slmodem-2.9.7-r2
new file mode 100644
index 000000000000..45a1ca010886
--- /dev/null
+++ b/net-dialup/slmodem/files/digest-slmodem-2.9.7-r2
@@ -0,0 +1 @@
+MD5 741aec69a9cdb95fbce21105b4f1924c slmodem-2.9.7.tar.gz 648986
diff --git a/net-dialup/slmodem/files/slmodem-2.9.conf b/net-dialup/slmodem/files/slmodem-2.9.conf
index f03438aac742..659e8748cbd9 100644
--- a/net-dialup/slmodem/files/slmodem-2.9.conf
+++ b/net-dialup/slmodem/files/slmodem-2.9.conf
@@ -3,6 +3,10 @@
MODULE=slamr
# or MODULE=slusb
+# Raise priority to reduce modem dropouts
+NICE=-6
+
+
DEV=/dev/slamr0
LN_DEV=/dev/modem
#MODEM_DAEMON=/usr/sbin/slmodemd
diff --git a/net-dialup/slmodem/files/slmodem-2.9.devfs b/net-dialup/slmodem/files/slmodem-2.9.devfs
index 16e49322c72c..719f95f303d2 100644
--- a/net-dialup/slmodem/files/slmodem-2.9.devfs
+++ b/net-dialup/slmodem/files/slmodem-2.9.devfs
@@ -1,8 +1,15 @@
# slmodem kernel modules' devfs configuration file
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/files/slmodem-2.9.devfs,v 1.2 2004/06/05 10:41:21 dragonheart Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/files/slmodem-2.9.devfs,v 1.3 2004/06/08 05:38:04 dragonheart Exp $
# Create /dev/modem for /dev/slamr0 (Change to suit your setup)
LOOKUP ^slamr0$ MODLOAD ACTION slamr
-LOOKUP ^slamr0$ CFUNCTION GLOBAL mksymlink slamr0 modem
+LOOKUP ^slamr0$ CFUNCTION GLOBAL mksymlink ttySL0 modem
REGISTER ^slamr0$ CFUNCTION GLOBAL mksymlink $devname modem
UNREGISTER ^slamr0$ CFUNCTION GLOBAL unlink modem
+
+# Create /dev/modem for /dev/slusb0 (Change to suit your setup)
+LOOKUP ^slusb0$ MODLOAD ACTION slusb
+LOOKUP ^slusb0$ CFUNCTION GLOBAL mksymlink ttySL0 modem
+REGISTER ^slusb0$ CFUNCTION GLOBAL mksymlink $devname modem
+UNREGISTER ^slusb0$ CFUNCTION GLOBAL unlink modem
+
diff --git a/net-dialup/slmodem/files/slmodem-2.9.init b/net-dialup/slmodem/files/slmodem-2.9.init
index fa1236e90cdc..1dbf188eb38c 100644
--- a/net-dialup/slmodem/files/slmodem-2.9.init
+++ b/net-dialup/slmodem/files/slmodem-2.9.init
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/files/slmodem-2.9.init,v 1.2 2004/06/05 10:41:21 dragonheart Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/files/slmodem-2.9.init,v 1.3 2004/06/08 05:38:04 dragonheart Exp $
depend() {
need logger
@@ -18,7 +18,7 @@ checkconfig() {
start() {
ebegin "Starting slmodemd for ${DEV}"
modprobe ${MODULE}
- start-stop-daemon --start --background --make-pidfile \
+ start-stop-daemon --start --background --nicelevel=${NICE} --make-pidfile \
--pidfile /var/run/slmodemd.pid --startas /usr/sbin/slmodemd \
-- -country=${COUNTRY} -g=${GROUP} ${DEV}
eend $?
diff --git a/net-dialup/slmodem/slmodem-2.9.7-r2.ebuild b/net-dialup/slmodem/slmodem-2.9.7-r2.ebuild
new file mode 100644
index 000000000000..402bd5d48cc1
--- /dev/null
+++ b/net-dialup/slmodem/slmodem-2.9.7-r2.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/slmodem-2.9.7-r2.ebuild,v 1.1 2004/06/08 05:38:04 dragonheart Exp $
+
+IUSE="alsa"
+
+inherit eutils
+
+DESCRIPTION="Driver for Smart Link modem"
+HOMEPAGE="http://www.smlink.com/"
+MY_P="${P}"
+SRC_URI="ftp://ftp.smlink.com/linux/unsupported/${MY_P}.tar.gz"
+LICENSE="Smart-Link"
+SLOT="0"
+KEYWORDS="~x86"
+RDEPEND="virtual/glibc"
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ epatch ${FILESDIR}/${P}-makefile-fixup.patch
+}
+
+src_compile() {
+ #if has sandbox ${FEATURES} || has userpriv ${FEATURES} || has usersandbox ${FEATURES}; then
+ # ewarn "Users emerging this with a 2.6 kernel still need to disable"
+ # ewarn "sandbox, usersandbox, userpriv from FEATURES."
+ # einfo 'use: env FEATURES="-userpriv -usersandbox -sandbox" emerge slmodem'
+ # die "bad FEATURES - sandbox, usersandbox and/or userpriv "
+ #fi
+
+ unset ARCH
+ emake MODVERDIR=${T}/.tmp_versions drivers
+
+ cd modem;
+ if use alsa ; then
+ emake SUPPORT_ALSA=1 MODVERDIR=${T}/.tmp_versions \
+ || die 'Alsa support failed, try USE="-alsa"'
+ else
+ emake || die "Could not compile"
+ fi
+}
+
+src_install() {
+ unset ARCH
+ emake DESTDIR=${D} install || die
+
+ dodoc COPYING Changes README README.1st
+
+ # Install /etc/{devfs,modules,init,conf}.d/slmodem files
+ insinto /etc/conf.d/; newins ${FILESDIR}/${PN}-2.9.conf ${PN}
+ insopts -m0755; insinto /etc/init.d/; newins ${FILESDIR}/${PN}-2.9.init ${PN}
+
+ # Make some devices if we aren't using devfs
+ # If we are using devfs, restart it
+ if [ -e ${ROOT}/dev/.devfsd ] ; then
+ # devfs
+ insinto /etc/devfs.d/; newins ${FILESDIR}/${PN}-2.9.devfs ${PN}
+ insinto /etc/modules.d/; newins ${FILESDIR}/${PN}-2.9.modules ${PN}
+ elif [ -e ${ROOT}/dev/.udev ] ; then
+ # udev
+ dodir /etc/udev/rules.d/
+ echo 'KERNEL="slamr", NAME="slamr0", SYMLINK="modem"' > \
+ ${D}/etc/udev/rules.d/55-${PN}.rules
+ dodir /etc/udev/permissions.d
+ echo 'slamr*:root:dialout:0660' > \
+ ${D}/etc/udev/permissions.d/55-${PN}.permissions
+ else
+ # simple raw devs
+ dodir /dev
+ cd ${D}/dev
+ ebegin "Creating /dev/slamr* devices"
+ local C="0"
+ while [ "${C}" -lt "4" ]
+ do
+ if [ ! -c ${ROOT}/dev/slamr${C} ]
+ then
+ mknod ${D}/dev/slamr${C} c 212 ${C}
+ # doco suggests that the slmodemd creates these
+ # ln -s slamr${C} ttySL${C}
+ fi
+ if [ ! -c ${ROOT}/dev/slamr${C} ]
+ then
+ mknod ${D}/dev/slusb${C} c 213 ${C}
+ #TODO usb or slamr (AMR/CNR/PCI) version for symlinks???
+ # ln -s sl${C} ttySL${C}
+ fi
+
+ C="`expr $C + 1`"
+ done
+ eend 0
+ ln -s ttySL0 modem
+ fi
+
+}
+
+pkg_postinst() {
+ depmod -a
+ # Make some devices if we aren't using devfs
+ # If we are using devfs, restart it
+ if [ -e ${ROOT}/dev/.devfsd ]
+ then
+
+ ebegin "Restarting devfsd to reread devfs rules"
+ killall -HUP devfsd
+ eend 0
+ einfo "modules-update to complete configuration."
+
+ elif [ -e ${ROOT}/dev/.udev ]
+ then
+ #doesn't work - looking for fix.
+ ebegin "Restarting udevd to reread udev rules"
+ # killall -HUP udevd &>/dev/null
+ eend 0
+ fi
+
+ echo
+
+ einfo "You must edit /etc/conf.d/${PN} for your configuration"
+
+ if use alsa; then
+ echo
+ einfo "If you need to use snd-intel8x0m from the kernel"
+ einfo "compile it as a module and edit etc/module.d/alsa"
+ einfo 'to: "alias snd-card-(number) snd-intel8x0m"'
+ fi
+}