Subject: pkg/12921: {s,n}nmd.sh scripts use wrong variable
To: None <gnats-bugs@gnats.netbsd.org>
From: None <paul@whooppee.com>
List: netbsd-bugs
Date: 05/12/2001 17:30:41
>Number: 12921
>Category: pkg
>Synopsis: {s,n}nmd.sh scripts use wrong variable
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat May 12 17:30:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Paul Goyette
>Release: Approximately 01 April 2001
>Organization:
----------------------------------------------------------------------
| Paul Goyette | PGP DSS Key fingerprint: | E-mail addresses: |
| Network Engineer | BCD7 5301 9513 58A6 0DBC | paul@whooppee.com |
| & World Cruiser | 91EB ADB1 A280 3B79 9221 | pgoyette@juniper.net |
----------------------------------------------------------------------
>Environment:
System: NetBSD pc1.whooppee.com 1.5T NetBSD 1.5T (PC1) #16: Sat Apr 7 15:55:47 PDT 2001 paul@pc3.whooppee.com:/usr/src/sys/arch/i386/compile/PC1 i386
Architecture: i386
Machine: i386
>Description:
Scripts provided (nmbd.sh and smbd.sh) erroneously use the
variable $command_args, and set this variable to "-D". They
should use variable $nmbd_flags and $smbd_flags to be consistent
with the rest of system startup scripts.
Using $command_args has the side effect of passing that value to
ALL subsequent startup scripts. Some, like inetd and cron, do
not know what to do with -D and fail to start!
>How-To-Repeat:
Have startup scripts which rcorder decides belongs _after_ the
samba scripts. Make them barf if passed -D flag.
>Fix:
Apply the following two patches:
Index: nmbd.sh
===================================================================
RCS file: /cvsroot/pkgsrc/net/samba/files/nmbd.sh,v
retrieving revision 1.1
diff -c -r1.1 nmbd.sh
*** nmbd.sh 2001/02/04 15:29:58 1.1
--- nmbd.sh 2001/05/13 00:30:14
***************
*** 7,18 ****
name="nmbd"
command="@PREFIX@/sbin/${name}"
! command_args="-D"
if [ ! -d /etc/rc.d ]
then
@ECHO@ -n ' ${name}'
! exec ${command} ${command_args}
fi
. /etc/rc.subr
--- 7,18 ----
name="nmbd"
command="@PREFIX@/sbin/${name}"
! nmbd_flags="-D"
if [ ! -d /etc/rc.d ]
then
@ECHO@ -n ' ${name}'
! exec ${command} ${nmbd_flags} ${command_args}
fi
. /etc/rc.subr
Index: smbd.sh
===================================================================
RCS file: /cvsroot/pkgsrc/net/samba/files/smbd.sh,v
retrieving revision 1.1
diff -c -r1.1 smbd.sh
*** smbd.sh 2001/02/04 15:29:59 1.1
--- smbd.sh 2001/05/13 00:30:14
***************
*** 7,18 ****
name="smbd"
command="@PREFIX@/sbin/${name}"
! command_args="-D"
if [ ! -d /etc/rc.d ]
then
@ECHO@ -n ' ${name}'
! exec ${command} ${command_args}
fi
. /etc/rc.subr
--- 7,18 ----
name="smbd"
command="@PREFIX@/sbin/${name}"
! smbd_flags="-D"
if [ ! -d /etc/rc.d ]
then
@ECHO@ -n ' ${name}'
! exec ${command} ${smbd_flags} ${command_args}
fi
. /etc/rc.subr
>Release-Note:
>Audit-Trail:
>Unformatted: