Skip to content
Browse files

First attempt to only need one yum install.

(untested, probably needs work)
  • Loading branch information...
1 parent 7c37478 commit 5cd3430ab3b2ef92cc58272f0e35483399373ef2 @justinclift justinclift committed
Showing with 24 additions and 4 deletions.
  1. +24 −4 bootstrap.sh
View
28 bootstrap.sh
@@ -173,18 +173,38 @@ if [ "$os" = "f16" -o "$os" = "f17" -o "$os" = "el6" ]; then
depends="$depends readline-devel"
fi
+ # If we have sudo, we're able to install missing dependencies
if [ "$HAVESUDO" = "1" ]; then
+ # Check which dependencies need installing
+ install_list=""
for dep in `echo $depends`; do
if ! `rpm -q --quiet --nodigest $dep`; then
- sudo yum install -y $dep
+ install_list="$install_list $dep"
fi
- # sanity check that it just installed
+ done
+
+## debugging code
+echo Install list: $install_list
+
+ # Install the needed packages
+ sudo yum install -y $install_list
+
+ # Sanity check the dependencies did install
+ fail_list=""
+ for dep in `echo $depends`; do
if ! `rpm -q --quiet --nodigest $dep`; then
- echo "ABORTING: FAILED TO INSTALL $dep"
- exit 1
+ fail_list="$fail_list $dep"
fi
done
+## debugging code
+echo Fail list: $fail_list
+
+ if [ "x$fail_list" = "x" ]; then
+ echo "ABORTING: FAILED TO INSTALL $fail_list"
+ exit 1
+ fi
+
if [ "$FACTER_RDBMS" = "postgresql" ]; then
# If postgresql is already initialized, we do not want to overwrite settings in

0 comments on commit 5cd3430

Please sign in to comment.
Something went wrong with that request. Please try again.