[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:
parent
d671785a36
commit
666a23e096
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=samba
|
PKG_NAME:=samba
|
||||||
PKG_VERSION:=3.6.5
|
PKG_VERSION:=3.6.5
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE_URL:=http://ftp.samba.org/pub/samba \
|
PKG_SOURCE_URL:=http://ftp.samba.org/pub/samba \
|
||||||
http://ftp.samba.org/pub/samba/old-versions
|
http://ftp.samba.org/pub/samba/old-versions
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2008-2011 OpenWrt.org
|
# Copyright (C) 2008-2012 OpenWrt.org
|
||||||
|
|
||||||
START=60
|
START=60
|
||||||
|
|
||||||
@ -9,25 +9,18 @@ smb_header() {
|
|||||||
|
|
||||||
# resolve interfaces
|
# resolve interfaces
|
||||||
local interfaces=$(
|
local interfaces=$(
|
||||||
include /lib/network
|
. /lib/functions/network.sh
|
||||||
scan_interfaces
|
|
||||||
|
|
||||||
local net
|
local net
|
||||||
for net in $interface; do
|
for net in $interface; do
|
||||||
local ifname
|
local device
|
||||||
config_get ifname "$net" ifname
|
network_get_device device "$net" && {
|
||||||
[ -n "$ifname" ] && {
|
local subnet
|
||||||
local ipaddr netmask
|
network_get_subnet subnet "$net" && echo -n "$subnet "
|
||||||
config_get ipaddr "$net" ipaddr
|
network_get_subnet6 subnet "$net" && echo -n "$subnet "
|
||||||
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 "
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo -n "${ifname:-$net} "
|
echo -n "${device:-$net} "
|
||||||
done
|
done
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user