首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >木偶中的Exec问题

木偶中的Exec问题
EN

Server Fault用户
提问于 2014-01-29 16:37:29
回答 1查看 535关注 0票数 1

我想用木偶运行以下命令:

代码语言:javascript
复制
sb2-init rasp /home/ubuntu/raspberry_pi_development/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc

在木偶:

代码语言:javascript
复制
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”文件夹中执行此命令。

当我执行这个木偶清单时,我得到:

代码语言:javascript
复制
    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中手动输入它时,这个命令可以工作,但对木偶则不行!

有什么问题吗?

问候迈克尔

EN

回答 1

Server Fault用户

发布于 2014-02-28 14:41:03

我不认为这实际上与Puppet有关--命令输出实际上来自脚本,而不是Puppet (从外观上看,缺少包和脚本语法都存在问题,但如果不看到脚本,就不可能说出来)。

我将手动运行命令(例如,通过SSH)并检查输出。一旦您修复了潜在的问题,重新运行木偶命令,一切都会成功。

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/570786

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档