summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-11-28 18:44:55 -0600
committerLuke Kanies <luke@madstop.com>2007-11-28 18:44:55 -0600
commit811fefa569d4ac960598dc06ffacec0c4e60832c (patch)
tree3c08b878e9e231f9751532d331a4c4f7f0ca16db
parentdedc56a6ae583daca304c053b1be8a52bcdbd13a (diff)
downloadpuppet-811fefa569d4ac960598dc06ffacec0c4e60832c.tar.gz
puppet-811fefa569d4ac960598dc06ffacec0c4e60832c.tar.xz
puppet-811fefa569d4ac960598dc06ffacec0c4e60832c.zip
Fixing #892 -- filesystem mounts are no longer remounted.
-rw-r--r--CHANGELOG2
-rwxr-xr-xlib/puppet/type/mount.rb2
-rwxr-xr-xspec/unit/ral/types/mount.rb7
3 files changed, 10 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 430e0c38e..04fb18791 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,5 @@
+ Mounts no longer remount swap filesystems.
+
Slightly modifying how services manage their list of paths
(and adding documention for it). Services now default
to the paths specified by the provider classes.
diff --git a/lib/puppet/type/mount.rb b/lib/puppet/type/mount.rb
index 7ba411452..ca8e27e17 100755
--- a/lib/puppet/type/mount.rb
+++ b/lib/puppet/type/mount.rb
@@ -195,7 +195,7 @@ module Puppet
def refresh
# Only remount if we're supposed to be mounted.
- provider.remount if provider.mounted?
+ provider.remount if self.should(:fstype) != "swap" and provider.mounted?
end
def value(name)
diff --git a/spec/unit/ral/types/mount.rb b/spec/unit/ral/types/mount.rb
index c50f671fd..0c4b94177 100755
--- a/spec/unit/ral/types/mount.rb
+++ b/spec/unit/ral/types/mount.rb
@@ -185,4 +185,11 @@ describe Puppet::Type::Mount, "when responding to events" do
@mount.refresh
end
+
+ it "should not remount swap filesystems" do
+ @mount[:fstype] = "swap"
+ @provider.expects(:remount).never
+
+ @mount.refresh
+ end
end