Mailinglist Archive: opensuse (3637 mails)

< Previous Next >
Re: multiple startproc
  • From: "S.Toms" <smotrs@xxxxxxxxxxxxxx>
  • Date: Wed, 16 May 2001 19:41:32 -0700 (PDT)
  • Message-id: <Pine.LNX.4.21.0105161907190.898-100000@xxxxxxxxxxxxxxxxxxx>
On Thu, 17 May 2001, Tor Sigurdsson wrote:

ts> Þann fimmtudagur 17 maí 2001 01:24 skrifaðir þú:
ts> > I'm creating a suseified rpm/srpm complete with initscripts and
ts> > rc.config entries for portsentry, but have run into a problem with the
ts> > initscript itself. I can't find and way to launch 2 startprocs on it, for
ts> > example
ts> > startproc $PORTSENTRY -stcp
ts> > startproc $PORTSENTRY -sudp
ts> >
ts> > because of the way startproc looks for the full command name to determine
ts> > if it's already running. Anyone know a workaround or alternative which
ts> > enables me to still use startproc.
ts>
ts> One workaround which seems obvious:
ts>
ts> cd /usr/bin
ts> ln sentry tsentry
ts> ln sentry usentry
ts>
ts>
ts> startproc $TPORTSENTRY -stcp
ts> startproc $UPORTSENTRY -sudp
ts>
ts> or better yet, in the scripts ( if the design allows it )
ts>
ts> TPORTSENTRY="/usr/bin/sentry -stcp"
ts> UPORTSENTRY="/usr/bin/sentry -sudp"
ts>
ts> startproc $TPORTSENTRY
ts> startproc $UPORTSENTRY
ts>

I actually thought of the second myself, but I wanted a setting within
rc.config for setting the mode as (basic/stealth/advanced) and have it
start portsentry with the appropriate setting based on the value within
rc.config, the following is what I was working on

start)
echo -n "Starting service PortSentry "
if test "$PORTSENTRY_MODE" = basic ; then
startproc $PORTSENTRY -tcp
startproc $PORTSENTRY -udp
elif test "$PORTSENTRY_MODE" = stealth ; then
startproc $PORTSENTRY -stcp
startproc $PORTSENTRY -sudp
elif test "$PORTSENTRY_MODE" = advanced ; then
startproc $PORTSENTRY -atcp
startproc $PORTSENTRY -audp
fi


ts> -tosi ts>

--
S.Toms - smotrs@xxxxxxxxxxxxxx - www.mindspring.com/~smotrs
SuSE Linux v7.0+ - Kernel 2.2.18

God is the tangential point between zero and infinity.
-- Alfred Jarry


< Previous Next >
References