Re: Call for testing
Alexander Graf <[email protected]>
| Newsgroups | gmane.linux.suse.ppc |
|---|---|
| Message-ID | <[email protected]> |
On 08.10.2012, at 10:47, Andreas Schwab wrote: > Alexander Graf <[email protected]> writes: > >> --- /bin/show_of_path.sh.bkp 2012-10-08 09:38:47.715993663 +0200 >> +++ /bin/show_of_path.sh 2012-10-08 10:03:17.603993398 +0200 >> @@ -327,7 +327,14 @@ >> ide_port=$of_disk_scsi_host >> ide_channel=$of_disk_scsi_id >> >> - cd ../../.. >> + until test -f devspec >> + do >> + cd .. >> + if test "$PWD" = "/" >> + then >> + break >> + fi >> + done > > Or like this: > > --- a/show_of_path.sh > +++ b/show_of_path.sh > @@ -327,6 +327,7 @@ case "$file_full_sysfs_path" in > ide_port=$of_disk_scsi_host > ide_channel=$of_disk_scsi_id > > + case ${file_full_sysfs_path} in */ata+([0-9])/*) cd ..; esac > cd ../../.. > ;; > */host+([0-9])/rport-+([0-9]):+([0-9])-+([0-9])/target+([0-9:])/+([0-9]):+([0-9]):+([0-9]):+([0-9])) I actually copied the "walking down" code from another case in the same script. Maybe we should just always use that one instead of hardcoding the levels we have to walk? Alex -- To unsubscribe, e-mail: [email protected] To contact the owner, e-mail: [email protected]