"Installing Red Hat Virtualization as a standalone Manager with local databases" instructions wrong

Latest response

(RHV 4.3)
In Appendix A. Configuring a Local Repository for Offline Red Hat Virtualization Manager Installation

The code to run createrepo is wrong.

for DIR in find /var/ftp/pub/rhvrepo -maxdepth 1 -mindepth 1 -type d; do createrepo $DIR; done;

should be

for DIR in $(find /var/ftp/pub/rhvrepo -maxdepth 1 -mindepth 1 -type d); do createrepo $DIR; done

and the last snippet to create the yum.repos.d files is better written without the grave accent and the tralling ';'.

#!/bin/sh

REPOFILE="/etc/yum.repos.d/rhev.repo"
echo -e " " > $REPOFILE

for DIR in $(find /var/ftp/pub/rhvrepo -maxdepth 1 -mindepth 1 -type d);
do
    echo -e "[$(basename $DIR)]"    >> $REPOFILE
    echo -e "name=$(basename $DIR)" >> $REPOFILE
    echo -e "baseurl=ftp://_ADDRESS_/pub/rhvrepo/`basename $DIR`" >> $REPOFILE
    echo -e "enabled=1" >> $REPOFILE
    echo -e "gpgcheck=0" >> $REPOFILE
    echo -e "\n" >> $REPOFILE
done

Responses

Hello Colin, thanks for letting us know. I have raised BZ#1714822 to get this fixed.

For the script, I have tried both and they appear to generate identical files (using bash shell). Can you elaborate on why you prefer your syntax more?

Hello Colin, FYI that documentation has now been updated - thank again for letting us know.