look for config files in standard location on installation

This commit is contained in:
James Barnett
2017-06-03 20:22:59 -04:00
parent c4654b8859
commit 0dd0300a23
4 changed files with 19 additions and 16 deletions

15
find_snapper_config Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
etcdirs="sysconfig default conf.d"
for x in $etcdirs; do
d=/etc/$x/snapper
if [[ -f $d ]]; then
sed -i 's@^SNAPPER_CONFIG.*@SNAPPER_CONFIG='$d'@g' bin/snap-sync
exit 0
fi
done
printf "==> Unable to find snapper configuration file in a standard location.\n"
printf "==> Using SNAPPER_CONFIG make variable.\n"
exit 1