opensuse 升级后 mgetty 停止作为拨入工作

opensuse 升级后 mgetty 停止作为拨入工作

背景:
OpenSuSE 11.4 运行良好几年了。
mgetty 配置为监听 /dev/ttyS0 并作为拨入链接工作。

将系统更新至 OpenSuSE 12.1 > 12.2。 > 12.3 > 13.1 并失去 mgetty 功能。
我对 mgetty 一无所知,所以请让我知道我应该发布哪些日志/配置。

我已经在systemctl中添加了mgetty(之前OpenSuSE使用的是inittab),但没有效果。

服务器:~ # cat /etc/systemd/system/mgtty.service

[Unit]
Description=mgetty allows a dialin modem connection
After=network.target

[Service]
Type=simple
User=root
Group=root
ExecStart=/usr/sbin/mgetty -s 38400 -x 7 /dev/ttyS0
Restart=always
RestartSec=0
KillSignal=SIGHUP
KillMode=process

[Install]
WantedBy=multi-user.target

服务器:〜#systemctl状态mgetty

mgetty.service - mgetty allows a dialin modem connection
   Loaded: loaded (/etc/systemd/system/mgetty.service; enabled)
   Active: active (running) since Fri 2014-11-07 18:36:11 CET; 1 day 7h ago
 Main PID: 656 (mgetty)
   CGroup: /system.slice/mgetty.service
           └─656 /usr/sbin/mgetty -s 38400 -x 7 /dev/ttyS0

Nov 07 18:36:11 server systemd[1]: Starting mgetty allows a dialin modem connection...
Nov 07 18:36:11 server systemd[1]: Started mgetty allows a dialin modem connection.

,这是/var/log/mgtty.ttyS0

11/07 16:49:20 yS0  mgetty: interim release 1.1.36-Jun15
11/07 16:49:20 yS0   user id: 0, pid: 2980, parent pid: 1
11/07 16:49:20 yS0   reading configuration data for port 'ttyS0'
11/07 16:49:20 yS0   reading /etc/mgetty+sendfax/mgetty.config...
11/07 16:49:20 yS0   conf lib: read: 'debug 4'
11/07 16:49:20 yS0   conf lib: read: 'fax-id 49 115 xxxxxxxx'
11/07 16:49:20 yS0   conf lib: read: 'speed 38400'
11/07 16:49:20 yS0   conf lib: read: 'init-chat "" AT OK AT&FX4&A3&B1&D2&H1&I0&K1&M4S7=60 OK'
11/07 16:49:20 yS0   conf lib: read: 'issue-file /etc/mgetty+sendfax/mgissue'
11/07 16:49:20 yS0   conf lib: read: 'login-prompt \C\n'
11/07 16:49:20 yS0   conf lib: read: 'speed 57600'
11/07 16:49:20 yS0   conf lib: read: 'toggle-dtr no'
11/07 16:49:20 yS0   key: 'speed', type=0, flags=2, data=38400
11/07 16:49:20 yS0   key: 'switchbd', type=0, flags=1, data=0
11/07 16:49:20 yS0   key: 'direct', type=3, flags=1, data=FALSE
11/07 16:49:20 yS0   key: 'blocking', type=3, flags=1, data=FALSE
11/07 16:49:20 yS0   key: 'port-owner', type=1, flags=1, data=uucp
11/07 16:49:20 yS0   key: 'port-group', type=1, flags=1, data=uucp
11/07 16:49:20 yS0   key: 'port-mode', type=0, flags=1, data=432
11/07 16:49:20 yS0   key: 'toggle-dtr', type=3, flags=3, data=FALSE
11/07 16:49:20 yS0   key: 'toggle-dtr-waittime', type=0, flags=1, data=500
11/07 16:49:20 yS0   key: 'need-dsr', type=3, flags=1, data=FALSE
11/07 16:49:20 yS0   key: 'data-only', type=3, flags=1, data=FALSE
11/07 16:49:20 yS0   key: 'fax-only', type=3, flags=1, data=FALSE
11/07 16:49:20 yS0   key: 'modem-type', type=1, flags=1, data=auto
11/07 16:49:20 yS0   key: 'modem-quirks', type=0, flags=0, data=(empty)
11/07 16:49:20 yS0   key: 'init-chat', type=2, flags=3, data= AT OK AT&FX4&A3&B1&D2&H1&I0&K1&M4S7=60 OK
\dATQ0V1H0 OK  yS0   key: 'force-init-chat', type=2, flags=1, data= \d\d\d\d+++\d\d\d
11/07 16:49:20 yS0   key: 'post-init-chat', type=2, flags=0, data=(empty)
11/07 16:49:20 yS0   key: 'data-flow', type=4, flags=1, data=1
11/07 16:49:20 yS0   key: 'fax-send-flow', type=4, flags=1, data=7
11/07 16:49:20 yS0   key: 'fax-rec-flow', type=4, flags=1, data=7
11/07 16:49:20 yS0   key: 'modem-check-time', type=0, flags=1, data=3600
11/07 16:49:20 yS0   key: 'rings', type=0, flags=1, data=1
11/07 16:49:20 yS0   key: 'msn-list', type=2, flags=0, data=(empty)
11/07 16:49:20 yS0   key: 'get-cnd-chat', type=2, flags=0, data=(empty)
11/07 16:49:20 yS0   key: 'cnd-program', type=1, flags=0, data=(empty)
11/07 16:49:20 yS0   key: 'answer-chat', type=2, flags=1, data= ATA CONNECT \c

11/07 16:49:20 yS0   key: 'answer-chat-timeout', type=0, flags=1, data=80
11/07 16:49:20 yS0   key: 'autobauding', type=3, flags=1, data=FALSE
11/07 16:49:20 yS0   key: 'ringback', type=3, flags=1, data=FALSE
11/07 16:49:20 yS0   key: 'ringback-time', type=0, flags=1, data=30
11/07 16:49:20 yS0   key: 'ignore-carrier', type=3, flags=1, data=FALSE
11/07 16:49:20 yS0   key: 'issue-file', type=1, flags=3, data=/etc/mgetty+sendfax/mgissue
11/07 16:49:20 yS0   key: 'prompt-waittime', type=0, flags=1, data=500
11/07 16:49:20 yS0   key: 'login-prompt', type=1, flags=3, data=\C\n
11/07 16:49:20 yS0   key: 'login-time', type=0, flags=1, data=240
11/07 16:49:20 yS0   key: 'fido-send-emsi', type=3, flags=1, data=TRUE
11/07 16:49:20 yS0   key: 'login-env-ttyprompt-hack', type=3, flags=1, data=FALSE
11/07 16:49:20 yS0   key: 'login-conf-file', type=1, flags=1, data=login.config
11/07 16:49:20 yS0   key: 'fax-id', type=1, flags=3, data=49 115 xxxxxxxx
11/07 16:49:20 yS0   key: 'fax-min-speed', type=0, flags=1, data=0
11/07 16:49:20 yS0   key: 'fax-max-speed', type=0, flags=1, data=14400
11/07 16:49:20 yS0   key: 'fax-server-file', type=1, flags=0, data=(empty)
11/07 16:49:20 yS0   key: 'diskspace', type=0, flags=1, data=1024
11/07 16:49:20 yS0   key: 'notify', type=1, flags=1, data=faxadm
11/07 16:49:20 yS0   key: 'fax-owner', type=1, flags=1, data=root
11/07 16:49:20 yS0   key: 'fax-group', type=1, flags=0, data=(empty)
11/07 16:49:20 yS0   key: 'fax-mode', type=0, flags=1, data=432
11/07 16:49:20 yS0   key: 'fax-spool-in', type=1, flags=1, data=/var/spool/fax/incoming:/tmp
11/07 16:49:20 yS0   key: 'debug', type=0, flags=2, data=7
11/07 16:49:20 yS0   key: 'statistics-chat', type=2, flags=0, data=(empty)
11/07 16:49:20 yS0   key: 'statistics-file', type=1, flags=0, data=(empty)
11/07 16:49:20 yS0   key: 'gettydefs', type=1, flags=1, data=n
11/07 16:49:20 yS0   key: 'term', type=1, flags=0, data=(empty)
11/07 16:49:20 yS0  check for lockfiles
11/07 16:49:20 yS0   checklock: stat failed, no file
11/07 16:49:20 yS0  locking the line
11/07 16:49:20 yS0   makelock(ttyS0) called
11/07 16:49:20 yS0   do_makelock: lock='/var/lock/LCK..ttyS0'
11/07 16:49:20 yS0   lock made
11/07 16:49:20 yS0   tio_get_rs232_lines: status: RTS CTS DSR DTR
11/07 16:49:20 yS0   tss: set speed to 38400 (017)
11/07 16:49:20 yS0   tio_set_flow_control( HARD )
11/07 16:49:20 yS0   waiting for line to clear (VTIME=1), read:
11/07 16:49:21 yS0  send: AT[0d]
11/07 16:49:21 yS0  waiting for ``OK''
11/07 16:49:21 yS0   got: AT[0d]
11/07 16:49:21 yS0    CND: AT[0d][0a]OK ** found **
11/07 16:49:21 yS0  send: AT&FX4&A3&B1&D2&H1&I0&K1&M4S7=60[0d]
11/07 16:49:21 yS0  waiting for ``OK''
11/07 16:49:21 yS0   got: [0d]
11/07 16:49:21 yS0    CND: OK[0a]AT&FX4&A3&B1&D2&H1&I0&K1&M4S7=60[0d]
11/07 16:49:21 yS0    CND: AT&FX4&A3&B1&D2&H1&I0&K1&M4S7=60[0d][0a]OK ** found **
11/07 16:49:21 yS0  mdm_send: 'ATI'
11/07 16:49:21 yS0    got:[0d][0a]ATI[0d]
11/07 16:49:21 yS0    got:[0d][0a]1444[0d]
11/07 16:49:21 yS0   mdm_gis: string 1: '1444'
11/07 16:49:21 yS0    got:[0a][0d][0a]OK[0d]
11/07 16:49:21 yS0   mdm_identify: string '1444'
11/07 16:49:21 yS0  USR Courier/Sportster v32bis detected (assuming non-fax capable)
11/07 16:49:21 yS0   no class 2/2.0 faxmodem, no faxing available
11/07 16:49:21 yS0   waiting for line to clear (VTIME=3), read:
11/07 16:49:22 yS0   removing lock file
11/07 16:49:22 yS0  waiting...

我在这里尝试了连接:

11/07 16:50:02 yS0    select returned 1
11/07 16:50:02 yS0   checking lockfiles, locking the line
11/07 16:50:02 yS0   makelock(ttyS0) called
11/07 16:50:02 yS0   do_makelock: lock='/var/lock/LCK..ttyS0'
11/07 16:50:02 yS0   lock made
11/07 16:50:02 yS0  wfr: waiting for ``RING''
11/07 16:50:02 yS0   got: [0a][0d][0a]RING[0d]
11/07 16:50:02 yS0    CND: RING
11/07 16:50:02 yS0   wfr: rc=0, drn=0
11/07 16:50:02 yS0  send: ATA[0d]
11/07 16:50:02 yS0  waiting for ``CONNECT''
11/07 16:50:02 yS0   got: [0d]
11/07 16:50:13 yS0    CND: OK[0a]CONNECT ** found **
11/07 16:50:13 yS0  send:
11/07 16:50:13 yS0  waiting for ``_''
11/07 16:50:13 yS0   got:  14400/ARQ/V32/LAPM/V42BIS[0d]
11/07 16:50:13 yS0    CND: CONNECT 14400/ARQ/V32/LAPM/V42BIS
11/07 16:50:13 yS0    CND: found: 14400/ARQ/V32/LAPM/V42BIS[0a] ** found **
11/07 16:50:13 yS0   waiting for line to clear (VTIME=3), read: ~[ff]}#[c0]!}!} } }7}"}&} } } } }%}&#[a6].*}'}"}(}"}-}#}&[89]5~
11/07 16:50:13 yS0    looking for utmp entry... (my PID: 2980)
11/07 16:50:14 yS0   tio_set_flow_control( HARD )
11/07 16:50:14 yS0   print welcome banner (/etc/mgetty+sendfax/mgissue)
11/07 16:50:14 yS0   getlogname (no opts), read:~[ff]}#[c0]!}!}!} }7}"}&} } } } }%}&#[a6].*}'}"}(}"}-}#}&[d4][9c]
--
11/07 16:50:15 yS0  mgetty: interim release 1.1.36-Jun15
11/07 16:50:15 yS0   user id: 0, pid: 2986, parent pid: 1
11/07 16:50:15 yS0   reading configuration data for port 'ttyS0'
11/07 16:50:15 yS0   reading /etc/mgetty+sendfax/mgetty.config...
11/07 16:50:15 yS0   conf lib: read: 'debug 4'
11/07 16:50:15 yS0   conf lib: read: 'fax-id 49 115 xxxxxxxx'
11/07 16:50:15 yS0   conf lib: read: 'speed 38400'
11/07 16:50:15 yS0   conf lib: read: 'init-chat "" AT OK AT&FX4&A3&B1&D2&H1&I0&K1&M4S7=60 OK'
11/07 16:50:15 yS0   conf lib: read: 'issue-file /etc/mgetty+sendfax/mgissue'
11/07 16:50:15 yS0   conf lib: read: 'login-prompt \C\n'
11/07 16:50:15 yS0   conf lib: read: 'speed 57600'
11/07 16:50:15 yS0   conf lib: read: 'toggle-dtr no'

似乎..崩溃了...然后重新启动...再次,另一个电话:

11/07 17:07:27 yS0    select returned 1
11/07 17:07:27 yS0   checking lockfiles, locking the line
11/07 17:07:27 yS0   makelock(ttyS0) called
11/07 17:07:27 yS0   do_makelock: lock='/var/lock/LCK..ttyS0'
11/07 17:07:27 yS0   lock made
11/07 17:07:27 yS0  wfr: waiting for ``RING''
11/07 17:07:27 yS0   got: [0a][0d][0a]RING[0d]
11/07 17:07:27 yS0    CND: RING
11/07 17:07:27 yS0   wfr: rc=0, drn=0
11/07 17:07:27 yS0  send: ATA[0d]
11/07 17:07:27 yS0  waiting for ``CONNECT''
11/07 17:07:27 yS0   got: [0d]
11/07 17:07:38 yS0    CND: OK[0a]CONNECT ** found **
11/07 17:07:38 yS0  send:
11/07 17:07:38 yS0  waiting for ``_''
11/07 17:07:38 yS0   got:  14400/ARQ/V32/LAPM/V42BIS[0d]
11/07 17:07:38 yS0    CND: CONNECT 14400/ARQ/V32/LAPM/V42BIS
11/07 17:07:38 yS0    CND: found: 14400/ARQ/V32/LAPM/V42BIS[0a] ** found **
11/07 17:07:38 yS0   waiting for line to clear (VTIME=3), read: ~[ff]}#[c0]!}!} } }7}"}&} } } } }%}&:[aa]/[9e]}'}"}(}"}-}#}&}+})~
11/07 17:07:39 yS0    looking for utmp entry... (my PID: 2986)
11/07 17:07:39 yS0   tio_set_flow_control( HARD )
11/07 17:07:39 yS0   print welcome banner (/etc/mgetty+sendfax/mgissue)
11/07 17:07:39 yS0   getlogname (no opts), read:~[ff]}#[c0]!}!}!} }7}"}&} } } } }%}&:[aa]/[9e]}'}"}(}"}-}#}&V[a0]~~[ff]}#[c0]!}!}"} }7}"}&} } } } }%}&:[aa]/[9e]}'}"}(}"}-}#}&[a0]S~~[ff]}#[c0]!}!}#} }7}"}&} } } } }%}&:[aa]/[9e]}'}"}(}"}-}#}&[fd][fa]~~[ff]}#[c0]!}!}$} }7}"}&} } } } }%}&:[aa]/[9e]}'}"}(}"}-}#}&][bc]~~[ff]}#[c0]!}!}%} }7}"}&} } } } }%}&:[aa]/[9e]}'}"}(}"}-}#}&} }5~~[ff]}#[c0]!}!}&} }7}"}&} } } } }%}&:[aa]/[9e]}'}"}(}"}-}#}&[f6][e6]~~[ff]}#[c0]!}!}'} }7}"}&} } } } }%}&:[aa]/[9e]}'}"}(}"}-}#}&[ab]O~~[ff]}#[c0]!}!}(} }7}"}&} } } } }%}&:[aa]/[9e]}'}"}(}"}-}#}&[b6]k~~[ff]}#[c0]!}!})} }7}"}&} } } } }%}&:[aa]/[9e]}'}"}(}"}-}#}&[eb][c2]~
11/07 17:08:17 ##### failed dev=ttyS0, pid=2986, got signal 1, exiting

11/07 17:08:17 yS0   removing lock file
--
11/07 17:08:17 yS0  mgetty: interim release 1.1.36-Jun15
11/07 17:08:17 yS0   user id: 0, pid: 3121, parent pid: 1
11/07 17:08:17 yS0   reading configuration data for port 'ttyS0'
11/07 17:08:17 yS0   reading /etc/mgetty+sendfax/mgetty.config...

又一次崩溃...然后重新启动...?? 让我困惑的是它应该说它使用带有“getlogname”的 PPP。

以下是配置文件: server:~ #egrep -v '(^#|^\s*$|^\s*\t*#)' /etc/mgetty+sendfax/login.config

/AutoPPP/ - a_ppp   /usr/sbin/pppd auth -chap +pap login debug
*   -   -   /bin/login @

服务器:~#egrep -v '(^#|^\s*$|^\s*\t*#)' /etc/mgetty+sendfax/mgetty.config

debug 7
fax-id 49 115 xxxxxxxx
speed 38400
init-chat "" AT OK AT&FX4&A3&B1&D2&H1&I0&K1&M4S7=60 OK
issue-file /etc/mgetty+sendfax/mgissue
login-prompt \C\n
speed 38400
toggle-dtr no

服务器:~#egrep -v '(^#|^\s*$|^\s*\t*#)' /etc/ppp/options

noipdefault
ipcp-accept-local
ipcp-accept-remote
noauth
crtscts
lock
modem
asyncmap 0
netmask 255.255.255.0
nodetach
lcp-echo-interval 30
lcp-echo-failure 4
lcp-max-configure 60
lcp-restart 2
idle 600
noipx
file /etc/ppp/filters
proxyarp
login
ms-dns 151.99.0.100
ms-dns 151.99.125.1
require-pap
refuse-chap

服务器:~#egrep -v '(^#|^\s*$|^\s*\t*#)' /etc/ppp/options.server

-detach
asyncmap 0
modem
crtscts
lock
proxyarp
ms-dns 151.99.125.1
ms-dns 8.8.4.4

服务器:~#egrep -v '(^#|^\s*$|^\s*\t*#)' /etc/ppp/options.ttyS0

192.168.0.222:192.168.0.56            #serverAddress:clientAdress
netmask 255.255.255.0                    #The netmask

服务器:~ # sysctl -e -p /etc/sysctl.conf

net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv6.conf.all.disable_ipv6 = 1
fs.inotify.max_user_watches = 65536
net.ipv4.conf.default.promote_secondaries = 1
net.ipv4.conf.all.promote_secondaries = 1
net.ipv4.ip_forward = 1
net.ipv4.tcp_ecn = 0

初始配置(6 年多前)是按照本指南完成的:http://www.howtoforge.com/linux_dialin_server

有任何想法吗?

相关内容