[pve-devel] [PATCH v4 manager 4/5] replace SysV init script with our own service
Fabian Grünbichler
f.gruenbichler at proxmox.com
Wed Dec 21 15:56:15 CET 2016
for more information see http://tracker.ceph.com/issues/18305 .
Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
PVE/CLI/pveceph.pm | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/PVE/CLI/pveceph.pm b/PVE/CLI/pveceph.pm
index c6af98d..d877fc1 100755
--- a/PVE/CLI/pveceph.pm
+++ b/PVE/CLI/pveceph.pm
@@ -131,6 +131,17 @@ __PACKAGE__->register_method ({
'install', '--',
'ceph', 'ceph-common', 'gdisk');
+ if (PVE::CephTools::systemd_managed() && ! -e '/etc/systemd/system/ceph.service') {
+ #to disable old SysV init scripts.
+ print "replacing ceph init script with own ceph.service\n";
+ eval {
+ PVE::Tools::run_command('cp -v /usr/share/doc/pve-manager/examples/ceph.service /etc/systemd/system/ceph.service');
+ PVE::Tools::run_command('systemctl daemon-reload');
+ PVE::Tools::run_command('systemctl enable ceph.service');
+ };
+ warn "could not install ceph.service\n" if $@;
+ }
+
return undef;
}});
--
2.1.4
More information about the pve-devel
mailing list