diff options
author | Stefan Briesenick <sbriesen@gentoo.org> | 2008-03-23 16:00:16 +0000 |
---|---|---|
committer | Stefan Briesenick <sbriesen@gentoo.org> | 2008-03-23 16:00:16 +0000 |
commit | 1c811f78fa8ce93259d69f604c3df4cc0ac96e78 (patch) | |
tree | 665b66aeef0b77f859c4fa7df3cb60c51d28e3fc /net-wireless/irda-utils | |
parent | New version for GNOME-2.22. Supports lzma packed man and info pages (USE=lzma... (diff) | |
download | gentoo-2-1c811f78fa8ce93259d69f604c3df4cc0ac96e78.tar.gz gentoo-2-1c811f78fa8ce93259d69f604c3df4cc0ac96e78.tar.bz2 gentoo-2-1c811f78fa8ce93259d69f604c3df4cc0ac96e78.zip |
added remove_module in init-script.
(Portage version: 2.1.4.4)
Diffstat (limited to 'net-wireless/irda-utils')
-rw-r--r-- | net-wireless/irda-utils/ChangeLog | 5 | ||||
-rw-r--r-- | net-wireless/irda-utils/files/irda.initd | 19 |
2 files changed, 21 insertions, 3 deletions
diff --git a/net-wireless/irda-utils/ChangeLog b/net-wireless/irda-utils/ChangeLog index 49c02ca498ff..636817603b6e 100644 --- a/net-wireless/irda-utils/ChangeLog +++ b/net-wireless/irda-utils/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for net-wireless/irda-utils # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/irda-utils/ChangeLog,v 1.25 2008/03/22 18:34:10 sbriesen Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-wireless/irda-utils/ChangeLog,v 1.26 2008/03/23 16:00:15 sbriesen Exp $ + + 23 Mar 2008; Stefan Briesenick <sbriesen@gentoo.org> files/irda.initd: + added remove_module in init-script. *irda-utils-0.9.18-r2 (22 Mar 2008) diff --git a/net-wireless/irda-utils/files/irda.initd b/net-wireless/irda-utils/files/irda.initd index 8cbf0664c998..28d9bedca8c0 100644 --- a/net-wireless/irda-utils/files/irda.initd +++ b/net-wireless/irda-utils/files/irda.initd @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License, v2 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/irda-utils/files/irda.initd,v 1.1 2008/03/22 18:34:11 sbriesen Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-wireless/irda-utils/files/irda.initd,v 1.2 2008/03/23 16:00:16 sbriesen Exp $ # Hint: We don't use start-stop-daemon, because pidfile is the same # for every irattach instance. So it isn't reliable if we have more @@ -46,6 +46,14 @@ checkconfig() { esac } +remove_module() { + local CNT=0 + while ! /sbin/modprobe -sqr ${1}; do + [ $((CNT++)) -eq 10 ] && break + sleep 0.25 + done +} + start() { checkconfig ebegin "Starting IrDA" @@ -67,5 +75,12 @@ start() { stop() { ebegin "Shutting down IrDA" /usr/bin/pkill -f "^/usr/sbin/irattach ${DEVICE} ?" - eend ${?} || return 0 # never fail + eend ${?} + + # Try to remove IrDA driver + case "${DEVICE}" in + /dev/ttyS*) remove_module irtty-sir;; + irda[0-9]*) remove_module ${DEVICE};; + esac + return 0 # never fail } |