Sha256: 6ad3bf990a00af745beb8c798b69a368b07f4d1e3eb44bc550e323e3911ff2cc

Contents?: true

Size: 579 Bytes

Versions: 3

Compression:

Stored size: 579 Bytes

Contents

#!/bin/bash
#

old=`cat /etc/hostname`
case "$old" in
*.*)
  echo "Removing domain from /etc/hostname (was $old)"
  sed -i "s@\..*\$@@" /etc/hostname
  hostname -F /etc/hostname
  new=`cat /etc/hostname`
  echo "(now $new)"
  if [ -z "`grep "$old" /etc/hosts`" ]; then
    echo "Adding '127.0.1.1         $old $new' entry to /etc/hosts"
    echo "127.0.1.1         $old $new" >> /etc/hosts
  fi
  ;;
esac

for f in bootstrap-salt.log bootstrap_salt.sh
do
  rm -f /tmp/$f.old
  if [ -f /tmp/$f ]; then
    echo Renaming /tmp/$f as /tmp/$f.old
    mv /tmp/$f /tmp/$f.old
  fi
done

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
salted-rails-0.0.9 salt/bin/misc_fixes.sh
salted-rails-0.0.8 salt/bin/misc_fixes.sh
salted-rails-0.0.7 salt/bin/misc_fixes.sh