Skip to content

Commit

Permalink
Fix error "mkdir: cannot create directory '/var/run': File exists"
Browse files Browse the repository at this point in the history
  • Loading branch information
yuravk committed Jun 11, 2024
1 parent 12ad6ae commit 9159af3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion almalinux-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,9 @@ _backup_alternative() {
alt_name="$(basename "${path}")"
alt_link="${ALT_DIR}/${alt_name}"
alt_dest="$(readlink "${alt_link}")"
mkdir -p "${bak_dir}"
if [[ ! -d "${bak_dir}" ]]; then
mkdir -p "${bak_dir}"
fi

# backup the current state of an alternative
echo "${alt_dest} ${alt_link}" > "${bak_dir}/${bak_prefix}.${alt_name}"
Expand Down

0 comments on commit 9159af3

Please sign in to comment.