if [[ "${VERBOSE}" == "y" && "${QUIET}" == "y" ]] ; then
error "Parameters '${RED}--verbose${NORMAL}' and '${RED}--quiet${NORMAL}' are mutually exclusive."
- echo
+ empty_line
usage >&2
- echo
+ empty_line
exit 1
fi
${CYAN}#${NORMAL} ${YELLOW}Simulation mode${NORMAL} ${CYAN}#${NORMAL}
${CYAN}#${NORMAL} Nothing will be really done ${CYAN}#${NORMAL}
${CYAN}###############################${NORMAL}
-
EOF
)
echo -e "${msg}"
+ empty_line
fi
}
if [[ "${found}" != "y" ]] ; then
error "Locale '${RED}${new_locale}${NORMAL}' not found."
else
+ debug "Setting localization to '${CYAN}${new_locale}${NORMAL}' ..."
LANG="${new_locale}"
LC_ALL=
LC_CTYPE="${new_locale}"
}
+#------------------------------------------------------------------------------
+register_rhel() {
+
+ local fqdn=$( hostname -f )
+ local -a cmd=( "${SM_BIN}" 'register' )
+ cmd+=( '--name' "${fqdn}" )
+ cmd+=( '--username' "'${RHSM_USER}'" )
+ cmd+=( '--password' "'${RHSM_PWD}'" )
+ cmd+=( '--auto-attach' '--force' )
+ cmd+=( '--no-progress-messages' )
+
+ exec_cmd "${cmd[@]}"
+
+}
+
################################################################################
##
## Main
main() {
get_options "$@"
+ set_locale "en_US.utf8"
check_for_root
- # register_rhel
+ register_rhel
# mangle_repos
}