Skip to content
Snippets Groups Projects
Commit 68fee20e authored by Christian Göttsche's avatar Christian Göttsche Committed by Kamil Dudka
Browse files

add compile time settings into version output

example output:

$ logrotate --version
logrotate 3.12.3

    Default mail command:       /bin/mail
    Default compress command:   /bin/gzip
    Default uncompress command: /bin/gunzip
    Default compress extension: .gz
    Default state file path:    /var/lib/logrotate.status
    ACL support:                yes
    SELinux support:            yes

Closes #145
parent 2c70e2fb
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -2604,6 +2604,22 @@ int main(int argc, const char **argv)
break;
case 'V':
printf("logrotate %s\n", VERSION);
printf("\n");
printf(" Default mail command: %s\n", DEFAULT_MAIL_COMMAND);
printf(" Default compress command: %s\n", COMPRESS_COMMAND);
printf(" Default uncompress command: %s\n", UNCOMPRESS_COMMAND);
printf(" Default compress extension: %s\n", COMPRESS_EXT);
printf(" Default state file path: %s\n", STATEFILE);
#ifdef WITH_ACL
printf(" ACL support: yes\n");
#else
printf(" ACL support: no\n");
#endif
#ifdef WITH_SELINUX
printf(" SELinux support: yes\n");
#else
printf(" SELinux support: no\n");
#endif
poptFreeContext(optCon);
exit(0);
default:
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment