[rescue] DLT drive dead want to replace without rebooting

Jonathan C. Patschke jp at celestrion.net
Wed Nov 29 14:22:16 CST 2006


On Wed, 29 Nov 2006, Patrick Finnegan wrote:

> It's really handy to be able to manipulate these by hand using "echo"
> and shell redirection, or in things like init scripts, without having
> to call an outside C program just to manipulate the interface.  Not
> just debugging, but actual day-to-day use.

How is "echo 'something magic' > /sys/devices/something/somewhere" any
more handly than "xyzcontrol -r -q 1"?

I admit that the latter may be less self-documenting, but also maintain
that it's probably something that will at least have a man page
-somewhere- explaining all the -other- neat things you can do with
xyzcontrol, as opposed to:

   [jp at lark0:/sys/devices/acpi/power]$ ls
   state  wakeup
   [jp at lark0:/sys/devices/acpi/power]$ cat state
   0
   [jp at lark0:/sys/devices/acpi/power]$ #  Huh.  Wonder what "0" means.
   [jp at lark0:/sys/devices/acpi/power]$ man sys
   No manual entry for sys
   [jp at lark0:/sys/devices/acpi/power]$ man devices
   No manual entry for devices
   [jp at lark0:/sys/devices/acpi/power]$ man acpi
   mNo manual entry for acpi
   [jp at lark0:/sys/devices/acpi/power]$ man power
   No manual entry for power
   [jp at lark0:/sys/devices/acpi/power]$ man state
   No manual entry for state

Ah, so the documentation must be in the kernel sources, right?

   [jp at lark0:/sys/devices/acpi/power]$ cd /usr/src/linux/Documentation
   [jp at lark0:/usr/src/linux/Documentation]$ find . -type f -name \
     '*[Aa][Cc][Pp][iI]*' | xargs grep /sys
   ./ibm-acpi.txt:         see http://www.ibiblio.org/pub/Linux/system/hardware
   [jp at lark0:/usr/src/linux/Documentation]$ find . -type f -name \
     '*[Aa][Cc][Pp][iI]*' | xargs grep acpi/power
   [jp at lark0:/usr/src/linux/Documentation]$

Ah, so the documentation must be in the SOURCE!  Indeed, reading
/usr/src/linux/drivers/acpi/power.c tells me that 0x00 probably means
that ACPI is disabled.  That's a -hell- of a lot handier than an
external C program with a man page and possibly a syntax/options
description in the usage blurb.

I'm just too dumb to use Linux, I guess.

-- 
Jonathan Patschke  ) "Some people grow out of the petty theft of
Elgin, TX         (   childhood.  Others grow up to be CEOs and
USA                )  politicians."              --Forrest Black



More information about the rescue mailing list