diff options
Diffstat (limited to 'meta/packages/initscripts/initscripts-1.0/devpts.sh')
-rwxr-xr-x | meta/packages/initscripts/initscripts-1.0/devpts.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/meta/packages/initscripts/initscripts-1.0/devpts.sh b/meta/packages/initscripts/initscripts-1.0/devpts.sh new file mode 100755 index 0000000000..334cf63801 --- /dev/null +++ b/meta/packages/initscripts/initscripts-1.0/devpts.sh | |||
@@ -0,0 +1,28 @@ | |||
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 | ||