[packages] samba36: use network.sh to determine subnets

git-svn-id: svn://svn.openwrt.org/openwrt/packages@31940 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2012-05-28 03:52:12 +00:00
parent d671785a36
commit 666a23e096
2 changed files with 9 additions and 16 deletions

View 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

View File

@ -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
)