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)
评论列表
文章目录