]> git.ipfire.org Git - thirdparty/openvpn.git/commit
openvpnmsica: properly schedule reboot in the end of installation
authorLev Stipakov <lev@openvpn.net>
Tue, 11 May 2021 07:57:39 +0000 (10:57 +0300)
committerGert Doering <gert@greenie.muc.de>
Wed, 19 May 2021 07:23:49 +0000 (09:23 +0200)
commit3ea57e0c46a922ac87295769283b7691e2dcbdd3
tree72ccd8f9291a65e054601cbc6aa565c5ec27efe4
parent6471fd2ab1d07ad24c2c92e7fbda6bd645dd84c8
openvpnmsica: properly schedule reboot in the end of installation

A deferred custom action can not set the reboot status via MsiSetMode.

To schedule reboot:

 - get user's temp directory in immediate custom action
   (EvaluateTUNTAPAdapters) which is called in the beginning of
   installation and pass it to the deffered action

 - in deferred action (ProcessDeferredAction) create a special empty file
   in user's temp directory if reboot is required

 - in the end of installation call immediate custom action
   (CheckAndScheduleReboot) which checks the existence of special file
   and uses MsiSetMode() to schedule reboot

Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20210511075739.158-1-lstipakov@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22335.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 2f0e3fe1c6c57dd3989951d167e94fe4debe5405)
src/openvpnmsica/openvpnmsica.c
src/openvpnmsica/openvpnmsica.h