AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only
  • 1.  logrotate - wrong conf path in /opt/freeware/etc/cron.daily/logrotate

    Posted Thu June 17, 2021 11:43 AM
    Hi OSS-Team,

    we installed logrotate and tried to use the provided cron-config /opt/freeware/etc/cron.daily/logrotate, but this cron-file uses /etc/logrotate.conf instead of /opt/freeware/etc/logrotate.conf. Not a real issue in my opinion, but maybe this can be fixed in the build process.

    Installed version of logrotate: 3.14.0-4

    root@testserver /opt/freeware/etc/cron.daily# cat logrotate
    #!/bin/sh
    
    /usr/sbin/logrotate /etc/logrotate.conf
    EXITVALUE=$?
    if [ $EXITVALUE != 0 ]; then
        /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
    fi
    exit $EXITVALUE
    root@testserver /opt/freeware/etc/cron.daily# /opt/freeware/etc/cron.daily/logrotate
    error: cannot stat /etc/logrotate.conf: A file or directory in the path name does not exist.

    root@testserver /opt/freeware/etc/cron.daily# file /etc/logrotate.conf file: 0653-900 cannot open /etc/logrotate.conf.
    root@testserver /opt/freeware/etc/cron.daily# file /opt/freeware/etc/logrotate.conf /opt/freeware/etc/logrotate.conf: commands text
    ​Best regards

    ------------------------------
    Niklas
    ------------------------------


  • 2.  RE: logrotate - wrong conf path in /opt/freeware/etc/cron.daily/logrotate

    Posted Thu June 17, 2021 12:21 PM
    Thank you Niklas for reporting the issue.
    We will review and if required make changes in newer releases of logrotate.

    ------------------------------
    SANKET RATHI
    ------------------------------



  • 3.  RE: logrotate - wrong conf path in /opt/freeware/etc/cron.daily/logrotate

    Posted Mon February 07, 2022 03:14 AM
    Edited by Niklas Vosskoetter Mon February 07, 2022 03:14 AM
    Hi OSS-Team,

    this issues seems to be unfixed. Logrotate ist installed in version 3.18.0-1.

    root@testserver /root# cat /opt/freeware/etc/cron.daily/logrotate
    #!/bin/sh

    /usr/sbin/logrotate /etc/logrotate.conf
    EXITVALUE=$?
    if [ $EXITVALUE != 0 ]; then
    /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
    fi
    exit $EXITVALUE
    root@testserver /root# rpm -q logrotate
    logrotate-3.18.0-1.ppc

    Best regards

    ------------------------------
    Niklas
    System Engineer UNIX and Linux on Power
    ------------------------------



  • 4.  RE: logrotate - wrong conf path in /opt/freeware/etc/cron.daily/logrotate
    Best Answer

    Posted Wed February 09, 2022 08:55 AM
    Fixed release 3.18.0-2 is uploaded to Toolbox. 
    https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/logrotate/logrotate-3.18.0-2.aix6.1.ppc.rpm

    dnf/yum can also be used to update it.

    ------------------------------
    Ayappan P
    ------------------------------