Mohammed Morsi
2009-Aug-03 22:18 UTC
[Ovirt-devel] [PATCH node] changed fickle anyterm sysconfig changes to something more robust (revised)
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 -- 1.6.0.6
Jason Guiditta
2009-Aug-04 01:15 UTC
[Ovirt-devel] Re: [PATCH node] changed fickle anyterm sysconfig changes to something more robust (revised)
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/sudoersACK, 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
Seemingly Similar Threads
- [PATCH node] changed fickle anyterm sysconfig changes to something more rebust
- [PATCH node] Drop F15 build recipes
- [PATCH server] Fix for anyterm and multiple nodes
- [PATCH server] Fix anyterm for multinode support
- [PATCH server] updated anyterm/ovirt integration