From d806eb2cde93ab662f724290adaee62ac5a3c3ad Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 8 Jan 2019 16:38:45 +0800 Subject: Force to ignore '/etc' from $INSTALL_LIST --- dfly-update | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/dfly-update b/dfly-update index 4fa2a19..5eed602 100755 --- a/dfly-update +++ b/dfly-update @@ -53,26 +53,27 @@ MNT_DIR="/mnt/${NAME}" BACK_DIR="/var/backups/${NAME}" # List of files/directories to be installed +# NOTE: Do NOT include 'etc' below! INSTALL_LIST=' - COPYRIGHT - bin - boot - compat - lib - libexec - rescue - sbin - usr/Makefile - usr/bin - usr/games - usr/include - usr/lib - usr/libdata - usr/libexec - usr/sbin - usr/share - var/msgs - var/yp + /COPYRIGHT + /bin + /boot + /compat + /lib + /libexec + /rescue + /sbin + /usr/Makefile + /usr/bin + /usr/games + /usr/include + /usr/lib + /usr/libdata + /usr/libexec + /usr/sbin + /usr/share + /var/msgs + /var/yp ' # Ignored files to be kept from overriding by the upgrade. @@ -226,6 +227,10 @@ install_system() { echo " => Installing kernel and world ..." for item in ${INSTALL_LIST}; do + [ "${item%/}" = "/etc" ] && { + warn "'/etc' is in 'INSTALL_LIST'; force ignored" + continue + } echo -n " * Installing: ${item} ... " # NOTE: 'cpdup -X' doesn't normalize multiple '/' to be one. ${CPDUP} -o -X ${cpignore} ${MNT_DIR%/}/${item#/} /${item} || -- cgit v1.2.2