[PATCH v2 01/10] base-files: upgrade: log with date prefix
Yousong Zhou
yszhou4tech at gmail.com
Mon Nov 9 21:22:14 EST 2020
Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
package/base-files/files/lib/upgrade/common.sh | 2 +-
package/base-files/files/lib/upgrade/stage2 | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh
index 2eb26ba44b..c4947e4624 100644
--- a/package/base-files/files/lib/upgrade/common.sh
+++ b/package/base-files/files/lib/upgrade/common.sh
@@ -64,7 +64,7 @@ ask_bool() {
}
v() {
- [ -n "$VERBOSE" ] && [ "$VERBOSE" -ge 1 ] && echo "$@"
+ [ -n "$VERBOSE" ] && [ "$VERBOSE" -ge 1 ] && echo "$(date) upgrade: $@"
}
json_string() {
diff --git a/package/base-files/files/lib/upgrade/stage2 b/package/base-files/files/lib/upgrade/stage2
index a4fef42134..211a3f4b33 100755
--- a/package/base-files/files/lib/upgrade/stage2
+++ b/package/base-files/files/lib/upgrade/stage2
@@ -42,7 +42,7 @@ switch_to_ramfs() {
mtd partx losetup mkfs.ext4 nandwrite flash_erase \
ubiupdatevol ubiattach ubiblock ubiformat \
ubidetach ubirsvol ubirmvol ubimkvol \
- snapshot snapshot_tool \
+ snapshot snapshot_tool date \
$RAMFS_COPY_BIN
do
local file="$(command -v "$binary" 2>/dev/null)"
More information about the openwrt-devel
mailing list