Subject: misc/9605: /etc/rc.d script has bugs
To: None <gnats-bugs@gnats.netbsd.org>
From: None <seirios@matrix.iri.co.jp>
List: netbsd-bugs
Date: 03/12/2000 09:06:37
>Number: 9605
>Category: misc
>Synopsis: /etc/rc.d script is bugged.
>Confidential: no
>Severity: non-critical
>Priority: high
>Responsible: misc-bug-people (Misc Bug People)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Mar 12 09:06:00 2000
>Last-Modified:
>Originator: HEO SeonMeyong
>Organization:
Japan NetBSD Users' Group
>Release: 2000/3/11
>Environment:
NetBSD i386
System: NetBSD laysner.matrix.iri.co.jp 1.4U NetBSD 1.4U (L) #6: Sun Mar 12 23:37:57 JST 2000 root@laysner.matrix.iri.co.jp:/usr/src/sys/arch/i386/compile/L i386
>Description:
/etc/rc.d/sshd rc.conf has no sshd environment.
some person (like me) put ssh configuration file to /usr/pkg/etc.
so sshd script can set ssh_conf_dir.
(I think it will merged from mk.conf)
/etc/rc.d/ipfilter checkyesno is no need to use test.
/etc/rc.d/wscons rc.wscons need to run with sh
>How-To-Repeat:
enable /etc/rc.d scripts
>Fix:
attach following patch to files.
----- ipfilter -----
--- /usr/src/etc/rc.d/ipfilter Fri Mar 10 20:53:25 2000
+++ ipfilter Mon Mar 13 01:13:58 2000
@@ -18,7 +18,7 @@
ipfilter_start()
{
- if [ ! checkyesno ipfilter ]; then
+ if ! checkyesno ipfilter ; then
return 0
fi
----- sshd -----
--- /usr/src/etc/rc.d/sshd Fri Mar 10 20:53:24 2000
+++ sshd Mon Mar 13 01:34:44 2000
@@ -12,6 +12,8 @@
name="sshd"
command="/usr/pkg/sbin/${name}"
pidfile="/var/run/${name}.pid"
-required_files="/etc/${name}_config /etc/ssh_host_key"
+ssh_conf_dir=/etc
+required_files="${ssh_conf_dir}/${name}_config ${ssh_conf_dir}/ssh_host_key"
-run_rc_command "$1" "reload"
+#run_rc_command "$1" "reload"
+run_rc_command "$1"
----- wscons -----
--- /usr/src/etc/rc.d/wscons Fri Mar 10 20:53:23 2000
+++ wscons Mon Mar 13 01:43:40 2000
@@ -16,7 +16,7 @@
do_wscons()
{
if [ -f /etc/rc.wscons ]; then
- set $1 ; . /etc/rc.wscons
+ set $1 ; /bin/sh /etc/rc.wscons $wscons_flags
fi
}
----- rc.conf -----
--- rc.conf 2000/03/12 15:39:24 1.8
+++ rc.conf 2000/03/12 16:24:56
@@ -87,6 +87,7 @@
xntpd=NO xntpd_flags="-p /var/run/xntpd.pid -f /var/db/ntp.drift"
sendmail=NO sendmail_flags="-bd -q30m"
lpd=NO lpd_flags="" # -s "secure" unix domain only
+sshd=YES # pkg sshd start.
# Routing daemons
routed=NO routed_flags="-q"
>Audit-Trail:
>Unformatted: