Merge branch 'feature/8-make_dist-upgrade_timeout_configurable' into 'master'
apt::dist_upgrade: add a timeout parameter (#8). See merge request !45
This commit is contained in:
commit
6277c3ba14
2 changed files with 9 additions and 1 deletions
|
@ -348,6 +348,11 @@ classes may inherit from this one and add to its subscription list
|
|||
using the plusignment (`+>`) operator. A real-world example can be
|
||||
seen in the `apt::dist_upgrade::initiator` source.
|
||||
|
||||
Parameters:
|
||||
|
||||
* timeout: specified in seconds; the maximum time the `dist-upgrade`
|
||||
command should take. If the command takes longer than the timeout,
|
||||
the command is considered to have failed and will be stopped.
|
||||
|
||||
## apt::dist_upgrade::initiator<a name="apt-dist_upgrade-initiator"></a>
|
||||
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
class apt::dist_upgrade {
|
||||
class apt::dist_upgrade (
|
||||
$timeout = 300,
|
||||
) {
|
||||
|
||||
exec { 'apt_dist-upgrade':
|
||||
command => '/usr/bin/apt-get -q -y -o \'DPkg::Options::=--force-confold\' dist-upgrade',
|
||||
refreshonly => true,
|
||||
timeout => $timeout,
|
||||
before => Exec['apt_updated']
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue