diff options
author | John Klug <john.klug@multitech.com> | 2017-12-04 18:38:37 -0600 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2017-12-04 18:38:37 -0600 |
commit | 4de682c7f15390eaf982b2db1573ec65020f70b4 (patch) | |
tree | eb396a3f2b33c03afb73a17c6016c722b36e66e2 | |
parent | aafed3ea88a61794e95429708616dd1d3663b356 (diff) | |
download | meta-mlinux-4de682c7f15390eaf982b2db1573ec65020f70b4.tar.gz meta-mlinux-4de682c7f15390eaf982b2db1573ec65020f70b4.tar.bz2 meta-mlinux-4de682c7f15390eaf982b2db1573ec65020f70b4.zip |
Do not copy non-existent stuff, and copy the old files from the old directory.
-rw-r--r-- | recipes-core/multitech/config/config.init | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/recipes-core/multitech/config/config.init b/recipes-core/multitech/config/config.init index bb21888..3bdd78b 100644 --- a/recipes-core/multitech/config/config.init +++ b/recipes-core/multitech/config/config.init @@ -139,9 +139,21 @@ case $1 in mkdir old if ! [[ -f $file ]] ; then # Need to preserve old files which is difficult with busybox! - cp --parents -a $file old || true - (cd /etc;cp --parents -a $file ${CONFIG_DIR}) || true - cp --parents -a old/$file . || true + if [[ -d $file ]] || [[ -f $file ]] ; then + cp --parents -a $file old || true + fi + ( + cd /etc + if [[ -d $file ]] || [[ -f $file ]] ; then + cp --parents -a $file ${CONFIG_DIR} || true + fi + ) + ( + cd old + if [[ -d $file ]] || [[ -f $file ]] ; then + cp --parents -a $file .. || true + fi + ) rm -rf old fi rm -rf /etc/$file |