From 550fcd1369f1747e1314d48f96f48bd8b2cf2c8d Mon Sep 17 00:00:00 2001 From: eleksir Date: Tue, 24 Jul 2018 00:17:19 +0300 Subject: [PATCH] ceph_reweight.pl: wrap variable with sprintf, now it works with system() --- ceph_reweight.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ceph_reweight.pl b/ceph_reweight.pl index 7778667..e71c3d1 100644 --- a/ceph_reweight.pl +++ b/ceph_reweight.pl @@ -39,7 +39,7 @@ if (defined($ARGV[0]) and ($ARGV[0] eq '--do-it')) { if (defined($ARGV[1])) { help () if ($ARGV[1] ne '--dry'); } else { - system('ceph', 'osd', 'reweght', $osd->{'id'}, $new_weight); + system('ceph', 'osd', 'reweght', sprintf("%d", $osd->{'id'}), sprintf("%f", $new_weight)); } } } else {