#1 rc script (irda.rc) has bugs...

closed
nobody
None
5
2003-01-20
2000-12-04
codingOgre
No

The irda.rc script has three bugs in it which one of them unfortunately cost me a hour* of time tonight. :^( For fixes see patch provided.

1.) The irda.rc file doesn't have a "chkconfig" line in it so building a package (with the spec file included in the tarball) fails.

*2.) The irda.rc file doesn't check for the DONGLE variable correctly, when null, causing ARGS to get a "-d" with no value.

3.) At least on my linux distro, the /var/run/irattach.pid file should be removed after irattach has been killed.

###### BEGIN PATCH cut below ######
:*** irda.rc Wed Nov 22 14:54:35 2000
--- irda Sun Dec 3 23:09:06 2000
***************
*** 3,9 ****
# irda This shell script takes care of starting and stopping
# IrDA support
#
! # description:
#

# Source function library.
--- 3,10 ----
# irda This shell script takes care of starting and stopping
# IrDA support
#
! # chkconfig: 345 35 70
! # description: IrDA support for linux.
#

# Source function library.
***************
*** 18,28 ****
[ -f /usr/sbin/irattach ] || exit 0

ARGS=
! if $DONGLE ; then
ARGS="$ARGS -d $DONGLE"
fi
if [ "$DISCOVERY" = "yes" ];then
! ARGS="$ARGS -s"
fi

# See how we were called.
--- 19,29 ----
[ -f /usr/sbin/irattach ] || exit 0

ARGS=
! if [ ! -z $DONGLE ];then
ARGS="$ARGS -d $DONGLE"
fi
if [ "$DISCOVERY" = "yes" ];then
! ARGS="$ARGS -s 1"
fi

# See how we were called.
***************
*** 39,44 ****
--- 40,46 ----
echo -n "Shutting down IrDA: "
killproc irattach
rm -f /var/lock/subsys/irda
+ rm -f /var/run/irattach.pid
echo
;;
status)

Discussion

  • codingOgre

    codingOgre - 2000-12-04

    I guess it would have helped if I gave the version :^)

    irda-utils-0.9.13.tar.gz

     
  • codingOgre

    codingOgre - 2003-01-20
    • status: open --> closed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks