aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorDamien Lallement <dams@mageia.org>2011-02-18 13:20:08 +0000
committerDamien Lallement <dams@mageia.org>2011-02-18 13:20:08 +0000
commit3f07d1fd60a38179f6520777a7a6ba2a3a48f9f3 (patch)
tree47f0ba46f7dbc676abdf0457903ba391e61cf76d /modules
parent9c1acc5154179688719372760949fe94199e03b5 (diff)
downloadpuppet-3f07d1fd60a38179f6520777a7a6ba2a3a48f9f3.tar
puppet-3f07d1fd60a38179f6520777a7a6ba2a3a48f9f3.tar.gz
puppet-3f07d1fd60a38179f6520777a7a6ba2a3a48f9f3.tar.bz2
puppet-3f07d1fd60a38179f6520777a7a6ba2a3a48f9f3.tar.xz
puppet-3f07d1fd60a38179f6520777a7a6ba2a3a48f9f3.zip
add a new index page to ask people choosing a locale
Diffstat (limited to 'modules')
-rw-r--r--modules/planet/manifests/init.pp9
-rw-r--r--modules/planet/templates/index.php19
2 files changed, 28 insertions, 0 deletions
diff --git a/modules/planet/manifests/init.pp b/modules/planet/manifests/init.pp
index 24327d66..b737b66f 100644
--- a/modules/planet/manifests/init.pp
+++ b/modules/planet/manifests/init.pp
@@ -34,6 +34,15 @@ class planet {
mode => 644,
}
+ file { "index":
+ path => "/var/www/html/planet.$location/index.php",
+ ensure => present,
+ owner => planet,
+ group => apache,
+ mode => 755,
+ content => template("planet/index.php")
+ }
+
package { ['php-iconv']:
ensure => installed
}
diff --git a/modules/planet/templates/index.php b/modules/planet/templates/index.php
new file mode 100644
index 00000000..3a8b3534
--- /dev/null
+++ b/modules/planet/templates/index.php
@@ -0,0 +1,19 @@
+<html>
+<body>
+<h1>Planet Mageia</h1>
+<h3>Please choose one of the following locales:</h3>
+<ul>
+<?php
+function displayloc($path = ''){
+ return array_slice(scandir($path), 2);
+}
+
+foreach(displayloc('.') as $loc)
+ if(is_dir($loc))
+ {
+ echo '<li><a href="'.$loc.'">'.$loc.'</a></li>';
+ }
+?>
+</ul>
+</body>
+</html>