diff --git a/Makefile b/Makefile index b86ed0d..6e06bb8 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,8 @@ +all: blink/blink.1 + +blink/blink.1: blink/blink + pod2man blink/blink > blink/blink.1 + install: parallel ln -sf `pwd`/{}/{} /usr/local/bin/{} ::: blink reniced em field forever neno rn stdout tracefile w4it-for-port-open + parallel ln -sf `pwd`/{}/{}.1 /usr/local/share/man/man1/{}.1 ::: blink diff --git a/blink/blink b/blink/blink index e1da3a0..8aae79b 100755 --- a/blink/blink +++ b/blink/blink @@ -7,16 +7,14 @@ blink - blink disks in a disk enclosure =head1 SYNOPSIS -B [--on|--off|--toggle] [I|--all|--all-detected|--all-slots] +B [-n|--on|-f|--off|-t|--toggle] [I|--all|-d|--all-detected|-s|--all-slots] B I I =head1 DESCRIPTION -B blinks a device in an external harddisk enclosure. If some -devices are already blinking, B will turn off blinking of all -devices. +B blinks a device in an external harddisk enclosure. If no I is given the blinking be will toggled. @@ -92,6 +90,13 @@ To blink /dev/sdf B +=head1 EXAMPLE: Blink all undetected slots + +To blink all undetected slots we first blink all detected and then toggle all slots: + +B + + =head1 EXIT STATUS Always returns true. @@ -153,9 +158,9 @@ if(@ARGV) { } if($::opt_alldetected) { - $locate = "/sys/class/enclosure/*/*/device/block/sd*/../../enclosure*/locate"; -} elsif($::opt_allslots) { $locate = "/sys/class/enclosure/*/*/device/enclosure*/locate"; +} elsif($::opt_allslots) { + $locate = "/sys/class/enclosure/*/*/locate"; } else { if($#ARGV == 0) { $dev = shift;