Browse Source

Merge pull request #2 from lachie83/feature-add-swap-partition

fix swap file check
tags/2016.12
Jakub Pavlik 9 years ago
parent
commit
4a9a28e149
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      linux/storage/swap.sls

+ 1
- 2
linux/storage/swap.sls View File

@@ -10,8 +10,7 @@
linux_create_swap_partition_{{ swap.device }}:
cmd.run:
- name: 'mkswap {{ swap.device }}'
- onlyif: "test `file -L -s {{ swap.device }} | grep 'swap file' >/dev/null;echo $?` -ne 0"
- creates: {{ swap.device }}
- unless: file -L -s {{ swap.device }} | grep -q 'swap file'

linux_set_swap_partition_{{ swap.device }}:
cmd.run:

Loading…
Cancel
Save