You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.4 KiB

#!/bin/bash
# RUN PPPD DAEMON
#
# Original by Oliver Molini 2021
# http://www.steptail.com/guides:virtual_modem:script
#
# Billy Stoughton II for bug fixes and contributions
#
# Modified and partially rewritten by Snep (contact-snep@diskcat.com) 2025
# for the CGHMN project
#
# Licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License
# https://creativecommons.org/licenses/by-nc-sa/4.0/
#
# Note on PPPD settings:
# - Make sure the noauth option is set (instead of auth)
# - Make sure DNS servers are defined (add ms-dns 1.2.3.4 twice)
#
# Variable: lcpidle
# Specifies the idle timeout period in seconds for lcp-echo-interval.
# This is to ensure that pppd will not run indefinitely after sudden
# hangup and will relinquish control back to the vmodem.sh.
#
# Default: lcpidle=5
lcpidle=5
#
# Trumpet Winsock 3.0 revision D for Windows 3.1
# by default requires a fake login shell.
#
# Windows 95 and 98 will not care for a login shell
# unless specifically told to expect one.
#
printf "\n%s****\n" "$(uname -sn)"
printf "\nUsername: "; sleep 1
printf "\nPassword: "; sleep 1
printf "\nStarting pppd..."
printf "\nPPP>"
# End of fake login prompt.
# Run PPP daemon and establish a link.
pppd noauth nodetach local lock lcp-echo-interval $lcpidle lcp-echo-failure 3 proxyarp ms-dns 100.64.0.1 100.64.0.1:100.64.0.2 "/dev/${SERIAL_PORT}" "${BAUD}"
printf "\nPPP link terminated.\n"