Advertisement
s243a

initrd/init:get_part_info() LN# 785-791 (tahrpup)

Apr 24th, 2018
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.63 KB | None | 0 0
  1. # LN# 785-791 of /initrd/init (tahrpup) - https://www.pearltrees.com/s243a/initrd-init/id19535893/item224275653
  2. # LN# 845-851 https://github.com/puppylinux-woof-CE/woof-CE/blob/c96d661c2232caef1d69c693de673fb0e54796f8/initrd-progs/0initrd/init#L845 (13 Mar 2018)
  3. get_part_info() {
  4.  probedisk > /tmp/ALLDRVS
  5.  ls -1 /sys/block | grep -E '^scd|^sd|^mmc|^sr' > /tmp/ALLDRVS0
  6.  PCPARTSALL="$(/sbin/probepart_init -k)"
  7.  HAVE_PARTS="$(echo "$PCPARTSALL" | grep '^/dev/' | cut -f 1-2 -d '|'  | grep -E 'f2fs|udf|iso9660|ext2|ext3|ext4|reiserfs|msdos|vfat|minix|ntfs' | sed -e 's%/dev/%%')"
  8.  [ "$PDEBUG" ] && echo "$HAVE_PARTS" > /tmp/HAVE_PARTS
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement