1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2009-2012 OpenWrt.org
9 # Workaround insufficient /dev/fuse permissions and the lack of /etc/fuse.conf
21 local args
="--foreground --error_print=1 $2"
25 config_get_bool enabled
"$config" enabled
0
26 [ "${enabled}" -eq 0 ] && return 1
29 config_get_bool
readonly "$config" readonly 0
30 [ "${readonly}" -eq 1 ] && append args
"--readonly"
33 config_get error_level
"$config" error_level
34 [ -n "${error_level}" ] && append args
"--error_level=${error_level}"
37 config_get options
"$config" options
40 config_list_foreach
"$config" devices append_device
42 config_get SERVICE_UID
"$config" uid
"$DEFAULT_SERVICE_UID"
43 config_get SERVICE_GID
"$config" gid
"$DEFAULT_SERVICE_GID"
45 service_start
"/usr/bin/$program" $args $options $devices
55 config_get mountpoint
"$config" mountpoint
/mnt
/owfs
56 append args
"--mountpoint=${mountpoint}"
58 local fuse_allow_other
59 config_get_bool fuse_allow_other
"$config" fuse_allow_other
0
60 [ "${fuse_allow_other}" -eq 1 ] && append args
"--allow_other"
63 config_get fuse_open_opt
"$config" fuse_open_opt
64 [ -n "${fuse_open_opt}" ] && append args
"--fuse_open_opt=\"${fuse_open_opt}\""
66 start_owfs_daemon
"$config" "$args"
74 service_stop
/usr
/bin
/owfs