Skip to content

fix: Option matching error causing system crash#22

Open
hutaoseven wants to merge 2 commits intolnmpkvemail:masterfrom
hutaoseven:hutao
Open

fix: Option matching error causing system crash#22
hutaoseven wants to merge 2 commits intolnmpkvemail:masterfrom
hutaoseven:hutao

Conversation

@hutaoseven
Copy link

@hutaoseven hutaoseven commented Dec 23, 2024

Ubuntu24.04 新装 lnmp2.1 ,选择 MariaDB-10.11.7 时,导致系统崩溃

## Reproduce 复现
# file: init.sh
DBSelect=10
if [[ "${DBSelect}" =~ ^[12345]|11$ ]]; then  # init.sh: 478 行
  echo "MySQL"
elif [[ "${DBSelect}" =~ ^[6789]|10$ ]]; then # init.sh: 499 行
  echo "Mariadb"
fi

# 最终导致 MariaDB_FileName 没有赋值
mv ${MariaDB_FileName}/* /usr/local/mariadb/ # mariadb.sh: 525 行
# 实际会执行   mv /* /usr/local/mariadb/  致使系统崩溃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant