From f8f5f3012ba2c65e392a3bdb137438f820076cbc Mon Sep 17 00:00:00 2001 From: "Guo, Jade" Date: Mon, 15 Apr 2024 16:30:38 +0800 Subject: [PATCH] Periodically update symbollink timestamp Align /data/vendor/logs/aplog with /data/misc/logd Tracked-On: OAM-116619 Signed-off-by: Guo, Jade --- log_service/aplog.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/log_service/aplog.sh b/log_service/aplog.sh index dc7393c..fc7245a 100755 --- a/log_service/aplog.sh +++ b/log_service/aplog.sh @@ -46,7 +46,9 @@ start_link() { i=$((i+1)) N=$($VENDOR_PRINTF "%0"$APLOG_BIT"d" $i) echo "vendor.aplog: create aplog.$N" - [ $i -eq $APLOG_LIMIT ] && exit 0 + for j in $(seq -f "%03g" 1 $i); do + touch -h -r "$LOGCAT_FILE_PATH$j" "$APLOG_FILE_PATH$j" + done if [ -f $LOGCAT_FILE_PATH$N ]; then if [ ! -h $APLOG_FILE_PATH$N ]; then $LINK_TOOL -s $LOGCAT_FILE_PATH$N $APLOG_FILE_PATH$N