if[-f/etc/fstab];then
# Add /dev/pts to fstab if fstab exists (install2 does it during install).ifgrep-F-qsdevpts/etc/fstab;then
ifgrep-qs'devpts.*mode=0622'/etc/fstab;then
# Correct permissions from broken dev packages.TMP=$(mktemp/tmp/fstab.XXXXXX)&&
sed-e's/devpts.*mode=0622/devpts gid=5,mode=0620/'</etc/fstab>"$TMP"&&
cat"$TMP">/etc/fstab||
echo"failed to correct devpts permissions in /etc/fstab"1>&2
rm-f"$TMP"fi
else
echo'devpts /dev/pts devpts gid=5,mode=0620 0 0'>>/etc/fstab
fi
fi
PCA=/sbin/pam_console_apply
[-x"$PCA"]&&"$PCA"||:
if[-r/proc/mounts];then(whilereaddevmountpointrest;do["$mountpoint"!=/dev]||exit1doneexit0)</proc/mounts||{echoecho'** Cannot install dev-minimal: mounted udev detected.'echo'** This is no problem, but to avoid side-effects with'echo'** stopping and starting it automatically, please do:'echo'/etc/init.d/udevd umount'echo'apt-get install dev-minimal'echo'/etc/init.d/udevd restart'echo'** Note that some services like syslogd or gpm might need'echo'** restart after this, too; others might have problems.'exit1}fi
if[-r/proc/mounts];then(whilereaddevmountpointrest;do["$mountpoint"!=/dev]||exit1doneexit0)</proc/mounts||{echoecho'** Cannot remove dev-minimal: mounted udev detected.'echo'** This is no problem, but to avoid side-effects with'echo'** stopping and starting it automatically, please do:'echo'/etc/init.d/udevd umount'echo'rpm -e dev-minimal'echo'/etc/init.d/udevd restart'echo'** Note that some services like syslogd or gpm might need'echo'** restart after this, too; others might have problems.'exit1}fi
# RPM would let dev-minimal installation break# but install dev (which requires the same dev-minimal)# during that transaction; so need to check here too