am i don't know how to get mgetty running on jessie
i have tried this: viewtopic.php?f=66&t=123081#p865954
on wheezy i had this file: /etc/inittab
Code: Select all
# /etc/inittab: init(8) configuration.
# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $
# The default runlevel.
id:2:initdefault:
# Boot-time system configuration/initialization script.
# This is run first except when booting in emergency (-b) mode.
si::sysinit:/etc/init.d/rcS
# What to do in single-user mode.
~~:S:wait:/sbin/sulogin
# /etc/init.d executes the S and K scripts upon change
# of runlevel.
#
# Runlevel 0 is halt.
# Runlevel 1 is single-user.
# Runlevels 2-5 are multi-user.
# Runlevel 6 is reboot.
l0:0:wait:/etc/init.d/rc 0
l1:1:wait:/etc/init.d/rc 1
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 3
l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
l6:6:wait:/etc/init.d/rc 6
# Normally not reached, but fallthrough in case of emergency.
z6:6:respawn:/sbin/sulogin
# What to do when CTRL-ALT-DEL is pressed.
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
# Action on special keypress (ALT-UpArrow).
#kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this work."
# What to do when the power fails/returns.
pf::powerwait:/etc/init.d/powerfail start
pn::powerfailnow:/etc/init.d/powerfail now
po::powerokwait:/etc/init.d/powerfail stop
# /sbin/getty invocations for the runlevels.
#
# The "id" field MUST be the same as the last
# characters of the device (after "tty").
#
# Format:
# <id>:<runlevels>:<action>:<process>
#
# Note that on most Debian systems tty7 is used by the X Window System,
# so if you want to add more getty's go ahead but skip tty7 if you run X.
#
1:2345:respawn:/sbin/getty --noclear 38400 tty1
2:23:respawn:/sbin/getty 38400 tty2
3:23:respawn:/sbin/getty 38400 tty3
4:23:respawn:/sbin/getty 38400 tty4
5:23:respawn:/sbin/getty 38400 tty5
6:23:respawn:/sbin/getty 38400 tty6
# Example how to put a getty on a serial line (for a terminal)
#
#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
#T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100
# Example how to put a getty on a modem line.
#
T3:23:respawn:/sbin/mgetty -x 0 /dev/ttyACM0
#Spawn a getty on Raspberry Pi serial line
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
Code: Select all
#
# mgetty configuration file
#
# this is a sample configuration file, see mgetty.info for details
#
# comment lines start with a "#", empty lines are ignored
# ----- global section -----
#
# In this section, you put the global defaults, per-port stuff is below
# set the global debug level to "4" (default from policy.h)
debug 4
# set the local fax station id
fax-id
# access the modem(s) with 38400 bps
speed 38400
# use an alternate issue file, to avoid being bitten by linuxlogo
issue-file /etc/issue.mgetty
# use these options to make the /dev/tty-device owned by "uucp.uucp"
# and mode "rw-rw-r--" (0664). *LEADING ZERO NEEDED!*
#port-owner uucp
#port-group uucp
#port-mode 0664
# use these options to make incoming faxes owned by "root.uucp"
# and mode "rw-r-----" (0640). *LEADING ZERO NEEDED!*
#fax-owner root
#fax-group uucp
#fax-mode 0640
# ----- port specific section -----
#
# Here you can put things that are valid only for one line, not the others
#
# Zoom V.FX 28.8, connected to ttyS0: don't do fax, less logging
#
#port ttyS0
# debug 3
# data-only y
# some other Rockwell modem, needs "switchbd 19200" to receive faxes
# properly (otherwise it will fail with "timeout").
#
#port ttyS1
# speed 38400
# switchbd 19200
# ZyXEL 2864, connected to ttyS2: maximum debugging, grab statistics
#
#port ttyS2
# debug 8
# init-chat "" \d\d\d+++\d\d\dAT&FS2=255 OK ATN3S0=0S13.2=1 OK
# statistics-chat "" AT OK ATI2 OK
# statistics-file /var/log/statistics.ttyS2
# modem-type cls2
# direct connection of a VT100 terminal which doesn't like DTR drops
# ("direct" meaning "*no* *modem*". NEVER enable "direct yes" on modem lines!)
#
#port ttyS3
# direct y
# speed 19200
# toggle-dtr n
port ttyACM0
rings 2
init-chat "" AT#CID=1
cnd-program /usr/local/sbin/callerID
/usr/local/sbin/callerID
Code: Select all
#!/usr/bin/php
<?php
$json=(object)array(
'time'=>time(),
'num'=>(float)$argv[2],
'name'=>$argv[3]
);
$names=json_decode(file_get_contents('/opt/callerIDnames.json'));
if(isset($names->{$json->{'num'}})){
$json->{'name'}=$names->{$json->{'num'}};
}
$file=fopen('/tmp/ram/caller.json','w+');
fwrite($file,json_encode($json));
fclose($file);
$file='/tmp/ram/caller.log.json';
if(file_exists($file))
$log=json_decode(file_get_contents($file));
else
$log=array();
array_push($log,$json);
if(count($log)>499)
array_shift($log);
$file=fopen($file,'w+');
fwrite($file,json_encode($log));
fclose($file);
exit(1);
?>