Skip to content

Commit 6d83dc7

Browse files
committed
Fixed dhcpd host-name overwrite. Thanks krull.mcroth!
1 parent df5e41a commit 6d83dc7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
vyatta-config-sync is a Vyatta configuration synchronizer destined
2-
to distribute Vyatta config.boot file from master server across slave servers
1+
vyatta-config-sync is a Vyatta / VyOS configuration synchronizer destined
2+
to distribute config.boot file from master server across slave servers
33
while applying necessary local modifications on every slave host.

vyatta-config-sync

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
#
3-
# Vyatta (VC5/VC6/VC7) config.boot synchronizer, version 0.1-16
3+
# Vyatta / VyOS config.boot synchronizer, version 0.1-17
44
#
55
source "/etc/default/vyatta" application=vyatta-config-sync
66
CONFIG_BOOT_FILE="/opt/vyatta/etc/config/config.boot"
@@ -144,7 +144,7 @@ while [ ${CL} -le ${LC} ]; do
144144
let CM++
145145
done
146146
# Generate slave config.boot by applying local transformations and host substitution to master config.boot
147-
sed -f "${TMP_LOCAL_TRANSFORMATIONS_FILE}" -e "s/host-name .*[^{]$/host-name ${SYNC_HOST_NAME}/" "${CONFIG_BOOT_FILE}" > "${TMP_CONFIG_BOOT_FILE}"
147+
sed -f "${TMP_LOCAL_TRANSFORMATIONS_FILE}" -e "s/host-name ${HOSTNAME}$/host-name ${SYNC_HOST_NAME}/" "${CONFIG_BOOT_FILE}" > "${TMP_CONFIG_BOOT_FILE}"
148148
chmod 0660 "${TMP_CONFIG_BOOT_FILE}"
149149
chgrp vyattacfg "${TMP_CONFIG_BOOT_FILE}"
150150
# Compare MD5 sums of existing and newly generated slave config.boot files

0 commit comments

Comments
 (0)