Pre create logs directory for atop

The race may happen and atop can't start due to missing
logs directory. This patch pre-creates directory before
starting atop process.

Closes-Bug: #2100871

Change-Id: I89e3100dc86d60266913b5c5776db65e8882847c
This commit is contained in:
Vasyl Saienko
2025-02-28 07:47:11 +00:00
parent 01755f8bdf
commit 9f2f499ded

View File

@@ -19,7 +19,8 @@ _XTRACE_ATOP=$(set +o | grep xtrace)
set +o xtrace
function configure_atop {
cat <<EOF | sudo tee /etc/default/atop >/dev/null
mkdir -p $LOGDIR/atop
cat <<EOF | sudo tee /etc/default/atop >/dev/null
# /etc/default/atop
# see man atoprc for more possibilities to configure atop execution