This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
# Setup hostname vagrant-something. | |
FQDN="vagrant-rhel7" | |
if grep '^HOSTNAME=' /etc/sysconfig/network > /dev/null; then | |
sed -i 's/HOSTNAME=\(.*\)/HOSTNAME='${FQDN}'/' /etc/sysconfig/network | |
else | |
echo "HOSTNAME=${FQDN}" >> /etc/sysconfig/network | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# The input is a qcow2 image, that gets copied via virt-customize so that it | |
# can be modified to work as a vagrant box. It requires the `create_box.sh` script | |
# from the vagrant-libvirt project:: | |
# | |
# https://github.com/vagrant-libvirt/vagrant-libvirt/blob/master/tools/create_box.sh | |
# | |
# Usage: | |
# | |
# bash process.sh rhel-guest-image-7.4-10.x86_64.qcow2 rhel7.qcow2 |