From 3d4d6a0bd5a59dd49c20e3d66b61559bf99757b4 Mon Sep 17 00:00:00 2001 From: Stepan Blyschak Date: Thu, 8 Sep 2022 18:11:15 +0300 Subject: [PATCH] [warm-reboot] fix warm-reboot when /tmp/cache is missing Signed-off-by: Stepan Blyschak --- scripts/fast-reboot | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/fast-reboot b/scripts/fast-reboot index cd3e8237c3..a3fd68e767 100755 --- a/scripts/fast-reboot +++ b/scripts/fast-reboot @@ -466,10 +466,13 @@ function save_counters_folder() { debug "Saving counters folder before warmboot..." counters_folder="/host/counters" + counters_cache="/tmp/cache" if [[ ! -d $counters_folder ]]; then mkdir $counters_folder fi - cp -rf /tmp/cache $counters_folder + if [[ -d $counters_cache ]]; then + cp -rf $counters_cache $counters_folder + fi fi }