Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.development.apps > #306

Re: How to automagically run an application when entering runlevel S

From Josef Moellers <josef.moellers@ts.fujitsu.com>
Newsgroups comp.os.linux.development.apps
Subject Re: How to automagically run an application when entering runlevel S
Date 2011-12-08 16:25 +0100
Organization Fujitsu Technology Solutions
Message-ID <jbqkse$ej1$1@nntp.ts.fujitsu.com> (permalink)
References <jbo0og$9ok$1@nntp.ts.fujitsu.com> <87mxb475r7.fsf@sapphire.mobileactivedefense.com>

Show all headers | View raw


Am 8.12.2011 schrub Rainer Weikusat:

> Josef Moellers <josef.moellers@ts.fujitsu.com> writes:
> 
> [...]
> 
>> The application runs in runlevel S and when runlevel S was entered on
>> the old image, /.profile was run and that contains a call to our
>> application.
>> On the new image, this does not happen!
>> Unfortunately, the guy who built the old image is no more available.
>> Does anyone have an idea where to tweak to run /.profile when entering
>> runlevel S?
> 
> For sysvinit, a corresponding line could be added to /etc/inittab eg
> 
> 	a0:1:wait:/.profile
> 
> in a suitable place (IOW below the entries executing rc scripts,
> [untested]).

It was a bit more invasive:
The /sbin/sushell is merely a wrapper around /bin/bash (or whatever
$SUSHELL is set to).
All that was needed was a new line "export HOME=/".

The advantage is that when you exit the application abnormally, you end
up in a shell (the "normal" way out is the application calling "init
0"). This had proved useful in the past.

Thanks to both of you, André and you.

Josef
-- 
These are my personal views and not those of Fujitsu Technology Solutions!
Josef Möllers (Pinguinpfleger bei FTS)
	If failure had no penalty success would not be a prize (T.  Pratchett)
Company Details: http://de.ts.fujitsu.com/imprint.html

Back to comp.os.linux.development.apps | Previous | NextPrevious in thread | Find similar


Thread

How to automagically run an application when entering runlevel S Josef Moellers <josef.moellers@ts.fujitsu.com> - 2011-12-07 16:29 +0100
  Re: How to automagically run an application when entering runlevel S Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-12-07 15:37 +0000
    Re: How to automagically run an application when entering runlevel S André Gillibert <MetaEntropy.removeThis@gmail.com> - 2011-12-07 19:21 +0100
    Re: How to automagically run an application when entering runlevel S Josef Moellers <josef.moellers@ts.fujitsu.com> - 2011-12-08 16:25 +0100

csiph-web