diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2018-12-26 10:51:28 +0100 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2019-01-10 10:33:40 +0100 |
commit | ef1efa756e0d0caef41216719dcc72c71b31d8ff (patch) | |
tree | ac7b77bc4c861962e37f4f8b62447547cd06b51e /package/network/services/samba36/Makefile | |
parent | 5a59e2c059866bb8ca5b41cce34d49b2ddbd3a4e (diff) | |
download | upstream-ef1efa756e0d0caef41216719dcc72c71b31d8ff.tar.gz upstream-ef1efa756e0d0caef41216719dcc72c71b31d8ff.tar.bz2 upstream-ef1efa756e0d0caef41216719dcc72c71b31d8ff.zip |
samba36: add package with hotplug.d script for auto sharing
The new samba36-hotplug package provides a hotplug.d script for the
"mount" subsystem. It automatically shares every mounted block device.
It works by updating /var/run/config/samba file which:
1) Is read by procd init script
2) Gets wiped on reboot providing a consistent state
3) Can be safely updated without flash wearing or conflicting with user
changes being made in /etc/config/samba
Cc: Rosy Song <rosysong@rosinson.com>
Cc: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'package/network/services/samba36/Makefile')
-rw-r--r-- | package/network/services/samba36/Makefile | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/package/network/services/samba36/Makefile b/package/network/services/samba36/Makefile index b63c2eaad3..a08b51ba17 100644 --- a/package/network/services/samba36/Makefile +++ b/package/network/services/samba36/Makefile @@ -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)) |