Changeset 38 for trunk


Ignore:
Timestamp:
May 22, 2006, 8:22:32 PM (18 years ago)
Author:
rainer
Message:

Added option to specify a group in deploy.sh install

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/deploy.sh.in

    r27 r38  
    245245export host
    246246
     247# hostgroup; empty default
     248#
     249hostgroup=
     250export hostgroup
     251
    247252
    248253# action; no default
     
    432437    echo
    433438    echo " --host=<FQDN>          The host where you want to install."
     439    echo " --group=<group>        Optional group the host belongs to."
    434440    echo " --arch=<arch>          The architecture/operating system of this host."
    435441    echo "        This is used to get the correct binary package."
     
    556562    ;;
    557563
     564  --group | -group)
     565    opt_prev=hostgroup
     566    ;;
     567
     568  --group=* | -group=*)
     569    hostgroup="$optarg"; export hostgroup
     570    ;;
     571
    558572  # Build
    559573
  • trunk/docs/Changelog

    r36 r38  
     1        * deploy.sh: allow to set a group for hosts upon installation
    12        * patch by Yoann: fix an issue when setting the idmef_inode_t object
    23        * fix memory leaks in error paths in sh_prelude.c
  • trunk/dsys/funcINSTALL

    r27 r38  
    6262    echo "  <client>"
    6363    echo "    <client_host>${host}</client_host>"
     64    echo "    <client_group>${hostgroup}</client_group>"
    6465    echo "    <client_os_machine>${arch}</client_os_machine>"
    6566    echo "    <client_install_status>${install_entry}</client_install_status>"
     
    172173                if test "x$?" = "x1"
    173174                then
     175                    #
     176                    # Write the full entry when client_os_machine is found
     177                    #
    174178                    case "$line" in
    175179                    *\<client_os_machine\>*\</client_os_machine\>)
     180                    echo "    <client_group>${hostgroup}</client_group>"           >>"${tmpF}"
    176181                    echo "    <client_os_machine>${arch}</client_os_machine>"           >>"${tmpF}"
    177182                    echo "    <client_install_status>${install_entry}</client_install_status>"    >>"${tmpF}"
     
    182187                    ;;
    183188
     189                    *\<client_group\>*\</client_group\>)
     190                    :
     191                    ;;
     192                       
    184193                    *\<client_install_status\>*\</client_install_status\>)
    185                     # echo "    <client_install_status>${install_entry}</client_install_status>"    >>"${tmpF}"
    186194                    :
    187195                    ;;
    188196
    189197                    *\<client_install_date\>*\</client_install_date\>)
    190                     # echo "    <client_install_date>${IDATE}</client_install_date>"         >>"${tmpF}"
    191198                    :
    192199                    ;;
    193200
    194201                    *\<client_install_name\>*\</client_install_name\>)
    195                     # echo "    <client_install_name>${SH_NAME}</client_install_name>"       >>"${tmpF}"
    196202                    :
    197203                    ;;
    198204
    199205                    *\<client_install_prefix\>*\</client_install_prefix\>)
    200                     # echo "    <client_install_prefix>${SH_PREFIX}</client_install_prefix>" >>"${tmpF}"
    201206                    :
    202207                    ;;
    203208
    204209                    *\<client_install_version\>*\</client_install_version\>)
    205                     # echo "    <client_install_version>${src_version}.${realformat}</client_install_version>" >>"${tmpF}"
    206210                    :
    207211                    ;;
     
    247251     printINFO "Write ${DATABASE} from scratch"
    248252     echo '<?xml version="1.0" encoding="ISO-8859-1"?>' >"${tmpF}"
    249      echo '<!DOCTYPE yule_db SYSTEM "http://la-samhna.de/yule_db-0.1.dtd">' \
     253     echo '<!DOCTYPE yule_db SYSTEM "http://la-samhna.de/yule_db-0.2.dtd">' \
    250254          >>"${tmpF}"
    251255     echo "<yule_db>"   >>"${tmpF}"
  • trunk/scripts/README

    r29 r38  
    11
    22
    3 This directory contains miscellaneous useful scripts, mostly contributed
     3This directory contains miscellaneous useful scripts, some of them contributed
    44by various users. Additions and/or improvements are welcome.
    55
     
    102102
    103103
    104 samhain-scripts/   Administrative scripts by
    105 ----------------   Simon Bailey <simon.bailey@uibk.ac.at> and
    106                    Michael Redinger <michael.redinger@uibk.ac.at>
    107 
    108                    You may need to adjust some of the variables in the
    109                    top lines of these scripts.
    110                
    111    samhain.table.rotate.pl: Move old entries from mysql log table to a
    112                             backup table
    113 
    114    samhain-admin: Interactive script to (1) clear log entries in SQL database,
    115                   (2) re-initialize file database of remote client, or (3) add
    116                   a new host.
    117                   This script requires that you are using samhains deploy
    118                   system (i.e. the deploy.sh script et al.).
    119                   Re-initialize will stop the daemon on the remote host,
    120                   create a temp dir for the database, run samhain -t init,
    121                   copy the database to the server, and clear the mysql log for
    122                   this host.
    123                  
    124    samhain.clearhost: Helper script for samhain-admin.
    125104                   
Note: See TracChangeset for help on using the changeset viewer.