raspberrypi-ui / piclone

Utility to back up Pi to an SD card reader
260 stars 62 forks source link

portability suggestion of parted output #4

Closed golfromeo-fr closed 8 years ago

golfromeo-fr commented 8 years ago

Hello,

To improve portability (i.e. Trusty) because "parted" on Jessie adds an extra line with "Disk Flags:"

see pull request please #5

I would change the line sprintf (buffer, "sudo parted %s unit s print | tail -n +4 | head -n 1", src_dev); with sprintf (buffer, "sudo parted %s unit s print | sed '/^ /!d'", src_dev);

the partitions displayed with parted begin with a space, so you can remove all other lines

Regards, Guillaume (follower/mod @ forum.armbian.com)

PS: Thanks for this community tool! I read the last Pi Magazine and made a live backup of my Rpi2 SD with piclone. My SD card failed and I had no recent backup. So I want to port it to Armbian.

spl237 commented 8 years ago

Pulled - many thanks!