snapshots: Refactoring and indentation changes

- Made updating snapshot configuration more efficient by running a single
  snapper command instead of one per configuration.
- Set default configuration for NUMBER_LIMIT only once at the time of
  installation. Snapshot version has been incremented to support this.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
This commit is contained in:
Joseph Nuthalapati committed 2018-03-09 13:42:54 +05:30
1 parent 7ff2196d04
commit 9ab0e13ab9
6 files changed
+80 -63

No files matched your search

+2 -1
View File
@@ -79,7 +79,8 @@ def _set_default_config():
'snapper', 'set-config', 'TIMELINE_CREATE=yes',
'TIMELINE_LIMIT_HOURLY=10', 'TIMELINE_LIMIT_MONTHLY=2',
'TIMELINE_LIMIT_WEEKLY=2', 'TIMELINE_LIMIT_YEARLY=0',
'TIMELINE_LIMIT_DAILY=3', 'NUMBER_MIN_AGE=1296000'
'TIMELINE_LIMIT_DAILY=3', 'NUMBER_MIN_AGE=1296000', 'NUMBER_LIMIT=0',
'NUMBER_LIMIT_IMPORTANT=4-10'
]
subprocess.run(command, check=True)