Subject: pkg/21353: pkgsrc ssh rc.d script needs fix
To: None <email@example.com>
From: None <firstname.lastname@example.org>
Date: 04/28/2003 21:09:08
>Synopsis: $0 may be "rc" in keygen in pkgsrc ssh rc.d script
>Arrival-Date: Tue Apr 29 04:10:00 UTC 2003
>Release: NetBSD 1.6
System: NetBSD rainier.reedmedia.net 1.6 NetBSD 1.6 (JCR-20020927) #3: Sat Sep 28 13:40:20 PDT 2002 email@example.com:/usr/src/sys/arch/i386/compile/JCR-20020927 i386
On one of my Linux systems using rcorder and rc.subr, the rc scripts
were ran again and again without stop.
Researching this I found it was doing "rc keygen" so /etc/rc
was starting again each time.
This is because security/openssh/files/sshd.sh
has "$0 keygen" and $0 was not set to /etc/rc.d/sshd.
I see that the real rc.d/sshd script Revision 1.16 gets rid of that
"Don't assume that $0 is this script."
The fix would be to check for rc.subr again and use
"run_rc_command keygen" instead.
Also, the check for /etc/rc.d directory can be removed
since it checks for a file in the directory after anyways.