autofs: add log service, fix patch

This commit is contained in:
classabbyamp 2022-03-08 02:57:59 -05:00 committed by Echo
parent c5d1c7fbb8
commit c50e41d564
4 changed files with 15 additions and 12 deletions

View file

@ -0,0 +1,2 @@
#!/bin/sh
exec vlogger -p daemon.info -t autofs

View file

@ -1,2 +1,3 @@
#!/bin/sh
exec 2>&1
exec automount -f

View file

@ -30,18 +30,18 @@
#include <dlfcn.h>
--- a/lib/log.c.orig 2019-03-30 10:49:52.965336128 +0100
+++ b/lib/log.c 2019-03-30 10:50:43.232710045 +0100
@@ -38,7 +38,11 @@ static char *prepare_attempt_prefix(cons
char buffer[ATTEMPT_ID_SIZE + 1];
char *prefixed_msg = NULL;
@@ -38,7 +38,11 @@
char buffer[ATTEMPT_ID_SIZE + 1];
char *prefixed_msg = NULL;
- attempt_id = pthread_getspecific(key_thread_attempt_id);
+ if (key_thread_attempt_id) {
+ attempt_id = pthread_getspecific(key_thread_attempt_id);
+ } else {
+ attempt_id = 0;
+ }
if (attempt_id) {
int len = sizeof(buffer) + 1 + strlen(msg) + 1;
- attempt_id = pthread_getspecific(key_thread_attempt_id);
+ if (key_thread_attempt_id) {
+ attempt_id = pthread_getspecific(key_thread_attempt_id);
+ } else {
+ attempt_id = 0;
+ }
if (attempt_id) {
int len = sizeof(buffer) + 1 + strlen(msg) + 1;
--- a/include/hash.h 2021-01-31 09:22:19.668222263 +0100
+++ b/include/hash.h 2021-01-31 09:22:41.390327622 +0100

View file

@ -1,7 +1,7 @@
# Template file for 'autofs'
pkgname=autofs
version=5.1.8
revision=1
revision=2
build_style=gnu-configure
make_build_args="DONTSTRIP=1"
configure_args="--with-libtirpc --with-mapdir=/etc/autofs --sbindir=/usr/bin"