Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37865549
en ru br
ALT Linux repos
S:4.4.3.P1-alt1
5.0: 3.0.7-alt1
4.1: 3.0.6-alt2.M41.1
4.0: 3.0.6-alt1
3.0: 3.0.2-alt1

Group :: System/Servers
RPM: dhcp

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

#!/bin/sh

# This script can be installed in /etc/dhcp/dhclient.d/ to set the client's
# hostname based either on the hostname that the DHCP server supplied or the
# hostname in whatever ptr record exists for the assigned IP address.

if [ -z "$new_host_name" -a -n "$new_ip_address" ]; then
new_host_name="$(resolve -s "$new_ip_address" 2>/dev/null)"
fi
if [ -n "$new_host_name" ]; then
hostname "$new_host_name"
fi
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin