- add /sbin and /usr/sbin to our PATH in case we are running in an sudo
[vserver-reference.git] / vserver-reference.spec
index 0459f65..6988e7d 100644 (file)
@@ -40,6 +40,9 @@ fi
 %build
 
 %install
+# Running as root
+export PATH="$PATH:/sbin:/usr/sbin"
+
 # Clean up
 if grep -q %{installroot}/proc /proc/mounts ; then
     umount %{installroot}/proc
@@ -108,7 +111,7 @@ rpm --root %{installroot} --initdb
 # XXX Get yum.conf from PlanetLabConf
 
 # Install RPMs in reference image
-yum \
+yum -c ./yum.conf \
 %{?sslcertdir:--sslcertdir=%{sslcertdir}} \
 --installroot=%{installroot} \
 -y groupinstall VServer
@@ -131,6 +134,9 @@ if grep -q %{installroot}/dev/pts /proc/mounts ; then
 fi
 
 %clean
+# Running as root
+export PATH="$PATH:/sbin:/usr/sbin"
+
 # Clean up
 if grep -q %{installroot}/proc /proc/mounts ; then
     umount %{installroot}/proc