Find the answer to your Linux question:
Results 1 to 2 of 2
Hello I'm trying to install zabbix-proxy with dpkg -i and not to use dbconfig-common, is a remote installation, I tried using expect to ansewer no to the first dbconfig dialog, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2010
    Location
    Montevideo-Uruguay
    Posts
    3

    [SOLVED] expect and debconf problems


    Hello I'm trying to install zabbix-proxy with dpkg -i and not to use dbconfig-common, is a remote installation, I tried using expect to ansewer no to the first dbconfig dialog, the one that asks if you want to configure everything with dbconfig or not.

    This is the bash code

    export DEBIAN_FRONTEND=teletype (or export DEBIAN_FRONTEND=readline)
    /usr/bin/expect - << ENDMARK

    spawn dpkg -i zabbix-proxy-mysql_1.8.2-1~bpo50+1_i386.deb
    send "n"
    send "\n"
    interact

    ENDMARK

    export DEBIAN_FRONTEND=dialog

    but is not working, same thing if I try with dpkg-reconfigure mysql-server-5.1 and send "new_password"

    any ideas of what am I doing wrong?

    thank you very much!

  2. #2
    Just Joined!
    Join Date
    Mar 2010
    Location
    Montevideo-Uruguay
    Posts
    3

    expect and debconf problems

    Never mind! it's solved
    maybe it'll help someone some day

    #!/bin/bash

    /usr/bin/expect - << ENDMARK

    spawn dpkg -i zabbix-proxy-mysql_1.6.1-3_i386.deb
    expect "«dbconfig-common»? "
    send "n\r"
    expect "#"
    ENDMARK

    #!/bin/bash

    /usr/bin/expect - << ENDMARK

    spawn dpkg-reconfigure mysql-server-5.0
    expect "Nueva contraseña para el usuario «root» de MySQL:"
    send "lulu\r"
    expect "Repita la contraseña para el usuario «root» de MySQL:"
    send "lulu\r"
    expect "#"
    ENDMARK

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •