From c641fe08f26dce1c06ed61dc2d5a8b75486807fe Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Mon, 21 Nov 2016 21:58:09 -0500 Subject: Ignore non-existing locale.gen on init (#8649) --- bin/node_init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/node_init') diff --git a/bin/node_init b/bin/node_init index b55cfed3..148ecc34 100755 --- a/bin/node_init +++ b/bin/node_init @@ -22,7 +22,7 @@ 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 +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 -- cgit v1.2.3 From 26be1f84de9efabf5fec1278401ae0c5538454d9 Mon Sep 17 00:00:00 2001 From: kwadronaut Date: Fri, 19 May 2017 23:41:57 +0200 Subject: makes sure locales packages is installed before locale-gen fixes #8649 --- bin/node_init | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'bin/node_init') diff --git a/bin/node_init b/bin/node_init index 148ecc34..e86374b6 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 2> /dev/null; then - echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen - /usr/sbin/locale-gen -fi # # UPDATE PACKAGES @@ -83,6 +79,12 @@ 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 # -- cgit v1.2.3 From f93953299044ffa0154c08368ecb91b7a3f08a93 Mon Sep 17 00:00:00 2001 From: kwadronaut Date: Sat, 20 May 2017 00:20:08 +0200 Subject: generate missing ssh host keys on node init (closes #8790) closes #8414 as well --- bin/node_init | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bin/node_init') diff --git a/bin/node_init b/bin/node_init index 148ecc34..66dc17e7 100755 --- a/bin/node_init +++ b/bin/node_init @@ -89,3 +89,8 @@ fi 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 -- cgit v1.2.3