[Ovirt-devel] [PATCH-node 2/2] A rather large re-write of the ovirt-node.spec file. The reason
Chris Lalancette
clalance at redhat.com
Thu Sep 11 07:56:49 UTC 2008
David Lutterkort wrote:
> On Wed, 2008-09-10 at 08:42 +0200, Chris Lalancette wrote:
>> +
>> +ovirt_setup_libvirtd() {
>> + # just to get a boot warning to shut up
>> + touch /etc/resolv.conf
>> +
>> + # make libvirtd listen on the external interfaces
>> + sed -i -e 's/^#\(LIBVIRTD_ARGS="--listen"\).*/\1/' \
>> + /etc/sysconfig/libvirtd
>> +
>> + # set up qemu daemon to allow outside VNC connections
>> + sed -i -e 's/^[[:space:]]*#[[:space:]]*\(vnc_listen = "0.0.0.0"\).*/\1/' \
>> + /etc/libvirt/qemu.conf
>> + # set up libvirtd to listen on TCP (for kerberos)
>> + sed -i -e "s/^[[:space:]]*#[[:space:]]*\(listen_tcp\)\>.*/\1 = 1/" \
>> + -e "s/^[[:space:]]*#[[:space:]]*\(listen_tls\)\>.*/\1 = 0/" \
>> + /etc/libvirt/libvirtd.conf
>> +
>> + # with libvirt (0.4.0), make sure we we setup gssapi in the mech_list
>> + sasl_conf=/etc/sasl2/libvirt.conf
>> + if ! grep -qE "^mech_list: gssapi" $sasl_conf ; then
>> + sed -i -e "s/^\([[:space:]]*mech_list.*\)/#\1/" $sasl_conf
>> + echo "mech_list: gssapi" >> $sasl_conf
>> + fi
>> +}
>
> Why not just
>
> augtool <<EOF
> set /files/etc/sysconfig/libvirtd/LIBVIRTD_ARGS --listen
> set /files/etc/libvirt/qemu.conf/vnc_listen 0.0.0.0
> set /files/etc/libvirt/libvirtd.conf/listen_tcp 1
> set /files/etc/libvirt/libvirtd.conf/listen_tls 0
> set /files/etc/sasl2/libvirt.conf/mech_list gssapi
> save
> EOF
>
> It'll actually need some minor love in Augeas to make that work, but if
> you want to go that route, I can add that very easily.
That's totally fine with me, assuming the relevant code is in the ovirt
repositories or in F-9. If not, I'm fine with doing this long term, but for the
moment I would prefer to not have to carry more custom packages then we already are.
--
Chris Lalancette
More information about the ovirt-devel
mailing list