rc-scripts/trunk/rc.d: rc.shutdown rc.sysinit

arekm cvs at pld-linux.org
Sun Oct 30 23:15:02 CET 2005


Author: arekm
Date: Sun Oct 30 23:14:59 2005
New Revision: 6504

Modified:
   rc-scripts/trunk/rc.d/rc.shutdown
   rc-scripts/trunk/rc.d/rc.sysinit
Log:
Mount securityfs filesystem on kernel >= 2.6.14.

Modified: rc-scripts/trunk/rc.d/rc.shutdown
==============================================================================
--- rc-scripts/trunk/rc.d/rc.shutdown	(original)
+++ rc-scripts/trunk/rc.d/rc.shutdown	Sun Oct 30 23:14:59 2005
@@ -51,7 +51,7 @@
 	sig=-15
 	retry=3
 	force=
-	remaining=$(awk '!/(^#| proc | loopfs | devfs | devpts | shm | iso9660 | ramfs | tmpfs | sysfs | squashfs |^none|^\/dev\/root| \/ )/ {print $2}' /proc/mounts)
+	remaining=$(awk '!/(^#| proc | loopfs | devfs | devpts | shm | iso9660 | ramfs | tmpfs | sysfs | securityfs | squashfs |^none|^\/dev\/root| \/ )/ {print $2}' /proc/mounts)
 	while [ -n "$remaining" -a "$retry" -gt 0 ]
 	do
 		show "Unmounting file systems" ; busy
@@ -63,7 +63,7 @@
 		fi
 
 		sleep 2
-		remaining=$(awk '!/(^#| proc | loopfs | devfs | devpts | shm | iso9660 | ramfs | tmpfs | sysfs | squashfs |^none|^\/dev\/root| \/ )/ {print $2}' /proc/mounts)
+		remaining=$(awk '!/(^#| proc | loopfs | devfs | devpts | shm | iso9660 | ramfs | tmpfs | sysfs | securityfs | squashfs |^none|^\/dev\/root| \/ )/ {print $2}' /proc/mounts)
 		[ -z "$remaining" ] && break
 		/sbin/fuser -k -m $sig $remaining > /dev/null
 		sleep 5

Modified: rc-scripts/trunk/rc.d/rc.sysinit
==============================================================================
--- rc-scripts/trunk/rc.d/rc.sysinit	(original)
+++ rc-scripts/trunk/rc.d/rc.sysinit	Sun Oct 30 23:14:59 2005
@@ -63,6 +63,11 @@
 # sysfs is also needed before any other things (under kernel > 2.5)
 if ! is_yes "$VSERVER" && grep -q sysfs /proc/filesystems 2>/dev/null ; then
 	mount -n -o gid=17 -t sysfs sysfs /sys
+	if [ "$(kernelver)" -ge "002006014" ] && \
+		grep -q securityfs /proc/filesystems 2>/dev/null ; then
+			mount -n -o gid=17 -t securityfs securityfs /sys/kernel/security
+	fi
+													
 fi
 
 # selinux
@@ -389,6 +394,10 @@
 
 	if grep -q sysfs /proc/filesystems 2>/dev/null ; then
 		mount -f -t sysfs sysfs /sys
+		if [ "$(kernelver)" -ge "002006014" ] && \
+			grep -q securityfs /proc/filesystems 2>/dev/null ; then
+				mount -f -t securityfs securityfs /sys/kernel/security
+		fi
 	fi
 
 	if grep -q selinuxfs /proc/filesystems 2>/dev/null ; then



More information about the pld-cvs-commit mailing list