diff --git a/bin/init.d/ceph.service b/bin/init.d/ceph.service index 623becd9..450856e6 100644 --- a/bin/init.d/ceph.service +++ b/bin/init.d/ceph.service @@ -8,4 +8,4 @@ ExecStart=/usr/sbin/ceph-disk --log-stdout activate-all Type=oneshot [Install] -WantedBy=ceph.target +WantedBy=multi-user.target diff --git a/debian/postinst b/debian/postinst index 13fda4c1..6aac8f85 100755 --- a/debian/postinst +++ b/debian/postinst @@ -79,6 +79,17 @@ EOF # disable fancy init messages (bad with bootlogd) test -f /etc/lsb-base-logging.sh || echo "FANCYTTY=0" >/etc/lsb-base-logging.sh + if [ -f /etc/systemd/system/ceph.service ]; then + md5=$(md5sum /etc/systemd/system/ceph.service) + if [[ "$md5" == "21b2e7a7c4ffcf92ad0ec2c905e88e5b /etc/systemd/system/ceph.service" ]]; then + echo "Updating PVE ceph.service to correct install target.." + cp /usr/share/doc/pve-manager/examples/ceph.service /etc/systemd/system/ceph.service + systemctl --system daemon-reload >/dev/null || true + systemctl --system disable ceph.service + systemctl --system enable ceph.service + echo " done" + fi + fi systemctl --system daemon-reload >/dev/null || true