blob: 1d5c3e1eeb264341177ccdfbf646487605a2862d [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001From 2cbc576ea1fbd1cbf4579d64b30e41d762084e7f Mon Sep 17 00:00:00 2001
2From: "yanjun.zhu" <yanjun.zhu@windriver.com>
3Date: Tue, 15 Jan 2013 12:45:44 +0800
4Subject: [PATCH] autofs: do not check for modprobe
5
Patrick Williamsb48b7b42016-08-17 15:04:38 -05006Description: Loading autofs module is #ifdef'ed in the source, so
7 there is no need to check for /proc (which is only used
8 to load module) or modprobe. Both modprobe and /proc
9 are always in the fixed location so there's no need to
10 check for these to start with.
11
12Upstream-Status: Backport [1]
13[1] http://www.spinics.net/lists/autofs/msg00139.html
14
Brad Bishop316dfdd2018-06-25 12:45:53 -040015---
16 configure.in | 6 ------
17 daemon/module.c | 3 +++
18 include/automount.h | 11 +++--------
19 3 files changed, 6 insertions(+), 14 deletions(-)
20
21diff --git a/configure.in b/configure.in
22index 44a1c8b..b226236 100644
23--- a/configure.in
24+++ b/configure.in
Patrick Williamsb48b7b42016-08-17 15:04:38 -050025@@ -34,11 +34,6 @@ AC_MSG_CHECKING([for binaries in])
26 AC_MSG_RESULT([$searchpath])
27
28 #
29-# Make sure we have "/proc"
30-#
31-AF_LINUX_PROCFS()
32-
33-#
34 # Location of init.d directory?
35 #
36 AF_INIT_D()
Brad Bishop316dfdd2018-06-25 12:45:53 -040037@@ -142,7 +137,6 @@ AF_PATH_INCLUDE(UMOUNT, umount, /bin/umount, $searchpath)
Patrick Williamsb48b7b42016-08-17 15:04:38 -050038 AF_PATH_INCLUDE(E2FSCK, fsck.ext2 e2fsck, , $searchpath)
39 AF_PATH_INCLUDE(E3FSCK, fsck.ext3 e3fsck, , $searchpath)
40 AF_PATH_INCLUDE(E4FSCK, fsck.ext4 e4fsck, , $searchpath)
41-AF_PATH_INCLUDE(MODPROBE, modprobe, , $searchpath)
42
43 AF_CHECK_PROG(LEX, flex lex, , $searchpath)
44 AF_CHECK_PROG(YACC, bison, , $searchpath)
Brad Bishop316dfdd2018-06-25 12:45:53 -040045diff --git a/daemon/module.c b/daemon/module.c
46index bed8f7a..e41a98e 100644
47--- a/daemon/module.c
48+++ b/daemon/module.c
49@@ -19,6 +19,8 @@
Patrick Williamsb48b7b42016-08-17 15:04:38 -050050 #include "automount.h"
Brad Bishop316dfdd2018-06-25 12:45:53 -040051 #include "nsswitch.h"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050052
53+#if 0
54+/* see comment in daemon/automount.c around load_autofs4_module() call */
55 int load_autofs4_module(void)
56 {
57 FILE *fp;
Brad Bishop316dfdd2018-06-25 12:45:53 -040058@@ -53,6 +55,7 @@ int load_autofs4_module(void)
Patrick Williamsb48b7b42016-08-17 15:04:38 -050059
60 return 1;
61 }
62+#endif
63
Brad Bishop316dfdd2018-06-25 12:45:53 -040064 int open_lookup(const char *name, const char *err_prefix, const char *mapfmt,
65 int argc, const char *const *argv, struct lookup_mod **lookup)
66diff --git a/include/automount.h b/include/automount.h
67index c0f5fbf..cc336ad 100644
68--- a/include/automount.h
69+++ b/include/automount.h
70@@ -51,16 +51,11 @@
Patrick Williamsb48b7b42016-08-17 15:04:38 -050071 #error Failed to locate umount(8)!
72 #endif
73
74-#ifndef HAVE_MODPROBE
75-#error Failed to locate modprobe(8)!
76-#endif
77-
78-#ifndef HAVE_LINUX_PROCFS
79-#error Failed to verify existence of procfs filesystem!
80-#endif
81-
82+#if 0
83+/* see comment in daemon/automount.c around load_autofs4_module() call */
84 #define FS_MODULE_NAME "autofs4"
85 int load_autofs4_module(void);
86+#endif
87
88 /* The -s (sloppy) option to mount is good, if we have it... */
89