[Pkg-sysvinit-commits] r205 - in sysvinit/trunk/debian: . initscripts/etc/init.d

Thomas Hood jdthood-guest at costa.debian.org
Mon Nov 21 14:51:11 UTC 2005


Author: jdthood-guest
Date: 2005-11-21 14:51:10 +0000 (Mon, 21 Nov 2005)
New Revision: 205

Modified:
   sysvinit/trunk/debian/changelog
   sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh
   sysvinit/trunk/debian/initscripts/etc/init.d/mountvirtfs
Log:
Fix #333836

Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog	2005-11-21 14:25:47 UTC (rev 204)
+++ sysvinit/trunk/debian/changelog	2005-11-21 14:51:10 UTC (rev 205)
@@ -11,6 +11,8 @@
     (Closes: #339979 and presumably closes: #332309)
   * Clean up initscript messages
   * Clean up indentation in some initscripts
+  * Eliminate use of dir_writable from checkroot.sh and mountvirtfs in
+    order to please selinux  (Closes: #333836)
 
  -- Petter Reinholdtsen <pere at debian.org>  Sat, 19 Nov 2005 21:11:34 +0100
 

Modified: sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh	2005-11-21 14:25:47 UTC (rev 204)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh	2005-11-21 14:51:10 UTC (rev 205)
@@ -74,8 +74,7 @@
 			;;
 		  *)
 			# Devfs definition ?
-			if [ "$type" = "devfs" ] && [ "$mnt" = /dev ] &&
-				mountpoint -q /dev
+			if [ "$type" = "devfs" ] && [ "$mnt" = /dev ] && mountpoint -q /dev
 			then
 				devfs="-t $type $dev $mnt"
 			fi
@@ -144,13 +143,16 @@
 			if [ "`mountpoint -qx /dev/root`" = "4:0" ]
 			then
 				rootdev=/dev/root
-			elif dir_writable /dev/shm
-			then
-				rm -f /dev/shm/root
-				mknod -m 600 /dev/shm/root b ${rdev%:*} ${rdev#*:}
-				rootdev=/dev/shm/root
 			else
-				rootfatal=yes
+				if \
+					rm -f /dev/shm/root \
+					&& mknod -m 600 /dev/shm/root b ${rdev%:*} ${rdev#*:} \
+					&& [ -e /dev/shm/root ]
+				then
+					rootdev=/dev/shm/root
+				else
+					rootfatal=yes
+				fi
 			fi
 		fi
 	fi

Modified: sysvinit/trunk/debian/initscripts/etc/init.d/mountvirtfs
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/mountvirtfs	2005-11-21 14:25:47 UTC (rev 204)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/mountvirtfs	2005-11-21 14:51:10 UTC (rev 205)
@@ -177,9 +177,14 @@
 		fi
 		if [ -d /dev/pts ]
 		then
-			if dir_writable /dev && [ ! -c /dev/ptmx ]
+			if [ ! -c /dev/ptmx ]
 			then
 				mknod --mode=666 /dev/ptmx c 5 2
+				ES=$?
+				if [ "$ES" != 0 ]
+				then
+					log_warning_msg "Failed making node /dev/ptmx with error code ${ES}."
+				fi
 			fi
 			domount devpts "" /dev/pts -ogid=$TTYGRP,mode=$TTYMODE
 		fi




More information about the Pkg-sysvinit-commits mailing list