Browse code

Merge "Run yum repolist commands as root"

Jenkins authored on 2014/02/27 13:31:24
Showing 1 changed files
... ...
@@ -181,7 +181,7 @@ if [[ is_fedora && $DISTRO =~ (rhel6) ]]; then
181 181
     # Installing Open vSwitch on RHEL6 requires enabling the RDO repo.
182 182
     RHEL6_RDO_REPO_RPM=${RHEL6_RDO_REPO_RPM:-"http://rdo.fedorapeople.org/openstack-havana/rdo-release-havana.rpm"}
183 183
     RHEL6_RDO_REPO_ID=${RHEL6_RDO_REPO_ID:-"openstack-havana"}
184
-    if ! yum repolist enabled $RHEL6_RDO_REPO_ID | grep -q $RHEL6_RDO_REPO_ID; then
184
+    if ! sudo yum repolist enabled $RHEL6_RDO_REPO_ID | grep -q $RHEL6_RDO_REPO_ID; then
185 185
         echo "RDO repo not detected; installing"
186 186
         yum_install $RHEL6_RDO_REPO_RPM || \
187 187
             die $LINENO "Error installing RDO repo, cannot continue"
... ...
@@ -189,7 +189,7 @@ if [[ is_fedora && $DISTRO =~ (rhel6) ]]; then
189 189
 
190 190
     # RHEL6 requires EPEL for many Open Stack dependencies
191 191
     RHEL6_EPEL_RPM=${RHEL6_EPEL_RPM:-"http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm"}
192
-    if ! yum repolist enabled epel | grep -q 'epel'; then
192
+    if ! sudo yum repolist enabled epel | grep -q 'epel'; then
193 193
         echo "EPEL not detected; installing"
194 194
         yum_install ${RHEL6_EPEL_RPM} || \
195 195
             die $LINENO "Error installing EPEL repo, cannot continue"