]> git.wh0rd.org Git - home.git/commitdiff
custom-chroot: fix /dev/pts mounting on older kernels
authorMike Frysinger <vapier@gentoo.org>
Wed, 10 Jan 2018 08:25:48 +0000 (08:25 +0000)
committerMike Frysinger <vapier@gentoo.org>
Wed, 10 Jan 2018 08:25:48 +0000 (08:25 +0000)
.bin/custom-chroot

index 93bca67df5e8cc72d969083af47fd3b8b0fad566..109cd45e3f0de1aec73e4810505a98e5b13b452a 100755 (executable)
@@ -147,8 +147,10 @@ main() {
        done
        # Handle special mounts that we don't want to just bind mount.
        if ! is_mounted "${chroot}/dev/pts" ; then
+               # Option order matters: on older kernels that don't recognize newinstance,
+               # parsing stops as soon as it hits that.
                mount -t devpts devpts "${chroot}/dev/pts" \
-                       -o nosuid,noexec,newinstance,ptmxmode=0666,mode=0620,gid=5
+                       -o nosuid,noexec,mode=0620,gid=5,ptmxmode=0666,newinstance
        fi
 
        init_chroot