我想用木偶运行以下命令:
sb2-init rasp /home/ubuntu/raspberry_pi_development/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc在木偶:
exec { "initSB2":
command => "sb2-init rasp /home/ubuntu/raspberry_pi_development/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc" ,
cwd => "/home/vagrant/raspberry_pi_development/rootfs",
path => "/home/vagrant/raspberry_pi_development/scratchbox2/bin",
user => 'vagrant',
logoutput => true,
}sb2-init命令位于"/home/vagrant/raspberry_pi_development/scratchbox2/bin“目录中,我希望在"/home/vagrant/raspberry_pi_development/scratchbox2/bin”文件夹中执行此命令。
当我执行这个木偶清单时,我得到:
notice: /Stage[main]//Exec[initSB2]/returns: /home/vagrant/raspberry_pi_development/scratchbox2/bin/sb2-init: line 6
sename: command not found
notice: /Stage[main]//Exec[initSB2]/returns: /home/vagrant/raspberry_pi_development/scratchbox2/bin/sb2-init: line 6
sename: command not found
notice: /Stage[main]//Exec[initSB2]/returns: /home/vagrant/raspberry_pi_development/scratchbox2/bin/sb2-init: line 8
sename: command not found
notice: /Stage[main]//Exec[initSB2]/returns: /home/vagrant/raspberry_pi_development/scratchbox2/bin/sb2-init: line 8
=: unary operator expected
notice: /Stage[main]//Exec[initSB2]/returns: /home/vagrant/raspberry_pi_development/scratchbox2/bin/sb2-init: line 2
readlink: command not found
notice: /Stage[main]//Exec[initSB2]/returns: /home/vagrant/raspberry_pi_development/scratchbox2/bin/sb2-init: line 2
dirname: command not found
notice: /Stage[main]//Exec[initSB2]/returns: /home/vagrant/raspberry_pi_development/scratchbox2/bin/sb2-init: line 2
readlink: command not found
notice: /Stage[main]//Exec[initSB2]/returns: /home/vagrant/raspberry_pi_development/scratchbox2/bin/sb2-init: line 2
/share/scratchbox2/scripts/sb2-parse-sb2-init-args: No such file or directory
notice: /Stage[main]//Exec[initSB2]/returns: Error: no target given
err: /Stage[main]//Exec[initSB2]/returns: change from notrun to 0 failed: /bin/sh -c "sb2-init rasp /home/ubuntu/ras
ry_pi_development/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc" returned 1
ead of one of [0] at /tmp/vagrant-puppet-1/manifests/devbox.pp:332当我在shell中手动输入它时,这个命令可以工作,但对木偶则不行!
有什么问题吗?
问候迈克尔
发布于 2014-02-28 14:41:03
我不认为这实际上与Puppet有关--命令输出实际上来自脚本,而不是Puppet (从外观上看,缺少包和脚本语法都存在问题,但如果不看到脚本,就不可能说出来)。
我将手动运行命令(例如,通过SSH)并检查输出。一旦您修复了潜在的问题,重新运行木偶命令,一切都会成功。
https://serverfault.com/questions/570786
复制相似问题