Changeset 509

Show
Ignore:
Timestamp:
05/11/08 08:24:16 (3 months ago)
Author:
free
Message:

Instruct dhclient to send host-name

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cdd-utils/trunk/debian/changelog

    r507 r509  
    66  * Code cleanup 
    77  * Idempotent ldap, nfs, monit and apt scripts 
     8  * Instruct dhclient to send host-name 
    89 
    910 -- Free Ekanayaka <free@64studio.com>  Thu, 08 May 2008 21:55:32 +0200 
  • cdd-utils/trunk/lib/common.sh

    r505 r509  
    1919    sep="$2" 
    2020    cfg="$3" 
    21     if ! grep -q ^$key $cfg; then 
    22         echo "${key}${2}" >> $cfg 
     21    if ! grep -q "^$key" "$cfg"; then 
     22        echo "${key}${2}" >> "$cfg" 
    2323    fi 
    2424} 
     
    2828    val="$3" 
    2929    cfg="$4" 
    30     if ! grep -q ^$key $cfg; then 
     30    if ! grep -q "^$key" "$cfg"; then 
    3131        warning "key $key not found in $cfg" 
    3232        return 
  • cdd-utils/trunk/lib/server.sh

    r506 r509  
     1 
    12# LDAP Address book and users 
    23ldap () { 
     
    347348 
    348349} 
     350 
     351# Instruct dhclient to sent the hostname of the machine, so that dnsmasq 
     352# can add it to the DNS zone 
     353dhclient () { 
     354    cfg=/etc/dhcp3/dhclient.conf 
     355    if ! exists $cfg; then warning $cfg not found; return; fi 
     356    del_key "send host-name" "$cfg" 
     357    add_key "send host-name" " " "$cfg" 
     358    set_key "send host-name" " " "$(hostname)" "$cfg" 
     359    touch /etc/resolv.conf 
     360} 
  • cdd-utils/trunk/lib/suites.sh

    r506 r509  
    33    cdd-config ldap client 
    44    cdd-config nfs client 
     5    cdd-config dhclient 
    56} 
    67