Created
August 4, 2018 00:32
-
-
Save TobleMiner/2f086cb16b7d5c2a3d3cb0670f062b0d to your computer and use it in GitHub Desktop.
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
From: Andreas Ziegler <[email protected]> | |
Date: Sat, 4 Aug 2018 01:56:39 +0200 | |
Subject: [PATCH] base-files: sysupgrade: abort if config backup fails | |
Signed-off-by: Andreas Ziegler <[email protected]> | |
--- | |
package/base-files/files/sbin/sysupgrade | 5 +++++ | |
1 file changed, 5 insertions(+) | |
diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade | |
index a378b02950..749f47fa35 100755 | |
--- a/package/base-files/files/sbin/sysupgrade | |
+++ b/package/base-files/files/sbin/sysupgrade | |
@@ -165,6 +165,11 @@ do_save_conffiles() { | |
v "Saving config files..." | |
[ "$VERBOSE" -gt 1 ] && TAR_V="v" || TAR_V="" | |
tar c${TAR_V}zf "$conf_tar" -T "$CONFFILES" 2>/dev/null | |
+ if [ "$?" -ne 0 ]; then | |
+ echo "Failed to create the configuration backup." | |
+ rm -f "$conf_tar" | |
+ exit 1 | |
+ fi | |
rm -f "$CONFFILES" | |
} | |
-- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment