@@ -10,8 +10,6 @@ OWFS_ARGS=""
case "$1" in
start)
printf "Starting ${NAME}: "
- # Fuse may be in a module, so try to load it
- modprobe -q fuse && printf "[fuse] "
mkdir -p ${OWFS_MOUNTPOINT}
start-stop-daemon -S -x ${DAEMON} -- \
--pid_file ${PID_F} -m ${OWFS_MOUNTPOINT} ${OWFS_DEVICES} \
@@ -35,6 +35,17 @@ define OWFS_CREATE_MOUNTPOINT
mkdir -p $(TARGET_DIR)/dev/1wire
endef
OWFS_POST_INSTALL_TARGET_HOOKS += OWFS_CREATE_MOUNTPOINT
+ifeq ($(BR2_LINUX_KERNEL),y)
+define OWFS_GEN_MODULES_CONF
+ $(INSTALL) -d -m 755 $(TARGET_DIR)/etc/modules-load.d
+ { \
+ find $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/kernel/fs/fuse -name 'fuse.ko*'; \
+ } 2> /dev/null | { \
+ sed 's:^.*/::; s:\.ko[^ ]*::'; \
+ } > $(TARGET_DIR)/etc/modules-load.d/60-owfs.conf
+endef
+OWFS_TARGET_FINALIZE_HOOKS += OWFS_GEN_MODULES_CONF
+endif
else
OWFS_CONF_OPTS += --disable-owfs
endif