Jim Meyering
2008-Apr-11 08:34 UTC
[Ovirt-devel] [PATCH] Error out early if tftpboot exists.
Alan Pevec <apevec at redhat.com> wrote:> Jim Meyering wrote: >> If you put that code in the definition of the create_iso function, >> users of ovirt-cd.sh, ovirt-flash.sh, and ovirt-flash-static.sh scripts >> will benefit, too. > > But only ovirt-pxe.sh cares about tftpboot/ right? > Otherwise we're fine since iso filename includes timestamp.Yep. Silly me. Thanks Alan. Sorry, Ian ;-)>>> diff --git a/ovirt-host-creator/ovirt-pxe.sh b/ovirt-host-creator/ovirt-pxe.sh >>> index 8db83bf..022eec9 100755 >>> --- a/ovirt-host-creator/ovirt-pxe.sh >>> +++ b/ovirt-host-creator/ovirt-pxe.sh >>> @@ -28,6 +28,12 @@ else >>> exit 1 >>> fi >>> >>> +if [ -e tftpboot ]; then >>> + echo "tftboot/ directory already exists! Cowardly not overwriting." > ^^^ p missing >>> + echo "Please rename or delete old version prior to running this script." >>> + exit 1 >>> +fi >>> +
On Fri, 11 Apr 2008 10:34:07 +0200 Jim Meyering <jim at meyering.net> wrote:> Alan Pevec <apevec at redhat.com> wrote: > > Jim Meyering wrote: > >> If you put that code in the definition of the create_iso function, > >> users of ovirt-cd.sh, ovirt-flash.sh, and ovirt-flash-static.sh scripts > >> will benefit, too. > > > > But only ovirt-pxe.sh cares about tftpboot/ right? > > Otherwise we're fine since iso filename includes timestamp. > > Yep. Silly me. > Thanks Alan. Sorry, Ian ;-)heh, not a problem :). I was also thinking about having it so that the ovirt-cd.sh will create a symlink for you to a ovirt-host.iso or something every time which points to the latest build. Any thoughts on that? I often boot them in VMs so it'd be helpful cause you can just use the same definition with the symlink in it. Ian