Skip to content

Commit 9f2f499

Browse files
committed
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
1 parent 01755f8 commit 9f2f499

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/atop

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ _XTRACE_ATOP=$(set +o | grep xtrace)
1919
set +o xtrace
2020

2121
function configure_atop {
22-
cat <<EOF | sudo tee /etc/default/atop >/dev/null
22+
mkdir -p $LOGDIR/atop
23+
cat <<EOF | sudo tee /etc/default/atop >/dev/null
2324
# /etc/default/atop
2425
# see man atoprc for more possibilities to configure atop execution
2526

0 commit comments

Comments
 (0)