-
pump to get hostname
Hi Everyone
Has anybody had any experience using pump to find out and set the "proper" hostname of a box, based on a DNS server? I am trying to get this to start on boot and its not clear to me if this is even possible. If it isn't, could anybody suggest how to switch to using dhcpc instead to achieve the same?
Thanks in advance
Ben
-
Hi again
In the end I determined that pump could not do this, so I added the line
Code:
hostname $(dig -x `ifconfig $DEVICE | grep "inet addr" |awk '{print $2}' | cut -d : -f2` +short |cut -d . -f1)
to /etc/init.d/knoppix-auoconfig, after netdevice detection has finished. I set $DEVICE to eth0, but in the more general case I think leaving out $DEVICE should work. If a network was unavailble I think that the command would fail, and the hostname would remain Knoppix (as set earlier in the script)
Ben
Similar Threads
-
By paradigm_shift in forum Networking
Replies: 0
Last Post: 07-15-2005, 05:36 AM
-
By probono in forum Networking
Replies: 0
Last Post: 09-17-2004, 04:52 AM
-
By qman_txun in forum Networking
Replies: 4
Last Post: 11-04-2003, 08:22 AM
-
By JockVSJock in forum Networking
Replies: 7
Last Post: 10-08-2003, 09:23 AM
-
By probono in forum Networking
Replies: 0
Last Post: 06-08-2003, 11:42 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Knoppix Live GNU Linux System 9.1 on Bootable CD / DVD / USB Flash Drive
$9.99
Hamshack Live DVD-ROM
$12.00
Knoppix 9.1 Live Linux GNU Bootable USB Flash Drive USA
$19.99
Knoppix Linux Bootable OS v8.6 "Original Live Operating System" 16G USB Stick
$19.95
Knoppix NSM 1.2
$8.50
Linux Knoppix 4.0.2 Installation Disc
$39.99
KNOPPIX 9.1 LINUX INSTALL & LIVE DVD
$9.99
Acer Aspire One 9 inch Netbook ZG5 512MB RAM 8GB SSD HD Knoppix Linux WiFi VGA
$79.99
Knoppix Linux Bootable OS v8.6 "Original Live Operating System" 32G USB Stick
$20.30