本文整理汇总了Python中installer.Installer.finalize_system方法的典型用法代码示例。如果您正苦于以下问题:Python Installer.finalize_system方法的具体用法?Python Installer.finalize_system怎么用?Python Installer.finalize_system使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类installer.Installer
的用法示例。
在下文中一共展示了Installer.finalize_system方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: finalize_system
# 需要导入模块: from installer import Installer [as 别名]
# 或者: from installer.Installer import finalize_system [as 别名]
def finalize_system(self):
Installer.finalize_system(self)
self.run("mkdir -p {}/srv/rpm-ostree/repo".format(self.photon_root))
self.run("cp ./photon-base.json {}/srv/rpm-ostree/".format(self.photon_root))
self.run("ln -s /etc/yum.repos.d/photon.repo {}/srv/rpm-ostree/photon-ostree.repo".format(self.photon_root))
self.run("cp ./ostree-httpd.conf {}/srv/rpm-ostree/".format(self.photon_root))
self.run("cp ./httpd.service {}/usr/lib/systemd/system/".format(self.photon_root))
self.run("cp ./get-ip-address.sh {}/usr/bin/".format(self.photon_root))
self.run("cp ./ostree-server-greeting.txt {}/etc/issue".format(self.photon_root))
self.run("ln -s /usr/lib/systemd/system/httpd.service {}/usr/lib/systemd/system/multi-user.target.wants/httpd.service".format(self.photon_root))
self.run("tar -xf /mnt/cdrom/ostree-repo.tar.gz -C {}/srv/rpm-ostree/repo".format(self.photon_root))
开发者ID:Virtualization-Appliance-Marketplace,项目名称:VAM-VMware-Photon,代码行数:14,代码来源:ostreeserverinstaller.py
示例2: finalize_system
# 需要导入模块: from installer import Installer [as 别名]
# 或者: from installer.Installer import finalize_system [as 别名]
def finalize_system(self):
Installer.finalize_system(self)
self.run("mkdir -p {}/srv/rpm-ostree/repo".format(self.photon_root))
self.run("cp ./photon-base.json {}/srv/rpm-ostree/".format(self.photon_root))
self.run("ln -s /etc/yum.repos.d/photon.repo {}/srv/rpm-ostree/photon-ostree.repo".format(self.photon_root))
self.run("ln -s /etc/yum.repos.d/photon-iso.repo {}/srv/rpm-ostree/photon-iso-ostree.repo".format(self.photon_root))
self.run("ln -s /etc/yum.repos.d/photon-updates.repo {}/srv/rpm-ostree/photon-updates-ostree.repo".format(self.photon_root))
self.run("ln -s /etc/yum.repos.d/photon-extras.repo {}/srv/rpm-ostree/photon-extras-ostree.repo".format(self.photon_root))
self.run("ln -s /etc/yum.repos.d/lightwave.repo {}/srv/rpm-ostree/lightwave-ostree.repo".format(self.photon_root))
self.run("cp ./ostree-httpd.conf {}/srv/rpm-ostree/".format(self.photon_root))
self.run("cp ./httpd.service {}/usr/lib/systemd/system/".format(self.photon_root))
self.run("cp ./get-ip-address.sh {}/usr/bin/".format(self.photon_root))
self.run("cp ./ostree-server-greeting.txt {}/etc/issue".format(self.photon_root))
self.run("ln -s /usr/lib/systemd/system/httpd.service {}/usr/lib/systemd/system/multi-user.target.wants/httpd.service".format(self.photon_root))
self.run("tar -xf /mnt/cdrom/ostree-repo.tar.gz -C {}/srv/rpm-ostree/repo".format(self.photon_root))
self.run("sed -i \"\\$i iptables -A INPUT -m state --state NEW,ESTABLISHED -p tcp --dport 80 -j ACCEPT\" {}/etc/systemd/scripts/iptables".format(self.photon_root))
self.run("sed -i \"\\$i iptables -A INPUT -m state --state NEW,ESTABLISHED -p tcp --dport 443 -j ACCEPT\" {}/etc/systemd/scripts/iptables".format(self.photon_root))
示例3: finalize_system
# 需要导入模块: from installer import Installer [as 别名]
# 或者: from installer.Installer import finalize_system [as 别名]
def finalize_system(self):
Installer.finalize_system(self)
self.run("mkdir -p {}/srv/rpm-ostree/repo".format(self.photon_root))
self.run("cp ./photon-base.json {}/srv/rpm-ostree/".format(self.photon_root))
self.run("cp ./photon-minimal.json {}/srv/rpm-ostree/".format(self.photon_root))
self.run("cp ./photon-full.json {}/srv/rpm-ostree/".format(self.photon_root))
self.run("ln -s /etc/yum.repos.d/photon.repo {}/srv/rpm-ostree/photon-ostree.repo".format(self.photon_root))
self.run("ln -s /etc/yum.repos.d/photon-iso.repo {}/srv/rpm-ostree/photon-iso-ostree.repo".format(self.photon_root))
self.run("ln -s /etc/yum.repos.d/photon-updates.repo {}/srv/rpm-ostree/photon-updates-ostree.repo".format(self.photon_root))
self.run("ln -s /etc/yum.repos.d/photon-extras.repo {}/srv/rpm-ostree/photon-extras-ostree.repo".format(self.photon_root))
self.run("cp ./ostree-httpd.conf {}/srv/rpm-ostree/".format(self.photon_root))
# Use a custom httpd service file for ostree server
self.run("mkdir {}/etc/systemd/system/httpd.service.d".format(self.photon_root))
self.run("cp ./10-httpd-service.conf {}/etc/systemd/system/httpd.service.d/".format(self.photon_root))
self.run("cp ./get-ip-address.sh {}/usr/bin/".format(self.photon_root))
self.run("cp ./ostree-server-greeting.txt {}/etc/issue".format(self.photon_root))
self.run("ln -s /usr/lib/systemd/system/httpd.service {}/usr/lib/systemd/system/multi-user.target.wants/httpd.service".format(self.photon_root))
self.run("tar -xf /mnt/cdrom/ostree-repo.tar.gz -C {}/srv/rpm-ostree/repo".format(self.photon_root))
self.run("sed -i \"\\$i iptables -A INPUT -m state --state NEW,ESTABLISHED -p tcp --dport 80 -j ACCEPT\" {}/etc/systemd/scripts/iptables".format(self.photon_root))
self.run("sed -i \"\\$i iptables -A INPUT -m state --state NEW,ESTABLISHED -p tcp --dport 443 -j ACCEPT\" {}/etc/systemd/scripts/iptables".format(self.photon_root))
self.run("sed -i \"s/umask[ \t]\+[0-9]\+/umask 022/g\" {}/etc/profile".format(self.photon_root))