[PATCH] automatically mount debugfs

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



Here is a patch for rc.sysinit to automatically mount the kernel's
debugfs, if available.

(I switched from Gentoo to Arch two days ago and first sent this message
to arch-dev-public which turned out to be read-only. Maybe a hint on the
mailman page would be nice, to spare future newbies the same experience?)

--- rc.sysinit_old	2009-10-14 20:08:56.776237753 +0200
+++ rc.sysinit	2009-10-14 20:40:28.227216838 +0200
@@ -19,6 +19,13 @@
 /bin/mount -n -t proc none /proc
 /bin/mount -n -t sysfs none /sys
 
+# mount debugfs, if available
+if [ -d /sys/kernel/debug ]; then
+	if grep -qs debugfs /proc/filesystems; then
+		mount -n -t debugfs -o nodev,noexec,nosuid debugfs /sys/kernel/debug
+	fi
+fi
+
 # Copy static device nodes to /dev
 /bin/cp -a /lib/udev/devices/* /dev/
 
@@ -288,7 +295,7 @@
 /bin/mount -o remount,rw /
 # Write /proc, /sys and /dev to /etc/mtab
 if [ -e /proc/mounts ]; then
-	/bin/grep -e "/proc " -e "/sys " -e "/dev " /proc/mounts >> /etc/mtab
+	/bin/grep -e "/proc " -e "/sys " -e "/dev " -e "debugfs" /proc/mounts >> /etc/mtab
 fi
 # now mount all the local filesystems
 /bin/mount -a -t $NETFS -O no_netdev
-- 
Markus


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux