From 44fb50202b0244b2819d8590391d90ac46b07316 Mon Sep 17 00:00:00 2001 From: Thomas S Hatch Date: Tue, 19 Aug 2014 16:20:43 -0600 Subject: [PATCH] Add mkmnt logic --- salt/states/mount.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/salt/states/mount.py b/salt/states/mount.py index 4ddf391fff..75ed1a65e9 100644 --- a/salt/states/mount.py +++ b/salt/states/mount.py @@ -172,7 +172,12 @@ def mounted(name, return ret if not os.path.exists(name): - __salt__['file.mkdir'](name) + if mkmnt: + __salt__['file.mkdir'](name) + else: + ret['result'] = False + ret['comment'] = 'Mount directory is not present' + return ret out = __salt__['mount.mount'](name, device, mkmnt, fstype, opts) active = __salt__['mount.active']()