~ubuntu-branches/ubuntu/trusty/dhcpcd/trusty-security

« back to all changes in this revision

Viewing changes to rc.d/rc.dhcp

  • Committer: Bazaar Package Importer
  • Author(s): Simon Kelley
  • Date: 2005-09-30 02:21:51 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050930022151-vq3xlcazj0bdpyf4
Tags: 1:2.0.0-2
Clear out /etc/dhcpc/resolv.conf and /var/lib/dhcpc/* 
during purge. (closes: #330515)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
#
3
 
# $Id$
4
 
#
5
 
# sample command file which can be invoked from dhcpcd
6
 
# This script derived from "rc.inet2"
7
 
#
8
 
# Author: Yoichi Hariguchi <yoichi@fore.com>
9
 
#
10
 
 
11
 
NET=/usr/sbin
12
 
IN_SERV="xntpd"
13
 
 
14
 
# make configuration files for DNS and NTP
15
 
for serv in resolv ntp ; do
16
 
  if [ -f /etc/dhcpc/${serv}.conf ]; then
17
 
    if [ -L /etc/${serv}.conf ]; then
18
 
      rm -f /etc/${serv}.conf
19
 
    elif [ -f /etc/${serv}.conf ]; then
20
 
      mv /etc/${serv}.conf /etc/${serv}.conf.ORG
21
 
    fi
22
 
    ln -s /etc/dhcpc/${serv}.conf /etc
23
 
  fi
24
 
done
25
 
 
26
 
# Start the INET SuperServer
27
 
if [ -f ${NET}/inetd ]; then
28
 
  ${NET}/inetd
29
 
else
30
 
  exec false
31
 
  #exit 1
32
 
fi
33
 
 
34
 
# # Start the NAMED/BIND name server.
35
 
# if [ -f ${NET}/named ]; then
36
 
#   ${NET}/named
37
 
# fi
38
 
 
39
 
# Start the ROUTEd server.
40
 
if [ -f ${NET}/routed ]; then
41
 
   ${NET}/routed -q
42
 
fi
43
 
 
44
 
# Start the various INET servers.
45
 
for server in ${IN_SERV} ; do
46
 
  if [ -f ${NET}/${server} ]; then
47
 
    ${NET}/${server}
48
 
  fi
49
 
done
50
 
 
51
 
# Start the various SUN RPC servers.
52
 
 
53
 
if [ -f ${NET}/rpc.portmap ]; then
54
 
  ${NET}/rpc.portmap
55
 
 
56
 
  # Start the NFS server daemons.
57
 
  if [ -f ${NET}/rpc.mountd ]; then
58
 
    ${NET}/rpc.mountd
59
 
  fi
60
 
#  if [ -f ${NET}/rpc.nfsd ]; then
61
 
#    echo -n " nfsd"
62
 
#    ${NET}/rpc.nfsd
63
 
#  fi
64
 
#  # Fire up the PC-NFS daemon(s).
65
 
#  if [ -f ${NET}/rpc.pcnfsd ]; then
66
 
#    echo -n " pcnfsd"
67
 
#    ${NET}/rpc.pcnfsd ${LPSPOOL}
68
 
#  fi
69
 
#  if [ -f ${NET}/rpc.bwnfsd ]; then
70
 
#    echo -n " bwnfsd"
71
 
#    ${NET}/rpc.bwnfsd ${LPSPOOL}
72
 
#  fi
73
 
fi # Done starting various SUN RPC servers.
74
 
 
75
 
 
76
 
# # Setting up NIS:
77
 
# # (NOTE: For detailed information about setting up NIS, see the
78
 
# #  documentation in /usr/doc/yp-clients* and /usr/doc/ypserv*.)
79
 
# #
80
 
# if [ -z "$NISDOMAINNAME" ] ; then
81
 
#   domainname-yp `cat /etc/nisdomainname`
82
 
# fi
83
 
# # Then, we start up ypbind.  It will use broadcast to find a server.
84
 
# if [ -d /var/yp ] ; then
85
 
#   /usr/sbin/ypbind 
86
 
# fi
87
 
 
88
 
# if you just 'exit' and do not issue 'exec trure', this process does not
89
 
# finish (I do not know why :p)
90
 
exec true
91
 
# Done!