[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#43659: libc6: devpts.sh doesn't test if devpts is already mounted



Package: libc6
Version: 2.1.2-0pre10
Severity: important

Subject says it all.

-- System Information
Debian Release: potato
Kernel Version: Linux khms.westfalen.de 2.2.7-kai.31 #13 Mit Aug 18 18:43:51 CEST 1999 i586 unknown

Versions of the packages libc6 depends on:
ii  ldso            1.9.11-2       The Linux dynamic linker, library and utilit

--- Begin /etc/init.d/devpts.sh (modified conffile)
#! /bin/sh -vx
. /etc/default/devpts
[ `uname -s` = "Linux" ] || exit 0
make_devptmx()
{
    if [ ! -c /dev/ptmx ]; then
	mknod /dev/ptmx c 5 2
	chmod 666 /dev/ptmx
    fi
}
mount_devpts()
{
    if [ ! -d /dev/pts ]; then
	mkdir /dev/pts
	chmod 755 /dev/pts
    fi
    mount -t devpts devpts /dev/pts \
    -ogid=${TTYGRP},mode=${TTYMODE} > /dev/null 2>&1
}
release=`uname -r`
tail=${release#*.*.}
major_release=${release%.${tail}}
minor_release=${tail%%[-.]*}
case ${major_release} in
    2.[23456789] | 3.*)
	devpts=$(grep -c devpts /proc/filesystems)
	if [ $devpts -eq 1 ]
	then
	    make_devptmx
	    mount_devpts
	fi
    ;;
    2.1)
	if [ ${minor_release} -gt 115 ]
	then
	    devpts=$(grep -c devpts /proc/filesystems)
	    if [ $devpts -eq 1 ]
	    then
		make_devptmx
		mount_devpts
	    fi
	fi
    ;;
esac
exit 0

--- End /etc/init.d/devpts.sh


Reply to: