Update shell.html.md
Putting sleep after the reboot didn't work for me. It would just hang indefinitely. There's a better way, and it's "pause_before".
This commit is contained in:
parent
bddb2c25f2
commit
cd10cef218
|
@ -159,12 +159,14 @@ scripts. The amount of time the provisioner will wait is configured using
|
||||||
|
|
||||||
Sometimes, when executing a command like `reboot`, the shell script will return
|
Sometimes, when executing a command like `reboot`, the shell script will return
|
||||||
and Packer will start executing the next one before SSH actually quits and the
|
and Packer will start executing the next one before SSH actually quits and the
|
||||||
machine restarts. For this, put a long `sleep` after the reboot so that SSH will
|
machine restarts. For this, put use "pause_before" to make Packer wait before executing the next script:
|
||||||
eventually be killed automatically:
|
|
||||||
|
|
||||||
``` {.text}
|
``` {.text}
|
||||||
reboot
|
{
|
||||||
sleep 60
|
"type": "shell",
|
||||||
|
"script": "script.sh",
|
||||||
|
"pause_before": "10s"
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Some OS configurations don't properly kill all network connections on reboot,
|
Some OS configurations don't properly kill all network connections on reboot,
|
||||||
|
|
Loading…
Reference in New Issue