/[fai]/trunk/examples/simple/class/01alias
ViewVC logotype

Diff of /trunk/examples/simple/class/01alias

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1975 by lange, Wed Jul 16 20:53:37 2003 UTC revision 1976 by lange, Thu Jul 24 10:47:52 2003 UTC
# Line 1  Line 1 
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
# Line 43  esac Line 49  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

Legend:
Removed from v.1975  
changed lines
  Added in v.1976

  ViewVC Help
Powered by ViewVC 1.1.5