]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/initscripts/initscripts-1.0/devpts.sh
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / initscripts / initscripts-1.0 / devpts.sh
1 #! /bin/sh
2
3 . /etc/default/devpts
4
5 test "`uname -s`" = "Linux" || exit 0
6
7 #
8 #       First find out if devpts is available. Also check if devfs
9 #       is already mounted - in that case we don't want to use devpts.
10 #
11 if test ! -e /dev/.devfsd && ( grep -q devpts /proc/filesystems )
12 then
13         #
14         #       Create multiplexor device.
15         #
16         test -c /dev/ptmx || mknod -m 666 /dev/ptmx c 5 2
17
18         #
19         #       Mount /dev/pts if needed.
20         #
21         if ( ! grep -q devpts /proc/mounts )
22         then
23                 mkdir -p /dev/pts
24                 mount -t devpts devpts /dev/pts -ogid=${TTYGRP},mode=${TTYMODE}
25         fi
26 fi
27
28 exit 0