| 9 |
uname -s | tr '[:lower:]' '[:upper:]' |
uname -s | tr '[:lower:]' '[:upper:]' |
| 10 |
[ -x "`which dpkg`" ] && dpkg --print-installation-architecture | tr /a-z/ /A-Z/ |
[ -x "`which dpkg`" ] && dpkg --print-installation-architecture | tr /a-z/ /A-Z/ |
| 11 |
|
|
|
# all hosts named ant?? are using the classes in file anthill |
|
|
case $HOSTNAME in |
|
|
ant??) catnc anthill ;; |
|
|
esac |
|
|
|
|
|
# all hosts named nuerburg? are becoming web kiosk systems |
|
|
case $HOSTNAME in |
|
|
nuerburg?) catnc wwwkiosk ;; |
|
|
esac |
|
|
|
|
| 12 |
# the Beowulf cluster; all nodes except the master node use classes from file class/atoms |
# the Beowulf cluster; all nodes except the master node use classes from file class/atoms |
| 13 |
case $HOSTNAME in |
case $HOSTNAME in |
| 14 |
atom00) echo "BEOWULF_MASTER NETTOOLS NTP DHCP_SERVER DNS_SERVER";; |
atom00) echo "BEOWULF BEOWULF_MASTER NETTOOLS NTP DHCP_SERVER DNS_SERVER";; |
| 15 |
atom??) catnc atoms ;; |
atom??) catnc atoms ;; |
| 16 |
esac |
esac |
| 17 |
|
|
| 18 |
# if host belongs to class C subnet 134.95.9.0 use class NET_9 |
# if host belongs to class C subnet 123.45.6.0 use class NET_6 |
| 19 |
# exclude all hosts with an IP address above 200 |
# exclude all hosts with an IP address above 200 |
| 20 |
case $IPADDR in |
case $IPADDR in |
| 21 |
134.95.9.2??) ;; |
123.45.6.2??) ;; |
| 22 |
134.95.*.*) catnc koeln ; echo "CS_KOELN NET_9" ;; |
123.45.*.*) catnc koeln ;; |
| 23 |
134.95.9.*) echo "CS_KOELN NET_9" ;; |
123.45.6.*) echo "CS_KOELN NET_6" ;; |
| 24 |
esac |
esac |
| 25 |
|
|
| 26 |
# use a list of classes for a demo machine |
# use a list of classes for a demo machine |