samba36: add package with hotplug.d script for auto sharing
[openwrt/staging/hauke.git] / package / network / services / samba36 / Makefile
index b63c2eaad3f5ac1e5c131afa88dca466c2c866d7..a08b51ba171b5de3b090df8aeebf2511544b96eb 100644 (file)
@@ -43,6 +43,12 @@ define Package/samba36-server
   DEPENDS:=+USE_GLIBC:librt $(ICONV_DEPENDS)
 endef
 
+define Package/samba36-hotplug
+  $(call Package/samba/Default)
+  TITLE+= hotplug script for auto sharing
+  DEPENDS:=+blockd
+endef
+
 define Package/samba36-client
   $(call Package/samba/Default)
   TITLE+= client
@@ -161,6 +167,11 @@ define Package/samba36-server/install
        $(LN) samba_multicall $(1)/usr/sbin/smbpasswd
 endef
 
+define Package/samba36-hotplug/install
+       $(INSTALL_DIR) $(1)/etc/hotplug.d/mount
+       $(INSTALL_CONF) ./files/samba.hotplug $(1)/etc/hotplug.d/mount/60-samba
+endef
+
 define Package/samba36-client/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_BUILD_BIN)/smbclient $(1)/usr/sbin
@@ -174,5 +185,6 @@ endef
 
 $(eval $(call BuildPackage,samba36-client))
 $(eval $(call BuildPackage,samba36-server))
+$(eval $(call BuildPackage,samba36-hotplug))
 $(eval $(call BuildPackage,samba36-net))