summaryrefslogtreecommitdiff
path: root/bin/node_init
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2017-11-28 11:35:01 -0500
committerMicah Anderson <micah@riseup.net>2017-11-28 11:35:01 -0500
commit0d251e2ceddd3e02ed8bba8725830689dbdd1397 (patch)
tree37d7096d9e458ca1e6431dff8a2f571553011c44 /bin/node_init
parent93a181d44e2d8163ae44945aac1b6477e268170d (diff)
parentbf6c56d86c7ba45e7ca766d990a9e9162025e5ac (diff)
Merge tag 'refs/tags/0.10.0' into stable
Release 0.10.0
Diffstat (limited to 'bin/node_init')
-rwxr-xr-xbin/node_init15
1 files changed, 11 insertions, 4 deletions
diff --git a/bin/node_init b/bin/node_init
index b55cfed3..24345b47 100755
--- a/bin/node_init
+++ b/bin/node_init
@@ -22,10 +22,6 @@ if ! egrep -q "$DEBIAN_VERSION" /etc/debian_version; then
exit 1
fi
mkdir -p $LEAP_DIR
-if ! grep -q -e '^en_US.UTF-8' /etc/locale.gen; then
- echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
- /usr/sbin/locale-gen
-fi
#
# UPDATE PACKAGES
@@ -83,9 +79,20 @@ if [[ $exit_code -ne 0 ]]; then
exit $exit_code
fi
+# need to have the locales package from above
+if ! grep -q -e '^en_US.UTF-8' /etc/locale.gen 2> /dev/null; then
+ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
+ /usr/sbin/locale-gen
+fi
+
#
# FINALIZE
#
mkdir -p $HIERA_DIR
chmod 0755 $HIERA_DIR
touch $INIT_FILE
+
+# Sometimes not all keys are already generated, happens more often
+# with VMs
+# that would give us errors in the get_ssh_keys_cmd during node init
+/usr/bin/ssh-keygen -A