initscripts: add a local copy of devpts.sh

Start point to make SELinux specific changes in devpts.sh, copied from
oe-core layer.

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Xin Ouyang <xin.ouyang@windriver.com>
This commit is contained in:
Wenzong Fan 2014-05-12 03:31:48 -04:00 committed by Xin Ouyang
parent bb876d244d
commit f48a8184d0
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,28 @@
#!/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
if grep -q devpts /proc/filesystems
then
#
# Create multiplexor device.
#
test -c /dev/ptmx || mknod -m 666 /dev/ptmx c 5 2
#
# Mount /dev/pts if needed.
#
if ! grep -q devpts /proc/mounts
then
mkdir -p /dev/pts
mount -t devpts devpts /dev/pts -ogid=${TTYGRP},mode=${TTYMODE}
fi
fi

View File

@ -1,5 +1,7 @@
PR .= ".3"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
do_install_append () {
cat <<-EOF >> ${D}${sysconfdir}/init.d/populate-volatile.sh
touch /var/log/lastlog