openwrtv4/package/network/services/samba36/files/samba.hotplug
Rosy Song fd569e5e9d samba36: add hotplug support
Add hotplug handle script for storage devices,
  this will add corresponding option in the
  /etc/config/samba file automatically.

Signed-off-by: Rosy Song <rosysong@rosinson.com>
2018-05-02 09:18:27 +02:00

11 lines
224 B
Text

. /lib/samba/samba.sh
samba_dev_filter $DEVNAME
[ "$FLAG_DEV_TYPE" = "not-mtd" ] || exit
config_load samba
case $ACTION in
add) samba_add_section $DEVNAME;;
remove) samba_delete_section $DEVNAME;;
esac
uci commit samba