| 1 |
#! /bin/sh |
#! /bin/sh |
| 2 |
|
|
| 3 |
|
catnc() { |
| 4 |
|
# cat but no comment lines |
| 5 |
|
grep -v "^#" $1 |
| 6 |
|
} |
| 7 |
|
|
| 8 |
|
|
| 9 |
# echo architecture and OS name in upper case. Do NOT remove these two lines |
# echo architecture and OS name in upper case. Do NOT remove these two lines |
| 10 |
uname -s | tr /a-z/ /A-Z/ |
uname -s | tr /a-z/ /A-Z/ |
| 11 |
[ -x "`which dpkg`" ] && dpkg --print-installation-architecture | tr /a-z/ /A-Z/ |
[ -x "`which dpkg`" ] && dpkg --print-installation-architecture | tr /a-z/ /A-Z/ |
| 12 |
|
|
| 13 |
# all hosts named ant?? are using the classes in file anthill |
# all hosts named ant?? are using the classes in file anthill |
| 14 |
case $HOSTNAME in |
case $HOSTNAME in |
| 15 |
ant??) cat anthill ;; |
ant??) catnc anthill ;; |
| 16 |
esac |
esac |
| 17 |
|
|
| 18 |
# all hosts named nuerburg? are becoming web kiosk systems |
# all hosts named nuerburg? are becoming web kiosk systems |
| 19 |
case $HOSTNAME in |
case $HOSTNAME in |
| 20 |
nuerburg?) cat wwwkiosk ;; |
nuerburg?) catnc wwwkiosk ;; |
| 21 |
esac |
esac |
| 22 |
|
|
| 23 |
# 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 |
| 24 |
case $HOSTNAME in |
case $HOSTNAME in |
| 25 |
atom00) echo BEOWULF_MASTER ;; |
atom00) echo BEOWULF_MASTER ;; |
| 26 |
atom??) cat atoms ;; |
atom??) catnc atoms ;; |
| 27 |
esac |
esac |
| 28 |
|
|
| 29 |
# if host belongs to class C subnet 134.95.9.0 use class NET_9 |
# if host belongs to class C subnet 134.95.9.0 use class NET_9 |
| 30 |
# exclude all hosts with an IP address above 200 |
# exclude all hosts with an IP address above 200 |
| 31 |
case $IPADDR in |
case $IPADDR in |
| 32 |
134.95.9.2??) ;; |
134.95.9.2??) ;; |
| 33 |
134.95.*.*) cat koeln ; echo "CS_KOELN NET_9" ;; |
134.95.*.*) catnc koeln ; echo "CS_KOELN NET_9" ;; |
| 34 |
134.95.9.*) echo "CS_KOELN NET_9" ;; |
134.95.9.*) echo "CS_KOELN NET_9" ;; |
| 35 |
esac |
esac |
| 36 |
|
|
| 37 |
# our notebooks |
# our notebooks |
| 38 |
case $HOSTNAME in |
case $HOSTNAME in |
| 39 |
paeffgen|schlaeffli) |
paeffgen|schlaeffli) |
| 40 |
cat notebook |
catnc notebook |
| 41 |
echo "BOOTWINDOWS" |
echo "BOOTWINDOWS" |
| 42 |
;; |
;; |
| 43 |
pittermaennche) |
pittermaennche) |
| 44 |
cat notebook |
catnc notebook |
| 45 |
echo "BOOTP_SERVER" |
echo "BOOTP_SERVER" |
| 46 |
;; |
;; |
| 47 |
esac |
esac |
| 49 |
# use a list of classes for a demo machine |
# use a list of classes for a demo machine |
| 50 |
case $HOSTNAME in |
case $HOSTNAME in |
| 51 |
demohost) |
demohost) |
| 52 |
cat demo |
catnc demo |
| 53 |
;; |
;; |
| 54 |
esac |
esac |