Subject: pkg/13251: Any rc.d script should never be named with '-' if using it from RCORDER
To: None <gnats-bugs@gnats.netbsd.org>
From: None <uebayasi@soum.co.jp>
List: netbsd-bugs
Date: 06/19/2001 19:20:07
>Number: 13251
>Category: pkg
>Synopsis: Any rc.d script should never be named with '-' if using it from RCORDER
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jun 19 19:18:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Masao Uebayashi
>Release: 1.5_BETA
>Organization:
SOUM Corporation, Tokyo, Japan.
>Environment:
NetBSD wakana.soum.co.jp 1.5.1_BETA NetBSD 1.5.1_BETA (SATOKO) #1: Fri May 11 18:35:05 JST 2001 root@wakana.soum.co.jp:/usr/src/sys/arch/i386/compile/SATOKO i386
>Description:
'rc.d/*' scripts (for daemon packages) may be used with the NetBSD's
rc.d / rcorder scheme. To activate a package with a rc.d/* script, the
script's name is put in a line 'foo=YES' in /etc/rc.conf. This means
that any 'rc.d/*' script' name should be valid with sh(1)'s variable
name.
Two packages include such rc.d/* files, AFAIK.
xdm-krb4-3.3.6.2
ja-FreeWnn-server-1.10
>How-To-Repeat:
% sh
$ foo-bar=YES
foo-bar=YES: not found
>Fix:
diff -Nru pkgsrc.orig/japanese/freewnn-server/pkg/PLIST pkgsrc/japanese/freewnn-
server/pkg/PLIST
--- pkgsrc.orig/japanese/freewnn-server/pkg/PLIST Wed Jun 20 10:20:39 2001
+++ pkgsrc/japanese/freewnn-server/pkg/PLIST Wed Jun 20 10:21:25 2001
@@ -65,6 +65,6 @@
sbin/wnnkill
sbin/wnnstat
sbin/wnntouch
-etc/rc.d/ja-freewnn
+etc/rc.d/ja_freewnn
@exec ln -s ${DICT_DIR}/wnn/ja_JP %D/share/wnn/ja_JP/dic
@unexec rm %D/share/wnn/ja_JP/dic
diff -Nru pkgsrc.orig/misc/freewnn-common/Makefile pkgsrc/misc/freewnn-common/Ma
kefile
--- pkgsrc.orig/misc/freewnn-common/Makefile Wed Jun 20 10:20:50 2001
+++ pkgsrc/misc/freewnn-common/Makefile Wed Jun 20 10:21:35 2001
@@ -72,8 +72,8 @@
post-build:
@${SED} -e 's|$${WNNOWNER}|${WNNOWNER}|g' \
${INSTALL_SRC} > ${INSTALL_FILE}
- @${SED} -e 's|@PREFIX@|${PREFIX}|g' ${FILESDIR}/ja-freewnn \
- > ${WRKDIR}/ja-freewnn
+ @${SED} -e 's|@PREFIX@|${PREFIX}|g' ${FILESDIR}/ja_freewnn \
+ > ${WRKDIR}/ja_freewnn
pre-install:
@${SETENV} ${SH} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL
@@ -81,7 +81,7 @@
post-install:
@${LN} -s ${DICT_DIR}/wnn/${WNN_LANG} \
${PREFIX}/share/wnn/${WNN_LANG}/dic
- @${INSTALL_SCRIPT} ${WRKDIR}/ja-freewnn ${PREFIX}/etc/rc.d/ja-freewnn
+ @${INSTALL_SCRIPT} ${WRKDIR}/ja_freewnn ${PREFIX}/etc/rc.d/ja_freewnn
.endif
.include "../../mk/bsd.pkg.mk"
diff -Nru pkgsrc.orig/misc/freewnn-common/files/ja-freewnn pkgsrc/misc/freewnn-c
ommon/files/ja-freewnn
--- pkgsrc.orig/misc/freewnn-common/files/ja-freewnn Wed Jun 20 10:20:50 2001
+++ pkgsrc/misc/freewnn-common/files/ja-freewnn Thu Jan 1 09:00:00 1970
@@ -1,34 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: ja-freewnn,v 1.2 2001/04/11 22:48:48 kei Exp $
-#
-# PROVIDE: freewnn
-# REQUIRE: DAEMON
-
-. /etc/rc.subr
-
-name="freewnn"
-command_start="@PREFIX@/sbin/jserver"
-command_stop="@PREFIX@/sbin/wnnkill"
-pidfile=""
-
-cmd=${1:-start}
-
-case ${cmd} in
-start)
- if [ -x ${command_start} ]; then
- echo "Starting ${name}."
- ${command_start} >/dev/null 2>&1
- fi
- ;;
-stop)
- if [ -x ${command_stop} ]; then
- echo "Stopping ${name}."
- ${command_stop} >/dev/null 2>&1
- fi
- ;;
-*)
- :
- ;;
-esac
-exit 0diff -Nru pkgsrc.orig/misc/freewnn-common/files/ja_freewnn pkgsrc/misc/freewnn-c
ommon/files/ja_freewnn
--- pkgsrc.orig/misc/freewnn-common/files/ja_freewnn Thu Jan 1 09:00:00 1970
+++ pkgsrc/misc/freewnn-common/files/ja_freewnn Wed Jun 20 10:21:35 2001
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# $NetBSD: ja-freewnn,v 1.2 2001/04/11 22:48:48 kei Exp $
+#
+# PROVIDE: freewnn
+# REQUIRE: DAEMON
+
+. /etc/rc.subr
+
+name="freewnn"
+command_start="@PREFIX@/sbin/jserver"
+command_stop="@PREFIX@/sbin/wnnkill"
+pidfile=""
+
+cmd=${1:-start}
+
+case ${cmd} in
+start)
+ if [ -x ${command_start} ]; then
+ echo "Starting ${name}."
+ ${command_start} >/dev/null 2>&1
+ fi
+ ;;
+stop)
+ if [ -x ${command_stop} ]; then
+ echo "Stopping ${name}."
+ ${command_stop} >/dev/null 2>&1
+ fi
+ ;;
+*)
+ :
+ ;;
+esac
+exit 0
diff -Nru pkgsrc.orig/security/xdm-krb4/Makefile pkgsrc/security/xdm-krb4/Makefi
le
--- pkgsrc.orig/security/xdm-krb4/Makefile Wed Jun 20 10:21:03 2001
+++ pkgsrc/security/xdm-krb4/Makefile Wed Jun 20 10:21:48 2001
@@ -22,13 +22,13 @@
pre-install:
@${SED} -e 's|@PREFIX@|${PREFIX}|g' \
- <${FILESDIR}/xdm-krb4.sh \
- >${WRKDIR}/xdm-krb4.sh
+ <${FILESDIR}/xdm_krb4.sh \
+ >${WRKDIR}/xdm_krb4.sh
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/etc/rc.d
${INSTALL_DATA} \
- ${WRKDIR}/xdm-krb4.sh \
- ${PREFIX}/etc/rc.d/xdm-krb4
+ ${WRKDIR}/xdm_krb4.sh \
+ ${PREFIX}/etc/rc.d/xdm_krb4
.include "../../mk/bsd.pkg.mk"
diff -Nru pkgsrc.orig/security/xdm-krb4/files/xdm-krb4.sh pkgsrc/security/xdm-kr
b4/files/xdm-krb4.sh
--- pkgsrc.orig/security/xdm-krb4/files/xdm-krb4.sh Wed Jun 20 10:21:03 2001
+++ pkgsrc/security/xdm-krb4/files/xdm-krb4.sh Thu Jan 1 09:00:00 1970
@@ -1,11 +0,0 @@
-#!/bin/sh
-# $NetBSD: xdm-krb4.sh,v 1.1.1.1 2000/06/08 16:39:46 wennmach Exp $
-if [ -f @PREFIX@/bin/xdm-krb4 ]; then
- echo -n " xdm-krb4"
- @PREFIX@/bin/xdm-krb4
-elif [-f @PREFIX@/bin/xdm ]; then
-# Fallback to xdm when xdm-krb4 is unavailable
- echo -n " xdm(fallback for xdm-krb4)"
- @PREFIX@/bin/xdm
-else echo " WARNING: no xdm found."
-fi
diff -Nru pkgsrc.orig/security/xdm-krb4/files/xdm_krb4.sh pkgsrc/security/xdm-kr
b4/files/xdm_krb4.sh
--- pkgsrc.orig/security/xdm-krb4/files/xdm_krb4.sh Thu Jan 1 09:00:00 1970
+++ pkgsrc/security/xdm-krb4/files/xdm_krb4.sh Wed Jun 20 10:21:48 2001
@@ -0,0 +1,11 @@
+#!/bin/sh
+# $NetBSD: xdm-krb4.sh,v 1.1.1.1 2000/06/08 16:39:46 wennmach Exp $
+if [ -f @PREFIX@/bin/xdm-krb4 ]; then
+ echo -n " xdm-krb4"
+ @PREFIX@/bin/xdm-krb4
+elif [-f @PREFIX@/bin/xdm ]; then
+# Fallback to xdm when xdm-krb4 is unavailable
+ echo -n " xdm(fallback for xdm-krb4)"
+ @PREFIX@/bin/xdm
+else echo " WARNING: no xdm found."
+fi
>Release-Note:
>Audit-Trail:
>Unformatted: