Commit 1f160215 authored by Robert Ricci's avatar Robert Ricci
Browse files

Support for DHCP interface selection in Linux. Works very similarly to the

FreeBSD support, except that the CPU speed is determined from /proc/cpuinfo
parent ab8c7c26
......@@ -43,3 +43,8 @@ install:
-mkdir -p /root/.cvsup
$(INSTALL) -m 600 $(SRCDIR)/cvsup.auth /root/.cvsup/auth
$(INSTALL) -m 644 $(SRCDIR)/pump.conf /etc/pump.conf
$(INSTALL) -m 755 $(SRCDIR)/cpuspeed.awk $(INSTALL_DIR)/cpuspeed.awk
$(INSTALL) -m 755 $(SRCDIR)/nodetype $(INSTALL_DIR)/nodetype
$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth2 /etc/sysconfig/network-scripts/ifcfg-eth2
$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth4 /etc/sysconfig/network-scripts/ifcfg-eth4
#!/usr/bin/awk -f
/^cpu MHz.*8[0-9][0-9]\.[0-9]+$/ {
print "850";
next
}
/^cpu MHz.*6[0-9][0-9]\.[0-9]+$/ {
print "600";
next
}
/^cpu MHz.*/ {
print "0";
next
}
DEVICE="eth2"
if ["`/etc/rc.d/testbed/nodetype`" = 'pc850']; then
ONBOOT="yes"
BOOTPROTO="dhcp"
else
ONBOOT="no"
fi
IPADDR=""
NETMASK=""
IPXNETNUM_802_2=""
IPXPRIMARY_802_2="no"
IPXACTIVE_802_2="no"
IPXNETNUM_802_3=""
IPXPRIMARY_802_3="no"
IPXACTIVE_802_3="no"
IPXNETNUM_ETHERII=""
IPXPRIMARY_ETHERII="no"
IPXACTIVE_ETHERII="no"
IPXNETNUM_SNAP=""
IPXPRIMARY_SNAP="no"
IPXACTIVE_SNAP="no"
DEVICE="eth4"
if ["`/etc/rc.d/testbed/nodetype`" = 'pc600']; then
ONBOOT="yes"
BOOTPROTO="dhcp"
else
ONBOOT="no"
fi
IPADDR=""
NETMASK=""
IPXNETNUM_802_2=""
IPXPRIMARY_802_2="no"
IPXACTIVE_802_2="no"
IPXNETNUM_802_3=""
IPXPRIMARY_802_3="no"
IPXACTIVE_802_3="no"
IPXNETNUM_ETHERII=""
IPXPRIMARY_ETHERII="no"
IPXACTIVE_ETHERII="no"
IPXNETNUM_SNAP=""
IPXPRIMARY_SNAP="no"
IPXACTIVE_SNAP="no"
#!/bin/sh
if [ -x '/etc/rc.d/testbed/cpuspeed.awk' ]; then
cpuspeed=`/etc/rc.d/testbed/cpuspeed.awk /proc/cpuinfo`;
else
cpuspeed='';
fi
if [ x$cpuspeed = x ] || [ $cpuspeed = 0 ]; then
echo "unknown";
else
echo pc$cpuspeed;
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment