Skip to contentSkip to conversation

package/samba4: create tempfile with systemd

PATCH New Yann E. MORIN 3 participants 3 messages May 16, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/samba4: create tempfile with systemd

With systemd, samba4 will need some special temporary files to be created on each boot, as explained in:
packaging/systemd/README

Install the provided template file as configuration.

However, this is not enough, as even the log directory is a tmpfs in the default Buildroot configuration, so we must also create the log directory on each boot. Hence we append this to the template installed above.

Cc Gustavo Zacarias <[email protected]>
---
 package/samba4/samba4.mk | 3 +++
 1 file changed, 3 insertions(+)
package/samba4/samba4.mk +3 -0
index 9ccc6a7..c097068 100644
@@ -165,6 +165,9 @@ define SAMBA4_INSTALL_INIT_SYSTEMD
 		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/smb.service
 	ln -sf ../../../../usr/lib/systemd/system/winbind.service \
 		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/winbind.service
+	$(INSTALL) -D -m 644 $(@D)/packaging/systemd/samba.conf.tmp \
+		$(TARGET_DIR)/etc/tmpfiles.d/samba.conf
+	printf "d /var/log/samba  755 root root\n" >>$(TARGET_DIR)/etc/tmpfiles.d/samba.conf
 endef
 
 $(eval $(generic-package))
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 package/samba4: create tempfile with systemd

Quoted 6 lines · Yann E. MORIN

With systemd, samba4 will need some special temporary files to be created on each boot, as explained in:
packaging/systemd/README

Install the provided template file as configuration.

Quoted 7 lines

However, this is not enough, as even the log directory is a tmpfs in the default Buildroot configuration, so we must also create the log directory on each boot. Hence we append this to the template installed above.

Cc Gustavo Zacarias <[email protected]>

Regards.

#2 lore raw

PATCH 1/1 package/samba4: create tempfile with systemd

In reply to Yann E. MORIN
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

With systemd, samba4 will need some special temporary files to be created on each boot, as explained in:
packaging/systemd/README

Install the provided template file as configuration.

Quoted 7 lines

However, this is not enough, as even the log directory is a tmpfs in the default Buildroot configuration, so we must also create the log directory on each boot. Hence we append this to the template installed above.

Cc Gustavo Zacarias <[email protected]>

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard