Dash:
[t2.git] / package / filesystem / autofs / 3-syslog.patch
blob897b017f0590c2f660eda56e4c95d335a286768e
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3 #
4 # T2 SDE: package/.../autofs/3-syslog.patch
5 # Copyright (C) 2006 The T2 SDE Project
6 #
7 # More information can be found in the files COPYING and README.
8 #
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
14 # version.
15 # --- T2-COPYRIGHT-NOTE-END ---
17 add -s --stderr option which makes automounter send all log output to stderr
18 adapted from: http://lkml.org/lkml/2004/10/7/217 by Denis Vlasenko
20 diff -urpN autofs-4.1.4-fg/daemon/automount.c autofs-4.1.4-syslog/daemon/automount.c
21 --- autofs-4.1.4-fg/daemon/automount.c 2006-02-12 10:21:38.000000000 -0300
22 +++ autofs-4.1.4-syslog/daemon/automount.c 2006-02-12 10:22:03.000000000 -0300
23 @@ -39,7 +39,7 @@
24 #include <linux/auto_fs4.h>
26 #ifndef NDEBUG
27 -#define assert(x) do { if (!(x)) { syslog(LOG_CRIT, __FILE__ ":%d: assertion failed: " #x, __LINE__); } } while(0)
28 +#define assert(x) do { if (!(x)) { crit(__FILE__ ":%d: assertion failed: " #x, __LINE__); } } while(0)
29 #else
30 #define assert(x) do { } while(0)
31 #endif
32 @@ -62,6 +62,8 @@ int do_verbose = 0; /* Verbose feedback
33 int do_debug = 0; /* Enable full debug output */
34 int daemonize = 1; /* Shall we daemonize? */
36 +int log_stderr; /* Use stderr instead of syslog? */
38 sigset_t ready_sigs; /* signals only accepted in ST_READY */
39 sigset_t lock_sigs; /* signals blocked for locking */
40 sigset_t sigchld_mask;
41 @@ -160,7 +162,7 @@ static int umount_ent(const char *root,
42 umount_ok = 1;
44 if (umount_ok || is_smbfs) {
45 - rv = spawnll(LOG_DEBUG,
46 + rv = spawnll(debug,
47 PATH_UMOUNT, PATH_UMOUNT, path_buf, NULL);
50 @@ -314,13 +316,13 @@ static int do_umount_autofs(void)
51 struct stat st;
52 int ret;
54 - rv = spawnll(LOG_DEBUG,
55 + rv = spawnll(debug,
56 PATH_UMOUNT, PATH_UMOUNT, ap.path, NULL);
57 if (rv & MTAB_NOTUPDATED) {
58 info("umount %s succeeded: "
59 "mtab not updated, retrying to clean\n",
60 ap.path);
61 - rv = spawnll(LOG_DEBUG,
62 + rv = spawnll(debug,
63 PATH_UMOUNT, PATH_UMOUNT, ap.path, NULL);
65 ret = stat(ap.path, &st);
66 @@ -450,7 +452,7 @@ static int mount_autofs(char *path)
68 our_name[len] = '\0';
70 - if (spawnll(LOG_DEBUG, PATH_MOUNT, PATH_MOUNT,
71 + if (spawnll(debug, PATH_MOUNT, PATH_MOUNT,
72 "-t", "autofs", "-o", options, our_name, path, NULL) != 0) {
73 crit("failed to mount autofs path %s", ap.path);
74 rmdir_path(ap.path);
75 @@ -542,7 +544,7 @@ static int send_fail(unsigned int wait_q
76 return 0;
77 debug("send_fail: token=%d\n", wait_queue_token);
78 if (ioctl(ap.ioctlfd, AUTOFS_IOC_FAIL, wait_queue_token) < 0) {
79 - syslog(LOG_ERR, "AUTOFS_IOC_FAIL: %m");
80 + error("AUTOFS_IOC_FAIL: %m");
81 return 1;
83 return 0;
84 @@ -948,7 +950,7 @@ static int get_pkt(int fd, union autofs_
85 if (poll(fds, 2, -1) == -1) {
86 if (errno == EINTR)
87 continue;
88 - syslog(LOG_ERR, "get_pkt: poll failed: %m");
89 + error("get_pkt: poll failed: %s", strerror(errno));
90 return -1;
93 @@ -1277,7 +1279,6 @@ static void become_daemon(void)
95 FILE *pidfp;
96 pid_t pid;
97 - int nullfd;
99 /* Don't BUSY any directories unnecessarily */
100 chdir("/");
101 @@ -1293,9 +1294,12 @@ static void become_daemon(void)
102 exit(1);
106 - /* Open syslog */
107 - openlog("automount", LOG_PID, LOG_DAEMON);
108 + /* Initialize logging subsystem */
109 + if(!log_stderr) {
110 + log_to_syslog();
111 + } else {
112 + log_to_stderr();
115 /* Initialize global data */
116 my_pid = getpid();
117 @@ -1317,26 +1321,14 @@ static void become_daemon(void)
119 my_pgrp = getpgrp();
121 - /* Redirect all our file descriptors to /dev/null */
122 - if ((nullfd = open("/dev/null", O_RDWR)) < 0) {
123 - crit("cannot open /dev/null: %m");
124 - exit(1);
127 - if (dup2(nullfd, STDIN_FILENO) < 0 ||
128 - dup2(nullfd, STDOUT_FILENO) < 0 || dup2(nullfd, STDERR_FILENO) < 0) {
129 - crit("redirecting file descriptors failed: %m");
130 - exit(1);
132 - if (nullfd > 2) close(nullfd);
134 /* Write pid file if requested */
135 if (pid_file) {
136 if ((pidfp = fopen(pid_file, "wt"))) {
137 fprintf(pidfp, "%lu\n", (unsigned long) my_pid);
138 fclose(pidfp);
139 } else {
140 - warn("failed to write pid file %s: %m", pid_file);
141 + warn("failed to write pid file %s: %s", pid_file,
142 + strerror(errno));
143 pid_file = NULL;
146 @@ -1386,6 +1378,7 @@ static void usage(void)
147 " -p --pid-file f write process id to file f\n"
148 " -t --timeout n auto-unmount in n seconds (0-disable)\n"
149 " -f --foreground do not daemonize\n"
150 + " -s --stderr log to stderr instead of syslog\n"
151 " -v --verbose be verbose\n"
152 " -d --debug be even more verbose\n"
153 " -V --version print version and exit\n"
154 @@ -1680,6 +1673,7 @@ int main(int argc, char *argv[])
155 {"pid-file", 1, 0, 'p'},
156 {"timeout", 1, 0, 't'},
157 {"foreground", 0, 0, 'f'},
158 + {"stderr", 0, 0, 's'},
159 {"verbose", 0, 0, 'v'},
160 {"debug", 0, 0, 'd'},
161 {"version", 0, 0, 'V'},
162 @@ -1697,7 +1691,7 @@ int main(int argc, char *argv[])
163 ap.dir_created = 0; /* We haven't created the main directory yet */
165 opterr = 0;
166 - while ((opt = getopt_long(argc, argv, "+hp:t:fvdVg", long_options, NULL)) != EOF) {
167 + while ((opt = getopt_long(argc, argv, "+hp:t:fsvdVg", long_options, NULL)) != EOF) {
168 switch (opt) {
169 case 'h':
170 usage();
171 @@ -1715,6 +1709,10 @@ int main(int argc, char *argv[])
172 daemonize = 0;
173 break;
175 + case 's':
176 + log_stderr = 1;
177 + break;
179 case 'v':
180 do_verbose = 1;
181 break;
182 @@ -1739,7 +1737,7 @@ int main(int argc, char *argv[])
185 if (geteuid() != 0) {
186 - fprintf(stderr, "%s: This program must be run by root.\n", program);
187 + fprintf(stderr, "%s: This program must be run by root\n", program);
188 exit(1);
191 @@ -1766,9 +1764,9 @@ int main(int argc, char *argv[])
192 #ifdef DEBUG
193 if (mapargc) {
194 int i;
195 - syslog(LOG_DEBUG, "Map argc = %d", mapargc);
196 + debug("Map argc = %d", mapargc);
197 for (i = 0; i < mapargc; i++)
198 - syslog(LOG_DEBUG, "Map argv[%d] = %s", i, mapargv[i]);
199 + debug("Map argv[%d] = %s", i, mapargv[i]);
201 #endif
203 diff -urpN autofs-4.1.4-fg/daemon/spawn.c autofs-4.1.4-syslog/daemon/spawn.c
204 --- autofs-4.1.4-fg/daemon/spawn.c 2005-02-10 09:56:53.000000000 -0300
205 +++ autofs-4.1.4-syslog/daemon/spawn.c 2006-02-12 10:22:03.000000000 -0300
206 @@ -199,7 +199,7 @@ out:
208 #define ERRBUFSIZ 2047 /* Max length of error string excl \0 */
210 -static int do_spawn(int logpri, int use_lock, const char *prog, const char *const *argv)
211 +static int do_spawn(logger* log, int use_lock, const char *prog, const char *const *argv)
213 pid_t f;
214 int status, pipefd[2];
215 @@ -260,7 +260,7 @@ static int do_spawn(int logpri, int use_
216 while (errp && (p = memchr(sp, '\n', errp))) {
217 *p++ = '\0';
218 if (sp[0]) /* Don't output empty lines */
219 - syslog(logpri, ">> %s", sp);
220 + log(">> %s", sp);
221 errp -= (p - sp);
222 sp = p;
224 @@ -271,7 +271,7 @@ static int do_spawn(int logpri, int use_
225 if (errp >= ERRBUFSIZ) {
226 /* Line too long, split */
227 errbuf[errp] = '\0';
228 - syslog(logpri, ">> %s", errbuf);
229 + log(">> %s", errbuf);
230 errp = 0;
233 @@ -281,7 +281,7 @@ static int do_spawn(int logpri, int use_
234 if (errp > 0) {
235 /* End of file without \n */
236 errbuf[errp] = '\0';
237 - syslog(logpri, ">> %s", errbuf);
238 + log(">> %s", errbuf);
241 if (waitpid(f, &status, 0) != f)
242 @@ -296,12 +296,12 @@ static int do_spawn(int logpri, int use_
246 -int spawnv(int logpri, const char *prog, const char *const *argv)
247 +int spawnv(logger* log, const char *prog, const char *const *argv)
249 - return do_spawn(logpri, 0, prog, argv);
250 + return do_spawn(log, 0, prog, argv);
253 -int spawnl(int logpri, const char *prog, ...)
254 +int spawnl(logger* log, const char *prog, ...)
256 va_list arg;
257 int argc;
258 @@ -319,10 +319,10 @@ int spawnl(int logpri, const char *prog,
259 while ((*p++ = va_arg(arg, char *)));
260 va_end(arg);
262 - return do_spawn(logpri, 0, prog, (const char **) argv);
263 + return do_spawn(log, 0, prog, (const char **) argv);
266 -int spawnll(int logpri, const char *prog, ...)
267 +int spawnll(logger* log, const char *prog, ...)
269 va_list arg;
270 int argc;
271 @@ -340,5 +340,5 @@ int spawnll(int logpri, const char *prog
272 while ((*p++ = va_arg(arg, char *)));
273 va_end(arg);
275 - return do_spawn(logpri, 1, prog, (const char **) argv);
276 + return do_spawn(log, 1, prog, (const char **) argv);
278 diff -urpN autofs-4.1.4-fg/include/automount.h autofs-4.1.4-syslog/include/automount.h
279 --- autofs-4.1.4-fg/include/automount.h 2005-01-26 10:03:02.000000000 -0300
280 +++ autofs-4.1.4-syslog/include/automount.h 2006-02-12 10:22:03.000000000 -0300
281 @@ -117,13 +117,30 @@ struct autofs_point {
283 extern struct autofs_point ap;
285 + /* log notification */
287 +extern int do_verbose;
288 +extern int do_debug;
290 +typedef void logger(const char* msg, ...);
292 +extern void (*info)(const char* msg, ...);
293 +extern void (*notice)(const char* msg, ...);
294 +extern void (*warn)(const char* msg, ...);
295 +extern void (*error)(const char* msg, ...);
296 +extern void (*crit)(const char* msg, ...);
297 +extern void (*debug)(const char* msg, ...);
299 +void log_to_syslog();
300 +void log_to_stderr();
302 /* Standard function used by daemon or modules */
304 int aquire_lock(void);
305 void release_lock(void);
306 -int spawnll(int logpri, const char *prog, ...);
307 -int spawnl(int logpri, const char *prog, ...);
308 -int spawnv(int logpri, const char *prog, const char *const *argv);
309 +int spawnll(logger *log, const char *prog, ...);
310 +int spawnl(logger *log, const char *prog, ...);
311 +int spawnv(logger *log, const char *prog, const char *const *argv);
312 void reset_signals(void);
313 void ignore_signals(void);
314 void discard_pending(int sig);
315 @@ -282,25 +299,6 @@ int is_mounted(const char *table, const
316 int has_fstab_option(const char *path, const char *opt);
317 int allow_owner_mount(const char *);
319 -/* log notification */
320 -extern int do_verbose;
321 -extern int do_debug;
323 -#define info(msg, args...) \
324 -if (do_verbose || do_debug) \
325 - syslog(LOG_INFO, msg, ##args);
327 -#define warn(msg, args...) \
328 -if (do_verbose || do_debug) \
329 - syslog(LOG_WARNING, msg, ##args);
331 -#define error(msg, args...) syslog(LOG_ERR, msg, ##args);
333 -#define crit(msg, args...) syslog(LOG_CRIT, msg, ##args);
335 -#define debug(msg, args...) \
336 -if (do_debug) \
337 - syslog(LOG_DEBUG, msg, ##args);
339 #endif
341 diff -urpN autofs-4.1.4-fg/lib/Makefile autofs-4.1.4-syslog/lib/Makefile
342 --- autofs-4.1.4-fg/lib/Makefile 2005-01-09 06:16:43.000000000 -0300
343 +++ autofs-4.1.4-syslog/lib/Makefile 2006-02-12 11:06:37.000000000 -0300
344 @@ -12,7 +12,7 @@ RANLIB = /usr/bin/ranlib
345 SRCS = cache.c listmount.c cat_path.c rpc_subs.c mounts.c lock.c
346 RPCS = mount.h mount_clnt.c mount_xdr.c
347 OBJS = cache.o mount_clnt.o mount_xdr.o listmount.o \
348 - cat_path.o rpc_subs.o mounts.o lock.o
349 + cat_path.o rpc_subs.o mounts.o lock.o log.o
351 LIB = autofs.a
353 @@ -48,6 +48,10 @@ listmount.o: listmount.c
354 $(CC) $(CFLAGS) -o listmount.o -c listmount.c
355 $(STRIP) listmount.o
357 +log.o: log.c
358 + $(CC) $(CFLAGS) -o log.o -c log.c
359 + $(STRIP) log.o
361 install: all
363 clean:
364 diff -urpN autofs-4.1.4-fg/lib/log.c autofs-4.1.4-syslog/lib/log.c
365 --- autofs-4.1.4-fg/lib/log.c 1969-12-31 21:00:00.000000000 -0300
366 +++ autofs-4.1.4-syslog/lib/log.c 2006-02-12 10:22:03.000000000 -0300
367 @@ -0,0 +1,116 @@
368 +#include <stdarg.h>
369 +#include <stdio.h>
370 +#include <syslog.h>
371 +#include <unistd.h>
372 +#include <fcntl.h> /* open() */
373 +#include <stdlib.h> /* exit() */
375 +#include "automount.h"
377 +static void null(const char *msg, ...)
381 +void (*info)(const char* msg, ...) = null;
382 +void (*notice)(const char* msg, ...) = null;
383 +void (*warn)(const char* msg, ...) = null;
384 +void (*error)(const char* msg, ...) = null;
385 +void (*crit)(const char* msg, ...) = null;
386 +void (*debug)(const char* msg, ...) = null;
388 +static void syslog_debug(const char *msg, ...)
390 + va_list ap;
391 + va_start(ap, msg);
392 + syslog(LOG_DEBUG, msg, ap);
393 + va_end(ap);
396 +static void syslog_info(const char *msg, ...)
398 + va_list ap;
399 + va_start(ap, msg);
400 + syslog(LOG_INFO, msg, ap);
401 + va_end(ap);
404 +static void syslog_notice(const char *msg, ...)
406 + va_list ap;
407 + va_start(ap, msg);
408 + syslog(LOG_NOTICE, msg, ap);
409 + va_end(ap);
412 +static void syslog_warn(const char *msg, ...)
414 + va_list ap;
415 + va_start(ap, msg);
416 + syslog(LOG_WARNING, msg, ap);
417 + va_end(ap);
420 +static void syslog_err(const char *msg, ...)
422 + va_list ap;
423 + va_start(ap, msg);
424 + syslog(LOG_ERR, msg, ap);
425 + va_end(ap);
428 +static void syslog_crit(const char *msg, ...)
430 + va_list ap;
431 + va_start(ap, msg);
432 + syslog(LOG_CRIT, msg, ap);
433 + va_end(ap);
436 +static void to_stderr(const char *msg, ...)
438 + va_list ap;
439 + va_start(ap, msg);
440 + vfprintf(stderr, msg, ap);
441 + fputc('\n',stderr);
442 + va_end(ap);
445 +void log_to_syslog()
447 + int nullfd;
449 + openlog("automount", LOG_PID, LOG_DAEMON);
450 + if (do_debug) debug = syslog_debug;
451 + if (do_verbose || do_debug) {
452 + info = syslog_info;
453 + notice = syslog_notice;
454 + warn = syslog_warn;
456 + error = syslog_err;
457 + crit = syslog_crit;
459 + /* Redirect all our file descriptors to /dev/null */
460 + nullfd = open("/dev/null", O_RDWR);
461 + if (nullfd < 0) {
462 + crit("cannot open /dev/null: %m");
463 + exit(1);
465 + if (dup2(nullfd, STDIN_FILENO) < 0 ||
466 + dup2(nullfd, STDOUT_FILENO) < 0 || dup2(nullfd, STDERR_FILENO) < 0) {
467 + crit("redirecting file descriptors failed: %m");
468 + exit(1);
470 + if (nullfd > 2) close(nullfd);
473 +void log_to_stderr()
475 + if (do_debug) debug = to_stderr;
476 + if (do_verbose || do_debug) {
477 + info = to_stderr;
478 + notice = to_stderr;
479 + warn = to_stderr;
481 + error = to_stderr;
482 + crit = to_stderr;
484 diff -urpN autofs-4.1.4-fg/modules/lookup_yp.c autofs-4.1.4-syslog/modules/lookup_yp.c
485 --- autofs-4.1.4-fg/modules/lookup_yp.c 2005-02-10 07:59:59.000000000 -0300
486 +++ autofs-4.1.4-syslog/modules/lookup_yp.c 2006-02-12 10:22:03.000000000 -0300
487 @@ -69,7 +69,7 @@ int lookup_init(const char *mapfmt, int
488 /* This should, but doesn't, take a const char ** */
489 err = yp_get_default_domain((char **) &ctxt->domainname);
490 if (err) {
491 - crit(MODPREFIX "map %s: %s\n", ctxt->mapname,
492 + crit(MODPREFIX "map %s: %s", ctxt->mapname,
493 yperr_string(err));
494 return 1;
496 diff -urpN autofs-4.1.4-fg/modules/mount_bind.c autofs-4.1.4-syslog/modules/mount_bind.c
497 --- autofs-4.1.4-fg/modules/mount_bind.c 2005-01-10 10:28:29.000000000 -0300
498 +++ autofs-4.1.4-syslog/modules/mount_bind.c 2006-02-12 11:08:06.000000000 -0300
499 @@ -59,7 +59,7 @@ int mount_init(void **context)
500 if (lstat(tmp1, &st1) == -1)
501 goto out;
503 - err = spawnl(LOG_DEBUG,
504 + err = spawnl(debug,
505 PATH_MOUNT, PATH_MOUNT, "-n", "--bind", tmp1, tmp2, NULL);
507 if (err == 0 &&
508 @@ -69,7 +69,7 @@ int mount_init(void **context)
511 debug(MODPREFIX "bind_works = %d\n", bind_works);
512 - spawnl(LOG_DEBUG,
513 + spawnl(debug,
514 PATH_UMOUNT, PATH_UMOUNT, "-n", tmp2, NULL);
516 out:
517 @@ -131,7 +131,7 @@ int mount_mount(const char *root, const
518 "calling mount --bind " SLOPPY " -o %s %s %s",
519 options, what, fullpath);
521 - err = spawnll(LOG_NOTICE,
522 + err = spawnll(notice,
523 PATH_MOUNT, PATH_MOUNT, "--bind",
524 SLOPPYOPT "-o", options,
525 what, fullpath, NULL);
526 diff -urpN autofs-4.1.4-fg/modules/mount_changer.c autofs-4.1.4-syslog/modules/mount_changer.c
527 --- autofs-4.1.4-fg/modules/mount_changer.c 2005-01-09 06:16:43.000000000 -0300
528 +++ autofs-4.1.4-syslog/modules/mount_changer.c 2006-02-12 11:09:46.000000000 -0300
529 @@ -68,7 +68,7 @@ int mount_mount(const char *root, const
531 debug(MODPREFIX "calling umount %s", what);
533 - err = spawnll(LOG_DEBUG,
534 + err = spawnll(debug,
535 PATH_UMOUNT, PATH_UMOUNT, what, NULL);
536 if (err) {
537 error(MODPREFIX "umount of %s failed (all may be unmounted)",
538 @@ -98,14 +98,14 @@ int mount_mount(const char *root, const
539 debug(MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s",
540 fstype, options, what, fullpath);
542 - err = spawnll(LOG_DEBUG,
543 + err = spawnll(debug,
544 PATH_MOUNT, PATH_MOUNT, "-t", fstype,
545 SLOPPYOPT "-o", options, what, fullpath, NULL);
546 } else {
547 debug(MODPREFIX "calling mount -t %s %s %s",
548 fstype, what, fullpath);
550 - err = spawnll(LOG_DEBUG, PATH_MOUNT, PATH_MOUNT,
551 + err = spawnll(debug, PATH_MOUNT, PATH_MOUNT,
552 "-t", fstype, what, fullpath, NULL);
555 diff -urpN autofs-4.1.4-fg/modules/mount_ext2.c autofs-4.1.4-syslog/modules/mount_ext2.c
556 --- autofs-4.1.4-fg/modules/mount_ext2.c 2005-01-10 10:28:29.000000000 -0300
557 +++ autofs-4.1.4-syslog/modules/mount_ext2.c 2006-02-12 11:10:21.000000000 -0300
558 @@ -93,10 +93,10 @@ int mount_mount(const char *root, const
559 #endif
560 if (ro) {
561 debug(MODPREFIX "calling %s -n %s", fsck_prog, what);
562 - err = spawnl(LOG_DEBUG, fsck_prog, fsck_prog, "-n", what, NULL);
563 + err = spawnl(debug, fsck_prog, fsck_prog, "-n", what, NULL);
564 } else {
565 debug(MODPREFIX "calling %s -p %s", fsck_prog, what);
566 - err = spawnl(LOG_DEBUG, fsck_prog, fsck_prog, "-p", what, NULL);
567 + err = spawnl(debug, fsck_prog, fsck_prog, "-p", what, NULL);
570 if (err & ~6) {
571 @@ -108,13 +108,13 @@ int mount_mount(const char *root, const
572 if (options) {
573 debug(MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s",
574 fstype, options, what, fullpath);
575 - err = spawnll(LOG_NOTICE,
576 + err = spawnll(notice,
577 PATH_MOUNT, PATH_MOUNT, "-t", fstype,
578 SLOPPYOPT "-o", options, what, fullpath, NULL);
579 } else {
580 debug(MODPREFIX "calling mount -t %s %s %s",
581 fstype, what, fullpath);
582 - err = spawnll(LOG_NOTICE,
583 + err = spawnll(notice,
584 PATH_MOUNT, PATH_MOUNT, "-t", fstype,
585 what, fullpath, NULL);
587 diff -urpN autofs-4.1.4-fg/modules/mount_generic.c autofs-4.1.4-syslog/modules/mount_generic.c
588 --- autofs-4.1.4-fg/modules/mount_generic.c 2005-01-10 10:28:29.000000000 -0300
589 +++ autofs-4.1.4-syslog/modules/mount_generic.c 2006-02-12 11:07:28.000000000 -0300
590 @@ -77,13 +77,13 @@ int mount_mount(const char *root, const
591 debug(MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s",
592 fstype, options, what, fullpath);
594 - err = spawnll(LOG_NOTICE,
595 + err = spawnll(notice,
596 PATH_MOUNT, PATH_MOUNT, "-t", fstype,
597 SLOPPYOPT "-o", options, what, fullpath, NULL);
598 } else {
599 debug(MODPREFIX "calling mount -t %s %s %s",
600 fstype, what, fullpath);
601 - err = spawnll(LOG_NOTICE,
602 + err = spawnll(notice,
603 PATH_MOUNT, PATH_MOUNT, "-t", fstype,
604 what, fullpath, NULL);
606 diff -urpN autofs-4.1.4-fg/modules/mount_nfs.c autofs-4.1.4-syslog/modules/mount_nfs.c
607 --- autofs-4.1.4-fg/modules/mount_nfs.c 2005-04-05 08:42:42.000000000 -0400
608 +++ autofs-4.1.4-syslog/modules/mount_nfs.c 2006-02-12 11:09:09.000000000 -0300
609 @@ -449,14 +449,14 @@ int mount_mount(const char *root, const
610 debug(MODPREFIX "calling mount -t nfs " SLOPPY
611 " -o %s %s %s", nfsoptions, whatstr, fullpath);
613 - err = spawnll(LOG_NOTICE,
614 + err = spawnll(notice,
615 PATH_MOUNT, PATH_MOUNT, "-t",
616 "nfs", SLOPPYOPT "-o", nfsoptions,
617 whatstr, fullpath, NULL);
618 } else {
619 debug(MODPREFIX "calling mount -t nfs %s %s",
620 whatstr, fullpath);
621 - err = spawnll(LOG_NOTICE,
622 + err = spawnll(notice,
623 PATH_MOUNT, PATH_MOUNT, "-t",
624 "nfs", whatstr, fullpath, NULL);