File: debug-exit

package info (click to toggle)
dhcp3 3.0.1-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,456 kB
  • ctags: 5,176
  • sloc: ansic: 66,419; sh: 1,677; perl: 601; makefile: 137
file content (27 lines) | stat: -rw-r--r-- 1,008 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# $Id: debug-exit,v 1.2 2003/06/18 18:11:21 peloy Exp $
#
# The purpose of this script is just to show the variables that are
# available to all the scripts in this directory. All these scripts
# are called from /etc/dhcp3/dhclient-script, which exports all the
# variables shown before. If you want to debug a problem with your DHCP
# setup you can enable this script and take a look at
# /tmp/dhclient-script.debug.

# To enable comment out the following line.
RUN="no"

if [ "$RUN" = "yes" ]; then
	echo `date`: entering dhclient-exit-hooks.d, dumping variables. \
		>> /tmp/dhclient-script.debug

	for i in reason interface medium alias_ip_address new_ip_address \
			new_subnet_mask new_domain_name \
			new_domain_name_servers new_routers new_static_routes \
			old_ip_address old_subnet_mask old_domain_name \
			old_domain_name_servers old_routers \
			old_static_routes; do
		echo $i=\'${!i}\' >> /tmp/dhclient-script.debug
	done

	echo '--------------------------' >> /tmp/dhclient-script.debug
fi