diff options
author | Rosy Song <rosysong@rosinson.com> | 2018-05-02 10:48:36 +0800 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2018-05-02 09:18:27 +0200 |
commit | fd569e5e9d0a46ea957cb253e97a4b3ea8c2c540 (patch) | |
tree | 9c2a6ec223a2318b4f829143d31875deaef7d82e /package/network/services/samba36/files/samba.hotplug | |
parent | 2c4294f78612d038a2b130171fe25ed8e6569bae (diff) | |
download | upstream-fd569e5e9d0a46ea957cb253e97a4b3ea8c2c540.tar.gz upstream-fd569e5e9d0a46ea957cb253e97a4b3ea8c2c540.tar.bz2 upstream-fd569e5e9d0a46ea957cb253e97a4b3ea8c2c540.zip |
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>
Diffstat (limited to 'package/network/services/samba36/files/samba.hotplug')
-rw-r--r-- | package/network/services/samba36/files/samba.hotplug | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/package/network/services/samba36/files/samba.hotplug b/package/network/services/samba36/files/samba.hotplug new file mode 100644 index 0000000000..9c6dbe5e41 --- /dev/null +++ b/package/network/services/samba36/files/samba.hotplug @@ -0,0 +1,11 @@ +. /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 |