]> Pileus Git - ~andy/fetchmail/blob - contrib/start_dynamic_ppp
Update German translation.
[~andy/fetchmail] / contrib / start_dynamic_ppp
1 #!/bin/sh
2 # setup hostname in /etc/hosts.  use IP if no name available.
3 echo cyberhq > /tmp/local_name
4 echo $4 > /tmp/ip
5 host $4 | fgrep Name | cut -c7- > /tmp/ip_name
6 if [ ! -s /tmp/ip_name ]; then
7     echo $4 > /tmp/ip_name
8 fi
9 cat /tmp/ip_name > /etc/sendmail.cw
10 paste /tmp/ip /tmp/ip_name /tmp/local_name > /tmp/host_bottom
11 cat /etc/hosts.top /tmp/host_bottom > /etc/hosts
12 rm /tmp/ip /tmp/ip_name /tmp/host_bottom /tmp/local_name
13 # Restart sendmail with new name.
14 kill -HUP `head -1 /var/run/sendmail.pid`
15 # Start fetchmail as root to fetch our mail.
16 fetchmail