[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apt-get upgrade via ssh y vzctl



El Wed, 9 Jun 2010 11:39:25 +0200
Marc Aymerich <glicerinu@gmail.com> escribió:

> Tengo varios servidores con varios containers openvz corriendo en cada
> uno. Para actualizar el sistema a través del apt uso un script que se
> connecta al servidor fisico por ssh y lanza el "apt-get upgrade" a
> través de la herramienta vzctl. así:
> 
> ssh root@"$node" -C "vzctl exec $vmid \"$action\"
> 
> node: servidor físico
> vmid: identificador del container
> action: apt-get upgrade
> 
> pero haciendolo de esta forma me encuentro con problemas cuando en
> algunos upgrades aparece el dialogo preguntando algunas cosas. En ese
> momento creo que es cuando me aparece el siguiente error de debconf:
> 
> The following packages will be upgraded:
>   libmysqlclient15off mysql-client mysql-client-5.0 mysql-common
> 4 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
> Need to get 0B/10.2MB of archives.
> After this operation, 147kB of additional disk space will be used.
> Do you want to continue [Y/n]?
> debconf: unable to initialize frontend: Dialog
> debconf: (TERM is not set, so the dialog frontend is not usable.)
> debconf: falling back to frontend: Readline
> debconf: unable to initialize frontend: Readline
> debconf: (This frontend requires a controlling tty.)
> debconf: falling back to frontend: Teletype
> dpkg-preconfigure: unable to re-open stdin:
> (Reading database ... 29715 files and directories currently
> installed.) Preparing to replace mysql-common 5.0.51a-24+lenny3 (using
> .../mysql-common_5.0.51a-24+lenny4_all.deb) ...
> Unpacking replacement mysql-common ...
> Preparing to replace libmysqlclient15off 5.0.51a-24+lenny3 (using
> .../libmysqlclient15off_5.0.51a-24+lenny4_amd64.deb) ...
> Unpacking replacement libmysqlclient15off ...
> Preparing to replace mysql-client 5.0.51a-24+lenny3 (using
> .../mysql-client_5.0.51a-24+lenny4_all.deb) ...
> Unpacking replacement mysql-client ...
> Preparing to replace mysql-client-5.0 5.0.51a-24+lenny3 (using
> .../mysql-client-5.0_5.0.51a-24+lenny4_amd64.deb) ...
> Unpacking replacement mysql-client-5.0 ...
> Processing triggers for man-db ...
> Setting up mysql-common (5.0.51a-24+lenny4) ...
> Setting up libmysqlclient15off (5.0.51a-24+lenny4) ...
> Setting up mysql-client-5.0 (5.0.51a-24+lenny4) ...
> Setting up mysql-client (5.0.51a-24+lenny4) ...
> 
> Alguna idea de como evitarlo? se puede redirigir el dialogo hacia la
> tty donde ejecuto el script?

	Lo más fácil es decir siempre sí, con el parámetro "-y, --yes,
--assume-yes". Creo que con esto los diálogos no se quedarían trabados.

	Saludos --- Angel


Reply to: