From 0cde307f0d0dcc48c7dc2c2bcd2525f3c3ae68dd Mon Sep 17 00:00:00 2001 From: John Marino Date: Mon, 2 Mar 2015 14:45:55 +0100 Subject: [PATCH] dma(8): install default conf files with installworld Previously dma configure files were only installed with the "make distribution" command. Additionally, the user was expected to modify them as opposed to copies of them. This is probably why there were part of distribution, in order to avoid overwriting the dma.conf and auth.conf. The negative side to this approach is that updated *.conf sample files would never be installed. Since the dma.conf is actually completely commented out, and since it doesn't fail in the absence of dma.conf, these files aren't actually needed. This commit installs /etc/dma/dma.conf.sample and /etc/dma/auth.conf.sample files during installworld instead. Future updates to the *.conf.sample files will overwrite them, but obviously /etc/dma/*.conf will not be touched. Some of the sendfile conf files are provided as .sample, so the concept is not new for DragonFly. --- etc/Makefile | 1 - libexec/dma/Makefile | 2 +- libexec/dma/Makefile.etc | 15 --------------- libexec/dma/default-conf/Makefile | 18 ++++++++++++++++++ 4 files changed, 19 insertions(+), 17 deletions(-) delete mode 100644 libexec/dma/Makefile.etc create mode 100644 libexec/dma/default-conf/Makefile diff --git a/etc/Makefile b/etc/Makefile index a86b12194d..4737b7b74e 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -49,7 +49,6 @@ DIRS+= secure/lib/libssh \ .endif DIRS+= secure/usr.bin/openssl .endif -DIRS+= libexec/dma # Files that should be installed read-only-executable (555) root:wheel # diff --git a/libexec/dma/Makefile b/libexec/dma/Makefile index 0bf83b6a37..014fd07fcf 100644 --- a/libexec/dma/Makefile +++ b/libexec/dma/Makefile @@ -1,3 +1,3 @@ -SUBDIR= dma dma-mbox-create +SUBDIR= dma dma-mbox-create default-conf .include diff --git a/libexec/dma/Makefile.etc b/libexec/dma/Makefile.etc deleted file mode 100644 index fca23b94a6..0000000000 --- a/libexec/dma/Makefile.etc +++ /dev/null @@ -1,15 +0,0 @@ -# $DragonFly: src/etc/dma/Makefile,v 1.3 2008/02/12 22:10:20 matthias Exp $ - -FILESDIR= /etc/dma -SHAREOWN= root -SHAREGRP= mail -FILESMODE= 640 - -.if !exists(${DESTDIR}/etc/dma/auth.conf) -FILES+= auth.conf -.endif -.if !exists(${DESTDIR}/etc/dma/dma.conf) -FILES+= dma.conf -.endif - -.include diff --git a/libexec/dma/default-conf/Makefile b/libexec/dma/default-conf/Makefile new file mode 100644 index 0000000000..0e8aa6835c --- /dev/null +++ b/libexec/dma/default-conf/Makefile @@ -0,0 +1,18 @@ +FILESDIR= /etc/dma +SHAREOWN= root +SHAREGRP= mail +FILESMODE= 640 + +GENFILES= auth.conf.sample dma.conf.sample +CLEANFILES= ${GENFILES} +FILES+= ${GENFILES} + +auth.conf.sample: ../auth.conf + cp ${.ALLSRC} ${.TARGET} + +dma.conf.sample: ../dma.conf + cp ${.ALLSRC} ${.TARGET} + +beforedepend: ${GENFILES} + +.include -- 2.41.0