- 'tmux'
# - 'traceroute'
- 'vim'
- # - 'wget'
+ - 'wget'
# - 'yum-utils'
- '-abrt*'
- '-iwl*'
# tmp-tmpfs will be removed, when the appropriate Puppet profile is working
- 'tpl.075.tmp-tmpfs.sh'
# - 'tpl.080.rsyslogd-el9.sh'
- # - 'tpl.085.disable-ipv6.sh'
+ - 'tpl.085.disable-ipv6.sh'
- 'tpl.100.clear_repos.sh'
- 'tpl.110.register-rhel.sh'
- 'tpl.190.repos_rhel9.sh'
printf "Current host FQDN: "
hostname -f
+ echo
+ echo "All installed packages:"
+ echo "-----------------------"
+ rpm -qa | sort
+
+ echo
+ echo "All filesystems:"
+ echo "----------------"
+ df -m -a -T
+
for ks_cfg in "/root/original-ks.cfg" "/root/anaconda-ks.cfg" ; do
echo
echo "-----------------------------------------------------------"
#-----------------------------------------------------------
setup_tmp_tmpfs() {
- echo -e "\e[0Ksection_start:$( date +%s ):ks_setup_tmp_tmpfs[collapsed=true]\r\e[0KSetting up /tmp as a tmpfs ..."
+ local fstab="/etc/fstab"
+ if [[ -f "${fstab}" ]] ; then
- local unit_file="/etc/systemd/system/tmp.mount"
- echo
- echo "Creating a systemd unit file '${unit_file}' providing a temp filesystem below /tmp"
+ echo -e "\e[0Ksection_start:$( date +%s ):ks_setup_tmp_tmpfs[collapsed=true]\r\e[0KSetting up /tmp as a tmpfs ..."
+ echo
+ echo "${HASH_LINE}"
+ echo
+ log "Setting up /tmp as a tmpfs in '${fstab}' ..."
- cat > "${unit_file}" <<-EOF
- # Unit file for creating a temp filesystem below /tmp
+ echo 'tmpfs /tmp tmpfs nosuid,size=10% 0 0' >>"${fstab}"
- [Unit]
- Description=Creating a temporary filesystem below /tmp
- Before=local-fs.target
-
- [Install]
- WantedBy=local-fs.target
-
- [Mount]
- What=tmpfs
- Where=/tmp
- Type=tmpfs
- Options=nosuid,size=10%%
-
- EOF
-
- echo
- echo "Content of '${unit_file}':"
- echo "---------- snip ----------"
- cat "${unit_file}"
- echo "---------- snip ----------"
-
- echo -e "\e[0Ksection_end:$( date +%s ):ks_setup_tmp_tmpfs\r\e[0K"
+ echo -e "\e[0Ksection_end:$( date +%s ):ks_setup_tmp_tmpfs\r\e[0K"
+ fi
}
setup_tmp_tmpfs
err_msg="Either RHSM_USER or RHSM_PWD are not defined as meta variables."
else
if [[ -x "${rhsm}" ]] ; then
+ echo
+ echo "Executing: ${cmd}"
if [[ -n "${rhsm_system_id}" ]] ; then
if eval ${cmd} --consumerid "${rhsm_system_id}" ; then
rhsm_registred='y'
log "System '${fqdn}' successful registred at RedHat Subscription Management."
echo
echo "Subscription Management Idendity:"
+ echo "Executing: ${rhsm} identity"
${rhsm} identity
echo
+ echo "Executing: ${rhsm} list --consumed"
${rhsm} list --consumed
+ echo
else
log "Could not register system '$( hostname -f )' at RedHat Subscription Management: ${err_msg}"
fi
echo
echo "Creating group puppet ..."
groupadd --system puppet
+ printf "Group entry: "
getent group puppet
echo
--comment "Puppet configuration management" \
--shell /sbin/nologin \
puppet
+ printf "User entry: "
getent passwd puppet
+ printf "User Id: "
id puppet
echo