billw2 / rpi-clone

A shell script to clone a booted disk.
BSD 3-Clause "New" or "Revised" License
2.49k stars 327 forks source link

Fdisk commands probably fail in quiet mode. #99

Open matthijskooijman opened 3 years ago

matthijskooijman commented 3 years ago

I noticed a few places in the code where qprintf is used to generate input for fdisk. IIUC, this means that if quiet mode is enabled, no fdisk commands will be generated and the clone probably fails.

https://github.com/billw2/rpi-clone/blob/07f536e9d93cb5b50635415ee0fa46f498614ee4/rpi-clone#L1460 https://github.com/billw2/rpi-clone/blob/07f536e9d93cb5b50635415ee0fa46f498614ee4/rpi-clone#L1470 https://github.com/billw2/rpi-clone/blob/07f536e9d93cb5b50635415ee0fa46f498614ee4/rpi-clone#L1637

These lines were introduced in d00c0d179e073f4ff4d5217ec2828f95af825b65 and are probably the result of a (too) global search-replace.

Note that I have not tested this, this is just based on code review.