Hello,

I've been using the (great :) mconsole exec feature without problem for 
some time. Using simple commands like the following ones, all goes right 
(they behave as excepted, doing their work inside the virtual machine):

(/root/.vnuml/s) exec touch /tmp/bar
OK The command has been started successfully.
(/root/.vnuml/s) exec cp /tmp/bar /tmp/foo
OK The command has been started successfully.

However, I'm finding problems trying to execute init.d scripts (i.e., 
the usual system service star/stop/restart management scripts that come 
under /etc/init.d/ in almost every GNU/Linux distribution).

In particular, I've tested with the /etc/init.d/apache2 script (that 
comes with apache2 web server software) but it doesn't work (i.e., the 
apache2 server doesn't start):

(/root/.vnuml/s) exec /etc/init.d/apache2 start
OK The command has been started successfully.

I've tried some debugging myself: editing the first line in 
/etc/init.d/apache2 (from "#!/bin/sh -e" to "#!/bin/sh -xe") in order to 
"verbosize" the script, then executing:

(/root/.vnuml/s) exec /etc/init.d/apache2 start > /tmp/apache2.txt
OK The command has been started successfully.

Then examining /tmp/apache2.txt in the virtual machine:

A2:~# cat /tmp/apache2.txt
Starting web server: apache2 ++ /usr/bin/tput setaf 1
failed!++ /usr/bin/tput op

A2:~#

If I run "/etc/init.d/apache2 start" in the virtual machine xterm or in 
a SSH session to it, it works (i.e., the apache2 starts). This fact 
discards a problem in the /etc/init.d/apache2 script itself. In this 
case, this is the output of the script:

+ ENV='env -i LANG=C PATH=/usr/local/bin:/usr/bin:/bin'
+ NO_START=0
+ set -e
+ '[' -x /usr/sbin/apache2 ']'
+ HAVE_APACHE2=1
+ . /lib/lsb/init-functions
++ FANCYTTY=
++ '[' -e /etc/lsb-base-logging.sh ']'
++ true
+ test -f /etc/default/rcS
+ . /etc/default/rcS
++ TMPTIME=0
++ SULOGIN=no
++ DELAYLOGIN=no
++ UTC=yes
++ VERBOSE=no
++ FSCKFIX=no
++ RAMRUN=no
++ RAMLOCK=no
+ test -f /etc/default/apache2
+ . /etc/default/apache2
++ NO_START=0
+ '[' 0 '!=' 0 -a '' '!=' stop ']'
+ APACHE2='env -i LANG=C PATH=/usr/local/bin:/usr/bin:/bin 
/usr/sbin/apache2'
+ APACHE2CTL='env -i LANG=C PATH=/usr/local/bin:/usr/bin:/bin 
/usr/sbin/apache2c
tl'
+ case $1 in
+ log_success_msg 'Usage: /etc/init.d/apache2 
{start|stop|restart|reload|force-r
eload}'
+ echo 'Usage: /etc/init.d/apache2 {start|stop|restart|reload|force-reload}'
Usage: /etc/init.d/apache2 {start|stop|restart|reload|force-reload}
+ exit 1

I don't know which is the cause of the problem and how to solve it, so I 
come to the list in the case somebody could provide some idea or related 
experience, please. I've looked in the tput man page, but it doesn't 
help me too much (I'm not an expert on terminals, shells, etc.).

Any help on the issue is really welcome, because I'm starting to get a 
bit crazy figuring out what the problem can be :)

I've experienced the problem for /etc/init.d/apache2, but I guess that 
other init.d scripts may suffer it, because all they are quite similar.

Some reference stuff (please, ask if you need some other information):

- apache2 version: 2.2.3-5 installed through APT in Debian virtual machine
- guest kernel: 2.6.15.7 with bs3 and tls patches
- host kernel: 2.6.21-2-686

Thanks! :)

Best regards,

--------------------
Fermín Galán Márquez
CTTC - Centre Tecnològic de Telecomunicacions de Catalunya
Parc Mediterrani de la Tecnologia, Av. del Canal Olímpic s/n, 08860
Castelldefels, Spain
Room 1.02
Tel : +34 93 645 29 12
Fax : +34 93 645 29 01
Email address: fermin dot galan at cttc dot es


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to