build_image.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:iconograph 作者: robot-tools 项目源码 文件源码
def _AddDiversions(self, chroot_path):
    for source, dest in self._DIVERSIONS.items():
      self._ExecChroot(
          chroot_path,
          'dpkg-divert',
          '--local',
          '--rename',
          '--add',
          source)
      self._ExecChroot(
          chroot_path,
          'ln',
          '--symbolic',
          '--force',
          dest,
          source)
    with open(os.path.join(chroot_path, 'usr', 'sbin', 'policy-rc.d'), 'w') as fh:
      fh.write('#!/bin/sh\n')
      fh.write('exit 101\n')
      os.fchmod(fh.fileno(), 0o744)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号