# /etc/systemd/system. May as well stop them too for completeness
# (although strictly service_del_preun would do that anyway by dint
# of stopping ceph.target)
- SERVICE_LIST=$(systemctl | grep -E '^ceph-mon@|^ceph-create-keys@|^ceph-osd@|^ceph-mds@|^ceph-disk-' | cut -d' ' -f1)
- if [ -n "$SERVICE_LIST" ]; then
- for SERVICE in $SERVICE_LIST; do
- /usr/bin/systemctl --no-reload disable $SERVICE > /dev/null 2>&1 || :
- /usr/bin/systemctl stop $SERVICE > /dev/null 2>&1 || :
- done
+ if [ $1 = 0 ] ; then
+ SERVICE_LIST=$(systemctl | grep -E '^ceph-mon@|^ceph-create-keys@|^ceph-osd@|^ceph-mds@|^ceph-disk-' | cut -d' ' -f1)
+ if [ -n "$SERVICE_LIST" ]; then
+ for SERVICE in $SERVICE_LIST; do
+ /usr/bin/systemctl --no-reload disable $SERVICE > /dev/null 2>&1 || :
+ /usr/bin/systemctl stop $SERVICE > /dev/null 2>&1 || :
+ done
+ fi
fi
%else
%if 0%{?opensuse} || 0%{?suse_version}