j.petersen at msh.de
2001-Oct-17 09:45 UTC
Again: bugs in contrib/solaris/opensshd.in and buildpkg.sh
(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 --- 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} } ___________________________________________ Dr. J?rg Petersen <j.petersen at msh.de> Medien System Haus Tel. 0711/72007-424 Plieninger Str. 150, D-70567 Stuttgart
mouring at etoh.eviladmin.org
2001-Oct-18 19:14 UTC
Again: bugs in contrib/solaris/opensshd.in and buildpkg.sh
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
Michael Tokarev
2001-Oct-19 02:30 UTC
Again: bugs in contrib/solaris/opensshd.in and buildpkg.sh
mouring at etoh.eviladmin.org wrote:> > On Wed, 17 Oct 2001 j.petersen at msh.de wrote:[]> > --- contrib/solaris/buildpkg.sh Fri Oct 12 22:30:53 2001 > > +++ contrib/solaris/buildpkg.sh Tue Oct 16 13:53:07 2001[]> > -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/S98opensshdThat better should be: ln -s ../init.d/opensshd $FAKE_ROOT/etc/rcS.d/K30opensshd ^^ this is common practice and Sun people follows it carefully: no absolute symlinks, only relative ones whenever possible (and the startup scripts are *good* example where relative symlinks should be used). That is to allow mounting root filesystem on another machine and have all links to point to the right place. Well, a minor issue.> Hmm.. Eep.. Your right. I forgot to verify the init stuff on my test box.[]> Damien, Can you commit the above patch. It is the correct thing to do.Regards, Michael.
mouring at etoh.eviladmin.org
2001-Oct-19 20:39 UTC
Again: bugs in contrib/solaris/opensshd.in and buildpkg.sh
I just fixed this and missing piddir up in the latest CVS tree (just commited it now). I also put in the README file that did not take the first time around. I was unable to test the changes, but I'll try it on Monday if I have time.. - Ben 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 > > > --- 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} > } > > ___________________________________________ > Dr. J?rg Petersen <j.petersen at msh.de> > Medien System Haus Tel. 0711/72007-424 > Plieninger Str. 150, D-70567 Stuttgart >