#!/bin/bash ## Config de Grub # Save old grub conf_grub (){ GRUB_DEFAULT=1 echo "----------- Move and config Grub ----" cp /etc/default/grub /etc/default/grub.back sed 's/GRUB_DEFAULT=0/GRUB_DEFAULT=$GRUB_DEFAULT/g' /etc/default/grub > grub.n mv grub.n /etc/default/grub echo "----------- Move and config Grub: DONE ----" } ## Install Salt conf_salt (){ SALT_MASTER="192.168.1.22" # Install echo "----------- Add repos for salt -------" add-apt-repository ppa:saltstack/salt apt-get update echo "----------- Install Salt -------------" apt-get install salt-minion # Config Salt echo "---------- Config Salt ---------------" cp /etc/salt/minion /etc/salt/minion.back echo "master: $SALT_MASTER" >> /etc/salt/minion # Wait for the answer of the master salt-minion -l debug } conf_grub conf_salt