perl-5.22
Last change
on this file since 9ec1a22 was
c5c522c,
checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago
|
initial commit, transferred from cleaned syn3 svn tree
|
-
Property mode set to
100755
|
File size:
343 bytes
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | #(C)2007 DatuX |
---|
3 | #returns fullpaths to discs that are not used |
---|
4 | |
---|
5 | cd /sys/block |
---|
6 | for SYS in *; do |
---|
7 | DEV=/dev/`echo $SYS| sed s@!@/@g` |
---|
8 | |
---|
9 | #range=1 (things like dm, loop, fd etc)? |
---|
10 | [ "`cat $SYS/range`" == "1" ] && continue; |
---|
11 | |
---|
12 | #try to open device exclusively, to see if its in use |
---|
13 | if openex $DEV; then |
---|
14 | echo $DEV |
---|
15 | fi |
---|
16 | done |
---|
Note: See
TracBrowser
for help on using the repository browser.