Darryl L. Pierce
2009-Jan-05 20:31 UTC
[Ovirt-devel] [PATCH node] Adds a check for a partition table before installing.
If no partition table is found then an error message is show to the user and the system will not continue nor reboot. Signed-off-by: Darryl L. Pierce <dpierce at redhat.com> --- scripts/ovirt-config-boot | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/scripts/ovirt-config-boot b/scripts/ovirt-config-boot index 8ddd46a..d971c5c 100755 --- a/scripts/ovirt-config-boot +++ b/scripts/ovirt-config-boot @@ -142,7 +142,15 @@ if [ -z "$bootparams" ]; then bootparams="$OVIRT_BOOTPARAMS" fi -ovirt_boot_setup "$disk" "$live" "$bootparams" +# ensure the disk is not blank +parted $disk -s "print all" > /dev/null + +if [ 0 -eq $? ]; then + ovirt_boot_setup "$disk" "$live" "$bootparams" +else + printf "Please configure $disk before attempting to install the node image.\n" + doreboot="no" +fi if [ -z "$doreboot" -o "$doreboot" = "yes" ]; then disable_firstbot -- 1.6.0.6
Alan Pevec
2009-Jan-05 22:45 UTC
[Ovirt-devel] [PATCH node] Adds a check for a partition table before installing.
On Mon, Jan 5, 2009 at 9:31 PM, Darryl L. Pierce <dpierce at redhat.com> wrote:> If no partition table is found then an error message is show to the user > and the system will not continue nor reboot. >ACK + printf "Please configure $disk before attempting to install the node> image.\n" >to help the confused user, print the option name "Disk Partitioning" or even just run ovirt-config-storage here? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20090105/bfa48315/attachment.htm>