Article View: de.comp.os.unix.linux.misc
Article #182Re: Runlevel: Killfiles stoppen nicht unter RedHat
From: August Hörandl
Date: Wed, 20 Feb 2002 21:26
Date: Wed, 20 Feb 2002 21:26
59 lines
3134 bytes
3134 bytes
Daniel Tiefnig <dantie123@yahoo.com> writes:
> Tino Svatek wrote...:
>
> > Habe ein RedHat 7.0 mit Kernel 2.2.19 laufen. Nun m�chte ich ein
> > Programm, das mit einem init Script (S91Programm) ohne Probleme
> > startet, mit einem Killsript beenden.
> >
> > Was ich bereits probiert habe:
> > Killscript ins Ziel-Runlevel (dort ist kein Startscript mit dem
> > gleichen Namen vorhanden), Killscript ins verlassende Runlevel,
> > Killscript in beide Runlevel.
>
> die skripte geh�ren immer in den runlevel, in den gewechselt wird. d.h.
> wenn du bei einem reboot das programm stoppen willst, in rc6.d ein
????
> KXXprogname verlinken, und er wird das skript mit der option "stop"
> aufrufen, wennst ein "reboot" eintippst. warum es dann immer noch nicht
> funktioniert, erf�hrst du vielleicht wenn du das skript h�ndisch
> aufrufst.
woher stammt diese theorie ?
aus dem script das bei meiner suse den wechsel vornimmt (/etc/rc.d/rc)
leicht gek�rzt:
runrc=/etc/init.d/rc${RUNLEVEL}.d <-- zu erreichen
prerc=/etc/init.d/rc${PREVLEVEL}.d <-- derzeitiger
rex="[0-9][0-9]"
#
# First check and test services of previous and current (new) runlevel.
#
for i in $prerc/K${rex}*; do
test -x "$i" || continue
#
# Don't stop service if the new runlevel requires the service.
#
service=${i#*/K$rex}
set -- $runrc/S$rex$service
test $# -gt 1 && echo -e "$attn$runrc/: more than one link for service $service$norm"
test -x "$1" && continue
$i stop; status=$?
also:
stop f�r alle Kxxx im alten runlevel, falls nicht Sxxx im neuen runlevel existiert.
Gustl
--
August H�randl august.hoerandl@gmx.at
**** If you're not running Linux, you paid too much. ****
Technical Details
Message-ID:
<m3664rkg2d.fsf.gustl@gmx.at>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!supernews.com!isdnet!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsrouter.chello.at!news.chello.at.POSTED!53ab2750!not-for-mailReferences:
<635cb983a4cc46d794d895fb075a1eb2.12747@mygate.mailgate.org> <Xns91BA6A71A31DCdtiefnigatwork@195.3.81.41>Show Full Headers
Complete Article Headers
X-Google-Language: GERMAN,ASCII X-Google-Thread: 1101c9,618355637177db04 X-Google-Attributes: gid1101c9,public X-Google-Thread: f55df,618355637177db04 X-Google-Attributes: gidf55df,public X-Google-ArrivalTime: 2002-02-20 13:27:04 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!supernews.com!isdnet!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsrouter.chello.at!news.chello.at.POSTED!53ab2750!not-for-mail Newsgroups: de.comp.os.unix.linux.misc,at.linux Subject: Re: Runlevel: Killfiles stoppen nicht unter RedHat References: <635cb983a4cc46d794d895fb075a1eb2.12747@mygate.mailgate.org> <Xns91BA6A71A31DCdtiefnigatwork@195.3.81.41> Organization: Gustl@Home X-Signature-Color: invisible From: "August Hörandl" <august.hoerandl@gmx.at> Message-ID: <m3664rkg2d.fsf.gustl@gmx.at> Lines: 59 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Wed, 20 Feb 2002 21:26:55 GMT NNTP-Posting-Host: 212.186.4.71 X-Complaints-To: abuse@news.chello.at X-Trace: news.chello.at 1014240415 212.186.4.71 (Wed, 20 Feb 2002 22:26:55 CET) NNTP-Posting-Date: Wed, 20 Feb 2002 22:26:55 CET