diff options
author | Aaron LI <aly@aaronly.me> | 2019-01-05 23:52:22 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2019-01-05 23:52:22 +0800 |
commit | 5f622792533fc26935a781651d009f90b0f22679 (patch) | |
tree | 2dea3819cdb55eb418c4c595126a356a50c08061 | |
parent | 77e6c23fbac4bbcad19e7c0690485f073c7908dc (diff) | |
download | dfly-update-5f622792533fc26935a781651d009f90b0f22679.tar.bz2 |
Introduce ${CPDUP} to specify the path to cpdup(1)
-rwxr-xr-x | dfly-update | 8 | ||||
-rw-r--r-- | dfly-update.conf | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/dfly-update b/dfly-update index bfa1107..2f26633 100755 --- a/dfly-update +++ b/dfly-update @@ -42,6 +42,8 @@ EC_NOFILE=21 # Default Configurations # +# Path to the cpdup(1) executable +CPDUP="/bin/cpdup" # Temporary directory to cache the image, etc, ... CACHE_DIR="/var/tmp/${NAME}" # Directory to mount the system image @@ -248,7 +250,7 @@ install_system() { echo " => Installing kernel and world ..." for item in ${INSTALL_LIST}; do echo -n " * Installing: ${item} ... " - cpdup -o -u ${MNT_DIR}/${item} /${item} || exit ${EC_CPDUP} + ${CPDUP} -o -u ${MNT_DIR}/${item} /${item} || exit ${EC_CPDUP} echo "ok" done @@ -273,7 +275,7 @@ upgrade_system() { [ -d "${CACHE_DIR}" ] || mkdir "${CACHE_DIR}" echo "Upgrading system ..." echo " => Coping new /etc to: ${etcdir}" - cpdup -o -u ${MNT_DIR}/etc.hdd ${etcdir} || exit ${EC_CPDUP} + ${CPDUP} -o -u ${MNT_DIR}/etc.hdd ${etcdir} || exit ${EC_CPDUP} echo " => Removing ignored files ..." for file_etc in ${FILES_IGNORE}; do @@ -301,7 +303,7 @@ upgrade_system() { done echo " => Installing new configurations ..." - cpdup -o -u ${etcdir} /etc || exit ${EC_CPDUP} + ${CPDUP} -o -u ${etcdir} /etc || exit ${EC_CPDUP} echo " => DONE!" rm -rf "${etcdir}" echo "+---------+" diff --git a/dfly-update.conf b/dfly-update.conf index ff5e6e1..fe483ba 100644 --- a/dfly-update.conf +++ b/dfly-update.conf @@ -5,6 +5,9 @@ # Tool name #NAME=dfly-update +# Path to the cpdup(1) executable +#CPDUP="/bin/cpdup" + # Temporary directory to cache the image, etc, ... #CACHE_DIR="/var/tmp/${NAME}" |