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

Duda de shell



Se me había quedado el ssh sin configurar, después del dist-upgrade de cada día.
Se me quejaba:
	~-root#>dpkg --configure -a
	Configurando ssh (2.5.1p1-1.5) ...
	/var/lib/dpkg/info/ssh.postinst: line 97: syntax error near unexpected
	token `else' 
	dpkg: error al procesar ssh (--configure):
	el subproceso post-installation script devolvió el código de salida de
	error 2 
	Se encontraron errores al procesar:
	ssh
  
Voy yo, más chula que un ocho, y edito:

    if [ -x /usr/sbin/dpkg-statoverride ]; then
       	if [ "$ssh_mod" = "04755" ]; then
		# Since we messed up here last time and set the
		# override for the sshd server we now remove it.
		dpkg-statoverride --remove /usr/sbin/sshd
		if [ dpkg-statoverride --list | grep ssh ]; then
		        # Do nothing since override is already existing.
		        # Añado una línea al azar:
			echo "Hola Amayita"; 
		else
			dpkg-statoverride --add root root 04755 /usr/sbin/ssh
		fi
		
Y se arregla, y se configura, aunque el "Hola Amayita" no lo he conseguido ver.
¿Por qué? No puedo creerme que haya sido el ";" o lo que sea... ¿Qué ha sido? 

Por cierto, el "dpkg-statoverride --list | grep ssh" me da vacío, o sea, no
encuentra nada.  

:-?

-- 
  If you don't spend energy getting what you want, you'll have to spend it
  dealing with what you get.                                     - Unknown
 
  Proudly running Debian GNU/Linux Sid (Kernel 2.2.17) on this Dell Laptop 

Attachment: pgpLiypRO_YWp.pgp
Description: PGP signature


Reply to: