From: Jo-Philipp Wich Date: Mon, 28 May 2012 03:52:12 +0000 (+0000) Subject: [packages] samba36: use network.sh to determine subnets X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;hb=204c944616b829b91581e51c73301542cf4295a5 [packages] samba36: use network.sh to determine subnets SVN-Revision: 31940 --- diff --git a/net/samba36/Makefile b/net/samba36/Makefile index 6d59d5eba1..c5c41edb31 100644 --- a/net/samba36/Makefile +++ b/net/samba36/Makefile @@ -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 diff --git a/net/samba36/files/samba.init b/net/samba36/files/samba.init index 2656e83374..61398d8f4f 100755 --- a/net/samba36/files/samba.init +++ b/net/samba36/files/samba.init @@ -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 )