20 lines
No EOL
526 B
Bash
20 lines
No EOL
526 B
Bash
#!/bin/bash
|
|
|
|
# Description : Creating a virtual machine template under Rocky Linux 9 from ISO file with Packer using VMware Workstation
|
|
# Author : Yoann LAMY <https://github.com/ynlamy/packer-rockylinux9>
|
|
# Licence : GPLv3
|
|
|
|
echo "Updating the system..."
|
|
dnf -y -q update &> /dev/null
|
|
|
|
echo "Deleting the files ks.cfg..."
|
|
rm -f /root/anaconda-ks.cfg /root/original-ks.cfg
|
|
|
|
echo "Cleaning dnf cache..."
|
|
dnf -y -q clean all &> /dev/null
|
|
|
|
echo "Deleting temporary files..."
|
|
rm -fr /tmp/*
|
|
|
|
echo "Clearing the history..."
|
|
history -c |