Again: bugs in contrib/solaris/opensshd.in and buildpkg.sh

mouring at etoh.eviladmin.org mouring at etoh.eviladmin.org
Fri Oct 19 05:14:47 EST 2001


Sorry to not respond right away.. I had my whole network offline since
Tuesday morning.  Just now starting to get things back together.

On Wed, 17 Oct 2001 j.petersen at msh.de wrote:

> 	(Shame on me: wrong filename in last posting, now here are correct
> diffs)
> in contrib/solaris/ (openssh-SNAP-20011017.tar.gz)
>
> 1) buildpkg.sh makes wrong link for /etc/init.d/opensshd
> 2) /etc/init.d/opensshd has not-working killproc
> 	here my version tested on Solaris 2.4 and 8
> 		 (no pgrep with solaris 2.4, XARGS was undefined, simpler
> syntax)
> Jörg
>
> --- contrib/solaris/buildpkg.sh Fri Oct 12 22:30:53 2001
> +++ contrib/solaris/buildpkg.sh Tue Oct 16 13:53:07 2001
> @@ -40,9 +40,9 @@
>         ../opensshd.in  > $FAKE_ROOT/etc/init.d/opensshd
>  chmod 711 $FAKE_ROOT/etc/init.d/opensshd
>
> -ln -s $FAKE_ROOT/etc/init.d/opensshd $FAKE_ROOT/etc/rcS.d/K30opensshd
> -ln -s $FAKE_ROOT/etc/init.d/opensshd $FAKE_ROOT/etc/rc1.d/K30opensshd
> -ln -s $FAKE_ROOT/etc/init.d/opensshd $FAKE_ROOT/etc/rc2.d/S98opensshd
> +ln -s /etc/init.d/opensshd $FAKE_ROOT/etc/rcS.d/K30opensshd
> +ln -s /etc/init.d/opensshd $FAKE_ROOT/etc/rc1.d/K30opensshd
> +ln -s /etc/init.d/opensshd $FAKE_ROOT/etc/rc2.d/S98opensshd
>

Hmm.. Eep.. Your right.  I forgot to verify the init stuff on my test box.

>
> --- contrib/solaris/opensshd.in Fri Oct 12 23:52:39 2001
> +++ contrib/solaris/opensshd.in Wed Oct 17 10:49:00 2001
> @@ -8,6 +8,7 @@
>  EGREP=/usr/bin/egrep
>  KILL=/usr/bin/kill
>  PS=/usr/bin/ps
> +XARGS=/usr/bin/xargs
>
>  prefix=%%openSSHDir%%
>  etcdir=%%configDir%%
> @@ -21,7 +22,7 @@
>  killproc() {
>     _procname=$1
>     _signal=$2
> -   ${PGREP} ${_procname} | ${HEAD} -1 | ${XARGS} -t -I {} ${KILL}
> -${_signal} {}
> +   ${PS} -u root|${AWK} '/'"$_procname"'$/ {print $1}'| ${XARGS} ${KILL}
> -${_signal}
>  }
>
Interesting.. This must have been around for a long time because this
was part of the pre-existing start scripts.  Unless I screwed up in
editing.

Damien, Can you commit the above patch.  It is the correct thing to do.

Thanks.

- Ben




More information about the openssh-unix-dev mailing list