Results 1 to 10 of 10

Thread: openSUSE 12.2 mgetty, systemd, dial-in server problem

  1. #1

    Default openSUSE 12.2 mgetty, systemd, dial-in server problem

    Hi

    Please help me.

    I have openSUSE 11.3 x64, dial-in server, with the following settings:
    --------------------------------------------------------------------
    /etc/mgetty+sendfax/mgetty.config
    --------------------------------------------------------------------
    debug 4
    speed 57600
    port ttyACM0
    debug 4
    data-only y
    init-chat "" \d\d\d+++\d\dATZ&K0&C1&D2 OK
    --------------------------------------------------------------------

    /etc/mgetty+sendfax/login.config
    --------------------------------------------------------------------
    /AutoPPP/ - a_ppp /usr/sbin/pppd -chap +pap login debug
    * - - /bin/login @
    --------------------------------------------------------------------

    /etc/mgetty+sendfax/dialin.config
    --------------------------------------------------------------------
    # disallow all other calls
    #!all
    all
    --------------------------------------------------------------------

    /etc/ppp/options
    --------------------------------------------------------------------
    38400
    crtscts
    modem
    auth
    lock
    asyncmap 0
    debug
    kdebug 7
    novj
    novjccomp
    lcp-echo-interval 30
    lcp-echo-failure 0
    lcp-restart 2
    lcp-max-configure 30
    refuse-chap
    require-pap
    nodetach
    --------------------------------------------------------------------

    /etc/ppp/options.pptp
    --------------------------------------------------------------------
    require-mppe
    --------------------------------------------------------------------

    /etc/ppp/options.ttyACM0
    --------------------------------------------------------------------
    192.168.0.43:192.168.0.44
    netmask 255.255.255.0
    modem
    idle 2400
    --------------------------------------------------------------------

    /etc/ppp/pap-secrets
    --------------------------------------------------------------------
    myusername linux mypass64 "*"
    --------------------------------------------------------------------

    /etc/inittab
    --------------------------------------------------------------------
    10:2345:respawn:/usr/sbin/mgetty -n 1 -D /dev/ttyACM0
    --------------------------------------------------------------------


    This is work is fine !!!

    I installed the openSUSE 12.2 x64 with the same settings, except
    instead of "inittab" "systemd" setting:

    /lib/systemd/system/mgettyAM0.service
    --------------------------------------------------------------------
    [Unit]
    Description=mgetty start daemon
    After=network.target

    [Service]
    Type=simple
    User=root
    Group=root
    Restart=always
    ExecStart=/usr/sbin/mgetty -n 1 -D /dev/ttyACM0
    TimeoutSec=0

    [Install]
    WantedBy=multi-user.target
    --------------------------------------------------------------------

    #systemctl enable mgettyACM0.service

    restart system, but not work !!!

    systemctl list-units -t service : OK mgettyACM0.service loaded active running

    /var/log/mgetty.ttyACM0
    --------------------------------------------------------------------
    10/16 20:47:03 CM0 mgetty: interim release 1.1.36-Jun15
    10/16 20:47:03 CM0 check for lockfiles
    10/16 20:47:03 CM0 locking the line
    10/16 20:47:04 CM0 lowering DTR to reset Modem
    10/16 20:47:04 CM0 send: \d\d\d+++\d\dATZ&K0&C1&D2[0d]
    10/16 20:47:07 CM0 waiting for ``OK'' ** found **
    10/16 20:47:08 CM0 waiting...
    10/16 20:47:46 CM0 wfr: waiting for ``RING''
    10/16 20:47:46 CM0 send: ATA[0d]
    10/16 20:47:46 CM0 waiting for ``CONNECT'' ** found **
    10/16 20:48:05 CM0 send:
    10/16 20:48:05 CM0 waiting for ``_'' ** found **
    10/16 20:48:38 ##### failed dev=ttyACM0, pid=5061, got signal 1, exiting
    --------------------------------------------------------------------


    when restart systemd:

    systemctl stop mgettyACM0.service
    systemctl daemon-reload
    systemctl start mgettyACM0.service
    systemctl daemon-reload

    /var/log/messages containing this :
    --------------------------------------------------------------------
    Oct 16 20:34:49 linux systemd[1]: mgettyACM0.service: main process exited, code=exited, status=10
    Oct 16 20:34:49 linux systemd[1]: Unit mgettyACM0.service entered failed state.
    Oct 16 20:34:49 linux systemd[1]: Reloading.
    --------------------------------------------------------------------

    Any idea ? thanx

  2. #2
    Join Date
    Sep 2012
    Posts
    5,112

    Default Re: openSUSE 12.2 mgetty, systemd, dial-in server problem

    Quote Originally Posted by szilipeter View Post
    /var/log/mgetty.ttyACM0
    --------------------------------------------------------------------
    10/16 20:47:03 CM0 mgetty: interim release 1.1.36-Jun15
    10/16 20:47:03 CM0 check for lockfiles
    10/16 20:47:03 CM0 locking the line
    10/16 20:47:04 CM0 lowering DTR to reset Modem
    10/16 20:47:04 CM0 send: \d\d\d+++\d\dATZ&K0&C1&D2[0d]
    10/16 20:47:07 CM0 waiting for ``OK'' ** found **
    10/16 20:47:08 CM0 waiting...
    10/16 20:47:46 CM0 wfr: waiting for ``RING''
    10/16 20:47:46 CM0 send: ATA[0d]
    10/16 20:47:46 CM0 waiting for ``CONNECT'' ** found **
    10/16 20:48:05 CM0 send:
    10/16 20:48:05 CM0 waiting for ``_'' ** found **
    10/16 20:48:38 ##### failed dev=ttyACM0, pid=5061, got signal 1, exiting
    --------------------------------------------------------------------
    signal 1 == SIGHUP, one reason is modem losing phone line. Is it normal and expected? Should mgetty exit in above case? By default sustemd assumes that main service process is there forever and if it terminates unexpectedly, something is wrong. So is mgetty supposed to exit here?

  3. #3
    Join Date
    Sep 2012
    Posts
    5,112

    Default Re: openSUSE 12.2 mgetty, systemd, dial-in server problem

    To clarify my question. Is the problem that mgetty unexpectedly exits or that systemd thinks service failed in this case?

  4. #4
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: openSUSE 12.2 mgetty, systemd, dial-in server problem

    On 2012-10-17 05:16, arvidjaar wrote:

    > signal 1 == SIGHUP, one reason is modem losing phone line. Is it normal
    > and expected? Should mgetty exit in above case? By default sustemd
    > assumes that main service process is there forever and if it terminates
    > unexpectedly, something is wrong. So is mgetty supposed to exit here?


    With inittab, if mgetty exits, crashes, whatever, it is just restarted
    (respawned).

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.1 x86_64 "Asparagus" at Telcontar)

  5. #5
    Join Date
    Sep 2012
    Posts
    5,112

    Default Re: openSUSE 12.2 mgetty, systemd, dial-in server problem

    Quote Originally Posted by robin_listas View Post
    With inittab, if mgetty exits, crashes, whatever, it is just restarted
    (respawned).
    Unit file has Restart=always which does the same.

  6. #6

    Default Re: openSUSE 12.2 mgetty, systemd, dial-in server problem

    Quote Originally Posted by arvidjaar View Post
    Unit file has Restart=always which does the same.
    ok, but what is the equivalent of the respawn ?

  7. #7

    Default Re: openSUSE 12.2 mgetty, systemd, dial-in server problem

    Quote Originally Posted by arvidjaar View Post
    To clarify my question. Is the problem that mgetty unexpectedly exits or that systemd thinks service failed in this case?


    I think that systemd thinks service failed in this case. (?)

  8. #8
    Join Date
    Sep 2012
    Posts
    5,112

    Default Re: openSUSE 12.2 mgetty, systemd, dial-in server problem

    Quote Originally Posted by szilipeter View Post
    ok, but what is the equivalent of the respawn ?
    You already have it. "Restart=always" means the same as "respawn" in /etc/inittab - always restart service when it is terminated.

    I think [the problem is] that systemd thinks service failed in this case. (?)
    Do you ask me? I do not know. Try to prefix command with "-", it should ignore exit code:
    Code:
    ExecStart=-/usr/sbin/mgetty -n 1 -D /dev/ttyACM0

  9. #9

    Default Re: openSUSE 12.2 mgetty, systemd, dial-in server problem

    THIS IS WORKING !

    /lib/systemd/system/mgettyACM0.service
    ----------------------------------------
    [Unit]
    Description=mgettyACM0 daemon
    After=network.target

    [Service]
    Type=simple
    User=root
    Group=root
    ExecStart=-/usr/sbin/mgetty -n 1 -D /dev/ttyACM0
    Restart=always
    RestartSec=0
    KillSignal=SIGHUP
    KillMode=process

    [Install]
    WantedBy=multi-user.target
    ----------------------------------------

    BUT, when connected the modem, the autoPPP not working.
    The login.config containing:
    # Automatic PPP startup on receipt of LCP configure request (AutoPPP).
    # mgetty has to be compiled with "-DAUTO_PPP" for this to work.

    How to compiled the mgetty with "-DAUTO_PPP" ???


    ( I tried to copy /usr/sbin/mgetty from version:11.3 to 12.2 and how it works for all.
    I do not see this as the best solution. )

    thanks for everything ( sorry my english )

  10. #10
    Join Date
    Sep 2012
    Posts
    5,112

    Default Re: openSUSE 12.2 mgetty, systemd, dial-in server problem

    Quote Originally Posted by szilipeter View Post
    How to compiled the mgetty with "-DAUTO_PPP" ???
    Please, open new thread for it. It is unrelated to your current issue.

Posting Permissions

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