Fix the regex else vtest-init-vserver.sh generates following file
authorS.Çağlar Onur <caglar@cs.princeton.edu>
Thu, 14 Jan 2010 22:41:50 +0000 (22:41 +0000)
committerS.Çağlar Onur <caglar@cs.princeton.edu>
Thu, 14 Jan 2010 22:41:50 +0000 (22:41 +0000)
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
exclude=kernel kernel-vserver kernel-devel kernel-headers kernel-debuginfo util-vserver* iptables iproute drupal inotify-tools* libnl
# remarked out baseurl= line instead.
#
#
[...]

and fails;

[...]
Loaded plugins: fastestmirror
Config Error: File contains no section headers.
file: file://///etc/yum.repos.d/CentOS-Base.repo, line: 9
'exclude=kernel kernel-vserver kernel-devel kernel-headers kernel-debuginfo util-vserver* iptables iproute drupal inotify-tools* libnl\n'
++ failure
++ echo 'vtest-init-vserver.sh : Bailing out'
vtest-init-vserver.sh : Bailing out
++ exit 1

build.common

index 3d22798..172cee2 100644 (file)
@@ -731,6 +731,6 @@ function yumconf_exclude () {
     repo=$1; shift
     kexclude_line="$1" ; shift
     
-    sed -i -e "/baseurl=.*$/i\\
+    sed -i -e "/#baseurl=.*$/i\\
 $kexclude_line" $repo
 }