[Piuparts-devel] [Git][debian/piuparts][develop] Create /dev/ptmx like debootstrap does
Mathieu Parent
gitlab at salsa.debian.org
Wed Oct 17 05:49:24 BST 2018
Mathieu Parent pushed to branch develop at Debian / piuparts
Commits:
09551876 by Mathieu Parent at 2018-10-17T04:49:18Z
Create /dev/ptmx like debootstrap does
See https://salsa.debian.org/installer-team/debootstrap/blob/6f3f6f8b76e2d1a24ddbf05f065439412c3b81a1/functions#L1263-1268 and https://www.kernel.org/doc/Documentation/filesystems/devpts.txt
Otherwise, scripts/pre_remove_50_find_bad_permissions fails with:
ERROR: BAD PERMISSIONS
crw-rw-rw-. 1 root root 5, 2 Oct 16 03:49 /dev/ptmx
- - - - -
1 changed file:
- piuparts.py
Changes:
=====================================
piuparts.py
=====================================
@@ -1755,11 +1755,11 @@ class Chroot:
os.symlink("../proc/mounts", etcmtab)
self.mount("devpts", "/dev/pts", fstype="devpts", opts="newinstance,noexec,nosuid,gid=5,mode=0620,ptmxmode=0666")
dev_ptmx_rel_path = self.relative("dev/ptmx")
- if not os.path.islink(dev_ptmx_rel_path):
- if not os.path.exists(dev_ptmx_rel_path):
- with open(dev_ptmx_rel_path, 'w'):
- pass
- self.mount(self.relative("dev/pts/ptmx"), "/dev/ptmx", opts="bind", no_mkdir=True)
+ if not os.path.exists(dev_ptmx_rel_path):
+ try:
+ os.mknod(dev_ptmx_rel_path, 0666, os.makedev(5, 2))
+ except:
+ os.symlink("pts/ptmx", dev_ptmx_rel_path)
p = subprocess.Popen(["tty"], stdout=subprocess.PIPE)
stdout, _ = p.communicate()
current_tty = stdout.strip()
View it on GitLab: https://salsa.debian.org/debian/piuparts/commit/09551876fc3387d425a77d5469513a5ae9b1f7ed
--
View it on GitLab: https://salsa.debian.org/debian/piuparts/commit/09551876fc3387d425a77d5469513a5ae9b1f7ed
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/piuparts-devel/attachments/20181017/ba341c93/attachment-0001.html>
More information about the Piuparts-devel
mailing list