Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
PKG_NAME:=samba
PKG_VERSION:=3.6.25
-PKG_RELEASE:=14
+PKG_RELEASE:=15
PKG_SOURCE_URL:=https://download.samba.org/pub/samba \
https://download.samba.org/pub/samba/stable
json_init
json_load "$(ubus call block info)"
- json_select devices
+ json_select devices || return 1
json_get_keys keys
for key in $keys
shift
json_get_vars $@
json_select ..
- break
+ json_select ..
+ return 0
}
json_select ..
done
json_select ..
+
+ return 2
}
[ -f /var/run/config/samba ] || {
}
[ "$ACTION" = "add" ] && {
- device_get_vars $DEVICE label mount
+ device_get_vars $DEVICE label mount || {
+ logger -t samba-hotplug "Failed to get $DEVICE info"
+ exit 1
+ }
[ -n "$mount" ] && {
uci -c /var/run/config batch <<-EOF
set samba.$DEVICE="sambashare"