add warning if configuration file is missing
This commit is contained in:
parent
2e364c802f
commit
35e62cc8b2
2 changed files with 11 additions and 3 deletions
|
|
@ -20,7 +20,11 @@
|
||||||
|
|
||||||
# Takes a snapper post snapshot after a pacman transaction
|
# Takes a snapper post snapshot after a pacman transaction
|
||||||
|
|
||||||
|
if [ -f /etc/snap-pac.conf ]; then
|
||||||
source /etc/snap-pac.conf
|
source /etc/snap-pac.conf
|
||||||
|
else
|
||||||
|
echo "WARNING: /etc/snap-pac.conf is missing. Using default settings."
|
||||||
|
fi
|
||||||
|
|
||||||
cleanupalgo=${CLEANUP_ALGORITHM:-"number"}
|
cleanupalgo=${CLEANUP_ALGORITHM:-"number"}
|
||||||
description=${POST_DESCRIPTION:-"$(echo $(ps -C pacman -o args=) | sed 'sX/usr/bin/pacmanXpacmanXg')"}
|
description=${POST_DESCRIPTION:-"$(echo $(ps -C pacman -o args=) | sed 'sX/usr/bin/pacmanXpacmanXg')"}
|
||||||
|
|
@ -32,6 +36,6 @@ for x in $configurations; do
|
||||||
snapper --config $x create --cleanup-algorithm $cleanupalgo --type post --pre-number $SNAPPERPACPRE --description "$description"
|
snapper --config $x create --cleanup-algorithm $cleanupalgo --type post --pre-number $SNAPPERPACPRE --description "$description"
|
||||||
rm $PREFILE_PREFIX"_"$x
|
rm $PREFILE_PREFIX"_"$x
|
||||||
else
|
else
|
||||||
echo "WARNING: $PREFILE_PREFIX"_"$x does not exist, so not performing post snapshot. If you are initially installing snap-pac, this is normal."
|
echo "WARNING: $PREFILE_PREFIX"_"$x does not exist, so no post snapshot will be taken. If you are initially installing snap-pac, this is normal."
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,11 @@
|
||||||
|
|
||||||
# Takes a snapper pre snapshot before a pacman transaction
|
# Takes a snapper pre snapshot before a pacman transaction
|
||||||
|
|
||||||
|
if [ -f /etc/snap-pac.conf ]; then
|
||||||
source /etc/snap-pac.conf
|
source /etc/snap-pac.conf
|
||||||
|
else
|
||||||
|
echo "WARNING: /etc/snap-pac.conf is missing. Using default settings."
|
||||||
|
fi
|
||||||
|
|
||||||
cleanupalgo=${CLEANUP_ALGORITHM:-"number"}
|
cleanupalgo=${CLEANUP_ALGORITHM:-"number"}
|
||||||
description=${POST_DESCRIPTION:-"$(echo $(ps -C pacman -o args=) | sed 'sX/usr/bin/pacmanXpacmanXg')"}
|
description=${POST_DESCRIPTION:-"$(echo $(ps -C pacman -o args=) | sed 'sX/usr/bin/pacmanXpacmanXg')"}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue