SPECS: udev.spec - handle lost /dev/pts when migrating from dev

glen glen at pld-linux.org
Wed Sep 7 14:51:59 CEST 2005


Author: glen                         Date: Wed Sep  7 12:51:59 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- handle lost /dev/pts when migrating from dev

---- Files affected:
SPECS:
   udev.spec (1.87 -> 1.88) 

---- Diffs:

================================================================
Index: SPECS/udev.spec
diff -u SPECS/udev.spec:1.87 SPECS/udev.spec:1.88
--- SPECS/udev.spec:1.87	Tue Sep  6 21:35:57 2005
+++ SPECS/udev.spec	Wed Sep  7 14:51:52 2005
@@ -8,7 +8,7 @@
 Summary(pl):	Implementacja devfs w przestrzeni użytkownika
 Name:		udev
 Version:	068
-Release:	2
+Release:	4
 Epoch:		1
 License:	GPL
 Group:		Base
@@ -142,13 +142,24 @@
 # need to kill and restart udevd as after obsoleting dev package the
 # /dev tree will remain empty. umask is needed as otherwise udev will
 # create devices with strange permissions (udev bug probably)
+have_pts=$(awk '$2 == "/dev/pts"{print "yes"}' /proc/mounts)
+
 umask 000
 /sbin/start_udev
 
+# we also need to remount /dev/pts as the /dev/pts directory could be
+# removed in certain circumstances.
+if [ "$have_pts" = "yes" ]; then
+	umount /dev/pts >/dev/null 2>&1
+	mount /dev/pts >/dev/null 2>&1
+fi
+exit 0
+
 %files
 %defattr(644,root,root,755)
 %doc ChangeLog FAQ HOWTO-udev_for_dev README TODO
 %doc docs/{overview,udev_vs_devfs,libsysfs.txt}
+%doc extras/start_udev
 %attr(755,root,root) %{_sbindir}/*
 %if %{with initrd}
 %exclude %{_sbindir}/*initrd*
@@ -192,6 +203,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.88  2005/09/07 12:51:52  glen
+- handle lost /dev/pts when migrating from dev
+
 Revision 1.87  2005/09/06 19:35:57  glen
 - removed redundant killall (start_udev supposed to do that)
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/udev.spec?r1=1.87&r2=1.88&f=u




More information about the pld-cvs-commit mailing list