Bug#663351: lsb-base: pidofproc() declares unused local variable and use undeclared variable
Package: lsb-base
Version: 3.2+Debian29
Severity: minor
Dear Maintainer,
I find there is a minor issue in pidofproc() function.
/lib/lsb/init-functions:
> pidofproc () {
> local pidfile line status specified pid
~~~~ I guess "line" should be "base".
> pidfile=
> specified=
>
> OPTIND=1
> while getopts p: opt ; do
> case "$opt" in
> p) pidfile="$OPTARG"
> specified="specified"
> ;;
> esac
> done
> shift $(($OPTIND - 1))
>
> base=${1##*/}
~~~~~~~~~~~~~ this is will change a global variable "$base".
> if [ ! "$specified" ]; then
> pidfile="/var/run/$base.pid"
> fi
Regards,
Yubao Liu
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 3.1.0-1-686-pae (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=zh_CN.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages lsb-base depends on:
ii ncurses-bin 5.9-4
ii sed 4.2.1-9
lsb-base recommends no packages.
lsb-base suggests no packages.
-- no debconf information
Reply to: