base-files: add syslog logging for v function
authorFlorian Eckert <fe@dev.tdt.de>
Mon, 1 Feb 2021 10:02:30 +0000 (11:02 +0100)
committerPaul Spooren <mail@aparcar.org>
Mon, 21 Jun 2021 01:15:32 +0000 (15:15 -1000)
The logging output should not only be displayed in the calling shell
session but also in the syslog. A sysupgrade and a configuration
import, export can thus be traced in the syslog.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
package/base-files/files/lib/upgrade/common.sh
package/base-files/files/lib/upgrade/stage2

index b8ae2ecb7e5e95446e166a91ae0f96b04bff1ebd..5c85d986f96e45a5c899ce7b6b4bee37aa6cc9dd 100644 (file)
@@ -71,6 +71,7 @@ _vn() {
 
 v() {
        _v "$(date) upgrade: $@"
+       logger -p info -t upgrade "$@"
 }
 
 vn() {
index cb42c956c573f8f03482d971d925bfe9eb083206..ba728004e9ebd536219cf5610d5c27c339f32314 100755 (executable)
@@ -45,7 +45,7 @@ switch_to_ramfs() {
                mtd partx losetup mkfs.ext4 nandwrite flash_erase       \
                ubiupdatevol ubiattach ubiblock ubiformat               \
                ubidetach ubirsvol ubirmvol ubimkvol                    \
-               snapshot snapshot_tool date                             \
+               snapshot snapshot_tool date logger                      \
                $RAMFS_COPY_LOSETUP $RAMFS_COPY_LVM                     \
                $RAMFS_COPY_BIN
        do