mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Create a dummy /etc/printcap when starting bsnmpd so it it will not log errors. Fixes #6838
This commit is contained in:
parent
bb6d61b102
commit
63b44eed9e
@ -2300,6 +2300,11 @@ function services_snmpd_configure() {
|
||||
echo gettext("Starting SNMP daemon... ");
|
||||
}
|
||||
|
||||
/* Make sure a printcap file exists or else bsnmpd will log errors. See https://redmine.pfsense.org/issues/6838 */
|
||||
if (!file_exists('/etc/printcap')) {
|
||||
@file_put_contents('/etc/printcap', "# Empty file to prevent bsnmpd from logging errors.\n");
|
||||
}
|
||||
|
||||
/* generate snmpd.conf */
|
||||
$fd = fopen("{$g['varetc_path']}/snmpd.conf", "w");
|
||||
if (!$fd) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user