-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merged patch from pavoldomin (issue #192) concerning better BACKUP/OU…
…TPUT_URL split-up => must say would have been easier if it was a pull request. => in my tests it seems to work, but need plenty more user-tests and feedback ==> keep this issue open for follow-up matters @pavoldomin thanks for the patch - can you test it as well? Gratien
- Loading branch information
Showing
17 changed files
with
97 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
usr/share/rear/output/NETFS/default/15_save_copy_of_prefix_dir.sh
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
usr/share/rear/output/default/15_save_copy_of_prefix_dir.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# if KEEP_OLD_OUTPUT_COPY is not empty then move old OUTPUT_PREFIX directory to OUTPUT_PREFIX.old | ||
|
||
[ -z "${KEEP_OLD_OUTPUT_COPY}" ] && return | ||
|
||
# do not do this for tapes and special attention for file:///path | ||
url="$( echo $stage | tr '[:lower:]' '[:upper:]')_URL" | ||
local scheme=$(url_scheme ${!url}) | ||
local path=$(url_path ${!url}) | ||
local opath=$(output_path $scheme $path) | ||
|
||
# if $opath is empty return silently (e.g. scheme tape) | ||
[ -z "$opath" ] && return 0 | ||
|
||
if ! test -f "${opath}/.lockfile" ; then | ||
# lockfile made through workflow backup already (so output keep hands off) | ||
if test -d "${opath}" ; then | ||
rm -rf $v "${opath}.old" >&2 | ||
StopIfError "Could not remove '${opath}.old'" | ||
mv -f $v "${opath}" "${opath}.old" >&2 | ||
StopIfError "Could not move '${opath}'" | ||
fi | ||
else | ||
Log "Lockfile '${opath}/.lockfile' found. Not keeping old backup data." | ||
fi | ||
# the ${BUILD_DIR}/outputfs/${OUTPUT_PREFIX} will be created by output/default/20_make_prefix_dir.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# if set, create $OUTPUT_PREFIX under the mounted network filesystem share. This defaults | ||
# to $HOSTNAME | ||
|
||
# do not do this for tapes and special attention for file:///path | ||
url="$( echo $stage | tr '[:lower:]' '[:upper:]')_URL" | ||
local scheme=$(url_scheme ${!url}) | ||
local path=$(url_path ${!url}) | ||
local opath=$(output_path $scheme $path) | ||
|
||
# if $opath is empty return silently (e.g. scheme tape) | ||
[ -z "$opath" ] && return 0 | ||
|
||
mkdir -p $v -m0750 "${opath}" >&2 | ||
StopIfError "Could not mkdir '${opath}'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# create a lockfile in $OUTPUT_PREFIX to avoid that mkrescue overwrites ISO/PXE/LOGFILE | ||
# made by a previous mkrescue run when the variable KEEP_OLD_OUTPUT_COPY has been set | ||
|
||
# do not do this for tapes and special attention for file:///path | ||
url="$( echo $stage | tr '[:lower:]' '[:upper:]')_URL" | ||
local scheme=$(url_scheme ${!url}) | ||
local path=$(url_path ${!url}) | ||
local opath=$(output_path $scheme $path) | ||
|
||
# if $opath is empty return silently (e.g. scheme tape) | ||
[ -z "$opath" ] && return 0 | ||
|
||
if test -d "${opath}" ; then | ||
> "${opath}/.lockfile" | ||
StopIfError "Could not create '${opath}/.lockfile'" | ||
fi |
2 changes: 1 addition & 1 deletion
2
...put/NETFS/default/95_copy_result_files.sh → ...ar/output/default/95_copy_result_files.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# remove the lockfile | ||
local scheme=$(url_scheme $OUTPUT_URL) | ||
local path=$(url_path $OUTPUT_URL) | ||
local opath=$(output_path $scheme $path) | ||
|
||
# if $opath is empty return silently (e.g. scheme tape) | ||
[ -z "$opath" ] && return 0 | ||
|
||
rm -f $v "${opath}/.lockfile" >&2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters