Fixed the destination path to where the pre-seed minions keys should be copied.

This commit is contained in:
Pedro Algarvio 2013-05-01 23:49:07 +01:00
parent 997fd8e38d
commit 84aa8ed4c6
2 changed files with 11 additions and 3 deletions

View file

@ -1,5 +1,6 @@
Version 1.5.5:
* Fixed a variable error in the new pressed feature.
* Fixed a variable error in the new pre-seed feature.
* Fixed the destination path to where the pre-seed minions keys should be copied.
Version 1.5.4:

View file

@ -2459,11 +2459,18 @@ config_salt() {
#
preseed_master() {
# Create the PKI directory
[ -d $PKI_DIR/minions ] || mkdir -p $PKI_DIR/minions && chmod 700 $PKI_DIR/minions || return 1
if [ $(ls $TEMP_KEYS_DIR | wc -l) -lt 1 ]; then
echoerror "No minion keys were uploaded. Unable to pre-seed master"
return 1
fi
SEED_DEST="$PKI_DIR/master/minions"
[ -d $SEED_DEST ] || mkdir -p $SEED_DEST && chmod 700 $SEED_DEST || return 1
for keyfile in $(ls $TEMP_KEYS_DIR); do
src_keyfile="${TEMP_KEYS_DIR}/${keyfile}"
dst_keyfile="${PKI_DIR}/minions/${keyfile}"
dst_keyfile="${SEED_DEST}/${keyfile}"
# If it's not a file, skip to the next
[ ! -f $src_keyfile ] && continue