mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 00:49:33 +02:00
initscripts: don't create subshells for simple tests
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4726 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
@@ -1,14 +1,16 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: devpts
|
||||||
|
# Required-Start: udev
|
||||||
|
# Required-Stop:
|
||||||
|
# Default-Start: S
|
||||||
|
# Default-Stop:
|
||||||
|
# Short-Description: Mount /dev/pts file systems.
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
. /etc/default/devpts
|
. /etc/default/devpts
|
||||||
|
|
||||||
test "`uname -s`" = "Linux" || exit 0
|
if grep -q devpts /proc/filesystems
|
||||||
|
|
||||||
#
|
|
||||||
# First find out if devpts is available. Also check if devfs
|
|
||||||
# is already mounted - in that case we don't want to use devpts.
|
|
||||||
#
|
|
||||||
if test ! -e /dev/.devfsd && ( grep -q devpts /proc/filesystems )
|
|
||||||
then
|
then
|
||||||
#
|
#
|
||||||
# Create multiplexor device.
|
# Create multiplexor device.
|
||||||
@@ -18,11 +20,9 @@ then
|
|||||||
#
|
#
|
||||||
# Mount /dev/pts if needed.
|
# Mount /dev/pts if needed.
|
||||||
#
|
#
|
||||||
if ( ! grep -q devpts /proc/mounts )
|
if ! grep -q devpts /proc/mounts
|
||||||
then
|
then
|
||||||
mkdir -p /dev/pts
|
mkdir -p /dev/pts
|
||||||
mount -t devpts devpts /dev/pts -ogid=${TTYGRP},mode=${TTYMODE}
|
mount -t devpts devpts /dev/pts -ogid=${TTYGRP},mode=${TTYMODE}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
|||||||
Reference in New Issue
Block a user