배경:
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
어떤 아이디어가 있나요?