Skip to content

Commit b74ac16

Browse files
author
jantari
committed
set PendingAction correctly for reboot type 1 and 4 packages (fix #94)
1 parent 387a208 commit b74ac16

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

public/Install-LSUpdate.ps1

+7
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,15 @@
136136
}
137137
} elseif ($PackageToProcess.RebootType -eq 0) {
138138
'NONE'
139+
} elseif ($PackageToProcess.RebootType -eq 1) {
140+
# RebootType 1 updates should force a reboot on their own, interrupting LSUClient anyway,
141+
# but this can lead to race conditions (how fast does the reboot happen, killing LSUClient before this point?)
142+
# or maybe the reboot doesn't happen for some reason so we still communicate that it's needed. See issue #94.
143+
'REBOOT_MANDATORY'
139144
} elseif ($PackageToProcess.RebootType -eq 3) {
140145
'REBOOT_SUGGESTED'
146+
} elseif ($PackageToProcess.RebootType -eq 4) {
147+
'SHUTDOWN'
141148
} elseif ($PackageToProcess.RebootType -eq 5) {
142149
'REBOOT_MANDATORY'
143150
}

0 commit comments

Comments
 (0)