File: start_dynamic_ppp

package info (click to toggle)
fetchmail 6.3.26-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 8,980 kB
  • ctags: 4,235
  • sloc: ansic: 29,508; sh: 5,796; perl: 3,181; python: 1,955; yacc: 458; makefile: 350; lex: 265; awk: 124; lisp: 84; exp: 43; sed: 16
file content (16 lines) | stat: -rw-r--r-- 564 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
# setup hostname in /etc/hosts.  use IP if no name available.
echo cyberhq > /tmp/local_name
echo $4 > /tmp/ip
host $4 | fgrep Name | cut -c7- > /tmp/ip_name
if [ ! -s /tmp/ip_name ]; then
    echo $4 > /tmp/ip_name
fi
cat /tmp/ip_name > /etc/sendmail.cw
paste /tmp/ip /tmp/ip_name /tmp/local_name > /tmp/host_bottom
cat /etc/hosts.top /tmp/host_bottom > /etc/hosts
rm /tmp/ip /tmp/ip_name /tmp/host_bottom /tmp/local_name
# Restart sendmail with new name.
kill -HUP `head -1 /var/run/sendmail.pid`
# Start fetchmail as root to fetch our mail.
fetchmail