[packages] samba3: don't ship dangling symlink in package, create the link at startup...
authorNicolas Thill <nico@openwrt.org>
Wed, 28 Apr 2010 14:09:15 +0000 (14:09 +0000)
committerNicolas Thill <nico@openwrt.org>
Wed, 28 Apr 2010 14:09:15 +0000 (14:09 +0000)
SVN-Revision: 21234

net/samba3/Makefile
net/samba3/files/samba.init

index 8351cc39ad31d573a2ea69167d6cc0921644eb98..7dcaac9380b3171d8275501b4f0d0087a5ff109a 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2008-2009 OpenWrt.org
+# Copyright (C) 2008-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=samba3
 PKG_VERSION:=3.0.24
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 PKG_MD5SUM:=89273f67a6d8067cbbecefaa13747153
 
 PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/samba/old-versions/
@@ -60,7 +60,6 @@ define Package/samba3/install
        $(INSTALL_BIN) ./files/samba.init $(1)/etc/init.d/samba
        $(INSTALL_DATA) ./files/samba.config $(1)/etc/config/samba
        $(INSTALL_DATA) ./files/smb.conf.template $(1)/etc/samba/
-       cd $(1)/etc/samba; rm -r smb.conf; ln -s /tmp/smb.conf
        touch $(1)/etc/samba/smbpasswd
        $(INSTALL_DIR) $(1)/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/smbpasswd $(1)/bin/
index 5b4b8f5cecb726e401477feeadfb3865bc9ca0ce..76fcae9d96ee956dba2f09c3365d0be4d0d1a3a9 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2008 OpenWrt.org
+# Copyright (C) 2008-2010 OpenWrt.org
 
 . /etc/functions.sh
 
@@ -22,6 +22,7 @@ smb_header() {
        [ -z "$description" ] && description=openwrt
 
        cp /etc/samba/smb.conf.template /tmp/smb.conf
+       [ -L /etc/samba/smb.conf ] || ln -nsf /tmp/smb.conf /etc/samba/smb.conf
        sed -i "s/|NAME|/$name/g" /tmp/smb.conf
        sed -i "s/|WORKGROUP|/$workgroup/g" /tmp/smb.conf
        sed -i "s/|DESCRIPTION|/$description/g" /tmp/smb.conf