done
# NOTE: allow command run directly over ssh to be logged also.
-echo 'source /etc/profile ; source /root/.bash_profile' > /root/.bashrc
+echo "source /etc/profile ; source $BASH_PROFILE" > /root/.bashrc
# NOTE 1: crond is not installed on the boot image, so this maintains a
# persistent process to upload logs on legacy nodes.
# same time.
initial_delay=$(( $RANDOM * 3 ))
-
cat <<EOF > $PERIODIC_SCRIPT
#!/bin/bash
if [ -f $BASH_PROFILE ] ; then