Just for reference, I have hooked the adsl modem, which uses dhcp also, back up, there is no problem with an altered $HOSTNAME and kprinter works immediately when asked to. I did not even re-run drakconnect or change any files. Seems to be how the cable modem/comcast dhcp works. In /var/lib/dhcp/dhclient-eth0.leases, the stored lease info from comcast includes:
option host-name "x1-6-00-03-47-95-32-57";
option domain-name "comcast.net";
There are no corresponding options for the adsl lease. Google groups has quite a few threads about this cable phenomenon, as a search on '$hostname + $dhcp_hostname' has shown. Maybe Comcast support has an answer. Maybe another wild goose ;p
Thanks to Narfi Stefansson, I am now enjoying better behavior from my cable account.
Apparently, certain dhcp servers, such as Comcast's, issue a host name
that does not resolve to the ip that is issued, or anything, for that matter. This causes lags when programs try to resolve the host name, which I noticed. This invalid host name is evidenced in the snippet of the lease I quoted above and is incorporated into my machine by Mandrake's network scripts (AFAICT). There is a bug report for this here: http://qa.mandrakesoft.com/show_bug.cgi?id=4227
Narfi has written a script, which he helped me install as
/sbin/ifup-local, which is invoked by Mandrake scripts each time the
interface is brought up. This script ensures that hostname resolves to the ip issued by the dhcp server. As it turns out, I use guarddog and guarddog links /sbin/ifup-local to /etc/rc.firewall, where the iptables rules appear to be written (I know nothing about networking). So, we mved that link to back it up and Narfi added one line to the end of his
script to ensure that /etc/rc.firewall continues to be read when it should:
#!/bin/bash outfile=/tmp/report.txt echo "ifup-local has been invoked" > $outfile dhcpfile=/var/lib/dhcp/dhclient-eth0.leases
ip=`grep "fixed-address" ${dhcpfile} | tail -1 | sed 's/[^0-9.]*//g'` address=`host $ip 2>/dev/null| grep "domain name"| sed 's/.* // ;s/.$//'` echo IP is ${ip} >> $outfile echo Address is ${address} >> $outfile echo Current hostname is `hostname` >> $outfile hostname ${address} >> $outfile echo Corrected hostname is `hostname` >> $outfile /etc/rc.firewall $*
This has solved the lagginess I was seeing when loading the desktop,
starting konsole, etc. BTW, I booted connected to my dsl modem and the unproblematic, familiar behavior of that account (with no hostname option given by the dhcp lease) was unchanged by the script.
The problem with printing turned out to be a separate consequence of my switch to the cable account. An strace of kprinter turned up a reference to 172.16.1.10 just as it stalled, which was an ip from my dsl account, and grep -r 172.16.1.10 /etc revealed an occurrence at the bottom of /etc/cups/cupsd.conf:
ServerName 172.16.1.10
That explains why there wasn't a problem when I was hooked up to the adsl account. Commenting that line restored printing to its usual, snappy self. Thanks, again, to Narfi for helping me ferret that one out and thanks to all who responded.
Rolf
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com