[Ovirt-devel] Re: [PATCH node] changed fickle anyterm sysconfig changes to something more robust (revised)

Jason Guiditta jguiditt at redhat.com
Tue Aug 4 01:15:27 UTC 2009


On Mon, 2009-08-03 at 18:18 -0400, Mohammed Morsi wrote:
> instead of sed'ing the exact commented line we are looking for, simply
>   add the necessary lines to the end of the anyterm sysconf
> ---
>  scripts/ovirt-functions |    9 ++++-----
>  1 files changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions
> index af3a257..98e88e7 100644
> --- a/scripts/ovirt-functions
> +++ b/scripts/ovirt-functions
> @@ -213,11 +213,10 @@ ovirt_setup_libvirtd() {
>  
>  ovirt_setup_anyterm() {
>     # configure anyterm
> -   sed -i -e 's/^# ANYTERM_CMD=\/usr\/bin\/anyterm-cmd/ANYTERM_CMD="sudo \/usr\/bin\/virsh console %p"/' \
> -        /etc/sysconfig/anyterm
> -
> -   sed -i -e 's/^# ANYTERM_LOCAL_ONLY=true/ANYTERM_LOCAL_ONLY=false/' \
> -        /etc/sysconfig/anyterm
> +   cat >> /etc/sysconfig/anyterm << EOF
> +ANYTERM_CMD="sudo /usr/bin/virsh console %p"
> +ANYTERM_LOCAL_ONLY=false
> +EOF
>  
>     # permit it to run the virsh console
>     echo "anyterm ALL=NOPASSWD: /usr/bin/virsh console *" >> /etc/sudoers

ACK, this now edits the file properly.  However, there is still an issue
with anyterm.  Going directly to <nodeip>:81/?param=<vmName> gets me:
'[sudo] password for anyterm:'
So something is still not right with the perms.  I'll look into it more
with you tomorrow.

-j




More information about the ovirt-devel mailing list