From: neilsolent on
On 20 Jan, 12:58, Rainer Weikusat <rweiku...(a)mssgmbh.com> wrote:
> neilsolent <n...(a)solenttechnology.co.uk> writes:
> > On 19 Jan, 22:02, David Schwartz <dav...(a)webmaster.com> wrote:
> >> On Jan 19, 12:52 am, neilsolent <n...(a)solenttechnology.co.uk> wrote:
> >> > >  I challenge you to name _one_ commercial 3rd party application that
> >> > >  reboots a unix box.
> >> > OK. Challenge accepted.
> >> > How about IBM Tivoli Framework. The framework daemon has this
> >> > capability.
>
> >> And if you had said "I need to reboot a system for similar reasons to
> >> why IBM Tivoli Framework needs to reboot a system" you would have
> >> gotten useful answers. Very often, the right way to do something
> >> depends heavily on why you want to do it. This is one of those cases.
> >> Yet you stubbornly insist that people tell you the right way to do it
> >> when they have no idea what use case you are in, and therefore no way
> >> to know what the right way for you is.
>
> [...]
>
> > OK.  I need to reboot a system for similar reasons to why IBM Tivoli
> > Framework needs to reboot a system.
>
> If you want this to be (potentially) universally useful, you will need
> some kind of extensible 'reboot framework'. What I would do is 'invoke
> a script with some well-known name' (or getting the path to the script
> from some kind of configuration variable). This allows for easy, local
> customization where required. Then, I would write such a script for
> each type of system I wanted to support initially and use
> another script (or set of scripts) to detect if the application is
> about to be installed on a 'supported system' during installation,
> with an option for manual override, of course. Depending on the result
> of this auto-detection process, the installation code would then
> either provide a 'default reboot script' from the library of existing
> reboot scripts and inform the sysadmin about this fact, advising him
> to have a look at the default script before trying to use the
> reboot-feature or display some kind of message which informs the
> person doing the install that 'reboot' is not yet supported on this
> particular system, because a script actually doing the reboot still
> needs to be written, possibly giving a pointer to documentation which
> explains the requirements for such a script in sufficient detail to
> implement it. Lastly, I would add an 'if you do implement a generally
> useful reboot script for system xyz and want to be nice to others,
> please mail it to <email address>' message.- Hide quoted text -
>
> - Show quoted text -

Hi Rainer

Agreed, that is almost exactly what I have done. See my earlier post.
I will publish the name of the script in the user guide, and state
that it is up for customisation.
The question is - what is the default script shipped with the
application? Is it an empty "exit 0" or is there a normal default
shutdown routine?
From: Scott Lurndal on
neilsolent <n(a)solenttechnology.co.uk> writes:
>On 19 Jan, 22:02, David Schwartz <dav...(a)webmaster.com> wrote:
>> On Jan 19, 12:52=A0am, neilsolent <n...(a)solenttechnology.co.uk> wrote:
>>
>> > > =A0I challenge you to name _one_ commercial 3rd party application tha=
>t
>> > > =A0reboots a unix box.
>> > OK. Challenge accepted.
>> > How about IBM Tivoli Framework. The framework daemon has this
>> > capability.
>>
>> And if you had said "I need to reboot a system for similar reasons to
>> why IBM Tivoli Framework needs to reboot a system" you would have
>> gotten useful answers. Very often, the right way to do something
>> depends heavily on why you want to do it. This is one of those cases.
>> Yet you stubbornly insist that people tell you the right way to do it
>> when they have no idea what use case you are in, and therefore no way
>> to know what the right way for you is.
>>
>> DS
>
>OK. I need to reboot a system for similar reasons to why IBM Tivoli
>Framework needs to reboot a system.
>Can I have my useful answers now ? :-)

I would look at injecting an ACPI soft-power off event. Most modern
operating systems will do an orderly shutdown when this occurs. If
the hardware platform has an IPMI interface, that would be the best
way. Otherwise it is OS specific and having an implementation provided
shell script is probably the best solution.