aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorYousong Zhou <yszhou4tech@gmail.com>2020-11-03 16:54:13 +0800
committerYousong Zhou <yszhou4tech@gmail.com>2020-11-11 21:29:55 +0800
commit00fb51f97e549cb998ef5dc5dbbc33dff650d891 (patch)
treeea4a08f8ca9a26d4e549dfe405b0b3843c31fea8 /package/base-files
parent128bb4e8d31d358ce7c504bc8554abe45a6f9611 (diff)
downloadupstream-00fb51f97e549cb998ef5dc5dbbc33dff650d891.tar.gz
upstream-00fb51f97e549cb998ef5dc5dbbc33dff650d891.tar.bz2
upstream-00fb51f97e549cb998ef5dc5dbbc33dff650d891.zip
base-files: upgrade: stage2: use v for log lines
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/files/lib/upgrade/stage214
1 files changed, 7 insertions, 7 deletions
diff --git a/package/base-files/files/lib/upgrade/stage2 b/package/base-files/files/lib/upgrade/stage2
index 211a3f4b33..c7629c383f 100755
--- a/package/base-files/files/lib/upgrade/stage2
+++ b/package/base-files/files/lib/upgrade/stage2
@@ -53,7 +53,7 @@ switch_to_ramfs() {
[ -L "/lib64" ] && ln -s /lib $RAM_ROOT/lib64
supivot $RAM_ROOT /mnt || {
- echo "Failed to switch over to ramfs. Please reboot."
+ v "Failed to switch over to ramfs. Please reboot."
exit 1
}
@@ -75,7 +75,7 @@ kill_remaining() { # [ <signal> [ <loop> ] ]
local stat
local proc_ppid=$(cut -d' ' -f4 /proc/$$/stat)
- echo -n "Sending $sig to remaining processes ... "
+ vn "Sending $sig to remaining processes ..."
while $run; do
run=false
@@ -95,7 +95,7 @@ kill_remaining() { # [ <signal> [ <loop> ] ]
# Skip kernel threads
[ -n "$cmdline" ] || continue
- echo -n "$name "
+ _vn " $name"
kill -$sig $pid 2>/dev/null
[ $loop -eq 1 ] && run=true
@@ -103,12 +103,12 @@ kill_remaining() { # [ <signal> [ <loop> ] ]
let loop_limit--
[ $loop_limit -eq 0 ] && {
- echo
- echo "Failed to kill all processes."
+ _v
+ v "Failed to kill all processes."
exit 1
}
done
- echo
+ _v
}
indicate_upgrade
@@ -129,7 +129,7 @@ if [ -n "$IMAGE" ] && type 'platform_pre_upgrade' >/dev/null 2>/dev/null; then
fi
if [ -n "$(rootfs_type)" ]; then
- echo "Switching to ramdisk..."
+ v "Switching to ramdisk..."
switch_to_ramfs
fi