Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | From 2cbc576ea1fbd1cbf4579d64b30e41d762084e7f Mon Sep 17 00:00:00 2001 |
| 2 | From: "yanjun.zhu" <yanjun.zhu@windriver.com> |
| 3 | Date: Tue, 15 Jan 2013 12:45:44 +0800 |
| 4 | Subject: [PATCH] autofs: do not check for modprobe |
| 5 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 6 | Description: 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 | |
| 12 | Upstream-Status: Backport [1] |
| 13 | [1] http://www.spinics.net/lists/autofs/msg00139.html |
| 14 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 15 | --- |
| 16 | configure.in | 6 ------ |
| 17 | daemon/module.c | 3 +++ |
| 18 | include/automount.h | 11 +++-------- |
| 19 | 3 files changed, 6 insertions(+), 14 deletions(-) |
| 20 | |
| 21 | diff --git a/configure.in b/configure.in |
| 22 | index 44a1c8b..b226236 100644 |
| 23 | --- a/configure.in |
| 24 | +++ b/configure.in |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 25 | @@ -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 Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 37 | @@ -142,7 +137,6 @@ AF_PATH_INCLUDE(UMOUNT, umount, /bin/umount, $searchpath) |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 38 | 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 Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 45 | diff --git a/daemon/module.c b/daemon/module.c |
| 46 | index bed8f7a..e41a98e 100644 |
| 47 | --- a/daemon/module.c |
| 48 | +++ b/daemon/module.c |
| 49 | @@ -19,6 +19,8 @@ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 50 | #include "automount.h" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 51 | #include "nsswitch.h" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 52 | |
| 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 Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 58 | @@ -53,6 +55,7 @@ int load_autofs4_module(void) |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 59 | |
| 60 | return 1; |
| 61 | } |
| 62 | +#endif |
| 63 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 64 | int open_lookup(const char *name, const char *err_prefix, const char *mapfmt, |
| 65 | int argc, const char *const *argv, struct lookup_mod **lookup) |
| 66 | diff --git a/include/automount.h b/include/automount.h |
| 67 | index c0f5fbf..cc336ad 100644 |
| 68 | --- a/include/automount.h |
| 69 | +++ b/include/automount.h |
| 70 | @@ -51,16 +51,11 @@ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 71 | #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 | |