<commit_before>#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

PRIMARY_INTERFACE=$(ip route show default scope global | awk '{print $5}')
IP_ADDRESS=$(ip -o -4 a show $PRIMARY_INTERFACE | awk '{print $4}' | cut -d'/' -f1)

if [ ! -f /var/local/password ]
then
<% if @operatingsystemmajrelease == "7" %>
  GPL_PATH=/usr/share/doc/centos-release/
<% else %>
  GPL_PATH=/usr/share/doc/centos-release-6/
<% end %>

  # Generate wordlist from GPL
  for word in $(shuf -n 1 $GPL_PATH/GPL)
  do
    echo $word | grep -v '^\s$' >> /tmp/wordlist
  done

  # Generate password in format WORD.Number.WORD
  echo $(shuf -n 1 /tmp/wordlist).$(echo $RANDOM | cut -c-2).$(shuf -n 1 /tmp/wordlist) > /var/local/password
  echo "root:$(cat /var/local/password)" | chpasswd
fi

PASSWORD=$(cat /var/local/password)


echo \
"                --- Welcome to the PuppetLabs <%= @hostname.capitalize -%> VM ---

<%= @login_message %>






For the best experience please log in via SSH

    IP: $IP_ADDRESS
    username: root
    password: <PASSWORD>

Your password was randomly generated from the text of the GNU public license
" > /etc/issue<commit_msg>use all the words, not just the first one in a line<commit_after>#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

PRIMARY_INTERFACE=$(ip route show default scope global | awk '{print $5}')
IP_ADDRESS=$(ip -o -4 a show $PRIMARY_INTERFACE | awk '{print $4}' | cut -d'/' -f1)

if [ ! -f /var/local/password ]
then
<% if @operatingsystemmajrelease == "7" %>
  GPL_PATH=/usr/share/doc/centos-release/
<% else %>
  GPL_PATH=/usr/share/doc/centos-release-6/
<% end %>

  # Generate wordlist from GPL
  for word in $(cat $GPL_PATH/GPL)
  do
    echo $word | grep -v '^\s$' >> /tmp/wordlist
  done

  # Generate password in format WORD.Number.WORD
  echo $(shuf -n 1 /tmp/wordlist).$(echo $RANDOM | cut -c-2).$(shuf -n 1 /tmp/wordlist) > /var/local/password
  echo "root:$(cat /var/local/password)" | chpasswd
fi

PASSWORD=$(cat /var/local/password)


echo \
"                --- Welcome to the PuppetLabs <%= @hostname.capitalize -%> VM ---

<%= @login_message %>






For the best experience please log in via SSH

    IP: $IP_ADDRESS
    username: root
    password: <PASSWORD>

Your password was randomly generated from the text of the GNU public license
" > /etc/issue
{'fraction_non_alphanumeric': 0.1392884178652536, 'fraction_numerical': 0.007191521574564724, 'mean_word_length': 3.136150234741784, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5487904', 'n_tokens_mistral': 958, 'n_tokens_neox': 892, 'n_words': 304}