fix partitions list

No need to look for all partitions, only disks are needed.
This commit is contained in:
Jérémy Lecour 2019-06-24 16:36:36 +02:00 committed by Jérémy Lecour
parent d0afc0089c
commit aa97d3ea88
1 changed files with 1 additions and 1 deletions

View File

@ -234,7 +234,7 @@ if [ "${SYSTEM}" = "linux" ]; then
apt-cache dumpavail > ${LOCAL_BACKUP_DIR}/packages.available
## Dump MBR / table partitions
disks=$(find /dev/ -regex '/dev/\([sv]d[a-z]\|nvme.*p\)[0-9]')
disks=$(find /dev/ -regex '/dev/\([sv]d[a-z]\|nvme[0-9]+n[0-9]+\)')
for disk in ${disks}; do
name=$(basename "${disk}")
dd if="${disk}" of="${LOCAL_BACKUP_DIR}/MBR-${name}" bs=512 count=1 2>&1 | egrep -v "(records in|records out|512 bytes)"