blob: 9cebc11e7277068a5d5bca856412f81566f86017 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# Manage NetInfo POSIX objects. Probably only used on OS X, but I suppose
# it could be used elsewhere.
require 'puppet/provider/nameservice/netinfo'
require 'puppet/provider/mount'
Puppet::Type.type(:mount).provide :netinfo, :parent => Puppet::Provider::NameService::NetInfo do
include Puppet::Provider::Mount
desc "Mount management in NetInfo. This provider is highly experimental and is known
not to work currently."
commands :nireport => "nireport", :niutil => "niutil"
commands :mountcmd => "mount", :umount => "umount", :df => "df"
options :device, :key => "name"
options :name, :key => "dir"
options :dump, :key => "dump_freq"
options :pass, :key => "passno"
options :fstype, :key => "vfstype"
options :options, :key => "opts"
defaultfor :operatingsystem => :darwin
def initialize(model)
warning "The NetInfo mount provider is highly experimental. Use at your own risk."
super
end
def mount
cmd = []
if opts = @model.should(:options)
cmd << opts
end
cmd << @model.should(:device)
cmd << @model[:name]
mountcmd cmd
end
end
# $Id$
|