[prev in list] [next in list] [prev in thread] [next in thread] 

List:       user-mode-linux-user
Subject:    Re: [uml-user] mconsole exec issue with init.d scripts
From:       Fermín_Galán_Márquez <fermin.galan () cttc ! es>
Date:       2007-09-05 16:26:24
Message-ID: 46DEF3C9.8040500 () cttc ! es
[Download RAW message or body]

Hi,

> 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.

It has taken me a long time, but I thing that finally I've find a 
solution that now I describe in the hope it could be useful for others :)

Instead of

(/root/.vnuml/s) exec /etc/init.d/apache2 start

use

(/root/.vnuml/s) exec /etc/init.d/apache2 start </dev/null >/dev/null 
2>/dev/null

Thus, it seems that the sh created by the mconsole exec feature to run 
the command in the vm needs explicit declarations of standard input, 
output and error descriptors in this case (i.e., /etc/init.d scripts).

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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic