Any configuration files renamed by pacman on the installation process gets renamed back. Fixes #163.

This commit is contained in:
Pedro Algarvio 2013-06-19 15:42:08 +01:00
parent d306b827b7
commit d91e0d5449

View file

@ -1967,6 +1967,7 @@ install_arch_linux_git() {
}
install_arch_linux_post() {
for fname in minion master syndic; do
# Skip if not meant to be installed
@ -1974,6 +1975,14 @@ install_arch_linux_post() {
[ $fname = "master" ] && [ $INSTALL_MASTER -eq $BS_FALSE ] && continue
[ $fname = "syndic" ] && [ $INSTALL_SYNDIC -eq $BS_FALSE ] && continue
# Since Arch's pacman renames configuration files
if [ "$TEMP_CONFIG_DIR" != "null" ] && [ -f $SALT_ETC_DIR/$fname.pacorig ]; then
# Since a configuration directory was provided, it also means that any
# configuration file copied was renamed by Arch, see:
# https://wiki.archlinux.org/index.php/Pacnew_and_Pacsave_Files#.pacorig
copyfile $SALT_ETC_DIR/$fname.pacorig $SALT_ETC_DIR/$fname $BS_TRUE
fi
if [ -f /usr/bin/systemctl ]; then
# Using systemd
/usr/bin/systemctl is-enabled salt-$fname.service > /dev/null 2>&1 || (