Re: list-harddrives/parted

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

 



>>>>> "MH" == Moray Henderson <Moray.Henderson@xxxxxxxxxxxxxxxx> writes:

MH> Quick one (hopefully): can Anaconda's parted module (as used by
MH> list-harddrives, for example) distinguish between fixed and
MH> removable storage?

To get all of the non-removable disks, I just do:

for file in /sys/block/sd*; do
  rem=$(cat $file/removable)
  if [[ $rem == 0 ]]; then
    hds="$hds $(basename $file)"
  fi
done

Of course if you have some storage setup that presents disks with some
name other than sd* then you'll have to adjust that.

 - J<

_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list


[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux