<commit_before>#!/bin/bash
EXIT=0
if ! ps -ef | grep pup*et; then
  echo "puppet is not running on $HOSTNAME -- restarting"
  # try to restart
  /usr/bin/ruby /usr/sbin/puppetd --server=volt1 || EXIT=1
  if ! ps -ef | grep pup*et; then
    echo "puppet is still not running on $HOSTNAME"
    EXIT=1
  fi
fi

# what kind of machine does hudson think we are?
LABEL=`ssh newbobbi grep -A7 host.$HOSTNAME .hudson/config.xml | grep label`
if echo $LABEL | grep ubuntu; then OS=Ubuntu; fi
if echo $LABEL | grep CentOS; then OS=el5; fi
if echo $LABEL | grep RedHat; then OS=el6; fi
if echo $LABEL | grep fedora; then OS=fc10; fi

if ! uname -a | grep $OS; then
  echo "wrong operating system running on $HOSTNAME"
  EXIT="1$EXIT" # there might not be a calculator installed
fi

exit $EXIT<commit_msg>Some cleanups that came over with the new script from my previous checkin<commit_after>#!/bin/bash
# check that puppet is running and start it if it's not
EXIT=0
if ! ps -ef | grep pup*et; then
  echo "puppet is not running on $HOSTNAME -- restarting"
  # try to restart
  /usr/bin/ruby /usr/sbin/puppetd --server=volt1 || EXIT=1
  if ! ps -ef | grep pup*et; then
    echo "puppet is still not running on $HOSTNAME"
    EXIT=1
  fi
fi

# check whether hudson has the right idea what kind of machine we are
LABEL=`ssh newbobbi grep -A7 host.$HOSTNAME .hudson/config.xml | grep label`
if echo $LABEL | grep ubuntu; then OS=Ubuntu; fi
if echo $LABEL | grep CentOS; then OS=el5; fi
if echo $LABEL | grep RedHat; then OS=el6; fi
if echo $LABEL | grep fedora; then OS=fc10; fi

if ! uname -a | grep $OS; then
  echo "wrong operating system running on $HOSTNAME"
  EXIT="1$EXIT" # there might not be a calculator installed
fi

exit $EXIT
{'fraction_non_alphanumeric': 0.1004062681369704, 'fraction_numerical': 0.011607661056297156, 'mean_word_length': 3.5973333333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '6307725', 'n_tokens_mistral': 646, 'n_tokens_neox': 609, 'n_words': 252}