Skip to content
This repository has been archived by the owner on Apr 19, 2021. It is now read-only.

add log directory creation to postinst #3

Merged
merged 1 commit into from
Oct 29, 2015
Merged

add log directory creation to postinst #3

merged 1 commit into from
Oct 29, 2015

Conversation

petiepooo
Copy link
Contributor

This package drops several files into /etc/cron.d that output logs to /var/log/nsm. If that directory has not yet been created, all of those cron entries generate errors which are sent via email to root.

This change creates the log directory upon package installation rather than relying on a subsequent call to sosetup to create it. This avoids a deluge of system emails from cron if there's a delay between package installation and system configuration.

An alternative would be to drop all the cron scripts somewhere other than /etc/cron.d, and copy them over during setup (or out if they're for something that's not configured during sosetup).

Also, if the log directory is created during installation, the explicit mkdir(s) in sosetup can eventually be removed, although they don't necessarily cause harm.

This package drops several files into /etc/cron.d that output logs to /var/log/nsm.  If that directory has not yet been created, all of those cron entries generate errors which are sent via email to root.

This change creates the log directory upon package installation rather than relying on a subsequent call to sosetup to create it.  This avoids a deluge of system emails from cron if there's a delay between package installation and system configuration.

An alternative would be to drop all the cron scripts somewhere other than /etc/cron.d, and copy them over during setup (or out if they're for something that's not configured during sosetup).

Also, if the log directory is created during installation, the explicit mkdir(s) in sosetup can eventually be removed, although they don't necessarily cause harm.
@dougburks
Copy link
Contributor

Thanks, petiepooo! I've created Issue 815 for this:
Security-Onion-Solutions/security-onion#815

dougburks added a commit that referenced this pull request Oct 29, 2015
add log directory creation to postinst
@dougburks dougburks merged commit 222d1ba into Security-Onion-Solutions:master Oct 29, 2015
@petiepooo petiepooo deleted the patch-1 branch November 10, 2015 15:19
dougburks pushed a commit that referenced this pull request Jan 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants