diff options
author | 2005-12-14 16:52:13 +0000 | |
---|---|---|
committer | 2005-12-14 16:52:13 +0000 | |
commit | 1cd1dfdfcb21b2e838b103c002954195d4b80b99 (patch) | |
tree | 50d8ddca991043e987065ddba1933cb6ffac5d76 | |
parent | Importing latest baselayout/trunk changes. This is a merge with revision 1753. (diff) | |
download | baselayout-vserver-1cd1dfdfcb21b2e838b103c002954195d4b80b99.tar.gz baselayout-vserver-1cd1dfdfcb21b2e838b103c002954195d4b80b99.tar.bz2 baselayout-vserver-1cd1dfdfcb21b2e838b103c002954195d4b80b99.zip |
fix devpts for openvz
svn path=/baselayout-vserver/trunk/; revision=173
-rwxr-xr-x | sbin/init.linux.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sbin/init.linux.sh b/sbin/init.linux.sh index d144d84..ca4fca5 100755 --- a/sbin/init.linux.sh +++ b/sbin/init.linux.sh @@ -28,6 +28,22 @@ if [[ ! -e /proc/self ]]; then mount -t proc none /proc fi +# OpenVZ also needs devpts for vzctl enter +if [[ ! -e /dev/pts/0 ]]; then + have_devpts="$(awk '($2 == "devpts") { print "yes"; exit 0 }' /proc/filesystems)" + + if [ "${have_devpts}" = "yes" ]; then + # Make sure we have /dev/pts + mkdir -p /dev/pts &>/dev/null || \ + ewarn "Could not create /dev/pts!" + + if [[ -d /dev/pts ]]; then + ebegin "Mounting devpts at /dev/pts" + mount -n -t devpts -o gid=5,mode=0620 devpts /dev/pts + eend $? + fi + fi +fi source "${svclib}"/sh/init-common-post.sh |