Changeset 3136 in /cluster/svnroot


Ignore:
Timestamp:
Apr 16, 2011 1:46:10 PM (10 years ago)
Author:
skylar
Message:

merging in hostname fixes (#628)

Location:
bccd-ng/trunk
Files:
2 edited
2 copied

Legend:

Unmodified
Added
Removed
  • bccd-ng/trunk/packages/etc/init.d/bccd-passwd

    r3088 r3136  
    3232### END INIT INFO
    3333
    34 if test $(cat /etc/bccd-stage) = "LIBERATED"; then
     34if test $(cat /etc/bccd-stage) = "LIBERATED" ||
     35        test $(cat /etc/bccd-stage = "DISKLESS" ; then
    3536        echo "We're liberated already."
    3637        exit 0
  • bccd-ng/trunk/trees/bin/bccd-hostname

    r2749 r3136  
    3535$hostname = "no_dhcp";
    3636
    37 foreach ( $Bccd->get_eth_nics() ) {
    38         $iaddr = $Bccd->get_nic_ip($_);
    39         if(defined($iaddr)) {
    40                 $hname = gethostbyaddr(inet_aton($iaddr),AF_INET);
    41                 if (defined($hname)) {
    42                         $hostname = $hname unless ($hostname =~ m/.+\.bccd.+/);
     37if($Bccd->get_stage() eq 'LIBERATED') {
     38        $hostname = "pxenode000.bccd.net";
     39}
     40else {
     41        foreach ( $Bccd->get_eth_nics() ) {
     42                $iaddr = $Bccd->get_nic_ip($_);
     43                if(defined($iaddr)) {
     44                        $hname = gethostbyaddr(inet_aton($iaddr),AF_INET);
     45                        if (defined($hname)) {
     46                                $hostname = $hname unless ($hostname =~ m/.+\.bccd.+/);
     47                        }
    4348                }
    4449        }
Note: See TracChangeset for help on using the changeset viewer.