mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #9544 from Security-Onion-Solutions/2.4createrepoinstall
ensure yum-utils and createrepo are installed from so remote repo
This commit is contained in:
5
setup/so-functions
Executable file → Normal file
5
setup/so-functions
Executable file → Normal file
@@ -1935,7 +1935,6 @@ securityonion_repo() {
|
||||
repo_sync_local() {
|
||||
# Sync the repo from the the SO repo locally.
|
||||
# Check for reposync
|
||||
info "Backing up old repos"
|
||||
mkdir -p /nsm/repo
|
||||
mkdir -p /root/reposync_cache
|
||||
echo "[main]" > /root/repodownload.conf
|
||||
@@ -1962,14 +1961,14 @@ repo_sync_local() {
|
||||
if [[ ! "$REPOSYNC" -gt 0 ]]; then
|
||||
# Install reposync
|
||||
info "Installing createrepo"
|
||||
logCmd "yum -y install -c /root/repodownload.conf yum-utils createrepo"
|
||||
logCmd "yum install -y -c /root/repodownload.conf --disablerepo='*' --enablerepo='securityonionsync' yum-utils createrepo"
|
||||
else
|
||||
info "We have what we need to sync"
|
||||
fi
|
||||
|
||||
logCmd "reposync --norepopath -n -g -l -d -m -c /root/repodownload.conf -r securityonionsync --download-metadata -p /nsm/repo/"
|
||||
|
||||
|
||||
|
||||
# After the download is complete run createrepo
|
||||
create_repo
|
||||
|
||||
|
||||
Reference in New Issue
Block a user