diff options
author | drebs <drebs@riseup.net> | 2011-03-20 18:57:02 -0300 |
---|---|---|
committer | drebs <drebs@riseup.net> | 2011-03-20 18:57:02 -0300 |
commit | 55f93ba5e57c33e393360d11d06534aa604f5243 (patch) | |
tree | 556e58f8044be043132d9efba071048f3e7bd74e /manifests | |
parent | 2a0c67462e0e8af3925b97e0e56d7899a0d05fba (diff) | |
download | puppet-virtual-55f93ba5e57c33e393360d11d06534aa604f5243.tar.gz puppet-virtual-55f93ba5e57c33e393360d11d06534aa604f5243.tar.bz2 |
fully qualifying execs
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/vserver.pp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/manifests/vserver.pp b/manifests/vserver.pp index d0269a9..37a4272 100644 --- a/manifests/vserver.pp +++ b/manifests/vserver.pp @@ -150,7 +150,7 @@ define vs_create($in_domain, $context, $legacy = false, $distro = 'etch', require => File["/usr/local/bin/build_vserver","/etc/vservers/.defaults/vdirbase"], alias => "vs_create_${vs_name}", # TODO: change when this is fixed: http://projects.puppetlabs.com/issues/4769 - timeout => $lsbdistcodename ? { "squeeze" => '999999999999999999999999999999', + timeout => $lsbdistcodename ? { "squeeze" => '31536000', # 1 year default => '-1', }, } } @@ -291,32 +291,29 @@ define vserver($ensure, $context, $in_domain = '', $mark = '', $legacy = false, } } stopped: { - exec { "vserver ${vs_name} stop": + exec { "/usr/sbin/vserver ${vs_name} stop": onlyif => "/usr/bin/test -e \$(readlink -f /etc/vservers/${vs_name}/run || echo /doesntexist )", require => Exec["vs_create_${vs_name}"], # fake the restart exec in the stopped case, so the dependencies are fulfilled alias => "vs_restart_${vs_name}", - path => "/usr/sbin", } file { $mark_file: ensure => absent, } } delete: { - exec { "/usr/bin/yes | vserver ${vs_name} delete": + exec { "/usr/bin/yes | /usr/sbin/vserver ${vs_name} delete": alias => "vs_restart_${vs_name}", } } running: { - exec { "vserver ${vs_name} start": + exec { "/usr/sbin/vserver ${vs_name} start": unless => "/usr/bin/test -e \$(readlink -f /etc/vservers/${vs_name}/run)", require => [ Exec["vs_create_${vs_name}"], File["/etc/vservers/${vs_name}/context"] ], - path => "/usr/sbin", } - exec { "vserver ${vs_name} restart": + exec { "/usr/sbin/vserver ${vs_name} restart": refreshonly => true, require => Exec["vs_create_${vs_name}"], alias => "vs_restart_${vs_name}", subscribe => File[$if_dir], - path => "/usr/sbin", } case $mark { @@ -573,14 +570,13 @@ define vs_sched($ensure = present, $fill_rate = '', $fill_rate2 = '', $vsched_params = "$set_fill_rate $set_fill_rate2 $set_interval $set_interval2 $set_tokens_min $set_tokens_max $set_tokens $set_idle_time $set_priority_bias" - exec { "vsched --xid `cat /etc/vservers/$name/context` ${vsched_params} --force": + exec { "/usr/sbin/vsched --xid `cat /etc/vservers/$name/context` ${vsched_params} --force": subscribe => File["/etc/vservers/$name/sched/fill-rate", "/etc/vservers/$name/sched/fill-rate2", "/etc/vservers/$name/sched/interval", "/etc/vservers/$name/sched/interval2", "/etc/vservers/$name/sched/tokens-min", "/etc/vservers/$name/sched/tokens-max", "/etc/vservers/$name/sched/tokens", "/etc/vservers/$name/sched/idle-time"], refreshonly => true, require => Exec["vs_create_${name}"], - path => "/usr/sbin", } } } @@ -603,19 +599,17 @@ define vs_cflags($vserver, $flag, $ensure = present) { case $ensure { present: { - exec { "vattribute-${vserver}-${flag}": + exec { "/usr/sbin/vattribute-${vserver}-${flag}": command => "vattribute --set --xid `cat /etc/vservers/$vserver/context` --flag ${flag}", refreshonly => true, require => Exec["vs_create_${vserver}"], - path => "/usr/sbin", } } default: { - exec { "vattribute-${vserver}-${flag}": + exec { "/usr/sbin/vattribute-${vserver}-${flag}": command => "vattribute --set --xid `cat /etc/vservers/$vserver/context` --flag ~${flag}", refreshonly => true, require => Exec["vs_create_${vserver}"], - path => "/usr/sbin", } } } |