Re: [Redhat-s390-list] /dev/dasdx device files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Karsten Hopp <Karsten.Hopp@redhat.de>
> To: Brad Rogers <BradR@VSP.com>
> Date: Thu, 7 Mar 2002 23:54:46 +0100

> This is a variation of the short script in the 
> 'Linux for S/390 Device Drivers and Installation commands' IBM Redbook
> page 13 (l390dd.pdf):
> 
> cat /proc/dasd/devices | sed '/unknown/D;s/^.*[(]\([ 0-9]*\)[:]\([ 0-9]*\)[)].*\(dasd[a-z]*\)[: ].*$/\1 \2 \3/g' | awk ' $1 { printf "mknod /dev/%s b %d %d 2>/dev/null; mknod /dev/%s1 b %d %d 2>/dev/null; mknod /dev/%s2 b %d %d 2>/dev/null; mknod /dev/%s3 b %d %d 2>/dev/null; ",$3,$1,$2,$3,$1,$2+1,$3,$1,$2+2,$3,$1,$2+3; }'

You can do $2+1 in arguments? I did not know that.
Sedding unkowns out sees a neat trick too, I forgot about them.
But instead of plumbing stderr into /dev/null, I would
test explicitly. Who know what can happen...
Also, it may be a good idea to change permissions when
it is all done.

-- Pete



[Index of Archives]     [Fedora General Discussion]     [LKML]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Linux s390]     [Gimp]     [Yosemite News]

  Powered by Linux