diff options
author | Daniel Black <dragonheart@gentoo.org> | 2004-08-13 12:59:34 +0000 |
---|---|---|
committer | Daniel Black <dragonheart@gentoo.org> | 2004-08-13 12:59:34 +0000 |
commit | dfa1c49b146d4150a03e4c355247c6cea0272652 (patch) | |
tree | de53034afaf53a89b540b6925daaecf8ffb262df /net-dialup | |
parent | Actually install the man pages not the output of docbook2man (diff) | |
download | historical-dfa1c49b146d4150a03e4c355247c6cea0272652.tar.gz historical-dfa1c49b146d4150a03e4c355247c6cea0272652.tar.bz2 historical-dfa1c49b146d4150a03e4c355247c6cea0272652.zip |
improves init scripts and provides fixes listed in bug #59244
Diffstat (limited to 'net-dialup')
-rw-r--r-- | net-dialup/slmodem/ChangeLog | 11 | ||||
-rw-r--r-- | net-dialup/slmodem/Manifest | 16 | ||||
-rw-r--r-- | net-dialup/slmodem/files/digest-slmodem-2.9.9-r2 (renamed from net-dialup/slmodem/files/digest-slmodem-2.9.9) | 0 | ||||
-rw-r--r-- | net-dialup/slmodem/files/slmodem-2.9.conf | 5 | ||||
-rw-r--r-- | net-dialup/slmodem/files/slmodem-2.9.init | 37 | ||||
-rw-r--r-- | net-dialup/slmodem/slmodem-2.9.9-r2.ebuild (renamed from net-dialup/slmodem/slmodem-2.9.9.ebuild) | 39 |
6 files changed, 70 insertions, 38 deletions
diff --git a/net-dialup/slmodem/ChangeLog b/net-dialup/slmodem/ChangeLog index ad21cd0e474d..92ed4d24882a 100644 --- a/net-dialup/slmodem/ChangeLog +++ b/net-dialup/slmodem/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for net-dialup/slmodem # Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/ChangeLog,v 1.19 2004/08/02 03:21:13 dragonheart Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/ChangeLog,v 1.20 2004/08/13 12:59:34 dragonheart Exp $ + +*slmodem-2.9.9-r2 (13 Aug 2004) + + 13 Aug 2004; Daniel Black <dragonheart@gentoo.org> files/slmodem-2.9.conf, + files/slmodem-2.9.init, +slmodem-2.9.9-r2.ebuild, -slmodem-2.9.9.ebuild: + revision bump - improves init scripts and provides fixes listed in bug #59244. + Many thank to Stefan Schweizer <sschweizer@gmail.com> who summitted the init + script and fixes. Thanks also to Christian Roessner <info@roessner-net.com> + for sumbitting the bug 02 Aug 2004; Daniel Black <dragonheart@gentoo.org> metadata.xml: metadata updated. Dual maintence with spyderous diff --git a/net-dialup/slmodem/Manifest b/net-dialup/slmodem/Manifest index dd4deb48351a..3382065f9b06 100644 --- a/net-dialup/slmodem/Manifest +++ b/net-dialup/slmodem/Manifest @@ -1,26 +1,26 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -MD5 0909ebc3297956cf72128ae8448785e6 ChangeLog 4237 +MD5 2c971f4d293ec25554c233fe3bc9c182 ChangeLog 4686 MD5 7faf41f1aa59e6b8a1673f106ffac1e1 metadata.xml 523 MD5 39a6e7fcda2ee23817e894ed009e7ba7 slmodem-2.7.14.ebuild 1511 -MD5 8b5f426b0aac645b7390b130f36cb13d slmodem-2.9.9.ebuild 3720 +MD5 946e76d345bd4437fb7c4e89d9a524aa slmodem-2.9.9-r2.ebuild 4316 MD5 da09cacea9ef6ab797c9872e18fecada slmodem-2.9.9-r1.ebuild 3792 -MD5 39228b228b280ebc05c9c759374535ca files/slmodem-2.9.conf 806 +MD5 43dee264075d4262df5388ce1f055929 files/slmodem-2.9.conf 707 MD5 04150d1eddd9774a7d1a70df93600e3c files/digest-slmodem-2.7.14 64 MD5 5565553c8ddd949c38070e59ce64b90c files/slmodem-2.7.14-makefile-fixup.patch 1626 MD5 24079d6e20ac945048a1c212f06772ce files/slmodem-2.7.devfs 431 MD5 117ea746ee99218e673afc397038120d files/slmodem-2.7.modules 669 MD5 8834a62c67909059cef10887bfbcc853 files/slmodem-2.9.modules 494 MD5 9ae4e594075f43c76a7067fa8004095a files/digest-slmodem-2.9.9-r1 65 +MD5 9ae4e594075f43c76a7067fa8004095a files/digest-slmodem-2.9.9-r2 65 MD5 c80ecf5c3d5605220e4b0055850260a5 files/slmodem-2.9.devfs 786 -MD5 c3a74f6572c1146f3716c3dcfc082973 files/slmodem-2.9.init 2436 -MD5 9ae4e594075f43c76a7067fa8004095a files/digest-slmodem-2.9.9 65 +MD5 5c0b5dfce1ad5bd98a79d8307faf584d files/slmodem-2.9.init 2659 MD5 25bc07758bde2e7a6aeb796e840d4ff2 files/slmodem-2.9.9-makefile-fixup.patch 6327 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) -iD8DBQFBDawqmdTrptrqvGERAkhIAJsEZHNspWksSshgPZmHOCMBeHqKFwCfWY8W -rzLGibH9UI/te3UU2CbJ3v8= -=RFj1 +iD8DBQFBHLGNmdTrptrqvGERAkkpAKCLrgdk/1T0j1+DRWSrf/zssskJOQCfapjK +CDDhf95Nfjtk/MDIFv5YM08= +=iJwj -----END PGP SIGNATURE----- diff --git a/net-dialup/slmodem/files/digest-slmodem-2.9.9 b/net-dialup/slmodem/files/digest-slmodem-2.9.9-r2 index 099d04f8b31f..099d04f8b31f 100644 --- a/net-dialup/slmodem/files/digest-slmodem-2.9.9 +++ b/net-dialup/slmodem/files/digest-slmodem-2.9.9-r2 diff --git a/net-dialup/slmodem/files/slmodem-2.9.conf b/net-dialup/slmodem/files/slmodem-2.9.conf index 745ab4ef0e16..221a47f1bb9b 100644 --- a/net-dialup/slmodem/files/slmodem-2.9.conf +++ b/net-dialup/slmodem/files/slmodem-2.9.conf @@ -25,11 +25,6 @@ NICE=-6 # PCICONF MODULE=slamr # or # USBCONF MODULE=slusb -# -# Non ALSA- use one of the following: -# PCICONF MDEV=/dev/slamr0 -# or -# USBCONF MDEV=/dev/slusb0 # this file must be kept in sync with: # /etc/devfs.d/slmodem (devfs) diff --git a/net-dialup/slmodem/files/slmodem-2.9.init b/net-dialup/slmodem/files/slmodem-2.9.init index cf73c450bbc3..e801ac9f94e5 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 Foundation # 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.8 2004/08/02 02:51:09 dragonheart Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/files/slmodem-2.9.init,v 1.9 2004/08/13 12:59:34 dragonheart Exp $ depend() { need logger @@ -33,27 +33,31 @@ function loadsmodule { if [ "$?" -gt 0 ] then eerror "Missing ${MODULE}. Please set up /etc/conf.d/slmodem" - eend 1; + return 1; fi + if [ -z "${MDEV}" ]; then MDEV="/dev/${MODULE}0"; fi + #sleep as per http://bugs.gentoo.org/show_bug.cgi?id=47947#c59 ebegin "Waiting for ${MODULE} modem driver initialisation" local COUNT=0 - echo -e "${NORMAL} " - echo -ne "${NORMAL}" + if [ "$RC_NOCOLOR" != "yes" ]; then + echo -e "\e[A\e[49G " + echo -ne "\e[A\e[49G" + fi while [ ! -c ${MDEV} -a ${COUNT} -lt 5 ]; do sleep 0.5 - echo -ne "." + echo -n "." COUNT=`expr ${COUNT} + 1` done - - echo -ne "\n" - + + if [ "$RC_NOCOLOR" != "yes" ]; then echo; fi + if [ ! -c ${MDEV} ]; then eerror "Module - ${MODULE} failed to initialise device ${MDEV}" - eend 1 + return 1 else eend 0 fi @@ -88,20 +92,23 @@ start() { stop() { ebegin "Shutting down slmodemd" start-stop-daemon --stop --quiet --pidfile /var/run/slmodemd.pid && rm /var/run/slmodemd.pid - eend ${?} + result=${?} + unlink ${LN_DEV} 2> /dev/null + eend ${result} if [ ! "${MODULE}" == "alsa" ]; then ebegin "Waiting for ${MODULE} modem driver unload" - echo -e "${NORMAL} " - echo -ne "${NORMAL}" + if [ "$RC_NOCOLOR" != "yes" ]; then + echo -e "\e[A\e[43G " + echo -ne "\e[A\e[43G" + fi for ((a=0,result=1; result==1 && a <= 5 ; a++)) do sleep 0.25 - echo -ne "." + echo -n "." modprobe -r slamr 2> /dev/null && result=0 done - echo -ne "\n" + if [ "$RC_NOCOLOR" != "yes" ]; then echo; fi eend ${result} fi - unlink ${LN_DEV} 2> /dev/null } diff --git a/net-dialup/slmodem/slmodem-2.9.9.ebuild b/net-dialup/slmodem/slmodem-2.9.9-r2.ebuild index ed01e8a6ccc3..95a2c1f1593e 100644 --- a/net-dialup/slmodem/slmodem-2.9.9.ebuild +++ b/net-dialup/slmodem/slmodem-2.9.9-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/slmodem-2.9.9.ebuild,v 1.3 2004/08/01 09:40:12 spyderous Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/slmodem-2.9.9-r2.ebuild,v 1.1 2004/08/13 12:59:34 dragonheart Exp $ inherit kmod eutils @@ -20,6 +20,11 @@ RDEPEND="virtual/libc alsa? ( media-libs/alsa-lib )" src_unpack() { + + ewarn "This ebuild is sensive to use flags (usb, alsa)." + ewarn "Please select approprately based on your hardware." + ewarn "use -usb if you have a PCI modem" + # Unpack and set some variables kmod_src_unpack @@ -72,9 +77,11 @@ src_install() { unset ARCH emake DESTDIR=${D} \ KERNEL_VER=${KV_VERSION_FULL} \ - install-drivers \ + install-drivers install-test\ || die "driver install failed" + mv ${D}/usr/sbin/modem_test ${D}/usr/sbin/slmodem_test + dosbin modem/slmodemd dodir /var/lib/slmodem fowners root:dialout /var/lib/slmodem @@ -87,16 +94,17 @@ src_install() { if use alsa then - sed -i -e "s/ALSA=.*/ALSA=yes/" -e "s:# DEV=/dev/ttySL0:DEV=/dev/ttySL0:" ${D}//etc/conf.d/slmodem + sed -i -e "s/# ALSACONF //g" ${D}/etc/conf.d/slmodem else - sed -i -e "s/ALSA=.*/ALSA=yes/" ${D}//etc/conf.d/slmodem + sed -i -e "s/# NONALSACONF //g" ${D}/etc/conf.d/slmodem if use usb then - sed -i -e "s:# DEV=/dev/slusb0:DEV=/dev/slusb0:" ${D}//etc/conf.d/slmodem + sed -i -e "s/# USBCONF //g" ${D}/etc/conf.d/slmodem else - sed -i -e "s:# DEV=/dev/slamr0:DEV=/dev/slamr0:" ${D}//etc/conf.d/slmodem + sed -i -e "s/# PCICONF //g" ${D}/etc/conf.d/slmodem fi fi + sed -i -e "s/ALSACONF//g" -e "s/PCICONF//g" -e "s/USBCONF//g" ${D}/etc/conf.d/slmodem # Make some devices if we aren't using devfs @@ -107,9 +115,11 @@ src_install() { insinto /etc/modules.d/; newins ${FILESDIR}/${PN}-2.9.modules ${PN} elif [ -e ${ROOT}/dev/.udev ] ; then # udev - # FIX Symlink + # check Symlink dodir /etc/udev/rules.d/ - echo 'KERNEL="slamr", NAME="slamr0", SYMLINK="modem"' > \ + echo 'KERNEL="slamr", NAME="slamr0" > \ + ${D}/etc/udev/rules.d/55-${PN}.rules + echo 'KERNEL="slusb", NAME="slusb0" >> \ ${D}/etc/udev/rules.d/55-${PN}.rules dodir /etc/udev/permissions.d echo 'slamr*:root:dialout:0660' > \ @@ -118,12 +128,21 @@ src_install() { make -C drivers DESTDIR=${D} KERNELRELEASE=1 KERNEL_VER=${KV_VERSION_FULL} install-devices fi + dodir /etc/hotplug + + #if [ -r ${ROOT}/etc/hotplug/blacklist ] + #then + # cp ${ROOT}/etc/hotplug/blacklist ${D}/etc/hotplug/ + #fi + + dodir /etc/hotplug/blacklist.d + echo -e "slusb\nslamr" >> ${D}/etc/hotplug/blacklist.d/55-${PN} } pkg_postinst() { kmod_pkg_postinst - #depmod -a + depmod -a # Make some devices if we aren't using devfs # If we are using devfs, restart it @@ -145,6 +164,8 @@ pkg_postinst() { einfo "You must edit /etc/conf.d/${PN} for your configuration" + ewarn "To avoid problems add slusb/slamr to /etc/hotplug/blacklist" + einfo "To add slmodem to your startup - type : rc-update add slmodem default" if use alsa; |