summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2015-05-18 20:37:35 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2015-05-18 20:37:35 +0200
commit110473fbd088bd1e9a07391495fd2104ab15a74e (patch)
treea2042dd2a4f69799d048a3fb2abfbc8cbc16e0b7 /build.sh
parent56881320ef9593db3618eaf1d390ff0f96d12d91 (diff)
downloadOpenBSD-firewall-110473fbd088bd1e9a07391495fd2104ab15a74e.tar.gz
OpenBSD-firewall-110473fbd088bd1e9a07391495fd2104ab15a74e.tar.bz2
synchronized config (DNS, DHCP, network)
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh19
1 files changed, 15 insertions, 4 deletions
diff --git a/build.sh b/build.sh
index 28795f5..fa69548 100755
--- a/build.sh
+++ b/build.sh
@@ -279,8 +279,6 @@ cp -R template/etc/ttys $MOUNTPOINT/etc/.
cp -R template/etc/pf.os $MOUNTPOINT/etc/.
cp -R template/etc/syslog.conf $MOUNTPOINT/etc/.
cp -R template/etc/resolv.conf $MOUNTPOINT/etc/.
-cp -R template/etc/ntpd.conf $MOUNTPOINT/etc/.
-cp -R template/etc/dhclient.conf $MOUNTPOINT/etc/.
cp -R template/etc/tabs $MOUNTPOINT/etc/.
chmod 0600 $MOUNTPOINT/etc/tabs/*
cp -R template/etc/newsyslog.conf $MOUNTPOINT/etc/.
@@ -294,12 +292,27 @@ echo "Installing specific configuration for $HOSTNAME."
cp -R config/$HOSTNAME/hosts $MOUNTPOINT/etc/.
cp -R config/$HOSTNAME/networks $MOUNTPOINT/etc/.
+cp -R config/$HOSTNAME/dhclient.conf $MOUNTPOINT/etc/.
cp -R config/$HOSTNAME/pf.conf $MOUNTPOINT/etc/.
m4 -DHOSTNAME=$HOSTNAME template/etc/rc > $MOUNTPOINT/etc/rc
if test -f config/$HOSTNAME/dhcpd.conf; then
cp -R config/$HOSTNAME/dhcpd.conf $MOUNTPOINT/etc/.
fi
+# when we want joe instead of vi (I do)
+cp -R config/$HOSTNAME/ntpd.conf $MOUNTPOINT/etc/.
+if test -d config/$HOSTNAME/joe/; then
+ cp -R config/$HOSTNAME/joe $MOUNTPOINT/etc/.
+fi
+
+# when we run a DNS server (currently still bind)
+if test -d config/$HOSTNAME/named/; then
+ cp -R config/$HOSTNAME/named $MOUNTPOINT/etc/.
+fi
+if test -f config/$HOSTNAME/rndc.conf; then
+ cp -R config/$HOSTNAME/rndc.conf $MOUNTPOINT/etc/.
+fi
+
echo "Generating databases."
# TODO: encrypt: changer master.passwd root password
@@ -310,8 +323,6 @@ echo "Generating SSH keys."
ssh-keygen -b 2048 -t rsa -f $MOUNTPOINT/etc/ssh/ssh_host_rsa_key -N ''
chmod 400 $MOUNTPOINT/etc/ssh/ssh_host_rsa_key
-echo "Installing specific configuration."
-
echo "Cleaning up."
sync