Seite 1 von 1

How to add a delay when requiring a shutdown of a client ?

Verfasst: 14 Sep 2017, 08:46
von nicolaslebrun
Hi,

When you shutdown a client from Configed, the halt of the machine is really sudden and don't warn the connected user.

Is there a confg I miss ?

I tried adding
opsiclientd.event_default.shutdown_user_cancelable [1]
opsiclientd.event_default.shutdown_warning_time [60]
to the general config, but those variables don't affect the "shudown" action.

Is there a config on server side ? Am i missing something ?

Regards,

Re: How to add a delay when requiring a shutdown of a client ?

Verfasst: 19 Sep 2017, 10:08
von n.wenselowski
Hi,

shutting down from the configed does not trigger an event but instead triggers a direct shutdown action.
Have you had a look at the shutdownwanted package? This may do what you want.


Kind regards

Niko

Re: How to add a delay when requiring a shutdown of a client ?

Verfasst: 24 Jan 2018, 21:11
von nicolaslebrun
Thanks Niko for this reply...

My problem is that i need to perform actions at shutdown... not only shutdown the computer. If i use shutdownwanted, and if there is any other package scheduled (setup in configed), it will launch actions without informing the user...

So, my idea was to add a package named actionsWanted.opsi with a high priority (95) that would ask for the user if he wants to let the localboot products to be installed... The package i have launches an autoit script that ask a question, minimize notifier.exe and winst.exe and pauses the execution of localboot setup.

But that's not very fine...

I found on the wiki a post where Dark Alex talks about
an event "request_graceful_reboot" which issues a popup requesting the user to reboot

viewtopic.php?f=7&t=8271&p=36087#p36087

That's why, i am wondering whether it is possible to add an event in opsiclientd "request_actions_launch" for example ?

Regards,

Nico

Re: How to add a delay when requiring a shutdown of a client ?

Verfasst: 31 Jan 2018, 10:11
von n.wenselowski
Hi,

from what you describe I'd probably make use of shutdownwanted and the just configure opsiclientd to show a warning - this is the setting action_warning_time of an event.
If you do not want all your actions to show the warning you'd make your own event - this is probably what Dark Alex did.
What actions can be launched in the client list in configed can be configured in the host parameters.

Kind regards

Niko

Re: How to add a delay when requiring a shutdown of a client ?

Verfasst: 06 Feb 2018, 22:49
von nicolaslebrun
Hi Niko,

Thanks for your reply !

In the manual, i can read
To incorporate additional events (which should be configured in the opsiclientd.conf) into the submenu you have to edit the config configed.opsiclientd_events via the tab (server) host parameters.
But it seems the property is not multivalue.

Code: Alles auswählen

opsi-admin -d method config_getObjects [] '{"id" : "configed.opsiclientd_events"}'
[
    {
    "ident" : "configed.opsiclientd_events",
    "description" : "",
    "defaultValues" :
        [
        "on_demand"
        ],
    "editable" : true,
    "multiValue" : false,
    "possibleValues" :
        [
        "launch_update_and_extinction",
        "on_demand"
        ],
    "type" : "UnicodeConfig",
    "id" : "configed.opsiclientd_events"
    }
]
Am i missing something ?

For the moment, i'll try to see if i can manage with 'action_warning_time' only !

I'll be back

Regards,

Nico

Re: How to add a delay when requiring a shutdown of a client ?

Verfasst: 19 Feb 2018, 15:50
von n.wenselowski
Hi,

it should be multivalue.
Don't know where this comes from, maybe from an early testing version.
It probably is the easiest way to make it multivalue.


Bye

Niko