aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2019-01-08 16:38:45 +0800
committerAaron LI <aly@aaronly.me>2019-01-09 11:50:34 +0800
commitd806eb2cde93ab662f724290adaee62ac5a3c3ad (patch)
tree91bbf7e3524d9ea7b3352932679f38cd5ec38709
parent9b73f15945573f256b29ac09793025e182d80f3e (diff)
downloaddfly-update-d806eb2cde93ab662f724290adaee62ac5a3c3ad.tar.bz2
Force to ignore '/etc' from $INSTALL_LIST
-rwxr-xr-xdfly-update43
1 files 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} ||