[Pkg-sysvinit-devel] Bug#418445: initscripts: please mount debugfs on boot
Bas Zoetekouw
bas at debian.org
Wed Jul 25 11:03:14 UTC 2007
tag 418445 + patch
thanks
Hi!
> Please mount debugfs (/sys/kernel/debug) on boot if it is available in
> the kernel. It is required for blktrace, which I'm uploading to
> unstable soon (currently in experimental). It would be great if we
> could make blktrace work out of the box in a default debian system.
Attached is a patch that fixes this. It only mounts debugfs if the
kernel has support, and if sysfs is also mounted.
diff -Nabur sysvinit-2.86.ds1.eerst/debian/initscripts/etc/init.d/mountkernfs.sh sysvinit-2.86.ds1/debian/initscripts/etc/init.d/mountkernfs.sh
--- sysvinit-2.86.ds1.eerst/debian/initscripts/etc/init.d/mountkernfs.sh 2007-07-25 12:36:09.000000000 +0200
+++ sysvinit-2.86.ds1/debian/initscripts/etc/init.d/mountkernfs.sh 2007-07-25 12:59:35.314049007 +0200
@@ -41,6 +41,12 @@
if grep -E -qs "sysfs\$" /proc/filesystems
then
domount sysfs "" /sys sysfs -onodev,noexec,nosuid
+
+ # only mount debugfs if we have sysfs and debugfs
+ if grep -E -qs "debugfs\$" /proc/filesystems
+ then
+ domount debugfs "" /sys/kernel/debug debugfs -onodev,noexec,nosuid
+ fi
fi
# Mount /var/run and /var/lock as tmpfs if enabled
diff -Nabur sysvinit-2.86.ds1.eerst/debian/initscripts/etc/init.d/umountfs sysvinit-2.86.ds1/debian/initscripts/etc/init.d/umountfs
--- sysvinit-2.86.ds1.eerst/debian/initscripts/etc/init.d/umountfs 2007-07-25 12:36:09.000000000 +0200
+++ sysvinit-2.86.ds1/debian/initscripts/etc/init.d/umountfs 2007-07-25 12:42:06.189913283 +0200
@@ -66,7 +66,7 @@
while read DEV MTPT FSTYPE REST
do
case "$MTPT" in
- /|/proc|/dev|/.dev|/dev/pts|/dev/shm|/dev/.static/dev|/proc/*|/sys|/lib/init/rw)
+ /|/proc|/dev|/.dev|/dev/pts|/dev/shm|/dev/.static/dev|/proc/*|/sys|/sys/kern/debug|/lib/init/rw)
continue
;;
/var/run)
@@ -81,7 +81,7 @@
;;
esac
case "$FSTYPE" in
- proc|procfs|linprocfs|devfs|sysfs|usbfs|usbdevfs|devpts)
+ proc|procfs|linprocfs|devfs|sysfs|usbfs|usbdevfs|devpts|debugfs)
continue
;;
tmpfs)
--
Kind regards,
+--------------------------------------------------------------------+
| Bas Zoetekouw | GPG key: 0644fab7 |
|----------------------------| Fingerprint: c1f5 f24c d514 3fec 8bf6 |
| bas at debian.org | a2b1 2bae e41f 0644 fab7 |
+--------------------------------------------------------------------+
More information about the Pkg-sysvinit-devel
mailing list