|
101 | 101 | } |
102 | 102 |
|
103 | 103 | if $createfs or $ensure != 'present' { |
104 | | - if $fs_type == 'swap' { |
105 | | - if $ensure == 'present' { |
106 | | - exec { "swapon for '${mount_title}'": |
107 | | - path => [ '/bin', '/usr/bin', '/sbin' ], |
108 | | - command => "swapon ${lvm_device_path}", |
109 | | - unless => "grep `readlink -f ${lvm_device_path}` /proc/swaps", |
110 | | - subscribe => Mount[$mount_title], |
111 | | - } |
112 | | - } else { |
113 | | - exec { "swapoff for '${mount_title}'": |
114 | | - path => [ '/bin', '/usr/bin', '/sbin' ], |
115 | | - command => "swapoff ${lvm_device_path}", |
116 | | - onlyif => "grep `readlink -f ${lvm_device_path}` /proc/swaps", |
117 | | - notify => Mount[$mount_title], |
118 | | - } |
119 | | - } |
120 | | - } else { |
121 | | - exec { "ensure mountpoint '${fixed_mountpath}' exists": |
122 | | - path => [ '/bin', '/usr/bin' ], |
123 | | - command => "mkdir -p ${fixed_mountpath}", |
124 | | - unless => "test -d ${fixed_mountpath}", |
125 | | - before => Mount[$mount_title], |
126 | | - } |
| 104 | + exec { "ensure mountpoint '${fixed_mountpath}' exists": |
| 105 | + path => [ '/bin', '/usr/bin' ], |
| 106 | + command => "mkdir -p ${fixed_mountpath}", |
| 107 | + unless => "test -d ${fixed_mountpath}", |
| 108 | + before => Mount[$mount_title], |
127 | 109 | } |
| 110 | + |
128 | 111 | mount { $mount_title: |
129 | 112 | ensure => $mount_ensure, |
130 | 113 | name => $fixed_mountpath, |
|
0 commit comments