8 Star 10 Fork 2

anolis / KBuilder

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
setup.sh 1.07 KB
一键复制 编辑 原始数据 按行查看 历史
wangchuanguo 提交于 2023-07-07 15:04 . add tool of creating qcow2
#! /bin/bash
set -e
set -x
lorax_templates_name="lorax-templates-anolis"
if [ -z "$(rpm -qa $lorax_templates_name)" ]; then
yum install -y $lorax_templates_name
fi
if [ -z "$(rpm -qa lorax-lmc-virt)" ]; then
yum install -y lorax-lmc-virt
fi
if [ -z "$(rpm -qa anaconda)" ]; then
yum install -y anaconda
fi
############fix bug################
if [ -z "$(rpm -qa langpacks-zh_CN)" ]; then
#need for error:Failed to activate service 'org.fedoraproject.Anaconda.Boss': timed out
yum install -y langpacks-zh_CN
fi
dir_libvirt=`rpm -ql $lorax_templates_name | grep libvirt.tmpl`
sed -i 's/zip(disks, xrange(97, 123))/zip(disks, range(97, 123))/' $dir_libvirt
set +x
set +e
if [ -f "/.buildstamp" ]; then
echo -e "/.buildstamp exists already, Do you want to override? y/n :\c "
read answer
if [ ! -z "$answer" ]; then
if [[ "$answer" = "y" ]] || [[ "$answer" = "Y" ]]; then
echo "ok, override it ..."
cp buildstamp /.buildstamp
fi
fi
else
cp buildstamp /.buildstamp
fi
Shell
1
https://gitee.com/anolis/kbuilder.git
git@gitee.com:anolis/kbuilder.git
anolis
kbuilder
KBuilder
master

搜索帮助