Created
December 11, 2012 09:55
-
-
Save yaitskov/4257413 to your computer and use it in GitHub Desktop.
update virtuozzo templates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cat <<EOF > /vz/template/centos/5/x86_64/config/os/default/mirrorlist | |
\$SW_SERVER/download/mirrors/centos-5 | |
\$SW_SERVER/download/mirrors/updates-released-ce5 | |
http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=os | |
http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=updates | |
EOF | |
cat <<EOF > /vz/template/centos/6/x86_64/config/os/default/mirrorlist | |
\$SW_SERVER/download/mirrors/centos-6 | |
\$SW_SERVER/download/mirrors/updates-released-ce6 | |
http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os | |
http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=updates | |
EOF | |
function updatePackages() { | |
TEMPLATE=$1 | |
vzpkg clean -a | |
vzpkg update metadata $TEMPLATE | |
vzpkg create cache $TEMPLATE | |
} | |
# vzpkg clean -a | |
# vzpkg update metadata centos-6-x86_64 | |
# vzpkg create cache centos-6-x86_64 | |
for template in centos-5-x86_64 centos-6-x86_64 ; do | |
echo "update template $template" | |
updatePackages $template | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment