aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/rcS.d/080-devpts.sh
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d/rcS.d/080-devpts.sh')
-rwxr-xr-xrc.d/rcS.d/080-devpts.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/rc.d/rcS.d/080-devpts.sh b/rc.d/rcS.d/080-devpts.sh
new file mode 100755
index 00000000..d2fa937a
--- /dev/null
+++ b/rc.d/rcS.d/080-devpts.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Check SELinux status
+SELINUX_STATE=
+if [ -e "/selinux/enforce" ] && [ "$(cat /proc/self/attr/current)" != "kernel" ]; then
+ if [ -r "/selinux/enforce" ] ; then
+ SELINUX_STATE=$(cat "/selinux/enforce")
+ else
+ # assume enforcing if you can't read it
+ SELINUX_STATE=1
+ fi
+fi
+
+mount -n /dev/pts >/dev/null 2>&1
+[ -n "$SELINUX_STATE" ] && restorecon /dev/pts >/dev/null 2>&1
+: