summaryrefslogtreecommitdiffstats
path: root/src.etc/init.d/mountdevsubfs
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-06-03 16:04:40 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-06-03 16:04:40 (EDT)
commite08114fe5d6cf8f138d93d8383a5b19ae5080103 (patch)
treebfc3c17f8e7093dcf5aee103339fd5b0813ac1cd /src.etc/init.d/mountdevsubfs
parent60f11bd06935483eaa618b5e4ff53e7b0ec0d80a (diff)
/etc/init.d/mountdevsubfs: Make more robust.
Diffstat (limited to 'src.etc/init.d/mountdevsubfs')
-rwxr-xr-xsrc.etc/init.d/mountdevsubfs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src.etc/init.d/mountdevsubfs b/src.etc/init.d/mountdevsubfs
index bb976c8..03c13e0 100755
--- a/src.etc/init.d/mountdevsubfs
+++ b/src.etc/init.d/mountdevsubfs
@@ -4,9 +4,9 @@ start()
{
log 'Mounting device file systems'
[ -d /dev/pts ] || mkdir -m 0755 /dev/pts
- if ! mount | grep -Fq ' /dev/pts '; then
+ if ! [ -e /dev/pts/ptmx ]; then
mount -t devpts -o noexec,nosuid,gid=5,mode=0620 \
- devpts /dev/pts
+ devpts /dev/pts || return ${?}
fi
ln -sf /run/shm /dev/shm
}
@@ -14,8 +14,8 @@ start()
stop()
{
log 'Unmounting device file systems'
- if mount | grep -Fq ' /dev/pts '; then
- umount /dev/pts
+ if [ -e /dev/pts/ptmx ]; then
+ umount /dev/pts || return ${?}
fi
rm -f /dev/shm
}