From d91e0d54491d6b05bbacd26f107e973a0c1a83b7 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 19 Jun 2013 15:42:08 +0100 Subject: [PATCH] Any configuration files renamed by pacman on the installation process gets renamed back. Fixes #163. --- bootstrap-salt.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index f4719d4..0254684 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -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 || (