Add rcopenwsman symlink
diff --git a/ChangeLog b/ChangeLog
index 4cb6f02..ddbfce8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,9 @@
- Unchecked memory allocation in dictionary_new(), d, d->val, d->key, d->hash
- Unchecked memory allocation in u_error_new(), *error
- sighup_handler() in wsmand.c uses unsafe functions in a signal handler
+- Features
+ - add rcopenwsman command to systemd environments
+ - add rcopenwsmand command for backwards compatibility
- Bindings
- support rdoc 2.1 in Ruby bindings
- cmake: use PYTHON_INCLUDE_DIRS
diff --git a/package/openwsman.spec.in b/package/openwsman.spec.in
index e31d2f2..a681e5c 100644
--- a/package/openwsman.spec.in
+++ b/package/openwsman.spec.in
@@ -54,10 +54,13 @@
BuildRequires: pkgconfig
BuildRequires: ruby
+# RHEL6 is missing ruby-devel in OBS
+%if 0%{?rhel_version} != 700
BuildRequires: ruby-devel
%if 0%{?fedora} == 0
BuildRequires: ruby-rdoc
%endif
+%endif
%if 0%{?fedora} == 19
BuildRequires: rubypick
@@ -340,6 +343,10 @@
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d
install -m 755 build/etc/init/openwsmand.sh $RPM_BUILD_ROOT%{_sysconfdir}/init.d/openwsmand
ln -sf %{_sysconfdir}/init.d/openwsmand $RPM_BUILD_ROOT%{_sbindir}/rcopenwsmand
+%else
+# rcopenwsmand for systemd
+ln -sf %{_sbindir}/service $RPM_BUILD_ROOT%{_sbindir}/rcopenwsman
+ln -sf %{_sbindir}/rcopenwsman $RPM_BUILD_ROOT%{_sbindir}/rcopenwsmand
%endif
install -m 644 etc/openwsman.conf $RPM_BUILD_ROOT%{_sysconfdir}/openwsman
install -m 644 etc/openwsman_client.conf $RPM_BUILD_ROOT%{_sysconfdir}/openwsman
@@ -471,8 +478,11 @@
%endif
%if 0%{?suse_version} <= 1210
%attr(0755,root,root) %{_sysconfdir}/init.d/openwsmand
-%{_sbindir}/rcopenwsmand
+%else
+%{_sbindir}/rcopenwsman
%endif
+# backwards compatibility
+%{_sbindir}/rcopenwsmand
%dir %{_libdir}/openwsman
%dir %{_libdir}/openwsman/authenticators
%{_libdir}/openwsman/authenticators/*.so