Fixing #550 -- I had to list pass and dump as optional fields.

git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2564 980ebf18-57e1-0310-9a29-db15c13687c0
This commit is contained in:
luke 2007-06-11 22:49:06 +00:00
Родитель f0b5090f65
Коммит c26f678178
4 изменённых файлов: 10 добавлений и 3 удалений

Просмотреть файл

@ -1,3 +1,6 @@
Mounts now correctly handle existing fstabs with no pass or dump values
(#550).
Mounts now default to 0 for pass and dump (#112).
Added urpmi support (#592).

Просмотреть файл

@ -31,7 +31,7 @@ Puppet::Type.type(:mount).provide(:parsed,
text_line :comment, :match => /^\s*#/
text_line :blank, :match => /^\s*$/
record_line self.name, :fields => @fields, :separator => /\s+/, :joiner => "\t"
record_line self.name, :fields => @fields, :separator => /\s+/, :joiner => "\t", :optional => [:pass, :dump]
end
# $Id$

Просмотреть файл

@ -1,8 +1,8 @@
# A sample fstab, typical for a Fedora system
/dev/vg00/lv00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0
tmpfs /dev/shm tmpfs defaults 0
LABEL=/home /home ext3 defaults 1 2
/home /homes auto bind 0 2
proc /proc proc defaults 0 0

Просмотреть файл

@ -122,6 +122,10 @@ class TestParsedMounts < Test::Unit::TestCase
assert(hashes.length > 0, "Did not create any hashes")
root = hashes.find { |i| i[:name] == "/" }
assert(root, "Could not retrieve root mount")
assert_nothing_raised("Could not rewrite file") do
puts @provider.to_file(hashes)
end
end
end