Skip to content

logrotate: fix default mail command and state file path#29

Open
jacklul wants to merge 1 commit into
Entware:masterfrom
jacklul:fix-logrotate
Open

logrotate: fix default mail command and state file path#29
jacklul wants to merge 1 commit into
Entware:masterfrom
jacklul:fix-logrotate

Conversation

@jacklul

@jacklul jacklul commented Jul 8, 2026

Copy link
Copy Markdown

Closes Entware/Entware#1259

Compile tested: armv7sf-k3.2
Run tested: armv7sf-k3.2

Current version:

admin@RT-AX58U:/jffs# /opt/sbin/logrotate --help
Usage: logrotate [OPTION...] <configfile>
  -d, --debug                   Don't do anything, just test and print debug messages
  -f, --force                   Force file rotation
  -m, --mail=command            Command to send mail (instead of `/bin/mail')
  -s, --state=statefile         Path of state file
      --skip-state-lock         Do not lock the state file
      --wait-for-state-lock     Wait for lock on the state file
  -v, --verbose                 Display messages during rotation
  -l, --log=logfile             Log file or 'syslog' to log to syslog
      --version                 Display version information

Help options:
  -?, --help                    Show this help message
      --usage                   Display brief usage message
admin@RT-AX58U:/jffs# /opt/sbin/logrotate --debug /opt/etc/logrotate.conf

...
Reading state from file: /var/lib/logrotate.status
state file /var/lib/logrotate.status does not exist
Allocating hash table for state file, size 64 entries
...

With this patch:

admin@RT-AX58U:/jffs# /tmp/logrotate --help
Usage: logrotate [OPTION...] <configfile>
  -d, --debug                   Don't do anything, just test and print debug messages
  -f, --force                   Force file rotation
  -m, --mail=command            Command to send mail (instead of `/opt/bin/mail')
  -s, --state=statefile         Path of state file
      --skip-state-lock         Do not lock the state file
      --wait-for-state-lock     Wait for lock on the state file
  -v, --verbose                 Display messages during rotation
  -l, --log=logfile             Log file or 'syslog' to log to syslog
      --version                 Display version information

Help options:
  -?, --help                    Show this help message
      --usage                   Display brief usage message
admin@RT-AX58U:/jffs# /tmp/logrotate --debug /opt/etc/logrotate.conf

...
Reading state from file: /opt/var/lib/logrotate.status
Allocating hash table for state file, size 64 entries
...

I've also bumped PKG_RELEASE, as it seems appropriate.

Could also be fixed by adding new patch file instead, let me know if you'd prefer that.

Signed-off-by: Jack'lul <jacklulcat@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Logrotate makefile compile options are ignored

1 participant