Ask a Question related to UNIX Programming, Design and Development.
-
Måns Rullgård #1
Re: rc scriping: why init.d?
Rich Gray <richNOgSPAM@plustechnologies.com> writes:
In most installations, all processes are sent the SIGTERM signal prior> Q: Is there a way for an application to get notification when
> shutdown is first invoked? By default, humans typically get
> a minute of grace to finish up. It would be nice if our
> scheduler knew that a shutdown was coming in nnn seconds. It
> could supspend dispatching new jobs and condition running jobs
> to either finish up or get to a reasonable stopping point in
> the alloted grace interval.
to system shutdown. After this, they are given some time (a few
seconds) to clean up. Do you want something else?
--
Måns Rullgård
[email]mru@users.sf.net[/email]
Måns Rullgård Guest
-
init.pl help needed please
I have following not working it report that I have Can't find string terminator "STR" anywhere before EOF at init.pl line 50. Compilation failed in... -
init.d
Where can I find a list of what all those scripts in init.d means (what they are used to start/stop) ? -- Stojcevski Dejan e-mail:... -
XDM init file
Hi All, I've just started using xdm rather than loggin strigh in on the console. One thing I have found is that instead of calling ~/.xinitrc and... -
Log of init.d services started....
Is there any log of services started on boot from the rc?.d/init.d directories. For reason I can't fathom (yet), my DSL connection doesn't come... -
Debuging inittab init.d rc*.d
on Solaris 5.x Could someone help me what to do, and where to look for debug information/logs of echo command display from init.d script? My... -
Rich Gray #2
Re: rc scriping: why init.d?
Måns Rullgård wrote:
Yes. The killall behavior happens after the apps have had a>
> Rich Gray <richNOgSPAM@plustechnologies.com> writes:
>>> > Q: Is there a way for an application to get notification when
> > shutdown is first invoked? By default, humans typically get
> > a minute of grace to finish up. It would be nice if our
> > scheduler knew that a shutdown was coming in nnn seconds. It
> > could supspend dispatching new jobs and condition running jobs
> > to either finish up or get to a reasonable stopping point in
> > the alloted grace interval.
> In most installations, all processes are sent the SIGTERM signal prior
> to system shutdown. After this, they are given some time (a few
> seconds) to clean up. Do you want something else?
>
> --
> Måns Rullgård
> [email]mru@users.sf.net[/email]
chance to be shutdown cleanly by rc scripts. (I presume that at
rc shutdown time, apps are expected to terminate in some short
number of seconds.)
What I'm looking for is some sort of 'heads up' prior to the
start of the actual shutdown process. For example, on several
SV'ish systems, the admin can issue:
shutdown -y -g120 -i0
to put out a two minute warning to users, then take the system
to a halt after that interval elapses. It would be nice if my app
could also get a two minute warning so as to have a less abrupt
shutdown. I've never seen a hint of such, but figured why not
ask?
--
Rich
mailto:richNOgSPAM@plustechnologies.com (remove NO SPAM to reply)
[url]http://www.plustechnologies.com[/url]
Rich Gray Guest
-
Andrew Gabriel #3
Re: rc scriping: why init.d?
In article <3F042CD3.2B91C4B3@plustechnologies.com>,
Rich Gray <richNOgSPAM@plustechnologies.com> writes:So the system admin can easily find it to run it by hand.> I'm cleaning up some rc scripts and have a few questions.
>
> Q: Why put the start stop script in the init.d directory instead
That can be done too.> just linking the rc#.d/S & K scripts straight back to a file
> in the project's directory tree? (One less system specific
It makes packaging easier. A product just drops it's own files> file to add/remove at install/uninstall.) Similary, for AIX,
> (the only OS I have to support which does not seem to have
> a flavor of SysV'ish rc scripting) why not have the inittab
> entry point directly to a start script in the project's
> directories instead installing/removing /etc/rc.project.
into the relevant directories and it automatically gets started
and stopped at the appropriate times. When you uninstall that
product, it simply has to delete its files. Multiple products
having to edit themselves into files shared by other things,
and edit themselves out when they are uninstalled, is always
more problematic.
Some varients of shutdown create /etc/nologin to prevent further> I think I know the answer department:
>
> Q: Is there a way for an application to get notification when
> shutdown is first invoked? By default, humans typically get
> a minute of grace to finish up. It would be nice if our
> scheduler knew that a shutdown was coming in nnn seconds. It
> could supspend dispatching new jobs and condition running jobs
> to either finish up or get to a reasonable stopping point in
> the alloted grace interval.
logins. You might be able to check for the existance of that
file.
On one system I administered, I rewrote shutdown to better suit
our needs, including things like sending SMB message to all samba
clients with resources mounted, and issuing the rwall warnings
all in parallel so loads of non-responding NFS clients didn't
make it take 10 times longer than you asked for.
You could produce a customised version for your environment.
--
Andrew Gabriel
Consultant Software Engineer
Andrew Gabriel Guest
-
Rich Gray #4
Re: rc scriping: why init.d?
Andrew Gabriel wrote:
So this is mostly convention. It also explains why handy things>
> In article <3F042CD3.2B91C4B3@plustechnologies.com>,
> Rich Gray <richNOgSPAM@plustechnologies.com> writes:>> > I'm cleaning up some rc scripts and have a few questions.
> >
> > Q: Why put the start stop script in the init.d directory instead
> So the system admin can easily find it to run it by hand.
above and beyond 'start' & 'stop' functionality (like 'restart')
are in the init.d scripts. Good enough for me.
I certainly understand and appreciate the 'drop in to install'>> > just linking the rc#.d/S & K scripts straight back to a file
> > in the project's directory tree? (One less system specific
> That can be done too.
>>> > file to add/remove at install/uninstall.) Similary, for AIX,
> > (the only OS I have to support which does not seem to have
> > a flavor of SysV'ish rc scripting) why not have the inittab
> > entry point directly to a start script in the project's
> > directories instead installing/removing /etc/rc.project.
> It makes packaging easier. A product just drops it's own files
> into the relevant directories and it automatically gets started
> and stopped at the appropriate times. When you uninstall that
> product, it simply has to delete its files. Multiple products
> having to edit themselves into files shared by other things,
> and edit themselves out when they are uninstalled, is always
> more problematic.
and 'delete to uninstall' convention. Unfortunately, the old
versions of AIX I have don't seem to support this. One must
add/remove entries to inittab. (Where they point comes back to
my above question: their place or ours?)
Ah, we could have our processes optionally check for that file.>> > I think I know the answer department:
> >
> > Q: Is there a way for an application to get notification when
> > shutdown is first invoked? By default, humans typically get
> > a minute of grace to finish up. It would be nice if our
> > scheduler knew that a shutdown was coming in nnn seconds. It
> > could supspend dispatching new jobs and condition running jobs
> > to either finish up or get to a reasonable stopping point in
> > the alloted grace interval.
> Some varients of shutdown create /etc/nologin to prevent further
> logins. You might be able to check for the existance of that
> file.
Thanks for the pointer.
Not practical for canned software, but certainly a reasonable thing> On one system I administered, I rewrote shutdown to better suit
> our needs, including things like sending SMB message to all samba
> clients with resources mounted, and issuing the rwall warnings
> all in parallel so loads of non-responding NFS clients didn't
> make it take 10 times longer than you asked for.
> You could produce a customised version for your environment.
for a site to do.
THANKS for your comments!>
> --
> Andrew Gabriel
> Consultant Software Engineer
--
Rich
mailto:richNOgSPAM@plustechnologies.com (remove NO SPAM to reply)
[url]http://www.plustechnologies.com[/url]
Rich Gray Guest
-
those who know me have no need of my name #5
Re: rc scriping: why init.d?
in comp.unix.programmer i read:
>In article <3F042CD3.2B91C4B3@plustechnologies.com>,
> Rich Gray <richNOgSPAM@plustechnologies.com> writes:in addition. /etc should always be available during boot, but the>>> I'm cleaning up some rc scripts and have a few questions.
>>
>> Q: Why put the start stop script in the init.d directory instead
>So the system admin can easily find it to run it by hand.
directory in which `the project' lives may not.
--
a signature
those who know me have no need of my name Guest



Reply With Quote

