diff options
author | Rob Funk <rfunk@funknet.net> | 2004-06-08 03:59:01 +0000 |
---|---|---|
committer | Rob Funk <rfunk@funknet.net> | 2004-06-08 03:59:01 +0000 |
commit | d78b61e3efaea197a6e5b2b72bf2981a9ed69461 (patch) | |
tree | 1704e13ce5d767d59868a2d5e834cb2e988ed90f /contrib/start_dynamic_ppp | |
parent | d9e84e176fe538e110d9612f9832d69846e8d3e7 (diff) | |
download | fetchmail-d78b61e3efaea197a6e5b2b72bf2981a9ed69461.tar.gz fetchmail-d78b61e3efaea197a6e5b2b72bf2981a9ed69461.tar.bz2 fetchmail-d78b61e3efaea197a6e5b2b72bf2981a9ed69461.zip |
Add files from ESR's dev directory that weren't under version control
svn path=/trunk/; revision=3881
Diffstat (limited to 'contrib/start_dynamic_ppp')
-rw-r--r-- | contrib/start_dynamic_ppp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/contrib/start_dynamic_ppp b/contrib/start_dynamic_ppp new file mode 100644 index 00000000..7ceeddb3 --- /dev/null +++ b/contrib/start_dynamic_ppp @@ -0,0 +1,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 |