Changeset 1094

Show
Ignore:
Timestamp:
06/15/11 14:56:32 (11 months ago)
Author:
metrot
Message:

Integration de la branches/1.x dans le trunk

Location:
trunk
Files:
103 removed
80 modified
116 copied

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/CHANGE

    r1018 r1094  
    3737                + placomgr: [user,group,mode] can now be specified for the 
    3838                            destination of a 'put' directive (see placomgr --man) 
    39                             + option to add a second disk for VM data user 
    40                             + Add iptables rules for VM 
    41                             + Change name : lib/repository to lib/template 
    42                             + New top level command : save_and_update 
    43                     + Create a user admin in ldap base (use for admin in horde and sympa) 
     39                            + option to add a second disk for VM data user 
     40                            + Add iptables rules for VM 
     41                            + Change name : lib/repository to lib/template 
     42                            + New top level command : save_and_update 
     43                    + Create a user admin in ldap base (use for admin in horde and sympa) 
    4444 
    4545release-0.8     2009-12-27 
    4646 
    4747                + vh reorganisation for better understanding 
    48                 + postfix for all vm 
    49                 + create a vm for mysql server 
    50                 + enable munin monitoring of apache and xen 
    51                 + add postfix on all vm for redirect root mail 
    52                 + route administrative mail (root@placohost) to the right platform administrator with a smart sender address (<user>-<vm>.<platfrom>@<hostname.fqdn>) 
    53                 + disable ipv6 module for vm 
    54                 + iptables on host system 
    55                 + possibility install placo with only one network interface 
    56                 + Now install vm and vm configuration use the same mirror that the host system 
    57                 + placocheck : Program to check placo platform configuration 
     48                + postfix for all vm 
     49                + create a vm for mysql server 
     50                + enable munin monitoring of apache and xen 
     51                + add postfix on all vm for redirect root mail 
     52                + route administrative mail (root@placohost) to the right platform administrator with a smart sender address (<user>-<vm>.<platfrom>@<hostname.fqdn>) 
     53                + disable ipv6 module for vm 
     54                + iptables on host system 
     55                + possibility install placo with only one network interface 
     56                + Now install vm and vm configuration use the same mirror that the host system 
     57                + placocheck : Program to check placo platform configuration 
    5858 
    5959release-0.9     2010-03-17 
    6060 
    61                 + Manage svn repository rights with ldap group (read only and read & write) 
     61                + Manage svn repository rights with ldap group (read only and read & write) 
    6262 
    6363release-0.10    2010-06-03 
    6464 
    65                 + install_debian.sh: new option -q (quiet) 
    66                 + placocheck checks now if the network public interface is up 
    67                 + new help for placosh and placocheck 
    68                 + install_debian.sh now installs only the mandatory *.defines files (global,proxy,bdd, ldap) 
    69                 + all vm log are saved on the host in /var/log/placo/year/month/day/hostname.log 
    70                 + placomgr now checks return code of each sub run, and aborts at the first non null 
    71                 + each script in toplevel and middleware now sources an error library which manage the display of execution 
    72                 + a new service of monitoring for the whole platform (hobbit) 
    73                 + rights for svn repositories access are now managed via LDAP groups 
     65                + install_debian.sh: new option -q (quiet) 
     66                + placocheck checks now if the network public interface is up 
     67                + new help for placosh and placocheck 
     68                + install_debian.sh now installs only the mandatory *.defines files (global,proxy,bdd, ldap) 
     69                + all vm log are saved on the host in /var/log/placo/year/month/day/hostname.log 
     70                + placomgr now checks return code of each sub run, and aborts at the first non null 
     71                + each script in toplevel and middleware now sources an error library which manage the display of execution 
     72                + a new service of monitoring for the whole platform (hobbit) 
     73                + rights for svn repositories access are now managed via LDAP groups 
    7474 
    7575release-0.11    2010-06-13 
    76                 + review of the whole documentation and README 
    77                 + install_debian: stdout sent into a logfile is now the default  
    78                      option -q (quiet) is replaced by -t (trace),  
    79                      which send stdout into screen 
    80                 + placomgr: new option broadcast 
    81                             check of undefined variables in defines files 
    82                             trace rexec, lexec and put operations 
     76                + review of the whole documentation and README 
     77                + install_debian: stdout sent into a logfile is now the default 
     78                     option -q (quiet) is replaced by -t (trace), 
     79                     which send stdout into screen 
     80                + placomgr: new option broadcast 
     81                            check of undefined variables in defines files 
     82                            trace rexec, lexec and put operations 
    8383 
    8484trunk           in progress 
    85                 + begin of centos+kvm port 
    86                 + new option --expand in placomgr 
    87                 + placocheck more precise : can use tcp/udp in place of icmp     
     85                + begin of centos+kvm port 
     86                + placomgr try to prefix the name of a template with the value of the variable defined by 'prefix' 
     87                + new option --expand in placomgr 
     88                + placocheck more precise : can use tcp/udp in place of icmp 
     89 
     90branches/1.x    in progress 
     91                + support of kvm/centos is now in progress 
     92                    . install will replace install_debian 
     93                    . install generates a install.defines file which contain th os and hypervisor detected at installation 
     94                + placomgr defines a new variable BROADCAST 
     95                + placomgr search a 'defines' file on each directory along the template path 
     96                + declaration for put, rexec and lexec operations are suppressed 
     97                + new args for placomgr : 
     98                  . --delimiters to specify begin/end of Perl code in templates 
     99                + new syntax for the operation : 
     100                  . --put "template destination [u:user] [g:group] [m:mode]" 
     101                  . --rexec "template [args]" 
     102                  . --lexec "template [args]" 
     103                + --debug needs now a tag 
     104                + --expand replaced by --debug expand 
     105                + suffix of exec templates are now .ex 
     106                + the delimiters for code Perl in templates are now '{!' and '!}' by default 
  • trunk/etc/default-dist/bdd.defines

    r837 r1094  
    55 
    66<machine bdd> 
    7   os lenny 
    8   include deb.defines 
     7  os $host_os 
    98  memory 256 
    109  # Create a data disk with 5 Go for svn repository 
    1110  size_data 10 
    1211  path_data /var/lib/svn 
    13  
    14   # installation 
    15   include init_vm.defines 
    16  
    17   # destruction 
    18     # CAUTION: uncomment the following line only if you want to be able to 
    19     # delete this vm with delete_vm.sh 
    20   #lexec delete_vm.sh # uncomment only if you want to be able to delete this vm with delete_vm.sh 
    2112 
    2213  # network 
     
    2718  #cron_save_vm 0 1 5 * * 
    2819 
    29   # Mysql 
    30   rexec install_mysql.sh 
    31   lexec save_mysql.sh 
    32   rexec restart_mysql.sh 
    3320</machine> 
  • trunk/etc/default-dist/global.defines

    r1016 r1094  
    77spool_dir /tmp 
    88thirdparty_url http://placodev.mathrice.fr/third-party 
    9 debian_mirror http://ftp.fr.debian.org/debian 
     9debian_mirror http://ftp.fr.debian.org/debian/ 
     10centos_mirror http://ftp.ciril.fr/pub/linux/centos/5.6/os/i386/ 
    1011vmbase_name base 
    1112vmbase_ip 192.168.122.253 
     
    2728 
    2829# list of variable names used to prefix templates 
    29 prefix hypervisor os 
    30 hypervisor kvm 
     30prefix hypervisor 
    3131 
    3232# 
  • trunk/etc/default-dist/ldap.defines

    r705 r1094  
    1010 
    1111<machine ldap> 
    12   os lenny 
    13   include deb.defines 
     12  os $host_os 
    1413   
    15   # installation 
    16   include init_vm.defines 
    17  
    18   # destruction 
    19     # CAUTION: uncomment the following line only if you want to be able to 
    20     # delete this vm with delete_vm.sh 
    21   #lexec delete_vm.sh 
    22  
    2314  # network 
    2415  hostname ldap 
    2516  nb_interface 1 
    2617 
    27   #  rexec install_apache.sh 
    28   put config_initialtree_slapd /root/config_initialtree_slapd 
    29   #put horde.schema /root/horde.schema 
    30   rexec install_slapd.sh 
    31  
    3218  # Save 
    3319  #cron_save_vm 0 1 2 * * 
    34   lexec save_ldap.sh 
     20 
    3521</machine> 
  • trunk/etc/default-dist/lists.defines

    r900 r1094  
    1010 
    1111<machine lists> 
    12   os lenny 
     12  os $host_os 
    1313  memory 256 
    14   include deb.defines 
    15  
    16   # installation 
    17   include init_vm.defines 
    18  
    19   # destruction 
    20     # CAUTION: uncomment the following line only if you want to be able to 
    21     # delete this vm with delete_vm.sh 
    22   #lexec delete_vm.sh # uncomment only if you want to be able to delete this vm with delete_vm.sh 
    2314 
    2415  # network 
    2516  hostname lists 
    2617  nb_interface 1 
    27  
    28   # Postfix 
    29   put config_postfix_list /etc/postfix/main.cf 
    30  
    31   # Apache 
    32   rexec restart_apache.sh 
    33   rexec install_apache_list.sh 
    34   rexec restart_apache.sh  
    35    
    36   # Sympa  
    37   put config_debconf_sympa /root/config_debconf_sympa 
    38   rexec install_debconf_sympa.sh 
    39   rexec install_sympa.sh 
    40   put auth_ldap_sympa /etc/sympa/auth.conf 
    41   put conf_sympa /etc/sympa/sympa.conf 
    42   rexec post_install_sympa.sh 
    43   rexec restart_sympa.sh 
    44   put conf_topics /etc/sympa/topics.conf 
    4518 
    4619  # Save 
  • trunk/etc/default-dist/proxy.defines

    r1014 r1094  
    55 
    66<machine proxy> 
    7   os lenny 
    8   include deb.defines 
     7  os $host_os 
    98 
    109  ip_forward 1 
    11  
    12   # installation 
    13   include init_proxy.defines 
    14  
    15   # destruction 
    16     # CAUTION: uncomment the following line only if you want to be able to 
    17     # delete this vm with delete_vm.sh 
    18   #lexec delete_vm.sh # uncomment only if you want to be able to delete this vm with delete_vm.sh 
    1910 
    2011  # network 
    2112  hostname proxy 
    2213  nb_interface 2 
    23   # iptables 
    24  
    25   # reverse proxy apache 
    26   rexec install_apache_proxy.sh 
    27   rexec active_apache_proxy.sh 
    28   rexec restart_apache.sh 
    29   rexec mkdir_vh_logdir.sh 
    30   put apache_status.conf $apache_server_root/mods-available/status.conf 
    31   put ports_reverse_proxy $apache_server_root/ports.conf 
    32   put vh4reverse_proxy $apache_server_root/conf.d/vh.conf 
    33   put vh_spip4reverse_proxy $apache_server_root/conf.d/spip.conf 
    34   put vh_svn4reverse_proxy $apache_server_root/conf.d/svn.conf 
    35   put vh_sympa4reverse_proxy $apache_server_root/conf.d/sympa.conf 
    36   put vh_horde4reverse_proxy $apache_server_root/conf.d/horde.conf 
    37   put vh_static4reverse_proxy $apache_server_root/conf.d/static.conf 
    38   put runcronjobs.conf /etc 
    39    
     14  
    4015  # Save 
    4116  #cron_save_vm 0 1 1 * * 
  • trunk/etc/default-dist/svn.defines

    r900 r1094  
    77 
    88<machine svn> 
    9   os lenny 
    10   include deb.defines 
     9  os $host_os 
    1110 
    1211  # Create a data disk with 5 Go for svn repository 
    1312  size_data 5 
    1413  path_data /var/lib/svn 
    15  
    16   # installation 
    17   include init_vm.defines 
    18  
    19   # destruction 
    20     # CAUTION: uncomment the following line only if you want to be able to 
    21     # delete this vm with delete_vm.sh 
    22   #lexec delete_vm.sh # uncomment only if you want to be able to delete this vm with delete_vm.sh 
    2314 
    2415  # network 
     
    3021  repositories repo1,repo2,repo3 
    3122   
    32   # install svn 
    33   rexec install_svn.sh 
    34   put apache_status.conf $apache_server_root/mods-available/status.conf 
    35   put vh4svn_server $apache_server_root/conf.d/svn.conf 
    36   rexec restart_apache.sh 
    37   rexec config_svn_repositories.sh 
    38   rexec mk_ldap_group_4_svn.sh 
    39  
    4023  # Save 
    4124  #cron_save_vm 0 1 5 * * 
  • trunk/etc/default-dist/web.defines

    r918 r1094  
    77 
    88<machine web> 
    9   os lenny 
     9  os $host_os 
    1010  memory 256 
    1111  size_data 5 
    1212  path_data /htdocs 
    13   include deb.defines 
    1413 
    15   # installation 
    16   include init_vm.defines 
    17  
    18   # destruction 
    19     # CAUTION: uncomment the following line only if you want to be able to 
    20     # delete this vm with delete_vm.sh 
    21   #lexec delete_vm.sh # uncomment only if you want to be able to delete this vm with delete_vm.sh 
    2214  # network 
    2315  hostname web 
     
    2618  # http 
    2719  htdocs /htdocs 
    28   rexec install_apache_web_hosting.sh 
    29   rexec config_mysql_4_vh.sh 
    30   rexec install_php5.sh 
    31   rexec restart_apache.sh 
    32   rexec mkdir_vh_docroot.sh 
    33   rexec mk_ldap_group_4_vh.sh 
    34   put apache_status.conf $apache_server_root/mods-available/status.conf 
    35   put vh4http_server $apache_server_root/conf.d/vh.conf 
    3620   
    37    # spip 
    38   rexec install_unzip.sh 
    39   rexec install_spip.sh  
    40   rexec install_spip_cnrs_kit.sh 
    41   rexec config_spip_web.pl['{{','}}'] 
    42   # horde 
    43   put horde_hook['{{','}}'] /tmp/horde_hook 
    44   rexec install_horde.sh  
    45   
    4621  # save 
    4722  savedir /htdocs /etc/apache2 
  • trunk/etc/default-dist/webconf.defines

    r880 r1094  
    55 
    66<machine webconf> 
    7   os lenny 
    8   include deb.defines 
     7  os $host_os 
    98 
    109  # No data disk 
    1110  #size_data 2 
    1211  #path_data /data 
    13  
    14   # installation 
    15   include init_vm.defines 
    16  
    17   # destruction 
    18     # CAUTION: uncomment the following line only if you want to be able to 
    19     # delete this vm with delete_vm.sh 
    20   #lexec delete_vm.sh # uncomment only if you want to be able to delete this vm with delete_vm.sh 
    2112 
    2213  # openmeetings 
  • trunk/etc/default.defines-dist

    r1038 r1094  
    221221## 
    222222 
     223include install.defines 
    223224include localhost.defines 
    224225include default/*.defines 
  • trunk/etc/localhost.defines-dist

    r1000 r1094  
    55 
    66<machine localhost> 
    7   os lenny 
    8   include deb.defines 
    9  
     7  os $host_os 
     8   
    109  #virtualisation 
    11   virt_soft xen 
     10  virt_soft $hypervisor 
    1211 
    1312  # network 
     
    2120  lexec create_vmbase.sh 
    2221  nb_interface 2 
    23   put iptables $iptables_script 
     22  #put iptables $iptables_script 
    2423  rexec config_iptables.sh 
    2524 
     
    2726  lexec install_postfix.sh 
    2827  lexec maps_postfix_host.sh 
    29   put main_postfix_host /etc/postfix/main.cf 
     28  #put main_postfix_host /etc/postfix/main.cf 
    3029  lexec restart_postfix.sh 
    3130   
     
    3332  rexec install_ntpd.sh 
    3433  rexec restart_ntpd.sh 
    35   put ntp_conf /etc/ntp.conf 
     34  #put ntp_conf /etc/ntp.conf 
    3635  #list of ntp server 
    3736  ntp_server ntp.obspm.fr ntp.univ-angers.fr 
     
    3938  # monitoring 
    4039  lexec install_apache_monitoring.sh 
    41   put ports_monitoring $apache_conf_dir/ports.conf 
    42   put vh4monitoring $apache_autoconf_dir/hobbit 
    43   put apache_status.conf $apache_modconf_dir/status.conf 
     40  #put ports_monitoring $apache_conf_dir/ports.conf 
     41  #put vh4monitoring $apache_autoconf_dir/hobbit 
     42  #put apache_status.conf $apache_modconf_dir/status.conf 
    4443  lexec restart_apache.sh 
    4544  lexec install_munin_monitoring.sh 
     
    4847  lexec install_hobbit_client.sh 
    4948  lexec install_hobbit_server.sh 
    50   put hobbit_bb-hosts $hobbit_conf_file 
     49  #put hobbit_bb-hosts $hobbit_conf_file 
    5150 
    5251  # log 
    53   put config_log_host $rsyslog_conf_file 
     52  #put config_log_host $rsyslog_conf_file 
    5453  rexec restart_log.sh 
    5554   
  • trunk/install.sh

    r1001 r1094  
    9898{ 
    9999  true 
     100} 
     101 
     102function end_xen 
     103{ 
     104  echo "########### REBOOT YOUR SYSTEM TO FINISH INSTALLATION ############" 
     105} 
     106 
     107function end_kvm 
     108{ 
     109  /etc/init.d/libvirtd start 
    100110} 
    101111 
     
    171181then 
    172182  # mode devel 
    173   lastest="trunk" 
    174   depot=${repo}/trunk/ 
     183  #lastest="trunk" 
     184  #depot=${repo}/trunk/ 
     185  lastest="branches/1.x" 
     186  depot=${repo}/branches/1.x/ 
    175187  srcdir=${opt_d%%/} 
    176188  libdir=$srcdir/lib 
     
    187199fi 
    188200[ "$opt_r" == "" ] || depot=$opt_r 
    189 echo -ne "\nPress a key to start installation, or ^C otherwise..." 
     201echo -ne "\nPress ENTER to start installation, or ^C otherwise..." 
    190202read 
    191203echo 
     
    197209# prerequisited CPAN modules 
    198210set_step "Perl CPAN modules installation" 
    199 echo no | cpan -i CPAN 
     211cpandir=$(find /usr/lib -name CPAN) 
     212[ -e "$cpandir/Config.pm" ] || cat << 'EOL' > $cpandir/Config.pm 
     213$CPAN::Config = { 
     214  'build_cache' => q[10], 
     215  'build_dir' => q[/root/.cpan/build], 
     216  'cache_metadata' => q[1], 
     217  'cpan_home' => q[/root/.cpan], 
     218  'dontload_hash' => {  }, 
     219  'ftp' => q[/usr/kerberos/bin/ftp], 
     220  'ftp_proxy' => q[], 
     221  'getcwd' => q[cwd], 
     222  'gpg' => q[/usr/bin/gpg], 
     223  'gzip' => q[/bin/gzip], 
     224  'histfile' => q[/root/.cpan/histfile], 
     225  'histsize' => q[100], 
     226  'http_proxy' => q[], 
     227  'inactivity_timeout' => q[0], 
     228  'index_expire' => q[1], 
     229  'inhibit_startup_message' => q[0], 
     230  'keep_source_where' => q[/root/.cpan/sources], 
     231  'links' => q[], 
     232  'make' => q[/usr/bin/make], 
     233  'make_arg' => q[], 
     234  'make_install_arg' => q[], 
     235  'makepl_arg' => q[], 
     236  'ncftp' => q[], 
     237  'ncftpget' => q[], 
     238  'no_proxy' => q[], 
     239  'pager' => q[/usr/bin/less], 
     240  'prerequisites_policy' => q[ask], 
     241  'scan_cache' => q[atstart], 
     242  'shell' => q[/bin/bash], 
     243  'tar' => q[/bin/tar], 
     244  'term_is_latin' => q[1], 
     245  'unzip' => q[/usr/bin/unzip], 
     246  'urllist' => [q[http://cpan.enstimac.fr/], q[ftp://ftp.u-strasbg.fr/CPAN], q[ftp://ftp.lip6.fr/pub/perl/CPAN/], q[ftp://ftp.inria.fr/pub/CPAN/], q[ftp://ftp.crihan.fr/mirrors/ftp.cpan.org/], q[ftp://distrib-coffee.ipsl.jussieu.fr/pub/mirrors/cpan/], q[ftp://cpan.cict.fr/pub/CPAN/]], 
     247  'wget' => q[/usr/bin/wget], 
     248}; 
     2491; 
     250__END__ 
     251EOL 
     252 
     253#perl -MCPAN -e "o conf auto_commit" 
     254#perl -MCPAN -e "o conf prerequisites_policy follow" 
     255#perl -MCPAN -e "o conf build_requires_install_policy yes" 
     256 
    200257yes "" | cpan -i \ 
    201258  YAML \ 
     
    204261  Dir::Which \ 
    205262  Net::Interface \ 
     263  XML::Smart \ 
    206264  >&3 2>&1  
    207 yes "" | cpan -if File::Find::Node >&3 2>&1  
     265echo "force install File::Find::Node" | cpan >&3 2>&1 
    208266 
    209267# PLACO lib 
     
    211269if [ "$opt_d" != "" ]  
    212270then 
    213   [ -e $srcdir/.svn ] || { yes "p" | svn checkout $depot $srcdir >&3 2>&1 ; } 
     271   [ -e $srcdir/.svn ] || { yes "p" | svn checkout $depot $srcdir >&3 2>&1 ; } 
    214272else 
    215273  [ -e $libdir ] || { yes "p" | svn export $depot/lib $libdir >&3 2>&1 ; } 
     
    257315fi   
    258316 
     317cat << EOL >> $etcdir/install.defines 
     318 
     319# append by install 
     320host_os $DIST 
     321hypervisor $HYPER 
     322EOL 
     323 
    259324# PLACO post config 
    260325postconf_$DIST 
     
    286351 
    287352rm -r -f $tmpdir 
    288 echo "########### REBOOT YOUR SYSTEM TO FINISH INSTALLATION ############" 
     353end_$HYPER 
     354 
  • trunk/lib/etc/vm.defines

    r1014 r1094  
    2121# Network 
    2222rexec config_hostname.sh 
    23 put hosts /etc/hosts 
     23# put hosts /etc/hosts 
    2424rexec config_network.sh 
    25 put iptables $iptables_script 
     25# put iptables $iptables_script 
    2626rexec config_iptables.sh 
    2727 
    2828# Munin (monitoring) 
    2929rexec install_munin_node.sh 
    30 put munin-node.conf $muninnode_file 
     30# put munin-node.conf $muninnode_file 
    3131rexec restart_munin_node.sh 
    3232 
  • trunk/lib/middleware/config_http_reverse_proxy.sh

    r962 r1094  
    66 
    77#Put the /etc/hosts on $* with vh address 
    8 placomgr --put hosts $*  
    9   
     8placomgr put hosts /etc/hosts $* 
     9 
    1010#Put the VirtualHost configuration in apache config 
    11 placomgr --put vh4reverse_proxy $* 
    12 placomgr --put vh_spip4reverse_proxy $* 
    13 placomgr --put vh_svn4reverse_proxy $* 
    14 placomgr --put vh_sympa4reverse_proxy $* 
    15 placomgr --put vh_horde4reverse_proxy $* 
    16 placomgr --put vh_static4reverse_proxy $* 
     11placomgr put vh4reverse_proxy {apache_vh_conf_file} $* 
     12placomgr put vh_spip4reverse_proxy {apache_spip_conf_file} $* 
     13placomgr put vh_svn4reverse_proxy {apache_svn_conf_file} $* 
     14placomgr put vh_sympa4reverse_proxy {apache_sympa_conf_file} $* 
     15placomgr put vh_horde4reverse_proxy {apache_horde_conf_file} $* 
     16placomgr put vh_static4reverse_proxy {apache_static_conf_file} $* 
    1717#Create a log directory for each vh 
    18 placomgr --rexec mkdir_vh_logdir.sh $* 
     18placomgr rexec mkdir_vh_logdir.ex $* 
    1919#Restart apache to reload the new config 
    20 placomgr --rexec restart_apache.sh $* 
     20placomgr rexec restart_apache.ex $* 
    2121 
  • trunk/lib/middleware/config_http_web_hosting.sh

    r897 r1094  
    55source $PLACO_libdir/placolib.sh 
    66 
    7 placomgr --put apache_status.conf $* 
    8 placomgr --put vh4http_server $* 
    9 placomgr --rexec mk_ldap_group_4_vh.sh $* 
    10 placomgr --rexec mkdir_vh_docroot.sh $* 
    11 placomgr --rexec restart_apache.sh $* 
     7placomgr put apache_status.conf {apache_status_conf_file} $* 
     8placomgr put vh4http_server {apache_vh_conf_file} $* 
     9placomgr rexec mk_ldap_group_4_vh.ex $* 
     10placomgr rexec mkdir_vh_docroot.ex $* 
     11placomgr rexec restart_apache.ex $* 
  • trunk/lib/middleware/config_iptables.sh

    r897 r1094  
    88 
    99#Put the new iptables script 
    10 placomgr --put iptables $* 
     10placomgr put iptables {iptables_script} --mode 700 $* 
    1111#Reload the new iptables rules 
    12 placomgr --rexec config_iptables.sh $* 
     12placomgr rexec restart_iptables.ex $* 
  • trunk/lib/middleware/config_lists.sh

    r897 r1094  
    55source $PLACO_libdir/placolib.sh 
    66 
    7 placomgr --put  conf_topics $* 
    8 placomgr --rexec restart_sympa.sh $* 
     7placomgr put conf_topics /etc/sympa/topics.conf $* 
     8placomgr rexec restart_sympa.ex $* 
    99 
  • trunk/lib/middleware/config_log_host.sh

    r897 r1094  
    11#!/bin/bash 
    22# $Id: middleware_template 360 2009-07-22 06:29:15Z jaclin $ 
    3 # maintainer: Nicolas Vuilmet  
     3# maintainer: Nicolas Vuilmet 
    44 
    55source $PLACO_libdir/placolib.sh 
    66 
    7 placomgr --put config_log_host $* 
    8 placomgr --rexec restart_log.sh $* 
     7placomgr put config_log_host {rsyslog_conf_file} $* 
     8placomgr rexec restart_log.ex $* 
  • trunk/lib/middleware/config_ntpd.sh

    r897 r1094  
    11#!/bin/bash 
    22# $Id: middleware_template 360 2009-07-22 06:29:15Z jaclin $ 
    3 # maintainer: Nicolas Vuilmet  
     3# maintainer: Nicolas Vuilmet 
    44 
    55source $PLACO_libdir/placolib.sh 
    66 
    7 placomgr --put ntp_conf $* 
    8 placomgr --rexec restart_ntpd.sh $* 
     7placomgr put ntp_conf /etc/ntp.conf $* 
     8placomgr rexec restart_ntpd.ex $* 
  • trunk/lib/middleware/config_smtpd.sh

    r977 r1094  
    55source $PLACO_libdir/placolib.sh 
    66 
    7 placomgr --lexec maps_postfix_host.sh $* 
     7placomgr lexec maps_postfix_host.ex $* 
    88 
    9 placomgr --put  main_postfix_host $* 
     9placomgr put main_postfix_host /etc/postfix/main.cf $* 
    1010 
    11 placomgr --lexec restart_postfix.sh $* 
     11placomgr lexec restart_postfix.ex $* 
  • trunk/lib/middleware/config_svn.sh

    r897 r1094  
    55source $PLACO_libdir/placolib.sh 
    66 
    7 placomgr --rexec config_svn_repositories.sh $* 
    8 placomgr --rexec mk_ldap_group_4_svn.sh $* 
    9 placomgr --put vh4svn_server $* 
    10 placomgr --rexec restart_apache.sh $* 
     7placomgr rexec config_svn_repositories.ex $* 
     8placomgr rexec mk_ldap_group_4_svn.ex $* 
     9placomgr put vh4svn_server {apache_svn_conf_file} $* 
     10placomgr rexec restart_apache.ex $* 
  • trunk/lib/middleware/create_vm.sh

    r1014 r1094  
    99 
    1010#Reload /etc/hosts on localhost 
    11 placomgr --lexec hosts.sh -m localhost 
     11placomgr lexec hosts.ex -m localhost 
    1212 
    13 #Create the new domaine in xen (image, installation os and configuration) 
    14 placomgr -lexec create_vm.sh $* 
     13# create a new domaine 
     14placomgr lexec create_vm.ex $* 
    1515 
    16 #Reload /etc/hosts on localhost because xen has changed 
    17 placomgr --lexec hosts.sh -m localhost 
     16# configure the VM (offline, write on its cold disk, before running it) 
     17placomgr lexec mountdisk_vm.ex $* 
     18placomgr lexec config_vm.ex $* 
     19placomgr lexec umountdisk_vm.ex $* 
     20 
     21placomgr lexec start_vm.ex $* 
     22 
     23# initialize the VM (inline, while running) 
     24placomgr -v rexec init_vm.ex $* 
     25 
     26#Reload /etc/hosts on localhost (require by Xen) 
     27placomgr lexec hosts.ex -m localhost 
    1828 
    1929#Config save for this VM 
    20 placomgr --lexec config_save.sh $* 
     30placomgr lexec config_save.ex $* 
    2131 
    22 #Mount the VM file system 
    23 placomgr -lexec init_pre.sh $* 
    24 #Config root password and sharing ssh key 
    25 placomgr -lexec init_auth.sh $* 
    26 #Install new pakage 
    27 placomgr -lexec init_pkg.sh $* 
    28 #Configure VM services 
    29 placomgr -lexec init_config.sh $* 
    30 #Umount the VM file system 
    31 placomgr -lexec init_post.sh $* 
    32  
    33 #Start the new VM 
    34 placomgr -lexec start_vm.sh $* 
    35  
    36 #Wait 10 second (start VM) 
    37 sleep 10 
    38  
    39 #Fix hostname 
    40 placomgr -rexec config_hostname.sh $* 
    41 #Reload network configuration 
    42 placomgr -rexec config_network.sh $* 
    4332#Config iptables 
    44 config_iptables.sh $* 
    45 placomgr -rexec ipforward.sh $* 
     33config_iptables.sh $* # middleware 
    4634 
    4735#Put the new /etc/hosts on proxy (with the new VM) 
    48 placomgr --put hosts -m proxy 
     36placomgr put hosts /etc/hosts -m proxy 
    4937#Put /etc/hosts on the new VM 
    50 placomgr --put hosts $* 
     38placomgr put hosts /etc/hosts $* 
    5139 
    5240# new log config 
    53 placomgr --rexec config_log_vm.sh $* 
     41placomgr rexec config_log_vm.ex $* 
     42 
     43# Enable additionnals packages repository 
     44placomgr rexec add_extra_repository.ex $* 
    5445 
    5546# Mail 
    56 placomgr --rexec install_postfix.sh $* 
    57 placomgr --rexec maps_postfix_vm.sh $* 
    58 placomgr --rexec restart_postfix.sh $* 
     47placomgr rexec install_postfix.ex $* 
     48placomgr put main_postfix_vm /etc/postfix/main.cf $* 
     49placomgr rexec maps_postfix_vm.ex $* 
     50placomgr rexec restart_postfix.ex $* 
  • trunk/lib/middleware/create_vmbase.sh

    r1006 r1094  
    55source $PLACO_libdir/placolib.sh 
    66 
    7 placomgr --lexec create_vmbase.sh -m localhost 
     7# apache will be used by the vmbase installation : 
     8#   to acquire the response file 
     9#   to relay to a  mirror the local HTTP request 
     10placomgr put apache_mirror.conf {apache_mirror_conf_file} $* 
     11placomgr put base.ks /var/www/base.ks --mode 644 $* 
     12placomgr lexec restart_apache.ex $* 
     13 
     14 
     15placomgr lexec create_vmbase.ex $* 
  • trunk/lib/middleware/delete_vm.sh

    r897 r1094  
    11#!/bin/bash 
    22# $Id$ 
    3 # maintainer: Nicolas Vuilmet  
     3# maintainer: Nicolas Vuilmet 
    44 
    55source $PLACO_libdir/placolib.sh 
    66 
    7 #Stop the virtual machine and delete the virtual disks 
    8 placomgr --lexec delete_vm.sh $* 
     7# Stop the virtual machine  
     8placomgr lexec stop_vm.ex $* 
     9 
     10# Delete the virtual disks 
     11placomgr lexec delete_vm.ex $* 
     12 
     13# Remove ssh key 
     14placomgr lexec remove_ssh_keys.ex $* 
  • trunk/lib/middleware/init_vh_4_web_hosting.sh

    r947 r1094  
    66 
    77# mysql 
    8 placomgr --rexec config_mysql_4_vh.sh $* 
     8placomgr rexec config_mysql_4_vh.ex $* 
    99 
    1010# spip 
    11 placomgr --rexec install_spip.sh $* 
    12 placomgr --rexec install_spip_cnrs_kit.sh $* 
    13 placomgr --rexec config_spip_web.pl $* 
     11placomgr rexec install_spip.ex $* 
     12placomgr rexec install_spip_cnrs_kit.ex $* 
     13placomgr rexec config_spip_web.ex $* 
    1414 
    1515# horde 
    16 placomgr --put horde_hook $* 
    17 placomgr --rexec install_horde.sh $* 
     16placomgr put horde_hook /tmp/horde_hook $* 
     17placomgr rexec install_horde.ex $* 
  • trunk/lib/middleware/install_apache_host.sh

    r897 r1094  
    55source $PLACO_libdir/placolib.sh 
    66 
    7 placomgr --lexec install_apache_monitoring.sh $* 
    8 placomgr --put ports_monitoring $* 
    9 placomgr --put apache_status.conf $* 
    10 placomgr --lexec restart_apache.sh $* 
     7placomgr lexec install_apache_monitoring.ex $* 
     8placomgr put ports_monitoring {apache_ports_conf_file} $* 
     9placomgr put apache_status.conf {apache_status_conf_file} $* 
     10placomgr lexec restart_apache.ex $* 
    1111 
  • trunk/lib/middleware/install_hobbit_host.sh

    r897 r1094  
    55source $PLACO_libdir/placolib.sh 
    66 
    7 placomgr --lexec install_hobbit_client.sh $* 
    8 placomgr --lexec install_hobbit_server.sh $* 
    9 placomgr --put hobbit_bb-hosts $* 
    10 placomgr --put vh4monitoring $* 
    11 placomgr --lexec restart_apache.sh $* 
     7placomgr lexec install_hobbit_client.ex $* 
     8placomgr lexec install_hobbit_server.ex $* 
     9placomgr put hobbit_bb-hosts {hobbit_conf_file} $* 
     10placomgr put vh4monitoring {apache_hobbit_conf_file} $* 
     11placomgr lexec restart_apache.ex $* 
  • trunk/lib/middleware/install_ldap.sh

    r897 r1094  
    55source $PLACO_libdir/placolib.sh 
    66 
    7 placomgr --put config_initialtree_slapd $* 
    8 #placomgr --put horde.schema $* 
    9 placomgr --rexec install_slapd.sh $* 
     7placomgr put config_initialtree_slapd /root/config_initialtree_slapd $* 
     8placomgr rexec install_slapd.ex $* 
     9placomgr put config_slapd openldap_config $* 
     10placomgr rexec initialize_ldap_db.ex $* 
  • trunk/lib/middleware/install_list.sh

    r897 r1094  
    55source $PLACO_libdir/placolib.sh 
    66 
    7 placomgr --put config_debconf_sympa $* 
    8 placomgr --rexec install_apache_list.sh $* 
    9 placomgr --rexec restart_apache.sh $* 
    10 placomgr --rexec install_debconf_sympa.sh $* 
    11 placomgr --rexec install_sympa.sh $* 
    12 placomgr --put conf_sympa /etc/sympa/sympa.conf $* 
    13 placomgr --put auth_ldap_sympa /etc/sympa/auth.conf $* 
    14 placomgr --put config_postfix_list /etc/postfix/main.cf $* 
    15 placomgr --rexec post_install_sympa.sh $* 
    16 placomgr --rexec restart_postfix.sh $* 
    17 placomgr --rexec restart_sympa.sh $* 
     7placomgr put config_debconf_sympa /root/config_debconf_sympa $* 
     8placomgr rexec install_apache_list.ex $* 
     9placomgr rexec restart_apache.ex $* 
     10placomgr rexec install_debconf_sympa.ex $* 
     11placomgr rexec install_sympa.ex $* 
     12placomgr put conf_sympa /etc/sympa/sympa.conf $* 
     13placomgr put auth_ldap_sympa /etc/sympa/auth.conf $* 
     14placomgr put config_postfix_list /etc/postfix/main.cf $* 
     15placomgr rexec post_install_sympa.ex $* 
     16placomgr rexec restart_postfix.ex $* 
     17placomgr rexec restart_sympa.ex $* 
  • trunk/lib/middleware/install_munin_host.sh

    r897 r1094  
    55source $PLACO_libdir/placolib.sh 
    66 
    7 placomgr --lexec install_munin_monitoring.sh $* 
    8 placomgr --lexec muninconf.sh $* 
    9 placomgr --lexec restart_munin_node.sh $* 
     7placomgr lexec install_munin_monitoring.ex $* 
     8placomgr lexec muninconf.ex $* 
     9placomgr lexec restart_munin_node.ex $* 
  • trunk/lib/middleware/install_mysql.sh

    r897 r1094  
    11#!/bin/bash 
    22# $Id: middleware_template 360 2009-07-22 06:29:15Z jaclin $ 
    3 # maintainer: Nicolas Vuilmet  
     3# maintainer: Nicolas Vuilmet 
    44 
    55source $PLACO_libdir/placolib.sh 
    66 
    7 placomgr --rexec install_mysql.sh $* 
     7placomgr rexec install_mysql.ex $* 
  • trunk/lib/middleware/install_ntpd.sh

    r897 r1094  
    11#!/bin/bash 
    22# $Id: middleware_template 360 2009-07-22 06:29:15Z jaclin $ 
    3 # maintainer: Nicolas Vuilmet  
     3# maintainer: Nicolas Vuilmet 
    44 
    55source $PLACO_libdir/placolib.sh 
    66 
    7 placomgr --rexec install_ntpd.sh $* 
     7placomgr rexec install_ntpd.ex $* 
  • trunk/lib/middleware/install_reverse_proxy.sh

    r897 r1094  
    66 
    77#install apache with reverse proxy module 
    8 placomgr --rexec install_apache_proxy.sh $* 
     8placomgr rexec install_apache_proxy.ex $* 
    99 
    1010#enable apache monitoring trough munin-node 
    11 placomgr --put apache_status.conf $* 
     11placomgr put apache_status.conf {apache_status_conf_file} $* 
    1212 
    1313#set listen interfaces 
    14 placomgr --put ports_reverse_proxy $* 
    15  
    16 placomgr --rexec restart_apache.sh $* 
     14placomgr put ports_reverse_proxy {apache_ports_conf_file} $* 
  • trunk/lib/middleware/install_smtpd.sh

    r977 r1094  
    55source $PLACO_libdir/placolib.sh 
    66 
    7 placomgr --lexec install_postfix.sh $* 
     7placomgr lexec install_postfix.ex $* 
  • trunk/lib/middleware/install_svn.sh

    r897 r1094  
    33source $PLACO_libdir/placolib.sh 
    44 
    5 placomgr --rexec install_svn.sh $* 
    6 placomgr --put apache_status.conf $* 
    7 placomgr --put vh4svn_server $* 
    8 placomgr --rexec restart_apache.sh $* 
     5placomgr rexec install_svn.ex $* 
     6placomgr put apache_status.conf {apache_status_conf_file} $* 
     7placomgr put vh4svn_server {apache_svn_conf_file} $* 
     8placomgr rexec restart_apache.ex $* 
  • trunk/lib/middleware/install_web_hosting.sh

    r896 r1094  
    55source $PLACO_libdir/placolib.sh 
    66 
    7 placomgr --rexec install_apache_web_hosting.sh $* 
     7placomgr rexec install_apache_web_hosting.ex $* 
    88 
    9 placomgr --rexec install_php5.sh $* 
    10 placomgr --rexec install_unzip.sh $* # for spip and cnrskit 
     9placomgr rexec install_php5.ex $* 
     10placomgr rexec install_unzip.ex $* # for spip and cnrskit 
  • trunk/lib/middleware/install_webconf.sh

    r897 r1094  
    55source $PLACO_libdir/placolib.sh 
    66 
    7 placomgr --rexec install_openmeetings.sh $* 
     7placomgr rexec install_openmeetings.ex $* 
  • trunk/lib/middleware/monitoring_vm.sh

    r897 r1094  
    88 
    99# munin-node 
    10 placomgr --rexec install_munin_node.sh $* 
    11 placomgr --put munin-node.conf $* 
    12 placomgr --rexec restart_munin_node.sh $* 
     10placomgr rexec install_munin_node.ex $* 
     11placomgr put munin-node.conf {muninnode_file} $* 
     12placomgr rexec restart_munin_node.ex $* 
    1313 
    1414# hobbit 
    15 placomgr --rexec install_hobbit_client.sh $* 
     15placomgr rexec install_hobbit_client.ex $* 
    1616 
    1717# change config on localhost to see new vm in hobbit and munin 
    18 placomgr --lexec muninconf.sh -m localhost 
    19 placomgr --put hobbit_bb-hosts -m localhost 
     18placomgr lexec muninconf.ex -m localhost 
     19placomgr put hobbit_bb-hosts {hobbit_conf_file} -m localhost 
  • trunk/lib/middleware/save_data_user.sh

    r897 r1094  
    77# Save directory 
    88 
    9 placomgr --lexec save_dir.sh $* 
     9placomgr lexec save_dir.ex $* 
    1010 
    1111#      Save data base 
    1212# Save mysql 
    13 placomgr --lexec save_mysql.sh $* 
     13placomgr lexec save_mysql.ex $* 
    1414 
    1515# Save ldap 
    16 placomgr --lexec save_ldap.sh $* 
     16placomgr lexec save_ldap.ex $* 
  • trunk/lib/middleware/save_machine.sh

    r897 r1094  
    66 
    77#save vm 
    8 placomgr --lexec save_vm.sh $* 
     8placomgr lexec save_vm.ex $* 
    99 
    1010#save etc placo 
    11 placomgr --rexec save_etc_placo.sh $* 
     11placomgr rexec save_etc_placo.ex $* 
  • trunk/lib/middleware/update_system.sh

    r897 r1094  
    66 
    77#Update all VM 
    8 placomgr --rexec update_pkg.sh $* 
     8placomgr rexec update_pkg.ex $* 
    99 
    1010#Update HÃŽte 
    11 placomgr --rexec update_host.sh $* 
     11placomgr rexec update_host.ex $* 
    1212 
    13 echo "===========================" 
    14 echo "= REBOT YOUR HOST SYSTEM! =" 
    15 echo "===========================" 
     13echo "============================" 
     14echo "= REBOOT YOUR HOST SYSTEM! =" 
     15echo "============================" 
  • trunk/lib/placomgr

    r1036 r1094  
    1 #!/usr/bin/perl -w 
     1#!/usr//bin/perl -w 
    22 
    33############################################################ 
     
    3939my $this_prog = basename($0) ; 
    4040my $TEMPLATE_DIR = "template" ; 
    41 my $PROMPT = " "x30 ; 
     41my $PROMPT = " "x20 ; 
    4242my $SCREEN_HANDLE = 3 ; 
     43my @DEBUG_TAGS = qw/ env data file conf expand/ ; 
    4344 
    4445my $default_conf = { 
     
    4950  , "tmp_dir" => "/tmp" 
    5051  , "copy_fmt" => "/usr/bin/scp -q %s %s:%s" 
     52  , "rm_fmt" => "/bin/rm %s" 
    5153  , "rexec_fmt" => "/usr/bin/ssh -t %s %s" 
    5254  , "hierarchy_var" => "hierarchy" 
     
    6264placomgr - PLACO Manager v$VERSION 
    6365 
    64 Usage : placomgr [options] operation 
    65         placomgr --help 
    66         placomgr --man 
    67  
    68         Operations are : 
    69           -l, --lexec template        local execution of a templated script 
    70           -p, --put template          upload a templated file 
    71           -r, --rexec template        remote execution of a templated script 
    72  
    73         Options : 
    74           -C config_file 
    75           -P, --platform platform_name 
    76                 (the environment variable 'PLACO_platform' can also be used) 
    77           -m, --machine machine_name 
    78           -d, --debug 
    79               --dry-run               don't apply operation 
    80               --no-cleanup            don't delete temporary files 
    81               --broadcast             return OK even if no machine 
    82                                       apply operation 
    83               --expand                only show expanded templates 
    84           -v, --verbose 
     66Usage : placomgr [options] operation args 
     67        placomgr help 
     68        placomgr man 
     69 
     70  Operation is lexec, rexec or put. 
     71 
     72    - placomgr [options] lexec template [args] 
     73        Local execution of a script (generated from 'template'). 'args' are 
     74        passed to the script. 
     75 
     76    - placomgr [options] rexec template [args] 
     77        Remote execution of a script (generated from 'template'). 'args' are 
     78        passed to the script. 
     79 
     80    - placomgr [options] [-u user] [-g group] [-m mode] put template target 
     81        File upload (generated from 'template') to 'target'. If -u, -g or -m 
     82        are specified, owner, group or perms are set on the target. 
     83 
     84  Options are : 
     85 
     86        --broadcast             return OK even if no machine apply operation 
     87    -C config_file 
     88    -d, --debug tag             tag must be one of : env data file conf expand 
     89        --delimiters "ccc,ccc"  delimiter pairs for Perl code in template 
     90        --dry-run               don't apply operation 
     91    -m, --machine machine_name 
     92        --no-cleanup            don't delete temporary files 
     93    -P, --platform platform_name 
     94          (the environment variable 'PLACO_platform' can also be used) 
     95    -v, --verbose 
    8596EOL 
    8697  , "placosh" => << "EOL" 
     
    104115placocheck - PLACO configuration validator v$VERSION 
    105116 
    106 Usage : placocheck [options]  
     117Usage : placocheck [options] 
    107118        placocheck --help 
    108119        placocheck --man 
     
    112123          -P, --platform platform_name 
    113124                (the environment variable 'PLACO_platform' can also be used) 
    114           -d, --debug 
     125          -d, --debug tag 
    115126              --dry-run 
    116127              --no-cleanup 
     
    132143{ 
    133144  system(@_) ; 
    134   if ($? == -1)  
     145  if ($? == -1) 
    135146  { 
    136147    Log::err(sprintf("failed to execute '%s': $!",join(" ",@_)),9) ; 
    137148  } 
    138   elsif ($? & 127)  
     149  elsif ($? & 127) 
    139150  { 
    140151    Log::err(sprintf("'%s' died with signal %d",join(" ",@_),($? & 127)),9) ; 
    141152  } 
    142   elsif ($? >> 8 !=0)  
     153  elsif ($? >> 8 !=0) 
    143154  { 
    144155     Log::err(sprintf("child exited with value %d",$? >> 8),9) ; 
     
    152163  our @ISA = qw(Exporter); 
    153164  our @EXPORT=qw() ; 
     165  use Data::Dumper ; 
    154166 
    155167  #-------------------- 
    156168  sub new 
    157169  { 
    158     my($type,$level) = @_ ; 
    159     my($this) ; 
    160  
    161     $this->{"level"} = $level ; 
     170    my($type,$verbose,$debug) = @_ ; 
     171    my($this,%tags) ; 
     172 
     173    $this->{verbose} = $verbose || 0 ; 
     174    $this->{debug} = $debug || 0 ; 
    162175    bless $this,$type ; 
     176 
     177    %tags = map { $_ => 1 ; } @DEBUG_TAGS ; 
     178    err("debug tag must be one of: ".join(",",@DEBUG_TAGS)." !",21) 
     179      if defined($debug) && ! exists $tags{$debug} ; 
    163180    return $this ; 
    164181  } 
     
    166183  sub debug 
    167184  { 
     185    my($this,$level,$msg) = @_ ; 
     186    print "$msg\n" if $this->{debug} eq $level ; 
     187  } 
     188  sub info 
     189  { 
    168190    my($this,$msg) = @_ ; 
    169     print "$msg\n" if $this->{"level"}==2 ; 
    170   } 
    171   sub info 
    172   { 
    173     my($this,$msg) = @_ ; 
    174     print "$msg\n" if $this->{"level"}>=1 ; 
     191    print "$msg\n" if $this->{verbose} ; 
    175192  } 
    176193  sub err 
     
    178195    my($msg,$retcode) = @_ ; 
    179196    print "ERROR:$retcode: $msg\n" ; 
    180     $screen->print("placomgr [ ERR ($retcode) $msg ]\n") ; 
     197    $screen->print("\nplacomgr [ ERR ($retcode) $msg ]\n") ; 
    181198    exit($retcode) ; 
    182199  } 
     
    281298  sub new 
    282299  { 
    283     my($type,$data,$machine,$fqmachine) = @_ ; 
     300    my($type,$data,$machine,$fqmachine,$debug) = @_ ; 
    284301    my($this) ; 
    285302 
     
    287304    $this->{machine} = $machine ; 
    288305    $this->{fqmachine} = $fqmachine ; 
     306    $this->{debug} = $debug ; 
    289307    unless (exists $data->{"machine"}{$machine}) 
    290308    { 
     
    303321    bless $this,$type ; 
    304322    $this->get_split_path() ; 
     323    $this->{templatedata} = $this->templatedata() ; 
    305324 
    306325    return $this ; 
     
    308327 
    309328  #-------------------- 
     329  sub expand_arg 
     330  { 
     331    my ($this,$val) = @_ ; 
     332    my $var ; 
     333 
     334    ($var) = $val=~/^{(.*)}$/ ; 
     335    $val = $this->get($var) if $var ; 
     336    return $val ; 
     337  } 
     338 
     339   sub expand_args 
     340  { 
     341    my ($this,@val) = @_ ; 
     342 
     343    @val =  map { $_ = $this->expand_arg($_) ; } @val ; 
     344    return @val ; 
     345  } 
     346 
     347  #-------------------- 
     348  sub templatedata 
     349  { 
     350    my($this) = @_ ; 
     351    my %localdef = () ; 
     352 
     353    my $path = "" ; 
     354    for my $p (@{$this->{split_path}}) 
     355    { 
     356      $path = File::Spec->catdir($path,$p) ; 
     357      my $file = File::Spec->catdir($path,$this->get("hierarchy").".defines") ; 
     358      next unless -e $file ; 
     359      $log->debug("file","for ".$this->{machine}.": load '$file'") ; 
     360      my $conf ; 
     361      my $ret = eval { $conf = new Config::General( 
     362        -ConfigFile=>$file 
     363        , -InterPolateVars=>1 
     364        , -UseApacheInclude=>1 
     365        , -IncludeDirectories=>1 
     366        , -IncludeGlob=>1 
     367        , -IncludeAgain=>1 
     368        , -IncludeRelative=>1 
     369        , -StrictVars=>1 
     370        , -ConfigPath=>[$path,$config->get("lib_dir")."/etc"] 
     371        , -MergeDuplicateBlocks=>1 
     372        ) } ; 
     373      unless ($ret) 
     374      { 
     375        $@ =~ s/Config::General *// ; 
     376        $@ =~ s/! at.*// ; 
     377        Log::err($@,11) ; 
     378      } 
     379 
     380      my %conf = $conf->getall; 
     381      %localdef = (%localdef,%conf) ; 
     382    } 
     383    return \%localdef ; 
     384  } 
     385  #-------------------- 
    310386  sub get 
    311387  { 
    312388    my($this,$var) = @_ ; 
    313389 
    314     # warn "WARN: on $this->{machine} : no value found for '$var'\n" 
    315390    Log::err("on $this->{machine} : no value found for '$var'",8) 
    316       unless exists($this->{section}{$var}) or exists($this->{data}{$var}) ; 
    317     if (ref($this->{section}{$var}) eq "ARRAY" || ref($this->{data}{$var}) eq "ARRAY") 
     391      unless exists($this->{section}{$var}) 
     392          or exists($this->{data}{$var}) 
     393          or exists($this->{templatedata}{$var}) ; 
     394    if (ref($this->{section}{$var}) eq "ARRAY" 
     395          || ref($this->{data}{$var}) eq "ARRAY" 
     396          || ref($this->{templatedata}{$var}) eq "ARRAY") 
    318397    { 
    319398      my @l1 = () ; 
     
    322401        my @l2 = @{::to_list($this->{section}{$var})} ; 
    323402        push @l1,@l2 ; 
    324         } 
     403      } 
    325404      if (exists($this->{data}{$var})) 
    326405      { 
     
    328407        push @l1,@l2 ; 
    329408      } 
     409      if (exists($this->{templatedata}{$var})) 
     410      { 
     411        my @l2 = @{::to_list($this->{templatedata}{$var})} ; 
     412        push @l1,@l2 ; 
     413      } 
    330414      return \@l1 ; 
    331415    } 
     
    334418      return $this->{section}{$var} if exists($this->{section}{$var}) ; 
    335419      return $this->{data}{$var} if exists($this->{data}{$var}) ; 
     420      return $this->{templatedata}{$var} if exists($this->{templatedata}{$var}) ; 
    336421    } 
    337422  } 
     
    390475    my @prefix = $this->gets(@keys) ; 
    391476 
    392     # formate the prefixes  
    393     map { $_="$_:" } @prefix ; 
     477    # formate the prefixes 
     478    map { $_="$_/" } @prefix ; 
    394479 
    395480    # add the default prefix (empty prefix) 
     
    437522    my($this,$script) = @_ ; 
    438523 
    439     my ($cmd,@args,@delim,$defline) ; 
    440     { 
    441       # get the 'rexec' directives 
    442       my $rexecs = ::to_list($this->get("rexec")) ; 
    443       my @scripts = grep /^$script(\W|$)/,@$rexecs ; 
    444       return (1,"no directive 'rexec $script' found") if scalar(@scripts)==0 ; 
    445       $defline = $scripts[0] ; 
    446       ($cmd,@args) = split(/\s+/,$defline) ; 
    447       @delim = $cmd=~/\['(.*?)','(.*?)'\]/ ; 
    448       $cmd =~ s/^\[.*?\] *// ; 
    449       $log->info("on $this->{machine}: starting '$defline'") ; 
    450     } 
     524    printf("> on %s: starting rexec $script\n",$this->{machine}) ; 
     525    my ($cmd,@args) ; 
     526    @args = $this->expand_args(split(/\s+/,$script)) ; 
     527    $script = shift(@args) ; 
     528    $log->info("on $this->{machine}: starting 'rexec $script'") ; 
    451529 
    452530    ## ajout d'arguments implicites 
     
    462540            , $path 
    463541            ) unless defined($path) and -f $path ; 
     542    printf("    template: %s\n",$path) ; 
     543    printf("    args: %s\n",join(" , ",@args)) if scalar(@args)>0 ; 
    464544 
    465545    #$this->{args} = [ $path , $script ] ; 
     
    468548    $this->{PWD} = File::Basename::dirname($path) ; 
    469549    { my $d = $config->get("lib_dir") ; $this->{TEMPLATE} =~ s|^$d/|| ; } 
    470      
     550 
    471551    $this->{ARGV} = [ $path , @args ] ; 
    472552    $this->{ARGC} = scalar(@args) ; 
     
    474554    #$this->_setenv() ; 
    475555 
    476     print "$path:\n","-"x10,"\n" if $args{"expand"} ; 
     556    $log->debug("expand","-- begin of expansion for $path:") ; 
    477557    my $localfile = $config->get("tmp_dir")."/$script.$$" ; 
    478558    my $tmpl = new Text::Template ( TYPE => 'FILE', SOURCE => $path ) or Log::err("can't create template",1) ; 
     
    480560    chmod(0700,$localfile) or warn "WARN: $!\n" ; 
    481561    { 
    482       my $fillin_args = { OUTPUT => $args{"expand"}?\*STDOUT:\*F, HASH=>{$this->_hash4vars()}} ; 
    483       $fillin_args->{DELIMITERS} = \@delim if @delim ; 
     562      my $fillin_args = { OUTPUT => $this->{debug} eq "expand"?\*STDOUT:\*F, HASH=>{$this->_hash4vars()}} ; 
     563      $fillin_args->{DELIMITERS} = $args{delimiters} if exists $args{delimiters} ; 
    484564      $fillin_args->{BROKEN} = \&my_broken ; 
    485565      #$fillin_args->{BROKEN_ARG} = { path=>$path, localfile=>$localfile } ; 
    486566      $tmpl->fill_in(%$fillin_args) or Log::err("Partial result can be found in '$localfile'",4) ; 
    487567    } 
    488     print "-"x10,"\n" if $args{"expand"} ; 
     568    $log->debug("expand","-- end of expansion for $path") ; 
    489569    $log->info("on $this->{machine}: create '$localfile' on localhost") ; 
    490  
    491     unless ($args{"dry-run"}) 
    492     { 
    493       my $machine = $this->{fqmachine} ; 
    494  
    495       my $cmdline = sprintf($config->get("copy_fmt"),$localfile,$machine,$this->get("spool_dir")."/$script") ; 
    496       $log->info("on $this->{machine}: execute '$cmdline'") ; 
    497       ::mysystem($cmdline) ; 
    498  
    499       $cmdline = sprintf("%s/%s %s",$this->get("spool_dir"),$script,join(' ',@args)) ; 
    500       $cmdline = sprintf($config->get("rexec_fmt"),$machine,$cmdline) ; 
    501       $log->info("on $this->{machine}: execute '$cmdline'") ; 
    502       ::mysystem($cmdline) ; 
    503  
    504       $cmdline = sprintf($this->get("rm_fmt"),$this->get("spool_dir")."/$script") ; 
    505       $cmdline = sprintf($config->get("rexec_fmt"),$machine,$cmdline) ; 
    506       $log->info("on $this->{machine}: execute '$cmdline'") ; 
    507       ::mysystem($cmdline) unless $args{"no-cleanup"} ; 
    508     } 
     570    close(F) ; 
     571 
     572    my $machine = $this->{fqmachine} ; 
     573 
     574    my $cmdline = sprintf($config->get("copy_fmt"),$localfile,$machine,$this->get("spool_dir")."/$script") ; 
     575    $log->info("on $this->{machine}: execute '$cmdline'") ; 
     576    ::mysystem($cmdline) unless $args{"dry-run"} ; 
     577 
     578    $cmdline = sprintf("%s/%s %s",$this->get("spool_dir"),$script,join(' ',@args)) ; 
     579    $cmdline = sprintf($config->get("rexec_fmt"),$machine,$cmdline) ; 
     580    $log->info("on $this->{machine}: execute '$cmdline'") ; 
     581    ::mysystem($cmdline) unless $args{"dry-run"} ; 
     582 
     583    $cmdline = sprintf($config->get("rm_fmt"),$this->get("spool_dir")."/$script") ; 
     584    $cmdline = sprintf($config->get("rexec_fmt"),$machine,$cmdline) ; 
     585    $log->info("on $this->{machine}: execute '$cmdline'") ; 
     586    ::mysystem($cmdline) unless $args{"dry-run"} || $args{"no-cleanup"} ; 
    509587 
    510588    return (0,"'rexec $script' done","rexec") ; 
     
    516594    my($this,$script) = @_ ; 
    517595 
     596    printf("> on %s: starting lexec $script\n",$this->{machine}) ; 
    518597    my ($cmd,@args,@delim,$defline) ; 
    519     { 
    520       # get the 'exec' directives 
    521       my $execs = ::to_list($this->get("lexec")) ; 
    522       my @scripts = grep /^$script(\W|$)/,@$execs ; 
    523       return (1,"no directive 'lexec $script' found") if scalar(@scripts)==0 ; 
    524       $defline = $scripts[0] ; 
    525       ($cmd,@args) = split(/\s+/,$defline) ; 
    526       @delim = $cmd=~/\['(.*?)','(.*?)'\]/ ; 
    527       $cmd =~ s/^\[.*?\] *// ; 
    528       $log->info("on $this->{machine}: starting '$defline'") ; 
    529     } 
     598    @args = $this->expand_args(split(/\s+/,$script)) ; 
     599    $script = shift(@args) ; 
     600    $log->info("on $this->{machine}: starting 'lexec $script'") ; 
    530601 
    531602    ## ajout d'arguments implicites 
     
    541612            , $path 
    542613            ) unless defined($path) and -f $path ; 
     614    printf("    template: %s\n",$path) ; 
     615    printf("    args: %s\n",join(" , ",@args)) if scalar(@args)>0 ; 
    543616 
    544617    #$this->{args} = [ $path , $script ] ; 
     
    550623    #$this->_setenv() ; 
    551624 
    552     print "$path:\n","-"x10,"\n" if $args{"expand"} ; 
     625    $log->debug("expand","-- begin of expansion for $path:") ; 
    553626    my $localfile = $this->get("spool_dir")."/$script" ; 
    554627    my $tmpl = new Text::Template ( TYPE => 'FILE', SOURCE => $path ) or Log::err("can't create template",1) ; 
     
    556629    chmod(0700,$localfile) or warn "WARN: $!\n" ; 
    557630    { 
    558       my $fillin_args = { OUTPUT => $args{"expand"}?\*STDOUT:\*F, HASH=>{$this->_hash4vars()}} ; 
    559       $fillin_args->{DELIMITERS} = \@delim if @delim ; 
     631      my $fillin_args = { OUTPUT => $this->{debug} eq "expand"?\*STDOUT:\*F, HASH=>{$this->_hash4vars()}} ; 
     632      $fillin_args->{DELIMITERS} = $args{delimiters} if exists $args{delimiters} ; 
    560633      $fillin_args->{BROKEN} = \&my_broken ; 
    561634      #$fillin_args->{BROKEN_ARG} = { path=>$path, localfile=>$localfile } ; 
    562635      $tmpl->fill_in(%$fillin_args) or Log::err("Partial result can be found in '$localfile'",4) ; 
    563636    } 
    564     print "-"x10,"\n" if $args{"expand"} ; 
     637    $log->debug("expand","-- end of expansion for $path") ; 
    565638    $log->info("on $this->{machine}: create '$localfile' on localhost") ; 
    566639    close(F) ; 
    567640 
    568     unless ($args{"dry-run"}) 
    569     { 
    570       my $cmdline = sprintf("%s/%s %s",$this->get("spool_dir"),$script,join(' ',@args)) ; 
    571       $log->info("on localhost: execute '$cmdline'") ; 
    572       ::mysystem($cmdline) ; 
    573  
    574       $cmdline = sprintf($this->get("rm_fmt"),$this->get("spool_dir")."/$script") ; 
    575       $log->info("on $this->{machine}: execute '$cmdline'") ; 
    576       ::mysystem($cmdline) unless $args{"no-cleanup"} ; 
    577     } 
     641    my $cmdline = sprintf("%s/%s %s",$this->get("spool_dir"),$script,join(' ',@args)) ; 
     642    $log->info("on localhost: execute '$cmdline'") ; 
     643    ::mysystem($cmdline) unless $args{"dry-run"} ; 
     644 
     645    $cmdline = sprintf($config->get("rm_fmt"),$this->get("spool_dir")."/$script") ; 
     646    $log->info("on $this->{machine}: execute '$cmdline'") ; 
     647    ::mysystem($cmdline) unless $args{"dry-run"} || $args{"no-cleanup"} ; 
    578648 
    579649    return (0,"'lexec $script' done","lexec") ; 
     
    583653  sub run_put 
    584654  { 
    585     my($this,$file) = @_ ; 
    586  
    587     my ($dest,@delim,$defline,$user,$group,$mode,$modflag) ; 
    588     $modflag = 0 ; 
    589     { 
    590       # get the 'puts' directives 
    591       my $putss = ::to_list($this->get("put")) ; 
    592       my @files = grep /^$file\W/,@$putss ; 
    593       return (1,"no directive 'put $file' found") if scalar(@files)==0 ; 
    594       $defline = $files[0] ; 
    595       ($dest) = $defline=~/$file\S*\s+(.*)$/ ; 
    596       @delim = $defline=~/^\S+\['(.*?)','(.*?)'\]/ ; 
    597       if ($dest=~/\[.*\]/) 
    598       { 
    599         ($user,$group,$mode) = $dest=~/\[(.*),(.*),(.*)\]/ ; 
    600         $dest =~ s/\[.*\]// ; 
    601         $modflag = 1 ; 
    602       } 
    603       $log->info("on $this->{machine}: starting '$defline'") ; 
    604     } 
     655    my($this,$cmd_args) = @_ ; 
     656    my ($dest,$file) ; 
     657 
     658    printf("> on %s: starting 'put %s'\n",$this->{machine},join(" ",@$cmd_args)) ; 
     659 
     660    my ($user,$group,$mode) ; 
     661    $user = $this->expand_arg($args{user}) if exists $args{user} ; 
     662    $group = $this->expand_arg($args{group}) if exists $args{group} ; 
     663    $mode = $this->expand_arg($args{mode}) if exists $args{mode} ; 
     664 
     665    my @args = $this->expand_args(@$cmd_args) ; 
     666    $file = $this->expand_arg($cmd_args->[0]) ; 
     667    $dest = $this->expand_arg($cmd_args->[1]) ; 
     668 
     669    $log->info("on $this->{machine}: starting 'put $file'") ; 
    605670 
    606671    my $path = $this->_locate($file) ; 
     
    610675            , $path 
    611676           ) unless defined($path) and -f $path ; 
     677    printf("    template: %s\n    destination: %s\n",$path,$args[1]) ; 
    612678 
    613679    #$this->{args} = [ $path, $dest ] ; 
     
    619685    #$this->_setenv() ; 
    620686 
    621     print "$path:\n","-"x10,"\n" if $args{"expand"} ; 
     687    $log->debug("expand","-- begin of expansion for $path:") ; 
    622688    my $localfile = $config->get("tmp_dir")."/$file.$$" ; 
    623689    my $tmpl = new Text::Template ( TYPE => 'FILE', SOURCE => $path ) or Log::err("can't create template",1) ; 
     
    625691    chmod(0700,$localfile) or warn "WARN: $!\n" ; 
    626692    { 
    627       my $fillin_args = { OUTPUT => $args{"expand"}?\*STDOUT:\*F, HASH=>{$this->_hash4vars()}} ; 
    628       $fillin_args->{DELIMITERS} = \@delim if @delim ; 
     693      my $fillin_args = { OUTPUT => $this->{debug} eq "expand"?\*STDOUT:\*F, HASH=>{$this->_hash4vars()}} ; 
     694      $fillin_args->{DELIMITERS} = $args{delimiters} if exists $args{delimiters} ; 
    629695      $fillin_args->{BROKEN} = \&my_broken ; 
    630696      #$fillin_args->{BROKEN_ARG} = { path=>$path, localfile=>$localfile } ; 
    631697      $tmpl->fill_in(%$fillin_args) or Log::err("Partial result can be found in '$localfile",4) ; 
    632698    } 
    633     print "-"x10,"\n" if $args{"expand"} ; 
     699    $log->debug("expand","-- end of expansion for $path") ; 
    634700    $log->info("on $this->{machine}: create '$localfile' on localhost") ; 
     701    close(F) ; 
    635702 
    636703    { 
     
    640707      ::mysystem($cmdline) unless $args{"dry-run"} ; 
    641708 
    642       if ($modflag) 
     709      if (defined($mode)) 
    643710      { 
    644711        $cmdline = sprintf($this->get("chmod_fmt"),$mode,$dest) ; 
     
    646713        $log->info("on $this->{machine}: execute '$cmdline'") ; 
    647714        ::mysystem($cmdline) unless $args{"dry-run"} ; 
    648  
     715      } 
     716 
     717      if (defined($user) || defined($group)) 
     718      { 
     719        my $user = defined($user) ? $user : "" ; 
     720        my $group = defined($group) ? $group : "" ; 
    649721        $cmdline = sprintf($this->get("chown_fmt"),$user,$group,$dest) ; 
    650722        $cmdline = sprintf($config->get("rexec_fmt"),$machine,$cmdline) ; 
     
    694766    my $h ; 
    695767 
     768    #template variables 
     769    while (my($k,$v) = each %{$this->{templatedata}}) 
     770    { 
     771      $h->{$k} = $v ; 
     772    } 
     773 
     774    # global variables 
    696775    while (my($k,$v) = each %{$this->{data}}) 
    697776    { 
    698777      $h->{$k} = $v unless $k eq "machine" ; 
    699778    } 
     779 
     780    # machine variables 
    700781    while (my($k,$v) = each %{$this->{data}{"machine"}{$this->{machine}}}) 
    701782    { 
    702783      $h->{$k} = $v ; 
    703784    } 
     785 
    704786    #$h->{"machine"} = $this->{machine} ; 
    705787    $h->{"MACHINE"} = $this->{machine} ; 
     
    712794    push(@{$h->{"MACHINE_NAME"}},keys %{$define->{"machine"}}) ; 
    713795    { 
    714       $log->debug("\n".('-'x40)."\nenvironment variables:\n") ; 
     796      $log->debug("env","\n".('-'x40)."\nenvironment variables:\n") ; 
    715797      while (my($k,$v)=each(%ENV)) 
    716798      { 
    717         $log->debug("$k=$v") if $k=~/^PLACO/ ; 
    718       }   
    719     } 
    720     $log->debug("\n".('-'x40)."\ndata passed to the template:\n\n".Dumper($h)) ; 
     799        $log->debug("env","$k=$v") if $k=~/^PLACO/ ; 
     800      } 
     801    } 
     802    $log->debug("data","\n".('-'x40)."\ndata passed to the template:\n\n".Dumper($h)) ; 
    721803    return %$h ; 
    722804  } 
     
    763845  { 
    764846    my($this) = @_ ; 
    765      
     847 
    766848    printf("INFO: placo main configuration file: %s\n",$config->{path}) ; 
    767849    printf("INFO: placo shell: %s\n",$this->get("PLACOSH")) ; 
     
    769851    printf("INFO: main definition file for this platform: %s\n",$config->{conf}{DEFINITION_FILE}) ; 
    770852    $this->is_set( qw/ 
    771             admin_dn  
    772             admin_pw ldap_root_pw ldap_bindpw  
    773             root_mysql_passwd  
    774             proxy_addr external_gateway_addr dns_addr smtp_relay_addr  
    775             external_hostname  
     853            admin_dn 
     854            admin_pw ldap_root_pw ldap_bindpw 
     855            root_mysql_passwd 
     856            proxy_addr external_gateway_addr dns_addr smtp_relay_addr 
     857            external_hostname 
    776858            external_interface 
    777859    /) ; 
     
    796878    for my $v (@vars) 
    797879    { 
    798       next unless exists($this->{define}{$v}) &&  
    799                   defined($this->{define}{$v}) &&  
     880      next unless exists($this->{define}{$v}) && 
     881                  defined($this->{define}{$v}) && 
    800882                  ($this->{define}{$v}=~/^\s*$/) ; 
     883 
    801884      $ok = 0 ; 
    802885      printf("ERROR: variable '%s' is not %s in defines files\n" 
     
    814897    return $this->{define}{$var} ; 
    815898  } 
    816    
     899 
    817900  #--------------------- 
    818901  sub like_email 
     
    826909      next if $s =~/\w@\w+\.\w+/ ; 
    827910      $ok = 0 ; 
    828       printf("ERROR: variable '$v' isn't a email address: '$s'\n") ;  
     911      printf("ERROR: variable '$v' isn't a email address: '$s'\n") ; 
    829912    } 
    830913    exit(12) unless $ok ; 
     
    9401023{ 
    9411024  my($my,$env) = @_ ; 
    942    
     1025 
    9431026  $$my = $ENV{$env} if (exists($ENV{$env}) && $ENV{$env}=~/\S/) ; 
    9441027} 
     
    9471030{ 
    9481031  my ($my,$env) = @_ ; 
    949    
     1032 
    9501033  $ENV{$env} = $my if defined($my) && $my=~/\S/ ; 
    9511034} 
     
    9551038  my ($my,$conf) = @_ ; 
    9561039  $$my = $config->get($conf) unless defined($$my) && $$my=~/\S/ ; 
    957 }   
     1040} 
    9581041 
    9591042#--------------------- 
     
    9871070$screen->fdopen($SCREEN_HANDLE,"a") or die ; 
    9881071 
    989 my($verbose,$debug,$rexec,$lexec,$put,$machine,$config_file,$platform,$placomgr,$placosh) ; 
     1072my($verbose,$debug,$rexec,$lexec,$put,$machine,$config_file,$platform,$placomgr,$placosh,$op) ; 
    9901073 
    9911074# first, initialize from the environment 
     
    10051088        \%args 
    10061089        , "h|help" => \&usage 
    1007   , "man" => \&man 
     1090        , "man" => \&man 
    10081091        , "v|verbose+" => \$verbose 
    1009         , "d|debug+" => \$debug 
     1092        , "d|debug=s" => \$debug 
    10101093        , "C=s" => \$config_file 
    10111094        , "m|machine=s" => \$machine 
     
    10131096        , "l|lexec=s" => \$lexec 
    10141097        , "p|put=s" => \$put 
     1098        , "user=s" 
     1099        , "group=s" 
     1100        , "mode=s" 
    10151101        , "dry-run" 
    10161102        , "no-cleanup" 
    10171103        , "expand" 
    10181104        , "broadcast" 
     1105        , "delimiters=s" 
    10191106        , "P|platform=s" => \$platform 
    10201107) or usage("") ; 
    10211108 
    1022 $args{"dry-run"} = 1 if $args{"expand"} ; 
    1023  
    10241109if ($this_prog eq "placomgr") 
    10251110{ 
    1026   Log::err("--rexec, --lexec, --put, --man or --help required !",5) 
    1027     unless defined $rexec or defined $lexec or defined $put ; 
    1028 } 
    1029  
    1030 $log = new Log($debug?2:$verbose?1:0) ; 
     1111  $op = shift() or usage() ; 
     1112  Log::err("unknown operation '$op' !",5) unless $op=~/^(rexec|lexec|put|man|help)$/ ; 
     1113 
     1114  # args manipulation 
     1115  $args{"dry-run"} = 1 if $debug && ($debug eq "expand") ; 
     1116  if (exists $args{"delimiters"}) 
     1117  { 
     1118    my @l = split(/\s*,\s*/,$args{"delimiters"}) ; 
     1119    Log::err("bad syntax for delimiters !",5) 
     1120      unless scalar(@l)==2 ; 
     1121    $args{"delimiters"} = \@l ; 
     1122  } 
     1123  else 
     1124  { 
     1125    $args{"delimiters"} = ['{!','!}'] ; 
     1126  } 
     1127 
     1128  if ($op =~ /exec$/) 
     1129  { 
     1130    Log::err("argument missing for $op !\nusage: $op template",5) if scalar(@ARGV)<1 ; 
     1131    Log::err("too many arguments for $op !\nusage: $op template",5) if scalar(@ARGV)>1 ; 
     1132  } 
     1133 
     1134  if ($op eq "put") 
     1135  { 
     1136    Log::err("arguments missing for put !\nusage: put template target",5) if scalar(@ARGV)<2 ; 
     1137    Log::err("too many arguments for put !\nusage: put template",5) if scalar(@ARGV)>2 ; 
     1138  } 
     1139  else 
     1140  { 
     1141    for my $o ("user","mode","group") 
     1142    { 
     1143      Log::err("option '$o' only permitted for operation 'put' !",5) if exists $args{$o} ; 
     1144    } 
     1145  } 
     1146} 
     1147 
     1148$log = new Log($verbose,$debug) ; 
    10311149 
    10321150if ($config_file) 
     
    10451163$config->load() ; 
    10461164$config_file = $config->get_path() ; 
    1047 $log->debug("config file used: ".$config_file) ; 
     1165$log->debug("file","config file used: ".$config_file) ; 
    10481166 
    10491167# last, local initialisation from the config file 
     
    10781196    unless -e $config->{conf}{DEFINITION_FILE} ; 
    10791197} 
    1080 $log->debug("\n".('-'x80)."configuration data:\n\n".Dumper($config)) ; 
    1081  
    1082 if ($this_prog eq "placosh" )  
    1083 {  
    1084   placosh($verbose,$debug,$platform) ;  
    1085   exit 0 ;  
     1198$log->debug("conf","\n".('-'x80)."configuration data:\n\n".Dumper($config)) ; 
     1199 
     1200if ($this_prog eq "placosh" ) 
     1201{ 
     1202  placosh($verbose,$debug,$platform) ; 
     1203  exit 0 ; 
    10861204} 
    10871205 
     
    10891207  my $defdir = dirname($config->get_path()) ; 
    10901208  my $conf ; 
    1091  
    1092   my $ret = eval { $conf = new Config::General( 
    1093     -ConfigFile=>$config->{conf}{DEFINITION_FILE} 
     1209  my $file = $config->{conf}{DEFINITION_FILE} ; 
     1210 
     1211  $log->debug("file","load '$file'") ; 
     1212  my $ret = eval { 
     1213  $conf = new Config::General( 
     1214    -ConfigFile=>$file 
    10941215    , -InterPolateVars=>1 
    10951216    , -UseApacheInclude=>1 
     
    11011222    , -ConfigPath=>[$defdir,$config->get("lib_dir")."/etc"] 
    11021223    , -MergeDuplicateBlocks=>1 
    1103     ) } ; 
     1224    ) 
     1225    } ; 
    11041226  unless ($ret) 
    11051227  { 
    1106     my @l = split("\n",$@) ; 
    1107     pop @l ; 
    1108     Log::err(sprintf("%s\n",join("\n",@l)),11) ; 
     1228    $@ =~ s/Config::General *// ; 
     1229    $@ =~ s/! at.*// ; 
     1230    Log::err($@,11) ; 
    11091231  } 
    11101232 
     
    11181240  $define->{ETC_DIR} = $config->get("etc_dir") ; 
    11191241} 
    1120 $log->debug("\n".('-'x80)."whole definition data:\n\n".Dumper($define)) ; 
     1242$log->debug("define","\n".('-'x80)."whole definition data:\n\n".Dumper($define)) ; 
    11211243 
    11221244if ($this_prog eq "placocheck" ) 
     
    11331255  Log::err(sprintf("undefined machine '$machine' in %s !",$config->get("definition_files")->{$platform}),6) unless exists $define->{"machine"}{$machine} ; 
    11341256  push(@machines,$machine) ; 
     1257  $define->{BROADCAST} = 0 ; 
    11351258} 
    11361259else 
     
    11381261  # perform every machine 
    11391262  @machines = keys %{$define->{"machine"}} ; 
     1263  $define->{BROADCAST} = 1 ; 
    11401264} 
    11411265 
     
    11451269  my $fqm = $m ; 
    11461270  $fqm .= ".$platform" unless $m eq "localhost" ; 
    1147   my $placo = new PlacoMrg($define,$m,$fqm) ; 
     1271  my $placo = new PlacoMrg($define,$m,$fqm,$debug||"") ; 
    11481272  next unless defined $placo ; 
    11491273 
    11501274  my ($code,$msg,$trace) ; 
    11511275 
    1152   ($code,$msg,$trace) = $placo->run_rexec($rexec) if defined($rexec) ; 
    1153   ($code,$msg,$trace) = $placo->run_lexec($lexec) if defined($lexec) ; 
    1154   ($code,$msg,$trace) = $placo->run_put($put) if defined($put) ; 
     1276  ($code,$msg,$trace) = $placo->run_rexec($ARGV[0]) if $op eq "rexec" ; 
     1277  ($code,$msg,$trace) = $placo->run_lexec($ARGV[0]) if $op eq "lexec" ; 
     1278  ($code,$msg,$trace) = $placo->run_put(\@ARGV,\%args) if $op eq "put" ; 
    11551279 
    11561280  if ($code==2) { Log::err("on $m: $msg",9) ; } 
    1157   elsif($code==1) { print "on $m: $msg\n" ; } 
    1158   else  
    1159   {  
    1160     print "on $m: $msg\n" ; $done++  ; 
    1161     $screen->printf(" OK (0)\n") ;  
     1281  elsif($code==1) { print "< on $m: $msg\n" ; } 
     1282  else 
     1283  { 
     1284    print "< on $m: $msg\n" ; $done++  ; 
     1285    $screen->printf(" OK (0)\n") ; 
    11621286  } 
    11631287} 
     
    11881312=head1 DESCRIPTION 
    11891313 
    1190 placosh is the PLACO shell. It is a simple invocation of bash with an particular environment  
     1314placosh is the PLACO shell. It is a simple invocation of bash with an particular environment 
    11911315(PATH, etc.) suitable to facilitate the interactive executions of PLACO scripts. 
    11921316In particular, inside placosh, toplevel scripts can be interactively called without an explicit path, 
     
    11951319placomgr is the PLACO platform manager, for templates expansion and scripts execution. It assumes 3 sequential tasks at each invocation : 
    11961320  - read the platform specification 
    1197   - scan the templates repository to find, according to the specifications, an appropriate template,  
    1198   - expanse the selected template to produce a local temporaty file  
     1321  - scan the templates repository to find, according to the specifications, an appropriate template, 
     1322  - expanse the selected template to produce a local temporaty file 
    11991323  - perform the operation specified on the command line invocation onto this temporary expanded file. 
    12001324 
    1201 The template is either a template of script or either a template of configuration file.  
    1202 So the expansion gives either a script, either a configuration file.  
     1325The template is either a template of script or either a template of configuration file. 
     1326So the expansion gives either a script, either a configuration file. 
    12031327This must be coherent with the requested operation : a put for a configuration file, and a rexec or a lexec for a script. 
    12041328 
     
    12091333=item -C config_file 
    12101334 
    1211 specify an alternate configuration file. Default if /etc/placo.conf in production mode  
     1335specify an alternate configuration file. Default if /etc/placo.conf in production mode 
    12121336(see DIRECTORIES DISTRIBUTION below, for the devel mode). 
    12131337 
    1214 =item -d --debug,  
    1215  
    1216 debug mode, useful to show the data stucture, comming from the specification, and used to fill the template. 
    1217    
     1338=item -d tag, --debug tag, 
     1339 
     1340debug mode, to show internal data structures. 
     1341possible tags are : conf, data, define, env, expand, file 
     1342 
     1343=item --delimiters "seq,seq" 
     1344 
     1345Specify delimiters for begin/end Perl code (default is { and }). 
     1346For example, --delimiters "{-,-}" meens that the Perl code are delimitered with {- and -} inside the template. 
     1347 
    12181348=item --dry-run 
    12191349 
    1220 no action is performed, but templates is however expansed  
     1350no action is performed, but templates is however expansed 
    12211351(useful in conjonction with --no-cleanup, for debugging) 
    12221352 
    12231353=item -m, --machine machine_name 
    12241354 
    1225 perform the operation only on the machine_name.  
     1355perform the operation only on the machine_name. 
    12261356Note that the operation is really performed only if an according directive is found in the specification for that machine. 
    12271357 
     
    12501380=over 4 
    12511381 
    1252 =item -p, --put template 
    1253  
    1254 copy the expansed template to machines. 
    1255 The machines must have a directive : 
    1256  
    1257   put template directory 
    1258    
    1259 The expansed template is transferred into the specified directory, 
    1260 which can differs between the machines. 
    1261  
    1262 Perl code delimiters can be specified with [] following the template name  
    1263 (default are '{' and '}'). For example : 
    1264  
    1265   put template['{-','-}'] directory 
    1266    
    1267 meens that the Perl code are delimitered with {- and -} inside the template. 
    1268  
    1269 A user, group and mode can be specified with the syntax [user,group,mode] 
    1270 following the directory name. 
    1271 This gives the owner, group and mode for the target file. For example : 
    1272  
    1273   put slapd.conf /etc/openldap/slapd.conf[ldap,ldap,600] 
    1274  
    1275 =item  -r, --rexec template 
     1382=item -p, --put "template destination [u:user] [g:group] [m:mode]" 
     1383 
     1384copy the expansed template on 'destination' onto machines. 
     1385Arguments can have the form {var}, which meens the value of the variable 'var'. 
     1386user, group and mode give the owner, group and mode for the target file. For example : 
     1387 
     1388  --put "slapd.conf /etc/openldap/slapd.conf u:{ldap_user} g:{ldap_group} m:600" 
     1389 
     1390=item  -r, --rexec "template [args]" 
    12761391 
    12771392exec the expansed template on machines. 
    1278 The machines must have a directive : 
    1279  
    1280   rexec template  
    1281    
    1282 As above, Perl code delimiters can be specified with [] following the template  
    1283 name. For example : 
    1284  
    1285   rexec template['{{','}}']  
    1286    
    1287 meens that the Perl code are delimitered with {{ and }} inside the template. 
    1288  
    1289 =item  -l, --lexec template 
     1393As above, arguments can have the form {var}, which meens the value of the variable 'var'. 
     1394 
     1395=item  -l, --lexec "template [args]" 
    12901396 
    12911397exec the expansed template on the local host. 
    1292 The machines must have a directive : 
    1293  
    1294   lexec template  
    1295    
    1296 As above, Perl code delimiters can be specified with [] following the template  
    1297 name. For example : 
    1298  
    1299   lexec template['@','@']  
    1300    
    1301 meens that the Perl code are delimitered with @ and @ inside the template. 
     1398As above, arguments can have the form {var}, which meens the value of the variable 'var'. 
    13021399 
    13031400=back 
     
    13071404An operation is applied on a machine if and only if a directive with the same name is specified for the machine on the specification file. 
    13081405 
    1309 So, in the case where the operation is targetted to a given machine (with --machine),  
     1406So, in the case where the operation is targetted to a given machine (with --machine), 
    13101407then if this machine have a directive with a such name, the operation is performed, 
    13111408otherwise nothing is performed. 
     
    13201417The template is filled with values defined in the specifications. 
    13211418But not the whole values are passed : 
    1322 for a given machine, only the corresponding section are passed  
     1419for a given machine, only the corresponding section are passed 
    13231420(but a machine inherits of the global variables, ie variables defined outside any 'machine' section). 
    13241421 
    13251422=head1 PLATFORM DEFINITION 
    13261423 
    1327 This is specification of the platform.  
    1328 In production mode, the it stands on the /etc/default.defines file  
     1424This is specification of the platform. 
     1425In production mode, the it stands on the /etc/default.defines file 
    13291426(see DIRECTORIES DISTRIBUTION below, for the devel mode). 
    13301427 
    1331 The defintion file is processed by T. Linden's Config::General Perl module.  
     1428The defintion file is processed by T. Linden's Config::General Perl module. 
    13321429and its syntax is an apache config-like one. 
    13331430 
    1334 =head2 Significant directives/variables/sections  
     1431=head2 Significant directives/variables/sections 
    13351432 
    13361433Some variables/sections are signifiants for placomgr : 
     
    13421439  hierarchy variable_name 
    13431440 
    1344 This mandatory variable indicates which variable is used to organize  
     1441This mandatory variable indicates which variable is used to organize 
    13451442the decomposition od the template repository. 
    1346 This value must be coherent with the templates repository structure.  
     1443This value must be coherent with the templates repository structure. 
    13471444 
    13481445Currently, in the standard distribution of PLACO, the template repository is structured by os. 
    13491446So the value of hierarchy must be "OS". Any change implics another templates repository structure. 
    13501447 
    1351 Templates are first searched in the directory mapped with the current OS value,  
     1448Templates are first searched in the directory mapped with the current OS value, 
    13521449and if not found, the search go on to the parent directories, 
    13531450until to reach the root directory of the repository. 
     
    13551452=item lexec 
    13561453 
    1357   lexec template_name  
    1358    
     1454  lexec template_name 
     1455 
    13591456This variable indicates that the current machine authorize the local host 
    13601457to exec the expansed template_name. 
    13611458 
    1362 =item machine  
     1459=item machine 
    13631460 
    13641461  <machine machine_name> 
    13651462    ... 
    13661463  </machine> 
    1367    
    1368 Each machine (virtual and local host) must have its own 'machine' section, to store its own variables.  
     1464 
     1465Each machine (virtual and local host) must have its own 'machine' section, to store its own variables. 
    13691466 
    13701467=item OS 
     
    13721469  OS os_name 
    13731470 
    1374 This variable says which operating system is used by a machine.  
     1471This variable says which operating system is used by a machine. 
    13751472It is significant only if the hierarchy value is 'OS'. 
    13761473In this case, each machine must have its own OS value (possibly inherited). 
     
    13811478 
    13821479  put template_name directory_name 
    1383    
    1384 This variable indicates that the current machine accepts to upload  
     1480 
     1481This variable indicates that the current machine accepts to upload 
    13851482 the expansed template_name into its directory directory_name. 
    13861483 
    13871484=item rexec 
    13881485 
    1389   rexec template_name  
    1390    
    1391 This variable indicates that the current machine accepts to exec  
     1486  rexec template_name 
     1487 
     1488This variable indicates that the current machine accepts to exec 
    13921489the expansed template_name. 
    13931490 
     
    13981495A defintion file can include others definition files, 
    13991496which are searched in the same directory where its parent resides, 
    1400 and, if not found, in /usr/lib/placo/etc directory   
     1497and, if not found, in /usr/lib/placo/etc directory 
    14011498(see DIRECTORIES DISTRIBUTION below, for the devel mode). 
    14021499 
     
    14061503 
    14071504=head2 Templates repository tree 
    1408   
     1505 
    14091506It contains file templates (which produce configuration files), and script templates. 
    14101507A template can be OS dependent. 
    14111508 
    1412 An expansed template script performs basic treatments,  
     1509An expansed template script performs basic treatments, 
    14131510in destination of a unique machine, for a given OS. 
    1414 Ttypically, this script install or configure  
     1511Ttypically, this script install or configure 
    14151512a package on a machine running a given OS. 
    14161513 
    14171514Its places in the tree determines the OS for which it can be used. 
    14181515 
    1419 For example, with hierarchy=OS, a template located in the directory named 'rpm'  
     1516For example, with hierarchy=OS, a template located in the directory named 'rpm' 
    14201517means that it can be expanded for every machines : 
    1421   - with OS=rpm, or  
     1518  - with OS=rpm, or 
    14221519  - with any OS which can be mapped with a directory located in the subtree of the 'rpm' directory. 
    14231520 
    14241521Theses templates are expanded by placomgr. 
    14251522 
    1426 =head2 The middleware directory  
     1523=head2 The middleware directory 
    14271524 
    14281525This directory contains scripts which aggregate several operations on a machine. 
    14291526 
    14301527A such script can : 
    1431   - execute scripts located in the template repository, and  
    1432   - perform files transfert  
     1528  - execute scripts located in the template repository, and 
     1529  - perform files transfert 
    14331530 
    14341531to accomplish a aggegated operation on a given machine. 
    1435 It must perform transfert and execution only via  
     1532It must perform transfert and execution only via 
    14361533put, rexec or lexec operations, though placomgr invocation. 
    14371534Respecting this rule, a middleware script is OS independant. 
     
    14411538 
    14421539=head2 The toplevel directory 
    1443   
     1540 
    14441541This directroy contains scripts for macro treatments. 
    14451542They only must perform calls to the middleware scripts. 
    14461543 
    1447 Typically, a toplevel script installs or configures a macro service,  
     1544Typically, a toplevel script installs or configures a macro service, 
    14481545possibly depending of several machines. 
    14491546 
     
    14581555    /etc/placo.d/placo.conf 
    14591556 
    1460 searched in this order (see DIRECTORIES DISTRIBUTION below, for the devel mode).  
     1557searched in this order (see DIRECTORIES DISTRIBUTION below, for the devel mode). 
    14611558You can also define a shell environment variable PLACOPATH (a string PATH-like) to change this behavour. 
    14621559 
    14631560placo.conf fixes the value of some global parameters, reflecting the current installation. 
    14641561 
    1465 See the placo.conf-dist file to have the whole allowed variables and  
     1562See the placo.conf-dist file to have the whole allowed variables and 
    14661563theirs respective default values. 
    14671564 
     
    14721569=head1 DIRECTORIES DISTRIBUTION 
    14731570 
    1474 In a production installation (resulting of an 'install.sh' execution with no arg),  
     1571In a production installation (resulting of an 'install.sh' execution with no arg), 
    14751572the files are dispatched in : 
    14761573  /etc/placo : configuration and definition files 
     
    14901587 
    14911588More informations about the project can be found on http://placodev.mathrice.fr. 
    1492    
     1589 
    14931590Some Perl modules documentation are useful to understand how works placomgr 
    14941591and to learn its capabilities : 
  • trunk/lib/template/apache_status.conf

    r983 r1094  
    1 { # $Id$ } 
    2 { # maintainer: Benoit Metrot} 
    3 # {$TEMPLATE}: processed by {$ENV{USER}} with {$0} from {$_ARGV[0]} 
     1{! # $Id$ !} 
     2{! # maintainer: Benoit Metrot !} 
     3# generated from PLACO template: {!$TEMPLATE!} $Rev$ 
    44 
    55<IfModule mod_status.c> 
  • trunk/lib/template/auth_ldap_sympa

    r616 r1094  
    1 { # $Id: auth_sympa.sh 390 2009-07-24 07:15:12Z damien $ } 
    2 { # maintainer: Damien Ferney } 
    3 { # comment: 
     1{! # $Id: auth_sympa.sh 390 2009-07-24 07:15:12Z damien $ !} 
     2{! # maintainer: Damien Ferney !} 
     3{! # comment: 
    44  #  install le fichier de auth.conf  
    5 } 
     5!} 
     6# generated from PLACO template: {!$TEMPLATE!} $Rev: $ 
    67 
    78# Authentication services for Sympa 
     
    1314host proxy 
    1415timeout 30 
    15 suffix ou=People,{$ldap_root} 
     16suffix ou=People,{!$ldap_root!} 
    1617get_dn_by_uid_filter (uid=[sender]) 
    1718get_dn_by_email_filter (mail=[sender]) 
     
    2425host proxy 
    2526timeout 30 
    26 suffix ou=People,{$ldap_root} 
    27 bind_dn {$ldap_attr}={$ldap_binddn},ou=People,{$ldap_root} 
    28 bind_password {$ldap_bindpw} 
     27suffix ou=People,{!$ldap_root!} 
     28bind_dn {!$ldap_attr!}={!$ldap_binddn!},ou=People,{!$ldap_root!} 
     29bind_password {!$ldap_bindpw!} 
    2930get_dn_by_uid_filter (uid=[sender]) 
    3031get_dn_by_email_filter (mail=[sender]) 
     
    3233#alternative_email_attribute mailalternateaddress,ur1mail 
    3334scope sub 
    34 authentication_info_url https://{$external_hostname}/lists/wws 
     35authentication_info_url https://{!$external_hostname!}/lists/wws 
    3536 
    3637user_table 
  • trunk/lib/template/conf_sympa

    r784 r1094  
    1111log_socket_type unix 
    1212log_level       0 
    13 domain {$external_cname_lists} 
    14 listmaster      {$listmaster} 
     13domain {!$external_cname_lists!} 
     14listmaster      {!$listmaster!} 
    1515email   sympa 
    1616lang    fr 
     
    3939db_host proxy 
    4040db_user sympa 
    41 db_passwd       {$sympa_mysql_password} 
    42 wwsympa_url     https://{$external_cname_lists}/wws 
     41db_passwd       {!$sympa_mysql_password!} 
     42wwsympa_url     https://{!$external_cname_lists!}/wws 
    4343supported_lang  fr,en_US 
  • trunk/lib/template/config_postfix_list

    r812 r1094  
    1919smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key 
    2020smtpd_use_tls=yes 
    21 smtpd_tls_session_cache_database = btree:$\{data_directory\}/smtpd_scache 
    22 smtp_tls_session_cache_database = btree:$\{data_directory\}/smtp_scache 
     21smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache 
     22smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache 
    2323 
    2424# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for 
    2525# information on enabling SSL in the smtp client. 
    26 myhostname =  {$external_cname_lists} 
     26myhostname =  {!$external_cname_lists!} 
    2727alias_maps = hash:/etc/aliases,hash:/etc/mail/sympa.aliases 
    2828alias_database = hash:/etc/mail/sympa.aliases 
    2929transport_maps = hash:/etc/postfix/transport 
    3030myorigin = $myhostname 
    31 mydestination = $myhostname, {$hostname}, localhost 
    32 relayhost = {$smtp_relay_addr} 
     31mydestination = $myhostname, {!$hostname!}, localhost 
     32relayhost = {!$smtp_relay_addr!} 
    3333mynetworks = 127.0.0.0/8  
    3434# seulement si le postfix de sympa joue le role de postfix pour toutes les VM  
     
    3737recipient_delimiter = + 
    3838inet_interfaces = all 
    39 proxy_interfaces = {$proxy_addr} 
     39proxy_interfaces = {!$proxy_addr!} 
  • trunk/lib/template/deb/config_debconf_sympa

    r831 r1094  
    11sympa   sympa/key_password_again        password 
    2 sympa   sympa/db_adminpasswd    password        {$root_mysql_passwd} 
    3 sympa   sympa/db_passwd password        {$sympa_mysql_password} 
    4 sympa   sympa/db_passwd_again   password        {$sympa_mysql_password} 
     2sympa   sympa/db_adminpasswd    password        {!$root_mysql_passwd!} 
     3sympa   sympa/db_passwd password        {!$sympa_mysql_password!} 
     4sympa   sympa/db_passwd_again   password        {!$sympa_mysql_password!} 
    55sympa   sympa/key_password      password 
    66sympa   wwsympa/webserver_type  select  Apache 2 
    7 sympa   wwsympa/wwsympa_url     string  http://{$hostname}/wws 
    8 sympa   sympa/listmaster        string  {$listmaster} 
     7sympa   wwsympa/wwsympa_url     string  http://{!$hostname!}/wws 
     8sympa   sympa/listmaster        string  {!$listmaster!} 
    99sympa   wwsympa/webserver_restart       boolean true 
    10 sympa   sympa/hostname  string  {$hostname} 
     10sympa   sympa/hostname  string  {!$hostname!} 
    1111sympa   sympa/db_options        string 
    1212sympa   sympa/wwsympa_configured        boolean false 
  • trunk/lib/template/deb/install_apache_hobbit.sh

    r662 r1094  
    11#!/bin/bash 
    2 { # $Id$ } 
    3 { # maintainer:  } 
    4 { # comment:  } 
     2{! # $Id$ !} 
     3{! # maintainer:  !} 
     4{! # comment:  !} 
    55 
    66apt-get -y install apache2 
  • trunk/lib/template/deb/install_debconf_debconf.sh

    • Property svn:keywords set to LastChangedDate Id URL Author Rev LastChangedRevision
    r496 r1094  
    1 { # $Id:$ } 
    2 { # maintainer: Damien Ferney } 
     1{! # $Id$ !} 
     2{! # maintainer: Damien Ferney !} 
    33 
    44debconf-set-selections /root/config_debconf_debconf 
  • trunk/lib/template/deb/install_debconf_utils.sh

    • Property svn:keywords set to LastChangedDate Id URL Author Rev LastChangedRevision
    r496 r1094  
    1 { # $Id:$ } 
    2 { # maintainer: Damien Ferney } 
     1{! # $Id$ !} 
     2{! # maintainer: Damien Ferney !} 
    33 
    44#export TERM=xterm 
  • trunk/lib/template/deb/install_horde.sh-disabled

    r437 r1094  
    11#!/bin/bash 
    2 { # $Id: install_horde.sh 390 2009-07-24 07:15:12Z jaclin $ } 
    3 { # maintainer: Jacquelin Charbonnel } 
    4 { # comment: 
     2{! # $Id: install_horde.sh 390 2009-07-24 07:15:12Z jaclin $ !} 
     3{! # maintainer: Jacquelin Charbonnel !} 
     4{! # comment: 
    55  #  install HORDE  
    6 } 
     6!} 
     7# generated from PLACO template: {!$TEMPLATE!} $Rev: $ 
    78 
    89vh=$1 
     
    1213url=$horde_url/$file 
    1314 
    14 wget -q -P {$spool_dir} $url 
    15 cd {$spool_dir} 
     15wget -q -P {!$spool_dir!} $url 
     16cd {!$spool_dir!} 
    1617tar zxf $file 
    1718rm -f $file 
    18 mv horde-groupware* {$htdocs}/vh1/horde 
     19mv horde-groupware* {!$htdocs!}/vh1/horde 
    1920 
    20 cd {$htdocs}/vh1/horde 
     21cd {!$htdocs!}/vh1/horde 
    2122echo "create database horde;" | mysql  
    2223echo -e "\n1\nmysql\n0\nroot\n\n\n\nhorde\n\n\n\n\n2\n\nroot\n\n\n0\n" | php scripts/setup.php  
  • trunk/lib/template/deb/install_pkg.sh

    r337 r1094  
    11#!/bin/bash 
    2 { # $Id$ } 
    3 { # maintainer: Jacquelin Charbonnel } 
     2{! # $Id$ !} 
     3{! # maintainer: Jacquelin Charbonnel !} 
    44 
    55PKG=$* 
  • trunk/lib/template/deb/install_proftpd.sh

    r672 r1094  
    11#!/bin/bash 
    2 { # $Id$ } 
    3 { # maintainer: Nicolas Vuilmet } 
     2{! # $Id$ !} 
     3{! # maintainer: Nicolas Vuilmet !} 
    44 
    55apt-get -y install proftpd 
  • trunk/lib/template/deb/iptables

    r1013 r1094  
    11#!/bin/bash 
    2 { # $Id: iptables 541 2009-09-29 17:01:46Z vuilmet $ } 
    3 { # maintainer: Nicolas Vuilmet } 
    4 # {$TEMPLATE}: processed by {$ENV{USER}} with {$0} from {$_ARGV[0]} 
    5 { 
     2{! # $Id: iptables 541 2009-09-29 17:01:46Z vuilmet $ !} 
     3{! # maintainer: Nicolas Vuilmet !} 
     4# generated from PLACO template: {!$TEMPLATE!} $Rev: $ 
     5 
     6{! 
    67######## 
    78# 
     
    131132$OUT.="iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE\n"; 
    132133$OUT.="iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE\n"; 
    133  
     134$OUT.="echo 1 > /proc/sys/net/ipv4/ip_forward\n"; 
    134135} 
    135136} 
    136 } 
     137!} 
  • trunk/lib/template/deb/ubuntu/create-xen-image.sh

    r672 r1094  
    11#!/bin/bash 
    2 { # $Id$ } 
    3 { # maintainer:  } 
    4 { # comment:  } 
     2{! # $Id$ !} 
     3{! # maintainer:  !} 
     4{! # comment:  !} 
    55 
    66# Script pour la création d'image 
     
    99xenEtc=/etc/xen 
    1010 
    11 xen-create-image --hostname {$MACHINE} -ip {$internal_addr{$MACHINE}} 
     11xen-create-image --hostname {!$MACHINE!} -ip {!$internal_addr{$MACHINE}!} 
    1212setupcon 
    13 sed -i 's/file:/tap:aio:/' $xenEtc/{$MACHINE}.cfg 
    14 mv $xenEtc/{$MACHINE}.cfg $xenEtc/auto/ 
    15 xm create $xenEtc/auto/{$MACHINE}.cfg 
     13sed -i 's/file:/tap:aio:/' $xenEtc/{!$MACHINE!}.cfg 
     14mv $xenEtc/{!$MACHINE!}.cfg $xenEtc/auto/ 
     15xm create $xenEtc/auto/{!$MACHINE!}.cfg 
    1616 
    17 if [ "{$nb_interface}" == "2" ]; then 
     17if [ "{!$nb_interface!}" == "2" ]; then 
    1818  #superbe sed qui me permet de rajouter une interface réseau au proxy 
    19   sed -i "/^vif/s/'[^']*$/', 'mac="{$mac_addr}",bridge=brExt' ]/" $xenEtc/auto/{$MACHINE}.cfg 
     19  sed -i "/^vif/s/'[^']*$/', 'mac="{!$mac_addr!}",bridge=brExt' ]/" $xenEtc/auto/{!$MACHINE!}.cfg 
    2020fi 
  • trunk/lib/template/hobbit_bb-hosts

    r884 r1094  
     1# generated from PLACO template: {!$TEMPLATE!} $Rev$ 
     2 
    13# Master configuration file for Hobbit 
    24# 
     
    1618 
    1719 
    18 { 
     20{! 
    1921  foreach (sort(@MACHINE_NAME)) { 
    2022    if (m/^localhost$/) { next; } 
    2123    $OUT.=sprintf("%s\t%s\t# ssh\n", $internal_addr{$_}, $_); 
    2224  } 
    23 } 
     25!} 
  • trunk/lib/template/horde_hook

    r635 r1094  
     1# generated from PLACO template: {!$TEMPLATE!} $Rev: $ 
    12 
    23if (!function_exists('_horde_hook_authldap')) { 
  • trunk/lib/template/hosts

    r962 r1094  
    1 { # $Id$ } 
    2 { # maintainer: Benoit Metrot } 
    3 # {$TEMPLATE}: processed by {$ENV{USER}} with {$0} from {$_ARGV[0]} 
     1{! # $Id$ !} 
     2{! # maintainer: Benoit Metrot !} 
     3# generated from PLACO template: {!$TEMPLATE!} $Rev$ 
    44 
    55 
     
    77#::1             localhost6.localdomain6 localhost6 
    88 
    9 { 
     9{! 
    1010 
    1111  $OUT.="$internal_addr{$hostname}\t$hostname.$PLATFORM\t$hostname\n" ; 
     
    4040  } 
    4141 
    42 } 
     42!} 
  • trunk/lib/template/main_postfix_host

    r886 r1094  
    1 { # $Id$ } 
    2 { # maintainer: Benoit Métrot } 
    3 # {$TEMPLATE}: processed by {$ENV{USER}} with {$0} from {$_ARGV[0]} 
     1{! # $Id$ !} 
     2{! # maintainer: Benoit Métrot !} 
     3# generated from PLACO template: {!$TEMPLATE!} $Rev$ 
    44 
    55# See /usr/share/postfix/main.cf.dist for a commented, more complete version 
     
    99# is /etc/mailname. 
    1010myorigin = /etc/mailname 
    11 { 
     11{! 
    1212        $OUT.=sprintf("myhostname = %s\n",`hostname -f`); 
    13 } 
     13!} 
    1414 
    1515smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) 
     
    3434# information on enabling SSL in the smtp client. 
    3535 
    36 mydestination = $myhostname, {$hostname}, localhost.localdomain, localhost 
    37 relayhost = {$smtp_relay_addr} 
     36mydestination = $myhostname, {!$hostname!}, localhost.localdomain, localhost 
     37relayhost = {!$smtp_relay_addr!} 
    3838mynetworks = 127.0.0.0/8, 10.0.0.0/16 
    3939mailbox_size_limit = 0 
     
    4141inet_interfaces = all 
    4242 
    43 { 
     43{! 
    4444        my $str = ""; 
    4545        foreach (split(/\n/, `ls /etc/postfix/aliases.*`)) { 
     
    5050        $OUT.=sprintf("alias_maps = hash:/etc/aliases%s\n", $str); 
    5151        $OUT.=sprintf("alias_database = hash:/etc/aliases%s\n", $str); 
    52 } 
     52!} 
    5353 
    5454local_header_rewrite_clients = permit_inet_interfaces, permit_mynetworks 
    55 { 
     55{! 
    5656        my $str = ""; 
    5757        foreach (split(/\n/, `ls /etc/postfix/canonical_sender_*`)) { 
     
    6464        } 
    6565        $OUT.=sprintf("sender_canonical_maps = %s\n", $str); 
    66 } 
     66!} 
  • trunk/lib/template/munin-node.conf

    r727 r1094  
    1 { # $Id$ } 
    2 { # maintainer:  } 
    3 # {$TEMPLATE}: processed by {$ENV{USER}} with {$0} from {$_ARGV[0]} 
    4  
     1{! # $Id$ !} 
     2{! # maintainer:  !} 
     3# generated from PLACO template: {!$TEMPLATE!} $Rev$ 
    54 
    65# 
     
    3938 
    4039allow ^127\.0\.0\.1$ 
    41 { 
     40{! 
    4241    my $ip = $internal_addr{'placohost'}; 
    4342    $ip =~ s/\./\\./g; 
    4443    $OUT.= 'allow ^'.$ip.'$'."\n"; 
    45 } 
     44!} 
    4645 
    4746# Which address to bind to; 
    4847# host 127.0.0.1 
    49 { 
     48{! 
    5049    my $localip = $internal_addr{$hostname}; 
    5150    $OUT.="host $localip\n"; 
    52 } 
     51!} 
    5352 
    5453# And which port 
  • trunk/lib/template/network-placo

    r794 r1094  
    11#!/bin/bash 
     2 
     3# generated from PLACO template: {!$TEMPLATE!} $Rev: $ 
     4 
    25##============================================================================ 
    36# 
     
    5861brnet=${brnet:-10.0.0.0/24} 
    5962netmask=${netmask:-255.0.0.0} 
    60 bridge=${bridge:-brInt} 
     63bridge=${bridge:-brInt}   ## jaclin: !!! c'est louche que ce soit en dur !!! 
    6164 
    6265## 
  • trunk/lib/template/ntp_conf

    • Property svn:keywords set to Date Author Revision Id URL Rev LastChangedRev
    r604 r1094  
    1 { # $Id: $ } 
    2 { # maintainer: Nicolas Vuilmet } 
    3 # {$TEMPLATE}: processed by {$ENV{USER}} with {$0} from {$_ARGV[0]} 
     1{! # $Id$ !} 
     2{! # maintainer: Nicolas Vuilmet !} 
     3# generated from PLACO template: {!$TEMPLATE!} $Rev$ 
    44 
    55# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help 
     
    1212filegen clockstats file clockstats type day enable 
    1313 
    14 { 
     14{! 
    1515  for $s (split(/ +/,$ntp_server)) 
    1616    { 
    1717        $OUT.="server $s\n" ;    
    1818    } 
    19 } 
     19!} 
    2020restrict -4 default kod notrap nomodify nopeer noquery 
    2121restrict -6 default kod notrap nomodify nopeer noquery 
  • trunk/lib/template/rpm/centos/ifcfg-eth0

    r672 r1094  
    1 { # $Id$ } 
    2 { # maintainer:  } 
    3 # {$TEMPLATE}: processed by {$ENV{USER}} with {$0} from {$_ARGV[0]} 
     1{! # $Id$ !} 
     2{! # maintainer:  !} 
     3# generated from PLACO template: {!$TEMPLATE!} $Rev$ 
    44 
    55DEVICE=eth0 
    66BOOTPROTO=static 
    7 IPADDR={ $ips{$hostname} } 
    8 NETMASK={ $netmask } 
     7IPADDR={!$ips{$hostname}!} 
     8NETMASK={!$netmask!} 
  • trunk/lib/template/rpm/centos/iptables

    r1014 r1094  
    11#!/bin/bash 
    2 { # $Id$ } 
    3 { # maintainer: Jacquelin Charbonnel } 
    4 # {$TEMPLATE}: processed with {$0} from {$_ARGV[0]} 
     2{! # $Id$ !} 
     3{! # maintainer: Jacquelin Charbonnel !} 
     4# generated from PLACO template: {!$TEMPLATE!} $Rev$ 
    55 
    6 { 
     6{! 
    77  $host_rules = << "EOL" ; 
    88*filter 
     
    6060-A INPUT -p tcp -s $internal_host_addr  --dport 4949 -j ACCEPT 
    6161-A INPUT -p tcp -s $internal_gateway_addr --dport 80 -j ACCEPT 
    62 -A INPUT -j REJECT --reject-with icmp-host-prohibited 
    63 COMMIT 
    6462EOL 
    6563 
     
    109107        $OUT.="-A INPUT -p $proto -s $internal_gateway_addr --dport $dport -j ACCEPT\n"; 
    110108      } 
     109      $OUT.="-A INPUT -j REJECT --reject-with icmp-host-prohibited\n"; 
     110      $OUT.="COMMIT\n"; 
    111111      # end iptables for VMs 
    112112    } 
     
    129129    } 
    130130  } 
    131 } 
     131!} 
  • trunk/lib/template/rpm/centos/ldap.conf

    r672 r1094  
    1 { # $Id$ } 
    2 { # maintainer:  } 
    3 # {$TEMPLATE}: processed by {$ENV{USER}} with {$0} from {$_ARGV[0]} 
     1{! # $Id$ !} 
     2{! # maintainer:  !} 
     3# generated from PLACO template: {!$TEMPLATE!} $Rev$ 
    44 
    55ssl no 
    66tls_cacertdir /etc/openldap/cacerts 
    77pam_password md5 
    8 host {$ips{"ldap"}} 
    9 nss_base_passwd       ou={$ldap_users_ou},dc={$ldap_dc}?one 
    10 nss_base_group        ou={$ldap_groups_ou},dc={$ldap_dc}?one 
     8host {!$ips{"ldap"}!} 
     9nss_base_passwd       ou={!$ldap_users_ou!},dc={!$ldap_dc!}?one 
     10nss_base_group        ou={!$ldap_groups_ou!},dc={!$ldap_dc!}?one 
  • trunk/lib/template/rpm/centos/network

    r672 r1094  
    1 { # $Id$ } 
    2 { # maintainer:  } 
    3 # {$TEMPLATE}: processed by {$ENV{USER}} with {$0} from {$_ARGV[0]} 
     1{! # $Id$ !} 
     2{! # maintainer:  !} 
     3# generated from PLACO template: {!$TEMPLATE!} $Rev$ 
    44 
    55NETWORKING=yes 
    6 HOSTNAME={$hostname} 
    7 GATEWAY={$gateway} 
     6HOSTNAME={!$hostname!} 
     7GATEWAY={!$gateway!} 
  • trunk/lib/template/rpm/install_pkg.sh

    r337 r1094  
    11#!/bin/bash 
    2 { # $Id$ } 
    3 { # maintainer: Jacquelin Charbonnel } 
     2{! # $Id$ !} 
     3{! # maintainer: Jacquelin Charbonnel !} 
    44 
    55PKG=$* 
  • trunk/lib/template/vh4http_server

    r861 r1094  
    1 { # $Id$ } 
    2 { # maintainer: Jacquelin Charbonnel } 
    3 # File generated by placo.{$RELEASE} from {$TEMPLATE} $Rev$ 
     1{! # $Id$ !} 
     2{! # maintainer: Jacquelin Charbonnel !} 
     3# generated from PLACO template: {!$TEMPLATE!} $Rev$ 
    44 
    5 <Directory {$htdocs}> 
     5<Directory {!$htdocs!}> 
    66  AuthBasicProvider ldap 
    77  AuthzLDAPAuthoritative on 
    8   AuthLDAPURL ldap://proxy:389/ou=People,{$ldap_root}?{$ldap_attr}? 
     8  AuthLDAPURL ldap://proxy:389/ou=People,{!$ldap_root!}?{!$ldap_attr!}? 
    99  AuthLDAPGroupAttributeIsDN off 
    1010  AuthLDAPGroupAttribute memberUid 
    1111</Directory> 
    1212 
    13 { 
     13{! 
    1414  while (($k,$v)=each %vh) 
    1515  { 
     
    7878    $OUT.="# --end $vh\n"; 
    7979  } 
    80 } 
     80!} 
  • trunk/lib/template/vh4monitoring

    r808 r1094  
    1 { # $Id$ } 
    2 { # maintainer:  } 
    3 # {$TEMPLATE}: processed by {$ENV{USER}} with {$0} from {$_ARGV[0]} 
    4  
     1{! # $Id$ !} 
     2{! # maintainer:  !} 
     3# generated from PLACO template: {!$TEMPLATE!} $Rev$ 
    54 
    65# This file is for Apache 1.3.x and Apache 2.0.x 
     
    1312<VirtualHost _default_:80> 
    1413 
    15              ServerName         {`hostname -f`} 
     14             ServerName         {!`hostname -f`!} 
    1615             DocumentRoot       /var/www 
    17              ErrorLog           {$apache_log_dir}/error.log 
    18              CustomLog          {$apache_log_dir}/access.log common 
     16             ErrorLog           {!$apache_log_dir!}/error.log 
     17             CustomLog          {!$apache_log_dir!}/access.log common 
    1918             LogLevel           Warn 
    2019 
  • trunk/lib/template/vh4reverse_proxy

    r795 r1094  
    1 { # $Id$ } 
    2 { # maintainer: Benoit Metrot } 
    3 # File generated by placo.{$RELEASE} from {$TEMPLATE} $Rev$ 
     1{! # $Id$ !} 
     2{! # maintainer: Benoit Metrot !} 
     3# generated from PLACO template: {!$TEMPLATE!} $Rev$ 
    44 
    55ProxyHTMLLogVerbose On 
     
    1010</Proxy> 
    1111 
    12 ServerName {$hostname}.{$PLATFORM} 
     12ServerName {!$hostname!}.{!$PLATFORM!} 
    1313 
    14 SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem 
    15 SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key 
     14SSLCertificateFile {!$apache_ssl_cert!} 
     15SSLCertificateKeyFile {!$apache_ssl_key!} 
  • trunk/lib/template/vh4svn_server

    r838 r1094  
    1 { # $Id: vh4svn_server 410 2009-08-07 12:43:18Z foury $ } 
    2 { # maintainer: Jacques Foury } 
    3 # {$TEMPLATE}: processed by {$ENV{USER}} with {$0} from {$_ARGV[0]} 
     1{! # $Id: vh4svn_server 410 2009-08-07 12:43:18Z foury $ !} 
     2{! # maintainer: Jacques Foury !} 
     3# generated from PLACO template: {!$TEMPLATE!} $Rev: $ 
    44 
    55<VirtualHost *:80> 
    66  ServerName localhost 
    77  DocumentRoot /var/www 
    8   ErrorLog      {$apache_log_dir}/error.log 
    9   CustomLog    {$apache_log_dir}/access.log common 
     8  ErrorLog      {!$apache_log_dir!}/error.log 
     9  CustomLog    {!$apache_log_dir!}/access.log common 
    1010  LogLevel    Warn 
    1111  <Location /> 
     
    1818 
    1919<VirtualHost *:80> 
    20   ServerName {$hostname} 
     20  ServerName {!$hostname!} 
    2121  DocumentRoot /var/www 
    22   ErrorLog      {$apache_log_dir}/error.log 
    23   CustomLog    {$apache_log_dir}/access.log common 
     22  ErrorLog      {!$apache_log_dir!}/error.log 
     23  CustomLog    {!$apache_log_dir!}/access.log common 
    2424  LogLevel    Warn 
    2525 
    2626  <Location /> 
    2727   DAV svn 
    28    SVNParentPath {$dir_repo} 
     28   SVNParentPath {!$dir_repo!} 
    2929  </Location> 
    3030 
    31 { 
     31{! 
    3232  for $r (split(/\s*,\s*/,$repositories)) 
    3333  { 
     
    4949    $OUT .= "  </Location>\n\n"; 
    5050  } 
    51 } 
     51!} 
    5252 
    5353</VirtualHost> 
  • trunk/lib/template/vh_common4reverse_proxy.pm

    r795 r1094  
     1# generated from PLACO template: {!$TEMPLATE!} $Rev: $ 
     2 
    13sub writecommonconf 
    24{ 
  • trunk/lib/template/vh_horde4reverse_proxy

    r770 r1094  
    1 { # $Id$ } 
    2 { # maintainer: Benoit Metrot } 
    3 # File generated by placo.{$RELEASE} from {$TEMPLATE} $Rev$ 
     1{! # $Id$ !} 
     2{! # maintainer: Benoit Metrot !} 
     3# generated from PLACO template: {!$TEMPLATE!} $Rev$ 
    44 
    5 { 
     5{! 
    66require "$PWD/vh_common4reverse_proxy.pm" ;  
     7 
     8  $OUT=""; 
    79 
    810  sub writeconf 
     
    3739  } 
    3840   
    39   $OUT=""; 
    4041  while (($k,$v)=each %vh) 
    4142  { 
     
    5152    writeconf($v,$vh,0,$vh,0,0,0) ; 
    5253  } 
    53 } 
     54!} 
  • trunk/lib/template/vh_spip4reverse_proxy

    r770 r1094  
    1 { # $Id$ } 
    2 { # maintainer: Benoit Metrot } 
    3 # File generated by placo.{$RELEASE} from {$TEMPLATE} $Rev$ 
     1{! # $Id$ !} 
     2{! # maintainer: Benoit Metrot !} 
     3# generated from PLACO template: {!$TEMPLATE!} $Rev$ 
    44 
    5 { 
     5{! 
    66  require "$PWD/vh_common4reverse_proxy.pm" ; 
     7 
     8  $OUT = "" ; 
    79 
    810  sub writeconf 
     
    4446  } 
    4547  
    46   $OUT="";  
     48#  $OUT="";  
    4749  while (($k,$v)=each %vh) 
    4850  { 
     
    5860    writeconf($v,$vh,0,$vh,1,1,0) ; 
    5961  } 
    60 } 
     62!} 
  • trunk/lib/template/vh_static4reverse_proxy

    r770 r1094  
    1 { # $Id$ } 
    2 { # maintainer: Benoit Metrot } 
    3 # File generated by placo.{$RELEASE} from {$TEMPLATE} $Rev$ 
     1{! # $Id$ !} 
     2{! # maintainer: Benoit Metrot !} 
     3# generated from PLACO template: {!$TEMPLATE!} $Rev$ 
    44 
    5 { 
     5{! 
    66  require "$PWD/vh_common4reverse_proxy.pm" ; 
     7 
     8  $OUT=""; 
    79 
    810  sub writeconf 
     
    4042  } 
    4143  
    42   $OUT=""; 
    4344  while (($k,$v)=each %vh) 
    4445  { 
     
    5455    writeconf($v,$vh,0,$vh,1,1,0) ; 
    5556  } 
    56 } 
     57!} 
  • trunk/lib/template/vh_svn4reverse_proxy

    r770 r1094  
    1 { # $Id$ } 
    2 { # maintainer: Benoit Metrot } 
    3 # File generated by placo.{$RELEASE} from {$TEMPLATE} $Rev$ 
     1{! # $Id$ !} 
     2{! # maintainer: Benoit Metrot !} 
     3# generated from PLACO template: {!$TEMPLATE!} $Rev$ 
    44 
    5 { 
     5{! 
    66  require "$PWD/vh_common4reverse_proxy.pm" ; 
    7   
     7 
     8  $OUT=""; 
     9 
    810  sub writeconf 
    911  { 
     
    3032      $OUT.="      Satisfy Any\n"; 
    3133      $OUT.="    </Limit>\n"; 
    32        
     34 
    3335      if ($rewritehtml) { $OUT.=sprintf("    SetOutputFilter  INFLATE;proxy-html;DEFLATE\n"); } 
    3436      $OUT.=sprintf("  </Location>\n"); 
     
    3739    $OUT.="</IfModule>\n" if $https ; 
    3840  } 
    39    
    40   $OUT=""; 
     41 
    4142  while (($k,$v)=each %vh) 
    4243  { 
     
    4849    writeconf($v,$vh,1,$vh,1,0,0) ; 
    4950  } 
    50 } 
     51!} 
  • trunk/lib/template/vh_sympa4reverse_proxy

    r770 r1094  
    1 { # $Id$ } 
    2 { # maintainer: Benoit Metrot } 
    3 # File generated by placo.{$RELEASE} from {$TEMPLATE} $Rev$ 
     1{! # $Id$ !} 
     2{! # maintainer: Benoit Metrot !} 
     3# generated from PLACO template: {!$TEMPLATE!} $Rev$ 
    44 
    5 { 
     5{! 
    66  require "$PWD/vh_common4reverse_proxy.pm" ; 
     7 
     8  $OUT=""; 
    79 
    810  sub writeconf 
     
    4345  } 
    4446 
    45   $OUT=""; 
    4647  while (($k,$v)=each %vh) 
    4748  { 
     
    5758    writeconf($v,$vh,0,$vh,0,0,0) ; 
    5859  } 
    59 } 
     60!} 
  • trunk/lib/toplevel/init_platform

    r1006 r1094  
    55source $PLACO_libdir/placolib.sh 
    66 
    7 install_platform.sh 
     7config_bridges.sh 
     8 
     9repository.sh -m localhost 
    810 
    911#Iptables for host 
     
    2830### Base VM (for later cloning) ### 
    2931 
    30 create_vmbase.sh 
     32create_vmbase.sh -m localhost 
    3133 
    3234### Required VM ### 
  • trunk/lib/toplevel/install_proxy

    r897 r1094  
    66 
    77create_vm.sh -m proxy 
     8 
    89install_reverse_proxy.sh -m proxy 
    910