[packages] samba36: use network.sh to determine subnets
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 28 May 2012 03:52:12 +0000 (03:52 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 28 May 2012 03:52:12 +0000 (03:52 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@31940 3c298f89-4303-0410-b956-a3cf2f4a3e73

net/samba36/Makefile
net/samba36/files/samba.init

index 6d59d5e..c5c41ed 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=samba
 PKG_VERSION:=3.6.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://ftp.samba.org/pub/samba \
        http://ftp.samba.org/pub/samba/old-versions
index 2656e83..61398d8 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2008-2011 OpenWrt.org
+# Copyright (C) 2008-2012 OpenWrt.org
 
 START=60
 
@@ -9,25 +9,18 @@ smb_header() {
 
        # resolve interfaces
        local interfaces=$(
-               include /lib/network
-               scan_interfaces
+               . /lib/functions/network.sh
 
                local net
                for net in $interface; do
-                       local ifname
-                       config_get ifname "$net" ifname
-                       [ -n "$ifname" ] && {
-                               local ipaddr netmask
-                               config_get ipaddr  "$net" ipaddr
-                               config_get netmask "$net" netmask
-                               [ -n "$ipaddr" ] && echo -n "$ipaddr/${netmask:-255.255.255.255} "
-
-                               local ip6addr
-                               config_get ip6addr "$net" ip6addr
-                               [ -n "$ip6addr" ] && echo -n "$ip6addr "
+                       local device
+                       network_get_device device "$net" && {
+                               local subnet
+                               network_get_subnet  subnet "$net" && echo -n "$subnet "
+                               network_get_subnet6 subnet "$net" && echo -n "$subnet "
                        }
 
-                       echo -n "${ifname:-$net} "
+                       echo -n "${device:-$net} "
                done
        )