summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/egd.pp17
-rw-r--r--manifests/egd/base.pp17
-rw-r--r--manifests/egd/debian.pp6
3 files changed, 23 insertions, 17 deletions
diff --git a/manifests/egd.pp b/manifests/egd.pp
index 8a7da6f..cb5fcca 100644
--- a/manifests/egd.pp
+++ b/manifests/egd.pp
@@ -1,17 +1,10 @@
class ekeyd::egd {
- package{'ekeyd-egd-linux':
- ensure => present,
- before => Service['egd-linux'],
+ if ( $virtual == "vserver" ) {
+ fail("This class shouldn't be included on vservers")
}
- service{'egd-linux':
- enable => true,
- ensure => running,
- }
-
- if $use_shorewall {
- Service['egd-linux']{
- require => Service['shorewall'],
- }
+ case $operatingsystem {
+ debian: { include ekeyd::egd::debian }
+ default: { include ekeyd::egd::base }
}
}
diff --git a/manifests/egd/base.pp b/manifests/egd/base.pp
new file mode 100644
index 0000000..d75d804
--- /dev/null
+++ b/manifests/egd/base.pp
@@ -0,0 +1,17 @@
+class ekeyd::egd::base {
+ package{'ekeyd-egd-linux':
+ ensure => present,
+ before => Service['egd-linux'],
+ }
+
+ service{'egd-linux':
+ enable => true,
+ ensure => running,
+ }
+
+ if $use_shorewall {
+ Service['egd-linux']{
+ require => Service['shorewall'],
+ }
+ }
+}
diff --git a/manifests/egd/debian.pp b/manifests/egd/debian.pp
index e586e82..57550b0 100644
--- a/manifests/egd/debian.pp
+++ b/manifests/egd/debian.pp
@@ -1,7 +1,4 @@
-class ekeyd::egd::debian inherits ekeyd::egd {
- if ( $virtual == "vserver" ) {
- fail("This class shouldn't be included on vservers")
- }
+class ekeyd::egd::debian inherits ekeyd::egd::base {
Package["ekeyd-egd-linux"] {
ensure => $lsbdistcodename ? {
@@ -12,7 +9,6 @@ class ekeyd::egd::debian inherits ekeyd::egd {
Service["egd-linux"] {
name => 'ekeyd-egd-linux',
- ensure => running,
hasstatus => true,
subscribe => File["/etc/default/ekeyd-egd-linux"],
}