share/examples: Install missing defaults for ssl and ssh.
authorzrj <rimvydas.jasinskas@gmail.com>
Fri, 19 Apr 2019 15:40:21 +0000 (18:40 +0300)
committerzrj <zrj@dragonflybsd.org>
Wed, 24 Apr 2019 17:17:40 +0000 (20:17 +0300)
This would help with config updates merging and local system recovery
when configs in /etc get accidentally deleted or broken beyond repair.

etc/mtree/BSD.usr.dist
share/examples/Makefile
share/examples/etc/README.examples
share/examples/ssh/Makefile [new file with mode: 0644]
share/examples/ssl/Makefile [new file with mode: 0644]

index 725cd7b..b7ba174 100644 (file)
             etc
                 defaults
                 ..
+                ssh
+                ..
+                ssl
+                ..
             ..
             find_interface
             ..
index 2f876e6..5c65cae 100644 (file)
@@ -3,7 +3,8 @@
 # Doing a make install builds /usr/share/examples
 
 DIRS!= for i in *; do \
-           if test -d $$i -a $$i != acpica -a $$i != smbfs; then \
+           if test -d $$i -a $$i != acpica -a $$i != smbfs \
+                       -a $$i != ssh -a $$i != ssl ; then \
                echo $$i; \
             fi; \
        done
@@ -40,7 +41,7 @@ etc-examples:
 .endif
 
 .if ${SHARED} != "symlinks"
-SUBDIR=        acpica smbfs
+SUBDIR=        acpica smbfs ssh ssl
 .endif
 
 .include <bsd.subdir.mk>
index eb52143..ab44266 100644 (file)
@@ -75,3 +75,10 @@ defaults/make.conf   - system build default information
 defaults/periodic.conf - default configuration file for periodic(8)
 defaults/rc.conf       - system configuration default info
 defaults/uuids         - default list of UUIDs and names (see uuid(3))
+ssh/                   - directory containing default ssh files
+ssh/moduli             - default prime numbers for sshd(8)
+ssh/ssh_config         - default SSH client configuration
+ssh/sshd_config                - default SSH daemon configuration
+ssl/                   - directory containing default ssl files
+ssl/cert.pem           - default certificate bundle
+ssl/openssl.cnf                - default certificate configuration
diff --git a/share/examples/ssh/Makefile b/share/examples/ssh/Makefile
new file mode 100644 (file)
index 0000000..57d3dc9
--- /dev/null
@@ -0,0 +1,20 @@
+.PATH: ${.CURDIR}/../../../crypto/openssh
+
+NOOBJ= noobj
+FILES=         moduli ssh_config sshd_config
+FILESDIR=      /usr/share/examples/etc/ssh
+FILESOWN=      ${BINOWN}
+FILESGRP=      ${BINGRP}
+FILESMODE=     644
+
+# do not treat these files as executables
+moduli:
+       @true
+
+ssh_config:
+       @true
+
+sshd_config:
+       @true
+
+.include <bsd.prog.mk>
diff --git a/share/examples/ssl/Makefile b/share/examples/ssl/Makefile
new file mode 100644 (file)
index 0000000..05b24ab
--- /dev/null
@@ -0,0 +1,10 @@
+.PATH: ${.CURDIR}/../../../crypto/libressl/apps/openssl
+
+NOOBJ= noobj
+FILES= cert.pem openssl.cnf
+FILESDIR=      /usr/share/examples/etc/ssl
+FILESOWN=      ${BINOWN}
+FILESGRP=      ${BINGRP}
+FILESMODE=     644
+
+.include <bsd.prog.mk>