From 3e895b54616fe1df50e5b0e944a96352a0846aac Mon Sep 17 00:00:00 2001 From: luke Date: Tue, 1 May 2007 03:45:09 +0000 Subject: Changing the remount stuff back to not repeating the mount options. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2445 980ebf18-57e1-0310-9a29-db15c13687c0 --- lib/puppet/provider/mount.rb | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'lib/puppet/provider/mount.rb') diff --git a/lib/puppet/provider/mount.rb b/lib/puppet/provider/mount.rb index b5144e42e..cdae61f83 100644 --- a/lib/puppet/provider/mount.rb +++ b/lib/puppet/provider/mount.rb @@ -7,31 +7,22 @@ require 'puppet' # still need to add the mount commands manually. module Puppet::Provider::Mount # This only works when the mount point is synced to the fstab. - def mount(remount = false) + def mount # Manually pass the mount options in, since some OSes *cough*OS X*cough* don't # read from /etc/fstab but still want to use this type. - opts = nil + args = [] if self.options and self.options != :absent - opts = self.options + args << "-o" << self.options end - - if remount and Facter.value(:operatingsystem) != "FreeBSD" - if opts - opts = [opts, "remount"].join(",") - else - opts = "remount" - end - end - args = [] - args << "-o" << opts args << @model[:name] + mountcmd(*args) end def remount info "Remounting" if @model[:remounts] == :true - mount(true) + mountcmd "-o", "remount", @model[:name] else unmount() mount() -- cgit