aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorYousong Zhou <yszhou4tech@gmail.com>2020-11-03 10:20:26 +0800
committerYousong Zhou <yszhou4tech@gmail.com>2020-11-11 21:29:55 +0800
commit826bb13742727300565b9d5785421813443d4de6 (patch)
treed60d8e4d2c872861c452e86efde686770002a39c /package/base-files
parenta47279154e08d54df05fa8bf45fe935ebf0df5da (diff)
downloadupstream-826bb13742727300565b9d5785421813443d4de6.tar.gz
upstream-826bb13742727300565b9d5785421813443d4de6.tar.bz2
upstream-826bb13742727300565b9d5785421813443d4de6.zip
base-files: upgrade: log with date prefix
And log to stderr Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Diffstat (limited to 'package/base-files')
-rw-r--r--package/base-files/files/lib/upgrade/common.sh2
-rwxr-xr-xpackage/base-files/files/lib/upgrade/stage22
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..2ae83f5bfb 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: $@" >&2
}
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)"