[pve-devel] [PATCH pve-manager 1/3] Add check if ceph is managed by systemd.
Wolfgang Link
w.link at proxmox.com
Tue May 24 15:58:10 CEST 2016
---
PVE/CephTools.pm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/PVE/CephTools.pm b/PVE/CephTools.pm
index c7749bb..4d551da 100644
--- a/PVE/CephTools.pm
+++ b/PVE/CephTools.pm
@@ -353,4 +353,21 @@ sub list_disks {
return $disklist;
}
+sub systemd_managed {
+
+ my $version;
+ my $outfunc = sub {
+ my $line = shift;
+
+ if ($line =~ m/ceph version (\d+.\d+.\d+)/) {
+ $version = $1;
+ }
+ };
+
+ run_command(['/usr/bin/ceph', '--version'], outfunc => $outfunc);
+
+ my $ret = $version gt 1 ? 1 : 0;
+ return $ret;
+}
+
1;
--
2.1.4
More information about the pve-devel
mailing list