Re: PATCH: Streamline mkinitrd storage device dedection

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

 



On Wed, 2009-02-04 at 14:39 -0500, Peter Jones wrote:
> Hans de Goede wrote:

> > +    if [[ "$sysfs" =~ '^/sys/devices/virtual/block/dm-[0-9]+$' ]]; then
> > +        vecho "Found DeviceMapper component ${sysfs##*/}"
> > +        handledm $(cat $sysfs/dev |cut -d : -f 1) $(cat $sysfs/dev |cut 
> > -d : -f 2)
> > +    fi
> 
> cut isn't allowed because it's in /usr/bin ; use sed for this.

You can also use shell builtins:

majmin=$(< $sysfs/dev) # $(< FILE) == $(cat FILE) 
handledm ${majmin/:/ } # replace ":" with " ", let shell split

-w (who hates subshells)

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux