我正在使用Vagrant SSHFS插件而不是 $(function(){
$("#buyusd").keyup(function(){
calculate();
})
$('#buyselect').change(function() {
calculate();
})
});
function calculate(){
var value = $("#buyselect").val();
switch (value) {
case 'btc':
var rate = 4.7;
var ngnrate = 5.7;
var buyusd = $("#buyusd");
var total = isNaN(parseInt(buyusd.val() * rate)) ? 0 : (buyusd.val() * rate);
total1 = parseFloat(total).toFixed(2);
$("#buyghc").val(total1);
var ngntotal = isNaN(parseInt(buyusd.val() * ngnrate)) ? 0 : (buyusd.val() * ngnrate);
ngntotal1 = parseFloat(ngntotal).toFixed(2);
$("#buyngn").val(ngntotal1);
var total = isNaN(parseInt(buyghc.val() / rate)) ? 0 : (buyghc.val() / rate);
total1 = parseFloat(total).toFixed(2);
$("#buyusd").val(total1);
var ngntotal = isNaN(parseInt(total1 * ngnrate)) ? 0 : (total1 * ngnrate);
ngntotal1 = parseFloat(ngntotal).toFixed(2);
$("#buyngn").val(ngntotal1);
var total = isNaN(parseInt(buyngn.val() / ngnrate)) ? 0 : (buyngn.val() / ngnrate);
total1 = parseFloat(total).toFixed(2);
$("#buyusd").val(total1);
var ghctotal = isNaN(parseInt(total1 * rate)) ? 0 : (total1 * rate);
ghctotal1 = parseFloat(ghctotal).toFixed(2);
$("#buyghc").val(ghctotal1);
break;
case 'gcr':
var rate = 7;
var ngnrate = 3;
var buyusd = $("#buyusd");
var total = isNaN(parseInt(buyusd.val() * rate)) ? 0 : (buyusd.val() * rate);
total1 = parseFloat(total).toFixed(2);
$("#buyghc").val(total1);
var ngntotal = isNaN(parseInt(buyusd.val() * ngnrate)) ? 0 : (buyusd.val() * ngnrate);
ngntotal1 = parseFloat(ngntotal).toFixed(2);
$("#buyngn").val(ngntotal1);
var total = isNaN(parseInt(buyghc.val() / rate)) ? 0 : (buyghc.val() / rate);
total1 = parseFloat(total).toFixed(2);
$("#buyusd").val(total1);
var ngntotal = isNaN(parseInt(total1 * ngnrate)) ? 0 : (total1 * ngnrate);
ngntotal1 = parseFloat(ngntotal).toFixed(2);
$("#buyngn").val(ngntotal1);
var total = isNaN(parseInt(buyngn.val() / ngnrate)) ? 0 : (buyngn.val() / ngnrate);
total1 = parseFloat(total).toFixed(2);
$("#buyusd").val(total1);
var ghctotal = isNaN(parseInt(total1 * rate)) ? 0 : (total1 * rate);
ghctotal1 = parseFloat(ghctotal).toFixed(2);
$("#buyghc").val(ghctotal1);
break;
}
}
。我安装了插件:
rsync
以下是我的vagrant plugin install vagrant-sshfs
:
Vagrantfile
当我运行Vagrant.configure("2") do |config|
config.vm.box = "debian/jessie64"
config.vm.synced_folder "./live-build", "/home/vagrant/live-build", type: "sshfs"
config.vm.provision "shell", path: "./provision/setup.sh"
config.vm.provision "shell", path: "./provision/build.sh"
end
时,主机vagrant up
目录已链接,我可以看到来宾的文件。
现在如果我运行:live-build
然后vagrant destroy
synced_folder尝试默认为vagrant up
,这会导致以下错误:
rsync
插件已经安装有什么奇怪之处:</ p>
Host path: /Users/jake/OZYProject/
Guest path: /vagrant
Command: "rsync" "--verbose" "--archive" "--delete" "-z" "--copy-links" "--no-owner" "--no-group" "--rsync-path" "sudo rsync" "-e" "ssh -p 2222 -o LogLevel=FATAL -o ControlMaster=auto -o ControlPath=/var/folders/lp/qxycffd53lxdhbhvy34lymrh0000gn/T/ssh.180 -o ControlPersist=10m -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i '/Users/jake/OZYProject/.vagrant/machines/default/virtualbox/private_key'" "--exclude" ".vagrant/" "/Users/jake/OZYProject/" "vagrant@127.0.0.1:/vagrant"
Error: symlink has no referent: "/Users/jake/OZYProject/whonix-live-build/config/hooks/0010-disable-kexec-tools.hook.chroot"
...
如果我尝试安装vagrant plugin list
vagrant-share (1.1.6, system)
vagrant-sshfs (1.3.0)
vagrant-vbguest (0.14.2)
(即使已经安装)并重试vagrant plugin install vagrant-sshfs
,它将使用vagrant up
正确安装。我似乎必须在运行sshfs
之后安装vagrant-sshfs
。
这是正常的吗?
答案 0 :(得分:1)
It seems the issue appears for the default /vagrant
folder, you can disable this folder by adding the following in your Vagrantfile
config.vm.synced_folder ".", "/vagrant", disabled: true