New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically enable EPEL after prompting users #3259
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -281,6 +281,30 @@ BootstrapRpmCommon() { | |
exit 1 | ||
fi | ||
|
||
if [ "$ASSUME_YES" = 1 ]; then | ||
yes_flag="-y" | ||
fi | ||
|
||
if ! $SUDO $tool list *virtualenv >/dev/null 2>&1; then | ||
echo "To use Certbot, packages from the EPEL repository need to be installed." | ||
if ! $SUDO $tool list epel-release >/dev/null 2>&1; then | ||
echo "Please enable this repository and try running Certbot again." | ||
exit 1 | ||
fi | ||
if [ "$ASSUME_YES" = 1 ]; then | ||
/bin/echo -n "Enabling the EPEL repository in 3 seconds..." | ||
sleep 1s | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
/bin/echo -ne "\e[0K\rEnabling the EPEL repository in 2 seconds..." | ||
sleep 1s | ||
/bin/echo -e "\e[0K\rEnabling the EPEL repository in 1 seconds..." | ||
sleep 1s | ||
fi | ||
if ! $SUDO $tool install $yes_flag epel-release; then | ||
echo "Could not enable EPEL. Aborting bootstrap!" | ||
exit 1 | ||
fi | ||
fi | ||
|
||
pkgs=" | ||
gcc | ||
dialog | ||
|
@@ -318,10 +342,6 @@ BootstrapRpmCommon() { | |
" | ||
fi | ||
|
||
if [ "$ASSUME_YES" = 1 ]; then | ||
yes_flag="-y" | ||
fi | ||
|
||
if ! $SUDO $tool install $yes_flag $pkgs; then | ||
echo "Could not install OS dependencies. Aborting bootstrap!" | ||
exit 1 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,30 @@ BootstrapRpmCommon() { | |
exit 1 | ||
fi | ||
|
||
if [ "$ASSUME_YES" = 1 ]; then | ||
yes_flag="-y" | ||
fi | ||
|
||
if ! $SUDO $tool list *virtualenv >/dev/null 2>&1; then | ||
echo "To use Certbot, packages from the EPEL repository need to be installed." | ||
if ! $SUDO $tool list epel-release >/dev/null 2>&1; then | ||
echo "Please enable this repository and try running Certbot again." | ||
exit 1 | ||
fi | ||
if [ "$ASSUME_YES" = 1 ]; then | ||
/bin/echo -n "Enabling the EPEL repository in 3 seconds..." | ||
sleep 1s | ||
/bin/echo -ne "\e[0K\rEnabling the EPEL repository in 2 seconds..." | ||
sleep 1s | ||
/bin/echo -e "\e[0K\rEnabling the EPEL repository in 1 seconds..." | ||
sleep 1s | ||
fi | ||
if ! $SUDO $tool install $yes_flag epel-release; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have you considered that RHN users need to enable additional repos in order for EPEL to work? |
||
echo "Could not enable EPEL. Aborting bootstrap!" | ||
exit 1 | ||
fi | ||
fi | ||
|
||
pkgs=" | ||
gcc | ||
dialog | ||
|
@@ -54,10 +78,6 @@ BootstrapRpmCommon() { | |
" | ||
fi | ||
|
||
if [ "$ASSUME_YES" = 1 ]; then | ||
yes_flag="-y" | ||
fi | ||
|
||
if ! $SUDO $tool install $yes_flag $pkgs; then | ||
echo "Could not install OS dependencies. Aborting bootstrap!" | ||
exit 1 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as we're sure that this package will always be visible on RPM-based systems where
certbot-auto
works.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're not, I guess we can do something like make this a warning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I guess this is fine, because we're inside the
if
about virtualenv. So overall, LGTM.