# dhcpcd 1.3.22pl4
# ================
# Slackware 8.1's 'dhcpcd' package includes version 1.3.22pl1, Slackware
# 9.0, 9.1 and 10.0's packages all include version 1.3.22pl14
# dhcpcd is part of the tcpip2 package in Slackware 8.0 and down and it's
# own package in 8.1 and up. If you're replacing dhcpcd in Slack 8.0 or
# less, run this to remove the old version. We're purposely not removing
# /etc/dhcpc/* because that contains info about the last IP you had, if
# you remove it, you can't do a quick DHCPREQUEST/DHCPACK the next time
# dhcpcd starts (you'll do a DHCPDISCOVER, etc. and might get a new IP if
# yours is dynamically assigned).
rm -f /sbin/dhcpcd /usr/man/man8/dhcpcd.8.gz
rm -rf /etc/dhcpc /usr/doc/dhcpcd-*
# If you removed Slack installed files above, also remove lines from the
# tcpip2 package that reference files from the old dhcpcd that has been
# removed:
test -f /var/adm/packages/tcpip2 &&
grep dhcpcd /var/adm/packages/tcpip2 > /dev/null 2>&1 &&
cat /var/adm/packages/tcpip2 | \
grep -v "^sbin/dhcpcd$" | \
grep -v "^etc/dhcpc/" | \
grep -v "^usr/doc/dhcpcd-" | \
grep -v "^usr/man/man8/dhcpcd.8.gz$" > /var/adm/packages/tcpip2.new
test -s /var/adm/packages/tcpip2.new &&
(
mkdir -p -m 0700 ~/backup/packages
mv -f /var/adm/packages/tcpip2 /var/adm/packages/tcpip2.`date +%Y%m%d`
mv /var/adm/packages/tcpip2.`date +%Y%m%d` ~/backup/packages/
mv -f /var/adm/packages/tcpip2.new /var/adm/packages/tcpip2
)
cd
test -f installed/dhcpcd-1.3.22-pl4.tar.gz &&
mv installed/dhcpcd-1.3.22-pl4.tar.gz .
test ! -f dhcpcd-1.3.22-pl4.tar.gz &&
wget http://www.phystech.com/ftp/dhcpcd-1.3.22-pl4.tar.gz
cd /usr/local/src
find -type d -maxdepth 1 -name "dhcpcd-*" -exec rm -r {} \;
tar xzvf ~/dhcpcd-1.3.22-pl4.tar.gz
cd dhcpcd-1.3.22-pl4
chown -R root.root .
./configure --prefix=/
make
removepkg dhcpcd
make install
test ! -f /etc/dhcpc/dhcpcd.exe && cp dhcpcd.exe /etc/dhcpc/
cd
mkdir -p -m 0700 installed
rm -f installed/dhcpcd-*.tar.*
mv dhcpcd-1.3.22-pl4.tar.gz installed/
# dhcpcd is normally called from /etc/rc.d/rc.inet1 if DHCP is set to "yes"
# dhcpcd logs to syslog's local0 facility, so if you want a log for just
# dhcpcd, add something like this to /etc/syslog.conf and HUP syslogd:
#
# local0.* /var/log/dhcpcd.log
#
# or if you use syslog-ng, add the lines below to your
# /usr/local/etc/syslog-ng/syslog-ng.conf This assumes that you have source
# "local" set up.
#
# filter local0 { facility(local0); };
# destination dhcpcd { file("/var/log/dhcpcd.log"); };
# log { source(local); filter(local0); destination(dhcpcd); };