diff options
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/vserver.pp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/manifests/vserver.pp b/manifests/vserver.pp index d00c81d..93cb6db 100644 --- a/manifests/vserver.pp +++ b/manifests/vserver.pp @@ -275,25 +275,26 @@ define vserver($ensure, $context, $in_domain = '', $mark = '', $legacy = false, # ensure a secure chroot barrier # we have to do it for each vserver, see # http://linux-vserver.org/Secure_chroot_Barrier#Solution:_Secure_Barrier - exec { "setattr --barrier /etc/vservers/${vs_name}/vdir/../": - unless => "showattr /etc/vservers/${vs_name}/vdir/../ | grep -- '----Bui- /etc/vservers/${vs_name}/vdir/../$'", + exec { "/usr/sbin/setattr --barrier /etc/vservers/${vs_name}/vdir/../": + unless => "/usr/sbin/showattr /etc/vservers/${vs_name}/vdir/../ | grep -- '----Bui- /etc/vservers/${vs_name}/vdir/../$'", require => Exec["vs_create_${vs_name}"], } case $ensure { present: { # don't start or stop the vserver, just make sure it exists, we just run a dummy status test here - exec { "test -e \$(readlink -f /etc/vservers/${vs_name}/vdir)": + exec { "/usr/bin/test -e \$(readlink -f /etc/vservers/${vs_name}/vdir)": require => Exec["vs_create_${vs_name}"], alias => "vs_restart_${vs_name}", } } stopped: { exec { "vserver ${vs_name} stop": - onlyif => "test -e \$(readlink -f /etc/vservers/${vs_name}/run || echo /doesntexist )", + 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, } } @@ -304,14 +305,16 @@ define vserver($ensure, $context, $in_domain = '', $mark = '', $legacy = false, } running: { exec { "vserver ${vs_name} start": - unless => "test -e \$(readlink -f /etc/vservers/${vs_name}/run)", + 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": refreshonly => true, require => Exec["vs_create_${vs_name}"], alias => "vs_restart_${vs_name}", subscribe => File[$if_dir], + path => "/usr/sbin", } case $mark { @@ -575,6 +578,7 @@ define vs_sched($ensure = present, $fill_rate = '', $fill_rate2 = '', "/etc/vservers/$name/sched/tokens", "/etc/vservers/$name/sched/idle-time"], refreshonly => true, require => Exec["vs_create_${name}"], + path => "/usr/sbin", } } } @@ -601,6 +605,7 @@ define vs_cflags($vserver, $flag, $ensure = present) { command => "vattribute --set --xid `cat /etc/vservers/$vserver/context` --flag ${flag}", refreshonly => true, require => Exec["vs_create_${vserver}"], + path => "/usr/sbin", } } default: { @@ -608,6 +613,7 @@ define vs_cflags($vserver, $flag, $ensure = present) { command => "vattribute --set --xid `cat /etc/vservers/$vserver/context` --flag ~${flag}", refreshonly => true, require => Exec["vs_create_${vserver}"], + path => "/usr/sbin", } } } |