summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-09-03 03:10:42 +0000
committerMike Frysinger <vapier@gentoo.org>2007-09-03 03:10:42 +0000
commita16695853725ea55b68732071f1d2d54c4ef51cf (patch)
treecbadd827bbcbedb8c80e16e0a41b49cad2901008
parent2a1e0c1d8d890a09be8b1864c5a3744ae12b09e6 (diff)
downloadopenrc-a16695853725ea55b68732071f1d2d54c4ef51cf.tar.gz
openrc-a16695853725ea55b68732071f1d2d54c4ef51cf.tar.bz2
openrc-a16695853725ea55b68732071f1d2d54c4ef51cf.tar.xz
Always attempt to mount /dev/pts when devpts is available as it may appear in some 2.4 setups.
-rw-r--r--ChangeLog5
-rwxr-xr-xsh.Linux/init.sh30
2 files changed, 19 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index a7464cb..46f7a41 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for Gentoo System Intialization ("rc") scripts
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPLv2
+ 02 Sep 2007; Mike Frysinger <vapier@gentoo.org>:
+
+ Always attempt to mount /dev/pts when devpts is available as it may appear
+ in some 2.4 setups.
+
* baselayout-2.0.0_rc4 (02 Sep 2007)
02 Sep 2007; Roy Marples <uberlord@gentoo.org>:
diff --git a/sh.Linux/init.sh b/sh.Linux/init.sh
index 48ddf54..e9fd98b 100755
--- a/sh.Linux/init.sh
+++ b/sh.Linux/init.sh
@@ -197,23 +197,21 @@ else
done
fi
-# From linux-2.6 we need to mount /dev/pts again ...
-if [ "${RC_UNAME}" != "GNU/kFreeBSD" -a "${K26}" = "0" ] ; then
- if grep -Eq "[[:space:]]+devpts$" /proc/filesystems && \
- ! mountinfo /dev/pts > /dev/null ; then
- if [ ! -d /dev/pts ] && \
- [ "${devfs}" = "yes" -o "${udev}" = "yes" ] ; then
- # Make sure we have /dev/pts
- mkdir -p /dev/pts >/dev/null 2>/dev/null || \
- ewarn "Could not create /dev/pts!"
- fi
+# Mount the new fancy pants /dev/pts whenever possible
+if grep -Eq "[[:space:]]+devpts$" /proc/filesystems && \
+ ! mountinfo /dev/pts > /dev/null ; then
+ if [ ! -d /dev/pts ] && \
+ [ "${devfs}" = "yes" -o "${udev}" = "yes" ] ; then
+ # Make sure we have /dev/pts
+ mkdir -p /dev/pts >/dev/null 2>/dev/null || \
+ ewarn "Could not create /dev/pts!"
+ fi
- if [ -d /dev/pts ] ; then
- ebegin "Mounting devpts at /dev/pts"
- mntcmd="$(fstabinfo --mountcmd /dev/pts)"
- try mount -n ${mntcmd:--t devpts -o gid=5,mode=0620,noexec,nosuid devpts /dev/pts}
- eend $?
- fi
+ if [ -d /dev/pts ] ; then
+ ebegin "Mounting devpts at /dev/pts"
+ mntcmd="$(fstabinfo --mountcmd /dev/pts)"
+ try mount -n ${mntcmd:--t devpts -o gid=5,mode=0620,noexec,nosuid devpts /dev/pts}
+ eend $?
fi
fi