]> pere.pagekite.me Git - homepage.git/blobdiff - blog/index.html
Generated.
[homepage.git] / blog / index.html
index c387a6d82c2dcafa0a11ce53d0592f01f86a38f0..cf7afad37494ccface9e14e307f5b5a203fa8528 100644 (file)
@@ -163,7 +163,7 @@ values stands for.  It is in part based on information from
 this shell script:</p>
 
 <pre>
 this shell script:</p>
 
 <pre>
-cat $(find /sys -name modalias) | sort -u
+find /sys -name modalias -print0 | xargs -0 cat | sort -u
 </pre>
 
 <p>The supported modalias globs for a given kernel module can be found
 </pre>
 
 <p>The supported modalias globs for a given kernel module can be found
@@ -355,7 +355,7 @@ hardware to packages when new stuff is inserted during run time.</p>
 one can use the following shell script:</p>
 
 <pre>
 one can use the following shell script:</p>
 
 <pre>
-  for id in $(cat $(find /sys -name modalias)|sort -u); do \
+  for id in $(find /sys -name modalias -print0 | xargs -0 cat | sort -u); do \
     echo "$id" ; \
     /sbin/modprobe --show-depends "$id"|sed 's/^/  /' ; \
   done
     echo "$id" ; \
     /sbin/modprobe --show-depends "$id"|sed 's/^/  /' ; \
   done
@@ -385,6 +385,10 @@ list is very long on my test machine):</p>
 packages to install when new hardware is plugged into a Debian
 machine, please send me an email or talk to me on
 <a href="irc://irc.debian.org/%23debian-devel">#debian-devel</a>.</p>
 packages to install when new hardware is plugged into a Debian
 machine, please send me an email or talk to me on
 <a href="irc://irc.debian.org/%23debian-devel">#debian-devel</a>.</p>
+
+<p><strong>Update 2013-01-15:</strong> Rewrite "cat $(find ...)" to
+"find ... -print0 | xargs -0 cat" to make sure it handle directories
+in /sys/ with space in them.</p>
 </div>
       <div class="tags">
         
 </div>
       <div class="tags">