[FAI-commit] [faiproject/fai] 5160db: Fix setup-storage handling of empty disk(s) with p...

GitHub noreply at github.com
Thu Sep 11 15:56:57 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/faiproject/fai
  Commit: 5160db703166f23d5f3189b9458f570836b56f68
      https://github.com/faiproject/fai/commit/5160db703166f23d5f3189b9458f570836b56f68
  Author: Michael Prokop <mika at debian.org>
  Date:   2014-09-11 (Thu, 11 Sep 2014)

  Changed paths:
    M lib/setup-storage/Exec.pm

  Log Message:
  -----------
  Fix setup-storage handling of empty disk(s) with parted >=3.*

When executing 'parted -s /dev/sda unit TiB print' on an empty
disk with parted 2.3(-16) it exits with return code 1 and
the following line on stdout:

| Error: /dev/sda: unrecognised disk label

When executing the same command with parted 3.* (verified with
3.2-5 as present in current Debian jessie/sid) it also exits with
return code 1, but outputs the error message on std*err*.

Without this patch executing setup-storage on an empty disk
fails with:

| Executing: parted -s /dev/sda unit TiB print
| (STDERR) Error: /dev/sda: unrecognised disk label
| (STDOUT) Model: ...
| (STDOUT) Disk /dev/sda: ...
| (STDOUT) Sector size (logical/physical): 512B/512B
| (STDOUT) Partition Table: unknown
| (STDOUT) Disk Flags:
| Command had non-zero exit code




More information about the FAI-commit mailing list