From 9f867350285cad91e376b8ce4b851a9edd7b5337 Mon Sep 17 00:00:00 2001
From: Anastasia Karachaliou <anastasia.karachaliou@cern.ch>
Date: Thu, 16 Nov 2017 11:21:47 +0100
Subject: [PATCH] cta-rmcd rpm running given the device file of the tape
 library

---
 cta.spec.in                                             | 2 +-
 mediachanger/castorrmc/rmc/CMakeLists.txt               | 4 ++--
 mediachanger/castorrmc/rmc/{rmcd.1cta => cta-rmcd.1cta} | 6 +++---
 mediachanger/castorrmc/rmc/rmc_serv.c                   | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)
 rename mediachanger/castorrmc/rmc/{rmcd.1cta => cta-rmcd.1cta} (96%)

diff --git a/cta.spec.in b/cta.spec.in
index dcac44eff7..8f0cf7948a 100644
--- a/cta.spec.in
+++ b/cta.spec.in
@@ -307,7 +307,7 @@ Tools to faciliate working with rmcd and smc in cta
 #%attr(0755,root,root) %{_bindir}/cta-rmcd
 %attr(0755,root,root) %{_bindir}/smc
 %attr(0755,cta,cta) %dir /var/log/cta
-%attr(0644,root,root) %doc /usr/share/man/man1/rmcd.1cta.gz
+%attr(0644,root,root) %doc /usr/share/man/man1/cta-rmcd.1cta.gz
 %attr(0644,root,root) %doc /usr/share/man/man1/smc.1cta.gz
 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/cta/cta-rmcd.conf
 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/cta/cta-smc.conf.example
diff --git a/mediachanger/castorrmc/rmc/CMakeLists.txt b/mediachanger/castorrmc/rmc/CMakeLists.txt
index 82e97e1f3c..e5dd0e7bc2 100644
--- a/mediachanger/castorrmc/rmc/CMakeLists.txt
+++ b/mediachanger/castorrmc/rmc/CMakeLists.txt
@@ -34,8 +34,8 @@ install (FILES cta-rmcd.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/cta)
 install (FILES cta-smc.conf.example DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/cta)
 
 install (TARGETS cta-rmcd DESTINATION /usr/bin)
-#install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/rmcd.1cta DESTINATION /usr/share/man/man1)
-install (FILES rmcd.1cta DESTINATION /usr/share/man/man1)
+#install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/cta-rmcd.1cta DESTINATION /usr/share/man/man1)
+install (FILES cta-rmcd.1cta DESTINATION /usr/share/man/man1)
 install (FILES cta-rmcd.logrotate DESTINATION /etc/logrotate.d RENAME cta-rmcd)
 install (FILES cta-rmcd.sysconfig DESTINATION /etc/sysconfig RENAME cta-rmcd)
 install (FILES cta-rmcd.service DESTINATION /etc/systemd/system)
diff --git a/mediachanger/castorrmc/rmc/rmcd.1cta b/mediachanger/castorrmc/rmc/cta-rmcd.1cta
similarity index 96%
rename from mediachanger/castorrmc/rmc/rmcd.1cta
rename to mediachanger/castorrmc/rmc/cta-rmcd.1cta
index 274db992ad..dd3498ee6a 100644
--- a/mediachanger/castorrmc/rmc/rmcd.1cta
+++ b/mediachanger/castorrmc/rmc/cta-rmcd.1cta
@@ -3,14 +3,14 @@
 .\"
 .TH RMCD "8castor" "$Date: 2009/08/18 09:43:01 $" CASTOR "rmc Administrator Commands"
 .SH NAME
-rmcd \- start the Remote Media Changer daemon
+cta-rmcd \- start the Remote Media Changer daemon
 .SH SYNOPSIS
-.B rmcd
+.B cta-rmcd
 .I smc_ldr
 .SH DESCRIPTION
 .LP
 The
-.B rmcd
+.B cta-rmcd
 command starts the Remote Media Changer daemon.
 This command is usually executed at system startup time
 .RB ( /etc/rc.local ).
diff --git a/mediachanger/castorrmc/rmc/rmc_serv.c b/mediachanger/castorrmc/rmc/rmc_serv.c
index a09fdc4a2a..e966124822 100644
--- a/mediachanger/castorrmc/rmc/rmc_serv.c
+++ b/mediachanger/castorrmc/rmc/rmc_serv.c
@@ -230,7 +230,7 @@ int main(const int argc,
 
 	switch(argc) {
 	case 1:
-		fprintf(stderr, "RMC01 - robot parameter is mandatory\n");
+		fprintf(stderr, "RMC01 - wrong arguments given ,specify the device file of the tape library\n");
 		exit (USERR);
 	case 2:
 		if(0 == nb_cmdline_options) {
-- 
GitLab