X-Git-Url: https://pere.pagekite.me/gitweb/homepage.git/blobdiff_plain/1ef3da82c93c5032ee628b3a85c31ea6db0c25e1..25df59ef3a279f9eecfe2a7c8de2f36f74b4e647:/blog/index.html diff --git a/blog/index.html b/blog/index.html index c387a6d82c..cf7afad374 100644 --- a/blog/index.html +++ b/blog/index.html @@ -163,7 +163,7 @@ values stands for. It is in part based on information from this shell script:

-cat $(find /sys -name modalias) | sort -u
+find /sys -name modalias -print0 | xargs -0 cat | sort -u
 

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.

one can use the following shell script:

-  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
@@ -385,6 +385,10 @@ list is very long on my test machine):

packages to install when new hardware is plugged into a Debian machine, please send me an email or talk to me on #debian-devel.

+ +

Update 2013-01-15: Rewrite "cat $(find ...)" to +"find ... -print0 | xargs -0 cat" to make sure it handle directories +in /sys/ with space in them.