summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--satellit_upgrader/updater.template.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/satellit_upgrader/updater.template.sh b/satellit_upgrader/updater.template.sh
index 420b1bc..99641a0 100644
--- a/satellit_upgrader/updater.template.sh
+++ b/satellit_upgrader/updater.template.sh
@@ -109,10 +109,11 @@ fixperms () {
# diffcp <module> <file> [message]
# diffcp "dnbd3" "/opt/openslx/foo.txt" ["Installing new foo file"]
+# return 0 (true) if the file was different and thus copied
diffcp () {
local SRC="$FILEDIR/$1/$2"
local DST="/$2"
- [ -e "$SRC" ] || return 1
+ [ -e "$SRC" ] || perror "$1/$2 not included in updater"
[ -f "$SRC" ] || perror "$1/$2 included in updater, but is not regular file."
if [ -e "$DST" ]; then
[ -f "$DST" ] || perror "$DST exists and is not a regular file, cannot replace."