Administration von Unix-Rechnern mit cfengine


 

Praktische Realisierung

Klassendefinitionen

  • File cf.linux_Classes enthält alle Klassendefinitionen

  •  
     
    classes: 

    # some domain classes (every host must be listet here!) 

       DOM_MB3     = ( bismut merse ) 
       DOM_PHIL    = ( empor zenon eirinn andreas ) 
       DOM_PHYSIK  = ( micky minni donald daisy dagobert gustav daniel goofy 
                       hannibal 
                     ) 
       DOM_URZ     = ( wotan platon oedipus castor pollux sirius regulus wega 
                       arktur algol capella deneb prokyon rigel atair bratsche 
                       cello fagott floete geige harfe horn klavier oboe orgel 
                       pauke posaune saxophon trompete tuba arghul baya conga 
                       djembe doholla doudouk duf kementche marimba mazhar 
                       octaban sitar surdu tabla tenbur aldebaran virus diokletian 
                       argus stipe myk bruford lukas devil oskar merowech azrael 
                       gonzo bastel moebius adonis clapton tina fata morgana 
                       foxtrott rumba tango twist pandora duplo diskus brenner 
                       thrak vroom friedrich belew nirwana spuler 
                       vergil petronius tibull plinius cato horaz catull epikur 
                       properz virgin tiny hydra tech7 avalon wilfried mambo 
                       pegh megane nasty artus lancelot culix xterm1 enkur 
                     ) 

    # some distribution classes (every host must be listet here!) 

       RH42        = ( empor eirinn zenon andreas 
                       diokletian myk oskar gonzo 
                       rumba pandora diskus brenner xterm1 
                       friedrich nirwana spuler vergil petronius tibull 
                       plinius cato horaz catull epikur properz hydra tech7 
                     ) 

       RH50        = ( tiny ) 

       RH51        = ( fata belew bruford avalon foxtrott duplo morgana wilfried 
                       mambo pegh megane nasty artus lancelot culix stipe oedipus 
                       platon wotan aldebaran atair arktur algol capella 
                       deneb prokyon rigel wega pollux sirius castor regulus 
                       azrael clapton tina tango virgin lukas 
                       arghul baya conga djembe doholla doudouk duf kementche 
                       marimba mazhar octaban sitar surdu tabla tenbur 
                       bratsche cello fagott floete geige harfe horn klavier oboe 
                       orgel pauke posaune saxophon trompete tuba 
                       twist argus merowech adonis virus devil thrak 
                       bismut merse enkur moebius micky minni donald daisy 
                       dagobert gustav daniel goofy 
                     ) 

       RH52       = ( vroom hannibal 
                    ) 

    # some host/functional classes (usually every host must be listet here!) 

       PhilPriv    = ( empor andreas eirinn ) 

       PhysikPool  = ( micky minni donald daisy dagobert gustav daniel goofy 
                       hannibal 
                     ) 

       Mb3Priv     = ( bismut merse ) 

       Referenz    = ( wotan platon oedipus ) 

       PC_Pool     = ( atair rigel deneb  wega algol arktur capella 
                       prokyon pollux sirius castor  regulus 
                     ) 

       PC_Pool_RS  = ( 
                       arghul baya conga djembe doholla doudouk duf kementche 
                       marimba mazhar octaban sitar surdu tabla tenbur 
                       bratsche cello fagott floete geige harfe horn klavier oboe 
                       orgel pauke posaune saxophon trompete tuba 
                     ) 

       PC_Pool_RS_401  = ( arghul baya conga djembe doholla doudouk duf kementche 
                           marimba mazhar octaban sitar tabla tenbur surdu 
                         ) 

       PC_Pool_RS_404  = ( bratsche cello fagott floete geige harfe horn klavier 
                           oboe orgel pauke posaune saxophon trompete tuba 
                         ) 

       PC_Pool_ADM = ( aldebaran virus ) 

       UrzPriv     = ( diokletian argus stipe myk bruford lukas devil oskar merowech 
                       azrael gonzo bastel moebius adonis clapton tina fata culix 
                       morgana tiny avalon wilfried pegh megane nasty artus lancelot 
                       enkur 
                     ) 

       SambaServer = ( foxtrott rumba tango twist mambo ) 

    #   ScannPC     = ( surdu ) 

       CpuServer   = ( pandora ) 

       CdromServer = ( diskus ) 

       CdromBrenner = ( brenner ) 

       SquidServer = ( thrak vroom ) 

       FaxServer   = ( friedrich ) 

       FtpServer   = ( belew nirwana ) 

       PrintSpooler = ( spuler ) 

       WebTermServer = ( vergil ) 

       InfoTerminals = ( petronius tibull plinius cato horaz catull epikur properz 
                       ) 

       InstallServer = ( virgin ) 

       LichtenServer = ( zenon ) 
       CanServer = ( hydra ) 

       DbServer  = ( duplo ) 

    # some attribut classes 

       AFS         = ( Referenz PC_Pool PC_Pool_RS PC_Pool_ADM UrzPriv SambaServer 
                       CpuServer CgiServer CdromServer CdromBrenner SquidServer 
                       FaxServer FtpServer PrintSpooler WebTermServer InstallServer 
                       PhilPriv CanServer DbServer Mb3Priv PhysikPool 
                     ) 

    #   OFFLINE     = ( zenon tech7 ) 
       NoAFS       = ( zenon petronius tibull plinius cato horaz catull epikur 
                       properz 
                     ) 

       NIS         = ( Referenz PC_Pool PC_Pool_RS PC_Pool_ADM UrzPriv 
                       CpuServer CgiServer CdromServer CdromBrenner SquidServer 
                       FaxServer FtpServer PrintSpooler WebTermServer InstallServer 
                       PhilPriv  CanServer DbServer Mb3Priv SambaServer 
                     ) 

       NoNIS       = ( zenon petronius tibull plinius cato horaz catull epikur 
                       properz PhysikPool 
                     ) 
     

       SubNetz200  = ( wotan oedipus diokletian friedrich duplo myk devil merowech 
                       lukas brenner azrael gonzo bastel oskar adonis 
                       virgin fata morgana tiny avalon culix 
                       pegh megane nasty artus lancelot enkur 
                     ) 

       SubNetz72   = ( spuler argus moebius castor pollux rigel sirius prokyon 
                       regulus arktur wega atair deneb capella algol platon 
                       aldebaran virus bratsche cello fagott floete geige harfe 
                       horn klavier oboe orgel pauke posaune saxophon trompete tuba 
                       arghul baya conga djembe doholla doudouk duf kementche 
                       marimba mazhar octaban sitar surdu tabla tenbur wilfried 
                     ) 

       SubNetz132  = ( tango pandora diskus stipe bruford thrak twist vroom 
                       belew nirwana clapton tina mambo hydra 
                     ) 

       SubNetz216  = ( rumba ) 
       SubNetz168  = ( foxtrott ) 
       SubNetz176  = ( vergil ) 
       SubNetz32   = ( empor andreas eirinn ) 
       SubNetz64   = ( bismut merse ) 
       SubNetz19317423  = ( zenon ) 
       SubNetz124  = ( tech7 ) 
       SubNetz16   = ( PhysikPool ) 

       X11Systems  = ( Referenz PC_Pool PC_Pool_RS PC_Pool_ADM UrzPriv 
                       InstallServer spuler PhilPriv zenon CanServer tech7 
                       mambo Mb3Priv PhysikPool 
                     ) 

       Staroffice  = ( Referenz PC_Pool PC_Pool_RS CpuServer myk culix 
                       bruford lukas diokletian merowech tina 
                       adonis fata morgana PhilPriv 
                     ) 

       Staroffice40 = ( Referenz PC_Pool PC_Pool_RS CpuServer myk 
                        stipe bruford lukas diokletian merowech azrael moebius 
                        tina clapton adonis fata morgana culix wilfried pegh 
                        artus lancelot megane nasty PhilPriv tech7 Mb3Priv 
                      ) 
     

     
     

cfengine.conf

  •  
  • File cfengine.conf importiert allgemeine Konfigurationsfiles

  •  
     
    ### 
    # cfengine.conf 
    # cfengine configuration for RedHat Linux, URZ TU Chemnitz 
    # 03.02.98 wmc 
    ### 

    # BEGIN cfengine.conf 

    # Importieren aller Konfigurationsfiles cf.linux_*** (wenn sie nicht an 
    # spezielle Hostklassen gebunden sind; siehe cf.linux_Classes) 
    # Divide et Impera ! 
    # 
    # CFINPUTS must be set !!! 

    import: 

      any:: 

        # 
        # Files for all Linux Systems 
        # 
        cf.linux_Classes 
        cf.linux_Main 
        cf.linux_AllSystems 
        cf.linux_SubNetz 

      # 
      # Files for special action classes 
      # Call: cfengine -D<action class> 
      # 
      MOTD::           cf.linux_Motd 
      PRIV::           cf.linux_PrivPolicy 
      RPM_INFO::       cf.linux_RpmInfo 
      RPM_UPGR::       cf.linux_RpmUpgrade 

    # END cfengine.conf 
     

     

Allgemeine Konfigurationsfiles

  • File cf.linux_Main importiert spezielle Konfigurationsfiles, enthält control-Sektion, actionsequence

  •  
     
    ### 
    # cf.linux_Main 
    # cfengine configuration for RedHat Linux, URZ TU Chemnitz 
    # 03.02.98 wmc 
    ### 

    # BEGIN cf.linux_Main 

    import: 

      # 
      # Files for special host classes 
      # 
      PhilPriv::       cf.linux_Phil 
      Mb3Priv::        cf.linux_Mb3 
      PhysikPool::     cf.linux_PhysikPool 

      PC_Pool|PC_Pool_RS|PC_Pool_ADM::        cf.linux_All_PC_Pools 

      Referenz::       cf.linux_Referenz 
      UrzPriv::        cf.linux_UrzPriv 
      SambaServer::    cf.linux_SambaServer 
      CdromBrenner::   cf.linux_CdromBrenner 
      FaxServer::      cf.linux_FaxServer 
      WebTermServer::  cf.linux_WebTermServer 
      CdromServer::    cf.linux_CdromServer 
      SquidServer::    cf.linux_SquidServer 
      FtpServer::      cf.linux_FtpServer 
      PrintSpooler::   cf.linux_PrintSpooler 
      InstallServer::  cf.linux_InstallServer 
      CpuServer::      cf.linux_CpuServer 
      CgiServer::      cf.linux_CgiServer 
      LichtenServer::  cf.linux_LichtenServer 
      CanServer::      cf.linux_CanServer 
      DbServer::       cf.linux_DbServer 

    #  ScannPC::         cf.linux_ScannPC 

      # 
      # Files for special attribut classes 
      # 
      X11Systems::     cf.linux_X11Systems 
      Staroffice::     cf.linux_Staroffice 
      Staroffice40::   cf.linux_Staroffice40 
      RH42::           cf.linux_RH42 
      RH50::           cf.linux_RH50 
      RH51|RH52::      cf.linux_RH51 

    # 
    # control section, macros, actionsequences and general stuff 
    # 

    control: 

    DOM_PHIL:: 
      site           = ( phil ) 
      domain         = ( phil.tu-chemnitz.de ) 

    DOM_URZ:: 
      site           = ( hrz ) 
      domain         = ( hrz.tu-chemnitz.de ) 

    DOM_MB3:: 
      site           = ( mb3 ) 
      domain         = ( mb3.tu-chemnitz.de ) 

    DOM_PHYSIK:: 
      site           = ( physik ) 
      domain         = ( physik.tu-chemnitz.de ) 

    # workaround bis $allclasses unterstuetzt wird 
    # aktuelle cfengine-version: 1.4.11,  datum: 14.7.98, tla 

    RH42:: 
      RELEASE        = ( rh42 ) 

    RH50:: 
      RELEASE        = ( rh50 ) 

    RH51:: 
      RELEASE        = ( rh51 ) 

    RH52:: 
      RELEASE        = ( rh52 ) 

    # ende workaround "allclasses" 

    any:: 
      access         = ( root ) 
      sysadm         = ( wmcroot@hrz.tu-chemnitz.de ) 
      netmask        = ( 255.255.255.0 ) 
      timezone       = ( MET ) 

      #  only for crond calls of cfengine 
      #  SplayTime should be switched off on direct cfengine call with option '-q' or '--no-splay' 
    # wegen offensichtlichen Bugs (keine copy-Aktionen, falls SplayTime!) nicht niutzen, wmc (18.6.98) 
    #  SplayTime = ( 3 ) 

      editfilesize   = ( 15000 ) 

      GLOBAL         = ( /uni/global ) 
      BASEDIR        = ( /afs/tu-chemnitz.de/admin/linux/REDHAT/CFENGINE/ROOTS ) 
      NISDIR         = ( /afs/tu-chemnitz.de/admin/NIS ) 
      PRIVDIR        = ( /afs/tu-chemnitz.de/admin/linux/REDHAT/CFENGINE/PRIVPOLICY ) 
      MOTDDIR        = ( /afs/.tucz/admin/motd ) 

    addclasses = ( force ) 

    Hourly.!Daily:: 
      actionsequence = ( 
                        disable 
                        directories 
                        copy 
                        tidy 
                        files 
                        links 
                        editfiles 
                        shellcommands 
                       ) 
    Daily:: 
      actionsequence = ( 
                        disable 
                        directories 
                        copy 
                        tidy 
                        files 
                        links 
                        editfiles 
                        shellcommands 
                       ) 

    # END cf.linux_Main

     
  • File cf.linux_AllSystems enthält  Aktionen mit allgemeiner Bedeutung

  •  
    • copy-Sektion (Ausschnitt)
     
    copy: 

      # Kopieren aller allgemeingueltigen Files 
      any:: 

        $(BASEDIR)/home4root                dest=/root rec=inf type=checksum 
        $(BASEDIR)/root4Allsystems          dest=/ rec=inf type=checksum 
        $(NISDIR)                           dest=/ rec=inf type=checksum 

        # nur fuer nis-clienten: 
      NIS:: 
        $(BASEDIR)/root4spec_conf/etc/rc.d/init.d/nis dest=/etc/rc.d/init.d/nis type=checksum 
        $(BASEDIR)/root4spec_conf/etc/defaultdomain.urz dest=/etc/defaultdomain type=checksum 
        $(BASEDIR)/root4spec_conf/etc/host.conf.nis dest=/etc/host.conf type=checksum 

      NoNIS:: 
        $(BASEDIR)/root4spec_conf/etc/host.conf.nonis dest=/etc/host.conf type=checksum 

    # nsswitch.conf (begin) ################ 
        $(BASEDIR)/root4spec_conf/etc/nsswitch.conf.nonis dest=/etc/nsswitch.conf type=checksum 

      any.!LichtenServer.!SambaServer.!RH50.!NoNIS:: 
        #  nsswitch.conf fuer "normale" NIS-Clienten 
        # (wmc 25.08.97) 
        $(BASEDIR)/root4spec_conf/etc/nsswitch.conf.nis_clients dest=/etc/nsswitch.conf type=checksum 

    LichtenServer:: 
        $(BASEDIR)/root4LichtenServer           dest=/ rec=inf type=checksum 

        # Server zenon benoetigt nsswitch.conf mit files statt 
        # nis (wmc 06.03.98) 
        $(BASEDIR)/root4spec_conf/etc/nsswitch.conf.LichtenServer dest=/etc/nsswitch.conf type=checksum 

    # nsswitch.conf (end) ################## 

    # inetd.conf (begin) ################### 
      any.!RH50.!RH51.!RH52.!LichtenServer.!WebTermServer.!CanServer.!FtpServer:: 
        #  inetd.conf fuer "normale" Hosts 
        # (wmc 12.01.98) 
        $(BASEDIR)/root4spec_conf/etc/inetd.conf.normal dest=/etc/inetd.conf type=checksum 

      (RH50|RH51|RH52.!megane).!LichtenServer.!WebTermServer.!CanServer.!FtpServer:: 
        $(BASEDIR)/root4spec_conf/etc/inetd.conf.50 dest=/etc/inetd.conf type=checksum 

      RH51.megane:: 
        $(BASEDIR)/root4spec_conf/etc/inetd.conf.megane dest=/etc/inetd.conf type=checksum 

      LichtenServer:: 
        $(BASEDIR)/root4spec_conf/etc/inetd.conf.LichtenServer dest=/etc/inetd.conf type=checksum 

      WebTermServer:: 
        $(BASEDIR)/root4spec_conf/etc/inetd.conf.WebTermServer dest=/etc/inetd.conf type=checksum 

      CanServer:: 
        $(BASEDIR)/root4spec_conf/etc/inetd.conf.CanServer dest=/etc/inetd.conf type=checksum 

      FtpServer:: 
        $(BASEDIR)/root4spec_conf/etc/inetd.conf.FtpServer dest=/etc/inetd.conf type=checksum 

    # inetd.conf (end) ################### 

    ... 

      # Kopieren aller host-spezifischen Files 
      any:: 
        $(BASEDIR)/$(host)               dest=/ rec=inf type=checksum 

      DOM_URZ:: 
        $(BASEDIR)/root4DOM_URZ          dest=/      rec=inf type=checksum 

      DOM_PHIL:: 
        $(BASEDIR)/root4DOM_PHIL         dest=/      rec=inf type=checksum 

      DOM_MB3:: 
        $(BASEDIR)/root4DOM_MB3          dest=/      rec=inf type=checksum 

      DOM_PHYSIK:: 
        $(BASEDIR)/root4DOM_PHYSIK       dest=/      rec=inf type=checksum 

      AFS:: 
        $(BASEDIR)/root4AFS              dest=/      rec=inf type=checksum 

      NoAFS:: 
        $(BASEDIR)/root4NoAFS            dest=/      rec=inf type=checksum 

    ...

     
    • files-Sektion (Ausschnitt)
     
    files: 

      any:: 
        /usr                 m=755 o=root g=root exclude=tmp act=fixdirs inform=off 

        /root/.Xclients      m=700 o=root g=root act=fixplain inform=off 
        /root/.Xdefaults     m=600 o=root g=root act=fixplain inform=off 
    ... 
        /etc/passwd          m=444 o=root g=root act=fixplain inform=off 
    ... 
        /etc/lilo.conf       m=400 o=root g=root act=fixplain inform=off 
    ... 
        /usr/sbin/sendmail   m=6555 o=root g=mail act=fixplain inform=off 
        /usr/sbin/sendmail.cfsaved m=644  o=root g=root act=fixplain inform=off 
    ... 
    Daily:: 

        /usr/src             m=755 o=root g=root rec=inf act=fixall inform=off 
        /var/log             m=644  rec=inf act=fixall inform=off 
        /home/not            o=not g=wheel rec=inf act=fixall inform=off 
    ...

     
    •  
    • directories-Sektion
     
     
    directories: 

      any:: 

        /etc/cron.cfengine    m=755 o=root g=root 
        /uni                  m=755 o=root g=root 
       ... 
        /dos_floppy           m=755 o=root g=root 
        /cdrom                m=755 o=root g=root 
        /home/not             m=755 o=not g=wheel 
    # BigBrother (wmc 31.07.98) 
        /usr/local/bb         m=755 o=root g=root 
        /usr/local/bb/bin     m=755 o=root g=root 
        /usr/local/bb/etc     m=755 o=root g=root 
        /usr/local/bb/tmp     m=755 o=root g=root 

      SambaServer|LichtenServer|CanServer:: 
        /home/netz            m=755 o=netz g=wheel

     
     
    • links-Sektion (Ausschnitt)
     
     
    links: 
    ... 
      AFS:: 
        /uni/global                    ->! /afs/tu-chemnitz.de/global/linux2  
        /uni/dept                      ->! /afs/tu-chemnitz.de/dept/linux2 
        /home/urz/afs                  ->  /afs/tu-chemnitz.de/home/urz 
        /usr/bin/passwd                ->! $(GLOBAL)/bin/passwd 
        /usr/bin/yppasswd              ->! $(GLOBAL)/bin/passwd 
        /usr/bin/chsh                  ->! $(GLOBAL)/bin/chsh 
        /usr/afsws                     ->! /afs/tu-chemnitz.de/product/afs/3.3a/@sys 
        /etc/ssh_known_hosts           ->  /uni/global/text/ssh_known_hosts 
        /etc/rc.d/rc2.d/S33xntpd       ->! ../init.d/xntpd 
        /etc/rc.d/rc3.d/S33xntpd       ->! ../init.d/xntpd 
        /etc/rc.d/rc5.d/S33xntpd       ->! ../init.d/xntpd 
        /etc/rc.d/rc3.d/S35afs         ->  ../init.d/afs 
        /etc/rc.d/rc3.d/S37cfengine    ->  ../init.d/cf.startup 

         AFS.(RH50|RH51|RH52)::
                /uni/global3                   ->! /afs/tu-chemnitz.de/global/i386_linux3
    ... 
      myk|gonzo|moebius|culix|wotan|platon:: 

        /dev/cdrom                     ->!  /dev/hdd 

      bruford|lukas:: 

        /dev/cdrom                     ->!  /dev/hdb 

      diokletian|merowech|azrael|tina|clapton|adonis|fata|stipe|morgana|pegh|megane|artus|lancelot|wilfried|oedipus:: 
     

        /dev/cdrom                     ->!  /dev/hdc 

      devil|brenner|friedrich|argus:: 

        /dev/cdrom                     ->!  /dev/scd0 
    ...

     
     
    • disable-Sektion
     
      any:: 
     

        /usr/local/bin/cf.sh 
        /usr/bin/autopasswd 
        /usr/bin/mkpasswd 
        /usr/bin/tkpasswd 
        /usr/bin/passmass 
        /bin/soffice 

        /etc/rc.d/rc.afs 
        /etc/rc.d/rc3.d/S98afs 
        /etc/rc.d/rc3.d/S36cfengine 

        /etc/cron.daily/autorpm  type=link 
     

     
     
    • tidy-Sektion (Ausschnitt)
     
     
      any:: 

        /var/spool/cron pattern=*.cfsaved age=0 
        /usr/sbin       pattern=*.swp age=0 

        /etc/logrotate.d pattern=*.cfsaved age=0 
        /etc/logrotate.d pattern=*.swp age=0 

        /etc/rc.d/init.d pattern=*.cfsaved age=0 
        /etc/rc.d/init.d pattern=*.swp age=0 
    ... 
      # sendmail, sshd werden ueber inetd.conf gestartet wmc

          1. 9.98 
                /etc/rc.d/rc2.d pattern=S80sendmail age=0 
                /etc/rc.d/rc3.d pattern=S80sendmail age=0 
                /etc/rc.d/rc5.d pattern=S80sendmail age=0 
                /etc/rc.d/rc2.d pattern=S98sshd age=0 
                /etc/rc.d/rc3.d pattern=S98sshd age=0 
                /etc/rc.d/rc5.d pattern=S98sshd age=0 
            ... 
              # Nach Aenderung der Netzwerkkonfiguration: 
              # Script muss geloescht werden, da es sonst ausgefuehrt wird :-( 
              # wmc 5.6.97 
                /etc/sysconfig/network-scripts pattern=ifcfg-eth0.cfsaved age=0 

              # Scripts muessen geloescht werden, da es sonst sonst ausgefuehrt wird :-( 
              # wmc 13.8.97 
                /etc/cron.hourly pattern=*.cfsaved age=0 
                /etc/cron.daily pattern=*.cfsaved age=0 
                /etc/cron.weekly pattern=*.cfsaved age=0 
                /etc/cron.monthly pattern=*.cfsaved age=0 

                /usr/local/bb/etc pattern=*.cfsaved age=0 

                /usr/local/bb/    pattern=*.swp age=0 
                /etc/cron.daily pattern=*.rpmsave age=0 

                /etc/cron.daily pattern=autorpm.cfdisabled age=0 

                /usr/bin pattern=core                     age=0 
            ...

     
     
    • shellcommands-Sektion
     
     
    shellcommands: 

      any.Daily:: 
        "/bin/sh /afs/tucz/admin/linux/REDHAT/CFENGINE/NSCRIPTS/host_info.sh" 
        "/bin/cat /etc/group.local /etc/group.nis >/etc/group" 

        "$(BASEDIR)/../NSCRIPTS/RPM_HANDLE/AllSystems $(RELEASE)"

     
     
    • processes-Sektion
     
     
    processes: 
      any:: 
        "inetd" signal=hup
     
  • File cf.linux_SubNetz realisiert Subnetz-spezifische  Aktionen

  •  
     
    ### 
    # cf.linux_SubNetz 
    # cfengine configuration for RedHat Linux, URZ TU Chemnitz 
    # 04.02.98 wmc 
    ### 

    # BEGIN cf.linux_SubNetz 

    copy: 

      SubNetz72:: 
        $(BASEDIR)/root4sn72                dest=/ rec=inf type=checksum 

      SubNetz132:: 
        $(BASEDIR)/root4sn132               dest=/ rec=inf type=checksum 

      SubNetz200:: 
        $(BASEDIR)/root4sn200               dest=/ rec=inf type=checksum 

      SubNetz168:: 
        $(BASEDIR)/root4sn168               dest=/ rec=inf type=checksum 

      SubNetz176:: 
        $(BASEDIR)/root4sn176               dest=/ rec=inf type=checksum 

      SubNetz216:: 
        $(BASEDIR)/root4sn216               dest=/ rec=inf type=checksum 

      SubNetz32:: 
        $(BASEDIR)/root4sn32                dest=/ rec=inf type=checksum 

      SubNetz64:: 
        $(BASEDIR)/root4sn64                dest=/ rec=inf type=checksum 
     

      SubNetz19317423:: 
        $(BASEDIR)/root4sn19317423          dest=/ rec=inf type=checksum 

      SubNetz124:: 
        $(BASEDIR)/root4sn124               dest=/ rec=inf type=checksum 

      SubNetz16:: 
        $(BASEDIR)/root4sn16                dest=/ rec=inf type=checksum 

    # END cf.linux_SubNetz

     

Spezielle Konfigurationsfiles

  • Files cf.linux_Phil, cf.linux_PhysikPool, cf.linux_All_PC_Pools usw.  enthalten  die zu den entsprechenden Klassen (PhilPriv, PhysikPool, PC_Pool|PC_Pool_RS|PC_Pool_ADM usw.) gehörenden speziellen cfengine-Aktionen, z.B. cf.linux_PhysikPool bzw.cf.linux_CanServer

  •  
     
    ### 
    #  cf.linux_PhysikPool 
    # cfengine configuration for RedHat Linux, URZ TU Chemnitz 
    # 06.02.98 wmc 
    ### 

    # BEGIN  cf.linux_PhysikPool 
    copy: 

      PhysikPool:: 
        $(BASEDIR)/root4PhysikPool/etc/lilo.conf dest=/etc/lilo.conf  o=root g=root m=400 type=checksum define=LILO 
        $(BASEDIR)/root4PhysikPool/boot        dest=/boot  rec=inf type=checksum define=LILO 
        $(BASEDIR)/root4PhysikPool          dest=/ rec=inf type=checksum 

    links: 

      PhysikPool:: 
        /usr/prak  ->!  /afs/tu-chemnitz.de/project/lphcp 
        /usr/prof  ->!  /afs/tu-chemnitz.de/project/fphcp 
        /dev/cdrom ->!  /dev/hdc 

    shellcommands: 

      LILO.PhysikPool:: 
        "/sbin/lilo" 

      PhysikPool.Daily:: 
        "$(BASEDIR)/../NSCRIPTS/RPM_HANDLE/PhysikPool $(RELEASE)" 

    # END  cf.linux_PhysikPool

     
     
    ### 
    # cf.linux_CanServer 
    # cfengine configuration for RedHat Linux, URZ TU Chemnitz 
    # 06.02.98 wmc 
    ### 

    # BEGIN cf.linux_CanServer 

    copy: 

      CanServer:: 
        $(BASEDIR)/root4CanServer           dest=/ rec=inf type=checksum 

    links: 

      CanServer:: 
        /usr/local/hawkeye/database ->!  /devela/database 

    files: 
        /usr/local/hawkeye/htdocs m=0644 include=htm o=hawkeye g=500 rec=inf act=fixplain 
    # 2.11.98 .jpg-Files 
        /usr/local/hawkeye/htdocs m=0644 include=*.jpg o=hawkeye g=500 rec=inf act=fixplain 

    shellcommands: 

      CanServer.Daily:: 
        "$(BASEDIR)/../NSCRIPTS/RPM_HANDLE/CanServer $(RELEASE)" 

    # END cf.linux_CanServer

     
 

Beispiele für Source-Roots

  • root4Allsystems
 
$ cd /afs/tu-chemnitz.de/admin/linux/REDHAT/CFENGINE/ROOTS 
$ ls -lR root4Allsystems 
total 6 
drwxr-xr-x   8 root     root         2048 Dec  2 14:03 etc 
drwxr-xr-x   2 root     root         2048 Feb 18  1998 sbin 
drwxr-xr-x   7 root     root         2048 Dec  2 14:10 usr 

root4Allsystems/etc: 
total 21 
drwxr-xr-x   2 root     root         2048 Oct 29 11:38 cron.cfengine 
drwxr-xr-x   2 root     root         2048 Jul 29 08:01 cron.daily 
drwxr-xr-x   2 root     root         2048 Oct 13 11:19 cron.monthly 
drwxr-xr-x   2 root     root         2048 Oct 13 11:21 cron.weekly 
-r--r--r--   1 root     root          987 Oct 15 13:19 csh.cshrc 
-r--r--r--   1 root     root          622 Oct 15 13:18 csh.login 
-rw-r--r--   1 root     root          628 Nov  2 13:32 logrotate.conf 
drwxr-xr-x   2 root     root         2048 Aug 26 07:55 logrotate.d 
-r--r--r--   1 root     root          589 May 27  1997 mtools.conf 
-r--r--r--   1 root     root            9 May 22  1997 nntpserver 
-r--r--r--   1 root     root         1722 Jun 16 11:45 ntp.conf 
-rw-r--r--   1 root     root          578 Jul 16 09:12 profile 
drwxr-xr-x   3 root     root         2048 Feb 18  1998 rc.d 
-r--r--r--   1 root     root          179 Jan 31  1997 shells 

root4Allsystems/etc/cron.cfengine: 
total 1 
-rwxr-xr-x   1 root     root           94 Jul 29 08:01 cfengine.hourly 

root4Allsystems/etc/cron.daily: 
total 2 
-rwxr-xr-x   1 root     root           93 Jul 29 08:01 cfengine.daily 
-rwxr-xr-x   1 root     root          536 Aug 18  1997 updatedb.cron 

root4Allsystems/etc/cron.monthly: 
total 1 
-rwxr-xr-x   1 root     root           95 Jul 29 08:02 cfengine.monthly 

root4Allsystems/etc/cron.weekly: 
total 1 
-rwxr-xr-x   1 root     root           94 Jul 29 08:02 cfengine.weekly 

root4Allsystems/etc/logrotate.d: 
total 2 
-rw-r--r--   1 root     root           34 Aug 26 07:55 bb 
-rw-r--r--   1 root     root          432 Aug  6 12:02 syslog 

root4Allsystems/etc/rc.d: 
total 2 
drwxr-xr-x   2 root     root         2048 Oct 14 07:36 init.d 

root4Allsystems/etc/rc.d/init.d: 
total 6 
-rwxr-xr-x   1 root     root          656 Oct 14 07:37 bb_init 
-rwxr--r--   1 root     root          969 Sep 10 06:33 cf.startup 
-rwxr--r--   1 root     root          207 Jul 15  1997 linux_logo 
-rwxr-xr-x   1 root     root          447 Sep  8 10:40 rem_job_force 
-rwxr--r--   1 root     root         1168 Mar 10  1998 xntpd 

root4Allsystems/sbin: 
total 53 
-rwxr-xr-x   1 root     root        53464 Aug 28  1997 sysinfo 

root4Allsystems/usr: 
total 10 
drwxr-xr-x   2 root     root         2048 Dec  2 15:07 bin 
drwxr-xr-x   5 root     root         2048 Aug  5  1997 lib 
drwxr-xr-x   5 root     root         2048 Aug  3 16:24 local 
drwxr-xr-x   2 root     root         2048 Sep  8 10:57 sbin 
drwxr-xr-x   3 root     root         2048 Aug 26 12:01 src 

root4Allsystems/usr/bin: 
total 0 

root4Allsystems/usr/lib: 
total 6 
drwxr-xr-x   3 root     root         2048 Jul  2  1997 kbd 
drwxr-xr-x   2 root     root         2048 May 23  1997 nn 
drwxr-xr-x   3 root     root         2048 Aug  5  1997 texmf 

root4Allsystems/usr/lib/kbd: 
total 2 
drwxr-xr-x   2 root     root         2048 Jul  2  1997 keytables 

root4Allsystems/usr/lib/kbd/keytables: 
total 20 
-r--r--r--   1 root     root        10007 Jul  2  1997 de-latin1-nodeadkeys.map 
-r--r--r--   1 root     root        10078 Jul  2  1997 us.map 

root4Allsystems/usr/lib/nn: 
total 2 
-r--r--r--   1 root     root           42 May 23  1997 init 
-r--r--r--   1 root     root            9 May 23  1997 nntp_server 

root4Allsystems/usr/lib/texmf: 
total 2 
drwxr-xr-x   3 root     root         2048 Aug  5  1997 texmf 

root4Allsystems/usr/lib/texmf/texmf: 
total 2 
drwxr-xr-x   3 root     root         2048 Aug  5  1997 dvips 

root4Allsystems/usr/lib/texmf/texmf/dvips: 
total 2 
drwxr-xr-x   2 root     root         2048 Aug  5  1997 config 

root4Allsystems/usr/lib/texmf/texmf/dvips/config: 
total 1 
-rw-r--r--   1 root     root          865 Aug  4  1997 config.ps 

root4Allsystems/usr/local: 
total 6 
drwxr-xr-x   4 root     root         2048 Aug 25 09:10 bb 
drwxr-xr-x   2 root     root         2048 Dec  2 15:17 bin 
drwxr-xr-x   2 root     root         2048 Mar 12  1998 etc 

root4Allsystems/usr/local/bb: 
total 7 
drwxr-xr-x   2 root     root         2048 Aug  3 17:08 bin 
drwxr-xr-x   2 root     root         2048 Nov 19 16:28 etc 
-rwxr-xr-x   1 root     root         2065 Aug  3 13:56 runbb.sh 

root4Allsystems/usr/local/bb/bin: 
total 41 
-rwxr-xr-x   1 root     root         5231 Jul 30 16:04 bb 
-rwxr-xr-x   1 root     root         8112 Jun 25 05:00 bb-network.sh 
-rwxr-xr-x   1 root     root         3279 Jun 17 21:41 bb-page.sh 
-rwxr-xr-x   1 root     root         7783 Jul 30 16:04 bbd 
-rwxr-xr-x   1 root     root         6920 Jul 30 16:04 bbnet 
-rwxr-xr-x   1 root     root         2315 May 26  1998 sendmsg 
-rwxr-xr-x   1 root     root         4727 Jul 30 16:04 touchtime 
root4Allsystems/usr/local/bb/etc: 
total 27 
-rw-r--r--   1 root     root         4971 Oct 22 06:23 bb-hosts 
-rw-r--r--   1 root     root          734 Sep  1 08:52 bb-hosts.computeservers 
-rw-r--r--   1 root     root          898 Aug 24 14:41 bb-hosts.fileservers 
-rw-r--r--   1 root     root          666 Sep 25 06:32 bb-hosts.infoterminals 
-rw-r--r--   1 root     root         1519 Sep 10 11:02 bb-hosts.networkservers 
-rw-r--r--   1 root     root         1443 Oct 22 06:24 bb-hosts.otherservers 
-rw-r--r--   1 root     root         1544 Aug 20 07:46 bb-hosts.pcpoolreistra 
-rw-r--r--   1 root     root          927 Aug 20 07:45 bb-hosts.pcpoolstrana 
-rw-r--r--   1 root     root         2310 Nov 19 16:27 bb-hosts.workstations 
-rw-r--r--   1 root     root         1223 Aug 20 07:52 bb-hosts.wspoolreistra 
-rw-r--r--   1 root     root         2061 Apr 30  1998 bbinc.sh 
-rw-r--r--   1 root     root          453 Jul 30 16:04 bbsys.local 
-rw-r--r--   1 root     root          453 Mar 17  1998 bbsys.redhat 
-rw-r--r--   1 root     root         1236 May  2  1998 bbsys.sh 

root4Allsystems/usr/local/bin: 
total 514 
-rwxr-xr-x   1 root     root       182860 Feb  3  1998 cfd 
-rwxr-xr-x   1 root     root         4192 Oct  1 10:12 cfdoc 
-rwxr-xr-x   1 root     root       266772 Apr 28  1998 cfengine 
-rwxr-xr-x   1 root     root        21160 Feb  3  1998 cfrun 
-rwxr-xr-x   1 root     root         5340 Jul 14  1997 linux_logo 
-rwxr-xr-x   1 root     root         1943 Nov 20  1996 makedb.ksh 
-rwsr-xr-x   1 root     root        36132 May  9  1997 priv 
-rwxr-xr-x   1 root     root          827 Sep 18 09:50 prtpipe 
-rwxr-xr-x   1 root     root         1027 Sep 18 09:46 rzplan 
-rwxr-xr-x   1 root     root          781 Feb 20  1998 sys_update 

root4Allsystems/usr/local/etc: 
total 0 

root4Allsystems/usr/sbin: 
total 290 
-rwxr-x---   1 root     root         1582 Sep 29  1997 afs_cron 
-rwxr-xr-x   1 root     root         1942 Sep 23  1997 afs_cron_gen 
-rwxr-xr-x   1 root     root         2854 Aug 25 11:34 mailverify 
-rwxr-xr-x   1 root     root       258292 Jan 24  1997 sendmail 
-rwxr-xr-x   1 root     root        24426 May 29  1997 tcpd 
-rwxr-xr-x   1 root     root         5410 Nov 26  1996 tcpd-rshd-echo 

root4Allsystems/usr/src: 
total 2 
drwxr-xr-x   3 root     root         2048 Aug 26 12:01 linux-2.0.32 

root4Allsystems/usr/src/linux-2.0.32: 
total 2 
drwxr-xr-x   3 root     root         2048 Aug 26 12:01 drivers 

root4Allsystems/usr/src/linux-2.0.32/drivers: 
total 2 
drwxr-xr-x   2 root     root         2048 Aug 31 12:52 net 

root4Allsystems/usr/src/linux-2.0.32/drivers/net: 
total 308 
-rwxr-xr-x   1 root     root       172208 Aug 26 10:36 de4x5.c 
-rwxr-xr-x   1 root     root        49285 Aug 26 10:36 de4x5.h 
-rwxr-xr-x   1 root     root        91883 Jun 18 14:58 tulip.c 
 

 
  • root4DOM_PHYSIK
 
$ ls -lR root4DOM_PHYSIK 
total 2 
drwxr-xr-x   3 wmc      root         2048 Nov 20 13:26 etc 

root4DOM_PHYSIK/etc: 
total 13 
-r-xr--r--   1 wmc      root         1051 Nov 20 13:18 amd.conf 
-rw-r--r--   1 wmc      root          174 Nov 20 13:21 amd.physik 
-r--r--r--   1 wmc      root          290 Sep 29  1997 group.local 
drwxr-xr-x   3 wmc      root         2048 Nov 20 13:26 rc.d 
-r--r--r--   1 root     root         6230 Oct  9 14:00 sendmail.cf 

root4DOM_PHYSIK/etc/rc.d: 
total 2 
drwxr-xr-x   2 wmc      root         2048 Nov 20 13:34 init.d 

root4DOM_PHYSIK/etc/rc.d/init.d: 
total 1 
-rwxr--r--   1 root     root          477 May 27  1997 amd.init

 
  • root4sn16
 
$ ls -lR root4sn16 
total 2 
drwxr-xr-x   2 tla      root         2048 Nov 26 15:52 etc 

root4sn16/etc: 
total 1 
-r--r--r--   1 root     root          187 Nov 26 15:52 resolv.conf

 
  • root4PhysikPool (Ausschnitt)
 
$ ls -lR root4PhysikPool/ 
total 8 
drwxr-xr-x   2 root     root         2048 Dec  2 16:14 boot 
drwxr-xr-x   5 root     root         2048 Dec  3 09:53 etc 
drwxr-xr-x   3 root     root         2048 Dec  2 16:22 lib 
drwxr-xr-x   3 root     root         2048 Nov 20 15:27 usr 

root4PhysikPool/boot: 
total 457 
-rw-r--r--   1 root     root       467956 Dec  2 16:06 vmlinuz-2.0.35-2.smp 

root4PhysikPool/etc: 
total 18 
drwxr-xr-x   2 root     root         2048 Nov 24 15:36 X11 
-rw-------   1 root     root           69 Nov 24 17:33 conf.modules 
drwxr-xr-x   2 root     root         2048 Nov 26 06:44 cron.daily 
drwxr-xr-x   2 root     root         2048 Nov 24 14:18 cron.hourly 
-rw-r--r--   1 root     root          626 Nov 24 15:05 crontab 
-r--r--r--   1 root     root         2261 Nov 24 16:32 fbtab 
-r--r--r--   1 root     root          917 Nov 24 16:51 fstab.save 
-r--r--r--   1 root     root         1067 Nov 24 14:12 hosts.allow 
-r--------   1 root     root          367 Dec  3 09:53 lilo.conf 
-r--r--r--   1 root     root         1139 Dec  1 11:20 login.access 
-r--r--r--   1 root     root          788 Dec  2 11:22 passwd.local 

root4PhysikPool/etc/X11: 
total 12 
-rw-r--r--   1 root     root        12097 Nov 24 14:24 XF86Config 

root4PhysikPool/etc/cron.daily: 
total 1 
-rwxr-xr-x   1 root     root           99 Apr 14  1998 autorpm 

root4PhysikPool/etc/cron.hourly: 
total 1 
-rw-r--r--   1 root     root           95 Nov 24 14:18 pwdmerge.hourly 

root4PhysikPool/lib: 
total 2 
drwxr-xr-x   3 root     root         2048 Dec  2 16:22 modules 

root4PhysikPool/lib/modules: 
total 2 
drwxr-xr-x   9 root     root         2048 Dec  2 16:04 2.0.35-2 

root4PhysikPool/lib/modules/2.0.35-2: 
total 25 
drwxr-xr-x   2 root     root         2048 Dec  2 16:04 block 
drwxr-xr-x   2 root     root         2048 Dec  2 16:04 cdrom 
drwxr-xr-x   2 root     root         2048 Dec  2 16:04 fs 
drwxr-xr-x   2 root     root         2048 Dec  2 16:04 ipv4 
drwxr-xr-x   2 root     root         4096 Dec  2 16:04 misc 
-rw-r--r--   1 root     root         8985 Dec  2 16:23 modules.dep 
drwxr-xr-x   2 root     root         2048 Dec  2 16:04 net 
drwxr-xr-x   2 root     root         2048 Dec  2 16:04 scsi 

root4PhysikPool/lib/modules/2.0.35-2/block: 
total 45 
-rw-r--r--   1 root     root         2388 Dec  2 15:58 linear.o 
-rw-r--r--   1 root     root         7272 Dec  2 15:58 loop.o 
... 

root4PhysikPool/usr: 
total 2 
drwxr-xr-x   3 root     root         2048 Nov 25 13:23 local 

root4PhysikPool/usr/local: 
total 2 
drwxr-xr-x   4 root     root         2048 Nov 20 15:27 bb 

root4PhysikPool/usr/local/bb: 
total 4 
drwxr-xr-x   2 root     root         2048 Dec  2 13:58 bin 
drwxr-xr-x   2 root     root         2048 Dec  2 13:57 etc 

root4PhysikPool/usr/local/bb/bin: 
total 6 
-rwxr-xr-x   1 root     root         5349 Jul 20 19:29 bb-local.sh 

root4PhysikPool/usr/local/bb/etc: 
total 3 
-rw-r--r--   1 root     root         2463 Dec  2 13:58 bbdef.sh 
 

 
  • micky
 
$ ls -lR micky 
total 2 
drwxr-xr-x   3 root     root         2048 Dec  3 07:19 etc 

micky/etc: 
total 5 
-r--r--r--   1 root     root           90 Nov 17 18:12 hosts 
-rw-r--r--   1 root     root          552 Nov 19 16:41 ssh_host_key.des 
-r--r--r--   1 root     root          351 Nov 19 16:41 ssh_host_key.pub 
drwxr-xr-x   3 root     root         2048 Dec  3 07:27 sysconfig 

micky/etc/sysconfig: 
total 5 
-r--r--r--   1 root     root           41 Nov 17 18:24 keyboard 
-r--r--r--   1 root     root           26 Nov 17 18:24 mouse 
-r--r--r--   1 root     root          161 Nov 17 18:13 network 
drwxr-xr-x   2 root     root         2048 Dec  3 07:27 network-scripts 

micky/etc/sysconfig/network-scripts: 
total 1 
-r-xr--r--   1 root     root          388 Nov 17 18:12 ifcfg-eth0

 


28. November 1997 , überarbeitet: 03.Dezember 1998
Matthias Clauß, TU Chemnitz, URZ