Commit 74012838 authored by Anastasia Karachaliou's avatar Anastasia Karachaliou
Browse files

rpm cta-rmcd running and having logs printed in /var/log/cta/cta-rmcd.log

parent a8297627
......@@ -18,7 +18,7 @@ cat /tmp/library-rc.sh
. /tmp/library-rc.sh
# to get rmcd logs to stdout
tail -F /var/log/castor/rmcd_legacy.log &
tail -F /var/log/cta/cta-rmcd.log &
ln -s /dev/${LIBRARYDEVICE} /dev/smc
/usr/bin/rmcd -f /dev/smc
......@@ -72,7 +72,7 @@ EOS_BATCHFILE=$(mktemp --suffix=.eosh)
dd if=/dev/urandom of=/tmp/testfile bs=1k count=${FILE_KB_SIZE} || exit 1
if [[ $VERBOSE == 1 ]]; then
tail -v -f /mnt/logs/tpsrv0*/rmcd/castor/rmcd_legacy.log &
tail -v -f /mnt/logs/tpsrv0*/rmcd/cta/cta-rmcd.log &
TAILPID=$!
fi
......
......@@ -295,6 +295,7 @@ Utilities to faciliate working with the mediachangers
Summary: Tools to faciliate working with rmcd and smc in cta
Group: Application/CTA
Requires: logrotate
#Requires: cta-lib
Requires(pre): /usr/bin/getent, /usr/sbin/groupadd, /usr/sbin/useradd
%description -n cta-rmcd
CERN Tape Archive:
......@@ -303,16 +304,17 @@ Tools to faciliate working with rmcd and smc in cta
/usr/bin/getent group cta || /usr/sbin/groupadd cta
/usr/bin/getent passwd cta || /usr/sbin/useradd -s /bin/nologin -c "CTA system account" -g cta cta
%files -n cta-rmcd
%attr(0755,root,root) %{_bindir}/cta-rmcd
#%attr(0755,root,root) %{_bindir}/cta-rmcd
%attr(0755,root,root) %{_bindir}/smc
%defattr(-,root,root)
%attr(0755,cta,cta) %dir /var/log/cta
%attr(0644,root,root) %config(noreplace) /etc/logrotate.d/cta-rmcd
%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(0755,root,root) %{_bindir}/cta-rmcd
%attr(0755,root,root) %{_bindir}/smc
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/cta/cta-rmcd.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/cta/cta-smc.conf.example
%attr(0644,root,root) %doc /usr/share/man/man1/smc.1cta.gz
%attr(0644,root,root) /etc/sysconfig/cta-rmcd
%attr(0644,root,root) %config(noreplace) /etc/logrotate.d/cta-rmcd
%attr(0644,root,root) /etc/systemd/system/cta-rmcd.service
%endif
......@@ -29,12 +29,10 @@ set (RMCD_SRC_FILES
)
add_executable(cta-rmcd ${RMCD_SRC_FILES})
target_link_libraries(cta-rmcd ctarmccommon)
#install (FILES cta-rmcd.conf.example DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/cta)
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}/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)
......
......@@ -84,7 +84,7 @@ itself.
The completion code of the command is also logged.
.SH FILES
.TP 1.5i
.B /var/log/castor/rmcd.log
.B /var/log/cta/cta-rmcd.log
.SH EXAMPLES
.TP
Here is a small log:
......
/var/log/cta/cta-rmc*.log {
/var/log/cta/cta-rmcd*.log {
compress
daily
missingok
......
......@@ -32,7 +32,7 @@ int rmc_logit(const char *const func, const char *const msg, ...)
tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, jid, func);
vsprintf (prtbuf+strlen(prtbuf), msg, args);
va_end (args);
fd_log = open("/var/log/castor/rmcd_legacy.log", O_WRONLY | O_CREAT | O_APPEND, 0664);
fd_log = open("/var/log/cta/cta-rmcd.log", O_WRONLY | O_CREAT | O_APPEND, 0664);
if (fd_log < 0) return -1;
write (fd_log, prtbuf, strlen(prtbuf));
close (fd_log);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment